protobuf-platform 1.0.56 → 1.0.57

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
@@ -69,7 +69,7 @@ message CategoryStatusResponse {
69
69
  //Collection CRUD
70
70
  message CollectionItem {
71
71
  optional int32 id = 1;
72
- optional int32 category_id = 2;
72
+ optional CategoryItem category = 2;
73
73
  optional string title = 3;
74
74
  optional string slug = 4;
75
75
  optional string description = 5;
package/game/game_pb.js CHANGED
@@ -2927,7 +2927,7 @@ proto.game.CollectionItem.prototype.toObject = function(opt_includeInstance) {
2927
2927
  proto.game.CollectionItem.toObject = function(includeInstance, msg) {
2928
2928
  var f, obj = {
2929
2929
  id: jspb.Message.getFieldWithDefault(msg, 1, 0),
2930
- categoryId: jspb.Message.getFieldWithDefault(msg, 2, 0),
2930
+ category: (f = msg.getCategory()) && proto.game.CategoryItem.toObject(includeInstance, f),
2931
2931
  title: jspb.Message.getFieldWithDefault(msg, 3, ""),
2932
2932
  slug: jspb.Message.getFieldWithDefault(msg, 4, ""),
2933
2933
  description: jspb.Message.getFieldWithDefault(msg, 5, ""),
@@ -2974,8 +2974,9 @@ proto.game.CollectionItem.deserializeBinaryFromReader = function(msg, reader) {
2974
2974
  msg.setId(value);
2975
2975
  break;
2976
2976
  case 2:
2977
- var value = /** @type {number} */ (reader.readInt32());
2978
- msg.setCategoryId(value);
2977
+ var value = new proto.game.CategoryItem;
2978
+ reader.readMessage(value,proto.game.CategoryItem.deserializeBinaryFromReader);
2979
+ msg.setCategory(value);
2979
2980
  break;
2980
2981
  case 3:
2981
2982
  var value = /** @type {string} */ (reader.readString());
@@ -3033,11 +3034,12 @@ proto.game.CollectionItem.serializeBinaryToWriter = function(message, writer) {
3033
3034
  f
3034
3035
  );
3035
3036
  }
3036
- f = /** @type {number} */ (jspb.Message.getField(message, 2));
3037
+ f = message.getCategory();
3037
3038
  if (f != null) {
3038
- writer.writeInt32(
3039
+ writer.writeMessage(
3039
3040
  2,
3040
- f
3041
+ f,
3042
+ proto.game.CategoryItem.serializeBinaryToWriter
3041
3043
  );
3042
3044
  }
3043
3045
  f = /** @type {string} */ (jspb.Message.getField(message, 3));
@@ -3115,29 +3117,30 @@ proto.game.CollectionItem.prototype.hasId = function() {
3115
3117
 
3116
3118
 
3117
3119
  /**
3118
- * optional int32 category_id = 2;
3119
- * @return {number}
3120
+ * optional CategoryItem category = 2;
3121
+ * @return {?proto.game.CategoryItem}
3120
3122
  */
3121
- proto.game.CollectionItem.prototype.getCategoryId = function() {
3122
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3123
+ proto.game.CollectionItem.prototype.getCategory = function() {
3124
+ return /** @type{?proto.game.CategoryItem} */ (
3125
+ jspb.Message.getWrapperField(this, proto.game.CategoryItem, 2));
3123
3126
  };
3124
3127
 
3125
3128
 
3126
3129
  /**
3127
- * @param {number} value
3130
+ * @param {?proto.game.CategoryItem|undefined} value
3128
3131
  * @return {!proto.game.CollectionItem} returns this
3129
- */
3130
- proto.game.CollectionItem.prototype.setCategoryId = function(value) {
3131
- return jspb.Message.setField(this, 2, value);
3132
+ */
3133
+ proto.game.CollectionItem.prototype.setCategory = function(value) {
3134
+ return jspb.Message.setWrapperField(this, 2, value);
3132
3135
  };
3133
3136
 
3134
3137
 
3135
3138
  /**
3136
- * Clears the field making it undefined.
3139
+ * Clears the message field making it undefined.
3137
3140
  * @return {!proto.game.CollectionItem} returns this
3138
3141
  */
3139
- proto.game.CollectionItem.prototype.clearCategoryId = function() {
3140
- return jspb.Message.setField(this, 2, undefined);
3142
+ proto.game.CollectionItem.prototype.clearCategory = function() {
3143
+ return this.setCategory(undefined);
3141
3144
  };
3142
3145
 
3143
3146
 
@@ -3145,7 +3148,7 @@ proto.game.CollectionItem.prototype.clearCategoryId = function() {
3145
3148
  * Returns whether this field is set.
3146
3149
  * @return {boolean}
3147
3150
  */
3148
- proto.game.CollectionItem.prototype.hasCategoryId = function() {
3151
+ proto.game.CollectionItem.prototype.hasCategory = function() {
3149
3152
  return jspb.Message.getField(this, 2) != null;
3150
3153
  };
3151
3154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {