@juzi/wechaty-grpc 1.0.43 → 1.0.44

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 (42) hide show
  1. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +105 -0
  2. package/dist/cjs/out/wechaty/puppet/message_pb.js +794 -21
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +69 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +106 -1
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
  7. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
  8. package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
  9. package/dist/cjs/proto/wechaty/puppet/message.proto +25 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +13 -0
  11. package/dist/cjs/src/package-json.d.ts.map +1 -1
  12. package/dist/cjs/src/package-json.js +3 -2
  13. package/dist/cjs/src/package-json.js.map +1 -1
  14. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  15. package/dist/cjs/tests/puppet-server-impl.js +10 -0
  16. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  17. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +105 -0
  18. package/dist/esm/out/wechaty/puppet/message_pb.js +794 -21
  19. package/dist/esm/out/wechaty/puppet.openapi.yaml +69 -1
  20. package/dist/esm/out/wechaty/puppet.swagger.json +106 -1
  21. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  22. package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
  23. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
  24. package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
  25. package/dist/esm/proto/wechaty/puppet/message.proto +25 -0
  26. package/dist/esm/proto/wechaty/puppet.proto +13 -0
  27. package/dist/esm/src/package-json.d.ts.map +1 -1
  28. package/dist/esm/src/package-json.js +3 -2
  29. package/dist/esm/src/package-json.js.map +1 -1
  30. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  31. package/dist/esm/tests/puppet-server-impl.js +10 -0
  32. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  33. package/out/wechaty/puppet/message_pb.d.ts +105 -0
  34. package/out/wechaty/puppet/message_pb.js +794 -21
  35. package/out/wechaty/puppet.openapi.yaml +69 -1
  36. package/out/wechaty/puppet.swagger.json +106 -1
  37. package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  38. package/out/wechaty/puppet_grpc_pb.js +66 -0
  39. package/out/wechaty/puppet_pb_service.d.ts +38 -0
  40. package/out/wechaty/puppet_pb_service.js +80 -0
  41. package/package.json +3 -2
  42. package/src/package-json.ts +3 -2
@@ -29,6 +29,13 @@ var wechaty_puppet_url$link_pb = require('../../wechaty/puppet/url-link_pb.js');
29
29
  goog.object.extend(proto, wechaty_puppet_url$link_pb);
30
30
  var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
31
31
  goog.object.extend(proto, wechaty_puppet_channel_pb);
32
+ var wechaty_puppet_post_pb = require('../../wechaty/puppet/post_pb.js');
33
+ goog.object.extend(proto, wechaty_puppet_post_pb);
34
+ goog.exportSymbol('proto.wechaty.puppet.CreateMessageBroadcastRequest', null, global);
35
+ goog.exportSymbol('proto.wechaty.puppet.CreateMessageBroadcastResponse', null, global);
36
+ goog.exportSymbol('proto.wechaty.puppet.GetMessageBroadcastTargetRequest', null, global);
37
+ goog.exportSymbol('proto.wechaty.puppet.GetMessageBroadcastTargetResponse', null, global);
38
+ goog.exportSymbol('proto.wechaty.puppet.MessageBroadcastTargetType', null, global);
32
39
  goog.exportSymbol('proto.wechaty.puppet.MessageChannelRequest', null, global);
33
40
  goog.exportSymbol('proto.wechaty.puppet.MessageChannelResponse', null, global);
34
41
  goog.exportSymbol('proto.wechaty.puppet.MessageContactRequest', null, global);
@@ -822,6 +829,90 @@ if (goog.DEBUG && !COMPILED) {
822
829
  */
823
830
  proto.wechaty.puppet.MessagePreviewResponse.displayName = 'proto.wechaty.puppet.MessagePreviewResponse';
824
831
  }
832
+ /**
833
+ * Generated by JsPbCodeGenerator.
834
+ * @param {Array=} opt_data Optional initial data array, typically from a
835
+ * server response, or constructed directly in Javascript. The array is used
836
+ * in place and becomes part of the constructed object. It is not cloned.
837
+ * If no data is provided, the constructed object will be empty, but still
838
+ * valid.
839
+ * @extends {jspb.Message}
840
+ * @constructor
841
+ */
842
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest = function(opt_data) {
843
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
844
+ };
845
+ goog.inherits(proto.wechaty.puppet.GetMessageBroadcastTargetRequest, jspb.Message);
846
+ if (goog.DEBUG && !COMPILED) {
847
+ /**
848
+ * @public
849
+ * @override
850
+ */
851
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.displayName = 'proto.wechaty.puppet.GetMessageBroadcastTargetRequest';
852
+ }
853
+ /**
854
+ * Generated by JsPbCodeGenerator.
855
+ * @param {Array=} opt_data Optional initial data array, typically from a
856
+ * server response, or constructed directly in Javascript. The array is used
857
+ * in place and becomes part of the constructed object. It is not cloned.
858
+ * If no data is provided, the constructed object will be empty, but still
859
+ * valid.
860
+ * @extends {jspb.Message}
861
+ * @constructor
862
+ */
863
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse = function(opt_data) {
864
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.GetMessageBroadcastTargetResponse.repeatedFields_, null);
865
+ };
866
+ goog.inherits(proto.wechaty.puppet.GetMessageBroadcastTargetResponse, jspb.Message);
867
+ if (goog.DEBUG && !COMPILED) {
868
+ /**
869
+ * @public
870
+ * @override
871
+ */
872
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.displayName = 'proto.wechaty.puppet.GetMessageBroadcastTargetResponse';
873
+ }
874
+ /**
875
+ * Generated by JsPbCodeGenerator.
876
+ * @param {Array=} opt_data Optional initial data array, typically from a
877
+ * server response, or constructed directly in Javascript. The array is used
878
+ * in place and becomes part of the constructed object. It is not cloned.
879
+ * If no data is provided, the constructed object will be empty, but still
880
+ * valid.
881
+ * @extends {jspb.Message}
882
+ * @constructor
883
+ */
884
+ proto.wechaty.puppet.CreateMessageBroadcastRequest = function(opt_data) {
885
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.CreateMessageBroadcastRequest.repeatedFields_, null);
886
+ };
887
+ goog.inherits(proto.wechaty.puppet.CreateMessageBroadcastRequest, jspb.Message);
888
+ if (goog.DEBUG && !COMPILED) {
889
+ /**
890
+ * @public
891
+ * @override
892
+ */
893
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.displayName = 'proto.wechaty.puppet.CreateMessageBroadcastRequest';
894
+ }
895
+ /**
896
+ * Generated by JsPbCodeGenerator.
897
+ * @param {Array=} opt_data Optional initial data array, typically from a
898
+ * server response, or constructed directly in Javascript. The array is used
899
+ * in place and becomes part of the constructed object. It is not cloned.
900
+ * If no data is provided, the constructed object will be empty, but still
901
+ * valid.
902
+ * @extends {jspb.Message}
903
+ * @constructor
904
+ */
905
+ proto.wechaty.puppet.CreateMessageBroadcastResponse = function(opt_data) {
906
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
907
+ };
908
+ goog.inherits(proto.wechaty.puppet.CreateMessageBroadcastResponse, jspb.Message);
909
+ if (goog.DEBUG && !COMPILED) {
910
+ /**
911
+ * @public
912
+ * @override
913
+ */
914
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.displayName = 'proto.wechaty.puppet.CreateMessageBroadcastResponse';
915
+ }
825
916
 
826
917
 
827
918
 
@@ -6883,29 +6974,711 @@ proto.wechaty.puppet.MessagePreviewResponse.prototype.setFileBox = function(valu
6883
6974
  };
6884
6975
 
6885
6976
 
6977
+
6978
+
6979
+
6980
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6886
6981
  /**
6887
- * @enum {number}
6982
+ * Creates an object representation of this proto.
6983
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6984
+ * Optional fields that are not set will be set to undefined.
6985
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6986
+ * For the list of reserved names please see:
6987
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6988
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6989
+ * JSPB instance for transitional soy proto support:
6990
+ * http://goto/soy-param-migration
6991
+ * @return {!Object}
6888
6992
  */
