@juzi/wechaty-grpc 1.0.53 → 1.0.55

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 (64) hide show
  1. package/dist/cjs/examples/promisify.d.ts +5 -5
  2. package/dist/cjs/examples/promisify.d.ts.map +1 -1
  3. package/dist/cjs/out/wechaty/puppet/event_pb.d.ts +12 -0
  4. package/dist/cjs/out/wechaty/puppet/event_pb.js +91 -2
  5. package/dist/cjs/out/wechaty/puppet/room_pb.d.ts +100 -0
  6. package/dist/cjs/out/wechaty/puppet/room_pb.js +759 -0
  7. package/dist/cjs/out/wechaty/puppet.openapi.yaml +81 -1
  8. package/dist/cjs/out/wechaty/puppet.swagger.json +123 -1
  9. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  10. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
  11. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
  12. package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
  13. package/dist/cjs/proto/wechaty/puppet/event.proto +5 -1
  14. package/dist/cjs/proto/wechaty/puppet/room.proto +20 -0
  15. package/dist/cjs/proto/wechaty/puppet.proto +12 -0
  16. package/dist/cjs/src/chunk-transformer.d.ts +1 -1
  17. package/dist/cjs/src/chunk-transformer.d.ts.map +1 -1
  18. package/dist/cjs/src/config.d.ts +1 -1
  19. package/dist/cjs/src/config.d.ts.map +1 -1
  20. package/dist/cjs/src/package-json.d.ts.map +1 -1
  21. package/dist/cjs/src/package-json.js +5 -4
  22. package/dist/cjs/src/package-json.js.map +1 -1
  23. package/dist/cjs/tests/puppet-server-impl.d.ts +1 -1
  24. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  25. package/dist/cjs/tests/puppet-server-impl.js +10 -0
  26. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  27. package/dist/esm/examples/promisify.d.ts +5 -5
  28. package/dist/esm/examples/promisify.d.ts.map +1 -1
  29. package/dist/esm/out/wechaty/puppet/event_pb.d.ts +12 -0
  30. package/dist/esm/out/wechaty/puppet/event_pb.js +91 -2
  31. package/dist/esm/out/wechaty/puppet/room_pb.d.ts +100 -0
  32. package/dist/esm/out/wechaty/puppet/room_pb.js +759 -0
  33. package/dist/esm/out/wechaty/puppet.openapi.yaml +81 -1
  34. package/dist/esm/out/wechaty/puppet.swagger.json +123 -1
  35. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  36. package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
  37. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
  38. package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
  39. package/dist/esm/proto/wechaty/puppet/event.proto +5 -1
  40. package/dist/esm/proto/wechaty/puppet/room.proto +20 -0
  41. package/dist/esm/proto/wechaty/puppet.proto +12 -0
  42. package/dist/esm/src/chunk-transformer.d.ts +1 -1
  43. package/dist/esm/src/chunk-transformer.d.ts.map +1 -1
  44. package/dist/esm/src/config.d.ts +1 -1
  45. package/dist/esm/src/config.d.ts.map +1 -1
  46. package/dist/esm/src/package-json.d.ts.map +1 -1
  47. package/dist/esm/src/package-json.js +5 -4
  48. package/dist/esm/src/package-json.js.map +1 -1
  49. package/dist/esm/tests/puppet-server-impl.d.ts +1 -1
  50. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  51. package/dist/esm/tests/puppet-server-impl.js +10 -0
  52. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  53. package/out/wechaty/puppet/event_pb.d.ts +12 -0
  54. package/out/wechaty/puppet/event_pb.js +91 -2
  55. package/out/wechaty/puppet/room_pb.d.ts +100 -0
  56. package/out/wechaty/puppet/room_pb.js +759 -0
  57. package/out/wechaty/puppet.openapi.yaml +81 -1
  58. package/out/wechaty/puppet.swagger.json +123 -1
  59. package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  60. package/out/wechaty/puppet_grpc_pb.js +66 -0
  61. package/out/wechaty/puppet_pb_service.d.ts +38 -0
  62. package/out/wechaty/puppet_pb_service.js +80 -0
  63. package/package.json +5 -4
  64. package/src/package-json.ts +5 -4
@@ -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.53
12
+ version: 1.0.55
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -774,6 +774,18 @@ paths:
774
774
  description: An unexpected error response.
775
775
  schema:
776
776
  $ref: '#/definitions/rpcStatus'
