hatchet-sdk 1.18.1__py3-none-any.whl → 1.20.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 (234) hide show
  1. hatchet_sdk/clients/dispatcher/action_listener.py +0 -1
  2. hatchet_sdk/clients/dispatcher/dispatcher.py +0 -30
  3. hatchet_sdk/hatchet.py +0 -20
  4. hatchet_sdk/opentelemetry/instrumentor.py +1 -27
  5. hatchet_sdk/runnables/action.py +2 -5
  6. hatchet_sdk/runnables/task.py +0 -1
  7. hatchet_sdk/utils/opentelemetry.py +0 -1
  8. hatchet_sdk/worker/action_listener_process.py +0 -29
  9. hatchet_sdk/worker/runner/runner.py +1 -105
  10. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/METADATA +2 -3
  11. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/RECORD +13 -234
  12. hatchet_sdk/v0/__init__.py +0 -251
  13. hatchet_sdk/v0/client.py +0 -119
  14. hatchet_sdk/v0/clients/admin.py +0 -541
  15. hatchet_sdk/v0/clients/dispatcher/action_listener.py +0 -422
  16. hatchet_sdk/v0/clients/dispatcher/dispatcher.py +0 -204
  17. hatchet_sdk/v0/clients/event_ts.py +0 -28
  18. hatchet_sdk/v0/clients/events.py +0 -182
  19. hatchet_sdk/v0/clients/rest/__init__.py +0 -307
  20. hatchet_sdk/v0/clients/rest/api/__init__.py +0 -19
  21. hatchet_sdk/v0/clients/rest/api/api_token_api.py +0 -858
  22. hatchet_sdk/v0/clients/rest/api/default_api.py +0 -2259
  23. hatchet_sdk/v0/clients/rest/api/event_api.py +0 -2548
  24. hatchet_sdk/v0/clients/rest/api/github_api.py +0 -331
  25. hatchet_sdk/v0/clients/rest/api/healthcheck_api.py +0 -483
  26. hatchet_sdk/v0/clients/rest/api/log_api.py +0 -449
  27. hatchet_sdk/v0/clients/rest/api/metadata_api.py +0 -728
  28. hatchet_sdk/v0/clients/rest/api/rate_limits_api.py +0 -423
  29. hatchet_sdk/v0/clients/rest/api/slack_api.py +0 -577
  30. hatchet_sdk/v0/clients/rest/api/sns_api.py +0 -872
  31. hatchet_sdk/v0/clients/rest/api/step_run_api.py +0 -2202
  32. hatchet_sdk/v0/clients/rest/api/tenant_api.py +0 -4430
  33. hatchet_sdk/v0/clients/rest/api/user_api.py +0 -2888
  34. hatchet_sdk/v0/clients/rest/api/worker_api.py +0 -858
  35. hatchet_sdk/v0/clients/rest/api/workflow_api.py +0 -6312
  36. hatchet_sdk/v0/clients/rest/api/workflow_run_api.py +0 -1932
  37. hatchet_sdk/v0/clients/rest/api/workflow_runs_api.py +0 -610
  38. hatchet_sdk/v0/clients/rest/api_client.py +0 -759
  39. hatchet_sdk/v0/clients/rest/api_response.py +0 -22
  40. hatchet_sdk/v0/clients/rest/configuration.py +0 -611
  41. hatchet_sdk/v0/clients/rest/exceptions.py +0 -200
  42. hatchet_sdk/v0/clients/rest/models/__init__.py +0 -274
  43. hatchet_sdk/v0/clients/rest/models/accept_invite_request.py +0 -83
  44. hatchet_sdk/v0/clients/rest/models/api_error.py +0 -102
  45. hatchet_sdk/v0/clients/rest/models/api_errors.py +0 -100
  46. hatchet_sdk/v0/clients/rest/models/api_meta.py +0 -144
  47. hatchet_sdk/v0/clients/rest/models/api_meta_auth.py +0 -85
  48. hatchet_sdk/v0/clients/rest/models/api_meta_integration.py +0 -88
  49. hatchet_sdk/v0/clients/rest/models/api_meta_posthog.py +0 -90
  50. hatchet_sdk/v0/clients/rest/models/api_resource_meta.py +0 -98
  51. hatchet_sdk/v0/clients/rest/models/api_token.py +0 -105
  52. hatchet_sdk/v0/clients/rest/models/bulk_create_event_request.py +0 -100
  53. hatchet_sdk/v0/clients/rest/models/bulk_create_event_response.py +0 -110
  54. hatchet_sdk/v0/clients/rest/models/cancel_event_request.py +0 -85
  55. hatchet_sdk/v0/clients/rest/models/cancel_step_run_request.py +0 -83
  56. hatchet_sdk/v0/clients/rest/models/concurrency_limit_strategy.py +0 -39
  57. hatchet_sdk/v0/clients/rest/models/create_api_token_request.py +0 -92
  58. hatchet_sdk/v0/clients/rest/models/create_api_token_response.py +0 -83
  59. hatchet_sdk/v0/clients/rest/models/create_cron_workflow_trigger_request.py +0 -98
  60. hatchet_sdk/v0/clients/rest/models/create_event_request.py +0 -95
  61. hatchet_sdk/v0/clients/rest/models/create_pull_request_from_step_run.py +0 -83
  62. hatchet_sdk/v0/clients/rest/models/create_sns_integration_request.py +0 -85
  63. hatchet_sdk/v0/clients/rest/models/create_tenant_alert_email_group_request.py +0 -83
  64. hatchet_sdk/v0/clients/rest/models/create_tenant_invite_request.py +0 -86
  65. hatchet_sdk/v0/clients/rest/models/create_tenant_request.py +0 -84
  66. hatchet_sdk/v0/clients/rest/models/cron_workflows.py +0 -131
  67. hatchet_sdk/v0/clients/rest/models/cron_workflows_list.py +0 -110
  68. hatchet_sdk/v0/clients/rest/models/cron_workflows_method.py +0 -37
  69. hatchet_sdk/v0/clients/rest/models/cron_workflows_order_by_field.py +0 -37
  70. hatchet_sdk/v0/clients/rest/models/event.py +0 -143
  71. hatchet_sdk/v0/clients/rest/models/event_data.py +0 -83
  72. hatchet_sdk/v0/clients/rest/models/event_key_list.py +0 -98
  73. hatchet_sdk/v0/clients/rest/models/event_list.py +0 -110
  74. hatchet_sdk/v0/clients/rest/models/event_order_by_direction.py +0 -37
  75. hatchet_sdk/v0/clients/rest/models/event_order_by_field.py +0 -36
  76. hatchet_sdk/v0/clients/rest/models/event_update_cancel200_response.py +0 -85
  77. hatchet_sdk/v0/clients/rest/models/event_workflow_run_summary.py +0 -116
  78. hatchet_sdk/v0/clients/rest/models/events.py +0 -110
  79. hatchet_sdk/v0/clients/rest/models/get_step_run_diff_response.py +0 -100
  80. hatchet_sdk/v0/clients/rest/models/github_app_installation.py +0 -107
  81. hatchet_sdk/v0/clients/rest/models/github_branch.py +0 -86
  82. hatchet_sdk/v0/clients/rest/models/github_repo.py +0 -86
  83. hatchet_sdk/v0/clients/rest/models/info_get_version200_response.py +0 -83
  84. hatchet_sdk/v0/clients/rest/models/job.py +0 -132
  85. hatchet_sdk/v0/clients/rest/models/job_run.py +0 -176
  86. hatchet_sdk/v0/clients/rest/models/job_run_status.py +0 -41
  87. hatchet_sdk/v0/clients/rest/models/link_github_repository_request.py +0 -106
  88. hatchet_sdk/v0/clients/rest/models/list_api_tokens_response.py +0 -110
  89. hatchet_sdk/v0/clients/rest/models/list_github_app_installations_response.py +0 -112
  90. hatchet_sdk/v0/clients/rest/models/list_pull_requests_response.py +0 -100
  91. hatchet_sdk/v0/clients/rest/models/list_slack_webhooks.py +0 -110
  92. hatchet_sdk/v0/clients/rest/models/list_sns_integrations.py +0 -110
  93. hatchet_sdk/v0/clients/rest/models/log_line.py +0 -94
  94. hatchet_sdk/v0/clients/rest/models/log_line_level.py +0 -39
  95. hatchet_sdk/v0/clients/rest/models/log_line_list.py +0 -110
  96. hatchet_sdk/v0/clients/rest/models/log_line_order_by_direction.py +0 -37
  97. hatchet_sdk/v0/clients/rest/models/log_line_order_by_field.py +0 -36
  98. hatchet_sdk/v0/clients/rest/models/pagination_response.py +0 -95
  99. hatchet_sdk/v0/clients/rest/models/pull_request.py +0 -112
  100. hatchet_sdk/v0/clients/rest/models/pull_request_state.py +0 -37
  101. hatchet_sdk/v0/clients/rest/models/queue_metrics.py +0 -97
  102. hatchet_sdk/v0/clients/rest/models/rate_limit.py +0 -117
  103. hatchet_sdk/v0/clients/rest/models/rate_limit_list.py +0 -110
  104. hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_direction.py +0 -37
  105. hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_field.py +0 -38
  106. hatchet_sdk/v0/clients/rest/models/recent_step_runs.py +0 -118
  107. hatchet_sdk/v0/clients/rest/models/reject_invite_request.py +0 -83
  108. hatchet_sdk/v0/clients/rest/models/replay_event_request.py +0 -85
  109. hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_request.py +0 -85
  110. hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_response.py +0 -100
  111. hatchet_sdk/v0/clients/rest/models/rerun_step_run_request.py +0 -83
  112. hatchet_sdk/v0/clients/rest/models/schedule_workflow_run_request.py +0 -92
  113. hatchet_sdk/v0/clients/rest/models/scheduled_run_status.py +0 -42
  114. hatchet_sdk/v0/clients/rest/models/scheduled_workflows.py +0 -149
  115. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_list.py +0 -110
  116. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_method.py +0 -37
  117. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_order_by_field.py +0 -37
  118. hatchet_sdk/v0/clients/rest/models/semaphore_slots.py +0 -113
  119. hatchet_sdk/v0/clients/rest/models/slack_webhook.py +0 -127
  120. hatchet_sdk/v0/clients/rest/models/sns_integration.py +0 -114
  121. hatchet_sdk/v0/clients/rest/models/step.py +0 -123
  122. hatchet_sdk/v0/clients/rest/models/step_run.py +0 -202
  123. hatchet_sdk/v0/clients/rest/models/step_run_archive.py +0 -142
  124. hatchet_sdk/v0/clients/rest/models/step_run_archive_list.py +0 -110
  125. hatchet_sdk/v0/clients/rest/models/step_run_diff.py +0 -91
  126. hatchet_sdk/v0/clients/rest/models/step_run_event.py +0 -122
  127. hatchet_sdk/v0/clients/rest/models/step_run_event_list.py +0 -110
  128. hatchet_sdk/v0/clients/rest/models/step_run_event_reason.py +0 -52
  129. hatchet_sdk/v0/clients/rest/models/step_run_event_severity.py +0 -38
  130. hatchet_sdk/v0/clients/rest/models/step_run_status.py +0 -44
  131. hatchet_sdk/v0/clients/rest/models/tenant.py +0 -118
  132. hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group.py +0 -98
  133. hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group_list.py +0 -112
  134. hatchet_sdk/v0/clients/rest/models/tenant_alerting_settings.py +0 -143
  135. hatchet_sdk/v0/clients/rest/models/tenant_invite.py +0 -120
  136. hatchet_sdk/v0/clients/rest/models/tenant_invite_list.py +0 -110
  137. hatchet_sdk/v0/clients/rest/models/tenant_list.py +0 -110
  138. hatchet_sdk/v0/clients/rest/models/tenant_member.py +0 -123
  139. hatchet_sdk/v0/clients/rest/models/tenant_member_list.py +0 -110
  140. hatchet_sdk/v0/clients/rest/models/tenant_member_role.py +0 -38
  141. hatchet_sdk/v0/clients/rest/models/tenant_queue_metrics.py +0 -116
  142. hatchet_sdk/v0/clients/rest/models/tenant_resource.py +0 -40
  143. hatchet_sdk/v0/clients/rest/models/tenant_resource_limit.py +0 -135
  144. hatchet_sdk/v0/clients/rest/models/tenant_resource_policy.py +0 -102
  145. hatchet_sdk/v0/clients/rest/models/tenant_step_run_queue_metrics.py +0 -83
  146. hatchet_sdk/v0/clients/rest/models/trigger_workflow_run_request.py +0 -91
  147. hatchet_sdk/v0/clients/rest/models/update_tenant_alert_email_group_request.py +0 -83
  148. hatchet_sdk/v0/clients/rest/models/update_tenant_invite_request.py +0 -85
  149. hatchet_sdk/v0/clients/rest/models/update_tenant_request.py +0 -137
  150. hatchet_sdk/v0/clients/rest/models/update_worker_request.py +0 -87
  151. hatchet_sdk/v0/clients/rest/models/user.py +0 -126
  152. hatchet_sdk/v0/clients/rest/models/user_change_password_request.py +0 -88
  153. hatchet_sdk/v0/clients/rest/models/user_login_request.py +0 -86
  154. hatchet_sdk/v0/clients/rest/models/user_register_request.py +0 -91
  155. hatchet_sdk/v0/clients/rest/models/user_tenant_memberships_list.py +0 -110
  156. hatchet_sdk/v0/clients/rest/models/user_tenant_public.py +0 -86
  157. hatchet_sdk/v0/clients/rest/models/webhook_worker.py +0 -100
  158. hatchet_sdk/v0/clients/rest/models/webhook_worker_create_request.py +0 -94
  159. hatchet_sdk/v0/clients/rest/models/webhook_worker_create_response.py +0 -98
  160. hatchet_sdk/v0/clients/rest/models/webhook_worker_created.py +0 -102
  161. hatchet_sdk/v0/clients/rest/models/webhook_worker_list_response.py +0 -110
  162. hatchet_sdk/v0/clients/rest/models/webhook_worker_request.py +0 -102
  163. hatchet_sdk/v0/clients/rest/models/webhook_worker_request_list_response.py +0 -104
  164. hatchet_sdk/v0/clients/rest/models/webhook_worker_request_method.py +0 -38
  165. hatchet_sdk/v0/clients/rest/models/worker.py +0 -239
  166. hatchet_sdk/v0/clients/rest/models/worker_label.py +0 -102
  167. hatchet_sdk/v0/clients/rest/models/worker_list.py +0 -110
  168. hatchet_sdk/v0/clients/rest/models/worker_runtime_info.py +0 -103
  169. hatchet_sdk/v0/clients/rest/models/worker_runtime_sdks.py +0 -38
  170. hatchet_sdk/v0/clients/rest/models/worker_type.py +0 -38
  171. hatchet_sdk/v0/clients/rest/models/workflow.py +0 -165
  172. hatchet_sdk/v0/clients/rest/models/workflow_concurrency.py +0 -107
  173. hatchet_sdk/v0/clients/rest/models/workflow_deployment_config.py +0 -136
  174. hatchet_sdk/v0/clients/rest/models/workflow_kind.py +0 -38
  175. hatchet_sdk/v0/clients/rest/models/workflow_list.py +0 -120
  176. hatchet_sdk/v0/clients/rest/models/workflow_metrics.py +0 -97
  177. hatchet_sdk/v0/clients/rest/models/workflow_run.py +0 -188
  178. hatchet_sdk/v0/clients/rest/models/workflow_run_cancel200_response.py +0 -85
  179. hatchet_sdk/v0/clients/rest/models/workflow_run_list.py +0 -110
  180. hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_direction.py +0 -37
  181. hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_field.py +0 -39
  182. hatchet_sdk/v0/clients/rest/models/workflow_run_shape.py +0 -186
  183. hatchet_sdk/v0/clients/rest/models/workflow_run_status.py +0 -42
  184. hatchet_sdk/v0/clients/rest/models/workflow_run_triggered_by.py +0 -112
  185. hatchet_sdk/v0/clients/rest/models/workflow_runs_cancel_request.py +0 -85
  186. hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics.py +0 -94
  187. hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics_counts.py +0 -104
  188. hatchet_sdk/v0/clients/rest/models/workflow_tag.py +0 -84
  189. hatchet_sdk/v0/clients/rest/models/workflow_trigger_cron_ref.py +0 -86
  190. hatchet_sdk/v0/clients/rest/models/workflow_trigger_event_ref.py +0 -86
  191. hatchet_sdk/v0/clients/rest/models/workflow_triggers.py +0 -141
  192. hatchet_sdk/v0/clients/rest/models/workflow_update_request.py +0 -85
  193. hatchet_sdk/v0/clients/rest/models/workflow_version.py +0 -170
  194. hatchet_sdk/v0/clients/rest/models/workflow_version_concurrency.py +0 -114
  195. hatchet_sdk/v0/clients/rest/models/workflow_version_definition.py +0 -85
  196. hatchet_sdk/v0/clients/rest/models/workflow_version_meta.py +0 -123
  197. hatchet_sdk/v0/clients/rest/models/workflow_workers_count.py +0 -95
  198. hatchet_sdk/v0/clients/rest/rest.py +0 -187
  199. hatchet_sdk/v0/clients/rest/tenacity_utils.py +0 -39
  200. hatchet_sdk/v0/clients/rest_client.py +0 -622
  201. hatchet_sdk/v0/clients/run_event_listener.py +0 -260
  202. hatchet_sdk/v0/clients/workflow_listener.py +0 -277
  203. hatchet_sdk/v0/connection.py +0 -63
  204. hatchet_sdk/v0/context/__init__.py +0 -1
  205. hatchet_sdk/v0/context/context.py +0 -446
  206. hatchet_sdk/v0/context/worker_context.py +0 -28
  207. hatchet_sdk/v0/features/cron.py +0 -286
  208. hatchet_sdk/v0/features/scheduled.py +0 -248
  209. hatchet_sdk/v0/hatchet.py +0 -310
  210. hatchet_sdk/v0/labels.py +0 -10
  211. hatchet_sdk/v0/loader.py +0 -244
  212. hatchet_sdk/v0/metadata.py +0 -2
  213. hatchet_sdk/v0/opentelemetry/instrumentor.py +0 -393
  214. hatchet_sdk/v0/rate_limit.py +0 -126
  215. hatchet_sdk/v0/semver.py +0 -30
  216. hatchet_sdk/v0/token.py +0 -27
  217. hatchet_sdk/v0/utils/aio_utils.py +0 -137
  218. hatchet_sdk/v0/utils/backoff.py +0 -9
  219. hatchet_sdk/v0/utils/types.py +0 -8
  220. hatchet_sdk/v0/utils/typing.py +0 -12
  221. hatchet_sdk/v0/v2/callable.py +0 -202
  222. hatchet_sdk/v0/v2/concurrency.py +0 -47
  223. hatchet_sdk/v0/v2/hatchet.py +0 -224
  224. hatchet_sdk/v0/worker/__init__.py +0 -1
  225. hatchet_sdk/v0/worker/action_listener_process.py +0 -294
  226. hatchet_sdk/v0/worker/runner/run_loop_manager.py +0 -112
  227. hatchet_sdk/v0/worker/runner/runner.py +0 -460
  228. hatchet_sdk/v0/worker/runner/utils/capture_logs.py +0 -81
  229. hatchet_sdk/v0/worker/runner/utils/error_with_traceback.py +0 -6
  230. hatchet_sdk/v0/worker/worker.py +0 -391
  231. hatchet_sdk/v0/workflow.py +0 -261
  232. hatchet_sdk/v0/workflow_run.py +0 -59
  233. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/WHEEL +0 -0
  234. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/entry_points.txt +0 -0
