Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 7ac1d64

Browse files
committed
Forward all arguments in workflow run list
1 parent 3ce5553 commit 7ac1d64

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

hatchet_sdk/clients/rest_client.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
)
99
from hatchet_sdk.clients.rest.models.event_order_by_field import EventOrderByField
1010
from hatchet_sdk.clients.rest.models.replay_event_request import ReplayEventRequest
11+
from hatchet_sdk.clients.rest.models.workflow_run_list import WorkflowRunList
1112
from hatchet_sdk.clients.rest.models.workflow_run_status import WorkflowRunStatus
1213
from hatchet_sdk.clients.rest.models.workflow_runs_cancel_request import (
1314
WorkflowRunsCancelRequest,
@@ -56,22 +57,10 @@ def workflow_version_get(self, workflow_id: str, version: str | None = None):
5657
version=version,
5758
)
5859

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-
)
60+
@functools.wraps(WorkflowApi.workflow_run_list, assigned=["__doc__", "__annotations__"])
61+
def workflow_run_list(self, **kwargs) -> WorkflowRunList:
62+
kwargs.setdefault("tenant", self.tenant_id)
63+
return self.workflow_api.workflow_run_list(**kwargs)
7564

7665
def workflow_run_get(self, workflow_run_id: str):
7766
return self.workflow_api.workflow_run_get(

0 commit comments

Comments
 (0)