Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

_createdAt

_createdAt: Date

_createdBy

_createdBy: ObjectId

_id

_id: ObjectId

_updatedAt

_updatedAt: Date

_updatedBy

_updatedBy: ObjectId

accentColor

accentColor: string = ''

accentDarkColor

accentDarkColor: string = ''

accentDarkForegroundColor

accentDarkForegroundColor: string = ''

accentForegroundColor

accentForegroundColor: string = ''

accentLightColor

accentLightColor: string = ''

accentLightForegroundColor

accentLightForegroundColor: string = ''

adminShopRoles

adminShopRoles: string[] = ...

adminThreeRoles

adminThreeRoles: string[] = ...

adminUserRoles

adminUserRoles: string[] = ...

appId

appId: null | ObjectId = null

availableRoles

availableRoles: string[] = ...

createAccountRoles

createAccountRoles: string[] = ...

createAccountValidation

createAccountValidation: "emailOrMobile" | "emailAndMobile" | "emailOnly" | "mobileOnly" | "none" = 'emailOrMobile'

defaultLocale

defaultLocale: string = 'fr'

description

description: string = ''

doubleAuthMethod

doubleAuthMethod: string = 'auto'

enableMultipleShops

enableMultipleShops: boolean = false

enableShop

enableShop: boolean = false

enableThree

enableThree: boolean = false

filesToRemove

filesToRemove: string[] = ...

image

image: any = null

locales

locales: string[] = ...

Optional model

model: typeof Model

name

name: string = ''

openUserRegistration

openUserRegistration: boolean = true

primaryColor

primaryColor: string = ''

primaryDarkColor

primaryDarkColor: string = ''

primaryDarkForegroundColor

primaryDarkForegroundColor: string = ''

primaryForegroundColor

primaryForegroundColor: string = ''

primaryLightColor

primaryLightColor: string = ''

primaryLightForegroundColor

primaryLightForegroundColor: string = ''

privateKeys

privateKeys: ApiKey[] = ...

publicKeys

publicKeys: ApiKey[] = ...

pushApnCert

pushApnCert: string = ''

pushApnKey

pushApnKey: string = ''

pushApnPass

pushApnPass: string = ''

pushApnProduction

pushApnProduction: boolean = false

pushEnabled

pushEnabled: boolean = false

pushGmId

pushGmId: string = ''

pushTopic

pushTopic: string = ''

request

request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

requireDoubleAuth

requireDoubleAuth: boolean = false

response

response: Response<any, Record<string, any>>

smtpConfigFromEmail

smtpConfigFromEmail: string = ''

smtpConfigFromName

smtpConfigFromName: string = ''

smtpConfigHost

smtpConfigHost: string = ''

smtpConfigPassword

smtpConfigPassword: string = ''

smtpConfigPort

smtpConfigPort: number = 587

smtpConfigSecure

smtpConfigSecure: boolean = false

smtpConfigUser

smtpConfigUser: string = ''

users

users: AppUserItem[] = ...

Static collectionName

collectionName: string = 'data'

Static db

db: Db

Static options

options: ModelOptions

Accessors

deco

Static deco

Methods

canGetOne

  • canGetOne(options?: any): Promise<boolean>

canInsert

  • canInsert(options?: any): Promise<boolean>

canRemove

  • canRemove(options?: any): Promise<boolean>

canUpdate

  • canUpdate(options?: any): Promise<boolean>

decoFromRequest

  • decoFromRequest(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>): Deco

get

  • get(propertyName: string): any

getAgain

  • getAgain<T>(): Promise<null | T>

insert

  • insert(): Promise<any>

insertMany

  • insertMany(quantity?: number): Promise<any[]>

insertWithDocument

  • insertWithDocument<T>(): Promise<T>

output

  • output(): Promise<any>

remove

  • remove(): Promise<boolean>

set

  • set(propertyName: string, value: any): void

smartUpdate

  • smartUpdate<T>(): Promise<T>
  • Compare the element that was retrieve from the database and only update keys that have been changed since

    Type parameters

    Returns Promise<T>

toDocument

  • toDocument(operation: "insert" | "update" | "upsert"): Promise<UpdateQuery>

update

  • update<T>(properties: string[]): Promise<T>

updateInstanceFromRequest

  • updateInstanceFromRequest<T>(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>): Promise<T>

validate

  • validate(properties?: string[]): Promise<boolean>

Static decoFromRequest

  • decoFromRequest(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>): Deco

Static generateKey

  • generateKey(): string

Static getAll

  • getAll<T>(query: null | Query, options??: GetAllOptions, req?: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res?: Response<any, Record<string, any>>): Promise<InstanceType<T>[]>
  • Type parameters

    Parameters

    • query: null | Query
    • Optional options: GetAllOptions = null
    • Optional req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
    • Optional res: Response<any, Record<string, any>>

    Returns Promise<InstanceType<T>[]>

Static getDecoProperties

  • getDecoProperties(deco: Deco, type?: string | string[]): string[]

Static getDocumentsAndcount

  • getDocumentsAndcount(query: Query, deco: Deco, req?: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res?: Response<any, Record<string, any>>): Promise<{ count: number; documents: any[] }>
  • Parameters

    • query: Query
    • deco: Deco
    • Optional req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
    • Optional res: Response<any, Record<string, any>>

    Returns Promise<{ count: number; documents: any[] }>

Static getOneWithId

  • getOneWithId<T>(id: string | ObjectId, options?: GetOneOptions): Promise<null | InstanceType<T>>

Static getOneWithQuery

  • getOneWithQuery<T>(query: any, options??: GetOneOptions): Promise<null | InstanceType<T>>

Static instanceFromDocument

Static instanceFromRequest

  • instanceFromRequest<T>(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>): Promise<InstanceType<T>>
  • Type parameters

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
    • res: Response<any, Record<string, any>>

    Returns Promise<InstanceType<T>>

Static outputList

  • outputList(elements: Model[], includeProps?: string[], ignoreIO?: boolean, includeExtraKeys?: string[]): Promise<any[]>

Generated using TypeDoc