Module tripleblind.owner
Owner API
This module allows an organization owner to interact with the TripleBlind Router manage other owners.
Classes
class Owner-
Owner()
Static methods
def add(owner: str, session: Session | None = None) -> dict-
Create a new owner for the organization
NOTE: This method is only available for users with the "owner" role.
Args
owner:str- The user ID or email of an existing user to add as an owner.
session:Session, optional- A connection session. If not specified the default session is used.
Raises
TripleBlindAPIError- Only associated users can be added as organization owners.
Returns
dict- The new owner object.
def get_all(allow_cached: bool = True, session: Session | None = None) -> List[dict]-
Retrieve a list of teams available to the current user.
Args
allow_cached:bool, optional- When True, allow usage of a previously cached list of teams. Set to False to force syncing with the server. Defaults to True.
session:Session, optional- A connection session. If not specified the default session is used.
Returns
List[dict]- A list of Owners, e.g.: [{'id': '8b129767-f6aa-4a0a-bdac-829b471b7cf3', 'organization': {'id': 'e2ff762f-3b67-4cd3-a2b7-ec2b4548d2f2', 'name': 'Globex'}, 'user': {'id': '8f7e1351-bedd-4481-8dff-8e3c59fd26dc', 'email': '[email protected]', 'first_name': 'Betty (org2)', 'last_name': 'Zweiten'}}]
def remove(owner: str, session: Session | None = None) -> dict-
Remove an owner for the organization
NOTE: This method is only available for users with the "owner" role.
Args
owner:str- The user ID or email of an existing owner to remove.
session:Session, optional- A connection session. If not specified the default session is used.
Raises
TripleBlindAPIError- Only associated users can be added as organization owners.
Returns
bool- True if the owner was successfully removed, False otherwise.