diff --git a/CHANGELOG.md b/CHANGELOG.md index 204d0234b..d55e093aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ Changes are grouped as follows - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities. +## [7.58.8] - 2024-09-10 +### Added +- Added missing `WorkflowTriggerCreateList` to `cognite.client.data_classes.workflows`. + ## [7.58.7] - 2024-09-06 ### Changed - [Feature Preview - alpha] Updated the `Core Model` and added `ExtractorExtension` model handling of the reserved diff --git a/cognite/client/_version.py b/cognite/client/_version.py index 34b3d8331..cacb73e6c 100644 --- a/cognite/client/_version.py +++ b/cognite/client/_version.py @@ -1,4 +1,4 @@ from __future__ import annotations -__version__ = "7.58.7" +__version__ = "7.58.8" __api_subversion__ = "20230101" diff --git a/cognite/client/data_classes/__init__.py b/cognite/client/data_classes/__init__.py index 5fee33dc0..3966f0ec8 100644 --- a/cognite/client/data_classes/__init__.py +++ b/cognite/client/data_classes/__init__.py @@ -305,6 +305,7 @@ WorkflowTaskExecution, WorkflowTrigger, WorkflowTriggerCreate, + WorkflowTriggerCreateList, WorkflowTriggerList, WorkflowTriggerRun, WorkflowTriggerRunList, @@ -578,6 +579,7 @@ "WorkflowTrigger", "WorkflowTriggerCreate", "WorkflowTriggerList", + "WorkflowTriggerCreateList", "WorkflowTriggerRun", "WorkflowTriggerRunList", "HasName", diff --git a/cognite/client/data_classes/workflows.py b/cognite/client/data_classes/workflows.py index efae89d72..6f6935203 100644 --- a/cognite/client/data_classes/workflows.py +++ b/cognite/client/data_classes/workflows.py @@ -1401,13 +1401,21 @@ def as_write(self) -> WorkflowTriggerCreate: ) -class WorkflowTriggerList(CogniteResourceList[WorkflowTrigger]): +class WorkflowTriggerCreateList(CogniteResourceList[WorkflowTriggerCreate]): + _RESOURCE = WorkflowTriggerCreate + + +class WorkflowTriggerList(WriteableCogniteResourceList[WorkflowTriggerCreate, WorkflowTrigger]): """ This class represents a list of workflow triggers. """ _RESOURCE = WorkflowTrigger + def as_write(self) -> WorkflowTriggerCreateList: + """Returns a WorkflowTriggerCreateList object with the same data.""" + return WorkflowTriggerCreateList([workflow_trigger.as_write() for workflow_trigger in self.data]) + class WorkflowTriggerRun(CogniteResource): """ diff --git a/pyproject.toml b/pyproject.toml index ac15cc6ad..7bf1305c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "cognite-sdk" -version = "7.58.7" +version = "7.58.8" description = "Cognite Python SDK" readme = "README.md" documentation = "https://cognite-sdk-python.readthedocs-hosted.com"