Objects with open properties
Interface for classes with new operator and static properties/methods
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| args |
any[]
|
rest |
Interface for classes with |
Interface for constructor functions without new operator, for example,
function Foo(x) {
if (!(this instanceof Foo)) { return new Foo(x); }
this.x = x;
}
Type alias for Node.js callback functions
| Name | Type | Description |
|---|---|---|
| err |
Error | string | null | undefined
|
|
| result |
T
|
Common properties/operations for connectors
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| configModel |
Model
|
exported optional |
Common properties/operations for connectors |
|
| interfaces |
string[]
|
exported optional |
Common properties/operations for connectors |
|
| name |
string
|
exported |
Common properties/operations for connectors |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| command |
Command
|
Common properties/operations for connectors |
||
| parameters |
NamedParameters | PositionalParameters
|
Common properties/operations for connectors |
||
| options |
Options
|
optional |
Common properties/operations for connectors |
CRUD operations for connector implementations
Count matching entities
A promise of number of matching entities
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| where |
Where
|
optional |
The matching criteria |
|
| options |
Options
|
optional |
Options for the operation |
Create a new entity
A promise of the entity created
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| entity |
EntityData
|
The entity instance or data |
||
| options |
Options
|
optional |
Options for the operation |
Create multiple entities
A promise of an array of entities created
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| entities |
EntityData[]
|
An array of entity instances or data |
||
| options |
Options
|
optional |
Options for the operation |
Delete an entity
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| entity |
EntityData
|
The entity instance or data |
||
| options |
Options
|
optional |
Options for the operation |
Delete matching entities
A promise of number of matching entities deleted
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| where |
Where
|
optional |
The matching criteria |
|
| options |
Options
|
optional |
Options for the operation |
Delete an entity by id
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| id |
IdType
|
The entity id value |
||
| options |
Options
|
optional |
Options for the operation |
Check if an entity exists for the id
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| id |
IdType
|
The entity id value |
||
| options |
Options
|
optional |
Options for the operation |
Find matching entities by the filter
A promise of an array of entities found for the filter
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| filter |
Filter
|
optional |
The query filter |
|
| options |
Options
|
optional |
Options for the operation |
Find an entity by id
A promise of the entity found for the id
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| id |
IdType
|
The entity id value |
||
| options |
Options
|
optional |
Options for the operation |
Replace an entity by id
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| id |
IdType
|
The entity id value |
||
| data |
EntityData
|
The data attributes to be updated |
||
| options |
Options
|
optional |
Options for the operation |
Save an entity
A promise of the entity saved
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| entity |
EntityData
|
The entity instance or data |
||
| options |
Options
|
optional |
Options for the operation |
Update an entity
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| entity |
EntityData
|
The entity instance or data |
||
| options |
Options
|
optional |
Options for the operation |
Update matching entities
A promise of number of matching entities deleted
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| data |
EntityData
|
The data attributes to be updated |
||
| where |
Where
|
optional |
The matching criteria |
|
| options |
Options
|
optional |
Options for the operation |
Update an entity by id
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
The model class |
||
| id |
IdType
|
The entity id value |
||
| data |
EntityData
|
The data attributes to be updated |
||
| options |
Options
|
optional |
Options for the operation |
Key/Value operations for connector implementations
Delete an entry by key
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| key |
string
|
Key for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Delete all entries
A promise of the number of entries deleted
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| options |
Options
|
optional |
Options for the operation |
Set up ttl for an entry by key
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| key |
string
|
Key for the entry |
||
| ttl |
number
|
Key/Value operations for connector implementations |
||
| options |
Options
|
optional |
Options for the operation |
Get an entry by key
A promise of the entry found for the key
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| key |
string
|
Key for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Get an Iterator for matching keys
A promise of an iterator of entries
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| filter |
Filter
|
optional |
Matching filter |
|
| options |
Options
|
optional |
Options for the operation |
Fetch all keys
A promise of an array of keys for all entries
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| options |
Options
|
optional |
Options for the operation |
Set an entry with key/value
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| key |
string
|
Key for the entry |
||
| value |
EntityData
|
Value for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Get ttl for an entry by key
A promise of the TTL value
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<Entity>
|
Model class |
||
| key |
string
|
Key for the entry |
||
| ttl |
number
|
Time to live in millisenconds |
||
| options |
Options
|
optional |
Options for the operation |
DataSource denotes a configured connector
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| connector |
Connector
|
exported optional |
DataSource denotes a configured connector |
|
| name |
string
|
exported |
DataSource denotes a configured connector |
|
| settings |
AnyObject
|
exported |
DataSource denotes a configured connector |
A utility function to simplify retrieving metadata from a target model and its properties.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| target |
Function
|
The class from which to retrieve metadata. |
||
| options |
InspectionOptions
|
optional |
An options object for the MetadataInspector to customize the output of the metadata retrieval functions. |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| itemType |
Function
|
The class of the array to decorate |
||
| definition |
Partial<PropertyDefinition>
|
optional |
Optional PropertyDefinition object for additional metadata |
Decorator for model definitions
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Partial<ModelDefinitionSyntax>
|
optional |
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| as |
string
|
exported | ||
| target |
string | Class<Entity>
|
exported | ||
| type |
RelationType
|
exported |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| keyTo |
string
|
exported | ||
| type |
hasMany
|
exported |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| type |
RelationType
|
exported |
Decorator for belongsTo
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Decorator for embedsMany
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Decorator for embedsOne
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Decorator for hasMany Calls property.array decorator underneath the hood and infers foreign key name from target model name unless explicitly specified
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| targetModel |
T
|
Target model for hasMany relation |
||
| definition |
Partial<HasManyDefinition>
|
optional |
Optional metadata for setting up hasMany relation |
Decorator for hasOne
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Decorator for referencesMany
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Decorator for referencesOne
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Decorator for relations
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
Object
|
optional |
|
Metadata for a repository
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataSource |
DataSource | DataSource
|
exported optional |
Instance of the data source |
|
| dataSourceName |
undefined | string
|
exported optional |
Name of the data source |
|
| modelClass |
undefined | Entity
|
exported optional |
Class of the model |
|
| modelName |
undefined | string
|
exported optional |
Name of the model |
|
| name |
undefined | string
|
exported optional |
Name of the predefined repository |
Constructor for RepositoryMetadata
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelOrRepo |
string | Entity
|
Name or class of the model. If the value is a string and
|
||
| dataSource |
string | DataSource | DataSource
|
optional |
Name or instance of the data source For example:
|
Type definition for decorators returned by @repository decorator factory
| Name | Type | Description |
|---|---|---|
| target |
Object
|
|
| key |
undefined | string
|
|
| descriptorOrIndex |
TypedPropertyDescriptor<any> | number
|
Decorator for repository injections on properties or method arguments
class CustomerController {
@repository(CustomerRepository) public custRepo: CustomerRepository;
constructor(
@repository(ProductRepository) public prodRepo: ProductRepository,
) {}
// ...
}
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| repositoryName |
string | Class<Repository<Model>>
|
Name of the repo |
Decorator for DefaultCrudRepository generation and injection on properties or method arguments based on the given model and dataSource (or their names)
class CustomerController {
@repository('Customer', 'mySqlDataSource')
public custRepo: DefaultCrudRepository<
Customer,
typeof Customer.prototype.id
>;
constructor(
@repository(Product, mySqlDataSource)
public prodRepo: DefaultCrudRepository<
Product,
typeof Product.prototype.id
>,
) {}
// ...
}
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| model |
string | Entity
|
Name/class of the model |
||
| dataSource |
string | DataSource
|
Name/instance of the dataSource |
A dummy class created to generate the tsdoc for the members in repository mixin. Please don't use it.
The members are implemented in function RepositoryMixin
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| args |
any[]
|
rest |
A dummy class created to generate the tsdoc for the members in repository mixin. Please don't use it. The members are implemented in function RepositoryMixin |
Add a component to this application. Also mounts all the components repositories.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| component |
Class<__type>
|
The component to add.
|
Add the dataSource to this application.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataSource |
Class<DataSource> | DataSource
|
The dataSource to add. |
||
| name |
undefined | string
|
optional |
The binding name of the datasource; defaults to dataSource.name
|
Retrieve the repository instance from the given Repository class
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| repo |
Class<R>
|
The repository class to retrieve the instance of |
Get an instance of a component and mount all it's repositories. This function is intended to be used internally by component()
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| component |
Class<__type>
|
The component to mount repositories of |
Add a repository to this application.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| repo |
Class<Repository<any>>
|
The repository to add.
|
Interface for an Application mixed in with RepositoryMixin
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| options |
ApplicationConfig
|
exported public |
Interface for an Application mixed in with RepositoryMixin |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| component |
Class<__type>
|
Interface for an Application mixed in with RepositoryMixin |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataSource |
Class<DataSource> | DataSource
|
Interface for an Application mixed in with RepositoryMixin |
||
| name |
undefined | string
|
optional |
Interface for an Application mixed in with RepositoryMixin |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| repo |
Class<R>
|
Interface for an Application mixed in with RepositoryMixin |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| component |
Class<__type>
|
Interface for an Application mixed in with RepositoryMixin |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| repo |
Class<any>
|
Interface for an Application mixed in with RepositoryMixin |
A mixin class for Application that creates a .repository() function to register a repository automatically. Also overrides component function to allow it to register repositories automatically.
class MyApplication extends RepositoryMixin(Application) {}
Please note: the members in the mixin function are documented in a dummy class called RepositoryMixinDoc
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| superClass |
T
|
Base class for entities which have unique ids
Get the identity value. If the identity is a composite key, returns an object.
Get the identity as an object, such as {id: 1} or
{schoolId: 1, studentId: 2}
Build the where object for the given id
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
any
|
The id value |
Get the identity value for a given entity instance or entity data object.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entityOrData |
AnyObject
|
The data object for which to determine the identity value. |
Domain events
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| source |
any
|
exported |
Domain events |
|
| type |
string
|
exported |
Domain events |
Base class for models
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| definition |
ModelDefinition
|
static exported |
Base class for models |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| data |
DataObject<Model>
|
optional |
Base class for models |
Serialize into a plain JSON object
Convert to a plain object as DTO
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| options |
Options
|
optional |
Base class for models |
Definition for a model
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| nameOrDef |
string | ModelDefinitionSyntax
|
Definition for a model |
Add a property
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
string
|
Definition for a model |
||
| definitionOrType |
PropertyDefinition | PropertyType
|
Definition for a model |
Add a setting
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
string
|
Setting name |
||
| value |
any
|
Setting value |
Get an array of names of ID properties, which are specified in
the model settings or properties with id attribute. For example,
{
settings: {
id: ['id']
}
properties: {
id: {
type: 'string',
id: true
}
}
}
Base class for value objects - An object that contains attributes but has no conceptual identity. They should be treated as immutable.
DSL for building a model definition.
Property definition for a model
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
undefined | false | true
|
exported optional |
Property definition for a model |
|
| itemType |
PropertyType
|
exported optional |
Property definition for a model |
|
| json |
PropertyForm
|
exported optional |
Property definition for a model |
|
| store |
PropertyForm
|
exported optional |
Property definition for a model |
|
| type |
PropertyType
|
exported |
Property definition for a model |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| in |
undefined | false | true
|
exported optional | ||
| name |
undefined | string
|
exported optional | ||
| out |
undefined | false | true
|
exported optional |
Operators for where clauses
A builder for Filter. It provides fleunt APIs to add clauses such as
fields, order, where, limit, offset, and include.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
exported |
A builder for Filter. It provides fleunt APIs to add clauses such as
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| f |
Filter
|
optional |
A builder for Filter. It provides fleunt APIs to add clauses such as
|
Return the filter object
Describe what fields to be included/excluded
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| f |
(string | string[] | Fields)[]
|
rest |
A field name to be included, an array of field names to be included, or an Fields object for the inclusion/exclusion |
Add a Filter or Where constraint object. If it is a filter object, create
an and clause for conflicting keys with its where object. For any other
properties, throw an error. If it's not a Filter, coerce it to a filter,
and carry out the same logic.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| constraint |
Filter | Where
|
a constraint object to merge with own filter object |
Declare include
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| i |
(string | string[] | Inclusion)[]
|
rest |
A relation name, an array of relation names, or an |
Set limit
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| limit |
number
|
Maximum number of records to be returned |
Set offset
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| offset |
number
|
Offset of the number of records to be returned |
Describe the sorting order
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| o |
(string | string[] | Order)[]
|
rest |
A builder for Filter. It provides fleunt APIs to add clauses such as
|
Alias to offset
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| skip |
number
|
|
Declare a where clause
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| w |
Where
|
Where object |
A builder for Where object. It provides fleunt APIs to add clauses such as
and, or, and other operators.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
exported |
A builder for Where object. It provides fleunt APIs to add clauses such as
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| w |
Where
|
optional |
A builder for Where object. It provides fleunt APIs to add clauses such as
|
Add an and clause.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| w |
(Where | Where[])[]
|
rest |
One or more where objects |
Add a between condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val1 |
any
|
Property value lower bound |
||
| val2 |
any
|
Property value upper bound |
Get the where object
Add an = condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any
|
Property value |
Add a exists condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
undefined | false | true
|
optional |
Exists or not |
Add a > condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any
|
Property value |
Add a >= condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any
|
Property value |
Add a where object. For conflicting keys with the existing where object,
create an and clause.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
Where filter |
Add a inq condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any[]
|
An array of property values |
Add a < condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any
|
Property value |
Add a <= condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any
|
Property value |
Add a != condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Property name |
||
| val |
any
|
Property value |
Add an or clause.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| w |
(Where | Where[])[]
|
rest |
One or more where objects |
Matching condition
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| and |
Where[]
|
exported optional |
Matching condition |
|
| between |
any[]
|
exported optional |
Matching condition |
|
| eq |
any
|
exported optional |
Matching condition |
|
| exists |
undefined | false | true
|
exported optional |
Matching condition |
|
| gt |
any
|
exported optional |
Matching condition |
|
| gte |
any
|
exported optional |
Matching condition |
|
| inq |
any[]
|
exported optional |
Matching condition |
|
| lt |
any
|
exported optional |
Matching condition |
|
| lte |
any
|
exported optional |
Matching condition |
|
| neq |
any
|
exported optional |
Matching condition |
|
| or |
Where[]
|
exported optional |
Matching condition |
Selection of fields
Example:
{afieldname: true}
Query filter object
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| fields |
Fields
|
exported optional |
To include/exclude fields |
|
| include |
Inclusion[]
|
exported optional |
To include related objects |
|
| limit |
undefined | number
|
exported optional |
Maximum number of entities |
|
| offset |
undefined | number
|
exported optional |
Offset N number of entities. An alias for |
|
| order |
string[]
|
exported optional |
Sorting order for matched entities. Each item should be formatted as
We might want to use |
|
| skip |
undefined | number
|
exported optional |
Skip N number of entities |
|
| where |
Where
|
exported optional |
The matching criteria |
Inclusion of related items
Note: scope means filter on related items
Example:
{relation: 'aRelationName', scope: {<AFilterObject>}}
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| relation |
string
|
exported |
Inclusion of related items Note: scope means filter on related items Example:
|
|
| scope |
Filter
|
exported optional |
Inclusion of related items Note: scope means filter on related items Example:
|
Order by
Example:
{afieldname: 'ASC'}
Where object
Examples:
{afieldname: 'aName'}
{and: [{fieldone: 'one'}, {fieldtwo: 'two'}]}
{or: [{fieldone: 'one'}, {fieldtwo: 'two'}]}
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| and |
Where[]
|
exported optional |
Where object Examples:
|
|
| or |
Where[]
|
exported optional |
Where object Examples:
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| strings |
TemplateStringsArray
|
|||
| keys |
any[]
|
rest |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| arg |
any
|
A utility function which takes a model instance data and enforces constraint(s) on it
the modified data with the constraint, otherwise the original instance data
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| originalData |
DataObject<T>
|
the model data to apply the constrain(s) to |
||
| constraint |
DataObject<T>
|
the constraint which is to be applied on the data object |
A utility function which takes an array of model instance data and enforces constraint(s) on it
an array of the modified data with the constraint, otherwise the original instance data array
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| originalData |
DataObject<T>[]
|
the array of model data to apply the constrain(s) to |
||
| constraint |
Partial<T>
|
the constraint which is to be applied on the data objects |
A utility function which takes a filter and enforces constraint(s) on it
Filter the modified filter with the constraint, otherwise the original filter
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| originalFilter |
Filter | undefined
|
the filter to apply the constrain(s) to |
||
| constraint |
AnyObject
|
the constraint which is to be applied on the filter |
A utility function which takes a where filter and enforces constraint(s) on it
Filter the modified filter with the constraint, otherwise the original filter
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| originalWhere |
Where | undefined
|
the where filter to apply the constrain(s) to |
||
| constraint |
AnyObject
|
the constraint which is to be applied on the filter |
Key/Value operations for connector implementations
Delete an entry by key
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Key for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Delete all entries
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| options |
Options
|
optional |
Options for the operation |
Set up ttl for an entry by key
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Key for the entry |
||
| ttl |
number
|
Key/Value operations for connector implementations |
||
| options |
Options
|
optional |
Options for the operation |
Get an entry by key
A promise of the entry
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Key for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Get an Iterator for matching keys
An async iteratable iterator of keys so that the return value can
be used with for-await-of.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
KeyValueFilter
|
optional |
Filter for keys |
|
| options |
Options
|
optional |
Options for the operation |
Set an entry with key/value
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Key for the entry |
||
| value |
DataObject<T>
|
Value for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Get ttl for an entry by key
A promise of the TTL value
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
Key for the entry |
||
| options |
Options
|
optional |
Options for the operation |
Default implementation of CRUD repository using legacy juggler model and data source
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataSource |
DataSource
|
constructorProperty exported public |
Legacy data source |
|
| entityClass |
|
constructorProperty exported public |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| modelClass |
juggler.PersistedModelClass
|
exported |
Default implementation of CRUD repository using legacy juggler model and data source |
Constructor of DefaultCrudRepository
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entityClass |
|
Constructor of DefaultCrudRepository |
||
| dataSource |
DataSource
|
Legacy data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entities |
DataObject<T>[]
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
T
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| command |
Command
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| parameters |
NamedParameters | PositionalParameters
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| filter |
Filter
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| data |
DataObject<T>
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
T
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
T
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| data |
DataObject<T>
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| where |
Where
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
|
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| data |
DataObject<T>
|
Default implementation of CRUD repository using legacy juggler model and data source |
||
| options |
Options
|
optional |
Default implementation of CRUD repository using legacy juggler model and data source |
This is a bridge to the legacy DAO class. The function mixes DAO methods into a model class and attach it to a given data source
The new model class with DAO (CRUD) operations
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
T
|
Model class |
||
| ds |
DataSource
|
Data source |
Ensure the value is a promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| p |
legacy.PromiseOrVoid<T>
|
Promise or void |
| Name | Type | Description |
|---|---|---|
| fkValue |
ForeignKeyType
|
Enforces a constraint on a repository based on a relationship contract between models. For example, if a Customer model is related to an Order model via a HasMany relation, then, the relational repository returned by the factory function would be constrained by a Customer model instance's id(s).
The factory function which accepts a foreign key value to constrain the given target repository
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| relationMetadata |
HasManyDefinition
|
|||
| targetRepository |
EntityCrudRepository<Target, TargetID>
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| constraint |
DataObject<TargetEntity>
|
constructorProperty exported public |
the key value pair representing foreign key name to constrain the target repository instance |
|
| targetRepository |
TargetRepository
|
constructorProperty exported public |
the related target model repository instance |
Constructor of DefaultHasManyEntityCrudRepository
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| targetRepository |
TargetRepository
|
the related target model repository instance |
||
| constraint |
DataObject<TargetEntity>
|
the key value pair representing foreign key name to constrain the target repository instance |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| targetModelData |
DataObject<TargetEntity>
|
|||
| options |
Options
|
optional |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional | ||
| options |
Options
|
optional |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
optional | ||
| options |
Options
|
optional |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataObject |
DataObject<TargetEntity>
|
|||
| where |
Where
|
optional | ||
| options |
Options
|
optional |
CRUD operations for a target repository of a HasMany relation
Create a target model instance
A promise which resolves to the newly created target model instance
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| targetModelData |
DataObject<Target>
|
The target model data |
||
| options |
Options
|
optional |
Options for the operation |
Delete multiple target model instances
A promise which resolves the deleted target model instances
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Instances within the where scope are deleted |
|
| options |
Options
|
optional |
|
Find target model instance(s)
A promise which resolves with the found target instance(s)
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
optional |
CRUD operations for a target repository of a HasMany relation |
|
| options |
Options
|
optional |
Options for the operation |
Patch multiple target model instances
A promise which resolves the patched target model instances
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataObject |
DataObject<Target>
|
The fields and their new values to patch |
||
| where |
Where
|
optional |
Instances within the where scope are patched |
|
| options |
Options
|
optional |
|
Repository implementation
Example:
User can import CrudRepositoryImpl and call its functions like:
CrudRepositoryImpl.find(somefilters, someoptions)
Or extend class CrudRepositoryImpl and override its functions:
export class TestRepository extends CrudRepositoryImpl<Test> {
constructor(dataSource: DataSource, model: Test) {
super(dataSource, Customer);
}
// Override `deleteAll` to disable the operation
deleteAll(where?: Where, options?: Options) {
return Promise.reject(new Error('deleteAll is disabled'));
}
}
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataSource |
DataSource
|
constructorProperty exported public |
Repository implementation Example: User can import Or extend class
|
|
| model |
|
constructorProperty exported public |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataSource |
DataSource
|
Repository implementation Example: User can import Or extend class
|
||
| model |
|
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Repository implementation Example: User can import Or extend class
|
|
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entities |
DataObject<T>[]
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Repository implementation Example: User can import Or extend class
|
|
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| command |
Command
|
Repository implementation Example: User can import Or extend class
|
||
| parameters |
NamedParameters | PositionalParameters
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
optional |
Repository implementation Example: User can import Or extend class
|
|
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Repository implementation Example: User can import Or extend class
|
||
| filter |
Filter
|
optional |
Repository implementation Example: User can import Or extend class
|
|
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Repository implementation Example: User can import Or extend class
|
||
| data |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| data |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| where |
Where
|
optional |
Repository implementation Example: User can import Or extend class
|
|
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Repository implementation Example: User can import Or extend class
|
||
| data |
DataObject<T>
|
Repository implementation Example: User can import Or extend class
|
||
| options |
Options
|
optional |
Repository implementation Example: User can import Or extend class
|
Basic CRUD operations for ValueObject and Entity. No ID is required.
Count matching records
A promise of number of records matched
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Matching criteria |
|
| options |
Options
|
optional |
Options for the operations |
Create a new record
A promise of record created
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataObject |
DataObject<T>
|
The data to be created |
||
| options |
Options
|
optional |
Options for the operations |
Create all records
A promise of an array of records created
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataObjects |
DataObject<T>[]
|
An array of data to be created |
||
| options |
Options
|
optional |
Options for the operations |
Delete matching records
A promise of number of records deleted
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| where |
Where
|
optional |
Matching criteria |
|
| options |
Options
|
optional |
Options for the operations |
Find matching records
A promise of an array of records found
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| filter |
Filter
|
optional |
Query filter |
|
| options |
Options
|
optional |
Options for the operations |
Updating matching records with attributes from the data object
A promise of number of records updated
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| dataObject |
DataObject<T>
|
The data to be updated |
||
| where |
Where
|
optional |
Matching criteria |
|
| options |
Options
|
optional |
Options for the operations |
CRUD operations for a repository of entities
Delete an entity
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Entity to be deleted |
||
| options |
Options
|
optional |
Options for the operations |
Delete an entity by id
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Value for the entity id |
||
| options |
Options
|
optional |
Options for the operations |
Check if an entity exists for the given id
Promise
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Value for the entity id |
||
| options |
Options
|
optional |
Options for the operations |
Find an entity by id, return a rejected promise if not found.
A promise of an entity found for the id
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Value for the entity id |
||
| filter |
Filter
|
optional |
Additional query options. E.g. |
|
| options |
Options
|
optional |
Options for the operations |
Replace an entity by id
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Value for the entity id |
||
| data |
DataObject<T>
|
Data attributes to be replaced |
||
| options |
Options
|
optional |
Options for the operations |
Save an entity. If no id is present, create a new entity
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Entity to be saved |
||
| options |
Options
|
optional |
Options for the operations |
Update an entity
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| entity |
DataObject<T>
|
Entity to be updated |
||
| options |
Options
|
optional |
Options for the operations |
Update an entity by id with property/value pairs in the data object
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| id |
ID
|
Value for the entity id |
||
| data |
DataObject<T>
|
Data attributes to be updated |
||
| options |
Options
|
optional |
Options for the operations |
Base interface for a repository of entities
Execute a query with the given parameter object or an array of parameters
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| command |
Command
|
The query string or command object |
||
| parameters |
NamedParameters | PositionalParameters
|
The object with name/value pairs or an array of parameter values |
||
| options |
Options
|
optional |
Options |
Any type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
|
"any" | exported |
Any type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Any type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Any type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Any type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Any type |
Array type, such as string[]
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| itemType |
Type<T>
|
constructorProperty exported public |
Array type, such as string[] |
|
| name |
|
"array" | exported |
Array type, such as string[] |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| itemType |
Type<T>
|
Array type, such as string[] |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Array type, such as string[] |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Array type, such as string[] |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Array type, such as string[] |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
Array<T> | null | undefined
|
Array type, such as string[] |
Boolean type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
|
"boolean" | exported |
Boolean type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Boolean type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Boolean type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Boolean type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
boolean | null | undefined
|
Boolean type |
Buffer (binary) type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
|
"buffer" | exported |
Buffer (binary) type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Buffer (binary) type |
||
| options |
Options
|
optional |
Buffer (binary) type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Buffer (binary) type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Buffer (binary) type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
Buffer | null | undefined
|
Buffer (binary) type |
||
| options |
Options
|
optional |
Buffer (binary) type |
Date type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
|
"date" | exported |
Date type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Date type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Date type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Date type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
Date | null | undefined
|
Date type |
Model type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<T>
|
constructorProperty exported public |
Model type |
|
| name |
string
|
"model" | exported |
Model type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| modelClass |
Class<T>
|
Model type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
T | null | undefined
|
Model type |
Number type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
|
"number" | exported |
Number type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Number type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Number type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Number type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
number | null | undefined
|
Number type |
Object type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
string
|
"object" | exported |
Object type |
| type |
Class<T>
|
constructorProperty exported public |
Object type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| type |
Class<T>
|
Object type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Object type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Object type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Object type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
T | null | undefined
|
Object type |
String type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
|
"string" | exported |
String type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
String type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
String type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
String type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
string | null | undefined
|
String type |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
string
|
exported |
Name of the type |
Coerce the value into this type
Coerced value of this type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
The value to be coerced |
||
| options |
Options
|
optional |
Options for coercion |
Generate the default value for this type
Check if the given value can be coerced into this type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
The value to to be coerced |
||
| options |
Options
|
optional |
Test if the given value is an instance of this type
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
The value |
Serialize a value into json
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
T | null | undefined
|
The value of this type |
||
| options |
Options
|
optional |
Options for serialization |
Union type, such as string | number
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| itemTypes |
Type<any>[]
|
constructorProperty exported public |
Union type, such as string | number |
|
| name |
|
"union" | exported |
Union type, such as string | number |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| itemTypes |
Type<any>[]
|
Union type, such as string | number |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Union type, such as string | number |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Union type, such as string | number |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Union type, such as string | number |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| value |
any
|
Union type, such as string | number |