@juzi/wechaty-grpc 1.0.47 → 1.0.49

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.
Files changed (38) hide show
  1. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +88 -9
  2. package/dist/cjs/out/wechaty/puppet/message_pb.js +597 -40
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +53 -10
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +78 -13
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
  7. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
  8. package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
  9. package/dist/cjs/proto/wechaty/puppet/message.proto +29 -8
  10. package/dist/cjs/proto/wechaty/puppet.proto +6 -0
  11. package/dist/cjs/src/package-json.js +1 -1
  12. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  14. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  15. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +88 -9
  16. package/dist/esm/out/wechaty/puppet/message_pb.js +597 -40
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +53 -10
  18. package/dist/esm/out/wechaty/puppet.swagger.json +78 -13
  19. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
  21. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
  22. package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
  23. package/dist/esm/proto/wechaty/puppet/message.proto +29 -8
  24. package/dist/esm/proto/wechaty/puppet.proto +6 -0
  25. package/dist/esm/src/package-json.js +1 -1
  26. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  27. package/dist/esm/tests/puppet-server-impl.js +5 -0
  28. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  29. package/out/wechaty/puppet/message_pb.d.ts +88 -9
  30. package/out/wechaty/puppet/message_pb.js +597 -40
  31. package/out/wechaty/puppet.openapi.yaml +53 -10
  32. package/out/wechaty/puppet.swagger.json +78 -13
  33. package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  34. package/out/wechaty/puppet_grpc_pb.js +33 -0
  35. package/out/wechaty/puppet_pb_service.d.ts +19 -0
  36. package/out/wechaty/puppet_pb_service.js +40 -0
  37. package/package.json +1 -1
  38. package/src/package-json.ts +1 -1
@@ -31,11 +31,15 @@ var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
31
31
  goog.object.extend(proto, wechaty_puppet_channel_pb);
32
32
  var wechaty_puppet_post_pb = require('../../wechaty/puppet/post_pb.js');
33
33
  goog.object.extend(proto, wechaty_puppet_post_pb);
34
+ goog.exportSymbol('proto.wechaty.puppet.BroadcastStatus', null, global);
35
+ goog.exportSymbol('proto.wechaty.puppet.BroadcastTarget', null, global);
36
+ goog.exportSymbol('proto.wechaty.puppet.BroadcastTargetStatus', null, global);
34
37
  goog.exportSymbol('proto.wechaty.puppet.CreateMessageBroadcastRequest', null, global);
35
38
  goog.exportSymbol('proto.wechaty.puppet.CreateMessageBroadcastResponse', null, global);
39
+ goog.exportSymbol('proto.wechaty.puppet.GetMessageBroadcastStatusRequest', null, global);
40
+ goog.exportSymbol('proto.wechaty.puppet.GetMessageBroadcastStatusResponse', null, global);
36
41
  goog.exportSymbol('proto.wechaty.puppet.GetMessageBroadcastTargetRequest', null, global);
37
42
  goog.exportSymbol('proto.wechaty.puppet.GetMessageBroadcastTargetResponse', null, global);
38
- goog.exportSymbol('proto.wechaty.puppet.MessageBroadcastTargetType', null, global);
39
43
  goog.exportSymbol('proto.wechaty.puppet.MessageChannelRequest', null, global);
40
44
  goog.exportSymbol('proto.wechaty.puppet.MessageChannelResponse', null, global);
41
45
  goog.exportSymbol('proto.wechaty.puppet.MessageContactRequest', null, global);
@@ -913,6 +917,69 @@ if (goog.DEBUG && !COMPILED) {
913
917
  */
914
918
  proto.wechaty.puppet.CreateMessageBroadcastResponse.displayName = 'proto.wechaty.puppet.CreateMessageBroadcastResponse';
915
919
  }
920
+ /**
921
+ * Generated by JsPbCodeGenerator.
922
+ * @param {Array=} opt_data Optional initial data array, typically from a
923
+ * server response, or constructed directly in Javascript. The array is used
924
+ * in place and becomes part of the constructed object. It is not cloned.
925
+ * If no data is provided, the constructed object will be empty, but still
926
+ * valid.
927
+ * @extends {jspb.Message}
928
+ * @constructor
929
+ */
930
+ proto.wechaty.puppet.BroadcastTarget = function(opt_data) {
931
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
932
+ };
933
+ goog.inherits(proto.wechaty.puppet.BroadcastTarget, jspb.Message);
934
+ if (goog.DEBUG && !COMPILED) {
935
+ /**
936
+ * @public
937
+ * @override
938
+ */
939
+ proto.wechaty.puppet.BroadcastTarget.displayName = 'proto.wechaty.puppet.BroadcastTarget';
940
+ }
941
+ /**
942
+ * Generated by JsPbCodeGenerator.
943
+ * @param {Array=} opt_data Optional initial data array, typically from a
944
+ * server response, or constructed directly in Javascript. The array is used
945
+ * in place and becomes part of the constructed object. It is not cloned.
946
+ * If no data is provided, the constructed object will be empty, but still
947
+ * valid.
948
+ * @extends {jspb.Message}
949
+ * @constructor
950
+ */
951
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest = function(opt_data) {
952
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
953
+ };
954
+ goog.inherits(proto.wechaty.puppet.GetMessageBroadcastStatusRequest, jspb.Message);
955
+ if (goog.DEBUG && !COMPILED) {
956
+ /**
957
+ * @public
958
+ * @override
959
+ */
960
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.displayName = 'proto.wechaty.puppet.GetMessageBroadcastStatusRequest';
961
+ }
962
+ /**
963
+ * Generated by JsPbCodeGenerator.
964
+ * @param {Array=} opt_data Optional initial data array, typically from a
965
+ * server response, or constructed directly in Javascript. The array is used
966
+ * in place and becomes part of the constructed object. It is not cloned.
967
+ * If no data is provided, the constructed object will be empty, but still
968
+ * valid.
969
+ * @extends {jspb.Message}
970
+ * @constructor
971
+ */
972
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse = function(opt_data) {
973
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.GetMessageBroadcastStatusResponse.repeatedFields_, null);
974
+ };
975
+ goog.inherits(proto.wechaty.puppet.GetMessageBroadcastStatusResponse, jspb.Message);
976
+ if (goog.DEBUG && !COMPILED) {
977
+ /**
978
+ * @public
979
+ * @override
980
+ */
981
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.displayName = 'proto.wechaty.puppet.GetMessageBroadcastStatusResponse';
982
+ }
916
983
 
917
984
 
918
985
 
@@ -7320,7 +7387,6 @@ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.toObject = function
7320
7387
  proto.wechaty.puppet.CreateMessageBroadcastRequest.toObject = function(includeInstance, msg) {
7321
7388
  var f, obj = {
7322
7389
  targetIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
7323
- type: jspb.Message.getFieldWithDefault(msg, 2, 0),
7324
7390
  content: (f = msg.getContent()) && wechaty_puppet_post_pb.PostPayloadClient.toObject(includeInstance, f)
7325
7391
  };
7326
7392
 
@@ -7363,10 +7429,6 @@ proto.wechaty.puppet.CreateMessageBroadcastRequest.deserializeBinaryFromReader =
7363
7429
  msg.addTargetIds(value);
7364
7430
  break;
7365
7431
  case 2:
7366
- var value = /** @type {!proto.wechaty.puppet.MessageBroadcastTargetType} */ (reader.readEnum());
7367
- msg.setType(value);
7368
- break;
7369
- case 3:
7370
7432
  var value = new wechaty_puppet_post_pb.PostPayloadClient;
7371
7433
  reader.readMessage(value,wechaty_puppet_post_pb.PostPayloadClient.deserializeBinaryFromReader);
7372
7434
  msg.setContent(value);
@@ -7407,17 +7469,10 @@ proto.wechaty.puppet.CreateMessageBroadcastRequest.serializeBinaryToWriter = fun
7407
7469
  f
7408
7470
  );
7409
7471
  }
7410
- f = message.getType();
7411
- if (f !== 0.0) {
7412
- writer.writeEnum(
7413
- 2,
7414
- f
7415
- );
7416
- }
7417
7472
  f = message.getContent();
