@juzi/wechaty-grpc 1.0.36 → 1.0.38
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/channel_pb.d.ts +8 -0
- package/dist/cjs/out/wechaty/puppet/channel_pb.js +61 -1
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +32 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +49 -1
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
- package/dist/cjs/proto/wechaty/puppet/channel.proto +4 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -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 +5 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/out/wechaty/puppet/channel_pb.d.ts +8 -0
- package/dist/esm/out/wechaty/puppet/channel_pb.js +61 -1
- package/dist/esm/out/wechaty/puppet.openapi.yaml +32 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +49 -1
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
- package/dist/esm/proto/wechaty/puppet/channel.proto +4 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -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 +5 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/channel_pb.d.ts +8 -0
- package/out/wechaty/puppet/channel_pb.js +61 -1
- package/out/wechaty/puppet.openapi.yaml +32 -1
- package/out/wechaty/puppet.swagger.json +49 -1
- package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/out/wechaty/puppet_grpc_pb.js +33 -0
- package/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/out/wechaty/puppet_pb_service.js +40 -0
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -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.38",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -182,6 +182,44 @@
|
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
+
"/contacts/{contactId}/delete": {
|
|
186
|
+
"put": {
|
|
187
|
+
"operationId": "Puppet_ContactDelete",
|
|
188
|
+
"responses": {
|
|
189
|
+
"200": {
|
|
190
|
+
"description": "A successful response.",
|
|
191
|
+
"schema": {
|
|
192
|
+
"$ref": "#/definitions/puppetContactDeleteResponse"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"default": {
|
|
196
|
+
"description": "An unexpected error response.",
|
|
197
|
+
"schema": {
|
|
198
|
+
"$ref": "#/definitions/rpcStatus"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"parameters": [
|
|
203
|
+
{
|
|
204
|
+
"name": "contactId",
|
|
205
|
+
"in": "path",
|
|
206
|
+
"required": true,
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "body",
|
|
211
|
+
"in": "body",
|
|
212
|
+
"required": true,
|
|
213
|
+
"schema": {
|
|
214
|
+
"type": "object"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"tags": [
|
|
219
|
+
"Puppet"
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
},
|
|
185
223
|
"/contacts/{contactId}/description": {
|
|
186
224
|
"put": {
|
|
187
225
|
"operationId": "Puppet_ContactDescription",
|
|
@@ -3159,6 +3197,13 @@
|
|
|
3159
3197
|
"url": {
|
|
3160
3198
|
"type": "string",
|
|
3161
3199
|
"title": "视频号地址"
|
|
3200
|
+
},
|
|
3201
|
+
"objectId": {
|
|
3202
|
+
"type": "string",
|
|
3203
|
+
"title": "视频号直播专属"
|
|
3204
|
+
},
|
|
3205
|
+
"objectNonceId": {
|
|
3206
|
+
"type": "string"
|
|
3162
3207
|
}
|
|
3163
3208
|
}
|
|
3164
3209
|
},
|
|
@@ -3189,6 +3234,9 @@
|
|
|
3189
3234
|
"puppetContactCorporationRemarkResponse": {
|
|
3190
3235
|
"type": "object"
|
|
3191
3236
|
},
|
|
3237
|
+
"puppetContactDeleteResponse": {
|
|
3238
|
+
"type": "object"
|
|
3239
|
+
},
|
|
3192
3240
|
"puppetContactDescriptionResponse": {
|
|
3193
3241
|
"type": "object"
|
|
3194
3242
|
},
|
|
@@ -44,6 +44,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
|
|
|
44
44
|
contactPhone: IPuppetService_IContactPhone;
|
|
45
45
|
contactCorporationRemark: IPuppetService_IContactCorporationRemark;
|
|
46
46
|
contactDescription: IPuppetService_IContactDescription;
|
|
47
|
+
contactDelete: IPuppetService_IContactDelete;
|
|
47
48
|
contactList: IPuppetService_IContactList;
|
|
48
49
|
friendshipPayload: IPuppetService_IFriendshipPayload;
|
|
49
50
|
friendshipSearchPhone: IPuppetService_IFriendshipSearchPhone;
|
|
@@ -288,6 +289,15 @@ interface IPuppetService_IContactDescription extends grpc.MethodDefinition<wecha
|
|
|
288
289
|
responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactDescriptionResponse>;
|
|
289
290
|
responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactDescriptionResponse>;
|
|
290
291
|
}
|
|
292
|
+
interface IPuppetService_IContactDelete extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactDeleteRequest, wechaty_puppet_contact_pb.ContactDeleteResponse> {
|
|
293
|
+
path: "/wechaty.Puppet/ContactDelete";
|
|
294
|
+
requestStream: false;
|
|
295
|
+
responseStream: false;
|
|
296
|
+
requestSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactDeleteRequest>;
|
|
297
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactDeleteRequest>;
|
|
298
|
+
responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactDeleteResponse>;
|
|
299
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactDeleteResponse>;
|
|
300
|
+
}
|
|
291
301
|
interface IPuppetService_IContactList extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactListRequest, wechaty_puppet_contact_pb.ContactListResponse> {
|
|
292
302
|
path: "/wechaty.Puppet/ContactList";
|
|
293
303
|
requestStream: false;
|
|
@@ -870,6 +880,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
|
|
|
870
880
|
contactPhone: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactPhoneRequest, wechaty_puppet_contact_pb.ContactPhoneResponse>;
|
|
871
881
|
contactCorporationRemark: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactCorporationRemarkRequest, wechaty_puppet_contact_pb.ContactCorporationRemarkResponse>;
|
|
872
882
|
contactDescription: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactDescriptionRequest, wechaty_puppet_contact_pb.ContactDescriptionResponse>;
|
|
883
|
+
contactDelete: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactDeleteRequest, wechaty_puppet_contact_pb.ContactDeleteResponse>;
|
|
873
884
|
contactList: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactListRequest, wechaty_puppet_contact_pb.ContactListResponse>;
|
|
874
885
|
friendshipPayload: grpc.handleUnaryCall<wechaty_puppet_friendship_pb.FriendshipPayloadRequest, wechaty_puppet_friendship_pb.FriendshipPayloadResponse>;
|
|
875
886
|
friendshipSearchPhone: grpc.handleUnaryCall<wechaty_puppet_friendship_pb.FriendshipSearchPhoneRequest, wechaty_puppet_friendship_pb.FriendshipSearchPhoneResponse>;
|
|
@@ -993,6 +1004,9 @@ export interface IPuppetClient {
|
|
|
993
1004
|
contactDescription(request: wechaty_puppet_contact_pb.ContactDescriptionRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDescriptionResponse) => void): grpc.ClientUnaryCall;
|
|
994
1005
|
contactDescription(request: wechaty_puppet_contact_pb.ContactDescriptionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDescriptionResponse) => void): grpc.ClientUnaryCall;
|
|
995
1006
|
contactDescription(request: wechaty_puppet_contact_pb.ContactDescriptionRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDescriptionResponse) => void): grpc.ClientUnaryCall;
|
|
1007
|
+
contactDelete(request: wechaty_puppet_contact_pb.ContactDeleteRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDeleteResponse) => void): grpc.ClientUnaryCall;
|
|
1008
|
+
contactDelete(request: wechaty_puppet_contact_pb.ContactDeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDeleteResponse) => void): grpc.ClientUnaryCall;
|
|
1009
|
+
contactDelete(request: wechaty_puppet_contact_pb.ContactDeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDeleteResponse) => void): grpc.ClientUnaryCall;
|
|
996
1010
|
contactList(request: wechaty_puppet_contact_pb.ContactListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
|
|
997
1011
|
contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
|
|
998
1012
|
contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -1241,6 +1255,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
|
|
|
1241
1255
|
public contactDescription(request: wechaty_puppet_contact_pb.ContactDescriptionRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDescriptionResponse) => void): grpc.ClientUnaryCall;
|
|
1242
1256
|
public contactDescription(request: wechaty_puppet_contact_pb.ContactDescriptionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDescriptionResponse) => void): grpc.ClientUnaryCall;
|
|
1243
1257
|
public contactDescription(request: wechaty_puppet_contact_pb.ContactDescriptionRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDescriptionResponse) => void): grpc.ClientUnaryCall;
|
|
1258
|
+
public contactDelete(request: wechaty_puppet_contact_pb.ContactDeleteRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDeleteResponse) => void): grpc.ClientUnaryCall;
|
|
1259
|
+
public contactDelete(request: wechaty_puppet_contact_pb.ContactDeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDeleteResponse) => void): grpc.ClientUnaryCall;
|
|
1260
|
+
public contactDelete(request: wechaty_puppet_contact_pb.ContactDeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactDeleteResponse) => void): grpc.ClientUnaryCall;
|
|
1244
1261
|
public contactList(request: wechaty_puppet_contact_pb.ContactListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
|
|
1245
1262
|
public contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
|
|
1246
1263
|
public contactList(request: wechaty_puppet_contact_pb.ContactListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactListResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -98,6 +98,28 @@ function deserialize_wechaty_puppet_ContactCorporationRemarkResponse(buffer_arg)
|
|
|
98
98
|
return wechaty_puppet_contact_pb.ContactCorporationRemarkResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
function serialize_wechaty_puppet_ContactDeleteRequest(arg) {
|
|
102
|
+
if (!(arg instanceof wechaty_puppet_contact_pb.ContactDeleteRequest)) {
|
|
103
|
+
throw new Error('Expected argument of type wechaty.puppet.ContactDeleteRequest');
|
|
104
|
+
}
|
|
105
|
+
return Buffer.from(arg.serializeBinary());
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function deserialize_wechaty_puppet_ContactDeleteRequest(buffer_arg) {
|
|
109
|
+
return wechaty_puppet_contact_pb.ContactDeleteRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function serialize_wechaty_puppet_ContactDeleteResponse(arg) {
|
|
113
|
+
if (!(arg instanceof wechaty_puppet_contact_pb.ContactDeleteResponse)) {
|
|
114
|
+
throw new Error('Expected argument of type wechaty.puppet.ContactDeleteResponse');
|
|
115
|
+
}
|
|
116
|
+
return Buffer.from(arg.serializeBinary());
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function deserialize_wechaty_puppet_ContactDeleteResponse(buffer_arg) {
|
|
120
|
+
return wechaty_puppet_contact_pb.ContactDeleteResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
121
|
+
}
|
|
122
|
+
|
|
101
123
|
function serialize_wechaty_puppet_ContactDescriptionRequest(arg) {
|
|
102
124
|
if (!(arg instanceof wechaty_puppet_contact_pb.ContactDescriptionRequest)) {
|
|
103
125
|
throw new Error('Expected argument of type wechaty.puppet.ContactDescriptionRequest');
|
|
@@ -2054,6 +2076,17 @@ contactPayload: {
|
|
|
2054
2076
|
responseSerialize: serialize_wechaty_puppet_ContactDescriptionResponse,
|
|
2055
2077
|
responseDeserialize: deserialize_wechaty_puppet_ContactDescriptionResponse,
|
|
2056
2078
|
},
|
|
2079
|
+
contactDelete: {
|
|
2080
|
+
path: '/wechaty.Puppet/ContactDelete',
|
|
2081
|
+
requestStream: false,
|
|
2082
|
+
responseStream: false,
|
|
2083
|
+
requestType: wechaty_puppet_contact_pb.ContactDeleteRequest,
|
|
2084
|
+
responseType: wechaty_puppet_contact_pb.ContactDeleteResponse,
|
|
2085
|
+
requestSerialize: serialize_wechaty_puppet_ContactDeleteRequest,
|
|
2086
|
+
requestDeserialize: deserialize_wechaty_puppet_ContactDeleteRequest,
|
|
2087
|
+
responseSerialize: serialize_wechaty_puppet_ContactDeleteResponse,
|
|
2088
|
+
responseDeserialize: deserialize_wechaty_puppet_ContactDeleteResponse,
|
|
2089
|
+
},
|
|
2057
2090
|
// *
|
|
2058
2091
|
// Huan(202002): consider changing response to a stream in the future for better performance
|
|
2059
2092
|
contactList: {
|
|
@@ -198,6 +198,15 @@ type PuppetContactDescription = {
|
|
|
198
198
|
readonly responseType: typeof wechaty_puppet_contact_pb.ContactDescriptionResponse;
|
|
199
199
|
};
|
|
200
200
|
|
|
201
|
+
type PuppetContactDelete = {
|
|
202
|
+
readonly methodName: string;
|
|
203
|
+
readonly service: typeof Puppet;
|
|
204
|
+
readonly requestStream: false;
|
|
205
|
+
readonly responseStream: false;
|
|
206
|
+
readonly requestType: typeof wechaty_puppet_contact_pb.ContactDeleteRequest;
|
|
207
|
+
readonly responseType: typeof wechaty_puppet_contact_pb.ContactDeleteResponse;
|
|
208
|
+
};
|
|
209
|
+
|
|
201
210
|
type PuppetContactList = {
|
|
202
211
|
readonly methodName: string;
|
|
203
212
|
readonly service: typeof Puppet;
|
|
@@ -778,6 +787,7 @@ export class Puppet {
|
|
|
778
787
|
static readonly ContactPhone: PuppetContactPhone;
|
|
779
788
|
static readonly ContactCorporationRemark: PuppetContactCorporationRemark;
|
|
780
789
|
static readonly ContactDescription: PuppetContactDescription;
|
|
790
|
+
static readonly ContactDelete: PuppetContactDelete;
|
|
781
791
|
static readonly ContactList: PuppetContactList;
|
|
782
792
|
static readonly FriendshipPayload: PuppetFriendshipPayload;
|
|
783
793
|
static readonly FriendshipSearchPhone: PuppetFriendshipSearchPhone;
|
|
@@ -1022,6 +1032,15 @@ export class PuppetClient {
|
|
|
1022
1032
|
requestMessage: wechaty_puppet_contact_pb.ContactDescriptionRequest,
|
|
1023
1033
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactDescriptionResponse|null) => void
|
|
1024
1034
|
): UnaryResponse;
|
|
1035
|
+
contactDelete(
|
|
1036
|
+
requestMessage: wechaty_puppet_contact_pb.ContactDeleteRequest,
|
|
1037
|
+
metadata: grpc.Metadata,
|
|
1038
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactDeleteResponse|null) => void
|
|
1039
|
+
): UnaryResponse;
|
|
1040
|
+
contactDelete(
|
|
1041
|
+
requestMessage: wechaty_puppet_contact_pb.ContactDeleteRequest,
|
|
1042
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactDeleteResponse|null) => void
|
|
1043
|
+
): UnaryResponse;
|
|
1025
1044
|
contactList(
|
|
1026
1045
|
requestMessage: wechaty_puppet_contact_pb.ContactListRequest,
|
|
1027
1046
|
metadata: grpc.Metadata,
|
|
@@ -204,6 +204,15 @@ Puppet.ContactDescription = {
|
|
|
204
204
|
responseType: wechaty_puppet_contact_pb.ContactDescriptionResponse
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
Puppet.ContactDelete = {
|
|
208
|
+
methodName: "ContactDelete",
|
|
209
|
+
service: Puppet,
|
|
210
|
+
requestStream: false,
|
|
211
|
+
responseStream: false,
|
|
212
|
+
requestType: wechaty_puppet_contact_pb.ContactDeleteRequest,
|
|
213
|
+
responseType: wechaty_puppet_contact_pb.ContactDeleteResponse
|
|
214
|
+
};
|
|
215
|
+
|
|
207
216
|
Puppet.ContactList = {
|
|
208
217
|
methodName: "ContactList",
|
|
209
218
|
service: Puppet,
|
|
@@ -1423,6 +1432,37 @@ PuppetClient.prototype.contactDescription = function contactDescription(requestM
|
|
|
1423
1432
|
};
|
|
1424
1433
|
};
|
|
1425
1434
|
|
|
1435
|
+
PuppetClient.prototype.contactDelete = function contactDelete(requestMessage, metadata, callback) {
|
|
1436
|
+
if (arguments.length === 2) {
|
|
1437
|
+
callback = arguments[1];
|
|
1438
|
+
}
|
|
1439
|
+
var client = grpc.unary(Puppet.ContactDelete, {
|
|
1440
|
+
request: requestMessage,
|
|
1441
|
+
host: this.serviceHost,
|
|
1442
|
+
metadata: metadata,
|
|
1443
|
+
transport: this.options.transport,
|
|
1444
|
+
debug: this.options.debug,
|
|
1445
|
+
onEnd: function (response) {
|
|
1446
|
+
if (callback) {
|
|
1447
|
+
if (response.status !== grpc.Code.OK) {
|
|
1448
|
+
var err = new Error(response.statusMessage);
|
|
1449
|
+
err.code = response.status;
|
|
1450
|
+
err.metadata = response.trailers;
|
|
1451
|
+
callback(err, null);
|
|
1452
|
+
} else {
|
|
1453
|
+
callback(null, response.message);
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1458
|
+
return {
|
|
1459
|
+
cancel: function () {
|
|
1460
|
+
callback = null;
|
|
1461
|
+
client.close();
|
|
1462
|
+
}
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1426
1466
|
PuppetClient.prototype.contactList = function contactList(requestMessage, metadata, callback) {
|
|
1427
1467
|
if (arguments.length === 2) {
|
|
1428
1468
|
callback = arguments[1];
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED