@juzi/wechaty-grpc 1.0.68 → 1.0.70
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/chat-history_pb.d.ts +3 -3
- package/dist/cjs/out/wechaty/puppet/chat-history_pb.js +9 -9
- package/dist/cjs/out/wechaty/puppet/contact_pb.d.ts +80 -0
- package/dist/cjs/out/wechaty/puppet/contact_pb.js +611 -1
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +49 -2
- package/dist/cjs/out/wechaty/puppet.swagger.json +75 -2
- 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/chat-history.proto +1 -1
- package/dist/cjs/proto/wechaty/puppet/contact.proto +17 -0
- package/dist/cjs/proto/wechaty/puppet.proto +10 -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/chat-history_pb.d.ts +3 -3
- package/dist/esm/out/wechaty/puppet/chat-history_pb.js +9 -9
- package/dist/esm/out/wechaty/puppet/contact_pb.d.ts +80 -0
- package/dist/esm/out/wechaty/puppet/contact_pb.js +611 -1
- package/dist/esm/out/wechaty/puppet.openapi.yaml +49 -2
- package/dist/esm/out/wechaty/puppet.swagger.json +75 -2
- 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/chat-history.proto +1 -1
- package/dist/esm/proto/wechaty/puppet/contact.proto +17 -0
- package/dist/esm/proto/wechaty/puppet.proto +10 -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/chat-history_pb.d.ts +3 -3
- package/out/wechaty/puppet/chat-history_pb.js +9 -9
- package/out/wechaty/puppet/contact_pb.d.ts +80 -0
- package/out/wechaty/puppet/contact_pb.js +611 -1
- package/out/wechaty/puppet.openapi.yaml +49 -2
- package/out/wechaty/puppet.swagger.json +75 -2
- 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.70
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: https://github.com/wechaty/openapi
|
|
@@ -85,6 +85,25 @@ paths:
|
|
|
85
85
|
$ref: '#/definitions/rpcStatus'
|
|
86
86
|
tags:
|
|
87
87
|
- Puppet
|
|
88
|
+
/contacts/self/aka/{aka}:
|
|
89
|
+
put:
|
|
90
|
+
operationId: Puppet_ContactSelfAka
|
|
91
|
+
responses:
|
|
92
|
+
'200':
|
|
93
|
+
description: A successful response.
|
|
94
|
+
schema:
|
|
95
|
+
$ref: '#/definitions/puppetContactSelfAkaResponse'
|
|
96
|
+
default:
|
|
97
|
+
description: An unexpected error response.
|
|
98
|
+
schema:
|
|
99
|
+
$ref: '#/definitions/rpcStatus'
|
|
100
|
+
parameters:
|
|
101
|
+
- name: aka
|
|
102
|
+
in: path
|
|
103
|
+
required: true
|
|
104
|
+
type: string
|
|
105
|
+
tags:
|
|
106
|
+
- Puppet
|
|
88
107
|
/contacts/self/name/{name}:
|
|
89
108
|
put:
|
|
90
109
|
operationId: Puppet_ContactSelfName
|
|
@@ -120,6 +139,25 @@ paths:
|
|
|
120
139
|
$ref: '#/definitions/rpcStatus'
|
|
121
140
|
tags:
|
|
122
141
|
- Puppet
|
|
142
|
+
/contacts/self/realName/{realName}:
|
|
143
|
+
put:
|
|
144
|
+
operationId: Puppet_ContactSelfRealName
|
|
145
|
+
responses:
|
|
146
|
+
'200':
|
|
147
|
+
description: A successful response.
|
|
148
|
+
schema:
|
|
149
|
+
$ref: '#/definitions/puppetContactSelfRealNameResponse'
|
|
150
|
+
default:
|
|
151
|
+
description: An unexpected error response.
|
|
152
|
+
schema:
|
|
153
|
+
$ref: '#/definitions/rpcStatus'
|
|
154
|
+
parameters:
|
|
155
|
+
- name: realName
|
|
156
|
+
in: path
|
|
157
|
+
required: true
|
|
158
|
+
type: string
|
|
159
|
+
tags:
|
|
160
|
+
- Puppet
|
|
123
161
|
/contacts/self/signature:
|
|
124
162
|
put:
|
|
125
163
|
operationId: Puppet_ContactSelfSignature
|
|
@@ -2675,7 +2713,8 @@ definitions:
|
|
|
2675
2713
|
corpName:
|
|
2676
2714
|
type: string
|
|
2677
2715
|
time:
|
|
2678
|
-
type:
|
|
2716
|
+
type: integer
|
|
2717
|
+
format: int32
|
|
2679
2718
|
message:
|
|
2680
2719
|
$ref: '#/definitions/puppetChatHistoryContent'
|
|
2681
2720
|
puppetContactAliasResponse:
|
|
@@ -2802,6 +2841,10 @@ definitions:
|
|
|
2802
2841
|
items:
|
|
2803
2842
|
type: string
|
|
2804
2843
|
title: 标签(的id)
|
|
2844
|
+
realName:
|
|
2845
|
+
type: string
|
|
2846
|
+
aka:
|
|
2847
|
+
type: string
|
|
2805
2848
|
puppetContactPhoneResponse:
|
|
2806
2849
|
type: object
|
|
2807
2850
|
properties:
|
|
@@ -2809,6 +2852,8 @@ definitions:
|
|
|
2809
2852
|
type: array
|
|
2810
2853
|
items:
|
|
2811
2854
|
type: string
|
|
2855
|
+
puppetContactSelfAkaResponse:
|
|
2856
|
+
type: object
|
|
2812
2857
|
puppetContactSelfNameResponse:
|
|
2813
2858
|
type: object
|
|
2814
2859
|
puppetContactSelfQRCodeResponse:
|
|
@@ -2816,6 +2861,8 @@ definitions:
|
|
|
2816
2861
|
properties:
|
|
2817
2862
|
qrcode:
|
|
2818
2863
|
type: string
|
|
2864
|
+
puppetContactSelfRealNameResponse:
|
|
2865
|
+
type: object
|
|
2819
2866
|
puppetContactSelfRoomAliasResponse:
|
|
2820
2867
|
type: object
|
|
2821
2868
|
puppetContactSelfSignatureRequest:
|
|
@@ -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.70",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -115,6 +115,36 @@
|
|
|
115
115
|
]
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
|
+
"/contacts/self/aka/{aka}": {
|
|
119
|
+
"put": {
|
|
120
|
+
"operationId": "Puppet_ContactSelfAka",
|
|
121
|
+
"responses": {
|
|
122
|
+
"200": {
|
|
123
|
+
"description": "A successful response.",
|
|
124
|
+
"schema": {
|
|
125
|
+
"$ref": "#/definitions/puppetContactSelfAkaResponse"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"default": {
|
|
129
|
+
"description": "An unexpected error response.",
|
|
130
|
+
"schema": {
|
|
131
|
+
"$ref": "#/definitions/rpcStatus"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"parameters": [
|
|
136
|
+
{
|
|
137
|
+
"name": "aka",
|
|
138
|
+
"in": "path",
|
|
139
|
+
"required": true,
|
|
140
|
+
"type": "string"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"tags": [
|
|
144
|
+
"Puppet"
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
118
148
|
"/contacts/self/name/{name}": {
|
|
119
149
|
"put": {
|
|
120
150
|
"operationId": "Puppet_ContactSelfName",
|
|
@@ -169,6 +199,36 @@
|
|
|
169
199
|
]
|
|
170
200
|
}
|
|
171
201
|
},
|
|
202
|
+
"/contacts/self/realName/{realName}": {
|
|
203
|
+
"put": {
|
|
204
|
+
"operationId": "Puppet_ContactSelfRealName",
|
|
205
|
+
"responses": {
|
|
206
|
+
"200": {
|
|
207
|
+
"description": "A successful response.",
|
|
208
|
+
"schema": {
|
|
209
|
+
"$ref": "#/definitions/puppetContactSelfRealNameResponse"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"default": {
|
|
213
|
+
"description": "An unexpected error response.",
|
|
214
|
+
"schema": {
|
|
215
|
+
"$ref": "#/definitions/rpcStatus"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"parameters": [
|
|
220
|
+
{
|
|
221
|
+
"name": "realName",
|
|
222
|
+
"in": "path",
|
|
223
|
+
"required": true,
|
|
224
|
+
"type": "string"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"tags": [
|
|
228
|
+
"Puppet"
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
},
|
|
172
232
|
"/contacts/self/signature": {
|
|
173
233
|
"put": {
|
|
174
234
|
"operationId": "Puppet_ContactSelfSignature",
|
|
@@ -3957,7 +4017,8 @@
|
|
|
3957
4017
|
"type": "string"
|
|
3958
4018
|
},
|
|
3959
4019
|
"time": {
|
|
3960
|
-
"type": "
|
|
4020
|
+
"type": "integer",
|
|
4021
|
+
"format": "int32"
|
|
3961
4022
|
},
|
|
3962
4023
|
"message": {
|
|
3963
4024
|
"$ref": "#/definitions/puppetChatHistoryContent"
|
|
@@ -4109,6 +4170,12 @@
|
|
|
4109
4170
|
"type": "string"
|
|
4110
4171
|
},
|
|
4111
4172
|
"title": "标签(的id)"
|
|
4173
|
+
},
|
|
4174
|
+
"realName": {
|
|
4175
|
+
"type": "string"
|
|
4176
|
+
},
|
|
4177
|
+
"aka": {
|
|
4178
|
+
"type": "string"
|
|
4112
4179
|
}
|
|
4113
4180
|
}
|
|
4114
4181
|
},
|
|
@@ -4123,6 +4190,9 @@
|
|
|
4123
4190
|
}
|
|
4124
4191
|
}
|
|
4125
4192
|
},
|
|
4193
|
+
"puppetContactSelfAkaResponse": {
|
|
4194
|
+
"type": "object"
|
|
4195
|
+
},
|
|
4126
4196
|
"puppetContactSelfNameResponse": {
|
|
4127
4197
|
"type": "object"
|
|
4128
4198
|
},
|
|
@@ -4134,6 +4204,9 @@
|
|
|
4134
4204
|
}
|
|
4135
4205
|
}
|
|
4136
4206
|
},
|
|
4207
|
+
"puppetContactSelfRealNameResponse": {
|
|
4208
|
+
"type": "object"
|
|
4209
|
+
},
|
|
4137
4210
|
"puppetContactSelfRoomAliasResponse": {
|
|
4138
4211
|
"type": "object"
|
|
4139
4212
|
},
|
|
@@ -36,6 +36,8 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
|
|
|
36
36
|
dirtyPayload: IPuppetService_IDirtyPayload;
|
|
37
37
|
contactSelfQRCode: IPuppetService_IContactSelfQRCode;
|
|
38
38
|
contactSelfName: IPuppetService_IContactSelfName;
|
|
39
|
+
contactSelfRealName: IPuppetService_IContactSelfRealName;
|
|
40
|
+
contactSelfAka: IPuppetService_IContactSelfAka;
|
|
39
41
|
contactSelfSignature: IPuppetService_IContactSelfSignature;
|
|
40
42
|
contactSelfRoomAlias: IPuppetService_IContactSelfRoomAlias;
|
|
41
43
|
contactPayload: IPuppetService_IContactPayload;
|
|
@@ -238,6 +240,24 @@ interface IPuppetService_IContactSelfName extends grpc.MethodDefinition<wechaty_
|
|
|
238
240
|
responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfNameResponse>;
|
|
239
241
|
responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfNameResponse>;
|
|
240
242
|
}
|
|
243
|
+
interface IPuppetService_IContactSelfRealName extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactSelfRealNameRequest, wechaty_puppet_contact_pb.ContactSelfRealNameResponse> {
|
|
244
|
+
path: "/wechaty.Puppet/ContactSelfRealName";
|
|
245
|
+
requestStream: false;
|
|
246
|
+
responseStream: false;
|
|
247
|
+
requestSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfRealNameRequest>;
|
|
248
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfRealNameRequest>;
|
|
249
|
+
responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfRealNameResponse>;
|
|
250
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfRealNameResponse>;
|
|
251
|
+
}
|
|
252
|
+
interface IPuppetService_IContactSelfAka extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactSelfAkaRequest, wechaty_puppet_contact_pb.ContactSelfAkaResponse> {
|
|
253
|
+
path: "/wechaty.Puppet/ContactSelfAka";
|
|
254
|
+
requestStream: false;
|
|
255
|
+
responseStream: false;
|
|
256
|
+
requestSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfAkaRequest>;
|
|
257
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfAkaRequest>;
|
|
258
|
+
responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfAkaResponse>;
|
|
259
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfAkaResponse>;
|
|
260
|
+
}
|
|
241
261
|
interface IPuppetService_IContactSelfSignature extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactSelfSignatureRequest, wechaty_puppet_contact_pb.ContactSelfSignatureResponse> {
|
|
242
262
|
path: "/wechaty.Puppet/ContactSelfSignature";
|
|
243
263
|
requestStream: false;
|
|
@@ -1002,6 +1022,8 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
|
|
|
1002
1022
|
dirtyPayload: grpc.handleUnaryCall<wechaty_puppet_base_pb.DirtyPayloadRequest, wechaty_puppet_base_pb.DirtyPayloadResponse>;
|
|
1003
1023
|
contactSelfQRCode: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfQRCodeRequest, wechaty_puppet_contact_pb.ContactSelfQRCodeResponse>;
|
|
1004
1024
|
contactSelfName: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfNameRequest, wechaty_puppet_contact_pb.ContactSelfNameResponse>;
|
|
1025
|
+
contactSelfRealName: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfRealNameRequest, wechaty_puppet_contact_pb.ContactSelfRealNameResponse>;
|
|
1026
|
+
contactSelfAka: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfAkaRequest, wechaty_puppet_contact_pb.ContactSelfAkaResponse>;
|
|
1005
1027
|
contactSelfSignature: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfSignatureRequest, wechaty_puppet_contact_pb.ContactSelfSignatureResponse>;
|
|
1006
1028
|
contactSelfRoomAlias: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse>;
|
|
1007
1029
|
contactPayload: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactPayloadRequest, wechaty_puppet_contact_pb.ContactPayloadResponse>;
|
|
@@ -1126,6 +1148,12 @@ export interface IPuppetClient {
|
|
|
1126
1148
|
contactSelfName(request: wechaty_puppet_contact_pb.ContactSelfNameRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfNameResponse) => void): grpc.ClientUnaryCall;
|
|
1127
1149
|
contactSelfName(request: wechaty_puppet_contact_pb.ContactSelfNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfNameResponse) => void): grpc.ClientUnaryCall;
|
|
1128
1150
|
contactSelfName(request: wechaty_puppet_contact_pb.ContactSelfNameRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfNameResponse) => void): grpc.ClientUnaryCall;
|
|
1151
|
+
contactSelfRealName(request: wechaty_puppet_contact_pb.ContactSelfRealNameRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRealNameResponse) => void): grpc.ClientUnaryCall;
|
|
1152
|
+
contactSelfRealName(request: wechaty_puppet_contact_pb.ContactSelfRealNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRealNameResponse) => void): grpc.ClientUnaryCall;
|
|
1153
|
+
contactSelfRealName(request: wechaty_puppet_contact_pb.ContactSelfRealNameRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRealNameResponse) => void): grpc.ClientUnaryCall;
|
|
1154
|
+
contactSelfAka(request: wechaty_puppet_contact_pb.ContactSelfAkaRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfAkaResponse) => void): grpc.ClientUnaryCall;
|
|
1155
|
+
contactSelfAka(request: wechaty_puppet_contact_pb.ContactSelfAkaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfAkaResponse) => void): grpc.ClientUnaryCall;
|
|
1156
|
+
contactSelfAka(request: wechaty_puppet_contact_pb.ContactSelfAkaRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfAkaResponse) => void): grpc.ClientUnaryCall;
|
|
1129
1157
|
contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
|
|
1130
1158
|
contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
|
|
1131
1159
|
contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -1417,6 +1445,12 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
|
|
|
1417
1445
|
public contactSelfName(request: wechaty_puppet_contact_pb.ContactSelfNameRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfNameResponse) => void): grpc.ClientUnaryCall;
|
|
1418
1446
|
public contactSelfName(request: wechaty_puppet_contact_pb.ContactSelfNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfNameResponse) => void): grpc.ClientUnaryCall;
|
|
1419
1447
|
public contactSelfName(request: wechaty_puppet_contact_pb.ContactSelfNameRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfNameResponse) => void): grpc.ClientUnaryCall;
|
|
1448
|
+
public contactSelfRealName(request: wechaty_puppet_contact_pb.ContactSelfRealNameRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRealNameResponse) => void): grpc.ClientUnaryCall;
|
|
1449
|
+
public contactSelfRealName(request: wechaty_puppet_contact_pb.ContactSelfRealNameRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRealNameResponse) => void): grpc.ClientUnaryCall;
|
|
1450
|
+
public contactSelfRealName(request: wechaty_puppet_contact_pb.ContactSelfRealNameRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRealNameResponse) => void): grpc.ClientUnaryCall;
|
|
1451
|
+
public contactSelfAka(request: wechaty_puppet_contact_pb.ContactSelfAkaRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfAkaResponse) => void): grpc.ClientUnaryCall;
|
|
1452
|
+
public contactSelfAka(request: wechaty_puppet_contact_pb.ContactSelfAkaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfAkaResponse) => void): grpc.ClientUnaryCall;
|
|
1453
|
+
public contactSelfAka(request: wechaty_puppet_contact_pb.ContactSelfAkaRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfAkaResponse) => void): grpc.ClientUnaryCall;
|
|
1420
1454
|
public contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
|
|
1421
1455
|
public contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
|
|
1422
1456
|
public contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -251,6 +251,28 @@ function deserialize_wechaty_puppet_ContactPhoneResponse(buffer_arg) {
|
|
|
251
251
|
return wechaty_puppet_contact_pb.ContactPhoneResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
function serialize_wechaty_puppet_ContactSelfAkaRequest(arg) {
|
|
255
|
+
if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfAkaRequest)) {
|
|
256
|
+
throw new Error('Expected argument of type wechaty.puppet.ContactSelfAkaRequest');
|
|
257
|
+
}
|
|
258
|
+
return Buffer.from(arg.serializeBinary());
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function deserialize_wechaty_puppet_ContactSelfAkaRequest(buffer_arg) {
|
|
262
|
+
return wechaty_puppet_contact_pb.ContactSelfAkaRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function serialize_wechaty_puppet_ContactSelfAkaResponse(arg) {
|
|
266
|
+
if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfAkaResponse)) {
|
|
267
|
+
throw new Error('Expected argument of type wechaty.puppet.ContactSelfAkaResponse');
|
|
268
|
+
}
|
|
269
|
+
return Buffer.from(arg.serializeBinary());
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function deserialize_wechaty_puppet_ContactSelfAkaResponse(buffer_arg) {
|
|
273
|
+
return wechaty_puppet_contact_pb.ContactSelfAkaResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
274
|
+
}
|
|
275
|
+
|
|
254
276
|
function serialize_wechaty_puppet_ContactSelfNameRequest(arg) {
|
|
255
277
|
if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfNameRequest)) {
|
|
256
278
|
throw new Error('Expected argument of type wechaty.puppet.ContactSelfNameRequest');
|
|
@@ -295,6 +317,28 @@ function deserialize_wechaty_puppet_ContactSelfQRCodeResponse(buffer_arg) {
|
|
|
295
317
|
return wechaty_puppet_contact_pb.ContactSelfQRCodeResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
296
318
|
}
|
|
297
319
|
|
|
320
|
+
function serialize_wechaty_puppet_ContactSelfRealNameRequest(arg) {
|
|
321
|
+
if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfRealNameRequest)) {
|
|
322
|
+
throw new Error('Expected argument of type wechaty.puppet.ContactSelfRealNameRequest');
|
|
323
|
+
}
|
|
324
|
+
return Buffer.from(arg.serializeBinary());
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function deserialize_wechaty_puppet_ContactSelfRealNameRequest(buffer_arg) {
|
|
328
|
+
return wechaty_puppet_contact_pb.ContactSelfRealNameRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function serialize_wechaty_puppet_ContactSelfRealNameResponse(arg) {
|
|
332
|
+
if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfRealNameResponse)) {
|
|
333
|
+
throw new Error('Expected argument of type wechaty.puppet.ContactSelfRealNameResponse');
|
|
334
|
+
}
|
|
335
|
+
return Buffer.from(arg.serializeBinary());
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function deserialize_wechaty_puppet_ContactSelfRealNameResponse(buffer_arg) {
|
|
339
|
+
return wechaty_puppet_contact_pb.ContactSelfRealNameResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
340
|
+
}
|
|
341
|
+
|
|
298
342
|
function serialize_wechaty_puppet_ContactSelfRoomAliasRequest(arg) {
|
|
299
343
|
if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest)) {
|
|
300
344
|
throw new Error('Expected argument of type wechaty.puppet.ContactSelfRoomAliasRequest');
|
|
@@ -2245,6 +2289,28 @@ contactSelfQRCode: {
|
|
|
2245
2289
|
responseSerialize: serialize_wechaty_puppet_ContactSelfNameResponse,
|
|
2246
2290
|
responseDeserialize: deserialize_wechaty_puppet_ContactSelfNameResponse,
|
|
2247
2291
|
},
|
|
2292
|
+
contactSelfRealName: {
|
|
2293
|
+
path: '/wechaty.Puppet/ContactSelfRealName',
|
|
2294
|
+
requestStream: false,
|
|
2295
|
+
responseStream: false,
|
|
2296
|
+
requestType: wechaty_puppet_contact_pb.ContactSelfRealNameRequest,
|
|
2297
|
+
responseType: wechaty_puppet_contact_pb.ContactSelfRealNameResponse,
|
|
2298
|
+
requestSerialize: serialize_wechaty_puppet_ContactSelfRealNameRequest,
|
|
2299
|
+
requestDeserialize: deserialize_wechaty_puppet_ContactSelfRealNameRequest,
|
|
2300
|
+
responseSerialize: serialize_wechaty_puppet_ContactSelfRealNameResponse,
|
|
2301
|
+
responseDeserialize: deserialize_wechaty_puppet_ContactSelfRealNameResponse,
|
|
2302
|
+
},
|
|
2303
|
+
contactSelfAka: {
|
|
2304
|
+
path: '/wechaty.Puppet/ContactSelfAka',
|
|
2305
|
+
requestStream: false,
|
|
2306
|
+
responseStream: false,
|
|
2307
|
+
requestType: wechaty_puppet_contact_pb.ContactSelfAkaRequest,
|
|
2308
|
+
responseType: wechaty_puppet_contact_pb.ContactSelfAkaResponse,
|
|
2309
|
+
requestSerialize: serialize_wechaty_puppet_ContactSelfAkaRequest,
|
|
2310
|
+
requestDeserialize: deserialize_wechaty_puppet_ContactSelfAkaRequest,
|
|
2311
|
+
responseSerialize: serialize_wechaty_puppet_ContactSelfAkaResponse,
|
|
2312
|
+
responseDeserialize: deserialize_wechaty_puppet_ContactSelfAkaResponse,
|
|
2313
|
+
},
|
|
2248
2314
|
contactSelfSignature: {
|
|
2249
2315
|
path: '/wechaty.Puppet/ContactSelfSignature',
|
|
2250
2316
|
requestStream: false,
|
|
@@ -135,6 +135,24 @@ type PuppetContactSelfName = {
|
|
|
135
135
|
readonly responseType: typeof wechaty_puppet_contact_pb.ContactSelfNameResponse;
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
+
type PuppetContactSelfRealName = {
|
|
139
|
+
readonly methodName: string;
|
|
140
|
+
readonly service: typeof Puppet;
|
|
141
|
+
readonly requestStream: false;
|
|
142
|
+
readonly responseStream: false;
|
|
143
|
+
readonly requestType: typeof wechaty_puppet_contact_pb.ContactSelfRealNameRequest;
|
|
144
|
+
readonly responseType: typeof wechaty_puppet_contact_pb.ContactSelfRealNameResponse;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
type PuppetContactSelfAka = {
|
|
148
|
+
readonly methodName: string;
|
|
149
|
+
readonly service: typeof Puppet;
|
|
150
|
+
readonly requestStream: false;
|
|
151
|
+
readonly responseStream: false;
|
|
152
|
+
readonly requestType: typeof wechaty_puppet_contact_pb.ContactSelfAkaRequest;
|
|
153
|
+
readonly responseType: typeof wechaty_puppet_contact_pb.ContactSelfAkaResponse;
|
|
154
|
+
};
|
|
155
|
+
|
|
138
156
|
type PuppetContactSelfSignature = {
|
|
139
157
|
readonly methodName: string;
|
|
140
158
|
readonly service: typeof Puppet;
|
|
@@ -897,6 +915,8 @@ export class Puppet {
|
|
|
897
915
|
static readonly DirtyPayload: PuppetDirtyPayload;
|
|
898
916
|
static readonly ContactSelfQRCode: PuppetContactSelfQRCode;
|
|
899
917
|
static readonly ContactSelfName: PuppetContactSelfName;
|
|
918
|
+
static readonly ContactSelfRealName: PuppetContactSelfRealName;
|
|
919
|
+
static readonly ContactSelfAka: PuppetContactSelfAka;
|
|
900
920
|
static readonly ContactSelfSignature: PuppetContactSelfSignature;
|
|
901
921
|
static readonly ContactSelfRoomAlias: PuppetContactSelfRoomAlias;
|
|
902
922
|
static readonly ContactPayload: PuppetContactPayload;
|
|
@@ -1123,6 +1143,24 @@ export class PuppetClient {
|
|
|
1123
1143
|
requestMessage: wechaty_puppet_contact_pb.ContactSelfNameRequest,
|
|
1124
1144
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfNameResponse|null) => void
|
|
1125
1145
|
): UnaryResponse;
|
|
1146
|
+
contactSelfRealName(
|
|
1147
|
+
requestMessage: wechaty_puppet_contact_pb.ContactSelfRealNameRequest,
|
|
1148
|
+
metadata: grpc.Metadata,
|
|
1149
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfRealNameResponse|null) => void
|
|
1150
|
+
): UnaryResponse;
|
|
1151
|
+
contactSelfRealName(
|
|
1152
|
+
requestMessage: wechaty_puppet_contact_pb.ContactSelfRealNameRequest,
|
|
1153
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfRealNameResponse|null) => void
|
|
1154
|
+
): UnaryResponse;
|
|
1155
|
+
contactSelfAka(
|
|
1156
|
+
requestMessage: wechaty_puppet_contact_pb.ContactSelfAkaRequest,
|
|
1157
|
+
metadata: grpc.Metadata,
|
|
1158
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfAkaResponse|null) => void
|
|
1159
|
+
): UnaryResponse;
|
|
1160
|
+
contactSelfAka(
|
|
1161
|
+
requestMessage: wechaty_puppet_contact_pb.ContactSelfAkaRequest,
|
|
1162
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfAkaResponse|null) => void
|
|
1163
|
+
): UnaryResponse;
|
|
1126
1164
|
contactSelfSignature(
|
|
1127
1165
|
requestMessage: wechaty_puppet_contact_pb.ContactSelfSignatureRequest,
|
|
1128
1166
|
metadata: grpc.Metadata,
|
|
@@ -141,6 +141,24 @@ Puppet.ContactSelfName = {
|
|
|
141
141
|
responseType: wechaty_puppet_contact_pb.ContactSelfNameResponse
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
+
Puppet.ContactSelfRealName = {
|
|
145
|
+
methodName: "ContactSelfRealName",
|
|
146
|
+
service: Puppet,
|
|
147
|
+
requestStream: false,
|
|
148
|
+
responseStream: false,
|
|
149
|
+
requestType: wechaty_puppet_contact_pb.ContactSelfRealNameRequest,
|
|
150
|
+
responseType: wechaty_puppet_contact_pb.ContactSelfRealNameResponse
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
Puppet.ContactSelfAka = {
|
|
154
|
+
methodName: "ContactSelfAka",
|
|
155
|
+
service: Puppet,
|
|
156
|
+
requestStream: false,
|
|
157
|
+
responseStream: false,
|
|
158
|
+
requestType: wechaty_puppet_contact_pb.ContactSelfAkaRequest,
|
|
159
|
+
responseType: wechaty_puppet_contact_pb.ContactSelfAkaResponse
|
|
160
|
+
};
|
|
161
|
+
|
|
144
162
|
Puppet.ContactSelfSignature = {
|
|
145
163
|
methodName: "ContactSelfSignature",
|
|
146
164
|
service: Puppet,
|
|
@@ -1306,6 +1324,68 @@ PuppetClient.prototype.contactSelfName = function contactSelfName(requestMessage
|
|
|
1306
1324
|
};
|
|
1307
1325
|
};
|
|
1308
1326
|
|
|
1327
|
+
PuppetClient.prototype.contactSelfRealName = function contactSelfRealName(requestMessage, metadata, callback) {
|
|
1328
|
+
if (arguments.length === 2) {
|
|
1329
|
+
callback = arguments[1];
|
|
1330
|
+
}
|
|
1331
|
+
var client = grpc.unary(Puppet.ContactSelfRealName, {
|
|
1332
|
+
request: requestMessage,
|
|
1333
|
+
host: this.serviceHost,
|
|
1334
|
+
metadata: metadata,
|
|
1335
|
+
transport: this.options.transport,
|
|
1336
|
+
debug: this.options.debug,
|
|
1337
|
+
onEnd: function (response) {
|
|
1338
|
+
if (callback) {
|
|
1339
|
+
if (response.status !== grpc.Code.OK) {
|
|
1340
|
+
var err = new Error(response.statusMessage);
|
|
1341
|
+
err.code = response.status;
|
|
1342
|
+
err.metadata = response.trailers;
|
|
1343
|
+
callback(err, null);
|
|
1344
|
+
} else {
|
|
1345
|
+
callback(null, response.message);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
return {
|
|
1351
|
+
cancel: function () {
|
|
1352
|
+
callback = null;
|
|
1353
|
+
client.close();
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
PuppetClient.prototype.contactSelfAka = function contactSelfAka(requestMessage, metadata, callback) {
|
|
1359
|
+
if (arguments.length === 2) {
|
|
1360
|
+
callback = arguments[1];
|
|
1361
|
+
}
|
|
1362
|
+
var client = grpc.unary(Puppet.ContactSelfAka, {
|
|
1363
|
+
request: requestMessage,
|
|
1364
|
+
host: this.serviceHost,
|
|
1365
|
+
metadata: metadata,
|
|
1366
|
+
transport: this.options.transport,
|
|
1367
|
+
debug: this.options.debug,
|
|
1368
|
+
onEnd: function (response) {
|
|
1369
|
+
if (callback) {
|
|
1370
|
+
if (response.status !== grpc.Code.OK) {
|
|
1371
|
+
var err = new Error(response.statusMessage);
|
|
1372
|
+
err.code = response.status;
|
|
1373
|
+
err.metadata = response.trailers;
|
|
1374
|
+
callback(err, null);
|
|
1375
|
+
} else {
|
|
1376
|
+
callback(null, response.message);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
});
|
|
1381
|
+
return {
|
|
1382
|
+
cancel: function () {
|
|
1383
|
+
callback = null;
|
|
1384
|
+
client.close();
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1309
1389
|
PuppetClient.prototype.contactSelfSignature = function contactSelfSignature(requestMessage, metadata, callback) {
|
|
1310
1390
|
if (arguments.length === 2) {
|
|
1311
1391
|
callback = arguments[1];
|
|
@@ -62,6 +62,9 @@ message ContactPayloadResponse {
|
|
|
62
62
|
string additional_info = 19;// 额外信息,是由JS对象stringify得到的字符串,目前支持的内容包含addContactTime、corpId等。
|
|
63
63
|
|
|
64
64
|
repeated string tag_ids = 20; // 标签(的id)
|
|
65
|
+
|
|
66
|
+
string real_name = 21;
|
|
67
|
+
string aka = 22;
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
message ContactSelfQRCodeRequest {}
|
|
@@ -86,6 +89,20 @@ message ContactSelfRoomAliasRequest {
|
|
|
86
89
|
|
|
87
90
|
message ContactSelfRoomAliasResponse {}
|
|
88
91
|
|
|
92
|
+
message ContactSelfRealNameRequest {
|
|
93
|
+
string real_name = 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message ContactSelfRealNameResponse {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message ContactSelfAkaRequest {
|
|
100
|
+
string aka = 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message ContactSelfAkaResponse {
|
|
104
|
+
}
|
|
105
|
+
|
|
89
106
|
message ContactAliasRequest {
|
|
90
107
|
string id = 1;
|
|
91
108
|
// nullable
|
|
@@ -166,6 +166,16 @@ service Puppet {
|
|
|
166
166
|
put: "/contacts/self/name/{name}"
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
+
rpc ContactSelfRealName (puppet.ContactSelfRealNameRequest) returns (puppet.ContactSelfRealNameResponse) {
|
|
170
|
+
option (google.api.http) = {
|
|
171
|
+
put: "/contacts/self/realName/{real_name}"
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
rpc ContactSelfAka (puppet.ContactSelfAkaRequest) returns (puppet.ContactSelfAkaResponse) {
|
|
175
|
+
option (google.api.http) = {
|
|
176
|
+
put: "/contacts/self/aka/{aka}"
|
|
177
|
+
};
|
|
178
|
+
}
|
|
169
179
|
rpc ContactSelfSignature (puppet.ContactSelfSignatureRequest) returns (puppet.ContactSelfSignatureResponse) {
|
|
170
180
|
option (google.api.http) = {
|
|
171
181
|
put: "/contacts/self/signature"
|
|
@@ -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.70",
|
|
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,aA6kB9B,CAAA"}
|
|
@@ -50,6 +50,16 @@ exports.puppetServerImpl = {
|
|
|
50
50
|
void callback;
|
|
51
51
|
throw new Error('not implemented.');
|
|
52
52
|
},
|
|
53
|
+
contactSelfRealName: (call, callback) => {
|
|
54
|
+
void call;
|
|
55
|
+
void callback;
|
|
56
|
+
throw new Error('not implemented.');
|
|
57
|
+
},
|
|
58
|
+
contactSelfAka: (call, callback) => {
|
|
59
|
+
void call;
|
|
60
|
+
void callback;
|
|
61
|
+
throw new Error('not implemented.');
|
|
62
|
+
},
|
|
53
63
|
contactPayloadModify: (call, callback) => {
|
|
54
64
|
void call;
|
|
55
65
|
void callback;
|