Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Access: Public

ParameterTypeDefaultDescription
key

string

 A unique key identifier for the flow-node.
[options]

object

 Options for the flow-node.
[options.name]

string

 A friendly name for the flow-node as it will appear in the UI.
[options.icon]

string

 An icon file.
[options.description]

string

 A description for the flow-node.
[options.category]

string

general

A category under which the flow-node will appear in the UI.

Example:

Code Block
languagejs
sdk.init(module).add('encodeURI', { icon: 'encode.svg' });

...

ParameterTypeDescription
key

string

A unique key identifier for the method.
[options]

object

Options for the method.
[options.name]

string

A friendly name for the method as it will appear in the UI.

Example:

Code Block
languagejs
sdk.init(module).add('encodeURI', { icon: 'encode.svg' })
    .method('encode', { name: 'Encode URI' });

...

ParameterTypeDescription
keystringA unique key for the output.
[options.name]

string

A friendly name for the output as it will appear in the UI.
[options.description]stringThe output description.
[options.context]

string

The default context string.
[options.schema]

object

The expected JSON schema for the output value.

Example:

Code Block
languagejs
sdk.init(module).add('encodeURI', { icon: 'encode.svg' })
    .method('encode', { name: 'Encode URI' })
    .parameter('uri', { type: 'string' })
    .output('encoded', { context: '$.encodedURI', schema: { type: 'string' } });

...

ParameterTypeDescription
handlerhandlerThe action handler function.

...

ParameterTypeDescription
moduleobjectThe flow-node module.

Example:

...

ParameterTypeDescription
req

request

The Request object.
cbcallbackThe output callback.

Example:

...

Access: Public

ParameterTypeDescription
[err]*A non null value indicates a terminal error (flow processing will stop).
[value]

*

The output value to be written back to the flow processing context.

...