truto-python-sdk 0.1.1__tar.gz → 0.1.3__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.
Files changed (43) hide show
  1. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/PKG-INFO +6 -4
  2. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/pyproject.toml +2 -2
  3. truto_python_sdk-0.1.3/truto_python_sdk/alarm.py +26 -0
  4. truto_python_sdk-0.1.3/truto_python_sdk/api_token.py +14 -0
  5. truto_python_sdk-0.1.3/truto_python_sdk/batch_request.py +7 -0
  6. truto_python_sdk-0.1.3/truto_python_sdk/category.py +10 -0
  7. truto_python_sdk-0.1.3/truto_python_sdk/custom_api.py +23 -0
  8. truto_python_sdk-0.1.3/truto_python_sdk/daemon.py +26 -0
  9. truto_python_sdk-0.1.3/truto_python_sdk/daemon_job.py +26 -0
  10. truto_python_sdk-0.1.3/truto_python_sdk/daemon_job_cron_trigger.py +40 -0
  11. truto_python_sdk-0.1.3/truto_python_sdk/daemon_job_run.py +28 -0
  12. truto_python_sdk-0.1.3/truto_python_sdk/datastore.py +30 -0
  13. truto_python_sdk-0.1.3/truto_python_sdk/documentation.py +28 -0
  14. truto_python_sdk-0.1.3/truto_python_sdk/environment_integration_webhook.py +11 -0
  15. truto_python_sdk-0.1.3/truto_python_sdk/integrated_account_webhook.py +11 -0
  16. truto_python_sdk-0.1.3/truto_python_sdk/log.py +10 -0
  17. truto_python_sdk-0.1.3/truto_python_sdk/mcp.py +27 -0
  18. truto_python_sdk-0.1.3/truto_python_sdk/sandbox_integrated_account.py +26 -0
  19. truto_python_sdk-0.1.3/truto_python_sdk/static_gate.py +26 -0
  20. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/truto_api.py +38 -0
  21. truto_python_sdk-0.1.3/truto_python_sdk/workflow.py +26 -0
  22. truto_python_sdk-0.1.3/truto_python_sdk/workflow_run.py +26 -0
  23. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/LICENSE +0 -0
  24. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/README.md +0 -0
  25. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/__init__.py +0 -0
  26. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/base_resource.py +0 -0
  27. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/dict_to_query_string.py +0 -0
  28. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/environment.py +0 -0
  29. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/environment_integration.py +0 -0
  30. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/environment_unified_model.py +0 -0
  31. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/integrated_account.py +0 -0
  32. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/integration.py +0 -0
  33. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/link_token.py +0 -0
  34. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/pagination_result.py +0 -0
  35. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/proxy_api.py +0 -0
  36. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/sync_job.py +0 -0
  37. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/sync_job_cron_trigger.py +0 -0
  38. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/sync_job_run.py +0 -0
  39. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/team.py +0 -0
  40. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/unified_api.py +0 -0
  41. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/unified_model.py +0 -0
  42. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/user.py +0 -0
  43. {truto_python_sdk-0.1.1 → truto_python_sdk-0.1.3}/truto_python_sdk/webhook.py +0 -0
@@ -1,14 +1,16 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: truto-python-sdk
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Python3 SDK for the Truto API
5
- Home-page: https://github.com/trutohq/truto-python-sdk
5
+ License-File: LICENSE
6
6
  Author: Roopendra Talekar
7
7
  Author-email: roopendratalekar@gmail.com
8
8
  Requires-Python: >=3.12,<4.0
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3.12
11
- Requires-Dist: aiohttp (==3.10.5)
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Dist: aiohttp (==3.12.14)
12
14
  Requires-Dist: asyncio (==3.4.3)
13
15
  Project-URL: Repository, https://github.com/trutohq/truto-python-sdk
14
16
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "truto-python-sdk"
3
- version = "0.1.1"
3
+ version = "0.1.3"
4
4
  description = "Python3 SDK for the Truto API"
5
5
  authors = ["Roopendra Talekar <roopendratalekar@gmail.com>"]
6
6
  readme = "README.md"
@@ -8,7 +8,7 @@ repository = "https://github.com/trutohq/truto-python-sdk"
8
8
 
