/**
 * Admin API routes for environment management.
 *
 *   POST   /api/v1/admin/environments                                    — create (upsert)
 *   POST   /api/v1/admin/environments/:name/bind                         — bind a scope pattern
 *   PATCH  /api/v1/admin/environments/:name/policy                       — update policy fields
 *   GET    /api/v1/admin/environments?orgId=<id>                         — list environments
 *   GET    /api/v1/admin/environments/:name?orgId=<id>                   — show env + vars + bindings
 *   DELETE /api/v1/admin/environments/:name?orgId=<id>                   — delete env (cascades bindings/variables/overrides; pending held runs block with 409)
 *   POST   /api/v1/admin/environments/templates                          — create/update a template
 *   GET    /api/v1/admin/environments/:name/variables?orgId=<id>         — list org-level variables
 *   PUT    /api/v1/admin/environments/:name/variables/:key?orgId=<id>    — upsert variable
 *   DELETE /api/v1/admin/environments/:name/variables/:key?orgId=<id>    — delete variable
 *
 * Backs the `kici-admin environment` dual-mode CLI. Offline (direct-DB) mode
 * bypasses this router entirely — the CLI calls `*Direct` helpers from
 * @kici-dev/shared. This HTTP surface exists so tooling with only an admin
 * token (no DB reach) can do the same operations.
 *
 * All routes are protected by the admin auth middleware mounted in admin.ts
 * (at `/api/v1/admin/*`). That middleware sets `role` + `userId` on the
 * context, which we use for RBAC gating here.
 */
import { Hono } from 'hono';
import { type Kysely } from 'kysely';
import type { RbacEnforcer, Role } from '../secrets/rbac.js';
export interface AdminEnvironmentRoutesDeps {
    db: Kysely<any>;
    rbac: RbacEnforcer;
}
/** Hono env type for admin-environments routes with context variables. */
type AdminEnvEnv = {
    Variables: {
        role: Role;
        userId: string;
        routingKey: string | null;
    };
};
/**
 * Create admin API routes for environment management.
 *
 * @param deps - db (Kysely) + rbac enforcer
 * @returns Hono app mounted at /api/v1/admin
 */
export declare function createAdminEnvironmentRoutes(deps: AdminEnvironmentRoutesDeps): Hono<AdminEnvEnv>;
export {};
//# sourceMappingURL=admin-environments.d.ts.map