protobuf-platform 1.0.130 → 1.0.131

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/bonus/bonus.proto CHANGED
@@ -38,6 +38,11 @@ message BonusReward {
38
38
  string currency = 2;
39
39
  optional string config = 3;
40
40
  }
41
+ message BetsRange {
42
+ string currency = 1;
43
+ float min = 2;
44
+ float max = 3;
45
+ }
41
46
  message BonusItemRequest {
42
47
  optional int32 id = 1;
43
48
  optional string title = 2;
@@ -60,6 +65,7 @@ message BonusItemRequest {
60
65
  optional int32 wagering_period_in_hours = 19;
61
66
  repeated ActivationRule activation_rules = 20;
62
67
  repeated BonusReward rewards = 21;
68
+ repeated BetsRange bets_range = 22;
63
69
  }
64
70
  message GetBonusRequest {
65
71
  int32 id = 1;
package/bonus/bonus_pb.js CHANGED
@@ -22,6 +22,7 @@ var global = (function() {
22
22
  }.call(null));
23
23
 
24
24
  goog.exportSymbol('proto.bonus.ActivationRule', null, global);
25
+ goog.exportSymbol('proto.bonus.BetsRange', null, global);
25
26
  goog.exportSymbol('proto.bonus.BonusItem', null, global);
26
27
  goog.exportSymbol('proto.bonus.BonusItemRequest', null, global);
27
28
  goog.exportSymbol('proto.bonus.BonusItemsResponse', null, global);
@@ -208,6 +209,27 @@ if (goog.DEBUG && !COMPILED) {
208
209
  */
209
210
  proto.bonus.BonusReward.displayName = 'proto.bonus.BonusReward';
210
211
  }
212
+ /**
213
+ * Generated by JsPbCodeGenerator.
214
+ * @param {Array=} opt_data Optional initial data array, typically from a
215
+ * server response, or constructed directly in Javascript. The array is used
216
+ * in place and becomes part of the constructed object. It is not cloned.
217
+ * If no data is provided, the constructed object will be empty, but still
218
+ * valid.
219
+ * @extends {jspb.Message}
220
+ * @constructor
221
+ */
222
+ proto.bonus.BetsRange = function(opt_data) {
223
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
224
+ };
225
+ goog.inherits(proto.bonus.BetsRange, jspb.Message);
226
+ if (goog.DEBUG && !COMPILED) {
227
+ /**
228
+ * @public
229
+ * @override
230
+ */
231
+ proto.bonus.BetsRange.displayName = 'proto.bonus.BetsRange';
232
+ }
211
233
  /**
212
234
  * Generated by JsPbCodeGenerator.
213
235
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1797,12 +1819,202 @@ proto.bonus.BonusReward.prototype.hasConfig = function() {
1797
1819
 
1798
1820
 
1799
1821
 
1822
+
1823
+
1824
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1825
+ /**
1826
+ * Creates an object representation of this proto.
1827
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1828
+ * Optional fields that are not set will be set to undefined.
1829
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1830
+ * For the list of reserved names please see:
1831
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1832
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1833
+ * JSPB instance for transitional soy proto support:
1834
+ * http://goto/soy-param-migration
1835
+ * @return {!Object}
1836
+ */
1837
+ proto.bonus.BetsRange.prototype.toObject = function(opt_includeInstance) {
1838
+ return proto.bonus.BetsRange.toObject(opt_includeInstance, this);
1839
+ };
1840
+
1841
+
1842
+ /**
1843
+ * Static version of the {@see toObject} method.
1844
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1845
+ * the JSPB instance for transitional soy proto support:
1846
+ * http://goto/soy-param-migration
1847
+ * @param {!proto.bonus.BetsRange} msg The msg instance to transform.
1848
+ * @return {!Object}
1849
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1850
+ */
1851
+ proto.bonus.BetsRange.toObject = function(includeInstance, msg) {
1852
+ var f, obj = {
1853
+ currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
1854
+ min: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
1855
+ max: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0)
1856
+ };
1857
+
1858
+ if (includeInstance) {
1859
+ obj.$jspbMessageInstance = msg;
1860
+ }
1861
+ return obj;
1862
+ };
1863
+ }
1864
+
1865
+
1866
+ /**
1867
+ * Deserializes binary data (in protobuf wire format).
1868
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1869
+ * @return {!proto.bonus.BetsRange}
1870
+ */
1871
+ proto.bonus.BetsRange.deserializeBinary = function(bytes) {
1872
+ var reader = new jspb.BinaryReader(bytes);
1873
+ var msg = new proto.bonus.BetsRange;
1874
+ return proto.bonus.BetsRange.deserializeBinaryFromReader(msg, reader);
1875
+ };
1876
+
1877
+
1878
+ /**
1879
+ * Deserializes binary data (in protobuf wire format) from the
1880
+ * given reader into the given message object.
1881
+ * @param {!proto.bonus.BetsRange} msg The message object to deserialize into.
1882
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1883
+ * @return {!proto.bonus.BetsRange}
1884
+ */
1885
+ proto.bonus.BetsRange.deserializeBinaryFromReader = function(msg, reader) {
1886
+ while (reader.nextField()) {
1887
+ if (reader.isEndGroup()) {
1888
+ break;
1889
+ }
1890
+ var field = reader.getFieldNumber();
1891
+ switch (field) {
1892
+ case 1:
1893
+ var value = /** @type {string} */ (reader.readString());
1894
+ msg.setCurrency(value);
1895
+ break;
1896
+ case 2:
1897
+ var value = /** @type {number} */ (reader.readFloat());
1898
+ msg.setMin(value);
1899
+ break;
1900
+ case 3:
1901
+ var value = /** @type {number} */ (reader.readFloat());
1902
+ msg.setMax(value);
1903
+ break;
1904
+ default:
1905
+ reader.skipField();
1906
+ break;
1907
+ }
1908
+ }
1909
+ return msg;
1910
+ };
1911
+
1912
+
1913
+ /**
1914
+ * Serializes the message to binary data (in protobuf wire format).
1915
+ * @return {!Uint8Array}
1916
+ */
1917
+ proto.bonus.BetsRange.prototype.serializeBinary = function() {
1918
+ var writer = new jspb.BinaryWriter();
1919
+ proto.bonus.BetsRange.serializeBinaryToWriter(this, writer);
1920
+ return writer.getResultBuffer();
1921
+ };
1922
+
1923
+
1924
+ /**
1925
+ * Serializes the given message to binary data (in protobuf wire
1926
+ * format), writing to the given BinaryWriter.
1927
+ * @param {!proto.bonus.BetsRange} message
1928
+ * @param {!jspb.BinaryWriter} writer
1929
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1930
+ */
1931
+ proto.bonus.BetsRange.serializeBinaryToWriter = function(message, writer) {
1932
+ var f = undefined;
1933
+ f = message.getCurrency();
1934
+ if (f.length > 0) {
1935
+ writer.writeString(
1936
+ 1,
1937
+ f
1938
+ );
1939
+ }
1940
+ f = message.getMin();
1941
+ if (f !== 0.0) {
1942
+ writer.writeFloat(
1943
+ 2,
1944
+ f
1945
+ );
1946
+ }
1947
+ f = message.getMax();
1948
+ if (f !== 0.0) {
1949
+ writer.writeFloat(
1950
+ 3,
1951
+ f
1952
+ );
1953
+ }
1954
+ };
1955
+
1956
+
1957
+ /**
1958
+ * optional string currency = 1;
1959
+ * @return {string}
1960
+ */
1961
+ proto.bonus.BetsRange.prototype.getCurrency = function() {
1962
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1963
+ };
1964
+
1965
+
1966
+ /**
1967
+ * @param {string} value
1968
+ * @return {!proto.bonus.BetsRange} returns this
1969
+ */
1970
+ proto.bonus.BetsRange.prototype.setCurrency = function(value) {
1971
+ return jspb.Message.setProto3StringField(this, 1, value);
1972
+ };
1973
+
1974
+
1975
+ /**
1976
+ * optional float min = 2;
1977
+ * @return {number}
1978
+ */
1979
+ proto.bonus.BetsRange.prototype.getMin = function() {
1980
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
1981
+ };
1982
+
1983
+
1984
+ /**
1985
+ * @param {number} value
1986
+ * @return {!proto.bonus.BetsRange} returns this
1987
+ */
1988
+ proto.bonus.BetsRange.prototype.setMin = function(value) {
1989
+ return jspb.Message.setProto3FloatField(this, 2, value);
1990
+ };
1991
+
1992
+
1993
+ /**
1994
+ * optional float max = 3;
1995
+ * @return {number}
1996
+ */
1997
+ proto.bonus.BetsRange.prototype.getMax = function() {
1998
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
1999
+ };
2000
+
2001
+
2002
+ /**
2003
+ * @param {number} value
2004
+ * @return {!proto.bonus.BetsRange} returns this
2005
+ */
2006
+ proto.bonus.BetsRange.prototype.setMax = function(value) {
2007
+ return jspb.Message.setProto3FloatField(this, 3, value);
2008
+ };
2009
+
2010
+
2011
+
1800
2012
  /**
1801
2013
  * List of repeated fields within this message type.
1802
2014
  * @private {!Array<number>}
1803
2015
  * @const
1804
2016
  */
1805
- proto.bonus.BonusItemRequest.repeatedFields_ = [20,21];
2017
+ proto.bonus.BonusItemRequest.repeatedFields_ = [20,21,22];
1806
2018
 
1807
2019
 
1808
2020
 
@@ -1857,7 +2069,9 @@ proto.bonus.BonusItemRequest.toObject = function(includeInstance, msg) {
1857
2069
  activationRulesList: jspb.Message.toObjectList(msg.getActivationRulesList(),
1858
2070
  proto.bonus.ActivationRule.toObject, includeInstance),
1859
2071
  rewardsList: jspb.Message.toObjectList(msg.getRewardsList(),
1860
- proto.bonus.BonusReward.toObject, includeInstance)
2072
+ proto.bonus.BonusReward.toObject, includeInstance),
2073
+ betsRangeList: jspb.Message.toObjectList(msg.getBetsRangeList(),
2074
+ proto.bonus.BetsRange.toObject, includeInstance)
1861
2075
  };
1862
2076
 
1863
2077
  if (includeInstance) {
@@ -1980,6 +2194,11 @@ proto.bonus.BonusItemRequest.deserializeBinaryFromReader = function(msg, reader)
1980
2194
  reader.readMessage(value,proto.bonus.BonusReward.deserializeBinaryFromReader);
1981
2195
  msg.addRewards(value);
1982
2196
  break;
2197
+ case 22:
2198
+ var value = new proto.bonus.BetsRange;
2199
+ reader.readMessage(value,proto.bonus.BetsRange.deserializeBinaryFromReader);
2200
+ msg.addBetsRange(value);
2201
+ break;
1983
2202
  default:
1984
2203
  reader.skipField();
1985
2204
  break;
@@ -2158,6 +2377,14 @@ proto.bonus.BonusItemRequest.serializeBinaryToWriter = function(message, writer)
2158
2377
  proto.bonus.BonusReward.serializeBinaryToWriter
2159
2378
  );
