import type { Context } from 'hono'; import { type RouteContext } from '../core/index.js'; import type { WorkOSStore } from './store.js'; import type { WorkOSRole, WorkOSPermission } from './entities.js'; export declare function findEnvRole(ws: WorkOSStore, slug: string): WorkOSRole | undefined; export declare function findOrgRole(ws: WorkOSStore, orgId: string, slug: string): WorkOSRole | undefined; export declare function requireEnvRole(ws: WorkOSStore, slug: string): WorkOSRole; export declare function requireOrgRole(ws: WorkOSStore, orgId: string, slug: string): WorkOSRole; export declare function getRolePermissions(ws: WorkOSStore, roleId: string): WorkOSPermission[]; export declare function replaceRolePermissions(ws: WorkOSStore, roleId: string, permissionSlugs: string[]): WorkOSPermission[]; export interface RoleRouteConfig { pathPrefix: string; roleType: 'EnvironmentRole' | 'OrganizationRole'; requireRole: (ws: WorkOSStore, c: Context) => WorkOSRole; findRole: (ws: WorkOSStore, c: Context, slug: string) => WorkOSRole | undefined; listFilter: (c: Context) => (r: WorkOSRole) => boolean; insertDefaults: (c: Context) => Partial; duplicateMessage: string; validateBeforeCreate?: (ws: WorkOSStore, c: Context) => void; } export declare function registerRoleRoutes(ctx: RouteContext, config: RoleRouteConfig): void;