daytona_api_client 0.26.0rc1__py3-none-any.whl → 0.27.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 might be problematic. Click here for more details.
- daytona_api_client/__init__.py +12 -1
- daytona_api_client/api/__init__.py +2 -0
- daytona_api_client/api/api_keys_api.py +282 -0
- daytona_api_client/api/default_api.py +1884 -0
- daytona_api_client/api/health_api.py +282 -0
- daytona_api_client/api/organizations_api.py +6 -6
- daytona_api_client/api/sandbox_api.py +855 -2
- daytona_api_client/api/toolbox_api.py +6 -6
- daytona_api_client/api/webhooks_api.py +1704 -0
- daytona_api_client/models/__init__.py +10 -1
- daytona_api_client/models/api_key_list.py +4 -2
- daytona_api_client/models/create_audit_log.py +2 -2
- daytona_api_client/models/health_controller_check200_response.py +154 -0
- daytona_api_client/models/health_controller_check200_response_info_value.py +101 -0
- daytona_api_client/models/health_controller_check503_response.py +154 -0
- daytona_api_client/models/{usage_overview.py → organization_usage_overview.py} +14 -8
- daytona_api_client/models/sandbox_created_post_request.py +110 -0
- daytona_api_client/models/sandbox_created_post_request_data.py +152 -0
- daytona_api_client/models/sandbox_state_updated_post_request.py +110 -0
- daytona_api_client/models/sandbox_state_updated_post_request_data.py +129 -0
- daytona_api_client/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
- daytona_api_client/models/send_webhook_dto.py +105 -0
- daytona_api_client/models/session_command_logs_response.py +103 -0
- daytona_api_client/models/session_execute_response.py +1 -1
- daytona_api_client/models/snapshot_created_post_request.py +110 -0
- daytona_api_client/models/snapshot_created_post_request_data.py +136 -0
- daytona_api_client/models/snapshot_removed_post_request.py +106 -0
- daytona_api_client/models/snapshot_state_updated_post_request.py +110 -0
- daytona_api_client/models/snapshot_state_updated_post_request_data.py +129 -0
- daytona_api_client/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
- daytona_api_client/models/ssh_access_dto.py +112 -0
- daytona_api_client/models/ssh_access_validation_dto.py +107 -0
- daytona_api_client/models/volume_created_post_request.py +110 -0
- daytona_api_client/models/volume_created_post_request_data.py +126 -0
- daytona_api_client/models/volume_state_updated_post_request.py +110 -0
- daytona_api_client/models/volume_state_updated_post_request_data.py +129 -0
- daytona_api_client/models/volume_state_updated_post_request_data_volume.py +115 -0
- daytona_api_client/models/webhook_app_portal_access.py +101 -0
- daytona_api_client/models/webhook_controller_get_app_portal_access200_response.py +101 -0
- daytona_api_client/models/webhook_controller_get_initialization_status200_response.py +118 -0
- daytona_api_client/models/{toggle_state.py → webhook_controller_get_status200_response.py} +7 -7
- daytona_api_client/models/webhook_initialization_status.py +121 -0
- {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/METADATA +1 -1
- {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/RECORD +47 -17
- {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/WHEEL +0 -0
- {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/licenses/LICENSE +0 -0
- {daytona_api_client-0.26.0rc1.dist-info → daytona_api_client-0.27.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1704 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from daytona_api_client.models.send_webhook_dto import SendWebhookDto
|
|
24
|
+
from daytona_api_client.models.webhook_app_portal_access import WebhookAppPortalAccess
|
|
25
|
+
from daytona_api_client.models.webhook_controller_get_status200_response import WebhookControllerGetStatus200Response
|
|
26
|
+
from daytona_api_client.models.webhook_initialization_status import WebhookInitializationStatus
|
|
27
|
+
|
|
28
|
+
from daytona_api_client.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from daytona_api_client.api_response import ApiResponse
|
|
30
|
+
from daytona_api_client.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class WebhooksApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
def webhook_controller_get_app_portal_access(
|
|
48
|
+
self,
|
|
49
|
+
organization_id: StrictStr,
|
|
50
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> WebhookAppPortalAccess:
|
|
64
|
+
"""Get Svix Consumer App Portal access URL for an organization
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
:param organization_id: (required)
|
|
68
|
+
:type organization_id: str
|
|
69
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
70
|
+
:type x_daytona_organization_id: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._webhook_controller_get_app_portal_access_serialize(
|
|
94
|
+
organization_id=organization_id,
|
|
95
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'200': "WebhookAppPortalAccess",
|
|
104
|
+
}
|
|
105
|
+
response_data = self.api_client.call_api(
|
|
106
|
+
*_param,
|
|
107
|
+
_request_timeout=_request_timeout
|
|
108
|
+
)
|
|
109
|
+
response_data.read()
|
|
110
|
+
return self.api_client.response_deserialize(
|
|
111
|
+
response_data=response_data,
|
|
112
|
+
response_types_map=_response_types_map,
|
|
113
|
+
).data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@validate_call
|
|
117
|
+
def webhook_controller_get_app_portal_access_with_http_info(
|
|
118
|
+
self,
|
|
119
|
+
organization_id: StrictStr,
|
|
120
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[WebhookAppPortalAccess]:
|
|
134
|
+
"""Get Svix Consumer App Portal access URL for an organization
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param organization_id: (required)
|
|
138
|
+
:type organization_id: str
|
|
139
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
140
|
+
:type x_daytona_organization_id: str
|
|
141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
142
|
+
number provided, it will be total request
|
|
143
|
+
timeout. It can also be a pair (tuple) of
|
|
144
|
+
(connection, read) timeouts.
|
|
145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
147
|
+
request; this effectively ignores the
|
|
148
|
+
authentication in the spec for a single request.
|
|
149
|
+
:type _request_auth: dict, optional
|
|
150
|
+
:param _content_type: force content-type for the request.
|
|
151
|
+
:type _content_type: str, Optional
|
|
152
|
+
:param _headers: set to override the headers for a single
|
|
153
|
+
request; this effectively ignores the headers
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _headers: dict, optional
|
|
156
|
+
:param _host_index: set to override the host_index for a single
|
|
157
|
+
request; this effectively ignores the host_index
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _host_index: int, optional
|
|
160
|
+
:return: Returns the result object.
|
|
161
|
+
""" # noqa: E501
|
|
162
|
+
|
|
163
|
+
_param = self._webhook_controller_get_app_portal_access_serialize(
|
|
164
|
+
organization_id=organization_id,
|
|
165
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
166
|
+
_request_auth=_request_auth,
|
|
167
|
+
_content_type=_content_type,
|
|
168
|
+
_headers=_headers,
|
|
169
|
+
_host_index=_host_index
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
173
|
+
'200': "WebhookAppPortalAccess",
|
|
174
|
+
}
|
|
175
|
+
response_data = self.api_client.call_api(
|
|
176
|
+
*_param,
|
|
177
|
+
_request_timeout=_request_timeout
|
|
178
|
+
)
|
|
179
|
+
response_data.read()
|
|
180
|
+
return self.api_client.response_deserialize(
|
|
181
|
+
response_data=response_data,
|
|
182
|
+
response_types_map=_response_types_map,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@validate_call
|
|
187
|
+
def webhook_controller_get_app_portal_access_without_preload_content(
|
|
188
|
+
self,
|
|
189
|
+
organization_id: StrictStr,
|
|
190
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
191
|
+
_request_timeout: Union[
|
|
192
|
+
None,
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Tuple[
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
197
|
+
]
|
|
198
|
+
] = None,
|
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
|
+
) -> RESTResponseType:
|
|
204
|
+
"""Get Svix Consumer App Portal access URL for an organization
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
:param organization_id: (required)
|
|
208
|
+
:type organization_id: str
|
|
209
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
210
|
+
:type x_daytona_organization_id: str
|
|
211
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
212
|
+
number provided, it will be total request
|
|
213
|
+
timeout. It can also be a pair (tuple) of
|
|
214
|
+
(connection, read) timeouts.
|
|
215
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
216
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
217
|
+
request; this effectively ignores the
|
|
218
|
+
authentication in the spec for a single request.
|
|
219
|
+
:type _request_auth: dict, optional
|
|
220
|
+
:param _content_type: force content-type for the request.
|
|
221
|
+
:type _content_type: str, Optional
|
|
222
|
+
:param _headers: set to override the headers for a single
|
|
223
|
+
request; this effectively ignores the headers
|
|
224
|
+
in the spec for a single request.
|
|
225
|
+
:type _headers: dict, optional
|
|
226
|
+
:param _host_index: set to override the host_index for a single
|
|
227
|
+
request; this effectively ignores the host_index
|
|
228
|
+
in the spec for a single request.
|
|
229
|
+
:type _host_index: int, optional
|
|
230
|
+
:return: Returns the result object.
|
|
231
|
+
""" # noqa: E501
|
|
232
|
+
|
|
233
|
+
_param = self._webhook_controller_get_app_portal_access_serialize(
|
|
234
|
+
organization_id=organization_id,
|
|
235
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
236
|
+
_request_auth=_request_auth,
|
|
237
|
+
_content_type=_content_type,
|
|
238
|
+
_headers=_headers,
|
|
239
|
+
_host_index=_host_index
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
243
|
+
'200': "WebhookAppPortalAccess",
|
|
244
|
+
}
|
|
245
|
+
response_data = self.api_client.call_api(
|
|
246
|
+
*_param,
|
|
247
|
+
_request_timeout=_request_timeout
|
|
248
|
+
)
|
|
249
|
+
return response_data.response
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _webhook_controller_get_app_portal_access_serialize(
|
|
253
|
+
self,
|
|
254
|
+
organization_id,
|
|
255
|
+
x_daytona_organization_id,
|
|
256
|
+
_request_auth,
|
|
257
|
+
_content_type,
|
|
258
|
+
_headers,
|
|
259
|
+
_host_index,
|
|
260
|
+
) -> RequestSerialized:
|
|
261
|
+
|
|
262
|
+
_host = None
|
|
263
|
+
|
|
264
|
+
_collection_formats: Dict[str, str] = {
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
_path_params: Dict[str, str] = {}
|
|
268
|
+
_query_params: List[Tuple[str, str]] = []
|
|
269
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
270
|
+
_form_params: List[Tuple[str, str]] = []
|
|
271
|
+
_files: Dict[
|
|
272
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
273
|
+
] = {}
|
|
274
|
+
_body_params: Optional[bytes] = None
|
|
275
|
+
|
|
276
|
+
# process the path parameters
|
|
277
|
+
if organization_id is not None:
|
|
278
|
+
_path_params['organizationId'] = organization_id
|
|
279
|
+
# process the query parameters
|
|
280
|
+
# process the header parameters
|
|
281
|
+
if x_daytona_organization_id is not None:
|
|
282
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
283
|
+
# process the form parameters
|
|
284
|
+
# process the body parameter
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
# set the HTTP header `Accept`
|
|
288
|
+
if 'Accept' not in _header_params:
|
|
289
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
290
|
+
[
|
|
291
|
+
'application/json'
|
|
292
|
+
]
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
# authentication setting
|
|
297
|
+
_auth_settings: List[str] = [
|
|
298
|
+
'bearer'
|
|
299
|
+
]
|
|
300
|
+
|
|
301
|
+
return self.api_client.param_serialize(
|
|
302
|
+
method='POST',
|
|
303
|
+
resource_path='/webhooks/organizations/{organizationId}/app-portal-access',
|
|
304
|
+
path_params=_path_params,
|
|
305
|
+
query_params=_query_params,
|
|
306
|
+
header_params=_header_params,
|
|
307
|
+
body=_body_params,
|
|
308
|
+
post_params=_form_params,
|
|
309
|
+
files=_files,
|
|
310
|
+
auth_settings=_auth_settings,
|
|
311
|
+
collection_formats=_collection_formats,
|
|
312
|
+
_host=_host,
|
|
313
|
+
_request_auth=_request_auth
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
@validate_call
|
|
320
|
+
def webhook_controller_get_initialization_status(
|
|
321
|
+
self,
|
|
322
|
+
organization_id: StrictStr,
|
|
323
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
324
|
+
_request_timeout: Union[
|
|
325
|
+
None,
|
|
326
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
327
|
+
Tuple[
|
|
328
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
329
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
330
|
+
]
|
|
331
|
+
] = None,
|
|
332
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
333
|
+
_content_type: Optional[StrictStr] = None,
|
|
334
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
335
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
336
|
+
) -> WebhookInitializationStatus:
|
|
337
|
+
"""Get webhook initialization status for an organization
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
:param organization_id: (required)
|
|
341
|
+
:type organization_id: str
|
|
342
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
343
|
+
:type x_daytona_organization_id: str
|
|
344
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
345
|
+
number provided, it will be total request
|
|
346
|
+
timeout. It can also be a pair (tuple) of
|
|
347
|
+
(connection, read) timeouts.
|
|
348
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
349
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
350
|
+
request; this effectively ignores the
|
|
351
|
+
authentication in the spec for a single request.
|
|
352
|
+
:type _request_auth: dict, optional
|
|
353
|
+
:param _content_type: force content-type for the request.
|
|
354
|
+
:type _content_type: str, Optional
|
|
355
|
+
:param _headers: set to override the headers for a single
|
|
356
|
+
request; this effectively ignores the headers
|
|
357
|
+
in the spec for a single request.
|
|
358
|
+
:type _headers: dict, optional
|
|
359
|
+
:param _host_index: set to override the host_index for a single
|
|
360
|
+
request; this effectively ignores the host_index
|
|
361
|
+
in the spec for a single request.
|
|
362
|
+
:type _host_index: int, optional
|
|
363
|
+
:return: Returns the result object.
|
|
364
|
+
""" # noqa: E501
|
|
365
|
+
|
|
366
|
+
_param = self._webhook_controller_get_initialization_status_serialize(
|
|
367
|
+
organization_id=organization_id,
|
|
368
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
369
|
+
_request_auth=_request_auth,
|
|
370
|
+
_content_type=_content_type,
|
|
371
|
+
_headers=_headers,
|
|
372
|
+
_host_index=_host_index
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
376
|
+
'200': "WebhookInitializationStatus",
|
|
377
|
+
'404': None,
|
|
378
|
+
}
|
|
379
|
+
response_data = self.api_client.call_api(
|
|
380
|
+
*_param,
|
|
381
|
+
_request_timeout=_request_timeout
|
|
382
|
+
)
|
|
383
|
+
response_data.read()
|
|
384
|
+
return self.api_client.response_deserialize(
|
|
385
|
+
response_data=response_data,
|
|
386
|
+
response_types_map=_response_types_map,
|
|
387
|
+
).data
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
@validate_call
|
|
391
|
+
def webhook_controller_get_initialization_status_with_http_info(
|
|
392
|
+
self,
|
|
393
|
+
organization_id: StrictStr,
|
|
394
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
395
|
+
_request_timeout: Union[
|
|
396
|
+
None,
|
|
397
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
398
|
+
Tuple[
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
401
|
+
]
|
|
402
|
+
] = None,
|
|
403
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
404
|
+
_content_type: Optional[StrictStr] = None,
|
|
405
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
406
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
407
|
+
) -> ApiResponse[WebhookInitializationStatus]:
|
|
408
|
+
"""Get webhook initialization status for an organization
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
:param organization_id: (required)
|
|
412
|
+
:type organization_id: str
|
|
413
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
414
|
+
:type x_daytona_organization_id: str
|
|
415
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
416
|
+
number provided, it will be total request
|
|
417
|
+
timeout. It can also be a pair (tuple) of
|
|
418
|
+
(connection, read) timeouts.
|
|
419
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
420
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
421
|
+
request; this effectively ignores the
|
|
422
|
+
authentication in the spec for a single request.
|
|
423
|
+
:type _request_auth: dict, optional
|
|
424
|
+
:param _content_type: force content-type for the request.
|
|
425
|
+
:type _content_type: str, Optional
|
|
426
|
+
:param _headers: set to override the headers for a single
|
|
427
|
+
request; this effectively ignores the headers
|
|
428
|
+
in the spec for a single request.
|
|
429
|
+
:type _headers: dict, optional
|
|
430
|
+
:param _host_index: set to override the host_index for a single
|
|
431
|
+
request; this effectively ignores the host_index
|
|
432
|
+
in the spec for a single request.
|
|
433
|
+
:type _host_index: int, optional
|
|
434
|
+
:return: Returns the result object.
|
|
435
|
+
""" # noqa: E501
|
|
436
|
+
|
|
437
|
+
_param = self._webhook_controller_get_initialization_status_serialize(
|
|
438
|
+
organization_id=organization_id,
|
|
439
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
440
|
+
_request_auth=_request_auth,
|
|
441
|
+
_content_type=_content_type,
|
|
442
|
+
_headers=_headers,
|
|
443
|
+
_host_index=_host_index
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
447
|
+
'200': "WebhookInitializationStatus",
|
|
448
|
+
'404': None,
|
|
449
|
+
}
|
|
450
|
+
response_data = self.api_client.call_api(
|
|
451
|
+
*_param,
|
|
452
|
+
_request_timeout=_request_timeout
|
|
453
|
+
)
|
|
454
|
+
response_data.read()
|
|
455
|
+
return self.api_client.response_deserialize(
|
|
456
|
+
response_data=response_data,
|
|
457
|
+
response_types_map=_response_types_map,
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
@validate_call
|
|
462
|
+
def webhook_controller_get_initialization_status_without_preload_content(
|
|
463
|
+
self,
|
|
464
|
+
organization_id: StrictStr,
|
|
465
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
466
|
+
_request_timeout: Union[
|
|
467
|
+
None,
|
|
468
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
469
|
+
Tuple[
|
|
470
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
471
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
472
|
+
]
|
|
473
|
+
] = None,
|
|
474
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
475
|
+
_content_type: Optional[StrictStr] = None,
|
|
476
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
477
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
478
|
+
) -> RESTResponseType:
|
|
479
|
+
"""Get webhook initialization status for an organization
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
:param organization_id: (required)
|
|
483
|
+
:type organization_id: str
|
|
484
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
485
|
+
:type x_daytona_organization_id: str
|
|
486
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
487
|
+
number provided, it will be total request
|
|
488
|
+
timeout. It can also be a pair (tuple) of
|
|
489
|
+
(connection, read) timeouts.
|
|
490
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
491
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
492
|
+
request; this effectively ignores the
|
|
493
|
+
authentication in the spec for a single request.
|
|
494
|
+
:type _request_auth: dict, optional
|
|
495
|
+
:param _content_type: force content-type for the request.
|
|
496
|
+
:type _content_type: str, Optional
|
|
497
|
+
:param _headers: set to override the headers for a single
|
|
498
|
+
request; this effectively ignores the headers
|
|
499
|
+
in the spec for a single request.
|
|
500
|
+
:type _headers: dict, optional
|
|
501
|
+
:param _host_index: set to override the host_index for a single
|
|
502
|
+
request; this effectively ignores the host_index
|
|
503
|
+
in the spec for a single request.
|
|
504
|
+
:type _host_index: int, optional
|
|
505
|
+
:return: Returns the result object.
|
|
506
|
+
""" # noqa: E501
|
|
507
|
+
|
|
508
|
+
_param = self._webhook_controller_get_initialization_status_serialize(
|
|
509
|
+
organization_id=organization_id,
|
|
510
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
511
|
+
_request_auth=_request_auth,
|
|
512
|
+
_content_type=_content_type,
|
|
513
|
+
_headers=_headers,
|
|
514
|
+
_host_index=_host_index
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
518
|
+
'200': "WebhookInitializationStatus",
|
|
519
|
+
'404': None,
|
|
520
|
+
}
|
|
521
|
+
response_data = self.api_client.call_api(
|
|
522
|
+
*_param,
|
|
523
|
+
_request_timeout=_request_timeout
|
|
524
|
+
)
|
|
525
|
+
return response_data.response
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
def _webhook_controller_get_initialization_status_serialize(
|
|
529
|
+
self,
|
|
530
|
+
organization_id,
|
|
531
|
+
x_daytona_organization_id,
|
|
532
|
+
_request_auth,
|
|
533
|
+
_content_type,
|
|
534
|
+
_headers,
|
|
535
|
+
_host_index,
|
|
536
|
+
) -> RequestSerialized:
|
|
537
|
+
|
|
538
|
+
_host = None
|
|
539
|
+
|
|
540
|
+
_collection_formats: Dict[str, str] = {
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
_path_params: Dict[str, str] = {}
|
|
544
|
+
_query_params: List[Tuple[str, str]] = []
|
|
545
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
546
|
+
_form_params: List[Tuple[str, str]] = []
|
|
547
|
+
_files: Dict[
|
|
548
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
549
|
+
] = {}
|
|
550
|
+
_body_params: Optional[bytes] = None
|
|
551
|
+
|
|
552
|
+
# process the path parameters
|
|
553
|
+
if organization_id is not None:
|
|
554
|
+
_path_params['organizationId'] = organization_id
|
|
555
|
+
# process the query parameters
|
|
556
|
+
# process the header parameters
|
|
557
|
+
if x_daytona_organization_id is not None:
|
|
558
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
559
|
+
# process the form parameters
|
|
560
|
+
# process the body parameter
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
# set the HTTP header `Accept`
|
|
564
|
+
if 'Accept' not in _header_params:
|
|
565
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
566
|
+
[
|
|
567
|
+
'application/json'
|
|
568
|
+
]
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
# authentication setting
|
|
573
|
+
_auth_settings: List[str] = [
|
|
574
|
+
'bearer'
|
|
575
|
+
]
|
|
576
|
+
|
|
577
|
+
return self.api_client.param_serialize(
|
|
578
|
+
method='GET',
|
|
579
|
+
resource_path='/webhooks/organizations/{organizationId}/initialization-status',
|
|
580
|
+
path_params=_path_params,
|
|
581
|
+
query_params=_query_params,
|
|
582
|
+
header_params=_header_params,
|
|
583
|
+
body=_body_params,
|
|
584
|
+
post_params=_form_params,
|
|
585
|
+
files=_files,
|
|
586
|
+
auth_settings=_auth_settings,
|
|
587
|
+
collection_formats=_collection_formats,
|
|
588
|
+
_host=_host,
|
|
589
|
+
_request_auth=_request_auth
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
@validate_call
|
|
596
|
+
def webhook_controller_get_message_attempts(
|
|
597
|
+
self,
|
|
598
|
+
organization_id: StrictStr,
|
|
599
|
+
message_id: StrictStr,
|
|
600
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
601
|
+
_request_timeout: Union[
|
|
602
|
+
None,
|
|
603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
604
|
+
Tuple[
|
|
605
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
606
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
607
|
+
]
|
|
608
|
+
] = None,
|
|
609
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
610
|
+
_content_type: Optional[StrictStr] = None,
|
|
611
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
612
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
613
|
+
) -> List[object]:
|
|
614
|
+
"""Get delivery attempts for a webhook message
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
:param organization_id: (required)
|
|
618
|
+
:type organization_id: str
|
|
619
|
+
:param message_id: (required)
|
|
620
|
+
:type message_id: str
|
|
621
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
622
|
+
:type x_daytona_organization_id: str
|
|
623
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
624
|
+
number provided, it will be total request
|
|
625
|
+
timeout. It can also be a pair (tuple) of
|
|
626
|
+
(connection, read) timeouts.
|
|
627
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
628
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
629
|
+
request; this effectively ignores the
|
|
630
|
+
authentication in the spec for a single request.
|
|
631
|
+
:type _request_auth: dict, optional
|
|
632
|
+
:param _content_type: force content-type for the request.
|
|
633
|
+
:type _content_type: str, Optional
|
|
634
|
+
:param _headers: set to override the headers for a single
|
|
635
|
+
request; this effectively ignores the headers
|
|
636
|
+
in the spec for a single request.
|
|
637
|
+
:type _headers: dict, optional
|
|
638
|
+
:param _host_index: set to override the host_index for a single
|
|
639
|
+
request; this effectively ignores the host_index
|
|
640
|
+
in the spec for a single request.
|
|
641
|
+
:type _host_index: int, optional
|
|
642
|
+
:return: Returns the result object.
|
|
643
|
+
""" # noqa: E501
|
|
644
|
+
|
|
645
|
+
_param = self._webhook_controller_get_message_attempts_serialize(
|
|
646
|
+
organization_id=organization_id,
|
|
647
|
+
message_id=message_id,
|
|
648
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
649
|
+
_request_auth=_request_auth,
|
|
650
|
+
_content_type=_content_type,
|
|
651
|
+
_headers=_headers,
|
|
652
|
+
_host_index=_host_index
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
656
|
+
'200': "List[object]",
|
|
657
|
+
}
|
|
658
|
+
response_data = self.api_client.call_api(
|
|
659
|
+
*_param,
|
|
660
|
+
_request_timeout=_request_timeout
|
|
661
|
+
)
|
|
662
|
+
response_data.read()
|
|
663
|
+
return self.api_client.response_deserialize(
|
|
664
|
+
response_data=response_data,
|
|
665
|
+
response_types_map=_response_types_map,
|
|
666
|
+
).data
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
@validate_call
|
|
670
|
+
def webhook_controller_get_message_attempts_with_http_info(
|
|
671
|
+
self,
|
|
672
|
+
organization_id: StrictStr,
|
|
673
|
+
message_id: StrictStr,
|
|
674
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
675
|
+
_request_timeout: Union[
|
|
676
|
+
None,
|
|
677
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
678
|
+
Tuple[
|
|
679
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
680
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
681
|
+
]
|
|
682
|
+
] = None,
|
|
683
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
684
|
+
_content_type: Optional[StrictStr] = None,
|
|
685
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
686
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
687
|
+
) -> ApiResponse[List[object]]:
|
|
688
|
+
"""Get delivery attempts for a webhook message
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
:param organization_id: (required)
|
|
692
|
+
:type organization_id: str
|
|
693
|
+
:param message_id: (required)
|
|
694
|
+
:type message_id: str
|
|
695
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
696
|
+
:type x_daytona_organization_id: str
|
|
697
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
698
|
+
number provided, it will be total request
|
|
699
|
+
timeout. It can also be a pair (tuple) of
|
|
700
|
+
(connection, read) timeouts.
|
|
701
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
702
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
703
|
+
request; this effectively ignores the
|
|
704
|
+
authentication in the spec for a single request.
|
|
705
|
+
:type _request_auth: dict, optional
|
|
706
|
+
:param _content_type: force content-type for the request.
|
|
707
|
+
:type _content_type: str, Optional
|
|
708
|
+
:param _headers: set to override the headers for a single
|
|
709
|
+
request; this effectively ignores the headers
|
|
710
|
+
in the spec for a single request.
|
|
711
|
+
:type _headers: dict, optional
|
|
712
|
+
:param _host_index: set to override the host_index for a single
|
|
713
|
+
request; this effectively ignores the host_index
|
|
714
|
+
in the spec for a single request.
|
|
715
|
+
:type _host_index: int, optional
|
|
716
|
+
:return: Returns the result object.
|
|
717
|
+
""" # noqa: E501
|
|
718
|
+
|
|
719
|
+
_param = self._webhook_controller_get_message_attempts_serialize(
|
|
720
|
+
organization_id=organization_id,
|
|
721
|
+
message_id=message_id,
|
|
722
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
723
|
+
_request_auth=_request_auth,
|
|
724
|
+
_content_type=_content_type,
|
|
725
|
+
_headers=_headers,
|
|
726
|
+
_host_index=_host_index
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
730
|
+
'200': "List[object]",
|
|
731
|
+
}
|
|
732
|
+
response_data = self.api_client.call_api(
|
|
733
|
+
*_param,
|
|
734
|
+
_request_timeout=_request_timeout
|
|
735
|
+
)
|
|
736
|
+
response_data.read()
|
|
737
|
+
return self.api_client.response_deserialize(
|
|
738
|
+
response_data=response_data,
|
|
739
|
+
response_types_map=_response_types_map,
|
|
740
|
+
)
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
@validate_call
|
|
744
|
+
def webhook_controller_get_message_attempts_without_preload_content(
|
|
745
|
+
self,
|
|
746
|
+
organization_id: StrictStr,
|
|
747
|
+
message_id: StrictStr,
|
|
748
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
749
|
+
_request_timeout: Union[
|
|
750
|
+
None,
|
|
751
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
752
|
+
Tuple[
|
|
753
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
754
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
755
|
+
]
|
|
756
|
+
] = None,
|
|
757
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
758
|
+
_content_type: Optional[StrictStr] = None,
|
|
759
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
760
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
761
|
+
) -> RESTResponseType:
|
|
762
|
+
"""Get delivery attempts for a webhook message
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
:param organization_id: (required)
|
|
766
|
+
:type organization_id: str
|
|
767
|
+
:param message_id: (required)
|
|
768
|
+
:type message_id: str
|
|
769
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
770
|
+
:type x_daytona_organization_id: str
|
|
771
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
772
|
+
number provided, it will be total request
|
|
773
|
+
timeout. It can also be a pair (tuple) of
|
|
774
|
+
(connection, read) timeouts.
|
|
775
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
776
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
777
|
+
request; this effectively ignores the
|
|
778
|
+
authentication in the spec for a single request.
|
|
779
|
+
:type _request_auth: dict, optional
|
|
780
|
+
:param _content_type: force content-type for the request.
|
|
781
|
+
:type _content_type: str, Optional
|
|
782
|
+
:param _headers: set to override the headers for a single
|
|
783
|
+
request; this effectively ignores the headers
|
|
784
|
+
in the spec for a single request.
|
|
785
|
+
:type _headers: dict, optional
|
|
786
|
+
:param _host_index: set to override the host_index for a single
|
|
787
|
+
request; this effectively ignores the host_index
|
|
788
|
+
in the spec for a single request.
|
|
789
|
+
:type _host_index: int, optional
|
|
790
|
+
:return: Returns the result object.
|
|
791
|
+
""" # noqa: E501
|
|
792
|
+
|
|
793
|
+
_param = self._webhook_controller_get_message_attempts_serialize(
|
|
794
|
+
organization_id=organization_id,
|
|
795
|
+
message_id=message_id,
|
|
796
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
797
|
+
_request_auth=_request_auth,
|
|
798
|
+
_content_type=_content_type,
|
|
799
|
+
_headers=_headers,
|
|
800
|
+
_host_index=_host_index
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
804
|
+
'200': "List[object]",
|
|
805
|
+
}
|
|
806
|
+
response_data = self.api_client.call_api(
|
|
807
|
+
*_param,
|
|
808
|
+
_request_timeout=_request_timeout
|
|
809
|
+
)
|
|
810
|
+
return response_data.response
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
def _webhook_controller_get_message_attempts_serialize(
|
|
814
|
+
self,
|
|
815
|
+
organization_id,
|
|
816
|
+
message_id,
|
|
817
|
+
x_daytona_organization_id,
|
|
818
|
+
_request_auth,
|
|
819
|
+
_content_type,
|
|
820
|
+
_headers,
|
|
821
|
+
_host_index,
|
|
822
|
+
) -> RequestSerialized:
|
|
823
|
+
|
|
824
|
+
_host = None
|
|
825
|
+
|
|
826
|
+
_collection_formats: Dict[str, str] = {
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
_path_params: Dict[str, str] = {}
|
|
830
|
+
_query_params: List[Tuple[str, str]] = []
|
|
831
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
832
|
+
_form_params: List[Tuple[str, str]] = []
|
|
833
|
+
_files: Dict[
|
|
834
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
835
|
+
] = {}
|
|
836
|
+
_body_params: Optional[bytes] = None
|
|
837
|
+
|
|
838
|
+
# process the path parameters
|
|
839
|
+
if organization_id is not None:
|
|
840
|
+
_path_params['organizationId'] = organization_id
|
|
841
|
+
if message_id is not None:
|
|
842
|
+
_path_params['messageId'] = message_id
|
|
843
|
+
# process the query parameters
|
|
844
|
+
# process the header parameters
|
|
845
|
+
if x_daytona_organization_id is not None:
|
|
846
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
847
|
+
# process the form parameters
|
|
848
|
+
# process the body parameter
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
# set the HTTP header `Accept`
|
|
852
|
+
if 'Accept' not in _header_params:
|
|
853
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
854
|
+
[
|
|
855
|
+
'application/json'
|
|
856
|
+
]
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
# authentication setting
|
|
861
|
+
_auth_settings: List[str] = [
|
|
862
|
+
'bearer'
|
|
863
|
+
]
|
|
864
|
+
|
|
865
|
+
return self.api_client.param_serialize(
|
|
866
|
+
method='GET',
|
|
867
|
+
resource_path='/webhooks/organizations/{organizationId}/messages/{messageId}/attempts',
|
|
868
|
+
path_params=_path_params,
|
|
869
|
+
query_params=_query_params,
|
|
870
|
+
header_params=_header_params,
|
|
871
|
+
body=_body_params,
|
|
872
|
+
post_params=_form_params,
|
|
873
|
+
files=_files,
|
|
874
|
+
auth_settings=_auth_settings,
|
|
875
|
+
collection_formats=_collection_formats,
|
|
876
|
+
_host=_host,
|
|
877
|
+
_request_auth=_request_auth
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
@validate_call
|
|
884
|
+
def webhook_controller_get_status(
|
|
885
|
+
self,
|
|
886
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
887
|
+
_request_timeout: Union[
|
|
888
|
+
None,
|
|
889
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
890
|
+
Tuple[
|
|
891
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
892
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
893
|
+
]
|
|
894
|
+
] = None,
|
|
895
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
896
|
+
_content_type: Optional[StrictStr] = None,
|
|
897
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
898
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
899
|
+
) -> WebhookControllerGetStatus200Response:
|
|
900
|
+
"""Get webhook service status
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
904
|
+
:type x_daytona_organization_id: str
|
|
905
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
906
|
+
number provided, it will be total request
|
|
907
|
+
timeout. It can also be a pair (tuple) of
|
|
908
|
+
(connection, read) timeouts.
|
|
909
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
910
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
911
|
+
request; this effectively ignores the
|
|
912
|
+
authentication in the spec for a single request.
|
|
913
|
+
:type _request_auth: dict, optional
|
|
914
|
+
:param _content_type: force content-type for the request.
|
|
915
|
+
:type _content_type: str, Optional
|
|
916
|
+
:param _headers: set to override the headers for a single
|
|
917
|
+
request; this effectively ignores the headers
|
|
918
|
+
in the spec for a single request.
|
|
919
|
+
:type _headers: dict, optional
|
|
920
|
+
:param _host_index: set to override the host_index for a single
|
|
921
|
+
request; this effectively ignores the host_index
|
|
922
|
+
in the spec for a single request.
|
|
923
|
+
:type _host_index: int, optional
|
|
924
|
+
:return: Returns the result object.
|
|
925
|
+
""" # noqa: E501
|
|
926
|
+
|
|
927
|
+
_param = self._webhook_controller_get_status_serialize(
|
|
928
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
929
|
+
_request_auth=_request_auth,
|
|
930
|
+
_content_type=_content_type,
|
|
931
|
+
_headers=_headers,
|
|
932
|
+
_host_index=_host_index
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
936
|
+
'200': "WebhookControllerGetStatus200Response",
|
|
937
|
+
}
|
|
938
|
+
response_data = self.api_client.call_api(
|
|
939
|
+
*_param,
|
|
940
|
+
_request_timeout=_request_timeout
|
|
941
|
+
)
|
|
942
|
+
response_data.read()
|
|
943
|
+
return self.api_client.response_deserialize(
|
|
944
|
+
response_data=response_data,
|
|
945
|
+
response_types_map=_response_types_map,
|
|
946
|
+
).data
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
@validate_call
|
|
950
|
+
def webhook_controller_get_status_with_http_info(
|
|
951
|
+
self,
|
|
952
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
953
|
+
_request_timeout: Union[
|
|
954
|
+
None,
|
|
955
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
956
|
+
Tuple[
|
|
957
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
958
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
959
|
+
]
|
|
960
|
+
] = None,
|
|
961
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
962
|
+
_content_type: Optional[StrictStr] = None,
|
|
963
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
964
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
965
|
+
) -> ApiResponse[WebhookControllerGetStatus200Response]:
|
|
966
|
+
"""Get webhook service status
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
970
|
+
:type x_daytona_organization_id: str
|
|
971
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
972
|
+
number provided, it will be total request
|
|
973
|
+
timeout. It can also be a pair (tuple) of
|
|
974
|
+
(connection, read) timeouts.
|
|
975
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
976
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
977
|
+
request; this effectively ignores the
|
|
978
|
+
authentication in the spec for a single request.
|
|
979
|
+
:type _request_auth: dict, optional
|
|
980
|
+
:param _content_type: force content-type for the request.
|
|
981
|
+
:type _content_type: str, Optional
|
|
982
|
+
:param _headers: set to override the headers for a single
|
|
983
|
+
request; this effectively ignores the headers
|
|
984
|
+
in the spec for a single request.
|
|
985
|
+
:type _headers: dict, optional
|
|
986
|
+
:param _host_index: set to override the host_index for a single
|
|
987
|
+
request; this effectively ignores the host_index
|
|
988
|
+
in the spec for a single request.
|
|
989
|
+
:type _host_index: int, optional
|
|
990
|
+
:return: Returns the result object.
|
|
991
|
+
""" # noqa: E501
|
|
992
|
+
|
|
993
|
+
_param = self._webhook_controller_get_status_serialize(
|
|
994
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
995
|
+
_request_auth=_request_auth,
|
|
996
|
+
_content_type=_content_type,
|
|
997
|
+
_headers=_headers,
|
|
998
|
+
_host_index=_host_index
|
|
999
|
+
)
|
|
1000
|
+
|
|
1001
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1002
|
+
'200': "WebhookControllerGetStatus200Response",
|
|
1003
|
+
}
|
|
1004
|
+
response_data = self.api_client.call_api(
|
|
1005
|
+
*_param,
|
|
1006
|
+
_request_timeout=_request_timeout
|
|
1007
|
+
)
|
|
1008
|
+
response_data.read()
|
|
1009
|
+
return self.api_client.response_deserialize(
|
|
1010
|
+
response_data=response_data,
|
|
1011
|
+
response_types_map=_response_types_map,
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
@validate_call
|
|
1016
|
+
def webhook_controller_get_status_without_preload_content(
|
|
1017
|
+
self,
|
|
1018
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1019
|
+
_request_timeout: Union[
|
|
1020
|
+
None,
|
|
1021
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1022
|
+
Tuple[
|
|
1023
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1024
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1025
|
+
]
|
|
1026
|
+
] = None,
|
|
1027
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1028
|
+
_content_type: Optional[StrictStr] = None,
|
|
1029
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1030
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1031
|
+
) -> RESTResponseType:
|
|
1032
|
+
"""Get webhook service status
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1036
|
+
:type x_daytona_organization_id: str
|
|
1037
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1038
|
+
number provided, it will be total request
|
|
1039
|
+
timeout. It can also be a pair (tuple) of
|
|
1040
|
+
(connection, read) timeouts.
|
|
1041
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1042
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1043
|
+
request; this effectively ignores the
|
|
1044
|
+
authentication in the spec for a single request.
|
|
1045
|
+
:type _request_auth: dict, optional
|
|
1046
|
+
:param _content_type: force content-type for the request.
|
|
1047
|
+
:type _content_type: str, Optional
|
|
1048
|
+
:param _headers: set to override the headers for a single
|
|
1049
|
+
request; this effectively ignores the headers
|
|
1050
|
+
in the spec for a single request.
|
|
1051
|
+
:type _headers: dict, optional
|
|
1052
|
+
:param _host_index: set to override the host_index for a single
|
|
1053
|
+
request; this effectively ignores the host_index
|
|
1054
|
+
in the spec for a single request.
|
|
1055
|
+
:type _host_index: int, optional
|
|
1056
|
+
:return: Returns the result object.
|
|
1057
|
+
""" # noqa: E501
|
|
1058
|
+
|
|
1059
|
+
_param = self._webhook_controller_get_status_serialize(
|
|
1060
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1061
|
+
_request_auth=_request_auth,
|
|
1062
|
+
_content_type=_content_type,
|
|
1063
|
+
_headers=_headers,
|
|
1064
|
+
_host_index=_host_index
|
|
1065
|
+
)
|
|
1066
|
+
|
|
1067
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1068
|
+
'200': "WebhookControllerGetStatus200Response",
|
|
1069
|
+
}
|
|
1070
|
+
response_data = self.api_client.call_api(
|
|
1071
|
+
*_param,
|
|
1072
|
+
_request_timeout=_request_timeout
|
|
1073
|
+
)
|
|
1074
|
+
return response_data.response
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
def _webhook_controller_get_status_serialize(
|
|
1078
|
+
self,
|
|
1079
|
+
x_daytona_organization_id,
|
|
1080
|
+
_request_auth,
|
|
1081
|
+
_content_type,
|
|
1082
|
+
_headers,
|
|
1083
|
+
_host_index,
|
|
1084
|
+
) -> RequestSerialized:
|
|
1085
|
+
|
|
1086
|
+
_host = None
|
|
1087
|
+
|
|
1088
|
+
_collection_formats: Dict[str, str] = {
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
_path_params: Dict[str, str] = {}
|
|
1092
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1093
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1094
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1095
|
+
_files: Dict[
|
|
1096
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1097
|
+
] = {}
|
|
1098
|
+
_body_params: Optional[bytes] = None
|
|
1099
|
+
|
|
1100
|
+
# process the path parameters
|
|
1101
|
+
# process the query parameters
|
|
1102
|
+
# process the header parameters
|
|
1103
|
+
if x_daytona_organization_id is not None:
|
|
1104
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1105
|
+
# process the form parameters
|
|
1106
|
+
# process the body parameter
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
# set the HTTP header `Accept`
|
|
1110
|
+
if 'Accept' not in _header_params:
|
|
1111
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1112
|
+
[
|
|
1113
|
+
'application/json'
|
|
1114
|
+
]
|
|
1115
|
+
)
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
# authentication setting
|
|
1119
|
+
_auth_settings: List[str] = [
|
|
1120
|
+
'bearer'
|
|
1121
|
+
]
|
|
1122
|
+
|
|
1123
|
+
return self.api_client.param_serialize(
|
|
1124
|
+
method='GET',
|
|
1125
|
+
resource_path='/webhooks/status',
|
|
1126
|
+
path_params=_path_params,
|
|
1127
|
+
query_params=_query_params,
|
|
1128
|
+
header_params=_header_params,
|
|
1129
|
+
body=_body_params,
|
|
1130
|
+
post_params=_form_params,
|
|
1131
|
+
files=_files,
|
|
1132
|
+
auth_settings=_auth_settings,
|
|
1133
|
+
collection_formats=_collection_formats,
|
|
1134
|
+
_host=_host,
|
|
1135
|
+
_request_auth=_request_auth
|
|
1136
|
+
)
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
@validate_call
|
|
1142
|
+
def webhook_controller_initialize_webhooks(
|
|
1143
|
+
self,
|
|
1144
|
+
organization_id: StrictStr,
|
|
1145
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1146
|
+
_request_timeout: Union[
|
|
1147
|
+
None,
|
|
1148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1149
|
+
Tuple[
|
|
1150
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1151
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1152
|
+
]
|
|
1153
|
+
] = None,
|
|
1154
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1155
|
+
_content_type: Optional[StrictStr] = None,
|
|
1156
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1157
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1158
|
+
) -> None:
|
|
1159
|
+
"""Initialize webhooks for an organization
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
:param organization_id: (required)
|
|
1163
|
+
:type organization_id: str
|
|
1164
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1165
|
+
:type x_daytona_organization_id: str
|
|
1166
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1167
|
+
number provided, it will be total request
|
|
1168
|
+
timeout. It can also be a pair (tuple) of
|
|
1169
|
+
(connection, read) timeouts.
|
|
1170
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1171
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1172
|
+
request; this effectively ignores the
|
|
1173
|
+
authentication in the spec for a single request.
|
|
1174
|
+
:type _request_auth: dict, optional
|
|
1175
|
+
:param _content_type: force content-type for the request.
|
|
1176
|
+
:type _content_type: str, Optional
|
|
1177
|
+
:param _headers: set to override the headers for a single
|
|
1178
|
+
request; this effectively ignores the headers
|
|
1179
|
+
in the spec for a single request.
|
|
1180
|
+
:type _headers: dict, optional
|
|
1181
|
+
:param _host_index: set to override the host_index for a single
|
|
1182
|
+
request; this effectively ignores the host_index
|
|
1183
|
+
in the spec for a single request.
|
|
1184
|
+
:type _host_index: int, optional
|
|
1185
|
+
:return: Returns the result object.
|
|
1186
|
+
""" # noqa: E501
|
|
1187
|
+
|
|
1188
|
+
_param = self._webhook_controller_initialize_webhooks_serialize(
|
|
1189
|
+
organization_id=organization_id,
|
|
1190
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1191
|
+
_request_auth=_request_auth,
|
|
1192
|
+
_content_type=_content_type,
|
|
1193
|
+
_headers=_headers,
|
|
1194
|
+
_host_index=_host_index
|
|
1195
|
+
)
|
|
1196
|
+
|
|
1197
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1198
|
+
'201': None,
|
|
1199
|
+
'403': None,
|
|
1200
|
+
'404': None,
|
|
1201
|
+
}
|
|
1202
|
+
response_data = self.api_client.call_api(
|
|
1203
|
+
*_param,
|
|
1204
|
+
_request_timeout=_request_timeout
|
|
1205
|
+
)
|
|
1206
|
+
response_data.read()
|
|
1207
|
+
return self.api_client.response_deserialize(
|
|
1208
|
+
response_data=response_data,
|
|
1209
|
+
response_types_map=_response_types_map,
|
|
1210
|
+
).data
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
@validate_call
|
|
1214
|
+
def webhook_controller_initialize_webhooks_with_http_info(
|
|
1215
|
+
self,
|
|
1216
|
+
organization_id: StrictStr,
|
|
1217
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1218
|
+
_request_timeout: Union[
|
|
1219
|
+
None,
|
|
1220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1221
|
+
Tuple[
|
|
1222
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1223
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1224
|
+
]
|
|
1225
|
+
] = None,
|
|
1226
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1227
|
+
_content_type: Optional[StrictStr] = None,
|
|
1228
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1229
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1230
|
+
) -> ApiResponse[None]:
|
|
1231
|
+
"""Initialize webhooks for an organization
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
:param organization_id: (required)
|
|
1235
|
+
:type organization_id: str
|
|
1236
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1237
|
+
:type x_daytona_organization_id: str
|
|
1238
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1239
|
+
number provided, it will be total request
|
|
1240
|
+
timeout. It can also be a pair (tuple) of
|
|
1241
|
+
(connection, read) timeouts.
|
|
1242
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1243
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1244
|
+
request; this effectively ignores the
|
|
1245
|
+
authentication in the spec for a single request.
|
|
1246
|
+
:type _request_auth: dict, optional
|
|
1247
|
+
:param _content_type: force content-type for the request.
|
|
1248
|
+
:type _content_type: str, Optional
|
|
1249
|
+
:param _headers: set to override the headers for a single
|
|
1250
|
+
request; this effectively ignores the headers
|
|
1251
|
+
in the spec for a single request.
|
|
1252
|
+
:type _headers: dict, optional
|
|
1253
|
+
:param _host_index: set to override the host_index for a single
|
|
1254
|
+
request; this effectively ignores the host_index
|
|
1255
|
+
in the spec for a single request.
|
|
1256
|
+
:type _host_index: int, optional
|
|
1257
|
+
:return: Returns the result object.
|
|
1258
|
+
""" # noqa: E501
|
|
1259
|
+
|
|
1260
|
+
_param = self._webhook_controller_initialize_webhooks_serialize(
|
|
1261
|
+
organization_id=organization_id,
|
|
1262
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1263
|
+
_request_auth=_request_auth,
|
|
1264
|
+
_content_type=_content_type,
|
|
1265
|
+
_headers=_headers,
|
|
1266
|
+
_host_index=_host_index
|
|
1267
|
+
)
|
|
1268
|
+
|
|
1269
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1270
|
+
'201': None,
|
|
1271
|
+
'403': None,
|
|
1272
|
+
'404': None,
|
|
1273
|
+
}
|
|
1274
|
+
response_data = self.api_client.call_api(
|
|
1275
|
+
*_param,
|
|
1276
|
+
_request_timeout=_request_timeout
|
|
1277
|
+
)
|
|
1278
|
+
response_data.read()
|
|
1279
|
+
return self.api_client.response_deserialize(
|
|
1280
|
+
response_data=response_data,
|
|
1281
|
+
response_types_map=_response_types_map,
|
|
1282
|
+
)
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
@validate_call
|
|
1286
|
+
def webhook_controller_initialize_webhooks_without_preload_content(
|
|
1287
|
+
self,
|
|
1288
|
+
organization_id: StrictStr,
|
|
1289
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1290
|
+
_request_timeout: Union[
|
|
1291
|
+
None,
|
|
1292
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1293
|
+
Tuple[
|
|
1294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1296
|
+
]
|
|
1297
|
+
] = None,
|
|
1298
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1299
|
+
_content_type: Optional[StrictStr] = None,
|
|
1300
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1301
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1302
|
+
) -> RESTResponseType:
|
|
1303
|
+
"""Initialize webhooks for an organization
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
:param organization_id: (required)
|
|
1307
|
+
:type organization_id: str
|
|
1308
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1309
|
+
:type x_daytona_organization_id: str
|
|
1310
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1311
|
+
number provided, it will be total request
|
|
1312
|
+
timeout. It can also be a pair (tuple) of
|
|
1313
|
+
(connection, read) timeouts.
|
|
1314
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1315
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1316
|
+
request; this effectively ignores the
|
|
1317
|
+
authentication in the spec for a single request.
|
|
1318
|
+
:type _request_auth: dict, optional
|
|
1319
|
+
:param _content_type: force content-type for the request.
|
|
1320
|
+
:type _content_type: str, Optional
|
|
1321
|
+
:param _headers: set to override the headers for a single
|
|
1322
|
+
request; this effectively ignores the headers
|
|
1323
|
+
in the spec for a single request.
|
|
1324
|
+
:type _headers: dict, optional
|
|
1325
|
+
:param _host_index: set to override the host_index for a single
|
|
1326
|
+
request; this effectively ignores the host_index
|
|
1327
|
+
in the spec for a single request.
|
|
1328
|
+
:type _host_index: int, optional
|
|
1329
|
+
:return: Returns the result object.
|
|
1330
|
+
""" # noqa: E501
|
|
1331
|
+
|
|
1332
|
+
_param = self._webhook_controller_initialize_webhooks_serialize(
|
|
1333
|
+
organization_id=organization_id,
|
|
1334
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1335
|
+
_request_auth=_request_auth,
|
|
1336
|
+
_content_type=_content_type,
|
|
1337
|
+
_headers=_headers,
|
|
1338
|
+
_host_index=_host_index
|
|
1339
|
+
)
|
|
1340
|
+
|
|
1341
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1342
|
+
'201': None,
|
|
1343
|
+
'403': None,
|
|
1344
|
+
'404': None,
|
|
1345
|
+
}
|
|
1346
|
+
response_data = self.api_client.call_api(
|
|
1347
|
+
*_param,
|
|
1348
|
+
_request_timeout=_request_timeout
|
|
1349
|
+
)
|
|
1350
|
+
return response_data.response
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
def _webhook_controller_initialize_webhooks_serialize(
|
|
1354
|
+
self,
|
|
1355
|
+
organization_id,
|
|
1356
|
+
x_daytona_organization_id,
|
|
1357
|
+
_request_auth,
|
|
1358
|
+
_content_type,
|
|
1359
|
+
_headers,
|
|
1360
|
+
_host_index,
|
|
1361
|
+
) -> RequestSerialized:
|
|
1362
|
+
|
|
1363
|
+
_host = None
|
|
1364
|
+
|
|
1365
|
+
_collection_formats: Dict[str, str] = {
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
_path_params: Dict[str, str] = {}
|
|
1369
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1370
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1371
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1372
|
+
_files: Dict[
|
|
1373
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1374
|
+
] = {}
|
|
1375
|
+
_body_params: Optional[bytes] = None
|
|
1376
|
+
|
|
1377
|
+
# process the path parameters
|
|
1378
|
+
if organization_id is not None:
|
|
1379
|
+
_path_params['organizationId'] = organization_id
|
|
1380
|
+
# process the query parameters
|
|
1381
|
+
# process the header parameters
|
|
1382
|
+
if x_daytona_organization_id is not None:
|
|
1383
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1384
|
+
# process the form parameters
|
|
1385
|
+
# process the body parameter
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
# authentication setting
|
|
1391
|
+
_auth_settings: List[str] = [
|
|
1392
|
+
'bearer'
|
|
1393
|
+
]
|
|
1394
|
+
|
|
1395
|
+
return self.api_client.param_serialize(
|
|
1396
|
+
method='POST',
|
|
1397
|
+
resource_path='/webhooks/organizations/{organizationId}/initialize',
|
|
1398
|
+
path_params=_path_params,
|
|
1399
|
+
query_params=_query_params,
|
|
1400
|
+
header_params=_header_params,
|
|
1401
|
+
body=_body_params,
|
|
1402
|
+
post_params=_form_params,
|
|
1403
|
+
files=_files,
|
|
1404
|
+
auth_settings=_auth_settings,
|
|
1405
|
+
collection_formats=_collection_formats,
|
|
1406
|
+
_host=_host,
|
|
1407
|
+
_request_auth=_request_auth
|
|
1408
|
+
)
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
@validate_call
|
|
1414
|
+
def webhook_controller_send_webhook(
|
|
1415
|
+
self,
|
|
1416
|
+
organization_id: StrictStr,
|
|
1417
|
+
send_webhook_dto: SendWebhookDto,
|
|
1418
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1419
|
+
_request_timeout: Union[
|
|
1420
|
+
None,
|
|
1421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1422
|
+
Tuple[
|
|
1423
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1424
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1425
|
+
]
|
|
1426
|
+
] = None,
|
|
1427
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1428
|
+
_content_type: Optional[StrictStr] = None,
|
|
1429
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1430
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1431
|
+
) -> None:
|
|
1432
|
+
"""Send a webhook message to an organization
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
:param organization_id: (required)
|
|
1436
|
+
:type organization_id: str
|
|
1437
|
+
:param send_webhook_dto: (required)
|
|
1438
|
+
:type send_webhook_dto: SendWebhookDto
|
|
1439
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1440
|
+
:type x_daytona_organization_id: str
|
|
1441
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1442
|
+
number provided, it will be total request
|
|
1443
|
+
timeout. It can also be a pair (tuple) of
|
|
1444
|
+
(connection, read) timeouts.
|
|
1445
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1446
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1447
|
+
request; this effectively ignores the
|
|
1448
|
+
authentication in the spec for a single request.
|
|
1449
|
+
:type _request_auth: dict, optional
|
|
1450
|
+
:param _content_type: force content-type for the request.
|
|
1451
|
+
:type _content_type: str, Optional
|
|
1452
|
+
:param _headers: set to override the headers for a single
|
|
1453
|
+
request; this effectively ignores the headers
|
|
1454
|
+
in the spec for a single request.
|
|
1455
|
+
:type _headers: dict, optional
|
|
1456
|
+
:param _host_index: set to override the host_index for a single
|
|
1457
|
+
request; this effectively ignores the host_index
|
|
1458
|
+
in the spec for a single request.
|
|
1459
|
+
:type _host_index: int, optional
|
|
1460
|
+
:return: Returns the result object.
|
|
1461
|
+
""" # noqa: E501
|
|
1462
|
+
|
|
1463
|
+
_param = self._webhook_controller_send_webhook_serialize(
|
|
1464
|
+
organization_id=organization_id,
|
|
1465
|
+
send_webhook_dto=send_webhook_dto,
|
|
1466
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1467
|
+
_request_auth=_request_auth,
|
|
1468
|
+
_content_type=_content_type,
|
|
1469
|
+
_headers=_headers,
|
|
1470
|
+
_host_index=_host_index
|
|
1471
|
+
)
|
|
1472
|
+
|
|
1473
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1474
|
+
'200': None,
|
|
1475
|
+
}
|
|
1476
|
+
response_data = self.api_client.call_api(
|
|
1477
|
+
*_param,
|
|
1478
|
+
_request_timeout=_request_timeout
|
|
1479
|
+
)
|
|
1480
|
+
response_data.read()
|
|
1481
|
+
return self.api_client.response_deserialize(
|
|
1482
|
+
response_data=response_data,
|
|
1483
|
+
response_types_map=_response_types_map,
|
|
1484
|
+
).data
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
@validate_call
|
|
1488
|
+
def webhook_controller_send_webhook_with_http_info(
|
|
1489
|
+
self,
|
|
1490
|
+
organization_id: StrictStr,
|
|
1491
|
+
send_webhook_dto: SendWebhookDto,
|
|
1492
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1493
|
+
_request_timeout: Union[
|
|
1494
|
+
None,
|
|
1495
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1496
|
+
Tuple[
|
|
1497
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1498
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1499
|
+
]
|
|
1500
|
+
] = None,
|
|
1501
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1502
|
+
_content_type: Optional[StrictStr] = None,
|
|
1503
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1504
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1505
|
+
) -> ApiResponse[None]:
|
|
1506
|
+
"""Send a webhook message to an organization
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
:param organization_id: (required)
|
|
1510
|
+
:type organization_id: str
|
|
1511
|
+
:param send_webhook_dto: (required)
|
|
1512
|
+
:type send_webhook_dto: SendWebhookDto
|
|
1513
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1514
|
+
:type x_daytona_organization_id: str
|
|
1515
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1516
|
+
number provided, it will be total request
|
|
1517
|
+
timeout. It can also be a pair (tuple) of
|
|
1518
|
+
(connection, read) timeouts.
|
|
1519
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1520
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1521
|
+
request; this effectively ignores the
|
|
1522
|
+
authentication in the spec for a single request.
|
|
1523
|
+
:type _request_auth: dict, optional
|
|
1524
|
+
:param _content_type: force content-type for the request.
|
|
1525
|
+
:type _content_type: str, Optional
|
|
1526
|
+
:param _headers: set to override the headers for a single
|
|
1527
|
+
request; this effectively ignores the headers
|
|
1528
|
+
in the spec for a single request.
|
|
1529
|
+
:type _headers: dict, optional
|
|
1530
|
+
:param _host_index: set to override the host_index for a single
|
|
1531
|
+
request; this effectively ignores the host_index
|
|
1532
|
+
in the spec for a single request.
|
|
1533
|
+
:type _host_index: int, optional
|
|
1534
|
+
:return: Returns the result object.
|
|
1535
|
+
""" # noqa: E501
|
|
1536
|
+
|
|
1537
|
+
_param = self._webhook_controller_send_webhook_serialize(
|
|
1538
|
+
organization_id=organization_id,
|
|
1539
|
+
send_webhook_dto=send_webhook_dto,
|
|
1540
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1541
|
+
_request_auth=_request_auth,
|
|
1542
|
+
_content_type=_content_type,
|
|
1543
|
+
_headers=_headers,
|
|
1544
|
+
_host_index=_host_index
|
|
1545
|
+
)
|
|
1546
|
+
|
|
1547
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1548
|
+
'200': None,
|
|
1549
|
+
}
|
|
1550
|
+
response_data = self.api_client.call_api(
|
|
1551
|
+
*_param,
|
|
1552
|
+
_request_timeout=_request_timeout
|
|
1553
|
+
)
|
|
1554
|
+
response_data.read()
|
|
1555
|
+
return self.api_client.response_deserialize(
|
|
1556
|
+
response_data=response_data,
|
|
1557
|
+
response_types_map=_response_types_map,
|
|
1558
|
+
)
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
@validate_call
|
|
1562
|
+
def webhook_controller_send_webhook_without_preload_content(
|
|
1563
|
+
self,
|
|
1564
|
+
organization_id: StrictStr,
|
|
1565
|
+
send_webhook_dto: SendWebhookDto,
|
|
1566
|
+
x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
|
|
1567
|
+
_request_timeout: Union[
|
|
1568
|
+
None,
|
|
1569
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1570
|
+
Tuple[
|
|
1571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1572
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1573
|
+
]
|
|
1574
|
+
] = None,
|
|
1575
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1576
|
+
_content_type: Optional[StrictStr] = None,
|
|
1577
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1578
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1579
|
+
) -> RESTResponseType:
|
|
1580
|
+
"""Send a webhook message to an organization
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
:param organization_id: (required)
|
|
1584
|
+
:type organization_id: str
|
|
1585
|
+
:param send_webhook_dto: (required)
|
|
1586
|
+
:type send_webhook_dto: SendWebhookDto
|
|
1587
|
+
:param x_daytona_organization_id: Use with JWT to specify the organization ID
|
|
1588
|
+
:type x_daytona_organization_id: str
|
|
1589
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1590
|
+
number provided, it will be total request
|
|
1591
|
+
timeout. It can also be a pair (tuple) of
|
|
1592
|
+
(connection, read) timeouts.
|
|
1593
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1594
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1595
|
+
request; this effectively ignores the
|
|
1596
|
+
authentication in the spec for a single request.
|
|
1597
|
+
:type _request_auth: dict, optional
|
|
1598
|
+
:param _content_type: force content-type for the request.
|
|
1599
|
+
:type _content_type: str, Optional
|
|
1600
|
+
:param _headers: set to override the headers for a single
|
|
1601
|
+
request; this effectively ignores the headers
|
|
1602
|
+
in the spec for a single request.
|
|
1603
|
+
:type _headers: dict, optional
|
|
1604
|
+
:param _host_index: set to override the host_index for a single
|
|
1605
|
+
request; this effectively ignores the host_index
|
|
1606
|
+
in the spec for a single request.
|
|
1607
|
+
:type _host_index: int, optional
|
|
1608
|
+
:return: Returns the result object.
|
|
1609
|
+
""" # noqa: E501
|
|
1610
|
+
|
|
1611
|
+
_param = self._webhook_controller_send_webhook_serialize(
|
|
1612
|
+
organization_id=organization_id,
|
|
1613
|
+
send_webhook_dto=send_webhook_dto,
|
|
1614
|
+
x_daytona_organization_id=x_daytona_organization_id,
|
|
1615
|
+
_request_auth=_request_auth,
|
|
1616
|
+
_content_type=_content_type,
|
|
1617
|
+
_headers=_headers,
|
|
1618
|
+
_host_index=_host_index
|
|
1619
|
+
)
|
|
1620
|
+
|
|
1621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1622
|
+
'200': None,
|
|
1623
|
+
}
|
|
1624
|
+
response_data = self.api_client.call_api(
|
|
1625
|
+
*_param,
|
|
1626
|
+
_request_timeout=_request_timeout
|
|
1627
|
+
)
|
|
1628
|
+
return response_data.response
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
def _webhook_controller_send_webhook_serialize(
|
|
1632
|
+
self,
|
|
1633
|
+
organization_id,
|
|
1634
|
+
send_webhook_dto,
|
|
1635
|
+
x_daytona_organization_id,
|
|
1636
|
+
_request_auth,
|
|
1637
|
+
_content_type,
|
|
1638
|
+
_headers,
|
|
1639
|
+
_host_index,
|
|
1640
|
+
) -> RequestSerialized:
|
|
1641
|
+
|
|
1642
|
+
_host = None
|
|
1643
|
+
|
|
1644
|
+
_collection_formats: Dict[str, str] = {
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
_path_params: Dict[str, str] = {}
|
|
1648
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1649
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1650
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1651
|
+
_files: Dict[
|
|
1652
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1653
|
+
] = {}
|
|
1654
|
+
_body_params: Optional[bytes] = None
|
|
1655
|
+
|
|
1656
|
+
# process the path parameters
|
|
1657
|
+
if organization_id is not None:
|
|
1658
|
+
_path_params['organizationId'] = organization_id
|
|
1659
|
+
# process the query parameters
|
|
1660
|
+
# process the header parameters
|
|
1661
|
+
if x_daytona_organization_id is not None:
|
|
1662
|
+
_header_params['X-Daytona-Organization-ID'] = x_daytona_organization_id
|
|
1663
|
+
# process the form parameters
|
|
1664
|
+
# process the body parameter
|
|
1665
|
+
if send_webhook_dto is not None:
|
|
1666
|
+
_body_params = send_webhook_dto
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
# set the HTTP header `Content-Type`
|
|
1671
|
+
if _content_type:
|
|
1672
|
+
_header_params['Content-Type'] = _content_type
|
|
1673
|
+
else:
|
|
1674
|
+
_default_content_type = (
|
|
1675
|
+
self.api_client.select_header_content_type(
|
|
1676
|
+
[
|
|
1677
|
+
'application/json'
|
|
1678
|
+
]
|
|
1679
|
+
)
|
|
1680
|
+
)
|
|
1681
|
+
if _default_content_type is not None:
|
|
1682
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1683
|
+
|
|
1684
|
+
# authentication setting
|
|
1685
|
+
_auth_settings: List[str] = [
|
|
1686
|
+
'bearer'
|
|
1687
|
+
]
|
|
1688
|
+
|
|
1689
|
+
return self.api_client.param_serialize(
|
|
1690
|
+
method='POST',
|
|
1691
|
+
resource_path='/webhooks/organizations/{organizationId}/send',
|
|
1692
|
+
path_params=_path_params,
|
|
1693
|
+
query_params=_query_params,
|
|
1694
|
+
header_params=_header_params,
|
|
1695
|
+
body=_body_params,
|
|
1696
|
+
post_params=_form_params,
|
|
1697
|
+
files=_files,
|
|
1698
|
+
auth_settings=_auth_settings,
|
|
1699
|
+
collection_formats=_collection_formats,
|
|
1700
|
+
_host=_host,
|
|
1701
|
+
_request_auth=_request_auth
|
|
1702
|
+
)
|
|
1703
|
+
|
|
1704
|
+
|