/**
 * @adonisjs/http-server
 *
 * (c) Harminder Virk <virk@adonisjs.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/// <reference path="../../adonis-typings/index.d.ts" />
import { Macroable } from 'macroable';
import { RouteParamMatcher, ResourceRouteNames, RouteMatchersNode, RouteResourceContract, RouteMiddlewareHandler } from '@ioc:Adonis/Core/Route';
import { Route } from './Route';
/**
 * Resource route helps in defining multiple conventional routes. The support
 * for shallow routes makes it super easy to avoid deeply nested routes.
 * Learn more http://weblog.jamisbuck.org/2007/2/5/nesting-resources.
 *
 * @example
 * ```ts
 * const resource = new RouteResource('articles', 'ArticlesController')
 * ```
 */
export declare class RouteResource extends Macroable implements RouteResourceContract {
    private resource;
    private controller;
    private globalMatchers;
    private shallow;
    protected static macros: {};
    protected static getters: {};
    /**
     * The param names used to create the resource URLs.
     *
     * We need these later when someone explicitly wants to remap
     * param name for a given resource using the "paramFor" method.
     */
    private resourceParamNames;
    /**
     * A copy of routes that belongs to this resource
     */
    routes: Route[];
    /**
     * Resource name
     */
    private resourceName;
    constructor(resource: string, controller: string, globalMatchers: RouteMatchersNode, shallow?: boolean);
    /**
     * Add a new route for the given pattern, methods and controller action
     */
    private makeRoute;
    /**
     * Build routes for the given resource
     */
    private buildRoutes;
    /**
     * Filter the routes based on their partial names
     */
    private filter;
    /**
     * Register only given routes and remove others
     */
    only(names: ResourceRouteNames[]): this;
    /**
     * Register all routes, except the one's defined
     */
    except(names: ResourceRouteNames[]): this;
    /**
     * Register api only routes. The `create` and `edit` routes, which
     * are meant to show forms will not be registered
     */
    apiOnly(): this;
    /**
     * Add middleware to routes inside the resource
     */
    middleware(middleware: {
        [P in ResourceRouteNames]?: RouteMiddlewareHandler | RouteMiddlewareHandler[];
    } & {
        '*'?: RouteMiddlewareHandler | RouteMiddlewareHandler[];
    }): this;
    /**
     * Define matcher for params inside the resource
     */
    where(key: string, matcher: RouteParamMatcher): this;
    /**
     * Define namespace for all the routes inside a given resource
     */
    namespace(namespace: string): this;
    /**
     * Set the param name for a given resource
     */
    paramFor(resource: string, param: string): this;
    /**
     * Prepend name to the routes names
     */
    as(name: string): this;
}
