Skip to content

Commit

Permalink
chore/add-read-indicator-for-notification (#2062)
Browse files Browse the repository at this point in the history
* chore/add-read-indicator-for-notification

* chore: add application name
  • Loading branch information
duonganhthu43 authored Sep 20, 2023
1 parent 70ef6ae commit 8e1b09c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion dozer-types/protos/cloud.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,23 @@ service DozerCloud {
rpc Subscribe(google.protobuf.Empty) returns (stream Notification);

rpc list_notifications(ListNotificationsRequest) returns (ListNotificationsResponse);
rpc mark_notifications_as_read(MarkNotificationsRequest) returns (MarkNotificationsResponse);
}

service DozerPublic {
rpc company_metadata(CompanyRequest) returns (CompanyResponse);
}
message MarkNotificationsRequest {
// if not specified, will mark all notifications as read - for a company or for application
repeated string notification_ids = 1;
optional string app_id = 2;
}
message MarkNotificationsResponse {
bool success = 1;
}
message ListNotificationsRequest {
string app_id = 1;
// if app_id not specified, will get all notifications of company
optional string app_id = 1;
optional uint32 limit = 2;
optional uint32 offset = 3;
}
Expand Down
6 changes: 4 additions & 2 deletions dozer-types/protos/cloud_notification.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ message Notification {
string id = 1;
google.protobuf.Timestamp created_at = 2;
string namespace = 3;
Level level = 4;
optional string app_name = 4;
Level level = 5;
bool is_read = 6;
oneof kind {
PodNotification pod = 5;
PodNotification pod = 7;
}
}

Expand Down

0 comments on commit 8e1b09c

Please sign in to comment.