Skip to main content

Test Connection

Overview​

Use these commands to intercept the Test-Connection command.

Input/OutputData Type
InputStdTestConnectionInput
OutputStdTestConnectionOutput

Example StdTestConnectionInput​

The input is often an empty object. It can include an optional accountSchema.

{
}

Example StdTestConnectionOutput​

{
}

Implementation​

Before test-connection command​

Use this logic to implement the command:

.beforeStdTestConnection(async (context: Context, input: StdTestConnectionInput) => {
logger.info('Running before test connection')
return input
})

The input object can be mutated and returned, but the same data type must still be returned. You can also make web request calls or perform any type of logging or logic before calling the connector.

After test-connection command​

Use this logic to implement the command:

.afterStdTestConnection(async (context: Context, output: StdTestConnectionOutput) => {
logger.info('Running after test connection')
return output
})

The output datatype is always an empty object handed down from the connector.