7418
7473
  if (f != null) {
7419
7474
  writer.writeMessage(
7420
- 3,
7475
+ 2,
7421
7476
  f,
7422
7477
  wechaty_puppet_post_pb.PostPayloadClient.serializeBinaryToWriter
7423
7478
  );
@@ -7463,30 +7518,12 @@ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.clearTargetIdsList
7463
7518
 
7464
7519
 
7465
7520
  /**
7466
- * optional MessageBroadcastTargetType type = 2;
7467
- * @return {!proto.wechaty.puppet.MessageBroadcastTargetType}
7468
- */
7469
- proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.getType = function() {
7470
- return /** @type {!proto.wechaty.puppet.MessageBroadcastTargetType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
7471
- };
7472
-
7473
-
7474
- /**
7475
- * @param {!proto.wechaty.puppet.MessageBroadcastTargetType} value
7476
- * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7477
- */
7478
- proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.setType = function(value) {
7479
- return jspb.Message.setProto3EnumField(this, 2, value);
7480
- };
7481
-
7482
-
7483
- /**
7484
- * optional PostPayloadClient content = 3;
7521
+ * optional PostPayloadClient content = 2;
7485
7522
  * @return {?proto.wechaty.puppet.PostPayloadClient}
7486
7523
  */
7487
7524
  proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.getContent = function() {
7488
7525
  return /** @type{?proto.wechaty.puppet.PostPayloadClient} */ (
7489
- jspb.Message.getWrapperField(this, wechaty_puppet_post_pb.PostPayloadClient, 3));
7526
+ jspb.Message.getWrapperField(this, wechaty_puppet_post_pb.PostPayloadClient, 2));
7490
7527
  };
7491
7528
 
7492
7529
 
@@ -7495,7 +7532,7 @@ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.getContent = functi
7495
7532
  * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7496
7533
  */
7497
7534
  proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.setContent = function(value) {
7498
- return jspb.Message.setWrapperField(this, 3, value);
7535
+ return jspb.Message.setWrapperField(this, 2, value);
7499
7536
  };
7500
7537
 
7501
7538
 
@@ -7513,7 +7550,7 @@ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.clearContent = func
7513
7550
  * @return {boolean}
7514
7551
  */
7515
7552
  proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.hasContent = function() {
7516
- return jspb.Message.getField(this, 3) != null;
7553
+ return jspb.Message.getField(this, 2) != null;
7517
7554
  };
7518
7555
 
7519
7556
 
@@ -7647,6 +7684,516 @@ proto.wechaty.puppet.CreateMessageBroadcastResponse.prototype.setId = function(v
7647
7684
  };
7648
7685
 
7649
7686
 
7687
+
7688
+
7689
+
7690
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7691
+ /**
7692
+ * Creates an object representation of this proto.
7693
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7694
+ * Optional fields that are not set will be set to undefined.
7695
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7696
+ * For the list of reserved names please see:
7697
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7698
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7699
+ * JSPB instance for transitional soy proto support:
7700
+ * http://goto/soy-param-migration
7701
+ * @return {!Object}
7702
+ */
7703
+ proto.wechaty.puppet.BroadcastTarget.prototype.toObject = function(opt_includeInstance) {
7704
+ return proto.wechaty.puppet.BroadcastTarget.toObject(opt_includeInstance, this);
7705
+ };
7706
+
7707
+
7708
+ /**
7709
+ * Static version of the {@see toObject} method.
7710
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7711
+ * the JSPB instance for transitional soy proto support:
7712
+ * http://goto/soy-param-migration
7713
+ * @param {!proto.wechaty.puppet.BroadcastTarget} msg The msg instance to transform.
7714
+ * @return {!Object}
7715
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7716
+ */
7717
+ proto.wechaty.puppet.BroadcastTarget.toObject = function(includeInstance, msg) {
7718
+ var f, obj = {
7719
+ contactId: jspb.Message.getFieldWithDefault(msg, 1, ""),
7720
+ roomId: jspb.Message.getFieldWithDefault(msg, 2, ""),
7721
+ status: jspb.Message.getFieldWithDefault(msg, 3, 0)
7722
+ };
7723
+
7724
+ if (includeInstance) {
7725
+ obj.$jspbMessageInstance = msg;
7726
+ }
7727
+ return obj;
7728
+ };
7729
+ }
7730
+
7731
+
7732
+ /**
7733
+ * Deserializes binary data (in protobuf wire format).
7734
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7735
+ * @return {!proto.wechaty.puppet.BroadcastTarget}
7736
+ */
7737
+ proto.wechaty.puppet.BroadcastTarget.deserializeBinary = function(bytes) {
7738
+ var reader = new jspb.BinaryReader(bytes);
7739
+ var msg = new proto.wechaty.puppet.BroadcastTarget;
7740
+ return proto.wechaty.puppet.BroadcastTarget.deserializeBinaryFromReader(msg, reader);
7741
+ };
7742
+
7743
+
7744
+ /**
7745
+ * Deserializes binary data (in protobuf wire format) from the
7746
+ * given reader into the given message object.
7747
+ * @param {!proto.wechaty.puppet.BroadcastTarget} msg The message object to deserialize into.
7748
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7749
+ * @return {!proto.wechaty.puppet.BroadcastTarget}
7750
+ */
7751
+ proto.wechaty.puppet.BroadcastTarget.deserializeBinaryFromReader = function(msg, reader) {
7752
+ while (reader.nextField()) {
7753
+ if (reader.isEndGroup()) {
7754
+ break;
7755
+ }
7756
+ var field = reader.getFieldNumber();
7757
+ switch (field) {
7758
+ case 1:
7759
+ var value = /** @type {string} */ (reader.readString());
7760
+ msg.setContactId(value);
7761
+ break;
7762
+ case 2:
7763
+ var value = /** @type {string} */ (reader.readString());
7764
+ msg.setRoomId(value);
7765
+ break;
7766
+ case 3:
7767
+ var value = /** @type {!proto.wechaty.puppet.BroadcastTargetStatus} */ (reader.readEnum());
7768
+ msg.setStatus(value);
7769
+ break;
7770
+ default:
7771
+ reader.skipField();
7772
+ break;
7773
+ }
7774
+ }
7775
+ return msg;
7776
+ };
7777
+
7778
+
7779
+ /**
7780
+ * Serializes the message to binary data (in protobuf wire format).
7781
+ * @return {!Uint8Array}
7782
+ */
7783
+ proto.wechaty.puppet.BroadcastTarget.prototype.serializeBinary = function() {
7784
+ var writer = new jspb.BinaryWriter();
7785
+ proto.wechaty.puppet.BroadcastTarget.serializeBinaryToWriter(this, writer);
7786
+ return writer.getResultBuffer();
7787
+ };
7788
+
7789
+
7790
+ /**
7791
+ * Serializes the given message to binary data (in protobuf wire
7792
+ * format), writing to the given BinaryWriter.
7793
+ * @param {!proto.wechaty.puppet.BroadcastTarget} message
7794
+ * @param {!jspb.BinaryWriter} writer
7795
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7796
+ */
7797
+ proto.wechaty.puppet.BroadcastTarget.serializeBinaryToWriter = function(message, writer) {
7798
+ var f = undefined;
7799
+ f = message.getContactId();
7800
+ if (f.length > 0) {
7801
+ writer.writeString(
7802
+ 1,
7803
+ f
7804
+ );
7805
+ }
7806
+ f = message.getRoomId();
7807
+ if (f.length > 0) {
7808
+ writer.writeString(
7809
+ 2,
7810
+ f
7811
+ );
7812
+ }
7813
+ f = message.getStatus();
7814
+ if (f !== 0.0) {
7815
+ writer.writeEnum(
7816
+ 3,
7817
+ f
7818
+ );
7819
+ }
7820
+ };
7821
+
7822
+
7823
+ /**
7824
+ * optional string contact_id = 1;
7825
+ * @return {string}
7826
+ */
7827
+ proto.wechaty.puppet.BroadcastTarget.prototype.getContactId = function() {
7828
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
7829
+ };
7830
+
7831
+
7832
+ /**
7833
+ * @param {string} value
7834
+ * @return {!proto.wechaty.puppet.BroadcastTarget} returns this
7835
+ */
7836
+ proto.wechaty.puppet.BroadcastTarget.prototype.setContactId = function(value) {
7837
+ return jspb.Message.setProto3StringField(this, 1, value);
7838
+ };
7839
+
7840
+
7841
+ /**
7842
+ * optional string room_id = 2;
7843
+ * @return {string}
7844
+ */
7845
+ proto.wechaty.puppet.BroadcastTarget.prototype.getRoomId = function() {
7846
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
7847
+ };
7848
+
7849
+
7850
+ /**
7851
+ * @param {string} value
7852
+ * @return {!proto.wechaty.puppet.BroadcastTarget} returns this
7853
+ */
7854
+ proto.wechaty.puppet.BroadcastTarget.prototype.setRoomId = function(value) {
7855
+ return jspb.Message.setProto3StringField(this, 2, value);
7856
+ };
7857
+
7858
+
7859
+ /**
7860
+ * optional BroadcastTargetStatus status = 3;
7861
+ * @return {!proto.wechaty.puppet.BroadcastTargetStatus}
7862
+ */
7863
+ proto.wechaty.puppet.BroadcastTarget.prototype.getStatus = function() {
7864
+ return /** @type {!proto.wechaty.puppet.BroadcastTargetStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
7865
+ };
7866
+
7867
+
7868
+ /**
7869
+ * @param {!proto.wechaty.puppet.BroadcastTargetStatus} value
7870
+ * @return {!proto.wechaty.puppet.BroadcastTarget} returns this
7871
+ */
7872
+ proto.wechaty.puppet.BroadcastTarget.prototype.setStatus = function(value) {
7873
+ return jspb.Message.setProto3EnumField(this, 3, value);
7874
+ };
7875
+
7876
+
7877
+
7878
+
7879
+
7880
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7881
+ /**
7882
+ * Creates an object representation of this proto.
7883
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7884
+ * Optional fields that are not set will be set to undefined.
7885
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7886
+ * For the list of reserved names please see:
7887
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7888
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7889
+ * JSPB instance for transitional soy proto support:
7890
+ * http://goto/soy-param-migration
7891
+ * @return {!Object}
7892
+ */
7893
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.prototype.toObject = function(opt_includeInstance) {
7894
+ return proto.wechaty.puppet.GetMessageBroadcastStatusRequest.toObject(opt_includeInstance, this);
7895
+ };
7896
+
7897
+
7898
+ /**
7899
+ * Static version of the {@see toObject} method.
7900
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7901
+ * the JSPB instance for transitional soy proto support:
7902
+ * http://goto/soy-param-migration
7903
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastStatusRequest} msg The msg instance to transform.
7904
+ * @return {!Object}
7905
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7906
+ */
7907
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.toObject = function(includeInstance, msg) {
7908
+ var f, obj = {
7909
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
7910
+ };
7911
+
7912
+ if (includeInstance) {
7913
+ obj.$jspbMessageInstance = msg;
7914
+ }
7915
+ return obj;
7916
+ };
7917
+ }
7918
+
7919
+
7920
+ /**
7921
+ * Deserializes binary data (in protobuf wire format).
7922
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7923
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusRequest}
7924
+ */
7925
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.deserializeBinary = function(bytes) {
7926
+ var reader = new jspb.BinaryReader(bytes);
7927
+ var msg = new proto.wechaty.puppet.GetMessageBroadcastStatusRequest;
7928
+ return proto.wechaty.puppet.GetMessageBroadcastStatusRequest.deserializeBinaryFromReader(msg, reader);
7929
+ };
7930
+
7931
+
7932
+ /**
7933
+ * Deserializes binary data (in protobuf wire format) from the
7934
+ * given reader into the given message object.
7935
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastStatusRequest} msg The message object to deserialize into.
7936
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7937
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusRequest}
7938
+ */
7939
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.deserializeBinaryFromReader = function(msg, reader) {
7940
+ while (reader.nextField()) {
7941
+ if (reader.isEndGroup()) {
7942
+ break;
7943
+ }
7944
+ var field = reader.getFieldNumber();
7945
+ switch (field) {
7946
+ case 1:
7947
+ var value = /** @type {string} */ (reader.readString());
7948
+ msg.setId(value);
7949
+ break;
7950
+ default:
7951
+ reader.skipField();
7952
+ break;
7953
+ }
7954
+ }
7955
+ return msg;
7956
+ };
7957
+
7958
+
7959
+ /**
7960
+ * Serializes the message to binary data (in protobuf wire format).
7961
+ * @return {!Uint8Array}
7962
+ */
7963
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.prototype.serializeBinary = function() {
7964
+ var writer = new jspb.BinaryWriter();
7965
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.serializeBinaryToWriter(this, writer);
7966
+ return writer.getResultBuffer();
7967
+ };
7968
+
7969
+
7970
+ /**
7971
+ * Serializes the given message to binary data (in protobuf wire
7972
+ * format), writing to the given BinaryWriter.
7973
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastStatusRequest} message
7974
+ * @param {!jspb.BinaryWriter} writer
7975
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7976
+ */
7977
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.serializeBinaryToWriter = function(message, writer) {
7978
+ var f = undefined;
7979
+ f = message.getId();
7980
+ if (f.length > 0) {
7981
+ writer.writeString(
7982
+ 1,
7983
+ f
7984
+ );
7985
+ }
7986
+ };
7987
+
7988
+
7989
+ /**
7990
+ * optional string id = 1;
7991
+ * @return {string}
7992
+ */
7993
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.prototype.getId = function() {
7994
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
7995
+ };
7996
+
7997
+
7998
+ /**
7999
+ * @param {string} value
8000
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusRequest} returns this
8001
+ */
8002
+ proto.wechaty.puppet.GetMessageBroadcastStatusRequest.prototype.setId = function(value) {
8003
+ return jspb.Message.setProto3StringField(this, 1, value);
8004
+ };
8005
+
8006
+
8007
+
8008
+ /**
8009
+ * List of repeated fields within this message type.
8010
+ * @private {!Array<number>}
8011
+ * @const
8012
+ */
8013
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.repeatedFields_ = [2];
8014
+
8015
+
8016
+
8017
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8018
+ /**
8019
+ * Creates an object representation of this proto.
8020
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8021
+ * Optional fields that are not set will be set to undefined.
8022
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8023
+ * For the list of reserved names please see:
8024
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8025
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8026
+ * JSPB instance for transitional soy proto support:
8027
+ * http://goto/soy-param-migration
8028
+ * @return {!Object}
8029
+ */
8030
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.toObject = function(opt_includeInstance) {
8031
+ return proto.wechaty.puppet.GetMessageBroadcastStatusResponse.toObject(opt_includeInstance, this);
8032
+ };
8033
+
8034
+
8035
+ /**
8036
+ * Static version of the {@see toObject} method.
8037
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8038
+ * the JSPB instance for transitional soy proto support:
8039
+ * http://goto/soy-param-migration
8040
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse} msg The msg instance to transform.
8041
+ * @return {!Object}
8042
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8043
+ */
8044
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.toObject = function(includeInstance, msg) {
8045
+ var f, obj = {
8046
+ status: jspb.Message.getFieldWithDefault(msg, 1, 0),
8047
+ detailList: jspb.Message.toObjectList(msg.getDetailList(),
8048
+ proto.wechaty.puppet.BroadcastTarget.toObject, includeInstance)
8049
+ };
8050
+
8051
+ if (includeInstance) {
8052
+ obj.$jspbMessageInstance = msg;
8053
+ }
8054
+ return obj;
8055
+ };
8056
+ }
8057
+
8058
+
8059
+ /**
8060
+ * Deserializes binary data (in protobuf wire format).
8061
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
8062
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse}
8063
+ */
8064
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.deserializeBinary = function(bytes) {
8065
+ var reader = new jspb.BinaryReader(bytes);
8066
+ var msg = new proto.wechaty.puppet.GetMessageBroadcastStatusResponse;
8067
+ return proto.wechaty.puppet.GetMessageBroadcastStatusResponse.deserializeBinaryFromReader(msg, reader);
8068
+ };
8069
+
8070
+
8071
+ /**
8072
+ * Deserializes binary data (in protobuf wire format) from the
8073
+ * given reader into the given message object.
8074
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse} msg The message object to deserialize into.
8075
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
8076
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse}
8077
+ */
8078
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
8079
+ while (reader.nextField()) {
8080
+ if (reader.isEndGroup()) {
8081
+ break;
8082
+ }
8083
+ var field = reader.getFieldNumber();
8084
+ switch (field) {
8085
+ case 1:
8086
+ var value = /** @type {!proto.wechaty.puppet.BroadcastStatus} */ (reader.readEnum());
8087
+ msg.setStatus(value);
8088
+ break;
8089
+ case 2:
8090
+ var value = new proto.wechaty.puppet.BroadcastTarget;
8091
+ reader.readMessage(value,proto.wechaty.puppet.BroadcastTarget.deserializeBinaryFromReader);
8092
+ msg.addDetail(value);
8093
+ break;
8094
+ default:
8095
+ reader.skipField();
8096
+ break;
8097
+ }
8098
+ }
8099
+ return msg;
8100
+ };
8101
+
8102
+
8103
+ /**
8104
+ * Serializes the message to binary data (in protobuf wire format).
8105
+ * @return {!Uint8Array}
8106
+ */
8107
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.serializeBinary = function() {
8108
+ var writer = new jspb.BinaryWriter();
8109
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.serializeBinaryToWriter(this, writer);
8110
+ return writer.getResultBuffer();
8111
+ };
8112
+
8113
+
8114
+ /**
8115
+ * Serializes the given message to binary data (in protobuf wire
8116
+ * format), writing to the given BinaryWriter.
8117
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse} message
8118
+ * @param {!jspb.BinaryWriter} writer
8119
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8120
+ */
8121
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.serializeBinaryToWriter = function(message, writer) {
8122
+ var f = undefined;
8123
+ f = message.getStatus();
8124
+ if (f !== 0.0) {
8125
+ writer.writeEnum(
8126
+ 1,
8127
+ f
8128
+ );
8129
+ }
8130
+ f = message.getDetailList();
8131
+ if (f.length > 0) {
8132
+ writer.writeRepeatedMessage(
8133
+ 2,
8134
+ f,
8135
+ proto.wechaty.puppet.BroadcastTarget.serializeBinaryToWriter
8136
+ );
8137
+ }
8138
+ };
8139
+
8140
+
8141
+ /**
8142
+ * optional BroadcastStatus status = 1;
8143
+ * @return {!proto.wechaty.puppet.BroadcastStatus}
8144
+ */
8145
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.getStatus = function() {
8146
+ return /** @type {!proto.wechaty.puppet.BroadcastStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
8147
+ };
8148
+
8149
+
8150
+ /**
8151
+ * @param {!proto.wechaty.puppet.BroadcastStatus} value
8152
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse} returns this
8153
+ */
8154
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.setStatus = function(value) {
8155
+ return jspb.Message.setProto3EnumField(this, 1, value);
8156
+ };
8157
+
8158
+
8159
+ /**
8160
+ * repeated BroadcastTarget detail = 2;
8161
+ * @return {!Array<!proto.wechaty.puppet.BroadcastTarget>}
8162
+ */
8163
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.getDetailList = function() {
8164
+ return /** @type{!Array<!proto.wechaty.puppet.BroadcastTarget>} */ (
8165
+ jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.BroadcastTarget, 2));
8166
+ };
8167
+
8168
+
8169
+ /**
8170
+ * @param {!Array<!proto.wechaty.puppet.BroadcastTarget>} value
8171
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse} returns this
8172
+ */
8173
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.setDetailList = function(value) {
8174
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
8175
+ };
8176
+
8177
+
8178
+ /**
8179
+ * @param {!proto.wechaty.puppet.BroadcastTarget=} opt_value
8180
+ * @param {number=} opt_index
8181
+ * @return {!proto.wechaty.puppet.BroadcastTarget}
8182
+ */
8183
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.addDetail = function(opt_value, opt_index) {
8184
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.wechaty.puppet.BroadcastTarget, opt_index);
8185
+ };
8186
+
8187
+
8188
+ /**
8189
+ * Clears the list making it empty but non-null.
8190
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastStatusResponse} returns this
8191
+ */
8192
+ proto.wechaty.puppet.GetMessageBroadcastStatusResponse.prototype.clearDetailList = function() {
8193
+ return this.setDetailList([]);
8194
+ };
8195
+
8196
+
7650
8197
  /**
7651
8198
  * @enum {number}
7652
8199
  */
