assistant-runtime-sdk 1.3.0__tar.gz → 1.5.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.
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/PKG-INFO +1 -1
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/__init__.py +1 -1
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/async_client.py +46 -1
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/base.py +7 -1
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/client.py +7 -4
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/pyproject.toml +1 -1
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/LICENSE +0 -0
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/README.md +0 -0
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/auth.py +0 -0
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/exceptions.py +0 -0
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/skills.py +0 -0
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/streaming.py +0 -0
- {assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/types.py +0 -0
{assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/async_client.py
RENAMED
|
@@ -461,6 +461,11 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
461
461
|
endpoint, payload = self._prepare_accept_terms(terms_version, accepted_by)
|
|
462
462
|
return await self._request_post_json(endpoint, payload)
|
|
463
463
|
|
|
464
|
+
async def get_terms_status(self, timeout: Optional[float] = None) -> Optional[Dict[str, Any]]:
|
|
465
|
+
"""Async version of AssistantRuntimeClient.get_terms_status."""
|
|
466
|
+
endpoint, params = self._prepare_get_terms_status()
|
|
467
|
+
return await self._request_get(endpoint, params, timeout=timeout)
|
|
468
|
+
|
|
464
469
|
# =========================================================================
|
|
465
470
|
# Model APIs
|
|
466
471
|
# =========================================================================
|
|
@@ -1484,10 +1489,11 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
1484
1489
|
input_data: Dict[str, Any],
|
|
1485
1490
|
user_id: str,
|
|
1486
1491
|
trigger_id: str,
|
|
1492
|
+
workflow_docname: Optional[str] = None,
|
|
1487
1493
|
) -> Optional[Dict[str, Any]]:
|
|
1488
1494
|
"""Async version of AssistantRuntimeClient.execute_workflow_from_event."""
|
|
1489
1495
|
endpoint, payload = self._prepare_execute_workflow_from_event(
|
|
1490
|
-
workflow_name, input_data, user_id, trigger_id,
|
|
1496
|
+
workflow_name, input_data, user_id, trigger_id, workflow_docname,
|
|
1491
1497
|
)
|
|
1492
1498
|
return await self._request_post_json(endpoint, payload, api_base=self.workflows_api_base)
|
|
1493
1499
|
|
|
@@ -1956,6 +1962,45 @@ class AsyncAssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
1956
1962
|
endpoint, payload = self._prepare_dismiss_pack_recommendation(user_id)
|
|
1957
1963
|
return await self._request_post_json(endpoint, payload, api_base=self.marketplace_api_base)
|
|
1958
1964
|
|
|
1965
|
+
async def initiate_pack_checkout(self, pack_id: str) -> Optional[Dict[str, Any]]:
|
|
1966
|
+
"""Async version of AssistantRuntimeClient.initiate_pack_checkout."""
|
|
1967
|
+
endpoint, payload = self._prepare_initiate_pack_checkout(pack_id)
|
|
1968
|
+
return await self._request_post_json(endpoint, payload, api_base=self.billing_api_base)
|
|
1969
|
+
|
|
1970
|
+
async def verify_razorpay_pack_payment(
|
|
1971
|
+
self,
|
|
1972
|
+
razorpay_payment_id: str,
|
|
1973
|
+
razorpay_order_id: str,
|
|
1974
|
+
razorpay_signature: str,
|
|
1975
|
+
) -> Optional[Dict[str, Any]]:
|
|
1976
|
+
"""Async version of AssistantRuntimeClient.verify_razorpay_pack_payment."""
|
|
1977
|
+
endpoint, payload = self._prepare_verify_razorpay_pack_payment(
|
|
1978
|
+
razorpay_payment_id, razorpay_order_id, razorpay_signature
|
|
1979
|
+
)
|
|
1980
|
+
return await self._request_post_json(endpoint, payload, api_base=self.billing_api_base)
|
|
1981
|
+
|
|
1982
|
+
async def list_pack_purchases(self) -> Optional[Dict[str, Any]]:
|
|
1983
|
+
"""Async version of AssistantRuntimeClient.list_pack_purchases."""
|
|
1984
|
+
endpoint, params = self._prepare_list_pack_purchases()
|
|
1985
|
+
return await self._request_get(endpoint, params, api_base=self.marketplace_api_base)
|
|
1986
|
+
|
|
1987
|
+
async def toggle_purchased_pack(self, pack_id: str, enabled: bool) -> Optional[Dict[str, Any]]:
|
|
1988
|
+
"""Async version of AssistantRuntimeClient.toggle_purchased_pack."""
|
|
1989
|
+
endpoint, payload = self._prepare_toggle_purchased_pack(pack_id, enabled)
|
|
1990
|
+
return await self._request_post_json(endpoint, payload, api_base=self.marketplace_api_base)
|
|
1991
|
+
|
|
1992
|
+
async def grant_pack_as_admin(
|
|
1993
|
+
self, pack_id: str, granted_by_user: Optional[str] = None
|
|
1994
|
+
) -> Optional[Dict[str, Any]]:
|
|
1995
|
+
"""Async version of AssistantRuntimeClient.grant_pack_as_admin."""
|
|
1996
|
+
endpoint, payload = self._prepare_grant_pack_as_admin(pack_id, granted_by_user)
|
|
1997
|
+
return await self._request_post_json(endpoint, payload, api_base=self.marketplace_api_base)
|
|
1998
|
+
|
|
1999
|
+
async def enable_pack_as_free_grant(self, pack_id: str) -> Optional[Dict[str, Any]]:
|
|
2000
|
+
"""Async version of AssistantRuntimeClient.enable_pack_as_free_grant."""
|
|
2001
|
+
endpoint, payload = self._prepare_enable_pack_as_free_grant(pack_id)
|
|
2002
|
+
return await self._request_post_json(endpoint, payload, api_base=self.marketplace_api_base)
|
|
2003
|
+
|
|
1959
2004
|
# =========================================================================
|
|
1960
2005
|
# HITL APIs
|
|
1961
2006
|
# =========================================================================
|
|
@@ -1617,14 +1617,20 @@ class BaseAssistantRuntimeClient:
|
|
|
1617
1617
|
input_data: Dict[str, Any],
|
|
1618
1618
|
user_id: str,
|
|
1619
1619
|
trigger_id: str,
|
|
1620
|
+
workflow_docname: Optional[str] = None,
|
|
1620
1621
|
) -> tuple:
|
|
1621
|
-
|
|
1622
|
+
payload = {
|
|
1622
1623
|
"tenant_id": self.tenant_id,
|
|
1623
1624
|
"workflow_name": workflow_name,
|
|
1624
1625
|
"input_data": input_data,
|
|
1625
1626
|
"user_id": user_id,
|
|
1626
1627
|
"trigger_id": trigger_id,
|
|
1627
1628
|
}
|
|
1629
|
+
# The docname is the stable binding; workflow_name is a mutable display
|
|
1630
|
+
# label a rename can invalidate. Both travel so an older AR keeps working.
|
|
1631
|
+
if workflow_docname:
|
|
1632
|
+
payload["workflow_docname"] = workflow_docname
|
|
1633
|
+
return "workflows.execute_from_event", payload
|
|
1628
1634
|
|
|
1629
1635
|
def _prepare_cancel_workflow_run(self, run_name: str) -> tuple:
|
|
1630
1636
|
return "workflows.cancel_run", {
|
|
@@ -2193,21 +2193,24 @@ class AssistantRuntimeClient(BaseAssistantRuntimeClient):
|
|
|
2193
2193
|
input_data: Dict[str, Any],
|
|
2194
2194
|
user_id: str,
|
|
2195
2195
|
trigger_id: str,
|
|
2196
|
+
workflow_docname: Optional[str] = None,
|
|
2196
2197
|
) -> Optional[Dict[str, Any]]:
|
|
2197
2198
|
"""
|
|
2198
|
-
Trigger workflow execution from a
|
|
2199
|
+
Trigger workflow execution from a FAC-side doc event.
|
|
2199
2200
|
|
|
2200
2201
|
Args:
|
|
2201
|
-
workflow_name: AR Workflow.workflow_name (
|
|
2202
|
+
workflow_name: AR Workflow.workflow_name (mutable display label)
|
|
2202
2203
|
input_data: Structured payload {trigger, doc, changed_fields}
|
|
2203
2204
|
user_id: User on the customer bench who saved the doc
|
|
2204
|
-
trigger_id:
|
|
2205
|
+
trigger_id: FAC Workflow Trigger name (for traceability)
|
|
2206
|
+
workflow_docname: AR Workflow docname (WF-#####). Preferred — a
|
|
2207
|
+
rename cannot invalidate it. Falls back to workflow_name.
|
|
2205
2208
|
|
|
2206
2209
|
Returns:
|
|
2207
2210
|
{"status": "queued", "run_name": str, "run_id": str, ...}
|
|
2208
2211
|
"""
|
|
2209
2212
|
endpoint, payload = self._prepare_execute_workflow_from_event(
|
|
2210
|
-
workflow_name, input_data, user_id, trigger_id,
|
|
2213
|
+
workflow_name, input_data, user_id, trigger_id, workflow_docname,
|
|
2211
2214
|
)
|
|
2212
2215
|
return self._request_post_json(endpoint, payload, api_base=self.workflows_api_base)
|
|
2213
2216
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{assistant_runtime_sdk-1.3.0 → assistant_runtime_sdk-1.5.0}/assistant_runtime_sdk/streaming.py
RENAMED
|
File without changes
|
|
File without changes
|