@juzi/wechaty-grpc 1.0.62 → 1.0.63

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/room_pb.d.ts +42 -0
  2. package/dist/cjs/out/wechaty/puppet/room_pb.js +331 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +57 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +86 -1
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +44 -0
  7. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
  8. package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
  9. package/dist/cjs/proto/wechaty/puppet/room.proto +7 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +12 -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 +10 -0
  14. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  15. package/dist/esm/out/wechaty/puppet/room_pb.d.ts +42 -0
  16. package/dist/esm/out/wechaty/puppet/room_pb.js +331 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +57 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +86 -1
  19. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.js +44 -0
  21. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
  22. package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
  23. package/dist/esm/proto/wechaty/puppet/room.proto +7 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +12 -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 +10 -0
  28. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  29. package/out/wechaty/puppet/room_pb.d.ts +42 -0
  30. package/out/wechaty/puppet/room_pb.js +331 -0
  31. package/out/wechaty/puppet.openapi.yaml +57 -1
  32. package/out/wechaty/puppet.swagger.json +86 -1
  33. package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  34. package/out/wechaty/puppet_grpc_pb.js +44 -0
  35. package/out/wechaty/puppet_pb_service.d.ts +38 -0
  36. package/out/wechaty/puppet_pb_service.js +80 -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.62
12
+ version: 1.0.63
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -1604,6 +1604,33 @@ paths:
1604
1604
  type: string
1605
1605
  tags:
1606
1606
  - Puppet
1607
+ '/rooms/{id}/add/admins/{contactIds}':
1608
+ put:
1609
+ operationId: Puppet_RoomAddAdmins
1610
+ responses:
1611
+ '200':
1612
+ description: A successful response.
1613
+ schema:
1614
+ $ref: '#/definitions/puppetRoomAdminsResponse'
1615
+ default:
1616
+ description: An unexpected error response.
1617
+ schema:
1618
+ $ref: '#/definitions/rpcStatus'
1619
+ parameters:
1620
+ - name: id
1621
+ in: path
1622
+ required: true
1623
+ type: string
1624
+ - name: contactIds
1625
+ in: path
1626
+ required: true
1627
+ type: array
1628
+ items:
1629
+ type: string
1630
+ collectionFormat: csv
1631
+ minItems: 1
1632
+ tags:
1633
+ - Puppet
1607
1634
  '/rooms/{id}/add/{contactId}':
1608
1635
  put:
1609
1636
  operationId: Puppet_RoomAdd
@@ -1710,6 +1737,33 @@ paths:
1710
1737
  type: string
1711
1738
  tags:
1712
1739
  - Puppet
1740
+ '/rooms/{id}/del/admins/{contactIds}':
1741
+ delete:
1742
+ operationId: Puppet_RoomDelAdmins
1743
+ responses:
1744
+ '200':
1745
+ description: A successful response.
1746
+ schema:
1747
+ $ref: '#/definitions/puppetRoomAdminsResponse'
1748
+ default:
1749
+ description: An unexpected error response.
1750
+ schema:
1751
+ $ref: '#/definitions/rpcStatus'
1752
+ parameters:
1753
+ - name: id
1754
+ in: path
1755
+ required: true
1756
+ type: string
1757
+ - name: contactIds
1758
+ in: path
1759
+ required: true
1760
+ type: array
1761
+ items:
1762
+ type: string
1763
+ collectionFormat: csv
1764
+ minItems: 1
1765
+ tags:
1766
+ - Puppet
1713
1767
  '/rooms/{id}/dirty/members/{type}':
1714
1768
  put:
1715
1769
  operationId: Puppet_DirtyPayload4
@@ -3380,6 +3434,8 @@ definitions:
3380
3434
  type: object
3381
3435
  puppetRoomAddResponse:
3382
3436
  type: object
3437
+ puppetRoomAdminsResponse:
3438
+ type: object
3383
3439
  puppetRoomAnnounceResponse:
3384
3440
  type: object
3385
3441
  properties:
@@ -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.62",
6
+ "version": "1.0.63",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -2381,6 +2381,47 @@
2381
2381
  ]
2382
2382
  }
2383
2383
  },
2384
+ "/rooms/{id}/add/admins/{contactIds}": {
2385
+ "put": {
2386
+ "operationId": "Puppet_RoomAddAdmins",
2387
+ "responses": {
2388
+ "200": {
2389
+ "description": "A successful response.",
2390
+ "schema": {
2391
+ "$ref": "#/definitions/puppetRoomAdminsResponse"
2392
+ }
2393
+ },
2394
+ "default": {
2395
+ "description": "An unexpected error response.",
2396
+ "schema": {
2397
+ "$ref": "#/definitions/rpcStatus"
2398
+ }
2399
+ }
2400
+ },
2401
+ "parameters": [
2402
+ {
2403
+ "name": "id",
2404
+ "in": "path",
2405
+ "required": true,
2406
+ "type": "string"
2407
+ },
2408
+ {
2409
+ "name": "contactIds",
2410
+ "in": "path",
2411
+ "required": true,
2412
+ "type": "array",
2413
+ "items": {
2414
+ "type": "string"
2415
+ },
2416
+ "collectionFormat": "csv",
2417
+ "minItems": 1
2418
+ }
2419
+ ],
2420
+ "tags": [
2421
+ "Puppet"
2422
+ ]
2423
+ }
2424
+ },
2384
2425
  "/rooms/{id}/add/{contactId}": {
2385
2426
  "put": {
2386
2427
  "operationId": "Puppet_RoomAdd",
@@ -2544,6 +2585,47 @@
2544
2585
  ]
2545
2586
  }
2546
2587
  },
2588
+ "/rooms/{id}/del/admins/{contactIds}": {
2589
+ "delete": {
2590
+ "operationId": "Puppet_RoomDelAdmins",
2591
+ "responses": {
2592
+ "200": {
2593
+ "description": "A successful response.",
2594
+ "schema": {
2595
+ "$ref": "#/definitions/puppetRoomAdminsResponse"
2596
+ }
2597
+ },
2598
+ "default": {
2599
+ "description": "An unexpected error response.",
2600
+ "schema": {
2601
+ "$ref": "#/definitions/rpcStatus"
2602
+ }
2603
+ }
2604
+ },
2605
+ "parameters": [
2606
+ {
2607
+ "name": "id",
2608
+ "in": "path",
2609
+ "required": true,
2610
+ "type": "string"
2611
+ },
2612
+ {
2613
+ "name": "contactIds",
2614
+ "in": "path",
2615
+ "required": true,
2616
+ "type": "array",
2617
+ "items": {
2618
+ "type": "string"
2619
+ },
2620
+ "collectionFormat": "csv",
2621
+ "minItems": 1
2622
+ }
2623
+ ],
2624
+ "tags": [
2625
+ "Puppet"
2626
+ ]
2627
+ }
2628
+ },
2547
2629
  "/rooms/{id}/dirty/members/{type}": {
2548
2630
  "put": {
2549
2631
  "operationId": "Puppet_DirtyPayload4",
@@ -4788,6 +4870,9 @@
4788
4870
  "puppetRoomAddResponse": {
4789
4871
  "type": "object"
4790
4872
  },
4873
+ "puppetRoomAdminsResponse": {
4874
+ "type": "object"
4875
+ },
4791
4876
  "puppetRoomAnnounceResponse": {
4792
4877
  "type": "object",
4793
4878
  "properties": {
@@ -89,6 +89,8 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
89
89
  roomAnnounce: IPuppetService_IRoomAnnounce;
90
90
  roomOwnerTransfer: IPuppetService_IRoomOwnerTransfer;
91
91
  roomPermission: IPuppetService_IRoomPermission;
92
+ roomAddAdmins: IPuppetService_IRoomAddAdmins;
93
+ roomDelAdmins: IPuppetService_IRoomDelAdmins;
92
94
  roomMemberPayload: IPuppetService_IRoomMemberPayload;
93
95
  roomMemberList: IPuppetService_IRoomMemberList;
94
96
  roomInvitationPayload: IPuppetService_IRoomInvitationPayload;
@@ -703,6 +705,24 @@ interface IPuppetService_IRoomPermission extends grpc.MethodDefinition<wechaty_p
703
705
  responseSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomPermissionResponse>;
704
706
  responseDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomPermissionResponse>;
705
707
  }
708
+ interface IPuppetService_IRoomAddAdmins extends grpc.MethodDefinition<wechaty_puppet_room_pb.RoomAdminsRequest, wechaty_puppet_room_pb.RoomAdminsResponse> {
709
+ path: "/wechaty.Puppet/RoomAddAdmins";
710
+ requestStream: false;
711
+ responseStream: false;
712
+ requestSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomAdminsRequest>;
713
+ requestDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomAdminsRequest>;
714
+ responseSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomAdminsResponse>;
715
+ responseDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomAdminsResponse>;
716
+ }
717
+ interface IPuppetService_IRoomDelAdmins extends grpc.MethodDefinition<wechaty_puppet_room_pb.RoomAdminsRequest, wechaty_puppet_room_pb.RoomAdminsResponse> {
718
+ path: "/wechaty.Puppet/RoomDelAdmins";
719
+ requestStream: false;
720
+ responseStream: false;
721
+ requestSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomAdminsRequest>;
722
+ requestDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomAdminsRequest>;
723
+ responseSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomAdminsResponse>;
724
+ responseDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomAdminsResponse>;
725
+ }
706
726
  interface IPuppetService_IRoomMemberPayload extends grpc.MethodDefinition<wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, wechaty_puppet_room_member_pb.RoomMemberPayloadResponse> {
707
727
  path: "/wechaty.Puppet/RoomMemberPayload";
708
728
  requestStream: false;
@@ -1015,6 +1035,8 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1015
1035
  roomAnnounce: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomAnnounceRequest, wechaty_puppet_room_pb.RoomAnnounceResponse>;
1016
1036
  roomOwnerTransfer: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomOwnerTransferRequest, wechaty_puppet_room_pb.RoomOwnerTransferResponse>;
1017
1037
  roomPermission: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomPermissionRequest, wechaty_puppet_room_pb.RoomPermissionResponse>;
1038
+ roomAddAdmins: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomAdminsRequest, wechaty_puppet_room_pb.RoomAdminsResponse>;
1039
+ roomDelAdmins: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomAdminsRequest, wechaty_puppet_room_pb.RoomAdminsResponse>;
1018
1040
  roomMemberPayload: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, wechaty_puppet_room_member_pb.RoomMemberPayloadResponse>;
1019
1041
  roomMemberList: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.RoomMemberListRequest, wechaty_puppet_room_member_pb.RoomMemberListResponse>;
1020
1042
  roomInvitationPayload: grpc.handleUnaryCall<wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse>;
@@ -1239,6 +1261,12 @@ export interface IPuppetClient {
1239
1261
  roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1240
1262
  roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1241
1263
  roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1264
+ roomAddAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1265
+ roomAddAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1266
+ roomAddAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1267
+ roomDelAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1268
+ roomDelAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1269
+ roomDelAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1242
1270
  roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1243
1271
  roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1244
1272
  roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
@@ -1518,6 +1546,12 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1518
1546
  public roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1519
1547
  public roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1520
1548
  public roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1549
+ public roomAddAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1550
+ public roomAddAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1551
+ public roomAddAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1552
+ public roomDelAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1553
+ public roomDelAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1554
+ public roomDelAdmins(request: wechaty_puppet_room_pb.RoomAdminsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAdminsResponse) => void): grpc.ClientUnaryCall;
1521
1555
  public roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1522
1556
  public roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1523
1557
  public roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
@@ -1297,6 +1297,28 @@ function deserialize_wechaty_puppet_RoomAddResponse(buffer_arg) {
1297
1297
  return wechaty_puppet_room_pb.RoomAddResponse.deserializeBinary(new Uint8Array(buffer_arg));
1298
1298
  }
1299
1299
 
1300
+ function serialize_wechaty_puppet_RoomAdminsRequest(arg) {
1301
+ if (!(arg instanceof wechaty_puppet_room_pb.RoomAdminsRequest)) {
1302
+ throw new Error('Expected argument of type wechaty.puppet.RoomAdminsRequest');
1303
+ }
1304
+ return Buffer.from(arg.serializeBinary());
1305
+ }
1306
+
1307
+ function deserialize_wechaty_puppet_RoomAdminsRequest(buffer_arg) {
1308
+ return wechaty_puppet_room_pb.RoomAdminsRequest.deserializeBinary(new Uint8Array(buffer_arg));
1309
+ }
1310
+
1311
+ function serialize_wechaty_puppet_RoomAdminsResponse(arg) {
1312
+ if (!(arg instanceof wechaty_puppet_room_pb.RoomAdminsResponse)) {
1313
+ throw new Error('Expected argument of type wechaty.puppet.RoomAdminsResponse');
1314
+ }
1315
+ return Buffer.from(arg.serializeBinary());
1316
+ }
1317
+
1318
+ function deserialize_wechaty_puppet_RoomAdminsResponse(buffer_arg) {
1319
+ return wechaty_puppet_room_pb.RoomAdminsResponse.deserializeBinary(new Uint8Array(buffer_arg));
1320
+ }
1321
+
1300
1322
  function serialize_wechaty_puppet_RoomAnnounceRequest(arg) {
1301
1323
  if (!(arg instanceof wechaty_puppet_room_pb.RoomAnnounceRequest)) {
1302
1324
  throw new Error('Expected argument of type wechaty.puppet.RoomAnnounceRequest');
@@ -2778,6 +2800,28 @@ roomPayload: {
2778
2800
  responseSerialize: serialize_wechaty_puppet_RoomPermissionResponse,
2779
2801
  responseDeserialize: deserialize_wechaty_puppet_RoomPermissionResponse,
2780
2802
  },
2803
+ roomAddAdmins: {
2804
+ path: '/wechaty.Puppet/RoomAddAdmins',
2805
+ requestStream: false,
2806
+ responseStream: false,
2807
+ requestType: wechaty_puppet_room_pb.RoomAdminsRequest,
2808
+ responseType: wechaty_puppet_room_pb.RoomAdminsResponse,
2809
+ requestSerialize: serialize_wechaty_puppet_RoomAdminsRequest,
2810
+ requestDeserialize: deserialize_wechaty_puppet_RoomAdminsRequest,
2811
+ responseSerialize: serialize_wechaty_puppet_RoomAdminsResponse,
2812
+ responseDeserialize: deserialize_wechaty_puppet_RoomAdminsResponse,
2813
+ },
2814
+ roomDelAdmins: {
2815
+ path: '/wechaty.Puppet/RoomDelAdmins',
2816
+ requestStream: false,
2817
+ responseStream: false,
2818
+ requestType: wechaty_puppet_room_pb.RoomAdminsRequest,
2819
+ responseType: wechaty_puppet_room_pb.RoomAdminsResponse,
2820
+ requestSerialize: serialize_wechaty_puppet_RoomAdminsRequest,
2821
+ requestDeserialize: deserialize_wechaty_puppet_RoomAdminsRequest,
2822
+ responseSerialize: serialize_wechaty_puppet_RoomAdminsResponse,
2823
+ responseDeserialize: deserialize_wechaty_puppet_RoomAdminsResponse,
2824
+ },
2781
2825
  // *
2782
2826
  //
2783
2827
  // Room Member
@@ -603,6 +603,24 @@ type PuppetRoomPermission = {
603
603
  readonly responseType: typeof wechaty_puppet_room_pb.RoomPermissionResponse;
604
604
  };
605
605
 
606
+ type PuppetRoomAddAdmins = {
607
+ readonly methodName: string;
608
+ readonly service: typeof Puppet;
609
+ readonly requestStream: false;
610
+ readonly responseStream: false;
611
+ readonly requestType: typeof wechaty_puppet_room_pb.RoomAdminsRequest;
612
+ readonly responseType: typeof wechaty_puppet_room_pb.RoomAdminsResponse;
613
+ };
614
+
615
+ type PuppetRoomDelAdmins = {
616
+ readonly methodName: string;
617
+ readonly service: typeof Puppet;
618
+ readonly requestStream: false;
619
+ readonly responseStream: false;
620
+ readonly requestType: typeof wechaty_puppet_room_pb.RoomAdminsRequest;
621
+ readonly responseType: typeof wechaty_puppet_room_pb.RoomAdminsResponse;
622
+ };
623
+
606
624
  type PuppetRoomMemberPayload = {
607
625
  readonly methodName: string;
608
626
  readonly service: typeof Puppet;
@@ -913,6 +931,8 @@ export class Puppet {
913
931
  static readonly RoomAnnounce: PuppetRoomAnnounce;
914
932
  static readonly RoomOwnerTransfer: PuppetRoomOwnerTransfer;
915
933
  static readonly RoomPermission: PuppetRoomPermission;
934
+ static readonly RoomAddAdmins: PuppetRoomAddAdmins;
935
+ static readonly RoomDelAdmins: PuppetRoomDelAdmins;
916
936
  static readonly RoomMemberPayload: PuppetRoomMemberPayload;
917
937
  static readonly RoomMemberList: PuppetRoomMemberList;
918
938
  static readonly RoomInvitationPayload: PuppetRoomInvitationPayload;
@@ -1551,6 +1571,24 @@ export class PuppetClient {
1551
1571
  requestMessage: wechaty_puppet_room_pb.RoomPermissionRequest,
1552
1572
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomPermissionResponse|null) => void
1553
1573
  ): UnaryResponse;
1574
+ roomAddAdmins(
1575
+ requestMessage: wechaty_puppet_room_pb.RoomAdminsRequest,
1576
+ metadata: grpc.Metadata,
1577
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomAdminsResponse|null) => void
1578
+ ): UnaryResponse;
1579
+ roomAddAdmins(
1580
+ requestMessage: wechaty_puppet_room_pb.RoomAdminsRequest,
1581
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomAdminsResponse|null) => void
1582
+ ): UnaryResponse;
1583
+ roomDelAdmins(
1584
+ requestMessage: wechaty_puppet_room_pb.RoomAdminsRequest,
1585
+ metadata: grpc.Metadata,
1586
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomAdminsResponse|null) => void
1587
+ ): UnaryResponse;
1588
+ roomDelAdmins(
1589
+ requestMessage: wechaty_puppet_room_pb.RoomAdminsRequest,
1590
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomAdminsResponse|null) => void
1591
+ ): UnaryResponse;
1554
1592
  roomMemberPayload(
1555
1593
  requestMessage: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest,
1556
1594
  metadata: grpc.Metadata,
@@ -609,6 +609,24 @@ Puppet.RoomPermission = {
609
609
  responseType: wechaty_puppet_room_pb.RoomPermissionResponse
610
610
  };
611
611
 
612
+ Puppet.RoomAddAdmins = {
613
+ methodName: "RoomAddAdmins",
614
+ service: Puppet,
615
+ requestStream: false,
616
+ responseStream: false,
617
+ requestType: wechaty_puppet_room_pb.RoomAdminsRequest,
618
+ responseType: wechaty_puppet_room_pb.RoomAdminsResponse
619
+ };
620
+
621
+ Puppet.RoomDelAdmins = {
622
+ methodName: "RoomDelAdmins",
623
+ service: Puppet,
624
+ requestStream: false,
625
+ responseStream: false,
626
+ requestType: wechaty_puppet_room_pb.RoomAdminsRequest,
627
+ responseType: wechaty_puppet_room_pb.RoomAdminsResponse
628
+ };
629
+
612
630
  Puppet.RoomMemberPayload = {
613
631
  methodName: "RoomMemberPayload",
614
632
  service: Puppet,
@@ -2882,6 +2900,68 @@ PuppetClient.prototype.roomPermission = function roomPermission(requestMessage,
2882
2900
  };
2883
2901
  };
2884
2902
 
2903
+ PuppetClient.prototype.roomAddAdmins = function roomAddAdmins(requestMessage, metadata, callback) {
2904
+ if (arguments.length === 2) {
2905
+ callback = arguments[1];
2906
+ }
2907
+ var client = grpc.unary(Puppet.RoomAddAdmins, {
2908
+ request: requestMessage,
2909
+ host: this.serviceHost,
2910
+ metadata: metadata,
2911
+ transport: this.options.transport,
2912
+ debug: this.options.debug,
2913
+ onEnd: function (response) {
2914
+ if (callback) {
2915
+ if (response.status !== grpc.Code.OK) {
2916
+ var err = new Error(response.statusMessage);
2917
+ err.code = response.status;
2918
+ err.metadata = response.trailers;
2919
+ callback(err, null);
2920
+ } else {
2921
+ callback(null, response.message);
2922
+ }
2923
+ }
2924
+ }
2925
+ });
2926
+ return {
2927
+ cancel: function () {
2928
+ callback = null;
2929
+ client.close();
2930
+ }
2931
+ };
2932
+ };
2933
+
2934
+ PuppetClient.prototype.roomDelAdmins = function roomDelAdmins(requestMessage, metadata, callback) {
2935
+ if (arguments.length === 2) {
2936
+ callback = arguments[1];
2937
+ }
2938
+ var client = grpc.unary(Puppet.RoomDelAdmins, {
2939
+ request: requestMessage,
2940
+ host: this.serviceHost,
2941
+ metadata: metadata,
2942
+ transport: this.options.transport,
2943
+ debug: this.options.debug,
2944
+ onEnd: function (response) {
2945
+ if (callback) {
2946
+ if (response.status !== grpc.Code.OK) {
2947
+ var err = new Error(response.statusMessage);
2948
+ err.code = response.status;
2949
+ err.metadata = response.trailers;
2950
+ callback(err, null);
2951
+ } else {
2952
+ callback(null, response.message);
2953
+ }
2954
+ }
2955
+ }
2956
+ });
2957
+ return {
2958
+ cancel: function () {
2959
+ callback = null;
2960
+ client.close();
2961
+ }
2962
+ };
2963
+ };
2964
+
2885
2965
  PuppetClient.prototype.roomMemberPayload = function roomMemberPayload(requestMessage, metadata, callback) {
2886
2966
  if (arguments.length === 2) {
2887
2967
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
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.62",
7
+ "version": "1.0.63",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {