hors
Version:
Node.js API framework
18 lines (17 loc) • 590 B
TypeScript
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;