Skip to main content

Table of contents

Classes​

Interfaces​

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​

src/decorators/dto.ts:8


LogFunction​

Ƭ LogFunction: (message: string, ...meta: any[]) => void

Represents a function that logs messages.

Type declaration​

▸ (message, ...meta): void

Parameters​
NameTypeDescription
messagestringThe log message.
...metaany[]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​

src/decorators/datoProp.ts:34

Functions​

Dato​

▸ Dato(options): ClassDecorator

Decorator that marks a class as:

  1. A MongoDB DAO (document).
  2. A GraphQL output DTO.

Parameters​

NameTypeDescription
optionsDatoOptionsThe options for the decorator.

Returns​

ClassDecorator

  • The decorator function.

Defined in​

src/decorators/dato.ts:41


DatoProp​

▸ DatoProp(options?): PropertyDecorator

Decorator that marks a property as:

  1. A MongoDB DAO (document) property.
  2. A GraphQL output DTO property.

Parameters​

NameTypeDescription
optionsDatoPropOptionsThe 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​

NameTypeDescription
namestringThe dto name, as exposed by GraphQL ('Input' or 'Update' suffix will be added automaticly, according the 'type' parameter).
typeDtoTypeThe 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​

src/decorators/dto.ts:16


DtoProp​

▸ DtoProp(options?): (target: any, key: string) => void

Decorator that marks a property as a GraphQL input DTO property.

Parameters​

NameTypeDescription
optionsDtoPropOptionsThe options for the decorator.

Returns​

fn

  • The decorator function.

▸ (target, key): void

Parameters​
NameType
targetany
keystring
Returns​

void

Defined in​

src/decorators/dtoProp.ts:25