The InventConnector interface gives access to the Invent connector.

Hierarchy

  • InventConnector

Properties

events: {
    registerForVariableUpdates(callback) => void;
    registerValueReplacer(callback) => void;
}

Sub interface for events.

Type declaration

  • registerForVariableUpdates:function
    • Register for variable updates.

      Parameters

      • callback: ((name, value) => void)

        The callback will be called when a variable is updated. The callback will receive the variable name and the new value.

          • (name, value): void
          • Parameters

            • name: string
            • value: string | number | boolean

            Returns void

      Returns void

  • registerValueReplacer:function
    • Register a value replacer. This will be called when a variable is used and allows a script to replace the value of the variable.

      Parameters

      • callback: ((name, value) => string)

        The callback will be called when a variable is used. The callback will receive the variable name and the current value. The callback should return the new value for the variable or null if the variable should not be replaced.

          • (name, value): string
          • Parameters

            • name: string
            • value: string

            Returns string

      Returns void

initialized: boolean

Flag indicating if the connector is initialized and ready to use.

variables: {
    get(name, originalValue) => string;
    listVariableNames() => string[];
    set(name, value) => boolean;
}

Sub interface for variable access.

Type declaration

  • get:function
    • Get the value of a specific variable.

      Parameters

      • name: string

        The name of the variable to retrieve the value for.

      • originalValue: boolean

        Flag indicating if the original value should be retrieved. If not, any potential manipulations will be applied.

      Returns string

      The value of the variable or null if the variable does not exist.

  • listVariableNames:function
    • Get a list of all available variables.

      Returns string[]

      An array of variable names.

  • set:function
    • Set the value of a specific variable.

      Parameters

      • name: string

        The name of the variable.

      • value: string | number | boolean

        The new value for the variable.

      Returns boolean

      True if the variable was set, false if the variable does not exist.

Generated using TypeDoc