9
9
  [tool.poetry.dependencies]
10
10
  python = "^3.12"
11
- aiohttp = "3.10.5"
11
+ aiohttp = "3.12.14"
12
12
  asyncio = "3.4.3"
13
13
 
14
14
 
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Alarm:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all alarms with pagination support."""
10
+ return PaginationResult(self.api_client, "alarm", query_params)
11
+
12
+ def get(self, alarm_id: str, **query_params):
13
+ """Get a specific alarm by ID."""
14
+ return self.api_client._get(f"alarm/{alarm_id}", params=query_params)
15
+
16
+ def create(self, alarm_data: dict, **query_params):
17
+ """Create a new alarm."""
18
+ return self.api_client._post("alarm", data=alarm_data, params=query_params)
19
+
20
+ def update(self, alarm_id: str, alarm_data: dict, **query_params):
21
+ """Update an existing alarm."""
22
+ return self.api_client._patch(f"alarm/{alarm_id}", data=alarm_data, params=query_params)
23
+
24
+ def delete(self, alarm_id: str, **query_params):
25
+ """Delete an alarm by ID."""
26
+ return self.api_client._delete(f"alarm/{alarm_id}", query_params)
@@ -0,0 +1,14 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class ApiToken:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all api tokens with pagination support."""
10
+ return PaginationResult(self.api_client, "api-token", query_params)
11
+
12
+ def get(self, api_token_id: str, **query_params):
13
+ """Get a specific api token by ID."""
14
+ return self.api_client._get(f"api-token/{api_token_id}", params=query_params)
@@ -0,0 +1,7 @@
1
+ class BatchRequest:
2
+ def __init__(self, api_client):
3
+ self.api_client = api_client
4
+
5
+ def create(self, batch_request_data: dict, **query_params):
6
+ """Create a new batch request."""
7
+ return self.api_client._post("batch-request", data=batch_request_data, params=query_params)
@@ -0,0 +1,10 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Category:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all categories with pagination support."""
10
+ return PaginationResult(self.api_client, "category", query_params)
@@ -0,0 +1,23 @@
1
+ class CustomApi:
2
+ def __init__(self, api_client):
3
+ self.api_client = api_client
4
+
5
+ def get(self, path: str, **query_params):
6
+ """Send GET request to custom endpoint."""
7
+ return self.api_client._get(f"custom/{path}", params=query_params)
8
+
9
+ def post(self, path: str, data=None, **query_params):
10
+ """Send POST request to custom endpoint."""
11
+ return self.api_client._post(f"custom/{path}", data=data, params=query_params)
12
+
13
+ def put(self, path: str, data=None, **query_params):
14
+ """Send PUT request to custom endpoint."""
15
+ return self.api_client._put(f"custom/{path}", data=data, params=query_params)
16
+
17
+ def patch(self, path: str, data=None, **query_params):
18
+ """Send PATCH request to custom endpoint."""
19
+ return self.api_client._patch(f"custom/{path}", data=data, params=query_params)
20
+
21
+ def delete(self, path: str, **query_params):
22
+ """Send DELETE request to custom endpoint."""
23
+ return self.api_client._delete(f"custom/{path}", query_params)
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Daemon:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all daemons with pagination support."""
10
+ return PaginationResult(self.api_client, "daemon", query_params)
11
+
12
+ def get(self, daemon_id: str, **query_params):
13
+ """Get a specific daemon by ID."""
14
+ return self.api_client._get(f"daemon/{daemon_id}", params=query_params)
15
+
16
+ def create(self, daemon_data: dict, **query_params):
17
+ """Create a new daemon."""
18
+ return self.api_client._post("daemon", data=daemon_data, params=query_params)
19
+
20
+ def update(self, daemon_id: str, daemon_data: dict, **query_params):
21
+ """Update an existing daemon."""
22
+ return self.api_client._patch(f"daemon/{daemon_id}", data=daemon_data, params=query_params)
23
+
24
+ def delete(self, daemon_id: str, **query_params):
25
+ """Delete a daemon by ID."""
26
+ return self.api_client._delete(f"daemon/{daemon_id}", query_params)
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class DaemonJob:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all daemon jobs with pagination support."""
10
+ return PaginationResult(self.api_client, "daemon-job", query_params)
11
+
12
+ def get(self, daemon_job_id: str, **query_params):
13
+ """Get a specific daemon job by ID."""
14
+ return self.api_client._get(f"daemon-job/{daemon_job_id}", params=query_params)
15
+
16
+ def create(self, daemon_job_data: dict, **query_params):
17
+ """Create a new daemon job."""
18
+ return self.api_client._post("daemon-job", data=daemon_job_data, params=query_params)
19
+
20
+ def update(self, daemon_job_id: str, daemon_job_data: dict, **query_params):
21
+ """Update an existing daemon job."""
22
+ return self.api_client._patch(f"daemon-job/{daemon_job_id}", data=daemon_job_data, params=query_params)
23
+
24
+ def delete(self, daemon_job_id: str, **query_params):
25
+ """Delete a daemon job by ID."""
26
+ return self.api_client._delete(f"daemon-job/{daemon_job_id}", query_params)
@@ -0,0 +1,40 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class DaemonJobCronTrigger:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all daemon job cron triggers with pagination support."""
10
+ return PaginationResult(self.api_client, "daemon-job-cron-trigger", query_params)
11
+
12
+ def get(self, daemon_job_cron_trigger_id: str, **query_params):
13
+ """Get a specific daemon job cron trigger by ID."""
14
+ return self.api_client._get(
15
+ f"daemon-job-cron-trigger/{daemon_job_cron_trigger_id}", params=query_params
16
+ )
17
+
18
+ def create(self, daemon_job_cron_trigger_data: dict, **query_params):
19
+ """Create a new daemon job cron trigger."""
20
+ return self.api_client._post(
21
+ "daemon-job-cron-trigger", data=daemon_job_cron_trigger_data, params=query_params
22
+ )
23
+
24
+ def update(self, daemon_job_cron_trigger_id: str, daemon_job_cron_trigger_data: dict, **query_params):
25
+ """Update an existing daemon job cron trigger."""
26
+ return self.api_client._patch(
27
+ f"daemon-job-cron-trigger/{daemon_job_cron_trigger_id}",
28
+ data=daemon_job_cron_trigger_data,
29
+ params=query_params,
30
+ )
31
+
32
+ def delete(self, daemon_job_cron_trigger_id: str, **query_params):
33
+ """Delete a daemon job cron trigger by ID."""
34
+ return self.api_client._delete(
35
+ f"daemon-job-cron-trigger/{daemon_job_cron_trigger_id}", query_params
36
+ )
37
+
38
+ def schedule(self, daemon_job_cron_trigger_id: str):
39
+ """Schedule a daemon job cron trigger by ID."""
40
+ return self.api_client._post(f"daemon-job-cron-trigger/{daemon_job_cron_trigger_id}/schedule")
@@ -0,0 +1,28 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class DaemonJobRun:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all daemon job runs with pagination support."""
10
+ return PaginationResult(self.api_client, "daemon-job-run", query_params)
11
+
12
+ def get(self, daemon_job_run_id: str, **query_params):
13
+ """Get a specific daemon job run by ID."""
14
+ return self.api_client._get(f"daemon-job-run/{daemon_job_run_id}", params=query_params)
15
+
16
+ def create(self, daemon_job_run_data: dict, **query_params):
17
+ """Create a new daemon job run."""
18
+ return self.api_client._post("daemon-job-run", data=daemon_job_run_data, params=query_params)
19
+
20
+ def update(self, daemon_job_run_id: str, daemon_job_run_data: dict, **query_params):
21
+ """Update an existing daemon job run."""
22
+ return self.api_client._patch(
23
+ f"daemon-job-run/{daemon_job_run_id}", data=daemon_job_run_data, params=query_params
24
+ )
25
+
26
+ def delete(self, daemon_job_run_id: str, **query_params):
27
+ """Delete a daemon job run by ID."""
28
+ return self.api_client._delete(f"daemon-job-run/{daemon_job_run_id}", query_params)
@@ -0,0 +1,30 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Datastore:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all datastores with pagination support."""
10
+ return PaginationResult(self.api_client, "datastore", query_params)
11
+
12
+ def get(self, datastore_id: str, **query_params):
13
+ """Get a specific datastore by ID."""
14
+ return self.api_client._get(f"datastore/{datastore_id}", params=query_params)
15
+
16
+ def create(self, datastore_data: dict, **query_params):
17
+ """Create a new datastore."""
18
+ return self.api_client._post("datastore", data=datastore_data, params=query_params)
19
+
20
+ def update(self, datastore_id: str, datastore_data: dict, **query_params):
21
+ """Update an existing datastore."""
22
+ return self.api_client._patch(f"datastore/{datastore_id}", data=datastore_data, params=query_params)
23
+
24
+ def delete(self, datastore_id: str, **query_params):
25
+ """Delete a datastore by ID."""
26
+ return self.api_client._delete(f"datastore/{datastore_id}", query_params)
27
+
28
+ def test(self, datastore_id: str, method: str, body: dict = None):
29
+ """Test a datastore method."""
30
+ return self.api_client._post(f"datastore/{datastore_id}/test/{method}", data=body)
@@ -0,0 +1,28 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Documentation:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all documentations with pagination support."""
10
+ return PaginationResult(self.api_client, "documentation", query_params)
11
+
12
+ def get(self, documentation_id: str, **query_params):
13
+ """Get a specific documentation by ID."""
14
+ return self.api_client._get(f"documentation/{documentation_id}", params=query_params)
15
+
16
+ def create(self, documentation_data: dict, **query_params):
17
+ """Create a new documentation."""
18
+ return self.api_client._post("documentation", data=documentation_data, params=query_params)
19
+
20
+ def update(self, documentation_id: str, documentation_data: dict, **query_params):
21
+ """Update an existing documentation."""
22
+ return self.api_client._patch(
23
+ f"documentation/{documentation_id}", data=documentation_data, params=query_params
24
+ )
25
+
26
+ def delete(self, documentation_id: str, **query_params):
27
+ """Delete a documentation by ID."""
28
+ return self.api_client._delete(f"documentation/{documentation_id}", query_params)
@@ -0,0 +1,11 @@
1
+ class EnvironmentIntegrationWebhook:
2
+ def __init__(self, api_client):
3
+ self.api_client = api_client
4
+
5
+ def process(self, environment_integration_id: str, payload: dict, **query_params):
6
+ """Process webhook payload for an environment integration."""
7
+ return self.api_client._post(
8
+ f"environment-integration-webhook/{environment_integration_id}",
9
+ data=payload,
10
+ params=query_params,
11
+ )
@@ -0,0 +1,11 @@
1
+ class IntegratedAccountWebhook:
2
+ def __init__(self, api_client):
3
+ self.api_client = api_client
4
+
5
+ def process(self, integrated_account_id: str, payload: dict, **query_params):
6
+ """Process webhook payload for an integrated account."""
7
+ return self.api_client._post(
8
+ f"integrated-account-webhook/{integrated_account_id}",
9
+ data=payload,
10
+ params=query_params,
11
+ )
@@ -0,0 +1,10 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Log:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all logs with pagination support."""
10
+ return PaginationResult(self.api_client, "log", query_params)
@@ -0,0 +1,27 @@
1
+ class Mcp:
2
+ def __init__(self, api_client):
3
+ self.api_client = api_client
4
+
5
+ def call(self, token: str, payload: dict, **query_params):
6
+ """Call the MCP endpoint with a payload."""
7
+ return self.api_client._post(f"mcp/{token}", data=payload, params=query_params)
8
+
9
+ def initialize(self, token: str, client_name: str, client_version: str, **query_params):
10
+ """Initialize an MCP client."""
11
+ payload = {
12
+ "method": "initialize",
13
+ "params": {
14
+ "protocolVersion": "2024-11-05",
15
+ "clientInfo": {"name": client_name, "version": client_version},
16
+ },
17
+ }
18
+ return self.call(token, payload, **query_params)
19
+
20
+ def list_tools(self, token: str, **query_params):
21
+ """List MCP tools."""
22
+ return self.call(token, {"method": "tools/list", "id": 1}, **query_params)
23
+
24
+ def call_tool(self, token: str, name: str, args: dict, **query_params):
25
+ """Call a specific MCP tool."""
26
+ payload = {"method": "tools/call", "id": 2, "params": {"name": name, "arguments": args}}
27
+ return self.call(token, payload, **query_params)
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class SandboxIntegratedAccount:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all sandbox integrated accounts with pagination support."""
10
+ return PaginationResult(self.api_client, "sandbox-integrated-account", query_params)
11
+
12
+ def get(self, sandbox_integrated_account_id: str, **query_params):
13
+ """Get a specific sandbox integrated account by ID."""
14
+ return self.api_client._get(
15
+ f"sandbox-integrated-account/{sandbox_integrated_account_id}", params=query_params
16
+ )
17
+
18
+ def create(self, sandbox_integrated_account_data: dict, **query_params):
19
+ """Create a new sandbox integrated account."""
20
+ return self.api_client._post(
21
+ "sandbox-integrated-account", data=sandbox_integrated_account_data, params=query_params
22
+ )
23
+
24
+ def delete(self, sandbox_integrated_account_id: str, **query_params):
25
+ """Delete a sandbox integrated account by ID."""
26
+ return self.api_client._delete(f"sandbox-integrated-account/{sandbox_integrated_account_id}", query_params)
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class StaticGate:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all static gates with pagination support."""
10
+ return PaginationResult(self.api_client, "static-gate", query_params)
11
+
12
+ def get(self, static_gate_id: str, **query_params):
13
+ """Get a specific static gate by ID."""
14
+ return self.api_client._get(f"static-gate/{static_gate_id}", params=query_params)
15
+
16
+ def create(self, static_gate_data: dict, **query_params):
17
+ """Create a new static gate."""
18
+ return self.api_client._post("static-gate", data=static_gate_data, params=query_params)
19
+
20
+ def update(self, static_gate_id: str, static_gate_data: dict, **query_params):
21
+ """Update an existing static gate."""
22
+ return self.api_client._patch(f"static-gate/{static_gate_id}", data=static_gate_data, params=query_params)
23
+
24
+ def delete(self, static_gate_id: str, **query_params):
25
+ """Delete a static gate by ID."""
26
+ return self.api_client._delete(f"static-gate/{static_gate_id}", query_params)
@@ -1,12 +1,29 @@
1
1
  import aiohttp
