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 xyzEnv. 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.

xyzEnv

The process.ENV object holds configuration provided to the node process from the launch environment. The environment configuration allows the provision of keys and secrets which must not be accessible from the client. All xyzEnv properties are limited to string type.

Type:
  • Object
Properties
NameTypeAttributesDefaultDescription
DIRString<optional>
''

The XYZ API path which concatenated with the domain for all requests.

DBS_String<optional>
''

DBS_* values are the connections used to establish connections to pg servers with the dbs module.

PORTString<optional>
'3000'

The port on which the express app listens to for requests.

COOKIE_TTLInteger<optional>
36000

The Time To Live for all cookies issued by the XYZ API.

TITLEString<optional>
'GEOLYTIX | XYZ'

The TITLE value is used to identify cookies and is provided to as a param to Application View templates.

LOGSString<optional>

The LOGS string will split on comma to determine which requests send to the LOGGER module will be logged.

LOGGERString<optional>

Required to configure the LOGGER module for a remote out.

RATE_LIMITString<optional>
1000

Maximum requests per window in the express module

RATE_LIMIT_WINDOWString<optional>
60000

Time window in ms in the express module

PRIVATEString<optional>

All requests to XYZ API require authentication. The PRIVATE value represents the ACL connection.

PUBLICString<optional>

General requests to XYZ API do require authentication. The PUBLIC value represents an ACL connection for optional authentication.

SECRETString<optional>

A secret string is required to sign and validate JWT.

USER_SESSIONString<optional>

The auth module will store and check a session key if the USER_SESSION xyzEnv is not undefined.

AUTH_EXPIRYString<optional>

The user/fromACL module can expiry user authorization if the AUTH_EXPIRY xyzEnv is configured.

FAILED_ATTEMPTSString<optional>
'3'

The user/fromACL module will expire user validation if failed login attempts exceed the FAILED_ATTEMPTS value.

PASSWORD_REGEXPString<optional>
'(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])^.{10,}$'

The user/register module will apply PASSWORD_REGEXP value to check the complexity of provided user passwords.

STATEMENT_TIMEOUTString<optional>

The utils/dbs module will apply the STATEMENT_TIMEOUT to the query.client.

RETRY_LIMITString<optional>
'3'

The utils/dbs module will apply the RETRY_LIMIT to the query.client.

WORKSPACE_AGEString<optional>

The workspace/cache module flashes the workspace cache after the WORKSPACE_AGE is reached.

CUSTOM_TEMPLATESString<optional>

The workspace/cache module caches templates defined as a src in the CUSTOM_TEMPLATES xyzEnv.

TRANSPORTString<optional>

The utils/mailer module requires a TRANSPORT xyzEnv.

TRANSPORT_HOSTString<optional>

The hostname or IP address that the utils/mailer module module connects to.

TRANSPORT_NAMEString<optional>

The optional hostname of the client, used for identifying to the server in the utils/mailer module module.

TRANSPORT_EMAILString<optional>

The email used to send emails in the utils/mailer module module.

TRANSPORT_USERNAMEString<optional>

The username used to authenticate in the utils/mailer module module.

TRANSPORT_PASSWORDString<optional>

The password used to authenticate in the utils/mailer module module.

TRANSPORT_PORTString<optional>

The port used to connect to the host in the utils/mailer module module.

TRANSPORT_TLSString<optional>

defines additional node.js TLSSocket options to be passed to the socket constructor used in the utils/mailer module module.

USER_DOMAINSString<optional>

The user/register module will limit the registration to user emails for domains provided in the comma seperated USER_DOMAINS xyzEnv.

SRC_String<optional>

SRC_* values will replace the key wildcard [*] in the stringified workspace.

KEY_CLOUDFRONTString<optional>

A key [*.pem] file matching the KEY_CLOUDFRONT value is required for authentication requests in the cloudfront provider module.

AWS_S3_CLIENTString<optional>

A AWS_S3_CLIENT xyzEnv is required to sign requests with the s3 signer module.

CLOUDINARY_URLString<optional>

A CLOUDINARY_URL xyzEnv is required to sign requests with the cloudinary signer module.

SAML_ACSString<optional>

Assertion Consumer Service URL where SAML responses are received

SAML_SSOString<optional>

Single Sign-On URL of the Identity Provider

SAML_SLOString<optional>

Single Logout URL for terminating sessions

SAML_ENTITY_IDString<optional>

Service Provider Entity ID (your application identifier)

SAML_IDP_CRTString<optional>

Path to IdP certificate file for validation

SAML_SP_CRTString<optional>

Base name for SP certificate pair files

SAML_WANT_ASSERTIONS_SIGNEDString<optional>

Require signed assertions (true/false)

SAML_AUTHN_RESPONSE_SIGNEDString<optional>

Require signed responses (true/false)

SAML_SIGNATURE_ALGORITHMString<optional>

Algorithm for signing (e.g., 'sha256')

SAML_IDENTIFIER_FORMATString<optional>

Format for name identifiers

SAML_ACCEPTED_CLOCK_SKEWString<optional>

Allowed time difference in ms

SAML_PROVIDER_NAMEString<optional>

Display name for your service

SLO_CALLBACKString<optional>

URL for handling logout callbacks