daytona_api_client 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 might be problematic. Click here for more details.

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