///
///
import { RouteConfig, AuthorizeFunction, RouteContract, RouteParameter, ResourceContract, RouteExtendContract } from '@tensei/common';
import { RequestHandler } from 'express';
export declare class Route implements RouteContract {
config: RouteConfig & {
extend: RouteExtendContract;
};
sampleRequest(sample: string): this;
sampleResponse(sample: string): this;
constructor(name?: string);
group(name: string): this;
noCsrf(): this;
parameters(parameters: RouteParameter[]): this;
description(description: string): this;
path(path: string): this;
cms(): this;
get(): this;
post(): this;
put(): this;
patch(): this;
delete(): this;
id(id: string): this;
authorize(authorize: AuthorizeFunction): this;
resource(resource: ResourceContract): this;
middleware(middleware: RequestHandler[]): this;
handle(handler: RouteConfig['handler']): this;
internal(): this;
extend(extend: RouteExtendContract): this;
serialize(): {
id: string;
path: string;
name: string;
type: import("@tensei/common").EndpointTypes;
group: string;
groupSlug: string;
parameters: RouteParameter[];
description: string;
snakeCaseName: string;
paramCaseName: string;
sampleRequest: string;
sampleResponse: string;
middleware: number;
authorize: number;
};
}
export declare const route: (name?: string | undefined) => Route;