@juzi/wechaty-grpc 1.0.54 → 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.
- package/dist/cjs/out/wechaty/puppet/room_pb.d.ts +100 -0
- package/dist/cjs/out/wechaty/puppet/room_pb.js +759 -0
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +66 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +102 -1
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
- package/dist/cjs/proto/wechaty/puppet/room.proto +20 -0
- package/dist/cjs/proto/wechaty/puppet.proto +12 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.js +10 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/out/wechaty/puppet/room_pb.d.ts +100 -0
- package/dist/esm/out/wechaty/puppet/room_pb.js +759 -0
- package/dist/esm/out/wechaty/puppet.openapi.yaml +66 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +102 -1
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
- package/dist/esm/proto/wechaty/puppet/room.proto +20 -0
- package/dist/esm/proto/wechaty/puppet.proto +12 -0
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/esm/tests/puppet-server-impl.js +10 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/room_pb.d.ts +100 -0
- package/out/wechaty/puppet/room_pb.js +759 -0
- package/out/wechaty/puppet.openapi.yaml +66 -1
- package/out/wechaty/puppet.swagger.json +102 -1
- package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
- package/out/wechaty/puppet_grpc_pb.js +66 -0
- package/out/wechaty/puppet_pb_service.d.ts +38 -0
- package/out/wechaty/puppet_pb_service.js +80 -0
- package/package.json +1 -1
- 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.
|
|
12
|
+
version: 1.0.55
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: 'https://github.com/wechaty/openapi'
|
|
@@ -1774,6 +1774,37 @@ paths:
|
|
|
1774
1774
|
type: string
|
|
1775
1775
|
tags:
|
|
1776
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
|
|
1777
1808
|
'/rooms/{id}/qrcode':
|
|
1778
1809
|
get:
|
|
1779
1810
|
operationId: Puppet_RoomQRCode
|
|
@@ -1844,6 +1875,29 @@ paths:
|
|
|
1844
1875
|
type: string
|
|
1845
1876
|
tags:
|
|
1846
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
|
|
1847
1901
|
/start:
|
|
1848
1902
|
put:
|
|
1849
1903
|
summary: '*'
|
|
@@ -3320,6 +3374,8 @@ definitions:
|
|
|
3320
3374
|
format: double
|
|
3321
3375
|
joinScene:
|
|
3322
3376
|
$ref: '#/definitions/puppetRoomMemberJoinSceneType'
|
|
3377
|
+
puppetRoomOwnerTransferResponse:
|
|
3378
|
+
type: object
|
|
3323
3379
|
puppetRoomPayloadResponse:
|
|
3324
3380
|
type: object
|
|
3325
3381
|
properties:
|
|
@@ -3351,6 +3407,15 @@ definitions:
|
|
|
3351
3407
|
type: string
|
|
3352
3408
|
roomRemark:
|
|
3353
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
|
|
3354
3419
|
puppetRoomQRCodeResponse:
|
|
3355
3420
|
type: object
|
|
3356
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.
|
|
6
|
+
"version": "1.0.55",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -2631,6 +2631,54 @@
|
|
|
2631
2631
|
]
|
|
2632
2632
|
}
|
|
2633
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
|
+
},
|
|
2634
2682
|
"/rooms/{id}/qrcode": {
|
|
2635
2683
|
"get": {
|
|
2636
2684
|
"operationId": "Puppet_RoomQRCode",
|
|
@@ -2740,6 +2788,42 @@
|
|
|
2740
2788
|
]
|
|
2741
2789
|
}
|
|
2742
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
|
+
},
|
|
2743
2827
|
"/start": {
|
|
2744
2828
|
"put": {
|
|
2745
2829
|
"summary": "*",
|
|
@@ -4685,6 +4769,9 @@
|
|
|
4685
4769
|
}
|
|
4686
4770
|
}
|
|
4687
4771
|
},
|
|
4772
|
+
"puppetRoomOwnerTransferResponse": {
|
|
4773
|
+
"type": "object"
|
|
4774
|
+
},
|
|
4688
4775
|
"puppetRoomPayloadResponse": {
|
|
4689
4776
|
"type": "object",
|
|
4690
4777
|
"properties": {
|
|
@@ -4729,6 +4816,20 @@
|
|
|
4729
4816
|
}
|
|
4730
4817
|
}
|
|
4731
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
|
+
},
|
|
4732
4833
|
"puppetRoomQRCodeResponse": {
|
|
4733
4834
|
"type": "object",
|
|
4734
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];
|
|
@@ -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 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.packageJson = void 0;
|
|
4
4
|
exports.packageJson = {
|
|
5
5
|
"name": "@juzi/wechaty-grpc",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.55",
|
|
7
7
|
"description": "gRPC for Wechaty",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puppet-server-impl.d.ts","sourceRoot":"","sources":["../../../tests/puppet-server-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACP,MAA4B,eAAe,CAAA;AAE5C,aAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"puppet-server-impl.d.ts","sourceRoot":"","sources":["../../../tests/puppet-server-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACP,MAA4B,eAAe,CAAA;AAE5C,aAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAihB9B,CAAA"}
|
|
@@ -304,6 +304,16 @@ exports.puppetServerImpl = {
|
|
|
304
304
|
void callback;
|
|
305
305
|
throw new Error('not implemented.');
|
|
306
306
|
},
|
|
307
|
+
roomOwnerTransfer: (call, callback) => {
|
|
308
|
+
void call;
|
|
309
|
+
void callback;
|
|
310
|
+
throw new Error('not implemented.');
|
|
311
|
+
},
|
|
312
|
+
roomPermission: (call, callback) => {
|
|
313
|
+
void call;
|
|
314
|
+
void callback;
|
|
315
|
+
throw new Error('not implemented.');
|
|
316
|
+
},
|
|
307
317
|
start: (call, callback) => {
|
|
308
318
|
void call;
|
|
309
319
|
void callback;
|