archastro.platform.types.teams

  1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
  2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
  3# Content hash: fcfcac9428bf
  4
  5from datetime import datetime
  6from typing import Any
  7
  8from pydantic import BaseModel, Field
  9
 10from .common import Acl, Agent
 11from .image import ImageSource
 12from .users import User
 13
 14
 15class Team(BaseModel):
 16    """
 17    A team within an organization, used to group users and agents and scope resources like configs, agents, and tasks.
 18    """
 19
 20    acl: Acl | None = Field(
 21        default=None,
 22        description="Access control list governing visibility and join permissions for this team. `null` when no ACL restrictions are applied and the team inherits default access rules.",
 23    )
 24    app: str | None = Field(
 25        default=None,
 26        description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.",
 27    )
 28    badges: dict[str, Any] | None = Field(
 29        default=None,
 30        description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.",
 31    )
 32    created_at: datetime | None = Field(
 33        default=None, description="When this team was created (ISO 8601)."
 34    )
 35    description: str | None = Field(
 36        default=None,
 37        description="Human-readable description of the team's purpose. `null` if not set.",
 38    )
 39    id: str = Field(..., description="Team ID (`tem_...`).")
 40    membership_status: str | None = Field(
 41        default=None,
 42        description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.',
 43    )
 44    metadata: dict[str, Any] | None = Field(
 45        default=None,
 46        description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.",
 47    )
 48    name: str | None = Field(default=None, description="Display name of the team.")
 49    org: str | None = Field(
 50        default=None,
 51        description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.",
 52    )
 53    sandbox: str | None = Field(
 54        default=None,
 55        description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.",
 56    )
 57    slug: str | None = Field(
 58        default=None,
 59        description="URL-safe slug for the team, derived from the team name. `null` if not set.",
 60    )
 61    updated_at: datetime | None = Field(
 62        default=None, description="When this team was last updated (ISO 8601)."
 63    )
 64
 65
 66class TeamInvite(BaseModel):
 67    """
 68    A team invite containing a short alphanumeric code that other users can present to join the team.
 69    """
 70
 71    code: str = Field(
 72        ...,
 73        description="Short alphanumeric join code. Pass this value as `join_code` to the join-with-code endpoint to add a user to the team.",
 74    )
 75
 76
 77class TeamMembership(BaseModel):
 78    """
 79    A record representing a user's or agent's membership in a team, including their resolved identity details and role.
 80    """
 81
 82    agent: Agent | None = Field(
 83        default=None,
 84        description="The agent associated with this membership, as an expanded agent object. `null` when the member is a user, the type is unknown, or the association is not preloaded.",
 85    )
 86    created_at: datetime | None = Field(
 87        default=None, description="When this membership record was created (ISO 8601)."
 88    )
 89    id: str = Field(..., description="Team membership ID (`tmb_...`).")
 90    joined_at: datetime | None = Field(
 91        default=None, description="When the principal joined the team (ISO 8601)."
 92    )
 93    metadata: dict[str, Any] | None = Field(
 94        default=None,
 95        description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.",
 96    )
 97    name: str | None = Field(
 98        default=None,
 99        description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.",
100    )
101    profile_picture: ImageSource | None = Field(
102        default=None,
103        description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.",
104    )
105    role: str | None = Field(
106        default=None,
107        description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.',
108    )
109    team: dict[str, Any] | None = Field(
110        default=None,
111        description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.",
112    )
113    type: str | None = Field(
114        default=None,
115        description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.',
116    )
117    updated_at: datetime | None = Field(
118        default=None, description="When this membership record was last updated (ISO 8601)."
119    )
120    user: User | None = Field(
121        default=None,
122        description="The user associated with this membership, as an expanded user object. `null` when the member is an agent, the type is unknown, or the association is not preloaded.",
123    )
124
125
126class TeamMembershipListResponse(BaseModel):
127    """
128    A paginated list of team memberships returned by the list team memberships endpoint.
129    """
130
131    data: list[TeamMembership] = Field(
132        ..., description="Array of team membership objects for the current page."
133    )
134    has_next: bool | None = Field(
135        default=None,
136        description="`true` if a subsequent page exists; `false` when this is the last page.",
137    )
138    has_prev: bool | None = Field(
139        default=None,
140        description="`true` if a previous page exists; `false` when this is the first page.",
141    )
142    page: int | None = Field(default=None, description="Current page number, starting at `1`.")
143    page_size: int | None = Field(
144        default=None, description="Maximum number of results returned per page."
145    )
146    total_entries: int | None = Field(
147        default=None,
148        description="Total number of team memberships matching the applied filters across all pages.",
149    )
150    total_pages: int | None = Field(
151        default=None, description="Total number of pages given the current `page_size`."
152    )
class Team(pydantic.main.BaseModel):
16class Team(BaseModel):
17    """
18    A team within an organization, used to group users and agents and scope resources like configs, agents, and tasks.
19    """
20
21    acl: Acl | None = Field(
22        default=None,
23        description="Access control list governing visibility and join permissions for this team. `null` when no ACL restrictions are applied and the team inherits default access rules.",
24    )
25    app: str | None = Field(
26        default=None,
27        description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.",
28    )
29    badges: dict[str, Any] | None = Field(
30        default=None,
31        description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.",
32    )
33    created_at: datetime | None = Field(
34        default=None, description="When this team was created (ISO 8601)."
35    )
36    description: str | None = Field(
37        default=None,
38        description="Human-readable description of the team's purpose. `null` if not set.",
39    )
40    id: str = Field(..., description="Team ID (`tem_...`).")
41    membership_status: str | None = Field(
42        default=None,
43        description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.',
44    )
45    metadata: dict[str, Any] | None = Field(
46        default=None,
47        description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.",
48    )
49    name: str | None = Field(default=None, description="Display name of the team.")
50    org: str | None = Field(
51        default=None,
52        description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.",
53    )
54    sandbox: str | None = Field(
55        default=None,
56        description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.",
57    )
58    slug: str | None = Field(
59        default=None,
60        description="URL-safe slug for the team, derived from the team name. `null` if not set.",
61    )
62    updated_at: datetime | None = Field(
63        default=None, description="When this team was last updated (ISO 8601)."
64    )

A team within an organization, used to group users and agents and scope resources like configs, agents, and tasks.

Access control list governing visibility and join permissions for this team. null when no ACL restrictions are applied and the team inherits default access rules.

app: str | None = None

ID of the developer application this team belongs to (dap_...). null if the team is not scoped to an app.

badges: dict[str, typing.Any] | None = None

Aggregated badge counts for the team, keyed by category. null when badge data is not loaded.

created_at: datetime.datetime | None = None

When this team was created (ISO 8601).

description: str | None = None

Human-readable description of the team's purpose. null if not set.

id: str = PydanticUndefined

Team ID (tem_...).

membership_status: str | None = None

The authenticated viewer's role on this team. One of "owner", "admin", or "member". null if the viewer is not a member.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.

name: str | None = None

Display name of the team.

org: str | None = None

ID of the organization this team belongs to (org_...). null if the team is not org-scoped.

sandbox: str | None = None

ID of the developer sandbox this team is scoped to (dsb_...). null outside sandbox contexts.

slug: str | None = None

URL-safe slug for the team, derived from the team name. null if not set.

updated_at: datetime.datetime | None = None

When this team was last updated (ISO 8601).

class TeamInvite(pydantic.main.BaseModel):
67class TeamInvite(BaseModel):
68    """
69    A team invite containing a short alphanumeric code that other users can present to join the team.
70    """
71
72    code: str = Field(
73        ...,
74        description="Short alphanumeric join code. Pass this value as `join_code` to the join-with-code endpoint to add a user to the team.",
75    )

A team invite containing a short alphanumeric code that other users can present to join the team.

code: str = PydanticUndefined

Short alphanumeric join code. Pass this value as join_code to the join-with-code endpoint to add a user to the team.

