Skip to main content

ApiKey

@webda/hawk • Readme | API


Class: ApiKey

Api Key to use with hawk

Webda Model​

Extends​

  • OwnerModel

Constructors​

new ApiKey()​

new ApiKey(): ApiKey

Returns​

ApiKey

Inherited from​

OwnerModel.constructor

Source​

core/lib/models/coremodel.d.ts:438

Properties​

__checker​

__checker: (address) => boolean

Subnet checker if needed

Parameters​

• address: string

Returns​

boolean

Source​

hawk/src/apikey.ts:40


__class​

__class: CoreModelDefinition<ApiKey>

Class reference to the object

Inherited from​

OwnerModel.__class

Source​

core/lib/models/coremodel.d.ts:402


__ctx​

__ctx: OperationContext<any, any>

Object context

@TJS-ignore

Inherited from​

OwnerModel.__ctx

Source​

core/lib/models/coremodel.d.ts:416


__dirty​

__dirty: Set<string | symbol>

Inherited from​

OwnerModel.__dirty

Source​

core/lib/models/coremodel.d.ts:423


__secret​

__secret: string

Secret that will stay within server

Source​

hawk/src/apikey.ts:35


__store​

__store: Store<ApiKey, StoreParameters, StoreEvents>

If object is attached to its store

@TJS-ignore

Inherited from​

OwnerModel.__store

Source​

core/lib/models/coremodel.d.ts:422


__type​

__type: string

Type name

Inherited from​

OwnerModel.__type

Source​

core/lib/models/coremodel.d.ts:406


__types​

__types: string[]

Types name

Inherited from​

OwnerModel.__types

Source​

core/lib/models/coremodel.d.ts:410


_creationDate​

_creationDate: Date

Creation date

Inherited from​

OwnerModel._creationDate

Source​

core/lib/models/coremodel.d.ts:427


_lastUpdate​

_lastUpdate: Date

Last update date

Inherited from​

OwnerModel._lastUpdate

Source​

core/lib/models/coremodel.d.ts:431


_user​

_user: ModelLink<User>

Default owner of the object

Inherited from​

OwnerModel._user

Source​

core/lib/models/ownermodel.d.ts:12


algorithm​

algorithm: string = "sha256"

Algorithm to use with hawk

Source​

hawk/src/apikey.ts:31


name​

name: string

Friendly user name of the key

Source​

hawk/src/apikey.ts:15


origins?​

origins?: string[]

Authorize those origins only (regexp)

Source​

hawk/src/apikey.ts:45


permissions?​

permissions?: Object

Retriction on URL to apply to the key

Split per method, each item of the array contains a regexp to validate the url used

Type declaration​

DELETE​

DELETE: string[]

GET​

GET: string[]

POST​

POST: string[]

PUT​

PUT: string[]

Source​

hawk/src/apikey.ts:22


public?​

public?: boolean

Define if the object is publicly readable

Default​

false

Inherited from​

OwnerModel.public

Source​

core/lib/models/ownermodel.d.ts:17


uuid​

readonly uuid: string

UUID of the object

Inherited from​

OwnerModel.uuid

Source​

core/lib/models/ownermodel.d.ts:22


whitelist?​

whitelist?: string[]

If defined the key is only usable from these ips

Support of DNS is not yet ready

Source​

hawk/src/apikey.ts:52

Methods​

_onDelete()​

_onDelete(): Promise<void>

Called when object is about to be deleted

Returns​

Promise<void>

Inherited from​

OwnerModel._onDelete

Source​

core/lib/models/coremodel.d.ts:813


_onDeleted()​

_onDeleted(): Promise<void>

Called when object has been deleted

Returns​

Promise<void>

Inherited from​

OwnerModel._onDeleted

Source​

core/lib/models/coremodel.d.ts:817


_onGet()​

_onGet(): Promise<void>

Called when object is retrieved

Returns​

Promise<void>

Inherited from​

OwnerModel._onGet

Source​

core/lib/models/coremodel.d.ts:821


_onSave()​

_onSave(): Promise<void>

Called when object is about to be saved

Returns​

Promise<void>

Inherited from​

OwnerModel._onSave

Source​

core/lib/models/coremodel.d.ts:825


_onSaved()​

_onSaved(): Promise<void>

Returns​

Promise<void>

Overrides​

OwnerModel._onSaved

Source​

hawk/src/apikey.ts:170


_onUpdate()​

_onUpdate(_updates): Promise<void>

Called when object is about to be updates

Parameters​

• _updates: any

Returns​

Promise<void>

Inherited from​

OwnerModel._onUpdate

Source​

core/lib/models/coremodel.d.ts:835


_onUpdated()​

_onUpdated(): Promise<void>

Returns​

Promise<void>

Overrides​

OwnerModel._onUpdated

Source​

hawk/src/apikey.ts:177


_toJSON()​

_toJSON(secure): any

Remove the specific attributes if not secure

Parameters​

• secure: any

serialize server fields also

Returns​

any

filtered object to be serialized

Inherited from​

OwnerModel._toJSON

Source​

core/lib/models/coremodel.d.ts:803


attributePermission()​

attributePermission(key, value, mode, context?): any

Allow to define custom permission per attribute

This method allows you to do permission based attribute But also a mask destructive attribute

Parameters​

• key: string

• value: any

• mode: "READ" | "WRITE"

• context?: OperationContext<any, any>

Returns​

any

updated value

Inherited from​

OwnerModel.attributePermission

Source​

core/lib/models/coremodel.d.ts:710


canAct()​

canAct(ctx, action): Promise<string | boolean>

Parameters​

• ctx: OperationContext<any, any>

• action: string

Returns​

Promise<string | boolean>

Overrides​

OwnerModel.canAct

Source​

hawk/src/apikey.ts:79


canRequest()​

canRequest(context): Promise<boolean>

Authorize access depending origin, method and permissions allowed

Parameters​

• context: WebContext<any, any>

Returns​

Promise<boolean>

TRUE if all key's contraints are authorized

Source​

hawk/src/apikey.ts:119


checkAct()​

checkAct(context, action): Promise<void>

Parameters​

• context: OperationContext<any, any>

• action: string

Returns​

Promise<void>

Inherited from​

OwnerModel.checkAct

Source​

core/lib/models/coremodel.d.ts:662


checkOrigin()​

checkOrigin(ctx): boolean

Check origin masks, and returns TRUE when at least one pattern is matching to this context's origin

Parameters​

• ctx: HttpContext

Returns​

boolean

TRUE if this origin is authorized with the current key

Source​

hawk/src/apikey.ts:95


delete()​

delete(): Promise<void>

Delete this object

Returns​

Promise<void>

Inherited from​

OwnerModel.delete

Throws​

Error if the object is not coming from a store

Source​

core/lib/models/coremodel.d.ts:753


generateSecret()​

generateSecret(): string

Generate secret for key

Returns​

string

Source​

hawk/src/apikey.ts:70


generateUid()​

generateUid(_object?): string

Generate uuid for the object

Parameters​

• _object?: any

Returns​

string

Inherited from​

OwnerModel.generateUid

Source​

core/lib/models/coremodel.d.ts:780


get()​

get(): Promise<ApiKey>

Get the object

Returns​

Promise<ApiKey>

Inherited from​

OwnerModel.get

Source​

core/lib/models/coremodel.d.ts:741


getContext()​

getContext<T>(): T

Get object context

Global object does not belong to a request

Type parameters​

• T extends OperationContext<any, any>

Returns​

T

Inherited from​

OwnerModel.getContext

Source​

core/lib/models/coremodel.d.ts:732


getFullUuid()​

getFullUuid(): string

Return a unique reference within the application to the object

It contains the Store containing it

Returns​

string

Inherited from​

OwnerModel.getFullUuid

Source​

core/lib/models/coremodel.d.ts:689


getOwner()​

getOwner(): ModelLink<User>

Return the owner of the object

Only the owner can do update to the object

Returns​

ModelLink<User>

Inherited from​

OwnerModel.getOwner

Source​

core/lib/models/ownermodel.d.ts:38


getProxy()​

getProxy(): this

Return a proxy to the object to detect if dirty

