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.
TeamSearchItem
Bases: BaseAlbertModel, HydrationMixin[Team]
Lightweight representation of a Team returned from search.
Returned by
search,
this carries only summary fields for fast listing. Call hydrate() (or fetch
by id via
get_by_id)
to obtain the fully populated
Team.
Show JSON schema:
{
"$defs": {
"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": "Lightweight representation of a Team returned from search.\n\nReturned by\n[`search`][albert.collections.teams.TeamCollection.search],\nthis carries only summary fields for fast listing. Call ``hydrate()`` (or fetch\nby ``id`` via\n[`get_by_id`][albert.collections.teams.TeamCollection.get_by_id])\nto obtain the fully populated\n[`Team`][albert.resources.teams.Team].",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Team ID (format ``TEM...``).",
"title": "Albertid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the team.",
"title": "Name"
},
"createdByName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the user who created the team.",
"title": "Createdbyname"
},
"updatedByName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the user who last updated the team.",
"title": "Updatedbyname"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ISO 8601 timestamp of when the team was created.",
"title": "Createdat"
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ISO 8601 timestamp of when the team was last updated.",
"title": "Updatedat"
},
"user": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TeamMember"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The members of the team. Roles may be absent on search hits.",
"title": "User"
}
},
"title": "TeamSearchItem",
"type": "object"
}
Fields:
-
_collection(BaseCollection | None) -
id(TeamId | None) -
name(str | None) -
created_by_name(str | None) -
updated_by_name(str | None) -
created_at(str | None) -
updated_at(str | None) -
members(list[TeamMember] | None)
created_by_name
created_by_name: str | None = None
The display name of the user who created the team.
updated_by_name
updated_by_name: str | None = None
The display name of the user who last updated the team.
members
members: list[TeamMember] | None = None
The members of the team. Roles may be absent on search hits.