@juzi/wechaty-grpc 1.0.85 → 1.0.86
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 +46 -0
- package/dist/cjs/out/wechaty/puppet/message_pb.js +355 -0
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +37 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +57 -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 +9 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -1
- 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 +46 -0
- package/dist/esm/out/wechaty/puppet/message_pb.js +355 -0
- package/dist/esm/out/wechaty/puppet.openapi.yaml +37 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +57 -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 +9 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -1
- 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 +46 -0
- package/out/wechaty/puppet/message_pb.js +355 -0
- package/out/wechaty/puppet.openapi.yaml +37 -1
- package/out/wechaty/puppet.swagger.json +57 -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
|
@@ -493,6 +493,15 @@ Puppet.MessageSendChannel = {
|
|
|
493
493
|
responseType: wechaty_puppet_message_pb.MessageSendChannelResponse
|
|
494
494
|
};
|
|
495
495
|
|
|
496
|
+
Puppet.MessageSendPost = {
|
|
497
|
+
methodName: "MessageSendPost",
|
|
498
|
+
service: Puppet,
|
|
499
|
+
requestStream: false,
|
|
500
|
+
responseStream: false,
|
|
501
|
+
requestType: wechaty_puppet_message_pb.MessageSendPostRequest,
|
|
502
|
+
responseType: wechaty_puppet_message_pb.MessageSendPostResponse
|
|
503
|
+
};
|
|
504
|
+
|
|
496
505
|
Puppet.MessagePreview = {
|
|
497
506
|
methodName: "MessagePreview",
|
|
498
507
|
service: Puppet,
|
|
@@ -2597,6 +2606,37 @@ PuppetClient.prototype.messageSendChannel = function messageSendChannel(requestM
|
|
|
2597
2606
|
};
|
|
2598
2607
|
};
|
|
2599
2608
|
|
|
2609
|
+
PuppetClient.prototype.messageSendPost = function messageSendPost(requestMessage, metadata, callback) {
|
|
2610
|
+
if (arguments.length === 2) {
|
|
2611
|
+
callback = arguments[1];
|
|
2612
|
+
}
|
|
2613
|
+
var client = grpc.unary(Puppet.MessageSendPost, {
|
|
2614
|
+
request: requestMessage,
|
|
2615
|
+
host: this.serviceHost,
|
|
2616
|
+
metadata: metadata,
|
|
2617
|
+
transport: this.options.transport,
|
|
2618
|
+
debug: this.options.debug,
|
|
2619
|
+
onEnd: function (response) {
|
|
2620
|
+
if (callback) {
|
|
2621
|
+
if (response.status !== grpc.Code.OK) {
|
|
2622
|
+
var err = new Error(response.statusMessage);
|
|
2623
|
+
err.code = response.status;
|
|
2624
|
+
err.metadata = response.trailers;
|
|
2625
|
+
callback(err, null);
|
|
2626
|
+
} else {
|
|
2627
|
+
callback(null, response.message);
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
});
|
|
2632
|
+
return {
|
|
2633
|
+
cancel: function () {
|
|
2634
|
+
callback = null;
|
|
2635
|
+
client.close();
|
|
2636
|
+
}
|
|
2637
|
+
};
|
|
2638
|
+
};
|
|
2639
|
+
|
|
2600
2640
|
PuppetClient.prototype.messagePreview = function messagePreview(requestMessage, metadata, callback) {
|
|
2601
2641
|
if (arguments.length === 2) {
|
|
2602
2642
|
callback = arguments[1];
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED