Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward all arguments in workflow run list #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions hatchet_sdk/clients/rest_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
from typing import Any, Dict, List

from pydantic import StrictInt, StrictStr
Expand All @@ -8,6 +9,7 @@
)
from hatchet_sdk.clients.rest.models.event_order_by_field import EventOrderByField
from hatchet_sdk.clients.rest.models.replay_event_request import ReplayEventRequest
from hatchet_sdk.clients.rest.models.workflow_run_list import WorkflowRunList
from hatchet_sdk.clients.rest.models.workflow_run_status import WorkflowRunStatus
from hatchet_sdk.clients.rest.models.workflow_runs_cancel_request import (
WorkflowRunsCancelRequest,
Expand Down Expand Up @@ -56,22 +58,10 @@ def workflow_version_get(self, workflow_id: str, version: str | None = None):
version=version,
)

def workflow_run_list(
self,
workflow_id: str | None = None,
offset: int | None = None,
limit: int | None = None,
event_id: str | None = None,
additional_metadata: List[StrictStr] | None = None,
):
return self.workflow_api.workflow_run_list(
tenant=self.tenant_id,
offset=offset,
limit=limit,
workflow_id=workflow_id,
event_id=event_id,
additional_metadata=additional_metadata,
)
@functools.wraps(WorkflowApi.workflow_run_list, assigned=["__doc__", "__annotations__"])
def workflow_run_list(self, **kwargs) -> WorkflowRunList:
kwargs.setdefault("tenant", self.tenant_id)
return self.workflow_api.workflow_run_list(**kwargs)

def workflow_run_get(self, workflow_run_id: str):
return self.workflow_api.workflow_run_get(
Expand Down
Loading