Interface NodeDefinition<MappedInput, State, Output, Ephemeral, ExternalRequest>

Type Parameters

  • MappedInput = Record<string, any>

  • State = object

  • Output = any

  • Ephemeral = object

  • ExternalRequest = object

Hierarchy

  • NodeDefinition

Properties

defaults?: Partial<State>

Defaults of the state value. This is used to initialize the state of the node. State of the node is not persisted across executions,.

description?: string

A markdown based description of the node

external?: ((mappedInput, state) => ExternalRequest)

Type declaration

    • (mappedInput, state): ExternalRequest
    • An external function that causes a side effect to load ephemeral data. It is up to the node to expose the data to the user. Ephmeral data is not persisted across executions and will be requested to load each time. It is up to the user to cache the data if needed.

      Parameters

      • mappedInput: MappedInput
      • state: Partial<State>

      Returns ExternalRequest

mapInput?: ((input, state) => MappedInput)

Type declaration

    • (input, state): MappedInput
    • Takes in the names inputs of the source handles and coerces the final mapped Input state

      Parameters

      • input: Record<string, any>
      • state: State

      Returns MappedInput

mapOutput?: ((input, state, output, ephemeral) => Record<string, any>)

Type declaration

    • (input, state, output, ephemeral): Record<string, any>
    • Maps the output to the final output

      Parameters

      • input: MappedInput
      • state: State
      • output: Output
      • ephemeral: Ephemeral

      Returns Record<string, any>

process: ((input, state, ephemeral) => Output | Promise<Output>)

Type declaration

    • (input, state, ephemeral): Output | Promise<Output>
    • Processes the value

      Parameters

      • input: MappedInput
      • state: State
      • ephemeral: Ephemeral

      Returns Output | Promise<Output>

type: string

Reverse domain name notation for the node

validateInputs?: ((input, state) => void)

Type declaration

    • (input, state): void
    • Validates the state

      Parameters

      • input: MappedInput
      • state: State

      Returns void

      Throws

      Error if the inputs are invalid

Generated using TypeDoc