protobuf-platform 1.0.182 → 1.0.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,18 +10,30 @@ service Notification {
|
|
10
10
|
//rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
|
11
11
|
//rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
|
12
12
|
//rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
|
13
|
-
|
13
|
+
rpc readListNotifications(PaginationRequest) returns (NotificationItemsResponse);
|
14
14
|
rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
|
15
|
+
rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
|
15
16
|
}
|
16
17
|
|
17
18
|
message PingRequest { string ping = 1; }
|
18
19
|
message PongResponse { string pong = 1; }
|
19
|
-
message PaginationRequest {
|
20
|
+
message PaginationRequest {
|
21
|
+
int32 limit = 1;
|
22
|
+
int32 offset = 2;
|
23
|
+
optional NotificationSearchRequest notification_search_params = 3;
|
24
|
+
optional UserSearchRequest user_search_params = 4;
|
25
|
+
}
|
20
26
|
message NotificationSearchRequest {
|
21
27
|
optional int32 notification_id = 1;
|
22
28
|
optional int32 user_id = 2;
|
23
29
|
optional string notification_title = 3;
|
24
30
|
}
|
31
|
+
message UserSearchRequest {
|
32
|
+
int32 user_id = 1;
|
33
|
+
optional bool is_checked = 2;
|
34
|
+
optional int32 limit = 3;
|
35
|
+
optional int32 offset = 4;
|
36
|
+
}
|
25
37
|
//Media
|
26
38
|
message File { bytes media = 1; }
|
27
39
|
message GetFileRequest { string file_name = 1; string instance_type = 2; }
|
@@ -33,4 +45,28 @@ message SendNotificationRequest {
|
|
33
45
|
}
|
34
46
|
message NotificationStatusResponse {
|
35
47
|
string status = 1;
|
48
|
+
}
|
49
|
+
message UserNotificationItem {
|
50
|
+
string title = 1;
|
51
|
+
string content = 2;
|
52
|
+
bool is_checked = 3;
|
53
|
+
optional string created = 4;
|
54
|
+
}
|
55
|
+
message UserNotificationItemsResponse {
|
56
|
+
repeated UserNotificationItem items = 1;
|
57
|
+
optional int32 total_pages = 2;
|
58
|
+
optional int32 total_items = 3;
|
59
|
+
}
|
60
|
+
message NotificationItem {
|
61
|
+
int32 id = 1;
|
62
|
+
string title = 2;
|
63
|
+
string content = 3;
|
64
|
+
bool is_active = 4;
|
65
|
+
string type = 5;
|
66
|
+
optional string created = 6;
|
67
|
+
}
|
68
|
+
message NotificationItemsResponse {
|
69
|
+
repeated NotificationItem items = 1;
|
70
|
+
optional int32 total_pages = 2;
|
71
|
+
optional int32 total_items = 3;
|
36
72
|
}
|
@@ -26,6 +26,17 @@ function deserialize_notification_GetFileRequest(buffer_arg) {
|
|
26
26
|
return notification_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
27
27
|
}
|
28
28
|
|
29
|
+
function serialize_notification_NotificationItemsResponse(arg) {
|
30
|
+
if (!(arg instanceof notification_pb.NotificationItemsResponse)) {
|
31
|
+
throw new Error('Expected argument of type notification.NotificationItemsResponse');
|
32
|
+
}
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
34
|
+
}
|
35
|
+
|
36
|
+
function deserialize_notification_NotificationItemsResponse(buffer_arg) {
|
37
|
+
return notification_pb.NotificationItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
38
|
+
}
|
39
|
+
|
29
40
|
function serialize_notification_NotificationStatusResponse(arg) {
|
30
41
|
if (!(arg instanceof notification_pb.NotificationStatusResponse)) {
|
31
42
|
throw new Error('Expected argument of type notification.NotificationStatusResponse');
|
@@ -37,6 +48,17 @@ function deserialize_notification_NotificationStatusResponse(buffer_arg) {
|
|
37
48
|
return notification_pb.NotificationStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
38
49
|
}
|
39
50
|
|
51
|
+
function serialize_notification_PaginationRequest(arg) {
|
52
|
+
if (!(arg instanceof notification_pb.PaginationRequest)) {
|
53
|
+
throw new Error('Expected argument of type notification.PaginationRequest');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_notification_PaginationRequest(buffer_arg) {
|
59
|
+
return notification_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
40
62
|
function serialize_notification_PingRequest(arg) {
|
41
63
|
if (!(arg instanceof notification_pb.PingRequest)) {
|
42
64
|
throw new Error('Expected argument of type notification.PingRequest');
|
@@ -70,6 +92,17 @@ function deserialize_notification_SendNotificationRequest(buffer_arg) {
|
|
70
92
|
return notification_pb.SendNotificationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
71
93
|
}
|
72
94
|
|
95
|
+
function serialize_notification_UserNotificationItemsResponse(arg) {
|
96
|
+
if (!(arg instanceof notification_pb.UserNotificationItemsResponse)) {
|
97
|
+
throw new Error('Expected argument of type notification.UserNotificationItemsResponse');
|
98
|
+
}
|
99
|
+
return Buffer.from(arg.serializeBinary());
|
100
|
+
}
|
101
|
+
|
102
|
+
function deserialize_notification_UserNotificationItemsResponse(buffer_arg) {
|
103
|
+
return notification_pb.UserNotificationItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
104
|
+
}
|
105
|
+
|
73
106
|
|
74
107
|
var NotificationService = exports.NotificationService = {
|
75
108
|
checkConnection: {
|
@@ -99,8 +132,18 @@ var NotificationService = exports.NotificationService = {
|
|
99
132
|
// rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
|
100
133
|
// rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
|
101
134
|
// rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
|
102
|
-
|
103
|
-
|
135
|
+
readListNotifications: {
|
136
|
+
path: '/notification.Notification/readListNotifications',
|
137
|
+
requestStream: false,
|
138
|
+
responseStream: false,
|
139
|
+
requestType: notification_pb.PaginationRequest,
|
140
|
+
responseType: notification_pb.NotificationItemsResponse,
|
141
|
+
requestSerialize: serialize_notification_PaginationRequest,
|
142
|
+
requestDeserialize: deserialize_notification_PaginationRequest,
|
143
|
+
responseSerialize: serialize_notification_NotificationItemsResponse,
|
144
|
+
responseDeserialize: deserialize_notification_NotificationItemsResponse,
|
145
|
+
},
|
146
|
+
sendNotificationToUsers: {
|
104
147
|
path: '/notification.Notification/sendNotificationToUsers',
|
105
148
|
requestStream: false,
|
106
149
|
responseStream: false,
|
@@ -111,6 +154,17 @@ sendNotificationToUsers: {
|
|
111
154
|
responseSerialize: serialize_notification_NotificationStatusResponse,
|
112
155
|
responseDeserialize: deserialize_notification_NotificationStatusResponse,
|
113
156
|
},
|
157
|
+
getNotificationForParticularUser: {
|
158
|
+
path: '/notification.Notification/getNotificationForParticularUser',
|
159
|
+
requestStream: false,
|
160
|
+
responseStream: false,
|
161
|
+
requestType: notification_pb.PaginationRequest,
|
162
|
+
responseType: notification_pb.UserNotificationItemsResponse,
|
163
|
+
requestSerialize: serialize_notification_PaginationRequest,
|
164
|
+
requestDeserialize: deserialize_notification_PaginationRequest,
|
165
|
+
responseSerialize: serialize_notification_UserNotificationItemsResponse,
|
166
|
+
responseDeserialize: deserialize_notification_UserNotificationItemsResponse,
|
167
|
+
},
|
114
168
|
};
|
115
169
|
|
116
170
|
exports.NotificationClient = grpc.makeGenericClientConstructor(NotificationService);
|