protobuf-platform 1.2.350 → 1.2.351

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/cms/cms.proto CHANGED
@@ -132,6 +132,7 @@ service CMS {
132
132
  rpc readListCustomWidgets(PaginationRequest) returns (CustomWidgetsItemsResponse);
133
133
  rpc updateCustomWidgetsInBunch(ItemsBunchRequest) returns (CustomWidgetStatusResponse);
134
134
  rpc readCustomWidgetForUser(GetCustomWidgetForUserRequest) returns (CustomWidgetResponse);
135
+ rpc updateCustomWidgetItemConfig(UpdateCustomWidgetItemConfigRequest) returns (CustomWidgetResponse);
135
136
  }
136
137
 
137
138
  message PingRequest { string ping = 1; }
@@ -660,6 +661,7 @@ message CustomWidgetRow {
660
661
  optional string item_type = 1; // validated against runtime customWidgetItems keys
661
662
  optional int32 priority_order = 2;
662
663
  optional string config = 3; // JSON string; item-type-specific settings
664
+ optional string item_key = 4; // stable row id; backend-generated when missing
663
665
  }
664
666
  message CustomWidgetItem {
665
667
  optional int32 id = 1;
@@ -692,6 +694,11 @@ message CustomWidgetsItemsResponse {
692
694
  message CustomWidgetStatusResponse {
693
695
  string status = 1;
694
696
  }
697
+ message UpdateCustomWidgetItemConfigRequest {
698
+ int32 custom_widget_id = 1;
699
+ string item_key = 2;
700
+ string config = 3;
701
+ }
695
702
  //Translations
696
703
  message TranslationItem {
697
704
  optional string geo = 1;
@@ -1225,6 +1225,17 @@ function deserialize_cms_TokenWidgetsItemsResponse(buffer_arg) {
1225
1225
  return cms_pb.TokenWidgetsItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
1226
1226
  }
1227
1227
 
1228
+ function serialize_cms_UpdateCustomWidgetItemConfigRequest(arg) {
1229
+ if (!(arg instanceof cms_pb.UpdateCustomWidgetItemConfigRequest)) {
1230
+ throw new Error('Expected argument of type cms.UpdateCustomWidgetItemConfigRequest');
1231
+ }
1232
+ return Buffer.from(arg.serializeBinary());
1233
+ }
1234
+
1235
+ function deserialize_cms_UpdateCustomWidgetItemConfigRequest(buffer_arg) {
1236
+ return cms_pb.UpdateCustomWidgetItemConfigRequest.deserializeBinary(new Uint8Array(buffer_arg));
1237
+ }
1238
+
1228
1239
  function serialize_cms_UserBannerGroupResponse(arg) {
1229
1240
  if (!(arg instanceof cms_pb.UserBannerGroupResponse)) {
1230
1241
  throw new Error('Expected argument of type cms.UserBannerGroupResponse');
@@ -2517,6 +2528,17 @@ createSingleCustomWidget: {
2517
2528
  responseSerialize: serialize_cms_CustomWidgetResponse,
2518
2529
  responseDeserialize: deserialize_cms_CustomWidgetResponse,
2519
2530
  },
2531
+ updateCustomWidgetItemConfig: {
2532
+ path: '/cms.CMS/updateCustomWidgetItemConfig',
2533
+ requestStream: false,
2534
+ responseStream: false,
2535
+ requestType: cms_pb.UpdateCustomWidgetItemConfigRequest,
2536
+ responseType: cms_pb.CustomWidgetResponse,
2537
+ requestSerialize: serialize_cms_UpdateCustomWidgetItemConfigRequest,
2538
+ requestDeserialize: deserialize_cms_UpdateCustomWidgetItemConfigRequest,
2539
+ responseSerialize: serialize_cms_CustomWidgetResponse,
2540
+ responseDeserialize: deserialize_cms_CustomWidgetResponse,
2541
+ },
2520
2542
  };
2521
2543
 
2522
2544
  exports.CMSClient = grpc.makeGenericClientConstructor(CMSService, 'CMS');
package/cms/cms_pb.js CHANGED
@@ -181,6 +181,7 @@ goog.exportSymbol('proto.cms.TokenWidgetResponse', null, global);
181
181
  goog.exportSymbol('proto.cms.TokenWidgetStatusResponse', null, global);
182
182
  goog.exportSymbol('proto.cms.TokenWidgetsItemsResponse', null, global);
183
183
  goog.exportSymbol('proto.cms.TranslationItem', null, global);
184
+ goog.exportSymbol('proto.cms.UpdateCustomWidgetItemConfigRequest', null, global);
184
185
  goog.exportSymbol('proto.cms.UserBannerGameImages', null, global);
185
186
  goog.exportSymbol('proto.cms.UserBannerGameItem', null, global);
186
187
  goog.exportSymbol('proto.cms.UserBannerGroupResponse', null, global);
@@ -2222,6 +2223,27 @@ if (goog.DEBUG && !COMPILED) {
2222
2223
  */
2223
2224
  proto.cms.CustomWidgetStatusResponse.displayName = 'proto.cms.CustomWidgetStatusResponse';
2224
2225
  }
2226
+ /**
2227
+ * Generated by JsPbCodeGenerator.
2228
+ * @param {Array=} opt_data Optional initial data array, typically from a
2229
+ * server response, or constructed directly in Javascript. The array is used
2230
+ * in place and becomes part of the constructed object. It is not cloned.
2231
+ * If no data is provided, the constructed object will be empty, but still
2232
+ * valid.
2233
+ * @extends {jspb.Message}
2234
+ * @constructor
2235
+ */
2236
+ proto.cms.UpdateCustomWidgetItemConfigRequest = function(opt_data) {
2237
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2238
+ };
2239
+ goog.inherits(proto.cms.UpdateCustomWidgetItemConfigRequest, jspb.Message);
2240
+ if (goog.DEBUG && !COMPILED) {
2241
+ /**
2242
+ * @public
2243
+ * @override
2244
+ */
2245
+ proto.cms.UpdateCustomWidgetItemConfigRequest.displayName = 'proto.cms.UpdateCustomWidgetItemConfigRequest';
2246
+ }
2225
2247
  /**
2226
2248
  * Generated by JsPbCodeGenerator.
2227
2249
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -27933,7 +27955,8 @@ proto.cms.CustomWidgetRow.toObject = function(includeInstance, msg) {
27933
27955
  var f, obj = {
27934
27956
  itemType: jspb.Message.getFieldWithDefault(msg, 1, ""),
27935
27957
  priorityOrder: jspb.Message.getFieldWithDefault(msg, 2, 0),
27936
- config: jspb.Message.getFieldWithDefault(msg, 3, "")
27958
+ config: jspb.Message.getFieldWithDefault(msg, 3, ""),
27959
+ itemKey: jspb.Message.getFieldWithDefault(msg, 4, "")
27937
27960
  };
27938
27961
 
27939
27962
  if (includeInstance) {
@@ -27982,6 +28005,10 @@ proto.cms.CustomWidgetRow.deserializeBinaryFromReader = function(msg, reader) {
27982
28005
  var value = /** @type {string} */ (reader.readString());
27983
28006
  msg.setConfig(value);
27984
28007
  break;
28008
+ case 4:
28009
+ var value = /** @type {string} */ (reader.readString());
28010
+ msg.setItemKey(value);
28011
+ break;
27985
28012
  default:
27986
28013
  reader.skipField();
27987
28014
  break;
@@ -28032,6 +28059,13 @@ proto.cms.CustomWidgetRow.serializeBinaryToWriter = function(message, writer) {
28032
28059
  f
28033
28060
  );
28034
28061
  }
28062
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
28063
+ if (f != null) {
28064
+ writer.writeString(
28065
+ 4,
28066
+ f
28067
+ );
28068
+ }
28035
28069
  };
28036
28070
 
28037
28071
 
@@ -28143,6 +28177,42 @@ proto.cms.CustomWidgetRow.prototype.hasConfig = function() {
28143
28177
  };
28144
28178
 
28145
28179
 
28180
+ /**
28181
+ * optional string item_key = 4;
28182
+ * @return {string}
28183
+ */
28184
+ proto.cms.CustomWidgetRow.prototype.getItemKey = function() {
28185
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
28186
+ };
28187
+
28188
+
28189
+ /**
28190
+ * @param {string} value
28191
+ * @return {!proto.cms.CustomWidgetRow} returns this
28192
+ */
28193
+ proto.cms.CustomWidgetRow.prototype.setItemKey = function(value) {
28194
+ return jspb.Message.setField(this, 4, value);
28195
+ };
28196
+
28197
+
28198
+ /**
28199
+ * Clears the field making it undefined.
28200
+ * @return {!proto.cms.CustomWidgetRow} returns this
28201
+ */
28202
+ proto.cms.CustomWidgetRow.prototype.clearItemKey = function() {
28203
+ return jspb.Message.setField(this, 4, undefined);
28204
+ };
28205
+
28206
+
28207
+ /**
28208
+ * Returns whether this field is set.
28209
+ * @return {boolean}
28210
+ */
28211
+ proto.cms.CustomWidgetRow.prototype.hasItemKey = function() {
28212
+ return jspb.Message.getField(this, 4) != null;
28213
+ };
28214
+
28215
+
28146
28216
 
28147
28217
  /**
28148
28218
  * List of repeated fields within this message type.
@@ -29632,6 +29702,196 @@ proto.cms.CustomWidgetStatusResponse.prototype.setStatus = function(value) {
29632
29702
 
29633
29703
 
29634
29704
 
29705
+ if (jspb.Message.GENERATE_TO_OBJECT) {
29706
+ /**
29707
+ * Creates an object representation of this proto.
29708
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
29709
+ * Optional fields that are not set will be set to undefined.
29710
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
29711
+ * For the list of reserved names please see:
29712
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
29713
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
29714
+ * JSPB instance for transitional soy proto support:
29715
+ * http://goto/soy-param-migration
29716
+ * @return {!Object}
29717
+ */
29718
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.toObject = function(opt_includeInstance) {
29719
+ return proto.cms.UpdateCustomWidgetItemConfigRequest.toObject(opt_includeInstance, this);
29720
+ };
29721
+
29722
+
29723
+ /**
29724
+ * Static version of the {@see toObject} method.
29725
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
29726
+ * the JSPB instance for transitional soy proto support:
29727
+ * http://goto/soy-param-migration
29728
+ * @param {!proto.cms.UpdateCustomWidgetItemConfigRequest} msg The msg instance to transform.
29729
+ * @return {!Object}
29730
+ * @suppress {unusedLocalVariables} f is only used for nested messages
29731
+ */
29732
+ proto.cms.UpdateCustomWidgetItemConfigRequest.toObject = function(includeInstance, msg) {
29733
+ var f, obj = {
29734
+ customWidgetId: jspb.Message.getFieldWithDefault(msg, 1, 0),
29735
+ itemKey: jspb.Message.getFieldWithDefault(msg, 2, ""),
29736
+ config: jspb.Message.getFieldWithDefault(msg, 3, "")
29737
+ };
29738
+
29739
+ if (includeInstance) {
29740
+ obj.$jspbMessageInstance = msg;
29741
+ }
29742
+ return obj;
29743
+ };
29744
+ }
29745
+
29746
+
29747
+ /**
29748
+ * Deserializes binary data (in protobuf wire format).
29749
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
29750
+ * @return {!proto.cms.UpdateCustomWidgetItemConfigRequest}
29751
+ */
29752
+ proto.cms.UpdateCustomWidgetItemConfigRequest.deserializeBinary = function(bytes) {
29753
+ var reader = new jspb.BinaryReader(bytes);
29754
+ var msg = new proto.cms.UpdateCustomWidgetItemConfigRequest;
29755
+ return proto.cms.UpdateCustomWidgetItemConfigRequest.deserializeBinaryFromReader(msg, reader);
29756
+ };
29757
+
29758
+
29759
+ /**
29760
+ * Deserializes binary data (in protobuf wire format) from the
29761
+ * given reader into the given message object.
29762
+ * @param {!proto.cms.UpdateCustomWidgetItemConfigRequest} msg The message object to deserialize into.
29763
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
29764
+ * @return {!proto.cms.UpdateCustomWidgetItemConfigRequest}
29765
+ */
29766
+ proto.cms.UpdateCustomWidgetItemConfigRequest.deserializeBinaryFromReader = function(msg, reader) {
29767
+ while (reader.nextField()) {
29768
+ if (reader.isEndGroup()) {
29769
+ break;
29770
+ }
29771
+ var field = reader.getFieldNumber();
29772
+ switch (field) {
29773
+ case 1:
29774
+ var value = /** @type {number} */ (reader.readInt32());
29775
+ msg.setCustomWidgetId(value);
29776
+ break;
29777
+ case 2:
29778
+ var value = /** @type {string} */ (reader.readString());
29779
+ msg.setItemKey(value);
29780
+ break;
29781
+ case 3:
29782
+ var value = /** @type {string} */ (reader.readString());
29783
+ msg.setConfig(value);
29784
+ break;
29785
+ default:
29786
+ reader.skipField();
29787
+ break;
29788
+ }
29789
+ }
29790
+ return msg;
29791
+ };
29792
+
29793
+
29794
+ /**
29795
+ * Serializes the message to binary data (in protobuf wire format).
29796
+ * @return {!Uint8Array}
29797
+ */
29798
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.serializeBinary = function() {
29799
+ var writer = new jspb.BinaryWriter();
29800
+ proto.cms.UpdateCustomWidgetItemConfigRequest.serializeBinaryToWriter(this, writer);
29801
+ return writer.getResultBuffer();
29802
+ };
29803
+
29804
+
29805
+ /**
29806
+ * Serializes the given message to binary data (in protobuf wire
29807
+ * format), writing to the given BinaryWriter.
29808
+ * @param {!proto.cms.UpdateCustomWidgetItemConfigRequest} message
29809
+ * @param {!jspb.BinaryWriter} writer
29810
+ * @suppress {unusedLocalVariables} f is only used for nested messages
29811
+ */
29812
+ proto.cms.UpdateCustomWidgetItemConfigRequest.serializeBinaryToWriter = function(message, writer) {
29813
+ var f = undefined;
29814
+ f = message.getCustomWidgetId();
29815
+ if (f !== 0) {
29816
+ writer.writeInt32(
29817
+ 1,
29818
+ f
29819
+ );
29820
+ }
29821
+ f = message.getItemKey();
29822
+ if (f.length > 0) {
29823
+ writer.writeString(
29824
+ 2,
29825
+ f
29826
+ );
29827
+ }
29828
+ f = message.getConfig();
29829
+ if (f.length > 0) {
29830
+ writer.writeString(
29831
+ 3,
29832
+ f
29833
+ );
29834
+ }
29835
+ };
29836
+
29837
+
29838
+ /**
29839
+ * optional int32 custom_widget_id = 1;
29840
+ * @return {number}
29841
+ */
29842
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.getCustomWidgetId = function() {
29843
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
29844
+ };
29845
+
29846
+
29847
+ /**
29848
+ * @param {number} value
29849
+ * @return {!proto.cms.UpdateCustomWidgetItemConfigRequest} returns this
29850
+ */
29851
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.setCustomWidgetId = function(value) {
29852
+ return jspb.Message.setProto3IntField(this, 1, value);
29853
+ };
29854
+
29855
+
29856
+ /**
29857
+ * optional string item_key = 2;
29858
+ * @return {string}
29859
+ */
29860
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.getItemKey = function() {
29861
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
29862
+ };
29863
+
29864
+
29865
+ /**
29866
+ * @param {string} value
29867
+ * @return {!proto.cms.UpdateCustomWidgetItemConfigRequest} returns this
29868
+ */
29869
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.setItemKey = function(value) {
29870
+ return jspb.Message.setProto3StringField(this, 2, value);
29871
+ };
29872
+
29873
+
29874
+ /**
29875
+ * optional string config = 3;
29876
+ * @return {string}
29877
+ */
29878
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.getConfig = function() {
29879
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
29880
+ };
29881
+
29882
+
29883
+ /**
29884
+ * @param {string} value
29885
+ * @return {!proto.cms.UpdateCustomWidgetItemConfigRequest} returns this
29886
+ */
29887
+ proto.cms.UpdateCustomWidgetItemConfigRequest.prototype.setConfig = function(value) {
29888
+ return jspb.Message.setProto3StringField(this, 3, value);
29889
+ };
29890
+
29891
+
29892
+
29893
+
29894
+
29635
29895
  if (jspb.Message.GENERATE_TO_OBJECT) {
29636
29896
  /**
29637
29897
  * Creates an object representation of this proto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.350",
3
+ "version": "1.2.351",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {