@veterancrowd/aws-service
v9.2.5
Published
AWS service utilities.
Downloads
311
Readme
aws-service
AWS service utilities.
API Documentation
Constants
Typedefs
TemplateContextToken : enum
Enum for template context tokens.
Kind: global enum
Properties
| Name | Type | Default | | --- | --- | --- | | APPLICATION | string | "application" | | BENEFICIARY | string | "beneficiary" | | GROUP | string | "group" | | MERCHANT | string | "merchant" | | METHOD | string | "method" | | OFFER | string | "offer" | | TEMPLATE | string | "template" | | USER | string | "user" | | VALIDATOR | string | "validator" |
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. |
TemplateContextValidationFunction ⇒ boolean
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. |
TemplateContextMap : object
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. |
TemplateContext : object
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!