@juzi/wechaty-grpc 1.0.48 → 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.
- package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +91 -0
- package/dist/cjs/out/wechaty/puppet/message_pb.js +597 -0
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +53 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +78 -1
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
- package/dist/cjs/proto/wechaty/puppet/message.proto +28 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.js +5 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/out/wechaty/puppet/message_pb.d.ts +91 -0
- package/dist/esm/out/wechaty/puppet/message_pb.js +597 -0
- package/dist/esm/out/wechaty/puppet.openapi.yaml +53 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +78 -1
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
- package/dist/esm/proto/wechaty/puppet/message.proto +28 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -0
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/esm/tests/puppet-server-impl.js +5 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/message_pb.d.ts +91 -0
- package/out/wechaty/puppet/message_pb.js +597 -0
- package/out/wechaty/puppet.openapi.yaml +53 -1
- package/out/wechaty/puppet.swagger.json +78 -1
- package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/out/wechaty/puppet_grpc_pb.js +33 -0
- package/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/out/wechaty/puppet_pb_service.js +40 -0
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -31,8 +31,13 @@ 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
43
|
goog.exportSymbol('proto.wechaty.puppet.MessageChannelRequest', null, global);
|
|
@@ -912,6 +917,69 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
912
917
|
*/
|
|
913
918
|
proto.wechaty.puppet.CreateMessageBroadcastResponse.displayName = 'proto.wechaty.puppet.CreateMessageBroadcastResponse';
|
|
914
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
|
+
}
|
|
915
983
|
|
|
916
984
|
|
|
917
985
|
|
|
@@ -7616,6 +7684,516 @@ proto.wechaty.puppet.CreateMessageBroadcastResponse.prototype.setId = function(v
|
|
|
7616
7684
|
};
|
|
7617
7685
|
|
|
7618
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
|
+
|
|
7619
8197
|
/**
|
|
7620
8198
|
* @enum {number}
|
|
7621
8199
|
*/
|
|
@@ -7641,4 +8219,23 @@ proto.wechaty.puppet.MessageType = {
|
|
|
7641
8219
|
MESSAGE_TYPE_SYSTEM: 18
|
|
7642
8220
|
};
|
|
7643
8221
|
|
|
8222
|
+
/**
|
|
8223
|
+
* @enum {number}
|
|
8224
|
+
*/
|
|
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
|
|
8239
|
+
};
|
|
8240
|
+
|
|
7644
8241
|
goog.object.extend(exports, proto.wechaty.puppet);
|
|
@@ -9,7 +9,7 @@ info:
|
|
|
9
9
|
|
|
10
10
|
Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
|
|
11
11
|
top of the Wechaty Puppet Abstraction and the gRPC proto definition.
|
|
12
|
-
version: 1.0.
|
|
12
|
+
version: 1.0.49
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: 'https://github.com/wechaty/openapi'
|
|
@@ -990,6 +990,25 @@ paths:
|
|
|
990
990
|
$ref: '#/definitions/rpcStatus'
|
|
991
991
|
tags:
|
|
992
992
|
- Puppet
|
|
993
|
+
'/message/broadcast/{id}':
|
|
994
|
+
get:
|
|
995
|
+
operationId: Puppet_GetMessageBroadcastStatus
|
|
996
|
+
responses:
|
|
997
|
+
'200':
|
|
998
|
+
description: A successful response.
|
|
999
|
+
schema:
|
|
1000
|
+
$ref: '#/definitions/puppetGetMessageBroadcastStatusResponse'
|
|
1001
|
+
default:
|
|
1002
|
+
description: An unexpected error response.
|
|
1003
|
+
schema:
|
|
1004
|
+
$ref: '#/definitions/rpcStatus'
|
|
1005
|
+
parameters:
|
|
1006
|
+
- name: id
|
|
1007
|
+
in: path
|
|
1008
|
+
required: true
|
|
1009
|
+
type: string
|
|
1010
|
+
tags:
|
|
1011
|
+
- Puppet
|
|
993
1012
|
'/message/{id}':
|
|
994
1013
|
get:
|
|
995
1014
|
operationId: Puppet_MessagePayload
|
|
@@ -2179,6 +2198,30 @@ definitions:
|
|
|
2179
2198
|
'@type':
|
|
2180
2199
|
type: string
|
|
2181
2200
|
additionalProperties: {}
|
|
2201
|
+
puppetBroadcastStatus:
|
|
2202
|
+
type: string
|
|
2203
|
+
enum:
|
|
2204
|
+
- BROADCAST_STATUS_UNKNWON
|
|
2205
|
+
- BROADCAST_STATUS_SENDING
|
|
2206
|
+
- BROADCAST_STATUS_SENT
|
|
2207
|
+
default: BROADCAST_STATUS_UNKNWON
|
|
2208
|
+
puppetBroadcastTarget:
|
|
2209
|
+
type: object
|
|
2210
|
+
properties:
|
|
2211
|
+
contactId:
|
|
2212
|
+
type: string
|
|
2213
|
+
roomId:
|
|
2214
|
+
type: string
|
|
2215
|
+
status:
|
|
2216
|
+
$ref: '#/definitions/puppetBroadcastTargetStatus'
|
|
2217
|
+
puppetBroadcastTargetStatus:
|
|
2218
|
+
type: string
|
|
2219
|
+
enum:
|
|
2220
|
+
- BROADCAST_TARGET_STATUS_UNSENT
|
|
2221
|
+
- BROADCAST_TARGET_STATUS_SENT
|
|
2222
|
+
- BROADCAST_TARGET_STATUS_NOT_FROEND
|
|
2223
|
+
- BROADCAST_TARGET_STATUS_OCCUPIED
|
|
2224
|
+
default: BROADCAST_TARGET_STATUS_UNSENT
|
|
2182
2225
|
puppetChannelPayload:
|
|
2183
2226
|
type: object
|
|
2184
2227
|
properties:
|
|
@@ -2561,6 +2604,15 @@ definitions:
|
|
|
2561
2604
|
- FRIENDSHIP_TYPE_DELETE: 删除——主动删除好友时触发
|
|
2562
2605
|
- FRIENDSHIP_TYPE_REMOVED: 被删除——被他人删除好友时触发
|
|
2563
2606
|
title: 事件类型
|
|
2607
|
+
puppetGetMessageBroadcastStatusResponse:
|
|
2608
|
+
type: object
|
|
2609
|
+
properties:
|
|
2610
|
+
status:
|
|
2611
|
+
$ref: '#/definitions/puppetBroadcastStatus'
|
|
2612
|
+
detail:
|
|
2613
|
+
type: array
|
|
2614
|
+
items:
|
|
2615
|
+
$ref: '#/definitions/puppetBroadcastTarget'
|
|
2564
2616
|
puppetGetMessageBroadcastTargetResponse:
|
|
2565
2617
|
type: object
|
|
2566
2618
|
properties:
|