@juzi/wechaty-grpc 1.0.25 → 1.0.26

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 (59) hide show
  1. package/dist/cjs/out/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +13 -0
  2. package/dist/cjs/out/protoc-gen-openapiv2/options/openapiv2_pb.js +118 -2
  3. package/dist/cjs/out/wechaty/puppet/conversation_grpc_pb.js +1 -0
  4. package/dist/cjs/out/wechaty/puppet/conversation_pb.d.ts +41 -0
  5. package/dist/cjs/out/wechaty/puppet/conversation_pb.js +293 -0
  6. package/dist/cjs/out/wechaty/puppet/conversation_pb_service.d.ts +3 -0
  7. package/dist/cjs/out/wechaty/puppet/conversation_pb_service.js +3 -0
  8. package/dist/cjs/out/wechaty/puppet.openapi.yaml +29 -1
  9. package/dist/cjs/out/wechaty/puppet.swagger.json +44 -1
  10. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  11. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +38 -0
  12. package/dist/cjs/out/wechaty/puppet_pb.d.ts +1 -0
  13. package/dist/cjs/out/wechaty/puppet_pb.js +2 -0
  14. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +20 -0
  15. package/dist/cjs/out/wechaty/puppet_pb_service.js +41 -0
  16. package/dist/cjs/proto/wechaty/puppet/conversation.proto +12 -0
  17. package/dist/cjs/proto/wechaty/puppet.proto +13 -0
  18. package/dist/cjs/src/package-json.js +1 -1
  19. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  20. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  21. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  22. package/dist/esm/out/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +13 -0
  23. package/dist/esm/out/protoc-gen-openapiv2/options/openapiv2_pb.js +118 -2
  24. package/dist/esm/out/wechaty/puppet/conversation_grpc_pb.js +1 -0
  25. package/dist/esm/out/wechaty/puppet/conversation_pb.d.ts +41 -0
  26. package/dist/esm/out/wechaty/puppet/conversation_pb.js +293 -0
  27. package/dist/esm/out/wechaty/puppet/conversation_pb_service.d.ts +3 -0
  28. package/dist/esm/out/wechaty/puppet/conversation_pb_service.js +3 -0
  29. package/dist/esm/out/wechaty/puppet.openapi.yaml +29 -1
  30. package/dist/esm/out/wechaty/puppet.swagger.json +44 -1
  31. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  32. package/dist/esm/out/wechaty/puppet_grpc_pb.js +38 -0
  33. package/dist/esm/out/wechaty/puppet_pb.d.ts +1 -0
  34. package/dist/esm/out/wechaty/puppet_pb.js +2 -0
  35. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +20 -0
  36. package/dist/esm/out/wechaty/puppet_pb_service.js +41 -0
  37. package/dist/esm/proto/wechaty/puppet/conversation.proto +12 -0
  38. package/dist/esm/proto/wechaty/puppet.proto +13 -0
  39. package/dist/esm/src/package-json.js +1 -1
  40. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  41. package/dist/esm/tests/puppet-server-impl.js +5 -0
  42. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  43. package/out/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +13 -0
  44. package/out/protoc-gen-openapiv2/options/openapiv2_pb.js +118 -2
  45. package/out/wechaty/puppet/conversation_grpc_pb.js +1 -0
  46. package/out/wechaty/puppet/conversation_pb.d.ts +41 -0
  47. package/out/wechaty/puppet/conversation_pb.js +293 -0
  48. package/out/wechaty/puppet/conversation_pb_service.d.ts +3 -0
  49. package/out/wechaty/puppet/conversation_pb_service.js +3 -0
  50. package/out/wechaty/puppet.openapi.yaml +29 -1
  51. package/out/wechaty/puppet.swagger.json +44 -1
  52. package/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  53. package/out/wechaty/puppet_grpc_pb.js +38 -0
  54. package/out/wechaty/puppet_pb.d.ts +1 -0
  55. package/out/wechaty/puppet_pb.js +2 -0
  56. package/out/wechaty/puppet_pb_service.d.ts +20 -0
  57. package/out/wechaty/puppet_pb_service.js +41 -0
  58. package/package.json +1 -1
  59. package/src/package-json.ts +1 -1
@@ -13,6 +13,7 @@ var wechaty_puppet_room_invitation_pb = require("../wechaty/puppet/room-invitati
13
13
  var wechaty_puppet_room_member_pb = require("../wechaty/puppet/room-member_pb");
14
14
  var wechaty_puppet_room_pb = require("../wechaty/puppet/room_pb");
15
15
  var wechaty_puppet_tag_pb = require("../wechaty/puppet/tag_pb");
16
+ var wechaty_puppet_conversation_pb = require("../wechaty/puppet/conversation_pb");
16
17
  var wechaty_puppet_post_pb = require("../wechaty/puppet/post_pb");
17
18
  var wechaty_puppet_moment_pb = require("../wechaty/puppet/moment_pb");
18
19
  var grpc = require("@improbable-eng/grpc-web").grpc;
@@ -266,6 +267,15 @@ Puppet.FriendshipAccept = {
266
267
  responseType: wechaty_puppet_friendship_pb.FriendshipAcceptResponse
267
268
  };
268
269
 
270
+ Puppet.ConversationRead = {
271
+ methodName: "ConversationRead",
272
+ service: Puppet,
273
+ requestStream: false,
274
+ responseStream: false,
275
+ requestType: wechaty_puppet_conversation_pb.ConversationReadRequest,
276
+ responseType: wechaty_puppet_conversation_pb.ConversationReadResponse
277
+ };
278
+
269
279
  Puppet.MessageFile = {
270
280
  methodName: "MessageFile",
271
281
  service: Puppet,
@@ -1621,6 +1631,37 @@ PuppetClient.prototype.friendshipAccept = function friendshipAccept(requestMessa
1621
1631
  };
1622
1632
  };
1623
1633
 
1634
+ PuppetClient.prototype.conversationRead = function conversationRead(requestMessage, metadata, callback) {
1635
+ if (arguments.length === 2) {
1636
+ callback = arguments[1];
1637
+ }
1638
+ var client = grpc.unary(Puppet.ConversationRead, {
1639
+ request: requestMessage,
1640
+ host: this.serviceHost,
1641
+ metadata: metadata,
1642
+ transport: this.options.transport,
1643
+ debug: this.options.debug,
1644
+ onEnd: function (response) {
1645
+ if (callback) {
1646
+ if (response.status !== grpc.Code.OK) {
1647
+ var err = new Error(response.statusMessage);
1648
+ err.code = response.status;
1649
+ err.metadata = response.trailers;
1650
+ callback(err, null);
1651
+ } else {
1652
+ callback(null, response.message);
1653
+ }
1654
+ }
1655
+ }
1656
+ });
1657
+ return {
1658
+ cancel: function () {
1659
+ callback = null;
1660
+ client.close();
1661
+ }
1662
+ };
1663
+ };
1664
+
1624
1665
  PuppetClient.prototype.messageFile = function messageFile(requestMessage, metadata, callback) {
1625
1666
  if (arguments.length === 2) {
1626
1667
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
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.25",
7
+ "version": "1.0.26",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {