cyberdesk 2.1.16__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.

Files changed (92) hide show
  1. cyberdesk/__init__.py +1 -1
  2. cyberdesk/client.py +212 -106
  3. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/METADATA +158 -2
  4. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/RECORD +92 -84
  5. openapi_client/cyberdesk_cloud_client/api/computer/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +221 -0
  6. openapi_client/cyberdesk_cloud_client/api/computer/fs_list_v1_computer_machine_id_fs_list_get.py +2 -0
  7. openapi_client/cyberdesk_cloud_client/api/computer/fs_read_v1_computer_machine_id_fs_read_get.py +2 -0
  8. openapi_client/cyberdesk_cloud_client/api/computer/fs_write_v1_computer_machine_id_fs_write_post.py +2 -0
  9. openapi_client/cyberdesk_cloud_client/api/computer/get_display_dimensions_v1_computer_machine_id_display_dimensions_get.py +2 -0
  10. openapi_client/cyberdesk_cloud_client/api/computer/get_mouse_position_v1_computer_machine_id_input_mouse_position_get.py +2 -0
  11. openapi_client/cyberdesk_cloud_client/api/computer/get_screenshot_v1_computer_machine_id_display_screenshot_get.py +1 -0
  12. openapi_client/cyberdesk_cloud_client/api/computer/keyboard_key_v1_computer_machine_id_input_keyboard_key_post.py +2 -0
  13. openapi_client/cyberdesk_cloud_client/api/computer/keyboard_type_v1_computer_machine_id_input_keyboard_type_post.py +2 -0
  14. openapi_client/cyberdesk_cloud_client/api/computer/mouse_click_v1_computer_machine_id_input_mouse_click_post.py +2 -0
  15. openapi_client/cyberdesk_cloud_client/api/computer/mouse_drag_v1_computer_machine_id_input_mouse_drag_post.py +2 -0
  16. openapi_client/cyberdesk_cloud_client/api/computer/mouse_move_v1_computer_machine_id_input_mouse_move_post.py +2 -0
  17. openapi_client/cyberdesk_cloud_client/api/computer/mouse_scroll_v1_computer_machine_id_input_mouse_scroll_post.py +2 -0
  18. openapi_client/cyberdesk_cloud_client/api/computer/powershell_exec_v1_computer_machine_id_shell_powershell_exec_post.py +2 -0
  19. openapi_client/cyberdesk_cloud_client/api/computer/powershell_session_v1_computer_machine_id_shell_powershell_session_post.py +2 -0
  20. openapi_client/cyberdesk_cloud_client/api/connections/create_connection_v1_connections_post.py +2 -0
  21. openapi_client/cyberdesk_cloud_client/api/connections/delete_connection_v1_connections_connection_id_delete.py +2 -0
  22. openapi_client/cyberdesk_cloud_client/api/connections/get_connection_v1_connections_connection_id_get.py +2 -0
  23. openapi_client/cyberdesk_cloud_client/api/connections/list_connections_v1_connections_get.py +2 -0
  24. openapi_client/cyberdesk_cloud_client/api/connections/update_connection_v1_connections_connection_id_patch.py +2 -0
  25. openapi_client/cyberdesk_cloud_client/api/default/health_db_health_db_get.py +1 -0
  26. openapi_client/cyberdesk_cloud_client/api/default/health_health_get.py +1 -0
  27. openapi_client/cyberdesk_cloud_client/api/default/root_get.py +1 -0
  28. openapi_client/cyberdesk_cloud_client/api/health/database_health_check_v1_health_db_get.py +9 -67
  29. openapi_client/cyberdesk_cloud_client/api/health/health_check_v1_health_get.py +1 -0
  30. openapi_client/cyberdesk_cloud_client/api/machines/create_machine_v1_machines_post.py +2 -0
  31. openapi_client/cyberdesk_cloud_client/api/machines/delete_machine_v1_machines_machine_id_delete.py +18 -4
  32. openapi_client/cyberdesk_cloud_client/api/machines/get_machine_pools_v1_machines_machine_id_pools_get.py +2 -0
  33. openapi_client/cyberdesk_cloud_client/api/machines/get_machine_v1_machines_machine_id_get.py +2 -0
  34. openapi_client/cyberdesk_cloud_client/api/machines/list_machines_v1_machines_get.py +2 -0
  35. openapi_client/cyberdesk_cloud_client/api/machines/update_machine_pools_v1_machines_machine_id_pools_put.py +2 -0
  36. openapi_client/cyberdesk_cloud_client/api/machines/update_machine_v1_machines_machine_id_patch.py +14 -0
  37. openapi_client/cyberdesk_cloud_client/api/pools/add_machines_to_pool_v1_pools_pool_id_machines_post.py +2 -0
  38. openapi_client/cyberdesk_cloud_client/api/pools/create_pool_v1_pools_post.py +2 -0
  39. openapi_client/cyberdesk_cloud_client/api/pools/delete_pool_v1_pools_pool_id_delete.py +2 -0
  40. openapi_client/cyberdesk_cloud_client/api/pools/get_pool_v1_pools_pool_id_get.py +2 -0
  41. openapi_client/cyberdesk_cloud_client/api/pools/list_pools_v1_pools_get.py +2 -0
  42. openapi_client/cyberdesk_cloud_client/api/pools/remove_machines_from_pool_v1_pools_pool_id_machines_delete.py +2 -0
  43. openapi_client/cyberdesk_cloud_client/api/pools/update_pool_v1_pools_pool_id_patch.py +2 -0
  44. openapi_client/cyberdesk_cloud_client/api/request_logs/create_request_log_v1_request_logs_post.py +2 -0
  45. openapi_client/cyberdesk_cloud_client/api/request_logs/delete_request_log_v1_request_logs_log_id_delete.py +2 -0
  46. openapi_client/cyberdesk_cloud_client/api/request_logs/get_request_log_v1_request_logs_log_id_get.py +2 -0
  47. openapi_client/cyberdesk_cloud_client/api/request_logs/list_request_logs_v1_request_logs_get.py +2 -0
  48. openapi_client/cyberdesk_cloud_client/api/request_logs/update_request_log_v1_request_logs_log_id_patch.py +2 -0
  49. openapi_client/cyberdesk_cloud_client/api/run_attachments/create_run_attachment_v1_run_attachments_post.py +2 -0
  50. openapi_client/cyberdesk_cloud_client/api/run_attachments/delete_run_attachment_v1_run_attachments_attachment_id_delete.py +2 -0
  51. openapi_client/cyberdesk_cloud_client/api/run_attachments/download_run_attachment_v1_run_attachments_attachment_id_download_get.py +2 -0
  52. openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_download_url_v1_run_attachments_attachment_id_download_url_get.py +2 -0
  53. openapi_client/cyberdesk_cloud_client/api/run_attachments/get_run_attachment_v1_run_attachments_attachment_id_get.py +2 -0
  54. openapi_client/cyberdesk_cloud_client/api/run_attachments/list_run_attachments_v1_run_attachments_get.py +2 -0
  55. openapi_client/cyberdesk_cloud_client/api/run_attachments/update_run_attachment_v1_run_attachments_attachment_id_put.py +2 -0
  56. openapi_client/cyberdesk_cloud_client/api/runs/bulk_create_runs_v1_runs_bulk_post.py +2 -0
  57. openapi_client/cyberdesk_cloud_client/api/runs/create_run_chain_v1_runs_chain_post.py +2 -0
  58. openapi_client/cyberdesk_cloud_client/api/runs/create_run_v1_runs_post.py +2 -0
  59. openapi_client/cyberdesk_cloud_client/api/runs/delete_run_v1_runs_run_id_delete.py +2 -0
  60. openapi_client/cyberdesk_cloud_client/api/runs/get_run_v1_runs_run_id_get.py +2 -0
  61. openapi_client/cyberdesk_cloud_client/api/runs/list_runs_v1_runs_get.py +2 -0
  62. openapi_client/cyberdesk_cloud_client/api/runs/retry_run_v1_runs_run_id_retry_post.py +2 -0
  63. openapi_client/cyberdesk_cloud_client/api/runs/update_run_v1_runs_run_id_patch.py +2 -0
  64. openapi_client/cyberdesk_cloud_client/api/test/dummy_test_endpoint_v1_test_post.py +1 -0
  65. openapi_client/cyberdesk_cloud_client/api/trajectories/create_trajectory_v1_trajectories_post.py +2 -0
  66. openapi_client/cyberdesk_cloud_client/api/trajectories/delete_trajectory_v1_trajectories_trajectory_id_delete.py +2 -0
  67. openapi_client/cyberdesk_cloud_client/api/trajectories/get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.py +2 -0
  68. openapi_client/cyberdesk_cloud_client/api/trajectories/get_trajectory_v1_trajectories_trajectory_id_get.py +2 -0
  69. openapi_client/cyberdesk_cloud_client/api/trajectories/list_trajectories_v1_trajectories_get.py +2 -0
  70. openapi_client/cyberdesk_cloud_client/api/trajectories/update_trajectory_v1_trajectories_trajectory_id_patch.py +2 -0
  71. openapi_client/cyberdesk_cloud_client/api/workflows/create_workflow_v1_workflows_post.py +2 -0
  72. openapi_client/cyberdesk_cloud_client/api/workflows/delete_workflow_v1_workflows_workflow_id_delete.py +2 -0
  73. openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_v1_workflows_workflow_id_get.py +2 -0
  74. openapi_client/cyberdesk_cloud_client/api/workflows/get_workflow_versions_v1_workflows_workflow_id_versions_get.py +2 -0
  75. openapi_client/cyberdesk_cloud_client/api/workflows/list_workflows_v1_workflows_get.py +2 -0
  76. openapi_client/cyberdesk_cloud_client/api/workflows/update_workflow_v1_workflows_workflow_id_patch.py +2 -0
  77. openapi_client/cyberdesk_cloud_client/models/__init__.py +17 -3
  78. openapi_client/cyberdesk_cloud_client/models/copy_to_clipboard_request.py +59 -0
  79. openapi_client/cyberdesk_cloud_client/models/copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post_response_copy_to_clipboard_v1_computer_machine_id_copy_to_clipboard_post.py +47 -0
  80. openapi_client/cyberdesk_cloud_client/models/machine_create.py +80 -1
  81. openapi_client/cyberdesk_cloud_client/models/machine_create_machine_parameters_type_0.py +44 -0
  82. openapi_client/cyberdesk_cloud_client/models/{database_health_check_v1_health_db_get_response_database_health_check_v1_health_db_get.py → machine_create_machine_sensitive_parameters_type_0.py} +5 -5
  83. openapi_client/cyberdesk_cloud_client/models/machine_response.py +77 -0
  84. openapi_client/cyberdesk_cloud_client/models/machine_response_machine_parameters_type_0.py +44 -0
  85. openapi_client/cyberdesk_cloud_client/models/machine_response_machine_sensitive_parameters_type_0.py +44 -0
  86. openapi_client/cyberdesk_cloud_client/models/machine_update.py +80 -1
  87. openapi_client/cyberdesk_cloud_client/models/machine_update_machine_parameters_type_0.py +44 -0
  88. openapi_client/cyberdesk_cloud_client/models/machine_update_machine_sensitive_parameters_type_0.py +44 -0
  89. openapi_client/cyberdesk_cloud_client/models/power_shell_exec_request.py +21 -0
  90. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/WHEEL +0 -0
  91. {cyberdesk-2.1.16.dist-info → cyberdesk-2.1.18.dist-info}/licenses/LICENSE +0 -0
  92. {cyberdesk-2.1.16.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[Any] = None
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:
@@ -217,6 +219,10 @@ class MachinesAPI:
217
219
  status: Machine status filter
218
220
  created_at_from: Optional start datetime (UTC or ISO string)
219
221
  created_at_to: Optional end datetime (UTC or ISO string)
222
+
223
+ Returns:
224
+ ApiResponse with PaginatedResponseMachineResponse. Each machine includes
225
+ desktop parameters (machine_parameters, machine_sensitive_parameters) if configured.
220
226
  """
221
227
  try:
222
228
  response = await list_machines_v1_machines_get.asyncio(
@@ -239,8 +245,20 @@ class MachinesAPI:
239
245
  *,
240
246
  created_at_from: Optional[Union[str, datetime]] = None,
241
247
  created_at_to: Optional[Union[str, datetime]] = None,
242
- ) -> ApiResponse:
243
- """List machines with optional filtering (synchronous)."""
248
+ ) -> ApiResponse[PaginatedResponseMachineResponse]:
249
+ """List machines with optional filtering (synchronous).
250
+
251
+ Args:
252
+ skip: Pagination skip
253
+ limit: Pagination limit
254
+ status: Machine status filter
255
+ created_at_from: Optional start datetime (UTC or ISO string)
256
+ created_at_to: Optional end datetime (UTC or ISO string)
257
+
258
+ Returns:
259
+ ApiResponse with PaginatedResponseMachineResponse. Each machine includes
260
+ desktop parameters (machine_parameters, machine_sensitive_parameters) if configured.
261
+ """
244
262
  try:
245
263
  response = list_machines_v1_machines_get.sync(
246
264
  client=self.client,
@@ -254,8 +272,19 @@ class MachinesAPI:
254
272
  except Exception as e:
255
273
  return ApiResponse(error=e)
256
274
 
257
- async def create(self, data: MachineCreate) -> ApiResponse:
258
- """Create a new machine."""
275
+ async def create(self, data: MachineCreate) -> ApiResponse[MachineResponse]:
276
+ """Create a new machine.
277
+
278
+ Args:
279
+ data: MachineCreate object with:
280
+ - fingerprint: Unique machine fingerprint
281
+ - unkey_key_id: API key ID for authentication
282
+ - name: Optional machine name
283
+ - machine_parameters: Optional dict of desktop parameters
284
+ - machine_sensitive_parameters: Optional dict of sensitive desktop parameters
285
+ (provide actual values, they'll be stored in Basis Theory)
286
+ - hostname, os_info, version: Optional machine metadata
287
+ """
259
288
  try:
260
289
  response = await create_machine_v1_machines_post.asyncio(
261
290
  client=self.client,
@@ -265,8 +294,19 @@ class MachinesAPI:
265
294
  except Exception as e:
266
295
  return ApiResponse(error=e)
267
296
 
268
- def create_sync(self, data: MachineCreate) -> ApiResponse:
269
- """Create a new machine (synchronous)."""
297
+ def create_sync(self, data: MachineCreate) -> ApiResponse[MachineResponse]:
298
+ """Create a new machine (synchronous).
299
+
300
+ Args:
301
+ data: MachineCreate object with:
302
+ - fingerprint: Unique machine fingerprint
303
+ - unkey_key_id: API key ID for authentication
304
+ - name: Optional machine name
305
+ - machine_parameters: Optional dict of desktop parameters
306
+ - machine_sensitive_parameters: Optional dict of sensitive desktop parameters
307
+ (provide actual values, they'll be stored in Basis Theory)
308
+ - hostname, os_info, version: Optional machine metadata
309
+ """
270
310
  try:
271
311
  response = create_machine_v1_machines_post.sync(
272
312
  client=self.client,
@@ -276,8 +316,16 @@ class MachinesAPI:
276
316
  except Exception as e:
277
317
  return ApiResponse(error=e)
278
318
 
279
- async def get(self, machine_id: str) -> ApiResponse:
280
- """Get a specific machine by ID."""
319
+ async def get(self, machine_id: str) -> ApiResponse[MachineResponse]:
320
+ """Get a specific machine by ID.
321
+
322
+ Returns:
323
+ ApiResponse with MachineResponse including:
324
+ - Basic info: id, name, status, fingerprint, etc.
325
+ - machine_parameters: Dict of desktop parameters (if configured)
326
+ - machine_sensitive_parameters: Dict of sensitive parameter aliases (if configured)
327
+ - pools: List of pools this machine belongs to
328
+ """
281
329
  try:
282
330
  response = await get_machine_v1_machines_machine_id_get.asyncio(
283
331
  client=self.client,
@@ -287,8 +335,16 @@ class MachinesAPI:
287
335
  except Exception as e:
288
336
  return ApiResponse(error=e)
289
337
 
290
- def get_sync(self, machine_id: str) -> ApiResponse:
291
- """Get a specific machine by ID (synchronous)."""
338
+ def get_sync(self, machine_id: str) -> ApiResponse[MachineResponse]:
339
+ """Get a specific machine by ID (synchronous).
340
+
341
+ Returns:
342
+ ApiResponse with MachineResponse including:
343
+ - Basic info: id, name, status, fingerprint, etc.
344
+ - machine_parameters: Dict of desktop parameters (if configured)
345
+ - machine_sensitive_parameters: Dict of sensitive parameter aliases (if configured)
346
+ - pools: List of pools this machine belongs to
347
+ """
292
348
  try:
293
349
  response = get_machine_v1_machines_machine_id_get.sync(
294
350
  client=self.client,
@@ -298,12 +354,30 @@ class MachinesAPI:
298
354
  except Exception as e:
299
355
  return ApiResponse(error=e)
300
356
 
301
- async def update(self, machine_id: str, data: MachineUpdate) -> ApiResponse:
357
+ async def update(self, machine_id: str, data: MachineUpdate) -> ApiResponse[MachineResponse]:
302
358
  """Update a machine.
303
-
304
- Note: linked_keepalive_machine_id is not writable; it is managed by
305
- Cyberdriver link events and will be set/cleared automatically by the
306
- platform.
359
+
360
+ Args:
361
+ machine_id: The machine ID to update
362
+ data: MachineUpdate object with fields to update:
363
+ - name: Optional machine name
364
+ - machine_parameters: Optional dict of machine-specific input values that
365
+ automatically populate runs on this desktop. Use {} to clear all.
366
+ - machine_sensitive_parameters: Optional dict of sensitive parameters
367
+ (provide actual values, they'll be stored in Basis Theory). Use {} to clear all.
368
+ - status, is_available, hostname, os_info, version: Other machine fields
369
+ - reserved_session_id: Set to null to clear reservation
370
+
371
+ Desktop Parameters:
372
+ Machine parameters automatically merge into runs assigned to this machine,
373
+ overriding run-level input values. Use {param_name} or {$sensitive_param}
374
+ syntax in workflow prompts.
375
+
376
+ Note:
377
+ - linked_keepalive_machine_id is not writable; it is managed by
378
+ Cyberdriver link events and will be set/cleared automatically by the platform.
379
+ - For machine_sensitive_parameters, provide actual secret values. They will be
380
+ stored securely in Basis Theory and only aliases stored in the database.
307
381
  """
308
382
  try:
309
383
  response = await update_machine_v1_machines_machine_id_patch.asyncio(
@@ -315,12 +389,30 @@ class MachinesAPI:
315
389
  except Exception as e:
316
390
  return ApiResponse(error=e)
317
391
 
318
- def update_sync(self, machine_id: str, data: MachineUpdate) -> ApiResponse:
392
+ def update_sync(self, machine_id: str, data: MachineUpdate) -> ApiResponse[MachineResponse]:
319
393
  """Update a machine (synchronous).
320
-
321
- Note: linked_keepalive_machine_id is not writable; it is managed by
322
- Cyberdriver link events and will be set/cleared automatically by the
323
- platform.
394
+
395
+ Args:
396
+ machine_id: The machine ID to update
397
+ data: MachineUpdate object with fields to update:
398
+ - name: Optional machine name
399
+ - machine_parameters: Optional dict of machine-specific input values that
400
+ automatically populate runs on this desktop. Use {} to clear all.
401
+ - machine_sensitive_parameters: Optional dict of sensitive parameters
402
+ (provide actual values, they'll be stored in Basis Theory). Use {} to clear all.
403
+ - status, is_available, hostname, os_info, version: Other machine fields
404
+ - reserved_session_id: Set to null to clear reservation
405
+
406
+ Desktop Parameters:
407
+ Machine parameters automatically merge into runs assigned to this machine,
408
+ overriding run-level input values. Use {param_name} or {$sensitive_param}
409
+ syntax in workflow prompts.
410
+
411
+ Note:
412
+ - linked_keepalive_machine_id is not writable; it is managed by
413
+ Cyberdriver link events and will be set/cleared automatically by the platform.
414
+ - For machine_sensitive_parameters, provide actual secret values. They will be
415
+ stored securely in Basis Theory and only aliases stored in the database.
324
416
  """
325
417
  try:
326
418
  response = update_machine_v1_machines_machine_id_patch.sync(
@@ -332,7 +424,7 @@ class MachinesAPI:
332
424
  except Exception as e:
333
425
  return ApiResponse(error=e)
334
426
 
335
- async def clear_session(self, machine_id: str) -> ApiResponse:
427
+ async def clear_session(self, machine_id: str) -> ApiResponse[MachineResponse]:
336
428
  """Clear the machine's reserved session (cancels queued/running session runs).
337
429
 
338
430
  This sends reserved_session_id=null per API contract.
@@ -348,7 +440,7 @@ class MachinesAPI:
348
440
  except Exception as e:
349
441
  return ApiResponse(error=e)
350
442
 
351
- def clear_session_sync(self, machine_id: str) -> ApiResponse:
443
+ def clear_session_sync(self, machine_id: str) -> ApiResponse[MachineResponse]:
352
444
  """Clear the machine's reserved session (synchronous)."""
353
445
  try:
354
446
  update = MachineUpdate(reserved_session_id=None)
@@ -361,8 +453,15 @@ class MachinesAPI:
361
453
  except Exception as e:
362
454
  return ApiResponse(error=e)
363
455
 
364
- async def delete(self, machine_id: str) -> ApiResponse:
365
- """Delete a machine."""
456
+ async def delete(self, machine_id: str) -> ApiResponse[MachineResponse]:
457
+ """Delete a machine.
458
+
459
+ Associated runs are preserved with machine_id set to NULL to maintain run history.
460
+ Connections and request logs are cascade deleted.
461
+
462
+ If the machine has desktop sensitive parameters, they will be automatically
463
+ cleaned up from Basis Theory before deletion.
464
+ """
366
465
  try:
367
466
  await delete_machine_v1_machines_machine_id_delete.asyncio(
368
467
  client=self.client,
@@ -372,8 +471,15 @@ class MachinesAPI:
372
471
  except Exception as e:
373
472
  return ApiResponse(error=e)
374
473
 
375
- def delete_sync(self, machine_id: str) -> ApiResponse:
376
- """Delete a machine (synchronous)."""
474
+ def delete_sync(self, machine_id: str) -> ApiResponse[MachineResponse]:
475
+ """Delete a machine (synchronous).
476
+
477
+ Associated runs are preserved with machine_id set to NULL to maintain run history.
478
+ Connections and request logs are cascade deleted.
479
+
480
+ If the machine has desktop sensitive parameters, they will be automatically
481
+ cleaned up from Basis Theory before deletion.
482
+ """
377
483
  try:
378
484
  delete_machine_v1_machines_machine_id_delete.sync(
379
485
  client=self.client,
@@ -383,7 +489,7 @@ class MachinesAPI:
383
489
  except Exception as e:
384
490
  return ApiResponse(error=e)
385
491
 
386
- async def get_pools(self, machine_id: str) -> ApiResponse:
492
+ async def get_pools(self, machine_id: str) -> ApiResponse[List[PoolResponse]]:
387
493
  """Get all pools that a machine belongs to."""
388
494
  try:
389
495
  response = await get_machine_pools_v1_machines_machine_id_pools_get.asyncio(
@@ -394,7 +500,7 @@ class MachinesAPI:
394
500
  except Exception as e:
395
501
  return ApiResponse(error=e)
396
502
 
397
- def get_pools_sync(self, machine_id: str) -> ApiResponse:
503
+ def get_pools_sync(self, machine_id: str) -> ApiResponse[List[PoolResponse]]:
398
504
  """Get all pools that a machine belongs to (synchronous)."""
399
505
  try:
400
506
  response = get_machine_pools_v1_machines_machine_id_pools_get.sync(
@@ -405,7 +511,7 @@ class MachinesAPI:
405
511
  except Exception as e:
406
512
  return ApiResponse(error=e)
407
513
 
408
- 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]]:
409
515
  """Update a machine's pool assignments.
410
516
 
411
517
  This replaces all existing pool assignments with the new ones.
@@ -427,7 +533,7 @@ class MachinesAPI:
427
533
  except Exception as e:
428
534
  return ApiResponse(error=e)
429
535
 
430
- 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]]:
431
537
  """Update a machine's pool assignments (synchronous).
432
538
 
433
539
  This replaces all existing pool assignments with the new ones.
@@ -460,7 +566,7 @@ class PoolsAPI:
460
566
  self,
461
567
  skip: Optional[int] = None,
462
568
  limit: Optional[int] = None
463
- ) -> ApiResponse:
569
+ ) -> ApiResponse[PaginatedResponsePoolResponse]:
464
570
  """List pools for the organization."""
465
571
  try:
466
572
  response = await list_pools_v1_pools_get.asyncio(
@@ -476,7 +582,7 @@ class PoolsAPI:
476
582
  self,
477
583
  skip: Optional[int] = None,
478
584
  limit: Optional[int] = None
479
- ) -> ApiResponse:
585
+ ) -> ApiResponse[PaginatedResponsePoolResponse]:
480
586
  """List pools for the organization (synchronous)."""
481
587
  try:
482
588
  response = list_pools_v1_pools_get.sync(
@@ -488,7 +594,7 @@ class PoolsAPI:
488
594
  except Exception as e:
489
595
  return ApiResponse(error=e)
490
596
 
491
- async def create(self, data: PoolCreate) -> ApiResponse:
597
+ async def create(self, data: PoolCreate) -> ApiResponse[PoolResponse]:
492
598
  """Create a new pool."""
493
599
  try:
494
600
  response = await create_pool_v1_pools_post.asyncio(
@@ -499,7 +605,7 @@ class PoolsAPI:
499
605
  except Exception as e:
500
606
  return ApiResponse(error=e)
501
607
 
502
- def create_sync(self, data: PoolCreate) -> ApiResponse:
608
+ def create_sync(self, data: PoolCreate) -> ApiResponse[PoolResponse]:
503
609
  """Create a new pool (synchronous)."""
504
610
  try:
505
611
  response = create_pool_v1_pools_post.sync(
@@ -510,7 +616,7 @@ class PoolsAPI:
510
616
  except Exception as e:
511
617
  return ApiResponse(error=e)
512
618
 
513
- 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]]:
514
620
  """Get a specific pool by ID.
515
621
 
516
622
  Args:
@@ -530,7 +636,7 @@ class PoolsAPI:
530
636
  except Exception as e:
531
637
  return ApiResponse(error=e)
532
638
 
533
- 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]]:
534
640
  """Get a specific pool by ID (synchronous).
535
641
 
536
642
  Args:
@@ -550,7 +656,7 @@ class PoolsAPI:
550
656
  except Exception as e:
551
657
  return ApiResponse(error=e)
552
658
 
553
- async def update(self, pool_id: str, data: PoolUpdate) -> ApiResponse:
659
+ async def update(self, pool_id: str, data: PoolUpdate) -> ApiResponse[PoolResponse]:
554
660
  """Update a pool's details."""
555
661
  try:
556
662
  response = await update_pool_v1_pools_pool_id_patch.asyncio(
@@ -562,7 +668,7 @@ class PoolsAPI:
562
668
  except Exception as e:
563
669
  return ApiResponse(error=e)
564
670
 
565
- def update_sync(self, pool_id: str, data: PoolUpdate) -> ApiResponse:
671
+ def update_sync(self, pool_id: str, data: PoolUpdate) -> ApiResponse[PoolResponse]:
566
672
  """Update a pool's details (synchronous)."""
567
673
  try:
568
674
  response = update_pool_v1_pools_pool_id_patch.sync(
@@ -574,7 +680,7 @@ class PoolsAPI:
574
680
  except Exception as e:
575
681
  return ApiResponse(error=e)
576
682
 
577
- async def delete(self, pool_id: str) -> ApiResponse:
683
+ async def delete(self, pool_id: str) -> ApiResponse[PoolResponse]:
578
684
  """Delete a pool. This will not delete the machines in the pool."""
579
685
  try:
580
686
  await delete_pool_v1_pools_pool_id_delete.asyncio(
@@ -585,7 +691,7 @@ class PoolsAPI:
585
691
  except Exception as e:
586
692
  return ApiResponse(error=e)
587
693
 
588
- def delete_sync(self, pool_id: str) -> ApiResponse:
694
+ def delete_sync(self, pool_id: str) -> ApiResponse[PoolResponse]:
589
695
  """Delete a pool. This will not delete the machines in the pool (synchronous)."""
590
696
  try:
591
697
  delete_pool_v1_pools_pool_id_delete.sync(
@@ -596,7 +702,7 @@ class PoolsAPI:
596
702
  except Exception as e:
597
703
  return ApiResponse(error=e)
598
704
 
599
- async def add_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
705
+ async def add_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
600
706
  """Add machines to a pool.
601
707
 
602
708
  Args:
@@ -616,7 +722,7 @@ class PoolsAPI:
616
722
  except Exception as e:
617
723
  return ApiResponse(error=e)
618
724
 
619
- def add_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
725
+ def add_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
620
726
  """Add machines to a pool (synchronous).
621
727
 
622
728
  Args:
@@ -636,7 +742,7 @@ class PoolsAPI:
636
742
  except Exception as e:
637
743
  return ApiResponse(error=e)
638
744
 
639
- async def remove_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
745
+ async def remove_machines(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
640
746
  """Remove machines from a pool.
641
747
 
642
748
  Args:
@@ -656,7 +762,7 @@ class PoolsAPI:
656
762
  except Exception as e:
657
763
  return ApiResponse(error=e)
658
764
 
659
- def remove_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse:
765
+ def remove_machines_sync(self, pool_id: str, data: MachinePoolAssignment) -> ApiResponse[PoolWithMachines]:
660
766
  """Remove machines from a pool (synchronous).
661
767
 
662
768
  Args:
@@ -692,7 +798,7 @@ class WorkflowsAPI:
692
798
  created_at_to: Optional[Union[str, datetime]] = None,
693
799
  updated_at_from: Optional[Union[str, datetime]] = None,
694
800
  updated_at_to: Optional[Union[str, datetime]] = None,
695
- ) -> ApiResponse:
801
+ ) -> ApiResponse[PaginatedResponseWorkflowResponse]:
696
802
  """List workflows with optional date-time filtering.
697
803
 
698
804
  Args:
@@ -726,7 +832,7 @@ class WorkflowsAPI:
726
832
  created_at_to: Optional[Union[str, datetime]] = None,
727
833
  updated_at_from: Optional[Union[str, datetime]] = None,
728
834
  updated_at_to: Optional[Union[str, datetime]] = None,
729
- ) -> ApiResponse:
835
+ ) -> ApiResponse[PaginatedResponseWorkflowResponse]:
730
836
  """List workflows (synchronous) with optional date-time filtering."""
731
837
  try:
732
838
  response = list_workflows_v1_workflows_get.sync(
@@ -742,7 +848,7 @@ class WorkflowsAPI:
742
848
  except Exception as e:
743
849
  return ApiResponse(error=e)
744
850
 
745
- async def create(self, data: WorkflowCreate) -> ApiResponse:
851
+ async def create(self, data: WorkflowCreate) -> ApiResponse[WorkflowResponse]:
746
852
  """Create a new workflow."""
747
853
  try:
748
854
  response = await create_workflow_v1_workflows_post.asyncio(
@@ -753,7 +859,7 @@ class WorkflowsAPI:
753
859
  except Exception as e:
754
860
  return ApiResponse(error=e)
755
861
 
756
- def create_sync(self, data: WorkflowCreate) -> ApiResponse:
862
+ def create_sync(self, data: WorkflowCreate) -> ApiResponse[WorkflowResponse]:
757
863
  """Create a new workflow (synchronous)."""
758
864
  try:
759
865
  response = create_workflow_v1_workflows_post.sync(
@@ -764,7 +870,7 @@ class WorkflowsAPI:
764
870
  except Exception as e:
765
871
  return ApiResponse(error=e)
766
872
 
767
- async def get(self, workflow_id: str) -> ApiResponse:
873
+ async def get(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
768
874
  """Get a specific workflow by ID."""
769
875
  try:
770
876
  response = await get_workflow_v1_workflows_workflow_id_get.asyncio(
@@ -775,7 +881,7 @@ class WorkflowsAPI:
775
881
  except Exception as e:
776
882
  return ApiResponse(error=e)
777
883
 
778
- def get_sync(self, workflow_id: str) -> ApiResponse:
884
+ def get_sync(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
779
885
  """Get a specific workflow by ID (synchronous)."""
780
886
  try:
781
887
  response = get_workflow_v1_workflows_workflow_id_get.sync(
@@ -786,7 +892,7 @@ class WorkflowsAPI:
786
892
  except Exception as e:
787
893
  return ApiResponse(error=e)
788
894
 
789
- async def update(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse:
895
+ async def update(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse[WorkflowResponse]:
790
896
  """Update a workflow."""
791
897
  try:
792
898
  response = await update_workflow_v1_workflows_workflow_id_patch.asyncio(
@@ -798,7 +904,7 @@ class WorkflowsAPI:
798
904
  except Exception as e:
799
905
  return ApiResponse(error=e)
800
906
 
801
- def update_sync(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse:
907
+ def update_sync(self, workflow_id: str, data: WorkflowUpdate) -> ApiResponse[WorkflowResponse]:
802
908
  """Update a workflow (synchronous)."""
803
909
  try:
804
910
  response = update_workflow_v1_workflows_workflow_id_patch.sync(
@@ -810,7 +916,7 @@ class WorkflowsAPI:
810
916
  except Exception as e:
811
917
  return ApiResponse(error=e)
812
918
 
813
- async def delete(self, workflow_id: str) -> ApiResponse:
919
+ async def delete(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
814
920
  """Delete a workflow."""
815
921
  try:
816
922
  await delete_workflow_v1_workflows_workflow_id_delete.asyncio(
@@ -821,7 +927,7 @@ class WorkflowsAPI:
821
927
  except Exception as e:
822
928
  return ApiResponse(error=e)
823
929
 
824
- def delete_sync(self, workflow_id: str) -> ApiResponse:
930
+ def delete_sync(self, workflow_id: str) -> ApiResponse[WorkflowResponse]:
825
931
  """Delete a workflow (synchronous)."""
826
932
  try:
827
933
  delete_workflow_v1_workflows_workflow_id_delete.sync(
@@ -851,7 +957,7 @@ class RunsAPI:
851
957
  created_at_from: Optional[Union[str, datetime]] = None,
852
958
  created_at_to: Optional[Union[str, datetime]] = None,
853
959
  fields: Optional[List[RunField]] = None,
854
- ) -> ApiResponse:
960
+ ) -> ApiResponse[PaginatedResponseRunResponse]:
855
961
  """List runs with optional filtering.
856
962
 
857
963
  Args:
@@ -896,7 +1002,7 @@ class RunsAPI:
896
1002
  created_at_from: Optional[Union[str, datetime]] = None,
897
1003
  created_at_to: Optional[Union[str, datetime]] = None,
898
1004
  fields: Optional[List[RunField]] = None,
899
- ) -> ApiResponse:
1005
+ ) -> ApiResponse[PaginatedResponseRunResponse]:
900
1006
  """List runs with optional filtering (synchronous).
901
1007
 
902
1008
  See async variant for parameter docs. Supports `fields` projection.
@@ -918,7 +1024,7 @@ class RunsAPI:
918
1024
  except Exception as e:
919
1025
  return ApiResponse(error=e)
920
1026
 
921
- async def retry(self, run_id: str, retry: RunRetry) -> ApiResponse:
1027
+ async def retry(self, run_id: str, retry: RunRetry) -> ApiResponse[RunResponse]:
922
1028
  """Retry an existing run in-place (same run_id).
923
1029
 
924
1030
  Clears previous outputs/history/output attachments, optionally replaces inputs/files,
@@ -934,7 +1040,7 @@ class RunsAPI:
934
1040
  except Exception as e:
935
1041
  return ApiResponse(error=e)
936
1042
 
937
- def retry_sync(self, run_id: str, retry: RunRetry) -> ApiResponse:
1043
+ def retry_sync(self, run_id: str, retry: RunRetry) -> ApiResponse[RunResponse]:
938
1044
  """Retry an existing run in-place (synchronous)."""
939
1045
  try:
940
1046
  response = retry_run_v1_runs_run_id_retry_post.sync(
@@ -946,7 +1052,7 @@ class RunsAPI:
946
1052
  except Exception as e:
947
1053
  return ApiResponse(error=e)
948
1054
 
949
- async def create(self, data: RunCreate) -> ApiResponse:
1055
+ async def create(self, data: RunCreate) -> ApiResponse[RunResponse]:
950
1056
  """Create a new run.
951
1057
 
952
1058
  Args:
@@ -974,7 +1080,7 @@ class RunsAPI:
974
1080
  except Exception as e:
975
1081
  return ApiResponse(error=e)
976
1082
 
977
- def create_sync(self, data: RunCreate) -> ApiResponse:
1083
+ def create_sync(self, data: RunCreate) -> ApiResponse[RunResponse]:
978
1084
  """Create a new run (synchronous).
979
1085
 
980
1086
  Args:
@@ -1002,7 +1108,7 @@ class RunsAPI:
1002
1108
  except Exception as e:
1003
1109
  return ApiResponse(error=e)
1004
1110
 
1005
- async def get(self, run_id: str) -> ApiResponse:
1111
+ async def get(self, run_id: str) -> ApiResponse[RunResponse]:
1006
1112
  """Get a specific run by ID."""
1007
1113
  try:
1008
1114
  response = await get_run_v1_runs_run_id_get.asyncio(
@@ -1013,7 +1119,7 @@ class RunsAPI:
1013
1119
  except Exception as e:
1014
1120
  return ApiResponse(error=e)
1015
1121
 
1016
- def get_sync(self, run_id: str) -> ApiResponse:
1122
+ def get_sync(self, run_id: str) -> ApiResponse[RunResponse]:
1017
1123
  """Get a specific run by ID (synchronous)."""
1018
1124
  try:
1019
1125
  response = get_run_v1_runs_run_id_get.sync(
@@ -1024,7 +1130,7 @@ class RunsAPI:
1024
1130
  except Exception as e:
1025
1131
  return ApiResponse(error=e)
1026
1132
 
1027
- async def update(self, run_id: str, data: RunUpdate) -> ApiResponse:
1133
+ async def update(self, run_id: str, data: RunUpdate) -> ApiResponse[RunResponse]:
1028
1134
  """Update a run."""
1029
1135
  try:
1030
1136
  response = await update_run_v1_runs_run_id_patch.asyncio(
@@ -1036,7 +1142,7 @@ class RunsAPI:
1036
1142
  except Exception as e:
1037
1143
  return ApiResponse(error=e)
1038
1144
 
1039
- def update_sync(self, run_id: str, data: RunUpdate) -> ApiResponse:
1145
+ def update_sync(self, run_id: str, data: RunUpdate) -> ApiResponse[RunResponse]:
1040
1146
  """Update a run (synchronous)."""
1041
1147
  try:
1042
1148
  response = update_run_v1_runs_run_id_patch.sync(
@@ -1048,7 +1154,7 @@ class RunsAPI:
1048
1154
  except Exception as e:
1049
1155
  return ApiResponse(error=e)
1050
1156
 
1051
- async def delete(self, run_id: str) -> ApiResponse:
1157
+ async def delete(self, run_id: str) -> ApiResponse[RunResponse]:
1052
1158
  """Delete a run."""
1053
1159
  try:
1054
1160
  await delete_run_v1_runs_run_id_delete.asyncio(
@@ -1059,7 +1165,7 @@ class RunsAPI:
1059
1165
  except Exception as e:
1060
1166
  return ApiResponse(error=e)
1061
1167
 
1062
- def delete_sync(self, run_id: str) -> ApiResponse:
1168
+ def delete_sync(self, run_id: str) -> ApiResponse[RunResponse]:
1063
1169
  """Delete a run (synchronous)."""
1064
1170
  try:
1065
1171
  delete_run_v1_runs_run_id_delete.sync(
@@ -1070,7 +1176,7 @@ class RunsAPI:
1070
1176
  except Exception as e:
1071
1177
  return ApiResponse(error=e)
1072
1178
 
1073
- async def bulk_create(self, data: RunBulkCreate) -> ApiResponse:
1179
+ async def bulk_create(self, data: RunBulkCreate) -> ApiResponse[RunBulkCreateResponse]:
1074
1180
  """Create multiple runs with the same configuration.
1075
1181
 
1076
1182
  This method efficiently creates multiple runs:
@@ -1105,7 +1211,7 @@ class RunsAPI:
1105
1211
  except Exception as e:
1106
1212
  return ApiResponse(error=e)
1107
1213
 
1108
- def bulk_create_sync(self, data: RunBulkCreate) -> ApiResponse:
1214
+ def bulk_create_sync(self, data: RunBulkCreate) -> ApiResponse[RunBulkCreateResponse]:
1109
1215
  """Create multiple runs with the same configuration (synchronous).
1110
1216
 
1111
1217
  This method efficiently creates multiple runs:
@@ -1140,7 +1246,7 @@ class RunsAPI:
1140
1246
  except Exception as e:
1141
1247
  return ApiResponse(error=e)
1142
1248
 
1143
- async def chain(self, data: WorkflowChainCreate) -> ApiResponse:
1249
+ async def chain(self, data: WorkflowChainCreate) -> ApiResponse[WorkflowChainResponse]:
1144
1250
  """Create a multi-step chain that runs on a single reserved session/machine.
1145
1251
 
1146
1252
  Args:
@@ -1160,7 +1266,7 @@ class RunsAPI:
1160
1266
  except Exception as e:
1161
1267
  return ApiResponse(error=e)
1162
1268
 
1163
- def chain_sync(self, data: WorkflowChainCreate) -> ApiResponse:
1269
+ def chain_sync(self, data: WorkflowChainCreate) -> ApiResponse[WorkflowChainResponse]:
1164
1270
  """Create a multi-step chain (synchronous).
1165
1271
 
1166
1272
  Args:
@@ -1193,7 +1299,7 @@ class ConnectionsAPI:
1193
1299
  limit: Optional[int] = None,
1194
1300
  machine_id: Optional[str] = None,
1195
1301
  status: Optional[Union[str, ConnectionStatus]] = None
1196
- ) -> ApiResponse:
1302
+ ) -> ApiResponse[PaginatedResponseConnectionResponse]:
1197
1303
  """List connections with optional filtering."""
1198
1304
  try:
1199
1305
  # Handle status conversion
@@ -1217,7 +1323,7 @@ class ConnectionsAPI:
1217
1323
  limit: Optional[int] = None,
1218
1324
  machine_id: Optional[str] = None,
1219
1325
  status: Optional[Union[str, ConnectionStatus]] = None
1220
- ) -> ApiResponse:
1326
+ ) -> ApiResponse[PaginatedResponseConnectionResponse]:
1221
1327
  """List connections with optional filtering (synchronous)."""
1222
1328
  try:
1223
1329
  # Handle status conversion
@@ -1235,7 +1341,7 @@ class ConnectionsAPI:
1235
1341
  except Exception as e:
1236
1342
  return ApiResponse(error=e)
1237
1343
 
1238
- async def create(self, data: ConnectionCreate) -> ApiResponse:
1344
+ async def create(self, data: ConnectionCreate) -> ApiResponse[ConnectionResponse]:
1239
1345
  """Create a new connection."""
1240
1346
  try:
1241
1347
  response = await create_connection_v1_connections_post.asyncio(
@@ -1246,7 +1352,7 @@ class ConnectionsAPI:
1246
1352
  except Exception as e:
1247
1353
  return ApiResponse(error=e)
1248
1354
 
1249
- def create_sync(self, data: ConnectionCreate) -> ApiResponse:
1355
+ def create_sync(self, data: ConnectionCreate) -> ApiResponse[ConnectionResponse]:
1250
1356
  """Create a new connection (synchronous)."""
1251
1357
  try:
1252
1358
  response = create_connection_v1_connections_post.sync(
@@ -1275,7 +1381,7 @@ class TrajectoriesAPI:
1275
1381
  created_at_to: Optional[Union[str, datetime]] = None,
1276
1382
  updated_at_from: Optional[Union[str, datetime]] = None,
1277
1383
  updated_at_to: Optional[Union[str, datetime]] = None,
1278
- ) -> ApiResponse:
1384
+ ) -> ApiResponse[PaginatedResponseTrajectoryResponse]:
1279
1385
  """List trajectories with optional filtering.
1280
1386
 
1281
1387
  Args:
@@ -1318,7 +1424,7 @@ class TrajectoriesAPI:
1318
1424
  created_at_to: Optional[Union[str, datetime]] = None,
1319
1425
  updated_at_from: Optional[Union[str, datetime]] = None,
1320
1426
  updated_at_to: Optional[Union[str, datetime]] = None,
1321
- ) -> ApiResponse:
1427
+ ) -> ApiResponse[PaginatedResponseTrajectoryResponse]:
1322
1428
  """List trajectories with optional filtering (synchronous).
1323
1429
 
1324
1430
  Args:
@@ -1350,7 +1456,7 @@ class TrajectoriesAPI:
1350
1456
  except Exception as e:
1351
1457
  return ApiResponse(error=e)
1352
1458
 
1353
- async def create(self, data: TrajectoryCreate) -> ApiResponse:
1459
+ async def create(self, data: TrajectoryCreate) -> ApiResponse[TrajectoryResponse]:
1354
1460
  """Create a new trajectory.
1355
1461
 
1356
1462
  Note: Trajectories are created with is_approved=False by default.
@@ -1365,7 +1471,7 @@ class TrajectoriesAPI:
1365
1471
  except Exception as e:
1366
1472
  return ApiResponse(error=e)
1367
1473
 
1368
- def create_sync(self, data: TrajectoryCreate) -> ApiResponse:
1474
+ def create_sync(self, data: TrajectoryCreate) -> ApiResponse[TrajectoryResponse]:
1369
1475
  """Create a new trajectory (synchronous).
1370
1476
 
1371
1477
  Note: Trajectories are created with is_approved=False by default.
@@ -1380,7 +1486,7 @@ class TrajectoriesAPI:
1380
1486
  except Exception as e:
1381
1487
  return ApiResponse(error=e)
1382
1488
 
1383
- async def get(self, trajectory_id: str) -> ApiResponse:
1489
+ async def get(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
1384
1490
  """Get a specific trajectory by ID."""
1385
1491
  try:
1386
1492
  response = await get_trajectory_v1_trajectories_trajectory_id_get.asyncio(
@@ -1391,7 +1497,7 @@ class TrajectoriesAPI:
1391
1497
  except Exception as e:
1392
1498
  return ApiResponse(error=e)
1393
1499
 
1394
- def get_sync(self, trajectory_id: str) -> ApiResponse:
1500
+ def get_sync(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
1395
1501
  """Get a specific trajectory by ID (synchronous)."""
1396
1502
  try:
1397
1503
  response = get_trajectory_v1_trajectories_trajectory_id_get.sync(
@@ -1402,7 +1508,7 @@ class TrajectoriesAPI:
1402
1508
  except Exception as e:
1403
1509
  return ApiResponse(error=e)
1404
1510
 
1405
- async def update(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse:
1511
+ async def update(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse[TrajectoryResponse]:
1406
1512
  """Update a trajectory.
1407
1513
 
1408
1514
  You can update trajectory metadata (name, description), trajectory data (steps),
@@ -1419,7 +1525,7 @@ class TrajectoriesAPI:
1419
1525
  except Exception as e:
1420
1526
  return ApiResponse(error=e)
1421
1527
 
1422
- def update_sync(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse:
1528
+ def update_sync(self, trajectory_id: str, data: TrajectoryUpdate) -> ApiResponse[TrajectoryResponse]:
1423
1529
  """Update a trajectory (synchronous).
1424
1530
 
1425
1531
  You can update trajectory metadata (name, description), trajectory data (steps),
@@ -1436,7 +1542,7 @@ class TrajectoriesAPI:
1436
1542
  except Exception as e:
1437
1543
  return ApiResponse(error=e)
1438
1544
 
1439
- async def delete(self, trajectory_id: str) -> ApiResponse:
1545
+ async def delete(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
1440
1546
  """Delete a trajectory."""
1441
1547
  try:
1442
1548
  await delete_trajectory_v1_trajectories_trajectory_id_delete.asyncio(
@@ -1447,7 +1553,7 @@ class TrajectoriesAPI:
1447
1553
  except Exception as e:
1448
1554
  return ApiResponse(error=e)
1449
1555
 
1450
- def delete_sync(self, trajectory_id: str) -> ApiResponse:
1556
+ def delete_sync(self, trajectory_id: str) -> ApiResponse[TrajectoryResponse]:
1451
1557
  """Delete a trajectory (synchronous)."""
1452
1558
  try:
1453
1559
  delete_trajectory_v1_trajectories_trajectory_id_delete.sync(
@@ -1458,7 +1564,7 @@ class TrajectoriesAPI:
1458
1564
  except Exception as e:
1459
1565
  return ApiResponse(error=e)
1460
1566
 
1461
- async def get_latest_for_workflow(self, workflow_id: str) -> ApiResponse:
1567
+ async def get_latest_for_workflow(self, workflow_id: str) -> ApiResponse[TrajectoryResponse]:
1462
1568
  """Get the latest trajectory for a workflow."""
1463
1569
  try:
1464
1570
  response = await get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.asyncio(
@@ -1469,7 +1575,7 @@ class TrajectoriesAPI:
1469
1575
  except Exception as e:
1470
1576
  return ApiResponse(error=e)
1471
1577
 
1472
- def get_latest_for_workflow_sync(self, workflow_id: str) -> ApiResponse:
1578
+ def get_latest_for_workflow_sync(self, workflow_id: str) -> ApiResponse[TrajectoryResponse]:
1473
1579
  """Get the latest trajectory for a workflow (synchronous)."""
1474
1580
  try:
1475
1581
  response = get_latest_trajectory_for_workflow_v1_workflows_workflow_id_latest_trajectory_get.sync(
@@ -1493,7 +1599,7 @@ class RunAttachmentsAPI:
1493
1599
  limit: Optional[int] = None,
1494
1600
  run_id: Optional[str] = None,
1495
1601
  attachment_type: Optional[AttachmentType] = None
1496
- ) -> ApiResponse:
1602
+ ) -> ApiResponse[PaginatedResponseRunAttachmentResponse]:
1497
1603
  """List run attachments with optional filtering."""
1498
1604
  try:
1499
1605
  response = await list_run_attachments_v1_run_attachments_get.asyncio(
@@ -1513,7 +1619,7 @@ class RunAttachmentsAPI:
1513
1619
  limit: Optional[int] = None,
1514
1620
  run_id: Optional[str] = None,
1515
1621
  attachment_type: Optional[AttachmentType] = None
1516
- ) -> ApiResponse:
1622
+ ) -> ApiResponse[PaginatedResponseRunAttachmentResponse]:
1517
1623
  """List run attachments with optional filtering (synchronous)."""
1518
1624
  try:
1519
1625
  response = list_run_attachments_v1_run_attachments_get.sync(
@@ -1527,7 +1633,7 @@ class RunAttachmentsAPI:
1527
1633
  except Exception as e:
1528
1634
  return ApiResponse(error=e)
1529
1635
 
1530
- async def create(self, data: RunAttachmentCreate) -> ApiResponse:
1636
+ async def create(self, data: RunAttachmentCreate) -> ApiResponse[RunAttachmentResponse]:
1531
1637
  """Create a new run attachment."""
1532
1638
  try:
1533
1639
  response = await create_run_attachment_v1_run_attachments_post.asyncio(
@@ -1538,7 +1644,7 @@ class RunAttachmentsAPI:
1538
1644
  except Exception as e:
1539
1645
  return ApiResponse(error=e)
1540
1646
 
1541
- def create_sync(self, data: RunAttachmentCreate) -> ApiResponse:
1647
+ def create_sync(self, data: RunAttachmentCreate) -> ApiResponse[RunAttachmentResponse]:
1542
1648
  """Create a new run attachment (synchronous)."""
1543
1649
  try:
1544
1650
  response = create_run_attachment_v1_run_attachments_post.sync(
@@ -1549,7 +1655,7 @@ class RunAttachmentsAPI:
1549
1655
  except Exception as e:
1550
1656
  return ApiResponse(error=e)
1551
1657
 
1552
- async def get(self, attachment_id: str) -> ApiResponse:
1658
+ async def get(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
1553
1659
  """Get a specific run attachment by ID."""
1554
1660
  try:
1555
1661
  response = await get_run_attachment_v1_run_attachments_attachment_id_get.asyncio(
@@ -1560,7 +1666,7 @@ class RunAttachmentsAPI:
1560
1666
  except Exception as e:
1561
1667
  return ApiResponse(error=e)
1562
1668
 
1563
- def get_sync(self, attachment_id: str) -> ApiResponse:
1669
+ def get_sync(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
1564
1670
  """Get a specific run attachment by ID (synchronous)."""
1565
1671
  try:
1566
1672
  response = get_run_attachment_v1_run_attachments_attachment_id_get.sync(
@@ -1575,7 +1681,7 @@ class RunAttachmentsAPI:
1575
1681
  self,
1576
1682
  attachment_id: str,
1577
1683
  expires_in: Optional[int] = None
1578
- ) -> ApiResponse:
1684
+ ) -> ApiResponse[RunAttachmentDownloadUrlResponse]:
1579
1685
  """Get a signed download URL for a run attachment.
1580
1686
 
1581
1687
  The returned URL will trigger an automatic download when accessed in a browser.
@@ -1603,7 +1709,7 @@ class RunAttachmentsAPI:
1603
1709
  self,
1604
1710
  attachment_id: str,
1605
1711
  expires_in: Optional[int] = None
1606
- ) -> ApiResponse:
1712
+ ) -> ApiResponse[RunAttachmentDownloadUrlResponse]:
1607
1713
  """Get a signed download URL for a run attachment (synchronous).
1608
1714
 
1609
1715
  The returned URL will trigger an automatic download when accessed in a browser.
@@ -1627,7 +1733,7 @@ class RunAttachmentsAPI:
1627
1733
  except Exception as e:
1628
1734
  return ApiResponse(error=e)
1629
1735
 
1630
- async def download(self, attachment_id: str) -> ApiResponse:
1736
+ async def download(self, attachment_id: str) -> ApiResponse[bytes]:
1631
1737
  """Download a run attachment file directly.
1632
1738
 
1633
1739
  This method returns the raw file content as bytes. For a download URL instead,
@@ -1648,7 +1754,7 @@ class RunAttachmentsAPI:
1648
1754
  except Exception as e:
1649
1755
  return ApiResponse(error=e)
1650
1756
 
1651
- def download_sync(self, attachment_id: str) -> ApiResponse:
1757
+ def download_sync(self, attachment_id: str) -> ApiResponse[bytes]:
1652
1758
  """Download a run attachment file directly (synchronous).
1653
1759
 
1654
1760
  This method returns the raw file content as bytes. For a download URL instead,
@@ -1669,7 +1775,7 @@ class RunAttachmentsAPI:
1669
1775
  except Exception as e:
1670
1776
  return ApiResponse(error=e)
1671
1777
 
1672
- async def update(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse:
1778
+ async def update(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse[RunAttachmentResponse]:
1673
1779
  """Update a run attachment (e.g., set expiration)."""
1674
1780
  try:
1675
1781
  response = await update_run_attachment_v1_run_attachments_attachment_id_put.asyncio(
@@ -1681,7 +1787,7 @@ class RunAttachmentsAPI:
1681
1787
  except Exception as e:
1682
1788
  return ApiResponse(error=e)
1683
1789
 
1684
- def update_sync(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse:
1790
+ def update_sync(self, attachment_id: str, data: RunAttachmentUpdate) -> ApiResponse[RunAttachmentResponse]:
1685
1791
  """Update a run attachment (e.g., set expiration) (synchronous)."""
1686
1792
  try:
1687
1793
  response = update_run_attachment_v1_run_attachments_attachment_id_put.sync(
@@ -1693,7 +1799,7 @@ class RunAttachmentsAPI:
1693
1799
  except Exception as e:
1694
1800
  return ApiResponse(error=e)
1695
1801
 
1696
- async def delete(self, attachment_id: str) -> ApiResponse:
1802
+ async def delete(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
1697
1803
  """Delete a run attachment."""
1698
1804
  try:
1699
1805
  await delete_run_attachment_v1_run_attachments_attachment_id_delete.asyncio(
@@ -1704,7 +1810,7 @@ class RunAttachmentsAPI:
1704
1810
  except Exception as e:
1705
1811
  return ApiResponse(error=e)
1706
1812
 
1707
- def delete_sync(self, attachment_id: str) -> ApiResponse:
1813
+ def delete_sync(self, attachment_id: str) -> ApiResponse[RunAttachmentResponse]:
1708
1814
  """Delete a run attachment (synchronous)."""
1709
1815
  try:
1710
1816
  delete_run_attachment_v1_run_attachments_attachment_id_delete.sync(
@@ -1720,7 +1826,7 @@ class RunAttachmentsAPI:
1720
1826
  attachment_id: str,
1721
1827
  output_path: Optional[Union[str, Path]] = None,
1722
1828
  use_original_filename: bool = True
1723
- ) -> ApiResponse:
1829
+ ) -> ApiResponse[Dict[str, Any]]:
1724
1830
  """Download and save a run attachment to a file.
1725
1831
 
1726
1832
  This is a convenience method that combines getting attachment info
@@ -1769,7 +1875,7 @@ class RunAttachmentsAPI:
1769
1875
  attachment_id: str,
1770
1876
  output_path: Optional[Union[str, Path]] = None,
1771
1877
  use_original_filename: bool = True
1772
- ) -> ApiResponse:
1878
+ ) -> ApiResponse[Dict[str, Any]]:
1773
1879
  """Download and save a run attachment to a file (synchronous).
1774
1880
 
1775
1881
  This is a convenience method that combines getting attachment info