6889
- proto.wechaty.puppet.MessageType = {
6890
- MESSAGE_TYPE_UNSPECIFIED: 0,
6891
- MESSAGE_TYPE_ATTACHMENT: 1,
6892
- MESSAGE_TYPE_AUDIO: 2,
6893
- MESSAGE_TYPE_CONTACT: 3,
6894
- MESSAGE_TYPE_CHAT_HISTORY: 4,
6895
- MESSAGE_TYPE_EMOTCION: 5,
6896
- MESSAGE_TYPE_IMAGE: 6,
6897
- MESSAGE_TYPE_TEXT: 7,
6898
- MESSAGE_TYPE_LOCATION: 8,
6899
- MESSAGE_TYPE_MINI_PROGRAM: 9,
6900
- MESSAGE_TYPE_GROUP_NOTE: 10,
6901
- MESSAGE_TYPE_TRANSFER: 11,
6902
- MESSAGE_TYPE_RED_ENVELOPE: 12,
6903
- MESSAGE_TYPE_RECALLED: 13,
6904
- MESSAGE_TYPE_URL: 14,
6905
- MESSAGE_TYPE_VIDEO: 15,
6906
- MESSAGE_TYPE_POST: 16,
6907
- MESSAGE_TYPE_CHANNEL: 17,
6908
- MESSAGE_TYPE_SYSTEM: 18
6993
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.prototype.toObject = function(opt_includeInstance) {
6994
+ return proto.wechaty.puppet.GetMessageBroadcastTargetRequest.toObject(opt_includeInstance, this);
6995
+ };
6996
+
6997
+
6998
+ /**
6999
+ * Static version of the {@see toObject} method.
7000
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7001
+ * the JSPB instance for transitional soy proto support:
7002
+ * http://goto/soy-param-migration
7003
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastTargetRequest} msg The msg instance to transform.
7004
+ * @return {!Object}
7005
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7006
+ */
7007
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.toObject = function(includeInstance, msg) {
7008
+ var f, obj = {
7009
+
7010
+ };
7011
+
7012
+ if (includeInstance) {
7013
+ obj.$jspbMessageInstance = msg;
7014
+ }
7015
+ return obj;
7016
+ };
7017
+ }
7018
+
7019
+
7020
+ /**
7021
+ * Deserializes binary data (in protobuf wire format).
7022
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7023
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetRequest}
7024
+ */
7025
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.deserializeBinary = function(bytes) {
7026
+ var reader = new jspb.BinaryReader(bytes);
7027
+ var msg = new proto.wechaty.puppet.GetMessageBroadcastTargetRequest;
7028
+ return proto.wechaty.puppet.GetMessageBroadcastTargetRequest.deserializeBinaryFromReader(msg, reader);
7029
+ };
7030
+
7031
+
7032
+ /**
7033
+ * Deserializes binary data (in protobuf wire format) from the
7034
+ * given reader into the given message object.
7035
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastTargetRequest} msg The message object to deserialize into.
7036
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7037
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetRequest}
7038
+ */
7039
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.deserializeBinaryFromReader = function(msg, reader) {
7040
+ while (reader.nextField()) {
7041
+ if (reader.isEndGroup()) {
7042
+ break;
7043
+ }
7044
+ var field = reader.getFieldNumber();
7045
+ switch (field) {
7046
+ default:
7047
+ reader.skipField();
7048
+ break;
7049
+ }
7050
+ }
7051
+ return msg;
7052
+ };
7053
+
7054
+
7055
+ /**
7056
+ * Serializes the message to binary data (in protobuf wire format).
7057
+ * @return {!Uint8Array}
7058
+ */
7059
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.prototype.serializeBinary = function() {
7060
+ var writer = new jspb.BinaryWriter();
7061
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.serializeBinaryToWriter(this, writer);
7062
+ return writer.getResultBuffer();
7063
+ };
7064
+
7065
+
7066
+ /**
7067
+ * Serializes the given message to binary data (in protobuf wire
7068
+ * format), writing to the given BinaryWriter.
7069
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastTargetRequest} message
7070
+ * @param {!jspb.BinaryWriter} writer
7071
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7072
+ */
7073
+ proto.wechaty.puppet.GetMessageBroadcastTargetRequest.serializeBinaryToWriter = function(message, writer) {
7074
+ var f = undefined;
7075
+ };
7076
+
7077
+
7078
+
7079
+ /**
7080
+ * List of repeated fields within this message type.
7081
+ * @private {!Array<number>}
7082
+ * @const
7083
+ */
7084
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.repeatedFields_ = [1,2];
7085
+
7086
+
7087
+
7088
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7089
+ /**
7090
+ * Creates an object representation of this proto.
7091
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7092
+ * Optional fields that are not set will be set to undefined.
7093
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7094
+ * For the list of reserved names please see:
7095
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7096
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7097
+ * JSPB instance for transitional soy proto support:
7098
+ * http://goto/soy-param-migration
7099
+ * @return {!Object}
7100
+ */
7101
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.toObject = function(opt_includeInstance) {
7102
+ return proto.wechaty.puppet.GetMessageBroadcastTargetResponse.toObject(opt_includeInstance, this);
7103
+ };
7104
+
7105
+
7106
+ /**
7107
+ * Static version of the {@see toObject} method.
7108
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7109
+ * the JSPB instance for transitional soy proto support:
7110
+ * http://goto/soy-param-migration
7111
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} msg The msg instance to transform.
7112
+ * @return {!Object}
7113
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7114
+ */
7115
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.toObject = function(includeInstance, msg) {
7116
+ var f, obj = {
7117
+ contactIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
7118
+ roomIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
7119
+ };
7120
+
7121
+ if (includeInstance) {
7122
+ obj.$jspbMessageInstance = msg;
7123
+ }
7124
+ return obj;
7125
+ };
7126
+ }
7127
+
7128
+
7129
+ /**
7130
+ * Deserializes binary data (in protobuf wire format).
7131
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7132
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse}
7133
+ */
7134
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.deserializeBinary = function(bytes) {
7135
+ var reader = new jspb.BinaryReader(bytes);
7136
+ var msg = new proto.wechaty.puppet.GetMessageBroadcastTargetResponse;
7137
+ return proto.wechaty.puppet.GetMessageBroadcastTargetResponse.deserializeBinaryFromReader(msg, reader);
7138
+ };
7139
+
7140
+
7141
+ /**
7142
+ * Deserializes binary data (in protobuf wire format) from the
7143
+ * given reader into the given message object.
7144
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} msg The message object to deserialize into.
7145
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7146
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse}
7147
+ */
7148
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.deserializeBinaryFromReader = function(msg, reader) {
7149
+ while (reader.nextField()) {
7150
+ if (reader.isEndGroup()) {
7151
+ break;
7152
+ }
7153
+ var field = reader.getFieldNumber();
7154
+ switch (field) {
7155
+ case 1:
7156
+ var value = /** @type {string} */ (reader.readString());
7157
+ msg.addContactIds(value);
7158
+ break;
7159
+ case 2:
7160
+ var value = /** @type {string} */ (reader.readString());
7161
+ msg.addRoomIds(value);
7162
+ break;
7163
+ default:
7164
+ reader.skipField();
7165
+ break;
7166
+ }
7167
+ }
7168
+ return msg;
7169
+ };
7170
+
7171
+
7172
+ /**
7173
+ * Serializes the message to binary data (in protobuf wire format).
7174
+ * @return {!Uint8Array}
7175
+ */
7176
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.serializeBinary = function() {
7177
+ var writer = new jspb.BinaryWriter();
7178
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.serializeBinaryToWriter(this, writer);
7179
+ return writer.getResultBuffer();
7180
+ };
7181
+
7182
+
7183
+ /**
7184
+ * Serializes the given message to binary data (in protobuf wire
7185
+ * format), writing to the given BinaryWriter.
7186
+ * @param {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} message
7187
+ * @param {!jspb.BinaryWriter} writer
7188
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7189
+ */
7190
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.serializeBinaryToWriter = function(message, writer) {
7191
+ var f = undefined;
7192
+ f = message.getContactIdsList();
7193
+ if (f.length > 0) {
7194
+ writer.writeRepeatedString(
7195
+ 1,
7196
+ f
7197
+ );
7198
+ }
7199
+ f = message.getRoomIdsList();
7200
+ if (f.length > 0) {
7201
+ writer.writeRepeatedString(
7202
+ 2,
7203
+ f
7204
+ );
7205
+ }
7206
+ };
7207
+
7208
+
7209
+ /**
7210
+ * repeated string contact_ids = 1;
7211
+ * @return {!Array<string>}
7212
+ */
7213
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.getContactIdsList = function() {
7214
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
7215
+ };
7216
+
7217
+
7218
+ /**
7219
+ * @param {!Array<string>} value
7220
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} returns this
7221
+ */
7222
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.setContactIdsList = function(value) {
7223
+ return jspb.Message.setField(this, 1, value || []);
7224
+ };
7225
+
7226
+
7227
+ /**
7228
+ * @param {string} value
7229
+ * @param {number=} opt_index
7230
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} returns this
7231
+ */
7232
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.addContactIds = function(value, opt_index) {
7233
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
7234
+ };
7235
+
7236
+
7237
+ /**
7238
+ * Clears the list making it empty but non-null.
7239
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} returns this
7240
+ */
7241
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.clearContactIdsList = function() {
7242
+ return this.setContactIdsList([]);
7243
+ };
7244
+
7245
+
7246
+ /**
7247
+ * repeated string room_ids = 2;
7248
+ * @return {!Array<string>}
7249
+ */
7250
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.getRoomIdsList = function() {
7251
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
7252
+ };
7253
+
7254
+
7255
+ /**
7256
+ * @param {!Array<string>} value
7257
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} returns this
7258
+ */
7259
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.setRoomIdsList = function(value) {
7260
+ return jspb.Message.setField(this, 2, value || []);
7261
+ };
7262
+
7263
+
7264
+ /**
7265
+ * @param {string} value
7266
+ * @param {number=} opt_index
7267
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} returns this
7268
+ */
7269
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.addRoomIds = function(value, opt_index) {
7270
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
7271
+ };
7272
+
7273
+
7274
+ /**
7275
+ * Clears the list making it empty but non-null.
7276
+ * @return {!proto.wechaty.puppet.GetMessageBroadcastTargetResponse} returns this
7277
+ */
7278
+ proto.wechaty.puppet.GetMessageBroadcastTargetResponse.prototype.clearRoomIdsList = function() {
7279
+ return this.setRoomIdsList([]);
7280
+ };
7281
+
7282
+
7283
+
7284
+ /**
7285
+ * List of repeated fields within this message type.
7286
+ * @private {!Array<number>}
7287
+ * @const
7288
+ */
7289
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.repeatedFields_ = [1];
7290
+
7291
+
7292
+
7293
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7294
+ /**
7295
+ * Creates an object representation of this proto.
7296
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7297
+ * Optional fields that are not set will be set to undefined.
7298
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7299
+ * For the list of reserved names please see:
7300
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7301
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7302
+ * JSPB instance for transitional soy proto support:
7303
+ * http://goto/soy-param-migration
7304
+ * @return {!Object}
7305
+ */
7306
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.toObject = function(opt_includeInstance) {
7307
+ return proto.wechaty.puppet.CreateMessageBroadcastRequest.toObject(opt_includeInstance, this);
7308
+ };
7309
+
7310
+
7311
+ /**
7312
+ * Static version of the {@see toObject} method.
7313
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7314
+ * the JSPB instance for transitional soy proto support:
7315
+ * http://goto/soy-param-migration
7316
+ * @param {!proto.wechaty.puppet.CreateMessageBroadcastRequest} msg The msg instance to transform.
7317
+ * @return {!Object}
7318
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7319
+ */
7320
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.toObject = function(includeInstance, msg) {
7321
+ var f, obj = {
7322
+ targetIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
7323
+ type: jspb.Message.getFieldWithDefault(msg, 2, 0),
7324
+ content: (f = msg.getContent()) && wechaty_puppet_post_pb.PostPayloadClient.toObject(includeInstance, f)
7325
+ };
7326
+
7327
+ if (includeInstance) {
7328
+ obj.$jspbMessageInstance = msg;
7329
+ }
7330
+ return obj;
7331
+ };
7332
+ }
7333
+
7334
+
7335
+ /**
7336
+ * Deserializes binary data (in protobuf wire format).
7337
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7338
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest}
7339
+ */
7340
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.deserializeBinary = function(bytes) {
7341
+ var reader = new jspb.BinaryReader(bytes);
7342
+ var msg = new proto.wechaty.puppet.CreateMessageBroadcastRequest;
7343
+ return proto.wechaty.puppet.CreateMessageBroadcastRequest.deserializeBinaryFromReader(msg, reader);
7344
+ };
7345
+
7346
+
7347
+ /**
7348
+ * Deserializes binary data (in protobuf wire format) from the
7349
+ * given reader into the given message object.
7350
+ * @param {!proto.wechaty.puppet.CreateMessageBroadcastRequest} msg The message object to deserialize into.
7351
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7352
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest}
7353
+ */
7354
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.deserializeBinaryFromReader = function(msg, reader) {
7355
+ while (reader.nextField()) {
7356
+ if (reader.isEndGroup()) {
7357
+ break;
7358
+ }
7359
+ var field = reader.getFieldNumber();
7360
+ switch (field) {
7361
+ case 1:
7362
+ var value = /** @type {string} */ (reader.readString());
7363
+ msg.addTargetIds(value);
7364
+ break;
7365
+ case 2:
7366
+ var value = /** @type {!proto.wechaty.puppet.MessageBroadcastTargetType} */ (reader.readEnum());
7367
+ msg.setType(value);
7368
+ break;
7369
+ case 3:
7370
+ var value = new wechaty_puppet_post_pb.PostPayloadClient;
7371
+ reader.readMessage(value,wechaty_puppet_post_pb.PostPayloadClient.deserializeBinaryFromReader);
7372
+ msg.setContent(value);
7373
+ break;
7374
+ default:
7375
+ reader.skipField();
7376
+ break;
7377
+ }
7378
+ }
7379
+ return msg;
7380
+ };
7381
+
7382
+
7383
+ /**
7384
+ * Serializes the message to binary data (in protobuf wire format).
7385
+ * @return {!Uint8Array}
7386
+ */
7387
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.serializeBinary = function() {
7388
+ var writer = new jspb.BinaryWriter();
7389
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.serializeBinaryToWriter(this, writer);
7390
+ return writer.getResultBuffer();
7391
+ };
7392
+
7393
+
7394
+ /**
7395
+ * Serializes the given message to binary data (in protobuf wire
7396
+ * format), writing to the given BinaryWriter.
7397
+ * @param {!proto.wechaty.puppet.CreateMessageBroadcastRequest} message
7398
+ * @param {!jspb.BinaryWriter} writer
7399
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7400
+ */
7401
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.serializeBinaryToWriter = function(message, writer) {
7402
+ var f = undefined;
7403
+ f = message.getTargetIdsList();
7404
+ if (f.length > 0) {
7405
+ writer.writeRepeatedString(
7406
+ 1,
7407
+ f
7408
+ );
7409
+ }
7410
+ f = message.getType();
7411
+ if (f !== 0.0) {
7412
+ writer.writeEnum(
7413
+ 2,
7414
+ f
7415
+ );
7416
+ }
7417
+ f = message.getContent();
7418
+ if (f != null) {
7419
+ writer.writeMessage(
7420
+ 3,
7421
+ f,
7422
+ wechaty_puppet_post_pb.PostPayloadClient.serializeBinaryToWriter
7423
+ );
7424
+ }
7425
+ };
7426
+
7427
+
7428
+ /**
7429
+ * repeated string target_ids = 1;
7430
+ * @return {!Array<string>}
7431
+ */
7432
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.getTargetIdsList = function() {
7433
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
7434
+ };
7435
+
7436
+
7437
+ /**
7438
+ * @param {!Array<string>} value
7439
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7440
+ */
7441
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.setTargetIdsList = function(value) {
7442
+ return jspb.Message.setField(this, 1, value || []);
7443
+ };
7444
+
7445
+
7446
+ /**
7447
+ * @param {string} value
7448
+ * @param {number=} opt_index
7449
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7450
+ */
7451
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.addTargetIds = function(value, opt_index) {
7452
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
7453
+ };
7454
+
7455
+
7456
+ /**
7457
+ * Clears the list making it empty but non-null.
7458
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7459
+ */
7460
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.clearTargetIdsList = function() {
7461
+ return this.setTargetIdsList([]);
7462
+ };
7463
+
7464
+
7465
+ /**
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;
7485
+ * @return {?proto.wechaty.puppet.PostPayloadClient}
7486
+ */
7487
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.getContent = function() {
7488
+ return /** @type{?proto.wechaty.puppet.PostPayloadClient} */ (
7489
+ jspb.Message.getWrapperField(this, wechaty_puppet_post_pb.PostPayloadClient, 3));
7490
+ };
7491
+
7492
+
7493
+ /**
7494
+ * @param {?proto.wechaty.puppet.PostPayloadClient|undefined} value
7495
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7496
+ */
7497
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.setContent = function(value) {
7498
+ return jspb.Message.setWrapperField(this, 3, value);
7499
+ };
7500
+
7501
+
7502
+ /**
7503
+ * Clears the message field making it undefined.
7504
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastRequest} returns this
7505
+ */
7506
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.clearContent = function() {
7507
+ return this.setContent(undefined);
7508
+ };
7509
+
7510
+
7511
+ /**
7512
+ * Returns whether this field is set.
7513
+ * @return {boolean}
7514
+ */
7515
+ proto.wechaty.puppet.CreateMessageBroadcastRequest.prototype.hasContent = function() {
7516
+ return jspb.Message.getField(this, 3) != null;
7517
+ };
7518
+
7519
+
7520
+
7521
+
7522
+
7523
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7524
+ /**
7525
+ * Creates an object representation of this proto.
7526
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7527
+ * Optional fields that are not set will be set to undefined.
7528
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7529
+ * For the list of reserved names please see:
7530
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7531
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7532
+ * JSPB instance for transitional soy proto support:
7533
+ * http://goto/soy-param-migration
7534
+ * @return {!Object}
7535
+ */
7536
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.prototype.toObject = function(opt_includeInstance) {
7537
+ return proto.wechaty.puppet.CreateMessageBroadcastResponse.toObject(opt_includeInstance, this);
7538
+ };
7539
+
7540
+
7541
+ /**
7542
+ * Static version of the {@see toObject} method.
7543
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7544
+ * the JSPB instance for transitional soy proto support:
7545
+ * http://goto/soy-param-migration
7546
+ * @param {!proto.wechaty.puppet.CreateMessageBroadcastResponse} msg The msg instance to transform.
7547
+ * @return {!Object}
7548
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7549
+ */
7550
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.toObject = function(includeInstance, msg) {
7551
+ var f, obj = {
7552
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
7553
+ };
7554
+
7555
+ if (includeInstance) {
7556
+ obj.$jspbMessageInstance = msg;
7557
+ }
7558
+ return obj;
7559
+ };
7560
+ }
7561
+
7562
+
7563
+ /**
7564
+ * Deserializes binary data (in protobuf wire format).
7565
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7566
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastResponse}
7567
+ */
7568
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.deserializeBinary = function(bytes) {
7569
+ var reader = new jspb.BinaryReader(bytes);
7570
+ var msg = new proto.wechaty.puppet.CreateMessageBroadcastResponse;
7571
+ return proto.wechaty.puppet.CreateMessageBroadcastResponse.deserializeBinaryFromReader(msg, reader);
7572
+ };
7573
+
7574
+
7575
+ /**
7576
+ * Deserializes binary data (in protobuf wire format) from the
7577
+ * given reader into the given message object.
7578
+ * @param {!proto.wechaty.puppet.CreateMessageBroadcastResponse} msg The message object to deserialize into.
7579
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7580
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastResponse}
7581
+ */
7582
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.deserializeBinaryFromReader = function(msg, reader) {
7583
+ while (reader.nextField()) {
7584
+ if (reader.isEndGroup()) {
7585
+ break;
7586
+ }
7587
+ var field = reader.getFieldNumber();
7588
+ switch (field) {
7589
+ case 1:
7590
+ var value = /** @type {string} */ (reader.readString());
7591
+ msg.setId(value);
7592
+ break;
7593
+ default:
7594
+ reader.skipField();
7595
+ break;
7596
+ }
7597
+ }
7598
+ return msg;
7599
+ };
7600
+
7601
+
7602
+ /**
7603
+ * Serializes the message to binary data (in protobuf wire format).
7604
+ * @return {!Uint8Array}
7605
+ */
7606
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.prototype.serializeBinary = function() {
7607
+ var writer = new jspb.BinaryWriter();
7608
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.serializeBinaryToWriter(this, writer);
7609
+ return writer.getResultBuffer();
7610
+ };
7611
+
7612
+
7613
+ /**
7614
+ * Serializes the given message to binary data (in protobuf wire
7615
+ * format), writing to the given BinaryWriter.
7616
+ * @param {!proto.wechaty.puppet.CreateMessageBroadcastResponse} message
7617
+ * @param {!jspb.BinaryWriter} writer
7618
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7619
+ */
7620
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.serializeBinaryToWriter = function(message, writer) {
7621
+ var f = undefined;
7622
+ f = message.getId();
7623
+ if (f.length > 0) {
7624
+ writer.writeString(
7625
+ 1,
7626
+ f
7627
+ );
7628
+ }
7629
+ };
7630
+
7631
+
7632
+ /**
7633
+ * optional string id = 1;
7634
+ * @return {string}
7635
+ */
7636
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.prototype.getId = function() {
7637
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
7638
+ };
7639
+
7640
+
7641
+ /**
7642
+ * @param {string} value
7643
+ * @return {!proto.wechaty.puppet.CreateMessageBroadcastResponse} returns this
7644
+ */
7645
+ proto.wechaty.puppet.CreateMessageBroadcastResponse.prototype.setId = function(value) {
7646
+ return jspb.Message.setProto3StringField(this, 1, value);
7647
+ };
7648
+
7649
+
7650
+ /**
7651
+ * @enum {number}
7652
+ */
7653
+ proto.wechaty.puppet.MessageType = {
7654
+ MESSAGE_TYPE_UNSPECIFIED: 0,
7655
+ MESSAGE_TYPE_ATTACHMENT: 1,
7656
+ MESSAGE_TYPE_AUDIO: 2,
7657
+ MESSAGE_TYPE_CONTACT: 3,
7658
+ MESSAGE_TYPE_CHAT_HISTORY: 4,
7659
+ MESSAGE_TYPE_EMOTCION: 5,
7660
+ MESSAGE_TYPE_IMAGE: 6,
7661
+ MESSAGE_TYPE_TEXT: 7,
7662
+ MESSAGE_TYPE_LOCATION: 8,
7663
+ MESSAGE_TYPE_MINI_PROGRAM: 9,
7664
+ MESSAGE_TYPE_GROUP_NOTE: 10,
7665
+ MESSAGE_TYPE_TRANSFER: 11,
7666
+ MESSAGE_TYPE_RED_ENVELOPE: 12,
7667
+ MESSAGE_TYPE_RECALLED: 13,
7668
+ MESSAGE_TYPE_URL: 14,
7669
+ MESSAGE_TYPE_VIDEO: 15,
7670
+ MESSAGE_TYPE_POST: 16,
7671
+ MESSAGE_TYPE_CHANNEL: 17,
7672
+ MESSAGE_TYPE_SYSTEM: 18
7673
+ };
7674
+
7675
+ /**
7676
+ * @enum {number}
7677
+ */
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
6909
7682
  };
6910
7683
 
6911
7684
  goog.object.extend(exports, proto.wechaty.puppet);