777
+ parameters:
778
+ - name: seq
779
+ description: the seq of the last event
780
+ in: query
781
+ required: false
782
+ type: integer
783
+ format: int32
784
+ - name: accountId
785
+ description: the accountId of the last event
786
+ in: query
787
+ required: false
788
+ type: string
777
789
  tags:
778
790
  - Puppet
779
791
  '/friendship/accept/{id}':
@@ -1762,6 +1774,37 @@ paths:
1762
1774
  type: string
1763
1775
  tags:
1764
1776
  - Puppet
1777
+ '/rooms/{id}/permission':
1778
+ get:
1779
+ operationId: Puppet_RoomPermission
1780
+ responses:
1781
+ '200':
1782
+ description: A successful response.
1783
+ schema:
1784
+ $ref: '#/definitions/puppetRoomPermissionResponse'
1785
+ default:
1786
+ description: An unexpected error response.
1787
+ schema:
1788
+ $ref: '#/definitions/rpcStatus'
1789
+ parameters:
1790
+ - name: id
1791
+ in: path
1792
+ required: true
1793
+ type: string
1794
+ - name: sendMessage
1795
+ in: query
1796
+ required: false
1797
+ type: boolean
1798
+ - name: invitationCheck
1799
+ in: query
1800
+ required: false
1801
+ type: boolean
1802
+ - name: roomTopicEdit
1803
+ in: query
1804
+ required: false
1805
+ type: boolean
1806
+ tags:
1807
+ - Puppet
1765
1808
  '/rooms/{id}/qrcode':
1766
1809
  get:
1767
1810
  operationId: Puppet_RoomQRCode
@@ -1832,6 +1875,29 @@ paths:
1832
1875
  type: string
1833
1876
  tags:
1834
1877
  - Puppet
1878
+ '/rooms/{id}/transfer/{contactId}':
1879
+ post:
1880
+ operationId: Puppet_RoomOwnerTransfer
1881
+ responses:
1882
+ '200':
1883
+ description: A successful response.
1884
+ schema:
1885
+ $ref: '#/definitions/puppetRoomOwnerTransferResponse'
1886
+ default:
1887
+ description: An unexpected error response.
1888
+ schema:
1889
+ $ref: '#/definitions/rpcStatus'
1890
+ parameters:
1891
+ - name: id
1892
+ in: path
1893
+ required: true
1894
+ type: string
1895
+ - name: contactId
1896
+ in: path
1897
+ required: true
1898
+ type: string
1899
+ tags:
1900
+ - Puppet
1835
1901
  /start:
1836
1902
  put:
1837
1903
  summary: '*'
@@ -2496,6 +2562,9 @@ definitions:
2496
2562
  type: string
2497
2563
  description: 'JSON.stringify({ ... })'
2498
2564
  title: 'TODO: Huan(202002) consider to use a PB Map?'
2565
+ seq:
2566
+ type: integer
2567
+ format: int32
2499
2568
  puppetEventType:
2500
2569
  type: string
2501
2570
  enum:
@@ -3305,6 +3374,8 @@ definitions:
3305
3374
  format: double
3306
3375
  joinScene:
3307
3376
  $ref: '#/definitions/puppetRoomMemberJoinSceneType'
3377
+ puppetRoomOwnerTransferResponse:
3378
+ type: object
3308
3379
  puppetRoomPayloadResponse:
3309
3380
  type: object
3310
3381
  properties:
@@ -3336,6 +3407,15 @@ definitions:
3336
3407
  type: string
3337
3408
  roomRemark:
3338
3409
  type: string
3410
+ puppetRoomPermissionResponse:
3411
+ type: object
3412
+ properties:
3413
+ sendMessage:
3414
+ type: boolean
3415
+ invitationCheck:
3416
+ type: boolean
3417
+ roomTopicEdit:
3418
+ type: boolean
3339
3419
  puppetRoomQRCodeResponse:
3340
3420
  type: object
3341
3421
  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.53",
6
+ "version": "1.0.55",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -1134,6 +1134,23 @@
1134
1134
  }
1135
1135
  }
1136
1136
  },
1137
+ "parameters": [
1138
+ {
1139
+ "name": "seq",
1140
+ "description": "the seq of the last event",
1141
+ "in": "query",
1142
+ "required": false,
1143
+ "type": "integer",
1144
+ "format": "int32"
1145
+ },
1146
+ {
1147
+ "name": "accountId",
1148
+ "description": "the accountId of the last event",
1149
+ "in": "query",
1150
+ "required": false,
1151
+ "type": "string"
1152
+ }
1153
+ ],
1137
1154
  "tags": [
1138
1155
  "Puppet"
1139
1156
  ]
