import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { ValtechAuthConfig } from '../auth/types'; import * as i0 from "@angular/core"; export interface RbacUserRole { roleId: string; roleName: string; orgId: string; appId?: string; assignedAt?: string; assignedBy?: string; } export interface RbacOrgMember { userId: string; email?: string; name?: string; roles: string[]; assignedAt?: string; } export interface AssignRoleRequest { userId: string; orgId: string; roleName: string; appId?: string; } export interface AssignRoleResponse { operationId: string; success: boolean; } export interface RevokeRoleRequest { userId: string; orgId: string; roleName: string; appId?: string; } export interface RevokeRoleResponse { operationId: string; success: boolean; } export interface GetUserRolesResponse { operationId: string; roles: RbacUserRole[]; count: number; } export interface GetOrgMembersResponse { operationId: string; members: RbacOrgMember[]; nextToken?: string; count: number; } export interface CreateRoleRequest { orgId: string; name: string; description?: string; permissions: string[]; } export interface UpdateRoleRequest { orgId: string; roleId: string; name?: string; description?: string; permissions?: string[]; } export interface DeleteRoleRequest { orgId: string; roleId: string; } export interface RbacRole { id: string; orgId: string; name: string; description?: string; permissions: string[]; isSystem: boolean; createdAt?: string; updatedAt?: string; } export interface CreateRoleResponse { operationId: string; role: RbacRole; } export interface UpdateRoleResponse { operationId: string; role: RbacRole; } export interface DeleteRoleResponse { operationId: string; success: boolean; } export interface ListRolesResponse { operationId: string; roles: RbacRole[]; nextToken?: string; count: number; } /** * Servicio RBAC — wrapper HTTP sobre `/rbac/*` (requiere `rbac:manage`). * Expone: assign/revoke rol, listar roles del usuario/org, CRUD de roles custom. */ export declare class RbacService { private config; private http; constructor(config: ValtechAuthConfig, http: HttpClient); private get baseUrl(); /** Asigna un rol a un usuario dentro de una organización. */ assignRole(req: AssignRoleRequest): Observable; /** Revoca un rol de un usuario dentro de una organización. */ revokeRole(req: RevokeRoleRequest): Observable; /** Lista los roles asignados a un usuario en una organización. */ getUserRoles(orgId: string, userId: string): Observable; /** Lista los miembros de una organización con sus roles. */ getOrgMembers(orgId: string, opts?: { limit?: number; nextToken?: string; }): Observable; /** Lista los roles disponibles en una organización. */ listRoles(orgId: string, opts?: { limit?: number; nextToken?: string; }): Observable; /** Crea un rol personalizado en una organización. */ createRole(req: CreateRoleRequest): Observable; /** Actualiza un rol personalizado existente. */ updateRole(req: UpdateRoleRequest): Observable; /** Elimina un rol personalizado. */ deleteRole(req: DeleteRoleRequest): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }