protobuf-platform 1.0.173 → 1.0.175
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/config/config.proto +5 -3
- package/config/config_pb.js +80 -20
- package/index.js +6 -0
- 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
package/config/config.proto
CHANGED
@@ -52,7 +52,9 @@ message ErrorStatusResponse {
|
|
52
52
|
}
|
53
53
|
//Global
|
54
54
|
message GlobalDataRequest {
|
55
|
-
string
|
56
|
-
|
57
|
-
|
55
|
+
string environment = 1;
|
56
|
+
string customer = 2;
|
57
|
+
string key = 3;
|
58
|
+
repeated string string_values = 4;
|
59
|
+
repeated int32 integer_values = 5;
|
58
60
|
}
|
package/config/config_pb.js
CHANGED
@@ -1825,7 +1825,7 @@ proto.config.ErrorStatusResponse.prototype.setStatus = function(value) {
|
|
1825
1825
|
* @private {!Array<number>}
|
1826
1826
|
* @const
|
1827
1827
|
*/
|
1828
|
-
proto.config.GlobalDataRequest.repeatedFields_ = [
|
1828
|
+
proto.config.GlobalDataRequest.repeatedFields_ = [4,5];
|
1829
1829
|
|
1830
1830
|
|
1831
1831
|
|
@@ -1858,9 +1858,11 @@ proto.config.GlobalDataRequest.prototype.toObject = function(opt_includeInstance
|
|
1858
1858
|
*/
|
1859
1859
|
proto.config.GlobalDataRequest.toObject = function(includeInstance, msg) {
|
1860
1860
|
var f, obj = {
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1861
|
+
environment: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
1862
|
+
customer: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1863
|
+
key: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1864
|
+
stringValuesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
|
1865
|
+
integerValuesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
|
1864
1866
|
};
|
1865
1867
|
|
1866
1868
|
if (includeInstance) {
|
@@ -1899,13 +1901,21 @@ proto.config.GlobalDataRequest.deserializeBinaryFromReader = function(msg, reade
|
|
1899
1901
|
switch (field) {
|
1900
1902
|
case 1:
|
1901
1903
|
var value = /** @type {string} */ (reader.readString());
|
1902
|
-
msg.
|
1904
|
+
msg.setEnvironment(value);
|
1903
1905
|
break;
|
1904
1906
|
case 2:
|
1905
1907
|
var value = /** @type {string} */ (reader.readString());
|
1906
|
-
msg.
|
1908
|
+
msg.setCustomer(value);
|
1907
1909
|
break;
|
1908
1910
|
case 3:
|
1911
|
+
var value = /** @type {string} */ (reader.readString());
|
1912
|
+
msg.setKey(value);
|
1913
|
+
break;
|
1914
|
+
case 4:
|
1915
|
+
var value = /** @type {string} */ (reader.readString());
|
1916
|
+
msg.addStringValues(value);
|
1917
|
+
break;
|
1918
|
+
case 5:
|
1909
1919
|
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
|
1910
1920
|
for (var i = 0; i < values.length; i++) {
|
1911
1921
|
msg.addIntegerValues(values[i]);
|
@@ -1940,24 +1950,38 @@ proto.config.GlobalDataRequest.prototype.serializeBinary = function() {
|
|
1940
1950
|
*/
|
1941
1951
|
proto.config.GlobalDataRequest.serializeBinaryToWriter = function(message, writer) {
|
1942
1952
|
var f = undefined;
|
1943
|
-
f = message.
|
1953
|
+
f = message.getEnvironment();
|
1944
1954
|
if (f.length > 0) {
|
1945
1955
|
writer.writeString(
|
1946
1956
|
1,
|
1947
1957
|
f
|
1948
1958
|
);
|
1949
1959
|
}
|
1960
|
+
f = message.getCustomer();
|
1961
|
+
if (f.length > 0) {
|
1962
|
+
writer.writeString(
|
1963
|
+
2,
|
1964
|
+
f
|
1965
|
+
);
|
1966
|
+
}
|
1967
|
+
f = message.getKey();
|
1968
|
+
if (f.length > 0) {
|
1969
|
+
writer.writeString(
|
1970
|
+
3,
|
1971
|
+
f
|
1972
|
+
);
|
1973
|
+
}
|
1950
1974
|
f = message.getStringValuesList();
|
1951
1975
|
if (f.length > 0) {
|
1952
1976
|
writer.writeRepeatedString(
|
1953
|
-
|
1977
|
+
4,
|
1954
1978
|
f
|
1955
1979
|
);
|
1956
1980
|
}
|
1957
1981
|
f = message.getIntegerValuesList();
|
1958
1982
|
if (f.length > 0) {
|
1959
1983
|
writer.writePackedInt32(
|
1960
|
-
|
1984
|
+
5,
|
1961
1985
|
f
|
1962
1986
|
);
|
1963
1987
|
}
|
@@ -1965,10 +1989,10 @@ proto.config.GlobalDataRequest.serializeBinaryToWriter = function(message, write
|
|
1965
1989
|
|
1966
1990
|
|
1967
1991
|
/**
|
1968
|
-
* optional string
|
1992
|
+
* optional string environment = 1;
|
1969
1993
|
* @return {string}
|
1970
1994
|
*/
|
1971
|
-
proto.config.GlobalDataRequest.prototype.
|
1995
|
+
proto.config.GlobalDataRequest.prototype.getEnvironment = function() {
|
1972
1996
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1973
1997
|
};
|
1974
1998
|
|
@@ -1977,17 +2001,53 @@ proto.config.GlobalDataRequest.prototype.getKey = function() {
|
|
1977
2001
|
* @param {string} value
|
1978
2002
|
* @return {!proto.config.GlobalDataRequest} returns this
|
1979
2003
|
*/
|
1980
|
-
proto.config.GlobalDataRequest.prototype.
|
2004
|
+
proto.config.GlobalDataRequest.prototype.setEnvironment = function(value) {
|
1981
2005
|
return jspb.Message.setProto3StringField(this, 1, value);
|
1982
2006
|
};
|
1983
2007
|
|
1984
2008
|
|
1985
2009
|
/**
|
1986
|
-
*
|
2010
|
+
* optional string customer = 2;
|
2011
|
+
* @return {string}
|
2012
|
+
*/
|
2013
|
+
proto.config.GlobalDataRequest.prototype.getCustomer = function() {
|
2014
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
2015
|
+
};
|
2016
|
+
|
2017
|
+
|
2018
|
+
/**
|
2019
|
+
* @param {string} value
|
2020
|
+
* @return {!proto.config.GlobalDataRequest} returns this
|
2021
|
+
*/
|
2022
|
+
proto.config.GlobalDataRequest.prototype.setCustomer = function(value) {
|
2023
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
2024
|
+
};
|
2025
|
+
|
2026
|
+
|
2027
|
+
/**
|
2028
|
+
* optional string key = 3;
|
2029
|
+
* @return {string}
|
2030
|
+
*/
|
2031
|
+
proto.config.GlobalDataRequest.prototype.getKey = function() {
|
2032
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
2033
|
+
};
|
2034
|
+
|
2035
|
+
|
2036
|
+
/**
|
2037
|
+
* @param {string} value
|
2038
|
+
* @return {!proto.config.GlobalDataRequest} returns this
|
2039
|
+
*/
|
2040
|
+
proto.config.GlobalDataRequest.prototype.setKey = function(value) {
|
2041
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
2042
|
+
};
|
2043
|
+
|
2044
|
+
|
2045
|
+
/**
|
2046
|
+
* repeated string string_values = 4;
|
1987
2047
|
* @return {!Array<string>}
|
1988
2048
|
*/
|
1989
2049
|
proto.config.GlobalDataRequest.prototype.getStringValuesList = function() {
|
1990
|
-
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this,
|
2050
|
+
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
|
1991
2051
|
};
|
1992
2052
|
|
1993
2053
|
|
@@ -1996,7 +2056,7 @@ proto.config.GlobalDataRequest.prototype.getStringValuesList = function() {
|
|
1996
2056
|
* @return {!proto.config.GlobalDataRequest} returns this
|
1997
2057
|
*/
|
1998
2058
|
proto.config.GlobalDataRequest.prototype.setStringValuesList = function(value) {
|
1999
|
-
return jspb.Message.setField(this,
|
2059
|
+
return jspb.Message.setField(this, 4, value || []);
|
2000
2060
|
};
|
2001
2061
|
|
2002
2062
|
|
@@ -2006,7 +2066,7 @@ proto.config.GlobalDataRequest.prototype.setStringValuesList = function(value) {
|
|
2006
2066
|
* @return {!proto.config.GlobalDataRequest} returns this
|
2007
2067
|
*/
|
2008
2068
|
proto.config.GlobalDataRequest.prototype.addStringValues = function(value, opt_index) {
|
2009
|
-
return jspb.Message.addToRepeatedField(this,
|
2069
|
+
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
|
2010
2070
|
};
|
2011
2071
|
|
2012
2072
|
|
@@ -2020,11 +2080,11 @@ proto.config.GlobalDataRequest.prototype.clearStringValuesList = function() {
|
|
2020
2080
|
|
2021
2081
|
|
2022
2082
|
/**
|
2023
|
-
* repeated int32 integer_values =
|
2083
|
+
* repeated int32 integer_values = 5;
|
2024
2084
|
* @return {!Array<number>}
|
2025
2085
|
*/
|
2026
2086
|
proto.config.GlobalDataRequest.prototype.getIntegerValuesList = function() {
|
2027
|
-
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this,
|
2087
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 5));
|
2028
2088
|
};
|
2029
2089
|
|
2030
2090
|
|
@@ -2033,7 +2093,7 @@ proto.config.GlobalDataRequest.prototype.getIntegerValuesList = function() {
|
|
2033
2093
|
* @return {!proto.config.GlobalDataRequest} returns this
|
2034
2094
|
*/
|
2035
2095
|
proto.config.GlobalDataRequest.prototype.setIntegerValuesList = function(value) {
|
2036
|
-
return jspb.Message.setField(this,
|
2096
|
+
return jspb.Message.setField(this, 5, value || []);
|
2037
2097
|
};
|
2038
2098
|
|
2039
2099
|
|
@@ -2043,7 +2103,7 @@ proto.config.GlobalDataRequest.prototype.setIntegerValuesList = function(value)
|
|
2043
2103
|
* @return {!proto.config.GlobalDataRequest} returns this
|
2044
2104
|
*/
|
2045
2105
|
proto.config.GlobalDataRequest.prototype.addIntegerValues = function(value, opt_index) {
|
2046
|
-
return jspb.Message.addToRepeatedField(this,
|
2106
|
+
return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
|
2047
2107
|
};
|
2048
2108
|
|
2049
2109
|
|
package/index.js
CHANGED
@@ -19,6 +19,8 @@ const BonusService = require('./bonus/bonus_grpc_pb');
|
|
19
19
|
const BonusServiceMessages = require('./bonus/bonus_pb');
|
20
20
|
const LoyaltyService = require('./loyalty/loyalty_grpc_pb');
|
21
21
|
const LoyaltyServiceMessages = require('./loyalty/loyalty_pb');
|
22
|
+
const NotificationService = require('./notification/notification_grpc_pb');
|
23
|
+
const NotificationServiceMessages = require('./notification/notification_pb');
|
22
24
|
module.exports = {
|
23
25
|
gRPC: gRPC,
|
24
26
|
maxSendMessageLength: 10388608,
|
@@ -60,4 +62,8 @@ module.exports = {
|
|
60
62
|
service: LoyaltyService,
|
61
63
|
messages: LoyaltyServiceMessages
|
62
64
|
},
|
65
|
+
notification: {
|
66
|
+
service: NotificationService,
|
67
|
+
messages: NotificationServiceMessages
|
68
|
+
},
|
63
69
|
};
|
@@ -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);
|