daytona_api_client_async 0.21.3a0__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.

Files changed (123) hide show
  1. daytona_api_client_async/__init__.py +129 -0
  2. daytona_api_client_async/api/__init__.py +16 -0
  3. daytona_api_client_async/api/api_keys_api.py +1391 -0
  4. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  5. daytona_api_client_async/api/images_api.py +2350 -0
  6. daytona_api_client_async/api/nodes_api.py +792 -0
  7. daytona_api_client_async/api/object_storage_api.py +298 -0
  8. daytona_api_client_async/api/organizations_api.py +6762 -0
  9. daytona_api_client_async/api/preview_api.py +819 -0
  10. daytona_api_client_async/api/runners_api.py +792 -0
  11. daytona_api_client_async/api/sandbox_api.py +3994 -0
  12. daytona_api_client_async/api/snapshots_api.py +2059 -0
  13. daytona_api_client_async/api/toolbox_api.py +11819 -0
  14. daytona_api_client_async/api/users_api.py +2075 -0
  15. daytona_api_client_async/api/volumes_api.py +1419 -0
  16. daytona_api_client_async/api/workspace_api.py +4036 -0
  17. daytona_api_client_async/api_client.py +801 -0
  18. daytona_api_client_async/api_response.py +21 -0
  19. daytona_api_client_async/configuration.py +579 -0
  20. daytona_api_client_async/exceptions.py +217 -0
  21. daytona_api_client_async/models/__init__.py +101 -0
  22. daytona_api_client_async/models/account_provider.py +103 -0
  23. daytona_api_client_async/models/api_key_list.py +130 -0
  24. daytona_api_client_async/models/api_key_response.py +123 -0
  25. daytona_api_client_async/models/build_image.py +107 -0
  26. daytona_api_client_async/models/build_info.py +108 -0
  27. daytona_api_client_async/models/build_snapshot.py +115 -0
  28. daytona_api_client_async/models/command.py +105 -0
  29. daytona_api_client_async/models/completion_context.py +103 -0
  30. daytona_api_client_async/models/completion_item.py +113 -0
  31. daytona_api_client_async/models/completion_list.py +111 -0
  32. daytona_api_client_async/models/create_api_key.py +119 -0
  33. daytona_api_client_async/models/create_build_info.py +103 -0
  34. daytona_api_client_async/models/create_docker_registry.py +120 -0
  35. daytona_api_client_async/models/create_image.py +105 -0
  36. daytona_api_client_async/models/create_linked_account.py +103 -0
  37. daytona_api_client_async/models/create_node.py +135 -0
  38. daytona_api_client_async/models/create_organization.py +101 -0
  39. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  40. daytona_api_client_async/models/create_organization_quota.py +117 -0
  41. daytona_api_client_async/models/create_organization_role.py +113 -0
  42. daytona_api_client_async/models/create_runner.py +135 -0
  43. daytona_api_client_async/models/create_sandbox.py +161 -0
  44. daytona_api_client_async/models/create_session_request.py +101 -0
  45. daytona_api_client_async/models/create_snapshot.py +121 -0
  46. daytona_api_client_async/models/create_user.py +125 -0
  47. daytona_api_client_async/models/create_volume.py +101 -0
  48. daytona_api_client_async/models/create_workspace.py +161 -0
  49. daytona_api_client_async/models/docker_registry.py +123 -0
  50. daytona_api_client_async/models/execute_request.py +105 -0
  51. daytona_api_client_async/models/execute_response.py +103 -0
  52. daytona_api_client_async/models/file_info.py +115 -0
  53. daytona_api_client_async/models/file_status.py +107 -0
  54. daytona_api_client_async/models/git_add_request.py +103 -0
  55. daytona_api_client_async/models/git_branch_request.py +103 -0
  56. daytona_api_client_async/models/git_checkout_request.py +103 -0
  57. daytona_api_client_async/models/git_clone_request.py +111 -0
  58. daytona_api_client_async/models/git_commit_info.py +109 -0
  59. daytona_api_client_async/models/git_commit_request.py +107 -0
  60. daytona_api_client_async/models/git_commit_response.py +101 -0
  61. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  62. daytona_api_client_async/models/git_repo_request.py +105 -0
  63. daytona_api_client_async/models/git_status.py +117 -0
  64. daytona_api_client_async/models/image_dto.py +145 -0
  65. daytona_api_client_async/models/image_state.py +45 -0
  66. daytona_api_client_async/models/list_branch_response.py +101 -0
  67. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  68. daytona_api_client_async/models/lsp_document_request.py +105 -0
  69. daytona_api_client_async/models/lsp_location.py +107 -0
  70. daytona_api_client_async/models/lsp_server_request.py +103 -0
  71. daytona_api_client_async/models/lsp_symbol.py +109 -0
  72. daytona_api_client_async/models/match.py +105 -0
  73. daytona_api_client_async/models/organization.py +120 -0
  74. daytona_api_client_async/models/organization_invitation.py +144 -0
  75. daytona_api_client_async/models/organization_role.py +122 -0
  76. daytona_api_client_async/models/organization_suspension.py +104 -0
  77. daytona_api_client_async/models/organization_user.py +131 -0
  78. daytona_api_client_async/models/paginated_images_dto.py +115 -0
  79. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  80. daytona_api_client_async/models/port_preview_url.py +103 -0
  81. daytona_api_client_async/models/position.py +103 -0
  82. daytona_api_client_async/models/project_dir_response.py +101 -0
  83. daytona_api_client_async/models/range.py +110 -0
  84. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  85. daytona_api_client_async/models/replace_request.py +105 -0
  86. daytona_api_client_async/models/replace_result.py +105 -0
  87. daytona_api_client_async/models/sandbox.py +180 -0
  88. daytona_api_client_async/models/sandbox_info.py +105 -0
  89. daytona_api_client_async/models/sandbox_labels.py +101 -0
  90. daytona_api_client_async/models/sandbox_state.py +52 -0
  91. daytona_api_client_async/models/sandbox_volume.py +103 -0
  92. daytona_api_client_async/models/search_files_response.py +101 -0
  93. daytona_api_client_async/models/session.py +116 -0
  94. daytona_api_client_async/models/session_execute_request.py +105 -0
  95. daytona_api_client_async/models/session_execute_response.py +105 -0
  96. daytona_api_client_async/models/set_image_general_status.py +101 -0
  97. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  98. daytona_api_client_async/models/snapshot_dto.py +161 -0
  99. daytona_api_client_async/models/snapshot_state.py +46 -0
  100. daytona_api_client_async/models/storage_access_dto.py +111 -0
  101. daytona_api_client_async/models/toggle_state.py +101 -0
  102. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  103. daytona_api_client_async/models/update_docker_registry.py +105 -0
  104. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  105. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  106. daytona_api_client_async/models/update_organization_quota.py +162 -0
  107. daytona_api_client_async/models/update_organization_role.py +113 -0
  108. daytona_api_client_async/models/usage_overview.py +113 -0
  109. daytona_api_client_async/models/user.py +115 -0
  110. daytona_api_client_async/models/user_public_key.py +103 -0
  111. daytona_api_client_async/models/volume_dto.py +126 -0
  112. daytona_api_client_async/models/volume_state.py +43 -0
  113. daytona_api_client_async/models/workspace.py +204 -0
  114. daytona_api_client_async/models/workspace_info.py +105 -0
  115. daytona_api_client_async/models/workspace_labels.py +101 -0
  116. daytona_api_client_async/models/workspace_state.py +51 -0
  117. daytona_api_client_async/models/workspace_volume.py +103 -0
  118. daytona_api_client_async/py.typed +0 -0
  119. daytona_api_client_async/rest.py +214 -0
  120. daytona_api_client_async-0.21.3a0.dist-info/METADATA +25 -0
  121. daytona_api_client_async-0.21.3a0.dist-info/RECORD +123 -0
  122. daytona_api_client_async-0.21.3a0.dist-info/WHEEL +5 -0
  123. daytona_api_client_async-0.21.3a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,819 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictBool, StrictStr
