UNPKG

@openfga/frontend-utils

Version:

Exposes helpful utilities for building authoring experiences of OpenFGA Models.

24 lines (23 loc) 725 B
import { AuthorizationModel } from "@openfga/sdk"; import { GraphDefinition } from "./graph.typings"; export type TypeGraphOpts = { showAssignable?: boolean; }; export declare class AuthorizationModelGraphBuilder { private authorizationModel; private store?; private _graph; constructor(authorizationModel: AuthorizationModel, store?: { name?: string; id?: string; } | undefined); private static getStoreId; private static getTypeId; private static getRelationId; private buildGraph; private checkIfRelationAssignable; private getAssignableSourcesForRelation; private addRelationToRelationEdge; private getTypeGraph; get graph(): GraphDefinition; }