archastro.platform.types.users
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: 53d1623c79d0 4 5from datetime import datetime 6from typing import Any 7 8from pydantic import BaseModel, Field 9 10from .invites import InviteCreator 11 12 13class User(BaseModel): 14 """ 15 A platform user account. Represents a human or system actor that can own threads, belong to an organization, and interact with the API. 16 """ 17 18 alias: str | None = Field( 19 default=None, description="Short handle or alias for the user. `null` if not set." 20 ) 21 app: str | None = Field( 22 default=None, 23 description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.", 24 ) 25 app_name: str | None = Field( 26 default=None, 27 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 28 ) 29 created_by_agent_user: str | None = Field( 30 default=None, 31 description="Agent user that created this account (`usr_...`). `null` unless an agent created it.", 32 ) 33 created_by_developer: str | None = Field( 34 default=None, 35 description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.", 36 ) 37 created_by_org: str | None = Field( 38 default=None, 39 description="Org of the principal that created this user (`org_...`). `null` on legacy rows.", 40 ) 41 created_by_team: str | None = Field( 42 default=None, 43 description="Team that created this user (`tem_...`). `null` unless created as a team.", 44 ) 45 created_by_user: str | None = Field( 46 default=None, 47 description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.", 48 ) 49 email: str | None = Field(default=None, description="Email address of the user.") 50 id: str = Field(..., description="User ID (`usr_...`).") 51 is_system_user: bool | None = Field( 52 default=None, 53 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 54 ) 55 metadata: dict[str, Any] | None = Field( 56 default=None, 57 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 58 ) 59 name: str | None = Field( 60 default=None, 61 description="Full display name of the user. `null` if the user has not set a name.", 62 ) 63 org: str | None = Field( 64 default=None, 65 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 66 ) 67 org_name: str | None = Field( 68 default=None, 69 description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 70 ) 71 org_role: str | None = Field( 72 default=None, 73 description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.', 74 ) 75 org_slug: str | None = Field( 76 default=None, 77 description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 78 ) 79 sandbox: str | None = Field( 80 default=None, 81 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 82 ) 83 sandbox_name: str | None = Field( 84 default=None, 85 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 86 ) 87 88 89class UserInvite(BaseModel): 90 """ 91 A shareable invite created by a user, optionally scoped to a thread. Recipients can use the invite key to join or start a conversation. 92 """ 93 94 created_at: datetime | None = Field( 95 default=None, description="When this invite was created (ISO 8601)." 96 ) 97 id: str = Field(..., description="Invite ID (`uin_...`).") 98 key: str | None = Field( 99 default=None, 100 description="Secret bearer token used to accept this invite. Treat this value like a password do not log or expose it publicly.", 101 ) 102 metadata: dict[str, Any] | None = Field( 103 default=None, 104 description="Arbitrary key-value metadata attached to the invite at creation time. Defaults to an empty object.", 105 ) 106 thread: str | None = Field( 107 default=None, 108 description="ID of the thread this invite is scoped to (`thr_...`). `null` if the invite is not bound to a thread.", 109 ) 110 user: InviteCreator | None = Field( 111 default=None, description="The user who created this invite." 112 )
14class User(BaseModel): 15 """ 16 A platform user account. Represents a human or system actor that can own threads, belong to an organization, and interact with the API. 17 """ 18 19 alias: str | None = Field( 20 default=None, description="Short handle or alias for the user. `null` if not set." 21 ) 22 app: str | None = Field( 23 default=None, 24 description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.", 25 ) 26 app_name: str | None = Field( 27 default=None, 28 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 29 ) 30 created_by_agent_user: str | None = Field( 31 default=None, 32 description="Agent user that created this account (`usr_...`). `null` unless an agent created it.", 33 ) 34 created_by_developer: str | None = Field( 35 default=None, 36 description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.", 37 ) 38 created_by_org: str | None = Field( 39 default=None, 40 description="Org of the principal that created this user (`org_...`). `null` on legacy rows.", 41 ) 42 created_by_team: str | None = Field( 43 default=None, 44 description="Team that created this user (`tem_...`). `null` unless created as a team.", 45 ) 46 created_by_user: str | None = Field( 47 default=None, 48 description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.", 49 ) 50 email: str | None = Field(default=None, description="Email address of the user.") 51 id: str = Field(..., description="User ID (`usr_...`).") 52 is_system_user: bool | None = Field( 53 default=None, 54 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 55 ) 56 metadata: dict[str, Any] | None = Field( 57 default=None, 58 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 59 ) 60 name: str | None = Field( 61 default=None, 62 description="Full display name of the user. `null` if the user has not set a name.", 63 ) 64 org: str | None = Field( 65 default=None, 66 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 67 ) 68 org_name: str | None = Field( 69 default=None, 70 description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 71 ) 72 org_role: str | None = Field( 73 default=None, 74 description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.', 75 ) 76 org_slug: str | None = Field( 77 default=None, 78 description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 79 ) 80 sandbox: str | None = Field( 81 default=None, 82 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 83 ) 84 sandbox_name: str | None = Field( 85 default=None, 86 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 87 )
A platform user account. Represents a human or system actor that can own threads, belong to an organization, and interact with the API.
ID of the app this user (and their access token) is scoped to (dap_...). null if the user is not scoped to an app.
Display name of the user's app. null when the app association was not preloaded by the caller.
Agent user that created this account (usr_...). null unless an agent created it.
Developer account that created this user (dva_...). null unless created via a developer token.
Org of the principal that created this user (org_...). null on legacy rows.
Team that created this user (tem_...). null unless created as a team.
User who created this account (usr_...). null on self-signup or legacy rows.
true if this account is an internal system user rather than a human. System users are created automatically by the platform.
Arbitrary key-value metadata attached to the user. Defaults to an empty object.
ID of the organization this user belongs to (org_...). null if the user is not a member of any organization.
Display name of the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.
Role of the user within their organization. One of "admin", "member", or "viewer". null when the user is not a member of any organization.
Stable workspace slug for the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.
90class UserInvite(BaseModel): 91 """ 92 A shareable invite created by a user, optionally scoped to a thread. Recipients can use the invite key to join or start a conversation. 93 """ 94 95 created_at: datetime | None = Field( 96 default=None, description="When this invite was created (ISO 8601)." 97 ) 98 id: str = Field(..., description="Invite ID (`uin_...`).") 99 key: str | None = Field( 100 default=None, 101 description="Secret bearer token used to accept this invite. Treat this value like a password do not log or expose it publicly.", 102 ) 103 metadata: dict[str, Any] | None = Field( 104 default=None, 105 description="Arbitrary key-value metadata attached to the invite at creation time. Defaults to an empty object.", 106 ) 107 thread: str | None = Field( 108 default=None, 109 description="ID of the thread this invite is scoped to (`thr_...`). `null` if the invite is not bound to a thread.", 110 ) 111 user: InviteCreator | None = Field( 112 default=None, description="The user who created this invite." 113 )
A shareable invite created by a user, optionally scoped to a thread. Recipients can use the invite key to join or start a conversation.
Secret bearer token used to accept this invite. Treat this value like a password do not log or expose it publicly.
Arbitrary key-value metadata attached to the invite at creation time. Defaults to an empty object.
ID of the thread this invite is scoped to (thr_...). null if the invite is not bound to a thread.