@juzi/wechaty-grpc 1.0.79 → 1.0.81
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/friendship_pb.d.ts +9 -0
- package/dist/cjs/out/wechaty/puppet/friendship_pb.js +64 -2
- 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 +82 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +102 -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/friendship.proto +3 -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/friendship_pb.d.ts +9 -0
- package/dist/esm/out/wechaty/puppet/friendship_pb.js +64 -2
- 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 +82 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +102 -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/friendship.proto +3 -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/friendship_pb.d.ts +9 -0
- package/out/wechaty/puppet/friendship_pb.js +64 -2
- 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 +82 -1
- package/out/wechaty/puppet.swagger.json +102 -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.81
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: https://github.com/wechaty/openapi
|
|
@@ -845,6 +845,23 @@ paths:
|
|
|
845
845
|
in: path
|
|
846
846
|
required: true
|
|
847
847
|
type: string
|
|
848
|
+
- name: type
|
|
849
|
+
description: |2-
|
|
850
|
+
- CONTACT_TYPE_UNSPECIFIED: 不明确
|
|
851
|
+
- CONTACT_TYPE_PERSONAL: 个微联系人
|
|
852
|
+
- CONTACT_TYPE_OFFICIAL: 公众号
|
|
853
|
+
- CONTACT_TYPE_CORPORATION: 企微联系人
|
|
854
|
+
- CONTACT_TYPE_APPLICATION: 应用联系人 例如小助手
|
|
855
|
+
in: query
|
|
856
|
+
required: false
|
|
857
|
+
type: string
|
|
858
|
+
enum:
|
|
859
|
+
- CONTACT_TYPE_UNSPECIFIED
|
|
860
|
+
- CONTACT_TYPE_PERSONAL
|
|
861
|
+
- CONTACT_TYPE_OFFICIAL
|
|
862
|
+
- CONTACT_TYPE_CORPORATION
|
|
863
|
+
- CONTACT_TYPE_APPLICATION
|
|
864
|
+
default: CONTACT_TYPE_UNSPECIFIED
|
|
848
865
|
tags:
|
|
849
866
|
- Puppet
|
|
850
867
|
/friendship/search/phone/{phone}:
|
|
@@ -864,6 +881,23 @@ paths:
|
|
|
864
881
|
in: path
|
|
865
882
|
required: true
|
|
866
883
|
type: string
|
|
884
|
+
- name: type
|
|
885
|
+
description: |2-
|
|
886
|
+
- CONTACT_TYPE_UNSPECIFIED: 不明确
|
|
887
|
+
- CONTACT_TYPE_PERSONAL: 个微联系人
|
|
888
|
+
- CONTACT_TYPE_OFFICIAL: 公众号
|
|
889
|
+
- CONTACT_TYPE_CORPORATION: 企微联系人
|
|
890
|
+
- CONTACT_TYPE_APPLICATION: 应用联系人 例如小助手
|
|
891
|
+
in: query
|
|
892
|
+
required: false
|
|
893
|
+
type: string
|
|
894
|
+
enum:
|
|
895
|
+
- CONTACT_TYPE_UNSPECIFIED
|
|
896
|
+
- CONTACT_TYPE_PERSONAL
|
|
897
|
+
- CONTACT_TYPE_OFFICIAL
|
|
898
|
+
- CONTACT_TYPE_CORPORATION
|
|
899
|
+
- CONTACT_TYPE_APPLICATION
|
|
900
|
+
default: CONTACT_TYPE_UNSPECIFIED
|
|
867
901
|
tags:
|
|
868
902
|
- Puppet
|
|
869
903
|
/friendship/{id}:
|
|
@@ -2440,6 +2474,20 @@ paths:
|
|
|
2440
2474
|
$ref: '#/definitions/puppetMessageSendFileRequest'
|
|
2441
2475
|
tags:
|
|
2442
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
|
|
2443
2491
|
/wecom/roomAntiSpamStrategy/apply:
|
|
2444
2492
|
post:
|
|
2445
2493
|
operationId: Puppet_ApplyRoomAntiSpamStrategy
|
|
@@ -3053,6 +3101,29 @@ definitions:
|
|
|
3053
3101
|
properties:
|
|
3054
3102
|
hasRead:
|
|
3055
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
|
+
redPocket:
|
|
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
|
|
3056
3127
|
puppetCreateMessageBroadcastRequest:
|
|
3057
3128
|
type: object
|
|
3058
3129
|
properties:
|
|
@@ -3194,6 +3265,8 @@ definitions:
|
|
|
3194
3265
|
@link https://github.com/wechaty/getting-started/issues/254
|
|
3195
3266
|
|
|
3196
3267
|
TODO: rename `weixin` to `handle` in v2.0.0
|
|
3268
|
+
type:
|
|
3269
|
+
$ref: '#/definitions/puppetContactType'
|
|
3197
3270
|
description: >-
|
|
3198
3271
|
*
|
|
3199
3272
|
|
|
@@ -3259,6 +3332,14 @@ definitions:
|
|
|
3259
3332
|
items:
|
|
3260
3333
|
type: object
|
|
3261
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'
|
|
3262
3343
|
puppetGetMessageBroadcastStatusResponse:
|
|
3263
3344
|
type: object
|
|
3264
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.81",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -1266,6 +1266,21 @@
|
|
|
1266
1266
|
"in": "path",
|
|
1267
1267
|
"required": true,
|
|
1268
1268
|
"type": "string"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"name": "type",
|
|
1272
|
+
"description": " - CONTACT_TYPE_UNSPECIFIED: 不明确\n - CONTACT_TYPE_PERSONAL: 个微联系人\n - CONTACT_TYPE_OFFICIAL: 公众号\n - CONTACT_TYPE_CORPORATION: 企微联系人\n - CONTACT_TYPE_APPLICATION: 应用联系人 例如小助手",
|
|
1273
|
+
"in": "query",
|
|
1274
|
+
"required": false,
|
|
1275
|
+
"type": "string",
|
|
1276
|
+
"enum": [
|
|
1277
|
+
"CONTACT_TYPE_UNSPECIFIED",
|
|
1278
|
+
"CONTACT_TYPE_PERSONAL",
|
|
1279
|
+
"CONTACT_TYPE_OFFICIAL",
|
|
1280
|
+
"CONTACT_TYPE_CORPORATION",
|
|
1281
|
+
"CONTACT_TYPE_APPLICATION"
|
|
1282
|
+
],
|
|
1283
|
+
"default": "CONTACT_TYPE_UNSPECIFIED"
|
|
1269
1284
|
}
|
|
1270
1285
|
],
|
|
1271
1286
|
"tags": [
|
|
@@ -1296,6 +1311,21 @@
|
|
|
1296
1311
|
"in": "path",
|
|
1297
1312
|
"required": true,
|
|
1298
1313
|
"type": "string"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
"name": "type",
|
|
1317
|
+
"description": " - CONTACT_TYPE_UNSPECIFIED: 不明确\n - CONTACT_TYPE_PERSONAL: 个微联系人\n - CONTACT_TYPE_OFFICIAL: 公众号\n - CONTACT_TYPE_CORPORATION: 企微联系人\n - CONTACT_TYPE_APPLICATION: 应用联系人 例如小助手",
|
|
1318
|
+
"in": "query",
|
|
1319
|
+
"required": false,
|
|
1320
|
+
"type": "string",
|
|
1321
|
+
"enum": [
|
|
1322
|
+
"CONTACT_TYPE_UNSPECIFIED",
|
|
1323
|
+
"CONTACT_TYPE_PERSONAL",
|
|
1324
|
+
"CONTACT_TYPE_OFFICIAL",
|
|
1325
|
+
"CONTACT_TYPE_CORPORATION",
|
|
1326
|
+
"CONTACT_TYPE_APPLICATION"
|
|
1327
|
+
],
|
|
1328
|
+
"default": "CONTACT_TYPE_UNSPECIFIED"
|
|
1299
1329
|
}
|
|
1300
1330
|
],
|
|
1301
1331
|
"tags": [
|
|
@@ -3686,6 +3716,28 @@
|
|
|
3686
3716
|
]
|
|
3687
3717
|
}
|
|
3688
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
|
+
},
|
|
3689
3741
|
"/wecom/roomAntiSpamStrategy/apply": {
|
|
3690
3742
|
"post": {
|
|
3691
3743
|
"operationId": "Puppet_ApplyRoomAntiSpamStrategy",
|
|
@@ -4499,6 +4551,40 @@
|
|
|
4499
4551
|
}
|
|
4500
4552
|
}
|
|
4501
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
|
+
"redPocket": {
|
|
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
|
+
},
|
|
4502
4588
|
"puppetCreateMessageBroadcastRequest": {
|
|
4503
4589
|
"type": "object",
|
|
4504
4590
|
"properties": {
|
|
@@ -4665,6 +4751,9 @@
|
|
|
4665
4751
|
"weixin": {
|
|
4666
4752
|
"type": "string",
|
|
4667
4753
|
"description": "*\nHuan(202203): in gRPC, we can freely rename the field name as long as the number keep consistent.\n so we can just rename `weixin` to `handle` here.\n\n(Huan(20220329): use `weixin` for now, until we upgrade to v2.0\n the `wechaty-grpc@1.0.0` will use the latest v1.x automatically when running `npm install`\n which will causing a breaking change.\n @link https://github.com/wechaty/getting-started/issues/254\n\nTODO: rename `weixin` to `handle` in v2.0.0"
|
|
4754
|
+
},
|
|
4755
|
+
"type": {
|
|
4756
|
+
"$ref": "#/definitions/puppetContactType"
|
|
4668
4757
|
}
|
|
4669
4758
|
},
|
|
4670
4759
|
"description": "*\nHuan(202003): we just rename the payload message because gRPC only care about the message structure\n (and as long as we keep consistent with the old structure).\n\n @link https://github.com/wechaty/grpc/pull/173\n\nRename:\n 1. `FriendshipSearchWeixinRequest` -> `FriendshipSearchHandleRequest`\n 2. `FriendshipSearchWeixinReqsponse` -> `FriendshipSearchHandleResponse`"
|
|
@@ -4735,6 +4824,18 @@
|
|
|
4735
4824
|
}
|
|
4736
4825
|
}
|
|
4737
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
|
+
},
|
|
4738
4839
|
"puppetGetMessageBroadcastStatusResponse": {
|
|
4739
4840
|
"type": "object",
|
|
4740
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