protobuf-platform 1.2.284 → 1.2.285

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.2.284",
3
+ "version": "1.2.285",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sport/sport.proto CHANGED
@@ -6,6 +6,8 @@ service Sport {
6
6
  rpc checkConnection(PingRequest) returns (PongResponse);
7
7
  // Launch Betby sportsbook widget for user or guest.
8
8
  rpc launchBetby(LaunchBetbyRequest) returns (LaunchBetbyResponse);
9
+ // Refresh Betby session token without full widget launch.
10
+ rpc refreshBetbyToken(RefreshBetbyTokenRequest) returns (RefreshBetbyTokenResponse);
9
11
  rpc runSelfValidationBetby(selfValidationBetbyRequest) returns (selfValidationBetbyResponse);
10
12
  rpc checkSelfValidationBetby(selfValidationBetbyRequest) returns (selfValidationBetbyResponse);
11
13
  // Vendor callback.
@@ -59,6 +61,17 @@ message LaunchBetbyResponse {
59
61
  optional string mode = 2;
60
62
  }
61
63
 
64
+ // Narrow refresh: re-init Betby session server-side; returns new token only.
65
+ message RefreshBetbyTokenRequest {
66
+ optional int32 user_id = 1;
67
+ optional string user_public_id = 2;
68
+ optional string session_id = 3;
69
+ }
70
+
71
+ message RefreshBetbyTokenResponse {
72
+ string token = 1;
73
+ }
74
+
62
75
  // Vendor
63
76
  message VendorActionRequest {
64
77
  string data = 1;
@@ -48,6 +48,28 @@ function deserialize_sport_PongResponse(buffer_arg) {
48
48
  return sport_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
49
  }
50
50
 
51
+ function serialize_sport_RefreshBetbyTokenRequest(arg) {
52
+ if (!(arg instanceof sport_pb.RefreshBetbyTokenRequest)) {
53
+ throw new Error('Expected argument of type sport.RefreshBetbyTokenRequest');
54
+ }
55
+ return Buffer.from(arg.serializeBinary());
56
+ }
57
+
58
+ function deserialize_sport_RefreshBetbyTokenRequest(buffer_arg) {
59
+ return sport_pb.RefreshBetbyTokenRequest.deserializeBinary(new Uint8Array(buffer_arg));
60
+ }
61
+
62
+ function serialize_sport_RefreshBetbyTokenResponse(arg) {
63
+ if (!(arg instanceof sport_pb.RefreshBetbyTokenResponse)) {
64
+ throw new Error('Expected argument of type sport.RefreshBetbyTokenResponse');
65
+ }
66
+ return Buffer.from(arg.serializeBinary());
67
+ }
68
+
69
+ function deserialize_sport_RefreshBetbyTokenResponse(buffer_arg) {
70
+ return sport_pb.RefreshBetbyTokenResponse.deserializeBinary(new Uint8Array(buffer_arg));
71
+ }
72
+
51
73
  function serialize_sport_SportCategoriesIds(arg) {
52
74
  if (!(arg instanceof sport_pb.SportCategoriesIds)) {
53
75
  throw new Error('Expected argument of type sport.SportCategoriesIds');
@@ -161,6 +183,18 @@ launchBetby: {
161
183
  responseSerialize: serialize_sport_LaunchBetbyResponse,
162
184
  responseDeserialize: deserialize_sport_LaunchBetbyResponse,
163
185
  },
186
+ // Refresh Betby session token without full widget launch.
187
+ refreshBetbyToken: {
188
+ path: '/sport.Sport/refreshBetbyToken',
189
+ requestStream: false,
190
+ responseStream: false,
191
+ requestType: sport_pb.RefreshBetbyTokenRequest,
192
+ responseType: sport_pb.RefreshBetbyTokenResponse,
193
+ requestSerialize: serialize_sport_RefreshBetbyTokenRequest,
194
+ requestDeserialize: deserialize_sport_RefreshBetbyTokenRequest,
195
+ responseSerialize: serialize_sport_RefreshBetbyTokenResponse,
196
+ responseDeserialize: deserialize_sport_RefreshBetbyTokenResponse,
197
+ },
164
198
  runSelfValidationBetby: {
165
199
  path: '/sport.Sport/runSelfValidationBetby',
166
200
  requestStream: false,
package/sport/sport_pb.js CHANGED
@@ -26,6 +26,8 @@ goog.exportSymbol('proto.sport.LaunchBetbyResponse', null, global);
26
26
  goog.exportSymbol('proto.sport.PaginationRequest', null, global);
27
27
  goog.exportSymbol('proto.sport.PingRequest', null, global);
28
28
  goog.exportSymbol('proto.sport.PongResponse', null, global);
29
+ goog.exportSymbol('proto.sport.RefreshBetbyTokenRequest', null, global);
30
+ goog.exportSymbol('proto.sport.RefreshBetbyTokenResponse', null, global);
29
31
  goog.exportSymbol('proto.sport.SportCategoriesIds', null, global);
30
32
  goog.exportSymbol('proto.sport.SportCategoriesResponse', null, global);
31
33
  goog.exportSymbol('proto.sport.SportCategoryItem', null, global);
@@ -141,6 +143,48 @@ if (goog.DEBUG && !COMPILED) {
141
143
  */
142
144
  proto.sport.LaunchBetbyResponse.displayName = 'proto.sport.LaunchBetbyResponse';
143
145
  }
146
+ /**
147
+ * Generated by JsPbCodeGenerator.
148
+ * @param {Array=} opt_data Optional initial data array, typically from a
149
+ * server response, or constructed directly in Javascript. The array is used
150
+ * in place and becomes part of the constructed object. It is not cloned.
151
+ * If no data is provided, the constructed object will be empty, but still
152
+ * valid.
153
+ * @extends {jspb.Message}
154
+ * @constructor
155
+ */
156
+ proto.sport.RefreshBetbyTokenRequest = function(opt_data) {
157
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
158
+ };
159
+ goog.inherits(proto.sport.RefreshBetbyTokenRequest, jspb.Message);
160
+ if (goog.DEBUG && !COMPILED) {
161
+ /**
162
+ * @public
163
+ * @override
164
+ */
165
+ proto.sport.RefreshBetbyTokenRequest.displayName = 'proto.sport.RefreshBetbyTokenRequest';
166
+ }
167
+ /**
168
+ * Generated by JsPbCodeGenerator.
169
+ * @param {Array=} opt_data Optional initial data array, typically from a
170
+ * server response, or constructed directly in Javascript. The array is used
171
+ * in place and becomes part of the constructed object. It is not cloned.
172
+ * If no data is provided, the constructed object will be empty, but still
173
+ * valid.
174
+ * @extends {jspb.Message}
175
+ * @constructor
176
+ */
177
+ proto.sport.RefreshBetbyTokenResponse = function(opt_data) {
178
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
179
+ };
180
+ goog.inherits(proto.sport.RefreshBetbyTokenResponse, jspb.Message);
181
+ if (goog.DEBUG && !COMPILED) {
182
+ /**
183
+ * @public
184
+ * @override
185
+ */
186
+ proto.sport.RefreshBetbyTokenResponse.displayName = 'proto.sport.RefreshBetbyTokenResponse';
187
+ }
144
188
  /**
145
189
  * Generated by JsPbCodeGenerator.
146
190
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1628,6 +1672,380 @@ proto.sport.LaunchBetbyResponse.prototype.hasMode = function() {
1628
1672
 
1629
1673
 
1630
1674
 
1675
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1676
+ /**
1677
+ * Creates an object representation of this proto.
1678
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1679
+ * Optional fields that are not set will be set to undefined.
1680
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1681
+ * For the list of reserved names please see:
1682
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1683
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1684
+ * JSPB instance for transitional soy proto support:
1685
+ * http://goto/soy-param-migration
1686
+ * @return {!Object}
1687
+ */
1688
+ proto.sport.RefreshBetbyTokenRequest.prototype.toObject = function(opt_includeInstance) {
1689
+ return proto.sport.RefreshBetbyTokenRequest.toObject(opt_includeInstance, this);
1690
+ };
1691
+
1692
+
1693
+ /**
1694
+ * Static version of the {@see toObject} method.
1695
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1696
+ * the JSPB instance for transitional soy proto support:
1697
+ * http://goto/soy-param-migration
1698
+ * @param {!proto.sport.RefreshBetbyTokenRequest} msg The msg instance to transform.
1699
+ * @return {!Object}
1700
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1701
+ */
1702
+ proto.sport.RefreshBetbyTokenRequest.toObject = function(includeInstance, msg) {
1703
+ var f, obj = {
1704
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1705
+ userPublicId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1706
+ sessionId: jspb.Message.getFieldWithDefault(msg, 3, "")
1707
+ };
1708
+
1709
+ if (includeInstance) {
1710
+ obj.$jspbMessageInstance = msg;
1711
+ }
1712
+ return obj;
1713
+ };
1714
+ }
1715
+
1716
+
1717
+ /**
1718
+ * Deserializes binary data (in protobuf wire format).
1719
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1720
+ * @return {!proto.sport.RefreshBetbyTokenRequest}
1721
+ */
1722
+ proto.sport.RefreshBetbyTokenRequest.deserializeBinary = function(bytes) {
1723
+ var reader = new jspb.BinaryReader(bytes);
1724
+ var msg = new proto.sport.RefreshBetbyTokenRequest;
1725
+ return proto.sport.RefreshBetbyTokenRequest.deserializeBinaryFromReader(msg, reader);
1726
+ };
1727
+
1728
+
1729
+ /**
1730
+ * Deserializes binary data (in protobuf wire format) from the
1731
+ * given reader into the given message object.
1732
+ * @param {!proto.sport.RefreshBetbyTokenRequest} msg The message object to deserialize into.
1733
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1734
+ * @return {!proto.sport.RefreshBetbyTokenRequest}
1735
+ */
1736
+ proto.sport.RefreshBetbyTokenRequest.deserializeBinaryFromReader = function(msg, reader) {
1737
+ while (reader.nextField()) {
1738
+ if (reader.isEndGroup()) {
1739
+ break;
1740
+ }
1741
+ var field = reader.getFieldNumber();
1742
+ switch (field) {
1743
+ case 1:
1744
+ var value = /** @type {number} */ (reader.readInt32());
1745
+ msg.setUserId(value);
1746
+ break;
1747
+ case 2:
1748
+ var value = /** @type {string} */ (reader.readString());
1749
+ msg.setUserPublicId(value);
1750
+ break;
1751
+ case 3:
1752
+ var value = /** @type {string} */ (reader.readString());
1753
+ msg.setSessionId(value);
1754
+ break;
1755
+ default:
1756
+ reader.skipField();
1757
+ break;
1758
+ }
1759
+ }
1760
+ return msg;
1761
+ };
1762
+
1763
+
1764
+ /**
1765
+ * Serializes the message to binary data (in protobuf wire format).
1766
+ * @return {!Uint8Array}
1767
+ */
1768
+ proto.sport.RefreshBetbyTokenRequest.prototype.serializeBinary = function() {
1769
+ var writer = new jspb.BinaryWriter();
1770
+ proto.sport.RefreshBetbyTokenRequest.serializeBinaryToWriter(this, writer);
1771
+ return writer.getResultBuffer();
1772
+ };
1773
+
1774
+
1775
+ /**
1776
+ * Serializes the given message to binary data (in protobuf wire
1777
+ * format), writing to the given BinaryWriter.
1778
+ * @param {!proto.sport.RefreshBetbyTokenRequest} message
1779
+ * @param {!jspb.BinaryWriter} writer
1780
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1781
+ */
1782
+ proto.sport.RefreshBetbyTokenRequest.serializeBinaryToWriter = function(message, writer) {
1783
+ var f = undefined;
1784
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
1785
+ if (f != null) {
1786
+ writer.writeInt32(
1787
+ 1,
1788
+ f
1789
+ );
1790
+ }
1791
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1792
+ if (f != null) {
1793
+ writer.writeString(
1794
+ 2,
1795
+ f
1796
+ );
1797
+ }
1798
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1799
+ if (f != null) {
1800
+ writer.writeString(
1801
+ 3,
1802
+ f
1803
+ );
1804
+ }
1805
+ };
1806
+
1807
+
1808
+ /**
1809
+ * optional int32 user_id = 1;
1810
+ * @return {number}
1811
+ */
1812
+ proto.sport.RefreshBetbyTokenRequest.prototype.getUserId = function() {
1813
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1814
+ };
1815
+
1816
+
1817
+ /**
1818
+ * @param {number} value
1819
+ * @return {!proto.sport.RefreshBetbyTokenRequest} returns this
1820
+ */
1821
+ proto.sport.RefreshBetbyTokenRequest.prototype.setUserId = function(value) {
1822
+ return jspb.Message.setField(this, 1, value);
1823
+ };
1824
+
1825
+
1826
+ /**
1827
+ * Clears the field making it undefined.
1828
+ * @return {!proto.sport.RefreshBetbyTokenRequest} returns this
1829
+ */
1830
+ proto.sport.RefreshBetbyTokenRequest.prototype.clearUserId = function() {
1831
+ return jspb.Message.setField(this, 1, undefined);
1832
+ };
1833
+
1834
+
1835
+ /**
1836
+ * Returns whether this field is set.
1837
+ * @return {boolean}
1838
+ */
1839
+ proto.sport.RefreshBetbyTokenRequest.prototype.hasUserId = function() {
1840
+ return jspb.Message.getField(this, 1) != null;
1841
+ };
1842
+
1843
+
1844
+ /**
1845
+ * optional string user_public_id = 2;
1846
+ * @return {string}
1847
+ */
1848
+ proto.sport.RefreshBetbyTokenRequest.prototype.getUserPublicId = function() {
1849
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1850
+ };
1851
+
1852
+
1853
+ /**
1854
+ * @param {string} value
1855
+ * @return {!proto.sport.RefreshBetbyTokenRequest} returns this
1856
+ */
1857
+ proto.sport.RefreshBetbyTokenRequest.prototype.setUserPublicId = function(value) {
1858
+ return jspb.Message.setField(this, 2, value);
1859
+ };
1860
+
1861
+
1862
+ /**
1863
+ * Clears the field making it undefined.
1864
+ * @return {!proto.sport.RefreshBetbyTokenRequest} returns this
1865
+ */
1866
+ proto.sport.RefreshBetbyTokenRequest.prototype.clearUserPublicId = function() {
1867
+ return jspb.Message.setField(this, 2, undefined);
1868
+ };
1869
+
1870
+
1871
+ /**
1872
+ * Returns whether this field is set.
1873
+ * @return {boolean}
1874
+ */
1875
+ proto.sport.RefreshBetbyTokenRequest.prototype.hasUserPublicId = function() {
1876
+ return jspb.Message.getField(this, 2) != null;
1877
+ };
1878
+
1879
+
1880
+ /**
1881
+ * optional string session_id = 3;
1882
+ * @return {string}
1883
+ */
1884
+ proto.sport.RefreshBetbyTokenRequest.prototype.getSessionId = function() {
1885
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1886
+ };
1887
+
1888
+
1889
+ /**
1890
+ * @param {string} value
1891
+ * @return {!proto.sport.RefreshBetbyTokenRequest} returns this
1892
+ */
1893
+ proto.sport.RefreshBetbyTokenRequest.prototype.setSessionId = function(value) {
1894
+ return jspb.Message.setField(this, 3, value);
1895
+ };
1896
+
1897
+
1898
+ /**
1899
+ * Clears the field making it undefined.
1900
+ * @return {!proto.sport.RefreshBetbyTokenRequest} returns this
1901
+ */
1902
+ proto.sport.RefreshBetbyTokenRequest.prototype.clearSessionId = function() {
1903
+ return jspb.Message.setField(this, 3, undefined);
1904
+ };
1905
+
1906
+
1907
+ /**
1908
+ * Returns whether this field is set.
1909
+ * @return {boolean}
1910
+ */
1911
+ proto.sport.RefreshBetbyTokenRequest.prototype.hasSessionId = function() {
1912
+ return jspb.Message.getField(this, 3) != null;
1913
+ };
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1920
+ /**
1921
+ * Creates an object representation of this proto.
1922
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1923
+ * Optional fields that are not set will be set to undefined.
1924
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1925
+ * For the list of reserved names please see:
1926
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1927
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1928
+ * JSPB instance for transitional soy proto support:
1929
+ * http://goto/soy-param-migration
1930
+ * @return {!Object}
1931
+ */
1932
+ proto.sport.RefreshBetbyTokenResponse.prototype.toObject = function(opt_includeInstance) {
1933
+ return proto.sport.RefreshBetbyTokenResponse.toObject(opt_includeInstance, this);
1934
+ };
1935
+
1936
+
1937
+ /**
1938
+ * Static version of the {@see toObject} method.
1939
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1940
+ * the JSPB instance for transitional soy proto support:
1941
+ * http://goto/soy-param-migration
1942
+ * @param {!proto.sport.RefreshBetbyTokenResponse} msg The msg instance to transform.
1943
+ * @return {!Object}
1944
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1945
+ */
1946
+ proto.sport.RefreshBetbyTokenResponse.toObject = function(includeInstance, msg) {
1947
+ var f, obj = {
1948
+ token: jspb.Message.getFieldWithDefault(msg, 1, "")
1949
+ };
1950
+
1951
+ if (includeInstance) {
1952
+ obj.$jspbMessageInstance = msg;
1953
+ }
1954
+ return obj;
1955
+ };
1956
+ }
1957
+
1958
+
1959
+ /**
1960
+ * Deserializes binary data (in protobuf wire format).
1961
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1962
+ * @return {!proto.sport.RefreshBetbyTokenResponse}
1963
+ */
1964
+ proto.sport.RefreshBetbyTokenResponse.deserializeBinary = function(bytes) {
1965
+ var reader = new jspb.BinaryReader(bytes);
1966
+ var msg = new proto.sport.RefreshBetbyTokenResponse;
1967
+ return proto.sport.RefreshBetbyTokenResponse.deserializeBinaryFromReader(msg, reader);
1968
+ };
1969
+
1970
+
1971
+ /**
1972
+ * Deserializes binary data (in protobuf wire format) from the
1973
+ * given reader into the given message object.
1974
+ * @param {!proto.sport.RefreshBetbyTokenResponse} msg The message object to deserialize into.
1975
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1976
+ * @return {!proto.sport.RefreshBetbyTokenResponse}
1977
+ */
1978
+ proto.sport.RefreshBetbyTokenResponse.deserializeBinaryFromReader = function(msg, reader) {
1979
+ while (reader.nextField()) {
1980
+ if (reader.isEndGroup()) {
1981
+ break;
1982
+ }
1983
+ var field = reader.getFieldNumber();
1984
+ switch (field) {
1985
+ case 1:
1986
+ var value = /** @type {string} */ (reader.readString());
1987
+ msg.setToken(value);
1988
+ break;
1989
+ default:
1990
+ reader.skipField();
1991
+ break;
1992
+ }
1993
+ }
1994
+ return msg;
1995
+ };
1996
+
1997
+
1998
+ /**
1999
+ * Serializes the message to binary data (in protobuf wire format).
2000
+ * @return {!Uint8Array}
2001
+ */
2002
+ proto.sport.RefreshBetbyTokenResponse.prototype.serializeBinary = function() {
2003
+ var writer = new jspb.BinaryWriter();
2004
+ proto.sport.RefreshBetbyTokenResponse.serializeBinaryToWriter(this, writer);
2005
+ return writer.getResultBuffer();
2006
+ };
2007
+
2008
+
2009
+ /**
2010
+ * Serializes the given message to binary data (in protobuf wire
2011
+ * format), writing to the given BinaryWriter.
2012
+ * @param {!proto.sport.RefreshBetbyTokenResponse} message
2013
+ * @param {!jspb.BinaryWriter} writer
2014
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2015
+ */
2016
+ proto.sport.RefreshBetbyTokenResponse.serializeBinaryToWriter = function(message, writer) {
2017
+ var f = undefined;
2018
+ f = message.getToken();
2019
+ if (f.length > 0) {
2020
+ writer.writeString(
2021
+ 1,
2022
+ f
2023
+ );
2024
+ }
2025
+ };
2026
+
2027
+
2028
+ /**
2029
+ * optional string token = 1;
2030
+ * @return {string}
2031
+ */
2032
+ proto.sport.RefreshBetbyTokenResponse.prototype.getToken = function() {
2033
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2034
+ };
2035
+
2036
+
2037
+ /**
2038
+ * @param {string} value
2039
+ * @return {!proto.sport.RefreshBetbyTokenResponse} returns this
2040
+ */
2041
+ proto.sport.RefreshBetbyTokenResponse.prototype.setToken = function(value) {
2042
+ return jspb.Message.setProto3StringField(this, 1, value);
2043
+ };
2044
+
2045
+
2046
+
2047
+
2048
+
1631
2049
  if (jspb.Message.GENERATE_TO_OBJECT) {
1632
2050
  /**
1633
2051
  * Creates an object representation of this proto.