arrest
Version:
OpenAPI v3 compliant REST framework for Node.js, with support for MongoDB and JSON-Schema
16 lines (15 loc) • 715 B
TypeScript
import { NextFunction } from 'express';
import { OpenAPIV3 } from 'openapi-police';
import { Operation } from './operation.js';
import { APIRequest, APIResponse } from './types.js';
export declare function rpc(target: JSONRPC, propertyKey: string): void;
export declare class JSONRPCError extends Error {
code: number;
data?: any | undefined;
constructor(code: number, message: string, data?: any | undefined);
}
export declare abstract class JSONRPC extends Operation {
protected getCustomInfo(): OpenAPIV3.OperationObject;
handler(req: APIRequest, res: APIResponse, next: NextFunction): any;
protected errorHandler(err: any, req: APIRequest, res: APIResponse, next: NextFunction): void;
}