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,113 +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
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from datetime import datetime
21
- from typing import Any, ClassVar, Dict, List, Optional, Set
22
-
23
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
24
- from typing_extensions import Self
25
-
26
- from hatchet_sdk.v0.clients.rest.models.step_run_status import StepRunStatus
27
-
28
-
29
- class SemaphoreSlots(BaseModel):
30
- """
31
- SemaphoreSlots
32
- """ # noqa: E501
33
-
34
- step_run_id: StrictStr = Field(description="The step run id.", alias="stepRunId")
35
- action_id: StrictStr = Field(description="The action id.", alias="actionId")
36
- started_at: Optional[datetime] = Field(
37
- default=None, description="The time this slot was started.", alias="startedAt"
38
- )
39
- timeout_at: Optional[datetime] = Field(
40
- default=None, description="The time this slot will timeout.", alias="timeoutAt"
41
- )
42
- workflow_run_id: StrictStr = Field(
43
- description="The workflow run id.", alias="workflowRunId"
44
- )
45
- status: StepRunStatus
46
- __properties: ClassVar[List[str]] = [
47
- "stepRunId",
48
- "actionId",
49
- "startedAt",
50
- "timeoutAt",
51
- "workflowRunId",
52
- "status",
53
- ]
54
-
55
- model_config = ConfigDict(
56
- populate_by_name=True,
57
- validate_assignment=True,
58
- protected_namespaces=(),
59
- )
60
-
61
- def to_str(self) -> str:
62
- """Returns the string representation of the model using alias"""
63
- return pprint.pformat(self.model_dump(by_alias=True))
64
-
65
- def to_json(self) -> str:
66
- """Returns the JSON representation of the model using alias"""
67
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
68
- return json.dumps(self.to_dict())
69
-
70
- @classmethod
71
- def from_json(cls, json_str: str) -> Optional[Self]:
72
- """Create an instance of SemaphoreSlots from a JSON string"""
73
- return cls.from_dict(json.loads(json_str))
74
-
75
- def to_dict(self) -> Dict[str, Any]:
76
- """Return the dictionary representation of the model using alias.
77
-
78
- This has the following differences from calling pydantic's
79
- `self.model_dump(by_alias=True)`:
80
-
81
- * `None` is only added to the output dict for nullable fields that
82
- were set at model initialization. Other fields with value `None`
83
- are ignored.
84
- """
85
- excluded_fields: Set[str] = set([])
86
-
87
- _dict = self.model_dump(
88
- by_alias=True,
89
- exclude=excluded_fields,
90
- exclude_none=True,
91
- )
92
- return _dict
93
-
94
- @classmethod
95
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
- """Create an instance of SemaphoreSlots from a dict"""
97
- if obj is None:
98
- return None
99
-
100
- if not isinstance(obj, dict):
101
- return cls.model_validate(obj)
102
-
103
- _obj = cls.model_validate(
104
- {
105
- "stepRunId": obj.get("stepRunId"),
106
- "actionId": obj.get("actionId"),
107
- "startedAt": obj.get("startedAt"),
108
- "timeoutAt": obj.get("timeoutAt"),
109
- "workflowRunId": obj.get("workflowRunId"),
110
- "status": obj.get("status"),
111
- }
112
- )
113
- return _obj
@@ -1,127 +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
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
- from typing_extensions import Self
24
-
25
- from hatchet_sdk.v0.clients.rest.models.api_resource_meta import APIResourceMeta
26
-
27
-
28
- class SlackWebhook(BaseModel):
29
- """
30
- SlackWebhook
31
- """ # noqa: E501
32
-
33
- metadata: APIResourceMeta
34
- tenant_id: StrictStr = Field(
35
- description="The unique identifier for the tenant that the SNS integration belongs to.",
36
- alias="tenantId",
37
- )
38
- team_name: StrictStr = Field(
39
- description="The team name associated with this slack webhook.",
40
- alias="teamName",
41
- )
42
- team_id: StrictStr = Field(
43
- description="The team id associated with this slack webhook.", alias="teamId"
44
- )
45
- channel_name: StrictStr = Field(
46
- description="The channel name associated with this slack webhook.",
47
- alias="channelName",
48
- )
49
- channel_id: StrictStr = Field(
50
- description="The channel id associated with this slack webhook.",
51
- alias="channelId",
52
- )
53
- __properties: ClassVar[List[str]] = [
54
- "metadata",
55
- "tenantId",
56
- "teamName",
57
- "teamId",
58
- "channelName",
59
- "channelId",
60
- ]
61
-
62
- model_config = ConfigDict(
63
- populate_by_name=True,
64
- validate_assignment=True,
65
- protected_namespaces=(),
66
- )
67
-
68
- def to_str(self) -> str:
69
- """Returns the string representation of the model using alias"""
70
- return pprint.pformat(self.model_dump(by_alias=True))
71
-
72
- def to_json(self) -> str:
73
- """Returns the JSON representation of the model using alias"""
74
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
75
- return json.dumps(self.to_dict())
76
-
77
- @classmethod
78
- def from_json(cls, json_str: str) -> Optional[Self]:
79
- """Create an instance of SlackWebhook from a JSON string"""
80
- return cls.from_dict(json.loads(json_str))
81
-
82
- def to_dict(self) -> Dict[str, Any]:
83
- """Return the dictionary representation of the model using alias.
84
-
85
- This has the following differences from calling pydantic's
86
- `self.model_dump(by_alias=True)`:
87
-
88
- * `None` is only added to the output dict for nullable fields that
89
- were set at model initialization. Other fields with value `None`
90
- are ignored.
91
- """
92
- excluded_fields: Set[str] = set([])
93
-
94
- _dict = self.model_dump(
95
- by_alias=True,
96
- exclude=excluded_fields,
97
- exclude_none=True,
98
- )
99
- # override the default output from pydantic by calling `to_dict()` of metadata
100
- if self.metadata:
101
- _dict["metadata"] = self.metadata.to_dict()
102
- return _dict
103
-
104
- @classmethod
105
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
106
- """Create an instance of SlackWebhook from a dict"""
107
- if obj is None:
108
- return None
109
-
110
- if not isinstance(obj, dict):
111
- return cls.model_validate(obj)
112
-
113
- _obj = cls.model_validate(
114
- {
115
- "metadata": (
116
- APIResourceMeta.from_dict(obj["metadata"])
117
- if obj.get("metadata") is not None
118
- else None
119
- ),
120
- "tenantId": obj.get("tenantId"),
121
- "teamName": obj.get("teamName"),
122
- "teamId": obj.get("teamId"),
123
- "channelName": obj.get("channelName"),
124
- "channelId": obj.get("channelId"),
125
- }
126
- )
127
- return _obj
@@ -1,114 +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
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
- from typing_extensions import Self
24
-
25
- from hatchet_sdk.v0.clients.rest.models.api_resource_meta import APIResourceMeta
26
-
27
-
28
- class SNSIntegration(BaseModel):
29
- """
30
- SNSIntegration
31
- """ # noqa: E501
32
-
33
- metadata: APIResourceMeta
34
- tenant_id: StrictStr = Field(
35
- description="The unique identifier for the tenant that the SNS integration belongs to.",
36
- alias="tenantId",
37
- )
38
- topic_arn: StrictStr = Field(
39
- description="The Amazon Resource Name (ARN) of the SNS topic.", alias="topicArn"
40
- )
41
- ingest_url: Optional[StrictStr] = Field(
42
- default=None, description="The URL to send SNS messages to.", alias="ingestUrl"
43
- )
44
- __properties: ClassVar[List[str]] = [
45
- "metadata",
46
- "tenantId",
47
- "topicArn",
48
- "ingestUrl",
49
- ]
50
-
51
- model_config = ConfigDict(
52
- populate_by_name=True,
53
- validate_assignment=True,
54
- protected_namespaces=(),
55
- )
56
-
57
- def to_str(self) -> str:
58
- """Returns the string representation of the model using alias"""
59
- return pprint.pformat(self.model_dump(by_alias=True))
60
-
61
- def to_json(self) -> str:
62
- """Returns the JSON representation of the model using alias"""
63
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
- return json.dumps(self.to_dict())
65
-
66
- @classmethod
67
- def from_json(cls, json_str: str) -> Optional[Self]:
68
- """Create an instance of SNSIntegration from a JSON string"""
69
- return cls.from_dict(json.loads(json_str))
70
-
71
- def to_dict(self) -> Dict[str, Any]:
72
- """Return the dictionary representation of the model using alias.
73
-
74
- This has the following differences from calling pydantic's
75
- `self.model_dump(by_alias=True)`:
76
-
77
- * `None` is only added to the output dict for nullable fields that
78
- were set at model initialization. Other fields with value `None`
79
- are ignored.
80
- """
81
- excluded_fields: Set[str] = set([])
82
-
83
- _dict = self.model_dump(
84
- by_alias=True,
85
- exclude=excluded_fields,
86
- exclude_none=True,
87
- )
88
- # override the default output from pydantic by calling `to_dict()` of metadata
89
- if self.metadata:
90
- _dict["metadata"] = self.metadata.to_dict()
91
- return _dict
92
-
93
- @classmethod
94
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
95
- """Create an instance of SNSIntegration from a dict"""
96
- if obj is None:
97
- return None
98
-
99
- if not isinstance(obj, dict):
100
- return cls.model_validate(obj)
101
-
102
- _obj = cls.model_validate(
103
- {
104
- "metadata": (
105
- APIResourceMeta.from_dict(obj["metadata"])
106
- if obj.get("metadata") is not None
107
- else None
108
- ),
109
- "tenantId": obj.get("tenantId"),
110
- "topicArn": obj.get("topicArn"),
111
- "ingestUrl": obj.get("ingestUrl"),
112
- }
113
- )
114
- return _obj
@@ -1,123 +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
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
- from typing_extensions import Self
24
-
25
- from hatchet_sdk.v0.clients.rest.models.api_resource_meta import APIResourceMeta
26
-
27
-
28
- class Step(BaseModel):
29
- """
30
- Step
31
- """ # noqa: E501
32
-
33
- metadata: APIResourceMeta
34
- readable_id: StrictStr = Field(
35
- description="The readable id of the step.", alias="readableId"
36
- )
37
- tenant_id: StrictStr = Field(alias="tenantId")
38
- job_id: StrictStr = Field(alias="jobId")
39
- action: StrictStr
40
- timeout: Optional[StrictStr] = Field(
41
- default=None, description="The timeout of the step."
42
- )
43
- children: Optional[List[StrictStr]] = None
44
- parents: Optional[List[StrictStr]] = None
45
- __properties: ClassVar[List[str]] = [
46
- "metadata",
47
- "readableId",
48
- "tenantId",
49
- "jobId",
50
- "action",
51
- "timeout",
52
- "children",
53
- "parents",
54
- ]
55
-
56
- model_config = ConfigDict(
57
- populate_by_name=True,
58
- validate_assignment=True,
59
- protected_namespaces=(),
60
- )
61
-
62
- def to_str(self) -> str:
63
- """Returns the string representation of the model using alias"""
64
- return pprint.pformat(self.model_dump(by_alias=True))
65
-
66
- def to_json(self) -> str:
67
- """Returns the JSON representation of the model using alias"""
68
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
69
- return json.dumps(self.to_dict())
70
-
71
- @classmethod
72
- def from_json(cls, json_str: str) -> Optional[Self]:
73
- """Create an instance of Step from a JSON string"""
74
- return cls.from_dict(json.loads(json_str))
75
-
76
- def to_dict(self) -> Dict[str, Any]:
77
- """Return the dictionary representation of the model using alias.
78
-
79
- This has the following differences from calling pydantic's
80
- `self.model_dump(by_alias=True)`:
81
-
82
- * `None` is only added to the output dict for nullable fields that
83
- were set at model initialization. Other fields with value `None`
84
- are ignored.
85
- """
86
- excluded_fields: Set[str] = set([])
87
-
88
- _dict = self.model_dump(
89
- by_alias=True,
90
- exclude=excluded_fields,
91
- exclude_none=True,
92
- )
93
- # override the default output from pydantic by calling `to_dict()` of metadata
94
- if self.metadata:
95
- _dict["metadata"] = self.metadata.to_dict()
96
- return _dict
97
-
98
- @classmethod
99
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
100
- """Create an instance of Step from a dict"""
101
- if obj is None:
102
- return None
103
-
104
- if not isinstance(obj, dict):
105
- return cls.model_validate(obj)
106
-
107
- _obj = cls.model_validate(
108
- {
109
- "metadata": (
110
- APIResourceMeta.from_dict(obj["metadata"])
111
- if obj.get("metadata") is not None
112
- else None
113
- ),
114
- "readableId": obj.get("readableId"),
115
- "tenantId": obj.get("tenantId"),
116
- "jobId": obj.get("jobId"),
117
- "action": obj.get("action"),
118
- "timeout": obj.get("timeout"),
119
- "children": obj.get("children"),
120
- "parents": obj.get("parents"),
121
- }
122
- )
123
- return _obj
@@ -1,202 +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
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from datetime import datetime
21
- from typing import Any, ClassVar, Dict, List, Optional, Set
22
-
23
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
24
- from typing_extensions import Self
25
-
26
- from hatchet_sdk.v0.clients.rest.models.api_resource_meta import APIResourceMeta
27
- from hatchet_sdk.v0.clients.rest.models.step import Step
28
- from hatchet_sdk.v0.clients.rest.models.step_run_status import StepRunStatus
29
-
30
-
31
- class StepRun(BaseModel):
32
- """
33
- StepRun
34
- """ # noqa: E501
35
-
36
- metadata: APIResourceMeta
37
- tenant_id: StrictStr = Field(alias="tenantId")
38
- job_run_id: StrictStr = Field(alias="jobRunId")
39
- job_run: Optional[JobRun] = Field(default=None, alias="jobRun")
40
- step_id: StrictStr = Field(alias="stepId")
41
- step: Optional[Step] = None
42
- child_workflows_count: Optional[StrictInt] = Field(
43
- default=None, alias="childWorkflowsCount"
44
- )
45
- parents: Optional[List[StrictStr]] = None
46
- child_workflow_runs: Optional[List[StrictStr]] = Field(
47
- default=None, alias="childWorkflowRuns"
48
- )
49
- worker_id: Optional[StrictStr] = Field(default=None, alias="workerId")
50
- input: Optional[StrictStr] = None
51
- output: Optional[StrictStr] = None
52
- status: StepRunStatus
53
- requeue_after: Optional[datetime] = Field(default=None, alias="requeueAfter")
54
- result: Optional[Dict[str, Any]] = None
55
- error: Optional[StrictStr] = None
56
- started_at: Optional[datetime] = Field(default=None, alias="startedAt")
57
- started_at_epoch: Optional[StrictInt] = Field(default=None, alias="startedAtEpoch")
58
- finished_at: Optional[datetime] = Field(default=None, alias="finishedAt")
59
- finished_at_epoch: Optional[StrictInt] = Field(
60
- default=None, alias="finishedAtEpoch"
61
- )
62
- timeout_at: Optional[datetime] = Field(default=None, alias="timeoutAt")
63
- timeout_at_epoch: Optional[StrictInt] = Field(default=None, alias="timeoutAtEpoch")
64
- cancelled_at: Optional[datetime] = Field(default=None, alias="cancelledAt")
65
- cancelled_at_epoch: Optional[StrictInt] = Field(
66
- default=None, alias="cancelledAtEpoch"
67
- )
68
- cancelled_reason: Optional[StrictStr] = Field(default=None, alias="cancelledReason")
69
- cancelled_error: Optional[StrictStr] = Field(default=None, alias="cancelledError")
70
- __properties: ClassVar[List[str]] = [
71
- "metadata",
72
- "tenantId",
73
- "jobRunId",
74
- "jobRun",
75
- "stepId",
76
- "step",
77
- "childWorkflowsCount",
78
- "parents",
79
- "childWorkflowRuns",
80
- "workerId",
81
- "input",
82
- "output",
83
- "status",
84
- "requeueAfter",
85
- "result",
86
- "error",
87
- "startedAt",
88
- "startedAtEpoch",
89
- "finishedAt",
90
- "finishedAtEpoch",
91
- "timeoutAt",
92
- "timeoutAtEpoch",
93
- "cancelledAt",
94
- "cancelledAtEpoch",
95
- "cancelledReason",
96
- "cancelledError",
97
- ]
98
-
99
- model_config = ConfigDict(
100
- populate_by_name=True,
101
- validate_assignment=True,
102
- protected_namespaces=(),
103
- )
104
-
105
- def to_str(self) -> str:
106
- """Returns the string representation of the model using alias"""
107
- return pprint.pformat(self.model_dump(by_alias=True))
108
-
109
- def to_json(self) -> str:
110
- """Returns the JSON representation of the model using alias"""
111
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
112
- return json.dumps(self.to_dict())
113
-
114
- @classmethod
115
- def from_json(cls, json_str: str) -> Optional[Self]:
116
- """Create an instance of StepRun from a JSON string"""
117
- return cls.from_dict(json.loads(json_str))
118
-
119
- def to_dict(self) -> Dict[str, Any]:
120
- """Return the dictionary representation of the model using alias.
121
-
122
- This has the following differences from calling pydantic's
123
- `self.model_dump(by_alias=True)`:
124
-
125
- * `None` is only added to the output dict for nullable fields that
126
- were set at model initialization. Other fields with value `None`
127
- are ignored.
128
- """
129
- excluded_fields: Set[str] = set([])
130
-
131
- _dict = self.model_dump(
132
- by_alias=True,
133
- exclude=excluded_fields,
134
- exclude_none=True,
135
- )
136
- # override the default output from pydantic by calling `to_dict()` of metadata
137
- if self.metadata:
138
- _dict["metadata"] = self.metadata.to_dict()
139
- # override the default output from pydantic by calling `to_dict()` of job_run
140
- if self.job_run:
141
- _dict["jobRun"] = self.job_run.to_dict()
142
- # override the default output from pydantic by calling `to_dict()` of step
143
- if self.step:
144
- _dict["step"] = self.step.to_dict()
145
- return _dict
146
-
147
- @classmethod
148
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
149
- """Create an instance of StepRun from a dict"""
150
- if obj is None:
151
- return None
152
-
153
- if not isinstance(obj, dict):
154
- return cls.model_validate(obj)
155
-
156
- _obj = cls.model_validate(
157
- {
158
- "metadata": (
159
- APIResourceMeta.from_dict(obj["metadata"])
160
- if obj.get("metadata") is not None
161
- else None
162
- ),
163
- "tenantId": obj.get("tenantId"),
164
- "jobRunId": obj.get("jobRunId"),
165
- "jobRun": (
166
- JobRun.from_dict(obj["jobRun"])
167
- if obj.get("jobRun") is not None
168
- else None
169
- ),
170
- "stepId": obj.get("stepId"),
171
- "step": (
172
- Step.from_dict(obj["step"]) if obj.get("step") is not None else None
173
- ),
174
- "childWorkflowsCount": obj.get("childWorkflowsCount"),
175
- "parents": obj.get("parents"),
176
- "childWorkflowRuns": obj.get("childWorkflowRuns"),
177
- "workerId": obj.get("workerId"),
178
- "input": obj.get("input"),
179
- "output": obj.get("output"),
180
- "status": obj.get("status"),
181
- "requeueAfter": obj.get("requeueAfter"),
182
- "result": obj.get("result"),
183
- "error": obj.get("error"),
184
- "startedAt": obj.get("startedAt"),
185
- "startedAtEpoch": obj.get("startedAtEpoch"),
186
- "finishedAt": obj.get("finishedAt"),
187
- "finishedAtEpoch": obj.get("finishedAtEpoch"),
188
- "timeoutAt": obj.get("timeoutAt"),
189
- "timeoutAtEpoch": obj.get("timeoutAtEpoch"),
190
- "cancelledAt": obj.get("cancelledAt"),
191
- "cancelledAtEpoch": obj.get("cancelledAtEpoch"),
192
- "cancelledReason": obj.get("cancelledReason"),
193
- "cancelledError": obj.get("cancelledError"),
194
- }
195
- )
196
- return _obj
197
-
198
-
199
- from hatchet_sdk.v0.clients.rest.models.job_run import JobRun
200
-
201
- # TODO: Rewrite to not use raise_errors
202
- StepRun.model_rebuild(raise_errors=False)