protobuf-platform 1.1.60 → 1.1.62

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.60",
3
+ "version": "1.1.62",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -33,6 +33,7 @@ message PaginationRequest {
33
33
  int32 limit = 1;
34
34
  int32 offset = 2;
35
35
  optional UserSearchRequest user_search_params = 3;
36
+ optional SearchRequest additional_search_params = 4;
36
37
  }
37
38
  message UserSearchRequest {
38
39
  optional int32 user_id = 1;
@@ -40,6 +41,12 @@ message UserSearchRequest {
40
41
  optional string currency = 3;
41
42
  optional string locale = 4;
42
43
  }
44
+ message SearchRequest {
45
+ optional string title = 1;
46
+ repeated int32 status_ids = 2;
47
+ optional int32 is_active = 3;
48
+ repeated string currencies = 4;
49
+ }
43
50
  //Tournament CRUD | Requests
44
51
  message TournamentItem {
45
52
  optional int32 id = 1;
@@ -31,6 +31,7 @@ goog.exportSymbol('proto.tournament.PingRequest', null, global);
31
31
  goog.exportSymbol('proto.tournament.PongResponse', null, global);
32
32
  goog.exportSymbol('proto.tournament.RewardItem', null, global);
33
33
  goog.exportSymbol('proto.tournament.ScoringRule', null, global);
34
+ goog.exportSymbol('proto.tournament.SearchRequest', null, global);
34
35
  goog.exportSymbol('proto.tournament.TournamentActivationRuleRequest', null, global);
35
36
  goog.exportSymbol('proto.tournament.TournamentContentRequest', null, global);
36
37
  goog.exportSymbol('proto.tournament.TournamentGamesRequest', null, global);
@@ -175,6 +176,27 @@ if (goog.DEBUG && !COMPILED) {
175
176
  */
176
177
  proto.tournament.UserSearchRequest.displayName = 'proto.tournament.UserSearchRequest';
177
178
  }
179
+ /**
180
+ * Generated by JsPbCodeGenerator.
181
+ * @param {Array=} opt_data Optional initial data array, typically from a
182
+ * server response, or constructed directly in Javascript. The array is used
183
+ * in place and becomes part of the constructed object. It is not cloned.
184
+ * If no data is provided, the constructed object will be empty, but still
185
+ * valid.
186
+ * @extends {jspb.Message}
187
+ * @constructor
188
+ */
189
+ proto.tournament.SearchRequest = function(opt_data) {
190
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.SearchRequest.repeatedFields_, null);
191
+ };
192
+ goog.inherits(proto.tournament.SearchRequest, jspb.Message);
193
+ if (goog.DEBUG && !COMPILED) {
194
+ /**
195
+ * @public
196
+ * @override
197
+ */
198
+ proto.tournament.SearchRequest.displayName = 'proto.tournament.SearchRequest';
199
+ }
178
200
  /**
179
201
  * Generated by JsPbCodeGenerator.
180
202
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1320,7 +1342,8 @@ proto.tournament.PaginationRequest.toObject = function(includeInstance, msg) {
1320
1342
  var f, obj = {
1321
1343
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
1322
1344
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
1323
- userSearchParams: (f = msg.getUserSearchParams()) && proto.tournament.UserSearchRequest.toObject(includeInstance, f)
1345
+ userSearchParams: (f = msg.getUserSearchParams()) && proto.tournament.UserSearchRequest.toObject(includeInstance, f),
1346
+ additionalSearchParams: (f = msg.getAdditionalSearchParams()) && proto.tournament.SearchRequest.toObject(includeInstance, f)
1324
1347
  };
1325
1348
 
1326
1349
  if (includeInstance) {
@@ -1370,6 +1393,11 @@ proto.tournament.PaginationRequest.deserializeBinaryFromReader = function(msg, r
1370
1393
  reader.readMessage(value,proto.tournament.UserSearchRequest.deserializeBinaryFromReader);
1371
1394
  msg.setUserSearchParams(value);
1372
1395
  break;
1396
+ case 4:
1397
+ var value = new proto.tournament.SearchRequest;
1398
+ reader.readMessage(value,proto.tournament.SearchRequest.deserializeBinaryFromReader);
1399
+ msg.setAdditionalSearchParams(value);
1400
+ break;
1373
1401
  default:
1374
1402
  reader.skipField();
1375
1403
  break;
@@ -1421,6 +1449,14 @@ proto.tournament.PaginationRequest.serializeBinaryToWriter = function(message, w
1421
1449
  proto.tournament.UserSearchRequest.serializeBinaryToWriter
1422
1450
  );
1423
1451
  }
1452
+ f = message.getAdditionalSearchParams();
1453
+ if (f != null) {
1454
+ writer.writeMessage(
1455
+ 4,
1456
+ f,
1457
+ proto.tournament.SearchRequest.serializeBinaryToWriter
1458
+ );
1459
+ }
1424
1460
  };
1425
1461
 
1426
1462
 
@@ -1497,6 +1533,43 @@ proto.tournament.PaginationRequest.prototype.hasUserSearchParams = function() {
1497
1533
  };
1498
1534
 
1499
1535
 
1536
+ /**
1537
+ * optional SearchRequest additional_search_params = 4;
1538
+ * @return {?proto.tournament.SearchRequest}
1539
+ */
1540
+ proto.tournament.PaginationRequest.prototype.getAdditionalSearchParams = function() {
1541
+ return /** @type{?proto.tournament.SearchRequest} */ (
1542
+ jspb.Message.getWrapperField(this, proto.tournament.SearchRequest, 4));
1543
+ };
1544
+
1545
+
1546
+ /**
1547
+ * @param {?proto.tournament.SearchRequest|undefined} value
1548
+ * @return {!proto.tournament.PaginationRequest} returns this
1549
+ */
1550
+ proto.tournament.PaginationRequest.prototype.setAdditionalSearchParams = function(value) {
1551
+ return jspb.Message.setWrapperField(this, 4, value);
1552
+ };
1553
+
1554
+
1555
+ /**
1556
+ * Clears the message field making it undefined.
1557
+ * @return {!proto.tournament.PaginationRequest} returns this
1558
+ */
1559
+ proto.tournament.PaginationRequest.prototype.clearAdditionalSearchParams = function() {
1560
+ return this.setAdditionalSearchParams(undefined);
1561
+ };
1562
+
1563
+
1564
+ /**
1565
+ * Returns whether this field is set.
1566
+ * @return {boolean}
1567
+ */
1568
+ proto.tournament.PaginationRequest.prototype.hasAdditionalSearchParams = function() {
1569
+ return jspb.Message.getField(this, 4) != null;
1570
+ };
1571
+
1572
+
1500
1573
 
1501
1574
 
1502
1575
 
@@ -1790,6 +1863,309 @@ proto.tournament.UserSearchRequest.prototype.hasLocale = function() {
1790
1863
 
1791
1864
 
1792
1865
 
1866
+ /**
1867
+ * List of repeated fields within this message type.
1868
+ * @private {!Array<number>}
1869
+ * @const
1870
+ */
1871
+ proto.tournament.SearchRequest.repeatedFields_ = [2,4];
1872
+
1873
+
1874
+
1875
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1876
+ /**
1877
+ * Creates an object representation of this proto.
1878
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1879
+ * Optional fields that are not set will be set to undefined.
1880
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1881
+ * For the list of reserved names please see:
1882
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1883
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1884
+ * JSPB instance for transitional soy proto support:
1885
+ * http://goto/soy-param-migration
1886
+ * @return {!Object}
1887
+ */
1888
+ proto.tournament.SearchRequest.prototype.toObject = function(opt_includeInstance) {
1889
+ return proto.tournament.SearchRequest.toObject(opt_includeInstance, this);
1890
+ };
1891
+
1892
+
1893
+ /**
1894
+ * Static version of the {@see toObject} method.
1895
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1896
+ * the JSPB instance for transitional soy proto support:
1897
+ * http://goto/soy-param-migration
1898
+ * @param {!proto.tournament.SearchRequest} msg The msg instance to transform.
1899
+ * @return {!Object}
1900
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1901
+ */
1902
+ proto.tournament.SearchRequest.toObject = function(includeInstance, msg) {
1903
+ var f, obj = {
1904
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
1905
+ statusIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
1906
+ isActive: jspb.Message.getFieldWithDefault(msg, 3, 0),
1907
+ currenciesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
1908
+ };
1909
+
1910
+ if (includeInstance) {
1911
+ obj.$jspbMessageInstance = msg;
1912
+ }
1913
+ return obj;
1914
+ };
1915
+ }
1916
+
1917
+
1918
+ /**
1919
+ * Deserializes binary data (in protobuf wire format).
1920
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1921
+ * @return {!proto.tournament.SearchRequest}
1922
+ */
1923
+ proto.tournament.SearchRequest.deserializeBinary = function(bytes) {
1924
+ var reader = new jspb.BinaryReader(bytes);
1925
+ var msg = new proto.tournament.SearchRequest;
1926
+ return proto.tournament.SearchRequest.deserializeBinaryFromReader(msg, reader);
1927
+ };
1928
+
1929
+
1930
+ /**
1931
+ * Deserializes binary data (in protobuf wire format) from the
1932
+ * given reader into the given message object.
1933
+ * @param {!proto.tournament.SearchRequest} msg The message object to deserialize into.
1934
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1935
+ * @return {!proto.tournament.SearchRequest}
1936
+ */
1937
+ proto.tournament.SearchRequest.deserializeBinaryFromReader = function(msg, reader) {
1938
+ while (reader.nextField()) {
1939
+ if (reader.isEndGroup()) {
1940
+ break;
1941
+ }
1942
+ var field = reader.getFieldNumber();
1943
+ switch (field) {
1944
+ case 1:
1945
+ var value = /** @type {string} */ (reader.readString());
1946
+ msg.setTitle(value);
1947
+ break;
1948
+ case 2:
1949
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
1950
+ for (var i = 0; i < values.length; i++) {
1951
+ msg.addStatusIds(values[i]);
1952
+ }
1953
+ break;
1954
+ case 3:
1955
+ var value = /** @type {number} */ (reader.readInt32());
1956
+ msg.setIsActive(value);
1957
+ break;
1958
+ case 4:
1959
+ var value = /** @type {string} */ (reader.readString());
1960
+ msg.addCurrencies(value);
1961
+ break;
1962
+ default:
1963
+ reader.skipField();
1964
+ break;
1965
+ }
1966
+ }
1967
+ return msg;
1968
+ };
1969
+
1970
+
1971
+ /**
1972
+ * Serializes the message to binary data (in protobuf wire format).
1973
+ * @return {!Uint8Array}
1974
+ */
1975
+ proto.tournament.SearchRequest.prototype.serializeBinary = function() {
1976
+ var writer = new jspb.BinaryWriter();
1977
+ proto.tournament.SearchRequest.serializeBinaryToWriter(this, writer);
1978
+ return writer.getResultBuffer();
1979
+ };
1980
+
1981
+
1982
+ /**
1983
+ * Serializes the given message to binary data (in protobuf wire
1984
+ * format), writing to the given BinaryWriter.
1985
+ * @param {!proto.tournament.SearchRequest} message
1986
+ * @param {!jspb.BinaryWriter} writer
1987
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1988
+ */
1989
+ proto.tournament.SearchRequest.serializeBinaryToWriter = function(message, writer) {
1990
+ var f = undefined;
1991
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1992
+ if (f != null) {
1993
+ writer.writeString(
1994
+ 1,
1995
+ f
1996
+ );
1997
+ }
1998
+ f = message.getStatusIdsList();
1999
+ if (f.length > 0) {
2000
+ writer.writePackedInt32(
2001
+ 2,
2002
+ f
2003
+ );
2004
+ }
2005
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
2006
+ if (f != null) {
2007
+ writer.writeInt32(
2008
+ 3,
2009
+ f
2010
+ );
2011
+ }
2012
+ f = message.getCurrenciesList();
2013
+ if (f.length > 0) {
2014
+ writer.writeRepeatedString(
2015
+ 4,
2016
+ f
2017
+ );
2018
+ }
2019
+ };
2020
+
2021
+
2022
+ /**
2023
+ * optional string title = 1;
2024
+ * @return {string}
2025
+ */
2026
+ proto.tournament.SearchRequest.prototype.getTitle = function() {
2027
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2028
+ };
2029
+
2030
+
2031
+ /**
2032
+ * @param {string} value
2033
+ * @return {!proto.tournament.SearchRequest} returns this
2034
+ */
2035
+ proto.tournament.SearchRequest.prototype.setTitle = function(value) {
2036
+ return jspb.Message.setField(this, 1, value);
2037
+ };
2038
+
2039
+
2040
+ /**
2041
+ * Clears the field making it undefined.
2042
+ * @return {!proto.tournament.SearchRequest} returns this
2043
+ */
2044
+ proto.tournament.SearchRequest.prototype.clearTitle = function() {
2045
+ return jspb.Message.setField(this, 1, undefined);
2046
+ };
2047
+
2048
+
2049
+ /**
2050
+ * Returns whether this field is set.
2051
+ * @return {boolean}
2052
+ */
2053
+ proto.tournament.SearchRequest.prototype.hasTitle = function() {
2054
+ return jspb.Message.getField(this, 1) != null;
2055
+ };
2056
+
2057
+
2058
+ /**
2059
+ * repeated int32 status_ids = 2;
2060
+ * @return {!Array<number>}
2061
+ */
2062
+ proto.tournament.SearchRequest.prototype.getStatusIdsList = function() {
2063
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
2064
+ };
2065
+
2066
+
2067
+ /**
2068
+ * @param {!Array<number>} value
2069
+ * @return {!proto.tournament.SearchRequest} returns this
2070
+ */
2071
+ proto.tournament.SearchRequest.prototype.setStatusIdsList = function(value) {
2072
+ return jspb.Message.setField(this, 2, value || []);
2073
+ };
2074
+
2075
+
2076
+ /**
2077
+ * @param {number} value
2078
+ * @param {number=} opt_index
2079
+ * @return {!proto.tournament.SearchRequest} returns this
2080
+ */
2081
+ proto.tournament.SearchRequest.prototype.addStatusIds = function(value, opt_index) {
2082
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
2083
+ };
2084
+
2085
+
2086
+ /**
2087
+ * Clears the list making it empty but non-null.
2088
+ * @return {!proto.tournament.SearchRequest} returns this
2089
+ */
2090
+ proto.tournament.SearchRequest.prototype.clearStatusIdsList = function() {
2091
+ return this.setStatusIdsList([]);
2092
+ };
2093
+
2094
+
2095
+ /**
2096
+ * optional int32 is_active = 3;
2097
+ * @return {number}
2098
+ */
2099
+ proto.tournament.SearchRequest.prototype.getIsActive = function() {
2100
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2101
+ };
2102
+
2103
+
2104
+ /**
2105
+ * @param {number} value
2106
+ * @return {!proto.tournament.SearchRequest} returns this
2107
+ */
2108
+ proto.tournament.SearchRequest.prototype.setIsActive = function(value) {
2109
+ return jspb.Message.setField(this, 3, value);
2110
+ };
2111
+
2112
+
2113
+ /**
2114
+ * Clears the field making it undefined.
2115
+ * @return {!proto.tournament.SearchRequest} returns this
2116
+ */
2117
+ proto.tournament.SearchRequest.prototype.clearIsActive = function() {
2118
+ return jspb.Message.setField(this, 3, undefined);
2119
+ };
2120
+
2121
+
2122
+ /**
2123
+ * Returns whether this field is set.
2124
+ * @return {boolean}
2125
+ */
2126
+ proto.tournament.SearchRequest.prototype.hasIsActive = function() {
2127
+ return jspb.Message.getField(this, 3) != null;
2128
+ };
2129
+
2130
+
2131
+ /**
2132
+ * repeated string currencies = 4;
2133
+ * @return {!Array<string>}
2134
+ */
2135
+ proto.tournament.SearchRequest.prototype.getCurrenciesList = function() {
2136
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
2137
+ };
2138
+
2139
+
2140
+ /**
2141
+ * @param {!Array<string>} value
2142
+ * @return {!proto.tournament.SearchRequest} returns this
2143
+ */
2144
+ proto.tournament.SearchRequest.prototype.setCurrenciesList = function(value) {
2145
+ return jspb.Message.setField(this, 4, value || []);
2146
+ };
2147
+
2148
+
2149
+ /**
2150
+ * @param {string} value
2151
+ * @param {number=} opt_index
2152
+ * @return {!proto.tournament.SearchRequest} returns this
2153
+ */
2154
+ proto.tournament.SearchRequest.prototype.addCurrencies = function(value, opt_index) {
2155
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
2156
+ };
2157
+
2158
+
2159
+ /**
2160
+ * Clears the list making it empty but non-null.
2161
+ * @return {!proto.tournament.SearchRequest} returns this
2162
+ */
2163
+ proto.tournament.SearchRequest.prototype.clearCurrenciesList = function() {
2164
+ return this.setCurrenciesList([]);
2165
+ };
2166
+
2167
+
2168
+
1793
2169
  /**
1794
2170
  * List of repeated fields within this message type.
1795
2171
  * @private {!Array<number>}