Teams
albert.resources.teams
Attributes:
| Name | Type | Description |
|---|---|---|
TeamRole |
|
TeamMember
Bases: BaseAlbertModel
A user's membership in a team, pairing a user with their team role.
Example
Show JSON schema:
{
"description": "A user's membership in a team, pairing a user with their team role.\n\n!!! example\n ```python\n from albert.resources.teams import TeamMember\n member = TeamMember(id=\"USR12\", role=\"TeamOwner\")\n ```",
"properties": {
"id": {
"description": "The Albert User ID (format ``USR...``) of the member.",
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the user.",
"title": "Name"
},
"fgc": {
"anyOf": [
{
"enum": [
"TeamOwner",
"TeamViewer"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The member's role within the team: ``\"TeamOwner\"`` (can manage the team) or ``\"TeamViewer\"`` (read access). Defaults to ``\"TeamViewer\"`` when unset.",
"title": "Fgc"
}
},
"required": [
"id"
],
"title": "TeamMember",
"type": "object"
}
Fields:
Team
Bases: BaseResource
A named group of users on the Albert platform.
Teams share access: entity ACLs and Task assignments can reference a whole
team rather than individual users. Each member is a
TeamMember pairing a
User with a team role.
Example
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"TeamMember": {
"description": "A user's membership in a team, pairing a user with their team role.\n\n!!! example\n ```python\n from albert.resources.teams import TeamMember\n member = TeamMember(id=\"USR12\", role=\"TeamOwner\")\n ```",
"properties": {
"id": {
"description": "The Albert User ID (format ``USR...``) of the member.",
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the user.",
"title": "Name"
},
"fgc": {
"anyOf": [
{
"enum": [
"TeamOwner",
"TeamViewer"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The member's role within the team: ``\"TeamOwner\"`` (can manage the team) or ``\"TeamViewer\"`` (read access). Defaults to ``\"TeamViewer\"`` when unset.",
"title": "Fgc"
}
},
"required": [
"id"
],
"title": "TeamMember",
"type": "object"
}
},
"description": "A named group of users on the Albert platform.\n\nTeams share access: entity ACLs and Task assignments can reference a whole\nteam rather than individual users. Each member is a\n[`TeamMember`][albert.resources.teams.TeamMember] pairing a\n[`User`][albert.resources.users.User] with a team role.\n\n!!! example\n ```python\n from albert.resources.teams import Team, TeamMember\n team = Team(\n name=\"Coatings R&D\",\n members=[TeamMember(id=\"USR12\", role=\"TeamOwner\")],\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Team ID (format ``TEM...``). Set once the team is registered in or retrieved from Albert.",
"title": "Albertid"
},
"name": {
"description": "The display name of the team.",
"minLength": 1,
"title": "Name",
"type": "string"
},
"Users": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TeamMember"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The members of the team, each with their name and team role.",
"title": "Users"
}
},
"required": [
"name"
],
"title": "Team",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
id(TeamId | None) -
name(str) -
members(list[TeamMember] | None)
Validators:
-
_merge_acl_into_users
id
id: TeamId | None = None
The Albert Team ID (format TEM...). Set once the team is registered in or retrieved from Albert.
members
members: list[TeamMember] | None = None
The members of the team, each with their name and team role.