protobuf-platform 1.0.14 → 1.0.16
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/config/config.proto +11 -0
- package/config/config_grpc_pb.js +34 -0
- package/config/config_pb.js +412 -0
- package/package.json +1 -1
- package/user/user.proto +1 -1
- package/user/user_pb.js +50 -50
package/config/config.proto
CHANGED
@@ -9,6 +9,8 @@ service Config {
|
|
9
9
|
//Set config for particular customer
|
10
10
|
rpc setConfig(ConfigRequest) returns (ConfigStatusResponse);
|
11
11
|
rpc getConfig(ConfigRequest) returns (ConfigDataResponse);
|
12
|
+
//Global settings
|
13
|
+
rpc addError(ErrorRequest) returns (ErrorStatusResponse);
|
12
14
|
}
|
13
15
|
|
14
16
|
message PingRequest { string ping = 1; }
|
@@ -37,4 +39,13 @@ message ConfigStatusResponse {
|
|
37
39
|
}
|
38
40
|
message ConfigDataResponse {
|
39
41
|
string data = 1;
|
42
|
+
}
|
43
|
+
message ErrorRequest {
|
44
|
+
string error_key = 1;
|
45
|
+
string error_code = 2;
|
46
|
+
string http_code = 3;
|
47
|
+
optional string description = 4;
|
48
|
+
}
|
49
|
+
message ErrorStatusResponse {
|
50
|
+
string status = 1;
|
40
51
|
}
|
package/config/config_grpc_pb.js
CHANGED
@@ -37,6 +37,28 @@ function deserialize_config_ConfigStatusResponse(buffer_arg) {
|
|
37
37
|
return config_pb.ConfigStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
38
38
|
}
|
39
39
|
|
40
|
+
function serialize_config_ErrorRequest(arg) {
|
41
|
+
if (!(arg instanceof config_pb.ErrorRequest)) {
|
42
|
+
throw new Error('Expected argument of type config.ErrorRequest');
|
43
|
+
}
|
44
|
+
return Buffer.from(arg.serializeBinary());
|
45
|
+
}
|
46
|
+
|
47
|
+
function deserialize_config_ErrorRequest(buffer_arg) {
|
48
|
+
return config_pb.ErrorRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
49
|
+
}
|
50
|
+
|
51
|
+
function serialize_config_ErrorStatusResponse(arg) {
|
52
|
+
if (!(arg instanceof config_pb.ErrorStatusResponse)) {
|
53
|
+
throw new Error('Expected argument of type config.ErrorStatusResponse');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_config_ErrorStatusResponse(buffer_arg) {
|
59
|
+
return config_pb.ErrorStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
40
62
|
function serialize_config_PingRequest(arg) {
|
41
63
|
if (!(arg instanceof config_pb.PingRequest)) {
|
42
64
|
throw new Error('Expected argument of type config.PingRequest');
|
@@ -129,6 +151,18 @@ setConfig: {
|
|
129
151
|
responseSerialize: serialize_config_ConfigDataResponse,
|
130
152
|
responseDeserialize: deserialize_config_ConfigDataResponse,
|
131
153
|
},
|
154
|
+
// Global settings
|
155
|
+
addError: {
|
156
|
+
path: '/config.Config/addError',
|
157
|
+
requestStream: false,
|
158
|
+
responseStream: false,
|
159
|
+
requestType: config_pb.ErrorRequest,
|
160
|
+
responseType: config_pb.ErrorStatusResponse,
|
161
|
+
requestSerialize: serialize_config_ErrorRequest,
|
162
|
+
requestDeserialize: deserialize_config_ErrorRequest,
|
163
|
+
responseSerialize: serialize_config_ErrorStatusResponse,
|
164
|
+
responseDeserialize: deserialize_config_ErrorStatusResponse,
|
165
|
+
},
|
132
166
|
};
|
133
167
|
|
134
168
|
exports.ConfigClient = grpc.makeGenericClientConstructor(ConfigService);
|
package/config/config_pb.js
CHANGED
@@ -24,6 +24,8 @@ var global = (function() {
|
|
24
24
|
goog.exportSymbol('proto.config.ConfigDataResponse', null, global);
|
25
25
|
goog.exportSymbol('proto.config.ConfigRequest', null, global);
|
26
26
|
goog.exportSymbol('proto.config.ConfigStatusResponse', null, global);
|
27
|
+
goog.exportSymbol('proto.config.ErrorRequest', null, global);
|
28
|
+
goog.exportSymbol('proto.config.ErrorStatusResponse', null, global);
|
27
29
|
goog.exportSymbol('proto.config.PingRequest', null, global);
|
28
30
|
goog.exportSymbol('proto.config.PongResponse', null, global);
|
29
31
|
goog.exportSymbol('proto.config.SettingsRequest', null, global);
|
@@ -175,6 +177,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
175
177
|
*/
|
176
178
|
proto.config.ConfigDataResponse.displayName = 'proto.config.ConfigDataResponse';
|
177
179
|
}
|
180
|
+
/**
|
181
|
+
* Generated by JsPbCodeGenerator.
|
182
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
183
|
+
* server response, or constructed directly in Javascript. The array is used
|
184
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
185
|
+
* If no data is provided, the constructed object will be empty, but still
|
186
|
+
* valid.
|
187
|
+
* @extends {jspb.Message}
|
188
|
+
* @constructor
|
189
|
+
*/
|
190
|
+
proto.config.ErrorRequest = function(opt_data) {
|
191
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
192
|
+
};
|
193
|
+
goog.inherits(proto.config.ErrorRequest, jspb.Message);
|
194
|
+
if (goog.DEBUG && !COMPILED) {
|
195
|
+
/**
|
196
|
+
* @public
|
197
|
+
* @override
|
198
|
+
*/
|
199
|
+
proto.config.ErrorRequest.displayName = 'proto.config.ErrorRequest';
|
200
|
+
}
|
201
|
+
/**
|
202
|
+
* Generated by JsPbCodeGenerator.
|
203
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
204
|
+
* server response, or constructed directly in Javascript. The array is used
|
205
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
206
|
+
* If no data is provided, the constructed object will be empty, but still
|
207
|
+
* valid.
|
208
|
+
* @extends {jspb.Message}
|
209
|
+
* @constructor
|
210
|
+
*/
|
211
|
+
proto.config.ErrorStatusResponse = function(opt_data) {
|
212
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
213
|
+
};
|
214
|
+
goog.inherits(proto.config.ErrorStatusResponse, jspb.Message);
|
215
|
+
if (goog.DEBUG && !COMPILED) {
|
216
|
+
/**
|
217
|
+
* @public
|
218
|
+
* @override
|
219
|
+
*/
|
220
|
+
proto.config.ErrorStatusResponse.displayName = 'proto.config.ErrorStatusResponse';
|
221
|
+
}
|
178
222
|
|
179
223
|
|
180
224
|
|
@@ -1385,4 +1429,372 @@ proto.config.ConfigDataResponse.prototype.setData = function(value) {
|
|
1385
1429
|
};
|
1386
1430
|
|
1387
1431
|
|
1432
|
+
|
1433
|
+
|
1434
|
+
|
1435
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1436
|
+
/**
|
1437
|
+
* Creates an object representation of this proto.
|
1438
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1439
|
+
* Optional fields that are not set will be set to undefined.
|
1440
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1441
|
+
* For the list of reserved names please see:
|
1442
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1443
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1444
|
+
* JSPB instance for transitional soy proto support:
|
1445
|
+
* http://goto/soy-param-migration
|
1446
|
+
* @return {!Object}
|
1447
|
+
*/
|
1448
|
+
proto.config.ErrorRequest.prototype.toObject = function(opt_includeInstance) {
|
1449
|
+
return proto.config.ErrorRequest.toObject(opt_includeInstance, this);
|
1450
|
+
};
|
1451
|
+
|
1452
|
+
|
1453
|
+
/**
|
1454
|
+
* Static version of the {@see toObject} method.
|
1455
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1456
|
+
* the JSPB instance for transitional soy proto support:
|
1457
|
+
* http://goto/soy-param-migration
|
1458
|
+
* @param {!proto.config.ErrorRequest} msg The msg instance to transform.
|
1459
|
+
* @return {!Object}
|
1460
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1461
|
+
*/
|
1462
|
+
proto.config.ErrorRequest.toObject = function(includeInstance, msg) {
|
1463
|
+
var f, obj = {
|
1464
|
+
errorKey: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
1465
|
+
errorCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1466
|
+
httpCode: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1467
|
+
description: jspb.Message.getFieldWithDefault(msg, 4, "")
|
1468
|
+
};
|
1469
|
+
|
1470
|
+
if (includeInstance) {
|
1471
|
+
obj.$jspbMessageInstance = msg;
|
1472
|
+
}
|
1473
|
+
return obj;
|
1474
|
+
};
|
1475
|
+
}
|
1476
|
+
|
1477
|
+
|
1478
|
+
/**
|
1479
|
+
* Deserializes binary data (in protobuf wire format).
|
1480
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1481
|
+
* @return {!proto.config.ErrorRequest}
|
1482
|
+
*/
|
1483
|
+
proto.config.ErrorRequest.deserializeBinary = function(bytes) {
|
1484
|
+
var reader = new jspb.BinaryReader(bytes);
|
1485
|
+
var msg = new proto.config.ErrorRequest;
|
1486
|
+
return proto.config.ErrorRequest.deserializeBinaryFromReader(msg, reader);
|
1487
|
+
};
|
1488
|
+
|
1489
|
+
|
1490
|
+
/**
|
1491
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1492
|
+
* given reader into the given message object.
|
1493
|
+
* @param {!proto.config.ErrorRequest} msg The message object to deserialize into.
|
1494
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1495
|
+
* @return {!proto.config.ErrorRequest}
|
1496
|
+
*/
|
1497
|
+
proto.config.ErrorRequest.deserializeBinaryFromReader = function(msg, reader) {
|
1498
|
+
while (reader.nextField()) {
|
1499
|
+
if (reader.isEndGroup()) {
|
1500
|
+
break;
|
1501
|
+
}
|
1502
|
+
var field = reader.getFieldNumber();
|
1503
|
+
switch (field) {
|
1504
|
+
case 1:
|
1505
|
+
var value = /** @type {string} */ (reader.readString());
|
1506
|
+
msg.setErrorKey(value);
|
1507
|
+
break;
|
1508
|
+
case 2:
|
1509
|
+
var value = /** @type {string} */ (reader.readString());
|
1510
|
+
msg.setErrorCode(value);
|
1511
|
+
break;
|
1512
|
+
case 3:
|
1513
|
+
var value = /** @type {string} */ (reader.readString());
|
1514
|
+
msg.setHttpCode(value);
|
1515
|
+
break;
|
1516
|
+
case 4:
|
1517
|
+
var value = /** @type {string} */ (reader.readString());
|
1518
|
+
msg.setDescription(value);
|
1519
|
+
break;
|
1520
|
+
default:
|
1521
|
+
reader.skipField();
|
1522
|
+
break;
|
1523
|
+
}
|
1524
|
+
}
|
1525
|
+
return msg;
|
1526
|
+
};
|
1527
|
+
|
1528
|
+
|
1529
|
+
/**
|
1530
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1531
|
+
* @return {!Uint8Array}
|
1532
|
+
*/
|
1533
|
+
proto.config.ErrorRequest.prototype.serializeBinary = function() {
|
1534
|
+
var writer = new jspb.BinaryWriter();
|
1535
|
+
proto.config.ErrorRequest.serializeBinaryToWriter(this, writer);
|
1536
|
+
return writer.getResultBuffer();
|
1537
|
+
};
|
1538
|
+
|
1539
|
+
|
1540
|
+
/**
|
1541
|
+
* Serializes the given message to binary data (in protobuf wire
|
1542
|
+
* format), writing to the given BinaryWriter.
|
1543
|
+
* @param {!proto.config.ErrorRequest} message
|
1544
|
+
* @param {!jspb.BinaryWriter} writer
|
1545
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1546
|
+
*/
|
1547
|
+
proto.config.ErrorRequest.serializeBinaryToWriter = function(message, writer) {
|
1548
|
+
var f = undefined;
|
1549
|
+
f = message.getErrorKey();
|
1550
|
+
if (f.length > 0) {
|
1551
|
+
writer.writeString(
|
1552
|
+
1,
|
1553
|
+
f
|
1554
|
+
);
|
1555
|
+
}
|
1556
|
+
f = message.getErrorCode();
|
1557
|
+
if (f.length > 0) {
|
1558
|
+
writer.writeString(
|
1559
|
+
2,
|
1560
|
+
f
|
1561
|
+
);
|
1562
|
+
}
|
1563
|
+
f = message.getHttpCode();
|
1564
|
+
if (f.length > 0) {
|
1565
|
+
writer.writeString(
|
1566
|
+
3,
|
1567
|
+
f
|
1568
|
+
);
|
1569
|
+
}
|
1570
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
1571
|
+
if (f != null) {
|
1572
|
+
writer.writeString(
|
1573
|
+
4,
|
1574
|
+
f
|
1575
|
+
);
|
1576
|
+
}
|
1577
|
+
};
|
1578
|
+
|
1579
|
+
|
1580
|
+
/**
|
1581
|
+
* optional string error_key = 1;
|
1582
|
+
* @return {string}
|
1583
|
+
*/
|
1584
|
+
proto.config.ErrorRequest.prototype.getErrorKey = function() {
|
1585
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1586
|
+
};
|
1587
|
+
|
1588
|
+
|
1589
|
+
/**
|
1590
|
+
* @param {string} value
|
1591
|
+
* @return {!proto.config.ErrorRequest} returns this
|
1592
|
+
*/
|
1593
|
+
proto.config.ErrorRequest.prototype.setErrorKey = function(value) {
|
1594
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
1595
|
+
};
|
1596
|
+
|
1597
|
+
|
1598
|
+
/**
|
1599
|
+
* optional string error_code = 2;
|
1600
|
+
* @return {string}
|
1601
|
+
*/
|
1602
|
+
proto.config.ErrorRequest.prototype.getErrorCode = function() {
|
1603
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
1604
|
+
};
|
1605
|
+
|
1606
|
+
|
1607
|
+
/**
|
1608
|
+
* @param {string} value
|
1609
|
+
* @return {!proto.config.ErrorRequest} returns this
|
1610
|
+
*/
|
1611
|
+
proto.config.ErrorRequest.prototype.setErrorCode = function(value) {
|
1612
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
1613
|
+
};
|
1614
|
+
|
1615
|
+
|
1616
|
+
/**
|
1617
|
+
* optional string http_code = 3;
|
1618
|
+
* @return {string}
|
1619
|
+
*/
|
1620
|
+
proto.config.ErrorRequest.prototype.getHttpCode = function() {
|
1621
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1622
|
+
};
|
1623
|
+
|
1624
|
+
|
1625
|
+
/**
|
1626
|
+
* @param {string} value
|
1627
|
+
* @return {!proto.config.ErrorRequest} returns this
|
1628
|
+
*/
|
1629
|
+
proto.config.ErrorRequest.prototype.setHttpCode = function(value) {
|
1630
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
1631
|
+
};
|
1632
|
+
|
1633
|
+
|
1634
|
+
/**
|
1635
|
+
* optional string description = 4;
|
1636
|
+
* @return {string}
|
1637
|
+
*/
|
1638
|
+
proto.config.ErrorRequest.prototype.getDescription = function() {
|
1639
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
1640
|
+
};
|
1641
|
+
|
1642
|
+
|
1643
|
+
/**
|
1644
|
+
* @param {string} value
|
1645
|
+
* @return {!proto.config.ErrorRequest} returns this
|
1646
|
+
*/
|
1647
|
+
proto.config.ErrorRequest.prototype.setDescription = function(value) {
|
1648
|
+
return jspb.Message.setField(this, 4, value);
|
1649
|
+
};
|
1650
|
+
|
1651
|
+
|
1652
|
+
/**
|
1653
|
+
* Clears the field making it undefined.
|
1654
|
+
* @return {!proto.config.ErrorRequest} returns this
|
1655
|
+
*/
|
1656
|
+
proto.config.ErrorRequest.prototype.clearDescription = function() {
|
1657
|
+
return jspb.Message.setField(this, 4, undefined);
|
1658
|
+
};
|
1659
|
+
|
1660
|
+
|
1661
|
+
/**
|
1662
|
+
* Returns whether this field is set.
|
1663
|
+
* @return {boolean}
|
1664
|
+
*/
|
1665
|
+
proto.config.ErrorRequest.prototype.hasDescription = function() {
|
1666
|
+
return jspb.Message.getField(this, 4) != null;
|
1667
|
+
};
|
1668
|
+
|
1669
|
+
|
1670
|
+
|
1671
|
+
|
1672
|
+
|
1673
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1674
|
+
/**
|
1675
|
+
* Creates an object representation of this proto.
|
1676
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1677
|
+
* Optional fields that are not set will be set to undefined.
|
1678
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1679
|
+
* For the list of reserved names please see:
|
1680
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1681
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1682
|
+
* JSPB instance for transitional soy proto support:
|
1683
|
+
* http://goto/soy-param-migration
|
1684
|
+
* @return {!Object}
|
1685
|
+
*/
|
1686
|
+
proto.config.ErrorStatusResponse.prototype.toObject = function(opt_includeInstance) {
|
1687
|
+
return proto.config.ErrorStatusResponse.toObject(opt_includeInstance, this);
|
1688
|
+
};
|
1689
|
+
|
1690
|
+
|
1691
|
+
/**
|
1692
|
+
* Static version of the {@see toObject} method.
|
1693
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1694
|
+
* the JSPB instance for transitional soy proto support:
|
1695
|
+
* http://goto/soy-param-migration
|
1696
|
+
* @param {!proto.config.ErrorStatusResponse} msg The msg instance to transform.
|
1697
|
+
* @return {!Object}
|
1698
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1699
|
+
*/
|
1700
|
+
proto.config.ErrorStatusResponse.toObject = function(includeInstance, msg) {
|
1701
|
+
var f, obj = {
|
1702
|
+
status: jspb.Message.getFieldWithDefault(msg, 1, "")
|
1703
|
+
};
|
1704
|
+
|
1705
|
+
if (includeInstance) {
|
1706
|
+
obj.$jspbMessageInstance = msg;
|
1707
|
+
}
|
1708
|
+
return obj;
|
1709
|
+
};
|
1710
|
+
}
|
1711
|
+
|
1712
|
+
|
1713
|
+
/**
|
1714
|
+
* Deserializes binary data (in protobuf wire format).
|
1715
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1716
|
+
* @return {!proto.config.ErrorStatusResponse}
|
1717
|
+
*/
|
1718
|
+
proto.config.ErrorStatusResponse.deserializeBinary = function(bytes) {
|
1719
|
+
var reader = new jspb.BinaryReader(bytes);
|
1720
|
+
var msg = new proto.config.ErrorStatusResponse;
|
1721
|
+
return proto.config.ErrorStatusResponse.deserializeBinaryFromReader(msg, reader);
|
1722
|
+
};
|
1723
|
+
|
1724
|
+
|
1725
|
+
/**
|
1726
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1727
|
+
* given reader into the given message object.
|
1728
|
+
* @param {!proto.config.ErrorStatusResponse} msg The message object to deserialize into.
|
1729
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1730
|
+
* @return {!proto.config.ErrorStatusResponse}
|
1731
|
+
*/
|
1732
|
+
proto.config.ErrorStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
|
1733
|
+
while (reader.nextField()) {
|
1734
|
+
if (reader.isEndGroup()) {
|
1735
|
+
break;
|
1736
|
+
}
|
1737
|
+
var field = reader.getFieldNumber();
|
1738
|
+
switch (field) {
|
1739
|
+
case 1:
|
1740
|
+
var value = /** @type {string} */ (reader.readString());
|
1741
|
+
msg.setStatus(value);
|
1742
|
+
break;
|
1743
|
+
default:
|
1744
|
+
reader.skipField();
|
1745
|
+
break;
|
1746
|
+
}
|
1747
|
+
}
|
1748
|
+
return msg;
|
1749
|
+
};
|
1750
|
+
|
1751
|
+
|
1752
|
+
/**
|
1753
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1754
|
+
* @return {!Uint8Array}
|
1755
|
+
*/
|
1756
|
+
proto.config.ErrorStatusResponse.prototype.serializeBinary = function() {
|
1757
|
+
var writer = new jspb.BinaryWriter();
|
1758
|
+
proto.config.ErrorStatusResponse.serializeBinaryToWriter(this, writer);
|
1759
|
+
return writer.getResultBuffer();
|
1760
|
+
};
|
1761
|
+
|
1762
|
+
|
1763
|
+
/**
|
1764
|
+
* Serializes the given message to binary data (in protobuf wire
|
1765
|
+
* format), writing to the given BinaryWriter.
|
1766
|
+
* @param {!proto.config.ErrorStatusResponse} message
|
1767
|
+
* @param {!jspb.BinaryWriter} writer
|
1768
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1769
|
+
*/
|
1770
|
+
proto.config.ErrorStatusResponse.serializeBinaryToWriter = function(message, writer) {
|
1771
|
+
var f = undefined;
|
1772
|
+
f = message.getStatus();
|
1773
|
+
if (f.length > 0) {
|
1774
|
+
writer.writeString(
|
1775
|
+
1,
|
1776
|
+
f
|
1777
|
+
);
|
1778
|
+
}
|
1779
|
+
};
|
1780
|
+
|
1781
|
+
|
1782
|
+
/**
|
1783
|
+
* optional string status = 1;
|
1784
|
+
* @return {string}
|
1785
|
+
*/
|
1786
|
+
proto.config.ErrorStatusResponse.prototype.getStatus = function() {
|
1787
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1788
|
+
};
|
1789
|
+
|
1790
|
+
|
1791
|
+
/**
|
1792
|
+
* @param {string} value
|
1793
|
+
* @return {!proto.config.ErrorStatusResponse} returns this
|
1794
|
+
*/
|
1795
|
+
proto.config.ErrorStatusResponse.prototype.setStatus = function(value) {
|
1796
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
1797
|
+
};
|
1798
|
+
|
1799
|
+
|
1388
1800
|
goog.object.extend(exports, proto.config);
|
package/package.json
CHANGED
package/user/user.proto
CHANGED
@@ -29,11 +29,11 @@ message LoggedInResponse {
|
|
29
29
|
string public_id = 2;
|
30
30
|
string currency = 3;
|
31
31
|
string country = 4;
|
32
|
-
optional int32 is_admin = 5;
|
33
32
|
}
|
34
33
|
message LoginRequest {
|
35
34
|
string email = 1;
|
36
35
|
string password = 2;
|
36
|
+
optional int32 is_admin = 5;
|
37
37
|
}
|
38
38
|
message UserDataRequest {
|
39
39
|
int32 id = 1;
|
package/user/user_pb.js
CHANGED
@@ -882,8 +882,7 @@ proto.user.LoggedInResponse.toObject = function(includeInstance, msg) {
|
|
882
882
|
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
883
883
|
publicId: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
884
884
|
currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
885
|
-
country: jspb.Message.getFieldWithDefault(msg, 4, "")
|
886
|
-
isAdmin: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
885
|
+
country: jspb.Message.getFieldWithDefault(msg, 4, "")
|
887
886
|
};
|
888
887
|
|
889
888
|
if (includeInstance) {
|
@@ -936,10 +935,6 @@ proto.user.LoggedInResponse.deserializeBinaryFromReader = function(msg, reader)
|
|
936
935
|
var value = /** @type {string} */ (reader.readString());
|
937
936
|
msg.setCountry(value);
|
938
937
|
break;
|
939
|
-
case 5:
|
940
|
-
var value = /** @type {number} */ (reader.readInt32());
|
941
|
-
msg.setIsAdmin(value);
|
942
|
-
break;
|
943
938
|
default:
|
944
939
|
reader.skipField();
|
945
940
|
break;
|
@@ -997,13 +992,6 @@ proto.user.LoggedInResponse.serializeBinaryToWriter = function(message, writer)
|
|
997
992
|
f
|
998
993
|
);
|
999
994
|
}
|
1000
|
-
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
1001
|
-
if (f != null) {
|
1002
|
-
writer.writeInt32(
|
1003
|
-
5,
|
1004
|
-
f
|
1005
|
-
);
|
1006
|
-
}
|
1007
995
|
};
|
1008
996
|
|
1009
997
|
|
@@ -1079,42 +1067,6 @@ proto.user.LoggedInResponse.prototype.setCountry = function(value) {
|
|
1079
1067
|
};
|
1080
1068
|
|
1081
1069
|
|
1082
|
-
/**
|
1083
|
-
* optional int32 is_admin = 5;
|
1084
|
-
* @return {number}
|
1085
|
-
*/
|
1086
|
-
proto.user.LoggedInResponse.prototype.getIsAdmin = function() {
|
1087
|
-
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
1088
|
-
};
|
1089
|
-
|
1090
|
-
|
1091
|
-
/**
|
1092
|
-
* @param {number} value
|
1093
|
-
* @return {!proto.user.LoggedInResponse} returns this
|
1094
|
-
*/
|
1095
|
-
proto.user.LoggedInResponse.prototype.setIsAdmin = function(value) {
|
1096
|
-
return jspb.Message.setField(this, 5, value);
|
1097
|
-
};
|
1098
|
-
|
1099
|
-
|
1100
|
-
/**
|
1101
|
-
* Clears the field making it undefined.
|
1102
|
-
* @return {!proto.user.LoggedInResponse} returns this
|
1103
|
-
*/
|
1104
|
-
proto.user.LoggedInResponse.prototype.clearIsAdmin = function() {
|
1105
|
-
return jspb.Message.setField(this, 5, undefined);
|
1106
|
-
};
|
1107
|
-
|
1108
|
-
|
1109
|
-
/**
|
1110
|
-
* Returns whether this field is set.
|
1111
|
-
* @return {boolean}
|
1112
|
-
*/
|
1113
|
-
proto.user.LoggedInResponse.prototype.hasIsAdmin = function() {
|
1114
|
-
return jspb.Message.getField(this, 5) != null;
|
1115
|
-
};
|
1116
|
-
|
1117
|
-
|
1118
1070
|
|
1119
1071
|
|
1120
1072
|
|
@@ -1148,7 +1100,8 @@ proto.user.LoginRequest.prototype.toObject = function(opt_includeInstance) {
|
|
1148
1100
|
proto.user.LoginRequest.toObject = function(includeInstance, msg) {
|
1149
1101
|
var f, obj = {
|
1150
1102
|
email: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
1151
|
-
password: jspb.Message.getFieldWithDefault(msg, 2, "")
|
1103
|
+
password: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1104
|
+
isAdmin: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
1152
1105
|
};
|
1153
1106
|
|
1154
1107
|
if (includeInstance) {
|
@@ -1193,6 +1146,10 @@ proto.user.LoginRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
1193
1146
|
var value = /** @type {string} */ (reader.readString());
|
1194
1147
|
msg.setPassword(value);
|
1195
1148
|
break;
|
1149
|
+
case 5:
|
1150
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1151
|
+
msg.setIsAdmin(value);
|
1152
|
+
break;
|
1196
1153
|
default:
|
1197
1154
|
reader.skipField();
|
1198
1155
|
break;
|
@@ -1236,6 +1193,13 @@ proto.user.LoginRequest.serializeBinaryToWriter = function(message, writer) {
|
|
1236
1193
|
f
|
1237
1194
|
);
|
1238
1195
|
}
|
1196
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
1197
|
+
if (f != null) {
|
1198
|
+
writer.writeInt32(
|
1199
|
+
5,
|
1200
|
+
f
|
1201
|
+
);
|
1202
|
+
}
|
1239
1203
|
};
|
1240
1204
|
|
1241
1205
|
|
@@ -1275,6 +1239,42 @@ proto.user.LoginRequest.prototype.setPassword = function(value) {
|
|
1275
1239
|
};
|
1276
1240
|
|
1277
1241
|
|
1242
|
+
/**
|
1243
|
+
* optional int32 is_admin = 5;
|
1244
|
+
* @return {number}
|
1245
|
+
*/
|
1246
|
+
proto.user.LoginRequest.prototype.getIsAdmin = function() {
|
1247
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
1248
|
+
};
|
1249
|
+
|
1250
|
+
|
1251
|
+
/**
|
1252
|
+
* @param {number} value
|
1253
|
+
* @return {!proto.user.LoginRequest} returns this
|
1254
|
+
*/
|
1255
|
+
proto.user.LoginRequest.prototype.setIsAdmin = function(value) {
|
1256
|
+
return jspb.Message.setField(this, 5, value);
|
1257
|
+
};
|
1258
|
+
|
1259
|
+
|
1260
|
+
/**
|
1261
|
+
* Clears the field making it undefined.
|
1262
|
+
* @return {!proto.user.LoginRequest} returns this
|
1263
|
+
*/
|
1264
|
+
proto.user.LoginRequest.prototype.clearIsAdmin = function() {
|
1265
|
+
return jspb.Message.setField(this, 5, undefined);
|
1266
|
+
};
|
1267
|
+
|
1268
|
+
|
1269
|
+
/**
|
1270
|
+
* Returns whether this field is set.
|
1271
|
+
* @return {boolean}
|
1272
|
+
*/
|
1273
|
+
proto.user.LoginRequest.prototype.hasIsAdmin = function() {
|
1274
|
+
return jspb.Message.getField(this, 5) != null;
|
1275
|
+
};
|
1276
|
+
|
1277
|
+
|
1278
1278
|
|
1279
1279
|
|
1280
1280
|
|