protobuf-platform 1.0.187 → 1.0.189
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.
@@ -11,8 +11,10 @@ service Notification {
|
|
11
11
|
rpc updateSingleNotification(NotificationRequest) returns (NotificationResponse);
|
12
12
|
rpc deleteSingleNotification(GetNotificationRequest) returns (NotificationStatusResponse);
|
13
13
|
rpc readListNotifications(PaginationRequest) returns (NotificationItemsResponse);
|
14
|
+
//Users
|
14
15
|
rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
|
15
16
|
rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
|
17
|
+
rpc getNotificationsCountForUser(NotificationSearchRequest) returns (UserNotificationsCountResponse);
|
16
18
|
}
|
17
19
|
|
18
20
|
message PingRequest { string ping = 1; }
|
@@ -82,4 +84,7 @@ message NotificationItemsResponse {
|
|
82
84
|
repeated NotificationItem items = 1;
|
83
85
|
optional int32 total_pages = 2;
|
84
86
|
optional int32 total_items = 3;
|
87
|
+
}
|
88
|
+
message UserNotificationsCountResponse {
|
89
|
+
int32 count = 1;
|
85
90
|
}
|
@@ -70,6 +70,17 @@ function deserialize_notification_NotificationResponse(buffer_arg) {
|
|
70
70
|
return notification_pb.NotificationResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
71
71
|
}
|
72
72
|
|
73
|
+
function serialize_notification_NotificationSearchRequest(arg) {
|
74
|
+
if (!(arg instanceof notification_pb.NotificationSearchRequest)) {
|
75
|
+
throw new Error('Expected argument of type notification.NotificationSearchRequest');
|
76
|
+
}
|
77
|
+
return Buffer.from(arg.serializeBinary());
|
78
|
+
}
|
79
|
+
|
80
|
+
function deserialize_notification_NotificationSearchRequest(buffer_arg) {
|
81
|
+
return notification_pb.NotificationSearchRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
82
|
+
}
|
83
|
+
|
73
84
|
function serialize_notification_NotificationStatusResponse(arg) {
|
74
85
|
if (!(arg instanceof notification_pb.NotificationStatusResponse)) {
|
75
86
|
throw new Error('Expected argument of type notification.NotificationStatusResponse');
|
@@ -136,6 +147,17 @@ function deserialize_notification_UserNotificationItemsResponse(buffer_arg) {
|
|
136
147
|
return notification_pb.UserNotificationItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
137
148
|
}
|
138
149
|
|
150
|
+
function serialize_notification_UserNotificationsCountResponse(arg) {
|
151
|
+
if (!(arg instanceof notification_pb.UserNotificationsCountResponse)) {
|
152
|
+
throw new Error('Expected argument of type notification.UserNotificationsCountResponse');
|
153
|
+
}
|
154
|
+
return Buffer.from(arg.serializeBinary());
|
155
|
+
}
|
156
|
+
|
157
|
+
function deserialize_notification_UserNotificationsCountResponse(buffer_arg) {
|
158
|
+
return notification_pb.UserNotificationsCountResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
159
|
+
}
|
160
|
+
|
139
161
|
|
140
162
|
var NotificationService = exports.NotificationService = {
|
141
163
|
checkConnection: {
|
@@ -216,7 +238,8 @@ createSingleNotification: {
|
|
216
238
|
responseSerialize: serialize_notification_NotificationItemsResponse,
|
217
239
|
responseDeserialize: deserialize_notification_NotificationItemsResponse,
|
218
240
|
},
|
219
|
-
|
241
|
+
// Users
|
242
|
+
sendNotificationToUsers: {
|
220
243
|
path: '/notification.Notification/sendNotificationToUsers',
|
221
244
|
requestStream: false,
|
222
245
|
responseStream: false,
|
@@ -238,6 +261,17 @@ createSingleNotification: {
|
|
238
261
|
responseSerialize: serialize_notification_UserNotificationItemsResponse,
|
239
262
|
responseDeserialize: deserialize_notification_UserNotificationItemsResponse,
|
240
263
|
},
|
264
|
+
getNotificationsCountForUser: {
|
265
|
+
path: '/notification.Notification/getNotificationsCountForUser',
|
266
|
+
requestStream: false,
|
267
|
+
responseStream: false,
|
268
|
+
requestType: notification_pb.NotificationSearchRequest,
|
269
|
+
responseType: notification_pb.UserNotificationsCountResponse,
|
270
|
+
requestSerialize: serialize_notification_NotificationSearchRequest,
|
271
|
+
requestDeserialize: deserialize_notification_NotificationSearchRequest,
|
272
|
+
responseSerialize: serialize_notification_UserNotificationsCountResponse,
|
273
|
+
responseDeserialize: deserialize_notification_UserNotificationsCountResponse,
|
274
|
+
},
|
241
275
|
};
|
242
276
|
|
243
277
|
exports.NotificationClient = grpc.makeGenericClientConstructor(NotificationService);
|
@@ -36,6 +36,7 @@ goog.exportSymbol('proto.notification.PongResponse', null, global);
|
|
36
36
|
goog.exportSymbol('proto.notification.SendNotificationRequest', null, global);
|
37
37
|
goog.exportSymbol('proto.notification.UserNotificationItem', null, global);
|
38
38
|
goog.exportSymbol('proto.notification.UserNotificationItemsResponse', null, global);
|
39
|
+
goog.exportSymbol('proto.notification.UserNotificationsCountResponse', null, global);
|
39
40
|
goog.exportSymbol('proto.notification.UserSearchRequest', null, global);
|
40
41
|
/**
|
41
42
|
* Generated by JsPbCodeGenerator.
|
@@ -373,6 +374,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
373
374
|
*/
|
374
375
|
proto.notification.NotificationItemsResponse.displayName = 'proto.notification.NotificationItemsResponse';
|
375
376
|
}
|
377
|
+
/**
|
378
|
+
* Generated by JsPbCodeGenerator.
|
379
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
380
|
+
* server response, or constructed directly in Javascript. The array is used
|
381
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
382
|
+
* If no data is provided, the constructed object will be empty, but still
|
383
|
+
* valid.
|
384
|
+
* @extends {jspb.Message}
|
385
|
+
* @constructor
|
386
|
+
*/
|
387
|
+
proto.notification.UserNotificationsCountResponse = function(opt_data) {
|
388
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
389
|
+
};
|
390
|
+
goog.inherits(proto.notification.UserNotificationsCountResponse, jspb.Message);
|
391
|
+
if (goog.DEBUG && !COMPILED) {
|
392
|
+
/**
|
393
|
+
* @public
|
394
|
+
* @override
|
395
|
+
*/
|
396
|
+
proto.notification.UserNotificationsCountResponse.displayName = 'proto.notification.UserNotificationsCountResponse';
|
397
|
+
}
|
376
398
|
|
377
399
|
|
378
400
|
|
@@ -3714,4 +3736,134 @@ proto.notification.NotificationItemsResponse.prototype.hasTotalItems = function(
|
|
3714
3736
|
};
|
3715
3737
|
|
3716
3738
|
|
3739
|
+
|
3740
|
+
|
3741
|
+
|
3742
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
3743
|
+
/**
|
3744
|
+
* Creates an object representation of this proto.
|
3745
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
3746
|
+
* Optional fields that are not set will be set to undefined.
|
3747
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
3748
|
+
* For the list of reserved names please see:
|
3749
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
3750
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
3751
|
+
* JSPB instance for transitional soy proto support:
|
3752
|
+
* http://goto/soy-param-migration
|
3753
|
+
* @return {!Object}
|
3754
|
+
*/
|
3755
|
+
proto.notification.UserNotificationsCountResponse.prototype.toObject = function(opt_includeInstance) {
|
3756
|
+
return proto.notification.UserNotificationsCountResponse.toObject(opt_includeInstance, this);
|
3757
|
+
};
|
3758
|
+
|
3759
|
+
|
3760
|
+
/**
|
3761
|
+
* Static version of the {@see toObject} method.
|
3762
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
3763
|
+
* the JSPB instance for transitional soy proto support:
|
3764
|
+
* http://goto/soy-param-migration
|
3765
|
+
* @param {!proto.notification.UserNotificationsCountResponse} msg The msg instance to transform.
|
3766
|
+
* @return {!Object}
|
3767
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3768
|
+
*/
|
3769
|
+
proto.notification.UserNotificationsCountResponse.toObject = function(includeInstance, msg) {
|
3770
|
+
var f, obj = {
|
3771
|
+
count: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
3772
|
+
};
|
3773
|
+
|
3774
|
+
if (includeInstance) {
|
3775
|
+
obj.$jspbMessageInstance = msg;
|
3776
|
+
}
|
3777
|
+
return obj;
|
3778
|
+
};
|
3779
|
+
}
|
3780
|
+
|
3781
|
+
|
3782
|
+
/**
|
3783
|
+
* Deserializes binary data (in protobuf wire format).
|
3784
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
3785
|
+
* @return {!proto.notification.UserNotificationsCountResponse}
|
3786
|
+
*/
|
3787
|
+
proto.notification.UserNotificationsCountResponse.deserializeBinary = function(bytes) {
|
3788
|
+
var reader = new jspb.BinaryReader(bytes);
|
3789
|
+
var msg = new proto.notification.UserNotificationsCountResponse;
|
3790
|
+
return proto.notification.UserNotificationsCountResponse.deserializeBinaryFromReader(msg, reader);
|
3791
|
+
};
|
3792
|
+
|
3793
|
+
|
3794
|
+
/**
|
3795
|
+
* Deserializes binary data (in protobuf wire format) from the
|
3796
|
+
* given reader into the given message object.
|
3797
|
+
* @param {!proto.notification.UserNotificationsCountResponse} msg The message object to deserialize into.
|
3798
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
3799
|
+
* @return {!proto.notification.UserNotificationsCountResponse}
|
3800
|
+
*/
|
3801
|
+
proto.notification.UserNotificationsCountResponse.deserializeBinaryFromReader = function(msg, reader) {
|
3802
|
+
while (reader.nextField()) {
|
3803
|
+
if (reader.isEndGroup()) {
|
3804
|
+
break;
|
3805
|
+
}
|
3806
|
+
var field = reader.getFieldNumber();
|
3807
|
+
switch (field) {
|
3808
|
+
case 1:
|
3809
|
+
var value = /** @type {number} */ (reader.readInt32());
|
3810
|
+
msg.setCount(value);
|
3811
|
+
break;
|
3812
|
+
default:
|
3813
|
+
reader.skipField();
|
3814
|
+
break;
|
3815
|
+
}
|
3816
|
+
}
|
3817
|
+
return msg;
|
3818
|
+
};
|
3819
|
+
|
3820
|
+
|
3821
|
+
/**
|
3822
|
+
* Serializes the message to binary data (in protobuf wire format).
|
3823
|
+
* @return {!Uint8Array}
|
3824
|
+
*/
|
3825
|
+
proto.notification.UserNotificationsCountResponse.prototype.serializeBinary = function() {
|
3826
|
+
var writer = new jspb.BinaryWriter();
|
3827
|
+
proto.notification.UserNotificationsCountResponse.serializeBinaryToWriter(this, writer);
|
3828
|
+
return writer.getResultBuffer();
|
3829
|
+
};
|
3830
|
+
|
3831
|
+
|
3832
|
+
/**
|
3833
|
+
* Serializes the given message to binary data (in protobuf wire
|
3834
|
+
* format), writing to the given BinaryWriter.
|
3835
|
+
* @param {!proto.notification.UserNotificationsCountResponse} message
|
3836
|
+
* @param {!jspb.BinaryWriter} writer
|
3837
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3838
|
+
*/
|
3839
|
+
proto.notification.UserNotificationsCountResponse.serializeBinaryToWriter = function(message, writer) {
|
3840
|
+
var f = undefined;
|
3841
|
+
f = message.getCount();
|
3842
|
+
if (f !== 0) {
|
3843
|
+
writer.writeInt32(
|
3844
|
+
1,
|
3845
|
+
f
|
3846
|
+
);
|
3847
|
+
}
|
3848
|
+
};
|
3849
|
+
|
3850
|
+
|
3851
|
+
/**
|
3852
|
+
* optional int32 count = 1;
|
3853
|
+
* @return {number}
|
3854
|
+
*/
|
3855
|
+
proto.notification.UserNotificationsCountResponse.prototype.getCount = function() {
|
3856
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
3857
|
+
};
|
3858
|
+
|
3859
|
+
|
3860
|
+
/**
|
3861
|
+
* @param {number} value
|
3862
|
+
* @return {!proto.notification.UserNotificationsCountResponse} returns this
|
3863
|
+
*/
|
3864
|
+
proto.notification.UserNotificationsCountResponse.prototype.setCount = function(value) {
|
3865
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
3866
|
+
};
|
3867
|
+
|
3868
|
+
|
3717
3869
|
goog.object.extend(exports, proto.notification);
|
package/package.json
CHANGED
package/user/user.proto
CHANGED
@@ -101,6 +101,7 @@ message UserDataResponse {
|
|
101
101
|
optional string category = 21;
|
102
102
|
optional string created = 22;
|
103
103
|
optional UserLoyaltyItem loyalty = 23;
|
104
|
+
optional int32 notifications_count = 24;
|
104
105
|
}
|
105
106
|
message UsersResponse {
|
106
107
|
repeated UserDataResponse items = 1;
|
package/user/user_pb.js
CHANGED
@@ -2844,7 +2844,8 @@ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
|
|
2844
2844
|
riskStatus: jspb.Message.getFieldWithDefault(msg, 20, ""),
|
2845
2845
|
category: jspb.Message.getFieldWithDefault(msg, 21, ""),
|
2846
2846
|
created: jspb.Message.getFieldWithDefault(msg, 22, ""),
|
2847
|
-
loyalty: (f = msg.getLoyalty()) && proto.user.UserLoyaltyItem.toObject(includeInstance, f)
|
2847
|
+
loyalty: (f = msg.getLoyalty()) && proto.user.UserLoyaltyItem.toObject(includeInstance, f),
|
2848
|
+
notificationsCount: jspb.Message.getFieldWithDefault(msg, 24, 0)
|
2848
2849
|
};
|
2849
2850
|
|
2850
2851
|
if (includeInstance) {
|
@@ -2974,6 +2975,10 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
|
|
2974
2975
|
reader.readMessage(value,proto.user.UserLoyaltyItem.deserializeBinaryFromReader);
|
2975
2976
|
msg.setLoyalty(value);
|
2976
2977
|
break;
|
2978
|
+
case 24:
|
2979
|
+
var value = /** @type {number} */ (reader.readInt32());
|
2980
|
+
msg.setNotificationsCount(value);
|
2981
|
+
break;
|
2977
2982
|
default:
|
2978
2983
|
reader.skipField();
|
2979
2984
|
break;
|
@@ -3165,6 +3170,13 @@ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer)
|
|
3165
3170
|
proto.user.UserLoyaltyItem.serializeBinaryToWriter
|
3166
3171
|
);
|
3167
3172
|
}
|
3173
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 24));
|
3174
|
+
if (f != null) {
|
3175
|
+
writer.writeInt32(
|
3176
|
+
24,
|
3177
|
+
f
|
3178
|
+
);
|
3179
|
+
}
|
3168
3180
|
};
|
3169
3181
|
|
3170
3182
|
|
@@ -3961,6 +3973,42 @@ proto.user.UserDataResponse.prototype.hasLoyalty = function() {
|
|
3961
3973
|
};
|
3962
3974
|
|
3963
3975
|
|
3976
|
+
/**
|
3977
|
+
* optional int32 notifications_count = 24;
|
3978
|
+
* @return {number}
|
3979
|
+
*/
|
3980
|
+
proto.user.UserDataResponse.prototype.getNotificationsCount = function() {
|
3981
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0));
|
3982
|
+
};
|
3983
|
+
|
3984
|
+
|
3985
|
+
/**
|
3986
|
+
* @param {number} value
|
3987
|
+
* @return {!proto.user.UserDataResponse} returns this
|
3988
|
+
*/
|
3989
|
+
proto.user.UserDataResponse.prototype.setNotificationsCount = function(value) {
|
3990
|
+
return jspb.Message.setField(this, 24, value);
|
3991
|
+
};
|
3992
|
+
|
3993
|
+
|
3994
|
+
/**
|
3995
|
+
* Clears the field making it undefined.
|
3996
|
+
* @return {!proto.user.UserDataResponse} returns this
|
3997
|
+
*/
|
3998
|
+
proto.user.UserDataResponse.prototype.clearNotificationsCount = function() {
|
3999
|
+
return jspb.Message.setField(this, 24, undefined);
|
4000
|
+
};
|
4001
|
+
|
4002
|
+
|
4003
|
+
/**
|
4004
|
+
* Returns whether this field is set.
|
4005
|
+
* @return {boolean}
|
4006
|
+
*/
|
4007
|
+
proto.user.UserDataResponse.prototype.hasNotificationsCount = function() {
|
4008
|
+
return jspb.Message.getField(this, 24) != null;
|
4009
|
+
};
|
4010
|
+
|
4011
|
+
|
3964
4012
|
|
3965
4013
|
/**
|
3966
4014
|
* List of repeated fields within this message type.
|