import { OpResult } from 'mslib';
import { KongService, KongRoute, KongPlugin, KongTarget, KongUpstream } from './ApiModels';
/**
 * Kong管理API
 * @date 2021-06-16 09:29:17
 * @author 吴锋霖
 */
export declare class AdminApi {
    private apiUrl;
    private httpClient;
    constructor(apiUrl: string);
    addService(kongService: KongService): Promise<OpResult<KongService>>;
    addRoute(kongRoute: KongRoute): Promise<OpResult<KongRoute>>;
    updateRoute(kongRoute: KongRoute): Promise<OpResult<KongRoute>>;
    addUpstream(kongUpstream: KongUpstream): Promise<OpResult<KongUpstream>>;
    addTarget(kongTarget: KongTarget): Promise<OpResult<KongTarget>>;
    addPlugin(kongPlugin: KongPlugin): Promise<OpResult<KongPlugin>>;
    getService(id: string): Promise<OpResult<Array<KongService>>>;
    getRoute(id: string): Promise<OpResult<Array<KongRoute>>>;
    getUpstream(id: string): Promise<OpResult<Array<KongUpstream>>>;
    listServices(tags: string): Promise<OpResult<Array<KongService>>>;
    listRoutes(tags: string): Promise<OpResult<Array<KongRoute>>>;
    listUpstreams(tags: string): Promise<OpResult<Array<KongUpstream>>>;
    listTargets(upstream: string): Promise<OpResult<Array<KongTarget>>>;
    listServicePlugins(serviceId: string): Promise<OpResult<Array<KongPlugin>>>;
    listRoutePlugins(routeId: string): Promise<OpResult<Array<KongPlugin>>>;
    deleteService(id: string): Promise<OpResult<any>>;
    deleteRoute(id: string): Promise<OpResult<any>>;
    deleteUpstream(id: string): Promise<OpResult<any>>;
    deleteTarget(upstream: string, targetId: string): Promise<OpResult<any>>;
    removeTarget(upstream: string, host: string, post: string): Promise<OpResult<KongTarget>>;
    private listKongObjs;
    private getKongObj;
    private deleteKongObj;
    private addKongObj;
    private updateKongObj;
}
