UNPKG

moleculer-api

Version:

A dynamic API Gateway for MoleculerJS which updates REST endpoints and aggregated GraphQL schema, access control policy for each action calls from metadata of remote services schema without restart or deployment.

14 lines (13 loc) 559 B
import { Pluggable, ValidationError } from "../../interface"; import { Logger } from "../../logger"; export declare type PluginProps = { logger: Logger; }; export declare abstract class Plugin<PluginSchema, PluginCatalog> extends Pluggable { protected readonly props: PluginProps; constructor(props: PluginProps, opts?: any); abstract start(): Promise<void>; abstract stop(): Promise<void>; abstract validateSchema(schema: PluginSchema): ValidationError[]; abstract describeSchema(schema: Readonly<PluginSchema>): PluginCatalog; }