Extension Types

All extension types share the same basic structure, and in their simplest form are a single JavaScript file with configurations and the execution method. As each extension type fulfills a different use-case niche, the configurations consist of varying options, and define important attributes of the extension you are building.

You’ll need to make sure to invoke the proper execution method, among some other optional methods, depending on the extension type.

Extension Configurations

At the start of your script, there is a set of required and optional configurations. If a required configuration is missing from the script, the extension will be ignored and not be executable. Some configurations can only be used for certain types of Extensions.

Configuration Required Restrictions Description
@id Yes Unique value containing aphanumeric or underscore characters, max 50 chars Internal Id of Extension
@type Yes step, condition, http, monitor Defines type of Extension
@display No Unique value containing aphanumeric, underscore, or space characters, max 50 chars UI display name of Extension. If empty, value of @id will be displayed
@open No true or false, default false Only available in the http type, affecting how the Extensions API can be called.
@async No true or false, default false

The configurations are placed directly in the script, recommended as the first lines of the script:

//@id:"myid" 
//@type:"http"
//@display:"My new script" 
//@open:"true" This text after config line acts like a code comment
//@async:"false"

Execution Methods

Each extension has a primary method executed: essentially a main() function. The specific name of this function, and available input arguments are defined by which type of extension script being written. In addition, the expected return value varies depending on the extension’s type.

Read about all of the Extension Types to learn more about their functionality.