Constructor
Sets the checkpoint nest.
Sets the checkpoint nest.
Get an array of all of the fields.
Overwrites fields with a clone.
Sets a cloned instance of metadata.
Sets a cloned instance of metadata.
Get the nest
Return the session id. Used to match to interface instanced within the manager.
Get an array of instance steps.
Overwrite the instant steps.
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();
});
Returns the interface for transport.
Alias of completeStep.
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 } });