Options
All
  • Public
  • Public/Protected
  • All
Menu

@donmahallem/trapeze-api-express-route

Index

Variables

Const idRegex

idRegex: RegExp = /^[a-z0-9\-\+]+$/i

Functions

Const createTrapezeApiRoute

  • createTrapezeApiRoute(endpoint: string): express.Router

Const promiseToResponse

  • promiseToResponse<T>(prom: Promise<T> | RequestPromise<T>, res: express.Response, next?: express.NextFunction): void
  • takes promises and passes them on to an express response

    Type parameters

    • T

    Parameters

    • prom: Promise<T> | RequestPromise<T>
    • res: express.Response
    • Optional next: express.NextFunction

    Returns void

Object literals

Const geoFenceSchema

geoFenceSchema: object

required

required: string[] = ['top', 'bottom', 'right', 'left']

type

type: string = "object"

properties

properties: object

bottom

bottom: Schema = numberPattern

left

left: Schema = numberPattern

right

right: Schema = numberPattern

top

top: Schema = numberPattern

Const getVehicleLocationSchema

getVehicleLocationSchema: object

additionalProperties

additionalProperties: false = false

type

type: string = "object"

properties

properties: object

lastUpdate

lastUpdate: object

description

description: string = "unix timestamp in ms since epoch"

minimum

minimum: number = 0

positionType

positionType: object

description

description: string = "position type to query"

enum

enum: string[] = ['RAW', 'CORRECTED']

type

type: string = "string"

Const numberPattern

numberPattern: object

oneOf

oneOf: ({ type: string } | { pattern: string; type: string })[] = [{type: 'number',}, {pattern: '^[\\+\\-]?\\d+$',type: 'string',},]

Generated using TypeDoc