assistant-runtime-sdk 1.6.0__tar.gz → 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: assistant_runtime_sdk
3
- Version: 1.6.0
3
+ Version: 1.7.0
4
4
  Summary: Python SDK for FAC Cloud - the Assistant Runtime AI assistant backend
5
5
  Keywords: frappe,ai,assistant,llm,mcp,anthropic,openai,streaming
6
6
  Author: Paul Clinton
@@ -53,7 +53,7 @@ Standalone Functions:
53
53
 
54
54
  """
55
55
 
56
- __version__ = "1.6.0"
56
+ __version__ = "1.7.0"
57
57
  __author__ = "Paul Clinton"
58
58
  __license__ = "AGPL-3.0"
59
59
 
@@ -1737,6 +1737,18 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
1737
1737
  user_id, rating, comment, category, conversation_id, environment)
1738
1738
  return await self._request_post_json(endpoint, payload)
1739
1739
 
1740
+ async def download_ticket_attachment(self, user_id: str, ticket_id: str,
1741
+ file_url: str) -> tuple:
1742
+ """Download one attachment from a ticket the user owns.
1743
+
1744
+ Returns:
1745
+ (content_bytes, content_type, filename) tuple.
1746
+ """
1747
+ endpoint, params = self._prepare_download_ticket_attachment(
1748
+ user_id, ticket_id, file_url
1749
+ )
1750
+ return await self._request_get_raw(endpoint, params)
1751
+
1740
1752
  async def list_tickets(self, user_id: str, status: Optional[str] = None) -> Optional[Dict[str, Any]]:
1741
1753
  """List the user's support tickets. Returns {tickets: [...]}."""
1742
1754
  endpoint, payload = self._prepare_list_tickets(user_id, status)
@@ -1924,6 +1924,16 @@ class BaseAssistantRuntimeClient:
1924
1924
  "ticket_id": ticket_id,
1925
1925
  }
1926
1926
 
1927
+ def _prepare_download_ticket_attachment(self, user_id: str, ticket_id: str,
1928
+ file_url: str) -> tuple:
1929
+ """Returns (endpoint, params)."""
1930
+ return "support.download_ticket_attachment", {
1931
+ "tenant_id": self.tenant_id,
1932
+ "user_id": user_id,
1933
+ "ticket_id": ticket_id,
1934
+ "file_url": file_url,
1935
+ }
1936
+
1927
1937
  def _prepare_reply_to_ticket(self, user_id: str, ticket_id: str, message: str,
1928
1938
  attachment_ids: Optional[List[str]] = None) -> tuple:
1929
1939
  """Returns (endpoint, payload)."""
@@ -2593,6 +2593,21 @@ class AssistantRuntimeClient(BaseAssistantRuntimeClient):
2593
2593
  user_id, rating, comment, category, conversation_id, environment)
2594
2594
  return self._request_post_json(endpoint, payload)
2595
2595
 
2596
+ def download_ticket_attachment(self, user_id: str, ticket_id: str,
2597
+ file_url: str) -> tuple:
2598
+ """Download one attachment from a ticket the user owns.
2599
+
2600
+ Raw bytes rather than JSON, so a 10 MB screenshot doesn't get
2601
+ base64-inflated through two hops.
2602
+
2603
+ Returns:
2604
+ (content_bytes, content_type, filename) tuple.
2605
+ """
2606
+ endpoint, params = self._prepare_download_ticket_attachment(
2607
+ user_id, ticket_id, file_url
2608
+ )
2609
+ return self._request_get_raw(endpoint, params)
2610
+
2596
2611
  def list_tickets(self, user_id: str, status: Optional[str] = None) -> Optional[Dict[str, Any]]:
2597
2612
  """List the user's support tickets. Returns {tickets: [...]}."""
2598
2613
  endpoint, payload = self._prepare_list_tickets(user_id, status)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "assistant_runtime_sdk"
3
- version = "1.6.0"
3
+ version = "1.7.0"
4
4
  description = "Python SDK for FAC Cloud - the Assistant Runtime AI assistant backend"
5
5
  readme = "README.md"
6
6
  license = {text = "AGPL-3.0"}