protobuf-platform 1.0.29 → 1.0.30

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/game/game.proto CHANGED
@@ -27,15 +27,15 @@ message CategoryItem {
27
27
  //Category CRUD | Requests
28
28
  message CategoryRequest {
29
29
  oneof request {
30
- string title = 2;
31
- MetaDataFile metadata = 3;
30
+ string title = 1;
31
+ MetaDataFile metadata = 2;
32
+ string slug = 3;
32
33
  int32 category_id = 4;
33
34
  }
34
35
  int32 id = 5;
35
- optional string slug = 6;
36
- optional string description = 7;
37
- optional int32 is_active = 8;
38
- optional File file = 9;
36
+ optional string description = 6;
37
+ optional int32 is_active = 7;
38
+ optional File file = 8;
39
39
  }
40
40
  message GetCategoryRequest {
41
41
  int32 id = 1;
package/game/game_pb.js CHANGED
@@ -921,15 +921,16 @@ proto.game.CategoryItem.prototype.hasImagePath = function() {
921
921
  * @private {!Array<!Array<number>>}
922
922
  * @const
923
923
  */
924
- proto.game.CategoryRequest.oneofGroups_ = [[2,3,4]];
924
+ proto.game.CategoryRequest.oneofGroups_ = [[1,2,3,4]];
925
925
 
926
926
  /**
927
927
  * @enum {number}
928
928
  */
929
929
  proto.game.CategoryRequest.RequestCase = {
930
930
  REQUEST_NOT_SET: 0,
931
- TITLE: 2,
932
- METADATA: 3,
931
+ TITLE: 1,
932
+ METADATA: 2,
933
+ SLUG: 3,
933
934
  CATEGORY_ID: 4
934
935
  };
935
936
 
@@ -971,13 +972,13 @@ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
971
972
  */
972
973
  proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
973
974
  var f, obj = {
974
- title: jspb.Message.getFieldWithDefault(msg, 2, ""),
975
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
975
976
  metadata: (f = msg.getMetadata()) && proto.game.MetaDataFile.toObject(includeInstance, f),
977
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
976
978
  categoryId: jspb.Message.getFieldWithDefault(msg, 4, 0),
977
979
  id: jspb.Message.getFieldWithDefault(msg, 5, 0),
978
- slug: jspb.Message.getFieldWithDefault(msg, 6, ""),
979
- description: jspb.Message.getFieldWithDefault(msg, 7, ""),
980
- isActive: jspb.Message.getFieldWithDefault(msg, 8, 0),
980
+ description: jspb.Message.getFieldWithDefault(msg, 6, ""),
981
+ isActive: jspb.Message.getFieldWithDefault(msg, 7, 0),
981
982
  file: (f = msg.getFile()) && proto.game.File.toObject(includeInstance, f)
982
983
  };
983
984
 
@@ -1015,15 +1016,19 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1015
1016
  }
1016
1017
  var field = reader.getFieldNumber();
1017
1018
  switch (field) {
1018
- case 2:
1019
+ case 1:
1019
1020
  var value = /** @type {string} */ (reader.readString());
1020
1021
  msg.setTitle(value);
1021
1022
  break;
1022
- case 3:
1023
+ case 2:
1023
1024
  var value = new proto.game.MetaDataFile;
1024
1025
  reader.readMessage(value,proto.game.MetaDataFile.deserializeBinaryFromReader);
1025
1026
  msg.setMetadata(value);
1026
1027
  break;
1028
+ case 3:
1029
+ var value = /** @type {string} */ (reader.readString());
1030
+ msg.setSlug(value);
1031
+ break;
1027
1032
  case 4:
1028
1033
  var value = /** @type {number} */ (reader.readInt32());
1029
1034
  msg.setCategoryId(value);
@@ -1033,18 +1038,14 @@ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1033
1038
  msg.setId(value);
1034
1039
  break;
1035
1040
  case 6:
1036
- var value = /** @type {string} */ (reader.readString());
1037
- msg.setSlug(value);
1038
- break;
1039
- case 7:
1040
1041
  var value = /** @type {string} */ (reader.readString());
1041
1042
  msg.setDescription(value);
1042
1043
  break;
1043
- case 8:
1044
+ case 7:
1044
1045
  var value = /** @type {number} */ (reader.readInt32());
1045
1046
  msg.setIsActive(value);
1046
1047
  break;
1047
- case 9:
1048
+ case 8:
1048
1049
  var value = new proto.game.File;
1049
1050
  reader.readMessage(value,proto.game.File.deserializeBinaryFromReader);
1050
1051
  msg.setFile(value);
@@ -1078,21 +1079,28 @@ proto.game.CategoryRequest.prototype.serializeBinary = function() {
1078
1079
  */
1079
1080
  proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1080
1081
  var f = undefined;
1081
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
1082
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1082
1083
  if (f != null) {
1083
1084
  writer.writeString(
1084
- 2,
1085
+ 1,
1085
1086
  f
1086
1087
  );
1087
1088
  }
1088
1089
  f = message.getMetadata();
1089
1090
  if (f != null) {
1090
1091
  writer.writeMessage(
1091
- 3,
1092
+ 2,
1092
1093
  f,
1093
1094
  proto.game.MetaDataFile.serializeBinaryToWriter
1094
1095
  );
1095
1096
  }
1097
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1098
+ if (f != null) {
1099
+ writer.writeString(
1100
+ 3,
1101
+ f
1102
+ );
1103
+ }
1096
1104
  f = /** @type {number} */ (jspb.Message.getField(message, 4));
1097
1105
  if (f != null) {
1098
1106
  writer.writeInt32(
@@ -1114,24 +1122,17 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1114
1122
  f
1115
1123
  );
1116
1124
  }
1117
- f = /** @type {string} */ (jspb.Message.getField(message, 7));
1118
- if (f != null) {
1119
- writer.writeString(
1120
- 7,
1121
- f
1122
- );
1123
- }
1124
- f = /** @type {number} */ (jspb.Message.getField(message, 8));
1125
+ f = /** @type {number} */ (jspb.Message.getField(message, 7));
1125
1126
  if (f != null) {
1126
1127
  writer.writeInt32(
1127
- 8,
1128
+ 7,
1128
1129
  f
1129
1130
  );
1130
1131
  }
1131
1132
  f = message.getFile();
1132
1133
  if (f != null) {
1133
1134
  writer.writeMessage(
1134
- 9,
1135
+ 8,
1135
1136
  f,
1136
1137
  proto.game.File.serializeBinaryToWriter
1137
1138
  );
@@ -1140,11 +1141,11 @@ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1140
1141
 
1141
1142
 
1142
1143
  /**
1143
- * optional string title = 2;
1144
+ * optional string title = 1;
1144
1145
  * @return {string}
1145
1146
  */
1146
1147
  proto.game.CategoryRequest.prototype.getTitle = function() {
1147
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1148
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1148
1149
  };
1149
1150
 
1150
1151
 
@@ -1153,7 +1154,7 @@ proto.game.CategoryRequest.prototype.getTitle = function() {
1153
1154
  * @return {!proto.game.CategoryRequest} returns this
1154
1155
  */
1155
1156
  proto.game.CategoryRequest.prototype.setTitle = function(value) {
1156
- return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1157
+ return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], value);
1157
1158
  };
1158
1159
 
1159
1160
 
@@ -1162,7 +1163,7 @@ proto.game.CategoryRequest.prototype.setTitle = function(value) {
1162
1163
  * @return {!proto.game.CategoryRequest} returns this
1163
1164
  */
1164
1165
  proto.game.CategoryRequest.prototype.clearTitle = function() {
1165
- return jspb.Message.setOneofField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1166
+ return jspb.Message.setOneofField(this, 1, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1166
1167
  };
1167
1168
 
1168
1169
 
@@ -1171,17 +1172,17 @@ proto.game.CategoryRequest.prototype.clearTitle = function() {
1171
1172
  * @return {boolean}
1172
1173
  */
1173
1174
  proto.game.CategoryRequest.prototype.hasTitle = function() {
1174
- return jspb.Message.getField(this, 2) != null;
1175
+ return jspb.Message.getField(this, 1) != null;
1175
1176
  };
1176
1177
 
1177
1178
 
1178
1179
  /**
1179
- * optional MetaDataFile metadata = 3;
1180
+ * optional MetaDataFile metadata = 2;
1180
1181
  * @return {?proto.game.MetaDataFile}
1181
1182
  */
1182
1183
  proto.game.CategoryRequest.prototype.getMetadata = function() {
1183
1184
  return /** @type{?proto.game.MetaDataFile} */ (
1184
- jspb.Message.getWrapperField(this, proto.game.MetaDataFile, 3));
1185
+ jspb.Message.getWrapperField(this, proto.game.MetaDataFile, 2));
1185
1186
  };
1186
1187
 
1187
1188
 
@@ -1190,7 +1191,7 @@ proto.game.CategoryRequest.prototype.getMetadata = function() {
1190
1191
  * @return {!proto.game.CategoryRequest} returns this
1191
1192
  */
1192
1193
  proto.game.CategoryRequest.prototype.setMetadata = function(value) {
1193
- return jspb.Message.setOneofWrapperField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], value);
1194
+ return jspb.Message.setOneofWrapperField(this, 2, proto.game.CategoryRequest.oneofGroups_[0], value);
1194
1195
  };
1195
1196
 
1196
1197
 
@@ -1208,25 +1209,25 @@ proto.game.CategoryRequest.prototype.clearMetadata = function() {
1208
1209
  * @return {boolean}
1209
1210
  */
1210
1211
  proto.game.CategoryRequest.prototype.hasMetadata = function() {
1211
- return jspb.Message.getField(this, 3) != null;
1212
+ return jspb.Message.getField(this, 2) != null;
1212
1213
  };
1213
1214
 
1214
1215
 
1215
1216
  /**
1216
- * optional int32 category_id = 4;
1217
- * @return {number}
1217
+ * optional string slug = 3;
1218
+ * @return {string}
1218
1219
  */
1219
- proto.game.CategoryRequest.prototype.getCategoryId = function() {
1220
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1220
+ proto.game.CategoryRequest.prototype.getSlug = function() {
1221
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1221
1222
  };
1222
1223
 
1223
1224
 
1224
1225
  /**
1225
- * @param {number} value
1226
+ * @param {string} value
1226
1227
  * @return {!proto.game.CategoryRequest} returns this
1227
1228
  */
1228
- proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1229
- return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], value);
1229
+ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1230
+ return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], value);
1230
1231
  };
1231
1232
 
1232
1233
 
@@ -1234,8 +1235,8 @@ proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1234
1235
  * Clears the field making it undefined.
1235
1236
  * @return {!proto.game.CategoryRequest} returns this
1236
1237
  */
1237
- proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1238
- return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1238
+ proto.game.CategoryRequest.prototype.clearSlug = function() {
1239
+ return jspb.Message.setOneofField(this, 3, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1239
1240
  };
1240
1241
 
1241
1242
 
@@ -1243,17 +1244,17 @@ proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1243
1244
  * Returns whether this field is set.
1244
1245
  * @return {boolean}
1245
1246
  */
1246
- proto.game.CategoryRequest.prototype.hasCategoryId = function() {
1247
- return jspb.Message.getField(this, 4) != null;
1247
+ proto.game.CategoryRequest.prototype.hasSlug = function() {
1248
+ return jspb.Message.getField(this, 3) != null;
1248
1249
  };
1249
1250
 
1250
1251
 
1251
1252
  /**
1252
- * optional int32 id = 5;
1253
+ * optional int32 category_id = 4;
1253
1254
  * @return {number}
1254
1255
  */
1255
- proto.game.CategoryRequest.prototype.getId = function() {
1256
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1256
+ proto.game.CategoryRequest.prototype.getCategoryId = function() {
1257
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1257
1258
  };
1258
1259
 
1259
1260
 
@@ -1261,53 +1262,53 @@ proto.game.CategoryRequest.prototype.getId = function() {
1261
1262
  * @param {number} value
1262
1263
  * @return {!proto.game.CategoryRequest} returns this
1263
1264
  */
1264
- proto.game.CategoryRequest.prototype.setId = function(value) {
1265
- return jspb.Message.setProto3IntField(this, 5, value);
1265
+ proto.game.CategoryRequest.prototype.setCategoryId = function(value) {
1266
+ return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], value);
1266
1267
  };
1267
1268
 
1268
1269
 
1269
1270
  /**
1270
- * optional string slug = 6;
1271
- * @return {string}
1271
+ * Clears the field making it undefined.
1272
+ * @return {!proto.game.CategoryRequest} returns this
1272
1273
  */
1273
- proto.game.CategoryRequest.prototype.getSlug = function() {
1274
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1274
+ proto.game.CategoryRequest.prototype.clearCategoryId = function() {
1275
+ return jspb.Message.setOneofField(this, 4, proto.game.CategoryRequest.oneofGroups_[0], undefined);
1275
1276
  };
1276
1277
 
1277
1278
 
1278
1279
  /**
1279
- * @param {string} value
1280
- * @return {!proto.game.CategoryRequest} returns this
1280
+ * Returns whether this field is set.
1281
+ * @return {boolean}
1281
1282
  */
1282
- proto.game.CategoryRequest.prototype.setSlug = function(value) {
1283
- return jspb.Message.setField(this, 6, value);
1283
+ proto.game.CategoryRequest.prototype.hasCategoryId = function() {
1284
+ return jspb.Message.getField(this, 4) != null;
1284
1285
  };
1285
1286
 
1286
1287
 
1287
1288
  /**
1288
- * Clears the field making it undefined.
1289
- * @return {!proto.game.CategoryRequest} returns this
1289
+ * optional int32 id = 5;
1290
+ * @return {number}
1290
1291
  */
1291
- proto.game.CategoryRequest.prototype.clearSlug = function() {
1292
- return jspb.Message.setField(this, 6, undefined);
1292
+ proto.game.CategoryRequest.prototype.getId = function() {
1293
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1293
1294
  };
1294
1295
 
1295
1296
 
1296
1297
  /**
1297
- * Returns whether this field is set.
1298
- * @return {boolean}
1298
+ * @param {number} value
1299
+ * @return {!proto.game.CategoryRequest} returns this
1299
1300
  */
1300
- proto.game.CategoryRequest.prototype.hasSlug = function() {
1301
- return jspb.Message.getField(this, 6) != null;
1301
+ proto.game.CategoryRequest.prototype.setId = function(value) {
1302
+ return jspb.Message.setProto3IntField(this, 5, value);
1302
1303
  };
1303
1304
 
1304
1305
 
1305
1306
  /**
1306
- * optional string description = 7;
1307
+ * optional string description = 6;
1307
1308
  * @return {string}
1308
1309
  */
1309
1310
  proto.game.CategoryRequest.prototype.getDescription = function() {
1310
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1311
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1311
1312
  };
1312
1313
 
1313
1314
 
@@ -1316,7 +1317,7 @@ proto.game.CategoryRequest.prototype.getDescription = function() {
1316
1317
  * @return {!proto.game.CategoryRequest} returns this
1317
1318
  */
1318
1319
  proto.game.CategoryRequest.prototype.setDescription = function(value) {
1319
- return jspb.Message.setField(this, 7, value);
1320
+ return jspb.Message.setField(this, 6, value);
1320
1321
  };
1321
1322
 
1322
1323
 
@@ -1325,7 +1326,7 @@ proto.game.CategoryRequest.prototype.setDescription = function(value) {
1325
1326
  * @return {!proto.game.CategoryRequest} returns this
1326
1327
  */
1327
1328
  proto.game.CategoryRequest.prototype.clearDescription = function() {
1328
- return jspb.Message.setField(this, 7, undefined);
1329
+ return jspb.Message.setField(this, 6, undefined);
1329
1330
  };
1330
1331
 
1331
1332
 
@@ -1334,16 +1335,16 @@ proto.game.CategoryRequest.prototype.clearDescription = function() {
1334
1335
  * @return {boolean}
1335
1336
  */
1336
1337
  proto.game.CategoryRequest.prototype.hasDescription = function() {
1337
- return jspb.Message.getField(this, 7) != null;
1338
+ return jspb.Message.getField(this, 6) != null;
1338
1339
  };
1339
1340
 
1340
1341
 
1341
1342
  /**
1342
- * optional int32 is_active = 8;
1343
+ * optional int32 is_active = 7;
1343
1344
  * @return {number}
1344
1345
  */
1345
1346
  proto.game.CategoryRequest.prototype.getIsActive = function() {
1346
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1347
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1347
1348
  };
1348
1349
 
1349
1350
 
@@ -1352,7 +1353,7 @@ proto.game.CategoryRequest.prototype.getIsActive = function() {
1352
1353
  * @return {!proto.game.CategoryRequest} returns this
1353
1354
  */
1354
1355
  proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1355
- return jspb.Message.setField(this, 8, value);
1356
+ return jspb.Message.setField(this, 7, value);
1356
1357
  };
1357
1358
 
1358
1359
 
@@ -1361,7 +1362,7 @@ proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1361
1362
  * @return {!proto.game.CategoryRequest} returns this
1362
1363
  */
1363
1364
  proto.game.CategoryRequest.prototype.clearIsActive = function() {
1364
- return jspb.Message.setField(this, 8, undefined);
1365
+ return jspb.Message.setField(this, 7, undefined);
1365
1366
  };
1366
1367
 
1367
1368
 
@@ -1370,17 +1371,17 @@ proto.game.CategoryRequest.prototype.clearIsActive = function() {
1370
1371
  * @return {boolean}
1371
1372
  */
1372
1373
  proto.game.CategoryRequest.prototype.hasIsActive = function() {
1373
- return jspb.Message.getField(this, 8) != null;
1374
+ return jspb.Message.getField(this, 7) != null;
1374
1375
  };
1375
1376
 
1376
1377
 
1377
1378
  /**
1378
- * optional File file = 9;
1379
+ * optional File file = 8;
1379
1380
  * @return {?proto.game.File}
1380
1381
  */
1381
1382
  proto.game.CategoryRequest.prototype.getFile = function() {
1382
1383
  return /** @type{?proto.game.File} */ (
1383
- jspb.Message.getWrapperField(this, proto.game.File, 9));
1384
+ jspb.Message.getWrapperField(this, proto.game.File, 8));
1384
1385
  };
1385
1386
 
1386
1387
 
@@ -1389,7 +1390,7 @@ proto.game.CategoryRequest.prototype.getFile = function() {
1389
1390
  * @return {!proto.game.CategoryRequest} returns this
1390
1391
  */
1391
1392
  proto.game.CategoryRequest.prototype.setFile = function(value) {
1392
- return jspb.Message.setWrapperField(this, 9, value);
1393
+ return jspb.Message.setWrapperField(this, 8, value);
1393
1394
  };
1394
1395
 
1395
1396
 
@@ -1407,7 +1408,7 @@ proto.game.CategoryRequest.prototype.clearFile = function() {
1407
1408
  * @return {boolean}
1408
1409
  */
1409
1410
  proto.game.CategoryRequest.prototype.hasFile = function() {
1410
- return jspb.Message.getField(this, 9) != null;
1411
+ return jspb.Message.getField(this, 8) != null;
1411
1412
  };
1412
1413
 
1413
1414
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {