-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotification.proto
52 lines (43 loc) · 1.41 KB
/
notification.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
syntax = "proto3";
option csharp_namespace = "GsServer.Protobufs";
import "gs_protobufs/protos/custom_types/void_value.proto";
import "google/protobuf/wrappers.proto";
package protos.notification;
service NotificationService {
rpc GetPaginatedAsync(GetPaginatedNotificationsRequest) returns (GetPaginatedNotificationsResponse);
rpc GetByIdAsync(GetNotificationByIdRequest) returns (GetNotificationByIdResponse);
rpc PostAsync(CreateNotificationRequest) returns (custom_types.void.VoidValue);
rpc PutAsync(UpdateNotificationRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeleteNotificationRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedNotificationsRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedNotificationsResponse {
repeated GetNotificationByIdResponse notifications = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetNotificationByIdRequest {
string notification_id = 1;
}
message GetNotificationByIdResponse {
string notification_id = 1;
string user_id = 2;
string title = 3;
string message = 4;
bool is_unread = 5;
}
message CreateNotificationRequest {
string user_id = 1;
string title = 2;
string message = 3;
}
message UpdateNotificationRequest {
string notification_id = 1;
string title = 2;
string message = 3;
bool is_unread = 4;
}
message DeleteNotificationRequest {
string notification_id = 1;
}