Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Server

Webhook and logging server.

Hierarchy

  • Server

Index

Constructors

constructor

Properties

Protected e

Protected hookInterfaceRoutes

hookInterfaceRoutes: Array<any> = []

Protected hookRoutes

hookRoutes: Array<any> = []

Protected server

server: express.Application

Protected upload

upload: any

Methods

addWebhook

addWebhookInterface

createLogServer

  • createLogServer(logger: Logger): void

Protected createServer

  • createServer(): void

Protected handleHookInterfaceRequest

  • handleHookInterfaceRequest(im: InterfaceManager, req: any, res: any, customHandler?: any): void

Protected handleHookRequest

  • handleHookRequest(nest: WebhookNest, req: any, res: any, customHandler?: any): void
  • Handles request and response of the web hook, creates a new job, as well as calling the nest's arrive.

    Parameters

    • nest: WebhookNest
    • req: any
    • res: any
    • Optional customHandler: any

      Custom request handler.

    Returns void

sendHookResponse

  • sendHookResponse(holdResponse: boolean, job: WebhookJob, nest: WebhookNest, req: any, res: any, customHandler?: any, message?: string): void
  • Sends the actual hook response.

    Parameters

    • holdResponse: boolean

      Flag to bypass sending now for held responses.

    • job: WebhookJob

      Webhook job

    • nest: WebhookNest

      Webhook nest

    • req: any
    • res: any
    • Optional customHandler: any
    • Optional message: string

    Returns void

toString

  • toString(): string

Object literals

Protected config

config: object

hooks_prefix

hooks_prefix: string = "/hooks"

hooks_ui_prefix

hooks_ui_prefix: string = "/hooks-ui"

log_prefix

log_prefix: string = "/log"

Generated using TypeDoc