@@ -2614,6 +2631,54 @@
2614
2631
  ]
2615
2632
  }
2616
2633
  },
2634
+ "/rooms/{id}/permission": {
2635
+ "get": {
2636
+ "operationId": "Puppet_RoomPermission",
2637
+ "responses": {
2638
+ "200": {
2639
+ "description": "A successful response.",
2640
+ "schema": {
2641
+ "$ref": "#/definitions/puppetRoomPermissionResponse"
2642
+ }
2643
+ },
2644
+ "default": {
2645
+ "description": "An unexpected error response.",
2646
+ "schema": {
2647
+ "$ref": "#/definitions/rpcStatus"
2648
+ }
2649
+ }
2650
+ },
2651
+ "parameters": [
2652
+ {
2653
+ "name": "id",
2654
+ "in": "path",
2655
+ "required": true,
2656
+ "type": "string"
2657
+ },
2658
+ {
2659
+ "name": "sendMessage",
2660
+ "in": "query",
2661
+ "required": false,
2662
+ "type": "boolean"
2663
+ },
2664
+ {
2665
+ "name": "invitationCheck",
2666
+ "in": "query",
2667
+ "required": false,
2668
+ "type": "boolean"
2669
+ },
2670
+ {
2671
+ "name": "roomTopicEdit",
2672
+ "in": "query",
2673
+ "required": false,
2674
+ "type": "boolean"
2675
+ }
2676
+ ],
2677
+ "tags": [
2678
+ "Puppet"
2679
+ ]
2680
+ }
2681
+ },
2617
2682
  "/rooms/{id}/qrcode": {
2618
2683
  "get": {
2619
2684
  "operationId": "Puppet_RoomQRCode",
@@ -2723,6 +2788,42 @@
2723
2788
  ]
2724
2789
  }
2725
2790
  },
2791
+ "/rooms/{id}/transfer/{contactId}": {
2792
+ "post": {
2793
+ "operationId": "Puppet_RoomOwnerTransfer",
2794
+ "responses": {
2795
+ "200": {
2796
+ "description": "A successful response.",
2797
+ "schema": {
2798
+ "$ref": "#/definitions/puppetRoomOwnerTransferResponse"
2799
+ }
2800
+ },
2801
+ "default": {
2802
+ "description": "An unexpected error response.",
2803
+ "schema": {
2804
+ "$ref": "#/definitions/rpcStatus"
2805
+ }
2806
+ }
2807
+ },
2808
+ "parameters": [
2809
+ {
2810
+ "name": "id",
2811
+ "in": "path",
2812
+ "required": true,
2813
+ "type": "string"
2814
+ },
2815
+ {
2816
+ "name": "contactId",
2817
+ "in": "path",
2818
+ "required": true,
2819
+ "type": "string"
2820
+ }
2821
+ ],
2822
+ "tags": [
2823
+ "Puppet"
2824
+ ]
2825
+ }
2826
+ },
2726
2827
  "/start": {
2727
2828
  "put": {
2728
2829
  "summary": "*",
@@ -3669,6 +3770,10 @@
3669
3770
  "type": "string",
3670
3771
  "description": "JSON.stringify({ ... })",
3671
3772
  "title": "TODO: Huan(202002) consider to use a PB Map?"
3773
+ },
3774
+ "seq": {
3775
+ "type": "integer",
3776
+ "format": "int32"
3672
3777
  }
3673
3778
  }
3674
3779
  },
@@ -4664,6 +4769,9 @@
4664
4769
  }
4665
4770
  }
4666
4771
  },
4772
+ "puppetRoomOwnerTransferResponse": {
4773
+ "type": "object"
4774
+ },
4667
4775
  "puppetRoomPayloadResponse": {
4668
4776
  "type": "object",
4669
4777
  "properties": {
@@ -4708,6 +4816,20 @@
4708
4816
  }
4709
4817
  }
4710
4818
  },
4819
+ "puppetRoomPermissionResponse": {
4820
+ "type": "object",
4821
+ "properties": {
4822
+ "sendMessage": {
4823
+ "type": "boolean"
4824
+ },
4825
+ "invitationCheck": {
4826
+ "type": "boolean"
4827
+ },
4828
+ "roomTopicEdit": {
4829
+ "type": "boolean"
4830
+ }
4831
+ }
4832
+ },
4711
4833
  "puppetRoomQRCodeResponse": {
4712
4834
  "type": "object",
4713
4835
  "properties": {
@@ -82,6 +82,8 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
82
82
  roomRemark: IPuppetService_IRoomRemark;
83
83
  roomQRCode: IPuppetService_IRoomQRCode;
84
84
  roomAnnounce: IPuppetService_IRoomAnnounce;
85
+ roomOwnerTransfer: IPuppetService_IRoomOwnerTransfer;
86
+ roomPermission: IPuppetService_IRoomPermission;
85
87
  roomMemberPayload: IPuppetService_IRoomMemberPayload;
86
88
  roomMemberList: IPuppetService_IRoomMemberList;
87
89
  roomInvitationPayload: IPuppetService_IRoomInvitationPayload;
@@ -642,6 +644,24 @@ interface IPuppetService_IRoomAnnounce extends grpc.MethodDefinition<wechaty_pup
642
644
  responseSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomAnnounceResponse>;
643
645
  responseDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomAnnounceResponse>;
644
646
  }
647
+ interface IPuppetService_IRoomOwnerTransfer extends grpc.MethodDefinition<wechaty_puppet_room_pb.RoomOwnerTransferRequest, wechaty_puppet_room_pb.RoomOwnerTransferResponse> {
648
+ path: "/wechaty.Puppet/RoomOwnerTransfer";
649
+ requestStream: false;
650
+ responseStream: false;
651
+ requestSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomOwnerTransferRequest>;
652
+ requestDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomOwnerTransferRequest>;
653
+ responseSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomOwnerTransferResponse>;
654
+ responseDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomOwnerTransferResponse>;
655
+ }
656
+ interface IPuppetService_IRoomPermission extends grpc.MethodDefinition<wechaty_puppet_room_pb.RoomPermissionRequest, wechaty_puppet_room_pb.RoomPermissionResponse> {
657
+ path: "/wechaty.Puppet/RoomPermission";
658
+ requestStream: false;
659
+ responseStream: false;
660
+ requestSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomPermissionRequest>;
661
+ requestDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomPermissionRequest>;
662
+ responseSerialize: grpc.serialize<wechaty_puppet_room_pb.RoomPermissionResponse>;
663
+ responseDeserialize: grpc.deserialize<wechaty_puppet_room_pb.RoomPermissionResponse>;
664
+ }
645
665
  interface IPuppetService_IRoomMemberPayload extends grpc.MethodDefinition<wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, wechaty_puppet_room_member_pb.RoomMemberPayloadResponse> {
646
666
  path: "/wechaty.Puppet/RoomMemberPayload";
647
667
  requestStream: false;
@@ -948,6 +968,8 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
948
968
  roomRemark: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomRemarkRequest, wechaty_puppet_room_pb.RoomRemarkResponse>;
949
969
  roomQRCode: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomQRCodeRequest, wechaty_puppet_room_pb.RoomQRCodeResponse>;
950
970
  roomAnnounce: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomAnnounceRequest, wechaty_puppet_room_pb.RoomAnnounceResponse>;
971
+ roomOwnerTransfer: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomOwnerTransferRequest, wechaty_puppet_room_pb.RoomOwnerTransferResponse>;
972
+ roomPermission: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomPermissionRequest, wechaty_puppet_room_pb.RoomPermissionResponse>;
951
973
  roomMemberPayload: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, wechaty_puppet_room_member_pb.RoomMemberPayloadResponse>;
952
974
  roomMemberList: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.RoomMemberListRequest, wechaty_puppet_room_member_pb.RoomMemberListResponse>;
953
975
  roomInvitationPayload: grpc.handleUnaryCall<wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse>;
@@ -1154,6 +1176,12 @@ export interface IPuppetClient {
1154
1176
  roomAnnounce(request: wechaty_puppet_room_pb.RoomAnnounceRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAnnounceResponse) => void): grpc.ClientUnaryCall;
1155
1177
  roomAnnounce(request: wechaty_puppet_room_pb.RoomAnnounceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAnnounceResponse) => void): grpc.ClientUnaryCall;
1156
1178
  roomAnnounce(request: wechaty_puppet_room_pb.RoomAnnounceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAnnounceResponse) => void): grpc.ClientUnaryCall;
