diff --git a/pyproject.toml b/pyproject.toml index 4d8a294..6dfbfca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-runtime" -version = "0.0.17" +version = "0.0.18" description = "Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/src/uipath/runtime/__init__.py b/src/uipath/runtime/__init__.py index d8573c3..066f444 100644 --- a/src/uipath/runtime/__init__.py +++ b/src/uipath/runtime/__init__.py @@ -35,6 +35,7 @@ from uipath.runtime.resumable.trigger import ( UiPathApiTrigger, UiPathResumeTrigger, + UiPathResumeTriggerName, UiPathResumeTriggerType, ) from uipath.runtime.schema import UiPathRuntimeSchema @@ -64,4 +65,5 @@ "UiPathDebugRuntime", "UiPathBreakpointResult", "UiPathStreamNotSupportedError", + "UiPathResumeTriggerName", ] diff --git a/src/uipath/runtime/resumable/trigger.py b/src/uipath/runtime/resumable/trigger.py index d001b62..9d92dd2 100644 --- a/src/uipath/runtime/resumable/trigger.py +++ b/src/uipath/runtime/resumable/trigger.py @@ -12,7 +12,20 @@ class UiPathResumeTriggerType(str, Enum): NONE = "None" QUEUE_ITEM = "QueueItem" JOB = "Job" - ACTION = "Task" + TASK = "Task" + TIMER = "Timer" + INBOX = "Inbox" + API = "Api" + + +class UiPathResumeTriggerName(str, Enum): + """Constants representing specific names for resume job triggers in the system.""" + + UNKNOWN = "Unknown" + QUEUE_ITEM = "QueueItem" + JOB = "Job" + TASK = "Task" + ESCALATION = "Escalation" TIMER = "Timer" INBOX = "Inbox" API = "Api" @@ -33,10 +46,13 @@ class UiPathResumeTrigger(BaseModel): trigger_type: UiPathResumeTriggerType = Field( default=UiPathResumeTriggerType.API, alias="triggerType" ) + trigger_name: UiPathResumeTriggerName = Field( + default=UiPathResumeTriggerName.UNKNOWN, alias="triggerName", exclude=True + ) item_key: str | None = Field(default=None, alias="itemKey") api_resume: UiPathApiTrigger | None = Field(default=None, alias="apiResume") folder_path: str | None = Field(default=None, alias="folderPath") folder_key: str | None = Field(default=None, alias="folderKey") - payload: Any | None = Field(default=None, alias="interruptObject") + payload: Any | None = Field(default=None, alias="interruptObject", exclude=True) model_config = ConfigDict(validate_by_name=True) diff --git a/uv.lock b/uv.lock index e5bd771..12060f0 100644 --- a/uv.lock +++ b/uv.lock @@ -938,7 +938,7 @@ wheels = [ [[package]] name = "uipath-runtime" -version = "0.0.17" +version = "0.0.18" source = { editable = "." } dependencies = [ { name = "uipath-core" },