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,2259 +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.models.info_get_version200_response import (
23
- InfoGetVersion200Response,
24
- )
25
- from hatchet_sdk.v0.clients.rest.models.tenant_invite import TenantInvite
26
- from hatchet_sdk.v0.clients.rest.models.update_tenant_invite_request import (
27
- UpdateTenantInviteRequest,
28
- )
29
- from hatchet_sdk.v0.clients.rest.models.webhook_worker_create_request import (
30
- WebhookWorkerCreateRequest,
31
- )
32
- from hatchet_sdk.v0.clients.rest.models.webhook_worker_created import (
33
- WebhookWorkerCreated,
34
- )
35
- from hatchet_sdk.v0.clients.rest.models.webhook_worker_list_response import (
36
- WebhookWorkerListResponse,
37
- )
38
- from hatchet_sdk.v0.clients.rest.models.webhook_worker_request_list_response import (
39
- WebhookWorkerRequestListResponse,
40
- )
41
- from hatchet_sdk.v0.clients.rest.rest import RESTResponseType
42
-
43
-
44
- class DefaultApi:
45
- """NOTE: This class is auto generated by OpenAPI Generator
46
- Ref: https://openapi-generator.tech
47
-
48
- Do not edit the class manually.
49
- """
50
-
51
- def __init__(self, api_client=None) -> None:
52
- if api_client is None:
53
- api_client = ApiClient.get_default()
54
- self.api_client = api_client
55
-
56
- @validate_call
57
- async def info_get_version(
58
- self,
59
- _request_timeout: Union[
60
- None,
61
- Annotated[StrictFloat, Field(gt=0)],
62
- Tuple[
63
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
64
- ],
65
- ] = None,
66
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
- _content_type: Optional[StrictStr] = None,
68
- _headers: Optional[Dict[StrictStr, Any]] = None,
69
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
- ) -> InfoGetVersion200Response:
71
- """We return the version for the currently running server
72
-
73
- Get the version of the server
74
-
75
- :param _request_timeout: timeout setting for this request. If one
76
- number provided, it will be total request
77
- timeout. It can also be a pair (tuple) of
78
- (connection, read) timeouts.
79
- :type _request_timeout: int, tuple(int, int), optional
80
- :param _request_auth: set to override the auth_settings for an a single
81
- request; this effectively ignores the
82
- authentication in the spec for a single request.
83
- :type _request_auth: dict, optional
84
- :param _content_type: force content-type for the request.
85
- :type _content_type: str, Optional
86
- :param _headers: set to override the headers for a single
87
- request; this effectively ignores the headers
88
- in the spec for a single request.
89
- :type _headers: dict, optional
90
- :param _host_index: set to override the host_index for a single
91
- request; this effectively ignores the host_index
92
- in the spec for a single request.
93
- :type _host_index: int, optional
94
- :return: Returns the result object.
95
- """ # noqa: E501
96
-
97
- _param = self._info_get_version_serialize(
98
- _request_auth=_request_auth,
99
- _content_type=_content_type,
100
- _headers=_headers,
101
- _host_index=_host_index,
102
- )
103
-
104
- _response_types_map: Dict[str, Optional[str]] = {
105
- "200": "InfoGetVersion200Response",
106
- }
107
- response_data = await self.api_client.call_api(
108
- *_param, _request_timeout=_request_timeout
109
- )
110
- await response_data.read()
111
- return self.api_client.response_deserialize(
112
- response_data=response_data,
113
- response_types_map=_response_types_map,
114
- ).data
115
-
116
- @validate_call
117
- async def info_get_version_with_http_info(
118
- self,
119
- _request_timeout: Union[
120
- None,
121
- Annotated[StrictFloat, Field(gt=0)],
122
- Tuple[
123
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
124
- ],
125
- ] = None,
126
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
- _content_type: Optional[StrictStr] = None,
128
- _headers: Optional[Dict[StrictStr, Any]] = None,
129
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
- ) -> ApiResponse[InfoGetVersion200Response]:
131
- """We return the version for the currently running server
132
-
133
- Get the version of the server
134
-
135
- :param _request_timeout: timeout setting for this request. If one
136
- number provided, it will be total request
137
- timeout. It can also be a pair (tuple) of
138
- (connection, read) timeouts.
139
- :type _request_timeout: int, tuple(int, int), optional
140
- :param _request_auth: set to override the auth_settings for an a single
141
- request; this effectively ignores the
142
- authentication in the spec for a single request.
143
- :type _request_auth: dict, optional
144
- :param _content_type: force content-type for the request.
145
- :type _content_type: str, Optional
146
- :param _headers: set to override the headers for a single
147
- request; this effectively ignores the headers
148
- in the spec for a single request.
149
- :type _headers: dict, optional
150
- :param _host_index: set to override the host_index for a single
151
- request; this effectively ignores the host_index
152
- in the spec for a single request.
153
- :type _host_index: int, optional
154
- :return: Returns the result object.
155
- """ # noqa: E501
156
-
157
- _param = self._info_get_version_serialize(
158
- _request_auth=_request_auth,
159
- _content_type=_content_type,
160
- _headers=_headers,
161
- _host_index=_host_index,
162
- )
163
-
164
- _response_types_map: Dict[str, Optional[str]] = {
165
- "200": "InfoGetVersion200Response",
166
- }
167
- response_data = await self.api_client.call_api(
168
- *_param, _request_timeout=_request_timeout
169
- )
170
- await response_data.read()
171
- return self.api_client.response_deserialize(
172
- response_data=response_data,
173
- response_types_map=_response_types_map,
174
- )
175
-
176
- @validate_call
177
- async def info_get_version_without_preload_content(
178
- self,
179
- _request_timeout: Union[
180
- None,
181
- Annotated[StrictFloat, Field(gt=0)],
182
- Tuple[
183
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
184
- ],
185
- ] = None,
186
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
187
- _content_type: Optional[StrictStr] = None,
188
- _headers: Optional[Dict[StrictStr, Any]] = None,
189
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
190
- ) -> RESTResponseType:
191
- """We return the version for the currently running server
192
-
193
- Get the version of the server
194
-
195
- :param _request_timeout: timeout setting for this request. If one
196
- number provided, it will be total request
197
- timeout. It can also be a pair (tuple) of
198
- (connection, read) timeouts.
199
- :type _request_timeout: int, tuple(int, int), optional
200
- :param _request_auth: set to override the auth_settings for an a single
201
- request; this effectively ignores the
202
- authentication in the spec for a single request.
203
- :type _request_auth: dict, optional
204
- :param _content_type: force content-type for the request.
205
- :type _content_type: str, Optional
206
- :param _headers: set to override the headers for a single
207
- request; this effectively ignores the headers
208
- in the spec for a single request.
209
- :type _headers: dict, optional
210
- :param _host_index: set to override the host_index for a single
211
- request; this effectively ignores the host_index
212
- in the spec for a single request.
213
- :type _host_index: int, optional
214
- :return: Returns the result object.
215
- """ # noqa: E501
216
-
217
- _param = self._info_get_version_serialize(
218
- _request_auth=_request_auth,
219
- _content_type=_content_type,
220
- _headers=_headers,
221
- _host_index=_host_index,
222
- )
223
-
224
- _response_types_map: Dict[str, Optional[str]] = {
225
- "200": "InfoGetVersion200Response",
226
- }
227
- response_data = await self.api_client.call_api(
228
- *_param, _request_timeout=_request_timeout
229
- )
230
- return response_data.response
231
-
232
- def _info_get_version_serialize(
233
- self,
234
- _request_auth,
235
- _content_type,
236
- _headers,
237
- _host_index,
238
- ) -> RequestSerialized:
239
-
240
- _host = None
241
-
242
- _collection_formats: Dict[str, str] = {}
243
-
244
- _path_params: Dict[str, str] = {}
245
- _query_params: List[Tuple[str, str]] = []
246
- _header_params: Dict[str, Optional[str]] = _headers or {}
247
- _form_params: List[Tuple[str, str]] = []
248
- _files: Dict[
249
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
250
- ] = {}
251
- _body_params: Optional[bytes] = None
252
-
253
- # process the path parameters
254
- # process the query parameters
255
- # process the header parameters
256
- # process the form parameters
257
- # process the body parameter
258
-
259
- # set the HTTP header `Accept`
260
- if "Accept" not in _header_params:
261
- _header_params["Accept"] = self.api_client.select_header_accept(
262
- ["application/json"]
263
- )
264
-
265
- # authentication setting
266
- _auth_settings: List[str] = []
267
-
268
- return self.api_client.param_serialize(
269
- method="GET",
270
- resource_path="/api/v1/version",
271
- path_params=_path_params,
272
- query_params=_query_params,
273
- header_params=_header_params,
274
- body=_body_params,
275
- post_params=_form_params,
276
- files=_files,
277
- auth_settings=_auth_settings,
278
- collection_formats=_collection_formats,
279
- _host=_host,
280
- _request_auth=_request_auth,
281
- )
282
-
283
- @validate_call
284
- async def monitoring_post_run_probe(
285
- self,
286
- tenant: Annotated[
287
- str,
288
- Field(
289
- min_length=36, strict=True, max_length=36, description="The tenant id"
290
- ),
291
- ],
292
- _request_timeout: Union[
293
- None,
294
- Annotated[StrictFloat, Field(gt=0)],
295
- Tuple[
296
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
297
- ],
298
- ] = None,
299
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
300
- _content_type: Optional[StrictStr] = None,
301
- _headers: Optional[Dict[StrictStr, Any]] = None,
302
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
303
- ) -> None:
304
- """Detailed Health Probe For the Instance
305
-
306
- Triggers a workflow to check the status of the instance
307
-
308
- :param tenant: The tenant id (required)
309
- :type tenant: str
310
- :param _request_timeout: timeout setting for this request. If one
311
- number provided, it will be total request
312
- timeout. It can also be a pair (tuple) of
313
- (connection, read) timeouts.
314
- :type _request_timeout: int, tuple(int, int), optional
315
- :param _request_auth: set to override the auth_settings for an a single
316
- request; this effectively ignores the
317
- authentication in the spec for a single request.
318
- :type _request_auth: dict, optional
319
- :param _content_type: force content-type for the request.
320
- :type _content_type: str, Optional
321
- :param _headers: set to override the headers for a single
322
- request; this effectively ignores the headers
323
- in the spec for a single request.
324
- :type _headers: dict, optional
325
- :param _host_index: set to override the host_index for a single
326
- request; this effectively ignores the host_index
327
- in the spec for a single request.
328
- :type _host_index: int, optional
329
- :return: Returns the result object.
330
- """ # noqa: E501
331
-
332
- _param = self._monitoring_post_run_probe_serialize(
333
- tenant=tenant,
334
- _request_auth=_request_auth,
335
- _content_type=_content_type,
336
- _headers=_headers,
337
- _host_index=_host_index,
338
- )
339
-
340
- _response_types_map: Dict[str, Optional[str]] = {
341
- "200": None,
342
- "403": "APIErrors",
343
- }
344
- response_data = await self.api_client.call_api(
345
- *_param, _request_timeout=_request_timeout
346
- )
347
- await response_data.read()
348
- return self.api_client.response_deserialize(
349
- response_data=response_data,
350
- response_types_map=_response_types_map,
351
- ).data
352
-
353
- @validate_call
354
- async def monitoring_post_run_probe_with_http_info(
355
- self,
356
- tenant: Annotated[
357
- str,
358
- Field(
359
- min_length=36, strict=True, max_length=36, description="The tenant id"
360
- ),
361
- ],
362
- _request_timeout: Union[
363
- None,
364
- Annotated[StrictFloat, Field(gt=0)],
365
- Tuple[
366
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
367
- ],
368
- ] = None,
369
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
370
- _content_type: Optional[StrictStr] = None,
371
- _headers: Optional[Dict[StrictStr, Any]] = None,
372
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
373
- ) -> ApiResponse[None]:
374
- """Detailed Health Probe For the Instance
375
-
376
- Triggers a workflow to check the status of the instance
377
-
378
- :param tenant: The tenant id (required)
379
- :type tenant: str
380
- :param _request_timeout: timeout setting for this request. If one
381
- number provided, it will be total request
382
- timeout. It can also be a pair (tuple) of
383
- (connection, read) timeouts.
384
- :type _request_timeout: int, tuple(int, int), optional
385
- :param _request_auth: set to override the auth_settings for an a single
386
- request; this effectively ignores the
387
- authentication in the spec for a single request.
388
- :type _request_auth: dict, optional
389
- :param _content_type: force content-type for the request.
390
- :type _content_type: str, Optional
391
- :param _headers: set to override the headers for a single
392
- request; this effectively ignores the headers
393
- in the spec for a single request.
394
- :type _headers: dict, optional
395
- :param _host_index: set to override the host_index for a single
396
- request; this effectively ignores the host_index
397
- in the spec for a single request.
398
- :type _host_index: int, optional
399
- :return: Returns the result object.
400
- """ # noqa: E501
401
-
402
- _param = self._monitoring_post_run_probe_serialize(
403
- tenant=tenant,
404
- _request_auth=_request_auth,
405
- _content_type=_content_type,
406
- _headers=_headers,
407
- _host_index=_host_index,
408
- )
409
-
410
- _response_types_map: Dict[str, Optional[str]] = {
411
- "200": None,
412
- "403": "APIErrors",
413
- }
414
- response_data = await self.api_client.call_api(
415
- *_param, _request_timeout=_request_timeout
416
- )
417
- await response_data.read()
418
- return self.api_client.response_deserialize(
419
- response_data=response_data,
420
- response_types_map=_response_types_map,
421
- )
422
-
423
- @validate_call
424
- async def monitoring_post_run_probe_without_preload_content(
425
- self,
426
- tenant: Annotated[
427
- str,
428
- Field(
429
- min_length=36, strict=True, max_length=36, description="The tenant id"
430
- ),
431
- ],
432
- _request_timeout: Union[
433
- None,
434
- Annotated[StrictFloat, Field(gt=0)],
435
- Tuple[
436
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
437
- ],
438
- ] = None,
439
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
440
- _content_type: Optional[StrictStr] = None,
441
- _headers: Optional[Dict[StrictStr, Any]] = None,
442
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
443
- ) -> RESTResponseType:
444
- """Detailed Health Probe For the Instance
445
-
446
- Triggers a workflow to check the status of the instance
447
-
448
- :param tenant: The tenant id (required)
449
- :type tenant: str
450
- :param _request_timeout: timeout setting for this request. If one
451
- number provided, it will be total request
452
- timeout. It can also be a pair (tuple) of
453
- (connection, read) timeouts.
454
- :type _request_timeout: int, tuple(int, int), optional
455
- :param _request_auth: set to override the auth_settings for an a single
456
- request; this effectively ignores the
457
- authentication in the spec for a single request.
458
- :type _request_auth: dict, optional
459
- :param _content_type: force content-type for the request.
460
- :type _content_type: str, Optional
461
- :param _headers: set to override the headers for a single
462
- request; this effectively ignores the headers
463
- in the spec for a single request.
464
- :type _headers: dict, optional
465
- :param _host_index: set to override the host_index for a single
466
- request; this effectively ignores the host_index
467
- in the spec for a single request.
468
- :type _host_index: int, optional
469
- :return: Returns the result object.
470
- """ # noqa: E501
471
-
472
- _param = self._monitoring_post_run_probe_serialize(
473
- tenant=tenant,
474
- _request_auth=_request_auth,
475
- _content_type=_content_type,
476
- _headers=_headers,
477
- _host_index=_host_index,
478
- )
479
-
480
- _response_types_map: Dict[str, Optional[str]] = {
481
- "200": None,
482
- "403": "APIErrors",
483
- }
484
- response_data = await self.api_client.call_api(
485
- *_param, _request_timeout=_request_timeout
486
- )
487
- return response_data.response
488
-
489
- def _monitoring_post_run_probe_serialize(
490
- self,
491
- tenant,
492
- _request_auth,
493
- _content_type,
494
- _headers,
495
- _host_index,
496
- ) -> RequestSerialized:
497
-
498
- _host = None
499
-
500
- _collection_formats: Dict[str, str] = {}
501
-
502
- _path_params: Dict[str, str] = {}
503
- _query_params: List[Tuple[str, str]] = []
504
- _header_params: Dict[str, Optional[str]] = _headers or {}
505
- _form_params: List[Tuple[str, str]] = []
506
- _files: Dict[
507
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
508
- ] = {}
509
- _body_params: Optional[bytes] = None
510
-
511
- # process the path parameters
512
- if tenant is not None:
513
- _path_params["tenant"] = tenant
514
- # process the query parameters
515
- # process the header parameters
516
- # process the form parameters
517
- # process the body parameter
518
-
519
- # set the HTTP header `Accept`
520
- if "Accept" not in _header_params:
521
- _header_params["Accept"] = self.api_client.select_header_accept(
522
- ["application/json"]
523
- )
524
-
525
- # authentication setting
526
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
527
-
528
- return self.api_client.param_serialize(
529
- method="POST",
530
- resource_path="/api/v1/monitoring/{tenant}/probe",
531
- path_params=_path_params,
532
- query_params=_query_params,
533
- header_params=_header_params,
534
- body=_body_params,
535
- post_params=_form_params,
536
- files=_files,
537
- auth_settings=_auth_settings,
538
- collection_formats=_collection_formats,
539
- _host=_host,
540
- _request_auth=_request_auth,
541
- )
542
-
543
- @validate_call
544
- async def tenant_invite_delete(
545
- self,
546
- tenant: Annotated[
547
- str,
548
- Field(
549
- min_length=36, strict=True, max_length=36, description="The tenant id"
550
- ),
551
- ],
552
- tenant_invite: Annotated[
553
- str,
554
- Field(
555
- min_length=36,
556
- strict=True,
557
- max_length=36,
558
- description="The tenant invite id",
559
- ),
560
- ],
561
- _request_timeout: Union[
562
- None,
563
- Annotated[StrictFloat, Field(gt=0)],
564
- Tuple[
565
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
566
- ],
567
- ] = None,
568
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
569
- _content_type: Optional[StrictStr] = None,
570
- _headers: Optional[Dict[StrictStr, Any]] = None,
571
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
572
- ) -> TenantInvite:
573
- """Delete invite
574
-
575
- Deletes a tenant invite
576
-
577
- :param tenant: The tenant id (required)
578
- :type tenant: str
579
- :param tenant_invite: The tenant invite id (required)
580
- :type tenant_invite: str
581
- :param _request_timeout: timeout setting for this request. If one
582
- number provided, it will be total request
583
- timeout. It can also be a pair (tuple) of
584
- (connection, read) timeouts.
585
- :type _request_timeout: int, tuple(int, int), optional
586
- :param _request_auth: set to override the auth_settings for an a single
587
- request; this effectively ignores the
588
- authentication in the spec for a single request.
589
- :type _request_auth: dict, optional
590
- :param _content_type: force content-type for the request.
591
- :type _content_type: str, Optional
592
- :param _headers: set to override the headers for a single
593
- request; this effectively ignores the headers
594
- in the spec for a single request.
595
- :type _headers: dict, optional
596
- :param _host_index: set to override the host_index for a single
597
- request; this effectively ignores the host_index
598
- in the spec for a single request.
599
- :type _host_index: int, optional
600
- :return: Returns the result object.
601
- """ # noqa: E501
602
-
603
- _param = self._tenant_invite_delete_serialize(
604
- tenant=tenant,
605
- tenant_invite=tenant_invite,
606
- _request_auth=_request_auth,
607
- _content_type=_content_type,
608
- _headers=_headers,
609
- _host_index=_host_index,
610
- )
611
-
612
- _response_types_map: Dict[str, Optional[str]] = {
613
- "200": "TenantInvite",
614
- "400": "APIErrors",
615
- }
616
- response_data = await self.api_client.call_api(
617
- *_param, _request_timeout=_request_timeout
618
- )
619
- await response_data.read()
620
- return self.api_client.response_deserialize(
621
- response_data=response_data,
622
- response_types_map=_response_types_map,
623
- ).data
624
-
625
- @validate_call
626
- async def tenant_invite_delete_with_http_info(
627
- self,
628
- tenant: Annotated[
629
- str,
630
- Field(
631
- min_length=36, strict=True, max_length=36, description="The tenant id"
632
- ),
633
- ],
634
- tenant_invite: Annotated[
635
- str,
636
- Field(
637
- min_length=36,
638
- strict=True,
639
- max_length=36,
640
- description="The tenant invite id",
641
- ),
642
- ],
643
- _request_timeout: Union[
644
- None,
645
- Annotated[StrictFloat, Field(gt=0)],
646
- Tuple[
647
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
648
- ],
649
- ] = None,
650
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
651
- _content_type: Optional[StrictStr] = None,
652
- _headers: Optional[Dict[StrictStr, Any]] = None,
653
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
654
- ) -> ApiResponse[TenantInvite]:
655
- """Delete invite
656
-
657
- Deletes a tenant invite
658
-
659
- :param tenant: The tenant id (required)
660
- :type tenant: str
661
- :param tenant_invite: The tenant invite id (required)
662
- :type tenant_invite: str
663
- :param _request_timeout: timeout setting for this request. If one
664
- number provided, it will be total request
665
- timeout. It can also be a pair (tuple) of
666
- (connection, read) timeouts.
667
- :type _request_timeout: int, tuple(int, int), optional
668
- :param _request_auth: set to override the auth_settings for an a single
669
- request; this effectively ignores the
670
- authentication in the spec for a single request.
671
- :type _request_auth: dict, optional
672
- :param _content_type: force content-type for the request.
673
- :type _content_type: str, Optional
674
- :param _headers: set to override the headers for a single
675
- request; this effectively ignores the headers
676
- in the spec for a single request.
677
- :type _headers: dict, optional
678
- :param _host_index: set to override the host_index for a single
679
- request; this effectively ignores the host_index
680
- in the spec for a single request.
681
- :type _host_index: int, optional
682
- :return: Returns the result object.
683
- """ # noqa: E501
684
-
685
- _param = self._tenant_invite_delete_serialize(
686
- tenant=tenant,
687
- tenant_invite=tenant_invite,
688
- _request_auth=_request_auth,
689
- _content_type=_content_type,
690
- _headers=_headers,
691
- _host_index=_host_index,
692
- )
693
-
694
- _response_types_map: Dict[str, Optional[str]] = {
695
- "200": "TenantInvite",
696
- "400": "APIErrors",
697
- }
698
- response_data = await self.api_client.call_api(
699
- *_param, _request_timeout=_request_timeout
700
- )
701
- await response_data.read()
702
- return self.api_client.response_deserialize(
703
- response_data=response_data,
704
- response_types_map=_response_types_map,
705
- )
706
-
707
- @validate_call
708
- async def tenant_invite_delete_without_preload_content(
709
- self,
710
- tenant: Annotated[
711
- str,
712
- Field(
713
- min_length=36, strict=True, max_length=36, description="The tenant id"
714
- ),
715
- ],
716
- tenant_invite: Annotated[
717
- str,
718
- Field(
719
- min_length=36,
720
- strict=True,
721
- max_length=36,
722
- description="The tenant invite id",
723
- ),
724
- ],
725
- _request_timeout: Union[
726
- None,
727
- Annotated[StrictFloat, Field(gt=0)],
728
- Tuple[
729
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
730
- ],
731
- ] = None,
732
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
733
- _content_type: Optional[StrictStr] = None,
734
- _headers: Optional[Dict[StrictStr, Any]] = None,
735
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
736
- ) -> RESTResponseType:
737
- """Delete invite
738
-
739
- Deletes a tenant invite
740
-
741
- :param tenant: The tenant id (required)
742
- :type tenant: str
743
- :param tenant_invite: The tenant invite id (required)
744
- :type tenant_invite: str
745
- :param _request_timeout: timeout setting for this request. If one
746
- number provided, it will be total request
747
- timeout. It can also be a pair (tuple) of
748
- (connection, read) timeouts.
749
- :type _request_timeout: int, tuple(int, int), optional
750
- :param _request_auth: set to override the auth_settings for an a single
751
- request; this effectively ignores the
752
- authentication in the spec for a single request.
753
- :type _request_auth: dict, optional
754
- :param _content_type: force content-type for the request.
755
- :type _content_type: str, Optional
756
- :param _headers: set to override the headers for a single
757
- request; this effectively ignores the headers
758
- in the spec for a single request.
759
- :type _headers: dict, optional
760
- :param _host_index: set to override the host_index for a single
761
- request; this effectively ignores the host_index
762
- in the spec for a single request.
763
- :type _host_index: int, optional
764
- :return: Returns the result object.
765
- """ # noqa: E501
766
-
767
- _param = self._tenant_invite_delete_serialize(
768
- tenant=tenant,
769
- tenant_invite=tenant_invite,
770
- _request_auth=_request_auth,
771
- _content_type=_content_type,
772
- _headers=_headers,
773
- _host_index=_host_index,
774
- )
775
-
776
- _response_types_map: Dict[str, Optional[str]] = {
777
- "200": "TenantInvite",
778
- "400": "APIErrors",
779
- }
780
- response_data = await self.api_client.call_api(
781
- *_param, _request_timeout=_request_timeout
782
- )
783
- return response_data.response
784
-
785
- def _tenant_invite_delete_serialize(
786
- self,
787
- tenant,
788
- tenant_invite,
789
- _request_auth,
790
- _content_type,
791
- _headers,
792
- _host_index,
793
- ) -> RequestSerialized:
794
-
795
- _host = None
796
-
797
- _collection_formats: Dict[str, str] = {}
798
-
799
- _path_params: Dict[str, str] = {}
800
- _query_params: List[Tuple[str, str]] = []
801
- _header_params: Dict[str, Optional[str]] = _headers or {}
802
- _form_params: List[Tuple[str, str]] = []
803
- _files: Dict[
804
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
805
- ] = {}
806
- _body_params: Optional[bytes] = None
807
-
808
- # process the path parameters
809
- if tenant is not None:
810
- _path_params["tenant"] = tenant
811
- if tenant_invite is not None:
812
- _path_params["tenant-invite"] = tenant_invite
813
- # process the query parameters
814
- # process the header parameters
815
- # process the form parameters
816
- # process the body parameter
817
-
818
- # set the HTTP header `Accept`
819
- if "Accept" not in _header_params:
820
- _header_params["Accept"] = self.api_client.select_header_accept(
821
- ["application/json"]
822
- )
823
-
824
- # authentication setting
825
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
826
-
827
- return self.api_client.param_serialize(
828
- method="DELETE",
829
- resource_path="/api/v1/tenants/{tenant}/invites/{tenant-invite}",
830
- path_params=_path_params,
831
- query_params=_query_params,
832
- header_params=_header_params,
833
- body=_body_params,
834
- post_params=_form_params,
835
- files=_files,
836
- auth_settings=_auth_settings,
837
- collection_formats=_collection_formats,
838
- _host=_host,
839
- _request_auth=_request_auth,
840
- )
841
-
842
- @validate_call
843
- async def tenant_invite_update(
844
- self,
845
- tenant: Annotated[
846
- str,
847
- Field(
848
- min_length=36, strict=True, max_length=36, description="The tenant id"
849
- ),
850
- ],
851
- tenant_invite: Annotated[
852
- str,
853
- Field(
854
- min_length=36,
855
- strict=True,
856
- max_length=36,
857
- description="The tenant invite id",
858
- ),
859
- ],
860
- update_tenant_invite_request: Annotated[
861
- UpdateTenantInviteRequest, Field(description="The tenant invite to update")
862
- ],
863
- _request_timeout: Union[
864
- None,
865
- Annotated[StrictFloat, Field(gt=0)],
866
- Tuple[
867
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
868
- ],
869
- ] = None,
870
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
871
- _content_type: Optional[StrictStr] = None,
872
- _headers: Optional[Dict[StrictStr, Any]] = None,
873
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
874
- ) -> TenantInvite:
875
- """Update invite
876
-
877
- Updates a tenant invite
878
-
879
- :param tenant: The tenant id (required)
880
- :type tenant: str
881
- :param tenant_invite: The tenant invite id (required)
882
- :type tenant_invite: str
883
- :param update_tenant_invite_request: The tenant invite to update (required)
884
- :type update_tenant_invite_request: UpdateTenantInviteRequest
885
- :param _request_timeout: timeout setting for this request. If one
886
- number provided, it will be total request
887
- timeout. It can also be a pair (tuple) of
888
- (connection, read) timeouts.
889
- :type _request_timeout: int, tuple(int, int), optional
890
- :param _request_auth: set to override the auth_settings for an a single
891
- request; this effectively ignores the
892
- authentication in the spec for a single request.
893
- :type _request_auth: dict, optional
894
- :param _content_type: force content-type for the request.
895
- :type _content_type: str, Optional
896
- :param _headers: set to override the headers for a single
897
- request; this effectively ignores the headers
898
- in the spec for a single request.
899
- :type _headers: dict, optional
900
- :param _host_index: set to override the host_index for a single
901
- request; this effectively ignores the host_index
902
- in the spec for a single request.
903
- :type _host_index: int, optional
904
- :return: Returns the result object.
905
- """ # noqa: E501
906
-
907
- _param = self._tenant_invite_update_serialize(
908
- tenant=tenant,
909
- tenant_invite=tenant_invite,
910
- update_tenant_invite_request=update_tenant_invite_request,
911
- _request_auth=_request_auth,
912
- _content_type=_content_type,
913
- _headers=_headers,
914
- _host_index=_host_index,
915
- )
916
-
917
- _response_types_map: Dict[str, Optional[str]] = {
918
- "200": "TenantInvite",
919
- "400": "APIErrors",
920
- }
921
- response_data = await self.api_client.call_api(
922
- *_param, _request_timeout=_request_timeout
923
- )
924
- await response_data.read()
925
- return self.api_client.response_deserialize(
926
- response_data=response_data,
927
- response_types_map=_response_types_map,
928
- ).data
929
-
930
- @validate_call
931
- async def tenant_invite_update_with_http_info(
932
- self,
933
- tenant: Annotated[
934
- str,
935
- Field(
936
- min_length=36, strict=True, max_length=36, description="The tenant id"
937
- ),
938
- ],
939
- tenant_invite: Annotated[
940
- str,
941
- Field(
942
- min_length=36,
943
- strict=True,
944
- max_length=36,
945
- description="The tenant invite id",
946
- ),
947
- ],
948
- update_tenant_invite_request: Annotated[
949
- UpdateTenantInviteRequest, Field(description="The tenant invite to update")
950
- ],
951
- _request_timeout: Union[
952
- None,
953
- Annotated[StrictFloat, Field(gt=0)],
954
- Tuple[
955
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
956
- ],
957
- ] = None,
958
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
959
- _content_type: Optional[StrictStr] = None,
960
- _headers: Optional[Dict[StrictStr, Any]] = None,
961
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
962
- ) -> ApiResponse[TenantInvite]:
963
- """Update invite
964
-
965
- Updates a tenant invite
966
-
967
- :param tenant: The tenant id (required)
968
- :type tenant: str
969
- :param tenant_invite: The tenant invite id (required)
970
- :type tenant_invite: str
971
- :param update_tenant_invite_request: The tenant invite to update (required)
972
- :type update_tenant_invite_request: UpdateTenantInviteRequest
973
- :param _request_timeout: timeout setting for this request. If one
974
- number provided, it will be total request
975
- timeout. It can also be a pair (tuple) of
976
- (connection, read) timeouts.
977
- :type _request_timeout: int, tuple(int, int), optional
978
- :param _request_auth: set to override the auth_settings for an a single
979
- request; this effectively ignores the
980
- authentication in the spec for a single request.
981
- :type _request_auth: dict, optional
982
- :param _content_type: force content-type for the request.
983
- :type _content_type: str, Optional
984
- :param _headers: set to override the headers for a single
985
- request; this effectively ignores the headers
986
- in the spec for a single request.
987
- :type _headers: dict, optional
988
- :param _host_index: set to override the host_index for a single
989
- request; this effectively ignores the host_index
990
- in the spec for a single request.
991
- :type _host_index: int, optional
992
- :return: Returns the result object.
993
- """ # noqa: E501
994
-
995
- _param = self._tenant_invite_update_serialize(
996
- tenant=tenant,
997
- tenant_invite=tenant_invite,
998
- update_tenant_invite_request=update_tenant_invite_request,
999
- _request_auth=_request_auth,
1000
- _content_type=_content_type,
1001
- _headers=_headers,
1002
- _host_index=_host_index,
1003
- )
1004
-
1005
- _response_types_map: Dict[str, Optional[str]] = {
1006
- "200": "TenantInvite",
1007
- "400": "APIErrors",
1008
- }
1009
- response_data = await self.api_client.call_api(
1010
- *_param, _request_timeout=_request_timeout
1011
- )
1012
- await response_data.read()
1013
- return self.api_client.response_deserialize(
1014
- response_data=response_data,
1015
- response_types_map=_response_types_map,
1016
- )
1017
-
1018
- @validate_call
1019
- async def tenant_invite_update_without_preload_content(
1020
- self,
1021
- tenant: Annotated[
1022
- str,
1023
- Field(
1024
- min_length=36, strict=True, max_length=36, description="The tenant id"
1025
- ),
1026
- ],
1027
- tenant_invite: Annotated[
1028
- str,
1029
- Field(
1030
- min_length=36,
1031
- strict=True,
1032
- max_length=36,
1033
- description="The tenant invite id",
1034
- ),
1035
- ],
1036
- update_tenant_invite_request: Annotated[
1037
- UpdateTenantInviteRequest, Field(description="The tenant invite to update")
1038
- ],
1039
- _request_timeout: Union[
1040
- None,
1041
- Annotated[StrictFloat, Field(gt=0)],
1042
- Tuple[
1043
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1044
- ],
1045
- ] = None,
1046
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1047
- _content_type: Optional[StrictStr] = None,
1048
- _headers: Optional[Dict[StrictStr, Any]] = None,
1049
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1050
- ) -> RESTResponseType:
1051
- """Update invite
1052
-
1053
- Updates a tenant invite
1054
-
1055
- :param tenant: The tenant id (required)
1056
- :type tenant: str
1057
- :param tenant_invite: The tenant invite id (required)
1058
- :type tenant_invite: str
1059
- :param update_tenant_invite_request: The tenant invite to update (required)
1060
- :type update_tenant_invite_request: UpdateTenantInviteRequest
1061
- :param _request_timeout: timeout setting for this request. If one
1062
- number provided, it will be total request
1063
- timeout. It can also be a pair (tuple) of
1064
- (connection, read) timeouts.
1065
- :type _request_timeout: int, tuple(int, int), optional
1066
- :param _request_auth: set to override the auth_settings for an a single
1067
- request; this effectively ignores the
1068
- authentication in the spec for a single request.
1069
- :type _request_auth: dict, optional
1070
- :param _content_type: force content-type for the request.
1071
- :type _content_type: str, Optional
1072
- :param _headers: set to override the headers for a single
1073
- request; this effectively ignores the headers
1074
- in the spec for a single request.
1075
- :type _headers: dict, optional
1076
- :param _host_index: set to override the host_index for a single
1077
- request; this effectively ignores the host_index
1078
- in the spec for a single request.
1079
- :type _host_index: int, optional
1080
- :return: Returns the result object.
1081
- """ # noqa: E501
1082
-
1083
- _param = self._tenant_invite_update_serialize(
1084
- tenant=tenant,
1085
- tenant_invite=tenant_invite,
1086
- update_tenant_invite_request=update_tenant_invite_request,
1087
- _request_auth=_request_auth,
1088
- _content_type=_content_type,
1089
- _headers=_headers,
1090
- _host_index=_host_index,
1091
- )
1092
-
1093
- _response_types_map: Dict[str, Optional[str]] = {
1094
- "200": "TenantInvite",
1095
- "400": "APIErrors",
1096
- }
1097
- response_data = await self.api_client.call_api(
1098
- *_param, _request_timeout=_request_timeout
1099
- )
1100
- return response_data.response
1101
-
1102
- def _tenant_invite_update_serialize(
1103
- self,
1104
- tenant,
1105
- tenant_invite,
1106
- update_tenant_invite_request,
1107
- _request_auth,
1108
- _content_type,
1109
- _headers,
1110
- _host_index,
1111
- ) -> RequestSerialized:
1112
-
1113
- _host = None
1114
-
1115
- _collection_formats: Dict[str, str] = {}
1116
-
1117
- _path_params: Dict[str, str] = {}
1118
- _query_params: List[Tuple[str, str]] = []
1119
- _header_params: Dict[str, Optional[str]] = _headers or {}
1120
- _form_params: List[Tuple[str, str]] = []
1121
- _files: Dict[
1122
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1123
- ] = {}
1124
- _body_params: Optional[bytes] = None
1125
-
1126
- # process the path parameters
1127
- if tenant is not None:
1128
- _path_params["tenant"] = tenant
1129
- if tenant_invite is not None:
1130
- _path_params["tenant-invite"] = tenant_invite
1131
- # process the query parameters
1132
- # process the header parameters
1133
- # process the form parameters
1134
- # process the body parameter
1135
- if update_tenant_invite_request is not None:
1136
- _body_params = update_tenant_invite_request
1137
-
1138
- # set the HTTP header `Accept`
1139
- if "Accept" not in _header_params:
1140
- _header_params["Accept"] = self.api_client.select_header_accept(
1141
- ["application/json"]
1142
- )
1143
-
1144
- # set the HTTP header `Content-Type`
1145
- if _content_type:
1146
- _header_params["Content-Type"] = _content_type
1147
- else:
1148
- _default_content_type = self.api_client.select_header_content_type(
1149
- ["application/json"]
1150
- )
1151
- if _default_content_type is not None:
1152
- _header_params["Content-Type"] = _default_content_type
1153
-
1154
- # authentication setting
1155
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
1156
-
1157
- return self.api_client.param_serialize(
1158
- method="PATCH",
1159
- resource_path="/api/v1/tenants/{tenant}/invites/{tenant-invite}",
1160
- path_params=_path_params,
1161
- query_params=_query_params,
1162
- header_params=_header_params,
1163
- body=_body_params,
1164
- post_params=_form_params,
1165
- files=_files,
1166
- auth_settings=_auth_settings,
1167
- collection_formats=_collection_formats,
1168
- _host=_host,
1169
- _request_auth=_request_auth,
1170
- )
1171
-
1172
- @validate_call
1173
- async def webhook_create(
1174
- self,
1175
- tenant: Annotated[
1176
- str,
1177
- Field(
1178
- min_length=36, strict=True, max_length=36, description="The tenant id"
1179
- ),
1180
- ],
1181
- webhook_worker_create_request: Optional[WebhookWorkerCreateRequest] = None,
1182
- _request_timeout: Union[
1183
- None,
1184
- Annotated[StrictFloat, Field(gt=0)],
1185
- Tuple[
1186
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1187
- ],
1188
- ] = None,
1189
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1190
- _content_type: Optional[StrictStr] = None,
1191
- _headers: Optional[Dict[StrictStr, Any]] = None,
1192
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1193
- ) -> WebhookWorkerCreated:
1194
- """Create a webhook
1195
-
1196
- Creates a webhook
1197
-
1198
- :param tenant: The tenant id (required)
1199
- :type tenant: str
1200
- :param webhook_worker_create_request:
1201
- :type webhook_worker_create_request: WebhookWorkerCreateRequest
1202
- :param _request_timeout: timeout setting for this request. If one
1203
- number provided, it will be total request
1204
- timeout. It can also be a pair (tuple) of
1205
- (connection, read) timeouts.
1206
- :type _request_timeout: int, tuple(int, int), optional
1207
- :param _request_auth: set to override the auth_settings for an a single
1208
- request; this effectively ignores the
1209
- authentication in the spec for a single request.
1210
- :type _request_auth: dict, optional
1211
- :param _content_type: force content-type for the request.
1212
- :type _content_type: str, Optional
1213
- :param _headers: set to override the headers for a single
1214
- request; this effectively ignores the headers
1215
- in the spec for a single request.
1216
- :type _headers: dict, optional
1217
- :param _host_index: set to override the host_index for a single
1218
- request; this effectively ignores the host_index
1219
- in the spec for a single request.
1220
- :type _host_index: int, optional
1221
- :return: Returns the result object.
1222
- """ # noqa: E501
1223
-
1224
- _param = self._webhook_create_serialize(
1225
- tenant=tenant,
1226
- webhook_worker_create_request=webhook_worker_create_request,
1227
- _request_auth=_request_auth,
1228
- _content_type=_content_type,
1229
- _headers=_headers,
1230
- _host_index=_host_index,
1231
- )
1232
-
1233
- _response_types_map: Dict[str, Optional[str]] = {
1234
- "200": "WebhookWorkerCreated",
1235
- "400": "APIErrors",
1236
- "401": "APIErrors",
1237
- "405": "APIErrors",
1238
- }
1239
- response_data = await self.api_client.call_api(
1240
- *_param, _request_timeout=_request_timeout
1241
- )
1242
- await response_data.read()
1243
- return self.api_client.response_deserialize(
1244
- response_data=response_data,
1245
- response_types_map=_response_types_map,
1246
- ).data
1247
-
1248
- @validate_call
1249
- async def webhook_create_with_http_info(
1250
- self,
1251
- tenant: Annotated[
1252
- str,
1253
- Field(
1254
- min_length=36, strict=True, max_length=36, description="The tenant id"
1255
- ),
1256
- ],
1257
- webhook_worker_create_request: Optional[WebhookWorkerCreateRequest] = None,
1258
- _request_timeout: Union[
1259
- None,
1260
- Annotated[StrictFloat, Field(gt=0)],
1261
- Tuple[
1262
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1263
- ],
1264
- ] = None,
1265
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1266
- _content_type: Optional[StrictStr] = None,
1267
- _headers: Optional[Dict[StrictStr, Any]] = None,
1268
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1269
- ) -> ApiResponse[WebhookWorkerCreated]:
1270
- """Create a webhook
1271
-
1272
- Creates a webhook
1273
-
1274
- :param tenant: The tenant id (required)
1275
- :type tenant: str
1276
- :param webhook_worker_create_request:
1277
- :type webhook_worker_create_request: WebhookWorkerCreateRequest
1278
- :param _request_timeout: timeout setting for this request. If one
1279
- number provided, it will be total request
1280
- timeout. It can also be a pair (tuple) of
1281
- (connection, read) timeouts.
1282
- :type _request_timeout: int, tuple(int, int), optional
1283
- :param _request_auth: set to override the auth_settings for an a single
1284
- request; this effectively ignores the
1285
- authentication in the spec for a single request.
1286
- :type _request_auth: dict, optional
1287
- :param _content_type: force content-type for the request.
1288
- :type _content_type: str, Optional
1289
- :param _headers: set to override the headers for a single
1290
- request; this effectively ignores the headers
1291
- in the spec for a single request.
1292
- :type _headers: dict, optional
1293
- :param _host_index: set to override the host_index for a single
1294
- request; this effectively ignores the host_index
1295
- in the spec for a single request.
1296
- :type _host_index: int, optional
1297
- :return: Returns the result object.
1298
- """ # noqa: E501
1299
-
1300
- _param = self._webhook_create_serialize(
1301
- tenant=tenant,
1302
- webhook_worker_create_request=webhook_worker_create_request,
1303
- _request_auth=_request_auth,
1304
- _content_type=_content_type,
1305
- _headers=_headers,
1306
- _host_index=_host_index,
1307
- )
1308
-
1309
- _response_types_map: Dict[str, Optional[str]] = {
1310
- "200": "WebhookWorkerCreated",
1311
- "400": "APIErrors",
1312
- "401": "APIErrors",
1313
- "405": "APIErrors",
1314
- }
1315
- response_data = await self.api_client.call_api(
1316
- *_param, _request_timeout=_request_timeout
1317
- )
1318
- await response_data.read()
1319
- return self.api_client.response_deserialize(
1320
- response_data=response_data,
1321
- response_types_map=_response_types_map,
1322
- )
1323
-
1324
- @validate_call
1325
- async def webhook_create_without_preload_content(
1326
- self,
1327
- tenant: Annotated[
1328
- str,
1329
- Field(
1330
- min_length=36, strict=True, max_length=36, description="The tenant id"
1331
- ),
1332
- ],
1333
- webhook_worker_create_request: Optional[WebhookWorkerCreateRequest] = None,
1334
- _request_timeout: Union[
1335
- None,
1336
- Annotated[StrictFloat, Field(gt=0)],
1337
- Tuple[
1338
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1339
- ],
1340
- ] = None,
1341
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1342
- _content_type: Optional[StrictStr] = None,
1343
- _headers: Optional[Dict[StrictStr, Any]] = None,
1344
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1345
- ) -> RESTResponseType:
1346
- """Create a webhook
1347
-
1348
- Creates a webhook
1349
-
1350
- :param tenant: The tenant id (required)
1351
- :type tenant: str
1352
- :param webhook_worker_create_request:
1353
- :type webhook_worker_create_request: WebhookWorkerCreateRequest
1354
- :param _request_timeout: timeout setting for this request. If one
1355
- number provided, it will be total request
1356
- timeout. It can also be a pair (tuple) of
1357
- (connection, read) timeouts.
1358
- :type _request_timeout: int, tuple(int, int), optional
1359
- :param _request_auth: set to override the auth_settings for an a single
1360
- request; this effectively ignores the
1361
- authentication in the spec for a single request.
1362
- :type _request_auth: dict, optional
1363
- :param _content_type: force content-type for the request.
1364
- :type _content_type: str, Optional
1365
- :param _headers: set to override the headers for a single
1366
- request; this effectively ignores the headers
1367
- in the spec for a single request.
1368
- :type _headers: dict, optional
1369
- :param _host_index: set to override the host_index for a single
1370
- request; this effectively ignores the host_index
1371
- in the spec for a single request.
1372
- :type _host_index: int, optional
1373
- :return: Returns the result object.
1374
- """ # noqa: E501
1375
-
1376
- _param = self._webhook_create_serialize(
1377
- tenant=tenant,
1378
- webhook_worker_create_request=webhook_worker_create_request,
1379
- _request_auth=_request_auth,
1380
- _content_type=_content_type,
1381
- _headers=_headers,
1382
- _host_index=_host_index,
1383
- )
1384
-
1385
- _response_types_map: Dict[str, Optional[str]] = {
1386
- "200": "WebhookWorkerCreated",
1387
- "400": "APIErrors",
1388
- "401": "APIErrors",
1389
- "405": "APIErrors",
1390
- }
1391
- response_data = await self.api_client.call_api(
1392
- *_param, _request_timeout=_request_timeout
1393
- )
1394
- return response_data.response
1395
-
1396
- def _webhook_create_serialize(
1397
- self,
1398
- tenant,
1399
- webhook_worker_create_request,
1400
- _request_auth,
1401
- _content_type,
1402
- _headers,
1403
- _host_index,
1404
- ) -> RequestSerialized:
1405
-
1406
- _host = None
1407
-
1408
- _collection_formats: Dict[str, str] = {}
1409
-
1410
- _path_params: Dict[str, str] = {}
1411
- _query_params: List[Tuple[str, str]] = []
1412
- _header_params: Dict[str, Optional[str]] = _headers or {}
1413
- _form_params: List[Tuple[str, str]] = []
1414
- _files: Dict[
1415
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1416
- ] = {}
1417
- _body_params: Optional[bytes] = None
1418
-
1419
- # process the path parameters
1420
- if tenant is not None:
1421
- _path_params["tenant"] = tenant
1422
- # process the query parameters
1423
- # process the header parameters
1424
- # process the form parameters
1425
- # process the body parameter
1426
- if webhook_worker_create_request is not None:
1427
- _body_params = webhook_worker_create_request
1428
-
1429
- # set the HTTP header `Accept`
1430
- if "Accept" not in _header_params:
1431
- _header_params["Accept"] = self.api_client.select_header_accept(
1432
- ["application/json"]
1433
- )
1434
-
1435
- # set the HTTP header `Content-Type`
1436
- if _content_type:
1437
- _header_params["Content-Type"] = _content_type
1438
- else:
1439
- _default_content_type = self.api_client.select_header_content_type(
1440
- ["application/json"]
1441
- )
1442
- if _default_content_type is not None:
1443
- _header_params["Content-Type"] = _default_content_type
1444
-
1445
- # authentication setting
1446
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
1447
-
1448
- return self.api_client.param_serialize(
1449
- method="POST",
1450
- resource_path="/api/v1/tenants/{tenant}/webhook-workers",
1451
- path_params=_path_params,
1452
- query_params=_query_params,
1453
- header_params=_header_params,
1454
- body=_body_params,
1455
- post_params=_form_params,
1456
- files=_files,
1457
- auth_settings=_auth_settings,
1458
- collection_formats=_collection_formats,
1459
- _host=_host,
1460
- _request_auth=_request_auth,
1461
- )
1462
-
1463
- @validate_call
1464
- async def webhook_delete(
1465
- self,
1466
- webhook: Annotated[
1467
- str,
1468
- Field(
1469
- min_length=36, strict=True, max_length=36, description="The webhook id"
1470
- ),
1471
- ],
1472
- _request_timeout: Union[
1473
- None,
1474
- Annotated[StrictFloat, Field(gt=0)],
1475
- Tuple[
1476
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1477
- ],
1478
- ] = None,
1479
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1480
- _content_type: Optional[StrictStr] = None,
1481
- _headers: Optional[Dict[StrictStr, Any]] = None,
1482
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1483
- ) -> None:
1484
- """Delete a webhook
1485
-
1486
- Deletes a webhook
1487
-
1488
- :param webhook: The webhook id (required)
1489
- :type webhook: str
1490
- :param _request_timeout: timeout setting for this request. If one
1491
- number provided, it will be total request
1492
- timeout. It can also be a pair (tuple) of
1493
- (connection, read) timeouts.
1494
- :type _request_timeout: int, tuple(int, int), optional
1495
- :param _request_auth: set to override the auth_settings for an a single
1496
- request; this effectively ignores the
1497
- authentication in the spec for a single request.
1498
- :type _request_auth: dict, optional
1499
- :param _content_type: force content-type for the request.
1500
- :type _content_type: str, Optional
1501
- :param _headers: set to override the headers for a single
1502
- request; this effectively ignores the headers
1503
- in the spec for a single request.
1504
- :type _headers: dict, optional
1505
- :param _host_index: set to override the host_index for a single
1506
- request; this effectively ignores the host_index
1507
- in the spec for a single request.
1508
- :type _host_index: int, optional
1509
- :return: Returns the result object.
1510
- """ # noqa: E501
1511
-
1512
- _param = self._webhook_delete_serialize(
1513
- webhook=webhook,
1514
- _request_auth=_request_auth,
1515
- _content_type=_content_type,
1516
- _headers=_headers,
1517
- _host_index=_host_index,
1518
- )
1519
-
1520
- _response_types_map: Dict[str, Optional[str]] = {
1521
- "200": None,
1522
- "400": "APIErrors",
1523
- "401": "APIErrors",
1524
- "405": "APIErrors",
1525
- }
1526
- response_data = await self.api_client.call_api(
1527
- *_param, _request_timeout=_request_timeout
1528
- )
1529
- await response_data.read()
1530
- return self.api_client.response_deserialize(
1531
- response_data=response_data,
1532
- response_types_map=_response_types_map,
1533
- ).data
1534
-
1535
- @validate_call
1536
- async def webhook_delete_with_http_info(
1537
- self,
1538
- webhook: Annotated[
1539
- str,
1540
- Field(
1541
- min_length=36, strict=True, max_length=36, description="The webhook id"
1542
- ),
1543
- ],
1544
- _request_timeout: Union[
1545
- None,
1546
- Annotated[StrictFloat, Field(gt=0)],
1547
- Tuple[
1548
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1549
- ],
1550
- ] = None,
1551
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1552
- _content_type: Optional[StrictStr] = None,
1553
- _headers: Optional[Dict[StrictStr, Any]] = None,
1554
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1555
- ) -> ApiResponse[None]:
1556
- """Delete a webhook
1557
-
1558
- Deletes a webhook
1559
-
1560
- :param webhook: The webhook id (required)
1561
- :type webhook: str
1562
- :param _request_timeout: timeout setting for this request. If one
1563
- number provided, it will be total request
1564
- timeout. It can also be a pair (tuple) of
1565
- (connection, read) timeouts.
1566
- :type _request_timeout: int, tuple(int, int), optional
1567
- :param _request_auth: set to override the auth_settings for an a single
1568
- request; this effectively ignores the
1569
- authentication in the spec for a single request.
1570
- :type _request_auth: dict, optional
1571
- :param _content_type: force content-type for the request.
1572
- :type _content_type: str, Optional
1573
- :param _headers: set to override the headers for a single
1574
- request; this effectively ignores the headers
1575
- in the spec for a single request.
1576
- :type _headers: dict, optional
1577
- :param _host_index: set to override the host_index for a single
1578
- request; this effectively ignores the host_index
1579
- in the spec for a single request.
1580
- :type _host_index: int, optional
1581
- :return: Returns the result object.
1582
- """ # noqa: E501
1583
-
1584
- _param = self._webhook_delete_serialize(
1585
- webhook=webhook,
1586
- _request_auth=_request_auth,
1587
- _content_type=_content_type,
1588
- _headers=_headers,
1589
- _host_index=_host_index,
1590
- )
1591
-
1592
- _response_types_map: Dict[str, Optional[str]] = {
1593
- "200": None,
1594
- "400": "APIErrors",
1595
- "401": "APIErrors",
1596
- "405": "APIErrors",
1597
- }
1598
- response_data = await self.api_client.call_api(
1599
- *_param, _request_timeout=_request_timeout
1600
- )
1601
- await response_data.read()
1602
- return self.api_client.response_deserialize(
1603
- response_data=response_data,
1604
- response_types_map=_response_types_map,
1605
- )
1606
-
1607
- @validate_call
1608
- async def webhook_delete_without_preload_content(
1609
- self,
1610
- webhook: Annotated[
1611
- str,
1612
- Field(
1613
- min_length=36, strict=True, max_length=36, description="The webhook id"
1614
- ),
1615
- ],
1616
- _request_timeout: Union[
1617
- None,
1618
- Annotated[StrictFloat, Field(gt=0)],
1619
- Tuple[
1620
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1621
- ],
1622
- ] = None,
1623
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1624
- _content_type: Optional[StrictStr] = None,
1625
- _headers: Optional[Dict[StrictStr, Any]] = None,
1626
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1627
- ) -> RESTResponseType:
1628
- """Delete a webhook
1629
-
1630
- Deletes a webhook
1631
-
1632
- :param webhook: The webhook id (required)
1633
- :type webhook: str
1634
- :param _request_timeout: timeout setting for this request. If one
1635
- number provided, it will be total request
1636
- timeout. It can also be a pair (tuple) of
1637
- (connection, read) timeouts.
1638
- :type _request_timeout: int, tuple(int, int), optional
1639
- :param _request_auth: set to override the auth_settings for an a single
1640
- request; this effectively ignores the
1641
- authentication in the spec for a single request.
1642
- :type _request_auth: dict, optional
1643
- :param _content_type: force content-type for the request.
1644
- :type _content_type: str, Optional
1645
- :param _headers: set to override the headers for a single
1646
- request; this effectively ignores the headers
1647
- in the spec for a single request.
1648
- :type _headers: dict, optional
1649
- :param _host_index: set to override the host_index for a single
1650
- request; this effectively ignores the host_index
1651
- in the spec for a single request.
1652
- :type _host_index: int, optional
1653
- :return: Returns the result object.
1654
- """ # noqa: E501
1655
-
1656
- _param = self._webhook_delete_serialize(
1657
- webhook=webhook,
1658
- _request_auth=_request_auth,
1659
- _content_type=_content_type,
1660
- _headers=_headers,
1661
- _host_index=_host_index,
1662
- )
1663
-
1664
- _response_types_map: Dict[str, Optional[str]] = {
1665
- "200": None,
1666
- "400": "APIErrors",
1667
- "401": "APIErrors",
1668
- "405": "APIErrors",
1669
- }
1670
- response_data = await self.api_client.call_api(
1671
- *_param, _request_timeout=_request_timeout
1672
- )
1673
- return response_data.response
1674
-
1675
- def _webhook_delete_serialize(
1676
- self,
1677
- webhook,
1678
- _request_auth,
1679
- _content_type,
1680
- _headers,
1681
- _host_index,
1682
- ) -> RequestSerialized:
1683
-
1684
- _host = None
1685
-
1686
- _collection_formats: Dict[str, str] = {}
1687
-
1688
- _path_params: Dict[str, str] = {}
1689
- _query_params: List[Tuple[str, str]] = []
1690
- _header_params: Dict[str, Optional[str]] = _headers or {}
1691
- _form_params: List[Tuple[str, str]] = []
1692
- _files: Dict[
1693
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1694
- ] = {}
1695
- _body_params: Optional[bytes] = None
1696
-
1697
- # process the path parameters
1698
- if webhook is not None:
1699
- _path_params["webhook"] = webhook
1700
- # process the query parameters
1701
- # process the header parameters
1702
- # process the form parameters
1703
- # process the body parameter
1704
-
1705
- # set the HTTP header `Accept`
1706
- if "Accept" not in _header_params:
1707
- _header_params["Accept"] = self.api_client.select_header_accept(
1708
- ["application/json"]
1709
- )
1710
-
1711
- # authentication setting
1712
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
1713
-
1714
- return self.api_client.param_serialize(
1715
- method="DELETE",
1716
- resource_path="/api/v1/webhook-workers/{webhook}",
1717
- path_params=_path_params,
1718
- query_params=_query_params,
1719
- header_params=_header_params,
1720
- body=_body_params,
1721
- post_params=_form_params,
1722
- files=_files,
1723
- auth_settings=_auth_settings,
1724
- collection_formats=_collection_formats,
1725
- _host=_host,
1726
- _request_auth=_request_auth,
1727
- )
1728
-
1729
- @validate_call
1730
- async def webhook_list(
1731
- self,
1732
- tenant: Annotated[
1733
- str,
1734
- Field(
1735
- min_length=36, strict=True, max_length=36, description="The tenant id"
1736
- ),
1737
- ],
1738
- _request_timeout: Union[
1739
- None,
1740
- Annotated[StrictFloat, Field(gt=0)],
1741
- Tuple[
1742
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1743
- ],
1744
- ] = None,
1745
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1746
- _content_type: Optional[StrictStr] = None,
1747
- _headers: Optional[Dict[StrictStr, Any]] = None,
1748
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1749
- ) -> WebhookWorkerListResponse:
1750
- """List webhooks
1751
-
1752
- Lists all webhooks
1753
-
1754
- :param tenant: The tenant id (required)
1755
- :type tenant: str
1756
- :param _request_timeout: timeout setting for this request. If one
1757
- number provided, it will be total request
1758
- timeout. It can also be a pair (tuple) of
1759
- (connection, read) timeouts.
1760
- :type _request_timeout: int, tuple(int, int), optional
1761
- :param _request_auth: set to override the auth_settings for an a single
1762
- request; this effectively ignores the
1763
- authentication in the spec for a single request.
1764
- :type _request_auth: dict, optional
1765
- :param _content_type: force content-type for the request.
1766
- :type _content_type: str, Optional
1767
- :param _headers: set to override the headers for a single
1768
- request; this effectively ignores the headers
1769
- in the spec for a single request.
1770
- :type _headers: dict, optional
1771
- :param _host_index: set to override the host_index for a single
1772
- request; this effectively ignores the host_index
1773
- in the spec for a single request.
1774
- :type _host_index: int, optional
1775
- :return: Returns the result object.
1776
- """ # noqa: E501
1777
-
1778
- _param = self._webhook_list_serialize(
1779
- tenant=tenant,
1780
- _request_auth=_request_auth,
1781
- _content_type=_content_type,
1782
- _headers=_headers,
1783
- _host_index=_host_index,
1784
- )
1785
-
1786
- _response_types_map: Dict[str, Optional[str]] = {
1787
- "200": "WebhookWorkerListResponse",
1788
- "400": "APIErrors",
1789
- "401": "APIErrors",
1790
- "405": "APIErrors",
1791
- }
1792
- response_data = await self.api_client.call_api(
1793
- *_param, _request_timeout=_request_timeout
1794
- )
1795
- await response_data.read()
1796
- return self.api_client.response_deserialize(
1797
- response_data=response_data,
1798
- response_types_map=_response_types_map,
1799
- ).data
1800
-
1801
- @validate_call
1802
- async def webhook_list_with_http_info(
1803
- self,
1804
- tenant: Annotated[
1805
- str,
1806
- Field(
1807
- min_length=36, strict=True, max_length=36, description="The tenant id"
1808
- ),
1809
- ],
1810
- _request_timeout: Union[
1811
- None,
1812
- Annotated[StrictFloat, Field(gt=0)],
1813
- Tuple[
1814
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1815
- ],
1816
- ] = None,
1817
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1818
- _content_type: Optional[StrictStr] = None,
1819
- _headers: Optional[Dict[StrictStr, Any]] = None,
1820
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1821
- ) -> ApiResponse[WebhookWorkerListResponse]:
1822
- """List webhooks
1823
-
1824
- Lists all webhooks
1825
-
1826
- :param tenant: The tenant id (required)
1827
- :type tenant: str
1828
- :param _request_timeout: timeout setting for this request. If one
1829
- number provided, it will be total request
1830
- timeout. It can also be a pair (tuple) of
1831
- (connection, read) timeouts.
1832
- :type _request_timeout: int, tuple(int, int), optional
1833
- :param _request_auth: set to override the auth_settings for an a single
1834
- request; this effectively ignores the
1835
- authentication in the spec for a single request.
1836
- :type _request_auth: dict, optional
1837
- :param _content_type: force content-type for the request.
1838
- :type _content_type: str, Optional
1839
- :param _headers: set to override the headers for a single
1840
- request; this effectively ignores the headers
1841
- in the spec for a single request.
1842
- :type _headers: dict, optional
1843
- :param _host_index: set to override the host_index for a single
1844
- request; this effectively ignores the host_index
1845
- in the spec for a single request.
1846
- :type _host_index: int, optional
1847
- :return: Returns the result object.
1848
- """ # noqa: E501
1849
-
1850
- _param = self._webhook_list_serialize(
1851
- tenant=tenant,
1852
- _request_auth=_request_auth,
1853
- _content_type=_content_type,
1854
- _headers=_headers,
1855
- _host_index=_host_index,
1856
- )
1857
-
1858
- _response_types_map: Dict[str, Optional[str]] = {
1859
- "200": "WebhookWorkerListResponse",
1860
- "400": "APIErrors",
1861
- "401": "APIErrors",
1862
- "405": "APIErrors",
1863
- }
1864
- response_data = await self.api_client.call_api(
1865
- *_param, _request_timeout=_request_timeout
1866
- )
1867
- await response_data.read()
1868
- return self.api_client.response_deserialize(
1869
- response_data=response_data,
1870
- response_types_map=_response_types_map,
1871
- )
1872
-
1873
- @validate_call
1874
- async def webhook_list_without_preload_content(
1875
- self,
1876
- tenant: Annotated[
1877
- str,
1878
- Field(
1879
- min_length=36, strict=True, max_length=36, description="The tenant id"
1880
- ),
1881
- ],
1882
- _request_timeout: Union[
1883
- None,
1884
- Annotated[StrictFloat, Field(gt=0)],
1885
- Tuple[
1886
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1887
- ],
1888
- ] = None,
1889
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1890
- _content_type: Optional[StrictStr] = None,
1891
- _headers: Optional[Dict[StrictStr, Any]] = None,
1892
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1893
- ) -> RESTResponseType:
1894
- """List webhooks
1895
-
1896
- Lists all webhooks
1897
-
1898
- :param tenant: The tenant id (required)
1899
- :type tenant: str
1900
- :param _request_timeout: timeout setting for this request. If one
1901
- number provided, it will be total request
1902
- timeout. It can also be a pair (tuple) of
1903
- (connection, read) timeouts.
1904
- :type _request_timeout: int, tuple(int, int), optional
1905
- :param _request_auth: set to override the auth_settings for an a single
1906
- request; this effectively ignores the
1907
- authentication in the spec for a single request.
1908
- :type _request_auth: dict, optional
1909
- :param _content_type: force content-type for the request.
1910
- :type _content_type: str, Optional
1911
- :param _headers: set to override the headers for a single
1912
- request; this effectively ignores the headers
1913
- in the spec for a single request.
1914
- :type _headers: dict, optional
1915
- :param _host_index: set to override the host_index for a single
1916
- request; this effectively ignores the host_index
1917
- in the spec for a single request.
1918
- :type _host_index: int, optional
1919
- :return: Returns the result object.
1920
- """ # noqa: E501
1921
-
1922
- _param = self._webhook_list_serialize(
1923
- tenant=tenant,
1924
- _request_auth=_request_auth,
1925
- _content_type=_content_type,
1926
- _headers=_headers,
1927
- _host_index=_host_index,
1928
- )
1929
-
1930
- _response_types_map: Dict[str, Optional[str]] = {
1931
- "200": "WebhookWorkerListResponse",
1932
- "400": "APIErrors",
1933
- "401": "APIErrors",
1934
- "405": "APIErrors",
1935
- }
1936
- response_data = await self.api_client.call_api(
1937
- *_param, _request_timeout=_request_timeout
1938
- )
1939
- return response_data.response
1940
-
1941
- def _webhook_list_serialize(
1942
- self,
1943
- tenant,
1944
- _request_auth,
1945
- _content_type,
1946
- _headers,
1947
- _host_index,
1948
- ) -> RequestSerialized:
1949
-
1950
- _host = None
1951
-
1952
- _collection_formats: Dict[str, str] = {}
1953
-
1954
- _path_params: Dict[str, str] = {}
1955
- _query_params: List[Tuple[str, str]] = []
1956
- _header_params: Dict[str, Optional[str]] = _headers or {}
1957
- _form_params: List[Tuple[str, str]] = []
1958
- _files: Dict[
1959
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1960
- ] = {}
1961
- _body_params: Optional[bytes] = None
1962
-
1963
- # process the path parameters
1964
- if tenant is not None:
1965
- _path_params["tenant"] = tenant
1966
- # process the query parameters
1967
- # process the header parameters
1968
- # process the form parameters
1969
- # process the body parameter
1970
-
1971
- # set the HTTP header `Accept`
1972
- if "Accept" not in _header_params:
1973
- _header_params["Accept"] = self.api_client.select_header_accept(
1974
- ["application/json"]
1975
- )
1976
-
1977
- # authentication setting
1978
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
1979
-
1980
- return self.api_client.param_serialize(
1981
- method="GET",
1982
- resource_path="/api/v1/tenants/{tenant}/webhook-workers",
1983
- path_params=_path_params,
1984
- query_params=_query_params,
1985
- header_params=_header_params,
1986
- body=_body_params,
1987
- post_params=_form_params,
1988
- files=_files,
1989
- auth_settings=_auth_settings,
1990
- collection_formats=_collection_formats,
1991
- _host=_host,
1992
- _request_auth=_request_auth,
1993
- )
1994
-
1995
- @validate_call
1996
- async def webhook_requests_list(
1997
- self,
1998
- webhook: Annotated[
1999
- str,
2000
- Field(
2001
- min_length=36, strict=True, max_length=36, description="The webhook id"
2002
- ),
2003
- ],
2004
- _request_timeout: Union[
2005
- None,
2006
- Annotated[StrictFloat, Field(gt=0)],
2007
- Tuple[
2008
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2009
- ],
2010
- ] = None,
2011
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2012
- _content_type: Optional[StrictStr] = None,
2013
- _headers: Optional[Dict[StrictStr, Any]] = None,
2014
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2015
- ) -> WebhookWorkerRequestListResponse:
2016
- """List webhook requests
2017
-
2018
- Lists all requests for a webhook
2019
-
2020
- :param webhook: The webhook id (required)
2021
- :type webhook: str
2022
- :param _request_timeout: timeout setting for this request. If one
2023
- number provided, it will be total request
2024
- timeout. It can also be a pair (tuple) of
2025
- (connection, read) timeouts.
2026
- :type _request_timeout: int, tuple(int, int), optional
2027
- :param _request_auth: set to override the auth_settings for an a single
2028
- request; this effectively ignores the
2029
- authentication in the spec for a single request.
2030
- :type _request_auth: dict, optional
2031
- :param _content_type: force content-type for the request.
2032
- :type _content_type: str, Optional
2033
- :param _headers: set to override the headers for a single
2034
- request; this effectively ignores the headers
2035
- in the spec for a single request.
2036
- :type _headers: dict, optional
2037
- :param _host_index: set to override the host_index for a single
2038
- request; this effectively ignores the host_index
2039
- in the spec for a single request.
2040
- :type _host_index: int, optional
2041
- :return: Returns the result object.
2042
- """ # noqa: E501
2043
-
2044
- _param = self._webhook_requests_list_serialize(
2045
- webhook=webhook,
2046
- _request_auth=_request_auth,
2047
- _content_type=_content_type,
2048
- _headers=_headers,
2049
- _host_index=_host_index,
2050
- )
2051
-
2052
- _response_types_map: Dict[str, Optional[str]] = {
2053
- "200": "WebhookWorkerRequestListResponse",
2054
- "400": "APIErrors",
2055
- "401": "APIErrors",
2056
- "405": "APIErrors",
2057
- }
2058
- response_data = await self.api_client.call_api(
2059
- *_param, _request_timeout=_request_timeout
2060
- )
2061
- await response_data.read()
2062
- return self.api_client.response_deserialize(
2063
- response_data=response_data,
2064
- response_types_map=_response_types_map,
2065
- ).data
2066
-
2067
- @validate_call
2068
- async def webhook_requests_list_with_http_info(
2069
- self,
2070
- webhook: Annotated[
2071
- str,
2072
- Field(
2073
- min_length=36, strict=True, max_length=36, description="The webhook id"
2074
- ),
2075
- ],
2076
- _request_timeout: Union[
2077
- None,
2078
- Annotated[StrictFloat, Field(gt=0)],
2079
- Tuple[
2080
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2081
- ],
2082
- ] = None,
2083
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2084
- _content_type: Optional[StrictStr] = None,
2085
- _headers: Optional[Dict[StrictStr, Any]] = None,
2086
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2087
- ) -> ApiResponse[WebhookWorkerRequestListResponse]:
2088
- """List webhook requests
2089
-
2090
- Lists all requests for a webhook
2091
-
2092
- :param webhook: The webhook id (required)
2093
- :type webhook: str
2094
- :param _request_timeout: timeout setting for this request. If one
2095
- number provided, it will be total request
2096
- timeout. It can also be a pair (tuple) of
2097
- (connection, read) timeouts.
2098
- :type _request_timeout: int, tuple(int, int), optional
2099
- :param _request_auth: set to override the auth_settings for an a single
2100
- request; this effectively ignores the
2101
- authentication in the spec for a single request.
2102
- :type _request_auth: dict, optional
2103
- :param _content_type: force content-type for the request.
2104
- :type _content_type: str, Optional
2105
- :param _headers: set to override the headers for a single
2106
- request; this effectively ignores the headers
2107
- in the spec for a single request.
2108
- :type _headers: dict, optional
2109
- :param _host_index: set to override the host_index for a single
2110
- request; this effectively ignores the host_index
2111
- in the spec for a single request.
2112
- :type _host_index: int, optional
2113
- :return: Returns the result object.
2114
- """ # noqa: E501
2115
-
2116
- _param = self._webhook_requests_list_serialize(
2117
- webhook=webhook,
2118
- _request_auth=_request_auth,
2119
- _content_type=_content_type,
2120
- _headers=_headers,
2121
- _host_index=_host_index,
2122
- )
2123
-
2124
- _response_types_map: Dict[str, Optional[str]] = {
2125
- "200": "WebhookWorkerRequestListResponse",
2126
- "400": "APIErrors",
2127
- "401": "APIErrors",
2128
- "405": "APIErrors",
2129
- }
2130
- response_data = await self.api_client.call_api(
2131
- *_param, _request_timeout=_request_timeout
2132
- )
2133
- await response_data.read()
2134
- return self.api_client.response_deserialize(
2135
- response_data=response_data,
2136
- response_types_map=_response_types_map,
2137
- )
2138
-
2139
- @validate_call
2140
- async def webhook_requests_list_without_preload_content(
2141
- self,
2142
- webhook: Annotated[
2143
- str,
2144
- Field(
2145
- min_length=36, strict=True, max_length=36, description="The webhook id"
2146
- ),
2147
- ],
2148
- _request_timeout: Union[
2149
- None,
2150
- Annotated[StrictFloat, Field(gt=0)],
2151
- Tuple[
2152
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2153
- ],
2154
- ] = None,
2155
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2156
- _content_type: Optional[StrictStr] = None,
2157
- _headers: Optional[Dict[StrictStr, Any]] = None,
2158
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2159
- ) -> RESTResponseType:
2160
- """List webhook requests
2161
-
2162
- Lists all requests for a webhook
2163
-
2164
- :param webhook: The webhook id (required)
2165
- :type webhook: str
2166
- :param _request_timeout: timeout setting for this request. If one
2167
- number provided, it will be total request
2168
- timeout. It can also be a pair (tuple) of
2169
- (connection, read) timeouts.
2170
- :type _request_timeout: int, tuple(int, int), optional
2171
- :param _request_auth: set to override the auth_settings for an a single
2172
- request; this effectively ignores the
2173
- authentication in the spec for a single request.
2174
- :type _request_auth: dict, optional
2175
- :param _content_type: force content-type for the request.
2176
- :type _content_type: str, Optional
2177
- :param _headers: set to override the headers for a single
2178
- request; this effectively ignores the headers
2179
- in the spec for a single request.
2180
- :type _headers: dict, optional
2181
- :param _host_index: set to override the host_index for a single
2182
- request; this effectively ignores the host_index
2183
- in the spec for a single request.
2184
- :type _host_index: int, optional
2185
- :return: Returns the result object.
2186
- """ # noqa: E501
2187
-
2188
- _param = self._webhook_requests_list_serialize(
2189
- webhook=webhook,
2190
- _request_auth=_request_auth,
2191
- _content_type=_content_type,
2192
- _headers=_headers,
2193
- _host_index=_host_index,
2194
- )
2195
-
2196
- _response_types_map: Dict[str, Optional[str]] = {
2197
- "200": "WebhookWorkerRequestListResponse",
2198
- "400": "APIErrors",
2199
- "401": "APIErrors",
2200
- "405": "APIErrors",
2201
- }
2202
- response_data = await self.api_client.call_api(
2203
- *_param, _request_timeout=_request_timeout
2204
- )
2205
- return response_data.response
2206
-
2207
- def _webhook_requests_list_serialize(
2208
- self,
2209
- webhook,
2210
- _request_auth,
2211
- _content_type,
2212
- _headers,
2213
- _host_index,
2214
- ) -> RequestSerialized:
2215
-
2216
- _host = None
2217
-
2218
- _collection_formats: Dict[str, str] = {}
2219
-
2220
- _path_params: Dict[str, str] = {}
2221
- _query_params: List[Tuple[str, str]] = []
2222
- _header_params: Dict[str, Optional[str]] = _headers or {}
2223
- _form_params: List[Tuple[str, str]] = []
2224
- _files: Dict[
2225
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2226
- ] = {}
2227
- _body_params: Optional[bytes] = None
2228
-
2229
- # process the path parameters
2230
- if webhook is not None:
2231
- _path_params["webhook"] = webhook
2232
- # process the query parameters
2233
- # process the header parameters
2234
- # process the form parameters
2235
- # process the body parameter
2236
-
2237
- # set the HTTP header `Accept`
2238
- if "Accept" not in _header_params:
2239
- _header_params["Accept"] = self.api_client.select_header_accept(
2240
- ["application/json"]
2241
- )
2242
-
2243
- # authentication setting
2244
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
2245
-
2246
- return self.api_client.param_serialize(
2247
- method="GET",
2248
- resource_path="/api/v1/webhook-workers/{webhook}/requests",
2249
- path_params=_path_params,
2250
- query_params=_query_params,
2251
- header_params=_header_params,
2252
- body=_body_params,
2253
- post_params=_form_params,
2254
- files=_files,
2255
- auth_settings=_auth_settings,
2256
- collection_formats=_collection_formats,
2257
- _host=_host,
2258
- _request_auth=_request_auth,
2259
- )