import { Registry } from "./Registry"; import { Filter } from "./filter"; import { Action, Params } from "./action"; import { Server, Request, ServerRoute } from "hapi"; /** * Configuration options that the Prism plugin accepts */ export interface Options { /** * The root path that all actions will be published relative to * @default `""` */ root: string; /** * Explicitly enable "insecure" mode by setting to `false`. When not `false` * the Root action will be configured to use the `optional` authentication * mode. This is to allow non-authenticated clients to discover how to * authenticate. * @default `true` */ secure: boolean; } export interface PluginAPI { registry: Registry; registerAction(action: Action | Action[]): void; registerFilter(filter: Filter | Filter[]): void; createdItem?: any; } export interface ResponseAPI { createdItem: any; } export declare class Plugin implements PluginAPI { protected readonly _server: Server; protected _options: Options; registry: Registry; constructor(_server: Server, options?: Partial); registerAction(action: Action | Action[]): void; registerFilter(filter: Filter | Filter[]): void; } export declare const toRoute: (action: Action) => ServerRoute; export declare const dequery: (path: string) => string; export declare const mergeRequestParameters: (request: Request) => Params;