archastro.platform.types.users
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: a8a02bf54637 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 email: str | None = Field(default=None, description="Email address of the user.") 30 id: str = Field(..., description="User ID (`usr_...`).") 31 is_system_user: bool | None = Field( 32 default=None, 33 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 34 ) 35 metadata: dict[str, Any] | None = Field( 36 default=None, 37 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 38 ) 39 name: str | None = Field( 40 default=None, 41 description="Full display name of the user. `null` if the user has not set a name.", 42 ) 43 org: str | None = Field( 44 default=None, 45 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 46 ) 47 org_name: str | None = Field( 48 default=None, 49 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.", 50 ) 51 org_role: str | None = Field( 52 default=None, 53 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.', 54 ) 55 sandbox: str | None = Field( 56 default=None, 57 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 58 ) 59 sandbox_name: str | None = Field( 60 default=None, 61 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 62 ) 63 64 65class UserInvite(BaseModel): 66 """ 67 A shareable invite created by a user, optionally scoped to a thread. Recipients can use the invite key to join or start a conversation. 68 """ 69 70 created_at: datetime | None = Field( 71 default=None, description="When this invite was created (ISO 8601)." 72 ) 73 id: str = Field(..., description="Invite ID (`uin_...`).") 74 key: str | None = Field( 75 default=None, 76 description="Secret bearer token used to accept this invite. Treat this value like a password do not log or expose it publicly.", 77 ) 78 metadata: dict[str, Any] | None = Field( 79 default=None, 80 description="Arbitrary key-value metadata attached to the invite at creation time. Defaults to an empty object.", 81 ) 82 thread: str | None = Field( 83 default=None, 84 description="ID of the thread this invite is scoped to (`thr_...`). `null` if the invite is not bound to a thread.", 85 ) 86 user: InviteCreator | None = Field( 87 default=None, description="The user who created this invite." 88 )
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 email: str | None = Field(default=None, description="Email address of the user.") 31 id: str = Field(..., description="User ID (`usr_...`).") 32 is_system_user: bool | None = Field( 33 default=None, 34 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 35 ) 36 metadata: dict[str, Any] | None = Field( 37 default=None, 38 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 39 ) 40 name: str | None = Field( 41 default=None, 42 description="Full display name of the user. `null` if the user has not set a name.", 43 ) 44 org: str | None = Field( 45 default=None, 46 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 47 ) 48 org_name: str | None = Field( 49 default=None, 50 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.", 51 ) 52 org_role: str | None = Field( 53 default=None, 54 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.', 55 ) 56 sandbox: str | None = Field( 57 default=None, 58 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 59 ) 60 sandbox_name: str | None = Field( 61 default=None, 62 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 63 )
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.
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.
66class UserInvite(BaseModel): 67 """ 68 A shareable invite created by a user, optionally scoped to a thread. Recipients can use the invite key to join or start a conversation. 69 """ 70 71 created_at: datetime | None = Field( 72 default=None, description="When this invite was created (ISO 8601)." 73 ) 74 id: str = Field(..., description="Invite ID (`uin_...`).") 75 key: str | None = Field( 76 default=None, 77 description="Secret bearer token used to accept this invite. Treat this value like a password do not log or expose it publicly.", 78 ) 79 metadata: dict[str, Any] | None = Field( 80 default=None, 81 description="Arbitrary key-value metadata attached to the invite at creation time. Defaults to an empty object.", 82 ) 83 thread: str | None = Field( 84 default=None, 85 description="ID of the thread this invite is scoped to (`thr_...`). `null` if the invite is not bound to a thread.", 86 ) 87 user: InviteCreator | None = Field( 88 default=None, description="The user who created this invite." 89 )
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.