daytona_api_client_async 0.102.0rc1__py3-none-any.whl → 0.103.0__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 daytona_api_client_async might be problematic. Click here for more details.

@@ -72,7 +72,9 @@ from daytona_api_client_async.models.search_files_response import SearchFilesRes
72
72
  from daytona_api_client_async.models.session import Session
73
73
  from daytona_api_client_async.models.session_execute_request import SessionExecuteRequest
74
74
  from daytona_api_client_async.models.session_execute_response import SessionExecuteResponse
75
+ from daytona_api_client_async.models.user_home_dir_response import UserHomeDirResponse
75
76
  from daytona_api_client_async.models.windows_response import WindowsResponse
77
+ from daytona_api_client_async.models.work_dir_response import WorkDirResponse
76
78
 
77
79
  from daytona_api_client_async.api_client import ApiClient, RequestSerialized
78
80
  from daytona_api_client_async.api_response import ApiResponse
@@ -1005,6 +1007,7 @@ class ToolboxApi:
1005
1007
  sandbox_id: StrictStr,
1006
1008
  path: StrictStr,
1007
1009
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1010
+ recursive: Optional[StrictBool] = None,
1008
1011
  _request_timeout: Union[
1009
1012
  None,
1010
1013
  Annotated[StrictFloat, Field(gt=0)],
@@ -1028,6 +1031,8 @@ class ToolboxApi:
1028
1031
  :type path: str
1029
1032
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
1030
1033
  :type x_daytona_organization_id: str
1034
+ :param recursive:
1035
+ :type recursive: bool
1031
1036
  :param _request_timeout: timeout setting for this request. If one
1032
1037
  number provided, it will be total request
1033
1038
  timeout. It can also be a pair (tuple) of
@@ -1054,6 +1059,7 @@ class ToolboxApi:
1054
1059
  sandbox_id=sandbox_id,
1055
1060
  path=path,
1056
1061
  x_daytona_organization_id=x_daytona_organization_id,
1062
+ recursive=recursive,
1057
1063
  _request_auth=_request_auth,
1058
1064
  _content_type=_content_type,
1059
1065
  _headers=_headers,
@@ -1080,6 +1086,7 @@ class ToolboxApi:
1080
1086
  sandbox_id: StrictStr,
1081
1087
  path: StrictStr,
1082
1088
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1089
+ recursive: Optional[StrictBool] = None,
1083
1090
  _request_timeout: Union[
1084
1091
  None,
1085
1092
  Annotated[StrictFloat, Field(gt=0)],
@@ -1103,6 +1110,8 @@ class ToolboxApi:
1103
1110
  :type path: str
1104
1111
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
1105
1112
  :type x_daytona_organization_id: str
1113
+ :param recursive:
1114
+ :type recursive: bool
1106
1115
  :param _request_timeout: timeout setting for this request. If one
1107
1116
  number provided, it will be total request
1108
1117
  timeout. It can also be a pair (tuple) of
@@ -1129,6 +1138,7 @@ class ToolboxApi:
1129
1138
  sandbox_id=sandbox_id,
1130
1139
  path=path,
1131
1140
  x_daytona_organization_id=x_daytona_organization_id,
1141
+ recursive=recursive,
1132
1142
  _request_auth=_request_auth,
1133
1143
  _content_type=_content_type,
1134
1144
  _headers=_headers,
@@ -1155,6 +1165,7 @@ class ToolboxApi:
1155
1165
  sandbox_id: StrictStr,
1156
1166
  path: StrictStr,
1157
1167
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
1168
+ recursive: Optional[StrictBool] = None,
1158
1169
  _request_timeout: Union[
1159
1170
  None,
1160
1171
  Annotated[StrictFloat, Field(gt=0)],
@@ -1178,6 +1189,8 @@ class ToolboxApi:
1178
1189
  :type path: str
1179
1190
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
1180
1191
  :type x_daytona_organization_id: str
1192
+ :param recursive:
1193
+ :type recursive: bool
1181
1194
  :param _request_timeout: timeout setting for this request. If one
1182
1195
  number provided, it will be total request
1183
1196
  timeout. It can also be a pair (tuple) of
@@ -1204,6 +1217,7 @@ class ToolboxApi:
1204
1217
  sandbox_id=sandbox_id,
1205
1218
  path=path,
1206
1219
  x_daytona_organization_id=x_daytona_organization_id,
1220
+ recursive=recursive,
1207
1221
  _request_auth=_request_auth,
1208
1222
  _content_type=_content_type,
1209
1223
  _headers=_headers,
@@ -1225,6 +1239,7 @@ class ToolboxApi:
1225
1239
  sandbox_id,
1226
1240
  path,
1227
1241
  x_daytona_organization_id,
1242
+ recursive,
1228
1243
  _request_auth,
1229
1244
  _content_type,
1230
1245
  _headers,
@@ -1249,6 +1264,10 @@ class ToolboxApi:
1249
1264
  if sandbox_id is not None:
1250
1265
  _path_params['sandboxId'] = sandbox_id
1251
1266
  # process the query parameters
1267
+ if recursive is not None:
1268
+
1269
+ _query_params.append(('recursive', recursive))
1270
+
1252
1271
  if path is not None:
1253
1272
 
1254
1273
  _query_params.append(('path', path))
@@ -5128,7 +5147,7 @@ class ToolboxApi:
5128
5147
  _headers: Optional[Dict[StrictStr, Any]] = None,
5129
5148
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5130
5149
  ) -> ProjectDirResponse:
5131
- """Get sandbox project dir
5150
+ """(Deprecated) Get sandbox project dir
5132
5151
 
5133
5152
 
5134
5153
  :param sandbox_id: (required)
@@ -5156,6 +5175,7 @@ class ToolboxApi:
5156
5175
  :type _host_index: int, optional
5157
5176
  :return: Returns the result object.
5158
5177
  """ # noqa: E501
5178
+ warnings.warn("GET /toolbox/{sandboxId}/toolbox/project-dir is deprecated.", DeprecationWarning)
5159
5179
 
5160
5180
  _param = self._get_project_dir_serialize(
5161
5181
  sandbox_id=sandbox_id,
@@ -5198,7 +5218,7 @@ class ToolboxApi:
5198
5218
  _headers: Optional[Dict[StrictStr, Any]] = None,
5199
5219
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5200
5220
  ) -> ApiResponse[ProjectDirResponse]:
5201
- """Get sandbox project dir
5221
+ """(Deprecated) Get sandbox project dir
5202
5222
 
5203
5223
 
5204
5224
  :param sandbox_id: (required)
@@ -5226,6 +5246,7 @@ class ToolboxApi:
5226
5246
  :type _host_index: int, optional
5227
5247
  :return: Returns the result object.
5228
5248
  """ # noqa: E501
5249
+ warnings.warn("GET /toolbox/{sandboxId}/toolbox/project-dir is deprecated.", DeprecationWarning)
5229
5250
 
5230
5251
  _param = self._get_project_dir_serialize(
5231
5252
  sandbox_id=sandbox_id,
@@ -5268,7 +5289,7 @@ class ToolboxApi:
5268
5289
  _headers: Optional[Dict[StrictStr, Any]] = None,
5269
5290
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5270
5291
  ) -> RESTResponseType:
5271
- """Get sandbox project dir
5292
+ """(Deprecated) Get sandbox project dir
5272
5293
 
5273
5294
 
5274
5295
  :param sandbox_id: (required)
@@ -5296,6 +5317,7 @@ class ToolboxApi:
5296
5317
  :type _host_index: int, optional
5297
5318
  :return: Returns the result object.
5298
5319
  """ # noqa: E501
5320
+ warnings.warn("GET /toolbox/{sandboxId}/toolbox/project-dir is deprecated.", DeprecationWarning)
5299
5321
 
5300
5322
  _param = self._get_project_dir_serialize(
5301
5323
  sandbox_id=sandbox_id,
@@ -6308,7 +6330,7 @@ class ToolboxApi:
6308
6330
 
6309
6331
 
6310
6332
  @validate_call
6311
- async def get_windows(
6333
+ async def get_user_home_dir(
6312
6334
  self,
6313
6335
  sandbox_id: StrictStr,
6314
6336
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
@@ -6324,10 +6346,9 @@ class ToolboxApi:
6324
6346
  _content_type: Optional[StrictStr] = None,
6325
6347
  _headers: Optional[Dict[StrictStr, Any]] = None,
6326
6348
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6327
- ) -> WindowsResponse:
6328
- """Get windows
6349
+ ) -> UserHomeDirResponse:
6350
+ """Get sandbox user home dir
6329
6351
 
6330
- Get list of open windows
6331
6352
 
6332
6353
  :param sandbox_id: (required)
6333
6354
  :type sandbox_id: str
@@ -6355,7 +6376,7 @@ class ToolboxApi:
6355
6376
  :return: Returns the result object.
6356
6377
  """ # noqa: E501
6357
6378
 
6358
- _param = self._get_windows_serialize(
6379
+ _param = self._get_user_home_dir_serialize(
6359
6380
  sandbox_id=sandbox_id,
6360
6381
  x_daytona_organization_id=x_daytona_organization_id,
6361
6382
  _request_auth=_request_auth,
@@ -6365,7 +6386,7 @@ class ToolboxApi:
6365
6386
  )
6366
6387
 
6367
6388
  _response_types_map: Dict[str, Optional[str]] = {
6368
- '200': "WindowsResponse",
6389
+ '200': "UserHomeDirResponse",
6369
6390
  }
6370
6391
  response_data = await self.api_client.call_api(
6371
6392
  *_param,
@@ -6379,7 +6400,7 @@ class ToolboxApi:
6379
6400
 
6380
6401
 
6381
6402
  @validate_call
6382
- async def get_windows_with_http_info(
6403
+ async def get_user_home_dir_with_http_info(
6383
6404
  self,
6384
6405
  sandbox_id: StrictStr,
6385
6406
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
@@ -6395,10 +6416,9 @@ class ToolboxApi:
6395
6416
  _content_type: Optional[StrictStr] = None,
6396
6417
  _headers: Optional[Dict[StrictStr, Any]] = None,
6397
6418
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6398
- ) -> ApiResponse[WindowsResponse]:
6399
- """Get windows
6419
+ ) -> ApiResponse[UserHomeDirResponse]:
6420
+ """Get sandbox user home dir
6400
6421
 
6401
- Get list of open windows
6402
6422
 
6403
6423
  :param sandbox_id: (required)
6404
6424
  :type sandbox_id: str
@@ -6426,7 +6446,7 @@ class ToolboxApi:
6426
6446
  :return: Returns the result object.
6427
6447
  """ # noqa: E501
6428
6448
 
6429
- _param = self._get_windows_serialize(
6449
+ _param = self._get_user_home_dir_serialize(
6430
6450
  sandbox_id=sandbox_id,
6431
6451
  x_daytona_organization_id=x_daytona_organization_id,
6432
6452
  _request_auth=_request_auth,
@@ -6436,7 +6456,7 @@ class ToolboxApi:
6436
6456
  )
6437
6457
 
6438
6458
  _response_types_map: Dict[str, Optional[str]] = {
6439
- '200': "WindowsResponse",
6459
+ '200': "UserHomeDirResponse",
6440
6460
  }
6441
6461
  response_data = await self.api_client.call_api(
6442
6462
  *_param,
@@ -6450,7 +6470,7 @@ class ToolboxApi:
6450
6470
 
6451
6471
 
6452
6472
  @validate_call
6453
- async def get_windows_without_preload_content(
6473
+ async def get_user_home_dir_without_preload_content(
6454
6474
  self,
6455
6475
  sandbox_id: StrictStr,
6456
6476
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
@@ -6467,9 +6487,8 @@ class ToolboxApi:
6467
6487
  _headers: Optional[Dict[StrictStr, Any]] = None,
6468
6488
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6469
6489
  ) -> RESTResponseType:
6470
- """Get windows
6490
+ """Get sandbox user home dir
6471
6491
 
6472
- Get list of open windows
6473
6492
 
6474
6493
  :param sandbox_id: (required)
6475
6494
  :type sandbox_id: str
@@ -6497,7 +6516,7 @@ class ToolboxApi:
6497
6516
  :return: Returns the result object.
6498
6517
  """ # noqa: E501
6499
6518
 
6500
- _param = self._get_windows_serialize(
6519
+ _param = self._get_user_home_dir_serialize(
6501
6520
  sandbox_id=sandbox_id,
6502
6521
  x_daytona_organization_id=x_daytona_organization_id,
6503
6522
  _request_auth=_request_auth,
@@ -6507,7 +6526,7 @@ class ToolboxApi:
6507
6526
  )
6508
6527
 
6509
6528
  _response_types_map: Dict[str, Optional[str]] = {
6510
- '200': "WindowsResponse",
6529
+ '200': "UserHomeDirResponse",
6511
6530
  }
6512
6531
  response_data = await self.api_client.call_api(
6513
6532
  *_param,
@@ -6516,7 +6535,7 @@ class ToolboxApi:
6516
6535
  return response_data.response
6517
6536
 
6518
6537
 
6519
- def _get_windows_serialize(
6538
+ def _get_user_home_dir_serialize(
6520
6539
  self,
6521
6540
  sandbox_id,
6522
6541
  x_daytona_organization_id,
@@ -6568,7 +6587,558 @@ class ToolboxApi:
6568
6587
 
6569
6588
  return self.api_client.param_serialize(
6570
6589
  method='GET',
6571
- resource_path='/toolbox/{sandboxId}/toolbox/computeruse/display/windows',
6590
+ resource_path='/toolbox/{sandboxId}/toolbox/user-home-dir',
6591
+ path_params=_path_params,
6592
+ query_params=_query_params,
6593
+ header_params=_header_params,
6594
+ body=_body_params,
6595
+ post_params=_form_params,
6596
+ files=_files,
6597
+ auth_settings=_auth_settings,
6598
+ collection_formats=_collection_formats,
6599
+ _host=_host,
6600
+ _request_auth=_request_auth
6601
+ )
6602
+
6603
+
6604
+
6605
+
6606
+ @validate_call
6607
+ async def get_windows(
6608
+ self,
6609
+ sandbox_id: StrictStr,
6610
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6611
+ _request_timeout: Union[
6612
+ None,
6613
+ Annotated[StrictFloat, Field(gt=0)],
6614
+ Tuple[
6615
+ Annotated[StrictFloat, Field(gt=0)],
6616
+ Annotated[StrictFloat, Field(gt=0)]
6617
+ ]
6618
+ ] = None,
6619
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6620
+ _content_type: Optional[StrictStr] = None,
6621
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6622
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6623
+ ) -> WindowsResponse:
6624
+ """Get windows
6625
+
6626
+ Get list of open windows
6627
+
6628
+ :param sandbox_id: (required)
6629
+ :type sandbox_id: str
6630
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
6631
+ :type x_daytona_organization_id: str
6632
+ :param _request_timeout: timeout setting for this request. If one
6633
+ number provided, it will be total request
6634
+ timeout. It can also be a pair (tuple) of
6635
+ (connection, read) timeouts.
6636
+ :type _request_timeout: int, tuple(int, int), optional
6637
+ :param _request_auth: set to override the auth_settings for an a single
6638
+ request; this effectively ignores the
6639
+ authentication in the spec for a single request.
6640
+ :type _request_auth: dict, optional
6641
+ :param _content_type: force content-type for the request.
6642
+ :type _content_type: str, Optional
6643
+ :param _headers: set to override the headers for a single
6644
+ request; this effectively ignores the headers
6645
+ in the spec for a single request.
6646
+ :type _headers: dict, optional
6647
+ :param _host_index: set to override the host_index for a single
6648
+ request; this effectively ignores the host_index
6649
+ in the spec for a single request.
6650
+ :type _host_index: int, optional
6651
+ :return: Returns the result object.
6652
+ """ # noqa: E501
6653
+
6654
+ _param = self._get_windows_serialize(
6655
+ sandbox_id=sandbox_id,
6656
+ x_daytona_organization_id=x_daytona_organization_id,
6657
+ _request_auth=_request_auth,
6658
+ _content_type=_content_type,
6659
+ _headers=_headers,
6660
+ _host_index=_host_index
6661
+ )
6662
+
6663
+ _response_types_map: Dict[str, Optional[str]] = {
6664
+ '200': "WindowsResponse",
6665
+ }
6666
+ response_data = await self.api_client.call_api(
6667
+ *_param,
6668
+ _request_timeout=_request_timeout
6669
+ )
6670
+ await response_data.read()
6671
+ return self.api_client.response_deserialize(
6672
+ response_data=response_data,
6673
+ response_types_map=_response_types_map,
6674
+ ).data
6675
+
6676
+
6677
+ @validate_call
6678
+ async def get_windows_with_http_info(
6679
+ self,
6680
+ sandbox_id: StrictStr,
6681
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6682
+ _request_timeout: Union[
6683
+ None,
6684
+ Annotated[StrictFloat, Field(gt=0)],
6685
+ Tuple[
6686
+ Annotated[StrictFloat, Field(gt=0)],
6687
+ Annotated[StrictFloat, Field(gt=0)]
6688
+ ]
6689
+ ] = None,
6690
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6691
+ _content_type: Optional[StrictStr] = None,
6692
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6693
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6694
+ ) -> ApiResponse[WindowsResponse]:
6695
+ """Get windows
6696
+
6697
+ Get list of open windows
6698
+
6699
+ :param sandbox_id: (required)
6700
+ :type sandbox_id: str
6701
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
6702
+ :type x_daytona_organization_id: str
6703
+ :param _request_timeout: timeout setting for this request. If one
6704
+ number provided, it will be total request
6705
+ timeout. It can also be a pair (tuple) of
6706
+ (connection, read) timeouts.
6707
+ :type _request_timeout: int, tuple(int, int), optional
6708
+ :param _request_auth: set to override the auth_settings for an a single
6709
+ request; this effectively ignores the
6710
+ authentication in the spec for a single request.
6711
+ :type _request_auth: dict, optional
6712
+ :param _content_type: force content-type for the request.
6713
+ :type _content_type: str, Optional
6714
+ :param _headers: set to override the headers for a single
6715
+ request; this effectively ignores the headers
6716
+ in the spec for a single request.
6717
+ :type _headers: dict, optional
6718
+ :param _host_index: set to override the host_index for a single
6719
+ request; this effectively ignores the host_index
6720
+ in the spec for a single request.
6721
+ :type _host_index: int, optional
6722
+ :return: Returns the result object.
6723
+ """ # noqa: E501
6724
+
6725
+ _param = self._get_windows_serialize(
6726
+ sandbox_id=sandbox_id,
6727
+ x_daytona_organization_id=x_daytona_organization_id,
6728
+ _request_auth=_request_auth,
6729
+ _content_type=_content_type,
6730
+ _headers=_headers,
6731
+ _host_index=_host_index
6732
+ )
6733
+
6734
+ _response_types_map: Dict[str, Optional[str]] = {
6735
+ '200': "WindowsResponse",
6736
+ }
6737
+ response_data = await self.api_client.call_api(
6738
+ *_param,
6739
+ _request_timeout=_request_timeout
6740
+ )
6741
+ await response_data.read()
6742
+ return self.api_client.response_deserialize(
6743
+ response_data=response_data,
6744
+ response_types_map=_response_types_map,
6745
+ )
6746
+
6747
+
6748
+ @validate_call
6749
+ async def get_windows_without_preload_content(
6750
+ self,
6751
+ sandbox_id: StrictStr,
6752
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6753
+ _request_timeout: Union[
6754
+ None,
6755
+ Annotated[StrictFloat, Field(gt=0)],
6756
+ Tuple[
6757
+ Annotated[StrictFloat, Field(gt=0)],
6758
+ Annotated[StrictFloat, Field(gt=0)]
6759
+ ]
6760
+ ] = None,
6761
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6762
+ _content_type: Optional[StrictStr] = None,
6763
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6764
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6765
+ ) -> RESTResponseType:
6766
+ """Get windows
6767
+
6768
+ Get list of open windows
6769
+
6770
+ :param sandbox_id: (required)
6771
+ :type sandbox_id: str
6772
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
6773
+ :type x_daytona_organization_id: str
6774
+ :param _request_timeout: timeout setting for this request. If one
6775
+ number provided, it will be total request
6776
+ timeout. It can also be a pair (tuple) of
6777
+ (connection, read) timeouts.
6778
+ :type _request_timeout: int, tuple(int, int), optional
6779
+ :param _request_auth: set to override the auth_settings for an a single
6780
+ request; this effectively ignores the
6781
+ authentication in the spec for a single request.
6782
+ :type _request_auth: dict, optional
6783
+ :param _content_type: force content-type for the request.
6784
+ :type _content_type: str, Optional
6785
+ :param _headers: set to override the headers for a single
6786
+ request; this effectively ignores the headers
6787
+ in the spec for a single request.
6788
+ :type _headers: dict, optional
6789
+ :param _host_index: set to override the host_index for a single
6790
+ request; this effectively ignores the host_index
6791
+ in the spec for a single request.
6792
+ :type _host_index: int, optional
6793
+ :return: Returns the result object.
6794
+ """ # noqa: E501
6795
+
6796
+ _param = self._get_windows_serialize(
6797
+ sandbox_id=sandbox_id,
6798
+ x_daytona_organization_id=x_daytona_organization_id,
6799
+ _request_auth=_request_auth,
6800
+ _content_type=_content_type,
6801
+ _headers=_headers,
6802
+ _host_index=_host_index
6803
+ )
6804
+
6805
+ _response_types_map: Dict[str, Optional[str]] = {
6806
+ '200': "WindowsResponse",
6807
+ }
6808
+ response_data = await self.api_client.call_api(
6809
+ *_param,
6810
+ _request_timeout=_request_timeout
6811
+ )
6812
+ return response_data.response
6813
+
6814
+
6815
+ def _get_windows_serialize(
6816
+ self,
6817
+ sandbox_id,
6818
+ x_daytona_organization_id,
6819
+ _request_auth,
6820
+ _content_type,
6821
+ _headers,
6822
+ _host_index,
6823
+ ) -> RequestSerialized:
6824
+
6825
+ _host = None
6826
+
6827
+ _collection_formats: Dict[str, str] = {
6828
+ }
6829
+
6830
+ _path_params: Dict[str, str] = {}
6831
+ _query_params: List[Tuple[str, str]] = []
6832
+ _header_params: Dict[str, Optional[str]] = _headers or {}
6833
+ _form_params: List[Tuple[str, str]] = []
6834
+ _files: Dict[
6835
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
6836
+ ] = {}
6837
+ _body_params: Optional[bytes] = None
6838
+
6839
+ # process the path parameters
6840
+ if sandbox_id is not None:
6841
+ _path_params['sandboxId'] = sandbox_id
6842
+ # process the query parameters
6843
+ # process the header parameters
6844
+ if x_daytona_organization_id is not None:
6845
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
6846
+ # process the form parameters
6847
+ # process the body parameter
6848
+
6849
+
6850
+ # set the HTTP header `Accept`
6851
+ if 'Accept' not in _header_params:
6852
+ _header_params['Accept'] = self.api_client.select_header_accept(
6853
+ [
6854
+ 'application/json'
6855
+ ]
6856
+ )
6857
+
6858
+
6859
+ # authentication setting
6860
+ _auth_settings: List[str] = [
6861
+ 'bearer',
6862
+ 'oauth2'
6863
+ ]
6864
+
6865
+ return self.api_client.param_serialize(
6866
+ method='GET',
6867
+ resource_path='/toolbox/{sandboxId}/toolbox/computeruse/display/windows',
6868
+ path_params=_path_params,
6869
+ query_params=_query_params,
6870
+ header_params=_header_params,
6871
+ body=_body_params,
6872
+ post_params=_form_params,
6873
+ files=_files,
6874
+ auth_settings=_auth_settings,
6875
+ collection_formats=_collection_formats,
6876
+ _host=_host,
6877
+ _request_auth=_request_auth
6878
+ )
6879
+
6880
+
6881
+
6882
+
6883
+ @validate_call
6884
+ async def get_work_dir(
6885
+ self,
6886
+ sandbox_id: StrictStr,
6887
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6888
+ _request_timeout: Union[
6889
+ None,
6890
+ Annotated[StrictFloat, Field(gt=0)],
6891
+ Tuple[
6892
+ Annotated[StrictFloat, Field(gt=0)],
6893
+ Annotated[StrictFloat, Field(gt=0)]
6894
+ ]
6895
+ ] = None,
6896
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6897
+ _content_type: Optional[StrictStr] = None,
6898
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6899
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6900
+ ) -> WorkDirResponse:
6901
+ """Get sandbox work-dir
6902
+
6903
+
6904
+ :param sandbox_id: (required)
6905
+ :type sandbox_id: str
6906
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
6907
+ :type x_daytona_organization_id: str
6908
+ :param _request_timeout: timeout setting for this request. If one
6909
+ number provided, it will be total request
6910
+ timeout. It can also be a pair (tuple) of
6911
+ (connection, read) timeouts.
6912
+ :type _request_timeout: int, tuple(int, int), optional
6913
+ :param _request_auth: set to override the auth_settings for an a single
6914
+ request; this effectively ignores the
6915
+ authentication in the spec for a single request.
6916
+ :type _request_auth: dict, optional
6917
+ :param _content_type: force content-type for the request.
6918
+ :type _content_type: str, Optional
6919
+ :param _headers: set to override the headers for a single
6920
+ request; this effectively ignores the headers
6921
+ in the spec for a single request.
6922
+ :type _headers: dict, optional
6923
+ :param _host_index: set to override the host_index for a single
6924
+ request; this effectively ignores the host_index
6925
+ in the spec for a single request.
6926
+ :type _host_index: int, optional
6927
+ :return: Returns the result object.
6928
+ """ # noqa: E501
6929
+
6930
+ _param = self._get_work_dir_serialize(
6931
+ sandbox_id=sandbox_id,
6932
+ x_daytona_organization_id=x_daytona_organization_id,
6933
+ _request_auth=_request_auth,
6934
+ _content_type=_content_type,
6935
+ _headers=_headers,
6936
+ _host_index=_host_index
6937
+ )
6938
+
6939
+ _response_types_map: Dict[str, Optional[str]] = {
6940
+ '200': "WorkDirResponse",
6941
+ }
6942
+ response_data = await self.api_client.call_api(
6943
+ *_param,
6944
+ _request_timeout=_request_timeout
6945
+ )
6946
+ await response_data.read()
6947
+ return self.api_client.response_deserialize(
6948
+ response_data=response_data,
6949
+ response_types_map=_response_types_map,
6950
+ ).data
6951
+
6952
+
6953
+ @validate_call
6954
+ async def get_work_dir_with_http_info(
6955
+ self,
6956
+ sandbox_id: StrictStr,
6957
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6958
+ _request_timeout: Union[
6959
+ None,
6960
+ Annotated[StrictFloat, Field(gt=0)],
6961
+ Tuple[
6962
+ Annotated[StrictFloat, Field(gt=0)],
6963
+ Annotated[StrictFloat, Field(gt=0)]
6964
+ ]
6965
+ ] = None,
6966
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6967
+ _content_type: Optional[StrictStr] = None,
6968
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6969
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6970
+ ) -> ApiResponse[WorkDirResponse]:
6971
+ """Get sandbox work-dir
6972
+
6973
+
6974
+ :param sandbox_id: (required)
6975
+ :type sandbox_id: str
6976
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
6977
+ :type x_daytona_organization_id: str
6978
+ :param _request_timeout: timeout setting for this request. If one
6979
+ number provided, it will be total request
6980
+ timeout. It can also be a pair (tuple) of
6981
+ (connection, read) timeouts.
6982
+ :type _request_timeout: int, tuple(int, int), optional
6983
+ :param _request_auth: set to override the auth_settings for an a single
6984
+ request; this effectively ignores the
6985
+ authentication in the spec for a single request.
6986
+ :type _request_auth: dict, optional
6987
+ :param _content_type: force content-type for the request.
6988
+ :type _content_type: str, Optional
6989
+ :param _headers: set to override the headers for a single
6990
+ request; this effectively ignores the headers
6991
+ in the spec for a single request.
6992
+ :type _headers: dict, optional
6993
+ :param _host_index: set to override the host_index for a single
6994
+ request; this effectively ignores the host_index
6995
+ in the spec for a single request.
6996
+ :type _host_index: int, optional
6997
+ :return: Returns the result object.
6998
+ """ # noqa: E501
6999
+
7000
+ _param = self._get_work_dir_serialize(
7001
+ sandbox_id=sandbox_id,
7002
+ x_daytona_organization_id=x_daytona_organization_id,
7003
+ _request_auth=_request_auth,
7004
+ _content_type=_content_type,
7005
+ _headers=_headers,
7006
+ _host_index=_host_index
7007
+ )
7008
+
7009
+ _response_types_map: Dict[str, Optional[str]] = {
7010
+ '200': "WorkDirResponse",
7011
+ }
7012
+ response_data = await self.api_client.call_api(
7013
+ *_param,
7014
+ _request_timeout=_request_timeout
7015
+ )
7016
+ await response_data.read()
7017
+ return self.api_client.response_deserialize(
7018
+ response_data=response_data,
7019
+ response_types_map=_response_types_map,
7020
+ )
7021
+
7022
+
7023
+ @validate_call
7024
+ async def get_work_dir_without_preload_content(
7025
+ self,
7026
+ sandbox_id: StrictStr,
7027
+ x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
7028
+ _request_timeout: Union[
7029
+ None,
7030
+ Annotated[StrictFloat, Field(gt=0)],
7031
+ Tuple[
7032
+ Annotated[StrictFloat, Field(gt=0)],
7033
+ Annotated[StrictFloat, Field(gt=0)]
7034
+ ]
7035
+ ] = None,
7036
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7037
+ _content_type: Optional[StrictStr] = None,
7038
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7039
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7040
+ ) -> RESTResponseType:
7041
+ """Get sandbox work-dir
7042
+
7043
+
7044
+ :param sandbox_id: (required)
7045
+ :type sandbox_id: str
7046
+ :param x_daytona_organization_id: Use with JWT to specify the organization ID
7047
+ :type x_daytona_organization_id: str
7048
+ :param _request_timeout: timeout setting for this request. If one
7049
+ number provided, it will be total request
7050
+ timeout. It can also be a pair (tuple) of
7051
+ (connection, read) timeouts.
7052
+ :type _request_timeout: int, tuple(int, int), optional
7053
+ :param _request_auth: set to override the auth_settings for an a single
7054
+ request; this effectively ignores the
7055
+ authentication in the spec for a single request.
7056
+ :type _request_auth: dict, optional
7057
+ :param _content_type: force content-type for the request.
7058
+ :type _content_type: str, Optional
7059
+ :param _headers: set to override the headers for a single
7060
+ request; this effectively ignores the headers
7061
+ in the spec for a single request.
7062
+ :type _headers: dict, optional
7063
+ :param _host_index: set to override the host_index for a single
7064
+ request; this effectively ignores the host_index
7065
+ in the spec for a single request.
7066
+ :type _host_index: int, optional
7067
+ :return: Returns the result object.
7068
+ """ # noqa: E501
7069
+
7070
+ _param = self._get_work_dir_serialize(
7071
+ sandbox_id=sandbox_id,
7072
+ x_daytona_organization_id=x_daytona_organization_id,
7073
+ _request_auth=_request_auth,
7074
+ _content_type=_content_type,
7075
+ _headers=_headers,
7076
+ _host_index=_host_index
7077
+ )
7078
+
7079
+ _response_types_map: Dict[str, Optional[str]] = {
7080
+ '200': "WorkDirResponse",
7081
+ }
7082
+ response_data = await self.api_client.call_api(
7083
+ *_param,
7084
+ _request_timeout=_request_timeout
7085
+ )
7086
+ return response_data.response
7087
+
7088
+
7089
+ def _get_work_dir_serialize(
7090
+ self,
7091
+ sandbox_id,
7092
+ x_daytona_organization_id,
7093
+ _request_auth,
7094
+ _content_type,
7095
+ _headers,
7096
+ _host_index,
7097
+ ) -> RequestSerialized:
7098
+
7099
+ _host = None
7100
+
7101
+ _collection_formats: Dict[str, str] = {
7102
+ }
7103
+
7104
+ _path_params: Dict[str, str] = {}
7105
+ _query_params: List[Tuple[str, str]] = []
7106
+ _header_params: Dict[str, Optional[str]] = _headers or {}
7107
+ _form_params: List[Tuple[str, str]] = []
7108
+ _files: Dict[
7109
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
7110
+ ] = {}
7111
+ _body_params: Optional[bytes] = None
7112
+
7113
+ # process the path parameters
7114
+ if sandbox_id is not None:
7115
+ _path_params['sandboxId'] = sandbox_id
7116
+ # process the query parameters
7117
+ # process the header parameters
7118
+ if x_daytona_organization_id is not None:
7119
+ _header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
7120
+ # process the form parameters
7121
+ # process the body parameter
7122
+
7123
+
7124
+ # set the HTTP header `Accept`
7125
+ if 'Accept' not in _header_params:
7126
+ _header_params['Accept'] = self.api_client.select_header_accept(
7127
+ [
7128
+ 'application/json'
7129
+ ]
7130
+ )
7131
+
7132
+
7133
+ # authentication setting
7134
+ _auth_settings: List[str] = [
7135
+ 'bearer',
7136
+ 'oauth2'
7137
+ ]
7138
+
7139
+ return self.api_client.param_serialize(
7140
+ method='GET',
7141
+ resource_path='/toolbox/{sandboxId}/toolbox/work-dir',
6572
7142
  path_params=_path_params,
6573
7143
  query_params=_query_params,
6574
7144
  header_params=_header_params,