hatchet-sdk 0.40.0a8__py3-none-any.whl → 0.41.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

Files changed (149) hide show
  1. hatchet_sdk/clients/admin.py +129 -59
  2. hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
  3. hatchet_sdk/clients/events.py +91 -52
  4. hatchet_sdk/clients/rest/__init__.py +21 -0
  5. hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
  6. hatchet_sdk/clients/rest/api/default_api.py +24 -18
  7. hatchet_sdk/clients/rest/api/event_api.py +32 -24
  8. hatchet_sdk/clients/rest/api/github_api.py +4 -3
  9. hatchet_sdk/clients/rest/api/log_api.py +4 -3
  10. hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
  11. hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
  12. hatchet_sdk/clients/rest/api/slack_api.py +8 -6
  13. hatchet_sdk/clients/rest/api/sns_api.py +12 -9
  14. hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
  15. hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
  16. hatchet_sdk/clients/rest/api/user_api.py +24 -18
  17. hatchet_sdk/clients/rest/api/worker_api.py +12 -9
  18. hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
  19. hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
  20. hatchet_sdk/clients/rest/api_client.py +34 -11
  21. hatchet_sdk/clients/rest/configuration.py +161 -36
  22. hatchet_sdk/clients/rest/models/__init__.py +21 -0
  23. hatchet_sdk/clients/rest/models/api_errors.py +3 -3
  24. hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
  25. hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
  26. hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
  27. hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
  28. hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
  29. hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  30. hatchet_sdk/clients/rest/models/event_list.py +3 -3
  31. hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
  32. hatchet_sdk/clients/rest/models/job.py +3 -3
  33. hatchet_sdk/clients/rest/models/job_run.py +3 -3
  34. hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
  35. hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
  36. hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
  37. hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
  38. hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
  39. hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
  40. hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
  41. hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
  42. hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
  43. hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
  44. hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
  45. hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  46. hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
  47. hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
  48. hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
  49. hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
  50. hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
  51. hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
  52. hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
  53. hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
  54. hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
  55. hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
  56. hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
  57. hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
  58. hatchet_sdk/clients/rest/models/worker.py +20 -9
  59. hatchet_sdk/clients/rest/models/worker_list.py +3 -3
  60. hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
  61. hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
  62. hatchet_sdk/clients/rest/models/workflow.py +9 -9
  63. hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
  64. hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
  65. hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
  66. hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
  67. hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
  68. hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
  69. hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
  70. hatchet_sdk/clients/rest/rest.py +3 -3
  71. hatchet_sdk/clients/rest_client.py +200 -21
  72. hatchet_sdk/contracts/dispatcher_pb2.pyi +2 -0
  73. hatchet_sdk/contracts/events_pb2.pyi +2 -0
  74. hatchet_sdk/contracts/workflows_pb2.pyi +2 -0
  75. hatchet_sdk/features/cron.py +286 -0
  76. hatchet_sdk/features/scheduled.py +248 -0
  77. hatchet_sdk/hatchet.py +71 -79
  78. hatchet_sdk/loader.py +37 -14
  79. hatchet_sdk/utils/serialization.py +15 -0
  80. hatchet_sdk/utils/tracing.py +67 -0
  81. hatchet_sdk/worker/runner/runner.py +158 -112
  82. hatchet_sdk/worker/worker.py +1 -17
  83. {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/METADATA +8 -2
  84. {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/RECORD +86 -140
  85. {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/entry_points.txt +0 -1
  86. hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
  87. hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
  88. hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
  89. hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
  90. hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
  91. hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
  92. hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
  93. hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
  94. hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
  95. hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
  96. hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
  97. hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
  98. hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
  99. hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
  100. hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
  101. hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
  102. hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
  103. hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
  104. hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
  105. hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
  106. hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
  107. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
  108. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
  109. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
  110. hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
  111. hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
  112. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
  113. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
  114. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
  115. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
  116. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
  117. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
  118. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
  119. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
  120. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
  121. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
  122. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
  123. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
  124. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
  125. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
  126. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
  127. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
  128. hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
  129. hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
  130. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
  131. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
  132. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
  133. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
  134. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
  135. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
  136. hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
  137. hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
  138. hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
  139. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
  140. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
  141. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
  142. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
  143. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
  144. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
  145. hatchet_sdk/clients/cloud_rest/rest.py +0 -182
  146. hatchet_sdk/compute/__init__.py +0 -0
  147. hatchet_sdk/compute/configs.py +0 -34
  148. hatchet_sdk/compute/managed_compute.py +0 -111
  149. {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/WHEEL +0 -0
@@ -22,21 +22,17 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
  from pydantic import BaseModel, ConfigDict
23
23
  from typing_extensions import Self
24
24
 
25
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_pagination import (
26
- GithubAppListInstallations200ResponsePagination,
27
- )
28
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_list200_response_rows_inner import (
29
- ManagedWorkerList200ResponseRowsInner,
30
- )
25
+ from hatchet_sdk.clients.rest.models.pagination_response import PaginationResponse
26
+ from hatchet_sdk.clients.rest.models.scheduled_workflows import ScheduledWorkflows
31
27
 
32
28
 
33
- class ManagedWorkerList200Response(BaseModel):
29
+ class ScheduledWorkflowsList(BaseModel):
34
30
  """
35
- ManagedWorkerList200Response
31
+ ScheduledWorkflowsList
36
32
  """ # noqa: E501
37
33
 
38
- rows: Optional[List[ManagedWorkerList200ResponseRowsInner]] = None
39
- pagination: Optional[GithubAppListInstallations200ResponsePagination] = None
34
+ rows: Optional[List[ScheduledWorkflows]] = None
35
+ pagination: Optional[PaginationResponse] = None
40
36
  __properties: ClassVar[List[str]] = ["rows", "pagination"]
41
37
 
42
38
  model_config = ConfigDict(
@@ -56,7 +52,7 @@ class ManagedWorkerList200Response(BaseModel):
56
52
 
57
53
  @classmethod
58
54
  def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of ManagedWorkerList200Response from a JSON string"""
55
+ """Create an instance of ScheduledWorkflowsList from a JSON string"""
60
56
  return cls.from_dict(json.loads(json_str))
61
57
 
62
58
  def to_dict(self) -> Dict[str, Any]:
@@ -79,9 +75,9 @@ class ManagedWorkerList200Response(BaseModel):
79
75
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
80
76
  _items = []
81
77
  if self.rows:
82
- for _item in self.rows:
83
- if _item:
84
- _items.append(_item.to_dict())
78
+ for _item_rows in self.rows:
79
+ if _item_rows:
80
+ _items.append(_item_rows.to_dict())
85
81
  _dict["rows"] = _items
86
82
  # override the default output from pydantic by calling `to_dict()` of pagination
87
83
  if self.pagination:
@@ -90,7 +86,7 @@ class ManagedWorkerList200Response(BaseModel):
90
86
 
91
87
  @classmethod
92
88
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
- """Create an instance of ManagedWorkerList200Response from a dict"""
89
+ """Create an instance of ScheduledWorkflowsList from a dict"""
94
90
  if obj is None:
95
91
  return None
96
92
 
@@ -100,17 +96,12 @@ class ManagedWorkerList200Response(BaseModel):
100
96
  _obj = cls.model_validate(
101
97
  {
102
98
  "rows": (
103
- [
104
- ManagedWorkerList200ResponseRowsInner.from_dict(_item)
105
- for _item in obj["rows"]
106
- ]
99
+ [ScheduledWorkflows.from_dict(_item) for _item in obj["rows"]]
107
100
  if obj.get("rows") is not None
108
101
  else None
109
102
  ),
110
103
  "pagination": (
111
- GithubAppListInstallations200ResponsePagination.from_dict(
112
- obj["pagination"]
113
- )
104
+ PaginationResponse.from_dict(obj["pagination"])
114
105
  if obj.get("pagination") is not None
115
106
  else None
116
107
  ),
@@ -0,0 +1,37 @@
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
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class ScheduledWorkflowsOrderByField(str, Enum):
24
+ """
25
+ ScheduledWorkflowsOrderByField
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ TRIGGERAT = "triggerAt"
32
+ CREATEDAT = "createdAt"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of ScheduledWorkflowsOrderByField from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -78,9 +78,9 @@ class StepRunArchiveList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -78,9 +78,9 @@ class StepRunEventList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -80,9 +80,9 @@ class TenantAlertEmailGroupList(BaseModel):
80
80
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
81
81
  _items = []
82
82
  if self.rows:
83
- for _item in self.rows:
84
- if _item:
85
- _items.append(_item.to_dict())
83
+ for _item_rows in self.rows:
84
+ if _item_rows:
85
+ _items.append(_item_rows.to_dict())
86
86
  _dict["rows"] = _items
87
87
  return _dict
88
88
 
@@ -78,9 +78,9 @@ class TenantInviteList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -78,9 +78,9 @@ class TenantList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -78,9 +78,9 @@ class TenantMemberList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -77,6 +77,13 @@ class TenantQueueMetrics(BaseModel):
77
77
  # override the default output from pydantic by calling `to_dict()` of total
78
78
  if self.total:
79
79
  _dict["total"] = self.total.to_dict()
80
+ # override the default output from pydantic by calling `to_dict()` of each value in workflow (dict)
81
+ _field_dict = {}
82
+ if self.workflow:
83
+ for _key_workflow in self.workflow:
84
+ if self.workflow[_key_workflow]:
85
+ _field_dict[_key_workflow] = self.workflow[_key_workflow].to_dict()
86
+ _dict["workflow"] = _field_dict
80
87
  return _dict
81
88
 
82
89
  @classmethod
@@ -95,6 +102,15 @@ class TenantQueueMetrics(BaseModel):
95
102
  if obj.get("total") is not None
96
103
  else None
97
104
  ),
105
+ "workflow": (
106
+ dict(
107
+ (_k, QueueMetrics.from_dict(_v))
108
+ for _k, _v in obj["workflow"].items()
109
+ )
110
+ if obj.get("workflow") is not None
111
+ else None
112
+ ),
113
+ "queues": obj.get("queues"),
98
114
  }
99
115
  )
100
116
  return _obj
@@ -75,9 +75,9 @@ class TenantResourcePolicy(BaseModel):
75
75
  # override the default output from pydantic by calling `to_dict()` of each item in limits (list)
76
76
  _items = []
77
77
  if self.limits:
78
- for _item in self.limits:
79
- if _item:
80
- _items.append(_item.to_dict())
78
+ for _item_limits in self.limits:
79
+ if _item_limits:
80
+ _items.append(_item_limits.to_dict())
81
81
  _dict["limits"] = _items
82
82
  return _dict
83
83
 
@@ -79,5 +79,5 @@ class TenantStepRunQueueMetrics(BaseModel):
79
79
  if not isinstance(obj, dict):
80
80
  return cls.model_validate(obj)
81
81
 
82
- _obj = cls.model_validate({})
82
+ _obj = cls.model_validate({"queues": obj.get("queues")})
83
83
  return _obj
@@ -78,9 +78,9 @@ class UserTenantMembershipsList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -78,9 +78,9 @@ class WebhookWorkerListResponse(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -75,9 +75,9 @@ class WebhookWorkerRequestListResponse(BaseModel):
75
75
  # override the default output from pydantic by calling `to_dict()` of each item in requests (list)
76
76
  _items = []
77
77
  if self.requests:
78
- for _item in self.requests:
79
- if _item:
80
- _items.append(_item.to_dict())
78
+ for _item_requests in self.requests:
79
+ if _item_requests:
80
+ _items.append(_item_requests.to_dict())
81
81
  _dict["requests"] = _items
82
82
  return _dict
83
83
 
@@ -27,6 +27,7 @@ from hatchet_sdk.clients.rest.models.api_resource_meta import APIResourceMeta
27
27
  from hatchet_sdk.clients.rest.models.recent_step_runs import RecentStepRuns
28
28
  from hatchet_sdk.clients.rest.models.semaphore_slots import SemaphoreSlots
29
29
  from hatchet_sdk.clients.rest.models.worker_label import WorkerLabel
30
+ from hatchet_sdk.clients.rest.models.worker_runtime_info import WorkerRuntimeInfo
30
31
 
31
32
 
32
33
  class Worker(BaseModel):
@@ -87,6 +88,7 @@ class Worker(BaseModel):
87
88
  webhook_id: Optional[StrictStr] = Field(
88
89
  default=None, description="The webhook ID for the worker.", alias="webhookId"
89
90
  )
91
+ runtime_info: Optional[WorkerRuntimeInfo] = Field(default=None, alias="runtimeInfo")
90
92
  __properties: ClassVar[List[str]] = [
91
93
  "metadata",
92
94
  "name",
@@ -103,6 +105,7 @@ class Worker(BaseModel):
103
105
  "labels",
104
106
  "webhookUrl",
105
107
  "webhookId",
108
+ "runtimeInfo",
106
109
  ]
107
110
 
108
111
  @field_validator("type")
@@ -169,24 +172,27 @@ class Worker(BaseModel):
169
172
  # override the default output from pydantic by calling `to_dict()` of each item in slots (list)
170
173
  _items = []
171
174
  if self.slots:
172
- for _item in self.slots:
173
- if _item:
174
- _items.append(_item.to_dict())
175
+ for _item_slots in self.slots:
176
+ if _item_slots:
177
+ _items.append(_item_slots.to_dict())
175
178
  _dict["slots"] = _items
176
179
  # override the default output from pydantic by calling `to_dict()` of each item in recent_step_runs (list)
177
180
  _items = []
178
181
  if self.recent_step_runs:
179
- for _item in self.recent_step_runs:
180
- if _item:
181
- _items.append(_item.to_dict())
182
+ for _item_recent_step_runs in self.recent_step_runs:
183
+ if _item_recent_step_runs:
184
+ _items.append(_item_recent_step_runs.to_dict())
182
185
  _dict["recentStepRuns"] = _items
183
186
  # override the default output from pydantic by calling `to_dict()` of each item in labels (list)
184
187
  _items = []
185
188
  if self.labels:
186
- for _item in self.labels:
187
- if _item:
188
- _items.append(_item.to_dict())
189
+ for _item_labels in self.labels:
190
+ if _item_labels:
191
+ _items.append(_item_labels.to_dict())
189
192
  _dict["labels"] = _items
193
+ # override the default output from pydantic by calling `to_dict()` of runtime_info
194
+ if self.runtime_info:
195
+ _dict["runtimeInfo"] = self.runtime_info.to_dict()
190
196
  return _dict
191
197
 
192
198
  @classmethod
@@ -231,6 +237,11 @@ class Worker(BaseModel):
231
237
  ),
232
238
  "webhookUrl": obj.get("webhookUrl"),
233
239
  "webhookId": obj.get("webhookId"),
240
+ "runtimeInfo": (
241
+ WorkerRuntimeInfo.from_dict(obj["runtimeInfo"])
242
+ if obj.get("runtimeInfo") is not None
243
+ else None
244
+ ),
234
245
  }
235
246
  )
236
247
  return _obj
@@ -78,9 +78,9 @@ class WorkerList(BaseModel):
78
78
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
79
79
  _items = []
80
80
  if self.rows:
81
- for _item in self.rows:
82
- if _item:
83
- _items.append(_item.to_dict())
81
+ for _item_rows in self.rows:
82
+ if _item_rows:
83
+ _items.append(_item_rows.to_dict())
84
84
  _dict["rows"] = _items
85
85
  return _dict
86
86
 
@@ -22,23 +22,26 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
23
  from typing_extensions import Self
24
24
 
25
+ from hatchet_sdk.clients.rest.models.worker_runtime_sdks import WorkerRuntimeSDKs
25
26
 
26
- class TenantBillingStateGet200ResponsePaymentMethodsInner(BaseModel):
27
+
28
+ class WorkerRuntimeInfo(BaseModel):
27
29
  """
28
- TenantBillingStateGet200ResponsePaymentMethodsInner
30
+ WorkerRuntimeInfo
29
31
  """ # noqa: E501
30
32
 
31
- brand: StrictStr = Field(description="The brand of the payment method.")
32
- last4: Optional[StrictStr] = Field(
33
- default=None, description="The last 4 digits of the card."
34
- )
35
- expiration: Optional[StrictStr] = Field(
36
- default=None, description="The expiration date of the card."
37
- )
38
- description: Optional[StrictStr] = Field(
39
- default=None, description="The description of the payment method."
40
- )
41
- __properties: ClassVar[List[str]] = ["brand", "last4", "expiration", "description"]
33
+ sdk_version: Optional[StrictStr] = Field(default=None, alias="sdkVersion")
34
+ language: Optional[WorkerRuntimeSDKs] = None
35
+ language_version: Optional[StrictStr] = Field(default=None, alias="languageVersion")
36
+ os: Optional[StrictStr] = None
37
+ runtime_extra: Optional[StrictStr] = Field(default=None, alias="runtimeExtra")
38
+ __properties: ClassVar[List[str]] = [
39
+ "sdkVersion",
40
+ "language",
41
+ "languageVersion",
42
+ "os",
43
+ "runtimeExtra",
44
+ ]
42
45
 
43
46
  model_config = ConfigDict(
44
47
  populate_by_name=True,
@@ -57,7 +60,7 @@ class TenantBillingStateGet200ResponsePaymentMethodsInner(BaseModel):
57
60
 
58
61
  @classmethod
59
62
  def from_json(cls, json_str: str) -> Optional[Self]:
60
- """Create an instance of TenantBillingStateGet200ResponsePaymentMethodsInner from a JSON string"""
63
+ """Create an instance of WorkerRuntimeInfo from a JSON string"""
61
64
  return cls.from_dict(json.loads(json_str))
62
65
 
63
66
  def to_dict(self) -> Dict[str, Any]:
@@ -81,7 +84,7 @@ class TenantBillingStateGet200ResponsePaymentMethodsInner(BaseModel):
81
84
 
82
85
  @classmethod
83
86
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
- """Create an instance of TenantBillingStateGet200ResponsePaymentMethodsInner from a dict"""
87
+ """Create an instance of WorkerRuntimeInfo from a dict"""
85
88
  if obj is None:
86
89
  return None
87
90
 
@@ -90,10 +93,11 @@ class TenantBillingStateGet200ResponsePaymentMethodsInner(BaseModel):
90
93
 
91
94
  _obj = cls.model_validate(
92
95
  {
93
- "brand": obj.get("brand"),
94
- "last4": obj.get("last4"),
95
- "expiration": obj.get("expiration"),
96
- "description": obj.get("description"),
96
+ "sdkVersion": obj.get("sdkVersion"),
97
+ "language": obj.get("language"),
98
+ "languageVersion": obj.get("languageVersion"),
99
+ "os": obj.get("os"),
100
+ "runtimeExtra": obj.get("runtimeExtra"),
97
101
  }
98
102
  )
99
103
  return _obj
@@ -0,0 +1,38 @@
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
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class WorkerRuntimeSDKs(str, Enum):
24
+ """
25
+ WorkerRuntimeSDKs
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ GOLANG = "GOLANG"
32
+ PYTHON = "PYTHON"
33
+ TYPESCRIPT = "TYPESCRIPT"
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> Self:
37
+ """Create an instance of WorkerRuntimeSDKs from a JSON string"""
38
+ return cls(json.loads(json_str))
@@ -100,23 +100,23 @@ class Workflow(BaseModel):
100
100
  # override the default output from pydantic by calling `to_dict()` of each item in versions (list)
101
101
  _items = []
102
102
  if self.versions:
103
- for _item in self.versions:
104
- if _item:
105
- _items.append(_item.to_dict())
103
+ for _item_versions in self.versions:
104
+ if _item_versions:
105
+ _items.append(_item_versions.to_dict())
106
106
  _dict["versions"] = _items
107
107
  # override the default output from pydantic by calling `to_dict()` of each item in tags (list)
108
108
  _items = []
109
109
  if self.tags:
110
- for _item in self.tags:
111
- if _item:
112
- _items.append(_item.to_dict())
110
+ for _item_tags in self.tags:
111
+ if _item_tags:
112
+ _items.append(_item_tags.to_dict())
113
113
  _dict["tags"] = _items
114
114
  # override the default output from pydantic by calling `to_dict()` of each item in jobs (list)
115
115
  _items = []
116
116
  if self.jobs:
117
- for _item in self.jobs:
118
- if _item:
119
- _items.append(_item.to_dict())
117
+ for _item_jobs in self.jobs:
118
+ if _item_jobs:
119
+ _items.append(_item_jobs.to_dict())
120
120
  _dict["jobs"] = _items
121
121
  return _dict
122
122
 
@@ -80,9 +80,9 @@ class WorkflowList(BaseModel):
80
80
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
81
81
  _items = []
82
82
  if self.rows:
83
- for _item in self.rows:
84
- if _item:
85
- _items.append(_item.to_dict())
83
+ for _item_rows in self.rows:
84
+ if _item_rows:
85
+ _items.append(_item_rows.to_dict())
86
86
  _dict["rows"] = _items
87
87
  # override the default output from pydantic by calling `to_dict()` of pagination
88
88
  if self.pagination:
@@ -125,9 +125,9 @@ class WorkflowRun(BaseModel):
125
125
  # override the default output from pydantic by calling `to_dict()` of each item in job_runs (list)
126
126
  _items = []
127
127
  if self.job_runs:
128
- for _item in self.job_runs:
129
- if _item:
130
- _items.append(_item.to_dict())
128
+ for _item_job_runs in self.job_runs:
129
+ if _item_job_runs:
130
+ _items.append(_item_job_runs.to_dict())
131
131
  _dict["jobRuns"] = _items
132
132
  # override the default output from pydantic by calling `to_dict()` of triggered_by
133
133
  if self.triggered_by:
@@ -75,9 +75,9 @@ class WorkflowRunList(BaseModel):
75
75
  # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
76
76
  _items = []
77
77
  if self.rows:
78
- for _item in self.rows:
79
- if _item:
80
- _items.append(_item.to_dict())
78
+ for _item_rows in self.rows:
79
+ if _item_rows:
80
+ _items.append(_item_rows.to_dict())
81
81
  _dict["rows"] = _items
82
82
  # override the default output from pydantic by calling `to_dict()` of pagination
83
83
  if self.pagination:
@@ -128,9 +128,9 @@ class WorkflowRunShape(BaseModel):
128
128
  # override the default output from pydantic by calling `to_dict()` of each item in job_runs (list)
129
129
  _items = []
130
130
  if self.job_runs:
131
- for _item in self.job_runs:
132
- if _item:
133
- _items.append(_item.to_dict())
131
+ for _item_job_runs in self.job_runs:
132
+ if _item_job_runs:
133
+ _items.append(_item_job_runs.to_dict())
134
134
  _dict["jobRuns"] = _items
135
135
  # override the default output from pydantic by calling `to_dict()` of triggered_by
136
136
  if self.triggered_by:
@@ -22,17 +22,13 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
  from pydantic import BaseModel, ConfigDict
23
23
  from typing_extensions import Self
24
24
 
25
- from hatchet_sdk.clients.rest.models.workflow_runs_metrics_counts import (
26
- WorkflowRunsMetricsCounts,
27
- )
28
-
29
25
 
30
26
  class WorkflowRunsMetrics(BaseModel):
31
27
  """
32
28
  WorkflowRunsMetrics
33
29
  """ # noqa: E501
34
30
 
35
- counts: Optional[WorkflowRunsMetricsCounts] = None
31
+ counts: Optional[Dict[str, Any]] = None
36
32
  __properties: ClassVar[List[str]] = ["counts"]
37
33
 
38
34
  model_config = ConfigDict(
@@ -92,16 +92,16 @@ class WorkflowTriggers(BaseModel):
92
92
  # override the default output from pydantic by calling `to_dict()` of each item in events (list)
93
93
  _items = []
94
94
  if self.events:
95
- for _item in self.events:
96
- if _item:
97
- _items.append(_item.to_dict())
95
+ for _item_events in self.events:
96
+ if _item_events:
97
+ _items.append(_item_events.to_dict())
98
98
  _dict["events"] = _items
99
99
  # override the default output from pydantic by calling `to_dict()` of each item in crons (list)
100
100
  _items = []
101
101
  if self.crons:
102
- for _item in self.crons:
103
- if _item:
104
- _items.append(_item.to_dict())
102
+ for _item_crons in self.crons:
103
+ if _item_crons:
104
+ _items.append(_item_crons.to_dict())
105
105
  _dict["crons"] = _items
106
106
  return _dict
107
107
 
@@ -117,9 +117,9 @@ class WorkflowVersion(BaseModel):
117
117
  # override the default output from pydantic by calling `to_dict()` of each item in jobs (list)
118
118
  _items = []
119
119
  if self.jobs:
120
- for _item in self.jobs:
121
- if _item:
122
- _items.append(_item.to_dict())
120
+ for _item_jobs in self.jobs:
121
+ if _item_jobs:
122
+ _items.append(_item_jobs.to_dict())
123
123
  _dict["jobs"] = _items
124
124
  return _dict
125
125