UNPKG

hors

Version:
18 lines (17 loc) 590 B
import 'reflect-metadata'; import { EndpointMiddleware } from '../transaction/transaction-types'; export declare type ApiHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; export interface StoredEndpoint { url: string; method: ApiHttpMethod; public: boolean; middleware: EndpointMiddleware[]; target: any; } export interface ApiEndpointSettings { method: ApiHttpMethod; url: string; public?: boolean; middleware?: EndpointMiddleware[]; } export declare const apiEndpoint: (settings: ApiEndpointSettings) => (target: any) => void;