Returns​

this

Inherited from​

OwnerModel.getProxy

Source​

core/lib/models/coremodel.d.ts:629


getRef()​

getRef<T>(): ModelRef<T>

Return a model ref

Type parameters​

• T extends ApiKey

Returns​

ModelRef<T>

Inherited from​

OwnerModel.getRef

Source​

core/lib/models/coremodel.d.ts:861


getService()​

getService<T>(service): T

Get a pre typed service

Type parameters​

• T extends Service<ServiceParameters, Events>

Parameters​

• service: any

to retrieve WARNING: Only object attached to a store can retrieve service

Returns​

T

Inherited from​

OwnerModel.getService

Source​

core/lib/models/coremodel.d.ts:794


getStore()​

getStore(): Store<ApiKey, StoreParameters, StoreEvents>

Return the object registered store

Returns​

Store<ApiKey, StoreParameters, StoreEvents>

Inherited from​

OwnerModel.getStore

Source​

core/lib/models/coremodel.d.ts:736


getUuid()​

getUuid(): string

Returns​

string

the uuid of the object

Inherited from​

OwnerModel.getUuid

Source​

core/lib/models/coremodel.d.ts:639


handleRelations()​

protected handleRelations(): void

Patch every attribute that is based on a relation to add all the helpers

Returns​

void

Inherited from​

OwnerModel.handleRelations

Source​

core/lib/models/coremodel.d.ts:722


incrementAttribute()​

incrementAttribute(property, value): Promise<void>

Increment an attribute both in store and object

Parameters​

• property: never

• value: number

Returns​

Promise<void>

Inherited from​

OwnerModel.incrementAttribute

Source​

core/lib/models/coremodel.d.ts:856


incrementAttributes()​

incrementAttributes(info): Promise<void>

Increment a attributes both in store and object

Parameters​

• info: Object[]

Returns​

Promise<void>

Inherited from​

OwnerModel.incrementAttributes

Source​

core/lib/models/coremodel.d.ts:866


isDirty()​

isDirty(): boolean

Return true if needs a save

Returns​

boolean

Inherited from​

OwnerModel.isDirty

Source​

core/lib/models/coremodel.d.ts:634


load()​

load(raw, secure?, relations?): this

Load an object from RAW

Parameters​

• raw: RawModel<ApiKey>

data

• secure?: boolean

if false will ignore any _ variable

• relations?: boolean

Returns​

this

Inherited from​

OwnerModel.load

Source​

core/lib/models/coremodel.d.ts:717


patch()​

patch(obj, conditionField?, conditionValue?): Promise<void>

Patch current object with this update

Parameters​

• obj: Partial<ApiKey>

• conditionField?: keyof ApiKey

if null no condition used otherwise fallback to lastUpdate

• conditionValue?: any

Returns​

Promise<void>

Inherited from​

OwnerModel.patch

Source​

core/lib/models/coremodel.d.ts:760


refresh()​

refresh(): Promise<ApiKey>

Get the object again

Returns​

Promise<ApiKey>

Inherited from​

OwnerModel.refresh

Throws​

Error if the object is not coming from a store

Source​

core/lib/models/coremodel.d.ts:747


removeAttribute()​

removeAttribute(property): Promise<void>

Remove attribute from both the object and db

Parameters​

• property: keyof ApiKey

Returns​

Promise<void>

Inherited from​

OwnerModel.removeAttribute

Source​

core/lib/models/coremodel.d.ts:850


save()​

save(full?, ...args?): Promise<ApiKey>

Save this object

Parameters​

• full?: boolean | keyof ApiKey

• ...args?: keyof ApiKey[]

Returns​

Promise<ApiKey>

Inherited from​

OwnerModel.save

Throws​

Error if the object is not coming from a store

Source​

core/lib/models/coremodel.d.ts:766


setAttribute()​

setAttribute(property, value): Promise<void>

Set attribute on the object and database

Parameters​

• property: keyof ApiKey

• value: any

Returns​

Promise<void>

Inherited from​

OwnerModel.setAttribute

Source​

core/lib/models/coremodel.d.ts:845


setContext()​

