Commit 4eb4ddff authored by Jean-Philippe Steinmetz's avatar Jean-Philippe Steinmetz
Browse files

Adding inversion of control document
Adding WebSocket to routes documents
Updating service-core reference docs
parent dc6b2067
=============
Release Notes
=============
v1.13.0
=======
- Added support for WebSockets.
- Fixing multiple bugs with route handle argument injection.
v1.12.0
=======
- The @Config decorator can now specify an optional `path` argument that will inject the value of the configuration
value at the provided path.
- `ObjectFactory.initialize` and `ObjectFactory.newInstance` are now async functions that return a `Promise`.
- Moved all route specific dependency injection code from `Server` to `ObjectFactory`.
v1.11.0
=======
- Added `@Init` decorator for performing post-IoC initialization during the start of the object lifecycle.
v1.10.1
=======
- Refactored all ACL data classes to use the new `@Model` decorator.
v1.10.0
=======
Upgraded all third-party dependencies.
v1.0.0
======
Initial release.
\ No newline at end of file
......@@ -6,13 +6,15 @@ Composer comes with a powerful feature set out of the box and is easily extended
* Built on OpenAPI
* HTTP 1.x/2.x Web Server
* WebSocket Support
* Global Configuration
* Dependency Injection
* Built-in behaviors for common REST API actions
* Built-in ORM layer
* Document Version Tracking
* MongoDB support
* Redis support
* 2nd Level Caching
* Authentication
* Powerful Authorization
* Role Based Access Control
* Prometheseus metrics
\ No newline at end of file
......@@ -42,8 +42,8 @@ Composer.js
:hidden:
:caption: Reference Docs
:ref:`core:ref-role`
:ref:`service-core:ref-role`
:doc:`Core Library <core:/>`
:doc:`Service Core Library <service-core:/>`
.. toctree::
:hidden:
......@@ -61,15 +61,17 @@ Features
* Built on OpenAPI
* HTTP 1.x/2.x Web Server
* WebSocket Support
* Global Configuration
* Dependency Injection
* Built-in behaviors for common REST API actions
* Built-in ORM layer
* Document Version Tracking
* MongoDB support
* Redis support
* 2nd Level Caching
* Authentication
* Powerful Authorization
* Role Based Access Control
* Prometheseus metrics
Getting Started
......
[@composer-js/service-core](../README.md)[Globals](../globals.md)[AccessControlListMongo](accesscontrollistmongo.md)
**[@composer-js/service-core](../README.md)**
> [Globals](../globals.md) / AccessControlListMongo
# Class: AccessControlListMongo
......@@ -6,7 +8,7 @@ Implementation of the `AccessControlList` interface for use with MongoDB databas
## Hierarchy
[BaseMongoEntity](basemongoentity.md)
* [BaseMongoEntity](basemongoentity.md)
**AccessControlListMongo**
......@@ -22,127 +24,127 @@ Implementation of the `AccessControlList` interface for use with MongoDB databas
### Properties
* [_id](accesscontrollistmongo.md#optional-_id)
* [\_id](accesscontrollistmongo.md#_id)
* [dateCreated](accesscontrollistmongo.md#datecreated)
* [dateModified](accesscontrollistmongo.md#datemodified)
* [parent](accesscontrollistmongo.md#optional-parent)
* [parentUid](accesscontrollistmongo.md#optional-parentuid)
* [parent](accesscontrollistmongo.md#parent)
* [parentUid](accesscontrollistmongo.md#parentuid)
* [records](accesscontrollistmongo.md#records)
* [uid](accesscontrollistmongo.md#uid)
* [version](accesscontrollistmongo.md#version)
## Constructors
### constructor
### constructor
\+ **new AccessControlListMongo**(`other?`: any): *[AccessControlListMongo](accesscontrollistmongo.md)*
\+ **new AccessControlListMongo**(`other?`: any): [AccessControlListMongo](accesscontrollistmongo.md)
*Overrides [BaseMongoEntity](basemongoentity.md).[constructor](basemongoentity.md#constructor)*
Defined in src/security/AccessControlListMongo.ts:64
*Defined in src/security/AccessControlListMongo.ts:65*
**Parameters:**
#### Parameters:
Name | Type |
------ | ------ |
`other?` | any |
**Returns:** *[AccessControlListMongo](accesscontrollistmongo.md)*
**Returns:** [AccessControlListMongo](accesscontrollistmongo.md)
## Properties
### `Optional` _id
### \_id
**_id**? : *ObjectID*
`Optional` **\_id**: ObjectID
*Inherited from [BaseMongoEntity](basemongoentity.md).[_id](basemongoentity.md#optional-_id)*
*Inherited from [BaseMongoEntity](basemongoentity.md).[_id](basemongoentity.md#_id)*
Defined in src/models/BaseMongoEntity.ts:17
*Defined in src/models/BaseMongoEntity.ts:18*
The internal unique identifier used by MongoDB.
___
### dateCreated
### dateCreated
**dateCreated**: *Date* = new Date()
**dateCreated**: Date = new Date()
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[dateCreated](../interfaces/accesscontrollist.md#datecreated)*
*Inherited from [BaseEntity](baseentity.md).[dateCreated](baseentity.md#datecreated)*
Defined in src/models/BaseEntity.ts:30
*Defined in src/models/BaseEntity.ts:30*
The date and time that the entity was created.
___
### dateModified
### dateModified
**dateModified**: *Date* = new Date()
**dateModified**: Date = new Date()
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[dateModified](../interfaces/accesscontrollist.md#datemodified)*
*Inherited from [BaseEntity](baseentity.md).[dateModified](baseentity.md#datemodified)*
Defined in src/models/BaseEntity.ts:36
*Defined in src/models/BaseEntity.ts:36*
The date and time that the entity was last modified.
___
### `Optional` parent
### parent
**parent**? : *[AccessControlList](../interfaces/accesscontrollist.md)*
`Optional` **parent**: [AccessControlList](../interfaces/accesscontrollist.md)
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parent](../interfaces/accesscontrollist.md#optional-parent)*
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parent](../interfaces/accesscontrollist.md#parent)*
Defined in src/security/AccessControlListMongo.ts:57
*Defined in src/security/AccessControlListMongo.ts:58*
___
### `Optional` parentUid
### parentUid
**parentUid**? : *string | undefined*
`Optional` **parentUid**: string \| undefined
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parentUid](../interfaces/accesscontrollist.md#optional-parentuid)*
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parentUid](../interfaces/accesscontrollist.md#parentuid)*
Defined in src/security/AccessControlListMongo.ts:61
*Defined in src/security/AccessControlListMongo.ts:62*
___
### records
### records
**records**: *[ACLRecordMongo](aclrecordmongo.md)[]* = []
**records**: [ACLRecordMongo](aclrecordmongo.md)[] = []
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[records](../interfaces/accesscontrollist.md#records)*
Defined in src/security/AccessControlListMongo.ts:64
*Defined in src/security/AccessControlListMongo.ts:65*
___
### uid
### uid
**uid**: *string* = uuid.v4()
**uid**: string = uuid.v4()
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[uid](../interfaces/accesscontrollist.md#uid)*
*Inherited from [BaseEntity](baseentity.md).[uid](baseentity.md#uid)*
Defined in src/models/BaseEntity.ts:24
*Defined in src/models/BaseEntity.ts:24*
The universally unique identifier of the entity.
___
### version
### version
**version**: *number* = 0
**version**: number = 0
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[version](../interfaces/accesscontrollist.md#version)*
*Inherited from [BaseEntity](baseentity.md).[version](baseentity.md#version)*
Defined in src/models/BaseEntity.ts:42
*Defined in src/models/BaseEntity.ts:42*
The optimistic lock version.
[@composer-js/service-core](../README.md)[Globals](../globals.md)[AccessControlListSQL](accesscontrollistsql.md)
**[@composer-js/service-core](../README.md)**
> [Globals](../globals.md) / AccessControlListSQL
# Class: AccessControlListSQL
......@@ -24,112 +26,112 @@ Implementation of the `AccessControlList` interface for use with SQL databases.
* [dateCreated](accesscontrollistsql.md#datecreated)
* [dateModified](accesscontrollistsql.md#datemodified)
* [parent](accesscontrollistsql.md#optional-parent)
* [parentUid](accesscontrollistsql.md#optional-parentuid)
* [parent](accesscontrollistsql.md#parent)
* [parentUid](accesscontrollistsql.md#parentuid)
* [records](accesscontrollistsql.md#records)
* [uid](accesscontrollistsql.md#uid)
* [version](accesscontrollistsql.md#version)
## Constructors
### constructor
### constructor
\+ **new AccessControlListSQL**(`other?`: any): *[AccessControlListSQL](accesscontrollistsql.md)*
\+ **new AccessControlListSQL**(`other?`: any): [AccessControlListSQL](accesscontrollistsql.md)
*Overrides [BaseEntity](baseentity.md).[constructor](baseentity.md#constructor)*
Defined in src/security/AccessControlListSQL.ts:64
*Defined in src/security/AccessControlListSQL.ts:65*
**Parameters:**
#### Parameters:
Name | Type |
------ | ------ |
`other?` | any |
**Returns:** *[AccessControlListSQL](accesscontrollistsql.md)*
**Returns:** [AccessControlListSQL](accesscontrollistsql.md)
## Properties
### dateCreated
### dateCreated
**dateCreated**: *Date* = new Date()
**dateCreated**: Date = new Date()
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[dateCreated](../interfaces/accesscontrollist.md#datecreated)*
*Inherited from [BaseEntity](baseentity.md).[dateCreated](baseentity.md#datecreated)*
Defined in src/models/BaseEntity.ts:30
*Defined in src/models/BaseEntity.ts:30*
The date and time that the entity was created.
___
### dateModified
### dateModified
**dateModified**: *Date* = new Date()
**dateModified**: Date = new Date()
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[dateModified](../interfaces/accesscontrollist.md#datemodified)*
*Inherited from [BaseEntity](baseentity.md).[dateModified](baseentity.md#datemodified)*
Defined in src/models/BaseEntity.ts:36
*Defined in src/models/BaseEntity.ts:36*
The date and time that the entity was last modified.
___
### `Optional` parent
### parent
**parent**? : *[AccessControlList](../interfaces/accesscontrollist.md)*
`Optional` **parent**: [AccessControlList](../interfaces/accesscontrollist.md)
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parent](../interfaces/accesscontrollist.md#optional-parent)*
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parent](../interfaces/accesscontrollist.md#parent)*
Defined in src/security/AccessControlListSQL.ts:57
*Defined in src/security/AccessControlListSQL.ts:58*
___
### `Optional` parentUid
### parentUid
**parentUid**? : *string | undefined*
`Optional` **parentUid**: string \| undefined
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parentUid](../interfaces/accesscontrollist.md#optional-parentuid)*
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[parentUid](../interfaces/accesscontrollist.md#parentuid)*
Defined in src/security/AccessControlListSQL.ts:61
*Defined in src/security/AccessControlListSQL.ts:62*
___
### records
### records
**records**: *[ACLRecordSQL](aclrecordsql.md)[]* = []
**records**: [ACLRecordSQL](aclrecordsql.md)[] = []
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[records](../interfaces/accesscontrollist.md#records)*
Defined in src/security/AccessControlListSQL.ts:64
*Defined in src/security/AccessControlListSQL.ts:65*
___
### uid
### uid
**uid**: *string* = uuid.v4()
**uid**: string = uuid.v4()
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[uid](../interfaces/accesscontrollist.md#uid)*
*Inherited from [BaseEntity](baseentity.md).[uid](baseentity.md#uid)*
Defined in src/models/BaseEntity.ts:24
*Defined in src/models/BaseEntity.ts:24*
The universally unique identifier of the entity.
___
### version
### version
**version**: *number* = 0
**version**: number = 0
*Implementation of [AccessControlList](../interfaces/accesscontrollist.md).[version](../interfaces/accesscontrollist.md#version)*
*Inherited from [BaseEntity](baseentity.md).[version](baseentity.md#version)*
Defined in src/models/BaseEntity.ts:42
*Defined in src/models/BaseEntity.ts:42*
The optimistic lock version.
[@composer-js/service-core](../README.md)[Globals](../globals.md)[ACLRecordMongo](aclrecordmongo.md)
**[@composer-js/service-core](../README.md)**
> [Globals](../globals.md) / ACLRecordMongo
# Class: ACLRecordMongo
......@@ -30,86 +32,86 @@ Implementation of the `ACLRecord` interface for use with MongoDB databases.
## Constructors
### constructor
### constructor
\+ **new ACLRecordMongo**(`other?`: any): *[ACLRecordMongo](aclrecordmongo.md)*
\+ **new ACLRecordMongo**(`other?`: any): [ACLRecordMongo](aclrecordmongo.md)
Defined in src/security/AccessControlListMongo.ts:34
*Defined in src/security/AccessControlListMongo.ts:34*
**Parameters:**
#### Parameters:
Name | Type |
------ | ------ |
`other?` | any |
**Returns:** *[ACLRecordMongo](aclrecordmongo.md)*
**Returns:** [ACLRecordMongo](aclrecordmongo.md)
## Properties
### create
### create
**create**: *boolean | null*
**create**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[create](../interfaces/aclrecord.md#create)*
Defined in src/security/AccessControlListMongo.ts:19
*Defined in src/security/AccessControlListMongo.ts:19*
___
### delete
### delete
**delete**: *boolean | null*
**delete**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[delete](../interfaces/aclrecord.md#delete)*
Defined in src/security/AccessControlListMongo.ts:28
*Defined in src/security/AccessControlListMongo.ts:28*
___
### full
### full
**full**: *boolean | null*
**full**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[full](../interfaces/aclrecord.md#full)*
Defined in src/security/AccessControlListMongo.ts:34
*Defined in src/security/AccessControlListMongo.ts:34*
___
### read
### read
**read**: *boolean | null*
**read**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[read](../interfaces/aclrecord.md#read)*
Defined in src/security/AccessControlListMongo.ts:22
*Defined in src/security/AccessControlListMongo.ts:22*
___
### special
### special
**special**: *boolean | null*
**special**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[special](../interfaces/aclrecord.md#special)*
Defined in src/security/AccessControlListMongo.ts:31
*Defined in src/security/AccessControlListMongo.ts:31*
___
### update
### update
**update**: *boolean | null*
**update**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[update](../interfaces/aclrecord.md#update)*
Defined in src/security/AccessControlListMongo.ts:25
*Defined in src/security/AccessControlListMongo.ts:25*
___
### userOrRoleId
### userOrRoleId
**userOrRoleId**: *string*
**userOrRoleId**: string
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[userOrRoleId](../interfaces/aclrecord.md#userorroleid)*
Defined in src/security/AccessControlListMongo.ts:16
*Defined in src/security/AccessControlListMongo.ts:16*
[@composer-js/service-core](../README.md)[Globals](../globals.md)[ACLRecordSQL](aclrecordsql.md)
**[@composer-js/service-core](../README.md)**
> [Globals](../globals.md) / ACLRecordSQL
# Class: ACLRecordSQL
......@@ -30,86 +32,86 @@ Implementation of the `ACLRecord` interface for use with SQL databases.
## Constructors
### constructor
### constructor
\+ **new ACLRecordSQL**(`other?`: any): *[ACLRecordSQL](aclrecordsql.md)*
\+ **new ACLRecordSQL**(`other?`: any): [ACLRecordSQL](aclrecordsql.md)
Defined in src/security/AccessControlListSQL.ts:34
*Defined in src/security/AccessControlListSQL.ts:34*
**Parameters:**
#### Parameters:
Name | Type |
------ | ------ |
`other?` | any |
**Returns:** *[ACLRecordSQL](aclrecordsql.md)*
**Returns:** [ACLRecordSQL](aclrecordsql.md)
## Properties
### create
### create
**create**: *boolean | null*
**create**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[create](../interfaces/aclrecord.md#create)*
Defined in src/security/AccessControlListSQL.ts:19
*Defined in src/security/AccessControlListSQL.ts:19*
___
### delete
### delete
**delete**: *boolean | null*
**delete**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[delete](../interfaces/aclrecord.md#delete)*
Defined in src/security/AccessControlListSQL.ts:28
*Defined in src/security/AccessControlListSQL.ts:28*
___
### full
### full
**full**: *boolean | null*
**full**: boolean \| null
*Implementation of [ACLRecord](../interfaces/aclrecord.md).[full](../interfaces/aclrecord.md#full)*
Defined in src/security/AccessControlListSQL.ts:34
*Defined in src/security/AccessControlListSQL.ts:34*
___
### read
### read
**read**: *boolean | null*
**read**: boolean \| null