@rapidrest/service-core 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +16 -0
- package/dist/lib/ApiErrors.js +41 -0
- package/dist/lib/ApiErrors.js.map +1 -0
- package/dist/lib/BackgroundService.js +16 -0
- package/dist/lib/BackgroundService.js.map +1 -0
- package/dist/lib/BackgroundServiceManager.js +135 -0
- package/dist/lib/BackgroundServiceManager.js.map +1 -0
- package/dist/lib/BulkError.js +24 -0
- package/dist/lib/BulkError.js.map +1 -0
- package/dist/lib/EventListenerManager.js +161 -0
- package/dist/lib/EventListenerManager.js.map +1 -0
- package/dist/lib/NetUtils.js +103 -0
- package/dist/lib/NetUtils.js.map +1 -0
- package/dist/lib/NotificationUtils.js +34 -0
- package/dist/lib/NotificationUtils.js.map +1 -0
- package/dist/lib/ObjectFactory.js +90 -0
- package/dist/lib/ObjectFactory.js.map +1 -0
- package/dist/lib/OpenApiSpec.js +748 -0
- package/dist/lib/OpenApiSpec.js.map +1 -0
- package/dist/lib/Server.js +549 -0
- package/dist/lib/Server.js.map +1 -0
- package/dist/lib/Types.js +2 -0
- package/dist/lib/Types.js.map +1 -0
- package/dist/lib/auth/AuthMiddleware.js +229 -0
- package/dist/lib/auth/AuthMiddleware.js.map +1 -0
- package/dist/lib/auth/AuthStrategy.js +2 -0
- package/dist/lib/auth/AuthStrategy.js.map +1 -0
- package/dist/lib/auth/BasicStrategy.js +106 -0
- package/dist/lib/auth/BasicStrategy.js.map +1 -0
- package/dist/lib/auth/JWTStrategy.js +161 -0
- package/dist/lib/auth/JWTStrategy.js.map +1 -0
- package/dist/lib/auth/index.js +5 -0
- package/dist/lib/auth/index.js.map +1 -0
- package/dist/lib/database/ConnectionKinds.js +14 -0
- package/dist/lib/database/ConnectionKinds.js.map +1 -0
- package/dist/lib/database/ConnectionManager.js +161 -0
- package/dist/lib/database/ConnectionManager.js.map +1 -0
- package/dist/lib/database/MongoConnection.js +86 -0
- package/dist/lib/database/MongoConnection.js.map +1 -0
- package/dist/lib/database/MongoRepository.js +136 -0
- package/dist/lib/database/MongoRepository.js.map +1 -0
- package/dist/lib/database/MongoSchemaSync.js +136 -0
- package/dist/lib/database/MongoSchemaSync.js.map +1 -0
- package/dist/lib/database/NamingUtils.js +52 -0
- package/dist/lib/database/NamingUtils.js.map +1 -0
- package/dist/lib/database/TypeOrmSupport.js +146 -0
- package/dist/lib/database/TypeOrmSupport.js.map +1 -0
- package/dist/lib/database/index.js +7 -0
- package/dist/lib/database/index.js.map +1 -0
- package/dist/lib/decorators/DatabaseDecorators.js +52 -0
- package/dist/lib/decorators/DatabaseDecorators.js.map +1 -0
- package/dist/lib/decorators/DocDecorators.js +120 -0
- package/dist/lib/decorators/DocDecorators.js.map +1 -0
- package/dist/lib/decorators/EventDecorators.js +24 -0
- package/dist/lib/decorators/EventDecorators.js.map +1 -0
- package/dist/lib/decorators/ModelDecorators.js +173 -0
- package/dist/lib/decorators/ModelDecorators.js.map +1 -0
- package/dist/lib/decorators/PersistenceDecorators.js +177 -0
- package/dist/lib/decorators/PersistenceDecorators.js.map +1 -0
- package/dist/lib/decorators/RouteDecorators.js +324 -0
- package/dist/lib/decorators/RouteDecorators.js.map +1 -0
- package/dist/lib/decorators/index.js +7 -0
- package/dist/lib/decorators/index.js.map +1 -0
- package/dist/lib/http/Adapters.js +230 -0
- package/dist/lib/http/Adapters.js.map +1 -0
- package/dist/lib/http/Router.js +403 -0
- package/dist/lib/http/Router.js.map +1 -0
- package/dist/lib/http/WebSocket.js +82 -0
- package/dist/lib/http/WebSocket.js.map +1 -0
- package/dist/lib/http/index.js +4 -0
- package/dist/lib/http/index.js.map +1 -0
- package/dist/lib/http/types.js +5 -0
- package/dist/lib/http/types.js.map +1 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/models/BaseEntity.js +83 -0
- package/dist/lib/models/BaseEntity.js.map +1 -0
- package/dist/lib/models/BaseMongoEntity.js +40 -0
- package/dist/lib/models/BaseMongoEntity.js.map +1 -0
- package/dist/lib/models/ModelUtils.js +645 -0
- package/dist/lib/models/ModelUtils.js.map +1 -0
- package/dist/lib/models/RecoverableBaseEntity.js +39 -0
- package/dist/lib/models/RecoverableBaseEntity.js.map +1 -0
- package/dist/lib/models/RecoverableBaseMongoEntity.js +40 -0
- package/dist/lib/models/RecoverableBaseMongoEntity.js.map +1 -0
- package/dist/lib/models/RepoUtils.js +717 -0
- package/dist/lib/models/RepoUtils.js.map +1 -0
- package/dist/lib/models/SimpleEntity.js +42 -0
- package/dist/lib/models/SimpleEntity.js.map +1 -0
- package/dist/lib/models/SimpleMongoEntity.js +38 -0
- package/dist/lib/models/SimpleMongoEntity.js.map +1 -0
- package/dist/lib/models/StatusExtraData.js +15 -0
- package/dist/lib/models/StatusExtraData.js.map +1 -0
- package/dist/lib/models/index.js +10 -0
- package/dist/lib/models/index.js.map +1 -0
- package/dist/lib/routes/AdminRoute.js +268 -0
- package/dist/lib/routes/AdminRoute.js.map +1 -0
- package/dist/lib/routes/MetricsRoute.js +86 -0
- package/dist/lib/routes/MetricsRoute.js.map +1 -0
- package/dist/lib/routes/ModelRoute.js +481 -0
- package/dist/lib/routes/ModelRoute.js.map +1 -0
- package/dist/lib/routes/OpenAPIRoute.js +115 -0
- package/dist/lib/routes/OpenAPIRoute.js.map +1 -0
- package/dist/lib/routes/RouteUtils.js +445 -0
- package/dist/lib/routes/RouteUtils.js.map +1 -0
- package/dist/lib/routes/StatusRoute.js +55 -0
- package/dist/lib/routes/StatusRoute.js.map +1 -0
- package/dist/lib/routes/index.js +7 -0
- package/dist/lib/routes/index.js.map +1 -0
- package/dist/lib/security/ACLRouteMongo.js +194 -0
- package/dist/lib/security/ACLRouteMongo.js.map +1 -0
- package/dist/lib/security/ACLRouteSQL.js +193 -0
- package/dist/lib/security/ACLRouteSQL.js.map +1 -0
- package/dist/lib/security/ACLUtils.js +457 -0
- package/dist/lib/security/ACLUtils.js.map +1 -0
- package/dist/lib/security/AccessControlList.js +18 -0
- package/dist/lib/security/AccessControlList.js.map +1 -0
- package/dist/lib/security/AccessControlListMongo.js +155 -0
- package/dist/lib/security/AccessControlListMongo.js.map +1 -0
- package/dist/lib/security/AccessControlListSQL.js +149 -0
- package/dist/lib/security/AccessControlListSQL.js.map +1 -0
- package/dist/lib/security/index.js +3 -0
- package/dist/lib/security/index.js.map +1 -0
- package/dist/lib/test/index.js +3 -0
- package/dist/lib/test/index.js.map +1 -0
- package/dist/lib/test/request.js +99 -0
- package/dist/lib/test/request.js.map +1 -0
- package/dist/lib/test/requestws.js +173 -0
- package/dist/lib/test/requestws.js.map +1 -0
- package/dist/types/ApiErrors.d.ts +38 -0
- package/dist/types/BackgroundService.d.ts +30 -0
- package/dist/types/BackgroundServiceManager.d.ts +66 -0
- package/dist/types/BulkError.d.ts +11 -0
- package/dist/types/EventListenerManager.d.ts +36 -0
- package/dist/types/NetUtils.d.ts +29 -0
- package/dist/types/NotificationUtils.d.ts +25 -0
- package/dist/types/ObjectFactory.d.ts +17 -0
- package/dist/types/OpenApiSpec.d.ts +114 -0
- package/dist/types/Server.d.ts +180 -0
- package/dist/types/Types.d.ts +8 -0
- package/dist/types/auth/AuthMiddleware.d.ts +42 -0
- package/dist/types/auth/AuthStrategy.d.ts +32 -0
- package/dist/types/auth/BasicStrategy.d.ts +33 -0
- package/dist/types/auth/JWTStrategy.d.ts +61 -0
- package/dist/types/auth/index.d.ts +4 -0
- package/dist/types/database/ConnectionKinds.d.ts +7 -0
- package/dist/types/database/ConnectionManager.d.ts +35 -0
- package/dist/types/database/MongoConnection.d.ts +54 -0
- package/dist/types/database/MongoRepository.d.ts +92 -0
- package/dist/types/database/MongoSchemaSync.d.ts +41 -0
- package/dist/types/database/NamingUtils.d.ts +24 -0
- package/dist/types/database/TypeOrmSupport.d.ts +20 -0
- package/dist/types/database/index.d.ts +6 -0
- package/dist/types/decorators/DatabaseDecorators.d.ts +18 -0
- package/dist/types/decorators/DocDecorators.d.ts +69 -0
- package/dist/types/decorators/EventDecorators.d.ts +12 -0
- package/dist/types/decorators/ModelDecorators.d.ts +80 -0
- package/dist/types/decorators/PersistenceDecorators.d.ts +117 -0
- package/dist/types/decorators/RouteDecorators.d.ts +172 -0
- package/dist/types/decorators/index.d.ts +6 -0
- package/dist/types/http/Adapters.d.ts +68 -0
- package/dist/types/http/Router.d.ts +99 -0
- package/dist/types/http/WebSocket.d.ts +56 -0
- package/dist/types/http/index.d.ts +6 -0
- package/dist/types/http/types.d.ts +54 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/models/BaseEntity.d.ts +29 -0
- package/dist/types/models/BaseMongoEntity.d.ts +13 -0
- package/dist/types/models/ModelUtils.d.ts +166 -0
- package/dist/types/models/RecoverableBaseEntity.d.ts +16 -0
- package/dist/types/models/RecoverableBaseMongoEntity.d.ts +16 -0
- package/dist/types/models/RepoUtils.d.ts +154 -0
- package/dist/types/models/SimpleEntity.d.ts +14 -0
- package/dist/types/models/SimpleMongoEntity.d.ts +15 -0
- package/dist/types/models/StatusExtraData.d.ts +6 -0
- package/dist/types/models/index.d.ts +9 -0
- package/dist/types/routes/AdminRoute.d.ts +47 -0
- package/dist/types/routes/MetricsRoute.d.ts +15 -0
- package/dist/types/routes/ModelRoute.d.ts +226 -0
- package/dist/types/routes/OpenAPIRoute.d.ts +17 -0
- package/dist/types/routes/RouteUtils.d.ts +55 -0
- package/dist/types/routes/StatusRoute.d.ts +11 -0
- package/dist/types/routes/index.d.ts +6 -0
- package/dist/types/security/ACLRouteMongo.d.ts +19 -0
- package/dist/types/security/ACLRouteSQL.d.ts +19 -0
- package/dist/types/security/ACLUtils.d.ts +94 -0
- package/dist/types/security/AccessControlList.d.ts +103 -0
- package/dist/types/security/AccessControlListMongo.d.ts +24 -0
- package/dist/types/security/AccessControlListSQL.d.ts +24 -0
- package/dist/types/security/index.d.ts +2 -0
- package/dist/types/test/index.d.ts +2 -0
- package/dist/types/test/request.d.ts +24 -0
- package/dist/types/test/requestws.d.ts +21 -0
- package/docs/Makefile +20 -0
- package/docs/conf.py +58 -0
- package/docs/index.rst +17 -0
- package/docs/make.bat +35 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/README.md +13 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/README.md +23 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +28 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +28 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +57 -0
- package/docs/reference/@rapidrest/namespaces/EventDecorators/README.md +12 -0
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +17 -0
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +26 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/README.md +26 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +25 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +18 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +25 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +35 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +25 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +26 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +45 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +14 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/README.md +25 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +25 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +26 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +119 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +25 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +68 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +26 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +26 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +27 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +41 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +51 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +41 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +51 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/README.md +36 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +33 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +33 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +25 -0
- package/docs/reference/README.md +20 -0
- package/docs/reference/classes/ACLUtils.md +251 -0
- package/docs/reference/classes/AdminRoute.md +51 -0
- package/docs/reference/classes/AuthMiddleware.md +131 -0
- package/docs/reference/classes/BackgroundService.md +117 -0
- package/docs/reference/classes/BackgroundServiceManager.md +172 -0
- package/docs/reference/classes/BaseEntity.md +82 -0
- package/docs/reference/classes/BaseMongoEntity.md +107 -0
- package/docs/reference/classes/BasicStrategy.md +89 -0
- package/docs/reference/classes/BasicStrategyOptions.md +91 -0
- package/docs/reference/classes/BulkError.md +271 -0
- package/docs/reference/classes/ConnectionManager.md +75 -0
- package/docs/reference/classes/EventListenerManager.md +88 -0
- package/docs/reference/classes/JWTStrategy.md +77 -0
- package/docs/reference/classes/JWTStrategyOptions.md +97 -0
- package/docs/reference/classes/MetricsRoute.md +27 -0
- package/docs/reference/classes/ModelRoute.md +527 -0
- package/docs/reference/classes/ModelUtils.md +448 -0
- package/docs/reference/classes/MongoConnection.md +218 -0
- package/docs/reference/classes/MongoRepository.md +354 -0
- package/docs/reference/classes/MongoSchemaSync.md +67 -0
- package/docs/reference/classes/NetUtils.md +90 -0
- package/docs/reference/classes/NotificationUtils.md +77 -0
- package/docs/reference/classes/ObjectFactory.md +336 -0
- package/docs/reference/classes/OpenAPIRoute.md +77 -0
- package/docs/reference/classes/OpenApiSpec.md +892 -0
- package/docs/reference/classes/RecoverableBaseEntity.md +114 -0
- package/docs/reference/classes/RecoverableBaseMongoEntity.md +124 -0
- package/docs/reference/classes/RedisTransport.md +2202 -0
- package/docs/reference/classes/RepoUtils.md +486 -0
- package/docs/reference/classes/RouteUtils.md +191 -0
- package/docs/reference/classes/Server.md +408 -0
- package/docs/reference/classes/SimpleEntity.md +48 -0
- package/docs/reference/classes/SimpleMongoEntity.md +66 -0
- package/docs/reference/classes/StatusExtraData.md +57 -0
- package/docs/reference/classes/StatusRoute.md +26 -0
- package/docs/reference/enumerations/ACLAction.md +63 -0
- package/docs/reference/enumerations/ApiErrorMessages.md +123 -0
- package/docs/reference/enumerations/ApiErrors.md +123 -0
- package/docs/reference/functions/isSqlDataSource.md +26 -0
- package/docs/reference/functions/resolveCollectionName.md +33 -0
- package/docs/reference/functions/snakeCase.md +28 -0
- package/docs/reference/globals.md +91 -0
- package/docs/reference/interfaces/ACLRecord.md +96 -0
- package/docs/reference/interfaces/AccessControlList.md +76 -0
- package/docs/reference/interfaces/AuthResult.md +55 -0
- package/docs/reference/interfaces/AuthStrategy.md +57 -0
- package/docs/reference/interfaces/CreateRequestOptions.md +121 -0
- package/docs/reference/interfaces/DeleteRequestOptions.md +147 -0
- package/docs/reference/interfaces/FindRequestOptions.md +133 -0
- package/docs/reference/interfaces/JWTAuthResult.md +84 -0
- package/docs/reference/interfaces/RepoCreateOptions.md +95 -0
- package/docs/reference/interfaces/RepoDeleteOptions.md +115 -0
- package/docs/reference/interfaces/RepoFindOptions.md +135 -0
- package/docs/reference/interfaces/RepoOperationOptions.md +69 -0
- package/docs/reference/interfaces/RepoUpdateOptions.md +111 -0
- package/docs/reference/interfaces/RequestOptions.md +112 -0
- package/docs/reference/interfaces/TruncateRequestOptions.md +175 -0
- package/docs/reference/interfaces/UpdateRequestOptions.md +149 -0
- package/docs/reference/type-aliases/OneOrMany.md +19 -0
- package/docs/reference/type-aliases/OneOrNull.md +19 -0
- package/docs/reference/type-aliases/PartialBaseEntity.md +17 -0
- package/docs/reference/type-aliases/PartialSimpleEntity.md +17 -0
- package/docs/reference/type-aliases/UpdateObject.md +19 -0
- package/package.json +125 -0
package/docs/Makefile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
package/docs/conf.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
# import os
|
|
14
|
+
# import sys
|
|
15
|
+
# sys.path.insert(0, os.path.abspath('.'))
|
|
16
|
+
import recommonmark
|
|
17
|
+
from recommonmark.transform import AutoStructify
|
|
18
|
+
|
|
19
|
+
source_suffix = ['.rst', '.md']
|
|
20
|
+
|
|
21
|
+
# -- Project information -----------------------------------------------------
|
|
22
|
+
|
|
23
|
+
project = 'Core Library'
|
|
24
|
+
copyright = 'RapidREST All rights reserved.'
|
|
25
|
+
author = 'RapidREST'
|
|
26
|
+
|
|
27
|
+
# -- General configuration ---------------------------------------------------
|
|
28
|
+
|
|
29
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
30
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
31
|
+
# ones.
|
|
32
|
+
extensions = [
|
|
33
|
+
'recommonmark',
|
|
34
|
+
'sphinx.ext.autodoc',
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
# List of patterns, relative to source directory, that match files and
|
|
38
|
+
# directories to ignore when looking for source files.
|
|
39
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
40
|
+
exclude_patterns = []
|
|
41
|
+
|
|
42
|
+
master_doc = 'index'
|
|
43
|
+
|
|
44
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
45
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
46
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
47
|
+
html_static_path = ['_static']
|
|
48
|
+
|
|
49
|
+
# app setup hook
|
|
50
|
+
def setup(app):
|
|
51
|
+
app.add_config_value('recommonmark_config', {
|
|
52
|
+
'auto_toc_tree_section': 'Contents',
|
|
53
|
+
'enable_math': False,
|
|
54
|
+
'enable_inline_math': False,
|
|
55
|
+
'enable_eval_rst': True,
|
|
56
|
+
'enable_auto_doc_ref': True,
|
|
57
|
+
}, True)
|
|
58
|
+
app.add_transform(AutoStructify)
|
package/docs/index.rst
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
===============================================================================
|
|
2
|
+
Services Core Library
|
|
3
|
+
===============================================================================
|
|
4
|
+
|
|
5
|
+
Repository: ``git clone https://github.com/rapidrest/service-core.git``
|
|
6
|
+
|
|
7
|
+
Provides all core functionality for RapidREST based backend services.
|
|
8
|
+
|
|
9
|
+
.. toctree::
|
|
10
|
+
:caption: Project Info
|
|
11
|
+
|
|
12
|
+
reference/README
|
|
13
|
+
|
|
14
|
+
.. toctree::
|
|
15
|
+
:caption: API Reference
|
|
16
|
+
|
|
17
|
+
reference/globals
|
package/docs/make.bat
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=.
|
|
11
|
+
set BUILDDIR=_build
|
|
12
|
+
|
|
13
|
+
if "%1" == "" goto help
|
|
14
|
+
|
|
15
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
16
|
+
if errorlevel 9009 (
|
|
17
|
+
echo.
|
|
18
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
19
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
20
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
21
|
+
echo.may add the Sphinx directory to PATH.
|
|
22
|
+
echo.
|
|
23
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
24
|
+
echo.http://sphinx-doc.org/
|
|
25
|
+
exit /b 1
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../globals.md) / DatabaseDecorators
|
|
6
|
+
|
|
7
|
+
# DatabaseDecorators
|
|
8
|
+
|
|
9
|
+
## Functions
|
|
10
|
+
|
|
11
|
+
- [MongoRepository](functions/MongoRepository.md)
|
|
12
|
+
- [RedisConnection](functions/RedisConnection.md)
|
|
13
|
+
- [Repository](functions/Repository.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DatabaseDecorators](../README.md) / MongoRepository
|
|
6
|
+
|
|
7
|
+
# Function: MongoRepository()
|
|
8
|
+
|
|
9
|
+
> **MongoRepository**(`type`): (`target`, `propertyKey`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DatabaseDecorators.ts:10](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DatabaseDecorators.ts#L10)
|
|
12
|
+
|
|
13
|
+
Apply this to a property to have the TypeORM `MongoRepository` for the given entity type injected at instantiation.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### type
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
The entity type whose repository will be injected.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DatabaseDecorators](../README.md) / RedisConnection
|
|
6
|
+
|
|
7
|
+
# Function: RedisConnection()
|
|
8
|
+
|
|
9
|
+
> **RedisConnection**(`name`): (`target`, `propertyKey`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DatabaseDecorators.ts:44](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DatabaseDecorators.ts#L44)
|
|
12
|
+
|
|
13
|
+
Apply this to a property to have the `Redis` connection injected at instantiation.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### name
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The name of the database connection to inject.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DatabaseDecorators](../README.md) / Repository
|
|
6
|
+
|
|
7
|
+
# Function: Repository()
|
|
8
|
+
|
|
9
|
+
> **Repository**(`type`): (`target`, `propertyKey`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DatabaseDecorators.ts:27](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DatabaseDecorators.ts#L27)
|
|
12
|
+
|
|
13
|
+
Apply this to a property to have the TypeORM `Repository` for the given entity type injected at instantiation.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### type
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
The entity type whose repository will be injected.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey`) => `void`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../globals.md) / DocDecorators
|
|
6
|
+
|
|
7
|
+
# DocDecorators
|
|
8
|
+
|
|
9
|
+
## Interfaces
|
|
10
|
+
|
|
11
|
+
- [DocumentsData](interfaces/DocumentsData.md)
|
|
12
|
+
|
|
13
|
+
## Functions
|
|
14
|
+
|
|
15
|
+
- [Default](functions/Default.md)
|
|
16
|
+
- [Description](functions/Description.md)
|
|
17
|
+
- [Document](functions/Document.md)
|
|
18
|
+
- [Example](functions/Example.md)
|
|
19
|
+
- [Format](functions/Format.md)
|
|
20
|
+
- [Returns](functions/Returns.md)
|
|
21
|
+
- [Summary](functions/Summary.md)
|
|
22
|
+
- [Tags](functions/Tags.md)
|
|
23
|
+
- [TypeInfo](functions/TypeInfo.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Default
|
|
6
|
+
|
|
7
|
+
# Function: Default()
|
|
8
|
+
|
|
9
|
+
> **Default**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:40](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L40)
|
|
12
|
+
|
|
13
|
+
Provides a default value for property of a class.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The default value.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Description
|
|
6
|
+
|
|
7
|
+
# Function: Description()
|
|
8
|
+
|
|
9
|
+
> **Description**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:51](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L51)
|
|
12
|
+
|
|
13
|
+
Provides a detailed describing the class, property or function.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The description of the class, property or function.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Document
|
|
6
|
+
|
|
7
|
+
# Function: Document()
|
|
8
|
+
|
|
9
|
+
> **Document**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:20](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L20)
|
|
12
|
+
|
|
13
|
+
Provides a set of documentation data for a given class, property or function.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
[`DocumentsData`](../interfaces/DocumentsData.md)
|
|
20
|
+
|
|
21
|
+
The default value.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Example
|
|
6
|
+
|
|
7
|
+
# Function: Example()
|
|
8
|
+
|
|
9
|
+
> **Example**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:62](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L62)
|
|
12
|
+
|
|
13
|
+
Provides a example representation of the property or function return value.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
The example value.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Format
|
|
6
|
+
|
|
7
|
+
# Function: Format()
|
|
8
|
+
|
|
9
|
+
> **Format**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:73](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L73)
|
|
12
|
+
|
|
13
|
+
Describes the underlying format of a class's property.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The format of the property's property.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Returns
|
|
6
|
+
|
|
7
|
+
# Function: Returns()
|
|
8
|
+
|
|
9
|
+
> **Returns**(`types?`): (`target`, `propertyKey`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:109](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L109)
|
|
12
|
+
|
|
13
|
+
Stores runtime metadata about the typing information of a function's return value.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### types?
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
The optional return type(s) of the function. Can represent a single type (e.g. `MyClass`) or a union
|
|
22
|
+
of types (e.g. `string | number | null`). When describing a generic type such as a collection this
|
|
23
|
+
should be encoded as an array with the templated type as additional elements (e.g. `Array<MyClass>`
|
|
24
|
+
becomes `[[Array, MyClass]]`).
|
|
25
|
+
|
|
26
|
+
## Returns
|
|
27
|
+
|
|
28
|
+
(`target`, `propertyKey`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Summary
|
|
6
|
+
|
|
7
|
+
# Function: Summary()
|
|
8
|
+
|
|
9
|
+
> **Summary**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:84](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L84)
|
|
12
|
+
|
|
13
|
+
Provides a brief summary about the class, property or function.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The summary of the class, property or function.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / Tags
|
|
6
|
+
|
|
7
|
+
# Function: Tags()
|
|
8
|
+
|
|
9
|
+
> **Tags**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:95](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L95)
|
|
12
|
+
|
|
13
|
+
Provides a list of searchable tags associated with the property or function.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### value
|
|
18
|
+
|
|
19
|
+
`string`[]
|
|
20
|
+
|
|
21
|
+
The list of searchable tags.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`, `propertyKey?`) => `void`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / TypeInfo
|
|
6
|
+
|
|
7
|
+
# Function: TypeInfo()
|
|
8
|
+
|
|
9
|
+
> **TypeInfo**(`types?`): (`target`, `propertyKey`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:128](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L128)
|
|
12
|
+
|
|
13
|
+
Stores runtime metadata about the typing information of a class property.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### types?
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
The optional primary type(s) of the property. Can represent a single type (e.g. `MyClass`) or a union
|
|
22
|
+
of types (e.g. `string | number | null`). When describing a generic type such as a collection this
|
|
23
|
+
should be encoded as an array with the templated type as additional elements (e.g. `Array<MyClass>`
|
|
24
|
+
becomes `[[Array, MyClass]]`).
|
|
25
|
+
|
|
26
|
+
## Returns
|
|
27
|
+
|
|
28
|
+
(`target`, `propertyKey`) => `void`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [DocDecorators](../README.md) / DocumentsData
|
|
6
|
+
|
|
7
|
+
# Interface: DocumentsData
|
|
8
|
+
|
|
9
|
+
Defined in: [src/decorators/DocDecorators.ts:6](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L6)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### default?
|
|
14
|
+
|
|
15
|
+
> `optional` **default?**: `any`
|
|
16
|
+
|
|
17
|
+
Defined in: [src/decorators/DocDecorators.ts:7](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L7)
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### description?
|
|
22
|
+
|
|
23
|
+
> `optional` **description?**: `string`
|
|
24
|
+
|
|
25
|
+
Defined in: [src/decorators/DocDecorators.ts:8](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L8)
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### example?
|
|
30
|
+
|
|
31
|
+
> `optional` **example?**: `any`
|
|
32
|
+
|
|
33
|
+
Defined in: [src/decorators/DocDecorators.ts:9](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L9)
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### format?
|
|
38
|
+
|
|
39
|
+
> `optional` **format?**: `string`
|
|
40
|
+
|
|
41
|
+
Defined in: [src/decorators/DocDecorators.ts:10](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L10)
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### summary?
|
|
46
|
+
|
|
47
|
+
> `optional` **summary?**: `string`
|
|
48
|
+
|
|
49
|
+
Defined in: [src/decorators/DocDecorators.ts:11](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L11)
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### tags?
|
|
54
|
+
|
|
55
|
+
> `optional` **tags?**: `string`[]
|
|
56
|
+
|
|
57
|
+
Defined in: [src/decorators/DocDecorators.ts:12](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/DocDecorators.ts#L12)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [EventDecorators](../README.md) / EventListener
|
|
6
|
+
|
|
7
|
+
# Function: EventListener()
|
|
8
|
+
|
|
9
|
+
> **EventListener**(): (`target`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/EventDecorators.ts:21](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/EventDecorators.ts#L21)
|
|
12
|
+
|
|
13
|
+
Apply this optionally to a abitary class, that has a no argument constructor, to auto register it as an event listener. Will still require add `@OnEvent` to methods
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
(`target`) => `void`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [EventDecorators](../README.md) / OnEvent
|
|
6
|
+
|
|
7
|
+
# Function: OnEvent()
|
|
8
|
+
|
|
9
|
+
> **OnEvent**(`type?`): (`target`, `propertyKey`, `descriptor`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/EventDecorators.ts:12](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/EventDecorators.ts#L12)
|
|
12
|
+
|
|
13
|
+
Apply this to a function that will be called when events arrive for the specified type(s). If no event type is
|
|
14
|
+
specified, then the function will be called upon each event that arrives.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
### type?
|
|
19
|
+
|
|
20
|
+
`string` \| `string`[]
|
|
21
|
+
|
|
22
|
+
The name or list of names corresponding to events that the function will handle.
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
(`target`, `propertyKey`, `descriptor`) => `void`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../globals.md) / ModelDecorators
|
|
6
|
+
|
|
7
|
+
# ModelDecorators
|
|
8
|
+
|
|
9
|
+
## Interfaces
|
|
10
|
+
|
|
11
|
+
- [PendingTypeOrmColumn](interfaces/PendingTypeOrmColumn.md)
|
|
12
|
+
|
|
13
|
+
## Variables
|
|
14
|
+
|
|
15
|
+
- [pendingTypeOrmColumns](variables/pendingTypeOrmColumns.md)
|
|
16
|
+
|
|
17
|
+
## Functions
|
|
18
|
+
|
|
19
|
+
- [Cache](functions/Cache.md)
|
|
20
|
+
- [ChildEntity](functions/ChildEntity.md)
|
|
21
|
+
- [DataStore](functions/DataStore.md)
|
|
22
|
+
- [Identifier](functions/Identifier.md)
|
|
23
|
+
- [Protect](functions/Protect.md)
|
|
24
|
+
- [Reference](functions/Reference.md)
|
|
25
|
+
- [Shard](functions/Shard.md)
|
|
26
|
+
- [TrackChanges](functions/TrackChanges.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../../../../globals.md) / [ModelDecorators](../README.md) / Cache
|
|
6
|
+
|
|
7
|
+
# Function: Cache()
|
|
8
|
+
|
|
9
|
+
> **Cache**(`ttl?`): (`target`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:30](https://github.com/rapidrest/service-core/blob/c8974caa9b5d3eb225bcbcd93945f2e588fe2f0a/src/decorators/ModelDecorators.ts#L30)
|
|
12
|
+
|
|
13
|
+
Indicates that the class is cacheable with the specified TTL.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### ttl?
|
|
18
|
+
|
|
19
|
+
`number` = `30`
|
|
20
|
+
|
|
21
|
+
The time, in seconds, that an object will be cached before being invalidated.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
(`target`) => `void`
|