@juzi/wechaty-grpc 1.0.52 → 1.0.53

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/moment_pb.d.ts +36 -0
  2. package/dist/cjs/out/wechaty/puppet/moment_pb.js +275 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +22 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +34 -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/moment.proto +6 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +7 -0
  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/moment_pb.d.ts +36 -0
  16. package/dist/esm/out/wechaty/puppet/moment_pb.js +275 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +22 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +34 -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/moment.proto +6 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +7 -0
  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/moment_pb.d.ts +36 -0
  30. package/out/wechaty/puppet/moment_pb.js +275 -0
  31. package/out/wechaty/puppet.openapi.yaml +22 -1
  32. package/out/wechaty/puppet.swagger.json +34 -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
@@ -1087,6 +1087,28 @@ function deserialize_wechaty_puppet_MomentSignatureResponse(buffer_arg) {
1087
1087
  return wechaty_puppet_moment_pb.MomentSignatureResponse.deserializeBinary(new Uint8Array(buffer_arg));
1088
1088
  }
1089
1089
 
1090
+ function serialize_wechaty_puppet_MomentUnpublishRequest(arg) {
1091
+ if (!(arg instanceof wechaty_puppet_moment_pb.MomentUnpublishRequest)) {
1092
+ throw new Error('Expected argument of type wechaty.puppet.MomentUnpublishRequest');
1093
+ }
1094
+ return Buffer.from(arg.serializeBinary());
1095
+ }
1096
+
1097
+ function deserialize_wechaty_puppet_MomentUnpublishRequest(buffer_arg) {
1098
+ return wechaty_puppet_moment_pb.MomentUnpublishRequest.deserializeBinary(new Uint8Array(buffer_arg));
1099
+ }
1100
+
1101
+ function serialize_wechaty_puppet_MomentUnpublishResponse(arg) {
1102
+ if (!(arg instanceof wechaty_puppet_moment_pb.MomentUnpublishResponse)) {
1103
+ throw new Error('Expected argument of type wechaty.puppet.MomentUnpublishResponse');
1104
+ }
1105
+ return Buffer.from(arg.serializeBinary());
1106
+ }
1107
+
1108
+ function deserialize_wechaty_puppet_MomentUnpublishResponse(buffer_arg) {
1109
+ return wechaty_puppet_moment_pb.MomentUnpublishResponse.deserializeBinary(new Uint8Array(buffer_arg));
1110
+ }
1111
+
1090
1112
  function serialize_wechaty_puppet_MomentVisibleListRequest(arg) {
1091
1113
  if (!(arg instanceof wechaty_puppet_moment_pb.MomentVisibleListRequest)) {
1092
1114
  throw new Error('Expected argument of type wechaty.puppet.MomentVisibleListRequest');
@@ -2784,6 +2806,17 @@ momentPublish: {
2784
2806
  responseSerialize: serialize_wechaty_puppet_MomentPublishResponse,
2785
2807
  responseDeserialize: deserialize_wechaty_puppet_MomentPublishResponse,
2786
2808
  },
2809
+ momentUnpublish: {
2810
+ path: '/wechaty.Puppet/MomentUnpublish',
2811
+ requestStream: false,
2812
+ responseStream: false,
2813
+ requestType: wechaty_puppet_moment_pb.MomentUnpublishRequest,
2814
+ responseType: wechaty_puppet_moment_pb.MomentUnpublishResponse,
2815
+ requestSerialize: serialize_wechaty_puppet_MomentUnpublishRequest,
2816
+ requestDeserialize: deserialize_wechaty_puppet_MomentUnpublishRequest,
2817
+ responseSerialize: serialize_wechaty_puppet_MomentUnpublishResponse,
2818
+ responseDeserialize: deserialize_wechaty_puppet_MomentUnpublishResponse,
2819
+ },
2787
2820
  postTap: {
2788
2821
  path: '/wechaty.Puppet/postTap',
2789
2822
  requestStream: false,
@@ -710,6 +710,15 @@ type PuppetmomentPublish = {
710
710
  readonly responseType: typeof wechaty_puppet_moment_pb.MomentPublishResponse;
711
711
  };
712
712
 
713
+ type PuppetMomentUnpublish = {
714
+ readonly methodName: string;
715
+ readonly service: typeof Puppet;
716
+ readonly requestStream: false;
717
+ readonly responseStream: false;
718
+ readonly requestType: typeof wechaty_puppet_moment_pb.MomentUnpublishRequest;
719
+ readonly responseType: typeof wechaty_puppet_moment_pb.MomentUnpublishResponse;
720
+ };
721
+
713
722
  type PuppetpostTap = {
714
723
  readonly methodName: string;
715
724
  readonly service: typeof Puppet;
@@ -861,6 +870,7 @@ export class Puppet {
861
870
  static readonly TagContactTagList: PuppetTagContactTagList;
862
871
  static readonly TagTagContactList: PuppetTagTagContactList;
863
872
  static readonly momentPublish: PuppetmomentPublish;
873
+ static readonly MomentUnpublish: PuppetMomentUnpublish;
864
874
  static readonly postTap: PuppetpostTap;
865
875
  static readonly momentSignature: PuppetmomentSignature;
866
876
  static readonly momentCoverage: PuppetmomentCoverage;
@@ -1588,6 +1598,15 @@ export class PuppetClient {
1588
1598
  requestMessage: wechaty_puppet_moment_pb.MomentPublishRequest,
1589
1599
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentPublishResponse|null) => void
1590
1600
  ): UnaryResponse;
1601
+ momentUnpublish(
1602
+ requestMessage: wechaty_puppet_moment_pb.MomentUnpublishRequest,
1603
+ metadata: grpc.Metadata,
1604
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentUnpublishResponse|null) => void
1605
+ ): UnaryResponse;
1606
+ momentUnpublish(
1607
+ requestMessage: wechaty_puppet_moment_pb.MomentUnpublishRequest,
1608
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentUnpublishResponse|null) => void
1609
+ ): UnaryResponse;
1591
1610
  postTap(
1592
1611
  requestMessage: wechaty_puppet_post_pb.PostTapRequest,
1593
1612
  metadata: grpc.Metadata,
@@ -716,6 +716,15 @@ Puppet.momentPublish = {
716
716
  responseType: wechaty_puppet_moment_pb.MomentPublishResponse
717
717
  };
718
718
 
719
+ Puppet.MomentUnpublish = {
720
+ methodName: "MomentUnpublish",
721
+ service: Puppet,
722
+ requestStream: false,
723
+ responseStream: false,
724
+ requestType: wechaty_puppet_moment_pb.MomentUnpublishRequest,
725
+ responseType: wechaty_puppet_moment_pb.MomentUnpublishResponse
726
+ };
727
+
719
728
  Puppet.postTap = {
720
729
  methodName: "postTap",
721
730
  service: Puppet,
@@ -3190,6 +3199,37 @@ PuppetClient.prototype.momentPublish = function momentPublish(requestMessage, me
3190
3199
  };
3191
3200
  };
3192
3201
 
3202
+ PuppetClient.prototype.momentUnpublish = function momentUnpublish(requestMessage, metadata, callback) {
3203
+ if (arguments.length === 2) {
3204
+ callback = arguments[1];
3205
+ }
3206
+ var client = grpc.unary(Puppet.MomentUnpublish, {
3207
+ request: requestMessage,
3208
+ host: this.serviceHost,
3209
+ metadata: metadata,
3210
+ transport: this.options.transport,
3211
+ debug: this.options.debug,
3212
+ onEnd: function (response) {
3213
+ if (callback) {
3214
+ if (response.status !== grpc.Code.OK) {
3215
+ var err = new Error(response.statusMessage);
3216
+ err.code = response.status;
3217
+ err.metadata = response.trailers;
3218
+ callback(err, null);
3219
+ } else {
3220
+ callback(null, response.message);
3221
+ }
3222
+ }
3223
+ }
3224
+ });
3225
+ return {
3226
+ cancel: function () {
3227
+ callback = null;
3228
+ client.close();
3229
+ }
3230
+ };
3231
+ };
3232
+
3193
3233
  PuppetClient.prototype.postTap = function postTap(requestMessage, metadata, callback) {
3194
3234
  if (arguments.length === 2) {
3195
3235
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
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.52",
7
+ "version": "1.0.53",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {