@juzi/wechaty-grpc 1.0.38 → 1.0.40

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 +111 -0
  2. package/dist/cjs/out/wechaty/puppet/contact_pb.js +843 -1
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +86 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +122 -3
  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 +25 -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/contact_pb.d.ts +111 -0
  16. package/dist/esm/out/wechaty/puppet/contact_pb.js +843 -1
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +86 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +122 -3
  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 +25 -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/contact_pb.d.ts +111 -0
  30. package/out/wechaty/puppet/contact_pb.js +843 -1
  31. package/out/wechaty/puppet.openapi.yaml +86 -1
  32. package/out/wechaty/puppet.swagger.json +122 -3
  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
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.38
12
+ version: 1.0.40
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -344,6 +344,87 @@ paths:
344
344
  pattern: PAYLOADTYPECONTACT
345
345
  tags:
346
346
  - Puppet
347
+ '/contacts/{id}/payload-modify':
348
+ put:
349
+ operationId: Puppet_ContactPayloadModify
350
+ responses:
351
+ '200':
352
+ description: A successful response.
353
+ schema:
354
+ $ref: '#/definitions/puppetContactPayloadModifyResponse'
355
+ default:
356
+ description: An unexpected error response.
357
+ schema:
358
+ $ref: '#/definitions/rpcStatus'
359
+ parameters:
360
+ - name: id
361
+ in: path
362
+ required: true
363
+ type: string
364
+ - name: body
365
+ in: body
366
+ required: true
367
+ schema:
368
+ type: object
369
+ properties:
370
+ gender:
371
+ $ref: '#/definitions/puppetContactGender'
372
+ title: 性别
373
+ type:
374
+ $ref: '#/definitions/puppetContactType'
375
+ title: 类型
376
+ name:
377
+ type: string
378
+ title: 姓名
379
+ avatar:
380
+ type: string
381
+ title: 头像
382
+ address:
383
+ type: string
384
+ title: 地址
385
+ alias:
386
+ type: string
387
+ title: 别名,即备注
388
+ city:
389
+ type: string
390
+ title: 城市
391
+ friend:
392
+ type: boolean
393
+ title: 是否为好友
394
+ province:
395
+ type: string
396
+ title: 省份
397
+ signature:
398
+ type: string
399
+ title: 签名
400
+ star:
401
+ type: boolean
402
+ title: 是否为特别好友
403
+ weixin:
404
+ type: string
405
+ title: IM专属id,在企微环境中特指weixinId
406
+ corporation:
407
+ type: string
408
+ title: 企业
409
+ title:
410
+ type: string
411
+ title: 头衔
412
+ description:
413
+ type: string
414
+ title: 描述
415
+ coworker:
416
+ type: boolean
417
+ title: 是否为同事
418
+ phones:
419
+ type: array
420
+ items:
421
+ type: string
422
+ title: 电话号码,企微中最多5个
423
+ additionalInfo:
424
+ type: string
425
+ title: 额外信息,是由JS对象stringify得到的字符串,目前支持的内容包含addContactTime、corpId等。
426
+ tags:
427
+ - Puppet
347
428
  '/conversation/{conversationId}/read':
348
429
  put:
349
430
  summary: '*'
@@ -2189,6 +2270,8 @@ definitions:
2189
2270
  type: array
2190
2271
  items:
2191
2272
  type: string
2273
+ puppetContactPayloadModifyResponse:
2274
+ type: object
2192
2275
  puppetContactPayloadResponse:
2193
2276
  type: object
2194
2277
  properties:
@@ -2298,12 +2381,14 @@ definitions:
2298
2381
  - CONTACT_TYPE_PERSONAL
2299
2382
  - CONTACT_TYPE_OFFICIAL
2300
2383
  - CONTACT_TYPE_CORPORATION
2384
+ - CONTACT_TYPE_APPLICATION
2301
2385
  default: CONTACT_TYPE_UNSPECIFIED
2302
2386
  description: |-
2303
2387
  - CONTACT_TYPE_UNSPECIFIED: 不明确
2304
2388
  - CONTACT_TYPE_PERSONAL: 个微联系人
2305
2389
  - CONTACT_TYPE_OFFICIAL: 公众号
2306
2390
  - CONTACT_TYPE_CORPORATION: 企微联系人
2391
+ - CONTACT_TYPE_APPLICATION: 应用联系人 例如小助手
2307
2392
  title: 类型枚举
2308
2393
  puppetConversationReadResponse:
2309
2394
  type: object
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Wechaty Puppet Service OpenAPI Specification",
5
5
  "description": "Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.\n\nWechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.",
