Optional custom request handler for webhooks.
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
}
});
Get the custom handleRequest function.
Gets an array of interface fields.
Find or return a new webhook interface instance.
Get the nest
Get the nest path.
Get an array of user interface steps.
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" });