@danhachuel/thunderbolt 0.7.66 → 0.7.67
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.
|
@@ -115,7 +115,11 @@ def _connected_account_id(client: Any, user_id: str, toolkit: str, selector: str
|
|
|
115
115
|
"""Resolve a connected-account ID from an ID, alias, or sole active account."""
|
|
116
116
|
value = str(selector or "").strip()
|
|
117
117
|
try:
|
|
118
|
-
response = client.connected_accounts.list(
|
|
118
|
+
response = client.connected_accounts.list(
|
|
119
|
+
user_ids=[_require_user_id(user_id)],
|
|
120
|
+
statuses=["ACTIVE"],
|
|
121
|
+
toolkit_slugs=[str(toolkit).strip().lower()] if toolkit else None,
|
|
122
|
+
)
|
|
119
123
|
raw = _safe_value(response)
|
|
120
124
|
if isinstance(raw, dict):
|
|
121
125
|
# Composio SDK versions expose the list either directly or under
|
|
@@ -134,7 +138,7 @@ def _connected_account_id(client: Any, user_id: str, toolkit: str, selector: str
|
|
|
134
138
|
for item in items:
|
|
135
139
|
if not isinstance(item, dict):
|
|
136
140
|
continue
|
|
137
|
-
toolkit_value = item.get("toolkit")
|
|
141
|
+
toolkit_value = item.get("toolkit") or item.get("toolkit_slug")
|
|
138
142
|
if isinstance(toolkit_value, dict):
|
|
139
143
|
toolkit_value = toolkit_value.get("slug") or toolkit_value.get("name")
|
|
140
144
|
if str(toolkit or "").strip() and toolkit.casefold() not in str(toolkit_value or "").casefold():
|
package/package.json
CHANGED