6
- "version": "1.0.38",
6
+ "version": "1.0.40",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -514,6 +514,121 @@
514
514
  ]
515
515
  }
516
516
  },
517
+ "/contacts/{id}/payload-modify": {
518
+ "put": {
519
+ "operationId": "Puppet_ContactPayloadModify",
520
+ "responses": {
521
+ "200": {
522
+ "description": "A successful response.",
523
+ "schema": {
524
+ "$ref": "#/definitions/puppetContactPayloadModifyResponse"
525
+ }
526
+ },
527
+ "default": {
528
+ "description": "An unexpected error response.",
529
+ "schema": {
530
+ "$ref": "#/definitions/rpcStatus"
531
+ }
532
+ }
533
+ },
534
+ "parameters": [
535
+ {
536
+ "name": "id",
537
+ "in": "path",
538
+ "required": true,
539
+ "type": "string"
540
+ },
541
+ {
542
+ "name": "body",
543
+ "in": "body",
544
+ "required": true,
545
+ "schema": {
546
+ "type": "object",
547
+ "properties": {
548
+ "gender": {
549
+ "$ref": "#/definitions/puppetContactGender",
550
+ "title": "性别"
551
+ },
552
+ "type": {
553
+ "$ref": "#/definitions/puppetContactType",
554
+ "title": "类型"
555
+ },
556
+ "name": {
557
+ "type": "string",
558
+ "title": "姓名"
559
+ },
560
+ "avatar": {
561
+ "type": "string",
562
+ "title": "头像"
563
+ },
564
+ "address": {
565
+ "type": "string",
566
+ "title": "地址"
567
+ },
568
+ "alias": {
569
+ "type": "string",
570
+ "title": "别名,即备注"
571
+ },
572
+ "city": {
573
+ "type": "string",
574
+ "title": "城市"
575
+ },
576
+ "friend": {
577
+ "type": "boolean",
578
+ "title": "是否为好友"
579
+ },
580
+ "province": {
581
+ "type": "string",
582
+ "title": "省份"
583
+ },
584
+ "signature": {
585
+ "type": "string",
586
+ "title": "签名"
587
+ },
588
+ "star": {
589
+ "type": "boolean",
590
+ "title": "是否为特别好友"
591
+ },
592
+ "weixin": {
593
+ "type": "string",
594
+ "title": "IM专属id,在企微环境中特指weixinId"
595
+ },
596
+ "corporation": {
597
+ "type": "string",
598
+ "title": "企业"
599
+ },
600
+ "title": {
601
+ "type": "string",
602
+ "title": "头衔"
603
+ },
604
+ "description": {
605
+ "type": "string",
606
+ "title": "描述"
607
+ },
608
+ "coworker": {
609
+ "type": "boolean",
610
+ "title": "是否为同事"
611
+ },
612
+ "phones": {
613
+ "type": "array",
614
+ "items": {
615
+ "type": "string"
616
+ },
617
+ "title": "电话号码,企微中最多5个"
618
+ },
619
+ "additionalInfo": {
620
+ "type": "string",
621
+ "title": "额外信息,是由JS对象stringify得到的字符串,目前支持的内容包含addContactTime、corpId等。"
622
+ }
623
+ }
624
+ }
625
+ }
626
+ ],
627
+ "tags": [
628
+ "Puppet"
629
+ ]
630
+ }
631
+ },
517
632
  "/conversation/{conversationId}/read": {
518
633
  "put": {
519
634
  "summary": "*",
@@ -3262,6 +3377,9 @@
3262
3377
  }
3263
3378
  }
3264
3379
  },
3380
+ "puppetContactPayloadModifyResponse": {
3381
+ "type": "object"
3382
+ },
3265
3383
  "puppetContactPayloadResponse": {
3266
3384
  "type": "object",
3267
3385
  "properties": {
@@ -3391,10 +3509,11 @@
3391
3509
  "CONTACT_TYPE_UNSPECIFIED",
3392
3510
  "CONTACT_TYPE_PERSONAL",
3393
3511
  "CONTACT_TYPE_OFFICIAL",
3394
- "CONTACT_TYPE_CORPORATION"
3512
+ "CONTACT_TYPE_CORPORATION",
3513
+ "CONTACT_TYPE_APPLICATION"
3395
3514
  ],
3396
3515
  "default": "CONTACT_TYPE_UNSPECIFIED",
3397
- "description": "- CONTACT_TYPE_UNSPECIFIED: 不明确\n - CONTACT_TYPE_PERSONAL: 个微联系人\n - CONTACT_TYPE_OFFICIAL: 公众号\n - CONTACT_TYPE_CORPORATION: 企微联系人",
3516
+ "description": "- CONTACT_TYPE_UNSPECIFIED: 不明确\n - CONTACT_TYPE_PERSONAL: 个微联系人\n - CONTACT_TYPE_OFFICIAL: 公众号\n - CONTACT_TYPE_CORPORATION: 企微联系人\n - CONTACT_TYPE_APPLICATION: 应用联系人 例如小助手",
3398
3517
  "title": "类型枚举"
3399
3518
  },
3400
3519
  "puppetConversationReadResponse": {
@@ -46,6 +46,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
46
46
  contactDescription: IPuppetService_IContactDescription;
47
47
  contactDelete: IPuppetService_IContactDelete;
48
48
  contactList: IPuppetService_IContactList;
49
+ contactPayloadModify: IPuppetService_IContactPayloadModify;
49
50
  friendshipPayload: IPuppetService_IFriendshipPayload;
50
51
  friendshipSearchPhone: IPuppetService_IFriendshipSearchPhone;
51
52
  friendshipSearchWeixin: IPuppetService_IFriendshipSearchWeixin;
@@ -307,6 +308,15 @@ interface IPuppetService_IContactList extends grpc.MethodDefinition<wechaty_pupp
307
308
  responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactListResponse>;
308
309
  responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactListResponse>;
309
310
  }
311
+ interface IPuppetService_IContactPayloadModify extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactPayloadModifyRequest, wechaty_puppet_contact_pb.ContactPayloadModifyResponse> {
312
+ path: "/wechaty.Puppet/ContactPayloadModify";
313
+ requestStream: false;
314
+ responseStream: false;
315
+ requestSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactPayloadModifyRequest>;
316
+ requestDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactPayloadModifyRequest>;
317
+ responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactPayloadModifyResponse>;
318
+ responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactPayloadModifyResponse>;
319
+ }
310
320
  interface IPuppetService_IFriendshipPayload extends grpc.MethodDefinition<wechaty_puppet_friendship_pb.FriendshipPayloadRequest, wechaty_puppet_friendship_pb.FriendshipPayloadResponse> {
311
321
  path: "/wechaty.Puppet/FriendshipPayload";
312
322
  requestStream: false;
@@ -882,6 +892,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
882
892
  contactDescription: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactDescriptionRequest, wechaty_puppet_contact_pb.ContactDescriptionResponse>;
883
893
  contactDelete: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactDeleteRequest, wechaty_puppet_contact_pb.ContactDeleteResponse>;
884
894
  contactList: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactListRequest, wechaty_puppet_contact_pb.ContactListResponse>;
895
+ contactPayloadModify: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactPayloadModifyRequest, wechaty_puppet_contact_pb.ContactPayloadModifyResponse>;
885
896
  friendshipPayload: grpc.handleUnaryCall<wechaty_puppet_friendship_pb.FriendshipPayloadRequest, wechaty_puppet_friendship_pb.FriendshipPayloadResponse>;
886
897
  friendshipSearchPhone: grpc.handleUnaryCall<wechaty_puppet_friendship_pb.FriendshipSearchPhoneRequest, wechaty_puppet_friendship_pb.FriendshipSearchPhoneResponse>;
887
898
  friendshipSearchWeixin: grpc.handleUnaryCall<wechaty_puppet_friendship_pb.FriendshipSearchHandleRequest, wechaty_puppet_friendship_pb.FriendshipSearchHandleResponse>;
@@ -1010,6 +1021,9 @@ export interface IPuppetClient {
1010
1021
  contactList(request: wechaty_puppet_contact_pb.ContactListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
1011
1022
  contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
1012
1023
  contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
1024
+ contactPayloadModify(request: wechaty_puppet_contact_pb.ContactPayloadModifyRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadModifyResponse) => void): grpc.ClientUnaryCall;
1025
+ contactPayloadModify(request: wechaty_puppet_contact_pb.ContactPayloadModifyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadModifyResponse) => void): grpc.ClientUnaryCall;
1026
+ contactPayloadModify(request: wechaty_puppet_contact_pb.ContactPayloadModifyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadModifyResponse) => void): grpc.ClientUnaryCall;
1013
1027
  friendshipPayload(request: wechaty_puppet_friendship_pb.FriendshipPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_friendship_pb.FriendshipPayloadResponse) => void): grpc.ClientUnaryCall;
1014
1028
  friendshipPayload(request: wechaty_puppet_friendship_pb.FriendshipPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_friendship_pb.FriendshipPayloadResponse) => void): grpc.ClientUnaryCall;
1015
1029
  friendshipPayload(request: wechaty_puppet_friendship_pb.FriendshipPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_friendship_pb.FriendshipPayloadResponse) => void): grpc.ClientUnaryCall;
@@ -1261,6 +1275,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1261
1275
  public contactList(request: wechaty_puppet_contact_pb.ContactListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
1262
1276
  public contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
1263
1277
  public contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
1278
+ public contactPayloadModify(request: wechaty_puppet_contact_pb.ContactPayloadModifyRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadModifyResponse) => void): grpc.ClientUnaryCall;
1279
+ public contactPayloadModify(request: wechaty_puppet_contact_pb.ContactPayloadModifyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadModifyResponse) => void): grpc.ClientUnaryCall;
1280
+ public contactPayloadModify(request: wechaty_puppet_contact_pb.ContactPayloadModifyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadModifyResponse) => void): grpc.ClientUnaryCall;
1264
1281
  public friendshipPayload(request: wechaty_puppet_friendship_pb.FriendshipPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_friendship_pb.FriendshipPayloadResponse) => void): grpc.ClientUnaryCall;
1265
1282
  public friendshipPayload(request: wechaty_puppet_friendship_pb.FriendshipPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_friendship_pb.FriendshipPayloadResponse) => void): grpc.ClientUnaryCall;
1266
1283
  public friendshipPayload(request: wechaty_puppet_friendship_pb.FriendshipPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_friendship_pb.FriendshipPayloadResponse) => void): grpc.ClientUnaryCall;
@@ -164,6 +164,28 @@ function deserialize_wechaty_puppet_ContactListResponse(buffer_arg) {
164
164
  return wechaty_puppet_contact_pb.ContactListResponse.deserializeBinary(new Uint8Array(buffer_arg));
165
165
  }
166
166
 