2160
2379
  }
2380
+ f = message.getBetsRangeList();
2381
+ if (f.length > 0) {
2382
+ writer.writeRepeatedMessage(
2383
+ 22,
2384
+ f,
2385
+ proto.bonus.BetsRange.serializeBinaryToWriter
2386
+ );
2387
+ }
2161
2388
  };
2162
2389
 
2163
2390
 
@@ -2921,6 +3148,44 @@ proto.bonus.BonusItemRequest.prototype.clearRewardsList = function() {
2921
3148
  };
2922
3149
 
2923
3150
 
3151
+ /**
3152
+ * repeated BetsRange bets_range = 22;
3153
+ * @return {!Array<!proto.bonus.BetsRange>}
3154
+ */
3155
+ proto.bonus.BonusItemRequest.prototype.getBetsRangeList = function() {
3156
+ return /** @type{!Array<!proto.bonus.BetsRange>} */ (
3157
+ jspb.Message.getRepeatedWrapperField(this, proto.bonus.BetsRange, 22));
3158
+ };
3159
+
3160
+
3161
+ /**
3162
+ * @param {!Array<!proto.bonus.BetsRange>} value
3163
+ * @return {!proto.bonus.BonusItemRequest} returns this
3164
+ */
3165
+ proto.bonus.BonusItemRequest.prototype.setBetsRangeList = function(value) {
3166
+ return jspb.Message.setRepeatedWrapperField(this, 22, value);
3167
+ };
3168
+
3169
+
3170
+ /**
3171
+ * @param {!proto.bonus.BetsRange=} opt_value
3172
+ * @param {number=} opt_index
3173
+ * @return {!proto.bonus.BetsRange}
3174
+ */
3175
+ proto.bonus.BonusItemRequest.prototype.addBetsRange = function(opt_value, opt_index) {
3176
+ return jspb.Message.addToRepeatedWrapperField(this, 22, opt_value, proto.bonus.BetsRange, opt_index);
3177
+ };
3178
+
3179
+
3180
+ /**
3181
+ * Clears the list making it empty but non-null.
3182
+ * @return {!proto.bonus.BonusItemRequest} returns this
3183
+ */
3184
+ proto.bonus.BonusItemRequest.prototype.clearBetsRangeList = function() {
3185
+ return this.setBetsRangeList([]);
3186
+ };
3187
+
3188
+
2924
3189
 
2925
3190
 
2926
3191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.130",
3
+ "version": "1.0.131",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {