@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.
Files changed (38) hide show
  1. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +46 -0
  2. package/dist/cjs/out/wechaty/puppet/message_pb.js +355 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +37 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +57 -1
  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 +9 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +6 -1
  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 +46 -0
  16. package/dist/esm/out/wechaty/puppet/message_pb.js +355 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +37 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +57 -1
  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 +9 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +6 -1
  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 +46 -0
  30. package/out/wechaty/puppet/message_pb.js +355 -0
  31. package/out/wechaty/puppet.openapi.yaml +37 -1
  32. package/out/wechaty/puppet.swagger.json +57 -1
  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
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.85",
3
+ "version": "1.0.86",
4
4
  "description": "gRPC for Wechaty",
5
5
  "type": "module",
6
6
  "exports": {
@@ -4,7 +4,7 @@
4
4
  import type { PackageJson } from 'type-fest'
5
5
  export const packageJson: PackageJson = {
6
6
  "name": "@juzi/wechaty-grpc",
7
- "version": "1.0.85",
7
+ "version": "1.0.86",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {