|
| 1 | +import functools |
1 | 2 | from typing import Any, Dict, List |
2 | 3 |
|
3 | 4 | from pydantic import StrictInt, StrictStr |
|
8 | 9 | ) |
9 | 10 | from hatchet_sdk.clients.rest.models.event_order_by_field import EventOrderByField |
10 | 11 | from hatchet_sdk.clients.rest.models.replay_event_request import ReplayEventRequest |
| 12 | +from hatchet_sdk.clients.rest.models.workflow_run_list import WorkflowRunList |
11 | 13 | from hatchet_sdk.clients.rest.models.workflow_run_status import WorkflowRunStatus |
12 | 14 | from hatchet_sdk.clients.rest.models.workflow_runs_cancel_request import ( |
13 | 15 | WorkflowRunsCancelRequest, |
@@ -56,22 +58,10 @@ def workflow_version_get(self, workflow_id: str, version: str | None = None): |
56 | 58 | version=version, |
57 | 59 | ) |
58 | 60 |
|
59 | | - def workflow_run_list( |
60 | | - self, |
61 | | - workflow_id: str | None = None, |
62 | | - offset: int | None = None, |
63 | | - limit: int | None = None, |
64 | | - event_id: str | None = None, |
65 | | - additional_metadata: List[StrictStr] | None = None, |
66 | | - ): |
67 | | - return self.workflow_api.workflow_run_list( |
68 | | - tenant=self.tenant_id, |
69 | | - offset=offset, |
70 | | - limit=limit, |
71 | | - workflow_id=workflow_id, |
72 | | - event_id=event_id, |
73 | | - additional_metadata=additional_metadata, |
74 | | - ) |
| 61 | + @functools.wraps(WorkflowApi.workflow_run_list, assigned=["__doc__", "__annotations__"]) |
| 62 | + def workflow_run_list(self, **kwargs) -> WorkflowRunList: |
| 63 | + kwargs.setdefault("tenant", self.tenant_id) |
| 64 | + return self.workflow_api.workflow_run_list(**kwargs) |
75 | 65 |
|
76 | 66 | def workflow_run_get(self, workflow_run_id: str): |
77 | 67 | return self.workflow_api.workflow_run_get( |
|
0 commit comments