2
2
 
3
3
  from .dict_to_query_string import dict_to_query_string
4
+ from .alarm import Alarm
5
+ from .api_token import ApiToken
6
+ from .batch_request import BatchRequest
7
+ from .category import Category
8
+ from .custom_api import CustomApi
9
+ from .daemon import Daemon
10
+ from .daemon_job import DaemonJob
11
+ from .daemon_job_cron_trigger import DaemonJobCronTrigger
12
+ from .daemon_job_run import DaemonJobRun
13
+ from .datastore import Datastore
14
+ from .documentation import Documentation
4
15
  from .environment import Environment
5
16
  from .environment_integration import EnvironmentIntegration
17
+ from .environment_integration_webhook import EnvironmentIntegrationWebhook
6
18
  from .integrated_account import IntegratedAccount
19
+ from .integrated_account_webhook import IntegratedAccountWebhook
7
20
  from .integration import Integration
8
21
  from .link_token import LinkToken
22
+ from .log import Log
23
+ from .mcp import Mcp
9
24
  from .proxy_api import ProxyApi
25
+ from .sandbox_integrated_account import SandboxIntegratedAccount
26
+ from .static_gate import StaticGate
10
27
  from .sync_job import SyncJob
11
28
  from .sync_job_cron_trigger import SyncJobCronTrigger
