Optional custom request handler for webhooks.
Get the custom handleRequest function.
Gets an array of interface fields.
Get the nest
Get the nest _path.
Get an array of user interface steps.
Adds an interface field to the interface.
Adds a user interface step.
Parameters: WebhookJob, WebhookInterface, Step, Done callback
manager.addStep("Check job number", function(webhookJob, webhookInterface, step, done){
if(webhookJob.getQueryStringValue("job_number")){
webhookInterface.addField({
id: "something_else",
_name: "Some other field",
type: "text",
description: "Thanks for adding a job number!"
});
step.complete = true; // Mark step as complete
done(); // Callback to do next step or send response if complete
}
});
Adds pending jobs to the interfaces job list.
Find or return a new webhook interface instance.
Generated using TypeDoc
The interface manager allows you to separate your interface fields for stepped user interfaces. It's a factory that handles the construction and session handling of WebhookInterface instances.
Example
var manager = webhook.getInterfaceManager(); manager.addField({ id: "job_number", _name: "Job Number"; type: "text" });