Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IChainedHandlerArgumentMapping

Interface describing constructing command line arguments for chained handlers.

Hierarchy

  • IChainedHandlerArgumentMapping

Index

Properties

Optional applyToHandlers

applyToHandlers: number[]

Which future handlers does this apply to? Optional. Specify any number of positive integers. The number represents an index ahead of the current handler. For example, 1 is the next handler and 2 is the handler after next. You can specify [0] to apply to the current handler, however in that case you must specify "value", and not "from", since the arguments will be applied before the response object from the handler is available. If omitted, the mapping applies to the next handler (equivalent to a value of [1] for this field)

memberof

IChainedHandlerArgumentMapping

Optional from

from: string

Dot notation property e.g. files[0].filename to copy from the command response's data field (set via response.data.setObj) of this chained handler to a future chained handler. If mapFromArguments is specified, the mapping will be from the overall command's arguments (the command comprised of these chained handlers and mappings).

Mutually exclusive with 'value'. The dot notation field is retrieved with the dataobject-parser package.

memberof

IChainedHandlerArgumentMapping

Optional mapFromArguments

mapFromArguments: boolean

If you specify this, values will be copied from the overall command's arguments instead of the command response of the current handler. Has no meaning if paired with 'value'

memberof

IChainedHandlerArgumentMapping

Optional optional

optional: boolean

Is this mapping optional? Unless this is true, an error will be thrown if "from" is specified and the specified field is not found on the command response.

memberof

IChainedHandlerArgumentMapping

to

to: string

The name of an argument e.g. "filename" that will be inserted into the "arguments" field of the handler parameters for the future chained handler. Required.

memberof

IChainedHandlerArgumentMapping

Optional value

value: any

Hard-code a value to pass to the "to" argument field. Mutually exclusive with "from". Note: the value should be serializable, since command definitions should be able to be fully represented in JSON. Values that are not preserved when doing JSON.parse(JSON.stringify(value)) will cause an error.

memberof

IChainedHandlerArgumentMapping

Generated using TypeDoc