Skip to content

Commit 92801ac

Browse files
feat(LAB-3294): add progress in update_properties_in_notification (#1820)
Co-authored-by: paulruelle <paul.ruelle@kili-technology.com>
1 parent 3e777ee commit 92801ac

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/kili/entrypoints/mutations/notification/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Notification mutations."""
2+
from typing import Optional
23

34
from typeguard import typechecked
45

@@ -34,6 +35,7 @@ def create_notification(self, message: str, status: str, url: str, user_id: str)
3435
variables = {
3536
"data": {
3637
"message": message,
38+
"progress": None,
3739
"status": status,
3840
"url": url,
3941
"userID": user_id,
@@ -44,7 +46,12 @@ def create_notification(self, message: str, status: str, url: str, user_id: str)
4446

4547
@typechecked
4648
def update_properties_in_notification(
47-
self, notification_id: str, has_been_seen: bool, status: str, url: str
49+
self,
50+
notification_id: str,
51+
has_been_seen: bool,
52+
status: str,
53+
url: str,
54+
progress: Optional[int] = None,
4855
):
4956
"""Modify a notification.
5057
@@ -53,6 +60,7 @@ def update_properties_in_notification(
5360
Args:
5461
notification_id :
5562
hasBeenSeen:
63+
progress:
5664
status :
5765
url :
5866
@@ -63,6 +71,7 @@ def update_properties_in_notification(
6371
variables = {
6472
"id": notification_id,
6573
"hasBeenSeen": has_been_seen,
74+
"progress": progress,
6675
"status": status,
6776
"url": url,
6877
}

src/kili/entrypoints/mutations/notification/queries.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
mutation(
1919
$id: ID!
2020
$hasBeenSeen: Boolean
21+
$progress: Int
2122
$status: NotificationStatus
2223
$url: String
2324
) {{
2425
data: updatePropertiesInNotification(
2526
where: {{id: $id}}
2627
data: {{
2728
hasBeenSeen: $hasBeenSeen
29+
progress: $progress
2830
status: $status
2931
url: $url
3032
}}

0 commit comments

Comments
 (0)