Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebhookInterface

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

Hierarchy

  • WebhookInterface

Index

Constructors

constructor

Properties

Protected checkpointNest

checkpointNest: FolderNest

Protected e

Protected fields

fields: FieldOptions[]

Protected metadata

Protected nest

Protected sessionId

sessionId: string

Protected steps

steps: Step[]

Methods

addField

addInterfaceProperty

addStep

  • addStep(stepName: string, callback: any): void

checkNest

getFields

getJobs

  • getJobs(): Array<any>

getMetadata

getNest

getSessionId

  • getSessionId(): string

getSteps

  • getSteps(): Array<Step>

getTransportInterface

  • getTransportInterface(): object

Protected initMetadata

  • initMetadata(): void

setDescription

  • setDescription(description: string): void

setFields

setInterfaceProperties

setMetadata

setSteps

  • setSteps(steps: any): void

setTooltip

  • setTooltip(tooltip: string): void

Generated using TypeDoc