from dataclasses import dataclass
from typing import List


@dataclass
class JsonPermissionRule:
    type: str
    params: dict


@dataclass
class JsonPermissionReference:
    type: str
    field: str | List[str]


@dataclass
class JsonPermission:
    name: str
    rules: List[JsonPermissionRule]