167
+ function serialize_wechaty_puppet_ContactPayloadModifyRequest(arg) {
168
+ if (!(arg instanceof wechaty_puppet_contact_pb.ContactPayloadModifyRequest)) {
169
+ throw new Error('Expected argument of type wechaty.puppet.ContactPayloadModifyRequest');
170
+ }
171
+ return Buffer.from(arg.serializeBinary());
172
+ }
173
+
174
+ function deserialize_wechaty_puppet_ContactPayloadModifyRequest(buffer_arg) {
175
+ return wechaty_puppet_contact_pb.ContactPayloadModifyRequest.deserializeBinary(new Uint8Array(buffer_arg));
176
+ }
177
+
178
+ function serialize_wechaty_puppet_ContactPayloadModifyResponse(arg) {
179
+ if (!(arg instanceof wechaty_puppet_contact_pb.ContactPayloadModifyResponse)) {
180
+ throw new Error('Expected argument of type wechaty.puppet.ContactPayloadModifyResponse');
181
+ }
182
+ return Buffer.from(arg.serializeBinary());
183
+ }
184
+
185
+ function deserialize_wechaty_puppet_ContactPayloadModifyResponse(buffer_arg) {
186
+ return wechaty_puppet_contact_pb.ContactPayloadModifyResponse.deserializeBinary(new Uint8Array(buffer_arg));
187
+ }
188
+
167
189
  function serialize_wechaty_puppet_ContactPayloadRequest(arg) {
168
190
  if (!(arg instanceof wechaty_puppet_contact_pb.ContactPayloadRequest)) {
169
191
  throw new Error('Expected argument of type wechaty.puppet.ContactPayloadRequest');
@@ -2100,6 +2122,17 @@ contactList: {
2100
2122
  responseSerialize: serialize_wechaty_puppet_ContactListResponse,
2101
2123
  responseDeserialize: deserialize_wechaty_puppet_ContactListResponse,
2102
2124
  },
2125
+ contactPayloadModify: {
2126
+ path: '/wechaty.Puppet/ContactPayloadModify',
2127
+ requestStream: false,
2128
+ responseStream: false,
2129
+ requestType: wechaty_puppet_contact_pb.ContactPayloadModifyRequest,
2130
+ responseType: wechaty_puppet_contact_pb.ContactPayloadModifyResponse,
2131
+ requestSerialize: serialize_wechaty_puppet_ContactPayloadModifyRequest,
2132
+ requestDeserialize: deserialize_wechaty_puppet_ContactPayloadModifyRequest,
2133
+ responseSerialize: serialize_wechaty_puppet_ContactPayloadModifyResponse,
2134
+ responseDeserialize: deserialize_wechaty_puppet_ContactPayloadModifyResponse,
2135
+ },
2103
2136
  // *
2104
2137
  //
2105
2138
  // Friendship
@@ -216,6 +216,15 @@ type PuppetContactList = {
216
216
  readonly responseType: typeof wechaty_puppet_contact_pb.ContactListResponse;
217
217
  };
218
218
 
219
+ type PuppetContactPayloadModify = {
220
+ readonly methodName: string;
221
+ readonly service: typeof Puppet;
222
+ readonly requestStream: false;
223
+ readonly responseStream: false;
224
+ readonly requestType: typeof wechaty_puppet_contact_pb.ContactPayloadModifyRequest;
225
+ readonly responseType: typeof wechaty_puppet_contact_pb.ContactPayloadModifyResponse;
226
+ };
227
+
219
228
  type PuppetFriendshipPayload = {
220
229
  readonly methodName: string;
221
230
  readonly service: typeof Puppet;
@@ -789,6 +798,7 @@ export class Puppet {
789
798
  static readonly ContactDescription: PuppetContactDescription;
790
799
  static readonly ContactDelete: PuppetContactDelete;
791
800
  static readonly ContactList: PuppetContactList;
801
+ static readonly ContactPayloadModify: PuppetContactPayloadModify;
792
802
  static readonly FriendshipPayload: PuppetFriendshipPayload;
793
803
  static readonly FriendshipSearchPhone: PuppetFriendshipSearchPhone;
794
804
  static readonly FriendshipSearchWeixin: PuppetFriendshipSearchWeixin;
@@ -1050,6 +1060,15 @@ export class PuppetClient {
1050
1060
  requestMessage: wechaty_puppet_contact_pb.ContactListRequest,
1051
1061
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactListResponse|null) => void
1052
1062
  ): UnaryResponse;
1063
+ contactPayloadModify(
1064
+ requestMessage: wechaty_puppet_contact_pb.ContactPayloadModifyRequest,
1065
+ metadata: grpc.Metadata,
1066
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactPayloadModifyResponse|null) => void
1067
+ ): UnaryResponse;
1068
+ contactPayloadModify(
1069
+ requestMessage: wechaty_puppet_contact_pb.ContactPayloadModifyRequest,
1070
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactPayloadModifyResponse|null) => void
1071
+ ): UnaryResponse;
1053
1072
  friendshipPayload(
1054
1073
  requestMessage: wechaty_puppet_friendship_pb.FriendshipPayloadRequest,
1055
1074
  metadata: grpc.Metadata,
@@ -222,6 +222,15 @@ Puppet.ContactList = {
222
222
  responseType: wechaty_puppet_contact_pb.ContactListResponse
223
223
  };
224
224
 
225
+ Puppet.ContactPayloadModify = {
226
+ methodName: "ContactPayloadModify",
227
+ service: Puppet,
228
+ requestStream: false,
229
+ responseStream: false,
230
+ requestType: wechaty_puppet_contact_pb.ContactPayloadModifyRequest,
231
+ responseType: wechaty_puppet_contact_pb.ContactPayloadModifyResponse
232
+ };
233
+
225
234
  Puppet.FriendshipPayload = {
226
235
  methodName: "FriendshipPayload",
227
236
  service: Puppet,
@@ -1494,6 +1503,37 @@ PuppetClient.prototype.contactList = function contactList(requestMessage, metada
1494
1503
  };
1495
1504
  };
1496
1505
 
1506
+ PuppetClient.prototype.contactPayloadModify = function contactPayloadModify(requestMessage, metadata, callback) {
1507
+ if (arguments.length === 2) {
1508
+ callback = arguments[1];
1509
+ }
1510
+ var client = grpc.unary(Puppet.ContactPayloadModify, {
1511
+ request: requestMessage,
1512
+ host: this.serviceHost,
1513
+ metadata: metadata,
1514
+ transport: this.options.transport,
1515
+ debug: this.options.debug,
1516
+ onEnd: function (response) {
1517
+ if (callback) {
1518
+ if (response.status !== grpc.Code.OK) {
1519
+ var err = new Error(response.statusMessage);
1520
+ err.code = response.status;
1521
+ err.metadata = response.trailers;
1522
+ callback(err, null);
1523
+ } else {
1524
+ callback(null, response.message);
1525
+ }
1526
+ }
1527
+ }
1528
+ });
1529
+ return {
1530
+ cancel: function () {
1531
+ callback = null;
1532
+ client.close();
1533
+ }
1534
+ };
1535
+ };
1536
+
1497
1537
  PuppetClient.prototype.friendshipPayload = function friendshipPayload(requestMessage, metadata, callback) {
1498
1538
  if (arguments.length === 2) {
1499
1539
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
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.38",
7
+ "version": "1.0.40",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {