threadify-sdk 0.2.4__tar.gz → 0.2.6__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.
- {threadify_sdk-0.2.4/threadify_sdk.egg-info → threadify_sdk-0.2.6}/PKG-INFO +3 -3
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/README.md +1 -1
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/pyproject.toml +2 -2
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/__init__.py +2 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/client.py +4 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/connection.py +2 -2
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/data_retriever.py +6 -2
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/models.py +6 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/thread.py +2 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6/threadify_sdk.egg-info}/PKG-INFO +3 -3
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/CHANGELOG.md +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/LICENSE +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/MANIFEST.in +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/setup.cfg +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_client.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_connection.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_data_retriever.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_models.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_notification.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_step.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/tests/test_thread.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/notification.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/otel_exporter.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify/step.py +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify_sdk.egg-info/SOURCES.txt +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify_sdk.egg-info/dependency_links.txt +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify_sdk.egg-info/requires.txt +0 -0
- {threadify_sdk-0.2.4 → threadify_sdk-0.2.6}/threadify_sdk.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: threadify-sdk
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Python SDK for Threadify —
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Python SDK for Threadify — Service-delivery intelligence. Track every customer request from start to finish across every system, team, and partner. Visit: https://threadify.dev
|
|
5
5
|
Author-email: Threadify Team <team@threadify.dev>
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: threadify,workflow,orchestration,websocket,graphql
|
|
@@ -27,7 +27,7 @@ Dynamic: license-file
|
|
|
27
27
|
|
|
28
28
|
# Threadify Python SDK
|
|
29
29
|
|
|
30
|
-
Python SDK for [Threadify](https://threadify.dev) —
|
|
30
|
+
Python SDK for [Threadify](https://threadify.dev) — Service-delivery intelligence that tracks every customer request from start to finish across every system, team, and partner.
|
|
31
31
|
|
|
32
32
|
- **Documentation:** [https://docs.threadify.dev](https://docs.threadify.dev)
|
|
33
33
|
- **Create an account:** [https://threadify.dev](https://threadify.dev)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Threadify Python SDK
|
|
2
2
|
|
|
3
|
-
Python SDK for [Threadify](https://threadify.dev) —
|
|
3
|
+
Python SDK for [Threadify](https://threadify.dev) — Service-delivery intelligence that tracks every customer request from start to finish across every system, team, and partner.
|
|
4
4
|
|
|
5
5
|
- **Documentation:** [https://docs.threadify.dev](https://docs.threadify.dev)
|
|
6
6
|
- **Create an account:** [https://threadify.dev](https://threadify.dev)
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "threadify-sdk"
|
|
7
|
-
version = "0.2.
|
|
8
|
-
description = "Python SDK for Threadify —
|
|
7
|
+
version = "0.2.6"
|
|
8
|
+
description = "Python SDK for Threadify — Service-delivery intelligence. Track every customer request from start to finish across every system, team, and partner. Visit: https://threadify.dev"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = {text = "MIT"}
|
|
@@ -5,6 +5,7 @@ from threadify.client import (
|
|
|
5
5
|
from threadify.connection import Connection
|
|
6
6
|
from threadify.data_retriever import ArchivedStep, ArchivedThread, DataRetriever
|
|
7
7
|
from threadify.models import (
|
|
8
|
+
AccessLevel,
|
|
8
9
|
CompleteDataOptions,
|
|
9
10
|
ConnectOptions,
|
|
10
11
|
HistoryQueryOptions,
|
|
@@ -46,6 +47,7 @@ __all__ = [
|
|
|
46
47
|
"RefQuery",
|
|
47
48
|
"CompleteDataOptions",
|
|
48
49
|
"HistoryQueryOptions",
|
|
50
|
+
"AccessLevel",
|
|
49
51
|
]
|
|
50
52
|
|
|
51
53
|
__version__ = "0.1.0"
|
|
@@ -64,6 +64,10 @@ def _build_connect_options(
|
|
|
64
64
|
class Threadify:
|
|
65
65
|
"""Factory for creating Threadify connections."""
|
|
66
66
|
|
|
67
|
+
FOR_EXTERNAL = "external"
|
|
68
|
+
FOR_OBSERVER = "observer"
|
|
69
|
+
FOR_PARTICIPANT = "participant"
|
|
70
|
+
|
|
67
71
|
@staticmethod
|
|
68
72
|
async def connect(
|
|
69
73
|
api_key: str,
|
|
@@ -182,7 +182,7 @@ class Connection:
|
|
|
182
182
|
raise RuntimeError(resp.get(FIELD_MESSAGE, "failed to start thread"))
|
|
183
183
|
|
|
184
184
|
thread_id = resp[FIELD_THREAD_ID]
|
|
185
|
-
thread = ThreadInstance(self, thread_id, contract_name, "", None)
|
|
185
|
+
thread = ThreadInstance(self, thread_id, contract_name, "", resp.get(FIELD_ACCESS_LEVEL, ""), None)
|
|
186
186
|
self._threads[thread_id] = thread
|
|
187
187
|
self._logger.debug(f"Thread started: {thread_id}")
|
|
188
188
|
return thread
|
|
@@ -231,7 +231,7 @@ class Connection:
|
|
|
231
231
|
|
|
232
232
|
thread_id = resp[FIELD_THREAD_ID]
|
|
233
233
|
thread_role = resp.get(FIELD_ROLE, "")
|
|
234
|
-
thread = ThreadInstance(self, thread_id, resp.get("contractId", ""), thread_role, None)
|
|
234
|
+
thread = ThreadInstance(self, thread_id, resp.get("contractId", ""), thread_role, resp.get(FIELD_ACCESS_LEVEL, ""), None)
|
|
235
235
|
self._threads[thread_id] = thread
|
|
236
236
|
self._logger.debug(f"Joined thread: {thread_id}, Role: {thread_role}")
|
|
237
237
|
return thread
|
|
@@ -163,7 +163,10 @@ class DataRetriever:
|
|
|
163
163
|
limit: $limit
|
|
164
164
|
offset: $offset
|
|
165
165
|
) {{
|
|
166
|
-
{
|
|
166
|
+
threads {{
|
|
167
|
+
{THREAD_FIELDS}
|
|
168
|
+
}}
|
|
169
|
+
totalCount
|
|
167
170
|
}}
|
|
168
171
|
}}
|
|
169
172
|
"""
|
|
@@ -180,7 +183,8 @@ class DataRetriever:
|
|
|
180
183
|
if q.started_before:
|
|
181
184
|
variables["startedBefore"] = q.started_before
|
|
182
185
|
data = await self._client.query(query, variables)
|
|
183
|
-
|
|
186
|
+
connection = data.get("threadsByRef") or {}
|
|
187
|
+
threads_list = connection.get("threads") or []
|
|
184
188
|
return [ArchivedThread(t, self._client) for t in threads_list if isinstance(t, dict)]
|
|
185
189
|
|
|
186
190
|
async def get_validation_results(self, thread_id: str, step_name: str = "") -> list[dict[str, Any]]:
|
|
@@ -109,6 +109,12 @@ class ValidationSeverity(str, Enum):
|
|
|
109
109
|
CRITICAL = "critical"
|
|
110
110
|
|
|
111
111
|
|
|
112
|
+
class AccessLevel(str, Enum):
|
|
113
|
+
EXTERNAL = "external"
|
|
114
|
+
OBSERVER = "observer"
|
|
115
|
+
PARTICIPANT = "participant"
|
|
116
|
+
|
|
117
|
+
|
|
112
118
|
@dataclass
|
|
113
119
|
class ConnectOptions:
|
|
114
120
|
"""Configuration for connecting to the Threadify Engine."""
|
|
@@ -62,12 +62,14 @@ class ThreadInstance:
|
|
|
62
62
|
thread_id: str,
|
|
63
63
|
contract_id: str = "",
|
|
64
64
|
role: str = "",
|
|
65
|
+
access_level: str = "",
|
|
65
66
|
refs: dict[str, str] | None = None,
|
|
66
67
|
):
|
|
67
68
|
self._conn = conn
|
|
68
69
|
self.thread_id = thread_id
|
|
69
70
|
self.contract_id = contract_id
|
|
70
71
|
self.role = role
|
|
72
|
+
self.access_level = access_level
|
|
71
73
|
self.refs: dict[str, str] = refs or {}
|
|
72
74
|
|
|
73
75
|
self._steps: dict[str, Any] = {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: threadify-sdk
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Python SDK for Threadify —
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Python SDK for Threadify — Service-delivery intelligence. Track every customer request from start to finish across every system, team, and partner. Visit: https://threadify.dev
|
|
5
5
|
Author-email: Threadify Team <team@threadify.dev>
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: threadify,workflow,orchestration,websocket,graphql
|
|
@@ -27,7 +27,7 @@ Dynamic: license-file
|
|
|
27
27
|
|
|
28
28
|
# Threadify Python SDK
|
|
29
29
|
|
|
30
|
-
Python SDK for [Threadify](https://threadify.dev) —
|
|
30
|
+
Python SDK for [Threadify](https://threadify.dev) — Service-delivery intelligence that tracks every customer request from start to finish across every system, team, and partner.
|
|
31
31
|
|
|
32
32
|
- **Documentation:** [https://docs.threadify.dev](https://docs.threadify.dev)
|
|
33
33
|
- **Create an account:** [https://threadify.dev](https://threadify.dev)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|