UNPKG

@openfga/syntax-transformer

Version:

Javascript implementation of ANTLR Grammar for the OpenFGA DSL and parser from and to the OpenFGA JSON Syntax

16 lines (15 loc) 1.02 kB
import { TypeDefinition, Userset } from "@openfga/sdk"; /** * getModuleForObjectTypeRelation - returns the module for the given object type and relation in that type. * @param typeDef - A TypeDefinition object which contains metadata about the type. * @param relation - A string representing the relation whose module is to be retrieved. * @return string - A string representing the module for the given object type and relation. * @error error - An error if the relation does not exist. */ export declare function getModuleForObjectTypeRelation(typeDef: TypeDefinition, relation: string): string | undefined; /** * isRelationAssignable - returns true if the relation is assignable, as in the relation definition has a key "this" or any of its children have a key "this". * @param relDef - A Userset object representing a relation definition. * @return boolean - A boolean representing whether the relation definition has a key "this". */ export declare function isRelationAssignable(relDef: Userset): boolean;