1179
+ roomOwnerTransfer(request: wechaty_puppet_room_pb.RoomOwnerTransferRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomOwnerTransferResponse) => void): grpc.ClientUnaryCall;
1180
+ roomOwnerTransfer(request: wechaty_puppet_room_pb.RoomOwnerTransferRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomOwnerTransferResponse) => void): grpc.ClientUnaryCall;
1181
+ roomOwnerTransfer(request: wechaty_puppet_room_pb.RoomOwnerTransferRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomOwnerTransferResponse) => void): grpc.ClientUnaryCall;
1182
+ roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1183
+ roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1184
+ 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;
1157
1185
  roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1158
1186
  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;
1159
1187
  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;
@@ -1415,6 +1443,12 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1415
1443
  public roomAnnounce(request: wechaty_puppet_room_pb.RoomAnnounceRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAnnounceResponse) => void): grpc.ClientUnaryCall;
1416
1444
  public roomAnnounce(request: wechaty_puppet_room_pb.RoomAnnounceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAnnounceResponse) => void): grpc.ClientUnaryCall;
1417
1445
  public roomAnnounce(request: wechaty_puppet_room_pb.RoomAnnounceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomAnnounceResponse) => void): grpc.ClientUnaryCall;
1446
+ public roomOwnerTransfer(request: wechaty_puppet_room_pb.RoomOwnerTransferRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomOwnerTransferResponse) => void): grpc.ClientUnaryCall;
1447
+ public roomOwnerTransfer(request: wechaty_puppet_room_pb.RoomOwnerTransferRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomOwnerTransferResponse) => void): grpc.ClientUnaryCall;
1448
+ public roomOwnerTransfer(request: wechaty_puppet_room_pb.RoomOwnerTransferRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomOwnerTransferResponse) => void): grpc.ClientUnaryCall;
1449
+ public roomPermission(request: wechaty_puppet_room_pb.RoomPermissionRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPermissionResponse) => void): grpc.ClientUnaryCall;
1450
+ 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;
1451
+ 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;
1418
1452
  public roomMemberPayload(request: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1419
1453
  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;
1420
1454
  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;
@@ -1417,6 +1417,28 @@ function deserialize_wechaty_puppet_RoomMemberPayloadResponse(buffer_arg) {
1417
1417
  return wechaty_puppet_room$member_pb.RoomMemberPayloadResponse.deserializeBinary(new Uint8Array(buffer_arg));
1418
1418
  }
1419
1419
 
1420
+ function serialize_wechaty_puppet_RoomOwnerTransferRequest(arg) {
1421
+ if (!(arg instanceof wechaty_puppet_room_pb.RoomOwnerTransferRequest)) {
1422
+ throw new Error('Expected argument of type wechaty.puppet.RoomOwnerTransferRequest');
1423
+ }
1424
+ return Buffer.from(arg.serializeBinary());
1425
+ }
1426
+
1427
+ function deserialize_wechaty_puppet_RoomOwnerTransferRequest(buffer_arg) {
1428
+ return wechaty_puppet_room_pb.RoomOwnerTransferRequest.deserializeBinary(new Uint8Array(buffer_arg));
1429
+ }
1430
+
1431
+ function serialize_wechaty_puppet_RoomOwnerTransferResponse(arg) {
1432
+ if (!(arg instanceof wechaty_puppet_room_pb.RoomOwnerTransferResponse)) {
1433
+ throw new Error('Expected argument of type wechaty.puppet.RoomOwnerTransferResponse');
1434
+ }
1435
+ return Buffer.from(arg.serializeBinary());
1436
+ }
1437
+
1438
+ function deserialize_wechaty_puppet_RoomOwnerTransferResponse(buffer_arg) {
1439
+ return wechaty_puppet_room_pb.RoomOwnerTransferResponse.deserializeBinary(new Uint8Array(buffer_arg));
1440
+ }
1441
+
1420
1442
  function serialize_wechaty_puppet_RoomPayloadRequest(arg) {
1421
1443
  if (!(arg instanceof wechaty_puppet_room_pb.RoomPayloadRequest)) {
1422
1444
  throw new Error('Expected argument of type wechaty.puppet.RoomPayloadRequest');
@@ -1439,6 +1461,28 @@ function deserialize_wechaty_puppet_RoomPayloadResponse(buffer_arg) {
1439
1461
  return wechaty_puppet_room_pb.RoomPayloadResponse.deserializeBinary(new Uint8Array(buffer_arg));
1440
1462
  }
1441
1463
 
1464
+ function serialize_wechaty_puppet_RoomPermissionRequest(arg) {
1465
+ if (!(arg instanceof wechaty_puppet_room_pb.RoomPermissionRequest)) {
1466
+ throw new Error('Expected argument of type wechaty.puppet.RoomPermissionRequest');
1467
+ }
1468
+ return Buffer.from(arg.serializeBinary());
1469
+ }
1470
+
1471
+ function deserialize_wechaty_puppet_RoomPermissionRequest(buffer_arg) {
1472
+ return wechaty_puppet_room_pb.RoomPermissionRequest.deserializeBinary(new Uint8Array(buffer_arg));
1473
+ }
1474
+
1475
+ function serialize_wechaty_puppet_RoomPermissionResponse(arg) {
1476
+ if (!(arg instanceof wechaty_puppet_room_pb.RoomPermissionResponse)) {
1477
+ throw new Error('Expected argument of type wechaty.puppet.RoomPermissionResponse');
1478
+ }
1479
+ return Buffer.from(arg.serializeBinary());
1480
+ }
1481
+
1482
+ function deserialize_wechaty_puppet_RoomPermissionResponse(buffer_arg) {
1483
+ return wechaty_puppet_room_pb.RoomPermissionResponse.deserializeBinary(new Uint8Array(buffer_arg));
1484
+ }
1485
+
1442
1486
  function serialize_wechaty_puppet_RoomQRCodeRequest(arg) {
1443
1487
  if (!(arg instanceof wechaty_puppet_room_pb.RoomQRCodeRequest)) {
1444
1488
  throw new Error('Expected argument of type wechaty.puppet.RoomQRCodeRequest');
@@ -2590,6 +2634,28 @@ roomPayload: {
2590
2634
  responseSerialize: serialize_wechaty_puppet_RoomAnnounceResponse,
2591
2635
  responseDeserialize: deserialize_wechaty_puppet_RoomAnnounceResponse,
2592
2636
  },
2637
+ roomOwnerTransfer: {
2638
+ path: '/wechaty.Puppet/RoomOwnerTransfer',
2639
+ requestStream: false,
2640
+ responseStream: false,
2641
+ requestType: wechaty_puppet_room_pb.RoomOwnerTransferRequest,
2642
+ responseType: wechaty_puppet_room_pb.RoomOwnerTransferResponse,
2643
+ requestSerialize: serialize_wechaty_puppet_RoomOwnerTransferRequest,
2644
+ requestDeserialize: deserialize_wechaty_puppet_RoomOwnerTransferRequest,
2645
+ responseSerialize: serialize_wechaty_puppet_RoomOwnerTransferResponse,
2646
+ responseDeserialize: deserialize_wechaty_puppet_RoomOwnerTransferResponse,
2647
+ },
2648
+ roomPermission: {
2649
+ path: '/wechaty.Puppet/RoomPermission',
2650
+ requestStream: false,
2651
+ responseStream: false,
2652
+ requestType: wechaty_puppet_room_pb.RoomPermissionRequest,
2653
+ responseType: wechaty_puppet_room_pb.RoomPermissionResponse,
2654
+ requestSerialize: serialize_wechaty_puppet_RoomPermissionRequest,
2655
+ requestDeserialize: deserialize_wechaty_puppet_RoomPermissionRequest,
2656
+ responseSerialize: serialize_wechaty_puppet_RoomPermissionResponse,
2657
+ responseDeserialize: deserialize_wechaty_puppet_RoomPermissionResponse,
2658
+ },
2593
2659
  // *
2594
2660
  //
2595
2661
  // Room Member
@@ -548,6 +548,24 @@ type PuppetRoomAnnounce = {
548
548
  readonly responseType: typeof wechaty_puppet_room_pb.RoomAnnounceResponse;
549
549
  };
550
550
 
551
+ type PuppetRoomOwnerTransfer = {
552
+ readonly methodName: string;
553
+ readonly service: typeof Puppet;
554
+ readonly requestStream: false;
555
+ readonly responseStream: false;
556
+ readonly requestType: typeof wechaty_puppet_room_pb.RoomOwnerTransferRequest;
557
+ readonly responseType: typeof wechaty_puppet_room_pb.RoomOwnerTransferResponse;
558
+ };
559
+
560
+ type PuppetRoomPermission = {
561
+ readonly methodName: string;
562
+ readonly service: typeof Puppet;
563
+ readonly requestStream: false;
564
+ readonly responseStream: false;
565
+ readonly requestType: typeof wechaty_puppet_room_pb.RoomPermissionRequest;
566
+ readonly responseType: typeof wechaty_puppet_room_pb.RoomPermissionResponse;
567
+ };
568
+
551
569
  type PuppetRoomMemberPayload = {
552
570
  readonly methodName: string;
553
571
  readonly service: typeof Puppet;
@@ -852,6 +870,8 @@ export class Puppet {
852
870
  static readonly RoomRemark: PuppetRoomRemark;
853
871
  static readonly RoomQRCode: PuppetRoomQRCode;
854
872
  static readonly RoomAnnounce: PuppetRoomAnnounce;
873
+ static readonly RoomOwnerTransfer: PuppetRoomOwnerTransfer;
874
+ static readonly RoomPermission: PuppetRoomPermission;
855
875
  static readonly RoomMemberPayload: PuppetRoomMemberPayload;
856
876
  static readonly RoomMemberList: PuppetRoomMemberList;
857
877
  static readonly RoomInvitationPayload: PuppetRoomInvitationPayload;
@@ -1436,6 +1456,24 @@ export class PuppetClient {
1436
1456
  requestMessage: wechaty_puppet_room_pb.RoomAnnounceRequest,
1437
1457
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomAnnounceResponse|null) => void
1438
1458
  ): UnaryResponse;
1459
+ roomOwnerTransfer(
1460
+ requestMessage: wechaty_puppet_room_pb.RoomOwnerTransferRequest,
1461
+ metadata: grpc.Metadata,
1462
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomOwnerTransferResponse|null) => void
1463
+ ): UnaryResponse;
1464
+ roomOwnerTransfer(
1465
+ requestMessage: wechaty_puppet_room_pb.RoomOwnerTransferRequest,
1466
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomOwnerTransferResponse|null) => void
1467
+ ): UnaryResponse;
1468
+ roomPermission(
1469
+ requestMessage: wechaty_puppet_room_pb.RoomPermissionRequest,
1470
+ metadata: grpc.Metadata,
1471
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomPermissionResponse|null) => void
1472
+ ): UnaryResponse;
1473
+ roomPermission(
1474
+ requestMessage: wechaty_puppet_room_pb.RoomPermissionRequest,
1475
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_pb.RoomPermissionResponse|null) => void
1476
+ ): UnaryResponse;
1439
1477
  roomMemberPayload(
1440
1478
  requestMessage: wechaty_puppet_room_member_pb.RoomMemberPayloadRequest,
1441
1479
  metadata: grpc.Metadata,
@@ -554,6 +554,24 @@ Puppet.RoomAnnounce = {
554
554
  responseType: wechaty_puppet_room_pb.RoomAnnounceResponse
555
555
  };
556
556
 
557
+ Puppet.RoomOwnerTransfer = {
558
+ methodName: "RoomOwnerTransfer",
559
+ service: Puppet,
560
+ requestStream: false,
561
+ responseStream: false,
562
+ requestType: wechaty_puppet_room_pb.RoomOwnerTransferRequest,
563
+ responseType: wechaty_puppet_room_pb.RoomOwnerTransferResponse
564
+ };
565
+
566
+ Puppet.RoomPermission = {
567
+ methodName: "RoomPermission",
568
+ service: Puppet,
569
+ requestStream: false,
570
+ responseStream: false,
571
+ requestType: wechaty_puppet_room_pb.RoomPermissionRequest,
572
+ responseType: wechaty_puppet_room_pb.RoomPermissionResponse
573
+ };
574
+
557
575
  Puppet.RoomMemberPayload = {
558
576
  methodName: "RoomMemberPayload",
559
577
  service: Puppet,
@@ -2641,6 +2659,68 @@ PuppetClient.prototype.roomAnnounce = function roomAnnounce(requestMessage, meta
2641
2659
  };
2642
2660
  };
2643
2661
 
2662
+ PuppetClient.prototype.roomOwnerTransfer = function roomOwnerTransfer(requestMessage, metadata, callback) {
2663
+ if (arguments.length === 2) {
2664
+ callback = arguments[1];
2665
+ }
2666
+ var client = grpc.unary(Puppet.RoomOwnerTransfer, {
2667
+ request: requestMessage,
2668
+ host: this.serviceHost,
2669
+ metadata: metadata,
2670
+ transport: this.options.transport,
2671
+ debug: this.options.debug,
2672
+ onEnd: function (response) {
2673
+ if (callback) {
2674
+ if (response.status !== grpc.Code.OK) {
2675
+ var err = new Error(response.statusMessage);
2676
+ err.code = response.status;
2677
+ err.metadata = response.trailers;
2678
+ callback(err, null);
2679
+ } else {
2680
+ callback(null, response.message);
2681
+ }
2682
+ }
2683
+ }
2684
+ });
2685
+ return {
2686
+ cancel: function () {
2687
+ callback = null;
2688
+ client.close();
2689
+ }
2690
+ };
2691
+ };
2692
+
2693
+ PuppetClient.prototype.roomPermission = function roomPermission(requestMessage, metadata, callback) {
2694
+ if (arguments.length === 2) {
2695
+ callback = arguments[1];
2696
+ }
2697
+ var client = grpc.unary(Puppet.RoomPermission, {
2698
+ request: requestMessage,
2699
+ host: this.serviceHost,
2700
+ metadata: metadata,
2701
+ transport: this.options.transport,
2702
+ debug: this.options.debug,
2703
+ onEnd: function (response) {
2704
+ if (callback) {
2705
+ if (response.status !== grpc.Code.OK) {
2706
+ var err = new Error(response.statusMessage);
2707
+ err.code = response.status;
2708
+ err.metadata = response.trailers;
2709
+ callback(err, null);
2710
+ } else {
2711
+ callback(null, response.message);
2712
+ }
2713
+ }
2714
+ }
2715
+ });
2716
+ return {
2717
+ cancel: function () {
2718
+ callback = null;
2719
+ client.close();
2720
+ }
2721
+ };
2722
+ };
2723
+
2644
2724
  PuppetClient.prototype.roomMemberPayload = function roomMemberPayload(requestMessage, metadata, callback) {
2645
2725
  if (arguments.length === 2) {
2646
2726
  callback = arguments[1];
@@ -34,10 +34,14 @@ enum EventType {
34
34
  EVENT_TYPE_ROOM_ANNOUNCE = 32;
35
35
  }
36
36
 
37
- message EventRequest {}
37
+ message EventRequest {
38
+ int32 seq = 1; // the seq of the last event
39
+ string account_id = 2; // the accountId of the last event
40
+ }
38
41
 
39
42
  message EventResponse {
40
43
  EventType type = 1;
41
44
  // TODO: Huan(202002) consider to use a PB Map?
42
45
  string payload = 2; // JSON.stringify({ ... })
46
+ int32 seq = 3;
43
47
  }
@@ -94,3 +94,23 @@ message RoomRemarkRequest {
94
94
  }
95
95
 
96
96
  message RoomRemarkResponse {}
97
+
98
+ message RoomOwnerTransferRequest {
99
+ string id = 1;
100
+ string contact_id = 2;
101
+ }
102
+
103
+ message RoomOwnerTransferResponse {}
104
+
105
+ message RoomPermissionRequest {
106
+ string id = 1;
107
+ bool send_message = 2;
108
+ bool invitation_check = 3;
109
+ bool room_topic_edit = 4;
110
+ }
111
+
112
+ message RoomPermissionResponse {
113
+ bool send_message = 1;
114
+ bool invitation_check = 2;
115
+ bool room_topic_edit = 3;
116
+ }
@@ -492,6 +492,18 @@ service Puppet {
492
492
  };
493
493
  }
494
494
 
495
+ rpc RoomOwnerTransfer (puppet.RoomOwnerTransferRequest) returns (puppet.RoomOwnerTransferResponse) {
496
+ option (google.api.http) = {
497
+ post: "/rooms/{id}/transfer/{contact_id}"
498
+ };
499
+ }
500
+
501
+ rpc RoomPermission (puppet.RoomPermissionRequest) returns (puppet.RoomPermissionResponse) {
502
+ option (google.api.http) = {
503
+ get: "/rooms/{id}/permission"
504
+ };
505
+ }
506
+
495
507
  /**
496
508
  *
497
509
  * Room Member
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Transform } from 'stronger-typed-streams';
5
5
  import type { UploadRequest } from '../out/wechaty/puppet/download-upload_pb.js';
6
- type Chunk = UploadRequest.AsObject['chunk'];
6
+ declare type Chunk = UploadRequest.AsObject['chunk'];
7
7
  /**
8
8
  * the interface for satisfyign UploadRequest & DownloadResponse
9
9
  */