protobuf-platform 1.0.174 → 1.0.176
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.
- package/index.js +6 -0
- package/loyalty/loyalty.proto +27 -8
- package/loyalty/loyalty_pb.js +1063 -209
- package/notification/notification.proto +26 -0
- package/notification/notification_grpc_pb.js +83 -0
- package/notification/notification_pb.js +1185 -0
- package/package.json +1 -1
- package/update_protobuf.sh +2 -1
@@ -0,0 +1,26 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package notification;
|
4
|
+
|
5
|
+
service Notification {
|
6
|
+
rpc checkConnection(PingRequest) returns (PongResponse);
|
7
|
+
rpc getMediaResource(GetFileRequest) returns (stream File);
|
8
|
+
//Notifications
|
9
|
+
//rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
|
10
|
+
//rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
|
11
|
+
//rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
|
12
|
+
//rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
|
13
|
+
//rpc readListLevels(PaginationRequest) returns (LevelItemsResponse);
|
14
|
+
}
|
15
|
+
|
16
|
+
message PingRequest { string ping = 1; }
|
17
|
+
message PongResponse { string pong = 1; }
|
18
|
+
message PaginationRequest { int32 limit = 1; int32 offset = 2; optional NotificationSearchRequest notification_search_params = 3; }
|
19
|
+
message NotificationSearchRequest {
|
20
|
+
optional int32 notification_id = 1;
|
21
|
+
optional int32 user_id = 2;
|
22
|
+
optional string notification_title = 3;
|
23
|
+
}
|
24
|
+
//Media
|
25
|
+
message File { bytes media = 1; }
|
26
|
+
message GetFileRequest { string file_name = 1; string instance_type = 2; }
|
@@ -0,0 +1,83 @@
|
|
1
|
+
// GENERATED CODE -- DO NOT EDIT!
|
2
|
+
|
3
|
+
'use strict';
|
4
|
+
var grpc = require('@grpc/grpc-js');
|
5
|
+
var notification_pb = require('./notification_pb.js');
|
6
|
+
|
7
|
+
function serialize_notification_File(arg) {
|
8
|
+
if (!(arg instanceof notification_pb.File)) {
|
9
|
+
throw new Error('Expected argument of type notification.File');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_notification_File(buffer_arg) {
|
15
|
+
return notification_pb.File.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
18
|
+
function serialize_notification_GetFileRequest(arg) {
|
19
|
+
if (!(arg instanceof notification_pb.GetFileRequest)) {
|
20
|
+
throw new Error('Expected argument of type notification.GetFileRequest');
|
21
|
+
}
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
23
|
+
}
|
24
|
+
|
25
|
+
function deserialize_notification_GetFileRequest(buffer_arg) {
|
26
|
+
return notification_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
27
|
+
}
|
28
|
+
|
29
|
+
function serialize_notification_PingRequest(arg) {
|
30
|
+
if (!(arg instanceof notification_pb.PingRequest)) {
|
31
|
+
throw new Error('Expected argument of type notification.PingRequest');
|
32
|
+
}
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
34
|
+
}
|
35
|
+
|
36
|
+
function deserialize_notification_PingRequest(buffer_arg) {
|
37
|
+
return notification_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
38
|
+
}
|
39
|
+
|
40
|
+
function serialize_notification_PongResponse(arg) {
|
41
|
+
if (!(arg instanceof notification_pb.PongResponse)) {
|
42
|
+
throw new Error('Expected argument of type notification.PongResponse');
|
43
|
+
}
|
44
|
+
return Buffer.from(arg.serializeBinary());
|
45
|
+
}
|
46
|
+
|
47
|
+
function deserialize_notification_PongResponse(buffer_arg) {
|
48
|
+
return notification_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
var NotificationService = exports.NotificationService = {
|
53
|
+
checkConnection: {
|
54
|
+
path: '/notification.Notification/checkConnection',
|
55
|
+
requestStream: false,
|
56
|
+
responseStream: false,
|
57
|
+
requestType: notification_pb.PingRequest,
|
58
|
+
responseType: notification_pb.PongResponse,
|
59
|
+
requestSerialize: serialize_notification_PingRequest,
|
60
|
+
requestDeserialize: deserialize_notification_PingRequest,
|
61
|
+
responseSerialize: serialize_notification_PongResponse,
|
62
|
+
responseDeserialize: deserialize_notification_PongResponse,
|
63
|
+
},
|
64
|
+
getMediaResource: {
|
65
|
+
path: '/notification.Notification/getMediaResource',
|
66
|
+
requestStream: false,
|
67
|
+
responseStream: true,
|
68
|
+
requestType: notification_pb.GetFileRequest,
|
69
|
+
responseType: notification_pb.File,
|
70
|
+
requestSerialize: serialize_notification_GetFileRequest,
|
71
|
+
requestDeserialize: deserialize_notification_GetFileRequest,
|
72
|
+
responseSerialize: serialize_notification_File,
|
73
|
+
responseDeserialize: deserialize_notification_File,
|
74
|
+
},
|
75
|
+
// Notifications
|
76
|
+
// rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
|
77
|
+
// rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
|
78
|
+
// rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
|
79
|
+
// rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
|
80
|
+
// rpc readListLevels(PaginationRequest) returns (LevelItemsResponse);
|
81
|
+
};
|
82
|
+
|
83
|
+
exports.NotificationClient = grpc.makeGenericClientConstructor(NotificationService);
|