AWS service utilities.
-
resolveContexts ⇒
Array.<TemplateContext>
|undefined
-
Resolves ContextMaps for a given data object.
-
TemplateContextValidationFunction ⇒
boolean
-
A function that when applied to a data object returns true if the data object is valid for a template context.
-
TemplateContextMap :
object
-
An object relating a TemplateContextToken to a path in a data object expressing the associated contextId.
-
TemplateContext :
object
-
An object relating a TemplateContextToken to a contextId.
Enum for template context tokens.
Kind: global enum
Properties
Name | Type | Default |
---|---|---|
APPLICATION | string |
"application" |
GROUP | string |
"group" |
MERCHANT | string |
"merchant" |
OFFER | string |
"offer" |
resolveContexts ⇒ Array.<TemplateContext>
| undefined
Resolves ContextMaps for a given data object.
Kind: global constant
Returns: Array.<TemplateContext>
| undefined
- - An array of resolved contexts.
Param | Type | Description |
---|---|---|
[contextMaps] |
Array.<TemplateContextMap> | TemplateContextMap | TemplateContextToken.APPLICATION
|
An array of TemplateContextMaps, a single TemplateContextMap, or TemplateContextToken.APPLICATION. |
data | object |
The source data object. |
A function that when applied to a data object returns true if the data object is valid for a template context.
Kind: global typedef
Returns: boolean
- - True if the data object is valid for the template context.
Param | Type | Description |
---|---|---|
data | object |
The data object to be validated. |
An object relating a TemplateContextToken to a path in a data object expressing the associated contextId.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
contextToken | TemplateContextToken |
The context to be resolved. |
[path] | string |
The path to the contextId in the data object. Ignored for context 'application'. |
[isValid] | TemplateContextValidationFunction |
Determines whether the data object is valid for the context. If not provided, all data objects are valid. |
An object relating a TemplateContextToken to a contextId.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
contextToken | TemplateContextToken |
The context to be resolved. |
[contextId] |
number | string
|
The value of the contextId in the data object. Not valid for context 'application'. |
See more great templates and other tools on my GitHub Profile!