@@ -1,331 +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.v0.clients.rest.api_client import ApiClient, RequestSerialized
21
- from hatchet_sdk.v0.clients.rest.api_response import ApiResponse
22
- from hatchet_sdk.v0.clients.rest.rest import RESTResponseType
23
-
24
-
25
- class GithubApi:
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 sns_update(
39
- self,
40
- tenant: Annotated[
41
- str,
42
- Field(
43
- min_length=36, strict=True, max_length=36, description="The tenant id"
44
- ),
45
- ],
46
- event: Annotated[
47
- str,
48
- Field(
49
- min_length=1, strict=True, max_length=255, description="The event key"
50
- ),
51
- ],
52
- _request_timeout: Union[
53
- None,
54
- Annotated[StrictFloat, Field(gt=0)],
55
- Tuple[
56
- Annotated[StrictFloat, Field(gt=0)], 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
- ) -> None:
64
- """Github app tenant webhook
65
-
66
- SNS event
67
-
68
- :param tenant: The tenant id (required)
69
- :type tenant: str
70
- :param event: The event key (required)
71
- :type event: str
72
- :param _request_timeout: timeout setting for this request. If one
73
- number provided, it will be total request
74
- timeout. It can also be a pair (tuple) of
75
- (connection, read) timeouts.
76
- :type _request_timeout: int, tuple(int, int), optional
77
- :param _request_auth: set to override the auth_settings for an a single
78
- request; this effectively ignores the
79
- authentication in the spec for a single request.
80
- :type _request_auth: dict, optional
81
- :param _content_type: force content-type for the request.
82
- :type _content_type: str, Optional
83
- :param _headers: set to override the headers for a single
84
- request; this effectively ignores the headers
85
- in the spec for a single request.
86
- :type _headers: dict, optional
87
- :param _host_index: set to override the host_index for a single
88
- request; this effectively ignores the host_index
89
- in the spec for a single request.
90
- :type _host_index: int, optional
91
- :return: Returns the result object.
92
- """ # noqa: E501
93
-
94
- _param = self._sns_update_serialize(
95
- tenant=tenant,
96
- event=event,
97
- _request_auth=_request_auth,
98
- _content_type=_content_type,
99
- _headers=_headers,
100
- _host_index=_host_index,
101
- )
102
-
103
- _response_types_map: Dict[str, Optional[str]] = {
104
- "200": None,
105
- "400": "APIErrors",
106
- "401": "APIErrors",
107
- "405": "APIErrors",
108
- }
109
- response_data = await self.api_client.call_api(
110
- *_param, _request_timeout=_request_timeout
111
- )
112
- await response_data.read()
113
- return self.api_client.response_deserialize(
114
- response_data=response_data,
115
- response_types_map=_response_types_map,
116
- ).data
117
-
118
- @validate_call
119
- async def sns_update_with_http_info(
120
- self,
121
- tenant: Annotated[
122
- str,
123
- Field(
124
- min_length=36, strict=True, max_length=36, description="The tenant id"
125
- ),
126
- ],
127
- event: Annotated[
128
- str,
129
- Field(
130
- min_length=1, strict=True, max_length=255, description="The event key"
131
- ),
132
- ],
133
- _request_timeout: Union[
134
- None,
135
- Annotated[StrictFloat, Field(gt=0)],
136
- Tuple[
137
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
138
- ],
139
- ] = None,
140
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
141
- _content_type: Optional[StrictStr] = None,
142
- _headers: Optional[Dict[StrictStr, Any]] = None,
143
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
144
- ) -> ApiResponse[None]:
145
- """Github app tenant webhook
146
-
147
- SNS event
148
-
149
- :param tenant: The tenant id (required)
150
- :type tenant: str
151
- :param event: The event key (required)
152
- :type event: str
153
- :param _request_timeout: timeout setting for this request. If one
154
- number provided, it will be total request
155
- timeout. It can also be a pair (tuple) of
156
- (connection, read) timeouts.
157
- :type _request_timeout: int, tuple(int, int), optional
158
- :param _request_auth: set to override the auth_settings for an a single
159
- request; this effectively ignores the
160
- authentication in the spec for a single request.
161
- :type _request_auth: dict, optional
162
- :param _content_type: force content-type for the request.
163
- :type _content_type: str, Optional
164
- :param _headers: set to override the headers for a single
165
- request; this effectively ignores the headers
166
- in the spec for a single request.
167
- :type _headers: dict, optional
168
- :param _host_index: set to override the host_index for a single
169
- request; this effectively ignores the host_index
170
- in the spec for a single request.
171
- :type _host_index: int, optional
172
- :return: Returns the result object.
173
- """ # noqa: E501
174
-
175
- _param = self._sns_update_serialize(
176
- tenant=tenant,
177
- event=event,
178
- _request_auth=_request_auth,
179
- _content_type=_content_type,
180
- _headers=_headers,
181
- _host_index=_host_index,
182
- )
183
-
184
- _response_types_map: Dict[str, Optional[str]] = {
185
- "200": None,
186
- "400": "APIErrors",
187
- "401": "APIErrors",
188
- "405": "APIErrors",
189
- }
190
- response_data = await self.api_client.call_api(
191
- *_param, _request_timeout=_request_timeout
192
- )
193
- await response_data.read()
194
- return self.api_client.response_deserialize(
195
- response_data=response_data,
196
- response_types_map=_response_types_map,
197
- )
198
-
199
- @validate_call
200
- async def sns_update_without_preload_content(
201
- self,
202
- tenant: Annotated[
203
- str,
204
- Field(
205
- min_length=36, strict=True, max_length=36, description="The tenant id"
206
- ),
207
- ],
208
- event: Annotated[
209
- str,
210
- Field(
211
- min_length=1, strict=True, max_length=255, description="The event key"
212
- ),
213
- ],
214
- _request_timeout: Union[
215
- None,
216
- Annotated[StrictFloat, Field(gt=0)],
217
- Tuple[
218
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
219
- ],
220
- ] = None,
221
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
222
- _content_type: Optional[StrictStr] = None,
223
- _headers: Optional[Dict[StrictStr, Any]] = None,
224
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
225
- ) -> RESTResponseType:
226
- """Github app tenant webhook
227
-
228
- SNS event
229
-
230
- :param tenant: The tenant id (required)
231
- :type tenant: str
232
- :param event: The event key (required)
233
- :type event: str
234
- :param _request_timeout: timeout setting for this request. If one
235
- number provided, it will be total request
236
- timeout. It can also be a pair (tuple) of
237
- (connection, read) timeouts.
238
- :type _request_timeout: int, tuple(int, int), optional
239
- :param _request_auth: set to override the auth_settings for an a single
240
- request; this effectively ignores the
241
- authentication in the spec for a single request.
242
- :type _request_auth: dict, optional
243
- :param _content_type: force content-type for the request.
244
- :type _content_type: str, Optional
245
- :param _headers: set to override the headers for a single
246
- request; this effectively ignores the headers
247
- in the spec for a single request.
248
- :type _headers: dict, optional
249
- :param _host_index: set to override the host_index for a single
250
- request; this effectively ignores the host_index
251
- in the spec for a single request.
252
- :type _host_index: int, optional
253
- :return: Returns the result object.
254
- """ # noqa: E501
255
-
256
- _param = self._sns_update_serialize(
257
- tenant=tenant,
258
- event=event,
259
- _request_auth=_request_auth,
260
- _content_type=_content_type,
261
- _headers=_headers,
262
- _host_index=_host_index,
263
- )
264
-
265
- _response_types_map: Dict[str, Optional[str]] = {
266
- "200": None,
267
- "400": "APIErrors",
268
- "401": "APIErrors",
269
- "405": "APIErrors",
270
- }
271
- response_data = await self.api_client.call_api(
272
- *_param, _request_timeout=_request_timeout
273
- )
274
- return response_data.response
275
-
276
- def _sns_update_serialize(
277
- self,
278
- tenant,
279
- event,
280
- _request_auth,
281
- _content_type,
282
- _headers,
283
- _host_index,
284
- ) -> RequestSerialized:
285
-
286
- _host = None
287
-
288
- _collection_formats: Dict[str, str] = {}
289
-
290
- _path_params: Dict[str, str] = {}
291
- _query_params: List[Tuple[str, str]] = []
292
- _header_params: Dict[str, Optional[str]] = _headers or {}
293
- _form_params: List[Tuple[str, str]] = []
294
- _files: Dict[
295
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
296
- ] = {}
297
- _body_params: Optional[bytes] = None
298
-
299
- # process the path parameters
300
- if tenant is not None:
301
- _path_params["tenant"] = tenant
302
- if event is not None:
303
- _path_params["event"] = event
304
- # process the query parameters
305
- # process the header parameters
306
- # process the form parameters
307
- # process the body parameter
308
-
309
- # set the HTTP header `Accept`
310
- if "Accept" not in _header_params:
311
- _header_params["Accept"] = self.api_client.select_header_accept(
312
- ["application/json"]
313
- )
314
-
315
- # authentication setting
316
- _auth_settings: List[str] = []
317
-
318
- return self.api_client.param_serialize(
319
- method="POST",
320
- resource_path="/api/v1/sns/{tenant}/{event}",
321
- path_params=_path_params,
322
- query_params=_query_params,
323
- header_params=_header_params,
324
- body=_body_params,
325
- post_params=_form_params,
326
- files=_files,
327
- auth_settings=_auth_settings,
328
- collection_formats=_collection_formats,
329
- _host=_host,
330
- _request_auth=_request_auth,
331
- )