Constructor
Adds an interface field to the interface.
Adds a user interface step
Mark a step as complete and remove it from the interface.
Get an existing field from the interface to modify its properties.
im.addStep("Check job number", function(webhookJob, webhookInterface, step, done) {
if(webhookJob.getParameter("job_number").length == 6) {
// Make job number read only
var jobNumberField = webhookInterface.getField("job_number");
jobNumberField.readonly = true;
// Complete step
webhookInterface.completeStep(step);
} else {
step.failure = "Job number was not 6 characters.";
}
done();
});
Get an array of all of the fields.
Get the nest
Return the session id. Used to match to interface instanced within the manager.
Get an array of instance steps.
Returns the interface for transport.
Alias of completeStep.
Sets the checkpoint nest.
Overwrites fields with a clone.
Sets a cloned instance of metadata.
Overwrite the instant steps.
Generated using TypeDoc
A webhook interface instance, tied to a particular session. Within interface steps, you can use these methods directly to alter the schema being returned to the user interface.
Example
var manager = webhook.getInterfaceManager(); manager.addStep("Check job number", function(webhookJob, webhookInterface, step){ 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 } });