setContext(ctx): this

Context of the request

Parameters​

• ctx: OperationContext<any, any>

Returns​

this

Inherited from​

OwnerModel.setContext

Source​

core/lib/models/coremodel.d.ts:726


setOwner()​

setOwner(uuid): void

Set object owner

Parameters​

• uuid: string

Returns​

void

Inherited from​

OwnerModel.setOwner

Source​

core/lib/models/ownermodel.d.ts:27


setUuid()​

setUuid(uuid, target?): this

Parameters​

• uuid: string

• target?: this

Returns​

this

Inherited from​

OwnerModel.setUuid

Source​

core/lib/models/coremodel.d.ts:645


toHawkCredentials()​

toHawkCredentials(): HawkCredentials

Formatting structure needed for Hawk credentials

Returns​

HawkCredentials

Source​

hawk/src/apikey.ts:58


toJSON()​

toJSON(): any

Return the object without sensitive attributes

Returns​

any

Object to serialize

Inherited from​

OwnerModel.toJSON

Source​

core/lib/models/coremodel.d.ts:809


toStoredJSON()​

toStoredJSON(stringify?): any

Return the object to be serialized without the __store

Parameters​

• stringify?: boolean

Returns​

any

Inherited from​

OwnerModel.toStoredJSON

Source​

core/lib/models/coremodel.d.ts:787


unflat()​

unflat<T>(split?): T

Create subobject for a model

Useful for counters

Type parameters​

• T

Parameters​

• split?: string

Returns​

T

Inherited from​

OwnerModel.unflat

Source​

core/lib/models/coremodel.d.ts:566


updateOrigins()​

updateOrigins(): Promise<void>

Update the origins in the registry

Returns​

Promise<void>

Source​

hawk/src/apikey.ts:152


validate()​

validate(ctx, updates, ignoreRequired?): Promise<boolean>

Parameters​

• ctx: OperationContext<any, any>

• updates: any

• ignoreRequired?: boolean

Returns​

Promise<boolean>

Inherited from​

OwnerModel.validate

Source​

core/lib/models/ownermodel.d.ts:31


addListener()​

static addListener<Key>(event, listener): any

Type parameters​

• Key extends keyof StoreEvents

Parameters​

• event: Key

• listener: (...args) => void

Returns​

any

Inherited from​

OwnerModel.addListener

Source​

core/lib/models/coremodel.d.ts:472


authorizeClientEvent()​

static authorizeClientEvent(_event, _context, _model?): boolean

Does not allow any event by default

Parameters​

• _event: string

• _context: OperationContext<any, any>

• _model?: CoreModel

Returns​

boolean

Inherited from​

OwnerModel.authorizeClientEvent

Source​

core/lib/models/coremodel.d.ts:502


completeQuery()​

static protected completeQuery(query, includeSubclass?): string

Complete the query with __type/__types

Parameters​

• query: string

• includeSubclass?: boolean

Returns​

string

Inherited from​

OwnerModel.completeQuery

Source​

core/lib/models/coremodel.d.ts:596


completeUid()​

static completeUid(uid): string

Complete the uid with prefix if any

Useful when object are stored with a prefix for full uuid

Parameters​

• uid: string

Returns​

string

Inherited from​

OwnerModel.completeUid

Source​

core/lib/models/coremodel.d.ts:516


create()​

static create<T>(this, data): Promise<T>

Get a reference to a model

Type parameters​

• T extends CoreModel

Parameters​

• this: Constructor<T, []>

• data: RawModel<T>

Returns​

Promise<T>

Inherited from​

OwnerModel.create

Source​

core/lib/models/coremodel.d.ts:535


emit()​

static emit<T, Key>(this, event, evt): void

Emit an event for this class

Type parameters​

• T extends CoreModel

• Key extends keyof StoreEvents

Parameters​

• this: Constructor<T, []>

• event: Key

• evt: StoreEvents[Key]

Returns​

void

Inherited from​

OwnerModel.emit

Source​

core/lib/models/coremodel.d.ts:452


emitSync()​

static emitSync<T, Key>(this, event, evt): Promise<void>