@@ -7675,10 +8222,20 @@ proto.wechaty.puppet.MessageType = {
7675
8222
  /**
7676
8223
  * @enum {number}
7677
8224
  */
7678
- proto.wechaty.puppet.MessageBroadcastTargetType = {
7679
- MESSAGE_BROADCAST_TARGET_TYPE_UNKNOWN: 0,
7680
- MESSAGE_BROADCAST_TARGET_TYPE_CONTACT: 1,
7681
- MESSAGE_BROADCAST_TARGET_TYPE_ROOM: 2
8225
+ proto.wechaty.puppet.BroadcastStatus = {
8226
+ BROADCAST_STATUS_UNKNWON: 0,
8227
+ BROADCAST_STATUS_SENDING: 1,
8228
+ BROADCAST_STATUS_SENT: 2
8229
+ };
8230
+
8231
+ /**
8232
+ * @enum {number}
8233
+ */
8234
+ proto.wechaty.puppet.BroadcastTargetStatus = {
8235
+ BROADCAST_TARGET_STATUS_UNSENT: 0,
8236
+ BROADCAST_TARGET_STATUS_SENT: 1,
8237
+ BROADCAST_TARGET_STATUS_NOT_FROEND: 2,
8238
+ BROADCAST_TARGET_STATUS_OCCUPIED: 3
7682
8239
  };
7683
8240
 
7684
8241
  goog.object.extend(exports, proto.wechaty.puppet);