@juzi/wechaty-grpc 1.0.80 → 1.0.82
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/wecom_pb.d.ts +87 -0
- package/dist/cjs/out/wechaty/puppet/wecom_pb.js +642 -0
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +46 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +69 -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/wecom.proto +20 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/tests/integration.spec.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/wecom_pb.d.ts +87 -0
- package/dist/esm/out/wechaty/puppet/wecom_pb.js +642 -0
- package/dist/esm/out/wechaty/puppet.openapi.yaml +46 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +69 -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/wecom.proto +20 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -0
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/tests/integration.spec.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/wecom_pb.d.ts +87 -0
- package/out/wechaty/puppet/wecom_pb.js +642 -0
- package/out/wechaty/puppet.openapi.yaml +46 -1
- package/out/wechaty/puppet.swagger.json +69 -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
|
@@ -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.82
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: https://github.com/wechaty/openapi
|
|
@@ -2474,6 +2474,20 @@ paths:
|
|
|
2474
2474
|
$ref: '#/definitions/puppetMessageSendFileRequest'
|
|
2475
2475
|
tags:
|
|
2476
2476
|
- Puppet
|
|
2477
|
+
/wecom/corpMessageInterceptionStrategyList:
|
|
2478
|
+
get:
|
|
2479
|
+
operationId: Puppet_GetCorpMessageInterceptionStrategies
|
|
2480
|
+
responses:
|
|
2481
|
+
'200':
|
|
2482
|
+
description: A successful response.
|
|
2483
|
+
schema:
|
|
2484
|
+
$ref: '#/definitions/puppetGetCorpMessageInterceptionStrategiesResponse'
|
|
2485
|
+
default:
|
|
2486
|
+
description: An unexpected error response.
|
|
2487
|
+
schema:
|
|
2488
|
+
$ref: '#/definitions/rpcStatus'
|
|
2489
|
+
tags:
|
|
2490
|
+
- Puppet
|
|
2477
2491
|
/wecom/roomAntiSpamStrategy/apply:
|
|
2478
2492
|
post:
|
|
2479
2493
|
operationId: Puppet_ApplyRoomAntiSpamStrategy
|
|
@@ -3087,6 +3101,29 @@ definitions:
|
|
|
3087
3101
|
properties:
|
|
3088
3102
|
hasRead:
|
|
3089
3103
|
type: boolean
|
|
3104
|
+
puppetCorpMessageInterceptionStrategy:
|
|
3105
|
+
type: object
|
|
3106
|
+
properties:
|
|
3107
|
+
name:
|
|
3108
|
+
type: string
|
|
3109
|
+
words:
|
|
3110
|
+
type: array
|
|
3111
|
+
items:
|
|
3112
|
+
type: string
|
|
3113
|
+
phoneNumber:
|
|
3114
|
+
type: boolean
|
|
3115
|
+
email:
|
|
3116
|
+
type: boolean
|
|
3117
|
+
redPacket:
|
|
3118
|
+
type: boolean
|
|
3119
|
+
type:
|
|
3120
|
+
$ref: '#/definitions/puppetCorpMessageInterceptionType'
|
|
3121
|
+
puppetCorpMessageInterceptionType:
|
|
3122
|
+
type: string
|
|
3123
|
+
enum:
|
|
3124
|
+
- Interception_Type_Hard
|
|
3125
|
+
- Interception_Type_Soft
|
|
3126
|
+
default: Interception_Type_Hard
|
|
3090
3127
|
puppetCreateMessageBroadcastRequest:
|
|
3091
3128
|
type: object
|
|
3092
3129
|
properties:
|
|
@@ -3295,6 +3332,14 @@ definitions:
|
|
|
3295
3332
|
items:
|
|
3296
3333
|
type: object
|
|
3297
3334
|
$ref: '#/definitions/puppetContactExternalUserIdPair'
|
|
3335
|
+
puppetGetCorpMessageInterceptionStrategiesResponse:
|
|
3336
|
+
type: object
|
|
3337
|
+
properties:
|
|
3338
|
+
strategies:
|
|
3339
|
+
type: array
|
|
3340
|
+
items:
|
|
3341
|
+
type: object
|
|
3342
|
+
$ref: '#/definitions/puppetCorpMessageInterceptionStrategy'
|
|
3298
3343
|
puppetGetMessageBroadcastStatusResponse:
|
|
3299
3344
|
type: object
|
|
3300
3345
|
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.82",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -3716,6 +3716,28 @@
|
|
|
3716
3716
|
]
|
|
3717
3717
|
}
|
|
3718
3718
|
},
|
|
3719
|
+
"/wecom/corpMessageInterceptionStrategyList": {
|
|
3720
|
+
"get": {
|
|
3721
|
+
"operationId": "Puppet_GetCorpMessageInterceptionStrategies",
|
|
3722
|
+
"responses": {
|
|
3723
|
+
"200": {
|
|
3724
|
+
"description": "A successful response.",
|
|
3725
|
+
"schema": {
|
|
3726
|
+
"$ref": "#/definitions/puppetGetCorpMessageInterceptionStrategiesResponse"
|
|
3727
|
+
}
|
|
3728
|
+
},
|
|
3729
|
+
"default": {
|
|
3730
|
+
"description": "An unexpected error response.",
|
|
3731
|
+
"schema": {
|
|
3732
|
+
"$ref": "#/definitions/rpcStatus"
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
"tags": [
|
|
3737
|
+
"Puppet"
|
|
3738
|
+
]
|
|
3739
|
+
}
|
|
3740
|
+
},
|
|
3719
3741
|
"/wecom/roomAntiSpamStrategy/apply": {
|
|
3720
3742
|
"post": {
|
|
3721
3743
|
"operationId": "Puppet_ApplyRoomAntiSpamStrategy",
|
|
@@ -4529,6 +4551,40 @@
|
|
|
4529
4551
|
}
|
|
4530
4552
|
}
|
|
4531
4553
|
},
|
|
4554
|
+
"puppetCorpMessageInterceptionStrategy": {
|
|
4555
|
+
"type": "object",
|
|
4556
|
+
"properties": {
|
|
4557
|
+
"name": {
|
|
4558
|
+
"type": "string"
|
|
4559
|
+
},
|
|
4560
|
+
"words": {
|
|
4561
|
+
"type": "array",
|
|
4562
|
+
"items": {
|
|
4563
|
+
"type": "string"
|
|
4564
|
+
}
|
|
4565
|
+
},
|
|
4566
|
+
"phoneNumber": {
|
|
4567
|
+
"type": "boolean"
|
|
4568
|
+
},
|
|
4569
|
+
"email": {
|
|
4570
|
+
"type": "boolean"
|
|
4571
|
+
},
|
|
4572
|
+
"redPacket": {
|
|
4573
|
+
"type": "boolean"
|
|
4574
|
+
},
|
|
4575
|
+
"type": {
|
|
4576
|
+
"$ref": "#/definitions/puppetCorpMessageInterceptionType"
|
|
4577
|
+
}
|
|
4578
|
+
}
|
|
4579
|
+
},
|
|
4580
|
+
"puppetCorpMessageInterceptionType": {
|
|
4581
|
+
"type": "string",
|
|
4582
|
+
"enum": [
|
|
4583
|
+
"Interception_Type_Hard",
|
|
4584
|
+
"Interception_Type_Soft"
|
|
4585
|
+
],
|
|
4586
|
+
"default": "Interception_Type_Hard"
|
|
4587
|
+
},
|
|
4532
4588
|
"puppetCreateMessageBroadcastRequest": {
|
|
4533
4589
|
"type": "object",
|
|
4534
4590
|
"properties": {
|
|
@@ -4768,6 +4824,18 @@
|
|
|
4768
4824
|
}
|
|
4769
4825
|
}
|
|
4770
4826
|
},
|
|
4827
|
+
"puppetGetCorpMessageInterceptionStrategiesResponse": {
|
|
4828
|
+
"type": "object",
|
|
4829
|
+
"properties": {
|
|
4830
|
+
"strategies": {
|
|
4831
|
+
"type": "array",
|
|
4832
|
+
"items": {
|
|
4833
|
+
"type": "object",
|
|
4834
|
+
"$ref": "#/definitions/puppetCorpMessageInterceptionStrategy"
|
|
4835
|
+
}
|
|
4836
|
+
}
|
|
4837
|
+
}
|
|
4838
|
+
},
|
|
4771
4839
|
"puppetGetMessageBroadcastStatusResponse": {
|
|
4772
4840
|
"type": "object",
|
|
4773
4841
|
"properties": {
|
|
@@ -126,6 +126,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
|
|
|
126
126
|
getRoomAntiSpamStrategyList: IPuppetService_IGetRoomAntiSpamStrategyList;
|
|
127
127
|
getRoomAntiSpamStrategyEffectRoomList: IPuppetService_IGetRoomAntiSpamStrategyEffectRoomList;
|
|
128
128
|
applyRoomAntiSpamStrategy: IPuppetService_IApplyRoomAntiSpamStrategy;
|
|
129
|
+
getCorpMessageInterceptionStrategies: IPuppetService_IGetCorpMessageInterceptionStrategies;
|
|
129
130
|
download: IPuppetService_IDownload;
|
|
130
131
|
upload: IPuppetService_IUpload;
|
|
131
132
|
}
|
|
@@ -1048,6 +1049,15 @@ interface IPuppetService_IApplyRoomAntiSpamStrategy extends grpc.MethodDefinitio
|
|
|
1048
1049
|
responseSerialize: grpc.serialize<wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse>;
|
|
1049
1050
|
responseDeserialize: grpc.deserialize<wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse>;
|
|
1050
1051
|
}
|
|
1052
|
+
interface IPuppetService_IGetCorpMessageInterceptionStrategies extends grpc.MethodDefinition<wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse> {
|
|
1053
|
+
path: "/wechaty.Puppet/GetCorpMessageInterceptionStrategies";
|
|
1054
|
+
requestStream: false;
|
|
1055
|
+
responseStream: false;
|
|
1056
|
+
requestSerialize: grpc.serialize<wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest>;
|
|
1057
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest>;
|
|
1058
|
+
responseSerialize: grpc.serialize<wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse>;
|
|
1059
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse>;
|
|
1060
|
+
}
|
|
1051
1061
|
interface IPuppetService_IDownload extends grpc.MethodDefinition<wechaty_puppet_download_upload_pb.DownloadRequest, wechaty_puppet_download_upload_pb.DownloadResponse> {
|
|
1052
1062
|
path: "/wechaty.Puppet/Download";
|
|
1053
1063
|
requestStream: false;
|
|
@@ -1172,6 +1182,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
|
|
|
1172
1182
|
getRoomAntiSpamStrategyList: grpc.handleUnaryCall<wechaty_puppet_wecom_pb.GetRoomAntiSpamStrategyListRequest, wechaty_puppet_wecom_pb.GetRoomAntiSpamStrategyListResponse>;
|
|
1173
1183
|
getRoomAntiSpamStrategyEffectRoomList: grpc.handleUnaryCall<wechaty_puppet_wecom_pb.GetRoomAntiSpamStrategyEffectRoomListRequest, wechaty_puppet_wecom_pb.GetRoomAntiSpamStrategyEffectRoomListResponse>;
|
|
1174
1184
|
applyRoomAntiSpamStrategy: grpc.handleUnaryCall<wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse>;
|
|
1185
|
+
getCorpMessageInterceptionStrategies: grpc.handleUnaryCall<wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse>;
|
|
1175
1186
|
download: grpc.handleServerStreamingCall<wechaty_puppet_download_upload_pb.DownloadRequest, wechaty_puppet_download_upload_pb.DownloadResponse>;
|
|
1176
1187
|
upload: grpc.handleClientStreamingCall<wechaty_puppet_download_upload_pb.UploadRequest, wechaty_puppet_download_upload_pb.UploadResponse>;
|
|
1177
1188
|
}
|
|
@@ -1482,6 +1493,9 @@ export interface IPuppetClient {
|
|
|
1482
1493
|
applyRoomAntiSpamStrategy(request: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse) => void): grpc.ClientUnaryCall;
|
|
1483
1494
|
applyRoomAntiSpamStrategy(request: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse) => void): grpc.ClientUnaryCall;
|
|
1484
1495
|
applyRoomAntiSpamStrategy(request: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse) => void): grpc.ClientUnaryCall;
|
|
1496
|
+
getCorpMessageInterceptionStrategies(request: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse) => void): grpc.ClientUnaryCall;
|
|
1497
|
+
getCorpMessageInterceptionStrategies(request: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse) => void): grpc.ClientUnaryCall;
|
|
1498
|
+
getCorpMessageInterceptionStrategies(request: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse) => void): grpc.ClientUnaryCall;
|
|
1485
1499
|
download(request: wechaty_puppet_download_upload_pb.DownloadRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
|
|
1486
1500
|
download(request: wechaty_puppet_download_upload_pb.DownloadRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
|
|
1487
1501
|
upload(callback: (error: grpc.ServiceError | null, response: wechaty_puppet_download_upload_pb.UploadResponse) => void): grpc.ClientWritableStream<wechaty_puppet_download_upload_pb.UploadRequest>;
|
|
@@ -1797,6 +1811,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
|
|
|
1797
1811
|
public applyRoomAntiSpamStrategy(request: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse) => void): grpc.ClientUnaryCall;
|
|
1798
1812
|
public applyRoomAntiSpamStrategy(request: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse) => void): grpc.ClientUnaryCall;
|
|
1799
1813
|
public applyRoomAntiSpamStrategy(request: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse) => void): grpc.ClientUnaryCall;
|
|
1814
|
+
public getCorpMessageInterceptionStrategies(request: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse) => void): grpc.ClientUnaryCall;
|
|
1815
|
+
public getCorpMessageInterceptionStrategies(request: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse) => void): grpc.ClientUnaryCall;
|
|
1816
|
+
public getCorpMessageInterceptionStrategies(request: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse) => void): grpc.ClientUnaryCall;
|
|
1800
1817
|
public download(request: wechaty_puppet_download_upload_pb.DownloadRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
|
|
1801
1818
|
public download(request: wechaty_puppet_download_upload_pb.DownloadRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
|
|
1802
1819
|
public upload(callback: (error: grpc.ServiceError | null, response: wechaty_puppet_download_upload_pb.UploadResponse) => void): grpc.ClientWritableStream<wechaty_puppet_download_upload_pb.UploadRequest>;
|
|
@@ -714,6 +714,28 @@ function deserialize_wechaty_puppet_GetContactExternalUserIdResponse(buffer_arg)
|
|
|
714
714
|
return wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
+
function serialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesRequest(arg) {
|
|
718
|
+
if (!(arg instanceof wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest)) {
|
|
719
|
+
throw new Error('Expected argument of type wechaty.puppet.GetCorpMessageInterceptionStrategiesRequest');
|
|
720
|
+
}
|
|
721
|
+
return Buffer.from(arg.serializeBinary());
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
function deserialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesRequest(buffer_arg) {
|
|
725
|
+
return wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
function serialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesResponse(arg) {
|
|
729
|
+
if (!(arg instanceof wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse)) {
|
|
730
|
+
throw new Error('Expected argument of type wechaty.puppet.GetCorpMessageInterceptionStrategiesResponse');
|
|
731
|
+
}
|
|
732
|
+
return Buffer.from(arg.serializeBinary());
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
function deserialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesResponse(buffer_arg) {
|
|
736
|
+
return wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
737
|
+
}
|
|
738
|
+
|
|
717
739
|
function serialize_wechaty_puppet_GetMessageBroadcastStatusRequest(arg) {
|
|
718
740
|
if (!(arg instanceof wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest)) {
|
|
719
741
|
throw new Error('Expected argument of type wechaty.puppet.GetMessageBroadcastStatusRequest');
|
|
@@ -3453,6 +3475,17 @@ getContactExternalUserId: {
|
|
|
3453
3475
|
responseSerialize: serialize_wechaty_puppet_ApplyRoomAntiSpamStrategyResponse,
|
|
3454
3476
|
responseDeserialize: deserialize_wechaty_puppet_ApplyRoomAntiSpamStrategyResponse,
|
|
3455
3477
|
},
|
|
3478
|
+
getCorpMessageInterceptionStrategies: {
|
|
3479
|
+
path: '/wechaty.Puppet/GetCorpMessageInterceptionStrategies',
|
|
3480
|
+
requestStream: false,
|
|
3481
|
+
responseStream: false,
|
|
3482
|
+
requestType: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest,
|
|
3483
|
+
responseType: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse,
|
|
3484
|
+
requestSerialize: serialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesRequest,
|
|
3485
|
+
requestDeserialize: deserialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesRequest,
|
|
3486
|
+
responseSerialize: serialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesResponse,
|
|
3487
|
+
responseDeserialize: deserialize_wechaty_puppet_GetCorpMessageInterceptionStrategiesResponse,
|
|
3488
|
+
},
|
|
3456
3489
|
// *
|
|
3457
3490
|
// File/Blob download & upload
|
|
3458
3491
|
download: {
|
|
@@ -937,6 +937,15 @@ type PuppetApplyRoomAntiSpamStrategy = {
|
|
|
937
937
|
readonly responseType: typeof wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse;
|
|
938
938
|
};
|
|
939
939
|
|
|
940
|
+
type PuppetGetCorpMessageInterceptionStrategies = {
|
|
941
|
+
readonly methodName: string;
|
|
942
|
+
readonly service: typeof Puppet;
|
|
943
|
+
readonly requestStream: false;
|
|
944
|
+
readonly responseStream: false;
|
|
945
|
+
readonly requestType: typeof wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest;
|
|
946
|
+
readonly responseType: typeof wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse;
|
|
947
|
+
};
|
|
948
|
+
|
|
940
949
|
type PuppetDownload = {
|
|
941
950
|
readonly methodName: string;
|
|
942
951
|
readonly service: typeof Puppet;
|
|
@@ -1059,6 +1068,7 @@ export class Puppet {
|
|
|
1059
1068
|
static readonly GetRoomAntiSpamStrategyList: PuppetGetRoomAntiSpamStrategyList;
|
|
1060
1069
|
static readonly GetRoomAntiSpamStrategyEffectRoomList: PuppetGetRoomAntiSpamStrategyEffectRoomList;
|
|
1061
1070
|
static readonly ApplyRoomAntiSpamStrategy: PuppetApplyRoomAntiSpamStrategy;
|
|
1071
|
+
static readonly GetCorpMessageInterceptionStrategies: PuppetGetCorpMessageInterceptionStrategies;
|
|
1062
1072
|
static readonly Download: PuppetDownload;
|
|
1063
1073
|
static readonly Upload: PuppetUpload;
|
|
1064
1074
|
}
|
|
@@ -2005,6 +2015,15 @@ export class PuppetClient {
|
|
|
2005
2015
|
requestMessage: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyRequest,
|
|
2006
2016
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse|null) => void
|
|
2007
2017
|
): UnaryResponse;
|
|
2018
|
+
getCorpMessageInterceptionStrategies(
|
|
2019
|
+
requestMessage: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest,
|
|
2020
|
+
metadata: grpc.Metadata,
|
|
2021
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse|null) => void
|
|
2022
|
+
): UnaryResponse;
|
|
2023
|
+
getCorpMessageInterceptionStrategies(
|
|
2024
|
+
requestMessage: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest,
|
|
2025
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse|null) => void
|
|
2026
|
+
): UnaryResponse;
|
|
2008
2027
|
download(requestMessage: wechaty_puppet_download_upload_pb.DownloadRequest, metadata?: grpc.Metadata): ResponseStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
|
|
2009
2028
|
upload(metadata?: grpc.Metadata): RequestStream<wechaty_puppet_download_upload_pb.UploadRequest>;
|
|
2010
2029
|
}
|
|
@@ -943,6 +943,15 @@ Puppet.ApplyRoomAntiSpamStrategy = {
|
|
|
943
943
|
responseType: wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse
|
|
944
944
|
};
|
|
945
945
|
|
|
946
|
+
Puppet.GetCorpMessageInterceptionStrategies = {
|
|
947
|
+
methodName: "GetCorpMessageInterceptionStrategies",
|
|
948
|
+
service: Puppet,
|
|
949
|
+
requestStream: false,
|
|
950
|
+
responseStream: false,
|
|
951
|
+
requestType: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesRequest,
|
|
952
|
+
responseType: wechaty_puppet_wecom_pb.GetCorpMessageInterceptionStrategiesResponse
|
|
953
|
+
};
|
|
954
|
+
|
|
946
955
|
Puppet.Download = {
|
|
947
956
|
methodName: "Download",
|
|
948
957
|
service: Puppet,
|
|
@@ -4138,6 +4147,37 @@ PuppetClient.prototype.applyRoomAntiSpamStrategy = function applyRoomAntiSpamStr
|
|
|
4138
4147
|
};
|
|
4139
4148
|
};
|
|
4140
4149
|
|
|
4150
|
+
PuppetClient.prototype.getCorpMessageInterceptionStrategies = function getCorpMessageInterceptionStrategies(requestMessage, metadata, callback) {
|
|
4151
|
+
if (arguments.length === 2) {
|
|
4152
|
+
callback = arguments[1];
|
|
4153
|
+
}
|
|
4154
|
+
var client = grpc.unary(Puppet.GetCorpMessageInterceptionStrategies, {
|
|
4155
|
+
request: requestMessage,
|
|
4156
|
+
host: this.serviceHost,
|
|
4157
|
+
metadata: metadata,
|
|
4158
|
+
transport: this.options.transport,
|
|
4159
|
+
debug: this.options.debug,
|
|
4160
|
+
onEnd: function (response) {
|
|
4161
|
+
if (callback) {
|
|
4162
|
+
if (response.status !== grpc.Code.OK) {
|
|
4163
|
+
var err = new Error(response.statusMessage);
|
|
4164
|
+
err.code = response.status;
|
|
4165
|
+
err.metadata = response.trailers;
|
|
4166
|
+
callback(err, null);
|
|
4167
|
+
} else {
|
|
4168
|
+
callback(null, response.message);
|
|
4169
|
+
}
|
|
4170
|
+
}
|
|
4171
|
+
}
|
|
4172
|
+
});
|
|
4173
|
+
return {
|
|
4174
|
+
cancel: function () {
|
|
4175
|
+
callback = null;
|
|
4176
|
+
client.close();
|
|
4177
|
+
}
|
|
4178
|
+
};
|
|
4179
|
+
};
|
|
4180
|
+
|
|
4141
4181
|
PuppetClient.prototype.download = function download(requestMessage, metadata) {
|
|
4142
4182
|
var listeners = {
|
|
4143
4183
|
data: [],
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED