Type Definitions

req

The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on.

Type:
  • Object
Properties
NameTypeAttributesDescription
paramsObject

HTTP request parameter.

bodyObject<optional>

HTTP POST request body.

headerObject

HTTP request header.

res

The res object represents the HTTP response that an [Express] app sends when it gets an HTTP request.

Type:
  • Object

roles

Type:
  • Object
Properties
NameTypeDescription
rolesObject

roles configuration object

Properties
NameTypeAttributesDescription
*boolean<optional>

Wildcard role indicating unrestricted access

keyObject<optional>

Role-specific properties to merge

'!key'Object<optional>

Negated role properties (applied when user doesn't have the role)

template

A template is an object property of the workspace.templates

Type:
  • Object
Properties
NameTypeDescription
_typeObject

The _type property distinguish the origin of a template. 'core' templates are added from the /mod/workspace/templates directory. A 'custom' is added from a custom_template JSON file defined in the process.env. A 'workspace' is added from the workspace itself. A _type='template' object is assigned in the assignWorkspaceTemplates method.

srcString

The source is a location from which a template object is loaded when required. Once loaded the template will be cached.

cachedObject

The cached template.

templateString

The string representation of a template, eg. html, sql.

renderfunction

A method which resolves in a template string.

moduleBoolean

The template is a module.

workspace

The workspace object defines the mapp resources available in an XYZ instance.

Type:
  • Object
Properties
NameTypeAttributesDescription
rolesObject<optional>

Each property of the roles object is a role which can be assigned to a user.

dbsstring<optional>

The fallback dbs connection if not implicit in [query] template.

localeObject

The default locale which serves as a templates for all locales in workspace.

localesObject

Each property in the locales object is a locale available from this workspace.