import { RequestBuilder } from "../request-builder";
import type { Role, PostAdminRolesData, PatchAdminRolesByIdData } from "../_internal/types.gen";
export type { Role };
export interface RoleListResult {
    data: Role[];
    meta?: {
        total?: number;
    };
}
export interface RoleResult {
    data: Role;
}
export interface RoleListParams {
    application_id?: string;
    is_system_default?: boolean;
}
export declare function createRolesNamespace(rb: RequestBuilder): {
    /**
     * List all roles for the current application.
     *
     * Filter params are serialized as JSON:API `filter[<field>]` query keys,
     * which is what the server-side AshJsonApi route accepts. Plain bare
     * keys (`?application_id=...`) are silently ignored by the server.
     *
     * @param params - Optional filter parameters (application_id, is_system_default)
     * @returns Paginated list of roles
     * @example
     * const roles = await admin.roles.list({ application_id: appId });
     */
    list(params?: RoleListParams): Promise<RoleListResult>;
    /**
     * Get a single role by ID.
     *
     * @param id - Role UUID
     * @returns The role record
     * @example
     * const role = await admin.roles.get("role-uuid");
     */
    get(id: string): Promise<RoleResult>;
    /**
     * Create a new role with a set of permissions.
     *
     * @param attrs - Role attributes (name, permissions, description)
     * @returns The created role
     * @example
     * const role = await admin.roles.create({
     *   data: {
     *     type: "role",
     *     attributes: {
     *       name: "Document Manager",
     *       permissions: ["extract:document:read:all", "extract:document:ingest:all"],
     *     },
     *   },
     * });
     */
    create(attrs: PostAdminRolesData["body"]): Promise<RoleResult>;
    /**
     * Update an existing role's name or permissions.
     *
     * @param id - Role UUID
     * @param attrs - Attributes to update
     * @returns The updated role
     * @example
     * const updated = await admin.roles.update("role-uuid", {
     *   data: { type: "role", id: "role-uuid", attributes: { name: "Senior Document Manager" } },
     * });
     */
    update(id: string, attrs: PatchAdminRolesByIdData["body"]): Promise<RoleResult>;
    /**
     * Delete a role.
     *
     * @param id - Role UUID
     * @returns void
     * @example
     * await admin.roles.destroy("role-uuid");
     */
    destroy(id: string): Promise<void>;
};
//# sourceMappingURL=roles.d.ts.map