Skip to content

Commit a1bff86

Browse files
feat(lab-3429): add missing parameter organization to list events
1 parent 4ff9e96 commit a1bff86

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/kili/adapters/kili_api_gateway/event/mappers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
def event_where_wrapper(filter: EventFilters) -> Dict:
99
"""Build the GraphQL EventMapperWhere variable to be sent in an operation."""
1010
return {
11+
"organizationId": filter.organization_id,
1112
"projectId": filter.project_id,
1213
"createdAtGte": filter.created_at_gte,
1314
"createdAtLte": filter.created_at_lte,

src/kili/domain/event.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class EventFilters:
2323
created_at_lte: Optional[str] = None
2424
user_id: Optional["UserId"] = None
2525
event: Optional[str] = None
26+
organization_id: Optional[str] = None
2627

2728

2829
class EventDict(TypedDict):

src/kili/event/presentation/client/event.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def list(
2626
skip: int = 0,
2727
from_event_id: Optional[str] = None,
2828
until_event_id: Optional[str] = None,
29+
organization_id: Optional[str] = None,
2930
order: Optional[OrderType] = "asc",
3031
) -> List[EventDict]:
3132
"""List events of my project.
@@ -51,6 +52,7 @@ def list(
5152
"""
5253
converted_filters = EventFilters(
5354
project_id=ProjectId(project_id),
55+
organization_id=organization_id,
5456
created_at_gte=created_at_gte,
5557
created_at_lte=created_at_lte,
5658
user_id=UserId(user_id) if user_id else None,

0 commit comments

Comments
 (0)