archastro.platform.types.teams

  1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
  2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
  3# Content hash: 6ab488d596c8
  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 TeamDeleteImpactResponse(BaseModel):
 67    """
 68    The stored custom-object rows that a Team deletion will physically remove.
 69    """
 70
 71    custom_object_count: int = Field(
 72        ..., description="All custom-object rows owned by the Team, including soft-deleted rows."
 73    )
 74    custom_objects_physically_deleted: bool = Field(
 75        ...,
 76        description="Whether Team deletion physically deletes these rows; no restore is provided.",
 77    )
 78
 79
 80class TeamInvite(BaseModel):
 81    """
 82    A team invite containing a short alphanumeric code that other users can present to join the team.
 83    """
 84
 85    code: str = Field(
 86        ...,
 87        description="Short alphanumeric join code. Pass this value as `join_code` to the join-with-code endpoint to add a user to the team.",
 88    )
 89
 90
 91class TeamMembership(BaseModel):
 92    """
 93    A record representing a user's or agent's membership in a team, including their resolved identity details and role.
 94    """
 95
 96    agent: Agent | None = Field(
 97        default=None,
 98        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.",
 99    )
100    created_at: datetime | None = Field(
101        default=None, description="When this membership record was created (ISO 8601)."
102    )
103    id: str = Field(..., description="Team membership ID (`tmb_...`).")
104    joined_at: datetime | None = Field(
105        default=None, description="When the principal joined the team (ISO 8601)."
106    )
107    metadata: dict[str, Any] | None = Field(
108        default=None,
109        description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.",
110    )
111    name: str | None = Field(
112        default=None,
113        description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.",
114    )
115    profile_picture: ImageSource | None = Field(
116        default=None,
117        description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.",
118    )
119    role: str | None = Field(
120        default=None,
121        description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.',
122    )
123    team: dict[str, Any] | None = Field(
124        default=None,
125        description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.",
126    )
127    type: str | None = Field(
128        default=None,
129        description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.',
130    )
131    updated_at: datetime | None = Field(
132        default=None, description="When this membership record was last updated (ISO 8601)."
133    )
134    user: User | None = Field(
135        default=None,
136        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.",
137    )
138
139
140class TeamMembershipListResponse(BaseModel):
141    """
142    A paginated list of team memberships returned by the list team memberships endpoint.
143    """
144
145    data: list[TeamMembership] = Field(
146        ..., description="Array of team membership objects for the current page."
147    )
148    has_next: bool | None = Field(
149        default=None,
150        description="`true` if a subsequent page exists; `false` when this is the last page.",
151    )
152    has_prev: bool | None = Field(
153        default=None,
154        description="`true` if a previous page exists; `false` when this is the first page.",
155    )
156    page: int | None = Field(default=None, description="Current page number, starting at `1`.")
157    page_size: int | None = Field(
158        default=None, description="Maximum number of results returned per page."
159    )
160    total_entries: int | None = Field(
161        default=None,
162        description="Total number of team memberships matching the applied filters across all pages.",
163    )
164    total_pages: int | None = Field(
165        default=None, description="Total number of pages given the current `page_size`."
166    )
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 TeamDeleteImpactResponse(pydantic.main.BaseModel):
67class TeamDeleteImpactResponse(BaseModel):
68    """
69    The stored custom-object rows that a Team deletion will physically remove.
70    """
71
72    custom_object_count: int = Field(
73        ..., description="All custom-object rows owned by the Team, including soft-deleted rows."
74    )
75    custom_objects_physically_deleted: bool = Field(
76        ...,
77        description="Whether Team deletion physically deletes these rows; no restore is provided.",
78    )

The stored custom-object rows that a Team deletion will physically remove.

custom_object_count: int = PydanticUndefined

All custom-object rows owned by the Team, including soft-deleted rows.

custom_objects_physically_deleted: bool = PydanticUndefined

Whether Team deletion physically deletes these rows; no restore is provided.

class TeamInvite(pydantic.main.BaseModel):
81class TeamInvite(BaseModel):
82    """
83    A team invite containing a short alphanumeric code that other users can present to join the team.
84    """
85
86    code: str = Field(
87        ...,
88        description="Short alphanumeric join code. Pass this value as `join_code` to the join-with-code endpoint to add a user to the team.",
89    )

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):
 92class TeamMembership(BaseModel):
 93    """
 94    A record representing a user's or agent's membership in a team, including their resolved identity details and role.
 95    """
 96
 97    agent: Agent | None = Field(
 98        default=None,
 99        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.",
100    )
101    created_at: datetime | None = Field(
102        default=None, description="When this membership record was created (ISO 8601)."
103    )
104    id: str = Field(..., description="Team membership ID (`tmb_...`).")
105    joined_at: datetime | None = Field(
106        default=None, description="When the principal joined the team (ISO 8601)."
107    )
108    metadata: dict[str, Any] | None = Field(
109        default=None,
110        description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.",
111    )
112    name: str | None = Field(
113        default=None,
114        description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.",
115    )
116    profile_picture: ImageSource | None = Field(
117        default=None,
118        description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.",
119    )
120    role: str | None = Field(
121        default=None,
122        description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.',
123    )
124    team: dict[str, Any] | None = Field(
125        default=None,
126        description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.",
127    )
128    type: str | None = Field(
129        default=None,
130        description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.',
131    )
132    updated_at: datetime | None = Field(
133        default=None, description="When this membership record was last updated (ISO 8601)."
134    )
135    user: User | None = Field(
136        default=None,
137        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.",
138    )

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):
141class TeamMembershipListResponse(BaseModel):
142    """
143    A paginated list of team memberships returned by the list team memberships endpoint.
144    """
145
146    data: list[TeamMembership] = Field(
147        ..., description="Array of team membership objects for the current page."
148    )
149    has_next: bool | None = Field(
150        default=None,
151        description="`true` if a subsequent page exists; `false` when this is the last page.",
152    )
153    has_prev: bool | None = Field(
154        default=None,
155        description="`true` if a previous page exists; `false` when this is the first page.",
156    )
157    page: int | None = Field(default=None, description="Current page number, starting at `1`.")
158    page_size: int | None = Field(
159        default=None, description="Maximum number of results returned per page."
160    )
161    total_entries: int | None = Field(
162        default=None,
163        description="Total number of team memberships matching the applied filters across all pages.",
164    )
165    total_pages: int | None = Field(
166        default=None, description="Total number of pages given the current `page_size`."
167    )

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.