Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InterfaceManager

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"
});

Hierarchy

  • InterfaceManager

Index

Constructors

constructor

Properties

Protected e

Protected fields

fields: FieldOptions[]

Protected handleRequest

handleRequest: any

Protected interfaceInstances

interfaceInstances: WebhookInterface[]

Protected nest

Protected steps

steps: Step[]

Methods

addField

addStep

  • addStep(stepName: string, callback: any): void
  • Adds a user interface step.

    Parameters

    • stepName: string
    • callback: any

      Parameters: WebhookJob, WebhookInterface, Step

      Example

       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
           }
      });
      

    Returns void

getCustomHandleRequest

  • getCustomHandleRequest(): any

getFields

getInterface

  • getInterface(sessionId?: string): any

getNest

getPath

  • getPath(): string

getSteps

  • getSteps(): Array<Step>

Generated using TypeDoc