class TeamMembership(pydantic.main.BaseModel):
 78class TeamMembership(BaseModel):
 79    """
 80    A record representing a user's or agent's membership in a team, including their resolved identity details and role.
 81    """
 82
 83    agent: Agent | None = Field(
 84        default=None,
 85        description="The agent associated with this membership, as an expanded agent object. `null` when the member is a user, the type is unknown, or the association is not preloaded.",
 86    )
 87    created_at: datetime | None = Field(
 88        default=None, description="When this membership record was created (ISO 8601)."
 89    )
 90    id: str = Field(..., description="Team membership ID (`tmb_...`).")
 91    joined_at: datetime | None = Field(
 92        default=None, description="When the principal joined the team (ISO 8601)."
 93    )
 94    metadata: dict[str, Any] | None = Field(
 95        default=None,
 96        description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.",
 97    )
 98    name: str | None = Field(
 99        default=None,
100        description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.",
101    )
102    profile_picture: ImageSource | None = Field(
103        default=None,
104        description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.",
105    )
106    role: str | None = Field(
107        default=None,
108        description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.',
109    )
110    team: dict[str, Any] | None = Field(
111        default=None,
112        description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.",
113    )
114    type: str | None = Field(
115        default=None,
116        description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.',
117    )
118    updated_at: datetime | None = Field(
119        default=None, description="When this membership record was last updated (ISO 8601)."
120    )
121    user: User | None = Field(
122        default=None,
123        description="The user associated with this membership, as an expanded user object. `null` when the member is an agent, the type is unknown, or the association is not preloaded.",
124    )

A record representing a user's or agent's membership in a team, including their resolved identity details and role.

The agent associated with this membership, as an expanded agent object. null when the member is a user, the type is unknown, or the association is not preloaded.

created_at: datetime.datetime | None = None

When this membership record was created (ISO 8601).

id: str = PydanticUndefined

Team membership ID (tmb_...).

joined_at: datetime.datetime | None = None

When the principal joined the team (ISO 8601).

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to this membership record. null if no metadata has been set.

name: str | None = None

Display name of the member, derived from the associated user or agent. null if the principal is unknown.

profile_picture: archastro.platform.types.image.ImageSource | None = None

Profile picture of the member, derived from the associated user or agent. null if not set or principal is unknown.

role: str | None = None

The member's role within the team. One of "owner", "admin", or "member".

team: dict[str, typing.Any] | None = None

The team this membership belongs to, as an expanded team object. null when the team association is not preloaded.

type: str | None = None

Resolved principal type. One of "user", "agent", or "unknown" when the principal cannot be determined.

updated_at: datetime.datetime | None = None

When this membership record was last updated (ISO 8601).

The user associated with this membership, as an expanded user object. null when the member is an agent, the type is unknown, or the association is not preloaded.

class TeamMembershipListResponse(pydantic.main.BaseModel):
127class TeamMembershipListResponse(BaseModel):
128    """
129    A paginated list of team memberships returned by the list team memberships endpoint.
130    """
131
132    data: list[TeamMembership] = Field(
133        ..., description="Array of team membership objects for the current page."
134    )
135    has_next: bool | None = Field(
136        default=None,
137        description="`true` if a subsequent page exists; `false` when this is the last page.",
138    )
139    has_prev: bool | None = Field(
140        default=None,
141        description="`true` if a previous page exists; `false` when this is the first page.",
142    )
143    page: int | None = Field(default=None, description="Current page number, starting at `1`.")
144    page_size: int | None = Field(
145        default=None, description="Maximum number of results returned per page."
146    )
147    total_entries: int | None = Field(
148        default=None,
149        description="Total number of team memberships matching the applied filters across all pages.",
150    )
151    total_pages: int | None = Field(
152        default=None, description="Total number of pages given the current `page_size`."
153    )

A paginated list of team memberships returned by the list team memberships endpoint.

data: list[TeamMembership] = PydanticUndefined

Array of team membership objects for the current page.

has_next: bool | None = None

true if a subsequent page exists; false when this is the last page.

has_prev: bool | None = None

true if a previous page exists; false when this is the first page.

page: int | None = None

Current page number, starting at 1.

page_size: int | None = None

Maximum number of results returned per page.

total_entries: int | None = None

Total number of team memberships matching the applied filters across all pages.

total_pages: int | None = None

Total number of pages given the current page_size.