Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RegisterStatisticsEndpointOptions

Options for 'registerStatisticsEndpoint()' function.

Hierarchy

  • RegisterStatisticsEndpointOptions

Index

Properties

Optional afterRequest

afterRequest: (err: any, context: StatisticApiContext) => any

A custom function that is invoked AFTER a request.

param

The error (if occurred).

param

The context.

Type declaration

Optional authorizer

authorizer: (context: StatisticApiContext) => boolean | PromiseLike<boolean>

A function that checks if a request is authorized to access the endpoint or not.

param

The context.

returns

The result that indicates if request is authorized or not.

Type declaration

Optional beforeRequest

beforeRequest: (context: StatisticApiContext) => any

A custom function that is invoked BEFORE a request is handled.

param

The context.

Type declaration

providerDetector

providerDetector: StatisticProviderDetector

A function that detects a statistic provider by name.

Optional responseHandler

responseHandler: (result: StatisticProviderApiResult, context: StatisticApiContext) => express.Response | PromiseLike<express.Response>

A custom response handler.

param

The result to handle.

param

The context.

returns

The (new) response context.

Type declaration

Optional rootName

rootName: string

The custom name of API root.

Generated using TypeDoc