12
29
  from .sync_job_run import SyncJobRun
@@ -16,6 +33,8 @@ from .user import User
16
33
  from .unified_model import UnifiedModel
17
34
  from .environment_unified_model import EnvironmentUnifiedModel
18
35
  from .webhook import Webhook
36
+ from .workflow import Workflow
37
+ from .workflow_run import WorkflowRun
19
38
 
20
39
 
21
40
  class TrutoApi:
@@ -29,17 +48,36 @@ class TrutoApi:
29
48
  }
30
49
  self.users = User(self)
31
50
  self.teams = Team(self)
51
+ self.api_tokens = ApiToken(self)
32
52
  self.environments = Environment(self)
53
+ self.categories = Category(self)
33
54
  self.link_tokens = LinkToken(self)
34
55
  self.integrated_accounts = IntegratedAccount(self)
56
+ self.sandbox_integrated_accounts = SandboxIntegratedAccount(self)
35
57
  self.integrations = Integration(self)
36
58
  self.environment_integrations = EnvironmentIntegration(self)
59
+ self.environment_integration_webhooks = EnvironmentIntegrationWebhook(self)
60
+ self.integrated_account_webhooks = IntegratedAccountWebhook(self)
37
61
  self.unified_models = UnifiedModel(self)
38
62
  self.environment_unified_models = EnvironmentUnifiedModel(self)
