@rapidrest/service-core 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/auth/AuthMiddleware.js +33 -3
- package/dist/lib/auth/AuthMiddleware.js.map +1 -1
- package/dist/lib/auth/BasicStrategy.js +46 -39
- package/dist/lib/auth/BasicStrategy.js.map +1 -1
- package/dist/lib/auth/JWTStrategy.js +69 -60
- package/dist/lib/auth/JWTStrategy.js.map +1 -1
- package/dist/lib/index.js +2 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/routes/RouteUtils.js +8 -7
- package/dist/lib/routes/RouteUtils.js.map +1 -1
- package/dist/types/auth/AuthMiddleware.d.ts +12 -1
- package/dist/types/auth/AuthStrategy.d.ts +13 -1
- package/dist/types/auth/BasicStrategy.d.ts +7 -3
- package/dist/types/auth/JWTStrategy.d.ts +6 -3
- package/dist/types/index.d.ts +2 -1
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +7 -7
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +1 -1
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +5 -5
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +3 -3
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +3 -3
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +4 -4
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +5 -5
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +4 -4
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +5 -5
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +1 -1
- package/docs/reference/classes/ACLUtils.md +10 -10
- package/docs/reference/classes/AdminRoute.md +3 -3
- package/docs/reference/classes/AuthMiddleware.md +55 -13
- package/docs/reference/classes/BackgroundService.md +8 -8
- package/docs/reference/classes/BackgroundServiceManager.md +7 -7
- package/docs/reference/classes/BaseEntity.md +6 -6
- package/docs/reference/classes/BaseMongoEntity.md +7 -7
- package/docs/reference/classes/BasicStrategy.md +52 -10
- package/docs/reference/classes/BasicStrategyOptions.md +35 -11
- package/docs/reference/classes/BulkError.md +3 -3
- package/docs/reference/classes/ConnectionManager.md +4 -4
- package/docs/reference/classes/EventListenerManager.md +5 -5
- package/docs/reference/classes/HttpRouter.md +343 -0
- package/docs/reference/classes/JWTStrategy.md +37 -14
- package/docs/reference/classes/JWTStrategyOptions.md +10 -10
- package/docs/reference/classes/MetricsRoute.md +2 -2
- package/docs/reference/classes/ModelRoute.md +28 -28
- package/docs/reference/classes/ModelUtils.md +10 -10
- package/docs/reference/classes/MongoConnection.md +12 -12
- package/docs/reference/classes/MongoRepository.md +17 -17
- package/docs/reference/classes/MongoSchemaSync.md +3 -3
- package/docs/reference/classes/NetUtils.md +4 -4
- package/docs/reference/classes/NotificationUtils.md +3 -3
- package/docs/reference/classes/ObjectFactory.md +10 -10
- package/docs/reference/classes/OpenAPIRoute.md +5 -5
- package/docs/reference/classes/OpenApiSpec.md +45 -45
- package/docs/reference/classes/RecoverableBaseEntity.md +7 -7
- package/docs/reference/classes/RecoverableBaseMongoEntity.md +8 -8
- package/docs/reference/classes/RedisTransport.md +4 -4
- package/docs/reference/classes/RepoUtils.md +28 -28
- package/docs/reference/classes/RouteUtils.md +17 -17
- package/docs/reference/classes/Server.md +29 -29
- package/docs/reference/classes/SimpleEntity.md +3 -3
- package/docs/reference/classes/SimpleMongoEntity.md +4 -4
- package/docs/reference/classes/StatusExtraData.md +4 -4
- package/docs/reference/classes/StatusRoute.md +1 -1
- package/docs/reference/classes/UWSRequest.md +226 -0
- package/docs/reference/classes/UWSResponse.md +257 -0
- package/docs/reference/classes/UWSWebSocketShim.md +958 -0
- package/docs/reference/enumerations/ACLAction.md +7 -7
- package/docs/reference/enumerations/ApiErrorMessages.md +15 -15
- package/docs/reference/enumerations/ApiErrors.md +15 -15
- package/docs/reference/functions/createWebSocketStream.md +27 -0
- package/docs/reference/functions/isSqlDataSource.md +1 -1
- package/docs/reference/functions/readBody.md +29 -0
- package/docs/reference/functions/resolveCollectionName.md +1 -1
- package/docs/reference/functions/runChain.md +40 -0
- package/docs/reference/functions/snakeCase.md +1 -1
- package/docs/reference/globals.md +15 -0
- package/docs/reference/interfaces/ACLRecord.md +8 -8
- package/docs/reference/interfaces/AccessControlList.md +5 -5
- package/docs/reference/interfaces/AuthResult.md +5 -5
- package/docs/reference/interfaces/AuthStrategy.md +47 -9
- package/docs/reference/interfaces/CreateRequestOptions.md +11 -11
- package/docs/reference/interfaces/DeleteRequestOptions.md +13 -13
- package/docs/reference/interfaces/FindRequestOptions.md +12 -12
- package/docs/reference/interfaces/HttpRequest.md +147 -0
- package/docs/reference/interfaces/HttpResponse.md +164 -0
- package/docs/reference/interfaces/JWTAuthResult.md +9 -9
- package/docs/reference/interfaces/RepoCreateOptions.md +7 -7
- package/docs/reference/interfaces/RepoDeleteOptions.md +9 -9
- package/docs/reference/interfaces/RepoFindOptions.md +11 -11
- package/docs/reference/interfaces/RepoOperationOptions.md +6 -6
- package/docs/reference/interfaces/RepoUpdateOptions.md +8 -8
- package/docs/reference/interfaces/RequestOptions.md +10 -10
- package/docs/reference/interfaces/RequestWS.md +225 -0
- package/docs/reference/interfaces/TruncateRequestOptions.md +15 -15
- package/docs/reference/interfaces/UpdateRequestOptions.md +13 -13
- package/docs/reference/type-aliases/ErrorHandler.md +35 -0
- package/docs/reference/type-aliases/NextFunction.md +23 -0
- package/docs/reference/type-aliases/OneOrMany.md +1 -1
- package/docs/reference/type-aliases/OneOrNull.md +1 -1
- package/docs/reference/type-aliases/PartialBaseEntity.md +1 -1
- package/docs/reference/type-aliases/PartialSimpleEntity.md +1 -1
- package/docs/reference/type-aliases/RequestHandler.md +31 -0
- package/docs/reference/type-aliases/UpdateObject.md +1 -1
- package/docs/reference/type-aliases/WsUpgradeAuth.md +27 -0
- package/docs/reference/type-aliases/WsUpgradeAuthResult.md +47 -0
- package/package.json +2 -2
|
@@ -19,8 +19,10 @@ export declare class BasicStrategyOptions {
|
|
|
19
19
|
* Referer headers, which permanently exposes credentials outside the application.
|
|
20
20
|
*/
|
|
21
21
|
allowQueryParam: boolean;
|
|
22
|
-
/**
|
|
23
|
-
verify(uid: string, secret: string): JWTUser | Promise<JWTUser> | undefined;
|
|
22
|
+
/** Override this function to handle asynchronous (non-blocking) verification of the login info. */
|
|
23
|
+
verify(uid: string, secret: string): JWTUser | Promise<JWTUser | undefined> | undefined;
|
|
24
|
+
/** Override this function to handle synchronous (blocking) verification of the login info. */
|
|
25
|
+
verifySync(uid: string, secret: string): JWTUser | undefined;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* @author Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
@@ -29,5 +31,7 @@ export declare class BasicStrategy implements AuthStrategy {
|
|
|
29
31
|
readonly name: string;
|
|
30
32
|
private options;
|
|
31
33
|
constructor(options?: BasicStrategyOptions);
|
|
32
|
-
|
|
34
|
+
private getLoginInfo;
|
|
35
|
+
authenticate(req: HttpRequest, res: HttpResponse, required?: boolean): Promise<AuthResult | undefined>;
|
|
36
|
+
authenticateSync(req: HttpRequest, res: HttpResponse, required?: boolean): AuthResult | undefined;
|
|
33
37
|
}
|
|
@@ -54,8 +54,11 @@ export declare class JWTStrategy {
|
|
|
54
54
|
private options;
|
|
55
55
|
constructor(options?: JWTStrategyOptions);
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
* Scans the provided request object for an authentication token this strategy can process.
|
|
58
|
+
* @param req The request to scan for an auth token.
|
|
59
|
+
* @returns The auth token if found, otherwise `undefined`.
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
private getAuthToken;
|
|
62
|
+
authenticate(req: HttpRequest, res: HttpResponse, required?: boolean): Promise<JWTAuthResult | undefined>;
|
|
63
|
+
authenticateSync(req: HttpRequest, res: HttpResponse, required?: boolean): JWTAuthResult | undefined;
|
|
61
64
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,9 +9,10 @@ export * from "./ObjectFactory.js";
|
|
|
9
9
|
export * from "./OpenApiSpec.js";
|
|
10
10
|
export * from "./Server.js";
|
|
11
11
|
export * from "./Types.js";
|
|
12
|
+
export * from "./auth/index.js";
|
|
12
13
|
export * from "./database/index.js";
|
|
13
14
|
export * from "./decorators/index.js";
|
|
15
|
+
export * from "./http/index.js";
|
|
14
16
|
export * from "./models/index.js";
|
|
15
|
-
export * from "./auth/index.js";
|
|
16
17
|
export * from "./routes/index.js";
|
|
17
18
|
export * from "./security/index.js";
|
package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **MongoRepository**(`type`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DatabaseDecorators.ts:10](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DatabaseDecorators.ts:10](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DatabaseDecorators.ts#L10)
|
|
12
12
|
|
|
13
13
|
Apply this to a property to have the TypeORM `MongoRepository` for the given entity type injected at instantiation.
|
|
14
14
|
|
package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **RedisConnection**(`name`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DatabaseDecorators.ts:44](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DatabaseDecorators.ts:44](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DatabaseDecorators.ts#L44)
|
|
12
12
|
|
|
13
13
|
Apply this to a property to have the `Redis` connection injected at instantiation.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Repository**(`type`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DatabaseDecorators.ts:27](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DatabaseDecorators.ts:27](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DatabaseDecorators.ts#L27)
|
|
12
12
|
|
|
13
13
|
Apply this to a property to have the TypeORM `Repository` for the given entity type injected at instantiation.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Default**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:40](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:40](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L40)
|
|
12
12
|
|
|
13
13
|
Provides a default value for property of a class.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Description**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:51](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:51](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L51)
|
|
12
12
|
|
|
13
13
|
Provides a detailed describing the class, property or function.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Document**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:20](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:20](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L20)
|
|
12
12
|
|
|
13
13
|
Provides a set of documentation data for a given class, property or function.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Example**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:62](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:62](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L62)
|
|
12
12
|
|
|
13
13
|
Provides a example representation of the property or function return value.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Format**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:73](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:73](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L73)
|
|
12
12
|
|
|
13
13
|
Describes the underlying format of a class's property.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Returns**(`types?`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:109](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:109](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L109)
|
|
12
12
|
|
|
13
13
|
Stores runtime metadata about the typing information of a function's return value.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Summary**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:84](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:84](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L84)
|
|
12
12
|
|
|
13
13
|
Provides a brief summary about the class, property or function.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Tags**(`value`): (`target`, `propertyKey?`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:95](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:95](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L95)
|
|
12
12
|
|
|
13
13
|
Provides a list of searchable tags associated with the property or function.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **TypeInfo**(`types?`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/DocDecorators.ts:128](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/DocDecorators.ts:128](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L128)
|
|
12
12
|
|
|
13
13
|
Stores runtime metadata about the typing information of a class property.
|
|
14
14
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: DocumentsData
|
|
8
8
|
|
|
9
|
-
Defined in: [src/decorators/DocDecorators.ts:6](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/decorators/DocDecorators.ts:6](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L6)
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [src/decorators/DocDecorators.ts:6](https://github.com/rapidrest/ser
|
|
|
14
14
|
|
|
15
15
|
> `optional` **default?**: `any`
|
|
16
16
|
|
|
17
|
-
Defined in: [src/decorators/DocDecorators.ts:7](https://github.com/rapidrest/service-core/blob/
|
|
17
|
+
Defined in: [src/decorators/DocDecorators.ts:7](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L7)
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Defined in: [src/decorators/DocDecorators.ts:7](https://github.com/rapidrest/ser
|
|
|
22
22
|
|
|
23
23
|
> `optional` **description?**: `string`
|
|
24
24
|
|
|
25
|
-
Defined in: [src/decorators/DocDecorators.ts:8](https://github.com/rapidrest/service-core/blob/
|
|
25
|
+
Defined in: [src/decorators/DocDecorators.ts:8](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L8)
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ Defined in: [src/decorators/DocDecorators.ts:8](https://github.com/rapidrest/ser
|
|
|
30
30
|
|
|
31
31
|
> `optional` **example?**: `any`
|
|
32
32
|
|
|
33
|
-
Defined in: [src/decorators/DocDecorators.ts:9](https://github.com/rapidrest/service-core/blob/
|
|
33
|
+
Defined in: [src/decorators/DocDecorators.ts:9](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L9)
|
|
34
34
|
|
|
35
35
|
***
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Defined in: [src/decorators/DocDecorators.ts:9](https://github.com/rapidrest/ser
|
|
|
38
38
|
|
|
39
39
|
> `optional` **format?**: `string`
|
|
40
40
|
|
|
41
|
-
Defined in: [src/decorators/DocDecorators.ts:10](https://github.com/rapidrest/service-core/blob/
|
|
41
|
+
Defined in: [src/decorators/DocDecorators.ts:10](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L10)
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ Defined in: [src/decorators/DocDecorators.ts:10](https://github.com/rapidrest/se
|
|
|
46
46
|
|
|
47
47
|
> `optional` **summary?**: `string`
|
|
48
48
|
|
|
49
|
-
Defined in: [src/decorators/DocDecorators.ts:11](https://github.com/rapidrest/service-core/blob/
|
|
49
|
+
Defined in: [src/decorators/DocDecorators.ts:11](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L11)
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
@@ -54,4 +54,4 @@ Defined in: [src/decorators/DocDecorators.ts:11](https://github.com/rapidrest/se
|
|
|
54
54
|
|
|
55
55
|
> `optional` **tags?**: `string`[]
|
|
56
56
|
|
|
57
|
-
Defined in: [src/decorators/DocDecorators.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
57
|
+
Defined in: [src/decorators/DocDecorators.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/DocDecorators.ts#L12)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **EventListener**(): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/EventDecorators.ts:21](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/EventDecorators.ts:21](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/EventDecorators.ts#L21)
|
|
12
12
|
|
|
13
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
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **OnEvent**(`type?`): (`target`, `propertyKey`, `descriptor`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/EventDecorators.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/EventDecorators.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/EventDecorators.ts#L12)
|
|
12
12
|
|
|
13
13
|
Apply this to a function that will be called when events arrive for the specified type(s). If no event type is
|
|
14
14
|
specified, then the function will be called upon each event that arrives.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Cache**(`ttl?`): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:30](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:30](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L30)
|
|
12
12
|
|
|
13
13
|
Indicates that the class is cacheable with the specified TTL.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **ChildEntity**(): \<`T`\>(`constructor`) => \{(...`args`): `child`\<`T`\>; `prototype`: `child`\<`any`\>; \} & `T`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:45](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:45](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L45)
|
|
12
12
|
|
|
13
13
|
Indicates that a class is a child entity to some parent. Child entities will inherit all datastore configuration
|
|
14
14
|
of the parent, including cache settings.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **DataStore**(`datastore`): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:73](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:73](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L73)
|
|
12
12
|
|
|
13
13
|
Indicates that the class describes an entity that will be persisted in the datastore with the given name.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Identifier**(`target`, `propertyKey`): `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:87](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:87](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L87)
|
|
12
12
|
|
|
13
13
|
Apply this to a property that is considered a unique identifier.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Protect**(`classACL?`, `recordACL?`): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:109](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:109](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L109)
|
|
12
12
|
|
|
13
13
|
Apply this to a model class to indicate that it should be protected by the AccessControlList security system.
|
|
14
14
|
The `classACL` parameter specifies the default ACL governing access to general operations against the model class
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Reference**(`clazz`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:160](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:160](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L160)
|
|
12
12
|
|
|
13
13
|
Apply this to a property to indicate that the value is a reference to another stored entity.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Shard**(`config?`): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:173](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:173](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L173)
|
|
12
12
|
|
|
13
13
|
Indicates that the class describes an entity that will be persisted in a sharded database collection.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **TrackChanges**(`versions?`): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:190](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:190](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L190)
|
|
12
12
|
|
|
13
13
|
Indicates that the class will track changes for each document update limited to the specified number of versions.
|
|
14
14
|
|
package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: PendingTypeOrmColumn
|
|
8
8
|
|
|
9
|
-
Defined in: [src/decorators/ModelDecorators.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/decorators/ModelDecorators.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L12)
|
|
10
10
|
|
|
11
11
|
Describes a column registration that must be bridged into TypeORM's metadata storage when (and only when) a SQL
|
|
12
12
|
connection is established. Entries are queued here by decorators so that this module does not depend on the
|
|
@@ -18,7 +18,7 @@ optional `typeorm` package.
|
|
|
18
18
|
|
|
19
19
|
> **mode**: `"regular"`
|
|
20
20
|
|
|
21
|
-
Defined in: [src/decorators/ModelDecorators.ts:15](https://github.com/rapidrest/service-core/blob/
|
|
21
|
+
Defined in: [src/decorators/ModelDecorators.ts:15](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L15)
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Defined in: [src/decorators/ModelDecorators.ts:15](https://github.com/rapidrest/
|
|
|
26
26
|
|
|
27
27
|
> **options**: `any`
|
|
28
28
|
|
|
29
|
-
Defined in: [src/decorators/ModelDecorators.ts:16](https://github.com/rapidrest/service-core/blob/
|
|
29
|
+
Defined in: [src/decorators/ModelDecorators.ts:16](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L16)
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ Defined in: [src/decorators/ModelDecorators.ts:16](https://github.com/rapidrest/
|
|
|
34
34
|
|
|
35
35
|
> **propertyName**: `string`
|
|
36
36
|
|
|
37
|
-
Defined in: [src/decorators/ModelDecorators.ts:14](https://github.com/rapidrest/service-core/blob/
|
|
37
|
+
Defined in: [src/decorators/ModelDecorators.ts:14](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L14)
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
@@ -42,4 +42,4 @@ Defined in: [src/decorators/ModelDecorators.ts:14](https://github.com/rapidrest/
|
|
|
42
42
|
|
|
43
43
|
> **target**: `any`
|
|
44
44
|
|
|
45
|
-
Defined in: [src/decorators/ModelDecorators.ts:13](https://github.com/rapidrest/service-core/blob/
|
|
45
|
+
Defined in: [src/decorators/ModelDecorators.ts:13](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L13)
|
package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> `const` **pendingTypeOrmColumns**: [`PendingTypeOrmColumn`](../interfaces/PendingTypeOrmColumn.md)[] = `[]`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/ModelDecorators.ts:23](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/ModelDecorators.ts:23](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/ModelDecorators.ts#L23)
|
|
12
12
|
|
|
13
13
|
The list of column registrations waiting to be bridged into TypeORM's metadata storage. This list is drained by
|
|
14
14
|
the TypeORM support module when a SQL connection is created.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Column**(`options?`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:95](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:95](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L95)
|
|
12
12
|
|
|
13
13
|
Indicates that the decorated property will be persisted as a column/property in the datastore.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Entity**(`name?`): (`target`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:198](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:198](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L198)
|
|
12
12
|
|
|
13
13
|
Indicates that the class describes an entity that is persisted to a datastore.
|
|
14
14
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
> **Index**(`nameOrOptions?`, `options?`): `PropertyDecorator`
|
|
12
12
|
|
|
13
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:133](https://github.com/rapidrest/service-core/blob/
|
|
13
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:133](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L133)
|
|
14
14
|
|
|
15
15
|
Declares a database index.
|
|
16
16
|
|
|
@@ -46,7 +46,7 @@ When applied to a class, creates a compound index across the given properties:
|
|
|
46
46
|
|
|
47
47
|
> **Index**(`fields`, `options?`): `ClassDecorator`
|
|
48
48
|
|
|
49
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:134](https://github.com/rapidrest/service-core/blob/
|
|
49
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:134](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L134)
|
|
50
50
|
|
|
51
51
|
Declares a database index.
|
|
52
52
|
|
|
@@ -82,7 +82,7 @@ When applied to a class, creates a compound index across the given properties:
|
|
|
82
82
|
|
|
83
83
|
> **Index**(`name`, `fields`, `options?`): `ClassDecorator`
|
|
84
84
|
|
|
85
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:135](https://github.com/rapidrest/service-core/blob/
|
|
85
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:135](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L135)
|
|
86
86
|
|
|
87
87
|
Declares a database index.
|
|
88
88
|
|
package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **PrimaryColumn**(`options?`): (`target`, `propertyKey`) => `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:111](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:111](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L111)
|
|
12
12
|
|
|
13
13
|
Indicates that the decorated property is a primary key column in the datastore.
|
|
14
14
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
> **Unique**(`name?`): `PropertyDecorator`
|
|
12
12
|
|
|
13
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:179](https://github.com/rapidrest/service-core/blob/
|
|
13
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:179](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L179)
|
|
14
14
|
|
|
15
15
|
Declares a unique constraint. This is shorthand for `@Index` with the `unique` option set to `true` and may be
|
|
16
16
|
applied to a property (single-column constraint) or a class (compound constraint).
|
|
@@ -29,7 +29,7 @@ applied to a property (single-column constraint) or a class (compound constraint
|
|
|
29
29
|
|
|
30
30
|
> **Unique**(`fields`): `ClassDecorator`
|
|
31
31
|
|
|
32
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:180](https://github.com/rapidrest/service-core/blob/
|
|
32
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:180](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L180)
|
|
33
33
|
|
|
34
34
|
Declares a unique constraint. This is shorthand for `@Index` with the `unique` option set to `true` and may be
|
|
35
35
|
applied to a property (single-column constraint) or a class (compound constraint).
|
|
@@ -48,7 +48,7 @@ applied to a property (single-column constraint) or a class (compound constraint
|
|
|
48
48
|
|
|
49
49
|
> **Unique**(`name`, `fields`): `ClassDecorator`
|
|
50
50
|
|
|
51
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:181](https://github.com/rapidrest/service-core/blob/
|
|
51
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:181](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L181)
|
|
52
52
|
|
|
53
53
|
Declares a unique constraint. This is shorthand for `@Index` with the `unique` option set to `true` and may be
|
|
54
54
|
applied to a property (single-column constraint) or a class (compound constraint).
|
package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **getColumnMetadata**(`clazz`): [`ColumnInfo`](../interfaces/ColumnInfo.md)[]
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:216](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:216](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L216)
|
|
12
12
|
|
|
13
13
|
Returns the merged list of persisted columns declared across the entire class hierarchy of the given model
|
|
14
14
|
class. Columns declared in subclasses override columns of the same property name declared in parent classes.
|
package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **getEntityName**(`clazz`): `string` \| `undefined`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:261](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:261](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L261)
|
|
12
12
|
|
|
13
13
|
Returns the explicit entity name declared via `@Entity(name)` on the given class or the nearest ancestor that
|
|
14
14
|
declares one, otherwise `undefined`.
|
package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **getIndexMetadata**(`clazz`): [`IndexInfo`](../interfaces/IndexInfo.md)[]
|
|
10
10
|
|
|
11
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:236](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:236](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L236)
|
|
12
12
|
|
|
13
13
|
Returns the merged list of indexes declared across the entire class hierarchy of the given model class,
|
|
14
14
|
including both property-level and class-level (compound) indexes. Indexes declared in subclasses override
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: ColumnInfo
|
|
8
8
|
|
|
9
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:38](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:38](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L38)
|
|
10
10
|
|
|
11
11
|
Describes a single persisted column/property of a model class.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Describes a single persisted column/property of a model class.
|
|
|
16
16
|
|
|
17
17
|
> `optional` **designType?**: `any`
|
|
18
18
|
|
|
19
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:42](https://github.com/rapidrest/service-core/blob/
|
|
19
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:42](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L42)
|
|
20
20
|
|
|
21
21
|
The design type of the property as captured at decoration time.
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ The design type of the property as captured at decoration time.
|
|
|
26
26
|
|
|
27
27
|
> **options**: [`ColumnOptions`](ColumnOptions.md)
|
|
28
28
|
|
|
29
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:44](https://github.com/rapidrest/service-core/blob/
|
|
29
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:44](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L44)
|
|
30
30
|
|
|
31
31
|
The options that the column was declared with.
|
|
32
32
|
|
|
@@ -36,6 +36,6 @@ The options that the column was declared with.
|
|
|
36
36
|
|
|
37
37
|
> **propertyName**: `string`
|
|
38
38
|
|
|
39
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:40](https://github.com/rapidrest/service-core/blob/
|
|
39
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:40](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L40)
|
|
40
40
|
|
|
41
41
|
The name of the class property.
|
package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: ColumnOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:10](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:10](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L10)
|
|
10
10
|
|
|
11
11
|
The set of options available when declaring a persisted column/property via the `@Column` decorator.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ The set of options available when declaring a persisted column/property via the
|
|
|
16
16
|
|
|
17
17
|
> `optional` **isObjectId?**: `boolean`
|
|
18
18
|
|
|
19
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:18](https://github.com/rapidrest/service-core/blob/
|
|
19
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:18](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L18)
|
|
20
20
|
|
|
21
21
|
Set to `true` if the column stores a MongoDB `ObjectId` value.
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ Set to `true` if the column stores a MongoDB `ObjectId` value.
|
|
|
26
26
|
|
|
27
27
|
> `optional` **name?**: `string`
|
|
28
28
|
|
|
29
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
29
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L12)
|
|
30
30
|
|
|
31
31
|
The name of the column in the datastore. Defaults to the property name.
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ The name of the column in the datastore. Defaults to the property name.
|
|
|
36
36
|
|
|
37
37
|
> `optional` **nullable?**: `boolean`
|
|
38
38
|
|
|
39
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:14](https://github.com/rapidrest/service-core/blob/
|
|
39
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:14](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L14)
|
|
40
40
|
|
|
41
41
|
Set to `true` if the column may store `null`/`undefined` values.
|
|
42
42
|
|
|
@@ -46,6 +46,6 @@ Set to `true` if the column may store `null`/`undefined` values.
|
|
|
46
46
|
|
|
47
47
|
> `optional` **primary?**: `boolean`
|
|
48
48
|
|
|
49
|
-
Defined in: [src/decorators/PersistenceDecorators.ts:16](https://github.com/rapidrest/service-core/blob/
|
|
49
|
+
Defined in: [src/decorators/PersistenceDecorators.ts:16](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/decorators/PersistenceDecorators.ts#L16)
|
|
50
50
|
|
|
51
51
|
Set to `true` if the column is a primary key.
|