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 _checkpointNest

_checkpointNest: FolderNest

Protected _fields

_fields: FieldOptions[]

Protected _handleRequest

_handleRequest: any

Protected _interfaceInstances

_interfaceInstances: WebhookInterface[]

Protected _metadata

Protected _nest

Protected _steps

_steps: Step[]

Protected e

Accessors

checkpointNest

customHandleRequest

  • get customHandleRequest(): any

description

  • set description(description: string): void

fields

interfaceInstances

interfaceProperties

metadata

nest

path

  • get path(): any

steps

  • get steps(): Array<Step>

tooltip

  • set tooltip(tooltip: string): void

Methods

addField

Protected addInterfaceInstance

addInterfaceProperty

addStep

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

    Parameters

    • stepName: string
    • callback: any

      Parameters: WebhookJob, WebhookInterface, Step, Done callback

      Example

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

    Returns void

checkNest

getInterface

  • getInterface(sessionId?: string): any

Protected initMetadata

  • initMetadata(): void

Protected removeInterfaceInstance

Generated using TypeDoc