UNPKG

@mediarithmics/plugins-nodejs-sdk

Version:

This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate

33 lines (32 loc) 1.5 kB
/// <reference types="express" /> /// <reference types="winston" /> /// <reference types="node" /> import * as express from "express"; import * as winston from "winston"; export declare abstract class BasePlugin { INSTANCE_CONTEXT_CACHE_EXPIRATION: number; pluginCache: any; gatewayHost: string; gatewayPort: number; outboundPlatformUrl: string; app: express.Application; logger: winston.LoggerInstance; worker_id: string; authentication_token: string; _transport: any; protected onLogLevelUpdate(req: express.Request, res: express.Response): void; private initLogLevelUpdateRoute(); protected onLogLevelRequest(req: express.Request, res: express.Response): void; private initLogLevelGetRoute(); protected onStatusRequest(req: express.Request, res: express.Response): void; private initStatusRoute(); fetchDataFile(uri: string): Promise<Buffer>; fetchConfigurationFile(fileName: string): Promise<Buffer>; requestGatewayHelper(method: string, uri: string, body?: any, qs?: any, isJson?: boolean, isBinary?: boolean): Promise<any>; protected onInitRequest(req: express.Request, res: express.Response): void; private initInitRoute(); protected asyncMiddleware: (fn: (req: express.Request, res: express.Response, next: express.NextFunction) => any) => (req: express.Request, res: express.Response, next: express.NextFunction) => void; protected setErrorHandler(): void; start(): void; constructor(); }