Table of contents
Classes
Interfaces
- AppAsyncOptions
- DatoOptions
- DatoPropOptions
- DtoPropOptions
- Logger
- ManyToOne
- ModuleOpts
- OneToMany
- OneToOne
- Relation
Type Aliases
Functions
Type Aliases
DatoDoc
Ƭ DatoDoc<Dato
>: Document
<unknown
, any
, Dato
> & Dato
& Required
<{ _id
: Types.ObjectId
}>
Represents a document returned from Typegoose fetch methods in services. Contains fetched data along with Typegoose methods (e.g. 'save()').
Type parameters
Name |
---|
Dato |
Defined in
src/bases/identifiableDato.ts:11
DtoType
Ƭ DtoType: "input"
| "update"
Possible types of a DTO.
- input: the DTO contains data for creation of new MongoDB document.
- update: the DTO contains data for updating of exists MongoDB document.
Defined in
LogFunction
Ƭ LogFunction: (message
: string
, ...meta
: any
[]) => void
Represents a function that logs messages.
Type declaration
▸ (message
, ...meta
): void
Parameters
Name | Type | Description |
---|---|---|
message | string | The log message. |
...meta | any [] | Additional metadata to include in the log. |
Returns
void
Defined in
src/modules/appCommon.module.ts:15
PropScope
Ƭ PropScope: "external"
| "internal"
Possible scopes for a property.
- extrnal: the property exposed only at GraphQL (but not exists at MongoDB).
- internal: the property exists only at MongoDB (but not exposed at GraphQL).
Defined in
Functions
Dato
▸ Dato(options
): ClassDecorator
Decorator that marks a class as:
- A MongoDB DAO (document).
- A GraphQL output DTO.
Parameters
Name | Type | Description |
---|---|---|
options | DatoOptions | The options for the decorator. |
Returns
ClassDecorator
- The decorator function.
Defined in
DatoProp
▸ DatoProp(options?
): PropertyDecorator
Decorator that marks a property as:
- A MongoDB DAO (document) property.
- A GraphQL output DTO property.
Parameters
Name | Type | Description |
---|---|---|
options | DatoPropOptions | The options for the decorator. |
Returns
PropertyDecorator
- The decorator function.
Defined in
src/decorators/datoProp.ts:119
Dto
▸ Dto(name
, type
): ClassDecorator
Decorator that marks a class as a GraphQL input/update DTO type.
Parameters
Name | Type | Description |
---|---|---|
name | string | The dto name, as exposed by GraphQL ('Input' or 'Update' suffix will be added automaticly, according the 'type' parameter). |
type | DtoType | The dto type (input: the DTO contains data for creation of new MongoDB document, update: the DTO contains data for updating of exists MongoDB document). |
Returns
ClassDecorator
- The decorator function.
Defined in
DtoProp
▸ DtoProp(options?
): (target
: any
, key
: string
) => void
Decorator that marks a property as a GraphQL input DTO property.
Parameters
Name | Type | Description |
---|---|---|
options | DtoPropOptions | The options for the decorator. |
Returns
fn
- The decorator function.
▸ (target
, key
): void
Parameters
Name | Type |
---|---|
target | any |
key | string |
Returns
void