hatchet-sdk 0.40.0a9__py3-none-any.whl → 0.41.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 hatchet-sdk might be problematic. Click here for more details.

Files changed (149) hide show
  1. hatchet_sdk/clients/admin.py +129 -59
  2. hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
  3. hatchet_sdk/clients/events.py +91 -52
  4. hatchet_sdk/clients/rest/__init__.py +21 -0
  5. hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
  6. hatchet_sdk/clients/rest/api/default_api.py +24 -18
  7. hatchet_sdk/clients/rest/api/event_api.py +32 -24
  8. hatchet_sdk/clients/rest/api/github_api.py +4 -3
  9. hatchet_sdk/clients/rest/api/log_api.py +4 -3
  10. hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
  11. hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
  12. hatchet_sdk/clients/rest/api/slack_api.py +8 -6
  13. hatchet_sdk/clients/rest/api/sns_api.py +12 -9
  14. hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
  15. hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
  16. hatchet_sdk/clients/rest/api/user_api.py +24 -18
  17. hatchet_sdk/clients/rest/api/worker_api.py +12 -9
  18. hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
  19. hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
  20. hatchet_sdk/clients/rest/api_client.py +34 -11
  21. hatchet_sdk/clients/rest/configuration.py +161 -36
  22. hatchet_sdk/clients/rest/models/__init__.py +21 -0
  23. hatchet_sdk/clients/rest/models/api_errors.py +3 -3
  24. hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
  25. hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
  26. hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
  27. hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
  28. hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
  29. hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  30. hatchet_sdk/clients/rest/models/event_list.py +3 -3
  31. hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
  32. hatchet_sdk/clients/rest/models/job.py +3 -3
  33. hatchet_sdk/clients/rest/models/job_run.py +3 -3
  34. hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
  35. hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
  36. hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
  37. hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
  38. hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
  39. hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
  40. hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
  41. hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
  42. hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
  43. hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
  44. hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
  45. hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  46. hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
  47. hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
  48. hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
  49. hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
  50. hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
  51. hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
  52. hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
  53. hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
  54. hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
  55. hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
  56. hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
  57. hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
  58. hatchet_sdk/clients/rest/models/worker.py +20 -9
  59. hatchet_sdk/clients/rest/models/worker_list.py +3 -3
  60. hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
  61. hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
  62. hatchet_sdk/clients/rest/models/workflow.py +9 -9
  63. hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
  64. hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
  65. hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
  66. hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
  67. hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
  68. hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
  69. hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
  70. hatchet_sdk/clients/rest/rest.py +3 -3
  71. hatchet_sdk/clients/rest_client.py +200 -21
  72. hatchet_sdk/contracts/dispatcher_pb2.pyi +2 -0
  73. hatchet_sdk/contracts/events_pb2.pyi +2 -0
  74. hatchet_sdk/contracts/workflows_pb2.pyi +2 -0
  75. hatchet_sdk/features/cron.py +286 -0
  76. hatchet_sdk/features/scheduled.py +248 -0
  77. hatchet_sdk/hatchet.py +71 -79
  78. hatchet_sdk/loader.py +37 -14
  79. hatchet_sdk/utils/serialization.py +15 -0
  80. hatchet_sdk/utils/tracing.py +67 -0
  81. hatchet_sdk/worker/runner/runner.py +158 -112
  82. hatchet_sdk/worker/worker.py +1 -17
  83. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/METADATA +8 -2
  84. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/RECORD +86 -140
  85. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/entry_points.txt +0 -1
  86. hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
  87. hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
  88. hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
  89. hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
  90. hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
  91. hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
  92. hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
  93. hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
  94. hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
  95. hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
  96. hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
  97. hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
  98. hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
  99. hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
  100. hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
  101. hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
  102. hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
  103. hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
  104. hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
  105. hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
  106. hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
  107. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
  108. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
  109. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
  110. hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
  111. hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
  112. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
  113. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
  114. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
  115. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
  116. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
  117. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
  118. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
  119. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
  120. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
  121. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
  122. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
  123. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
  124. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
  125. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
  126. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
  127. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
  128. hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
  129. hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
  130. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
  131. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
  132. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
  133. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
  134. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
  135. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
  136. hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
  137. hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
  138. hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
  139. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
  140. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
  141. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
  142. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
  143. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
  144. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
  145. hatchet_sdk/clients/cloud_rest/rest.py +0 -182
  146. hatchet_sdk/compute/__init__.py +0 -0
  147. hatchet_sdk/compute/configs.py +0 -34
  148. hatchet_sdk/compute/managed_compute.py +0 -111
  149. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/WHEEL +0 -0
