Closed rhamzeh closed 1 year ago
For example, the below currently cannot be represented in JSON
{ "schema_version": "1.1", "type_definitions": [ { "type": "user", "relations": {} }, { "type": "folder", "relations": { "admin": { "this": {} }, "viewer": { "this": {} }, "blocked": { "this": {} }, "can_view": { "union": { "child": [ { "computedUserset": { "object": "", "relation": "admin" } }, { "difference": { "base": { "computedUserset": { "object": "", "relation": "viewer" } }, "subtract": { "computedUserset": { "object": "", "relation": "blocked" } } } } ] } } }, "metadata": { "relations": { "admin": { "directly_related_user_types": [ { "type": "user" } ] }, "viewer": { "directly_related_user_types": [ { "type": "user" } ] }, "blocked": { "directly_related_user_types": [ { "type": "user" } ] }, "can_view": { "directly_related_user_types": [] } } } } ] }
and the language transforms it to:
model schema 1.1 type user type folder relations define admin: [user] define blocked: [user] define can_view: admin or define viewer: [user]
For example, the below currently cannot be represented in JSON
and the language transforms it to: