@archon-inc/sdk
Version:
Integrate easily to our government platform using this SDK. More info on https://archon.inc/sdk
12 lines • 969 B
TypeScript
import { AccessDetermination, ArchonResourceId, Resource, ResourceIntent, ResourceIntentName } from "../types/policy.js";
import { Session, SessionId } from "../types/user.js";
/**
* Given a list of ARIDs, determine whether the current user session has access to each resource.
* Good for checking access to multiple resources at once, like when rendering a list of resources from a database.
* @param session The session of the user attempting to access the resources.
* @param intent The intent with which the user is attempting to access the resources.
* @param resources The list of resources to check access for.
* @returns A map of ARIDs to whether the user has access to each resource.
*/
export default function bulkDetermineAccess(session: Session | SessionId, intent: ResourceIntent | ResourceIntentName, resources: Resource[] | ArchonResourceId[]): Promise<Map<ArchonResourceId, AccessDetermination>>;
//# sourceMappingURL=bulkDetermineAccess.d.ts.map