Emit an event for this class and wait for all listeners to finish

Type parameters​

• T extends CoreModel

• Key extends keyof StoreEvents

Parameters​

• this: Constructor<T, []>

• event: Key

• evt: StoreEvents[Key]

Returns​

Promise<void>

Inherited from​

OwnerModel.emitSync

Source​

core/lib/models/coremodel.d.ts:459


emitter()​

static emitter(method, ...args): any

Parameters​

• method: any

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.emitter

Source​

core/lib/models/coremodel.d.ts:473


eventNames()​

static eventNames(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.eventNames

Source​

core/lib/models/coremodel.d.ts:485


factory()​

static factory<T>(this, object, context?): T

Create an object

Type parameters​

• T extends CoreModel

Parameters​

• this: Constructor<T, []>

• object: Partial<T>

• context?: OperationContext<any, any>

Returns​

T

Inherited from​

OwnerModel.factory

Source​

core/lib/models/coremodel.d.ts:676


flat()​

static flat(target, data, split?, prefix?): any

Flat an object into another

{ a: { b: 1 }, c: 1 }

become

{ "a#b": 1 "c": 1 }

Parameters​

• target: any

• data: any

• split?: string

• prefix?: string

Returns​

any

Inherited from​

OwnerModel.flat

Source​

core/lib/models/coremodel.d.ts:589


fromFullUuid()​

static fromFullUuid<T>(fullUuid, core?, partials?): Promise<T>

Get an object from the full uuid

Type parameters​

• T extends CoreModel = CoreModel

Parameters​

• fullUuid: string

• core?: Core<CoreEvents>

• partials?: any

Returns​

Promise<T>

Inherited from​

OwnerModel.fromFullUuid

Source​

core/lib/models/coremodel.d.ts:697


getActions()​

static getActions<T>(this): ModelActions

Get actions callable on an object

This will expose them by the Store with /storeUrl/{uuid}/{action}

Type parameters​

• T

Parameters​

• this: Constructor<T, []>

Returns​

ModelActions

Inherited from​

OwnerModel.getActions

Source​

core/lib/models/coremodel.d.ts:651


getClientEvents()​

static getClientEvents(): any[]

Do not declare any public events by default

Returns​

any[]

Inherited from​

OwnerModel.getClientEvents

Source​

core/lib/models/coremodel.d.ts:495


getHierarchy()​

static getHierarchy(): Object

Get the model hierarchy

Ancestors will contain every model it inherits from Children will contain every model that inherits from this model in a tree structure

Returns​

Object

ancestors​

ancestors: string[]

children​

children: ModelsTree

Inherited from​

OwnerModel.getHierarchy

Source​

core/lib/models/coremodel.d.ts:547


getIdentifier()​

static getIdentifier(short?): string

Get identifier for this model

Parameters​

• short?: boolean

Returns​

string

Inherited from​

OwnerModel.getIdentifier

Source​

core/lib/models/coremodel.d.ts:540


getMaxListeners()​

static getMaxListeners(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.getMaxListeners

Source​

core/lib/models/coremodel.d.ts:479


getPermissionQuery()​

static getPermissionQuery(context?): Object

Return a query to filter OwnerModel

Parameters​

• context?: OperationContext<any, any>

Returns​

Object

partial​

partial: boolean

query​

query: string

Inherited from​

OwnerModel.getPermissionQuery

Source​

core/lib/models/ownermodel.d.ts:46


getRelations()​

static getRelations(): ModelGraph

Returns​

ModelGraph

Inherited from​

OwnerModel.getRelations

Source​

core/lib/models/coremodel.d.ts:490


getSchema()​

static getSchema(): JSONSchema7

Return the known schema

Returns​

JSONSchema7

Inherited from​

OwnerModel.getSchema

Source​

core/lib/models/coremodel.d.ts:521


getUuidField()​

static getUuidField(): string

Get the UUID property

Returns​

string

Inherited from​

OwnerModel.getUuidField

Source​

core/lib/models/coremodel.d.ts:671


instanceOf()​

static instanceOf(object): boolean

Detect what looks like a CoreModel but can be from different version

Parameters​

• object: any

Returns​

boolean

Inherited from​

OwnerModel.instanceOf

Source​

core/lib/models/coremodel.d.ts:682


iterate()​

static iterate<T>(this, query?, includeSubclass?, context?): AsyncGenerator<T, any, any>

Iterate through the model

How to use a iterator is:

for await (const model of CoreModel.iterate()) {
// Do something with my model
}

Type parameters​

• T extends CoreModel

Parameters​

• this: Constructor<T, []>

• query?: string

• includeSubclass?: boolean

• context?: OperationContext<any, any>

Returns​

AsyncGenerator<T, any, any>

Inherited from​

OwnerModel.iterate

Source​

core/lib/models/coremodel.d.ts:614


listenerCount()​

static listenerCount(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.listenerCount

Source​

core/lib/models/coremodel.d.ts:482


listeners()​

static listeners(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.listeners

Source​

core/lib/models/coremodel.d.ts:480


off()​

static off(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.off

Source​

core/lib/models/coremodel.d.ts:475


on()​

static on<T, Key>(this, event, listener, async?): any

Listen to events on the model

Type parameters​

• T extends CoreModel

• Key extends keyof StoreEvents

Parameters​

• this: Constructor<T, []>

• event: Key

• listener: (evt) => any

• async?: boolean

Returns​

any

Inherited from​

OwnerModel.on

Source​

core/lib/models/coremodel.d.ts:445


onAsync()​

static onAsync<Key>(event, listener, queue?): any

Listen to events on the model asynchronously

Type parameters​

• Key extends keyof StoreEvents

Parameters​

• event: Key

• listener: (evt) => any

• queue?: string

Returns​

any

Inherited from​

OwnerModel.onAsync

Source​

core/lib/models/coremodel.d.ts:465


once()​

static once(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.once

Source​

core/lib/models/coremodel.d.ts:476


prependListener()​

static prependListener(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.prependListener

Source​

core/lib/models/coremodel.d.ts:483


prependOnceListener()​

static prependOnceListener(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.prependOnceListener

Source​

core/lib/models/coremodel.d.ts:484


query()​

static query<T>(this, query?, includeSubclass?, context?): Promise<Object>

Query for models

Type parameters​

• T extends CoreModel

Parameters​

• this: Constructor<T, []>

• query?: string

• includeSubclass?: boolean

• context?: OperationContext<any, any>

Returns​

Promise<Object>

continuationToken?​

continuationToken?: string

results​

results: T[]

Inherited from​

OwnerModel.query

Source​

core/lib/models/coremodel.d.ts:621


rawListeners()​

static rawListeners(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.rawListeners

Source​

core/lib/models/coremodel.d.ts:481


ref()​

static ref<T>(this, uid): ModelRefWithCreate<T>

Get a reference to a model

Type parameters​

• T extends CoreModel

Parameters​

• this: Constructor<T, []>

• uid: string

Returns​

ModelRefWithCreate<T>

Inherited from​

OwnerModel.ref

Source​

core/lib/models/coremodel.d.ts:528


removeAllListeners()​

static removeAllListeners(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.removeAllListeners

Source​

core/lib/models/coremodel.d.ts:477


removeListener()​

static removeListener(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.removeListener

Source​

core/lib/models/coremodel.d.ts:474


setMaxListeners()​

static setMaxListeners(...args): any

Parameters​

• ...args: any[]

Returns​

any

Inherited from​

OwnerModel.setMaxListeners

Source​

core/lib/models/coremodel.d.ts:478


store()​

static store<T>(this): Store<T, StoreParameters, StoreEvents>

Get Store for this model

Type parameters​

• T extends CoreModel

Parameters​

• this: Constructor<T, []>

Returns​

Store<T, StoreParameters, StoreEvents>

Inherited from​

OwnerModel.store

Source​

core/lib/models/coremodel.d.ts:508


unflat()​

static unflat<T>(data, split?): T

Unflat an object

Type parameters​

• T = any

Parameters​

• data: any

• split?: string

Returns​

T

Inherited from​

OwnerModel.unflat

Source​

core/lib/models/coremodel.d.ts:557