protobuf-platform 1.1.99 → 1.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.1.99",
3
+ "version": "1.2.2",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -57,6 +57,7 @@ service User {
57
57
  rpc setEmailConfirmed(EmailConfirmedRequest) returns (ConfirmationStatusResponse);
58
58
  rpc attemptResetPasswordConfirmation(ResetPasswordConfirmationRequest) returns (ConfirmationStatusResponse);
59
59
  rpc setNewPassword(SetNewPasswordConfirmedRequest) returns (ConfirmationStatusResponse);
60
+ rpc setUserCookies(UserCookiesRequest) returns (ConfirmationStatusResponse);
60
61
  }
61
62
  //Technical
62
63
  message PingRequest { string ping = 1; }
@@ -208,6 +209,7 @@ message UserDataResponse {
208
209
  optional int32 ranking_points = 32;
209
210
  optional int32 coins = 33;
210
211
  optional string nickname = 34;
212
+ optional string cookies = 35;
211
213
  }
212
214
  message UsersResponse {
213
215
  repeated UserDataResponse items = 1;
@@ -586,4 +588,10 @@ message EmailConfirmedRequest {
586
588
  message SetNewPasswordConfirmedRequest {
587
589
  string token = 1;
588
590
  string new_password = 2;
589
- }
591
+ }
592
+ message UserCookiesRequest {
593
+ int32 user_id = 1;
594
+ optional int32 targeting = 2;
595
+ optional int32 performance = 3;
596
+ optional int32 functional = 4;
597
+ }
@@ -444,6 +444,17 @@ function deserialize_user_TournamentRulesInfoResponse(buffer_arg) {
444
444
  return user_pb.TournamentRulesInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));
445
445
  }
446
446
 
447
+ function serialize_user_UserCookiesRequest(arg) {
448
+ if (!(arg instanceof user_pb.UserCookiesRequest)) {
449
+ throw new Error('Expected argument of type user.UserCookiesRequest');
450
+ }
451
+ return Buffer.from(arg.serializeBinary());
452
+ }
453
+
454
+ function deserialize_user_UserCookiesRequest(buffer_arg) {
455
+ return user_pb.UserCookiesRequest.deserializeBinary(new Uint8Array(buffer_arg));
456
+ }
457
+
447
458
  function serialize_user_UserDataRequest(arg) {
448
459
  if (!(arg instanceof user_pb.UserDataRequest)) {
449
460
  throw new Error('Expected argument of type user.UserDataRequest');
@@ -1009,6 +1020,17 @@ attemptEmailConfirmation: {
1009
1020
  responseSerialize: serialize_user_ConfirmationStatusResponse,
1010
1021
  responseDeserialize: deserialize_user_ConfirmationStatusResponse,
1011
1022
  },
1023
+ setUserCookies: {
1024
+ path: '/user.User/setUserCookies',
1025
+ requestStream: false,
1026
+ responseStream: false,
1027
+ requestType: user_pb.UserCookiesRequest,
1028
+ responseType: user_pb.ConfirmationStatusResponse,
1029
+ requestSerialize: serialize_user_UserCookiesRequest,
1030
+ requestDeserialize: deserialize_user_UserCookiesRequest,
1031
+ responseSerialize: serialize_user_ConfirmationStatusResponse,
1032
+ responseDeserialize: deserialize_user_ConfirmationStatusResponse,
1033
+ },
1012
1034
  };
1013
1035
 
1014
1036
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);
package/user/user_pb.js CHANGED
@@ -78,6 +78,7 @@ goog.exportSymbol('proto.user.SumSubDocumentRequest', null, global);
78
78
  goog.exportSymbol('proto.user.SumSubDocumentRequest.RequestCase', null, global);
79
79
  goog.exportSymbol('proto.user.SumSubResponse', null, global);
80
80
  goog.exportSymbol('proto.user.TournamentRulesInfoResponse', null, global);
81
+ goog.exportSymbol('proto.user.UserCookiesRequest', null, global);
81
82
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
82
83
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
83
84
  goog.exportSymbol('proto.user.UserLimitsRequest', null, global);
@@ -1518,6 +1519,27 @@ if (goog.DEBUG && !COMPILED) {
1518
1519
  */
1519
1520
  proto.user.SetNewPasswordConfirmedRequest.displayName = 'proto.user.SetNewPasswordConfirmedRequest';
1520
1521
  }
1522
+ /**
1523
+ * Generated by JsPbCodeGenerator.
1524
+ * @param {Array=} opt_data Optional initial data array, typically from a
1525
+ * server response, or constructed directly in Javascript. The array is used
1526
+ * in place and becomes part of the constructed object. It is not cloned.
1527
+ * If no data is provided, the constructed object will be empty, but still
1528
+ * valid.
1529
+ * @extends {jspb.Message}
1530
+ * @constructor
1531
+ */
1532
+ proto.user.UserCookiesRequest = function(opt_data) {
1533
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1534
+ };
1535
+ goog.inherits(proto.user.UserCookiesRequest, jspb.Message);
1536
+ if (goog.DEBUG && !COMPILED) {
1537
+ /**
1538
+ * @public
1539
+ * @override
1540
+ */
1541
+ proto.user.UserCookiesRequest.displayName = 'proto.user.UserCookiesRequest';
1542
+ }
1521
1543
 
1522
1544
 
1523
1545
 
@@ -6958,7 +6980,8 @@ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
6958
6980
  kycConfirmed: jspb.Message.getFieldWithDefault(msg, 31, 0),
6959
6981
  rankingPoints: jspb.Message.getFieldWithDefault(msg, 32, 0),
6960
6982
  coins: jspb.Message.getFieldWithDefault(msg, 33, 0),
6961
- nickname: jspb.Message.getFieldWithDefault(msg, 34, "")
6983
+ nickname: jspb.Message.getFieldWithDefault(msg, 34, ""),
6984
+ cookies: jspb.Message.getFieldWithDefault(msg, 35, "")
6962
6985
  };
6963
6986
 
6964
6987
  if (includeInstance) {
@@ -7132,6 +7155,10 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
7132
7155
  var value = /** @type {string} */ (reader.readString());
7133
7156
  msg.setNickname(value);
7134
7157
  break;
7158
+ case 35:
7159
+ var value = /** @type {string} */ (reader.readString());
7160
+ msg.setCookies(value);
7161
+ break;
7135
7162
  default:
7136
7163
  reader.skipField();
7137
7164
  break;
@@ -7400,6 +7427,13 @@ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer)
7400
7427
  f
7401
7428
  );
7402
7429
  }
7430
+ f = /** @type {string} */ (jspb.Message.getField(message, 35));
7431
+ if (f != null) {
7432
+ writer.writeString(
7433
+ 35,
7434
+ f
7435
+ );
7436
+ }
7403
7437
  };
7404
7438
 
7405
7439
 
@@ -8592,6 +8626,42 @@ proto.user.UserDataResponse.prototype.hasNickname = function() {
8592
8626
  };
8593
8627
 
8594
8628
 
8629
+ /**
8630
+ * optional string cookies = 35;
8631
+ * @return {string}
8632
+ */
8633
+ proto.user.UserDataResponse.prototype.getCookies = function() {
8634
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 35, ""));
8635
+ };
8636
+
8637
+
8638
+ /**
8639
+ * @param {string} value
8640
+ * @return {!proto.user.UserDataResponse} returns this
8641
+ */
8642
+ proto.user.UserDataResponse.prototype.setCookies = function(value) {
8643
+ return jspb.Message.setField(this, 35, value);
8644
+ };
8645
+
8646
+
8647
+ /**
8648
+ * Clears the field making it undefined.
8649
+ * @return {!proto.user.UserDataResponse} returns this
8650
+ */
8651
+ proto.user.UserDataResponse.prototype.clearCookies = function() {
8652
+ return jspb.Message.setField(this, 35, undefined);
8653
+ };
8654
+
8655
+
8656
+ /**
8657
+ * Returns whether this field is set.
8658
+ * @return {boolean}
8659
+ */
8660
+ proto.user.UserDataResponse.prototype.hasCookies = function() {
8661
+ return jspb.Message.getField(this, 35) != null;
8662
+ };
8663
+
8664
+
8595
8665
 
8596
8666
  /**
8597
8667
  * List of repeated fields within this message type.
@@ -25903,4 +25973,278 @@ proto.user.SetNewPasswordConfirmedRequest.prototype.setNewPassword = function(va
25903
25973
  };
25904
25974
 
25905
25975
 
25976
+
25977
+
25978
+
25979
+ if (jspb.Message.GENERATE_TO_OBJECT) {
25980
+ /**
25981
+ * Creates an object representation of this proto.
25982
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
25983
+ * Optional fields that are not set will be set to undefined.
25984
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
25985
+ * For the list of reserved names please see:
25986
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
25987
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
25988
+ * JSPB instance for transitional soy proto support:
25989
+ * http://goto/soy-param-migration
25990
+ * @return {!Object}
25991
+ */
25992
+ proto.user.UserCookiesRequest.prototype.toObject = function(opt_includeInstance) {
25993
+ return proto.user.UserCookiesRequest.toObject(opt_includeInstance, this);
25994
+ };
25995
+
25996
+
25997
+ /**
25998
+ * Static version of the {@see toObject} method.
25999
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
26000
+ * the JSPB instance for transitional soy proto support:
26001
+ * http://goto/soy-param-migration
26002
+ * @param {!proto.user.UserCookiesRequest} msg The msg instance to transform.
26003
+ * @return {!Object}
26004
+ * @suppress {unusedLocalVariables} f is only used for nested messages
26005
+ */
26006
+ proto.user.UserCookiesRequest.toObject = function(includeInstance, msg) {
26007
+ var f, obj = {
26008
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
26009
+ targeting: jspb.Message.getFieldWithDefault(msg, 2, 0),
26010
+ performance: jspb.Message.getFieldWithDefault(msg, 3, 0),
26011
+ functional: jspb.Message.getFieldWithDefault(msg, 4, 0)
26012
+ };
26013
+
26014
+ if (includeInstance) {
26015
+ obj.$jspbMessageInstance = msg;
26016
+ }
26017
+ return obj;
26018
+ };
26019
+ }
26020
+
26021
+
26022
+ /**
26023
+ * Deserializes binary data (in protobuf wire format).
26024
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
26025
+ * @return {!proto.user.UserCookiesRequest}
26026
+ */
26027
+ proto.user.UserCookiesRequest.deserializeBinary = function(bytes) {
26028
+ var reader = new jspb.BinaryReader(bytes);
26029
+ var msg = new proto.user.UserCookiesRequest;
26030
+ return proto.user.UserCookiesRequest.deserializeBinaryFromReader(msg, reader);
26031
+ };
26032
+
26033
+
26034
+ /**
26035
+ * Deserializes binary data (in protobuf wire format) from the
26036
+ * given reader into the given message object.
26037
+ * @param {!proto.user.UserCookiesRequest} msg The message object to deserialize into.
26038
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
26039
+ * @return {!proto.user.UserCookiesRequest}
26040
+ */
26041
+ proto.user.UserCookiesRequest.deserializeBinaryFromReader = function(msg, reader) {
26042
+ while (reader.nextField()) {
26043
+ if (reader.isEndGroup()) {
26044
+ break;
26045
+ }
26046
+ var field = reader.getFieldNumber();
26047
+ switch (field) {
26048
+ case 1:
26049
+ var value = /** @type {number} */ (reader.readInt32());
26050
+ msg.setUserId(value);
26051
+ break;
26052
+ case 2:
26053
+ var value = /** @type {number} */ (reader.readInt32());
26054
+ msg.setTargeting(value);
26055
+ break;
26056
+ case 3:
26057
+ var value = /** @type {number} */ (reader.readInt32());
26058
+ msg.setPerformance(value);
26059
+ break;
26060
+ case 4:
26061
+ var value = /** @type {number} */ (reader.readInt32());
26062
+ msg.setFunctional(value);
26063
+ break;
26064
+ default:
26065
+ reader.skipField();
26066
+ break;
26067
+ }
26068
+ }
26069
+ return msg;
26070
+ };
26071
+
26072
+
26073
+ /**
26074
+ * Serializes the message to binary data (in protobuf wire format).
26075
+ * @return {!Uint8Array}
26076
+ */
26077
+ proto.user.UserCookiesRequest.prototype.serializeBinary = function() {
26078
+ var writer = new jspb.BinaryWriter();
26079
+ proto.user.UserCookiesRequest.serializeBinaryToWriter(this, writer);
26080
+ return writer.getResultBuffer();
26081
+ };
26082
+
26083
+
26084
+ /**
26085
+ * Serializes the given message to binary data (in protobuf wire
26086
+ * format), writing to the given BinaryWriter.
26087
+ * @param {!proto.user.UserCookiesRequest} message
26088
+ * @param {!jspb.BinaryWriter} writer
26089
+ * @suppress {unusedLocalVariables} f is only used for nested messages
26090
+ */
26091
+ proto.user.UserCookiesRequest.serializeBinaryToWriter = function(message, writer) {
26092
+ var f = undefined;
26093
+ f = message.getUserId();
26094
+ if (f !== 0) {
26095
+ writer.writeInt32(
26096
+ 1,
26097
+ f
26098
+ );
26099
+ }
26100
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
26101
+ if (f != null) {
26102
+ writer.writeInt32(
26103
+ 2,
26104
+ f
26105
+ );
26106
+ }
26107
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
26108
+ if (f != null) {
26109
+ writer.writeInt32(
26110
+ 3,
26111
+ f
26112
+ );
26113
+ }
26114
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
26115
+ if (f != null) {
26116
+ writer.writeInt32(
26117
+ 4,
26118
+ f
26119
+ );
26120
+ }
26121
+ };
26122
+
26123
+
26124
+ /**
26125
+ * optional int32 user_id = 1;
26126
+ * @return {number}
26127
+ */
26128
+ proto.user.UserCookiesRequest.prototype.getUserId = function() {
26129
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
26130
+ };
26131
+
26132
+
26133
+ /**
26134
+ * @param {number} value
26135
+ * @return {!proto.user.UserCookiesRequest} returns this
26136
+ */
26137
+ proto.user.UserCookiesRequest.prototype.setUserId = function(value) {
26138
+ return jspb.Message.setProto3IntField(this, 1, value);
26139
+ };
26140
+
26141
+
26142
+ /**
26143
+ * optional int32 targeting = 2;
26144
+ * @return {number}
26145
+ */
26146
+ proto.user.UserCookiesRequest.prototype.getTargeting = function() {
26147
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
26148
+ };
26149
+
26150
+
26151
+ /**
26152
+ * @param {number} value
26153
+ * @return {!proto.user.UserCookiesRequest} returns this
26154
+ */
26155
+ proto.user.UserCookiesRequest.prototype.setTargeting = function(value) {
26156
+ return jspb.Message.setField(this, 2, value);
26157
+ };
26158
+
26159
+
26160
+ /**
26161
+ * Clears the field making it undefined.
26162
+ * @return {!proto.user.UserCookiesRequest} returns this
26163
+ */
26164
+ proto.user.UserCookiesRequest.prototype.clearTargeting = function() {
26165
+ return jspb.Message.setField(this, 2, undefined);
26166
+ };
26167
+
26168
+
26169
+ /**
26170
+ * Returns whether this field is set.
26171
+ * @return {boolean}
26172
+ */
26173
+ proto.user.UserCookiesRequest.prototype.hasTargeting = function() {
26174
+ return jspb.Message.getField(this, 2) != null;
26175
+ };
26176
+
26177
+
26178
+ /**
26179
+ * optional int32 performance = 3;
26180
+ * @return {number}
26181
+ */
26182
+ proto.user.UserCookiesRequest.prototype.getPerformance = function() {
26183
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
26184
+ };
26185
+
26186
+
26187
+ /**
26188
+ * @param {number} value
26189
+ * @return {!proto.user.UserCookiesRequest} returns this
26190
+ */
26191
+ proto.user.UserCookiesRequest.prototype.setPerformance = function(value) {
26192
+ return jspb.Message.setField(this, 3, value);
26193
+ };
26194
+
26195
+
26196
+ /**
26197
+ * Clears the field making it undefined.
26198
+ * @return {!proto.user.UserCookiesRequest} returns this
26199
+ */
26200
+ proto.user.UserCookiesRequest.prototype.clearPerformance = function() {
26201
+ return jspb.Message.setField(this, 3, undefined);
26202
+ };
26203
+
26204
+
26205
+ /**
26206
+ * Returns whether this field is set.
26207
+ * @return {boolean}
26208
+ */
26209
+ proto.user.UserCookiesRequest.prototype.hasPerformance = function() {
26210
+ return jspb.Message.getField(this, 3) != null;
26211
+ };
26212
+
26213
+
26214
+ /**
26215
+ * optional int32 functional = 4;
26216
+ * @return {number}
26217
+ */
26218
+ proto.user.UserCookiesRequest.prototype.getFunctional = function() {
26219
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
26220
+ };
26221
+
26222
+
26223
+ /**
26224
+ * @param {number} value
26225
+ * @return {!proto.user.UserCookiesRequest} returns this
26226
+ */
26227
+ proto.user.UserCookiesRequest.prototype.setFunctional = function(value) {
26228
+ return jspb.Message.setField(this, 4, value);
26229
+ };
26230
+
26231
+
26232
+ /**
26233
+ * Clears the field making it undefined.
26234
+ * @return {!proto.user.UserCookiesRequest} returns this
26235
+ */
26236
+ proto.user.UserCookiesRequest.prototype.clearFunctional = function() {
26237
+ return jspb.Message.setField(this, 4, undefined);
26238
+ };
26239
+
26240
+
26241
+ /**
26242
+ * Returns whether this field is set.
26243
+ * @return {boolean}
26244
+ */
26245
+ proto.user.UserCookiesRequest.prototype.hasFunctional = function() {
26246
+ return jspb.Message.getField(this, 4) != null;
26247
+ };
26248
+
26249
+
25906
26250
  goog.object.extend(exports, proto.user);