@juzi/wechaty-grpc 1.0.35 → 1.0.37

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/contact_pb.d.ts +36 -0
  2. package/dist/cjs/out/wechaty/puppet/contact_pb.js +275 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +27 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +42 -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/contact.proto +6 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +6 -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/contact_pb.d.ts +36 -0
  16. package/dist/esm/out/wechaty/puppet/contact_pb.js +275 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +27 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +42 -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/contact.proto +6 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +6 -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/contact_pb.d.ts +36 -0
  30. package/out/wechaty/puppet/contact_pb.js +275 -0
  31. package/out/wechaty/puppet.openapi.yaml +27 -1
  32. package/out/wechaty/puppet.swagger.json +42 -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
@@ -98,6 +98,28 @@ function deserialize_wechaty_puppet_ContactCorporationRemarkResponse(buffer_arg)
98
98
  return wechaty_puppet_contact_pb.ContactCorporationRemarkResponse.deserializeBinary(new Uint8Array(buffer_arg));
99
99
  }
100
100
 
101
+ function serialize_wechaty_puppet_ContactDeleteRequest(arg) {
102
+ if (!(arg instanceof wechaty_puppet_contact_pb.ContactDeleteRequest)) {
103
+ throw new Error('Expected argument of type wechaty.puppet.ContactDeleteRequest');
104
+ }
105
+ return Buffer.from(arg.serializeBinary());
106
+ }
107
+
108
+ function deserialize_wechaty_puppet_ContactDeleteRequest(buffer_arg) {
109
+ return wechaty_puppet_contact_pb.ContactDeleteRequest.deserializeBinary(new Uint8Array(buffer_arg));
110
+ }
111
+
112
+ function serialize_wechaty_puppet_ContactDeleteResponse(arg) {
113
+ if (!(arg instanceof wechaty_puppet_contact_pb.ContactDeleteResponse)) {
114
+ throw new Error('Expected argument of type wechaty.puppet.ContactDeleteResponse');
115
+ }
116
+ return Buffer.from(arg.serializeBinary());
117
+ }
118
+
119
+ function deserialize_wechaty_puppet_ContactDeleteResponse(buffer_arg) {
120
+ return wechaty_puppet_contact_pb.ContactDeleteResponse.deserializeBinary(new Uint8Array(buffer_arg));
121
+ }
122
+
101
123
  function serialize_wechaty_puppet_ContactDescriptionRequest(arg) {
102
124
  if (!(arg instanceof wechaty_puppet_contact_pb.ContactDescriptionRequest)) {
103
125
  throw new Error('Expected argument of type wechaty.puppet.ContactDescriptionRequest');
@@ -2054,6 +2076,17 @@ contactPayload: {
2054
2076
  responseSerialize: serialize_wechaty_puppet_ContactDescriptionResponse,
2055
2077
  responseDeserialize: deserialize_wechaty_puppet_ContactDescriptionResponse,
2056
2078
  },
2079
+ contactDelete: {
2080
+ path: '/wechaty.Puppet/ContactDelete',
2081
+ requestStream: false,
2082
+ responseStream: false,
2083
+ requestType: wechaty_puppet_contact_pb.ContactDeleteRequest,
2084
+ responseType: wechaty_puppet_contact_pb.ContactDeleteResponse,
2085
+ requestSerialize: serialize_wechaty_puppet_ContactDeleteRequest,
2086
+ requestDeserialize: deserialize_wechaty_puppet_ContactDeleteRequest,
2087
+ responseSerialize: serialize_wechaty_puppet_ContactDeleteResponse,
2088
+ responseDeserialize: deserialize_wechaty_puppet_ContactDeleteResponse,
2089
+ },
2057
2090
  // *
2058
2091
  // Huan(202002): consider changing response to a stream in the future for better performance
2059
2092
  contactList: {
@@ -198,6 +198,15 @@ type PuppetContactDescription = {
198
198
  readonly responseType: typeof wechaty_puppet_contact_pb.ContactDescriptionResponse;
199
199
  };
200
200
 
201
+ type PuppetContactDelete = {
202
+ readonly methodName: string;
203
+ readonly service: typeof Puppet;
204
+ readonly requestStream: false;
205
+ readonly responseStream: false;
206
+ readonly requestType: typeof wechaty_puppet_contact_pb.ContactDeleteRequest;
207
+ readonly responseType: typeof wechaty_puppet_contact_pb.ContactDeleteResponse;
208
+ };
209
+
201
210
  type PuppetContactList = {
202
211
  readonly methodName: string;
203
212
  readonly service: typeof Puppet;
@@ -778,6 +787,7 @@ export class Puppet {
778
787
  static readonly ContactPhone: PuppetContactPhone;
779
788
  static readonly ContactCorporationRemark: PuppetContactCorporationRemark;
780
789
  static readonly ContactDescription: PuppetContactDescription;
790
+ static readonly ContactDelete: PuppetContactDelete;
781
791
  static readonly ContactList: PuppetContactList;
782
792
  static readonly FriendshipPayload: PuppetFriendshipPayload;
783
793
  static readonly FriendshipSearchPhone: PuppetFriendshipSearchPhone;
@@ -1022,6 +1032,15 @@ export class PuppetClient {
1022
1032
  requestMessage: wechaty_puppet_contact_pb.ContactDescriptionRequest,
1023
1033
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactDescriptionResponse|null) => void
1024
1034
  ): UnaryResponse;
1035
+ contactDelete(
1036
+ requestMessage: wechaty_puppet_contact_pb.ContactDeleteRequest,
1037
+ metadata: grpc.Metadata,
1038
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactDeleteResponse|null) => void
1039
+ ): UnaryResponse;
1040
+ contactDelete(
1041
+ requestMessage: wechaty_puppet_contact_pb.ContactDeleteRequest,
1042
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactDeleteResponse|null) => void
1043
+ ): UnaryResponse;
1025
1044
  contactList(
1026
1045
  requestMessage: wechaty_puppet_contact_pb.ContactListRequest,
1027
1046
  metadata: grpc.Metadata,
@@ -204,6 +204,15 @@ Puppet.ContactDescription = {
204
204
  responseType: wechaty_puppet_contact_pb.ContactDescriptionResponse
205
205
  };
206
206
 
207
+ Puppet.ContactDelete = {
208
+ methodName: "ContactDelete",
209
+ service: Puppet,
210
+ requestStream: false,
211
+ responseStream: false,
212
+ requestType: wechaty_puppet_contact_pb.ContactDeleteRequest,
213
+ responseType: wechaty_puppet_contact_pb.ContactDeleteResponse
214
+ };
215
+
207
216
  Puppet.ContactList = {
208
217
  methodName: "ContactList",
209
218
  service: Puppet,
@@ -1423,6 +1432,37 @@ PuppetClient.prototype.contactDescription = function contactDescription(requestM
1423
1432
  };
1424
1433
  };
1425
1434
 
1435
+ PuppetClient.prototype.contactDelete = function contactDelete(requestMessage, metadata, callback) {
1436
+ if (arguments.length === 2) {
1437
+ callback = arguments[1];
1438
+ }
1439
+ var client = grpc.unary(Puppet.ContactDelete, {
1440
+ request: requestMessage,
1441
+ host: this.serviceHost,
1442
+ metadata: metadata,
1443
+ transport: this.options.transport,
1444
+ debug: this.options.debug,
1445
+ onEnd: function (response) {
1446
+ if (callback) {
1447
+ if (response.status !== grpc.Code.OK) {
1448
+ var err = new Error(response.statusMessage);
1449
+ err.code = response.status;
1450
+ err.metadata = response.trailers;
1451
+ callback(err, null);
1452
+ } else {
1453
+ callback(null, response.message);
1454
+ }
1455
+ }
1456
+ }
1457
+ });
1458
+ return {
1459
+ cancel: function () {
1460
+ callback = null;
1461
+ client.close();
1462
+ }
1463
+ };
1464
+ };
1465
+
1426
1466
  PuppetClient.prototype.contactList = function contactList(requestMessage, metadata, callback) {
1427
1467
  if (arguments.length === 2) {
1428
1468
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
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.35",
7
+ "version": "1.0.37",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {