protobuf-platform 1.1.59 → 1.1.60
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 +1 -1
- package/promocode/promocode.proto +11 -1
- package/promocode/promocode_pb.js +318 -1
package/package.json
CHANGED
@@ -13,12 +13,22 @@ service Promocode {
|
|
13
13
|
}
|
14
14
|
message PingRequest { string ping = 1; }
|
15
15
|
message PongResponse { string pong = 1; }
|
16
|
-
message PaginationRequest {
|
16
|
+
message PaginationRequest {
|
17
|
+
int32 limit = 1;
|
18
|
+
int32 offset = 2;
|
19
|
+
optional UserSearchRequest user_search_params = 3;
|
20
|
+
optional SearchRequest additional_search_params = 4;
|
21
|
+
}
|
17
22
|
message UserSearchRequest {
|
18
23
|
optional int32 user_id = 1;
|
19
24
|
optional string balance_type = 2;
|
20
25
|
optional string currency = 3;
|
21
26
|
}
|
27
|
+
message SearchRequest {
|
28
|
+
optional string title = 1;
|
29
|
+
optional string code = 2;
|
30
|
+
optional int32 is_active = 3;
|
31
|
+
}
|
22
32
|
//Main CRUD
|
23
33
|
message GetCodeRequest {
|
24
34
|
int32 id = 1;
|
@@ -30,6 +30,7 @@ goog.exportSymbol('proto.promocode.GetCodeRequest', null, global);
|
|
30
30
|
goog.exportSymbol('proto.promocode.PaginationRequest', null, global);
|
31
31
|
goog.exportSymbol('proto.promocode.PingRequest', null, global);
|
32
32
|
goog.exportSymbol('proto.promocode.PongResponse', null, global);
|
33
|
+
goog.exportSymbol('proto.promocode.SearchRequest', null, global);
|
33
34
|
goog.exportSymbol('proto.promocode.UserSearchRequest', null, global);
|
34
35
|
/**
|
35
36
|
* Generated by JsPbCodeGenerator.
|
@@ -115,6 +116,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
115
116
|
*/
|
116
117
|
proto.promocode.UserSearchRequest.displayName = 'proto.promocode.UserSearchRequest';
|
117
118
|
}
|
119
|
+
/**
|
120
|
+
* Generated by JsPbCodeGenerator.
|
121
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
122
|
+
* server response, or constructed directly in Javascript. The array is used
|
123
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
124
|
+
* If no data is provided, the constructed object will be empty, but still
|
125
|
+
* valid.
|
126
|
+
* @extends {jspb.Message}
|
127
|
+
* @constructor
|
128
|
+
*/
|
129
|
+
proto.promocode.SearchRequest = function(opt_data) {
|
130
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
131
|
+
};
|
132
|
+
goog.inherits(proto.promocode.SearchRequest, jspb.Message);
|
133
|
+
if (goog.DEBUG && !COMPILED) {
|
134
|
+
/**
|
135
|
+
* @public
|
136
|
+
* @override
|
137
|
+
*/
|
138
|
+
proto.promocode.SearchRequest.displayName = 'proto.promocode.SearchRequest';
|
139
|
+
}
|
118
140
|
/**
|
119
141
|
* Generated by JsPbCodeGenerator.
|
120
142
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -535,7 +557,8 @@ proto.promocode.PaginationRequest.toObject = function(includeInstance, msg) {
|
|
535
557
|
var f, obj = {
|
536
558
|
limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
537
559
|
offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
538
|
-
userSearchParams: (f = msg.getUserSearchParams()) && proto.promocode.UserSearchRequest.toObject(includeInstance, f)
|
560
|
+
userSearchParams: (f = msg.getUserSearchParams()) && proto.promocode.UserSearchRequest.toObject(includeInstance, f),
|
561
|
+
additionalSearchParams: (f = msg.getAdditionalSearchParams()) && proto.promocode.SearchRequest.toObject(includeInstance, f)
|
539
562
|
};
|
540
563
|
|
541
564
|
if (includeInstance) {
|
@@ -585,6 +608,11 @@ proto.promocode.PaginationRequest.deserializeBinaryFromReader = function(msg, re
|
|
585
608
|
reader.readMessage(value,proto.promocode.UserSearchRequest.deserializeBinaryFromReader);
|
586
609
|
msg.setUserSearchParams(value);
|
587
610
|
break;
|
611
|
+
case 4:
|
612
|
+
var value = new proto.promocode.SearchRequest;
|
613
|
+
reader.readMessage(value,proto.promocode.SearchRequest.deserializeBinaryFromReader);
|
614
|
+
msg.setAdditionalSearchParams(value);
|
615
|
+
break;
|
588
616
|
default:
|
589
617
|
reader.skipField();
|
590
618
|
break;
|
@@ -636,6 +664,14 @@ proto.promocode.PaginationRequest.serializeBinaryToWriter = function(message, wr
|
|
636
664
|
proto.promocode.UserSearchRequest.serializeBinaryToWriter
|
637
665
|
);
|
638
666
|
}
|
667
|
+
f = message.getAdditionalSearchParams();
|
668
|
+
if (f != null) {
|
669
|
+
writer.writeMessage(
|
670
|
+
4,
|
671
|
+
f,
|
672
|
+
proto.promocode.SearchRequest.serializeBinaryToWriter
|
673
|
+
);
|
674
|
+
}
|
639
675
|
};
|
640
676
|
|
641
677
|
|
@@ -712,6 +748,43 @@ proto.promocode.PaginationRequest.prototype.hasUserSearchParams = function() {
|
|
712
748
|
};
|
713
749
|
|
714
750
|
|
751
|
+
/**
|
752
|
+
* optional SearchRequest additional_search_params = 4;
|
753
|
+
* @return {?proto.promocode.SearchRequest}
|
754
|
+
*/
|
755
|
+
proto.promocode.PaginationRequest.prototype.getAdditionalSearchParams = function() {
|
756
|
+
return /** @type{?proto.promocode.SearchRequest} */ (
|
757
|
+
jspb.Message.getWrapperField(this, proto.promocode.SearchRequest, 4));
|
758
|
+
};
|
759
|
+
|
760
|
+
|
761
|
+
/**
|
762
|
+
* @param {?proto.promocode.SearchRequest|undefined} value
|
763
|
+
* @return {!proto.promocode.PaginationRequest} returns this
|
764
|
+
*/
|
765
|
+
proto.promocode.PaginationRequest.prototype.setAdditionalSearchParams = function(value) {
|
766
|
+
return jspb.Message.setWrapperField(this, 4, value);
|
767
|
+
};
|
768
|
+
|
769
|
+
|
770
|
+
/**
|
771
|
+
* Clears the message field making it undefined.
|
772
|
+
* @return {!proto.promocode.PaginationRequest} returns this
|
773
|
+
*/
|
774
|
+
proto.promocode.PaginationRequest.prototype.clearAdditionalSearchParams = function() {
|
775
|
+
return this.setAdditionalSearchParams(undefined);
|
776
|
+
};
|
777
|
+
|
778
|
+
|
779
|
+
/**
|
780
|
+
* Returns whether this field is set.
|
781
|
+
* @return {boolean}
|
782
|
+
*/
|
783
|
+
proto.promocode.PaginationRequest.prototype.hasAdditionalSearchParams = function() {
|
784
|
+
return jspb.Message.getField(this, 4) != null;
|
785
|
+
};
|
786
|
+
|
787
|
+
|
715
788
|
|
716
789
|
|
717
790
|
|
@@ -959,6 +1032,250 @@ proto.promocode.UserSearchRequest.prototype.hasCurrency = function() {
|
|
959
1032
|
|
960
1033
|
|
961
1034
|
|
1035
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1036
|
+
/**
|
1037
|
+
* Creates an object representation of this proto.
|
1038
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1039
|
+
* Optional fields that are not set will be set to undefined.
|
1040
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1041
|
+
* For the list of reserved names please see:
|
1042
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1043
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1044
|
+
* JSPB instance for transitional soy proto support:
|
1045
|
+
* http://goto/soy-param-migration
|
1046
|
+
* @return {!Object}
|
1047
|
+
*/
|
1048
|
+
proto.promocode.SearchRequest.prototype.toObject = function(opt_includeInstance) {
|
1049
|
+
return proto.promocode.SearchRequest.toObject(opt_includeInstance, this);
|
1050
|
+
};
|
1051
|
+
|
1052
|
+
|
1053
|
+
/**
|
1054
|
+
* Static version of the {@see toObject} method.
|
1055
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1056
|
+
* the JSPB instance for transitional soy proto support:
|
1057
|
+
* http://goto/soy-param-migration
|
1058
|
+
* @param {!proto.promocode.SearchRequest} msg The msg instance to transform.
|
1059
|
+
* @return {!Object}
|
1060
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1061
|
+
*/
|
1062
|
+
proto.promocode.SearchRequest.toObject = function(includeInstance, msg) {
|
1063
|
+
var f, obj = {
|
1064
|
+
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
1065
|
+
code: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
1066
|
+
isActive: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
1067
|
+
};
|
1068
|
+
|
1069
|
+
if (includeInstance) {
|
1070
|
+
obj.$jspbMessageInstance = msg;
|
1071
|
+
}
|
1072
|
+
return obj;
|
1073
|
+
};
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
|
1077
|
+
/**
|
1078
|
+
* Deserializes binary data (in protobuf wire format).
|
1079
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1080
|
+
* @return {!proto.promocode.SearchRequest}
|
1081
|
+
*/
|
1082
|
+
proto.promocode.SearchRequest.deserializeBinary = function(bytes) {
|
1083
|
+
var reader = new jspb.BinaryReader(bytes);
|
1084
|
+
var msg = new proto.promocode.SearchRequest;
|
1085
|
+
return proto.promocode.SearchRequest.deserializeBinaryFromReader(msg, reader);
|
1086
|
+
};
|
1087
|
+
|
1088
|
+
|
1089
|
+
/**
|
1090
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1091
|
+
* given reader into the given message object.
|
1092
|
+
* @param {!proto.promocode.SearchRequest} msg The message object to deserialize into.
|
1093
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1094
|
+
* @return {!proto.promocode.SearchRequest}
|
1095
|
+
*/
|
1096
|
+
proto.promocode.SearchRequest.deserializeBinaryFromReader = function(msg, reader) {
|
1097
|
+
while (reader.nextField()) {
|
1098
|
+
if (reader.isEndGroup()) {
|
1099
|
+
break;
|
1100
|
+
}
|
1101
|
+
var field = reader.getFieldNumber();
|
1102
|
+
switch (field) {
|
1103
|
+
case 1:
|
1104
|
+
var value = /** @type {string} */ (reader.readString());
|
1105
|
+
msg.setTitle(value);
|
1106
|
+
break;
|
1107
|
+
case 2:
|
1108
|
+
var value = /** @type {string} */ (reader.readString());
|
1109
|
+
msg.setCode(value);
|
1110
|
+
break;
|
1111
|
+
case 3:
|
1112
|
+
var value = /** @type {number} */ (reader.readInt32());
|
1113
|
+
msg.setIsActive(value);
|
1114
|
+
break;
|
1115
|
+
default:
|
1116
|
+
reader.skipField();
|
1117
|
+
break;
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
return msg;
|
1121
|
+
};
|
1122
|
+
|
1123
|
+
|
1124
|
+
/**
|
1125
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1126
|
+
* @return {!Uint8Array}
|
1127
|
+
*/
|
1128
|
+
proto.promocode.SearchRequest.prototype.serializeBinary = function() {
|
1129
|
+
var writer = new jspb.BinaryWriter();
|
1130
|
+
proto.promocode.SearchRequest.serializeBinaryToWriter(this, writer);
|
1131
|
+
return writer.getResultBuffer();
|
1132
|
+
};
|
1133
|
+
|
1134
|
+
|
1135
|
+
/**
|
1136
|
+
* Serializes the given message to binary data (in protobuf wire
|
1137
|
+
* format), writing to the given BinaryWriter.
|
1138
|
+
* @param {!proto.promocode.SearchRequest} message
|
1139
|
+
* @param {!jspb.BinaryWriter} writer
|
1140
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1141
|
+
*/
|
1142
|
+
proto.promocode.SearchRequest.serializeBinaryToWriter = function(message, writer) {
|
1143
|
+
var f = undefined;
|
1144
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 1));
|
1145
|
+
if (f != null) {
|
1146
|
+
writer.writeString(
|
1147
|
+
1,
|
1148
|
+
f
|
1149
|
+
);
|
1150
|
+
}
|
1151
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 2));
|
1152
|
+
if (f != null) {
|
1153
|
+
writer.writeString(
|
1154
|
+
2,
|
1155
|
+
f
|
1156
|
+
);
|
1157
|
+
}
|
1158
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
1159
|
+
if (f != null) {
|
1160
|
+
writer.writeInt32(
|
1161
|
+
3,
|
1162
|
+
f
|
1163
|
+
);
|
1164
|
+
}
|
1165
|
+
};
|
1166
|
+
|
1167
|
+
|
1168
|
+
/**
|
1169
|
+
* optional string title = 1;
|
1170
|
+
* @return {string}
|
1171
|
+
*/
|
1172
|
+
proto.promocode.SearchRequest.prototype.getTitle = function() {
|
1173
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1174
|
+
};
|
1175
|
+
|
1176
|
+
|
1177
|
+
/**
|
1178
|
+
* @param {string} value
|
1179
|
+
* @return {!proto.promocode.SearchRequest} returns this
|
1180
|
+
*/
|
1181
|
+
proto.promocode.SearchRequest.prototype.setTitle = function(value) {
|
1182
|
+
return jspb.Message.setField(this, 1, value);
|
1183
|
+
};
|
1184
|
+
|
1185
|
+
|
1186
|
+
/**
|
1187
|
+
* Clears the field making it undefined.
|
1188
|
+
* @return {!proto.promocode.SearchRequest} returns this
|
1189
|
+
*/
|
1190
|
+
proto.promocode.SearchRequest.prototype.clearTitle = function() {
|
1191
|
+
return jspb.Message.setField(this, 1, undefined);
|
1192
|
+
};
|
1193
|
+
|
1194
|
+
|
1195
|
+
/**
|
1196
|
+
* Returns whether this field is set.
|
1197
|
+
* @return {boolean}
|
1198
|
+
*/
|
1199
|
+
proto.promocode.SearchRequest.prototype.hasTitle = function() {
|
1200
|
+
return jspb.Message.getField(this, 1) != null;
|
1201
|
+
};
|
1202
|
+
|
1203
|
+
|
1204
|
+
/**
|
1205
|
+
* optional string code = 2;
|
1206
|
+
* @return {string}
|
1207
|
+
*/
|
1208
|
+
proto.promocode.SearchRequest.prototype.getCode = function() {
|
1209
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
1210
|
+
};
|
1211
|
+
|
1212
|
+
|
1213
|
+
/**
|
1214
|
+
* @param {string} value
|
1215
|
+
* @return {!proto.promocode.SearchRequest} returns this
|
1216
|
+
*/
|
1217
|
+
proto.promocode.SearchRequest.prototype.setCode = function(value) {
|
1218
|
+
return jspb.Message.setField(this, 2, value);
|
1219
|
+
};
|
1220
|
+
|
1221
|
+
|
1222
|
+
/**
|
1223
|
+
* Clears the field making it undefined.
|
1224
|
+
* @return {!proto.promocode.SearchRequest} returns this
|
1225
|
+
*/
|
1226
|
+
proto.promocode.SearchRequest.prototype.clearCode = function() {
|
1227
|
+
return jspb.Message.setField(this, 2, undefined);
|
1228
|
+
};
|
1229
|
+
|
1230
|
+
|
1231
|
+
/**
|
1232
|
+
* Returns whether this field is set.
|
1233
|
+
* @return {boolean}
|
1234
|
+
*/
|
1235
|
+
proto.promocode.SearchRequest.prototype.hasCode = function() {
|
1236
|
+
return jspb.Message.getField(this, 2) != null;
|
1237
|
+
};
|
1238
|
+
|
1239
|
+
|
1240
|
+
/**
|
1241
|
+
* optional int32 is_active = 3;
|
1242
|
+
* @return {number}
|
1243
|
+
*/
|
1244
|
+
proto.promocode.SearchRequest.prototype.getIsActive = function() {
|
1245
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
1246
|
+
};
|
1247
|
+
|
1248
|
+
|
1249
|
+
/**
|
1250
|
+
* @param {number} value
|
1251
|
+
* @return {!proto.promocode.SearchRequest} returns this
|
1252
|
+
*/
|
1253
|
+
proto.promocode.SearchRequest.prototype.setIsActive = function(value) {
|
1254
|
+
return jspb.Message.setField(this, 3, value);
|
1255
|
+
};
|
1256
|
+
|
1257
|
+
|
1258
|
+
/**
|
1259
|
+
* Clears the field making it undefined.
|
1260
|
+
* @return {!proto.promocode.SearchRequest} returns this
|
1261
|
+
*/
|
1262
|
+
proto.promocode.SearchRequest.prototype.clearIsActive = function() {
|
1263
|
+
return jspb.Message.setField(this, 3, undefined);
|
1264
|
+
};
|
1265
|
+
|
1266
|
+
|
1267
|
+
/**
|
1268
|
+
* Returns whether this field is set.
|
1269
|
+
* @return {boolean}
|
1270
|
+
*/
|
1271
|
+
proto.promocode.SearchRequest.prototype.hasIsActive = function() {
|
1272
|
+
return jspb.Message.getField(this, 3) != null;
|
1273
|
+
};
|
1274
|
+
|
1275
|
+
|
1276
|
+
|
1277
|
+
|
1278
|
+
|
962
1279
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
963
1280
|
/**
|
964
1281
|
* Creates an object representation of this proto.
|