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.
- hatchet_sdk/clients/admin.py +129 -59
- hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
- hatchet_sdk/clients/events.py +91 -52
- hatchet_sdk/clients/rest/__init__.py +21 -0
- hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
- hatchet_sdk/clients/rest/api/default_api.py +24 -18
- hatchet_sdk/clients/rest/api/event_api.py +32 -24
- hatchet_sdk/clients/rest/api/github_api.py +4 -3
- hatchet_sdk/clients/rest/api/log_api.py +4 -3
- hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
- hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
- hatchet_sdk/clients/rest/api/slack_api.py +8 -6
- hatchet_sdk/clients/rest/api/sns_api.py +12 -9
- hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
- hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
- hatchet_sdk/clients/rest/api/user_api.py +24 -18
- hatchet_sdk/clients/rest/api/worker_api.py +12 -9
- hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
- hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
- hatchet_sdk/clients/rest/api_client.py +34 -11
- hatchet_sdk/clients/rest/configuration.py +161 -36
- hatchet_sdk/clients/rest/models/__init__.py +21 -0
- hatchet_sdk/clients/rest/models/api_errors.py +3 -3
- hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
- hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
- 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
- hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
- hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
- hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
- hatchet_sdk/clients/rest/models/event_list.py +3 -3
- hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
- hatchet_sdk/clients/rest/models/job.py +3 -3
- hatchet_sdk/clients/rest/models/job_run.py +3 -3
- hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
- hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
- hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
- hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
- hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
- hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
- hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
- hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
- hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
- hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
- hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
- hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
- hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
- hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
- hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
- hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
- hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
- hatchet_sdk/clients/rest/models/worker.py +20 -9
- hatchet_sdk/clients/rest/models/worker_list.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
- hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
- hatchet_sdk/clients/rest/models/workflow.py +9 -9
- hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
- hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
- hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
- hatchet_sdk/clients/rest/rest.py +3 -3
- hatchet_sdk/clients/rest_client.py +200 -21
- hatchet_sdk/contracts/dispatcher_pb2.pyi +2 -0
- hatchet_sdk/contracts/events_pb2.pyi +2 -0
- hatchet_sdk/contracts/workflows_pb2.pyi +2 -0
- hatchet_sdk/features/cron.py +286 -0
- hatchet_sdk/features/scheduled.py +248 -0
- hatchet_sdk/hatchet.py +71 -79
- hatchet_sdk/loader.py +37 -14
- hatchet_sdk/utils/serialization.py +15 -0
- hatchet_sdk/utils/tracing.py +67 -0
- hatchet_sdk/worker/runner/runner.py +158 -112
- hatchet_sdk/worker/worker.py +1 -17
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/METADATA +8 -2
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/RECORD +86 -140
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/entry_points.txt +0 -1
- hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
- hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
- hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
- hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
- hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
- hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
- hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
- hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
- hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
- hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
- hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
- hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
- hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
- hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
- hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
- hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
- hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
- hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
- hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
- hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
- hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
- hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
- hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
- hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
- hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
- hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
- hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
- hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
- hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
- hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
- hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
- hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
- hatchet_sdk/clients/cloud_rest/rest.py +0 -182
- hatchet_sdk/compute/__init__.py +0 -0
- hatchet_sdk/compute/configs.py +0 -34
- hatchet_sdk/compute/managed_compute.py +0 -111
- {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.
|
|
26
|
-
|
|
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
|
|
29
|
+
class ScheduledWorkflowsList(BaseModel):
|
|
34
30
|
"""
|
|
35
|
-
|
|
31
|
+
ScheduledWorkflowsList
|
|
36
32
|
""" # noqa: E501
|
|
37
33
|
|
|
38
|
-
rows: Optional[List[
|
|
39
|
-
pagination: Optional[
|
|
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
|
|
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
|
|
83
|
-
if
|
|
84
|
-
_items.append(
|
|
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
|
|
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
|
-
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
84
|
-
if
|
|
85
|
-
_items.append(
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
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
|
|
|
@@ -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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
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
|
|
173
|
-
if
|
|
174
|
-
_items.append(
|
|
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
|
|
180
|
-
if
|
|
181
|
-
_items.append(
|
|
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
|
|
187
|
-
if
|
|
188
|
-
_items.append(
|
|
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
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
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
|
-
|
|
27
|
+
|
|
28
|
+
class WorkerRuntimeInfo(BaseModel):
|
|
27
29
|
"""
|
|
28
|
-
|
|
30
|
+
WorkerRuntimeInfo
|
|
29
31
|
""" # noqa: E501
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
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
|
|
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
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
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
|
|
104
|
-
if
|
|
105
|
-
_items.append(
|
|
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
|
|
111
|
-
if
|
|
112
|
-
_items.append(
|
|
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
|
|
118
|
-
if
|
|
119
|
-
_items.append(
|
|
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
|
|
84
|
-
if
|
|
85
|
-
_items.append(
|
|
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
|
|
129
|
-
if
|
|
130
|
-
_items.append(
|
|
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
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
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
|
|
132
|
-
if
|
|
133
|
-
_items.append(
|
|
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[
|
|
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
|
|
96
|
-
if
|
|
97
|
-
_items.append(
|
|
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
|
|
103
|
-
if
|
|
104
|
-
_items.append(
|
|
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
|
|
121
|
-
if
|
|
122
|
-
_items.append(
|
|
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
|
|