cyberdesk 2.1.17__py3-none-any.whl → 2.1.18__py3-none-any.whl
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.
Potentially problematic release.
This version of cyberdesk might be problematic. Click here for more details.
- cyberdesk/__init__.py +1 -1
- cyberdesk/client.py +93 -91
- {cyberdesk-2.1.17.dist-info → cyberdesk-2.1.18.dist-info}/METADATA +1 -1
- {cyberdesk-2.1.17.dist-info → cyberdesk-2.1.18.dist-info}/RECORD +80 -80
- openapi_client/cyberdesk_cloud_client/api/computer/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_list_v1_computer_machine_id_fs_list_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_read_v1_computer_machine_id_fs_read_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/fs_write_v1_computer_machine_id_fs_write_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/get_display_dimensions_v1_computer_machine_id_display_dimensions_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/get_mouse_position_v1_computer_machine_id_input_mouse_position_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/get_screenshot_v1_computer_machine_id_display_screenshot_get.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/computer/keyboard_key_v1_computer_machine_id_input_keyboard_key_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/keyboard_type_v1_computer_machine_id_input_keyboard_type_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_click_v1_computer_machine_id_input_mouse_click_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_drag_v1_computer_machine_id_input_mouse_drag_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_move_v1_computer_machine_id_input_mouse_move_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/mouse_scroll_v1_computer_machine_id_input_mouse_scroll_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/computer/powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/connections/create_connection_v1_connections_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/connections/delete_connection_v1_connections_connection_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/connections/get_connection_v1_connections_connection_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/connections/list_connections_v1_connections_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/connections/update_connection_v1_connections_connection_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/default/health_db_health_db_get.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/default/health_health_get.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/default/root_get.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/health/database_health_check_v1_health_db_get.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/health/health_check_v1_health_get.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/machines/create_machine_v1_machines_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/machines/delete_machine_v1_machines_machine_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/machines/get_machine_pools_v1_machines_machine_id_pools_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/machines/get_machine_v1_machines_machine_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/machines/list_machines_v1_machines_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/machines/update_machine_pools_v1_machines_machine_id_pools_put.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/machines/update_machine_v1_machines_machine_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/add_machines_to_pool_v1_pools_pool_id_machines_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/create_pool_v1_pools_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/delete_pool_v1_pools_pool_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/get_pool_v1_pools_pool_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/list_pools_v1_pools_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/remove_machines_from_pool_v1_pools_pool_id_machines_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/pools/update_pool_v1_pools_pool_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/create_request_log_v1_request_logs_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/delete_request_log_v1_request_logs_log_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/get_request_log_v1_request_logs_log_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/list_request_logs_v1_request_logs_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/request_logs/update_request_log_v1_request_logs_log_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/create_run_attachment_v1_run_attachments_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/delete_run_attachment_v1_run_attachments_attachment_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/download_run_attachment_v1_run_attachments_attachment_id_download_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_download_url_v1_run_attachments_attachment_id_download_url_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_v1_run_attachments_attachment_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/bulk_create_runs_v1_runs_bulk_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/create_run_chain_v1_runs_chain_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/create_run_v1_runs_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/delete_run_v1_runs_run_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/get_run_v1_runs_run_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/retry_run_v1_runs_run_id_retry_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/runs/update_run_v1_runs_run_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/test/dummy_test_endpoint_v1_test_post.py +1 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/create_trajectory_v1_trajectories_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/delete_trajectory_v1_trajectories_trajectory_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/get_trajectory_v1_trajectories_trajectory_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/list_trajectories_v1_trajectories_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/trajectories/update_trajectory_v1_trajectories_trajectory_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/create_workflow_v1_workflows_post.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/delete_workflow_v1_workflows_workflow_id_delete.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_workflow_id_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py +2 -0
- openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py +2 -0
- openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +21 -0
- {cyberdesk-2.1.17.dist-info → cyberdesk-2.1.18.dist-info}/WHEEL +0 -0
- {cyberdesk-2.1.17.dist-info → cyberdesk-2.1.18.dist-info}/licenses/LICENSE +0 -0
- {cyberdesk-2.1.17.dist-info → cyberdesk-2.1.18.dist-info}/top_level.txt +0 -0
cyberdesk/client.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""Cyberdesk Python SDK Client."""
|
|
2
|
-
from typing import Optional, Dict, Any, Union, List
|
|
2
|
+
from typing import Optional, Dict, Any, Union, List, TypeVar, Generic
|
|
3
3
|
from uuid import UUID
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import httpx
|
|
@@ -155,10 +155,12 @@ __all__ = [
|
|
|
155
155
|
DEFAULT_API_BASE_URL = "https://api.cyberdesk.io"
|
|
156
156
|
|
|
157
157
|
|
|
158
|
+
T = TypeVar('T')
|
|
159
|
+
|
|
158
160
|
@dataclass
|
|
159
|
-
class ApiResponse:
|
|
161
|
+
class ApiResponse(Generic[T]):
|
|
160
162
|
"""Wrapper for API responses."""
|
|
161
|
-
data: Optional[
|
|
163
|
+
data: Optional[T] = None
|
|
162
164
|
error: Optional[Any] = None
|
|
163
165
|
|
|
164
166
|
|
|
@@ -208,7 +210,7 @@ class MachinesAPI:
|
|
|
208
210
|
*,
|
|
209
211
|
created_at_from: Optional[Union[str, datetime]] = None,
|
|
210
212
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
211
|
-
) -> ApiResponse:
|
|
213
|
+
) -> ApiResponse[PaginatedResponseMachineResponse]:
|
|
212
214
|
"""List machines with optional filtering.
|
|
213
215
|
|
|
214
216
|
Args:
|
|
@@ -243,7 +245,7 @@ class MachinesAPI:
|
|
|
243
245
|
*,
|
|
244
246
|
created_at_from: Optional[Union[str, datetime]] = None,
|
|
245
247
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
246
|
-
) -> ApiResponse:
|
|
248
|
+
) -> ApiResponse[PaginatedResponseMachineResponse]:
|
|
247
249
|
"""List machines with optional filtering (synchronous).
|
|
248
250
|
|
|
249
251
|
Args:
|
|
@@ -270,7 +272,7 @@ class MachinesAPI:
|
|
|
270
272
|
except Exception as e:
|
|
271
273
|
return ApiResponse(error=e)
|
|
272
274
|
|
|
273
|
-
async def create(self, data: MachineCreate) -> ApiResponse:
|
|
275
|
+
async def create(self, data: MachineCreate) -> ApiResponse[MachineResponse]:
|
|
274
276
|
"""Create a new machine.
|
|
275
277
|
|
|
276
278
|
Args:
|
|
@@ -292,7 +294,7 @@ class MachinesAPI:
|
|
|
292
294
|
except Exception as e:
|
|
293
295
|
return ApiResponse(error=e)
|
|
294
296
|
|
|
295
|
-
def create_sync(self, data: MachineCreate) -> ApiResponse:
|
|
297
|
+
def create_sync(self, data: MachineCreate) -> ApiResponse[MachineResponse]:
|
|
296
298
|
"""Create a new machine (synchronous).
|
|
297
299
|
|
|
298
300
|
Args:
|
|
@@ -314,7 +316,7 @@ class MachinesAPI:
|
|
|
314
316
|
except Exception as e:
|
|
315
317
|
return ApiResponse(error=e)
|
|
316
318
|
|
|
317
|
-
async def get(self, machine_id: str) -> ApiResponse:
|
|
319
|
+
async def get(self, machine_id: str) -> ApiResponse[MachineResponse]:
|
|
318
320
|
"""Get a specific machine by ID.
|
|
319
321
|
|
|
320
322
|
Returns:
|
|
@@ -333,7 +335,7 @@ class MachinesAPI:
|
|
|
333
335
|
except Exception as e:
|
|
334
336
|
return ApiResponse(error=e)
|
|
335
337
|
|
|
336
|
-
def get_sync(self, machine_id: str) -> ApiResponse:
|
|
338
|
+
def get_sync(self, machine_id: str) -> ApiResponse[MachineResponse]:
|
|
337
339
|
"""Get a specific machine by ID (synchronous).
|
|
338
340
|
|
|
339
341
|
Returns:
|
|
@@ -352,7 +354,7 @@ class MachinesAPI:
|
|
|
352
354
|
except Exception as e:
|
|
353
355
|
return ApiResponse(error=e)
|
|
354
356
|
|
|
355
|
-
async def update(self, machine_id: str, data: MachineUpdate) -> ApiResponse:
|
|
357
|
+
async def update(self, machine_id: str, data: MachineUpdate) -> ApiResponse[MachineResponse]:
|
|
356
358
|
"""Update a machine.
|
|
357
359
|
|
|
358
360
|
Args:
|
|
@@ -387,7 +389,7 @@ class MachinesAPI:
|
|
|
387
389
|
except Exception as e:
|
|
388
390
|
return ApiResponse(error=e)
|
|
389
391
|
|
|
390
|
-
def update_sync(self, machine_id: str, data: MachineUpdate) -> ApiResponse:
|
|
392
|
+
def update_sync(self, machine_id: str, data: MachineUpdate) -> ApiResponse[MachineResponse]:
|
|
391
393
|
"""Update a machine (synchronous).
|
|
392
394
|
|
|
393
395
|
Args:
|
|
@@ -422,7 +424,7 @@ class MachinesAPI:
|
|
|
422
424
|
except Exception as e:
|
|
423
425
|
return ApiResponse(error=e)
|
|
424
426
|
|
|
425
|
-
async def clear_session(self, machine_id: str) -> ApiResponse:
|
|
427
|
+
async def clear_session(self, machine_id: str) -> ApiResponse[MachineResponse]:
|
|
426
428
|
"""Clear the machine's reserved session (cancels queued/running session runs).
|
|
427
429
|
|
|
428
430
|
This sends reserved_session_id=null per API contract.
|
|
@@ -438,7 +440,7 @@ class MachinesAPI:
|
|
|
438
440
|
except Exception as e:
|
|
439
441
|
return ApiResponse(error=e)
|
|
440
442
|
|
|
441
|
-
def clear_session_sync(self, machine_id: str) -> ApiResponse:
|
|
443
|
+
def clear_session_sync(self, machine_id: str) -> ApiResponse[MachineResponse]:
|
|
442
444
|
"""Clear the machine's reserved session (synchronous)."""
|
|
443
445
|
try:
|
|
444
446
|
update = MachineUpdate(reserved_session_id=None)
|
|
@@ -451,7 +453,7 @@ class MachinesAPI:
|
|
|
451
453
|
except Exception as e:
|
|
452
454
|
return ApiResponse(error=e)
|
|
453
455
|
|
|
454
|
-
async def delete(self, machine_id: str) -> ApiResponse:
|
|
456
|
+
async def delete(self, machine_id: str) -> ApiResponse[MachineResponse]:
|
|
455
457
|
"""Delete a machine.
|
|
456
458
|
|
|
457
459
|
Associated runs are preserved with machine_id set to NULL to maintain run history.
|
|
@@ -469,7 +471,7 @@ class MachinesAPI:
|
|
|
469
471
|
except Exception as e:
|
|
470
472
|
return ApiResponse(error=e)
|
|
471
473
|
|
|
472
|
-
def delete_sync(self, machine_id: str) -> ApiResponse:
|
|
474
|
+
def delete_sync(self, machine_id: str) -> ApiResponse[MachineResponse]:
|
|
473
475
|
"""Delete a machine (synchronous).
|
|
474
476
|
|
|
475
477
|
Associated runs are preserved with machine_id set to NULL to maintain run history.
|
|
@@ -487,7 +489,7 @@ class MachinesAPI:
|
|
|
487
489
|
except Exception as e:
|
|
488
490
|
return ApiResponse(error=e)
|
|
489
491
|
|
|
490
|
-
async def get_pools(self, machine_id: str) -> ApiResponse:
|
|
492
|
+
async def get_pools(self, machine_id: str) -> ApiResponse[List[PoolResponse]]:
|
|
491
493
|
"""Get all pools that a machine belongs to."""
|
|
492
494
|
try:
|
|
493
495
|
response = await get_machine_pools_v1_machines_machine_id_pools_get.asyncio(
|
|
@@ -498,7 +500,7 @@ class MachinesAPI:
|
|
|
498
500
|
except Exception as e:
|
|
499
501
|
return ApiResponse(error=e)
|
|
500
502
|
|
|
501
|
-
def get_pools_sync(self, machine_id: str) -> ApiResponse:
|
|
503
|
+
def get_pools_sync(self, machine_id: str) -> ApiResponse[List[PoolResponse]]:
|
|
502
504
|
"""Get all pools that a machine belongs to (synchronous)."""
|
|
503
505
|
try:
|
|
504
506
|
response = get_machine_pools_v1_machines_machine_id_pools_get.sync(
|
|
@@ -509,7 +511,7 @@ class MachinesAPI:
|
|
|
509
511
|
except Exception as e:
|
|
510
512
|
return ApiResponse(error=e)
|
|
511
513
|
|
|
512
|
-
async def update_pools(self, machine_id: str, data: MachinePoolUpdate) -> ApiResponse:
|
|
514
|
+
async def update_pools(self, machine_id: str, data: MachinePoolUpdate) -> ApiResponse[List[PoolResponse]]:
|
|
513
515
|
"""Update a machine's pool assignments.
|
|
514
516
|
|
|
515
517
|
This replaces all existing pool assignments with the new ones.
|
|
@@ -531,7 +533,7 @@ class MachinesAPI:
|
|
|
531
533
|
except Exception as e:
|
|
532
534
|
return ApiResponse(error=e)
|
|
533
535
|
|
|
534
|
-
def update_pools_sync(self, machine_id: str, data: MachinePoolUpdate) -> ApiResponse:
|
|
536
|
+
def update_pools_sync(self, machine_id: str, data: MachinePoolUpdate) -> ApiResponse[List[PoolResponse]]:
|
|
535
537
|
"""Update a machine's pool assignments (synchronous).
|
|
536
538
|
|
|
537
539
|
This replaces all existing pool assignments with the new ones.
|
|
@@ -564,7 +566,7 @@ class PoolsAPI:
|
|
|
564
566
|
self,
|
|
565
567
|
skip: Optional[int] = None,
|
|
566
568
|
limit: Optional[int] = None
|
|
567
|
-
) -> ApiResponse:
|
|
569
|
+
) -> ApiResponse[PaginatedResponsePoolResponse]:
|
|
568
570
|
"""List pools for the organization."""
|
|
569
571
|
try:
|
|
570
572
|
response = await list_pools_v1_pools_get.asyncio(
|
|
@@ -580,7 +582,7 @@ class PoolsAPI:
|
|
|
580
582
|
self,
|
|
581
583
|
skip: Optional[int] = None,
|
|
582
584
|
limit: Optional[int] = None
|
|
583
|
-
) -> ApiResponse:
|
|
585
|
+
) -> ApiResponse[PaginatedResponsePoolResponse]:
|
|
584
586
|
"""List pools for the organization (synchronous)."""
|
|
585
587
|
try:
|
|
586
588
|
response = list_pools_v1_pools_get.sync(
|
|
@@ -592,7 +594,7 @@ class PoolsAPI:
|
|
|
592
594
|
except Exception as e:
|
|
593
595
|
return ApiResponse(error=e)
|
|
594
596
|
|
|
595
|
-
async def create(self, data: PoolCreate) -> ApiResponse:
|
|
597
|
+
async def create(self, data: PoolCreate) -> ApiResponse[PoolResponse]:
|
|
596
598
|
"""Create a new pool."""
|
|
597
599
|
try:
|
|
598
600
|
response = await create_pool_v1_pools_post.asyncio(
|
|
@@ -603,7 +605,7 @@ class PoolsAPI:
|
|
|
603
605
|
except Exception as e:
|
|
604
606
|
return ApiResponse(error=e)
|
|
605
607
|
|
|
606
|
-
def create_sync(self, data: PoolCreate) -> ApiResponse:
|
|
608
|
+
def create_sync(self, data: PoolCreate) -> ApiResponse[PoolResponse]:
|
|
607
609
|
"""Create a new pool (synchronous)."""
|
|
608
610
|
try:
|
|
609
611
|
response = create_pool_v1_pools_post.sync(
|
|
@@ -614,7 +616,7 @@ class PoolsAPI:
|
|
|
614
616
|
except Exception as e:
|
|
615
617
|
return ApiResponse(error=e)
|
|
616
618
|
|
|
617
|
-
async def get(self, pool_id: str, include_machines: bool = False) -> ApiResponse:
|
|
619
|
+
async def get(self, pool_id: str, include_machines: bool = False) -> ApiResponse[Union[PoolResponse, PoolWithMachines]]:
|
|
618
620
|
"""Get a specific pool by ID.
|
|
619
621
|
|
|
620
622
|
Args:
|
|
@@ -634,7 +636,7 @@ class PoolsAPI:
|
|
|
634
636
|
except Exception as e:
|
|
635
637
|
return ApiResponse(error=e)
|
|
636
638
|
|
|
637
|
-
def get_sync(self, pool_id: str, include_machines: bool = False) -> ApiResponse:
|
|
639
|
+
def get_sync(self, pool_id: str, include_machines: bool = False) -> ApiResponse[Union[PoolResponse, PoolWithMachines]]:
|
|
638
640
|
"""Get a specific pool by ID (synchronous).
|
|
639
641
|
|
|
640
642
|
Args:
|
|
@@ -654,7 +656,7 @@ class PoolsAPI:
|
|
|
654
656
|
except Exception as e:
|
|
655
657
|
return ApiResponse(error=e)
|
|
656
658
|
|
|
657
|
-
async def update(self, pool_id: str, data: PoolUpdate) -> ApiResponse:
|
|
659
|
+
async def update(self, pool_id: str, data: PoolUpdate) -> ApiResponse[PoolResponse]:
|
|
658
660
|
"""Update a pool's details."""
|
|
659
661
|
try:
|
|
660
662
|
response = await update_pool_v1_pools_pool_id_patch.asyncio(
|
|
@@ -666,7 +668,7 @@ class PoolsAPI:
|
|
|
666
668
|
except Exception as e:
|
|
667
669
|
return ApiResponse(error=e)
|
|
668
670
|
|
|
669
|
-
def update_sync(self, pool_id: str, data: PoolUpdate) -> ApiResponse:
|
|
671
|
+
def update_sync(self, pool_id: str, data: PoolUpdate) -> ApiResponse[PoolResponse]:
|
|
670
672
|
"""Update a pool's details (synchronous)."""
|
|
671
673
|
try:
|
|
672
674
|
response = update_pool_v1_pools_pool_id_patch.sync(
|
|
@@ -678,7 +680,7 @@ class PoolsAPI:
|
|
|
678
680
|
except Exception as e:
|
|
679
681
|
return ApiResponse(error=e)
|
|
680
682
|
|
|
681
|
-
async def delete(self, pool_id: str) -> ApiResponse:
|
|
683
|
+
async def delete(self, pool_id: str) -> ApiResponse[PoolResponse]:
|
|
682
684
|
"""Delete a pool. This will not delete the machines in the pool."""
|
|
683
685
|
try:
|
|
684
686
|
await delete_pool_v1_pools_pool_id_delete.asyncio(
|
|
@@ -689,7 +691,7 @@ class PoolsAPI:
|
|
|
689
691
|
except Exception as e:
|
|
690
692
|
return ApiResponse(error=e)
|
|
691
693
|
|
|
692
|
-
def delete_sync(self, pool_id: str) -> ApiResponse:
|
|
694
|
+
def delete_sync(self, pool_id: str) -> ApiResponse[PoolResponse]:
|
|
693
695
|
"""Delete a pool. This will not delete the machines in the pool (synchronous)."""
|
|
694
696
|
try:
|
|
695
697
|
delete_pool_v1_pools_pool_id_delete.sync(
|
|
@@ -700,7 +702,7 @@ class PoolsAPI:
|
|
|
700
702
|
except Exception as e:
|
|
701
703
|
return ApiResponse(error=e)
|
|
702
704
|
|
|
703
|
-
async def add_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
|
|
705
|
+
async def add_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
|
|
704
706
|
"""Add machines to a pool.
|
|
705
707
|
|
|
706
708
|
Args:
|
|
@@ -720,7 +722,7 @@ class PoolsAPI:
|
|
|
720
722
|
except Exception as e:
|
|
721
723
|
return ApiResponse(error=e)
|
|
722
724
|
|
|
723
|
-
def add_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
|
|
725
|
+
def add_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
|
|
724
726
|
"""Add machines to a pool (synchronous).
|
|
725
727
|
|
|
726
728
|
Args:
|
|
@@ -740,7 +742,7 @@ class PoolsAPI:
|
|
|
740
742
|
except Exception as e:
|
|
741
743
|
return ApiResponse(error=e)
|
|
742
744
|
|
|
743
|
-
async def remove_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
|
|
745
|
+
async def remove_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
|
|
744
746
|
"""Remove machines from a pool.
|
|
745
747
|
|
|
746
748
|
Args:
|
|
@@ -760,7 +762,7 @@ class PoolsAPI:
|
|
|
760
762
|
except Exception as e:
|
|
761
763
|
return ApiResponse(error=e)
|
|
762
764
|
|
|
763
|
-
def remove_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
|
|
765
|
+
def remove_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
|
|
764
766
|
"""Remove machines from a pool (synchronous).
|
|
765
767
|
|
|
766
768
|
Args:
|
|
@@ -796,7 +798,7 @@ class WorkflowsAPI:
|
|
|
796
798
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
797
799
|
updated_at_from: Optional[Union[str, datetime]] = None,
|
|
798
800
|
updated_at_to: Optional[Union[str, datetime]] = None,
|
|
799
|
-
) -> ApiResponse:
|
|
801
|
+
) -> ApiResponse[PaginatedResponseWorkflowResponse]:
|
|
800
802
|
"""List workflows with optional date-time filtering.
|
|
801
803
|
|
|
802
804
|
Args:
|
|
@@ -830,7 +832,7 @@ class WorkflowsAPI:
|
|
|
830
832
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
831
833
|
updated_at_from: Optional[Union[str, datetime]] = None,
|
|
832
834
|
updated_at_to: Optional[Union[str, datetime]] = None,
|
|
833
|
-
) -> ApiResponse:
|
|
835
|
+
) -> ApiResponse[PaginatedResponseWorkflowResponse]:
|
|
834
836
|
"""List workflows (synchronous) with optional date-time filtering."""
|
|
835
837
|
try:
|
|
836
838
|
response = list_workflows_v1_workflows_get.sync(
|
|
@@ -846,7 +848,7 @@ class WorkflowsAPI:
|
|
|
846
848
|
except Exception as e:
|
|
847
849
|
return ApiResponse(error=e)
|
|
848
850
|
|
|
849
|
-
async def create(self, data: WorkflowCreate) -> ApiResponse:
|
|
851
|
+
async def create(self, data: WorkflowCreate) -> ApiResponse[WorkflowResponse]:
|
|
850
852
|
"""Create a new workflow."""
|
|
851
853
|
try:
|
|
852
854
|
response = await create_workflow_v1_workflows_post.asyncio(
|
|
@@ -857,7 +859,7 @@ class WorkflowsAPI:
|
|
|
857
859
|
except Exception as e:
|
|
858
860
|
return ApiResponse(error=e)
|
|
859
861
|
|
|
860
|
-
def create_sync(self, data: WorkflowCreate) -> ApiResponse:
|
|
862
|
+
def create_sync(self, data: WorkflowCreate) -> ApiResponse[WorkflowResponse]:
|
|
861
863
|
"""Create a new workflow (synchronous)."""
|
|
862
864
|
try:
|
|
863
865
|
response = create_workflow_v1_workflows_post.sync(
|
|
@@ -868,7 +870,7 @@ class WorkflowsAPI:
|
|
|
868
870
|
except Exception as e:
|
|
869
871
|
return ApiResponse(error=e)
|
|
870
872
|
|
|
871
|
-
async def get(self, workflow_id: str) -> ApiResponse:
|
|
873
|
+
async def get(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
|
|
872
874
|
"""Get a specific workflow by ID."""
|
|
873
875
|
try:
|
|
874
876
|
response = await get_workflow_v1_workflows_workflow_id_get.asyncio(
|
|
@@ -879,7 +881,7 @@ class WorkflowsAPI:
|
|
|
879
881
|
except Exception as e:
|
|
880
882
|
return ApiResponse(error=e)
|
|
881
883
|
|
|
882
|
-
def get_sync(self, workflow_id: str) -> ApiResponse:
|
|
884
|
+
def get_sync(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
|
|
883
885
|
"""Get a specific workflow by ID (synchronous)."""
|
|
884
886
|
try:
|
|
885
887
|
response = get_workflow_v1_workflows_workflow_id_get.sync(
|
|
@@ -890,7 +892,7 @@ class WorkflowsAPI:
|
|
|
890
892
|
except Exception as e:
|
|
891
893
|
return ApiResponse(error=e)
|
|
892
894
|
|
|
893
|
-
async def update(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse:
|
|
895
|
+
async def update(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse[WorkflowResponse]:
|
|
894
896
|
"""Update a workflow."""
|
|
895
897
|
try:
|
|
896
898
|
response = await update_workflow_v1_workflows_workflow_id_patch.asyncio(
|
|
@@ -902,7 +904,7 @@ class WorkflowsAPI:
|
|
|
902
904
|
except Exception as e:
|
|
903
905
|
return ApiResponse(error=e)
|
|
904
906
|
|
|
905
|
-
def update_sync(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse:
|
|
907
|
+
def update_sync(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse[WorkflowResponse]:
|
|
906
908
|
"""Update a workflow (synchronous)."""
|
|
907
909
|
try:
|
|
908
910
|
response = update_workflow_v1_workflows_workflow_id_patch.sync(
|
|
@@ -914,7 +916,7 @@ class WorkflowsAPI:
|
|
|
914
916
|
except Exception as e:
|
|
915
917
|
return ApiResponse(error=e)
|
|
916
918
|
|
|
917
|
-
async def delete(self, workflow_id: str) -> ApiResponse:
|
|
919
|
+
async def delete(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
|
|
918
920
|
"""Delete a workflow."""
|
|
919
921
|
try:
|
|
920
922
|
await delete_workflow_v1_workflows_workflow_id_delete.asyncio(
|
|
@@ -925,7 +927,7 @@ class WorkflowsAPI:
|
|
|
925
927
|
except Exception as e:
|
|
926
928
|
return ApiResponse(error=e)
|
|
927
929
|
|
|
928
|
-
def delete_sync(self, workflow_id: str) -> ApiResponse:
|
|
930
|
+
def delete_sync(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
|
|
929
931
|
"""Delete a workflow (synchronous)."""
|
|
930
932
|
try:
|
|
931
933
|
delete_workflow_v1_workflows_workflow_id_delete.sync(
|
|
@@ -955,7 +957,7 @@ class RunsAPI:
|
|
|
955
957
|
created_at_from: Optional[Union[str, datetime]] = None,
|
|
956
958
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
957
959
|
fields: Optional[List[RunField]] = None,
|
|
958
|
-
) -> ApiResponse:
|
|
960
|
+
) -> ApiResponse[PaginatedResponseRunResponse]:
|
|
959
961
|
"""List runs with optional filtering.
|
|
960
962
|
|
|
961
963
|
Args:
|
|
@@ -1000,7 +1002,7 @@ class RunsAPI:
|
|
|
1000
1002
|
created_at_from: Optional[Union[str, datetime]] = None,
|
|
1001
1003
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
1002
1004
|
fields: Optional[List[RunField]] = None,
|
|
1003
|
-
) -> ApiResponse:
|
|
1005
|
+
) -> ApiResponse[PaginatedResponseRunResponse]:
|
|
1004
1006
|
"""List runs with optional filtering (synchronous).
|
|
1005
1007
|
|
|
1006
1008
|
See async variant for parameter docs. Supports `fields` projection.
|
|
@@ -1022,7 +1024,7 @@ class RunsAPI:
|
|
|
1022
1024
|
except Exception as e:
|
|
1023
1025
|
return ApiResponse(error=e)
|
|
1024
1026
|
|
|
1025
|
-
async def retry(self, run_id: str, retry: RunRetry) -> ApiResponse:
|
|
1027
|
+
async def retry(self, run_id: str, retry: RunRetry) -> ApiResponse[RunResponse]:
|
|
1026
1028
|
"""Retry an existing run in-place (same run_id).
|
|
1027
1029
|
|
|
1028
1030
|
Clears previous outputs/history/output attachments, optionally replaces inputs/files,
|
|
@@ -1038,7 +1040,7 @@ class RunsAPI:
|
|
|
1038
1040
|
except Exception as e:
|
|
1039
1041
|
return ApiResponse(error=e)
|
|
1040
1042
|
|
|
1041
|
-
def retry_sync(self, run_id: str, retry: RunRetry) -> ApiResponse:
|
|
1043
|
+
def retry_sync(self, run_id: str, retry: RunRetry) -> ApiResponse[RunResponse]:
|
|
1042
1044
|
"""Retry an existing run in-place (synchronous)."""
|
|
1043
1045
|
try:
|
|
1044
1046
|
response = retry_run_v1_runs_run_id_retry_post.sync(
|
|
@@ -1050,7 +1052,7 @@ class RunsAPI:
|
|
|
1050
1052
|
except Exception as e:
|
|
1051
1053
|
return ApiResponse(error=e)
|
|
1052
1054
|
|
|
1053
|
-
async def create(self, data: RunCreate) -> ApiResponse:
|
|
1055
|
+
async def create(self, data: RunCreate) -> ApiResponse[RunResponse]:
|
|
1054
1056
|
"""Create a new run.
|
|
1055
1057
|
|
|
1056
1058
|
Args:
|
|
@@ -1078,7 +1080,7 @@ class RunsAPI:
|
|
|
1078
1080
|
except Exception as e:
|
|
1079
1081
|
return ApiResponse(error=e)
|
|
1080
1082
|
|
|
1081
|
-
def create_sync(self, data: RunCreate) -> ApiResponse:
|
|
1083
|
+
def create_sync(self, data: RunCreate) -> ApiResponse[RunResponse]:
|
|
1082
1084
|
"""Create a new run (synchronous).
|
|
1083
1085
|
|
|
1084
1086
|
Args:
|
|
@@ -1106,7 +1108,7 @@ class RunsAPI:
|
|
|
1106
1108
|
except Exception as e:
|
|
1107
1109
|
return ApiResponse(error=e)
|
|
1108
1110
|
|
|
1109
|
-
async def get(self, run_id: str) -> ApiResponse:
|
|
1111
|
+
async def get(self, run_id: str) -> ApiResponse[RunResponse]:
|
|
1110
1112
|
"""Get a specific run by ID."""
|
|
1111
1113
|
try:
|
|
1112
1114
|
response = await get_run_v1_runs_run_id_get.asyncio(
|
|
@@ -1117,7 +1119,7 @@ class RunsAPI:
|
|
|
1117
1119
|
except Exception as e:
|
|
1118
1120
|
return ApiResponse(error=e)
|
|
1119
1121
|
|
|
1120
|
-
def get_sync(self, run_id: str) -> ApiResponse:
|
|
1122
|
+
def get_sync(self, run_id: str) -> ApiResponse[RunResponse]:
|
|
1121
1123
|
"""Get a specific run by ID (synchronous)."""
|
|
1122
1124
|
try:
|
|
1123
1125
|
response = get_run_v1_runs_run_id_get.sync(
|
|
@@ -1128,7 +1130,7 @@ class RunsAPI:
|
|
|
1128
1130
|
except Exception as e:
|
|
1129
1131
|
return ApiResponse(error=e)
|
|
1130
1132
|
|
|
1131
|
-
async def update(self, run_id: str, data: RunUpdate) -> ApiResponse:
|
|
1133
|
+
async def update(self, run_id: str, data: RunUpdate) -> ApiResponse[RunResponse]:
|
|
1132
1134
|
"""Update a run."""
|
|
1133
1135
|
try:
|
|
1134
1136
|
response = await update_run_v1_runs_run_id_patch.asyncio(
|
|
@@ -1140,7 +1142,7 @@ class RunsAPI:
|
|
|
1140
1142
|
except Exception as e:
|
|
1141
1143
|
return ApiResponse(error=e)
|
|
1142
1144
|
|
|
1143
|
-
def update_sync(self, run_id: str, data: RunUpdate) -> ApiResponse:
|
|
1145
|
+
def update_sync(self, run_id: str, data: RunUpdate) -> ApiResponse[RunResponse]:
|
|
1144
1146
|
"""Update a run (synchronous)."""
|
|
1145
1147
|
try:
|
|
1146
1148
|
response = update_run_v1_runs_run_id_patch.sync(
|
|
@@ -1152,7 +1154,7 @@ class RunsAPI:
|
|
|
1152
1154
|
except Exception as e:
|
|
1153
1155
|
return ApiResponse(error=e)
|
|
1154
1156
|
|
|
1155
|
-
async def delete(self, run_id: str) -> ApiResponse:
|
|
1157
|
+
async def delete(self, run_id: str) -> ApiResponse[RunResponse]:
|
|
1156
1158
|
"""Delete a run."""
|
|
1157
1159
|
try:
|
|
1158
1160
|
await delete_run_v1_runs_run_id_delete.asyncio(
|
|
@@ -1163,7 +1165,7 @@ class RunsAPI:
|
|
|
1163
1165
|
except Exception as e:
|
|
1164
1166
|
return ApiResponse(error=e)
|
|
1165
1167
|
|
|
1166
|
-
def delete_sync(self, run_id: str) -> ApiResponse:
|
|
1168
|
+
def delete_sync(self, run_id: str) -> ApiResponse[RunResponse]:
|
|
1167
1169
|
"""Delete a run (synchronous)."""
|
|
1168
1170
|
try:
|
|
1169
1171
|
delete_run_v1_runs_run_id_delete.sync(
|
|
@@ -1174,7 +1176,7 @@ class RunsAPI:
|
|
|
1174
1176
|
except Exception as e:
|
|
1175
1177
|
return ApiResponse(error=e)
|
|
1176
1178
|
|
|
1177
|
-
async def bulk_create(self, data: RunBulkCreate) -> ApiResponse:
|
|
1179
|
+
async def bulk_create(self, data: RunBulkCreate) -> ApiResponse[RunBulkCreateResponse]:
|
|
1178
1180
|
"""Create multiple runs with the same configuration.
|
|
1179
1181
|
|
|
1180
1182
|
This method efficiently creates multiple runs:
|
|
@@ -1209,7 +1211,7 @@ class RunsAPI:
|
|
|
1209
1211
|
except Exception as e:
|
|
1210
1212
|
return ApiResponse(error=e)
|
|
1211
1213
|
|
|
1212
|
-
def bulk_create_sync(self, data: RunBulkCreate) -> ApiResponse:
|
|
1214
|
+
def bulk_create_sync(self, data: RunBulkCreate) -> ApiResponse[RunBulkCreateResponse]:
|
|
1213
1215
|
"""Create multiple runs with the same configuration (synchronous).
|
|
1214
1216
|
|
|
1215
1217
|
This method efficiently creates multiple runs:
|
|
@@ -1244,7 +1246,7 @@ class RunsAPI:
|
|
|
1244
1246
|
except Exception as e:
|
|
1245
1247
|
return ApiResponse(error=e)
|
|
1246
1248
|
|
|
1247
|
-
async def chain(self, data: WorkflowChainCreate) -> ApiResponse:
|
|
1249
|
+
async def chain(self, data: WorkflowChainCreate) -> ApiResponse[WorkflowChainResponse]:
|
|
1248
1250
|
"""Create a multi-step chain that runs on a single reserved session/machine.
|
|
1249
1251
|
|
|
1250
1252
|
Args:
|
|
@@ -1264,7 +1266,7 @@ class RunsAPI:
|
|
|
1264
1266
|
except Exception as e:
|
|
1265
1267
|
return ApiResponse(error=e)
|
|
1266
1268
|
|
|
1267
|
-
def chain_sync(self, data: WorkflowChainCreate) -> ApiResponse:
|
|
1269
|
+
def chain_sync(self, data: WorkflowChainCreate) -> ApiResponse[WorkflowChainResponse]:
|
|
1268
1270
|
"""Create a multi-step chain (synchronous).
|
|
1269
1271
|
|
|
1270
1272
|
Args:
|
|
@@ -1297,7 +1299,7 @@ class ConnectionsAPI:
|
|
|
1297
1299
|
limit: Optional[int] = None,
|
|
1298
1300
|
machine_id: Optional[str] = None,
|
|
1299
1301
|
status: Optional[Union[str, ConnectionStatus]] = None
|
|
1300
|
-
) -> ApiResponse:
|
|
1302
|
+
) -> ApiResponse[PaginatedResponseConnectionResponse]:
|
|
1301
1303
|
"""List connections with optional filtering."""
|
|
1302
1304
|
try:
|
|
1303
1305
|
# Handle status conversion
|
|
@@ -1321,7 +1323,7 @@ class ConnectionsAPI:
|
|
|
1321
1323
|
limit: Optional[int] = None,
|
|
1322
1324
|
machine_id: Optional[str] = None,
|
|
1323
1325
|
status: Optional[Union[str, ConnectionStatus]] = None
|
|
1324
|
-
) -> ApiResponse:
|
|
1326
|
+
) -> ApiResponse[PaginatedResponseConnectionResponse]:
|
|
1325
1327
|
"""List connections with optional filtering (synchronous)."""
|
|
1326
1328
|
try:
|
|
1327
1329
|
# Handle status conversion
|
|
@@ -1339,7 +1341,7 @@ class ConnectionsAPI:
|
|
|
1339
1341
|
except Exception as e:
|
|
1340
1342
|
return ApiResponse(error=e)
|
|
1341
1343
|
|
|
1342
|
-
async def create(self, data: ConnectionCreate) -> ApiResponse:
|
|
1344
|
+
async def create(self, data: ConnectionCreate) -> ApiResponse[ConnectionResponse]:
|
|
1343
1345
|
"""Create a new connection."""
|
|
1344
1346
|
try:
|
|
1345
1347
|
response = await create_connection_v1_connections_post.asyncio(
|
|
@@ -1350,7 +1352,7 @@ class ConnectionsAPI:
|
|
|
1350
1352
|
except Exception as e:
|
|
1351
1353
|
return ApiResponse(error=e)
|
|
1352
1354
|
|
|
1353
|
-
def create_sync(self, data: ConnectionCreate) -> ApiResponse:
|
|
1355
|
+
def create_sync(self, data: ConnectionCreate) -> ApiResponse[ConnectionResponse]:
|
|
1354
1356
|
"""Create a new connection (synchronous)."""
|
|
1355
1357
|
try:
|
|
1356
1358
|
response = create_connection_v1_connections_post.sync(
|
|
@@ -1379,7 +1381,7 @@ class TrajectoriesAPI:
|
|
|
1379
1381
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
1380
1382
|
updated_at_from: Optional[Union[str, datetime]] = None,
|
|
1381
1383
|
updated_at_to: Optional[Union[str, datetime]] = None,
|
|
1382
|
-
) -> ApiResponse:
|
|
1384
|
+
) -> ApiResponse[PaginatedResponseTrajectoryResponse]:
|
|
1383
1385
|
"""List trajectories with optional filtering.
|
|
1384
1386
|
|
|
1385
1387
|
Args:
|
|
@@ -1422,7 +1424,7 @@ class TrajectoriesAPI:
|
|
|
1422
1424
|
created_at_to: Optional[Union[str, datetime]] = None,
|
|
1423
1425
|
updated_at_from: Optional[Union[str, datetime]] = None,
|
|
1424
1426
|
updated_at_to: Optional[Union[str, datetime]] = None,
|
|
1425
|
-
) -> ApiResponse:
|
|
1427
|
+
) -> ApiResponse[PaginatedResponseTrajectoryResponse]:
|
|
1426
1428
|
"""List trajectories with optional filtering (synchronous).
|
|
1427
1429
|
|
|
1428
1430
|
Args:
|
|
@@ -1454,7 +1456,7 @@ class TrajectoriesAPI:
|
|
|
1454
1456
|
except Exception as e:
|
|
1455
1457
|
return ApiResponse(error=e)
|
|
1456
1458
|
|
|
1457
|
-
async def create(self, data: TrajectoryCreate) -> ApiResponse:
|
|
1459
|
+
async def create(self, data: TrajectoryCreate) -> ApiResponse[TrajectoryResponse]:
|
|
1458
1460
|
"""Create a new trajectory.
|
|
1459
1461
|
|
|
1460
1462
|
Note: Trajectories are created with is_approved=False by default.
|
|
@@ -1469,7 +1471,7 @@ class TrajectoriesAPI:
|
|
|
1469
1471
|
except Exception as e:
|
|
1470
1472
|
return ApiResponse(error=e)
|
|
1471
1473
|
|
|
1472
|
-
def create_sync(self, data: TrajectoryCreate) -> ApiResponse:
|
|
1474
|
+
def create_sync(self, data: TrajectoryCreate) -> ApiResponse[TrajectoryResponse]:
|
|
1473
1475
|
"""Create a new trajectory (synchronous).
|
|
1474
1476
|
|
|
1475
1477
|
Note: Trajectories are created with is_approved=False by default.
|
|
@@ -1484,7 +1486,7 @@ class TrajectoriesAPI:
|
|
|
1484
1486
|
except Exception as e:
|
|
1485
1487
|
return ApiResponse(error=e)
|
|
1486
1488
|
|
|
1487
|
-
async def get(self, trajectory_id: str) -> ApiResponse:
|
|
1489
|
+
async def get(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
|
|
1488
1490
|
"""Get a specific trajectory by ID."""
|
|
1489
1491
|
try:
|
|
1490
1492
|
response = await get_trajectory_v1_trajectories_trajectory_id_get.asyncio(
|
|
@@ -1495,7 +1497,7 @@ class TrajectoriesAPI:
|
|
|
1495
1497
|
except Exception as e:
|
|
1496
1498
|
return ApiResponse(error=e)
|
|
1497
1499
|
|
|
1498
|
-
def get_sync(self, trajectory_id: str) -> ApiResponse:
|
|
1500
|
+
def get_sync(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
|
|
1499
1501
|
"""Get a specific trajectory by ID (synchronous)."""
|
|
1500
1502
|
try:
|
|
1501
1503
|
response = get_trajectory_v1_trajectories_trajectory_id_get.sync(
|
|
@@ -1506,7 +1508,7 @@ class TrajectoriesAPI:
|
|
|
1506
1508
|
except Exception as e:
|
|
1507
1509
|
return ApiResponse(error=e)
|
|
1508
1510
|
|
|
1509
|
-
async def update(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse:
|
|
1511
|
+
async def update(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse[TrajectoryResponse]:
|
|
1510
1512
|
"""Update a trajectory.
|
|
1511
1513
|
|
|
1512
1514
|
You can update trajectory metadata (name, description), trajectory data (steps),
|
|
@@ -1523,7 +1525,7 @@ class TrajectoriesAPI:
|
|
|
1523
1525
|
except Exception as e:
|
|
1524
1526
|
return ApiResponse(error=e)
|
|
1525
1527
|
|
|
1526
|
-
def update_sync(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse:
|
|
1528
|
+
def update_sync(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse[TrajectoryResponse]:
|
|
1527
1529
|
"""Update a trajectory (synchronous).
|
|
1528
1530
|
|
|
1529
1531
|
You can update trajectory metadata (name, description), trajectory data (steps),
|
|
@@ -1540,7 +1542,7 @@ class TrajectoriesAPI:
|
|
|
1540
1542
|
except Exception as e:
|
|
1541
1543
|
return ApiResponse(error=e)
|
|
1542
1544
|
|
|
1543
|
-
async def delete(self, trajectory_id: str) -> ApiResponse:
|
|
1545
|
+
async def delete(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
|
|
1544
1546
|
"""Delete a trajectory."""
|
|
1545
1547
|
try:
|
|
1546
1548
|
await delete_trajectory_v1_trajectories_trajectory_id_delete.asyncio(
|
|
@@ -1551,7 +1553,7 @@ class TrajectoriesAPI:
|
|
|
1551
1553
|
except Exception as e:
|
|
1552
1554
|
return ApiResponse(error=e)
|
|
1553
1555
|
|
|
1554
|
-
def delete_sync(self, trajectory_id: str) -> ApiResponse:
|
|
1556
|
+
def delete_sync(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
|
|
1555
1557
|
"""Delete a trajectory (synchronous)."""
|
|
1556
1558
|
try:
|
|
1557
1559
|
delete_trajectory_v1_trajectories_trajectory_id_delete.sync(
|
|
@@ -1562,7 +1564,7 @@ class TrajectoriesAPI:
|
|
|
1562
1564
|
except Exception as e:
|
|
1563
1565
|
return ApiResponse(error=e)
|
|
1564
1566
|
|
|
1565
|
-
async def get_latest_for_workflow(self, workflow_id: str) -> ApiResponse:
|
|
1567
|
+
async def get_latest_for_workflow(self, workflow_id: str) -> ApiResponse[TrajectoryResponse]:
|
|
1566
1568
|
"""Get the latest trajectory for a workflow."""
|
|
1567
1569
|
try:
|
|
1568
1570
|
response = await get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.asyncio(
|
|
@@ -1573,7 +1575,7 @@ class TrajectoriesAPI:
|
|
|
1573
1575
|
except Exception as e:
|
|
1574
1576
|
return ApiResponse(error=e)
|
|
1575
1577
|
|
|
1576
|
-
def get_latest_for_workflow_sync(self, workflow_id: str) -> ApiResponse:
|
|
1578
|
+
def get_latest_for_workflow_sync(self, workflow_id: str) -> ApiResponse[TrajectoryResponse]:
|
|
1577
1579
|
"""Get the latest trajectory for a workflow (synchronous)."""
|
|
1578
1580
|
try:
|
|
1579
1581
|
response = get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.sync(
|
|
@@ -1597,7 +1599,7 @@ class RunAttachmentsAPI:
|
|
|
1597
1599
|
limit: Optional[int] = None,
|
|
1598
1600
|
run_id: Optional[str] = None,
|
|
1599
1601
|
attachment_type: Optional[AttachmentType] = None
|
|
1600
|
-
) -> ApiResponse:
|
|
1602
|
+
) -> ApiResponse[PaginatedResponseRunAttachmentResponse]:
|
|
1601
1603
|
"""List run attachments with optional filtering."""
|
|
1602
1604
|
try:
|
|
1603
1605
|
response = await list_run_attachments_v1_run_attachments_get.asyncio(
|
|
@@ -1617,7 +1619,7 @@ class RunAttachmentsAPI:
|
|
|
1617
1619
|
limit: Optional[int] = None,
|
|
1618
1620
|
run_id: Optional[str] = None,
|
|
1619
1621
|
attachment_type: Optional[AttachmentType] = None
|
|
1620
|
-
) -> ApiResponse:
|
|
1622
|
+
) -> ApiResponse[PaginatedResponseRunAttachmentResponse]:
|
|
1621
1623
|
"""List run attachments with optional filtering (synchronous)."""
|
|
1622
1624
|
try:
|
|
1623
1625
|
response = list_run_attachments_v1_run_attachments_get.sync(
|
|
@@ -1631,7 +1633,7 @@ class RunAttachmentsAPI:
|
|
|
1631
1633
|
except Exception as e:
|
|
1632
1634
|
return ApiResponse(error=e)
|
|
1633
1635
|
|
|
1634
|
-
async def create(self, data: RunAttachmentCreate) -> ApiResponse:
|
|
1636
|
+
async def create(self, data: RunAttachmentCreate) -> ApiResponse[RunAttachmentResponse]:
|
|
1635
1637
|
"""Create a new run attachment."""
|
|
1636
1638
|
try:
|
|
1637
1639
|
response = await create_run_attachment_v1_run_attachments_post.asyncio(
|
|
@@ -1642,7 +1644,7 @@ class RunAttachmentsAPI:
|
|
|
1642
1644
|
except Exception as e:
|
|
1643
1645
|
return ApiResponse(error=e)
|
|
1644
1646
|
|
|
1645
|
-
def create_sync(self, data: RunAttachmentCreate) -> ApiResponse:
|
|
1647
|
+
def create_sync(self, data: RunAttachmentCreate) -> ApiResponse[RunAttachmentResponse]:
|
|
1646
1648
|
"""Create a new run attachment (synchronous)."""
|
|
1647
1649
|
try:
|
|
1648
1650
|
response = create_run_attachment_v1_run_attachments_post.sync(
|
|
@@ -1653,7 +1655,7 @@ class RunAttachmentsAPI:
|
|
|
1653
1655
|
except Exception as e:
|
|
1654
1656
|
return ApiResponse(error=e)
|
|
1655
1657
|
|
|
1656
|
-
async def get(self, attachment_id: str) -> ApiResponse:
|
|
1658
|
+
async def get(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
|
|
1657
1659
|
"""Get a specific run attachment by ID."""
|
|
1658
1660
|
try:
|
|
1659
1661
|
response = await get_run_attachment_v1_run_attachments_attachment_id_get.asyncio(
|
|
@@ -1664,7 +1666,7 @@ class RunAttachmentsAPI:
|
|
|
1664
1666
|
except Exception as e:
|
|
1665
1667
|
return ApiResponse(error=e)
|
|
1666
1668
|
|
|
1667
|
-
def get_sync(self, attachment_id: str) -> ApiResponse:
|
|
1669
|
+
def get_sync(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
|
|
1668
1670
|
"""Get a specific run attachment by ID (synchronous)."""
|
|
1669
1671
|
try:
|
|
1670
1672
|
response = get_run_attachment_v1_run_attachments_attachment_id_get.sync(
|
|
@@ -1679,7 +1681,7 @@ class RunAttachmentsAPI:
|
|
|
1679
1681
|
self,
|
|
1680
1682
|
attachment_id: str,
|
|
1681
1683
|
expires_in: Optional[int] = None
|
|
1682
|
-
) -> ApiResponse:
|
|
1684
|
+
) -> ApiResponse[RunAttachmentDownloadUrlResponse]:
|
|
1683
1685
|
"""Get a signed download URL for a run attachment.
|
|
1684
1686
|
|
|
1685
1687
|
The returned URL will trigger an automatic download when accessed in a browser.
|
|
@@ -1707,7 +1709,7 @@ class RunAttachmentsAPI:
|
|
|
1707
1709
|
self,
|
|
1708
1710
|
attachment_id: str,
|
|
1709
1711
|
expires_in: Optional[int] = None
|
|
1710
|
-
) -> ApiResponse:
|
|
1712
|
+
) -> ApiResponse[RunAttachmentDownloadUrlResponse]:
|
|
1711
1713
|
"""Get a signed download URL for a run attachment (synchronous).
|
|
1712
1714
|
|
|
1713
1715
|
The returned URL will trigger an automatic download when accessed in a browser.
|
|
@@ -1731,7 +1733,7 @@ class RunAttachmentsAPI:
|
|
|
1731
1733
|
except Exception as e:
|
|
1732
1734
|
return ApiResponse(error=e)
|
|
1733
1735
|
|
|
1734
|
-
async def download(self, attachment_id: str) -> ApiResponse:
|
|
1736
|
+
async def download(self, attachment_id: str) -> ApiResponse[bytes]:
|
|
1735
1737
|
"""Download a run attachment file directly.
|
|
1736
1738
|
|
|
1737
1739
|
This method returns the raw file content as bytes. For a download URL instead,
|
|
@@ -1752,7 +1754,7 @@ class RunAttachmentsAPI:
|
|
|
1752
1754
|
except Exception as e:
|
|
1753
1755
|
return ApiResponse(error=e)
|
|
1754
1756
|
|
|
1755
|
-
def download_sync(self, attachment_id: str) -> ApiResponse:
|
|
1757
|
+
def download_sync(self, attachment_id: str) -> ApiResponse[bytes]:
|
|
1756
1758
|
"""Download a run attachment file directly (synchronous).
|
|
1757
1759
|
|
|
1758
1760
|
This method returns the raw file content as bytes. For a download URL instead,
|
|
@@ -1773,7 +1775,7 @@ class RunAttachmentsAPI:
|
|
|
1773
1775
|
except Exception as e:
|
|
1774
1776
|
return ApiResponse(error=e)
|
|
1775
1777
|
|
|
1776
|
-
async def update(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse:
|
|
1778
|
+
async def update(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse[RunAttachmentResponse]:
|
|
1777
1779
|
"""Update a run attachment (e.g., set expiration)."""
|
|
1778
1780
|
try:
|
|
1779
1781
|
response = await update_run_attachment_v1_run_attachments_attachment_id_put.asyncio(
|
|
@@ -1785,7 +1787,7 @@ class RunAttachmentsAPI:
|
|
|
1785
1787
|
except Exception as e:
|
|
1786
1788
|
return ApiResponse(error=e)
|
|
1787
1789
|
|
|
1788
|
-
def update_sync(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse:
|
|
1790
|
+
def update_sync(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse[RunAttachmentResponse]:
|
|
1789
1791
|
"""Update a run attachment (e.g., set expiration) (synchronous)."""
|
|
1790
1792
|
try:
|
|
1791
1793
|
response = update_run_attachment_v1_run_attachments_attachment_id_put.sync(
|
|
@@ -1797,7 +1799,7 @@ class RunAttachmentsAPI:
|
|
|
1797
1799
|
except Exception as e:
|
|
1798
1800
|
return ApiResponse(error=e)
|
|
1799
1801
|
|
|
1800
|
-
async def delete(self, attachment_id: str) -> ApiResponse:
|
|
1802
|
+
async def delete(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
|
|
1801
1803
|
"""Delete a run attachment."""
|
|
1802
1804
|
try:
|
|
1803
1805
|
await delete_run_attachment_v1_run_attachments_attachment_id_delete.asyncio(
|
|
@@ -1808,7 +1810,7 @@ class RunAttachmentsAPI:
|
|
|
1808
1810
|
except Exception as e:
|
|
1809
1811
|
return ApiResponse(error=e)
|
|
1810
1812
|
|
|
1811
|
-
def delete_sync(self, attachment_id: str) -> ApiResponse:
|
|
1813
|
+
def delete_sync(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
|
|
1812
1814
|
"""Delete a run attachment (synchronous)."""
|
|
1813
1815
|
try:
|
|
1814
1816
|
delete_run_attachment_v1_run_attachments_attachment_id_delete.sync(
|
|
@@ -1824,7 +1826,7 @@ class RunAttachmentsAPI:
|
|
|
1824
1826
|
attachment_id: str,
|
|
1825
1827
|
output_path: Optional[Union[str, Path]] = None,
|
|
1826
1828
|
use_original_filename: bool = True
|
|
1827
|
-
) -> ApiResponse:
|
|
1829
|
+
) -> ApiResponse[Dict[str, Any]]:
|
|
1828
1830
|
"""Download and save a run attachment to a file.
|
|
1829
1831
|
|
|
1830
1832
|
This is a convenience method that combines getting attachment info
|
|
@@ -1873,7 +1875,7 @@ class RunAttachmentsAPI:
|
|
|
1873
1875
|
attachment_id: str,
|
|
1874
1876
|
output_path: Optional[Union[str, Path]] = None,
|
|
1875
1877
|
use_original_filename: bool = True
|
|
1876
|
-
) -> ApiResponse:
|
|
1878
|
+
) -> ApiResponse[Dict[str, Any]]:
|
|
1877
1879
|
"""Download and save a run attachment to a file (synchronous).
|
|
1878
1880
|
|
|
1879
1881
|
This is a convenience method that combines getting attachment info
|