Type Definitions
TDuration
A duration (length of time) represented as one of the following:
- a whole number of milliseconds greater than zero.
- a duration object as produced by the
.duration()function from the moment module representing a duration greater than 1 ms. - a plain object or string that can be passed to the
.duration()function from the moment module and produces a duration object representing at least 1 ms of time.
Type:
-
string|PlainObject|Object
THttpMethod
A valid HTTP Method, e.g. 'GET'.
Type:
-
string
TJsFunctionName
A valid JavaScript function name.
Type:
-
string
TMoodleToken
A valid Moodle webservices token, i.e. a 32 character lower-case hexidecimal string.
Type:
-
string
TPlainObject
A JavaScript plain object as per the
isPlainObject() function from validateParams.
Type:
-
Object
TSecureUrl
A secure absolute URL, i.e. a full URL that starts with https://.
Type:
-
string
TValidateParamsConstraints
A plain object for use in validateParam.js constraints lists. I.e. a plain object indexed by validator names and per-parameter options.
Type:
-
Object
TValidationError
An validation error with the prototype ValidationError as provided by the
validateParams module.
Type:
-
Error
TWSDataFormat
A valid Moodle Web Service Data Format. Specifically, a valid value for the
moodlewsrestformat parameter in Moodle Web requests.
Currently (as of Moodle 3.3), the following values are supported:
json- JSON formatted textxml- XML formatted text
Type:
-
string
TWsFunctionName
A valid Moodle Web Service Function Name. A string of lower-case letters and underscores.
Type:
-
string