@@ -1,473 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
- import warnings
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
-
17
- from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18
- from typing_extensions import Annotated
19
-
20
- from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
21
- from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
22
- from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
23
-
24
-
25
- class UserApi:
26
- """NOTE: This class is auto generated by OpenAPI Generator
27
- Ref: https://openapi-generator.tech
28
-
29
- Do not edit the class manually.
30
- """
31
-
32
- def __init__(self, api_client=None) -> None:
33
- if api_client is None:
34
- api_client = ApiClient.get_default()
35
- self.api_client = api_client
36
-
37
- @validate_call
38
- async def user_update_github_app_oauth_callback(
39
- self,
40
- _request_timeout: Union[
41
- None,
42
- Annotated[StrictFloat, Field(gt=0)],
43
- Tuple[
44
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
45
- ],
46
- ] = None,
47
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
48
- _content_type: Optional[StrictStr] = None,
49
- _headers: Optional[Dict[StrictStr, Any]] = None,
50
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
51
- ) -> None:
52
- """Complete OAuth flow
53
-
54
- Completes the OAuth flow
55
-
56
- :param _request_timeout: timeout setting for this request. If one
57
- number provided, it will be total request
58
- timeout. It can also be a pair (tuple) of
59
- (connection, read) timeouts.
60
- :type _request_timeout: int, tuple(int, int), optional
61
- :param _request_auth: set to override the auth_settings for an a single
62
- request; this effectively ignores the
63
- authentication in the spec for a single request.
64
- :type _request_auth: dict, optional
65
- :param _content_type: force content-type for the request.
66
- :type _content_type: str, Optional
67
- :param _headers: set to override the headers for a single
68
- request; this effectively ignores the headers
69
- in the spec for a single request.
70
- :type _headers: dict, optional
71
- :param _host_index: set to override the host_index for a single
72
- request; this effectively ignores the host_index
73
- in the spec for a single request.
74
- :type _host_index: int, optional
75
- :return: Returns the result object.
76
- """ # noqa: E501
77
-
78
- _param = self._user_update_github_app_oauth_callback_serialize(
79
- _request_auth=_request_auth,
80
- _content_type=_content_type,
81
- _headers=_headers,
82
- _host_index=_host_index,
83
- )
84
-
85
- _response_types_map: Dict[str, Optional[str]] = {
86
- "302": None,
87
- }
88
- response_data = await self.api_client.call_api(
89
- *_param, _request_timeout=_request_timeout
90
- )
91
- await response_data.read()
92
- return self.api_client.response_deserialize(
93
- response_data=response_data,
94
- response_types_map=_response_types_map,
95
- ).data
96
-
97
- @validate_call
98
- async def user_update_github_app_oauth_callback_with_http_info(
99
- self,
100
- _request_timeout: Union[
101
- None,
102
- Annotated[StrictFloat, Field(gt=0)],
103
- Tuple[
104
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
105
- ],
106
- ] = None,
107
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
108
- _content_type: Optional[StrictStr] = None,
109
- _headers: Optional[Dict[StrictStr, Any]] = None,
110
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
111
- ) -> ApiResponse[None]:
112
- """Complete OAuth flow
113
-
114
- Completes the OAuth flow
115
-
116
- :param _request_timeout: timeout setting for this request. If one
117
- number provided, it will be total request
118
- timeout. It can also be a pair (tuple) of
119
- (connection, read) timeouts.
120
- :type _request_timeout: int, tuple(int, int), optional
121
- :param _request_auth: set to override the auth_settings for an a single
122
- request; this effectively ignores the
123
- authentication in the spec for a single request.
124
- :type _request_auth: dict, optional
125
- :param _content_type: force content-type for the request.
126
- :type _content_type: str, Optional
127
- :param _headers: set to override the headers for a single
128
- request; this effectively ignores the headers
129
- in the spec for a single request.
130
- :type _headers: dict, optional
131
- :param _host_index: set to override the host_index for a single
132
- request; this effectively ignores the host_index
133
- in the spec for a single request.
134
- :type _host_index: int, optional
135
- :return: Returns the result object.
136
- """ # noqa: E501
137
-
138
- _param = self._user_update_github_app_oauth_callback_serialize(
139
- _request_auth=_request_auth,
140
- _content_type=_content_type,
141
- _headers=_headers,
142
- _host_index=_host_index,
143
- )
144
-
145
- _response_types_map: Dict[str, Optional[str]] = {
146
- "302": None,
147
- }
148
- response_data = await self.api_client.call_api(
149
- *_param, _request_timeout=_request_timeout
150
- )
151
- await response_data.read()
152
- return self.api_client.response_deserialize(
153
- response_data=response_data,
154
- response_types_map=_response_types_map,
155
- )
156
-
157
- @validate_call
158
- async def user_update_github_app_oauth_callback_without_preload_content(
159
- self,
160
- _request_timeout: Union[
161
- None,
162
- Annotated[StrictFloat, Field(gt=0)],
163
- Tuple[
164
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
165
- ],
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
- """Complete OAuth flow
173
-
174
- Completes the OAuth flow
175
-
176
- :param _request_timeout: timeout setting for this request. If one
177
- number provided, it will be total request
178
- timeout. It can also be a pair (tuple) of
179
- (connection, read) timeouts.
180
- :type _request_timeout: int, tuple(int, int), optional
181
- :param _request_auth: set to override the auth_settings for an a single
182
- request; this effectively ignores the
183
- authentication in the spec for a single request.
184
- :type _request_auth: dict, optional
185
- :param _content_type: force content-type for the request.
186
- :type _content_type: str, Optional
187
- :param _headers: set to override the headers for a single
188
- request; this effectively ignores the headers
189
- in the spec for a single request.
190
- :type _headers: dict, optional
191
- :param _host_index: set to override the host_index for a single
192
- request; this effectively ignores the host_index
193
- in the spec for a single request.
194
- :type _host_index: int, optional
195
- :return: Returns the result object.
196
- """ # noqa: E501
197
-
198
- _param = self._user_update_github_app_oauth_callback_serialize(
199
- _request_auth=_request_auth,
200
- _content_type=_content_type,
201
- _headers=_headers,
202
- _host_index=_host_index,
203
- )
204
-
205
- _response_types_map: Dict[str, Optional[str]] = {
206
- "302": None,
207
- }
208
- response_data = await self.api_client.call_api(
209
- *_param, _request_timeout=_request_timeout
210
- )
211
- return response_data.response
212
-
213
- def _user_update_github_app_oauth_callback_serialize(
214
- self,
215
- _request_auth,
216
- _content_type,
217
- _headers,
218
- _host_index,
219
- ) -> RequestSerialized:
220
-
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]] = {}
230
- _body_params: Optional[bytes] = None
231
-
232
- # process the path parameters
233
- # process the query parameters
234
- # process the header parameters
235
- # process the form parameters
236
- # process the body parameter
237
-
238
- # authentication setting
239
- _auth_settings: List[str] = ["cookieAuth"]
240
-
241
- return self.api_client.param_serialize(
242
- method="GET",
243
- resource_path="/api/v1/cloud/users/github-app/callback",
244
- path_params=_path_params,
245
- query_params=_query_params,
246
- header_params=_header_params,
247
- body=_body_params,
248
- post_params=_form_params,
249
- files=_files,
250
- auth_settings=_auth_settings,
251
- collection_formats=_collection_formats,
252
- _host=_host,
253
- _request_auth=_request_auth,
254
- )
255
-
256
- @validate_call
257
- async def user_update_github_app_oauth_start(
258
- self,
259
- _request_timeout: Union[
260
- None,
261
- Annotated[StrictFloat, Field(gt=0)],
262
- Tuple[
263
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
264
- ],
265
- ] = None,
266
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
267
- _content_type: Optional[StrictStr] = None,
268
- _headers: Optional[Dict[StrictStr, Any]] = None,
269
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
270
- ) -> None:
271
- """Start OAuth flow
272
-
273
- Starts the OAuth flow
274
-
275
- :param _request_timeout: timeout setting for this request. If one
276
- number provided, it will be total request
277
- timeout. It can also be a pair (tuple) of
278
- (connection, read) timeouts.
279
- :type _request_timeout: int, tuple(int, int), optional
280
- :param _request_auth: set to override the auth_settings for an a single
281
- request; this effectively ignores the
282
- authentication in the spec for a single request.
283
- :type _request_auth: dict, optional
284
- :param _content_type: force content-type for the request.
285
- :type _content_type: str, Optional
286
- :param _headers: set to override the headers for a single
287
- request; this effectively ignores the headers
288
- in the spec for a single request.
289
- :type _headers: dict, optional
290
- :param _host_index: set to override the host_index for a single
291
- request; this effectively ignores the host_index
292
- in the spec for a single request.
293
- :type _host_index: int, optional
294
- :return: Returns the result object.
295
- """ # noqa: E501
296
-
297
- _param = self._user_update_github_app_oauth_start_serialize(
298
- _request_auth=_request_auth,
299
- _content_type=_content_type,
300
- _headers=_headers,
301
- _host_index=_host_index,
302
- )
303
-
304
- _response_types_map: Dict[str, Optional[str]] = {
305
- "302": None,
306
- }
307
- response_data = await self.api_client.call_api(
308
- *_param, _request_timeout=_request_timeout
309
- )
310
- await response_data.read()
311
- return self.api_client.response_deserialize(
312
- response_data=response_data,
313
- response_types_map=_response_types_map,
314
- ).data
315
-
316
- @validate_call
317
- async def user_update_github_app_oauth_start_with_http_info(
318
- self,
319
- _request_timeout: Union[
320
- None,
321
- Annotated[StrictFloat, Field(gt=0)],
322
- Tuple[
323
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
324
- ],
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[None]:
331
- """Start OAuth flow
332
-
333
- Starts the OAuth flow
334
-
335
- :param _request_timeout: timeout setting for this request. If one
336
- number provided, it will be total request
337
- timeout. It can also be a pair (tuple) of
338
- (connection, read) timeouts.
339
- :type _request_timeout: int, tuple(int, int), optional
340
- :param _request_auth: set to override the auth_settings for an a single
341
- request; this effectively ignores the
342
- authentication in the spec for a single request.
343
- :type _request_auth: dict, optional
344
- :param _content_type: force content-type for the request.
345
- :type _content_type: str, Optional
346
- :param _headers: set to override the headers for a single
347
- request; this effectively ignores the headers
348
- in the spec for a single request.
349
- :type _headers: dict, optional
350
- :param _host_index: set to override the host_index for a single
351
- request; this effectively ignores the host_index
352
- in the spec for a single request.
353
- :type _host_index: int, optional
354
- :return: Returns the result object.
355
- """ # noqa: E501
356
-
357
- _param = self._user_update_github_app_oauth_start_serialize(
358
- _request_auth=_request_auth,
359
- _content_type=_content_type,
360
- _headers=_headers,
361
- _host_index=_host_index,
362
- )
363
-
364
- _response_types_map: Dict[str, Optional[str]] = {
365
- "302": None,
366
- }
367
- response_data = await self.api_client.call_api(
368
- *_param, _request_timeout=_request_timeout
369
- )
370
- await 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
- async def user_update_github_app_oauth_start_without_preload_content(
378
- self,
379
- _request_timeout: Union[
380
- None,
381
- Annotated[StrictFloat, Field(gt=0)],
382
- Tuple[
383
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
384
- ],
385
- ] = None,
386
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
387
- _content_type: Optional[StrictStr] = None,
388
- _headers: Optional[Dict[StrictStr, Any]] = None,
389
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
390
- ) -> RESTResponseType:
391
- """Start OAuth flow
392
-
393
- Starts the OAuth flow
394
-
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._user_update_github_app_oauth_start_serialize(
418
- _request_auth=_request_auth,
419
- _content_type=_content_type,
420
- _headers=_headers,
421
- _host_index=_host_index,
422
- )
423
-
424
- _response_types_map: Dict[str, Optional[str]] = {
425
- "302": None,
426
- }
427
- response_data = await self.api_client.call_api(
428
- *_param, _request_timeout=_request_timeout
429
- )
430
- return response_data.response
431
-
432
- def _user_update_github_app_oauth_start_serialize(
433
- self,
434
- _request_auth,
435
- _content_type,
436
- _headers,
437
- _host_index,
438
- ) -> RequestSerialized:
439
-
440
- _host = None
441
-
442
- _collection_formats: Dict[str, str] = {}
443
-
444
- _path_params: Dict[str, str] = {}
445
- _query_params: List[Tuple[str, str]] = []
446
- _header_params: Dict[str, Optional[str]] = _headers or {}
447
- _form_params: List[Tuple[str, str]] = []
448
- _files: Dict[str, Union[str, bytes]] = {}
449
- _body_params: Optional[bytes] = None
450
-
451
- # process the path parameters
452
- # process the query parameters
453
- # process the header parameters
454
- # process the form parameters
455
- # process the body parameter
456
-
457
- # authentication setting
458
- _auth_settings: List[str] = ["cookieAuth"]
459
-
460
- return self.api_client.param_serialize(
461
- method="GET",
462
- resource_path="/api/v1/cloud/users/github-app/start",
463
- path_params=_path_params,
464
- query_params=_query_params,
465
- header_params=_header_params,
466
- body=_body_params,
467
- post_params=_form_params,
468
- files=_files,
469
- auth_settings=_auth_settings,
470
- collection_formats=_collection_formats,
471
- _host=_host,
472
- _request_auth=_request_auth,
473
- )