39
63
  self.sync_jobs = SyncJob(self)
40
64
  self.sync_job_runs = SyncJobRun(self)
41
65
  self.sync_job_cron_triggers = SyncJobCronTrigger(self)
66
+ self.daemons = Daemon(self)
67
+ self.daemon_jobs = DaemonJob(self)
68
+ self.daemon_job_runs = DaemonJobRun(self)
69
+ self.daemon_job_cron_triggers = DaemonJobCronTrigger(self)
70
+ self.datastores = Datastore(self)
71
+ self.alarms = Alarm(self)
72
+ self.workflows = Workflow(self)
73
+ self.workflow_runs = WorkflowRun(self)
74
+ self.documentations = Documentation(self)
75
+ self.logs = Log(self)
76
+ self.static_gates = StaticGate(self)
42
77
  self.webhooks = Webhook(self)
78
+ self.batch_requests = BatchRequest(self)
79
+ self.mcp = Mcp(self)
80
+ self.custom_api = CustomApi(self)
43
81
  self.unified_api = UnifiedApi(self)
44
82
  self.proxy_api = ProxyApi(self)
45
83
 
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class Workflow:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all workflows with pagination support."""
10
+ return PaginationResult(self.api_client, "workflow", query_params)
11
+
12
+ def get(self, workflow_id: str, **query_params):
13
+ """Get a specific workflow by ID."""
14
+ return self.api_client._get(f"workflow/{workflow_id}", params=query_params)
15
+
16
+ def create(self, workflow_data: dict, **query_params):
17
+ """Create a new workflow."""
18
+ return self.api_client._post("workflow", data=workflow_data, params=query_params)
19
+
20
+ def update(self, workflow_id: str, workflow_data: dict, **query_params):
21
+ """Update an existing workflow."""
22
+ return self.api_client._patch(f"workflow/{workflow_id}", data=workflow_data, params=query_params)
23
+
24
+ def delete(self, workflow_id: str, **query_params):
25
+ """Delete a workflow by ID."""
26
+ return self.api_client._delete(f"workflow/{workflow_id}", query_params)
@@ -0,0 +1,26 @@
1
+ from .pagination_result import PaginationResult
2
+
3
+
4
+ class WorkflowRun:
5
+ def __init__(self, api_client):
6
+ self.api_client = api_client
7
+
8
+ def list(self, **query_params):
9
+ """List all workflow runs with pagination support."""
10
+ return PaginationResult(self.api_client, "workflow-run", query_params)
11
+
12
+ def get(self, workflow_run_id: str, **query_params):
13
+ """Get a specific workflow run by ID."""
14
+ return self.api_client._get(f"workflow-run/{workflow_run_id}", params=query_params)
15
+
16
+ def create(self, workflow_run_data: dict, **query_params):
17
+ """Create a new workflow run."""
18
+ return self.api_client._post("workflow-run", data=workflow_run_data, params=query_params)
19
+
20
+ def update(self, workflow_run_id: str, workflow_run_data: dict, **query_params):
21
+ """Update an existing workflow run."""
22
+ return self.api_client._patch(f"workflow-run/{workflow_run_id}", data=workflow_run_data, params=query_params)
23
+
24
+ def delete(self, workflow_run_id: str, **query_params):
25
+ """Delete a workflow run by ID."""
26
+ return self.api_client._delete(f"workflow-run/{workflow_run_id}", query_params)