Skip to content

Commit

Permalink
Lint tokens file
Browse files Browse the repository at this point in the history
  • Loading branch information
WRansohoff committed Sep 26, 2024
1 parent 4e6846c commit 36946ee
Showing 1 changed file with 40 additions and 36 deletions.
76 changes: 40 additions & 36 deletions src/axiom_py/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class TokenDatasetCapabilities:
# Ability to query data. Optional.
query: Optional[list[Literal["read"]]] = field(default=None)
# Ability to use starred queries. Optional.
starredQueries: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)
starredQueries: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to use virtual fields. Optional.
virtualFields: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)
virtualFields: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)


@dataclass
Expand All @@ -35,53 +35,55 @@ class TokenOrganizationCapabilities:
"""

# Ability to use annotations. Optional.
annotations: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
)
annotations: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to use api tokens. Optional.
apiTokens: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
)
apiTokens: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to access billing. Optional.
billing: Optional[list[Literal["read", "update"]]] = field(default=None)
# Ability to use dashboards. Optional.
dashboards: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
)
dashboards: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to use datasets. Optional.
datasets: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
datasets: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)
# Ability to use endpoints. Optional.
endpoints: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
)
endpoints: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to use flows. Optional.
flows: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
flows: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)
# Ability to use integrations. Optional.
integrations: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
)
integrations: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to use monitors. Optional.
monitors: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
monitors: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)
# Ability to use notifiers. Optional.
notifiers: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
)
notifiers: Optional[
list[Literal["create", "read", "update", "delete"]]
] = field(default=None)
# Ability to use role-based access controls. Optional.
rbac: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
default=None
rbac: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)
# Ability to use shared access keys. Optional.
sharedAccessKeys: Optional[list[Literal["read", "update"]]] = field(default=None)
# Ability to use users. Optional.
users: Optional[list[Literal["create", "read", "update", "delete"]]] = field(
sharedAccessKeys: Optional[list[Literal["read", "update"]]] = field(
default=None
)
# Ability to use users. Optional.
users: Optional[list[Literal["create", "read", "update", "delete"]]] = (
field(default=None)
)


@dataclass
Expand All @@ -103,7 +105,9 @@ class TokenAttributes:
# Expiration date for the API token. Optional.
expiresAt: Optional[str] = field(default=None)
# The token's organization-level capabilities. Optional.
orgCapabilities: Optional[TokenOrganizationCapabilities] = field(default=None)
orgCapabilities: Optional[TokenOrganizationCapabilities] = field(
default=None
)


@dataclass
Expand Down

0 comments on commit 36946ee

Please sign in to comment.