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,423 +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.rate_limit_list import RateLimitList
23
- from hatchet_sdk.v0.clients.rest.models.rate_limit_order_by_direction import (
24
- RateLimitOrderByDirection,
25
- )
26
- from hatchet_sdk.v0.clients.rest.models.rate_limit_order_by_field import (
27
- RateLimitOrderByField,
28
- )
29
- from hatchet_sdk.v0.clients.rest.rest import RESTResponseType
30
-
31
-
32
- class RateLimitsApi:
33
- """NOTE: This class is auto generated by OpenAPI Generator
34
- Ref: https://openapi-generator.tech
35
-
36
- Do not edit the class manually.
37
- """
38
-
39
- def __init__(self, api_client=None) -> None:
40
- if api_client is None:
41
- api_client = ApiClient.get_default()
42
- self.api_client = api_client
43
-
44
- @validate_call
45
- async def rate_limit_list(
46
- self,
47
- tenant: Annotated[
48
- str,
49
- Field(
50
- min_length=36, strict=True, max_length=36, description="The tenant id"
51
- ),
52
- ],
53
- offset: Annotated[
54
- Optional[StrictInt], Field(description="The number to skip")
55
- ] = None,
56
- limit: Annotated[
57
- Optional[StrictInt], Field(description="The number to limit by")
58
- ] = None,
59
- search: Annotated[
60
- Optional[StrictStr], Field(description="The search query to filter for")
61
- ] = None,
62
- order_by_field: Annotated[
63
- Optional[RateLimitOrderByField], Field(description="What to order by")
64
- ] = None,
65
- order_by_direction: Annotated[
66
- Optional[RateLimitOrderByDirection],
67
- Field(description="The order direction"),
68
- ] = None,
69
- _request_timeout: Union[
70
- None,
71
- Annotated[StrictFloat, Field(gt=0)],
72
- Tuple[
73
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
74
- ],
75
- ] = None,
76
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
77
- _content_type: Optional[StrictStr] = None,
78
- _headers: Optional[Dict[StrictStr, Any]] = None,
79
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
80
- ) -> RateLimitList:
81
- """List rate limits
82
-
83
- Lists all rate limits for a tenant.
84
-
85
- :param tenant: The tenant id (required)
86
- :type tenant: str
87
- :param offset: The number to skip
88
- :type offset: int
89
- :param limit: The number to limit by
90
- :type limit: int
91
- :param search: The search query to filter for
92
- :type search: str
93
- :param order_by_field: What to order by
94
- :type order_by_field: RateLimitOrderByField
95
- :param order_by_direction: The order direction
96
- :type order_by_direction: RateLimitOrderByDirection
97
- :param _request_timeout: timeout setting for this request. If one
98
- number provided, it will be total request
99
- timeout. It can also be a pair (tuple) of
100
- (connection, read) timeouts.
101
- :type _request_timeout: int, tuple(int, int), optional
102
- :param _request_auth: set to override the auth_settings for an a single
103
- request; this effectively ignores the
104
- authentication in the spec for a single request.
105
- :type _request_auth: dict, optional
106
- :param _content_type: force content-type for the request.
107
- :type _content_type: str, Optional
108
- :param _headers: set to override the headers for a single
109
- request; this effectively ignores the headers
110
- in the spec for a single request.
111
- :type _headers: dict, optional
112
- :param _host_index: set to override the host_index for a single
113
- request; this effectively ignores the host_index
114
- in the spec for a single request.
115
- :type _host_index: int, optional
116
- :return: Returns the result object.
117
- """ # noqa: E501
118
-
119
- _param = self._rate_limit_list_serialize(
120
- tenant=tenant,
121
- offset=offset,
122
- limit=limit,
123
- search=search,
124
- order_by_field=order_by_field,
125
- order_by_direction=order_by_direction,
126
- _request_auth=_request_auth,
127
- _content_type=_content_type,
128
- _headers=_headers,
129
- _host_index=_host_index,
130
- )
131
-
132
- _response_types_map: Dict[str, Optional[str]] = {
133
- "200": "RateLimitList",
134
- "400": "APIErrors",
135
- "403": "APIErrors",
136
- }
137
- response_data = await self.api_client.call_api(
138
- *_param, _request_timeout=_request_timeout
139
- )
140
- await response_data.read()
141
- return self.api_client.response_deserialize(
142
- response_data=response_data,
143
- response_types_map=_response_types_map,
144
- ).data
145
-
146
- @validate_call
147
- async def rate_limit_list_with_http_info(
148
- self,
149
- tenant: Annotated[
150
- str,
151
- Field(
152
- min_length=36, strict=True, max_length=36, description="The tenant id"
153
- ),
154
- ],
155
- offset: Annotated[
156
- Optional[StrictInt], Field(description="The number to skip")
157
- ] = None,
158
- limit: Annotated[
159
- Optional[StrictInt], Field(description="The number to limit by")
160
- ] = None,
161
- search: Annotated[
162
- Optional[StrictStr], Field(description="The search query to filter for")
163
- ] = None,
164
- order_by_field: Annotated[
165
- Optional[RateLimitOrderByField], Field(description="What to order by")
166
- ] = None,
167
- order_by_direction: Annotated[
168
- Optional[RateLimitOrderByDirection],
169
- Field(description="The order direction"),
170
- ] = None,
171
- _request_timeout: Union[
172
- None,
173
- Annotated[StrictFloat, Field(gt=0)],
174
- Tuple[
175
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
176
- ],
177
- ] = None,
178
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
179
- _content_type: Optional[StrictStr] = None,
180
- _headers: Optional[Dict[StrictStr, Any]] = None,
181
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
182
- ) -> ApiResponse[RateLimitList]:
183
- """List rate limits
184
-
185
- Lists all rate limits for a tenant.
186
-
187
- :param tenant: The tenant id (required)
188
- :type tenant: str
189
- :param offset: The number to skip
190
- :type offset: int
191
- :param limit: The number to limit by
192
- :type limit: int
193
- :param search: The search query to filter for
194
- :type search: str
195
- :param order_by_field: What to order by
196
- :type order_by_field: RateLimitOrderByField
197
- :param order_by_direction: The order direction
198
- :type order_by_direction: RateLimitOrderByDirection
199
- :param _request_timeout: timeout setting for this request. If one
200
- number provided, it will be total request
201
- timeout. It can also be a pair (tuple) of
202
- (connection, read) timeouts.
203
- :type _request_timeout: int, tuple(int, int), optional
204
- :param _request_auth: set to override the auth_settings for an a single
205
- request; this effectively ignores the
206
- authentication in the spec for a single request.
207
- :type _request_auth: dict, optional
208
- :param _content_type: force content-type for the request.
209
- :type _content_type: str, Optional
210
- :param _headers: set to override the headers for a single
211
- request; this effectively ignores the headers
212
- in the spec for a single request.
213
- :type _headers: dict, optional
214
- :param _host_index: set to override the host_index for a single
215
- request; this effectively ignores the host_index
216
- in the spec for a single request.
217
- :type _host_index: int, optional
218
- :return: Returns the result object.
219
- """ # noqa: E501
220
-
221
- _param = self._rate_limit_list_serialize(
222
- tenant=tenant,
223
- offset=offset,
224
- limit=limit,
225
- search=search,
226
- order_by_field=order_by_field,
227
- order_by_direction=order_by_direction,
228
- _request_auth=_request_auth,
229
- _content_type=_content_type,
230
- _headers=_headers,
231
- _host_index=_host_index,
232
- )
233
-
234
- _response_types_map: Dict[str, Optional[str]] = {
235
- "200": "RateLimitList",
236
- "400": "APIErrors",
237
- "403": "APIErrors",
238
- }
239
- response_data = await self.api_client.call_api(
240
- *_param, _request_timeout=_request_timeout
241
- )
242
- await response_data.read()
243
- return self.api_client.response_deserialize(
244
- response_data=response_data,
245
- response_types_map=_response_types_map,
246
- )
247
-
248
- @validate_call
249
- async def rate_limit_list_without_preload_content(
250
- self,
251
- tenant: Annotated[
252
- str,
253
- Field(
254
- min_length=36, strict=True, max_length=36, description="The tenant id"
255
- ),
256
- ],
257
- offset: Annotated[
258
- Optional[StrictInt], Field(description="The number to skip")
259
- ] = None,
260
- limit: Annotated[
261
- Optional[StrictInt], Field(description="The number to limit by")
262
- ] = None,
263
- search: Annotated[
264
- Optional[StrictStr], Field(description="The search query to filter for")
265
- ] = None,
266
- order_by_field: Annotated[
267
- Optional[RateLimitOrderByField], Field(description="What to order by")
268
- ] = None,
269
- order_by_direction: Annotated[
270
- Optional[RateLimitOrderByDirection],
271
- Field(description="The order direction"),
272
- ] = None,
273
- _request_timeout: Union[
274
- None,
275
- Annotated[StrictFloat, Field(gt=0)],
276
- Tuple[
277
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
278
- ],
279
- ] = None,
280
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
281
- _content_type: Optional[StrictStr] = None,
282
- _headers: Optional[Dict[StrictStr, Any]] = None,
283
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
284
- ) -> RESTResponseType:
285
- """List rate limits
286
-
287
- Lists all rate limits for a tenant.
288
-
289
- :param tenant: The tenant id (required)
290
- :type tenant: str
291
- :param offset: The number to skip
292
- :type offset: int
293
- :param limit: The number to limit by
294
- :type limit: int
295
- :param search: The search query to filter for
296
- :type search: str
297
- :param order_by_field: What to order by
298
- :type order_by_field: RateLimitOrderByField
299
- :param order_by_direction: The order direction
300
- :type order_by_direction: RateLimitOrderByDirection
301
- :param _request_timeout: timeout setting for this request. If one
302
- number provided, it will be total request
303
- timeout. It can also be a pair (tuple) of
304
- (connection, read) timeouts.
305
- :type _request_timeout: int, tuple(int, int), optional
306
- :param _request_auth: set to override the auth_settings for an a single
307
- request; this effectively ignores the
308
- authentication in the spec for a single request.
309
- :type _request_auth: dict, optional
310
- :param _content_type: force content-type for the request.
311
- :type _content_type: str, Optional
312
- :param _headers: set to override the headers for a single
313
- request; this effectively ignores the headers
314
- in the spec for a single request.
315
- :type _headers: dict, optional
316
- :param _host_index: set to override the host_index for a single
317
- request; this effectively ignores the host_index
318
- in the spec for a single request.
319
- :type _host_index: int, optional
320
- :return: Returns the result object.
321
- """ # noqa: E501
322
-
323
- _param = self._rate_limit_list_serialize(
324
- tenant=tenant,
325
- offset=offset,
326
- limit=limit,
327
- search=search,
328
- order_by_field=order_by_field,
329
- order_by_direction=order_by_direction,
330
- _request_auth=_request_auth,
331
- _content_type=_content_type,
332
- _headers=_headers,
333
- _host_index=_host_index,
334
- )
335
-
336
- _response_types_map: Dict[str, Optional[str]] = {
337
- "200": "RateLimitList",
338
- "400": "APIErrors",
339
- "403": "APIErrors",
340
- }
341
- response_data = await self.api_client.call_api(
342
- *_param, _request_timeout=_request_timeout
343
- )
344
- return response_data.response
345
-
346
- def _rate_limit_list_serialize(
347
- self,
348
- tenant,
349
- offset,
350
- limit,
351
- search,
352
- order_by_field,
353
- order_by_direction,
354
- _request_auth,
355
- _content_type,
356
- _headers,
357
- _host_index,
358
- ) -> RequestSerialized:
359
-
360
- _host = None
361
-
362
- _collection_formats: Dict[str, str] = {}
363
-
364
- _path_params: Dict[str, str] = {}
365
- _query_params: List[Tuple[str, str]] = []
366
- _header_params: Dict[str, Optional[str]] = _headers or {}
367
- _form_params: List[Tuple[str, str]] = []
368
- _files: Dict[
369
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
370
- ] = {}
371
- _body_params: Optional[bytes] = None
372
-
373
- # process the path parameters
374
- if tenant is not None:
375
- _path_params["tenant"] = tenant
376
- # process the query parameters
377
- if offset is not None:
378
-
379
- _query_params.append(("offset", offset))
380
-
381
- if limit is not None:
382
-
383
- _query_params.append(("limit", limit))
384
-
385
- if search is not None:
386
-
387
- _query_params.append(("search", search))
388
-
389
- if order_by_field is not None:
390
-
391
- _query_params.append(("orderByField", order_by_field.value))
392
-
393
- if order_by_direction is not None:
394
-
395
- _query_params.append(("orderByDirection", order_by_direction.value))
396
-
397
- # process the header parameters
398
- # process the form parameters
399
- # process the body parameter
400
-
401
- # set the HTTP header `Accept`
402
- if "Accept" not in _header_params:
403
- _header_params["Accept"] = self.api_client.select_header_accept(
404
- ["application/json"]
405
- )
406
-
407
- # authentication setting
408
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
409
-
410
- return self.api_client.param_serialize(
411
- method="GET",
412
- resource_path="/api/v1/tenants/{tenant}/rate-limits",
413
- path_params=_path_params,
414
- query_params=_query_params,
415
- header_params=_header_params,
416
- body=_body_params,
417
- post_params=_form_params,
418
- files=_files,
419
- auth_settings=_auth_settings,
420
- collection_formats=_collection_formats,
421
- _host=_host,
422
- _request_auth=_request_auth,
423
- )