diff --git a/src/archastro/platform/channels/api_activity_feed_channel.py b/src/archastro/platform/channels/api_activity_feed_channel.py index f735bb6..24f3531 100644 --- a/src/archastro/platform/channels/api_activity_feed_channel.py +++ b/src/archastro/platform/channels/api_activity_feed_channel.py @@ -1,9 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 12874ed2facb +# Content hash: 8b5c0cda4968 from collections.abc import Callable -from typing import TYPE_CHECKING, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict if TYPE_CHECKING: from archastro.phx_channel.socket import Socket @@ -19,7 +19,7 @@ class ListEntriesInput(TypedDict, total=False): class NewEntryPayload(TypedDict, total=False): - entry: dict[str, object] | None + entry: dict[str, Any] | None # Phoenix channel for real-time activity feed updates. @@ -64,7 +64,7 @@ async def leave(self): await self._channel.leave() # List activity feed entries with cursor-based pagination - async def list_entries(self, payload: ListEntriesInput) -> dict[str, object]: + async def list_entries(self, payload: ListEntriesInput) -> dict[str, Any]: return await self._channel.push("list_entries", payload) def on_new_entry(self, callback: Callable[[NewEntryPayload], None]) -> Callable[[], None]: diff --git a/src/archastro/platform/channels/api_chat_channel.py b/src/archastro/platform/channels/api_chat_channel.py index c090f38..099e754 100644 --- a/src/archastro/platform/channels/api_chat_channel.py +++ b/src/archastro/platform/channels/api_chat_channel.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 778ff3bdf540 +# Content hash: f168af356eb1 from collections.abc import Callable from datetime import datetime -from typing import TYPE_CHECKING, Required, TypedDict +from typing import TYPE_CHECKING, Any, Required, TypedDict if TYPE_CHECKING: from archastro.phx_channel.socket import Socket @@ -34,7 +34,7 @@ class ApiChatPostMessageInput(TypedDict, total=False): content: Required[str] idempotency_key: str reply_to: str - uploads: list[dict[str, object]] + uploads: list[dict[str, Any]] # Post a simple text message @@ -130,7 +130,7 @@ class MessageAddedPayloadMessageAttachmentsItem(TypedDict, total=False): image_width: int | None # Preview image width (scraped_link type) media_type: str | None # Media type (media type) name: str | None # Media name (media type) - object: dict[str, object] | None # Embedded object (task, action types) + object: dict[str, Any] | None # Embedded object (task, action types) title: str | None # Title (scraped_link, artifact, task types) type: Required[str] # Attachment type: file, scraped_link, artifact, task, media, action url: str | None # URL to the resource (file, scraped_link, artifact, media types) @@ -140,7 +140,7 @@ class MessageAddedPayloadMessageAttachmentsItem(TypedDict, total=False): class MessageAddedPayloadMessageReactionsItem(TypedDict, total=False): - payload: dict[str, object] | None # Reaction payload (e.g., {emoji: '👍'}) + payload: dict[str, Any] | None # Reaction payload (e.g., {emoji: '👍'}) type: Required[str] # Reaction type (e.g., emoji_reaction) user: str | None # User who added the reaction @@ -156,15 +156,15 @@ class MessageAddedPayloadMessage(TypedDict, total=False): id: Required[str] # Message ID (msg_...) idempotency_key: str | None # Client-provided idempotency key legacy_agent: str | None # Legacy agent if sent by legacy chat agent - metadata: dict[str, object] | None # Message metadata + metadata: dict[str, Any] | None # Message metadata org: str | None # Organization reactions: list[MessageAddedPayloadMessageReactionsItem] | None # Message reactions rendering_mode: str | None # Rendering mode hint - replies: list[dict[str, object]] | None # Inline replies (if loaded) + replies: list[dict[str, Any]] | None # Inline replies (if loaded) replies_after_cursor: str | None # Cursor for replies pagination replies_before_cursor: str | None # Cursor for replies pagination reply_count: int | None # Number of replies - reply_to: dict[str, object] | None # Parent message object (if loaded) + reply_to: dict[str, Any] | None # Parent message object (if loaded) sandbox: str | None # Sandbox identifier team: str | None # Team thread: str | None # Parent thread @@ -242,7 +242,7 @@ class MessageUpdatedPayloadMessageAttachmentsItem(TypedDict, total=False): image_width: int | None # Preview image width (scraped_link type) media_type: str | None # Media type (media type) name: str | None # Media name (media type) - object: dict[str, object] | None # Embedded object (task, action types) + object: dict[str, Any] | None # Embedded object (task, action types) title: str | None # Title (scraped_link, artifact, task types) type: Required[str] # Attachment type: file, scraped_link, artifact, task, media, action url: str | None # URL to the resource (file, scraped_link, artifact, media types) @@ -252,7 +252,7 @@ class MessageUpdatedPayloadMessageAttachmentsItem(TypedDict, total=False): class MessageUpdatedPayloadMessageReactionsItem(TypedDict, total=False): - payload: dict[str, object] | None # Reaction payload (e.g., {emoji: '👍'}) + payload: dict[str, Any] | None # Reaction payload (e.g., {emoji: '👍'}) type: Required[str] # Reaction type (e.g., emoji_reaction) user: str | None # User who added the reaction @@ -268,15 +268,15 @@ class MessageUpdatedPayloadMessage(TypedDict, total=False): id: Required[str] # Message ID (msg_...) idempotency_key: str | None # Client-provided idempotency key legacy_agent: str | None # Legacy agent if sent by legacy chat agent - metadata: dict[str, object] | None # Message metadata + metadata: dict[str, Any] | None # Message metadata org: str | None # Organization reactions: list[MessageUpdatedPayloadMessageReactionsItem] | None # Message reactions rendering_mode: str | None # Rendering mode hint - replies: list[dict[str, object]] | None # Inline replies (if loaded) + replies: list[dict[str, Any]] | None # Inline replies (if loaded) replies_after_cursor: str | None # Cursor for replies pagination replies_before_cursor: str | None # Cursor for replies pagination reply_count: int | None # Number of replies - reply_to: dict[str, object] | None # Parent message object (if loaded) + reply_to: dict[str, Any] | None # Parent message object (if loaded) sandbox: str | None # Sandbox identifier team: str | None # Team thread: str | None # Parent thread @@ -291,14 +291,14 @@ class MessageUpdatedPayload(TypedDict, total=False): # Broadcast thread-level events (agent updates, read state, unread counts) class ThreadEventPayload(TypedDict, total=False): - payload: dict[str, object] | None + payload: dict[str, Any] | None thread_id: str | None type: str | None # Broadcast system-wide events class SystemEventPayload(TypedDict, total=False): - event: dict[str, object] | None + event: dict[str, Any] | None # Channel for real-time chat messaging. @@ -503,53 +503,49 @@ async def leave(self): await self._channel.leave() # Fork a sub-thread from an existing message - async def api_chat_fork_thread(self, payload: ApiChatForkThreadInput) -> dict[str, object]: + async def api_chat_fork_thread(self, payload: ApiChatForkThreadInput) -> dict[str, Any]: return await self._channel.push("api:chat:fork_thread", payload) # Mark a thread as read up to a given message async def api_chat_mark_thread_read( self, payload: ApiChatMarkThreadReadInput - ) -> dict[str, object]: + ) -> dict[str, Any]: return await self._channel.push("api:chat:mark_thread_read", payload) # List all messages in the current thread - async def api_chat_list_messages(self, payload: dict) -> dict[str, object]: + async def api_chat_list_messages(self, payload: dict) -> dict[str, Any]: return await self._channel.push("api:chat:list_messages", payload) # Load additional messages with cursor-based pagination async def api_chat_load_more_messages( self, payload: ApiChatLoadMoreMessagesInput - ) -> dict[str, object]: + ) -> dict[str, Any]: return await self._channel.push("api:chat:load_more_messages", payload) # Post a new message with optional uploads and reply-to - async def api_chat_post_message(self, payload: ApiChatPostMessageInput) -> dict[str, object]: + async def api_chat_post_message(self, payload: ApiChatPostMessageInput) -> dict[str, Any]: return await self._channel.push("api:chat:post_message", payload) # Post a simple text message async def api_chat_post_simple_message( self, payload: ApiChatPostSimpleMessageInput - ) -> dict[str, object]: + ) -> dict[str, Any]: return await self._channel.push("api:chat:post_simple_message", payload) # Edit an existing message's content - async def api_chat_edit_message(self, payload: ApiChatEditMessageInput) -> dict[str, object]: + async def api_chat_edit_message(self, payload: ApiChatEditMessageInput) -> dict[str, Any]: return await self._channel.push("api:chat:edit_message", payload) # Delete a message - async def api_chat_delete_message( - self, payload: ApiChatDeleteMessageInput - ) -> dict[str, object]: + async def api_chat_delete_message(self, payload: ApiChatDeleteMessageInput) -> dict[str, Any]: return await self._channel.push("api:chat:delete_message", payload) # Add an emoji reaction to a message - async def api_chat_add_reaction(self, payload: ApiChatAddReactionInput) -> dict[str, object]: + async def api_chat_add_reaction(self, payload: ApiChatAddReactionInput) -> dict[str, Any]: return await self._channel.push("api:chat:add_reaction", payload) # Remove an emoji reaction from a message - async def api_chat_remove_reaction( - self, payload: ApiChatRemoveReactionInput - ) -> dict[str, object]: + async def api_chat_remove_reaction(self, payload: ApiChatRemoveReactionInput) -> dict[str, Any]: return await self._channel.push("api:chat:remove_reaction", payload) # Broadcast when a new message is added to a thread diff --git a/src/archastro/platform/channels/api_object_channel.py b/src/archastro/platform/channels/api_object_channel.py index bc74e7b..7fb5bb7 100644 --- a/src/archastro/platform/channels/api_object_channel.py +++ b/src/archastro/platform/channels/api_object_channel.py @@ -1,25 +1,25 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 627be1ddbbf4 +# Content hash: 24dfaffabee5 from collections.abc import Callable -from typing import TYPE_CHECKING, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict if TYPE_CHECKING: from archastro.phx_channel.socket import Socket class UpdateFieldsInput(TypedDict): - fields: dict[str, object] + fields: dict[str, Any] class ObjectUpdatedPayload(TypedDict, total=False): - fields: dict[str, object] | None + fields: dict[str, Any] | None id: str | None class ObjectCreatedPayload(TypedDict, total=False): - fields: dict[str, object] | None + fields: dict[str, Any] | None id: str | None @@ -59,10 +59,10 @@ async def join_by_row_key( async def leave(self): await self._channel.leave() - async def update_fields(self, payload: UpdateFieldsInput) -> dict[str, object]: + async def update_fields(self, payload: UpdateFieldsInput) -> dict[str, Any]: return await self._channel.push("update_fields", payload) - async def save(self, payload: dict) -> dict[str, object]: + async def save(self, payload: dict) -> dict[str, Any]: return await self._channel.push("save", payload) def on_object_updated( diff --git a/src/archastro/platform/runtime/http_client.py b/src/archastro/platform/runtime/http_client.py index 3cd182e..4676e11 100644 --- a/src/archastro/platform/runtime/http_client.py +++ b/src/archastro/platform/runtime/http_client.py @@ -6,12 +6,22 @@ import asyncio import threading from collections.abc import Callable, Coroutine -from typing import Any +from functools import cache +from typing import Any, TypeVar, overload import httpx +from pydantic import TypeAdapter DEFAULT_API_PREFIX = "/api/v1" +T = TypeVar("T") + + +@cache +def _type_adapter(tp: Any) -> TypeAdapter[Any]: + """Cache adapters per response type; TypeAdapter construction is costly.""" + return TypeAdapter(tp) + class ApiError(Exception): """Structured API error with status code, error code, and message.""" @@ -164,6 +174,19 @@ async def _do_refresh() -> str: return response + @overload + async def request( + self, + path: str, + *, + method: str = "GET", + body: Any = None, + headers: dict[str, str] | None = None, + query: dict[str, Any] | None = None, + response_type: type[T], + ) -> T: ... + + @overload async def request( self, path: str, @@ -172,13 +195,40 @@ async def request( body: Any = None, headers: dict[str, str] | None = None, query: dict[str, Any] | None = None, - ) -> Any: + response_type: None = None, + ) -> Any: ... + + async def request( + self, + path: str, + *, + method: str = "GET", + body: Any = None, + headers: dict[str, str] | None = None, + query: dict[str, Any] | None = None, + response_type: type[T] | None = None, + ) -> T | Any: + """Issue a request and return the JSON body. + + With `response_type`, the body is validated into that type (a Pydantic + model or a generic alias like list[Model]); a bodyless 204 then raises + ValidationError, since the operation promised a typed body. Without + `response_type`, the raw parsed JSON is returned, or None on 204. + """ response = await self._execute(path, method=method, body=body, headers=headers, query=query) if response.status_code == 204: - return None - - return response.json() + if response_type is None: + return None + # A 204 on an operation that promises a typed body is a server + # contract violation; validating None fails loudly here instead + # of surfacing later as an AttributeError far from the call. + return _type_adapter(response_type).validate_python(None) + + raw = response.json() + if response_type is None: + return raw + return _type_adapter(response_type).validate_python(raw) async def request_raw( self, @@ -318,6 +368,7 @@ def _execute( return response + @overload def request( self, path: str, @@ -326,13 +377,52 @@ def request( body: Any = None, headers: dict[str, str] | None = None, query: dict[str, Any] | None = None, - ) -> Any: + response_type: type[T], + ) -> T: ... + + @overload + def request( + self, + path: str, + *, + method: str = "GET", + body: Any = None, + headers: dict[str, str] | None = None, + query: dict[str, Any] | None = None, + response_type: None = None, + ) -> Any: ... + + def request( + self, + path: str, + *, + method: str = "GET", + body: Any = None, + headers: dict[str, str] | None = None, + query: dict[str, Any] | None = None, + response_type: type[T] | None = None, + ) -> T | Any: + """Issue a request and return the JSON body. + + With `response_type`, the body is validated into that type (a Pydantic + model or a generic alias like list[Model]); a bodyless 204 then raises + ValidationError, since the operation promised a typed body. Without + `response_type`, the raw parsed JSON is returned, or None on 204. + """ response = self._execute(path, method=method, body=body, headers=headers, query=query) if response.status_code == 204: - return None - - return response.json() + if response_type is None: + return None + # A 204 on an operation that promises a typed body is a server + # contract violation; validating None fails loudly here instead + # of surfacing later as an AttributeError far from the call. + return _type_adapter(response_type).validate_python(None) + + raw = response.json() + if response_type is None: + return raw + return _type_adapter(response_type).validate_python(raw) def request_raw( self, diff --git a/src/archastro/platform/types/ai.py b/src/archastro/platform/types/ai.py index 6209491..d18a7a1 100644 --- a/src/archastro/platform/types/ai.py +++ b/src/archastro/platform/types/ai.py @@ -1,14 +1,15 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: d5d29e182e00 +# Content hash: 4cd9c1232a47 +from typing import Any from pydantic import BaseModel # Tool call from assistant message. class AIToolCall(BaseModel): - arguments: dict[str, object] # Tool arguments + arguments: dict[str, Any] # Tool arguments id: str # Tool call ID name: str # Tool/function name thought_signature: str | None = None # Optional thought signature @@ -19,16 +20,16 @@ class AIToolResult(BaseModel): content: str | None = None # Tool result content id: str # Tool call ID this result responds to name: str # Tool/function name - resolution: object | None = None # Structured tool resolution + resolution: Any | None = None # Structured tool resolution # AI chat message (OpenAI-compatible format). class AIMessage(BaseModel): content: str | None = None # Message text content - content_parts: list[dict[str, object]] | None = None # Multimodal content parts + content_parts: list[dict[str, Any]] | None = None # Multimodal content parts resume_token: str | None = None # Resume token for continuing conversations role: str # Message role (system, user, assistant, tool) - structured_output: object | None = None # Structured output data + structured_output: Any | None = None # Structured output data tool_calls: list[AIToolCall] | None = None # Tool calls from assistant tool_results: list[AIToolResult] | None = None # Tool results from tool execution @@ -38,7 +39,7 @@ class AICompletionResult(BaseModel): finish_reason: str # Completion stop reason message: AIMessage # Final assistant message messages: list[AIMessage] # Full message history - token_usage: dict[str, object] | None = None # Token usage keyed by model + token_usage: dict[str, Any] | None = None # Token usage keyed by model # Schema for an AI image generation result. @@ -52,5 +53,5 @@ class AIImageResult(BaseModel): model: str # Model used for generation revised_prompt: str | None = None # Provider-revised prompt size: str | None = None # Size string (e.g. 1024x1024) - usage: dict[str, object] | None = None # Token/usage information + usage: dict[str, Any] | None = None # Token/usage information width: int | None = None # Image width in pixels diff --git a/src/archastro/platform/types/automations.py b/src/archastro/platform/types/automations.py index bb47e32..4d14a78 100644 --- a/src/archastro/platform/types/automations.py +++ b/src/archastro/platform/types/automations.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 595972c8b4ba +# Content hash: cac5feb37120 from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -15,8 +16,8 @@ class AutomationRun(BaseModel): created_at: datetime | None = None # Created timestamp event_id: str | None = None # Triggering event ID id: str # Public ID (atr_...) - payload: dict[str, object] | None = None # Event payload - result: dict[str, object] | None = None # Workflow execution result (payload and output) + payload: dict[str, Any] | None = None # Event payload + result: dict[str, Any] | None = None # Workflow execution result (payload and output) status: str # Status: pending, running, completed, failed, cancelled team: str | None = None # Team if team-owned updated_at: datetime | None = None # Updated timestamp diff --git a/src/archastro/platform/types/common.py b/src/archastro/platform/types/common.py index c6994be..6c922af 100644 --- a/src/archastro/platform/types/common.py +++ b/src/archastro/platform/types/common.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2b0ec0cf1c54 +# Content hash: 2266e7138f2d from datetime import datetime +from typing import Any from pydantic import BaseModel, ConfigDict, Field @@ -40,9 +41,9 @@ class Acl(BaseModel): # API schema for an activity feed entry. class ActivityFeedEntry(BaseModel): - agent: str | dict[str, object] | None = None + agent: str | dict[str, Any] | None = None # Agent (public ID or expanded object when loaded) app: str | None = None # Application - attachments: list[dict[str, object]] | None = None # Entry attachments + attachments: list[dict[str, Any]] | None = None # Entry attachments automation_run: str | None = None # Automation run content: str | None = None # Longer explanation (markdown) correlation_id: str | None = None # Correlation ID for grouped entries @@ -50,7 +51,7 @@ class ActivityFeedEntry(BaseModel): id: str # Entry ID (afe_...) kind: str | None = None # Entry kind level: str | None = None # Severity level - metadata: dict[str, object] | None = None # Entry metadata + metadata: dict[str, Any] | None = None # Entry metadata org: str | None = None # Organization routine_run: str | None = None # Routine run sandbox: str | None = None # Sandbox identifier @@ -59,7 +60,7 @@ class ActivityFeedEntry(BaseModel): thread: str | None = None # Thread title: str | None = None # One-line summary updated_at: datetime | None = None # Last update timestamp - user: str | dict[str, object] | None = None + user: str | dict[str, Any] | None = None # User (public ID or expanded object when loaded) # Reply payload for the `list_entries` channel message on @@ -175,7 +176,7 @@ class Attachment(BaseModel): image_width: int | None = None # Preview image width (scraped_link type) media_type: str | None = None # Media type (media type) name: str | None = None # Media name (media type) - object: dict[str, object] | None = None # Embedded object (task, action types) + object: dict[str, Any] | None = None # Embedded object (task, action types) title: str | None = None # Title (scraped_link, artifact, task types) type: str # Attachment type: file, scraped_link, artifact, task, media, action url: str | None = None # URL to the resource (file, scraped_link, artifact, media types) @@ -187,7 +188,7 @@ class Attachment(BaseModel): # API schema for authentication token responses. class AuthTokens(BaseModel): expires_in: int # Token TTL in seconds - metadata: dict[str, object] | None = None # Additional metadata (e.g., onboarding_job_id) + metadata: dict[str, Any] | None = None # Additional metadata (e.g., onboarding_job_id) refresh_token: str # Refresh token token: str # Access token (JWT) token_type: str # Token type (Bearer) @@ -199,7 +200,7 @@ class BugReport(BaseModel): app: str | None = None # App client: str # Submitting client client_version: str # Client version - context: dict[str, object] | None = None # Client-shaped context blob + context: dict[str, Any] | None = None # Client-shaped context blob created_at: datetime | None = None # Creation timestamp description: str # Freeform report text id: str # Bug report ID @@ -217,7 +218,7 @@ class BuiltinTool(BaseModel): # A builtin tool catalog entry describing an available tool category. class BuiltinToolCatalogEntry(BaseModel): - config_schema: dict[str, object] | None = None # JSON schema for tool configuration + config_schema: dict[str, Any] | None = None # JSON schema for tool configuration description: str | None = None # Tool description instruction: str | None = None # Tool instruction key: str # Unique tool key @@ -244,7 +245,7 @@ class ChannelAck(BaseModel): # the full Reaction schema used in standalone reaction endpoints. # Maps to format_reactions_for_client/1 output. class MessageReaction(BaseModel): - payload: dict[str, object] | None = None # Reaction payload (e.g., {emoji: '👍'}) + payload: dict[str, Any] | None = None # Reaction payload (e.g., {emoji: '👍'}) type: str # Reaction type (e.g., emoji_reaction) user: str | None = None # User who added the reaction @@ -261,15 +262,15 @@ class Message(BaseModel): id: str # Message ID (msg_...) idempotency_key: str | None = None # Client-provided idempotency key legacy_agent: str | None = None # Legacy agent if sent by legacy chat agent - metadata: dict[str, object] | None = None # Message metadata + metadata: dict[str, Any] | None = None # Message metadata org: str | None = None # Organization reactions: list[MessageReaction] | None = None # Message reactions rendering_mode: str | None = None # Rendering mode hint - replies: list[dict[str, object]] | None = None # Inline replies (if loaded) + replies: list[dict[str, Any]] | None = None # Inline replies (if loaded) replies_after_cursor: str | None = None # Cursor for replies pagination replies_before_cursor: str | None = None # Cursor for replies pagination reply_count: int | None = None # Number of replies - reply_to: dict[str, object] | None = None # Parent message object (if loaded) + reply_to: dict[str, Any] | None = None # Parent message object (if loaded) sandbox: str | None = None # Sandbox identifier team: str | None = None # Team thread: str | None = None # Parent thread @@ -289,7 +290,7 @@ class ContextDocument(BaseModel): created_at: datetime | None = None # Created timestamp file: str | None = None # Backing file ID (`fil_...`) when file-backed; nil for inline id: str # Public ID (cdo_...) - metadata: dict[str, object] | None = None # Per-doc metadata + metadata: dict[str, Any] | None = None # Per-doc metadata source: str | None = None # Source ID (cs_...) team: str | None = None # Owning team title: str | None = None # Display title @@ -310,7 +311,7 @@ class ContextDocumentContent(BaseModel): end_line: int | None = None # Last line returned, exclusive (lines unit only) id: str # Document public ID (cdo_...) limit: int | None = None # Echoed limit when given - metadata: dict[str, object] | None = None # Per-doc metadata + metadata: dict[str, Any] | None = None # Per-doc metadata offset: int | None = None # Echoed offset when given start_byte: int | None = None # First byte returned (bytes unit only) start_line: int | None = None # First line returned (lines unit only) @@ -325,9 +326,9 @@ class ContextIngestion(BaseModel): agent: str | None = None # Agent completed_at: datetime | None = None # Completed timestamp created_at: datetime | None = None # Created timestamp - error: dict[str, object] | None = None # Error details (if failed) + error: dict[str, Any] | None = None # Error details (if failed) id: str # Public ID (cig_...) - metadata: dict[str, object] | None = None # Additional metadata + metadata: dict[str, Any] | None = None # Additional metadata source: str | None = None # Source ID started_at: datetime | None = None # Started timestamp status: str # Status (pending, running, awaiting_callback, succeeded, failed) @@ -339,7 +340,7 @@ class ContextIngestion(BaseModel): # API schema for a custom object. class CustomObject(BaseModel): created_at: datetime | None = None # Created timestamp - fields: dict[str, object] | None = None # Object field values + fields: dict[str, Any] | None = None # Object field values id: str # Public ID (cobj_...) org: str | None = None # Organization row_key: str | None = None # Row key @@ -366,7 +367,7 @@ class CustomObjectListResponse(BaseModel): # `ApiObjectChannel` echoes the object's public id and the fields that # were merged in. class CustomObjectUpdateFieldsResponse(BaseModel): - fields: dict[str, object] # Updated field values keyed by field name + fields: dict[str, Any] # Updated field values keyed by field name id: str # Custom object public ID (cob_...) @@ -409,14 +410,14 @@ class AgentHealthAction(BaseModel): last_verified_at: datetime | None = None # Last time the verifier ran (null until first run) last_verifier_message: str | None = None # Human-readable message from the last verifier run org: str | None = None # Organization - params: dict[str, object] | None = None + params: dict[str, Any] | None = None required: bool # Whether this action counts toward the blocking checklist progress bar sort_order: int # Render order; lower values come first within the same source source: str # Lifecycle stage that produced the row: setup or health status: str # Current status: pending, completed, skipped, or degraded title: str # Short human-readable title updated_at: datetime | None = None # Last update timestamp - verify_config: dict[str, object] | None = None + verify_config: dict[str, Any] | None = None # List response for agent_health_actions. @@ -427,14 +428,14 @@ class HealthActionListResponse(BaseModel): # API schema for an installation. class Installation(BaseModel): agent: str | None = None # Owning agent - config: dict[str, object] | None = None # Configuration + config: dict[str, Any] | None = None # Configuration created_at: datetime | None = None # Creation timestamp id: str # Installation ID (cin_...) kind: str | None = None # Installation kind lookup_key: str | None = None # Optional stable identifier shared_integration: str | None = None # Bound shared integration state: str | None = None # Installation state - status_payload: dict[str, object] | None = None # Status payload + status_payload: dict[str, Any] | None = None # Status payload updated_at: datetime | None = None # Last update timestamp @@ -442,7 +443,7 @@ class Installation(BaseModel): class InstallationKind(BaseModel): accepts_sources: bool | None = None # Whether this kind accepts sources category: str | None = None # Category - config_schema: dict[str, object] | None = None # JSON schema for configuration + config_schema: dict[str, Any] | None = None # JSON schema for configuration description: str | None = None # Description kind: str # Installation kind identifier label: str | None = None # Display label @@ -466,9 +467,9 @@ class InstallationSource(BaseModel): context_installation: str | None = None # Installation ID created_at: datetime | None = None # Creation timestamp id: str # Source ID (cso_...) - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata parent_source: str | None = None # Parent source ID - payload: dict[str, object] | None = None # Source payload + payload: dict[str, Any] | None = None # Source payload state: str | None = None # Source state team: str | None = None # Team ID thread: str | None = None # Thread ID @@ -526,10 +527,10 @@ class KnowledgeSource(BaseModel): context_installation: str | None = None # Associated installation created_at: datetime | None = None # Created timestamp id: str # Public ID (cso_...) - metadata: dict[str, object] | None = None # Additional metadata + metadata: dict[str, Any] | None = None # Additional metadata org: str | None = None # Owning organization parent_source: str | None = None # Parent source - payload: dict[str, object] | None = None # Type-specific configuration + payload: dict[str, Any] | None = None # Type-specific configuration sandbox: str | None = None # Owning sandbox state: str # State: active or paused team: str | None = None # Owning team @@ -661,7 +662,7 @@ class SolutionSummary(BaseModel): latest_solution: str | None = None latest_version: str | None = None lookup_key: str | None = None # Stored lookup_key - metadata: dict[str, object] | None = None # Arbitrary Solution metadata (e.g. category) + metadata: dict[str, Any] | None = None # Arbitrary Solution metadata (e.g. category) name: str | None = None # Display name (from Solution body) org: str | None = None # Organization owners: list[str] @@ -704,7 +705,7 @@ class Agent(BaseModel): identity: str | None = None # Identity prompt last_applied_template_config: str | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Agent name org: str | None = None # Organization org_name: str | None = None @@ -721,13 +722,13 @@ class Agent(BaseModel): class AgentComputer(BaseModel): agent: str | None = None # Owning agent app: str | None = None # Application ID - config: dict[str, object] | None = None # Configuration + config: dict[str, Any] | None = None # Configuration created_at: datetime | None = None # Creation timestamp error_message: str | None = None # Error message id: str # Computer ID (cmp_...) last_active_at: datetime | None = None # Last active timestamp lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Computer name region: str | None = None # Region sprite_url: str | None = None # Sprite URL @@ -758,7 +759,7 @@ class AgentCreateResponse(BaseModel): identity: str | None = None # Identity prompt installed_configs: list[InstalledConfigEntry] | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Agent name org: str | None = None # Organization originator: str | None = None # Free-form source or author of the agent @@ -791,18 +792,18 @@ class AgentEnvVarMaskedList(BaseModel): # needed for a fully self-contained re-deploy. class AgentExport(BaseModel): configs: list[Config] # Dependent config files - template: dict[str, object] # AgentTemplate config object + template: dict[str, Any] # AgentTemplate config object # Aggregate health profile for an agent. class AgentHealth(BaseModel): - activity: dict[str, object] # Last and next relevant activity timestamps + activity: dict[str, Any] # Last and next relevant activity timestamps agent: Agent # Agent this health profile describes checked_at: datetime # Timestamp when the profile was computed - checks: list[dict[str, object]] # Renderable health checks with key, label, status, and summary - counts: dict[str, object] # Counts grouped by dependency area and status + checks: list[dict[str, Any]] # Renderable health checks with key, label, status, and summary + counts: dict[str, Any] # Counts grouped by dependency area and status health_actions: list[AgentHealthAction] - recent: dict[str, object] # Recent activity and failure counts + recent: dict[str, Any] # Recent activity and failure counts score: int # Normalized health score from 0 to 100 status: str # Overall health status: ok, warning, or critical @@ -826,20 +827,20 @@ class AgentRoutine(BaseModel): config: str | None = None # Config ID created_at: datetime | None = None # Creation timestamp description: str | None = None # Routine description - event_config: dict[str, object] | None = None # Event configuration + event_config: dict[str, Any] | None = None # Event configuration event_type: str | None = None # Event type handler_type: str | None = None # Handler type id: str # Routine ID (arn_...) last_applied_template_config: str | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Routine name preset_config: PresetConfig | None = None # Preset configuration preset_name: str | None = None # Preset name schedule: str | None = None # Schedule expression script: str | None = None # Script content status: str | None = None # Routine status - steps: list[dict[str, object]] | None = None + steps: list[dict[str, Any]] | None = None trigger_context: str | None = None # Trigger context updated_at: datetime | None = None # Last update timestamp @@ -858,12 +859,12 @@ class AgentRoutineRun(BaseModel): duration_ms: int | None = None # Duration in milliseconds event_id: str | None = None # Event ID id: str # Run ID (arr_...) - metadata: dict[str, object] | None = None # Run metadata - payload: dict[str, object] | None = None # Event payload - result: dict[str, object] | None = None # Run result + metadata: dict[str, Any] | None = None # Run metadata + payload: dict[str, Any] | None = None # Event payload + result: dict[str, Any] | None = None # Run result routine: str | None = None # Routine status: str | None = None # Run status - structured_response: dict[str, object] | None = None + structured_response: dict[str, Any] | None = None updated_at: datetime | None = None # Last update timestamp worker: WorkerStatus | None = None @@ -885,7 +886,7 @@ class AgentSchedule(BaseModel): instructions: str | None = None # Task instructions last_run_at: datetime | None = None # Last execution time max_runs: int | None = None # Maximum runs (recurring only) - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata next_run_at: datetime | None = None # Next scheduled execution run_count: int | None = None # Number of times executed schedule_type: str | None = None # Schedule type (once or recurring) @@ -903,15 +904,15 @@ class AgentSession(BaseModel): created_at: datetime | None = None # Creation timestamp error: str | None = None # Error message if failed id: str # Agent session ID (ase_...) - inbox: list[dict[str, object]] | None = None # Inbox messages + inbox: list[dict[str, Any]] | None = None # Inbox messages instructions: str | None = None # Task description for the session is_system_session: bool | None = None # Whether this is a system-created session max_runs_per_turn: int | None = None # Max tool runs per turn max_tokens: int | None = None # Max tokens max_turns: int | None = None # Max turns - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Optional display name for the session - result: dict[str, object] | None = None # Session result + result: dict[str, Any] | None = None # Session result started_at: datetime | None = None # When the session started running status: str | None = None trajectory: str | None = None # Trajectory ID for the durable session transcript @@ -931,7 +932,7 @@ class AgentSkill(BaseModel): id: str # Agent skill ID (ask_...) instruction: str | None = None # Instruction override last_applied_template_config: str | None = None - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata status: str | None = None # Skill status updated_at: datetime | None = None # Last update timestamp @@ -948,7 +949,7 @@ class AgentTool(BaseModel): agent: str | None = None # Owning agent ID app: str | None = None # Application ID async_: bool | None = Field(default=None, alias="async") - builtin_tool_config: dict[str, object] | None = None # Builtin tool configuration + builtin_tool_config: dict[str, Any] | None = None # Builtin tool configuration builtin_tool_key: str | None = None # Builtin tool key config: str | None = None # Config ID created_at: datetime | None = None # Creation timestamp @@ -959,10 +960,10 @@ class AgentTool(BaseModel): kind: str | None = None # Tool kind last_applied_template_config: str | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Tool name name_prefix: str | None = None - parameters: dict[str, object] | None = None # Tool parameters + parameters: dict[str, Any] | None = None # Tool parameters parameters_config: str | None = None # Parameters config ID status: str | None = None # Tool status updated_at: datetime | None = None # Last update timestamp @@ -985,11 +986,11 @@ class AgentToolListResponse(BaseModel): # Child entries (tool/routine/skill/computer) never carry these annotations # their shapes keep plain `{field, old, new}`. class AgentUpgradeFieldChange(BaseModel): - baseline: object | None = None + baseline: Any | None = None field: str # Name of the field that changed locally_edited: bool | None = None - new: object | None = None - old: object | None = None + new: Any | None = None + old: Any | None = None # One child-resource change produced by an agent upgrade. @@ -1038,7 +1039,7 @@ class SolutionCategorySummary(BaseModel): key: str # Stable category key referenced by Solution.category_keys kind: str # Always "SolutionCategory" lookup_key: str | None = None # Stored lookup_key - metadata: dict[str, object] | None = None # Arbitrary category metadata + metadata: dict[str, Any] | None = None # Arbitrary category metadata name: str | None = None # Display name org: str | None = None # Organization owners: list[str] @@ -1183,7 +1184,7 @@ class SolutionTagSummary(BaseModel): key: str # Stable tag key referenced by Solution.tag_keys kind: str # Always "SolutionTag" lookup_key: str | None = None # Stored lookup_key - metadata: dict[str, object] | None = None # Arbitrary tag metadata + metadata: dict[str, Any] | None = None # Arbitrary tag metadata name: str | None = None # Display name org: str | None = None # Organization owners: list[str] diff --git a/src/archastro/platform/types/config.py b/src/archastro/platform/types/config.py index a83a1a0..71af38b 100644 --- a/src/archastro/platform/types/config.py +++ b/src/archastro/platform/types/config.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 832a591a60b0 +# Content hash: b3916e4a4ff0 from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -12,7 +13,7 @@ class ConfigVersion(BaseModel): change_description: str | None = None # Description of changes content_hash: str | None = None created_at: datetime | None = None # Creation timestamp - data: dict[str, object] | None = None # Additional structured data + data: dict[str, Any] | None = None # Additional structured data id: str # Config version ID (cfv_...) org: str | None = None # Organization sandbox: str | None = None # Sandbox @@ -72,6 +73,6 @@ class ConfigFacets(BaseModel): # Schema for a config kind's JSON schema and sample response. class ConfigKindSchema(BaseModel): - json_schema: dict[str, object] | None = None + json_schema: dict[str, Any] | None = None kind: str # The config kind name sample_yaml: str | None = None diff --git a/src/archastro/platform/types/notifications.py b/src/archastro/platform/types/notifications.py index 755c800..5c8f534 100644 --- a/src/archastro/platform/types/notifications.py +++ b/src/archastro/platform/types/notifications.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 84031cff53fe +# Content hash: 7beed6fceff3 from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -13,7 +14,7 @@ class Notification(BaseModel): created_at: datetime # When the notification was sent id: str # Notification ID (ntf_...) read_at: datetime | None = None # When the recipient marked this read (nil if unread) - rendered: dict[str, object] + rendered: dict[str, Any] status: str # unread | read | archived type: str # Notification type (e.g., app_info, custom:deploy_complete) diff --git a/src/archastro/platform/types/teams.py b/src/archastro/platform/types/teams.py index 8bf05b8..34f6027 100644 --- a/src/archastro/platform/types/teams.py +++ b/src/archastro/platform/types/teams.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9d1cda1f15c1 +# Content hash: 194f11a1c9f1 from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -15,12 +16,12 @@ class Team(BaseModel): acl: Acl | None = None app: str | None = None # Application - badges: dict[str, object] | None = None # Badge counts by category + badges: dict[str, Any] | None = None # Badge counts by category created_at: datetime | None = None # Creation timestamp description: str | None = None # Team description id: str # Team ID membership_status: str | None = None - metadata: dict[str, object] | None = None # Team metadata + metadata: dict[str, Any] | None = None # Team metadata name: str | None = None # Team name org: str | None = None # Organization sandbox: str | None = None # Sandbox @@ -39,11 +40,11 @@ class TeamMembership(BaseModel): created_at: datetime | None = None # Creation timestamp id: str # Membership ID joined_at: datetime | None = None # Join timestamp - metadata: dict[str, object] | None = None # Membership metadata + metadata: dict[str, Any] | None = None # Membership metadata name: str | None = None # Member name profile_picture: ImageSource | None = None # Profile picture role: str | None = None # Role in team - team: dict[str, object] | None = None # Team object (when loaded) + team: dict[str, Any] | None = None # Team object (when loaded) type: str | None = None # Member type (user, agent, unknown) updated_at: datetime | None = None # Last update timestamp user: User | None = None # User object (when loaded) diff --git a/src/archastro/platform/types/threads.py b/src/archastro/platform/types/threads.py index b4ffc02..4aa28ce 100644 --- a/src/archastro/platform/types/threads.py +++ b/src/archastro/platform/types/threads.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 6a9149ada854 +# Content hash: c677a36e6093 from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -29,7 +30,7 @@ class Thread(BaseModel): is_unlisted: bool | None = None # Whether this thread is unlisted key: str | None = None # Thread key last_activity: datetime | None = None # Last activity timestamp - metadata: dict[str, object] | None = None # Thread metadata + metadata: dict[str, Any] | None = None # Thread metadata muted: bool | None = None # Whether notifications are muted for this thread org: str | None = None # Organization parent_message: Message | None = None # Parent message object @@ -41,7 +42,7 @@ class Thread(BaseModel): sandbox: str | None = None # Sandbox identifier settings: ThreadSettings | None = None # Thread settings slug: str | None = None # Thread slug - sub_threads: list[dict[str, object]] | None = None # Sub-threads + sub_threads: list[dict[str, Any]] | None = None # Sub-threads team: str | None = None # Owning team title: str | None = None # Thread title ttl: int | None = None # Time-to-live in seconds diff --git a/src/archastro/platform/types/users.py b/src/archastro/platform/types/users.py index 43b3f98..8266273 100644 --- a/src/archastro/platform/types/users.py +++ b/src/archastro/platform/types/users.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: c5464bec4976 +# Content hash: 8274d2ae257f from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -15,7 +16,7 @@ class User(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -28,6 +29,6 @@ class UserInvite(BaseModel): created_at: datetime | None = None # Creation timestamp id: str # Invite ID (uin_...) key: str | None = None # Invite key - metadata: dict[str, object] | None = None # Invite metadata + metadata: dict[str, Any] | None = None # Invite metadata thread: str | None = None # Thread user: InviteCreator | None = None # Invite creator diff --git a/src/archastro/platform/v1/resources/activity_feed.py b/src/archastro/platform/v1/resources/activity_feed.py index 3c05b4f..3232a3f 100644 --- a/src/archastro/platform/v1/resources/activity_feed.py +++ b/src/archastro/platform/v1/resources/activity_feed.py @@ -1,10 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 18554f0c6d62 +# Content hash: e038647f3348 from __future__ import annotations from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -12,9 +13,9 @@ class ActivityFeedListResponseDataItem(BaseModel): - agent: str | dict[str, object] | None = None + agent: str | dict[str, Any] | None = None # Agent (public ID or expanded object when loaded) app: str | None = None # Application - attachments: list[dict[str, object]] | None = None # Entry attachments + attachments: list[dict[str, Any]] | None = None # Entry attachments automation_run: str | None = None # Automation run content: str | None = None # Longer explanation (markdown) correlation_id: str | None = None # Correlation ID for grouped entries @@ -22,7 +23,7 @@ class ActivityFeedListResponseDataItem(BaseModel): id: str # Entry ID (afe_...) kind: str | None = None # Entry kind level: str | None = None # Severity level - metadata: dict[str, object] | None = None # Entry metadata + metadata: dict[str, Any] | None = None # Entry metadata org: str | None = None # Organization routine_run: str | None = None # Routine run sandbox: str | None = None # Sandbox identifier @@ -31,7 +32,7 @@ class ActivityFeedListResponseDataItem(BaseModel): thread: str | None = None # Thread title: str | None = None # One-line summary updated_at: datetime | None = None # Last update timestamp - user: str | dict[str, object] | None = None + user: str | dict[str, Any] | None = None # User (public ID or expanded object when loaded) class ActivityFeedListResponse(BaseModel): @@ -80,7 +81,11 @@ async def list( query["beforeCursor"] = before_cursor if after_cursor is not None: query["afterCursor"] = after_cursor - return await self._http.request("/api/v1/activity_feed", query=query) + return await self._http.request( + "/api/v1/activity_feed", + query=query, + response_type=ActivityFeedListResponse, + ) class ActivityFeedResource: @@ -122,4 +127,8 @@ def list( query["beforeCursor"] = before_cursor if after_cursor is not None: query["afterCursor"] = after_cursor - return self._http.request("/api/v1/activity_feed", query=query) + return self._http.request( + "/api/v1/activity_feed", + query=query, + response_type=ActivityFeedListResponse, + ) diff --git a/src/archastro/platform/v1/resources/agent_computers.py b/src/archastro/platform/v1/resources/agent_computers.py index 50757d4..515149b 100644 --- a/src/archastro/platform/v1/resources/agent_computers.py +++ b/src/archastro/platform/v1/resources/agent_computers.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4687ea54d65a +# Content hash: 352bb0eac87f from __future__ import annotations @@ -23,19 +23,24 @@ async def delete(self, computer: str) -> None: await self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE") async def get(self, computer: str) -> AgentComputer: - return await self._http.request(f"/api/v1/agent_computers/{computer}") + return await self._http.request( + f"/api/v1/agent_computers/{computer}", + response_type=AgentComputer, + ) async def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult: return await self._http.request( f"/api/v1/agent_computers/{computer}/exec", method="POST", body=input, + response_type=ComputerExecResult, ) async def refresh(self, computer: str) -> AgentComputer: return await self._http.request( f"/api/v1/agent_computers/{computer}/refresh", method="POST", + response_type=AgentComputer, ) @@ -47,14 +52,22 @@ def delete(self, computer: str) -> None: self._http.request(f"/api/v1/agent_computers/{computer}", method="DELETE") def get(self, computer: str) -> AgentComputer: - return self._http.request(f"/api/v1/agent_computers/{computer}") + return self._http.request( + f"/api/v1/agent_computers/{computer}", + response_type=AgentComputer, + ) def exec(self, computer: str, input: AgentComputerExecInput) -> ComputerExecResult: return self._http.request( f"/api/v1/agent_computers/{computer}/exec", method="POST", body=input, + response_type=ComputerExecResult, ) def refresh(self, computer: str) -> AgentComputer: - return self._http.request(f"/api/v1/agent_computers/{computer}/refresh", method="POST") + return self._http.request( + f"/api/v1/agent_computers/{computer}/refresh", + method="POST", + response_type=AgentComputer, + ) diff --git a/src/archastro/platform/v1/resources/agent_env_vars.py b/src/archastro/platform/v1/resources/agent_env_vars.py index d01d27b..9a8722e 100644 --- a/src/archastro/platform/v1/resources/agent_env_vars.py +++ b/src/archastro/platform/v1/resources/agent_env_vars.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a0981cda95c0 +# Content hash: a3ecaf68eff4 from __future__ import annotations @@ -23,13 +23,17 @@ async def delete(self, env_var: str) -> None: await self._http.request(f"/api/v1/agent_env_vars/{env_var}", method="DELETE") async def get(self, env_var: str) -> AgentEnvVarMasked: - return await self._http.request(f"/api/v1/agent_env_vars/{env_var}") + return await self._http.request( + f"/api/v1/agent_env_vars/{env_var}", + response_type=AgentEnvVarMasked, + ) async def update(self, env_var: str, input: AgentEnvVarUpdateInput) -> AgentEnvVarMasked: return await self._http.request( f"/api/v1/agent_env_vars/{env_var}", method="PATCH", body=input, + response_type=AgentEnvVarMasked, ) @@ -41,7 +45,15 @@ def delete(self, env_var: str) -> None: self._http.request(f"/api/v1/agent_env_vars/{env_var}", method="DELETE") def get(self, env_var: str) -> AgentEnvVarMasked: - return self._http.request(f"/api/v1/agent_env_vars/{env_var}") + return self._http.request( + f"/api/v1/agent_env_vars/{env_var}", + response_type=AgentEnvVarMasked, + ) def update(self, env_var: str, input: AgentEnvVarUpdateInput) -> AgentEnvVarMasked: - return self._http.request(f"/api/v1/agent_env_vars/{env_var}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/agent_env_vars/{env_var}", + method="PATCH", + body=input, + response_type=AgentEnvVarMasked, + ) diff --git a/src/archastro/platform/v1/resources/agent_health_actions.py b/src/archastro/platform/v1/resources/agent_health_actions.py index b784deb..d95ad3f 100644 --- a/src/archastro/platform/v1/resources/agent_health_actions.py +++ b/src/archastro/platform/v1/resources/agent_health_actions.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 290b7e74e240 +# Content hash: 647c16e98051 from __future__ import annotations @@ -13,12 +13,16 @@ def __init__(self, http: HttpClient): self._http = http async def get(self, health_action: str) -> AgentHealthAction: - return await self._http.request(f"/api/v1/agent_health_actions/{health_action}") + return await self._http.request( + f"/api/v1/agent_health_actions/{health_action}", + response_type=AgentHealthAction, + ) async def verify(self, health_action: str) -> AgentHealthAction: return await self._http.request( f"/api/v1/agent_health_actions/{health_action}/verify", method="POST", + response_type=AgentHealthAction, ) @@ -27,10 +31,14 @@ def __init__(self, http: SyncHttpClient): self._http = http def get(self, health_action: str) -> AgentHealthAction: - return self._http.request(f"/api/v1/agent_health_actions/{health_action}") + return self._http.request( + f"/api/v1/agent_health_actions/{health_action}", + response_type=AgentHealthAction, + ) def verify(self, health_action: str) -> AgentHealthAction: return self._http.request( f"/api/v1/agent_health_actions/{health_action}/verify", method="POST", + response_type=AgentHealthAction, ) diff --git a/src/archastro/platform/v1/resources/agent_installations.py b/src/archastro/platform/v1/resources/agent_installations.py index ca6cdfd..3d4b083 100644 --- a/src/archastro/platform/v1/resources/agent_installations.py +++ b/src/archastro/platform/v1/resources/agent_installations.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: e49fa89f30d2 +# Content hash: 5e2961deb854 from __future__ import annotations -from typing import TypedDict +from typing import Any, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import ( @@ -16,7 +16,7 @@ class AgentInstallationInstallationSourceCreateInput(TypedDict): - payload: dict[str, object] # Source payload + payload: dict[str, Any] # Source payload type: str # Source type (e.g. file/document, web/link) @@ -31,6 +31,7 @@ def __init__(self, http: HttpClient): async def list(self, installation: str) -> InstallationSourceListResponse: return await self._http.request( f"/api/v1/agent_installations/{installation}/installation_sources", + response_type=InstallationSourceListResponse, ) async def create( @@ -40,6 +41,7 @@ async def create( f"/api/v1/agent_installations/{installation}/installation_sources", method="POST", body=input, + response_type=InstallationSource, ) @@ -52,24 +54,33 @@ async def list(self, *, agent: str | None = None) -> InstallationListResponse: query: dict[str, object] = {} if agent is not None: query["agent"] = agent - return await self._http.request("/api/v1/agent_installations", query=query) + return await self._http.request( + "/api/v1/agent_installations", + query=query, + response_type=InstallationListResponse, + ) async def delete(self, installation: str) -> None: await self._http.request(f"/api/v1/agent_installations/{installation}", method="DELETE") async def get(self, installation: str) -> Installation: - return await self._http.request(f"/api/v1/agent_installations/{installation}") + return await self._http.request( + f"/api/v1/agent_installations/{installation}", + response_type=Installation, + ) async def activate(self, installation: str) -> Installation: return await self._http.request( f"/api/v1/agent_installations/{installation}/activate", method="POST", + response_type=Installation, ) async def pause(self, installation: str) -> Installation: return await self._http.request( f"/api/v1/agent_installations/{installation}/pause", method="POST", + response_type=Installation, ) async def suspend( @@ -79,6 +90,7 @@ async def suspend( f"/api/v1/agent_installations/{installation}/suspend", method="POST", body=input, + response_type=Installation, ) @@ -89,6 +101,7 @@ def __init__(self, http: SyncHttpClient): def list(self, installation: str) -> InstallationSourceListResponse: return self._http.request( f"/api/v1/agent_installations/{installation}/installation_sources", + response_type=InstallationSourceListResponse, ) def create( @@ -98,6 +111,7 @@ def create( f"/api/v1/agent_installations/{installation}/installation_sources", method="POST", body=input, + response_type=InstallationSource, ) @@ -110,24 +124,33 @@ def list(self, *, agent: str | None = None) -> InstallationListResponse: query: dict[str, object] = {} if agent is not None: query["agent"] = agent - return self._http.request("/api/v1/agent_installations", query=query) + return self._http.request( + "/api/v1/agent_installations", + query=query, + response_type=InstallationListResponse, + ) def delete(self, installation: str) -> None: self._http.request(f"/api/v1/agent_installations/{installation}", method="DELETE") def get(self, installation: str) -> Installation: - return self._http.request(f"/api/v1/agent_installations/{installation}") + return self._http.request( + f"/api/v1/agent_installations/{installation}", + response_type=Installation, + ) def activate(self, installation: str) -> Installation: return self._http.request( f"/api/v1/agent_installations/{installation}/activate", method="POST", + response_type=Installation, ) def pause(self, installation: str) -> Installation: return self._http.request( f"/api/v1/agent_installations/{installation}/pause", method="POST", + response_type=Installation, ) def suspend(self, installation: str, input: AgentInstallationSuspendInput) -> Installation: @@ -135,4 +158,5 @@ def suspend(self, installation: str, input: AgentInstallationSuspendInput) -> In f"/api/v1/agent_installations/{installation}/suspend", method="POST", body=input, + response_type=Installation, ) diff --git a/src/archastro/platform/v1/resources/agent_routine_runs.py b/src/archastro/platform/v1/resources/agent_routine_runs.py index 74c0a6a..d7ead5a 100644 --- a/src/archastro/platform/v1/resources/agent_routine_runs.py +++ b/src/archastro/platform/v1/resources/agent_routine_runs.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 8e9ef1529914 +# Content hash: 5a02291249e3 from __future__ import annotations @@ -32,7 +32,11 @@ async def list( query["beforeCursor"] = before_cursor if after_cursor is not None: query["afterCursor"] = after_cursor - return await self._http.request("/api/v1/agent_routine_runs", query=query) + return await self._http.request( + "/api/v1/agent_routine_runs", + query=query, + response_type=AgentRoutineRunListResponse, + ) class AgentRoutineRunResource: @@ -59,4 +63,8 @@ def list( query["beforeCursor"] = before_cursor if after_cursor is not None: query["afterCursor"] = after_cursor - return self._http.request("/api/v1/agent_routine_runs", query=query) + return self._http.request( + "/api/v1/agent_routine_runs", + query=query, + response_type=AgentRoutineRunListResponse, + ) diff --git a/src/archastro/platform/v1/resources/agent_routines.py b/src/archastro/platform/v1/resources/agent_routines.py index 0e3f095..da8c0b0 100644 --- a/src/archastro/platform/v1/resources/agent_routines.py +++ b/src/archastro/platform/v1/resources/agent_routines.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: c8b8246cd761 +# Content hash: 461b63659a21 from __future__ import annotations -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import ( @@ -66,7 +66,7 @@ class AgentRoutineUpdateInputStepsItemPresetConfig(TypedDict, total=False): class AgentRoutineUpdateInputStepsItem(TypedDict, total=False): config: str | None handler_type: Required[str] # Handler type for this step: preset, script, or workflow_graph - inputs: dict[str, object] | None + inputs: dict[str, Any] | None name: str | None # Optional step label. Must be unique within the chain if set. on_error: str | None # Error policy: halt (default), continue, or retry. output_key: str | None @@ -79,11 +79,11 @@ class AgentRoutineUpdateInput(TypedDict, total=False): acl: AgentRoutineUpdateInputAcl | None # Access control list config: str | None # Config ID description: str | None # Description - event_config: dict[str, object] | None + event_config: dict[str, Any] | None event_type: str | None # Event type (deprecated, use event_config) handler_type: str | None # Handler type: workflow_graph, script, preset, or chain lookup_key: str | None # Lookup key - metadata: dict[str, object] | None # Metadata + metadata: dict[str, Any] | None # Metadata name: str | None # Routine name preset_config: AgentRoutineUpdateInputPresetConfig | None # Preset config preset_name: str | None # Preset name @@ -97,7 +97,7 @@ class AgentRoutineUpdateInput(TypedDict, total=False): class AgentRoutineInvokeInput(TypedDict, total=False): idempotency_key: str | None # Idempotency key to deduplicate invocations message: Required[str] # The message to send - metadata: dict[str, object] | None # Optional per-call metadata + metadata: dict[str, Any] | None # Optional per-call metadata session_key: str | None # Session key (required when session_scope is per_key) thread_id: str | None # Optional thread to post preset output into user: str | None # User ID (S2S/developer only; client uses viewer) @@ -108,7 +108,10 @@ def __init__(self, http: HttpClient): self._http = http async def get(self, run: str) -> AgentRoutineRun: - return await self._http.request(f"/api/v1/agent_routines/runs/{run}") + return await self._http.request( + f"/api/v1/agent_routines/runs/{run}", + response_type=AgentRoutineRun, + ) class AsyncAgentRoutineResource: @@ -124,36 +127,56 @@ async def list( query["agent"] = agent if event_type is not None: query["eventType"] = event_type - return await self._http.request("/api/v1/agent_routines", query=query) + return await self._http.request( + "/api/v1/agent_routines", + query=query, + response_type=AgentRoutineListResponse, + ) async def presets(self) -> list[RoutinePreset]: - return await self._http.request("/api/v1/agent_routines/presets") + return await self._http.request( + "/api/v1/agent_routines/presets", + response_type=list[RoutinePreset], + ) async def delete(self, routine: str) -> None: await self._http.request(f"/api/v1/agent_routines/{routine}", method="DELETE") async def get(self, routine: str) -> AgentRoutine: - return await self._http.request(f"/api/v1/agent_routines/{routine}") + return await self._http.request( + f"/api/v1/agent_routines/{routine}", + response_type=AgentRoutine, + ) async def update(self, routine: str, input: AgentRoutineUpdateInput) -> AgentRoutine: return await self._http.request( f"/api/v1/agent_routines/{routine}", method="PATCH", body=input, + response_type=AgentRoutine, ) async def activate(self, routine: str) -> AgentRoutine: - return await self._http.request(f"/api/v1/agent_routines/{routine}/activate", method="POST") + return await self._http.request( + f"/api/v1/agent_routines/{routine}/activate", + method="POST", + response_type=AgentRoutine, + ) async def invoke(self, routine: str, input: AgentRoutineInvokeInput) -> AgentRoutineRun: return await self._http.request( f"/api/v1/agent_routines/{routine}/invoke", method="POST", body=input, + response_type=AgentRoutineRun, ) async def pause(self, routine: str) -> AgentRoutine: - return await self._http.request(f"/api/v1/agent_routines/{routine}/pause", method="POST") + return await self._http.request( + f"/api/v1/agent_routines/{routine}/pause", + method="POST", + response_type=AgentRoutine, + ) async def runs( self, @@ -173,7 +196,11 @@ async def runs( query["beforeCursor"] = before_cursor if after_cursor is not None: query["afterCursor"] = after_cursor - return await self._http.request(f"/api/v1/agent_routines/{routine}/runs", query=query) + return await self._http.request( + f"/api/v1/agent_routines/{routine}/runs", + query=query, + response_type=AgentRoutineRunListResponse, + ) class AgentRoutineRunResource: @@ -181,7 +208,10 @@ def __init__(self, http: SyncHttpClient): self._http = http def get(self, run: str) -> AgentRoutineRun: - return self._http.request(f"/api/v1/agent_routines/runs/{run}") + return self._http.request( + f"/api/v1/agent_routines/runs/{run}", + response_type=AgentRoutineRun, + ) class AgentRoutineResource: @@ -197,32 +227,53 @@ def list( query["agent"] = agent if event_type is not None: query["eventType"] = event_type - return self._http.request("/api/v1/agent_routines", query=query) + return self._http.request( + "/api/v1/agent_routines", + query=query, + response_type=AgentRoutineListResponse, + ) def presets(self) -> list[RoutinePreset]: - return self._http.request("/api/v1/agent_routines/presets") + return self._http.request( + "/api/v1/agent_routines/presets", + response_type=list[RoutinePreset], + ) def delete(self, routine: str) -> None: self._http.request(f"/api/v1/agent_routines/{routine}", method="DELETE") def get(self, routine: str) -> AgentRoutine: - return self._http.request(f"/api/v1/agent_routines/{routine}") + return self._http.request(f"/api/v1/agent_routines/{routine}", response_type=AgentRoutine) def update(self, routine: str, input: AgentRoutineUpdateInput) -> AgentRoutine: - return self._http.request(f"/api/v1/agent_routines/{routine}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/agent_routines/{routine}", + method="PATCH", + body=input, + response_type=AgentRoutine, + ) def activate(self, routine: str) -> AgentRoutine: - return self._http.request(f"/api/v1/agent_routines/{routine}/activate", method="POST") + return self._http.request( + f"/api/v1/agent_routines/{routine}/activate", + method="POST", + response_type=AgentRoutine, + ) def invoke(self, routine: str, input: AgentRoutineInvokeInput) -> AgentRoutineRun: return self._http.request( f"/api/v1/agent_routines/{routine}/invoke", method="POST", body=input, + response_type=AgentRoutineRun, ) def pause(self, routine: str) -> AgentRoutine: - return self._http.request(f"/api/v1/agent_routines/{routine}/pause", method="POST") + return self._http.request( + f"/api/v1/agent_routines/{routine}/pause", + method="POST", + response_type=AgentRoutine, + ) def runs( self, @@ -242,4 +293,8 @@ def runs( query["beforeCursor"] = before_cursor if after_cursor is not None: query["afterCursor"] = after_cursor - return self._http.request(f"/api/v1/agent_routines/{routine}/runs", query=query) + return self._http.request( + f"/api/v1/agent_routines/{routine}/runs", + query=query, + response_type=AgentRoutineRunListResponse, + ) diff --git a/src/archastro/platform/v1/resources/agent_sessions.py b/src/archastro/platform/v1/resources/agent_sessions.py index fb8f55a..ffc7348 100644 --- a/src/archastro/platform/v1/resources/agent_sessions.py +++ b/src/archastro/platform/v1/resources/agent_sessions.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: d5c88060061f +# Content hash: c6e204d118b9 from __future__ import annotations -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import AgentSession, AgentSessionListResponse @@ -16,7 +16,7 @@ class AgentSessionCreateInput(TypedDict, total=False): max_runs_per_turn: int | None # Max tool runs per turn (default 25) max_tokens: int | None # Max tokens (default 20000) max_turns: int | None # Max turns (default 100) - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata name: str | None # Optional display name for the session team: str | None # Optional team context thread: str | None # Optional thread context @@ -24,12 +24,12 @@ class AgentSessionCreateInput(TypedDict, total=False): class AgentSessionUpdateInput(TypedDict, total=False): - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata class AgentSessionMessageInput(TypedDict, total=False): content: Required[str] # Message content - metadata: dict[str, object] | None # Message metadata + metadata: dict[str, Any] | None # Message metadata role: str | None # Message role (default: user) @@ -57,28 +57,42 @@ async def list( query["excludeSystem"] = exclude_system if limit is not None: query["limit"] = limit - return await self._http.request("/api/v1/agent_sessions", query=query) + return await self._http.request( + "/api/v1/agent_sessions", + query=query, + response_type=AgentSessionListResponse, + ) async def create(self, input: AgentSessionCreateInput) -> AgentSession: - return await self._http.request("/api/v1/agent_sessions", method="POST", body=input) + return await self._http.request( + "/api/v1/agent_sessions", + method="POST", + body=input, + response_type=AgentSession, + ) async def delete(self, agent_session: str) -> None: await self._http.request(f"/api/v1/agent_sessions/{agent_session}", method="DELETE") async def get(self, agent_session: str) -> AgentSession: - return await self._http.request(f"/api/v1/agent_sessions/{agent_session}") + return await self._http.request( + f"/api/v1/agent_sessions/{agent_session}", + response_type=AgentSession, + ) async def update(self, agent_session: str, input: AgentSessionUpdateInput) -> AgentSession: return await self._http.request( f"/api/v1/agent_sessions/{agent_session}", method="PATCH", body=input, + response_type=AgentSession, ) async def cancel(self, agent_session: str) -> AgentSession: return await self._http.request( f"/api/v1/agent_sessions/{agent_session}/cancel", method="POST", + response_type=AgentSession, ) async def message(self, agent_session: str, input: AgentSessionMessageInput) -> AgentSession: @@ -86,6 +100,7 @@ async def message(self, agent_session: str, input: AgentSessionMessageInput) -> f"/api/v1/agent_sessions/{agent_session}/message", method="POST", body=input, + response_type=AgentSession, ) @@ -113,30 +128,48 @@ def list( query["excludeSystem"] = exclude_system if limit is not None: query["limit"] = limit - return self._http.request("/api/v1/agent_sessions", query=query) + return self._http.request( + "/api/v1/agent_sessions", + query=query, + response_type=AgentSessionListResponse, + ) def create(self, input: AgentSessionCreateInput) -> AgentSession: - return self._http.request("/api/v1/agent_sessions", method="POST", body=input) + return self._http.request( + "/api/v1/agent_sessions", + method="POST", + body=input, + response_type=AgentSession, + ) def delete(self, agent_session: str) -> None: self._http.request(f"/api/v1/agent_sessions/{agent_session}", method="DELETE") def get(self, agent_session: str) -> AgentSession: - return self._http.request(f"/api/v1/agent_sessions/{agent_session}") + return self._http.request( + f"/api/v1/agent_sessions/{agent_session}", + response_type=AgentSession, + ) def update(self, agent_session: str, input: AgentSessionUpdateInput) -> AgentSession: return self._http.request( f"/api/v1/agent_sessions/{agent_session}", method="PATCH", body=input, + response_type=AgentSession, ) def cancel(self, agent_session: str) -> AgentSession: - return self._http.request(f"/api/v1/agent_sessions/{agent_session}/cancel", method="POST") + return self._http.request( + f"/api/v1/agent_sessions/{agent_session}/cancel", + method="POST", + response_type=AgentSession, + ) def message(self, agent_session: str, input: AgentSessionMessageInput) -> AgentSession: return self._http.request( f"/api/v1/agent_sessions/{agent_session}/message", method="POST", body=input, + response_type=AgentSession, ) diff --git a/src/archastro/platform/v1/resources/agent_skills.py b/src/archastro/platform/v1/resources/agent_skills.py index 3b7445d..95884ed 100644 --- a/src/archastro/platform/v1/resources/agent_skills.py +++ b/src/archastro/platform/v1/resources/agent_skills.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 0931502bf4de +# Content hash: 606a626625ec from __future__ import annotations -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import AgentSkill, AgentSkillList @@ -14,12 +14,12 @@ class AgentSkillCreateInput(TypedDict, total=False): agent: Required[str] # Agent ID config: Required[str] # Skill config ID instruction: str | None # Optional instruction override - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata class AgentSkillUpdateInput(TypedDict, total=False): instruction: str | None # Instruction override - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata template: str | None @@ -31,34 +31,49 @@ async def list(self, *, agent: list[str] | None = None) -> AgentSkillList: query: dict[str, object] = {} if agent is not None: query["agent"] = agent - return await self._http.request("/api/v1/agent_skills", query=query) + return await self._http.request( + "/api/v1/agent_skills", + query=query, + response_type=AgentSkillList, + ) async def create(self, input: AgentSkillCreateInput) -> AgentSkill: - return await self._http.request("/api/v1/agent_skills", method="POST", body=input) + return await self._http.request( + "/api/v1/agent_skills", + method="POST", + body=input, + response_type=AgentSkill, + ) async def delete(self, agent_skill: str) -> None: await self._http.request(f"/api/v1/agent_skills/{agent_skill}", method="DELETE") async def get(self, agent_skill: str) -> AgentSkill: - return await self._http.request(f"/api/v1/agent_skills/{agent_skill}") + return await self._http.request( + f"/api/v1/agent_skills/{agent_skill}", + response_type=AgentSkill, + ) async def update(self, agent_skill: str, input: AgentSkillUpdateInput) -> AgentSkill: return await self._http.request( f"/api/v1/agent_skills/{agent_skill}", method="PATCH", body=input, + response_type=AgentSkill, ) async def activate(self, agent_skill: str) -> AgentSkill: return await self._http.request( f"/api/v1/agent_skills/{agent_skill}/activate", method="POST", + response_type=AgentSkill, ) async def deactivate(self, agent_skill: str) -> AgentSkill: return await self._http.request( f"/api/v1/agent_skills/{agent_skill}/deactivate", method="POST", + response_type=AgentSkill, ) @@ -70,22 +85,44 @@ def list(self, *, agent: list[str] | None = None) -> AgentSkillList: query: dict[str, object] = {} if agent is not None: query["agent"] = agent - return self._http.request("/api/v1/agent_skills", query=query) + return self._http.request( + "/api/v1/agent_skills", + query=query, + response_type=AgentSkillList, + ) def create(self, input: AgentSkillCreateInput) -> AgentSkill: - return self._http.request("/api/v1/agent_skills", method="POST", body=input) + return self._http.request( + "/api/v1/agent_skills", + method="POST", + body=input, + response_type=AgentSkill, + ) def delete(self, agent_skill: str) -> None: self._http.request(f"/api/v1/agent_skills/{agent_skill}", method="DELETE") def get(self, agent_skill: str) -> AgentSkill: - return self._http.request(f"/api/v1/agent_skills/{agent_skill}") + return self._http.request(f"/api/v1/agent_skills/{agent_skill}", response_type=AgentSkill) def update(self, agent_skill: str, input: AgentSkillUpdateInput) -> AgentSkill: - return self._http.request(f"/api/v1/agent_skills/{agent_skill}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/agent_skills/{agent_skill}", + method="PATCH", + body=input, + response_type=AgentSkill, + ) def activate(self, agent_skill: str) -> AgentSkill: - return self._http.request(f"/api/v1/agent_skills/{agent_skill}/activate", method="POST") + return self._http.request( + f"/api/v1/agent_skills/{agent_skill}/activate", + method="POST", + response_type=AgentSkill, + ) def deactivate(self, agent_skill: str) -> AgentSkill: - return self._http.request(f"/api/v1/agent_skills/{agent_skill}/deactivate", method="POST") + return self._http.request( + f"/api/v1/agent_skills/{agent_skill}/deactivate", + method="POST", + response_type=AgentSkill, + ) diff --git a/src/archastro/platform/v1/resources/agent_tools.py b/src/archastro/platform/v1/resources/agent_tools.py index 5b5257e..413375d 100644 --- a/src/archastro/platform/v1/resources/agent_tools.py +++ b/src/archastro/platform/v1/resources/agent_tools.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: b7b22bada688 +# Content hash: 2abc4250ddb1 from __future__ import annotations -from typing import TypedDict +from typing import Any, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import AgentTool, AgentToolListResponse, BuiltinToolCatalogEntry @@ -13,16 +13,16 @@ "AgentToolUpdateInput", { "async": bool | None, # Whether the tool executes asynchronously (custom kind) - "builtin_tool_config": dict[str, object] | None, # Built-in tool config + "builtin_tool_config": dict[str, Any] | None, # Built-in tool config "config": str | None, # Config ID "description": str | None, # Description "handler_type": str | None, # Handler type: script or workflow_graph "instruction": str | None, # LLM usage instruction "lookup_key": str | None, # Lookup key - "metadata": dict[str, object] | None, # Metadata + "metadata": dict[str, Any] | None, # Metadata "name": str | None, # Tool name (custom only) "name_prefix": str | None, - "parameters": dict[str, object] | None, # JSON schema for tool input parameters + "parameters": dict[str, Any] | None, # JSON schema for tool input parameters "parameters_config": str | None, # Config ID for a reusable JsonSchema "template": str | None, }, @@ -42,25 +42,45 @@ async def list( query["agent"] = agent if kind is not None: query["kind"] = kind - return await self._http.request("/api/v1/agent_tools", query=query) + return await self._http.request( + "/api/v1/agent_tools", + query=query, + response_type=AgentToolListResponse, + ) async def catalog(self) -> list[BuiltinToolCatalogEntry]: - return await self._http.request("/api/v1/agent_tools/catalog") + return await self._http.request( + "/api/v1/agent_tools/catalog", + response_type=list[BuiltinToolCatalogEntry], + ) async def delete(self, tool: str) -> None: await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE") async def get(self, tool: str) -> AgentTool: - return await self._http.request(f"/api/v1/agent_tools/{tool}") + return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool) async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: - return await self._http.request(f"/api/v1/agent_tools/{tool}", method="PATCH", body=input) + return await self._http.request( + f"/api/v1/agent_tools/{tool}", + method="PATCH", + body=input, + response_type=AgentTool, + ) async def activate(self, tool: str) -> AgentTool: - return await self._http.request(f"/api/v1/agent_tools/{tool}/activate", method="POST") + return await self._http.request( + f"/api/v1/agent_tools/{tool}/activate", + method="POST", + response_type=AgentTool, + ) async def deactivate(self, tool: str) -> AgentTool: - return await self._http.request(f"/api/v1/agent_tools/{tool}/deactivate", method="POST") + return await self._http.request( + f"/api/v1/agent_tools/{tool}/deactivate", + method="POST", + response_type=AgentTool, + ) class AgentToolResource: @@ -73,22 +93,42 @@ def list(self, *, agent: str | None = None, kind: str | None = None) -> AgentToo query["agent"] = agent if kind is not None: query["kind"] = kind - return self._http.request("/api/v1/agent_tools", query=query) + return self._http.request( + "/api/v1/agent_tools", + query=query, + response_type=AgentToolListResponse, + ) def catalog(self) -> list[BuiltinToolCatalogEntry]: - return self._http.request("/api/v1/agent_tools/catalog") + return self._http.request( + "/api/v1/agent_tools/catalog", + response_type=list[BuiltinToolCatalogEntry], + ) def delete(self, tool: str) -> None: self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE") def get(self, tool: str) -> AgentTool: - return self._http.request(f"/api/v1/agent_tools/{tool}") + return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool) def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool: - return self._http.request(f"/api/v1/agent_tools/{tool}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/agent_tools/{tool}", + method="PATCH", + body=input, + response_type=AgentTool, + ) def activate(self, tool: str) -> AgentTool: - return self._http.request(f"/api/v1/agent_tools/{tool}/activate", method="POST") + return self._http.request( + f"/api/v1/agent_tools/{tool}/activate", + method="POST", + response_type=AgentTool, + ) def deactivate(self, tool: str) -> AgentTool: - return self._http.request(f"/api/v1/agent_tools/{tool}/deactivate", method="POST") + return self._http.request( + f"/api/v1/agent_tools/{tool}/deactivate", + method="POST", + response_type=AgentTool, + ) diff --git a/src/archastro/platform/v1/resources/agents.py b/src/archastro/platform/v1/resources/agents.py index 8db1f79..3c2cef8 100644 --- a/src/archastro/platform/v1/resources/agents.py +++ b/src/archastro/platform/v1/resources/agents.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 762a37915e73 +# Content hash: 5486473b86f3 from __future__ import annotations from datetime import datetime -from typing import Literal, Required, TypedDict +from typing import Any, Literal, Required, TypedDict from pydantic import BaseModel @@ -35,9 +35,9 @@ class AgentAgentComputerCreateInput(TypedDict, total=False): - config: dict[str, object] | None # Computer configuration + config: dict[str, Any] | None # Computer configuration lookup_key: str | None # Unique lookup key - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata name: Required[str] # Computer name region: str | None # Region to provision in (default: iad) @@ -51,13 +51,13 @@ class AgentAgentEnvVarCreateInput(TypedDict, total=False): class AgentAgentInstallationCreateInputIntegration(TypedDict, total=False): access_token: str | None # OAuth access token or API key installation_id: str | None - metadata: dict[str, object] | None # Provider-specific metadata (e.g. bot_user_id) + metadata: dict[str, Any] | None # Provider-specific metadata (e.g. bot_user_id) refresh_token: str | None # OAuth refresh token workspace_key: str | None # Workspace name or identifier class AgentAgentInstallationCreateInput(TypedDict, total=False): - config: dict[str, object] | None # Optional configuration + config: dict[str, Any] | None # Optional configuration integration: AgentAgentInstallationCreateInputIntegration | None kind: Required[str] lookup_key: str | None @@ -68,17 +68,17 @@ class AgentAgentInstallationCreateInput(TypedDict, total=False): "AgentAgentToolCreateInput", { "async": bool | None, # Whether the tool executes asynchronously (custom kind) - "builtin_tool_config": dict[str, object] | None, # Built-in tool config + "builtin_tool_config": dict[str, Any] | None, # Built-in tool config "builtin_tool_key": str | None, # Built-in tool key (for builtin kind) "config": str | None, # Config ID (for custom kind) "description": str | None, # Tool description (for custom kind) "handler_type": str | None, # Handler type: script or workflow_graph (for custom kind) "kind": Required[str], # Tool kind: builtin or custom "lookup_key": str | None, # Unique lookup key - "metadata": dict[str, object] | None, # Arbitrary metadata + "metadata": dict[str, Any] | None, # Arbitrary metadata "name": str | None, # Tool name (for custom kind) "name_prefix": str | None, - "parameters": dict[str, object] | None, # JSON schema for parameters (for custom kind) + "parameters": dict[str, Any] | None, # JSON schema for parameters (for custom kind) "status": str | None, # Tool status: draft or active (default: draft) }, total=False, @@ -124,11 +124,11 @@ class AgentCreateInputTemplateBundleSetupActionsItem(TypedDict, total=False): depends_on: list[str] | None # Identifiers of other actions that must complete first description: str | None # Markdown description shown in the checklist kind: Required[str] # One of: env_var, install, custom - params: dict[str, object] | None + params: dict[str, Any] | None required: bool | None # Whether this action blocks the checklist progress bar (default true) sort_order: int | None # Render order; defaults to insertion position title: Required[str] # Short human-readable title - verify_config: dict[str, object] | None + verify_config: dict[str, Any] | None class AgentCreateInputTemplateBundleSkillsItemFilesItem(TypedDict, total=False): @@ -163,7 +163,7 @@ class AgentCreateInput(TypedDict, total=False): email: str | None # Agent email identity: str | None # Identity prompt describing who the agent is lookup_key: str | None # Unique lookup key - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata model: str | None # Default AI model for this agent name: str | None # Agent name org: str | None # Organization ID @@ -210,7 +210,7 @@ class AgentUpdateInput(TypedDict, total=False): email: str | None # Agent email identity: str | None # Identity prompt describing who the agent is lookup_key: str | None # Unique lookup key - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata model: str | None # Default AI model for this agent. Empty string clears it. name: str | None # Agent name org: str | None # Organization ID @@ -271,7 +271,7 @@ class AgentAgentRoutinesInputStepsItemPresetConfig(TypedDict, total=False): class AgentAgentRoutinesInputStepsItem(TypedDict, total=False): config: str | None handler_type: Required[str] # Handler type for this step: preset, script, or workflow_graph - inputs: dict[str, object] | None + inputs: dict[str, Any] | None name: str | None # Optional step label. Must be unique within the chain if set. on_error: str | None # Error policy: halt (default), continue, or retry. output_key: str | None @@ -284,11 +284,11 @@ class AgentAgentRoutinesInput(TypedDict, total=False): acl: AgentAgentRoutinesInputAcl | None # Access control list config: str | None # Config ID (for workflow_graph handler) description: str | None # Description - event_config: dict[str, object] | None + event_config: dict[str, Any] | None event_type: str | None # Event type (deprecated, use event_config) handler_type: Required[str] # Handler type: workflow_graph, script, preset, or chain lookup_key: str | None # Unique lookup key - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata name: Required[str] # Routine name preset_config: AgentAgentRoutinesInputPresetConfig | None # Preset config preset_name: str | None # Preset name (for preset handler) @@ -311,10 +311,10 @@ class AgentThreadsInputThread(TypedDict, total=False): description: str | None # Thread description is_unlisted: bool | None # Whether thread is unlisted key: str | None # Unique thread key - metadata: dict[str, object] | None # Arbitrary metadata + metadata: dict[str, Any] | None # Arbitrary metadata muted: bool | None # Whether notifications are muted for this thread org: str | None # Organization ID - settings: dict[str, object] | None # Thread settings + settings: dict[str, Any] | None # Thread settings title: str | None # Thread title @@ -328,7 +328,7 @@ class AgentUpgradeInput(TypedDict, total=False): email: str | None # Safe agent email override expected_review_fingerprint: str | None identity: str | None # Safe identity prompt override - metadata: dict[str, object] | None # Safe metadata override + metadata: dict[str, Any] | None # Safe metadata override mode: Literal["reapply", "replace"] | None model: str | None # Safe default model override. Empty string clears it. name: str | None # Safe agent name override @@ -346,7 +346,7 @@ class ScheduleListResponseDataItem(BaseModel): instructions: str | None = None # Task instructions last_run_at: datetime | None = None # Last execution time max_runs: int | None = None # Maximum runs (recurring only) - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata next_run_at: datetime | None = None # Next scheduled execution run_count: int | None = None # Number of times executed schedule_type: str | None = None # Schedule type (once or recurring) @@ -362,7 +362,7 @@ class ScheduleListResponse(BaseModel): class AgentSearchResponse(BaseModel): - data: list[dict[str, object] | dict[str, object]] + data: list[dict[str, Any] | dict[str, Any]] class AsyncAgentAgentComputerResource: @@ -370,13 +370,17 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, agent: str) -> AgentComputerListResponse: - return await self._http.request(f"/api/v1/agents/{agent}/agent_computers") + return await self._http.request( + f"/api/v1/agents/{agent}/agent_computers", + response_type=AgentComputerListResponse, + ) async def create(self, agent: str, input: AgentAgentComputerCreateInput) -> AgentComputer: return await self._http.request( f"/api/v1/agents/{agent}/agent_computers", method="POST", body=input, + response_type=AgentComputer, ) @@ -385,13 +389,17 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, agent: str) -> AgentEnvVarMaskedList: - return await self._http.request(f"/api/v1/agents/{agent}/agent_env_vars") + return await self._http.request( + f"/api/v1/agents/{agent}/agent_env_vars", + response_type=AgentEnvVarMaskedList, + ) async def create(self, agent: str, input: AgentAgentEnvVarCreateInput) -> AgentEnvVarMasked: return await self._http.request( f"/api/v1/agents/{agent}/agent_env_vars", method="POST", body=input, + response_type=AgentEnvVarMasked, ) @@ -400,17 +408,24 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, agent: str) -> InstallationListResponse: - return await self._http.request(f"/api/v1/agents/{agent}/agent_installations") + return await self._http.request( + f"/api/v1/agents/{agent}/agent_installations", + response_type=InstallationListResponse, + ) async def create(self, agent: str, input: AgentAgentInstallationCreateInput) -> Installation: return await self._http.request( f"/api/v1/agents/{agent}/agent_installations", method="POST", body=input, + response_type=Installation, ) async def kinds(self, agent: str) -> InstallationKindListResponse: - return await self._http.request(f"/api/v1/agents/{agent}/agent_installations/kinds") + return await self._http.request( + f"/api/v1/agents/{agent}/agent_installations/kinds", + response_type=InstallationKindListResponse, + ) class AsyncAgentAgentToolResource: @@ -421,13 +436,18 @@ async def list(self, agent: str, *, kind: str | None = None) -> AgentToolListRes query: dict[str, object] = {} if kind is not None: query["kind"] = kind - return await self._http.request(f"/api/v1/agents/{agent}/agent_tools", query=query) + return await self._http.request( + f"/api/v1/agents/{agent}/agent_tools", + query=query, + response_type=AgentToolListResponse, + ) async def create(self, agent: str, input: AgentAgentToolCreateInput) -> AgentTool: return await self._http.request( f"/api/v1/agents/{agent}/agent_tools", method="POST", body=input, + response_type=AgentTool, ) @@ -439,10 +459,17 @@ async def list(self, agent: str, *, status: str | None = None) -> ScheduleListRe query: dict[str, object] = {} if status is not None: query["status"] = status - return await self._http.request(f"/api/v1/agents/{agent}/schedules", query=query) + return await self._http.request( + f"/api/v1/agents/{agent}/schedules", + query=query, + response_type=ScheduleListResponse, + ) async def get(self, agent: str, schedule: str) -> AgentSchedule: - return await self._http.request(f"/api/v1/agents/{agent}/schedules/{schedule}") + return await self._http.request( + f"/api/v1/agents/{agent}/schedules/{schedule}", + response_type=AgentSchedule, + ) class AsyncAgentResource: @@ -477,19 +504,33 @@ async def list( query["orgId"] = org_id if template_config is not None: query["templateConfig"] = template_config - return await self._http.request("/api/v1/agents", query=query) + return await self._http.request( + "/api/v1/agents", + query=query, + response_type=AgentListResponse, + ) async def create(self, input: AgentCreateInput) -> AgentCreateResponse: - return await self._http.request("/api/v1/agents", method="POST", body=input) + return await self._http.request( + "/api/v1/agents", + method="POST", + body=input, + response_type=AgentCreateResponse, + ) async def delete(self, agent: str) -> None: await self._http.request(f"/api/v1/agents/{agent}", method="DELETE") async def get(self, agent: str) -> Agent: - return await self._http.request(f"/api/v1/agents/{agent}") + return await self._http.request(f"/api/v1/agents/{agent}", response_type=Agent) async def update(self, agent: str, input: AgentUpdateInput) -> Agent: - return await self._http.request(f"/api/v1/agents/{agent}", method="PATCH", body=input) + return await self._http.request( + f"/api/v1/agents/{agent}", + method="PATCH", + body=input, + response_type=Agent, + ) async def agent_health_actions( self, @@ -506,13 +547,18 @@ async def agent_health_actions( query["status"] = status if kind is not None: query["kind"] = kind - return await self._http.request(f"/api/v1/agents/{agent}/agent_health_actions", query=query) + return await self._http.request( + f"/api/v1/agents/{agent}/agent_health_actions", + query=query, + response_type=HealthActionListResponse, + ) async def agent_routines(self, agent: str, input: AgentAgentRoutinesInput) -> AgentRoutine: return await self._http.request( f"/api/v1/agents/{agent}/agent_routines", method="POST", body=input, + response_type=AgentRoutine, ) async def agent_working_memory( @@ -530,7 +576,11 @@ async def agent_working_memory( query["pageSize"] = page_size if search is not None: query["search"] = search - return await self._http.request(f"/api/v1/agents/{agent}/agent_working_memory", query=query) + return await self._http.request( + f"/api/v1/agents/{agent}/agent_working_memory", + query=query, + response_type=WorkingMemoryEntryListResponse, + ) async def export(self, agent: str, *, remove_identity: bool | None = None) -> AgentExport: """ @@ -543,19 +593,29 @@ async def export(self, agent: str, *, remove_identity: bool | None = None) -> Ag query: dict[str, object] = {} if remove_identity is not None: query["removeIdentity"] = remove_identity - return await self._http.request(f"/api/v1/agents/{agent}/export", query=query) + return await self._http.request( + f"/api/v1/agents/{agent}/export", + query=query, + response_type=AgentExport, + ) async def health(self, agent: str) -> AgentHealth: - return await self._http.request(f"/api/v1/agents/{agent}/health") + return await self._http.request(f"/api/v1/agents/{agent}/health", response_type=AgentHealth) async def search(self, agent: str, input: AgentSearchInput) -> AgentSearchResponse: - return await self._http.request(f"/api/v1/agents/{agent}/search", method="POST", body=input) + return await self._http.request( + f"/api/v1/agents/{agent}/search", + method="POST", + body=input, + response_type=AgentSearchResponse, + ) async def threads(self, agent: str, input: AgentThreadsInput) -> Thread: return await self._http.request( f"/api/v1/agents/{agent}/threads", method="POST", body=input, + response_type=Thread, ) async def upgrade(self, agent: str, input: AgentUpgradeInput) -> AgentUpgradeResponse: @@ -563,6 +623,7 @@ async def upgrade(self, agent: str, input: AgentUpgradeInput) -> AgentUpgradeRes f"/api/v1/agents/{agent}/upgrade", method="POST", body=input, + response_type=AgentUpgradeResponse, ) @@ -571,13 +632,17 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, agent: str) -> AgentComputerListResponse: - return self._http.request(f"/api/v1/agents/{agent}/agent_computers") + return self._http.request( + f"/api/v1/agents/{agent}/agent_computers", + response_type=AgentComputerListResponse, + ) def create(self, agent: str, input: AgentAgentComputerCreateInput) -> AgentComputer: return self._http.request( f"/api/v1/agents/{agent}/agent_computers", method="POST", body=input, + response_type=AgentComputer, ) @@ -586,13 +651,17 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, agent: str) -> AgentEnvVarMaskedList: - return self._http.request(f"/api/v1/agents/{agent}/agent_env_vars") + return self._http.request( + f"/api/v1/agents/{agent}/agent_env_vars", + response_type=AgentEnvVarMaskedList, + ) def create(self, agent: str, input: AgentAgentEnvVarCreateInput) -> AgentEnvVarMasked: return self._http.request( f"/api/v1/agents/{agent}/agent_env_vars", method="POST", body=input, + response_type=AgentEnvVarMasked, ) @@ -601,17 +670,24 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, agent: str) -> InstallationListResponse: - return self._http.request(f"/api/v1/agents/{agent}/agent_installations") + return self._http.request( + f"/api/v1/agents/{agent}/agent_installations", + response_type=InstallationListResponse, + ) def create(self, agent: str, input: AgentAgentInstallationCreateInput) -> Installation: return self._http.request( f"/api/v1/agents/{agent}/agent_installations", method="POST", body=input, + response_type=Installation, ) def kinds(self, agent: str) -> InstallationKindListResponse: - return self._http.request(f"/api/v1/agents/{agent}/agent_installations/kinds") + return self._http.request( + f"/api/v1/agents/{agent}/agent_installations/kinds", + response_type=InstallationKindListResponse, + ) class AgentAgentToolResource: @@ -622,10 +698,19 @@ def list(self, agent: str, *, kind: str | None = None) -> AgentToolListResponse: query: dict[str, object] = {} if kind is not None: query["kind"] = kind - return self._http.request(f"/api/v1/agents/{agent}/agent_tools", query=query) + return self._http.request( + f"/api/v1/agents/{agent}/agent_tools", + query=query, + response_type=AgentToolListResponse, + ) def create(self, agent: str, input: AgentAgentToolCreateInput) -> AgentTool: - return self._http.request(f"/api/v1/agents/{agent}/agent_tools", method="POST", body=input) + return self._http.request( + f"/api/v1/agents/{agent}/agent_tools", + method="POST", + body=input, + response_type=AgentTool, + ) class ScheduleResource: @@ -636,10 +721,17 @@ def list(self, agent: str, *, status: str | None = None) -> ScheduleListResponse query: dict[str, object] = {} if status is not None: query["status"] = status - return self._http.request(f"/api/v1/agents/{agent}/schedules", query=query) + return self._http.request( + f"/api/v1/agents/{agent}/schedules", + query=query, + response_type=ScheduleListResponse, + ) def get(self, agent: str, schedule: str) -> AgentSchedule: - return self._http.request(f"/api/v1/agents/{agent}/schedules/{schedule}") + return self._http.request( + f"/api/v1/agents/{agent}/schedules/{schedule}", + response_type=AgentSchedule, + ) class AgentResource: @@ -674,19 +766,29 @@ def list( query["orgId"] = org_id if template_config is not None: query["templateConfig"] = template_config - return self._http.request("/api/v1/agents", query=query) + return self._http.request("/api/v1/agents", query=query, response_type=AgentListResponse) def create(self, input: AgentCreateInput) -> AgentCreateResponse: - return self._http.request("/api/v1/agents", method="POST", body=input) + return self._http.request( + "/api/v1/agents", + method="POST", + body=input, + response_type=AgentCreateResponse, + ) def delete(self, agent: str) -> None: self._http.request(f"/api/v1/agents/{agent}", method="DELETE") def get(self, agent: str) -> Agent: - return self._http.request(f"/api/v1/agents/{agent}") + return self._http.request(f"/api/v1/agents/{agent}", response_type=Agent) def update(self, agent: str, input: AgentUpdateInput) -> Agent: - return self._http.request(f"/api/v1/agents/{agent}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/agents/{agent}", + method="PATCH", + body=input, + response_type=Agent, + ) def agent_health_actions( self, @@ -703,13 +805,18 @@ def agent_health_actions( query["status"] = status if kind is not None: query["kind"] = kind - return self._http.request(f"/api/v1/agents/{agent}/agent_health_actions", query=query) + return self._http.request( + f"/api/v1/agents/{agent}/agent_health_actions", + query=query, + response_type=HealthActionListResponse, + ) def agent_routines(self, agent: str, input: AgentAgentRoutinesInput) -> AgentRoutine: return self._http.request( f"/api/v1/agents/{agent}/agent_routines", method="POST", body=input, + response_type=AgentRoutine, ) def agent_working_memory( @@ -727,7 +834,11 @@ def agent_working_memory( query["pageSize"] = page_size if search is not None: query["search"] = search - return self._http.request(f"/api/v1/agents/{agent}/agent_working_memory", query=query) + return self._http.request( + f"/api/v1/agents/{agent}/agent_working_memory", + query=query, + response_type=WorkingMemoryEntryListResponse, + ) def export(self, agent: str, *, remove_identity: bool | None = None) -> AgentExport: """ @@ -740,16 +851,35 @@ def export(self, agent: str, *, remove_identity: bool | None = None) -> AgentExp query: dict[str, object] = {} if remove_identity is not None: query["removeIdentity"] = remove_identity - return self._http.request(f"/api/v1/agents/{agent}/export", query=query) + return self._http.request( + f"/api/v1/agents/{agent}/export", + query=query, + response_type=AgentExport, + ) def health(self, agent: str) -> AgentHealth: - return self._http.request(f"/api/v1/agents/{agent}/health") + return self._http.request(f"/api/v1/agents/{agent}/health", response_type=AgentHealth) def search(self, agent: str, input: AgentSearchInput) -> AgentSearchResponse: - return self._http.request(f"/api/v1/agents/{agent}/search", method="POST", body=input) + return self._http.request( + f"/api/v1/agents/{agent}/search", + method="POST", + body=input, + response_type=AgentSearchResponse, + ) def threads(self, agent: str, input: AgentThreadsInput) -> Thread: - return self._http.request(f"/api/v1/agents/{agent}/threads", method="POST", body=input) + return self._http.request( + f"/api/v1/agents/{agent}/threads", + method="POST", + body=input, + response_type=Thread, + ) def upgrade(self, agent: str, input: AgentUpgradeInput) -> AgentUpgradeResponse: - return self._http.request(f"/api/v1/agents/{agent}/upgrade", method="POST", body=input) + return self._http.request( + f"/api/v1/agents/{agent}/upgrade", + method="POST", + body=input, + response_type=AgentUpgradeResponse, + ) diff --git a/src/archastro/platform/v1/resources/ai.py b/src/archastro/platform/v1/resources/ai.py index 57dc296..35f437f 100644 --- a/src/archastro/platform/v1/resources/ai.py +++ b/src/archastro/platform/v1/resources/ai.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 903e8159a309 +# Content hash: d2c91002fc71 from __future__ import annotations -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -13,7 +13,7 @@ class ChatCompletionsInputMessagesItemToolCallsItem(TypedDict, total=False): - arguments: Required[dict[str, object]] # Tool arguments + arguments: Required[dict[str, Any]] # Tool arguments id: Required[str] # Tool call ID name: Required[str] # Tool/function name thought_signature: str | None # Optional thought signature @@ -23,15 +23,15 @@ class ChatCompletionsInputMessagesItemToolResultsItem(TypedDict, total=False): content: str | None # Tool result content id: Required[str] # Tool call ID this result responds to name: Required[str] # Tool/function name - resolution: object | None # Structured tool resolution + resolution: Any | None # Structured tool resolution class ChatCompletionsInputMessagesItem(TypedDict, total=False): content: str | None # Message text content - content_parts: list[dict[str, object]] | None # Multimodal content parts + content_parts: list[dict[str, Any]] | None # Multimodal content parts resume_token: str | None # Resume token for continuing conversations role: Required[str] # Message role (system, user, assistant, tool) - structured_output: object | None # Structured output data + structured_output: Any | None # Structured output data tool_calls: list[ChatCompletionsInputMessagesItemToolCallsItem] | None tool_results: list[ChatCompletionsInputMessagesItemToolResultsItem] | None @@ -39,7 +39,7 @@ class ChatCompletionsInputMessagesItem(TypedDict, total=False): class ChatCompletionsInputOptsToolsItemFunction(TypedDict, total=False): description: str | None # Function description name: Required[str] # Function name - parameters: Required[dict[str, object]] # JSON Schema for function parameters + parameters: Required[dict[str, Any]] # JSON Schema for function parameters class ChatCompletionsInputOptsToolsItem(TypedDict): @@ -50,14 +50,14 @@ class ChatCompletionsInputOptsToolsItem(TypedDict): class ChatCompletionsInputOpts(TypedDict, total=False): max_tokens: int | None # Maximum tokens for the response model: Required[str] # Model identifier - server_tools: list[dict[str, object]] | None + server_tools: list[dict[str, Any]] | None temperature: float | None # Sampling temperature tool_choice: str | None # Tool choice for OpenAI-style tools: auto, required, or none tools: list[ChatCompletionsInputOptsToolsItem] | None # OpenAI tool definitions class ChatCompletionsInput(TypedDict, total=False): - context: dict[str, object] | None # Template context map + context: dict[str, Any] | None # Template context map messages: Required[list[ChatCompletionsInputMessagesItem]] # Chat completion messages opts: Required[ChatCompletionsInputOpts] # Completion options @@ -122,10 +122,15 @@ def __init__(self, http: HttpClient): self._http = http async def completions(self, input: ChatCompletionsInput) -> AICompletionResult: - return await self._http.request("/api/v1/ai/chat/completions", method="POST", body=input) + return await self._http.request( + "/api/v1/ai/chat/completions", + method="POST", + body=input, + response_type=AICompletionResult, + ) async def models(self) -> ChatModelsResponse: - return await self._http.request("/api/v1/ai/chat/models") + return await self._http.request("/api/v1/ai/chat/models", response_type=ChatModelsResponse) class AsyncImageResource: @@ -133,13 +138,26 @@ def __init__(self, http: HttpClient): self._http = http async def edits(self, input: ImageEditsInput) -> AIImageResult: - return await self._http.request("/api/v1/ai/image/edits", method="POST", body=input) + return await self._http.request( + "/api/v1/ai/image/edits", + method="POST", + body=input, + response_type=AIImageResult, + ) async def generations(self, input: ImageGenerationsInput) -> AIImageResult: - return await self._http.request("/api/v1/ai/image/generations", method="POST", body=input) + return await self._http.request( + "/api/v1/ai/image/generations", + method="POST", + body=input, + response_type=AIImageResult, + ) async def models(self) -> ImageModelsResponse: - return await self._http.request("/api/v1/ai/image/models") + return await self._http.request( + "/api/v1/ai/image/models", + response_type=ImageModelsResponse, + ) class AsyncAiResource: @@ -154,10 +172,15 @@ def __init__(self, http: SyncHttpClient): self._http = http def completions(self, input: ChatCompletionsInput) -> AICompletionResult: - return self._http.request("/api/v1/ai/chat/completions", method="POST", body=input) + return self._http.request( + "/api/v1/ai/chat/completions", + method="POST", + body=input, + response_type=AICompletionResult, + ) def models(self) -> ChatModelsResponse: - return self._http.request("/api/v1/ai/chat/models") + return self._http.request("/api/v1/ai/chat/models", response_type=ChatModelsResponse) class ImageResource: @@ -165,13 +188,23 @@ def __init__(self, http: SyncHttpClient): self._http = http def edits(self, input: ImageEditsInput) -> AIImageResult: - return self._http.request("/api/v1/ai/image/edits", method="POST", body=input) + return self._http.request( + "/api/v1/ai/image/edits", + method="POST", + body=input, + response_type=AIImageResult, + ) def generations(self, input: ImageGenerationsInput) -> AIImageResult: - return self._http.request("/api/v1/ai/image/generations", method="POST", body=input) + return self._http.request( + "/api/v1/ai/image/generations", + method="POST", + body=input, + response_type=AIImageResult, + ) def models(self) -> ImageModelsResponse: - return self._http.request("/api/v1/ai/image/models") + return self._http.request("/api/v1/ai/image/models", response_type=ImageModelsResponse) class AiResource: diff --git a/src/archastro/platform/v1/resources/artifacts.py b/src/archastro/platform/v1/resources/artifacts.py index 3c2b05d..78617cd 100644 --- a/src/archastro/platform/v1/resources/artifacts.py +++ b/src/archastro/platform/v1/resources/artifacts.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: ee76cab74996 +# Content hash: bd20d8ebe9f4 from __future__ import annotations @@ -27,10 +27,15 @@ async def delete(self, artifact: str) -> None: await self._http.request(f"/api/v1/artifacts/{artifact}", method="DELETE") async def get(self, artifact: str) -> Artifact: - return await self._http.request(f"/api/v1/artifacts/{artifact}") + return await self._http.request(f"/api/v1/artifacts/{artifact}", response_type=Artifact) async def replace(self, artifact: str, input: ArtifactReplaceInput) -> Artifact: - return await self._http.request(f"/api/v1/artifacts/{artifact}", method="PUT", body=input) + return await self._http.request( + f"/api/v1/artifacts/{artifact}", + method="PUT", + body=input, + response_type=Artifact, + ) async def archive(self, artifact: str) -> None: await self._http.request(f"/api/v1/artifacts/{artifact}/archive", method="POST") @@ -50,10 +55,15 @@ def delete(self, artifact: str) -> None: self._http.request(f"/api/v1/artifacts/{artifact}", method="DELETE") def get(self, artifact: str) -> Artifact: - return self._http.request(f"/api/v1/artifacts/{artifact}") + return self._http.request(f"/api/v1/artifacts/{artifact}", response_type=Artifact) def replace(self, artifact: str, input: ArtifactReplaceInput) -> Artifact: - return self._http.request(f"/api/v1/artifacts/{artifact}", method="PUT", body=input) + return self._http.request( + f"/api/v1/artifacts/{artifact}", + method="PUT", + body=input, + response_type=Artifact, + ) def archive(self, artifact: str) -> None: self._http.request(f"/api/v1/artifacts/{artifact}/archive", method="POST") diff --git a/src/archastro/platform/v1/resources/automation_runs.py b/src/archastro/platform/v1/resources/automation_runs.py index 34b6328..053de03 100644 --- a/src/archastro/platform/v1/resources/automation_runs.py +++ b/src/archastro/platform/v1/resources/automation_runs.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: e59c7fffda95 +# Content hash: c741db970de5 from __future__ import annotations @@ -19,7 +19,10 @@ async def get(self, automation_run: str) -> AutomationRun: This public lookup route only returns runs whose parent automation has `type: :invoked`. """ - return await self._http.request(f"/api/v1/automation_runs/{automation_run}") + return await self._http.request( + f"/api/v1/automation_runs/{automation_run}", + response_type=AutomationRun, + ) class AutomationRunResource: @@ -33,4 +36,7 @@ def get(self, automation_run: str) -> AutomationRun: This public lookup route only returns runs whose parent automation has `type: :invoked`. """ - return self._http.request(f"/api/v1/automation_runs/{automation_run}") + return self._http.request( + f"/api/v1/automation_runs/{automation_run}", + response_type=AutomationRun, + ) diff --git a/src/archastro/platform/v1/resources/automations.py b/src/archastro/platform/v1/resources/automations.py index 2602b9a..d8e4ccf 100644 --- a/src/archastro/platform/v1/resources/automations.py +++ b/src/archastro/platform/v1/resources/automations.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: ac30c1bc0f19 +# Content hash: fbfbcd23c155 from __future__ import annotations -from typing import TypedDict +from typing import Any, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.automations import AutomationRun @@ -12,7 +12,7 @@ class AutomationInvokeInput(TypedDict, total=False): idempotency_key: str | None # Idempotency key to deduplicate invocations - payload: dict[str, object] | None + payload: dict[str, Any] | None class AsyncAutomationResource: @@ -24,6 +24,7 @@ async def invoke(self, automation: str, input: AutomationInvokeInput) -> Automat f"/api/v1/automations/{automation}/invoke", method="POST", body=input, + response_type=AutomationRun, ) @@ -36,4 +37,5 @@ def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun f"/api/v1/automations/{automation}/invoke", method="POST", body=input, + response_type=AutomationRun, ) diff --git a/src/archastro/platform/v1/resources/bug_reports.py b/src/archastro/platform/v1/resources/bug_reports.py index c1cedbe..4f742d7 100644 --- a/src/archastro/platform/v1/resources/bug_reports.py +++ b/src/archastro/platform/v1/resources/bug_reports.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: c4d13b3252d0 +# Content hash: 3f32f895244b from __future__ import annotations -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import BugReport @@ -13,7 +13,7 @@ class BugReportCreateInput(TypedDict, total=False): client: Required[str] # Submitting client. One of: agent_network_web, cli, developer_portal. client_version: Required[str] # Build SHA or package version of the client. - context: dict[str, object] | None + context: dict[str, Any] | None description: Required[str] # Freeform report text. 1–10,000 chars after trim. @@ -22,7 +22,12 @@ def __init__(self, http: HttpClient): self._http = http async def create(self, input: BugReportCreateInput) -> BugReport: - return await self._http.request("/api/v1/bug_reports", method="POST", body=input) + return await self._http.request( + "/api/v1/bug_reports", + method="POST", + body=input, + response_type=BugReport, + ) class BugReportResource: @@ -30,4 +35,9 @@ def __init__(self, http: SyncHttpClient): self._http = http def create(self, input: BugReportCreateInput) -> BugReport: - return self._http.request("/api/v1/bug_reports", method="POST", body=input) + return self._http.request( + "/api/v1/bug_reports", + method="POST", + body=input, + response_type=BugReport, + ) diff --git a/src/archastro/platform/v1/resources/config.py b/src/archastro/platform/v1/resources/config.py index dc0e460..69d1435 100644 --- a/src/archastro/platform/v1/resources/config.py +++ b/src/archastro/platform/v1/resources/config.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 58fa8d52cc0d +# Content hash: 95a780c4ef37 from __future__ import annotations from datetime import datetime -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -25,7 +25,7 @@ class SystemCloneInput(TypedDict, total=False): class ConfigCreateInput(TypedDict, total=False): agent: str | None # Agent ID (for agent-owned configs) change_description: str | None # Description of changes - data: dict[str, object] | None # Additional structured data stored on the version + data: dict[str, Any] | None # Additional structured data stored on the version kind: Required[str] # Config kind (e.g., Agent, APITool) lookup_key: str | None # Optional lookup key mime_type: Required[str] # Content mime type @@ -58,7 +58,7 @@ class ConfigValidateInput(TypedDict, total=False): class ConfigUpdateInput(TypedDict, total=False): agent: str | None # Agent ID (for agent-owned configs) change_description: str | None # Description of changes - data: dict[str, object] | None # Additional structured data stored on the version + data: dict[str, Any] | None # Additional structured data stored on the version expected_version: int | None # Expected current version number for optimistic locking lookup_key: str | None # Update lookup key mime_type: str | None # Content mime type (defaults to existing if not provided) @@ -112,7 +112,7 @@ class SystemListResponseDataItemCurrentVersion(BaseModel): change_description: str | None = None # Description of changes content_hash: str | None = None created_at: datetime | None = None # Creation timestamp - data: dict[str, object] | None = None # Additional structured data + data: dict[str, Any] | None = None # Additional structured data id: str # Config version ID (cfv_...) org: str | None = None # Organization sandbox: str | None = None # Sandbox @@ -154,7 +154,7 @@ class ConfigListResponseDataItemCurrentVersion(BaseModel): change_description: str | None = None # Description of changes content_hash: str | None = None created_at: datetime | None = None # Creation timestamp - data: dict[str, object] | None = None # Additional structured data + data: dict[str, Any] | None = None # Additional structured data id: str # Config version ID (cfv_...) org: str | None = None # Organization sandbox: str | None = None # Sandbox @@ -194,7 +194,7 @@ class ConfigVersionsResponseVersionsItem(BaseModel): change_description: str | None = None # Description of changes content_hash: str | None = None created_at: datetime | None = None # Creation timestamp - data: dict[str, object] | None = None # Additional structured data + data: dict[str, Any] | None = None # Additional structured data id: str # Config version ID (cfv_...) org: str | None = None # Organization sandbox: str | None = None # Sandbox @@ -213,10 +213,17 @@ async def list(self, *, kind: list[str] | None = None) -> KindListResponse: query: dict[str, object] = {} if kind is not None: query["kind"] = kind - return await self._http.request("/api/v1/config/kinds", query=query) + return await self._http.request( + "/api/v1/config/kinds", + query=query, + response_type=KindListResponse, + ) async def schema(self, kind: str) -> ConfigKindSchema: - return await self._http.request(f"/api/v1/config/kinds/{kind}/schema") + return await self._http.request( + f"/api/v1/config/kinds/{kind}/schema", + response_type=ConfigKindSchema, + ) class AsyncSystemResource: @@ -243,19 +250,24 @@ async def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return await self._http.request("/api/v1/config/system", query=query) + return await self._http.request( + "/api/v1/config/system", + query=query, + response_type=SystemListResponse, + ) async def facets(self) -> ConfigFacets: - return await self._http.request("/api/v1/config/system/facets") + return await self._http.request("/api/v1/config/system/facets", response_type=ConfigFacets) async def get(self, system: str) -> Config: - return await self._http.request(f"/api/v1/config/system/{system}") + return await self._http.request(f"/api/v1/config/system/{system}", response_type=Config) async def clone(self, system: str, input: SystemCloneInput) -> Config: return await self._http.request( f"/api/v1/config/system/{system}/clone", method="POST", body=input, + response_type=Config, ) @@ -294,13 +306,27 @@ async def list( query["parents"] = parents if parent_solutions is not None: query["parentSolutions"] = parent_solutions - return await self._http.request("/api/v1/config", query=query) + return await self._http.request( + "/api/v1/config", + query=query, + response_type=ConfigListResponse, + ) async def create(self, input: ConfigCreateInput) -> Config: - return await self._http.request("/api/v1/config", method="POST", body=input) + return await self._http.request( + "/api/v1/config", + method="POST", + body=input, + response_type=Config, + ) async def encrypt_secret(self, input: ConfigEncryptSecretInput) -> ConfigEncryptSecretResponse: - return await self._http.request("/api/v1/config/encrypt_secret", method="POST", body=input) + return await self._http.request( + "/api/v1/config/encrypt_secret", + method="POST", + body=input, + response_type=ConfigEncryptSecretResponse, + ) async def facets( self, @@ -319,10 +345,19 @@ async def facets( query["user"] = user if org is not None: query["org"] = org - return await self._http.request("/api/v1/config/facets", query=query) + return await self._http.request( + "/api/v1/config/facets", + query=query, + response_type=ConfigFacets, + ) async def validate(self, input: ConfigValidateInput) -> ValidationResult: - return await self._http.request("/api/v1/config/validate", method="POST", body=input) + return await self._http.request( + "/api/v1/config/validate", + method="POST", + body=input, + response_type=ValidationResult, + ) async def delete(self, config: str) -> None: await self._http.request(f"/api/v1/config/{config}", method="DELETE") @@ -348,16 +383,26 @@ async def get( query["system"] = system if org is not None: query["org"] = org - return await self._http.request(f"/api/v1/config/{config}", query=query) + return await self._http.request( + f"/api/v1/config/{config}", + query=query, + response_type=Config, + ) async def update(self, config: str, input: ConfigUpdateInput) -> Config: - return await self._http.request(f"/api/v1/config/{config}", method="PATCH", body=input) + return await self._http.request( + f"/api/v1/config/{config}", + method="PATCH", + body=input, + response_type=Config, + ) async def archive(self, config: str, input: ConfigArchiveInput) -> Config: return await self._http.request( f"/api/v1/config/{config}/archive", method="POST", body=input, + response_type=Config, ) async def change_owner(self, config: str, input: ConfigChangeOwnerInput) -> Config: @@ -365,6 +410,7 @@ async def change_owner(self, config: str, input: ConfigChangeOwnerInput) -> Conf f"/api/v1/config/{config}/change_owner", method="POST", body=input, + response_type=Config, ) async def content( @@ -401,6 +447,7 @@ async def unarchive(self, config: str, input: ConfigUnarchiveInput) -> Config: f"/api/v1/config/{config}/unarchive", method="POST", body=input, + response_type=Config, ) async def versions( @@ -424,7 +471,11 @@ async def versions( query["system"] = system if org is not None: query["org"] = org - return await self._http.request(f"/api/v1/config/{config}/versions", query=query) + return await self._http.request( + f"/api/v1/config/{config}/versions", + query=query, + response_type=ConfigVersionsResponse, + ) class KindResource: @@ -435,10 +486,17 @@ def list(self, *, kind: list[str] | None = None) -> KindListResponse: query: dict[str, object] = {} if kind is not None: query["kind"] = kind - return self._http.request("/api/v1/config/kinds", query=query) + return self._http.request( + "/api/v1/config/kinds", + query=query, + response_type=KindListResponse, + ) def schema(self, kind: str) -> ConfigKindSchema: - return self._http.request(f"/api/v1/config/kinds/{kind}/schema") + return self._http.request( + f"/api/v1/config/kinds/{kind}/schema", + response_type=ConfigKindSchema, + ) class SystemResource: @@ -465,19 +523,24 @@ def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return self._http.request("/api/v1/config/system", query=query) + return self._http.request( + "/api/v1/config/system", + query=query, + response_type=SystemListResponse, + ) def facets(self) -> ConfigFacets: - return self._http.request("/api/v1/config/system/facets") + return self._http.request("/api/v1/config/system/facets", response_type=ConfigFacets) def get(self, system: str) -> Config: - return self._http.request(f"/api/v1/config/system/{system}") + return self._http.request(f"/api/v1/config/system/{system}", response_type=Config) def clone(self, system: str, input: SystemCloneInput) -> Config: return self._http.request( f"/api/v1/config/system/{system}/clone", method="POST", body=input, + response_type=Config, ) @@ -516,13 +579,23 @@ def list( query["parents"] = parents if parent_solutions is not None: query["parentSolutions"] = parent_solutions - return self._http.request("/api/v1/config", query=query) + return self._http.request("/api/v1/config", query=query, response_type=ConfigListResponse) def create(self, input: ConfigCreateInput) -> Config: - return self._http.request("/api/v1/config", method="POST", body=input) + return self._http.request( + "/api/v1/config", + method="POST", + body=input, + response_type=Config, + ) def encrypt_secret(self, input: ConfigEncryptSecretInput) -> ConfigEncryptSecretResponse: - return self._http.request("/api/v1/config/encrypt_secret", method="POST", body=input) + return self._http.request( + "/api/v1/config/encrypt_secret", + method="POST", + body=input, + response_type=ConfigEncryptSecretResponse, + ) def facets( self, @@ -541,10 +614,15 @@ def facets( query["user"] = user if org is not None: query["org"] = org - return self._http.request("/api/v1/config/facets", query=query) + return self._http.request("/api/v1/config/facets", query=query, response_type=ConfigFacets) def validate(self, input: ConfigValidateInput) -> ValidationResult: - return self._http.request("/api/v1/config/validate", method="POST", body=input) + return self._http.request( + "/api/v1/config/validate", + method="POST", + body=input, + response_type=ValidationResult, + ) def delete(self, config: str) -> None: self._http.request(f"/api/v1/config/{config}", method="DELETE") @@ -570,19 +648,30 @@ def get( query["system"] = system if org is not None: query["org"] = org - return self._http.request(f"/api/v1/config/{config}", query=query) + return self._http.request(f"/api/v1/config/{config}", query=query, response_type=Config) def update(self, config: str, input: ConfigUpdateInput) -> Config: - return self._http.request(f"/api/v1/config/{config}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/config/{config}", + method="PATCH", + body=input, + response_type=Config, + ) def archive(self, config: str, input: ConfigArchiveInput) -> Config: - return self._http.request(f"/api/v1/config/{config}/archive", method="POST", body=input) + return self._http.request( + f"/api/v1/config/{config}/archive", + method="POST", + body=input, + response_type=Config, + ) def change_owner(self, config: str, input: ConfigChangeOwnerInput) -> Config: return self._http.request( f"/api/v1/config/{config}/change_owner", method="POST", body=input, + response_type=Config, ) def content( @@ -615,7 +704,12 @@ def content( return self._http.request_raw(f"/api/v1/config/{config}/content", query=query) def unarchive(self, config: str, input: ConfigUnarchiveInput) -> Config: - return self._http.request(f"/api/v1/config/{config}/unarchive", method="POST", body=input) + return self._http.request( + f"/api/v1/config/{config}/unarchive", + method="POST", + body=input, + response_type=Config, + ) def versions( self, @@ -638,4 +732,8 @@ def versions( query["system"] = system if org is not None: query["org"] = org - return self._http.request(f"/api/v1/config/{config}/versions", query=query) + return self._http.request( + f"/api/v1/config/{config}/versions", + query=query, + response_type=ConfigVersionsResponse, + ) diff --git a/src/archastro/platform/v1/resources/custom_objects.py b/src/archastro/platform/v1/resources/custom_objects.py index f92c2f3..7bd7f24 100644 --- a/src/archastro/platform/v1/resources/custom_objects.py +++ b/src/archastro/platform/v1/resources/custom_objects.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: b87f0904cc98 +# Content hash: a9f3ab5c25c3 from __future__ import annotations from datetime import datetime -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -15,7 +15,7 @@ class CustomObjectCreateInput(TypedDict, total=False): agent: str | None # Owning agent (agent_user_id) - fields: Required[dict[str, object]] # Field values for the new object + fields: Required[dict[str, Any]] # Field values for the new object org: str | None # Org ID to stamp on the row (typically required for system-owned) system: bool | None team: str | None # Owning team ID @@ -25,8 +25,8 @@ class CustomObjectCreateInput(TypedDict, total=False): class CustomObjectReplaceInput(TypedDict, total=False): - field_ops: dict[str, object] | None # Granular array operations per field - fields: Required[dict[str, object]] # Object field values to update + field_ops: dict[str, Any] | None # Granular array operations per field + fields: Required[dict[str, Any]] # Object field values to update type: str | None # Object schema type (lookup_key) @@ -37,7 +37,7 @@ class CustomObjectDeleteResponse(BaseModel): class CustomObjectReplaceResponseData(BaseModel): created_at: datetime | None = None # Created timestamp - fields: dict[str, object] | None = None # Object field values + fields: dict[str, Any] | None = None # Object field values id: str # Public ID (cobj_...) org: str | None = None # Organization row_key: str | None = None # Row key @@ -51,7 +51,7 @@ class CustomObjectReplaceResponseData(BaseModel): class CustomObjectReplaceResponse(BaseModel): data: CustomObjectReplaceResponseData # The updated object - meta: dict[str, object] | None = None # Version metadata + meta: dict[str, Any] | None = None # Version metadata class AsyncCustomObjectResource: @@ -92,19 +92,36 @@ async def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return await self._http.request("/api/v1/custom_objects", query=query) + return await self._http.request( + "/api/v1/custom_objects", + query=query, + response_type=CustomObjectListResponse, + ) async def create(self, input: CustomObjectCreateInput) -> CustomObject: - return await self._http.request("/api/v1/custom_objects", method="POST", body=input) + return await self._http.request( + "/api/v1/custom_objects", + method="POST", + body=input, + response_type=CustomObject, + ) async def delete(self, object: str) -> CustomObjectDeleteResponse: - return await self._http.request(f"/api/v1/custom_objects/{object}", method="DELETE") + return await self._http.request( + f"/api/v1/custom_objects/{object}", + method="DELETE", + response_type=CustomObjectDeleteResponse, + ) async def get(self, object: str, *, type: str | None = None) -> CustomObject: query: dict[str, object] = {} if type is not None: query["type"] = type - return await self._http.request(f"/api/v1/custom_objects/{object}", query=query) + return await self._http.request( + f"/api/v1/custom_objects/{object}", + query=query, + response_type=CustomObject, + ) async def replace( self, object: str, input: CustomObjectReplaceInput @@ -113,6 +130,7 @@ async def replace( f"/api/v1/custom_objects/{object}", method="PUT", body=input, + response_type=CustomObjectReplaceResponse, ) @@ -154,19 +172,41 @@ def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return self._http.request("/api/v1/custom_objects", query=query) + return self._http.request( + "/api/v1/custom_objects", + query=query, + response_type=CustomObjectListResponse, + ) def create(self, input: CustomObjectCreateInput) -> CustomObject: - return self._http.request("/api/v1/custom_objects", method="POST", body=input) + return self._http.request( + "/api/v1/custom_objects", + method="POST", + body=input, + response_type=CustomObject, + ) def delete(self, object: str) -> CustomObjectDeleteResponse: - return self._http.request(f"/api/v1/custom_objects/{object}", method="DELETE") + return self._http.request( + f"/api/v1/custom_objects/{object}", + method="DELETE", + response_type=CustomObjectDeleteResponse, + ) def get(self, object: str, *, type: str | None = None) -> CustomObject: query: dict[str, object] = {} if type is not None: query["type"] = type - return self._http.request(f"/api/v1/custom_objects/{object}", query=query) + return self._http.request( + f"/api/v1/custom_objects/{object}", + query=query, + response_type=CustomObject, + ) def replace(self, object: str, input: CustomObjectReplaceInput) -> CustomObjectReplaceResponse: - return self._http.request(f"/api/v1/custom_objects/{object}", method="PUT", body=input) + return self._http.request( + f"/api/v1/custom_objects/{object}", + method="PUT", + body=input, + response_type=CustomObjectReplaceResponse, + ) diff --git a/src/archastro/platform/v1/resources/files.py b/src/archastro/platform/v1/resources/files.py index fe55547..e9b9785 100644 --- a/src/archastro/platform/v1/resources/files.py +++ b/src/archastro/platform/v1/resources/files.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9081589966b0 +# Content hash: 0edc899ed226 from __future__ import annotations @@ -25,7 +25,12 @@ def __init__(self, http: HttpClient): self._http = http async def create(self, input: FileCreateInput) -> StorageFile: - return await self._http.request("/api/v1/files", method="POST", body=input) + return await self._http.request( + "/api/v1/files", + method="POST", + body=input, + response_type=StorageFile, + ) async def avatar(self, file: str, token: str) -> dict[str, str]: query: dict[str, object] = {} @@ -38,7 +43,12 @@ def __init__(self, http: SyncHttpClient): self._http = http def create(self, input: FileCreateInput) -> StorageFile: - return self._http.request("/api/v1/files", method="POST", body=input) + return self._http.request( + "/api/v1/files", + method="POST", + body=input, + response_type=StorageFile, + ) def avatar(self, file: str, token: str) -> dict[str, str]: query: dict[str, object] = {} diff --git a/src/archastro/platform/v1/resources/invites.py b/src/archastro/platform/v1/resources/invites.py index 7224ee5..88dcda8 100644 --- a/src/archastro/platform/v1/resources/invites.py +++ b/src/archastro/platform/v1/resources/invites.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 77571f22628e +# Content hash: a1ee41a75a1d from __future__ import annotations @@ -19,7 +19,12 @@ def __init__(self, http: HttpClient): self._http = http async def accept(self, input: InviteAcceptInput) -> UserInvite: - return await self._http.request("/api/v1/invites/accept", method="POST", body=input) + return await self._http.request( + "/api/v1/invites/accept", + method="POST", + body=input, + response_type=UserInvite, + ) class InviteResource: @@ -27,4 +32,9 @@ def __init__(self, http: SyncHttpClient): self._http = http def accept(self, input: InviteAcceptInput) -> UserInvite: - return self._http.request("/api/v1/invites/accept", method="POST", body=input) + return self._http.request( + "/api/v1/invites/accept", + method="POST", + body=input, + response_type=UserInvite, + ) diff --git a/src/archastro/platform/v1/resources/knowledge_documents.py b/src/archastro/platform/v1/resources/knowledge_documents.py index 4130ce0..8c73688 100644 --- a/src/archastro/platform/v1/resources/knowledge_documents.py +++ b/src/archastro/platform/v1/resources/knowledge_documents.py @@ -1,10 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: af6c9906fadc +# Content hash: a26050afa2a6 from __future__ import annotations from datetime import datetime +from typing import Any from pydantic import BaseModel @@ -17,7 +18,7 @@ class KnowledgeDocumentListResponseDataItem(BaseModel): created_at: datetime | None = None # Created timestamp file: str | None = None # Backing file ID (`fil_...`) when file-backed; nil for inline id: str # Public ID (cdo_...) - metadata: dict[str, object] | None = None # Per-doc metadata + metadata: dict[str, Any] | None = None # Per-doc metadata source: str | None = None # Source ID (cs_...) team: str | None = None # Owning team title: str | None = None # Display title @@ -64,13 +65,20 @@ async def list( query["installation"] = installation if agent is not None: query["agent"] = agent - return await self._http.request("/api/v1/knowledge_documents", query=query) + return await self._http.request( + "/api/v1/knowledge_documents", + query=query, + response_type=KnowledgeDocumentListResponse, + ) async def delete(self, document: str) -> None: await self._http.request(f"/api/v1/knowledge_documents/{document}", method="DELETE") async def get(self, document: str) -> ContextDocument: - return await self._http.request(f"/api/v1/knowledge_documents/{document}") + return await self._http.request( + f"/api/v1/knowledge_documents/{document}", + response_type=ContextDocument, + ) async def content( self, @@ -90,6 +98,7 @@ async def content( return await self._http.request( f"/api/v1/knowledge_documents/{document}/content", query=query, + response_type=ContextDocumentContent, ) @@ -120,13 +129,20 @@ def list( query["installation"] = installation if agent is not None: query["agent"] = agent - return self._http.request("/api/v1/knowledge_documents", query=query) + return self._http.request( + "/api/v1/knowledge_documents", + query=query, + response_type=KnowledgeDocumentListResponse, + ) def delete(self, document: str) -> None: self._http.request(f"/api/v1/knowledge_documents/{document}", method="DELETE") def get(self, document: str) -> ContextDocument: - return self._http.request(f"/api/v1/knowledge_documents/{document}") + return self._http.request( + f"/api/v1/knowledge_documents/{document}", + response_type=ContextDocument, + ) def content( self, @@ -143,4 +159,8 @@ def content( query["limit"] = limit if unit is not None: query["unit"] = unit - return self._http.request(f"/api/v1/knowledge_documents/{document}/content", query=query) + return self._http.request( + f"/api/v1/knowledge_documents/{document}/content", + query=query, + response_type=ContextDocumentContent, + ) diff --git a/src/archastro/platform/v1/resources/knowledge_sources.py b/src/archastro/platform/v1/resources/knowledge_sources.py index 7ff0bc6..261c50c 100644 --- a/src/archastro/platform/v1/resources/knowledge_sources.py +++ b/src/archastro/platform/v1/resources/knowledge_sources.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 650e84ac0078 +# Content hash: a3b02519e460 from __future__ import annotations from datetime import datetime -from typing import Literal, Required, TypedDict +from typing import Any, Literal, Required, TypedDict from pydantic import BaseModel @@ -15,10 +15,10 @@ class KnowledgeSourceCreateInput(TypedDict, total=False): agent: str | None # Agent ID (owner) - metadata: dict[str, object] | None # Additional metadata + metadata: dict[str, Any] | None # Additional metadata org: str | None # Org ID — required for system-owned sources without a team/user/agent parent_source: str | None # Parent source ID - payload: dict[str, object] | None # Type-specific configuration + payload: dict[str, Any] | None # Type-specific configuration state: str | None # State: active or paused (default: active) team: str | None # Team ID (owner) thread: str | None # Thread ID @@ -27,8 +27,8 @@ class KnowledgeSourceCreateInput(TypedDict, total=False): class KnowledgeSourceUpdateInput(TypedDict, total=False): - metadata: dict[str, object] | None # Additional metadata - payload: dict[str, object] | None # Type-specific configuration + metadata: dict[str, Any] | None # Additional metadata + payload: dict[str, Any] | None # Type-specific configuration state: str | None # State: active or paused @@ -42,7 +42,7 @@ class KnowledgeSourceIngestInputContent(TypedDict, total=False): class KnowledgeSourceIngestInput(TypedDict, total=False): content: KnowledgeSourceIngestInputContent | None file: str | None - metadata: dict[str, object] | None # Per-document metadata + metadata: dict[str, Any] | None # Per-document metadata pull: bool | None title: str | None # Display title for the document @@ -52,10 +52,10 @@ class KnowledgeSourceListResponseDataItem(BaseModel): context_installation: str | None = None # Associated installation created_at: datetime | None = None # Created timestamp id: str # Public ID (cso_...) - metadata: dict[str, object] | None = None # Additional metadata + metadata: dict[str, Any] | None = None # Additional metadata org: str | None = None # Owning organization parent_source: str | None = None # Parent source - payload: dict[str, object] | None = None # Type-specific configuration + payload: dict[str, Any] | None = None # Type-specific configuration sandbox: str | None = None # Owning sandbox state: str # State: active or paused team: str | None = None # Owning team @@ -80,7 +80,10 @@ def __init__(self, http: HttpClient): self._http = http async def list(self) -> KnowledgeSourceKindListResponse: - return await self._http.request("/api/v1/knowledge_sources/kinds") + return await self._http.request( + "/api/v1/knowledge_sources/kinds", + response_type=KnowledgeSourceKindListResponse, + ) class AsyncKnowledgeSourceResource: @@ -117,22 +120,35 @@ async def list( query["org"] = org if owner_scope is not None: query["ownerScope"] = owner_scope - return await self._http.request("/api/v1/knowledge_sources", query=query) + return await self._http.request( + "/api/v1/knowledge_sources", + query=query, + response_type=KnowledgeSourceListResponse, + ) async def create(self, input: KnowledgeSourceCreateInput) -> KnowledgeSource: - return await self._http.request("/api/v1/knowledge_sources", method="POST", body=input) + return await self._http.request( + "/api/v1/knowledge_sources", + method="POST", + body=input, + response_type=KnowledgeSource, + ) async def delete(self, source: str) -> None: await self._http.request(f"/api/v1/knowledge_sources/{source}", method="DELETE") async def get(self, source: str) -> KnowledgeSource: - return await self._http.request(f"/api/v1/knowledge_sources/{source}") + return await self._http.request( + f"/api/v1/knowledge_sources/{source}", + response_type=KnowledgeSource, + ) async def update(self, source: str, input: KnowledgeSourceUpdateInput) -> KnowledgeSource: return await self._http.request( f"/api/v1/knowledge_sources/{source}", method="PATCH", body=input, + response_type=KnowledgeSource, ) async def ingest(self, source: str, input: KnowledgeSourceIngestInput) -> ContextIngestion: @@ -140,6 +156,7 @@ async def ingest(self, source: str, input: KnowledgeSourceIngestInput) -> Contex f"/api/v1/knowledge_sources/{source}/ingest", method="POST", body=input, + response_type=ContextIngestion, ) @@ -148,7 +165,10 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self) -> KnowledgeSourceKindListResponse: - return self._http.request("/api/v1/knowledge_sources/kinds") + return self._http.request( + "/api/v1/knowledge_sources/kinds", + response_type=KnowledgeSourceKindListResponse, + ) class KnowledgeSourceResource: @@ -185,23 +205,41 @@ def list( query["org"] = org if owner_scope is not None: query["ownerScope"] = owner_scope - return self._http.request("/api/v1/knowledge_sources", query=query) + return self._http.request( + "/api/v1/knowledge_sources", + query=query, + response_type=KnowledgeSourceListResponse, + ) def create(self, input: KnowledgeSourceCreateInput) -> KnowledgeSource: - return self._http.request("/api/v1/knowledge_sources", method="POST", body=input) + return self._http.request( + "/api/v1/knowledge_sources", + method="POST", + body=input, + response_type=KnowledgeSource, + ) def delete(self, source: str) -> None: self._http.request(f"/api/v1/knowledge_sources/{source}", method="DELETE") def get(self, source: str) -> KnowledgeSource: - return self._http.request(f"/api/v1/knowledge_sources/{source}") + return self._http.request( + f"/api/v1/knowledge_sources/{source}", + response_type=KnowledgeSource, + ) def update(self, source: str, input: KnowledgeSourceUpdateInput) -> KnowledgeSource: - return self._http.request(f"/api/v1/knowledge_sources/{source}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/knowledge_sources/{source}", + method="PATCH", + body=input, + response_type=KnowledgeSource, + ) def ingest(self, source: str, input: KnowledgeSourceIngestInput) -> ContextIngestion: return self._http.request( f"/api/v1/knowledge_sources/{source}/ingest", method="POST", body=input, + response_type=ContextIngestion, ) diff --git a/src/archastro/platform/v1/resources/kv.py b/src/archastro/platform/v1/resources/kv.py index 0efee9e..5da8be9 100644 --- a/src/archastro/platform/v1/resources/kv.py +++ b/src/archastro/platform/v1/resources/kv.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 5c8646b51098 +# Content hash: 6d3b8471e1a0 from __future__ import annotations @@ -45,10 +45,19 @@ async def list( query["userSearch"] = user_search if key is not None: query["key"] = key - return await self._http.request("/api/v1/kv", query=query) + return await self._http.request( + "/api/v1/kv", + query=query, + response_type=KeyValueStorageEntryPage, + ) async def create(self, input: KvCreateInput) -> KeyValueStorageEntry: - return await self._http.request("/api/v1/kv", method="POST", body=input) + return await self._http.request( + "/api/v1/kv", + method="POST", + body=input, + response_type=KeyValueStorageEntry, + ) async def delete(self, key: str) -> None: await self._http.request(f"/api/v1/kv/{key}", method="DELETE") @@ -57,10 +66,19 @@ async def get(self, key: str, *, user: str | None = None) -> KeyValueStorageEntr query: dict[str, object] = {} if user is not None: query["user"] = user - return await self._http.request(f"/api/v1/kv/{key}", query=query) + return await self._http.request( + f"/api/v1/kv/{key}", + query=query, + response_type=KeyValueStorageEntry, + ) async def upsert(self, key: str, input: KvUpsertInput) -> KeyValueStorageEntry: - return await self._http.request(f"/api/v1/kv/{key}", method="PUT", body=input) + return await self._http.request( + f"/api/v1/kv/{key}", + method="PUT", + body=input, + response_type=KeyValueStorageEntry, + ) class KvResource: @@ -87,10 +105,19 @@ def list( query["userSearch"] = user_search if key is not None: query["key"] = key - return self._http.request("/api/v1/kv", query=query) + return self._http.request( + "/api/v1/kv", + query=query, + response_type=KeyValueStorageEntryPage, + ) def create(self, input: KvCreateInput) -> KeyValueStorageEntry: - return self._http.request("/api/v1/kv", method="POST", body=input) + return self._http.request( + "/api/v1/kv", + method="POST", + body=input, + response_type=KeyValueStorageEntry, + ) def delete(self, key: str) -> None: self._http.request(f"/api/v1/kv/{key}", method="DELETE") @@ -99,7 +126,16 @@ def get(self, key: str, *, user: str | None = None) -> KeyValueStorageEntry: query: dict[str, object] = {} if user is not None: query["user"] = user - return self._http.request(f"/api/v1/kv/{key}", query=query) + return self._http.request( + f"/api/v1/kv/{key}", + query=query, + response_type=KeyValueStorageEntry, + ) def upsert(self, key: str, input: KvUpsertInput) -> KeyValueStorageEntry: - return self._http.request(f"/api/v1/kv/{key}", method="PUT", body=input) + return self._http.request( + f"/api/v1/kv/{key}", + method="PUT", + body=input, + response_type=KeyValueStorageEntry, + ) diff --git a/src/archastro/platform/v1/resources/notification_preferences.py b/src/archastro/platform/v1/resources/notification_preferences.py index 73fcb8a..a40e8c8 100644 --- a/src/archastro/platform/v1/resources/notification_preferences.py +++ b/src/archastro/platform/v1/resources/notification_preferences.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 55e88ccadc03 +# Content hash: f5f3b5e1604f from __future__ import annotations @@ -25,13 +25,17 @@ async def remove(self) -> None: await self._http.request("/api/v1/notification_preferences", method="DELETE") async def list(self) -> NotificationPreferenceList: - return await self._http.request("/api/v1/notification_preferences") + return await self._http.request( + "/api/v1/notification_preferences", + response_type=NotificationPreferenceList, + ) async def replace(self, input: NotificationPreferenceReplaceInput) -> NotificationPreference: return await self._http.request( "/api/v1/notification_preferences", method="PUT", body=input, + response_type=NotificationPreference, ) @@ -43,7 +47,15 @@ def remove(self) -> None: self._http.request("/api/v1/notification_preferences", method="DELETE") def list(self) -> NotificationPreferenceList: - return self._http.request("/api/v1/notification_preferences") + return self._http.request( + "/api/v1/notification_preferences", + response_type=NotificationPreferenceList, + ) def replace(self, input: NotificationPreferenceReplaceInput) -> NotificationPreference: - return self._http.request("/api/v1/notification_preferences", method="PUT", body=input) + return self._http.request( + "/api/v1/notification_preferences", + method="PUT", + body=input, + response_type=NotificationPreference, + ) diff --git a/src/archastro/platform/v1/resources/notifications.py b/src/archastro/platform/v1/resources/notifications.py index bb006ee..3238e2a 100644 --- a/src/archastro/platform/v1/resources/notifications.py +++ b/src/archastro/platform/v1/resources/notifications.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: f05267c2488a +# Content hash: 49ef92800dba from __future__ import annotations from datetime import datetime -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -14,7 +14,7 @@ class NotificationSendInput(TypedDict, total=False): - data: dict[str, object] | None + data: dict[str, Any] | None idempotency_key: str | None type: Required[str] user: Required[str] # Recipient user ID @@ -25,7 +25,7 @@ class NotificationListResponseDataItem(BaseModel): created_at: datetime # When the notification was sent id: str # Notification ID (ntf_...) read_at: datetime | None = None # When the recipient marked this read (nil if unread) - rendered: dict[str, object] + rendered: dict[str, Any] status: str # unread | read | archived type: str # Notification type (e.g., app_info, custom:deploy_complete) @@ -59,16 +59,28 @@ async def list( query["limit"] = limit if after_cursor is not None: query["afterCursor"] = after_cursor - return await self._http.request("/api/v1/notifications", query=query) + return await self._http.request( + "/api/v1/notifications", + query=query, + response_type=NotificationListResponse, + ) async def read_all(self) -> None: await self._http.request("/api/v1/notifications/read_all", method="POST") async def send(self, input: NotificationSendInput) -> Notification: - return await self._http.request("/api/v1/notifications/send", method="POST", body=input) + return await self._http.request( + "/api/v1/notifications/send", + method="POST", + body=input, + response_type=Notification, + ) async def unread_count(self) -> NotificationUnreadCountResponse: - return await self._http.request("/api/v1/notifications/unread_count") + return await self._http.request( + "/api/v1/notifications/unread_count", + response_type=NotificationUnreadCountResponse, + ) async def archive(self, notification: str) -> None: await self._http.request(f"/api/v1/notifications/{notification}/archive", method="POST") @@ -98,16 +110,28 @@ def list( query["limit"] = limit if after_cursor is not None: query["afterCursor"] = after_cursor - return self._http.request("/api/v1/notifications", query=query) + return self._http.request( + "/api/v1/notifications", + query=query, + response_type=NotificationListResponse, + ) def read_all(self) -> None: self._http.request("/api/v1/notifications/read_all", method="POST") def send(self, input: NotificationSendInput) -> Notification: - return self._http.request("/api/v1/notifications/send", method="POST", body=input) + return self._http.request( + "/api/v1/notifications/send", + method="POST", + body=input, + response_type=Notification, + ) def unread_count(self) -> NotificationUnreadCountResponse: - return self._http.request("/api/v1/notifications/unread_count") + return self._http.request( + "/api/v1/notifications/unread_count", + response_type=NotificationUnreadCountResponse, + ) def archive(self, notification: str) -> None: self._http.request(f"/api/v1/notifications/{notification}/archive", method="POST") diff --git a/src/archastro/platform/v1/resources/orgs.py b/src/archastro/platform/v1/resources/orgs.py index 5270008..8f42e7d 100644 --- a/src/archastro/platform/v1/resources/orgs.py +++ b/src/archastro/platform/v1/resources/orgs.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: beb8ce42c047 +# Content hash: c1f05b895bda from __future__ import annotations @@ -39,7 +39,7 @@ async def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return await self._http.request("/api/v1/orgs", query=query) + return await self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse) class OrgResource: @@ -56,4 +56,4 @@ def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return self._http.request("/api/v1/orgs", query=query) + return self._http.request("/api/v1/orgs", query=query, response_type=OrgListResponse) diff --git a/src/archastro/platform/v1/resources/solution_categories.py b/src/archastro/platform/v1/resources/solution_categories.py index d9e6498..6773df8 100644 --- a/src/archastro/platform/v1/resources/solution_categories.py +++ b/src/archastro/platform/v1/resources/solution_categories.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 1ce3a37dd7fd +# Content hash: 86ab06dfd5d6 from __future__ import annotations @@ -38,7 +38,11 @@ async def list( query["pathPrefix"] = path_prefix if owners is not None: query["owners"] = owners - return await self._http.request("/api/v1/solution_categories", query=query) + return await self._http.request( + "/api/v1/solution_categories", + query=query, + response_type=SolutionCategoryListResponse, + ) class SolutionCategoryResource: @@ -71,4 +75,8 @@ def list( query["pathPrefix"] = path_prefix if owners is not None: query["owners"] = owners - return self._http.request("/api/v1/solution_categories", query=query) + return self._http.request( + "/api/v1/solution_categories", + query=query, + response_type=SolutionCategoryListResponse, + ) diff --git a/src/archastro/platform/v1/resources/solution_tags.py b/src/archastro/platform/v1/resources/solution_tags.py index 9aab84c..06394dc 100644 --- a/src/archastro/platform/v1/resources/solution_tags.py +++ b/src/archastro/platform/v1/resources/solution_tags.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: c778b6248620 +# Content hash: 2511b42665f0 from __future__ import annotations @@ -35,7 +35,11 @@ async def list( query["pathPrefix"] = path_prefix if owners is not None: query["owners"] = owners - return await self._http.request("/api/v1/solution_tags", query=query) + return await self._http.request( + "/api/v1/solution_tags", + query=query, + response_type=SolutionTagListResponse, + ) class SolutionTagResource: @@ -65,4 +69,8 @@ def list( query["pathPrefix"] = path_prefix if owners is not None: query["owners"] = owners - return self._http.request("/api/v1/solution_tags", query=query) + return self._http.request( + "/api/v1/solution_tags", + query=query, + response_type=SolutionTagListResponse, + ) diff --git a/src/archastro/platform/v1/resources/solutions.py b/src/archastro/platform/v1/resources/solutions.py index 452a1f2..d6df38a 100644 --- a/src/archastro/platform/v1/resources/solutions.py +++ b/src/archastro/platform/v1/resources/solutions.py @@ -1,10 +1,10 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 12375cdaef77 +# Content hash: 7f583b76dd69 from __future__ import annotations -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from ...runtime.http_client import HttpClient, SyncHttpClient from ...types.common import ( @@ -27,11 +27,11 @@ class SolutionCreateInputSolutionBundleSetupActionsItem(TypedDict, total=False): depends_on: list[str] | None # Identifiers of other actions that must complete first description: str | None # Markdown description shown in the checklist kind: Required[str] # One of: env_var, install, custom - params: dict[str, object] | None + params: dict[str, Any] | None required: bool | None # Whether this action blocks the checklist progress bar (default true) sort_order: int | None # Render order; defaults to insertion position title: Required[str] # Short human-readable title - verify_config: dict[str, object] | None + verify_config: dict[str, Any] | None class SolutionCreateInputSolutionBundleSkillsItemFilesItem(TypedDict, total=False): @@ -116,11 +116,11 @@ class SolutionUpgradeInputSolutionBundleSetupActionsItem(TypedDict, total=False) depends_on: list[str] | None # Identifiers of other actions that must complete first description: str | None # Markdown description shown in the checklist kind: Required[str] # One of: env_var, install, custom - params: dict[str, object] | None + params: dict[str, Any] | None required: bool | None # Whether this action blocks the checklist progress bar (default true) sort_order: int | None # Render order; defaults to insertion position title: Required[str] # Short human-readable title - verify_config: dict[str, object] | None + verify_config: dict[str, Any] | None class SolutionUpgradeInputSolutionBundleSkillsItemFilesItem(TypedDict, total=False): @@ -206,25 +206,41 @@ async def list( query["pathPrefix"] = path_prefix if owners is not None: query["owners"] = owners - return await self._http.request("/api/v1/solutions", query=query) + return await self._http.request( + "/api/v1/solutions", + query=query, + response_type=SolutionListResponse, + ) async def create(self, input: SolutionCreateInput) -> SolutionImportResponse: - return await self._http.request("/api/v1/solutions", method="POST", body=input) + return await self._http.request( + "/api/v1/solutions", + method="POST", + body=input, + response_type=SolutionImportResponse, + ) async def delete(self, solution: str) -> None: await self._http.request(f"/api/v1/solutions/{solution}", method="DELETE") async def get(self, solution: str) -> SolutionSummary: - return await self._http.request(f"/api/v1/solutions/{solution}") + return await self._http.request( + f"/api/v1/solutions/{solution}", + response_type=SolutionSummary, + ) async def dependents(self, solution: str) -> SolutionDependentsResponse: - return await self._http.request(f"/api/v1/solutions/{solution}/dependents") + return await self._http.request( + f"/api/v1/solutions/{solution}/dependents", + response_type=SolutionDependentsResponse, + ) async def install(self, solution: str, input: SolutionInstallInput) -> SolutionInstallResponse: return await self._http.request( f"/api/v1/solutions/{solution}/install", method="POST", body=input, + response_type=SolutionInstallResponse, ) async def readme(self, solution: str, token: str, *, file: str | None = None) -> dict[str, str]: @@ -239,6 +255,7 @@ async def upgrade(self, solution: str, input: SolutionUpgradeInput) -> SolutionU f"/api/v1/solutions/{solution}/upgrade", method="POST", body=input, + response_type=SolutionUpgradeResponse, ) @@ -266,25 +283,38 @@ def list( query["pathPrefix"] = path_prefix if owners is not None: query["owners"] = owners - return self._http.request("/api/v1/solutions", query=query) + return self._http.request( + "/api/v1/solutions", + query=query, + response_type=SolutionListResponse, + ) def create(self, input: SolutionCreateInput) -> SolutionImportResponse: - return self._http.request("/api/v1/solutions", method="POST", body=input) + return self._http.request( + "/api/v1/solutions", + method="POST", + body=input, + response_type=SolutionImportResponse, + ) def delete(self, solution: str) -> None: self._http.request(f"/api/v1/solutions/{solution}", method="DELETE") def get(self, solution: str) -> SolutionSummary: - return self._http.request(f"/api/v1/solutions/{solution}") + return self._http.request(f"/api/v1/solutions/{solution}", response_type=SolutionSummary) def dependents(self, solution: str) -> SolutionDependentsResponse: - return self._http.request(f"/api/v1/solutions/{solution}/dependents") + return self._http.request( + f"/api/v1/solutions/{solution}/dependents", + response_type=SolutionDependentsResponse, + ) def install(self, solution: str, input: SolutionInstallInput) -> SolutionInstallResponse: return self._http.request( f"/api/v1/solutions/{solution}/install", method="POST", body=input, + response_type=SolutionInstallResponse, ) def readme(self, solution: str, token: str, *, file: str | None = None) -> dict[str, str]: @@ -299,4 +329,5 @@ def upgrade(self, solution: str, input: SolutionUpgradeInput) -> SolutionUpgrade f"/api/v1/solutions/{solution}/upgrade", method="POST", body=input, + response_type=SolutionUpgradeResponse, ) diff --git a/src/archastro/platform/v1/resources/team_memberships.py b/src/archastro/platform/v1/resources/team_memberships.py index 22336bf..4379530 100644 --- a/src/archastro/platform/v1/resources/team_memberships.py +++ b/src/archastro/platform/v1/resources/team_memberships.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: baf16dd265b4 +# Content hash: f2237b04ef91 from __future__ import annotations @@ -32,7 +32,11 @@ async def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return await self._http.request("/api/v1/team_memberships", query=query) + return await self._http.request( + "/api/v1/team_memberships", + query=query, + response_type=TeamMembershipListResponse, + ) async def delete(self, team_membership: str) -> None: await self._http.request(f"/api/v1/team_memberships/{team_membership}", method="DELETE") @@ -62,7 +66,11 @@ def list( query["page"] = page if page_size is not None: query["pageSize"] = page_size - return self._http.request("/api/v1/team_memberships", query=query) + return self._http.request( + "/api/v1/team_memberships", + query=query, + response_type=TeamMembershipListResponse, + ) def delete(self, team_membership: str) -> None: self._http.request(f"/api/v1/team_memberships/{team_membership}", method="DELETE") diff --git a/src/archastro/platform/v1/resources/teams.py b/src/archastro/platform/v1/resources/teams.py index 44ea384..0bf6002 100644 --- a/src/archastro/platform/v1/resources/teams.py +++ b/src/archastro/platform/v1/resources/teams.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 90ede59bd117 +# Content hash: 9fc2fc2f3950 from __future__ import annotations from datetime import datetime -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -17,11 +17,11 @@ class TeamArtifactCreateInput(TypedDict): - artifact: dict[str, object] # Artifact attributes + artifact: dict[str, Any] # Artifact attributes class TeamCustomObjectCreateInput(TypedDict): - fields: dict[str, object] # Object field values + fields: dict[str, Any] # Object field values type: str # Object schema type (lookup_key) @@ -50,7 +50,7 @@ class TeamThreadCreateInputThread(TypedDict, total=False): description: str | None # Thread description is_unlisted: bool | None # Whether the thread is unlisted key: str | None # Unique key for the thread - metadata: dict[str, object] | None # Additional metadata + metadata: dict[str, Any] | None # Additional metadata muted: bool | None # Whether notifications are muted for this thread org_id: str | None # Organization ID profile_picture: TeamThreadCreateInputThreadProfilePicture | None @@ -89,7 +89,7 @@ class TeamCreateInputAcl(TypedDict, total=False): class TeamCreateInput(TypedDict, total=False): acl: TeamCreateInputAcl | None # Access control list description: str | None # Team description - metadata: dict[str, object] | None # Arbitrary key-value metadata + metadata: dict[str, Any] | None # Arbitrary key-value metadata name: Required[str] # Team name org: str | None # Organization ID @@ -134,7 +134,7 @@ class TeamUpdateInputProfilePicture(TypedDict, total=False): class TeamUpdateInput(TypedDict, total=False): acl: TeamUpdateInputAcl | None # Access control list description: str | None # Team description - metadata: dict[str, object] | None # Arbitrary key-value metadata + metadata: dict[str, Any] | None # Arbitrary key-value metadata name: str | None # Team name profile_picture: TeamUpdateInputProfilePicture | None # Base64-encoded profile picture @@ -183,7 +183,7 @@ class TeamArtifactListResponse(BaseModel): class TeamCustomObjectListResponseDataItem(BaseModel): created_at: datetime | None = None # Created timestamp - fields: dict[str, object] | None = None # Object field values + fields: dict[str, Any] | None = None # Object field values id: str # Public ID (cobj_...) org: str | None = None # Organization row_key: str | None = None # Row key @@ -197,7 +197,7 @@ class TeamCustomObjectListResponseDataItem(BaseModel): class TeamCustomObjectListResponse(BaseModel): data: list[TeamCustomObjectListResponseDataItem] # The objects - meta: dict[str, object] | None = None # Pagination metadata + meta: dict[str, Any] | None = None # Pagination metadata class MemberListResponseDataItemAgentAclAddItem(BaseModel): @@ -243,7 +243,7 @@ class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel): latest_solution: str | None = None latest_version: str | None = None lookup_key: str | None = None # Stored lookup_key - metadata: dict[str, object] | None = None # Arbitrary Solution metadata (e.g. category) + metadata: dict[str, Any] | None = None # Arbitrary Solution metadata (e.g. category) name: str | None = None # Display name (from Solution body) org: str | None = None # Organization owners: list[str] @@ -285,7 +285,7 @@ class MemberListResponseDataItemAgent(BaseModel): identity: str | None = None # Identity prompt last_applied_template_config: str | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Agent name org: str | None = None # Organization org_name: str | None = None @@ -313,7 +313,7 @@ class MemberListResponseDataItemUser(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -326,11 +326,11 @@ class MemberListResponseDataItem(BaseModel): created_at: datetime | None = None # Creation timestamp id: str # Membership ID joined_at: datetime | None = None # Join timestamp - metadata: dict[str, object] | None = None # Membership metadata + metadata: dict[str, Any] | None = None # Membership metadata name: str | None = None # Member name profile_picture: MemberListResponseDataItemProfilePicture | None = None # Profile picture role: str | None = None # Role in team - team: dict[str, object] | None = None # Team object (when loaded) + team: dict[str, Any] | None = None # Team object (when loaded) type: str | None = None # Member type (user, agent, unknown) updated_at: datetime | None = None # Last update timestamp user: MemberListResponseDataItemUser | None = None # User object (when loaded) @@ -345,7 +345,7 @@ class TeamThreadListResponseDataItemCreator(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -422,7 +422,7 @@ class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): image_width: int | None = None # Preview image width (scraped_link type) media_type: str | None = None # Media type (media type) name: str | None = None # Media name (media type) - object: dict[str, object] | None = None # Embedded object (task, action types) + object: dict[str, Any] | None = None # Embedded object (task, action types) title: str | None = None # Title (scraped_link, artifact, task types) type: str # Attachment type: file, scraped_link, artifact, task, media, action url: str | None = None # URL to the resource (file, scraped_link, artifact, media types) @@ -434,7 +434,7 @@ class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel): - payload: dict[str, object] | None = None # Reaction payload (e.g., {emoji: '👍'}) + payload: dict[str, Any] | None = None # Reaction payload (e.g., {emoji: '👍'}) type: str # Reaction type (e.g., emoji_reaction) user: str | None = None # User who added the reaction @@ -450,15 +450,15 @@ class TeamThreadListResponseDataItemParentMessage(BaseModel): id: str # Message ID (msg_...) idempotency_key: str | None = None # Client-provided idempotency key legacy_agent: str | None = None # Legacy agent if sent by legacy chat agent - metadata: dict[str, object] | None = None # Message metadata + metadata: dict[str, Any] | None = None # Message metadata org: str | None = None # Organization reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = None rendering_mode: str | None = None # Rendering mode hint - replies: list[dict[str, object]] | None = None # Inline replies (if loaded) + replies: list[dict[str, Any]] | None = None # Inline replies (if loaded) replies_after_cursor: str | None = None # Cursor for replies pagination replies_before_cursor: str | None = None # Cursor for replies pagination reply_count: int | None = None # Number of replies - reply_to: dict[str, object] | None = None # Parent message object (if loaded) + reply_to: dict[str, Any] | None = None # Parent message object (if loaded) sandbox: str | None = None # Sandbox identifier team: str | None = None # Team thread: str | None = None # Parent thread @@ -470,7 +470,7 @@ class TeamThreadListResponseDataItemParticipantsItem(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -523,7 +523,7 @@ class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutio latest_solution: str | None = None latest_version: str | None = None lookup_key: str | None = None # Stored lookup_key - metadata: dict[str, object] | None = None # Arbitrary Solution metadata (e.g. category) + metadata: dict[str, Any] | None = None # Arbitrary Solution metadata (e.g. category) name: str | None = None # Display name (from Solution body) org: str | None = None # Organization owners: list[str] @@ -567,7 +567,7 @@ class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel): identity: str | None = None # Identity prompt last_applied_template_config: str | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Agent name org: str | None = None # Organization org_name: str | None = None @@ -598,7 +598,7 @@ class TeamThreadListResponseDataItem(BaseModel): is_unlisted: bool | None = None # Whether this thread is unlisted key: str | None = None # Thread key last_activity: datetime | None = None # Last activity timestamp - metadata: dict[str, object] | None = None # Thread metadata + metadata: dict[str, Any] | None = None # Thread metadata muted: bool | None = None # Whether notifications are muted for this thread org: str | None = None # Organization parent_message: TeamThreadListResponseDataItemParentMessage | None = None @@ -610,7 +610,7 @@ class TeamThreadListResponseDataItem(BaseModel): sandbox: str | None = None # Sandbox identifier settings: TeamThreadListResponseDataItemSettings | None = None # Thread settings slug: str | None = None # Thread slug - sub_threads: list[dict[str, object]] | None = None # Sub-threads + sub_threads: list[dict[str, Any]] | None = None # Sub-threads team: str | None = None # Owning team title: str | None = None # Thread title ttl: int | None = None # Time-to-live in seconds @@ -649,12 +649,12 @@ class TeamListResponseDataItemAcl(BaseModel): class TeamListResponseDataItem(BaseModel): acl: TeamListResponseDataItemAcl | None = None app: str | None = None # Application - badges: dict[str, object] | None = None # Badge counts by category + badges: dict[str, Any] | None = None # Badge counts by category created_at: datetime | None = None # Creation timestamp description: str | None = None # Team description id: str # Team ID membership_status: str | None = None - metadata: dict[str, object] | None = None # Team metadata + metadata: dict[str, Any] | None = None # Team metadata name: str | None = None # Team name org: str | None = None # Organization sandbox: str | None = None # Sandbox @@ -681,13 +681,17 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, team: str) -> TeamArtifactListResponse: - return await self._http.request(f"/api/v1/teams/{team}/artifacts") + return await self._http.request( + f"/api/v1/teams/{team}/artifacts", + response_type=TeamArtifactListResponse, + ) async def create(self, team: str, input: TeamArtifactCreateInput) -> Artifact: return await self._http.request( f"/api/v1/teams/{team}/artifacts", method="POST", body=input, + response_type=Artifact, ) @@ -718,13 +722,18 @@ async def list( query["sortKey"] = sort_key if query is not None: query["query"] = query - return await self._http.request(f"/api/v1/teams/{team}/custom_objects", query=query) + return await self._http.request( + f"/api/v1/teams/{team}/custom_objects", + query=query, + response_type=TeamCustomObjectListResponse, + ) async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: return await self._http.request( f"/api/v1/teams/{team}/custom_objects", method="POST", body=input, + response_type=CustomObject, ) @@ -736,16 +745,25 @@ async def remove(self, team: str) -> None: await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") async def list(self, team: str) -> MemberListResponse: - return await self._http.request(f"/api/v1/teams/{team}/members") + return await self._http.request( + f"/api/v1/teams/{team}/members", + response_type=MemberListResponse, + ) async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: - return await self._http.request(f"/api/v1/teams/{team}/members", method="POST", body=input) + return await self._http.request( + f"/api/v1/teams/{team}/members", + method="POST", + body=input, + response_type=TeamMembership, + ) async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: return await self._http.request( f"/api/v1/teams/{team}/members/{user}", method="PATCH", body=input, + response_type=TeamMembership, ) @@ -754,10 +772,18 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, team: str) -> TeamThreadListResponse: - return await self._http.request(f"/api/v1/teams/{team}/threads") + return await self._http.request( + f"/api/v1/teams/{team}/threads", + response_type=TeamThreadListResponse, + ) async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: - return await self._http.request(f"/api/v1/teams/{team}/threads", method="POST", body=input) + return await self._http.request( + f"/api/v1/teams/{team}/threads", + method="POST", + body=input, + response_type=Thread, + ) class AsyncTeamResource: @@ -774,7 +800,7 @@ async def list( page: int | None = None, page_size: int | None = None, search: str | None = None, - metadata: dict[str, object] | None = None, + metadata: dict[str, Any] | None = None, membership: str | None = None, ) -> TeamListResponse: query: dict[str, object] = {} @@ -788,10 +814,19 @@ async def list( query["metadata"] = metadata if membership is not None: query["membership"] = membership - return await self._http.request("/api/v1/teams", query=query) + return await self._http.request( + "/api/v1/teams", + query=query, + response_type=TeamListResponse, + ) async def create(self, input: TeamCreateInput) -> Team: - return await self._http.request("/api/v1/teams", method="POST", body=input) + return await self._http.request( + "/api/v1/teams", + method="POST", + body=input, + response_type=Team, + ) async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: """ @@ -801,22 +836,40 @@ async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: the invite code. For server-to-server requests, provide `agent` or `user` to add that principal to the team instead. """ - return await self._http.request("/api/v1/teams/join_by_code", method="POST", body=input) + return await self._http.request( + "/api/v1/teams/join_by_code", + method="POST", + body=input, + response_type=Team, + ) async def delete(self, team: str) -> None: await self._http.request(f"/api/v1/teams/{team}", method="DELETE") async def get(self, team: str) -> Team: - return await self._http.request(f"/api/v1/teams/{team}") + return await self._http.request(f"/api/v1/teams/{team}", response_type=Team) async def update(self, team: str, input: TeamUpdateInput) -> Team: - return await self._http.request(f"/api/v1/teams/{team}", method="PATCH", body=input) + return await self._http.request( + f"/api/v1/teams/{team}", + method="PATCH", + body=input, + response_type=Team, + ) async def invite(self, team: str) -> TeamInvite: - return await self._http.request(f"/api/v1/teams/{team}/invite", method="POST") + return await self._http.request( + f"/api/v1/teams/{team}/invite", + method="POST", + response_type=TeamInvite, + ) async def invites(self, team: str) -> TeamInvitesResponse: - return await self._http.request(f"/api/v1/teams/{team}/invites", method="POST") + return await self._http.request( + f"/api/v1/teams/{team}/invites", + method="POST", + response_type=TeamInvitesResponse, + ) async def join(self, team: str, input: TeamJoinInput) -> None: """ @@ -839,10 +892,18 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, team: str) -> TeamArtifactListResponse: - return self._http.request(f"/api/v1/teams/{team}/artifacts") + return self._http.request( + f"/api/v1/teams/{team}/artifacts", + response_type=TeamArtifactListResponse, + ) def create(self, team: str, input: TeamArtifactCreateInput) -> Artifact: - return self._http.request(f"/api/v1/teams/{team}/artifacts", method="POST", body=input) + return self._http.request( + f"/api/v1/teams/{team}/artifacts", + method="POST", + body=input, + response_type=Artifact, + ) class TeamCustomObjectResource: @@ -872,10 +933,19 @@ def list( query["sortKey"] = sort_key if query is not None: query["query"] = query - return self._http.request(f"/api/v1/teams/{team}/custom_objects", query=query) + return self._http.request( + f"/api/v1/teams/{team}/custom_objects", + query=query, + response_type=TeamCustomObjectListResponse, + ) def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: - return self._http.request(f"/api/v1/teams/{team}/custom_objects", method="POST", body=input) + return self._http.request( + f"/api/v1/teams/{team}/custom_objects", + method="POST", + body=input, + response_type=CustomObject, + ) class MemberResource: @@ -886,16 +956,22 @@ def remove(self, team: str) -> None: self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") def list(self, team: str) -> MemberListResponse: - return self._http.request(f"/api/v1/teams/{team}/members") + return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse) def create(self, team: str, input: MemberCreateInput) -> TeamMembership: - return self._http.request(f"/api/v1/teams/{team}/members", method="POST", body=input) + return self._http.request( + f"/api/v1/teams/{team}/members", + method="POST", + body=input, + response_type=TeamMembership, + ) def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: return self._http.request( f"/api/v1/teams/{team}/members/{user}", method="PATCH", body=input, + response_type=TeamMembership, ) @@ -904,10 +980,18 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, team: str) -> TeamThreadListResponse: - return self._http.request(f"/api/v1/teams/{team}/threads") + return self._http.request( + f"/api/v1/teams/{team}/threads", + response_type=TeamThreadListResponse, + ) def create(self, team: str, input: TeamThreadCreateInput) -> Thread: - return self._http.request(f"/api/v1/teams/{team}/threads", method="POST", body=input) + return self._http.request( + f"/api/v1/teams/{team}/threads", + method="POST", + body=input, + response_type=Thread, + ) class TeamResource: @@ -924,7 +1008,7 @@ def list( page: int | None = None, page_size: int | None = None, search: str | None = None, - metadata: dict[str, object] | None = None, + metadata: dict[str, Any] | None = None, membership: str | None = None, ) -> TeamListResponse: query: dict[str, object] = {} @@ -938,10 +1022,10 @@ def list( query["metadata"] = metadata if membership is not None: query["membership"] = membership - return self._http.request("/api/v1/teams", query=query) + return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse) def create(self, input: TeamCreateInput) -> Team: - return self._http.request("/api/v1/teams", method="POST", body=input) + return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team) def join_by_code(self, input: TeamJoinByCodeInput) -> Team: """ @@ -951,22 +1035,40 @@ def join_by_code(self, input: TeamJoinByCodeInput) -> Team: the invite code. For server-to-server requests, provide `agent` or `user` to add that principal to the team instead. """ - return self._http.request("/api/v1/teams/join_by_code", method="POST", body=input) + return self._http.request( + "/api/v1/teams/join_by_code", + method="POST", + body=input, + response_type=Team, + ) def delete(self, team: str) -> None: self._http.request(f"/api/v1/teams/{team}", method="DELETE") def get(self, team: str) -> Team: - return self._http.request(f"/api/v1/teams/{team}") + return self._http.request(f"/api/v1/teams/{team}", response_type=Team) def update(self, team: str, input: TeamUpdateInput) -> Team: - return self._http.request(f"/api/v1/teams/{team}", method="PATCH", body=input) + return self._http.request( + f"/api/v1/teams/{team}", + method="PATCH", + body=input, + response_type=Team, + ) def invite(self, team: str) -> TeamInvite: - return self._http.request(f"/api/v1/teams/{team}/invite", method="POST") + return self._http.request( + f"/api/v1/teams/{team}/invite", + method="POST", + response_type=TeamInvite, + ) def invites(self, team: str) -> TeamInvitesResponse: - return self._http.request(f"/api/v1/teams/{team}/invites", method="POST") + return self._http.request( + f"/api/v1/teams/{team}/invites", + method="POST", + response_type=TeamInvitesResponse, + ) def join(self, team: str, input: TeamJoinInput) -> None: """ diff --git a/src/archastro/platform/v1/resources/thread_messages.py b/src/archastro/platform/v1/resources/thread_messages.py index 62ea385..663304a 100644 --- a/src/archastro/platform/v1/resources/thread_messages.py +++ b/src/archastro/platform/v1/resources/thread_messages.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 6b4b4bc470d0 +# Content hash: d665748b33c1 from __future__ import annotations from datetime import datetime -from typing import TypedDict +from typing import Any, TypedDict from pydantic import BaseModel @@ -26,7 +26,7 @@ class ReactionCreateResponseData(BaseModel): feedback_type: str | None = None # Type of feedback (e.g., emoji_reaction) id: str # Reaction ID (umf_...) message: str | None = None # Message the reaction is on - payload: dict[str, object] | None = None # Reaction payload (e.g., {emoji: ...}) + payload: dict[str, Any] | None = None # Reaction payload (e.g., {emoji: ...}) updated_at: datetime | None = None # Last update timestamp user: str | None = None # User who added the reaction @@ -47,6 +47,7 @@ async def create(self, message: str, input: ReactionCreateInput) -> ReactionCrea f"/api/v1/thread_messages/{message}/reactions", method="POST", body=input, + response_type=ReactionCreateResponse, ) @@ -63,6 +64,7 @@ async def replace(self, message: str, input: ThreadMessageReplaceInput) -> Messa f"/api/v1/thread_messages/{message}", method="PUT", body=input, + response_type=Message, ) async def replies( @@ -83,7 +85,11 @@ async def replies( query["limit"] = limit if tree is not None: query["tree"] = tree - return await self._http.request(f"/api/v1/thread_messages/{message}/replies", query=query) + return await self._http.request( + f"/api/v1/thread_messages/{message}/replies", + query=query, + response_type=PaginatedReplies, + ) class ReactionResource: @@ -98,6 +104,7 @@ def create(self, message: str, input: ReactionCreateInput) -> ReactionCreateResp f"/api/v1/thread_messages/{message}/reactions", method="POST", body=input, + response_type=ReactionCreateResponse, ) @@ -110,7 +117,12 @@ def delete(self, message: str) -> None: self._http.request(f"/api/v1/thread_messages/{message}", method="DELETE") def replace(self, message: str, input: ThreadMessageReplaceInput) -> Message: - return self._http.request(f"/api/v1/thread_messages/{message}", method="PUT", body=input) + return self._http.request( + f"/api/v1/thread_messages/{message}", + method="PUT", + body=input, + response_type=Message, + ) def replies( self, @@ -130,4 +142,8 @@ def replies( query["limit"] = limit if tree is not None: query["tree"] = tree - return self._http.request(f"/api/v1/thread_messages/{message}/replies", query=query) + return self._http.request( + f"/api/v1/thread_messages/{message}/replies", + query=query, + response_type=PaginatedReplies, + ) diff --git a/src/archastro/platform/v1/resources/threads.py b/src/archastro/platform/v1/resources/threads.py index 3285e31..0ef55bf 100644 --- a/src/archastro/platform/v1/resources/threads.py +++ b/src/archastro/platform/v1/resources/threads.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 8e5bcac22385 +# Content hash: 87f144c775a3 from __future__ import annotations from datetime import datetime -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -21,7 +21,7 @@ class ThreadMemberCreateInput(TypedDict, total=False): class SettingReplaceInput(TypedDict): - settings: dict[str, object] # Settings to update + settings: dict[str, Any] # Settings to update class ThreadReplaceInputProfilePicture(TypedDict, total=False): @@ -32,7 +32,7 @@ class ThreadReplaceInputProfilePicture(TypedDict, total=False): class ThreadReplaceInput(TypedDict, total=False): description: str | None # Thread description - metadata: dict[str, object] | None # Additional metadata + metadata: dict[str, Any] | None # Additional metadata muted: bool | None # Whether notifications are muted for this thread profile_picture: ThreadReplaceInputProfilePicture | None # Base64 encoded profile picture title: str | None # Thread title @@ -59,7 +59,7 @@ class ThreadMemberListResponseDataItemUser(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -82,7 +82,7 @@ class SettingListResponse(BaseModel): class ThreadAgentsResponse(BaseModel): - data: list[dict[str, object]] # The agents + data: list[dict[str, Any]] # The agents class ThreadArtifactsResponseDataItemImageSource(BaseModel): @@ -185,7 +185,7 @@ class ThreadMessagesResponseDataMessagesItemAttachmentsItem(BaseModel): image_width: int | None = None # Preview image width (scraped_link type) media_type: str | None = None # Media type (media type) name: str | None = None # Media name (media type) - object: dict[str, object] | None = None # Embedded object (task, action types) + object: dict[str, Any] | None = None # Embedded object (task, action types) title: str | None = None # Title (scraped_link, artifact, task types) type: str # Attachment type: file, scraped_link, artifact, task, media, action url: str | None = None # URL to the resource (file, scraped_link, artifact, media types) @@ -195,7 +195,7 @@ class ThreadMessagesResponseDataMessagesItemAttachmentsItem(BaseModel): class ThreadMessagesResponseDataMessagesItemReactionsItem(BaseModel): - payload: dict[str, object] | None = None # Reaction payload (e.g., {emoji: '👍'}) + payload: dict[str, Any] | None = None # Reaction payload (e.g., {emoji: '👍'}) type: str # Reaction type (e.g., emoji_reaction) user: str | None = None # User who added the reaction @@ -211,15 +211,15 @@ class ThreadMessagesResponseDataMessagesItem(BaseModel): id: str # Message ID (msg_...) idempotency_key: str | None = None # Client-provided idempotency key legacy_agent: str | None = None # Legacy agent if sent by legacy chat agent - metadata: dict[str, object] | None = None # Message metadata + metadata: dict[str, Any] | None = None # Message metadata org: str | None = None # Organization reactions: list[ThreadMessagesResponseDataMessagesItemReactionsItem] | None = None rendering_mode: str | None = None # Rendering mode hint - replies: list[dict[str, object]] | None = None # Inline replies (if loaded) + replies: list[dict[str, Any]] | None = None # Inline replies (if loaded) replies_after_cursor: str | None = None # Cursor for replies pagination replies_before_cursor: str | None = None # Cursor for replies pagination reply_count: int | None = None # Number of replies - reply_to: dict[str, object] | None = None # Parent message object (if loaded) + reply_to: dict[str, Any] | None = None # Parent message object (if loaded) sandbox: str | None = None # Sandbox identifier team: str | None = None # Team thread: str | None = None # Parent thread @@ -237,7 +237,7 @@ class ThreadMessagesResponse(BaseModel): class ThreadSearchResponse(BaseModel): - data: list[dict[str, object]] # Matching context items (tagged objects) + data: list[dict[str, Any]] # Matching context items (tagged objects) class AsyncThreadMemberResource: @@ -248,13 +248,17 @@ async def remove(self, thread: str) -> None: await self._http.request(f"/api/v1/threads/{thread}/members", method="DELETE") async def list(self, thread: str) -> ThreadMemberListResponse: - return await self._http.request(f"/api/v1/threads/{thread}/members") + return await self._http.request( + f"/api/v1/threads/{thread}/members", + response_type=ThreadMemberListResponse, + ) async def create(self, thread: str, input: ThreadMemberCreateInput) -> ThreadMember: return await self._http.request( f"/api/v1/threads/{thread}/members", method="POST", body=input, + response_type=ThreadMember, ) @@ -263,13 +267,17 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, thread: str) -> SettingListResponse: - return await self._http.request(f"/api/v1/threads/{thread}/settings") + return await self._http.request( + f"/api/v1/threads/{thread}/settings", + response_type=SettingListResponse, + ) async def replace(self, thread: str, input: SettingReplaceInput) -> ThreadSettings: return await self._http.request( f"/api/v1/threads/{thread}/settings", method="PUT", body=input, + response_type=ThreadSettings, ) @@ -283,16 +291,27 @@ async def delete(self, thread: str) -> None: await self._http.request(f"/api/v1/threads/{thread}", method="DELETE") async def get(self, thread: str) -> Thread: - return await self._http.request(f"/api/v1/threads/{thread}") + return await self._http.request(f"/api/v1/threads/{thread}", response_type=Thread) async def replace(self, thread: str, input: ThreadReplaceInput) -> Thread: - return await self._http.request(f"/api/v1/threads/{thread}", method="PUT", body=input) + return await self._http.request( + f"/api/v1/threads/{thread}", + method="PUT", + body=input, + response_type=Thread, + ) async def agents(self, thread: str) -> ThreadAgentsResponse: - return await self._http.request(f"/api/v1/threads/{thread}/agents") + return await self._http.request( + f"/api/v1/threads/{thread}/agents", + response_type=ThreadAgentsResponse, + ) async def artifacts(self, thread: str) -> ThreadArtifactsResponse: - return await self._http.request(f"/api/v1/threads/{thread}/artifacts") + return await self._http.request( + f"/api/v1/threads/{thread}/artifacts", + response_type=ThreadArtifactsResponse, + ) async def mark_read(self, thread: str, input: ThreadMarkReadInput) -> None: await self._http.request(f"/api/v1/threads/{thread}/mark_read", method="POST", body=input) @@ -315,27 +334,40 @@ async def messages( query["limit"] = limit if include_reply_counts is not None: query["includeReplyCounts"] = include_reply_counts - return await self._http.request(f"/api/v1/threads/{thread}/messages", query=query) + return await self._http.request( + f"/api/v1/threads/{thread}/messages", + query=query, + response_type=ThreadMessagesResponse, + ) async def picture(self, thread: str, input: ThreadPictureInput) -> Thread: return await self._http.request( f"/api/v1/threads/{thread}/picture", method="PUT", body=input, + response_type=Thread, ) async def read_status(self, thread: str, *, user: str | None = None) -> ThreadReadStatus: query: dict[str, object] = {} if user is not None: query["user"] = user - return await self._http.request(f"/api/v1/threads/{thread}/read_status", query=query) + return await self._http.request( + f"/api/v1/threads/{thread}/read_status", + query=query, + response_type=ThreadReadStatus, + ) async def search(self, thread: str, q: str, *, type: str | None = None) -> ThreadSearchResponse: query: dict[str, object] = {} query["q"] = q if type is not None: query["type"] = type - return await self._http.request(f"/api/v1/threads/{thread}/search", query=query) + return await self._http.request( + f"/api/v1/threads/{thread}/search", + query=query, + response_type=ThreadSearchResponse, + ) class ThreadMemberResource: @@ -346,10 +378,18 @@ def remove(self, thread: str) -> None: self._http.request(f"/api/v1/threads/{thread}/members", method="DELETE") def list(self, thread: str) -> ThreadMemberListResponse: - return self._http.request(f"/api/v1/threads/{thread}/members") + return self._http.request( + f"/api/v1/threads/{thread}/members", + response_type=ThreadMemberListResponse, + ) def create(self, thread: str, input: ThreadMemberCreateInput) -> ThreadMember: - return self._http.request(f"/api/v1/threads/{thread}/members", method="POST", body=input) + return self._http.request( + f"/api/v1/threads/{thread}/members", + method="POST", + body=input, + response_type=ThreadMember, + ) class SettingResource: @@ -357,10 +397,18 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, thread: str) -> SettingListResponse: - return self._http.request(f"/api/v1/threads/{thread}/settings") + return self._http.request( + f"/api/v1/threads/{thread}/settings", + response_type=SettingListResponse, + ) def replace(self, thread: str, input: SettingReplaceInput) -> ThreadSettings: - return self._http.request(f"/api/v1/threads/{thread}/settings", method="PUT", body=input) + return self._http.request( + f"/api/v1/threads/{thread}/settings", + method="PUT", + body=input, + response_type=ThreadSettings, + ) class ThreadResource: @@ -373,16 +421,27 @@ def delete(self, thread: str) -> None: self._http.request(f"/api/v1/threads/{thread}", method="DELETE") def get(self, thread: str) -> Thread: - return self._http.request(f"/api/v1/threads/{thread}") + return self._http.request(f"/api/v1/threads/{thread}", response_type=Thread) def replace(self, thread: str, input: ThreadReplaceInput) -> Thread: - return self._http.request(f"/api/v1/threads/{thread}", method="PUT", body=input) + return self._http.request( + f"/api/v1/threads/{thread}", + method="PUT", + body=input, + response_type=Thread, + ) def agents(self, thread: str) -> ThreadAgentsResponse: - return self._http.request(f"/api/v1/threads/{thread}/agents") + return self._http.request( + f"/api/v1/threads/{thread}/agents", + response_type=ThreadAgentsResponse, + ) def artifacts(self, thread: str) -> ThreadArtifactsResponse: - return self._http.request(f"/api/v1/threads/{thread}/artifacts") + return self._http.request( + f"/api/v1/threads/{thread}/artifacts", + response_type=ThreadArtifactsResponse, + ) def mark_read(self, thread: str, input: ThreadMarkReadInput) -> None: self._http.request(f"/api/v1/threads/{thread}/mark_read", method="POST", body=input) @@ -405,20 +464,37 @@ def messages( query["limit"] = limit if include_reply_counts is not None: query["includeReplyCounts"] = include_reply_counts - return self._http.request(f"/api/v1/threads/{thread}/messages", query=query) + return self._http.request( + f"/api/v1/threads/{thread}/messages", + query=query, + response_type=ThreadMessagesResponse, + ) def picture(self, thread: str, input: ThreadPictureInput) -> Thread: - return self._http.request(f"/api/v1/threads/{thread}/picture", method="PUT", body=input) + return self._http.request( + f"/api/v1/threads/{thread}/picture", + method="PUT", + body=input, + response_type=Thread, + ) def read_status(self, thread: str, *, user: str | None = None) -> ThreadReadStatus: query: dict[str, object] = {} if user is not None: query["user"] = user - return self._http.request(f"/api/v1/threads/{thread}/read_status", query=query) + return self._http.request( + f"/api/v1/threads/{thread}/read_status", + query=query, + response_type=ThreadReadStatus, + ) def search(self, thread: str, q: str, *, type: str | None = None) -> ThreadSearchResponse: query: dict[str, object] = {} query["q"] = q if type is not None: query["type"] = type - return self._http.request(f"/api/v1/threads/{thread}/search", query=query) + return self._http.request( + f"/api/v1/threads/{thread}/search", + query=query, + response_type=ThreadSearchResponse, + ) diff --git a/src/archastro/platform/v1/resources/users.py b/src/archastro/platform/v1/resources/users.py index eb03ccb..8119cda 100644 --- a/src/archastro/platform/v1/resources/users.py +++ b/src/archastro/platform/v1/resources/users.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9a41761cb254 +# Content hash: 3bfbdad7cc4d from __future__ import annotations from datetime import datetime -from typing import Required, TypedDict +from typing import Any, Required, TypedDict from pydantic import BaseModel @@ -16,7 +16,7 @@ class UserArtifactCreateInput(TypedDict): - artifact: dict[str, object] # Artifact attributes + artifact: dict[str, Any] # Artifact attributes class UserThreadCreateInputThreadProfilePicture(TypedDict, total=False): @@ -34,7 +34,7 @@ class UserThreadCreateInputThread(TypedDict, total=False): description: str | None # Thread description is_unlisted: bool | None # Whether the thread is unlisted key: str | None # Unique key for the thread - metadata: dict[str, object] | None # Additional metadata + metadata: dict[str, Any] | None # Additional metadata muted: bool | None # Whether notifications are muted for this thread org_id: str | None # Organization ID profile_picture: UserThreadCreateInputThreadProfilePicture | None @@ -48,7 +48,7 @@ class UserThreadCreateInput(TypedDict, total=False): class UserInvitesInputInvite(TypedDict, total=False): - metadata: dict[str, object] | None # Arbitrary JSON metadata attached to the invite + metadata: dict[str, Any] | None # Arbitrary JSON metadata attached to the invite persona_id: str | None # Optional persona to bind the invite to thread_id: str | None # Optional thread to bind the invite to (thr_...) @@ -66,7 +66,7 @@ class UserProfileInputProfilePicture(TypedDict, total=False): class UserProfileInput(TypedDict, total=False): alias: str | None # Display alias full_name: str | None # Full name - metadata: dict[str, object] | None # User metadata + metadata: dict[str, Any] | None # User metadata profile_picture: UserProfileInputProfilePicture | None # Base64 encoded profile picture @@ -110,7 +110,7 @@ class UserThreadListResponseDataItemCreator(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -187,7 +187,7 @@ class UserThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): image_width: int | None = None # Preview image width (scraped_link type) media_type: str | None = None # Media type (media type) name: str | None = None # Media name (media type) - object: dict[str, object] | None = None # Embedded object (task, action types) + object: dict[str, Any] | None = None # Embedded object (task, action types) title: str | None = None # Title (scraped_link, artifact, task types) type: str # Attachment type: file, scraped_link, artifact, task, media, action url: str | None = None # URL to the resource (file, scraped_link, artifact, media types) @@ -199,7 +199,7 @@ class UserThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): class UserThreadListResponseDataItemParentMessageReactionsItem(BaseModel): - payload: dict[str, object] | None = None # Reaction payload (e.g., {emoji: '👍'}) + payload: dict[str, Any] | None = None # Reaction payload (e.g., {emoji: '👍'}) type: str # Reaction type (e.g., emoji_reaction) user: str | None = None # User who added the reaction @@ -215,15 +215,15 @@ class UserThreadListResponseDataItemParentMessage(BaseModel): id: str # Message ID (msg_...) idempotency_key: str | None = None # Client-provided idempotency key legacy_agent: str | None = None # Legacy agent if sent by legacy chat agent - metadata: dict[str, object] | None = None # Message metadata + metadata: dict[str, Any] | None = None # Message metadata org: str | None = None # Organization reactions: list[UserThreadListResponseDataItemParentMessageReactionsItem] | None = None rendering_mode: str | None = None # Rendering mode hint - replies: list[dict[str, object]] | None = None # Inline replies (if loaded) + replies: list[dict[str, Any]] | None = None # Inline replies (if loaded) replies_after_cursor: str | None = None # Cursor for replies pagination replies_before_cursor: str | None = None # Cursor for replies pagination reply_count: int | None = None # Number of replies - reply_to: dict[str, object] | None = None # Parent message object (if loaded) + reply_to: dict[str, Any] | None = None # Parent message object (if loaded) sandbox: str | None = None # Sandbox identifier team: str | None = None # Team thread: str | None = None # Parent thread @@ -235,7 +235,7 @@ class UserThreadListResponseDataItemParticipantsItem(BaseModel): email: str | None = None # User email address id: str # User ID is_system_user: bool | None = None # Whether this user is a system user - metadata: dict[str, object] | None = None # User metadata + metadata: dict[str, Any] | None = None # User metadata name: str | None = None # User display name. Null when the user has not set a name. org: str | None = None # Organization org_name: str | None = None @@ -288,7 +288,7 @@ class UserThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutio latest_solution: str | None = None latest_version: str | None = None lookup_key: str | None = None # Stored lookup_key - metadata: dict[str, object] | None = None # Arbitrary Solution metadata (e.g. category) + metadata: dict[str, Any] | None = None # Arbitrary Solution metadata (e.g. category) name: str | None = None # Display name (from Solution body) org: str | None = None # Organization owners: list[str] @@ -332,7 +332,7 @@ class UserThreadListResponseDataItemParticipatingAgentsItem(BaseModel): identity: str | None = None # Identity prompt last_applied_template_config: str | None = None lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata + metadata: dict[str, Any] | None = None # Arbitrary metadata name: str | None = None # Agent name org: str | None = None # Organization org_name: str | None = None @@ -363,7 +363,7 @@ class UserThreadListResponseDataItem(BaseModel): is_unlisted: bool | None = None # Whether this thread is unlisted key: str | None = None # Thread key last_activity: datetime | None = None # Last activity timestamp - metadata: dict[str, object] | None = None # Thread metadata + metadata: dict[str, Any] | None = None # Thread metadata muted: bool | None = None # Whether notifications are muted for this thread org: str | None = None # Organization parent_message: UserThreadListResponseDataItemParentMessage | None = None @@ -375,7 +375,7 @@ class UserThreadListResponseDataItem(BaseModel): sandbox: str | None = None # Sandbox identifier settings: UserThreadListResponseDataItemSettings | None = None # Thread settings slug: str | None = None # Thread slug - sub_threads: list[dict[str, object]] | None = None # Sub-threads + sub_threads: list[dict[str, Any]] | None = None # Sub-threads team: str | None = None # Owning team title: str | None = None # Thread title ttl: int | None = None # Time-to-live in seconds @@ -412,13 +412,17 @@ def __init__(self, http: HttpClient): self._http = http async def list(self, user: str) -> UserArtifactListResponse: - return await self._http.request(f"/api/v1/users/{user}/artifacts") + return await self._http.request( + f"/api/v1/users/{user}/artifacts", + response_type=UserArtifactListResponse, + ) async def create(self, user: str, input: UserArtifactCreateInput) -> Artifact: return await self._http.request( f"/api/v1/users/{user}/artifacts", method="POST", body=input, + response_type=Artifact, ) @@ -431,17 +435,26 @@ async def list( user: str, *, agent: list[str] | None = None, - filter: list[dict[str, object]] | None = None, + filter: list[dict[str, Any]] | None = None, ) -> UserThreadListResponse: query: dict[str, object] = {} if agent is not None: query["agent"] = agent if filter is not None: query["filter"] = filter - return await self._http.request(f"/api/v1/users/{user}/threads", query=query) + return await self._http.request( + f"/api/v1/users/{user}/threads", + query=query, + response_type=UserThreadListResponse, + ) async def create(self, user: str, input: UserThreadCreateInput) -> Thread: - return await self._http.request(f"/api/v1/users/{user}/threads", method="POST", body=input) + return await self._http.request( + f"/api/v1/users/{user}/threads", + method="POST", + body=input, + response_type=Thread, + ) class AsyncUserResource: @@ -451,19 +464,32 @@ def __init__(self, http: HttpClient): self.threads = AsyncUserThreadResource(http) async def me(self) -> User: - return await self._http.request("/api/v1/users/me") + return await self._http.request("/api/v1/users/me", response_type=User) async def get(self, user: str) -> User: - return await self._http.request(f"/api/v1/users/{user}") + return await self._http.request(f"/api/v1/users/{user}", response_type=User) async def invites(self, user: str, input: UserInvitesInput) -> UserInvite: - return await self._http.request(f"/api/v1/users/{user}/invites", method="POST", body=input) + return await self._http.request( + f"/api/v1/users/{user}/invites", + method="POST", + body=input, + response_type=UserInvite, + ) async def orgs(self, user: str) -> UserOrgsResponse: - return await self._http.request(f"/api/v1/users/{user}/orgs") + return await self._http.request( + f"/api/v1/users/{user}/orgs", + response_type=UserOrgsResponse, + ) async def profile(self, user: str, input: UserProfileInput) -> User: - return await self._http.request(f"/api/v1/users/{user}/profile", method="PUT", body=input) + return await self._http.request( + f"/api/v1/users/{user}/profile", + method="PUT", + body=input, + response_type=User, + ) class UserArtifactResource: @@ -471,10 +497,18 @@ def __init__(self, http: SyncHttpClient): self._http = http def list(self, user: str) -> UserArtifactListResponse: - return self._http.request(f"/api/v1/users/{user}/artifacts") + return self._http.request( + f"/api/v1/users/{user}/artifacts", + response_type=UserArtifactListResponse, + ) def create(self, user: str, input: UserArtifactCreateInput) -> Artifact: - return self._http.request(f"/api/v1/users/{user}/artifacts", method="POST", body=input) + return self._http.request( + f"/api/v1/users/{user}/artifacts", + method="POST", + body=input, + response_type=Artifact, + ) class UserThreadResource: @@ -486,17 +520,26 @@ def list( user: str, *, agent: list[str] | None = None, - filter: list[dict[str, object]] | None = None, + filter: list[dict[str, Any]] | None = None, ) -> UserThreadListResponse: query: dict[str, object] = {} if agent is not None: query["agent"] = agent if filter is not None: query["filter"] = filter - return self._http.request(f"/api/v1/users/{user}/threads", query=query) + return self._http.request( + f"/api/v1/users/{user}/threads", + query=query, + response_type=UserThreadListResponse, + ) def create(self, user: str, input: UserThreadCreateInput) -> Thread: - return self._http.request(f"/api/v1/users/{user}/threads", method="POST", body=input) + return self._http.request( + f"/api/v1/users/{user}/threads", + method="POST", + body=input, + response_type=Thread, + ) class UserResource: @@ -506,16 +549,26 @@ def __init__(self, http: SyncHttpClient): self.threads = UserThreadResource(http) def me(self) -> User: - return self._http.request("/api/v1/users/me") + return self._http.request("/api/v1/users/me", response_type=User) def get(self, user: str) -> User: - return self._http.request(f"/api/v1/users/{user}") + return self._http.request(f"/api/v1/users/{user}", response_type=User) def invites(self, user: str, input: UserInvitesInput) -> UserInvite: - return self._http.request(f"/api/v1/users/{user}/invites", method="POST", body=input) + return self._http.request( + f"/api/v1/users/{user}/invites", + method="POST", + body=input, + response_type=UserInvite, + ) def orgs(self, user: str) -> UserOrgsResponse: - return self._http.request(f"/api/v1/users/{user}/orgs") + return self._http.request(f"/api/v1/users/{user}/orgs", response_type=UserOrgsResponse) def profile(self, user: str, input: UserProfileInput) -> User: - return self._http.request(f"/api/v1/users/{user}/profile", method="PUT", body=input) + return self._http.request( + f"/api/v1/users/{user}/profile", + method="PUT", + body=input, + response_type=User, + ) diff --git a/src/archastro/py.typed b/src/archastro/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/tests/contract/v1/test_activity_feed.py b/tests/contract/v1/test_activity_feed.py index 1c6bb05..3099eb8 100644 --- a/tests/contract/v1/test_activity_feed.py +++ b/tests/contract/v1/test_activity_feed.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 66a21f55adeb +# Content hash: 3fee0e4488ae import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_activity_feed_list_success(): client = _client() try: result = client.v1.activity_feed.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ActivityFeedListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -88,9 +89,9 @@ async def test_async_activity_feed_list_success(): client = _async_client() try: result = await client.v1.activity_feed.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ActivityFeedListResponse" + assert isinstance(result.data, list) finally: await client.close() diff --git a/tests/contract/v1/test_agent_computers.py b/tests/contract/v1/test_agent_computers.py index 9070730..536f098 100644 --- a/tests/contract/v1/test_agent_computers.py +++ b/tests/contract/v1/test_agent_computers.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 31206b6d6f41 +# Content hash: 20f608ccf404 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -128,7 +129,8 @@ def test_agent_computers_get_success(): client = _client() try: result = client.v1.agent_computers.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputer" finally: client.close() @@ -168,7 +170,8 @@ async def test_async_agent_computers_get_success(): client = _async_client() try: result = await client.v1.agent_computers.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputer" finally: await client.close() @@ -210,7 +213,8 @@ def test_agent_computers_exec_success(): client = _client() try: result = client.v1.agent_computers.exec("test-value", {"command": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ComputerExecResult" finally: client.close() @@ -260,7 +264,8 @@ async def test_async_agent_computers_exec_success(): client = _async_client() try: result = await client.v1.agent_computers.exec("test-value", {"command": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ComputerExecResult" finally: await client.close() @@ -313,7 +318,8 @@ def test_agent_computers_refresh_success(): client = _client() try: result = client.v1.agent_computers.refresh("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputer" finally: client.close() @@ -353,7 +359,8 @@ async def test_async_agent_computers_refresh_success(): client = _async_client() try: result = await client.v1.agent_computers.refresh("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputer" finally: await client.close() diff --git a/tests/contract/v1/test_agent_env_vars.py b/tests/contract/v1/test_agent_env_vars.py index b802829..1c38056 100644 --- a/tests/contract/v1/test_agent_env_vars.py +++ b/tests/contract/v1/test_agent_env_vars.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 6ed796557143 +# Content hash: f207680e5ef6 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -128,7 +129,8 @@ def test_agent_env_vars_get_success(): client = _client() try: result = client.v1.agent_env_vars.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMasked" finally: client.close() @@ -168,7 +170,8 @@ async def test_async_agent_env_vars_get_success(): client = _async_client() try: result = await client.v1.agent_env_vars.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMasked" finally: await client.close() @@ -210,7 +213,8 @@ def test_agent_env_vars_update_success(): client = _client() try: result = client.v1.agent_env_vars.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMasked" finally: client.close() @@ -260,7 +264,8 @@ async def test_async_agent_env_vars_update_success(): client = _async_client() try: result = await client.v1.agent_env_vars.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMasked" finally: await client.close() diff --git a/tests/contract/v1/test_agent_health_actions.py b/tests/contract/v1/test_agent_health_actions.py index 873b930..e37225e 100644 --- a/tests/contract/v1/test_agent_health_actions.py +++ b/tests/contract/v1/test_agent_health_actions.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4238ea16a70d +# Content hash: 7ab4e65a6319 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_health_actions_get_success(): client = _client() try: result = client.v1.agent_health_actions.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentHealthAction" finally: client.close() @@ -86,7 +88,8 @@ async def test_async_agent_health_actions_get_success(): client = _async_client() try: result = await client.v1.agent_health_actions.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentHealthAction" finally: await client.close() @@ -128,7 +131,8 @@ def test_agent_health_actions_verify_success(): client = _client() try: result = client.v1.agent_health_actions.verify("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentHealthAction" finally: client.close() @@ -178,7 +182,8 @@ async def test_async_agent_health_actions_verify_success(): client = _async_client() try: result = await client.v1.agent_health_actions.verify("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentHealthAction" finally: await client.close() diff --git a/tests/contract/v1/test_agent_installations.py b/tests/contract/v1/test_agent_installations.py index 0a38f46..3b2a0ac 100644 --- a/tests/contract/v1/test_agent_installations.py +++ b/tests/contract/v1/test_agent_installations.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 8606c31c1bb3 +# Content hash: 9e1b67526b66 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_installations_list_success(): client = _client() try: result = client.v1.agent_installations.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_agent_installations_list_success(): client = _async_client() try: result = await client.v1.agent_installations.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationListResponse" finally: await client.close() @@ -189,7 +192,8 @@ def test_agent_installations_get_success(): client = _client() try: result = client.v1.agent_installations.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: client.close() @@ -229,7 +233,8 @@ async def test_async_agent_installations_get_success(): client = _async_client() try: result = await client.v1.agent_installations.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: await client.close() @@ -271,7 +276,8 @@ def test_agent_installations_activate_success(): client = _client() try: result = client.v1.agent_installations.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: client.close() @@ -321,7 +327,8 @@ async def test_async_agent_installations_activate_success(): client = _async_client() try: result = await client.v1.agent_installations.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: await client.close() @@ -374,7 +381,8 @@ def test_agent_installations_pause_success(): client = _client() try: result = client.v1.agent_installations.pause("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: client.close() @@ -424,7 +432,8 @@ async def test_async_agent_installations_pause_success(): client = _async_client() try: result = await client.v1.agent_installations.pause("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: await client.close() @@ -477,7 +486,8 @@ def test_agent_installations_suspend_success(): client = _client() try: result = client.v1.agent_installations.suspend("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: client.close() @@ -527,7 +537,8 @@ async def test_async_agent_installations_suspend_success(): client = _async_client() try: result = await client.v1.agent_installations.suspend("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: await client.close() @@ -580,7 +591,8 @@ def test_agent_installations_installation_sources_list_success(): client = _client() try: result = client.v1.agent_installations.installation_sources.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationSourceListResponse" finally: client.close() @@ -620,7 +632,8 @@ async def test_async_agent_installations_installation_sources_list_success(): client = _async_client() try: result = await client.v1.agent_installations.installation_sources.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationSourceListResponse" finally: await client.close() @@ -664,7 +677,8 @@ def test_agent_installations_installation_sources_create_success(): result = client.v1.agent_installations.installation_sources.create( "test-value", {"payload": {}, "type": "test"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationSource" finally: client.close() @@ -724,7 +738,8 @@ async def test_async_agent_installations_installation_sources_create_success(): result = await client.v1.agent_installations.installation_sources.create( "test-value", {"payload": {}, "type": "test"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationSource" finally: await client.close() diff --git a/tests/contract/v1/test_agent_routine_runs.py b/tests/contract/v1/test_agent_routine_runs.py index a1eff91..3c85b8a 100644 --- a/tests/contract/v1/test_agent_routine_runs.py +++ b/tests/contract/v1/test_agent_routine_runs.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: d30e9ae74a61 +# Content hash: 5217722fe47c import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_routine_runs_list_success(): client = _client() try: result = client.v1.agent_routine_runs.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRunListResponse" finally: client.close() @@ -96,7 +98,8 @@ async def test_async_agent_routine_runs_list_success(): client = _async_client() try: result = await client.v1.agent_routine_runs.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRunListResponse" finally: await client.close() diff --git a/tests/contract/v1/test_agent_routines.py b/tests/contract/v1/test_agent_routines.py index c28ce72..4491c61 100644 --- a/tests/contract/v1/test_agent_routines.py +++ b/tests/contract/v1/test_agent_routines.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 1bf1b3e166a9 +# Content hash: 9376f99d1b49 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_routines_list_success(): client = _client() try: result = client.v1.agent_routines.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_agent_routines_list_success(): client = _async_client() try: result = await client.v1.agent_routines.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineListResponse" finally: await client.close() @@ -107,7 +110,8 @@ def test_agent_routines_presets_success(): client = _client() try: result = client.v1.agent_routines.presets() - assert result is not None + assert isinstance(result, list) + assert all(type(item).__name__ == "RoutinePreset" for item in result) finally: client.close() @@ -137,7 +141,8 @@ async def test_async_agent_routines_presets_success(): client = _async_client() try: result = await client.v1.agent_routines.presets() - assert result is not None + assert isinstance(result, list) + assert all(type(item).__name__ == "RoutinePreset" for item in result) finally: await client.close() @@ -250,7 +255,8 @@ def test_agent_routines_get_success(): client = _client() try: result = client.v1.agent_routines.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: client.close() @@ -290,7 +296,8 @@ async def test_async_agent_routines_get_success(): client = _async_client() try: result = await client.v1.agent_routines.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: await client.close() @@ -332,7 +339,8 @@ def test_agent_routines_update_success(): client = _client() try: result = client.v1.agent_routines.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: client.close() @@ -382,7 +390,8 @@ async def test_async_agent_routines_update_success(): client = _async_client() try: result = await client.v1.agent_routines.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: await client.close() @@ -435,7 +444,8 @@ def test_agent_routines_activate_success(): client = _client() try: result = client.v1.agent_routines.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: client.close() @@ -485,7 +495,8 @@ async def test_async_agent_routines_activate_success(): client = _async_client() try: result = await client.v1.agent_routines.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: await client.close() @@ -538,7 +549,8 @@ def test_agent_routines_invoke_success(): client = _client() try: result = client.v1.agent_routines.invoke("test-value", {"message": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRun" finally: client.close() @@ -608,7 +620,8 @@ async def test_async_agent_routines_invoke_success(): client = _async_client() try: result = await client.v1.agent_routines.invoke("test-value", {"message": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRun" finally: await client.close() @@ -683,7 +696,8 @@ def test_agent_routines_pause_success(): client = _client() try: result = client.v1.agent_routines.pause("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: client.close() @@ -723,7 +737,8 @@ async def test_async_agent_routines_pause_success(): client = _async_client() try: result = await client.v1.agent_routines.pause("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: await client.close() @@ -765,7 +780,8 @@ def test_agent_routines_runs_success(): client = _client() try: result = client.v1.agent_routines.runs("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRunListResponse" finally: client.close() @@ -815,7 +831,8 @@ async def test_async_agent_routines_runs_success(): client = _async_client() try: result = await client.v1.agent_routines.runs("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRunListResponse" finally: await client.close() @@ -868,7 +885,8 @@ def test_agent_routines_agent_routine_runs_get_success(): client = _client() try: result = client.v1.agent_routines.agent_routine_runs.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRun" finally: client.close() @@ -908,7 +926,8 @@ async def test_async_agent_routines_agent_routine_runs_get_success(): client = _async_client() try: result = await client.v1.agent_routines.agent_routine_runs.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutineRun" finally: await client.close() diff --git a/tests/contract/v1/test_agent_sessions.py b/tests/contract/v1/test_agent_sessions.py index 52f564c..a56076c 100644 --- a/tests/contract/v1/test_agent_sessions.py +++ b/tests/contract/v1/test_agent_sessions.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: f7fa2672c91c +# Content hash: 3106dc4a0f47 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_sessions_list_success(): client = _client() try: result = client.v1.agent_sessions.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSessionListResponse" finally: client.close() @@ -86,7 +88,8 @@ async def test_async_agent_sessions_list_success(): client = _async_client() try: result = await client.v1.agent_sessions.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSessionListResponse" finally: await client.close() @@ -130,7 +133,8 @@ def test_agent_sessions_create_success(): result = client.v1.agent_sessions.create( {"agent": "test-value", "instructions": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: client.close() @@ -182,7 +186,8 @@ async def test_async_agent_sessions_create_success(): result = await client.v1.agent_sessions.create( {"agent": "test-value", "instructions": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: await client.close() @@ -317,7 +322,8 @@ def test_agent_sessions_get_success(): client = _client() try: result = client.v1.agent_sessions.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: client.close() @@ -357,7 +363,8 @@ async def test_async_agent_sessions_get_success(): client = _async_client() try: result = await client.v1.agent_sessions.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: await client.close() @@ -399,7 +406,8 @@ def test_agent_sessions_update_success(): client = _client() try: result = client.v1.agent_sessions.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: client.close() @@ -449,7 +457,8 @@ async def test_async_agent_sessions_update_success(): client = _async_client() try: result = await client.v1.agent_sessions.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: await client.close() @@ -502,7 +511,8 @@ def test_agent_sessions_cancel_success(): client = _client() try: result = client.v1.agent_sessions.cancel("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: client.close() @@ -542,7 +552,8 @@ async def test_async_agent_sessions_cancel_success(): client = _async_client() try: result = await client.v1.agent_sessions.cancel("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: await client.close() @@ -584,7 +595,8 @@ def test_agent_sessions_message_success(): client = _client() try: result = client.v1.agent_sessions.message("test-value", {"content": "test content"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: client.close() @@ -634,7 +646,8 @@ async def test_async_agent_sessions_message_success(): client = _async_client() try: result = await client.v1.agent_sessions.message("test-value", {"content": "test content"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSession" finally: await client.close() diff --git a/tests/contract/v1/test_agent_skills.py b/tests/contract/v1/test_agent_skills.py index 216cab4..80082ea 100644 --- a/tests/contract/v1/test_agent_skills.py +++ b/tests/contract/v1/test_agent_skills.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a848df03e938 +# Content hash: cb44d7785038 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_skills_list_success(): client = _client() try: result = client.v1.agent_skills.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkillList" finally: client.close() @@ -86,7 +88,8 @@ async def test_async_agent_skills_list_success(): client = _async_client() try: result = await client.v1.agent_skills.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkillList" finally: await client.close() @@ -128,7 +131,8 @@ def test_agent_skills_create_success(): client = _client() try: result = client.v1.agent_skills.create({"agent": "test-value", "config": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: client.close() @@ -180,7 +184,8 @@ async def test_async_agent_skills_create_success(): result = await client.v1.agent_skills.create( {"agent": "test-value", "config": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: await client.close() @@ -315,7 +320,8 @@ def test_agent_skills_get_success(): client = _client() try: result = client.v1.agent_skills.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: client.close() @@ -355,7 +361,8 @@ async def test_async_agent_skills_get_success(): client = _async_client() try: result = await client.v1.agent_skills.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: await client.close() @@ -397,7 +404,8 @@ def test_agent_skills_update_success(): client = _client() try: result = client.v1.agent_skills.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: client.close() @@ -447,7 +455,8 @@ async def test_async_agent_skills_update_success(): client = _async_client() try: result = await client.v1.agent_skills.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: await client.close() @@ -500,7 +509,8 @@ def test_agent_skills_activate_success(): client = _client() try: result = client.v1.agent_skills.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: client.close() @@ -540,7 +550,8 @@ async def test_async_agent_skills_activate_success(): client = _async_client() try: result = await client.v1.agent_skills.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: await client.close() @@ -582,7 +593,8 @@ def test_agent_skills_deactivate_success(): client = _client() try: result = client.v1.agent_skills.deactivate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: client.close() @@ -622,7 +634,8 @@ async def test_async_agent_skills_deactivate_success(): client = _async_client() try: result = await client.v1.agent_skills.deactivate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSkill" finally: await client.close() diff --git a/tests/contract/v1/test_agent_tools.py b/tests/contract/v1/test_agent_tools.py index bde5479..49021df 100644 --- a/tests/contract/v1/test_agent_tools.py +++ b/tests/contract/v1/test_agent_tools.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2360172ee150 +# Content hash: 5ad59fdcbe76 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agent_tools_list_success(): client = _client() try: result = client.v1.agent_tools.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentToolListResponse" finally: client.close() @@ -86,7 +88,8 @@ async def test_async_agent_tools_list_success(): client = _async_client() try: result = await client.v1.agent_tools.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentToolListResponse" finally: await client.close() @@ -128,7 +131,8 @@ def test_agent_tools_catalog_success(): client = _client() try: result = client.v1.agent_tools.catalog() - assert result is not None + assert isinstance(result, list) + assert all(type(item).__name__ == "BuiltinToolCatalogEntry" for item in result) finally: client.close() @@ -158,7 +162,8 @@ async def test_async_agent_tools_catalog_success(): client = _async_client() try: result = await client.v1.agent_tools.catalog() - assert result is not None + assert isinstance(result, list) + assert all(type(item).__name__ == "BuiltinToolCatalogEntry" for item in result) finally: await client.close() @@ -271,7 +276,8 @@ def test_agent_tools_get_success(): client = _client() try: result = client.v1.agent_tools.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: client.close() @@ -311,7 +317,8 @@ async def test_async_agent_tools_get_success(): client = _async_client() try: result = await client.v1.agent_tools.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: await client.close() @@ -353,7 +360,8 @@ def test_agent_tools_update_success(): client = _client() try: result = client.v1.agent_tools.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: client.close() @@ -403,7 +411,8 @@ async def test_async_agent_tools_update_success(): client = _async_client() try: result = await client.v1.agent_tools.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: await client.close() @@ -456,7 +465,8 @@ def test_agent_tools_activate_success(): client = _client() try: result = client.v1.agent_tools.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: client.close() @@ -506,7 +516,8 @@ async def test_async_agent_tools_activate_success(): client = _async_client() try: result = await client.v1.agent_tools.activate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: await client.close() @@ -559,7 +570,8 @@ def test_agent_tools_deactivate_success(): client = _client() try: result = client.v1.agent_tools.deactivate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: client.close() @@ -599,7 +611,8 @@ async def test_async_agent_tools_deactivate_success(): client = _async_client() try: result = await client.v1.agent_tools.deactivate("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: await client.close() diff --git a/tests/contract/v1/test_agents.py b/tests/contract/v1/test_agents.py index 5d49ff9..cd4d297 100644 --- a/tests/contract/v1/test_agents.py +++ b/tests/contract/v1/test_agents.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4a6a66b29917 +# Content hash: 29bb25acf9f4 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_agents_list_success(): client = _client() try: result = client.v1.agents.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_agents_list_success(): client = _async_client() try: result = await client.v1.agents.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentListResponse" finally: await client.close() @@ -107,7 +110,8 @@ def test_agents_create_success(): client = _client() try: result = client.v1.agents.create({}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentCreateResponse" finally: client.close() @@ -177,7 +181,8 @@ async def test_async_agents_create_success(): client = _async_client() try: result = await client.v1.agents.create({}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentCreateResponse" finally: await client.close() @@ -334,7 +339,8 @@ def test_agents_get_success(): client = _client() try: result = client.v1.agents.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Agent" finally: client.close() @@ -374,7 +380,8 @@ async def test_async_agents_get_success(): client = _async_client() try: result = await client.v1.agents.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Agent" finally: await client.close() @@ -416,7 +423,8 @@ def test_agents_update_success(): client = _client() try: result = client.v1.agents.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Agent" finally: client.close() @@ -466,7 +474,8 @@ async def test_async_agents_update_success(): client = _async_client() try: result = await client.v1.agents.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Agent" finally: await client.close() @@ -519,7 +528,8 @@ def test_agents_agent_health_actions_success(): client = _client() try: result = client.v1.agents.agent_health_actions("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "HealthActionListResponse" finally: client.close() @@ -559,7 +569,8 @@ async def test_async_agents_agent_health_actions_success(): client = _async_client() try: result = await client.v1.agents.agent_health_actions("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "HealthActionListResponse" finally: await client.close() @@ -603,7 +614,8 @@ def test_agents_agent_routines_success(): result = client.v1.agents.agent_routines( "test-value", {"handler_type": "test-value", "name": "test-name"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: client.close() @@ -663,7 +675,8 @@ async def test_async_agents_agent_routines_success(): result = await client.v1.agents.agent_routines( "test-value", {"handler_type": "test-value", "name": "test-name"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentRoutine" finally: await client.close() @@ -724,7 +737,8 @@ def test_agents_agent_working_memory_success(): client = _client() try: result = client.v1.agents.agent_working_memory("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "WorkingMemoryEntryListResponse" finally: client.close() @@ -764,7 +778,8 @@ async def test_async_agents_agent_working_memory_success(): client = _async_client() try: result = await client.v1.agents.agent_working_memory("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "WorkingMemoryEntryListResponse" finally: await client.close() @@ -806,7 +821,8 @@ def test_agents_export_success(): client = _client() try: result = client.v1.agents.export("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentExport" finally: client.close() @@ -846,7 +862,8 @@ async def test_async_agents_export_success(): client = _async_client() try: result = await client.v1.agents.export("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentExport" finally: await client.close() @@ -888,7 +905,8 @@ def test_agents_health_success(): client = _client() try: result = client.v1.agents.health("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentHealth" finally: client.close() @@ -928,7 +946,8 @@ async def test_async_agents_health_success(): client = _async_client() try: result = await client.v1.agents.health("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentHealth" finally: await client.close() @@ -970,9 +989,9 @@ def test_agents_search_success(): client = _client() try: result = client.v1.agents.search("test-value", {"query": "test-value"}) - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSearchResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1012,9 +1031,9 @@ async def test_async_agents_search_success(): client = _async_client() try: result = await client.v1.agents.search("test-value", {"query": "test-value"}) - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSearchResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1056,7 +1075,8 @@ def test_agents_threads_success(): client = _client() try: result = client.v1.agents.threads("test-value", {"thread": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: client.close() @@ -1106,7 +1126,8 @@ async def test_async_agents_threads_success(): client = _async_client() try: result = await client.v1.agents.threads("test-value", {"thread": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: await client.close() @@ -1159,7 +1180,8 @@ def test_agents_upgrade_success(): client = _client() try: result = client.v1.agents.upgrade("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentUpgradeResponse" finally: client.close() @@ -1229,7 +1251,8 @@ async def test_async_agents_upgrade_success(): client = _async_client() try: result = await client.v1.agents.upgrade("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentUpgradeResponse" finally: await client.close() @@ -1304,7 +1327,8 @@ def test_agents_agent_computers_list_success(): client = _client() try: result = client.v1.agents.agent_computers.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputerListResponse" finally: client.close() @@ -1344,7 +1368,8 @@ async def test_async_agents_agent_computers_list_success(): client = _async_client() try: result = await client.v1.agents.agent_computers.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputerListResponse" finally: await client.close() @@ -1386,7 +1411,8 @@ def test_agents_agent_computers_create_success(): client = _client() try: result = client.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputer" finally: client.close() @@ -1436,7 +1462,8 @@ async def test_async_agents_agent_computers_create_success(): client = _async_client() try: result = await client.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentComputer" finally: await client.close() @@ -1489,7 +1516,8 @@ def test_agents_agent_env_vars_list_success(): client = _client() try: result = client.v1.agents.agent_env_vars.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMaskedList" finally: client.close() @@ -1529,7 +1557,8 @@ async def test_async_agents_agent_env_vars_list_success(): client = _async_client() try: result = await client.v1.agents.agent_env_vars.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMaskedList" finally: await client.close() @@ -1573,7 +1602,8 @@ def test_agents_agent_env_vars_create_success(): result = client.v1.agents.agent_env_vars.create( "test-value", {"key": "test-key", "value": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMasked" finally: client.close() @@ -1633,7 +1663,8 @@ async def test_async_agents_agent_env_vars_create_success(): result = await client.v1.agents.agent_env_vars.create( "test-value", {"key": "test-key", "value": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentEnvVarMasked" finally: await client.close() @@ -1694,7 +1725,8 @@ def test_agents_agent_installations_list_success(): client = _client() try: result = client.v1.agents.agent_installations.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationListResponse" finally: client.close() @@ -1734,7 +1766,8 @@ async def test_async_agents_agent_installations_list_success(): client = _async_client() try: result = await client.v1.agents.agent_installations.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationListResponse" finally: await client.close() @@ -1776,7 +1809,8 @@ def test_agents_agent_installations_create_success(): client = _client() try: result = client.v1.agents.agent_installations.create("test-value", {"kind": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: client.close() @@ -1826,7 +1860,8 @@ async def test_async_agents_agent_installations_create_success(): client = _async_client() try: result = await client.v1.agents.agent_installations.create("test-value", {"kind": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Installation" finally: await client.close() @@ -1879,7 +1914,8 @@ def test_agents_agent_installations_kinds_success(): client = _client() try: result = client.v1.agents.agent_installations.kinds("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationKindListResponse" finally: client.close() @@ -1909,7 +1945,8 @@ async def test_async_agents_agent_installations_kinds_success(): client = _async_client() try: result = await client.v1.agents.agent_installations.kinds("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "InstallationKindListResponse" finally: await client.close() @@ -1940,7 +1977,8 @@ def test_agents_agent_tools_list_success(): client = _client() try: result = client.v1.agents.agent_tools.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentToolListResponse" finally: client.close() @@ -1980,7 +2018,8 @@ async def test_async_agents_agent_tools_list_success(): client = _async_client() try: result = await client.v1.agents.agent_tools.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentToolListResponse" finally: await client.close() @@ -2022,7 +2061,8 @@ def test_agents_agent_tools_create_success(): client = _client() try: result = client.v1.agents.agent_tools.create("test-value", {"kind": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: client.close() @@ -2072,7 +2112,8 @@ async def test_async_agents_agent_tools_create_success(): client = _async_client() try: result = await client.v1.agents.agent_tools.create("test-value", {"kind": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentTool" finally: await client.close() @@ -2125,7 +2166,8 @@ def test_agents_schedules_list_success(): client = _client() try: result = client.v1.agents.schedules.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ScheduleListResponse" finally: client.close() @@ -2165,7 +2207,8 @@ async def test_async_agents_schedules_list_success(): client = _async_client() try: result = await client.v1.agents.schedules.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ScheduleListResponse" finally: await client.close() @@ -2207,7 +2250,8 @@ def test_agents_schedules_get_success(): client = _client() try: result = client.v1.agents.schedules.get("test-value", "test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSchedule" finally: client.close() @@ -2247,7 +2291,8 @@ async def test_async_agents_schedules_get_success(): client = _async_client() try: result = await client.v1.agents.schedules.get("test-value", "test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AgentSchedule" finally: await client.close() diff --git a/tests/contract/v1/test_ai.py b/tests/contract/v1/test_ai.py index d0867ea..4b0bba3 100644 --- a/tests/contract/v1/test_ai.py +++ b/tests/contract/v1/test_ai.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: dc69ee2e9657 +# Content hash: 2ce841525286 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -48,7 +49,8 @@ def test_ai_chat_completions_success(): result = client.v1.ai.chat.completions( {"messages": [{"role": "user"}], "opts": {"model": "test-model"}} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AICompletionResult" finally: client.close() @@ -108,7 +110,8 @@ async def test_async_ai_chat_completions_success(): result = await client.v1.ai.chat.completions( {"messages": [{"role": "user"}], "opts": {"model": "test-model"}} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AICompletionResult" finally: await client.close() @@ -169,9 +172,9 @@ def test_ai_chat_models_success(): client = _client() try: result = client.v1.ai.chat.models() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ChatModelsResponse" + assert isinstance(result.data, list) finally: client.close() @@ -191,9 +194,9 @@ async def test_async_ai_chat_models_success(): client = _async_client() try: result = await client.v1.ai.chat.models() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ChatModelsResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -218,7 +221,8 @@ def test_ai_image_edits_success(): "prompt": "test-value", } ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AIImageResult" finally: client.close() @@ -278,7 +282,8 @@ async def test_async_ai_image_edits_success(): "prompt": "test-value", } ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AIImageResult" finally: await client.close() @@ -335,7 +340,8 @@ def test_ai_image_generations_success(): client = _client() try: result = client.v1.ai.image.generations({"prompt": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AIImageResult" finally: client.close() @@ -375,7 +381,8 @@ async def test_async_ai_image_generations_success(): client = _async_client() try: result = await client.v1.ai.image.generations({"prompt": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AIImageResult" finally: await client.close() @@ -417,9 +424,9 @@ def test_ai_image_models_success(): client = _client() try: result = client.v1.ai.image.models() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ImageModelsResponse" + assert isinstance(result.data, list) finally: client.close() @@ -439,9 +446,9 @@ async def test_async_ai_image_models_success(): client = _async_client() try: result = await client.v1.ai.image.models() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ImageModelsResponse" + assert isinstance(result.data, list) finally: await client.close() diff --git a/tests/contract/v1/test_artifacts.py b/tests/contract/v1/test_artifacts.py index b2b8ecc..4a54afe 100644 --- a/tests/contract/v1/test_artifacts.py +++ b/tests/contract/v1/test_artifacts.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 98451127b0cf +# Content hash: 1ed82e0d9bb1 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -128,7 +129,8 @@ def test_artifacts_get_success(): client = _client() try: result = client.v1.artifacts.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: client.close() @@ -168,7 +170,8 @@ async def test_async_artifacts_get_success(): client = _async_client() try: result = await client.v1.artifacts.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: await client.close() @@ -210,7 +213,8 @@ def test_artifacts_replace_success(): client = _client() try: result = client.v1.artifacts.replace("test-value", {"from_version": 1}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: client.close() @@ -270,7 +274,8 @@ async def test_async_artifacts_replace_success(): client = _async_client() try: result = await client.v1.artifacts.replace("test-value", {"from_version": 1}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: await client.close() diff --git a/tests/contract/v1/test_automation_runs.py b/tests/contract/v1/test_automation_runs.py index 0f0edf3..cf264e2 100644 --- a/tests/contract/v1/test_automation_runs.py +++ b/tests/contract/v1/test_automation_runs.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: d0e91f045ecb +# Content hash: df82e1026fd3 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_automation_runs_get_success(): client = _client() try: result = client.v1.automation_runs.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AutomationRun" finally: client.close() @@ -86,7 +88,8 @@ async def test_async_automation_runs_get_success(): client = _async_client() try: result = await client.v1.automation_runs.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AutomationRun" finally: await client.close() diff --git a/tests/contract/v1/test_automations.py b/tests/contract/v1/test_automations.py index 04b1597..4b1f720 100644 --- a/tests/contract/v1/test_automations.py +++ b/tests/contract/v1/test_automations.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9664f1a508e5 +# Content hash: f6f8e2b7d6f3 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_automations_invoke_success(): client = _client() try: result = client.v1.automations.invoke("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AutomationRun" finally: client.close() @@ -96,7 +98,8 @@ async def test_async_automations_invoke_success(): client = _async_client() try: result = await client.v1.automations.invoke("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "AutomationRun" finally: await client.close() diff --git a/tests/contract/v1/test_bug_reports.py b/tests/contract/v1/test_bug_reports.py index 0f736c5..7c0e2bc 100644 --- a/tests/contract/v1/test_bug_reports.py +++ b/tests/contract/v1/test_bug_reports.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 175ed1000ff5 +# Content hash: d463f3bda424 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -52,7 +53,8 @@ def test_bug_reports_create_success(): "description": "test description", } ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "BugReport" finally: client.close() @@ -132,7 +134,8 @@ async def test_async_bug_reports_create_success(): "description": "test description", } ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "BugReport" finally: await client.close() diff --git a/tests/contract/v1/test_config.py b/tests/contract/v1/test_config.py index 6f9ed12..5d5f1bc 100644 --- a/tests/contract/v1/test_config.py +++ b/tests/contract/v1/test_config.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 12f52938693a +# Content hash: 39526d8896d2 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_config_list_success(): client = _client() try: result = client.v1.config.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -78,9 +79,9 @@ async def test_async_config_list_success(): client = _async_client() try: result = await client.v1.config.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -113,7 +114,8 @@ def test_config_create_success(): result = client.v1.config.create( {"kind": "test", "mime_type": "application/json", "raw_content": "test content"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -173,7 +175,8 @@ async def test_async_config_create_success(): result = await client.v1.config.create( {"kind": "test", "mime_type": "application/json", "raw_content": "test content"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -234,7 +237,8 @@ def test_config_encrypt_secret_success(): client = _client() try: result = client.v1.config.encrypt_secret({"plaintext": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigEncryptSecretResponse" finally: client.close() @@ -274,7 +278,8 @@ async def test_async_config_encrypt_secret_success(): client = _async_client() try: result = await client.v1.config.encrypt_secret({"plaintext": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigEncryptSecretResponse" finally: await client.close() @@ -316,7 +321,8 @@ def test_config_facets_success(): client = _client() try: result = client.v1.config.facets() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigFacets" finally: client.close() @@ -346,7 +352,8 @@ async def test_async_config_facets_success(): client = _async_client() try: result = await client.v1.config.facets() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigFacets" finally: await client.close() @@ -379,7 +386,8 @@ def test_config_validate_success(): result = client.v1.config.validate( {"kind": "test", "mime_type": "application/json", "raw_content": "test content"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ValidationResult" finally: client.close() @@ -427,7 +435,8 @@ async def test_async_config_validate_success(): result = await client.v1.config.validate( {"kind": "test", "mime_type": "application/json", "raw_content": "test content"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ValidationResult" finally: await client.close() @@ -599,7 +608,8 @@ def test_config_get_success(): client = _client() try: result = client.v1.config.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -659,7 +669,8 @@ async def test_async_config_get_success(): client = _async_client() try: result = await client.v1.config.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -723,7 +734,8 @@ def test_config_update_success(): client = _client() try: result = client.v1.config.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -793,7 +805,8 @@ async def test_async_config_update_success(): client = _async_client() try: result = await client.v1.config.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -868,7 +881,8 @@ def test_config_archive_success(): client = _client() try: result = client.v1.config.archive("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -928,7 +942,8 @@ async def test_async_config_archive_success(): client = _async_client() try: result = await client.v1.config.archive("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -992,7 +1007,8 @@ def test_config_change_owner_success(): client = _client() try: result = client.v1.config.change_owner("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -1052,7 +1068,8 @@ async def test_async_config_change_owner_success(): client = _async_client() try: result = await client.v1.config.change_owner("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -1242,7 +1259,8 @@ def test_config_unarchive_success(): client = _client() try: result = client.v1.config.unarchive("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -1302,7 +1320,8 @@ async def test_async_config_unarchive_success(): client = _async_client() try: result = await client.v1.config.unarchive("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -1366,7 +1385,8 @@ def test_config_versions_success(): client = _client() try: result = client.v1.config.versions("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigVersionsResponse" finally: client.close() @@ -1426,7 +1446,8 @@ async def test_async_config_versions_success(): client = _async_client() try: result = await client.v1.config.versions("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigVersionsResponse" finally: await client.close() @@ -1490,9 +1511,9 @@ def test_config_kinds_list_success(): client = _client() try: result = client.v1.config.kinds.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KindListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1512,9 +1533,9 @@ async def test_async_config_kinds_list_success(): client = _async_client() try: result = await client.v1.config.kinds.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KindListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1534,7 +1555,8 @@ def test_config_kinds_schema_success(): client = _client() try: result = client.v1.config.kinds.schema("test") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigKindSchema" finally: client.close() @@ -1564,7 +1586,8 @@ async def test_async_config_kinds_schema_success(): client = _async_client() try: result = await client.v1.config.kinds.schema("test") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigKindSchema" finally: await client.close() @@ -1595,9 +1618,9 @@ def test_config_system_list_success(): client = _client() try: result = client.v1.config.system.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SystemListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1617,9 +1640,9 @@ async def test_async_config_system_list_success(): client = _async_client() try: result = await client.v1.config.system.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SystemListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1639,7 +1662,8 @@ def test_config_system_facets_success(): client = _client() try: result = client.v1.config.system.facets() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigFacets" finally: client.close() @@ -1659,7 +1683,8 @@ async def test_async_config_system_facets_success(): client = _async_client() try: result = await client.v1.config.system.facets() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ConfigFacets" finally: await client.close() @@ -1679,7 +1704,8 @@ def test_config_system_get_success(): client = _client() try: result = client.v1.config.system.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -1709,7 +1735,8 @@ async def test_async_config_system_get_success(): client = _async_client() try: result = await client.v1.config.system.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() @@ -1740,7 +1767,8 @@ def test_config_system_clone_success(): client = _client() try: result = client.v1.config.system.clone("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: client.close() @@ -1790,7 +1818,8 @@ async def test_async_config_system_clone_success(): client = _async_client() try: result = await client.v1.config.system.clone("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Config" finally: await client.close() diff --git a/tests/contract/v1/test_custom_objects.py b/tests/contract/v1/test_custom_objects.py index c19c180..8ba3c46 100644 --- a/tests/contract/v1/test_custom_objects.py +++ b/tests/contract/v1/test_custom_objects.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 086859d75bd6 +# Content hash: 354acac2532b import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_custom_objects_list_success(): client = _client() try: result = client.v1.custom_objects.list(type="test") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObjectListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_custom_objects_list_success(): client = _async_client() try: result = await client.v1.custom_objects.list(type="test") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObjectListResponse" finally: await client.close() @@ -107,7 +110,8 @@ def test_custom_objects_create_success(): client = _client() try: result = client.v1.custom_objects.create({"fields": {}, "type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObject" finally: client.close() @@ -157,7 +161,8 @@ async def test_async_custom_objects_create_success(): client = _async_client() try: result = await client.v1.custom_objects.create({"fields": {}, "type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObject" finally: await client.close() @@ -210,7 +215,8 @@ def test_custom_objects_delete_success(): client = _client() try: result = client.v1.custom_objects.delete("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObjectDeleteResponse" finally: client.close() @@ -240,7 +246,8 @@ async def test_async_custom_objects_delete_success(): client = _async_client() try: result = await client.v1.custom_objects.delete("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObjectDeleteResponse" finally: await client.close() @@ -271,7 +278,8 @@ def test_custom_objects_get_success(): client = _client() try: result = client.v1.custom_objects.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObject" finally: client.close() @@ -301,7 +309,8 @@ async def test_async_custom_objects_get_success(): client = _async_client() try: result = await client.v1.custom_objects.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObject" finally: await client.close() @@ -332,7 +341,8 @@ def test_custom_objects_replace_success(): client = _client() try: result = client.v1.custom_objects.replace("test-value", {"fields": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObjectReplaceResponse" finally: client.close() @@ -372,7 +382,8 @@ async def test_async_custom_objects_replace_success(): client = _async_client() try: result = await client.v1.custom_objects.replace("test-value", {"fields": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObjectReplaceResponse" finally: await client.close() diff --git a/tests/contract/v1/test_files.py b/tests/contract/v1/test_files.py index a3404b6..4c7b22e 100644 --- a/tests/contract/v1/test_files.py +++ b/tests/contract/v1/test_files.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 33a926166587 +# Content hash: f79dd9ae1a30 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -48,7 +49,8 @@ def test_files_create_success(): result = client.v1.files.create( {"content_type": "test-value", "data": "test-value", "filename": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "StorageFile" finally: client.close() @@ -96,7 +98,8 @@ async def test_async_files_create_success(): result = await client.v1.files.create( {"content_type": "test-value", "data": "test-value", "filename": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "StorageFile" finally: await client.close() diff --git a/tests/contract/v1/test_invites.py b/tests/contract/v1/test_invites.py index a1f9f61..74447a7 100644 --- a/tests/contract/v1/test_invites.py +++ b/tests/contract/v1/test_invites.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 20e09d9fc0ff +# Content hash: 7b4eeebc39b2 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_invites_accept_success(): client = _client() try: result = client.v1.invites.accept({"key": "test-key"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserInvite" finally: client.close() @@ -116,7 +118,8 @@ async def test_async_invites_accept_success(): client = _async_client() try: result = await client.v1.invites.accept({"key": "test-key"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserInvite" finally: await client.close() diff --git a/tests/contract/v1/test_knowledge_documents.py b/tests/contract/v1/test_knowledge_documents.py index 6b30a4b..0fc3162 100644 --- a/tests/contract/v1/test_knowledge_documents.py +++ b/tests/contract/v1/test_knowledge_documents.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 47fc16d80b6c +# Content hash: 0b9309e40a78 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_knowledge_documents_list_success(): client = _client() try: result = client.v1.knowledge_documents.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeDocumentListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -78,9 +79,9 @@ async def test_async_knowledge_documents_list_success(): client = _async_client() try: result = await client.v1.knowledge_documents.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeDocumentListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -193,7 +194,8 @@ def test_knowledge_documents_get_success(): client = _client() try: result = client.v1.knowledge_documents.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ContextDocument" finally: client.close() @@ -233,7 +235,8 @@ async def test_async_knowledge_documents_get_success(): client = _async_client() try: result = await client.v1.knowledge_documents.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ContextDocument" finally: await client.close() @@ -275,7 +278,8 @@ def test_knowledge_documents_content_success(): client = _client() try: result = client.v1.knowledge_documents.content("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ContextDocumentContent" finally: client.close() @@ -325,7 +329,8 @@ async def test_async_knowledge_documents_content_success(): client = _async_client() try: result = await client.v1.knowledge_documents.content("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ContextDocumentContent" finally: await client.close() diff --git a/tests/contract/v1/test_knowledge_sources.py b/tests/contract/v1/test_knowledge_sources.py index 39b4077..fdb78a4 100644 --- a/tests/contract/v1/test_knowledge_sources.py +++ b/tests/contract/v1/test_knowledge_sources.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: bc581d66b6bf +# Content hash: 0495f5a7d349 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_knowledge_sources_list_success(): client = _client() try: result = client.v1.knowledge_sources.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSourceListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -78,9 +79,9 @@ async def test_async_knowledge_sources_list_success(): client = _async_client() try: result = await client.v1.knowledge_sources.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSourceListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -111,7 +112,8 @@ def test_knowledge_sources_create_success(): client = _client() try: result = client.v1.knowledge_sources.create({"type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSource" finally: client.close() @@ -151,7 +153,8 @@ async def test_async_knowledge_sources_create_success(): client = _async_client() try: result = await client.v1.knowledge_sources.create({"type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSource" finally: await client.close() @@ -275,7 +278,8 @@ def test_knowledge_sources_get_success(): client = _client() try: result = client.v1.knowledge_sources.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSource" finally: client.close() @@ -315,7 +319,8 @@ async def test_async_knowledge_sources_get_success(): client = _async_client() try: result = await client.v1.knowledge_sources.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSource" finally: await client.close() @@ -357,7 +362,8 @@ def test_knowledge_sources_update_success(): client = _client() try: result = client.v1.knowledge_sources.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSource" finally: client.close() @@ -407,7 +413,8 @@ async def test_async_knowledge_sources_update_success(): client = _async_client() try: result = await client.v1.knowledge_sources.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSource" finally: await client.close() @@ -460,7 +467,8 @@ def test_knowledge_sources_ingest_success(): client = _client() try: result = client.v1.knowledge_sources.ingest("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ContextIngestion" finally: client.close() @@ -520,7 +528,8 @@ async def test_async_knowledge_sources_ingest_success(): client = _async_client() try: result = await client.v1.knowledge_sources.ingest("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ContextIngestion" finally: await client.close() @@ -584,7 +593,8 @@ def test_knowledge_sources_kinds_list_success(): client = _client() try: result = client.v1.knowledge_sources.kinds.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSourceKindListResponse" finally: client.close() @@ -614,7 +624,8 @@ async def test_async_knowledge_sources_kinds_list_success(): client = _async_client() try: result = await client.v1.knowledge_sources.kinds.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KnowledgeSourceKindListResponse" finally: await client.close() diff --git a/tests/contract/v1/test_kv.py b/tests/contract/v1/test_kv.py index 60e5447..33d013d 100644 --- a/tests/contract/v1/test_kv.py +++ b/tests/contract/v1/test_kv.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 0210d44edbb2 +# Content hash: 199469c19e4c import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_kv_list_success(): client = _client() try: result = client.v1.kv.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntryPage" finally: client.close() @@ -86,7 +88,8 @@ async def test_async_kv_list_success(): client = _async_client() try: result = await client.v1.kv.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntryPage" finally: await client.close() @@ -128,7 +131,8 @@ def test_kv_create_success(): client = _client() try: result = client.v1.kv.create({"key": "test-key", "value": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntry" finally: client.close() @@ -188,7 +192,8 @@ async def test_async_kv_create_success(): client = _async_client() try: result = await client.v1.kv.create({"key": "test-key", "value": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntry" finally: await client.close() @@ -355,7 +360,8 @@ def test_kv_get_success(): client = _client() try: result = client.v1.kv.get("test-key") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntry" finally: client.close() @@ -405,7 +411,8 @@ async def test_async_kv_get_success(): client = _async_client() try: result = await client.v1.kv.get("test-key") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntry" finally: await client.close() @@ -458,7 +465,8 @@ def test_kv_upsert_success(): client = _client() try: result = client.v1.kv.upsert("test-key", {"value": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntry" finally: client.close() @@ -518,7 +526,8 @@ async def test_async_kv_upsert_success(): client = _async_client() try: result = await client.v1.kv.upsert("test-key", {"value": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "KeyValueStorageEntry" finally: await client.close() diff --git a/tests/contract/v1/test_notification_preferences.py b/tests/contract/v1/test_notification_preferences.py index cf41b81..bdd428d 100644 --- a/tests/contract/v1/test_notification_preferences.py +++ b/tests/contract/v1/test_notification_preferences.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 5d9a4bc8b678 +# Content hash: 9e2bd5d3b999 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -128,7 +129,8 @@ def test_notification_preferences_list_success(): client = _client() try: result = client.v1.notification_preferences.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationPreferenceList" finally: client.close() @@ -158,7 +160,8 @@ async def test_async_notification_preferences_list_success(): client = _async_client() try: result = await client.v1.notification_preferences.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationPreferenceList" finally: await client.close() @@ -191,7 +194,8 @@ def test_notification_preferences_replace_success(): result = client.v1.notification_preferences.replace( {"channel": "test-value", "enabled": True, "type": "test"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationPreference" finally: client.close() @@ -239,7 +243,8 @@ async def test_async_notification_preferences_replace_success(): result = await client.v1.notification_preferences.replace( {"channel": "test-value", "enabled": True, "type": "test"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationPreference" finally: await client.close() diff --git a/tests/contract/v1/test_notifications.py b/tests/contract/v1/test_notifications.py index 6717819..72e9f37 100644 --- a/tests/contract/v1/test_notifications.py +++ b/tests/contract/v1/test_notifications.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 1c6ea0f28ef6 +# Content hash: 9fd553fa8a89 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_notifications_list_success(): client = _client() try: result = client.v1.notifications.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -88,9 +89,9 @@ async def test_async_notifications_list_success(): client = _async_client() try: result = await client.v1.notifications.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -193,7 +194,8 @@ def test_notifications_send_success(): client = _client() try: result = client.v1.notifications.send({"type": "test", "user": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Notification" finally: client.close() @@ -253,7 +255,8 @@ async def test_async_notifications_send_success(): client = _async_client() try: result = await client.v1.notifications.send({"type": "test", "user": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Notification" finally: await client.close() @@ -317,7 +320,8 @@ def test_notifications_unread_count_success(): client = _client() try: result = client.v1.notifications.unread_count() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationUnreadCountResponse" finally: client.close() @@ -347,7 +351,8 @@ async def test_async_notifications_unread_count_success(): client = _async_client() try: result = await client.v1.notifications.unread_count() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "NotificationUnreadCountResponse" finally: await client.close() diff --git a/tests/contract/v1/test_orgs.py b/tests/contract/v1/test_orgs.py index 1250ea7..8631af3 100644 --- a/tests/contract/v1/test_orgs.py +++ b/tests/contract/v1/test_orgs.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 8aa0af5a2a23 +# Content hash: 2439f5fd6a83 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_orgs_list_success(): client = _client() try: result = client.v1.orgs.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "OrgListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -78,9 +79,9 @@ async def test_async_orgs_list_success(): client = _async_client() try: result = await client.v1.orgs.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "OrgListResponse" + assert isinstance(result.data, list) finally: await client.close() diff --git a/tests/contract/v1/test_solution_categories.py b/tests/contract/v1/test_solution_categories.py index 7b7be8d..c494074 100644 --- a/tests/contract/v1/test_solution_categories.py +++ b/tests/contract/v1/test_solution_categories.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4073a175f74d +# Content hash: 8158de339b3e import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_solution_categories_list_success(): client = _client() try: result = client.v1.solution_categories.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionCategoryListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_solution_categories_list_success(): client = _async_client() try: result = await client.v1.solution_categories.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionCategoryListResponse" finally: await client.close() diff --git a/tests/contract/v1/test_solution_tags.py b/tests/contract/v1/test_solution_tags.py index 8db2330..1652fbf 100644 --- a/tests/contract/v1/test_solution_tags.py +++ b/tests/contract/v1/test_solution_tags.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: bf613d8f9ab3 +# Content hash: 1e0b7f0007da import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_solution_tags_list_success(): client = _client() try: result = client.v1.solution_tags.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionTagListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_solution_tags_list_success(): client = _async_client() try: result = await client.v1.solution_tags.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionTagListResponse" finally: await client.close() diff --git a/tests/contract/v1/test_solutions.py b/tests/contract/v1/test_solutions.py index d039e04..e438191 100644 --- a/tests/contract/v1/test_solutions.py +++ b/tests/contract/v1/test_solutions.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4d8e3660f3d3 +# Content hash: 27e9fd782e3e import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_solutions_list_success(): client = _client() try: result = client.v1.solutions.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_solutions_list_success(): client = _async_client() try: result = await client.v1.solutions.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionListResponse" finally: await client.close() @@ -107,7 +110,8 @@ def test_solutions_create_success(): client = _client() try: result = client.v1.solutions.create({}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionImportResponse" finally: client.close() @@ -177,7 +181,8 @@ async def test_async_solutions_create_success(): client = _async_client() try: result = await client.v1.solutions.create({}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionImportResponse" finally: await client.close() @@ -334,7 +339,8 @@ def test_solutions_get_success(): client = _client() try: result = client.v1.solutions.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionSummary" finally: client.close() @@ -374,7 +380,8 @@ async def test_async_solutions_get_success(): client = _async_client() try: result = await client.v1.solutions.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionSummary" finally: await client.close() @@ -416,7 +423,8 @@ def test_solutions_dependents_success(): client = _client() try: result = client.v1.solutions.dependents("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionDependentsResponse" finally: client.close() @@ -446,7 +454,8 @@ async def test_async_solutions_dependents_success(): client = _async_client() try: result = await client.v1.solutions.dependents("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionDependentsResponse" finally: await client.close() @@ -477,7 +486,8 @@ def test_solutions_install_success(): client = _client() try: result = client.v1.solutions.install("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionInstallResponse" finally: client.close() @@ -547,7 +557,8 @@ async def test_async_solutions_install_success(): client = _async_client() try: result = await client.v1.solutions.install("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionInstallResponse" finally: await client.close() @@ -685,7 +696,8 @@ def test_solutions_upgrade_success(): client = _client() try: result = client.v1.solutions.upgrade("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionUpgradeResponse" finally: client.close() @@ -745,7 +757,8 @@ async def test_async_solutions_upgrade_success(): client = _async_client() try: result = await client.v1.solutions.upgrade("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SolutionUpgradeResponse" finally: await client.close() diff --git a/tests/contract/v1/test_team_memberships.py b/tests/contract/v1/test_team_memberships.py index d6f3e55..8ebab68 100644 --- a/tests/contract/v1/test_team_memberships.py +++ b/tests/contract/v1/test_team_memberships.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 483e5c83f19d +# Content hash: d90e09aa3547 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_team_memberships_list_success(): client = _client() try: result = client.v1.team_memberships.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamMembershipListResponse" finally: client.close() @@ -76,7 +78,8 @@ async def test_async_team_memberships_list_success(): client = _async_client() try: result = await client.v1.team_memberships.list() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamMembershipListResponse" finally: await client.close() diff --git a/tests/contract/v1/test_teams.py b/tests/contract/v1/test_teams.py index 386f065..dd9ba06 100644 --- a/tests/contract/v1/test_teams.py +++ b/tests/contract/v1/test_teams.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: dddc177190e5 +# Content hash: f36c581e5d1b import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,9 +47,9 @@ def test_teams_list_success(): client = _client() try: result = client.v1.teams.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -88,9 +89,9 @@ async def test_async_teams_list_success(): client = _async_client() try: result = await client.v1.teams.list() - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -132,7 +133,8 @@ def test_teams_create_success(): client = _client() try: result = client.v1.teams.create({"name": "test-name"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: client.close() @@ -172,7 +174,8 @@ async def test_async_teams_create_success(): client = _async_client() try: result = await client.v1.teams.create({"name": "test-name"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: await client.close() @@ -214,7 +217,8 @@ def test_teams_join_by_code_success(): client = _client() try: result = client.v1.teams.join_by_code({}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: client.close() @@ -264,7 +268,8 @@ async def test_async_teams_join_by_code_success(): client = _async_client() try: result = await client.v1.teams.join_by_code({}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: await client.close() @@ -399,7 +404,8 @@ def test_teams_get_success(): client = _client() try: result = client.v1.teams.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: client.close() @@ -439,7 +445,8 @@ async def test_async_teams_get_success(): client = _async_client() try: result = await client.v1.teams.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: await client.close() @@ -481,7 +488,8 @@ def test_teams_update_success(): client = _client() try: result = client.v1.teams.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: client.close() @@ -531,7 +539,8 @@ async def test_async_teams_update_success(): client = _async_client() try: result = await client.v1.teams.update("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Team" finally: await client.close() @@ -584,7 +593,8 @@ def test_teams_invite_success(): client = _client() try: result = client.v1.teams.invite("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamInvite" finally: client.close() @@ -624,7 +634,8 @@ async def test_async_teams_invite_success(): client = _async_client() try: result = await client.v1.teams.invite("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamInvite" finally: await client.close() @@ -666,7 +677,8 @@ def test_teams_invites_success(): client = _client() try: result = client.v1.teams.invites("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamInvitesResponse" finally: client.close() @@ -696,7 +708,8 @@ async def test_async_teams_invites_success(): client = _async_client() try: result = await client.v1.teams.invites("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamInvitesResponse" finally: await client.close() @@ -933,9 +946,9 @@ def test_teams_artifacts_list_success(): client = _client() try: result = client.v1.teams.artifacts.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamArtifactListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -965,9 +978,9 @@ async def test_async_teams_artifacts_list_success(): client = _async_client() try: result = await client.v1.teams.artifacts.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamArtifactListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -998,7 +1011,8 @@ def test_teams_artifacts_create_success(): client = _client() try: result = client.v1.teams.artifacts.create("test-value", {"artifact": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: client.close() @@ -1038,7 +1052,8 @@ async def test_async_teams_artifacts_create_success(): client = _async_client() try: result = await client.v1.teams.artifacts.create("test-value", {"artifact": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: await client.close() @@ -1080,9 +1095,9 @@ def test_teams_custom_objects_list_success(): client = _client() try: result = client.v1.teams.custom_objects.list("test-value", type="test") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamCustomObjectListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1112,9 +1127,9 @@ async def test_async_teams_custom_objects_list_success(): client = _async_client() try: result = await client.v1.teams.custom_objects.list("test-value", type="test") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamCustomObjectListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1145,7 +1160,8 @@ def test_teams_custom_objects_create_success(): client = _client() try: result = client.v1.teams.custom_objects.create("test-value", {"fields": {}, "type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObject" finally: client.close() @@ -1187,7 +1203,8 @@ async def test_async_teams_custom_objects_create_success(): result = await client.v1.teams.custom_objects.create( "test-value", {"fields": {}, "type": "test"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "CustomObject" finally: await client.close() @@ -1332,9 +1349,9 @@ def test_teams_members_list_success(): client = _client() try: result = client.v1.teams.members.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "MemberListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1364,9 +1381,9 @@ async def test_async_teams_members_list_success(): client = _async_client() try: result = await client.v1.teams.members.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "MemberListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1397,7 +1414,8 @@ def test_teams_members_create_success(): client = _client() try: result = client.v1.teams.members.create("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamMembership" finally: client.close() @@ -1437,7 +1455,8 @@ async def test_async_teams_members_create_success(): client = _async_client() try: result = await client.v1.teams.members.create("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamMembership" finally: await client.close() @@ -1479,7 +1498,8 @@ def test_teams_members_update_success(): client = _client() try: result = client.v1.teams.members.update("test-value", "test-value", {"role": "user"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamMembership" finally: client.close() @@ -1539,7 +1559,8 @@ async def test_async_teams_members_update_success(): client = _async_client() try: result = await client.v1.teams.members.update("test-value", "test-value", {"role": "user"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamMembership" finally: await client.close() @@ -1603,9 +1624,9 @@ def test_teams_threads_list_success(): client = _client() try: result = client.v1.teams.threads.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamThreadListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1635,9 +1656,9 @@ async def test_async_teams_threads_list_success(): client = _async_client() try: result = await client.v1.teams.threads.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "TeamThreadListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1668,7 +1689,8 @@ def test_teams_threads_create_success(): client = _client() try: result = client.v1.teams.threads.create("test-value", {"thread": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: client.close() @@ -1708,7 +1730,8 @@ async def test_async_teams_threads_create_success(): client = _async_client() try: result = await client.v1.teams.threads.create("test-value", {"thread": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: await client.close() diff --git a/tests/contract/v1/test_thread_messages.py b/tests/contract/v1/test_thread_messages.py index 38bace9..2c68c4f 100644 --- a/tests/contract/v1/test_thread_messages.py +++ b/tests/contract/v1/test_thread_messages.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a0dcf7fe4db8 +# Content hash: f28a6a62297a import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -149,7 +150,8 @@ def test_thread_messages_replace_success(): client = _client() try: result = client.v1.thread_messages.replace("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Message" finally: client.close() @@ -199,7 +201,8 @@ async def test_async_thread_messages_replace_success(): client = _async_client() try: result = await client.v1.thread_messages.replace("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Message" finally: await client.close() @@ -252,7 +255,8 @@ def test_thread_messages_replies_success(): client = _client() try: result = client.v1.thread_messages.replies("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "PaginatedReplies" finally: client.close() @@ -302,7 +306,8 @@ async def test_async_thread_messages_replies_success(): client = _async_client() try: result = await client.v1.thread_messages.replies("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "PaginatedReplies" finally: await client.close() @@ -458,7 +463,8 @@ def test_thread_messages_reactions_create_success(): client = _client() try: result = client.v1.thread_messages.reactions.create("test-value", {"emoji": "test-value"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ReactionCreateResponse" finally: client.close() @@ -510,7 +516,8 @@ async def test_async_thread_messages_reactions_create_success(): result = await client.v1.thread_messages.reactions.create( "test-value", {"emoji": "test-value"} ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ReactionCreateResponse" finally: await client.close() diff --git a/tests/contract/v1/test_threads.py b/tests/contract/v1/test_threads.py index 21080ac..ac15337 100644 --- a/tests/contract/v1/test_threads.py +++ b/tests/contract/v1/test_threads.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 7f4dd15e5559 +# Content hash: c60d0c0b5fa5 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -128,7 +129,8 @@ def test_threads_get_success(): client = _client() try: result = client.v1.threads.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: client.close() @@ -168,7 +170,8 @@ async def test_async_threads_get_success(): client = _async_client() try: result = await client.v1.threads.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: await client.close() @@ -210,7 +213,8 @@ def test_threads_replace_success(): client = _client() try: result = client.v1.threads.replace("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: client.close() @@ -260,7 +264,8 @@ async def test_async_threads_replace_success(): client = _async_client() try: result = await client.v1.threads.replace("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: await client.close() @@ -313,9 +318,9 @@ def test_threads_agents_success(): client = _client() try: result = client.v1.threads.agents("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadAgentsResponse" + assert isinstance(result.data, list) finally: client.close() @@ -355,9 +360,9 @@ async def test_async_threads_agents_success(): client = _async_client() try: result = await client.v1.threads.agents("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadAgentsResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -399,9 +404,9 @@ def test_threads_artifacts_success(): client = _client() try: result = client.v1.threads.artifacts("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadArtifactsResponse" + assert isinstance(result.data, list) finally: client.close() @@ -441,9 +446,9 @@ async def test_async_threads_artifacts_success(): client = _async_client() try: result = await client.v1.threads.artifacts("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadArtifactsResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -567,7 +572,8 @@ def test_threads_messages_success(): client = _client() try: result = client.v1.threads.messages("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadMessagesResponse" finally: client.close() @@ -607,7 +613,8 @@ async def test_async_threads_messages_success(): client = _async_client() try: result = await client.v1.threads.messages("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadMessagesResponse" finally: await client.close() @@ -658,7 +665,8 @@ def test_threads_picture_success(): } }, ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: client.close() @@ -753,7 +761,8 @@ async def test_async_threads_picture_success(): } }, ) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: await client.close() @@ -842,7 +851,8 @@ def test_threads_read_status_success(): client = _client() try: result = client.v1.threads.read_status("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadReadStatus" finally: client.close() @@ -882,7 +892,8 @@ async def test_async_threads_read_status_success(): client = _async_client() try: result = await client.v1.threads.read_status("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadReadStatus" finally: await client.close() @@ -924,9 +935,9 @@ def test_threads_search_success(): client = _client() try: result = client.v1.threads.search("test-value", q="test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadSearchResponse" + assert isinstance(result.data, list) finally: client.close() @@ -966,9 +977,9 @@ async def test_async_threads_search_success(): client = _async_client() try: result = await client.v1.threads.search("test-value", q="test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadSearchResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1092,9 +1103,9 @@ def test_threads_members_list_success(): client = _client() try: result = client.v1.threads.members.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadMemberListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -1134,9 +1145,9 @@ async def test_async_threads_members_list_success(): client = _async_client() try: result = await client.v1.threads.members.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadMemberListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -1178,7 +1189,8 @@ def test_threads_members_create_success(): client = _client() try: result = client.v1.threads.members.create("test-value", {"type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadMember" finally: client.close() @@ -1218,7 +1230,8 @@ async def test_async_threads_members_create_success(): client = _async_client() try: result = await client.v1.threads.members.create("test-value", {"type": "test"}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadMember" finally: await client.close() @@ -1260,7 +1273,8 @@ def test_threads_settings_list_success(): client = _client() try: result = client.v1.threads.settings.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SettingListResponse" finally: client.close() @@ -1300,7 +1314,8 @@ async def test_async_threads_settings_list_success(): client = _async_client() try: result = await client.v1.threads.settings.list("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "SettingListResponse" finally: await client.close() @@ -1342,7 +1357,8 @@ def test_threads_settings_replace_success(): client = _client() try: result = client.v1.threads.settings.replace("test-value", {"settings": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadSettings" finally: client.close() @@ -1392,7 +1408,8 @@ async def test_async_threads_settings_replace_success(): client = _async_client() try: result = await client.v1.threads.settings.replace("test-value", {"settings": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "ThreadSettings" finally: await client.close() diff --git a/tests/contract/v1/test_users.py b/tests/contract/v1/test_users.py index 780b562..fdb4942 100644 --- a/tests/contract/v1/test_users.py +++ b/tests/contract/v1/test_users.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 3bd0d7654814 +# Content hash: fe747ea01a12 import pytest +from pydantic import BaseModel from archastro.platform import AsyncPlatformClient, PlatformClient from archastro.platform.runtime.http_client import ApiError @@ -46,7 +47,8 @@ def test_users_me_success(): client = _client() try: result = client.v1.users.me() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "User" finally: client.close() @@ -66,7 +68,8 @@ async def test_async_users_me_success(): client = _async_client() try: result = await client.v1.users.me() - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "User" finally: await client.close() @@ -86,7 +89,8 @@ def test_users_get_success(): client = _client() try: result = client.v1.users.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "User" finally: client.close() @@ -116,7 +120,8 @@ async def test_async_users_get_success(): client = _async_client() try: result = await client.v1.users.get("test-value") - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "User" finally: await client.close() @@ -147,7 +152,8 @@ def test_users_invites_success(): client = _client() try: result = client.v1.users.invites("test-value", {"invite": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserInvite" finally: client.close() @@ -207,7 +213,8 @@ async def test_async_users_invites_success(): client = _async_client() try: result = await client.v1.users.invites("test-value", {"invite": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserInvite" finally: await client.close() @@ -271,9 +278,9 @@ def test_users_orgs_success(): client = _client() try: result = client.v1.users.orgs("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserOrgsResponse" + assert isinstance(result.data, list) finally: client.close() @@ -293,9 +300,9 @@ async def test_async_users_orgs_success(): client = _async_client() try: result = await client.v1.users.orgs("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserOrgsResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -315,7 +322,8 @@ def test_users_profile_success(): client = _client() try: result = client.v1.users.profile("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "User" finally: client.close() @@ -345,7 +353,8 @@ async def test_async_users_profile_success(): client = _async_client() try: result = await client.v1.users.profile("test-value", {}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "User" finally: await client.close() @@ -376,9 +385,9 @@ def test_users_artifacts_list_success(): client = _client() try: result = client.v1.users.artifacts.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserArtifactListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -408,9 +417,9 @@ async def test_async_users_artifacts_list_success(): client = _async_client() try: result = await client.v1.users.artifacts.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserArtifactListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -441,7 +450,8 @@ def test_users_artifacts_create_success(): client = _client() try: result = client.v1.users.artifacts.create("test-value", {"artifact": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: client.close() @@ -481,7 +491,8 @@ async def test_async_users_artifacts_create_success(): client = _async_client() try: result = await client.v1.users.artifacts.create("test-value", {"artifact": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Artifact" finally: await client.close() @@ -523,9 +534,9 @@ def test_users_threads_list_success(): client = _client() try: result = client.v1.users.threads.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserThreadListResponse" + assert isinstance(result.data, list) finally: client.close() @@ -555,9 +566,9 @@ async def test_async_users_threads_list_success(): client = _async_client() try: result = await client.v1.users.threads.list("test-value") - assert result is not None - assert "data" in result - assert isinstance(result["data"], list) + assert isinstance(result, BaseModel) + assert type(result).__name__ == "UserThreadListResponse" + assert isinstance(result.data, list) finally: await client.close() @@ -588,7 +599,8 @@ def test_users_threads_create_success(): client = _client() try: result = client.v1.users.threads.create("test-value", {"thread": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: client.close() @@ -628,7 +640,8 @@ async def test_async_users_threads_create_success(): client = _async_client() try: result = await client.v1.users.threads.create("test-value", {"thread": {}}) - assert result is not None + assert isinstance(result, BaseModel) + assert type(result).__name__ == "Thread" finally: await client.close() diff --git a/tests/test_http_client.py b/tests/test_http_client.py index 1635066..11c8b18 100644 --- a/tests/test_http_client.py +++ b/tests/test_http_client.py @@ -5,6 +5,7 @@ import httpx import pytest +from pydantic import BaseModel, ValidationError from archastro.platform.runtime.http_client import ApiError, HttpClient, SyncHttpClient @@ -378,3 +379,355 @@ def test_sync_client_raises_structured_api_error(): assert exc_info.value.status == 403 assert exc_info.value.error_code == "forbidden" assert str(exc_info.value) == "no access" + + +# ─── response_type deserialization ────────────────────────────── + + +class _Widget(BaseModel): + id: str + count: int + + +async def test_deserializes_into_response_type_model(): + client = HttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {"id": "w_1", "count": 3}), + ): + result = await client.request("/api/v1/widgets/w_1", response_type=_Widget) + + assert isinstance(result, _Widget) + assert result.id == "w_1" + assert result.count == 3 + + +async def test_deserializes_into_list_of_response_type_models(): + client = HttpClient(base_url="https://api.test") + body = [{"id": "w_1", "count": 1}, {"id": "w_2", "count": 2}] + resp = httpx.Response( + status_code=200, json=body, request=httpx.Request("GET", "https://api.test") + ) + + with patch.object(client._client, "request", return_value=resp): + result = await client.request("/api/v1/widgets", response_type=list[_Widget]) + + assert isinstance(result, list) + assert all(isinstance(item, _Widget) for item in result) + assert [item.id for item in result] == ["w_1", "w_2"] + + +async def test_returns_raw_dict_without_response_type(): + client = HttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {"id": "w_1", "count": 3}), + ): + result = await client.request("/api/v1/widgets/w_1") + + assert result == {"id": "w_1", "count": 3} + assert not isinstance(result, BaseModel) + + +async def test_204_returns_none_without_response_type(): + client = HttpClient(base_url="https://api.test") + resp = httpx.Response(status_code=204, request=httpx.Request("DELETE", "https://api.test")) + + with patch.object(client._client, "request", return_value=resp): + result = await client.request("/api/v1/widgets/w_1", method="DELETE") + + assert result is None + + +async def test_204_with_response_type_raises_validation_error(): + # A bodyless 204 on an operation that promises a typed body is a server + # contract violation and should fail at the call, not as a downstream + # AttributeError on None. + client = HttpClient(base_url="https://api.test") + resp = httpx.Response(status_code=204, request=httpx.Request("DELETE", "https://api.test")) + + with patch.object(client._client, "request", return_value=resp): + with pytest.raises(ValidationError): + await client.request("/api/v1/widgets/w_1", method="DELETE", response_type=_Widget) + + +async def test_invalid_payload_raises_validation_error(): + client = HttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {"id": "w_1", "count": "not-a-number"}), + ): + with pytest.raises(ValidationError): + await client.request("/api/v1/widgets/w_1", response_type=_Widget) + + +def test_sync_deserializes_into_response_type_model(): + client = SyncHttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {"id": "w_1", "count": 3}), + ): + result = client.request("/api/v1/widgets/w_1", response_type=_Widget) + + assert isinstance(result, _Widget) + assert result.id == "w_1" + assert result.count == 3 + + +def test_sync_deserializes_into_list_of_response_type_models(): + client = SyncHttpClient(base_url="https://api.test") + body = [{"id": "w_1", "count": 1}, {"id": "w_2", "count": 2}] + resp = httpx.Response( + status_code=200, json=body, request=httpx.Request("GET", "https://api.test") + ) + + with patch.object(client._client, "request", return_value=resp): + result = client.request("/api/v1/widgets", response_type=list[_Widget]) + + assert isinstance(result, list) + assert all(isinstance(item, _Widget) for item in result) + + +def test_sync_returns_raw_dict_without_response_type(): + client = SyncHttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {"id": "w_1", "count": 3}), + ): + result = client.request("/api/v1/widgets/w_1") + + assert result == {"id": "w_1", "count": 3} + assert not isinstance(result, BaseModel) + + +def test_sync_204_returns_none_without_response_type(): + client = SyncHttpClient(base_url="https://api.test") + resp = httpx.Response(status_code=204, request=httpx.Request("DELETE", "https://api.test")) + + with patch.object(client._client, "request", return_value=resp): + result = client.request("/api/v1/widgets/w_1", method="DELETE") + + assert result is None + + +def test_sync_204_with_response_type_raises_validation_error(): + client = SyncHttpClient(base_url="https://api.test") + resp = httpx.Response(status_code=204, request=httpx.Request("DELETE", "https://api.test")) + + with patch.object(client._client, "request", return_value=resp): + with pytest.raises(ValidationError): + client.request("/api/v1/widgets/w_1", method="DELETE", response_type=_Widget) + + +def test_sync_invalid_payload_raises_validation_error(): + client = SyncHttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {"id": "w_1", "count": "not-a-number"}), + ): + with pytest.raises(ValidationError): + client.request("/api/v1/widgets/w_1", response_type=_Widget) + + +# ─── request assembly, token sources, and error parsing ──────── + + +async def test_async_client_sends_auth_headers_query_and_json_body(): + client = HttpClient( + base_url="https://api.test", + access_token="sat_test", + path_prefix="/proxy/v1", + default_headers={"x-archastro-api-key": "pk_test"}, + ) + + with patch.object( + client._client, + "request", + new=AsyncMock(return_value=_mock_response(200, {"ok": True})), + ) as request: + result = await client.request( + "/api/v1/things", + method="POST", + body={"name": "demo"}, + query={"limit": 10, "empty": None}, + ) + + assert result == {"ok": True} + request.assert_called_once_with( + "POST", + "https://api.test/proxy/v1/things", + json={"name": "demo"}, + headers={ + "x-archastro-api-key": "pk_test", + "Content-Type": "application/json", + "Authorization": "Bearer sat_test", + }, + params={"limit": 10}, + ) + + +async def test_async_client_drops_body_and_keeps_path_for_get_outside_api_prefix(): + client = HttpClient(base_url="https://api.test", path_prefix="/proxy/v1") + + with patch.object( + client._client, + "request", + new=AsyncMock(return_value=_mock_response(200, {})), + ) as request: + await client.request("/health", body={"ignored": True}) + + request.assert_called_once_with( + "GET", + "https://api.test/health", + json=None, + headers={"Content-Type": "application/json"}, + params=None, + ) + + +async def test_get_access_token_callable_takes_precedence_over_static_token(): + client = HttpClient( + base_url="https://api.test", + access_token="static-token", + get_access_token=lambda: "dynamic-token", + ) + + with patch.object( + client._client, + "request", + new=AsyncMock(return_value=_mock_response(200, {})), + ) as request: + await client.request("/api/v1/things") + + headers = request.call_args.kwargs["headers"] + assert headers["Authorization"] == "Bearer dynamic-token" + + +def test_sync_get_access_token_callable_takes_precedence_over_static_token(): + client = SyncHttpClient( + base_url="https://api.test", + access_token="static-token", + get_access_token=lambda: "dynamic-token", + ) + + with patch.object( + client._client, + "request", + return_value=_mock_response(200, {}), + ) as request: + client.request("/api/v1/things") + + headers = request.call_args.kwargs["headers"] + assert headers["Authorization"] == "Bearer dynamic-token" + + +async def test_async_client_request_raw_returns_bytes_and_mime_type(): + client = HttpClient(base_url="https://api.test") + response = httpx.Response( + status_code=200, + content=b"hello", + headers={"content-type": "text/plain"}, + request=httpx.Request("GET", "https://api.test"), + ) + + with patch.object(client._client, "request", new=AsyncMock(return_value=response)): + result = await client.request_raw("/api/v1/files/file_123/download") + + assert result == {"content": b"hello", "mime_type": "text/plain"} + + +def test_sync_client_throws_original_401_when_refresh_handler_fails(): + def failing_handler() -> str: + raise RuntimeError("refresh token expired") + + client = SyncHttpClient( + base_url="https://api.test", + access_token="expired-token", + on_refresh_token=failing_handler, + ) + + with patch.object( + client._client, + "request", + return_value=_mock_response(401, {"error": "unauthenticated"}), + ): + with pytest.raises(ApiError) as exc_info: + client.request("/api/v1/things") + + assert exc_info.value.status == 401 + + +def test_error_code_falls_back_to_type_when_code_missing(): + client = SyncHttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response( + 422, {"error": {"type": "invalid_request", "message": "bad input"}} + ), + ): + with pytest.raises(ApiError) as exc_info: + client.request("/api/v1/things") + + assert exc_info.value.error_code == "invalid_request" + assert str(exc_info.value) == "bad input" + + +def test_string_error_body_used_as_code_and_message(): + client = SyncHttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(400, {"error": "bad_thing"}), + ): + with pytest.raises(ApiError) as exc_info: + client.request("/api/v1/things") + + assert exc_info.value.error_code == "bad_thing" + assert str(exc_info.value) == "bad_thing" + + +def test_message_only_error_body_keeps_unknown_code(): + client = SyncHttpClient(base_url="https://api.test") + + with patch.object( + client._client, + "request", + return_value=_mock_response(400, {"message": "boom"}), + ): + with pytest.raises(ApiError) as exc_info: + client.request("/api/v1/things") + + assert exc_info.value.error_code == "unknown_error" + assert str(exc_info.value) == "boom" + + +def test_non_json_error_body_falls_back_to_http_status_message(): + client = SyncHttpClient(base_url="https://api.test") + response = httpx.Response( + status_code=500, + content=b"Internal Server Error", + headers={"content-type": "text/html"}, + request=httpx.Request("GET", "https://api.test"), + ) + + with patch.object(client._client, "request", return_value=response): + with pytest.raises(ApiError) as exc_info: + client.request("/api/v1/things") + + assert exc_info.value.error_code == "unknown_error" + assert str(exc_info.value) == "HTTP 500"