Skip to content

Commit

Permalink
Add missing workflowtrigger list (#1920)
Browse files Browse the repository at this point in the history
  • Loading branch information
doctrino authored Sep 10, 2024
1 parent b825dd8 commit df2ed53
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "7.58.7"
__version__ = "7.58.8"
__api_subversion__ = "20230101"
2 changes: 2 additions & 0 deletions cognite/client/data_classes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@
WorkflowTaskExecution,
WorkflowTrigger,
WorkflowTriggerCreate,
WorkflowTriggerCreateList,
WorkflowTriggerList,
WorkflowTriggerRun,
WorkflowTriggerRunList,
Expand Down Expand Up @@ -578,6 +579,7 @@
"WorkflowTrigger",
"WorkflowTriggerCreate",
"WorkflowTriggerList",
"WorkflowTriggerCreateList",
"WorkflowTriggerRun",
"WorkflowTriggerRunList",
"HasName",
Expand Down
10 changes: 9 additions & 1 deletion cognite/client/data_classes/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit df2ed53

Please sign in to comment.