AuthoredModule

authored. AuthoredModule

Add supplementary data to existing schemas which defines how and when data was authored

Constructor

new AuthoredModule()

Source:

Extends

  • AbstractModule

Members

registeredModules :Array.<AbstractModule>

Description:
  • Store of all modules registered to use this plugin
Source:
Store of all modules registered to use this plugin
Type:
  • Array.<AbstractModule>

schemaName :String

Description:
  • Name of the schema extension
Source:
Name of the schema extension
Type:
  • String

Methods

(async) checkAccess(mod, req, data) → {Promise}

Description:
  • Function to update authored timestamp on data change
Source:
Parameters:
Name Type Description
mod AbstractModule
req external:ExpressRequest
data Object
Returns:
Resolves with boolean
Type
Promise

(async) init()

Source:

(async) registerModule(mod, options)

Description:
  • Registers a module for use with this plugin
Source:
Parameters:
Name Type Description
mod AbstractApiModule
options Object
Properties
Name Type Description
accessCheck Boolean Whether an access check should be performed

(async) updateAuthor(req) → {Promise}

Description:
  • Function to update author on data change
Source:
Parameters:
Name Type Description
req external:ExpressRequest
Returns:
Resolves with the modified data
Type
Promise

(async) updateTimestamps(action, data) → {Promise}

Description:
  • Function to update authored timestamp on data change
Source:
Parameters:
Name Type Description
action String
data Object
Returns:
Type
Promise