21
+ from typing_extensions import Annotated
22
+
23
+ from daytona_api_client_async.api_client import ApiClient, RequestSerialized
24
+ from daytona_api_client_async.api_response import ApiResponse
25
+ from daytona_api_client_async.rest import RESTResponseType
26
+
27
+
28
+ class PreviewApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+
41
+ @validate_call
42
+ async def has_sandbox_access(
43
+ self,
44
+ sandbox_id: StrictStr,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> None:
58
+ """Check if user has access to the sandbox
59
+
60
+
61
+ :param sandbox_id: (required)
62
+ :type sandbox_id: str
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._has_sandbox_access_serialize(
86
+ sandbox_id=sandbox_id,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ '200': None,
95
+ }
96
+ response_data = await self.api_client.call_api(
97
+ *_param,
98
+ _request_timeout=_request_timeout
99
+ )
100
+ await response_data.read()
101
+ return self.api_client.response_deserialize(
102
+ response_data=response_data,
103
+ response_types_map=_response_types_map,
104
+ ).data
105
+
106
+
107
+ @validate_call
108
+ async def has_sandbox_access_with_http_info(
109
+ self,
110
+ sandbox_id: StrictStr,
111
+ _request_timeout: Union[
112
+ None,
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Tuple[
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Annotated[StrictFloat, Field(gt=0)]
117
+ ]
118
+ ] = None,
119
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
120
+ _content_type: Optional[StrictStr] = None,
121
+ _headers: Optional[Dict[StrictStr, Any]] = None,
122
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
+ ) -> ApiResponse[None]:
124
+ """Check if user has access to the sandbox
125
+
126
+
127
+ :param sandbox_id: (required)
128
+ :type sandbox_id: str
129
+ :param _request_timeout: timeout setting for this request. If one
130
+ number provided, it will be total request
131
+ timeout. It can also be a pair (tuple) of
132
+ (connection, read) timeouts.
133
+ :type _request_timeout: int, tuple(int, int), optional
134
+ :param _request_auth: set to override the auth_settings for an a single
135
+ request; this effectively ignores the
136
+ authentication in the spec for a single request.
137
+ :type _request_auth: dict, optional
138
+ :param _content_type: force content-type for the request.
139
+ :type _content_type: str, Optional
140
+ :param _headers: set to override the headers for a single
141
+ request; this effectively ignores the headers
142
+ in the spec for a single request.
143
+ :type _headers: dict, optional
144
+ :param _host_index: set to override the host_index for a single
145
+ request; this effectively ignores the host_index
146
+ in the spec for a single request.
147
+ :type _host_index: int, optional
148
+ :return: Returns the result object.
149
+ """ # noqa: E501
150
+
151
+ _param = self._has_sandbox_access_serialize(
152
+ sandbox_id=sandbox_id,
153
+ _request_auth=_request_auth,
154
+ _content_type=_content_type,
155
+ _headers=_headers,
156
+ _host_index=_host_index
157
+ )
158
+
159
+ _response_types_map: Dict[str, Optional[str]] = {
160
+ '200': None,
161
+ }
162
+ response_data = await self.api_client.call_api(
163
+ *_param,
164
+ _request_timeout=_request_timeout
165
+ )
166
+ await response_data.read()
167
+ return self.api_client.response_deserialize(
168
+ response_data=response_data,
169
+ response_types_map=_response_types_map,
170
+ )
171
+
172
+
173
+ @validate_call
174
+ async def has_sandbox_access_without_preload_content(
175
+ self,
176
+ sandbox_id: StrictStr,
177
+ _request_timeout: Union[
178
+ None,
179
+ Annotated[StrictFloat, Field(gt=0)],
180
+ Tuple[
181
+ Annotated[StrictFloat, Field(gt=0)],
182
+ Annotated[StrictFloat, Field(gt=0)]
183
+ ]
184
+ ] = None,
185
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
186
+ _content_type: Optional[StrictStr] = None,
187
+ _headers: Optional[Dict[StrictStr, Any]] = None,
188
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
189
+ ) -> RESTResponseType:
190
+ """Check if user has access to the sandbox
191
+
192
+
193
+ :param sandbox_id: (required)
194
+ :type sandbox_id: str
195
+ :param _request_timeout: timeout setting for this request. If one
196
+ number provided, it will be total request
197
+ timeout. It can also be a pair (tuple) of
198
+ (connection, read) timeouts.
199
+ :type _request_timeout: int, tuple(int, int), optional
200
+ :param _request_auth: set to override the auth_settings for an a single
201
+ request; this effectively ignores the
202
+ authentication in the spec for a single request.
203
+ :type _request_auth: dict, optional
204
+ :param _content_type: force content-type for the request.
205
+ :type _content_type: str, Optional
206
+ :param _headers: set to override the headers for a single
207
+ request; this effectively ignores the headers
208
+ in the spec for a single request.
209
+ :type _headers: dict, optional
210
+ :param _host_index: set to override the host_index for a single
211
+ request; this effectively ignores the host_index
212
+ in the spec for a single request.
213
+ :type _host_index: int, optional
214
+ :return: Returns the result object.
215
+ """ # noqa: E501
216
+
217
+ _param = self._has_sandbox_access_serialize(
218
+ sandbox_id=sandbox_id,
219
+ _request_auth=_request_auth,
220
+ _content_type=_content_type,
221
+ _headers=_headers,
222
+ _host_index=_host_index
223
+ )
224
+
225
+ _response_types_map: Dict[str, Optional[str]] = {
226
+ '200': None,
227
+ }
228
+ response_data = await self.api_client.call_api(
229
+ *_param,
230
+ _request_timeout=_request_timeout
231
+ )
232
+ return response_data.response
233
+
234
+
235
+ def _has_sandbox_access_serialize(
236
+ self,
237
+ sandbox_id,
238
+ _request_auth,
239
+ _content_type,
240
+ _headers,
241
+ _host_index,
242
+ ) -> RequestSerialized:
243
+
244
+ _host = None
245
+
246
+ _collection_formats: Dict[str, str] = {
247
+ }
248
+
249
+ _path_params: Dict[str, str] = {}
250
+ _query_params: List[Tuple[str, str]] = []
251
+ _header_params: Dict[str, Optional[str]] = _headers or {}
252
+ _form_params: List[Tuple[str, str]] = []
253
+ _files: Dict[
254
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
255
+ ] = {}
256
+ _body_params: Optional[bytes] = None
257
+
258
+ # process the path parameters
259
+ if sandbox_id is not None:
260
+ _path_params['sandboxId'] = sandbox_id
261
+ # process the query parameters
262
+ # process the header parameters
263
+ # process the form parameters
264
+ # process the body parameter
265
+
266
+
267
+
268
+
269
+ # authentication setting
270
+ _auth_settings: List[str] = [
271
+ 'bearer',
272
+ 'oauth2'
273
+ ]
274
+
275
+ return self.api_client.param_serialize(
276
+ method='GET',
277
+ resource_path='/preview/{sandboxId}/access',
278
+ path_params=_path_params,
279
+ query_params=_query_params,
280
+ header_params=_header_params,
281
+ body=_body_params,
282
+ post_params=_form_params,
283
+ files=_files,
284
+ auth_settings=_auth_settings,
285
+ collection_formats=_collection_formats,
286
+ _host=_host,
287
+ _request_auth=_request_auth
288
+ )
289
+
290
+
291
+
292
+
293
+ @validate_call
294
+ async def is_sandbox_public(
295
+ self,
296
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
297
+ _request_timeout: Union[
298
+ None,
299
+ Annotated[StrictFloat, Field(gt=0)],
300
+ Tuple[
301
+ Annotated[StrictFloat, Field(gt=0)],
302
+ Annotated[StrictFloat, Field(gt=0)]
303
+ ]
304
+ ] = None,
305
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
306
+ _content_type: Optional[StrictStr] = None,
307
+ _headers: Optional[Dict[StrictStr, Any]] = None,
308
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
309
+ ) -> bool:
310
+ """Check if sandbox is public
311
+
312
+
313
+ :param sandbox_id: ID of the sandbox (required)
314
+ :type sandbox_id: str
315
+ :param _request_timeout: timeout setting for this request. If one
316
+ number provided, it will be total request
317
+ timeout. It can also be a pair (tuple) of
318
+ (connection, read) timeouts.
319
+ :type _request_timeout: int, tuple(int, int), optional
320
+ :param _request_auth: set to override the auth_settings for an a single
321
+ request; this effectively ignores the
322
+ authentication in the spec for a single request.
323
+ :type _request_auth: dict, optional
324
+ :param _content_type: force content-type for the request.
325
+ :type _content_type: str, Optional
326
+ :param _headers: set to override the headers for a single
327
+ request; this effectively ignores the headers
328
+ in the spec for a single request.
329
+ :type _headers: dict, optional
330
+ :param _host_index: set to override the host_index for a single
331
+ request; this effectively ignores the host_index
332
+ in the spec for a single request.
333
+ :type _host_index: int, optional
334
+ :return: Returns the result object.
335
+ """ # noqa: E501
336
+
337
+ _param = self._is_sandbox_public_serialize(
338
+ sandbox_id=sandbox_id,
339
+ _request_auth=_request_auth,
340
+ _content_type=_content_type,
341
+ _headers=_headers,
342
+ _host_index=_host_index
343
+ )
344
+
345
+ _response_types_map: Dict[str, Optional[str]] = {
346
+ '200': "bool",
347
+ }
348
+ response_data = await self.api_client.call_api(
349
+ *_param,
350
+ _request_timeout=_request_timeout
351
+ )
352
+ await response_data.read()
353
+ return self.api_client.response_deserialize(
354
+ response_data=response_data,
355
+ response_types_map=_response_types_map,
356
+ ).data
357
+
358
+
359
+ @validate_call
360
+ async def is_sandbox_public_with_http_info(
361
+ self,
362
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
363
+ _request_timeout: Union[
364
+ None,
365
+ Annotated[StrictFloat, Field(gt=0)],
366
+ Tuple[
367
+ Annotated[StrictFloat, Field(gt=0)],
368
+ Annotated[StrictFloat, Field(gt=0)]
369
+ ]
370
+ ] = None,
371
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
372
+ _content_type: Optional[StrictStr] = None,
373
+ _headers: Optional[Dict[StrictStr, Any]] = None,
374
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
375
+ ) -> ApiResponse[bool]:
376
+ """Check if sandbox is public
377
+
378
+
379
+ :param sandbox_id: ID of the sandbox (required)
380
+ :type sandbox_id: str
381
+ :param _request_timeout: timeout setting for this request. If one
382
+ number provided, it will be total request
383
+ timeout. It can also be a pair (tuple) of
384
+ (connection, read) timeouts.
385
+ :type _request_timeout: int, tuple(int, int), optional
386
+ :param _request_auth: set to override the auth_settings for an a single
387
+ request; this effectively ignores the
388
+ authentication in the spec for a single request.
389
+ :type _request_auth: dict, optional
390
+ :param _content_type: force content-type for the request.
391
+ :type _content_type: str, Optional
392
+ :param _headers: set to override the headers for a single
393
+ request; this effectively ignores the headers
394
+ in the spec for a single request.
395
+ :type _headers: dict, optional
396
+ :param _host_index: set to override the host_index for a single
397
+ request; this effectively ignores the host_index
398
+ in the spec for a single request.
399
+ :type _host_index: int, optional
400
+ :return: Returns the result object.
401
+ """ # noqa: E501
402
+
403
+ _param = self._is_sandbox_public_serialize(
404
+ sandbox_id=sandbox_id,
405
+ _request_auth=_request_auth,
406
+ _content_type=_content_type,
407
+ _headers=_headers,
408
+ _host_index=_host_index
409
+ )
410
+
411
+ _response_types_map: Dict[str, Optional[str]] = {
412
+ '200': "bool",
413
+ }
414
+ response_data = await self.api_client.call_api(
415
+ *_param,
416
+ _request_timeout=_request_timeout
417
+ )
418
+ await response_data.read()
419
+ return self.api_client.response_deserialize(
420
+ response_data=response_data,
421
+ response_types_map=_response_types_map,
422
+ )
423
+
424
+
425
+ @validate_call
426
+ async def is_sandbox_public_without_preload_content(
427
+ self,
428
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
429
+ _request_timeout: Union[
430
+ None,
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Tuple[
433
+ Annotated[StrictFloat, Field(gt=0)],
434
+ Annotated[StrictFloat, Field(gt=0)]
435
+ ]
436
+ ] = None,
437
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
438
+ _content_type: Optional[StrictStr] = None,
439
+ _headers: Optional[Dict[StrictStr, Any]] = None,
440
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
441
+ ) -> RESTResponseType:
442
+ """Check if sandbox is public
443
+
444
+
445
+ :param sandbox_id: ID of the sandbox (required)
446
+ :type sandbox_id: str
447
+ :param _request_timeout: timeout setting for this request. If one
448
+ number provided, it will be total request
449
+ timeout. It can also be a pair (tuple) of
450
+ (connection, read) timeouts.
451
+ :type _request_timeout: int, tuple(int, int), optional
452
+ :param _request_auth: set to override the auth_settings for an a single
453
+ request; this effectively ignores the
454
+ authentication in the spec for a single request.
455
+ :type _request_auth: dict, optional
456
+ :param _content_type: force content-type for the request.
457
+ :type _content_type: str, Optional
458
+ :param _headers: set to override the headers for a single
459
+ request; this effectively ignores the headers
460
+ in the spec for a single request.
461
+ :type _headers: dict, optional
462
+ :param _host_index: set to override the host_index for a single
463
+ request; this effectively ignores the host_index
464
+ in the spec for a single request.
465
+ :type _host_index: int, optional
466
+ :return: Returns the result object.
467
+ """ # noqa: E501
468
+
469
+ _param = self._is_sandbox_public_serialize(
470
+ sandbox_id=sandbox_id,
471
+ _request_auth=_request_auth,
472
+ _content_type=_content_type,
473
+ _headers=_headers,
474
+ _host_index=_host_index
475
+ )
476
+
477
+ _response_types_map: Dict[str, Optional[str]] = {
478
+ '200': "bool",
479
+ }
480
+ response_data = await self.api_client.call_api(
481
+ *_param,
482
+ _request_timeout=_request_timeout
483
+ )
484
+ return response_data.response
485
+
486
+
487
+ def _is_sandbox_public_serialize(
488
+ self,
489
+ sandbox_id,
490
+ _request_auth,
491
+ _content_type,
492
+ _headers,
493
+ _host_index,
494
+ ) -> RequestSerialized:
495
+
496
+ _host = None
497
+
498
+ _collection_formats: Dict[str, str] = {
499
+ }
500
+
501
+ _path_params: Dict[str, str] = {}
502
+ _query_params: List[Tuple[str, str]] = []
503
+ _header_params: Dict[str, Optional[str]] = _headers or {}
504
+ _form_params: List[Tuple[str, str]] = []
505
+ _files: Dict[
506
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
507
+ ] = {}
508
+ _body_params: Optional[bytes] = None
509
+
510
+ # process the path parameters
511
+ if sandbox_id is not None:
512
+ _path_params['sandboxId'] = sandbox_id
513
+ # process the query parameters
514
+ # process the header parameters
515
+ # process the form parameters
516
+ # process the body parameter
517
+
518
+
519
+ # set the HTTP header `Accept`
520
+ if 'Accept' not in _header_params:
521
+ _header_params['Accept'] = self.api_client.select_header_accept(
522
+ [
523
+ 'application/json'
524
+ ]
525
+ )
526
+
527
+
528
+ # authentication setting
529
+ _auth_settings: List[str] = [
530
+ ]
531
+
532
+ return self.api_client.param_serialize(
533
+ method='GET',
534
+ resource_path='/preview/{sandboxId}/public',
535
+ path_params=_path_params,
536
+ query_params=_query_params,
537
+ header_params=_header_params,
538
+ body=_body_params,
539
+ post_params=_form_params,
540
+ files=_files,
541
+ auth_settings=_auth_settings,
542
+ collection_formats=_collection_formats,
543
+ _host=_host,
544
+ _request_auth=_request_auth
545
+ )
546
+
547
+
548
+
549
+
550
+ @validate_call
551
+ async def is_valid_auth_token(
552
+ self,
553
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
554
+ auth_token: Annotated[StrictStr, Field(description="Auth token of the sandbox")],
555
+ _request_timeout: Union[
556
+ None,
557
+ Annotated[StrictFloat, Field(gt=0)],
558
+ Tuple[
559
+ Annotated[StrictFloat, Field(gt=0)],
560
+ Annotated[StrictFloat, Field(gt=0)]
561
+ ]
562
+ ] = None,
563
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
564
+ _content_type: Optional[StrictStr] = None,
565
+ _headers: Optional[Dict[StrictStr, Any]] = None,
566
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
567
+ ) -> bool:
568
+ """Check if sandbox auth token is valid
569
+
570
+
571
+ :param sandbox_id: ID of the sandbox (required)
572
+ :type sandbox_id: str
573
+ :param auth_token: Auth token of the sandbox (required)
574
+ :type auth_token: str
575
+ :param _request_timeout: timeout setting for this request. If one
576
+ number provided, it will be total request
577
+ timeout. It can also be a pair (tuple) of
578
+ (connection, read) timeouts.
579
+ :type _request_timeout: int, tuple(int, int), optional
580
+ :param _request_auth: set to override the auth_settings for an a single
581
+ request; this effectively ignores the
582
+ authentication in the spec for a single request.
583
+ :type _request_auth: dict, optional
584
+ :param _content_type: force content-type for the request.
585
+ :type _content_type: str, Optional
586
+ :param _headers: set to override the headers for a single
587
+ request; this effectively ignores the headers
588
+ in the spec for a single request.
589
+ :type _headers: dict, optional
590
+ :param _host_index: set to override the host_index for a single
591
+ request; this effectively ignores the host_index
592
+ in the spec for a single request.
593
+ :type _host_index: int, optional
594
+ :return: Returns the result object.
595
+ """ # noqa: E501
596
+
597
+ _param = self._is_valid_auth_token_serialize(
598
+ sandbox_id=sandbox_id,
599
+ auth_token=auth_token,
600
+ _request_auth=_request_auth,
601
+ _content_type=_content_type,
602
+ _headers=_headers,
603
+ _host_index=_host_index
604
+ )
605
+
606
+ _response_types_map: Dict[str, Optional[str]] = {
607
+ '200': "bool",
608
+ }
609
+ response_data = await self.api_client.call_api(
610
+ *_param,
611
+ _request_timeout=_request_timeout
612
+ )
613
+ await response_data.read()
614
+ return self.api_client.response_deserialize(
615
+ response_data=response_data,
616
+ response_types_map=_response_types_map,
617
+ ).data
618
+
619
+
620
+ @validate_call
621
+ async def is_valid_auth_token_with_http_info(
622
+ self,
623
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
624
+ auth_token: Annotated[StrictStr, Field(description="Auth token of the sandbox")],
625
+ _request_timeout: Union[
626
+ None,
627
+ Annotated[StrictFloat, Field(gt=0)],
628
+ Tuple[
629
+ Annotated[StrictFloat, Field(gt=0)],
630
+ Annotated[StrictFloat, Field(gt=0)]
631
+ ]
632
+ ] = None,
633
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
634
+ _content_type: Optional[StrictStr] = None,
635
+ _headers: Optional[Dict[StrictStr, Any]] = None,
636
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
637
+ ) -> ApiResponse[bool]:
638
+ """Check if sandbox auth token is valid
639
+
640
+
641
+ :param sandbox_id: ID of the sandbox (required)
642
+ :type sandbox_id: str
643
+ :param auth_token: Auth token of the sandbox (required)
644
+ :type auth_token: str
645
+ :param _request_timeout: timeout setting for this request. If one
646
+ number provided, it will be total request
647
+ timeout. It can also be a pair (tuple) of
648
+ (connection, read) timeouts.
649
+ :type _request_timeout: int, tuple(int, int), optional
650
+ :param _request_auth: set to override the auth_settings for an a single
651
+ request; this effectively ignores the
652
+ authentication in the spec for a single request.
653
+ :type _request_auth: dict, optional
654
+ :param _content_type: force content-type for the request.
655
+ :type _content_type: str, Optional
656
+ :param _headers: set to override the headers for a single
657
+ request; this effectively ignores the headers
658
+ in the spec for a single request.
659
+ :type _headers: dict, optional
660
+ :param _host_index: set to override the host_index for a single
661
+ request; this effectively ignores the host_index
662
+ in the spec for a single request.
663
+ :type _host_index: int, optional
664
+ :return: Returns the result object.
665
+ """ # noqa: E501
666
+
667
+ _param = self._is_valid_auth_token_serialize(
668
+ sandbox_id=sandbox_id,
669
+ auth_token=auth_token,
670
+ _request_auth=_request_auth,
671
+ _content_type=_content_type,
672
+ _headers=_headers,
673
+ _host_index=_host_index
674
+ )
675
+
676
+ _response_types_map: Dict[str, Optional[str]] = {
677
+ '200': "bool",
678
+ }
679
+ response_data = await self.api_client.call_api(
680
+ *_param,
681
+ _request_timeout=_request_timeout
682
+ )
683
+ await response_data.read()
684
+ return self.api_client.response_deserialize(
685
+ response_data=response_data,
686
+ response_types_map=_response_types_map,
687
+ )
688
+
689
+
690
+ @validate_call
691
+ async def is_valid_auth_token_without_preload_content(
692
+ self,
693
+ sandbox_id: Annotated[StrictStr, Field(description="ID of the sandbox")],
694
+ auth_token: Annotated[StrictStr, Field(description="Auth token of the sandbox")],
695
+ _request_timeout: Union[
696
+ None,
697
+ Annotated[StrictFloat, Field(gt=0)],
698
+ Tuple[
699
+ Annotated[StrictFloat, Field(gt=0)],
700
+ Annotated[StrictFloat, Field(gt=0)]
701
+ ]
702
+ ] = None,
703
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
704
+ _content_type: Optional[StrictStr] = None,
705
+ _headers: Optional[Dict[StrictStr, Any]] = None,
706
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
707
+ ) -> RESTResponseType:
708
+ """Check if sandbox auth token is valid
709
+
710
+
711
+ :param sandbox_id: ID of the sandbox (required)
712
+ :type sandbox_id: str
713
+ :param auth_token: Auth token of the sandbox (required)
714
+ :type auth_token: str
715
+ :param _request_timeout: timeout setting for this request. If one
716
+ number provided, it will be total request
717
+ timeout. It can also be a pair (tuple) of
718
+ (connection, read) timeouts.
719
+ :type _request_timeout: int, tuple(int, int), optional
720
+ :param _request_auth: set to override the auth_settings for an a single
721
+ request; this effectively ignores the
722
+ authentication in the spec for a single request.
723
+ :type _request_auth: dict, optional
724
+ :param _content_type: force content-type for the request.
725
+ :type _content_type: str, Optional
726
+ :param _headers: set to override the headers for a single
727
+ request; this effectively ignores the headers
728
+ in the spec for a single request.
729
+ :type _headers: dict, optional
730
+ :param _host_index: set to override the host_index for a single
731
+ request; this effectively ignores the host_index
732
+ in the spec for a single request.
733
+ :type _host_index: int, optional
734
+ :return: Returns the result object.
735
+ """ # noqa: E501
736
+
737
+ _param = self._is_valid_auth_token_serialize(
738
+ sandbox_id=sandbox_id,
739
+ auth_token=auth_token,
740
+ _request_auth=_request_auth,
741
+ _content_type=_content_type,
742
+ _headers=_headers,
743
+ _host_index=_host_index
744
+ )
745
+
746
+ _response_types_map: Dict[str, Optional[str]] = {
747
+ '200': "bool",
748
+ }
749
+ response_data = await self.api_client.call_api(
750
+ *_param,
751
+ _request_timeout=_request_timeout
752
+ )
753
+ return response_data.response
754
+
755
+
756
+ def _is_valid_auth_token_serialize(
757
+ self,
758
+ sandbox_id,
759
+ auth_token,
760
+ _request_auth,
761
+ _content_type,
762
+ _headers,
763
+ _host_index,
764
+ ) -> RequestSerialized:
765
+
766
+ _host = None
767
+
768
+ _collection_formats: Dict[str, str] = {
769
+ }
770
+
771
+ _path_params: Dict[str, str] = {}
772
+ _query_params: List[Tuple[str, str]] = []
773
+ _header_params: Dict[str, Optional[str]] = _headers or {}
774
+ _form_params: List[Tuple[str, str]] = []
775
+ _files: Dict[
776
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
777
+ ] = {}
778
+ _body_params: Optional[bytes] = None
779
+
780
+ # process the path parameters
781
+ if sandbox_id is not None:
782
+ _path_params['sandboxId'] = sandbox_id
783
+ if auth_token is not None:
784
+ _path_params['authToken'] = auth_token
785
+ # process the query parameters
786
+ # process the header parameters
787
+ # process the form parameters
788
+ # process the body parameter
789
+
790
+
791
+ # set the HTTP header `Accept`
792
+ if 'Accept' not in _header_params:
793
+ _header_params['Accept'] = self.api_client.select_header_accept(
794
+ [
795
+ 'application/json'
796
+ ]
797
+ )
798
+
799
+
800
+ # authentication setting
801
+ _auth_settings: List[str] = [
802
+ ]
803
+
804
+ return self.api_client.param_serialize(
805
+ method='GET',
806
+ resource_path='/preview/{sandboxId}/validate/{authToken}',
807
+ path_params=_path_params,
808
+ query_params=_query_params,
809
+ header_params=_header_params,
810
+ body=_body_params,
811
+ post_params=_form_params,
812
+ files=_files,
813
+ auth_settings=_auth_settings,
814
+ collection_formats=_collection_formats,
815
+ _host=_host,
816
+ _request_auth=_request_auth
817
+ )
818
+
819
+