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

Add missing workflowtrigger list #1920

Merged
merged 5 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
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
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