@juzi/wechaty-grpc 1.0.79 → 1.0.80
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.openapi.yaml +37 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +34 -1
- package/dist/cjs/proto/wechaty/puppet/friendship.proto +3 -0
- package/dist/cjs/src/package-json.js +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.openapi.yaml +37 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +34 -1
- package/dist/esm/proto/wechaty/puppet/friendship.proto +3 -0
- package/dist/esm/src/package-json.js +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.openapi.yaml +37 -1
- package/out/wechaty/puppet.swagger.json +34 -1
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as jspb from "google-protobuf";
|
|
5
5
|
import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
|
|
6
6
|
import * as wechaty_puppet_referrer_pb from "../../wechaty/puppet/referrer_pb";
|
|
7
|
+
import * as wechaty_puppet_contact_pb from "../../wechaty/puppet/contact_pb";
|
|
7
8
|
|
|
8
9
|
export class FriendshipPayloadRequest extends jspb.Message {
|
|
9
10
|
getId(): string;
|
|
@@ -83,6 +84,9 @@ export class FriendshipSearchPhoneRequest extends jspb.Message {
|
|
|
83
84
|
getPhone(): string;
|
|
84
85
|
setPhone(value: string): void;
|
|
85
86
|
|
|
87
|
+
getType(): wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap];
|
|
88
|
+
setType(value: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap]): void;
|
|
89
|
+
|
|
86
90
|
serializeBinary(): Uint8Array;
|
|
87
91
|
toObject(includeInstance?: boolean): FriendshipSearchPhoneRequest.AsObject;
|
|
88
92
|
static toObject(includeInstance: boolean, msg: FriendshipSearchPhoneRequest): FriendshipSearchPhoneRequest.AsObject;
|
|
@@ -96,6 +100,7 @@ export class FriendshipSearchPhoneRequest extends jspb.Message {
|
|
|
96
100
|
export namespace FriendshipSearchPhoneRequest {
|
|
97
101
|
export type AsObject = {
|
|
98
102
|
phone: string,
|
|
103
|
+
type: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap],
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
106
|
|
|
@@ -129,6 +134,9 @@ export class FriendshipSearchHandleRequest extends jspb.Message {
|
|
|
129
134
|
getWeixin(): string;
|
|
130
135
|
setWeixin(value: string): void;
|
|
131
136
|
|
|
137
|
+
getType(): wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap];
|
|
138
|
+
setType(value: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap]): void;
|
|
139
|
+
|
|
132
140
|
serializeBinary(): Uint8Array;
|
|
133
141
|
toObject(includeInstance?: boolean): FriendshipSearchHandleRequest.AsObject;
|
|
134
142
|
static toObject(includeInstance: boolean, msg: FriendshipSearchHandleRequest): FriendshipSearchHandleRequest.AsObject;
|
|
@@ -142,6 +150,7 @@ export class FriendshipSearchHandleRequest extends jspb.Message {
|
|
|
142
150
|
export namespace FriendshipSearchHandleRequest {
|
|
143
151
|
export type AsObject = {
|
|
144
152
|
weixin: string,
|
|
153
|
+
type: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap],
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
156
|
|
|
@@ -19,6 +19,8 @@ var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrapp
|
|
|
19
19
|
goog.object.extend(proto, google_protobuf_wrappers_pb);
|
|
20
20
|
var wechaty_puppet_referrer_pb = require('../../wechaty/puppet/referrer_pb.js');
|
|
21
21
|
goog.object.extend(proto, wechaty_puppet_referrer_pb);
|
|
22
|
+
var wechaty_puppet_contact_pb = require('../../wechaty/puppet/contact_pb.js');
|
|
23
|
+
goog.object.extend(proto, wechaty_puppet_contact_pb);
|
|
22
24
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptRequest', null, global);
|
|
23
25
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptResponse', null, global);
|
|
24
26
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAddRequest', null, global);
|
|
@@ -794,7 +796,8 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.toObject = function(
|
|
|
794
796
|
*/
|
|
795
797
|
proto.wechaty.puppet.FriendshipSearchPhoneRequest.toObject = function(includeInstance, msg) {
|
|
796
798
|
var f, obj = {
|
|
797
|
-
phone: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
799
|
+
phone: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
800
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
798
801
|
};
|
|
799
802
|
|
|
800
803
|
if (includeInstance) {
|
|
@@ -835,6 +838,10 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.deserializeBinaryFromReader =
|
|
|
835
838
|
var value = /** @type {string} */ (reader.readString());
|
|
836
839
|
msg.setPhone(value);
|
|
837
840
|
break;
|
|
841
|
+
case 2:
|
|
842
|
+
var value = /** @type {!proto.wechaty.puppet.ContactType} */ (reader.readEnum());
|
|
843
|
+
msg.setType(value);
|
|
844
|
+
break;
|
|
838
845
|
default:
|
|
839
846
|
reader.skipField();
|
|
840
847
|
break;
|
|
@@ -871,6 +878,13 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.serializeBinaryToWriter = func
|
|
|
871
878
|
f
|
|
872
879
|
);
|
|
873
880
|
}
|
|
881
|
+
f = message.getType();
|
|
882
|
+
if (f !== 0.0) {
|
|
883
|
+
writer.writeEnum(
|
|
884
|
+
2,
|
|
885
|
+
f
|
|
886
|
+
);
|
|
887
|
+
}
|
|
874
888
|
};
|
|
875
889
|
|
|
876
890
|
|
|
@@ -892,6 +906,24 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setPhone = function(
|
|
|
892
906
|
};
|
|
893
907
|
|
|
894
908
|
|
|
909
|
+
/**
|
|
910
|
+
* optional ContactType type = 2;
|
|
911
|
+
* @return {!proto.wechaty.puppet.ContactType}
|
|
912
|
+
*/
|
|
913
|
+
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.getType = function() {
|
|
914
|
+
return /** @type {!proto.wechaty.puppet.ContactType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* @param {!proto.wechaty.puppet.ContactType} value
|
|
920
|
+
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} returns this
|
|
921
|
+
*/
|
|
922
|
+
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setType = function(value) {
|
|
923
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
|
|
895
927
|
|
|
896
928
|
|
|
897
929
|
|
|
@@ -1105,7 +1137,8 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.toObject = function
|
|
|
1105
1137
|
*/
|
|
1106
1138
|
proto.wechaty.puppet.FriendshipSearchHandleRequest.toObject = function(includeInstance, msg) {
|
|
1107
1139
|
var f, obj = {
|
|
1108
|
-
weixin: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
1140
|
+
weixin: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1141
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
1109
1142
|
};
|
|
1110
1143
|
|
|
1111
1144
|
if (includeInstance) {
|
|
@@ -1146,6 +1179,10 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.deserializeBinaryFromReader =
|
|
|
1146
1179
|
var value = /** @type {string} */ (reader.readString());
|
|
1147
1180
|
msg.setWeixin(value);
|
|
1148
1181
|
break;
|
|
1182
|
+
case 2:
|
|
1183
|
+
var value = /** @type {!proto.wechaty.puppet.ContactType} */ (reader.readEnum());
|
|
1184
|
+
msg.setType(value);
|
|
1185
|
+
break;
|
|
1149
1186
|
default:
|
|
1150
1187
|
reader.skipField();
|
|
1151
1188
|
break;
|
|
@@ -1182,6 +1219,13 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.serializeBinaryToWriter = fun
|
|
|
1182
1219
|
f
|
|
1183
1220
|
);
|
|
1184
1221
|
}
|
|
1222
|
+
f = message.getType();
|
|
1223
|
+
if (f !== 0.0) {
|
|
1224
|
+
writer.writeEnum(
|
|
1225
|
+
2,
|
|
1226
|
+
f
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1185
1229
|
};
|
|
1186
1230
|
|
|
1187
1231
|
|
|
@@ -1203,6 +1247,24 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.setWeixin = functio
|
|
|
1203
1247
|
};
|
|
1204
1248
|
|
|
1205
1249
|
|
|
1250
|
+
/**
|
|
1251
|
+
* optional ContactType type = 2;
|
|
1252
|
+
* @return {!proto.wechaty.puppet.ContactType}
|
|
1253
|
+
*/
|
|
1254
|
+
proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.getType = function() {
|
|
1255
|
+
return /** @type {!proto.wechaty.puppet.ContactType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* @param {!proto.wechaty.puppet.ContactType} value
|
|
1261
|
+
* @return {!proto.wechaty.puppet.FriendshipSearchHandleRequest} returns this
|
|
1262
|
+
*/
|
|
1263
|
+
proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.setType = function(value) {
|
|
1264
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
1265
|
+
};
|
|
1266
|
+
|
|
1267
|
+
|
|
1206
1268
|
|
|
1207
1269
|
|
|
1208
1270
|
|
|
@@ -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.80
|
|
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}:
|
|
@@ -3194,6 +3228,8 @@ definitions:
|
|
|
3194
3228
|
@link https://github.com/wechaty/getting-started/issues/254
|
|
3195
3229
|
|
|
3196
3230
|
TODO: rename `weixin` to `handle` in v2.0.0
|
|
3231
|
+
type:
|
|
3232
|
+
$ref: '#/definitions/puppetContactType'
|
|
3197
3233
|
description: >-
|
|
3198
3234
|
*
|
|
3199
3235
|
|
|
@@ -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.80",
|
|
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": [
|
|
@@ -4665,6 +4695,9 @@
|
|
|
4665
4695
|
"weixin": {
|
|
4666
4696
|
"type": "string",
|
|
4667
4697
|
"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"
|
|
4698
|
+
},
|
|
4699
|
+
"type": {
|
|
4700
|
+
"$ref": "#/definitions/puppetContactType"
|
|
4668
4701
|
}
|
|
4669
4702
|
},
|
|
4670
4703
|
"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`"
|
|
@@ -7,6 +7,7 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
|
7
7
|
|
|
8
8
|
import "google/protobuf/wrappers.proto";
|
|
9
9
|
import "wechaty/puppet/referrer.proto";
|
|
10
|
+
import "wechaty/puppet/contact.proto";
|
|
10
11
|
|
|
11
12
|
enum FriendshipType { // 事件类型
|
|
12
13
|
FRIENDSHIP_TYPE_UNSPECIFIED = 0; // 不明确
|
|
@@ -55,6 +56,7 @@ message FriendshipPayloadResponse {
|
|
|
55
56
|
|
|
56
57
|
message FriendshipSearchPhoneRequest {
|
|
57
58
|
string phone = 1;
|
|
59
|
+
ContactType type = 2;
|
|
58
60
|
}
|
|
59
61
|
message FriendshipSearchPhoneResponse {
|
|
60
62
|
// nullable
|
|
@@ -85,6 +87,7 @@ message FriendshipSearchHandleRequest {
|
|
|
85
87
|
* TODO: rename `weixin` to `handle` in v2.0.0
|
|
86
88
|
*/
|
|
87
89
|
string weixin = 1;
|
|
90
|
+
ContactType type = 2;
|
|
88
91
|
}
|
|
89
92
|
message FriendshipSearchHandleResponse {
|
|
90
93
|
// nullable
|
|
@@ -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.80",
|
|
7
7
|
"description": "gRPC for Wechaty",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as jspb from "google-protobuf";
|
|
5
5
|
import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
|
|
6
6
|
import * as wechaty_puppet_referrer_pb from "../../wechaty/puppet/referrer_pb";
|
|
7
|
+
import * as wechaty_puppet_contact_pb from "../../wechaty/puppet/contact_pb";
|
|
7
8
|
|
|
8
9
|
export class FriendshipPayloadRequest extends jspb.Message {
|
|
9
10
|
getId(): string;
|
|
@@ -83,6 +84,9 @@ export class FriendshipSearchPhoneRequest extends jspb.Message {
|
|
|
83
84
|
getPhone(): string;
|
|
84
85
|
setPhone(value: string): void;
|
|
85
86
|
|
|
87
|
+
getType(): wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap];
|
|
88
|
+
setType(value: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap]): void;
|
|
89
|
+
|
|
86
90
|
serializeBinary(): Uint8Array;
|
|
87
91
|
toObject(includeInstance?: boolean): FriendshipSearchPhoneRequest.AsObject;
|
|
88
92
|
static toObject(includeInstance: boolean, msg: FriendshipSearchPhoneRequest): FriendshipSearchPhoneRequest.AsObject;
|
|
@@ -96,6 +100,7 @@ export class FriendshipSearchPhoneRequest extends jspb.Message {
|
|
|
96
100
|
export namespace FriendshipSearchPhoneRequest {
|
|
97
101
|
export type AsObject = {
|
|
98
102
|
phone: string,
|
|
103
|
+
type: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap],
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
106
|
|
|
@@ -129,6 +134,9 @@ export class FriendshipSearchHandleRequest extends jspb.Message {
|
|
|
129
134
|
getWeixin(): string;
|
|
130
135
|
setWeixin(value: string): void;
|
|
131
136
|
|
|
137
|
+
getType(): wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap];
|
|
138
|
+
setType(value: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap]): void;
|
|
139
|
+
|
|
132
140
|
serializeBinary(): Uint8Array;
|
|
133
141
|
toObject(includeInstance?: boolean): FriendshipSearchHandleRequest.AsObject;
|
|
134
142
|
static toObject(includeInstance: boolean, msg: FriendshipSearchHandleRequest): FriendshipSearchHandleRequest.AsObject;
|
|
@@ -142,6 +150,7 @@ export class FriendshipSearchHandleRequest extends jspb.Message {
|
|
|
142
150
|
export namespace FriendshipSearchHandleRequest {
|
|
143
151
|
export type AsObject = {
|
|
144
152
|
weixin: string,
|
|
153
|
+
type: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap],
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
156
|
|
|
@@ -19,6 +19,8 @@ var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrapp
|
|
|
19
19
|
goog.object.extend(proto, google_protobuf_wrappers_pb);
|
|
20
20
|
var wechaty_puppet_referrer_pb = require('../../wechaty/puppet/referrer_pb.js');
|
|
21
21
|
goog.object.extend(proto, wechaty_puppet_referrer_pb);
|
|
22
|
+
var wechaty_puppet_contact_pb = require('../../wechaty/puppet/contact_pb.js');
|
|
23
|
+
goog.object.extend(proto, wechaty_puppet_contact_pb);
|
|
22
24
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptRequest', null, global);
|
|
23
25
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptResponse', null, global);
|
|
24
26
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAddRequest', null, global);
|
|
@@ -794,7 +796,8 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.toObject = function(
|
|
|
794
796
|
*/
|
|
795
797
|
proto.wechaty.puppet.FriendshipSearchPhoneRequest.toObject = function(includeInstance, msg) {
|
|
796
798
|
var f, obj = {
|
|
797
|
-
phone: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
799
|
+
phone: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
800
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
798
801
|
};
|
|
799
802
|
|
|
800
803
|
if (includeInstance) {
|
|
@@ -835,6 +838,10 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.deserializeBinaryFromReader =
|
|
|
835
838
|
var value = /** @type {string} */ (reader.readString());
|
|
836
839
|
msg.setPhone(value);
|
|
837
840
|
break;
|
|
841
|
+
case 2:
|
|
842
|
+
var value = /** @type {!proto.wechaty.puppet.ContactType} */ (reader.readEnum());
|
|
843
|
+
msg.setType(value);
|
|
844
|
+
break;
|
|
838
845
|
default:
|
|
839
846
|
reader.skipField();
|
|
840
847
|
break;
|
|
@@ -871,6 +878,13 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.serializeBinaryToWriter = func
|
|
|
871
878
|
f
|
|
872
879
|
);
|
|
873
880
|
}
|
|
881
|
+
f = message.getType();
|
|
882
|
+
if (f !== 0.0) {
|
|
883
|
+
writer.writeEnum(
|
|
884
|
+
2,
|
|
885
|
+
f
|
|
886
|
+
);
|
|
887
|
+
}
|
|
874
888
|
};
|
|
875
889
|
|
|
876
890
|
|
|
@@ -892,6 +906,24 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setPhone = function(
|
|
|
892
906
|
};
|
|
893
907
|
|
|
894
908
|
|
|
909
|
+
/**
|
|
910
|
+
* optional ContactType type = 2;
|
|
911
|
+
* @return {!proto.wechaty.puppet.ContactType}
|
|
912
|
+
*/
|
|
913
|
+
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.getType = function() {
|
|
914
|
+
return /** @type {!proto.wechaty.puppet.ContactType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* @param {!proto.wechaty.puppet.ContactType} value
|
|
920
|
+
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} returns this
|
|
921
|
+
*/
|
|
922
|
+
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setType = function(value) {
|
|
923
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
|
|
895
927
|
|
|
896
928
|
|
|
897
929
|
|
|
@@ -1105,7 +1137,8 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.toObject = function
|
|
|
1105
1137
|
*/
|
|
1106
1138
|
proto.wechaty.puppet.FriendshipSearchHandleRequest.toObject = function(includeInstance, msg) {
|
|
1107
1139
|
var f, obj = {
|
|
1108
|
-
weixin: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
1140
|
+
weixin: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1141
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
1109
1142
|
};
|
|
1110
1143
|
|
|
1111
1144
|
if (includeInstance) {
|
|
@@ -1146,6 +1179,10 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.deserializeBinaryFromReader =
|
|
|
1146
1179
|
var value = /** @type {string} */ (reader.readString());
|
|
1147
1180
|
msg.setWeixin(value);
|
|
1148
1181
|
break;
|
|
1182
|
+
case 2:
|
|
1183
|
+
var value = /** @type {!proto.wechaty.puppet.ContactType} */ (reader.readEnum());
|
|
1184
|
+
msg.setType(value);
|
|
1185
|
+
break;
|
|
1149
1186
|
default:
|
|
1150
1187
|
reader.skipField();
|
|
1151
1188
|
break;
|
|
@@ -1182,6 +1219,13 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.serializeBinaryToWriter = fun
|
|
|
1182
1219
|
f
|
|
1183
1220
|
);
|
|
1184
1221
|
}
|
|
1222
|
+
f = message.getType();
|
|
1223
|
+
if (f !== 0.0) {
|
|
1224
|
+
writer.writeEnum(
|
|
1225
|
+
2,
|
|
1226
|
+
f
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1185
1229
|
};
|
|
1186
1230
|
|
|
1187
1231
|
|
|
@@ -1203,6 +1247,24 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.setWeixin = functio
|
|
|
1203
1247
|
};
|
|
1204
1248
|
|
|
1205
1249
|
|
|
1250
|
+
/**
|
|
1251
|
+
* optional ContactType type = 2;
|
|
1252
|
+
* @return {!proto.wechaty.puppet.ContactType}
|
|
1253
|
+
*/
|
|
1254
|
+
proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.getType = function() {
|
|
1255
|
+
return /** @type {!proto.wechaty.puppet.ContactType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* @param {!proto.wechaty.puppet.ContactType} value
|
|
1261
|
+
* @return {!proto.wechaty.puppet.FriendshipSearchHandleRequest} returns this
|
|
1262
|
+
*/
|
|
1263
|
+
proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.setType = function(value) {
|
|
1264
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
1265
|
+
};
|
|
1266
|
+
|
|
1267
|
+
|
|
1206
1268
|
|
|
1207
1269
|
|
|
1208
1270
|
|
|
@@ -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.80
|
|
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}:
|
|
@@ -3194,6 +3228,8 @@ definitions:
|
|
|
3194
3228
|
@link https://github.com/wechaty/getting-started/issues/254
|
|
3195
3229
|
|
|
3196
3230
|
TODO: rename `weixin` to `handle` in v2.0.0
|
|
3231
|
+
type:
|
|
3232
|
+
$ref: '#/definitions/puppetContactType'
|
|
3197
3233
|
description: >-
|
|
3198
3234
|
*
|
|
3199
3235
|
|
|
@@ -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.80",
|
|
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": [
|
|
@@ -4665,6 +4695,9 @@
|
|
|
4665
4695
|
"weixin": {
|
|
4666
4696
|
"type": "string",
|
|
4667
4697
|
"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"
|
|
4698
|
+
},
|
|
4699
|
+
"type": {
|
|
4700
|
+
"$ref": "#/definitions/puppetContactType"
|
|
4668
4701
|
}
|
|
4669
4702
|
},
|
|
4670
4703
|
"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`"
|
|
@@ -7,6 +7,7 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
|
7
7
|
|
|
8
8
|
import "google/protobuf/wrappers.proto";
|
|
9
9
|
import "wechaty/puppet/referrer.proto";
|
|
10
|
+
import "wechaty/puppet/contact.proto";
|
|
10
11
|
|
|
11
12
|
enum FriendshipType { // 事件类型
|
|
12
13
|
FRIENDSHIP_TYPE_UNSPECIFIED = 0; // 不明确
|
|
@@ -55,6 +56,7 @@ message FriendshipPayloadResponse {
|
|
|
55
56
|
|
|
56
57
|
message FriendshipSearchPhoneRequest {
|
|
57
58
|
string phone = 1;
|
|
59
|
+
ContactType type = 2;
|
|
58
60
|
}
|
|
59
61
|
message FriendshipSearchPhoneResponse {
|
|
60
62
|
// nullable
|
|
@@ -85,6 +87,7 @@ message FriendshipSearchHandleRequest {
|
|
|
85
87
|
* TODO: rename `weixin` to `handle` in v2.0.0
|
|
86
88
|
*/
|
|
87
89
|
string weixin = 1;
|
|
90
|
+
ContactType type = 2;
|
|
88
91
|
}
|
|
89
92
|
message FriendshipSearchHandleResponse {
|
|
90
93
|
// nullable
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as jspb from "google-protobuf";
|
|
5
5
|
import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
|
|
6
6
|
import * as wechaty_puppet_referrer_pb from "../../wechaty/puppet/referrer_pb";
|
|
7
|
+
import * as wechaty_puppet_contact_pb from "../../wechaty/puppet/contact_pb";
|
|
7
8
|
|
|
8
9
|
export class FriendshipPayloadRequest extends jspb.Message {
|
|
9
10
|
getId(): string;
|
|
@@ -83,6 +84,9 @@ export class FriendshipSearchPhoneRequest extends jspb.Message {
|
|
|
83
84
|
getPhone(): string;
|
|
84
85
|
setPhone(value: string): void;
|
|
85
86
|
|
|
87
|
+
getType(): wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap];
|
|
88
|
+
setType(value: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap]): void;
|
|
89
|
+
|
|
86
90
|
serializeBinary(): Uint8Array;
|
|
87
91
|
toObject(includeInstance?: boolean): FriendshipSearchPhoneRequest.AsObject;
|
|
88
92
|
static toObject(includeInstance: boolean, msg: FriendshipSearchPhoneRequest): FriendshipSearchPhoneRequest.AsObject;
|
|
@@ -96,6 +100,7 @@ export class FriendshipSearchPhoneRequest extends jspb.Message {
|
|
|
96
100
|
export namespace FriendshipSearchPhoneRequest {
|
|
97
101
|
export type AsObject = {
|
|
98
102
|
phone: string,
|
|
103
|
+
type: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap],
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
106
|
|
|
@@ -129,6 +134,9 @@ export class FriendshipSearchHandleRequest extends jspb.Message {
|
|
|
129
134
|
getWeixin(): string;
|
|
130
135
|
setWeixin(value: string): void;
|
|
131
136
|
|
|
137
|
+
getType(): wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap];
|
|
138
|
+
setType(value: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap]): void;
|
|
139
|
+
|
|
132
140
|
serializeBinary(): Uint8Array;
|
|
133
141
|
toObject(includeInstance?: boolean): FriendshipSearchHandleRequest.AsObject;
|
|
134
142
|
static toObject(includeInstance: boolean, msg: FriendshipSearchHandleRequest): FriendshipSearchHandleRequest.AsObject;
|
|
@@ -142,6 +150,7 @@ export class FriendshipSearchHandleRequest extends jspb.Message {
|
|
|
142
150
|
export namespace FriendshipSearchHandleRequest {
|
|
143
151
|
export type AsObject = {
|
|
144
152
|
weixin: string,
|
|
153
|
+
type: wechaty_puppet_contact_pb.ContactTypeMap[keyof wechaty_puppet_contact_pb.ContactTypeMap],
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
156
|
|
|
@@ -19,6 +19,8 @@ var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrapp
|
|
|
19
19
|
goog.object.extend(proto, google_protobuf_wrappers_pb);
|
|
20
20
|
var wechaty_puppet_referrer_pb = require('../../wechaty/puppet/referrer_pb.js');
|
|
21
21
|
goog.object.extend(proto, wechaty_puppet_referrer_pb);
|
|
22
|
+
var wechaty_puppet_contact_pb = require('../../wechaty/puppet/contact_pb.js');
|
|
23
|
+
goog.object.extend(proto, wechaty_puppet_contact_pb);
|
|
22
24
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptRequest', null, global);
|
|
23
25
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAcceptResponse', null, global);
|
|
24
26
|
goog.exportSymbol('proto.wechaty.puppet.FriendshipAddRequest', null, global);
|
|
@@ -794,7 +796,8 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.toObject = function(
|
|
|
794
796
|
*/
|
|
795
797
|
proto.wechaty.puppet.FriendshipSearchPhoneRequest.toObject = function(includeInstance, msg) {
|
|
796
798
|
var f, obj = {
|
|
797
|
-
phone: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
799
|
+
phone: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
800
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
798
801
|
};
|
|
799
802
|
|
|
800
803
|
if (includeInstance) {
|
|
@@ -835,6 +838,10 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.deserializeBinaryFromReader =
|
|
|
835
838
|
var value = /** @type {string} */ (reader.readString());
|
|
836
839
|
msg.setPhone(value);
|
|
837
840
|
break;
|
|
841
|
+
case 2:
|
|
842
|
+
var value = /** @type {!proto.wechaty.puppet.ContactType} */ (reader.readEnum());
|
|
843
|
+
msg.setType(value);
|
|
844
|
+
break;
|
|
838
845
|
default:
|
|
839
846
|
reader.skipField();
|
|
840
847
|
break;
|
|
@@ -871,6 +878,13 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.serializeBinaryToWriter = func
|
|
|
871
878
|
f
|
|
872
879
|
);
|
|
873
880
|
}
|
|
881
|
+
f = message.getType();
|
|
882
|
+
if (f !== 0.0) {
|
|
883
|
+
writer.writeEnum(
|
|
884
|
+
2,
|
|
885
|
+
f
|
|
886
|
+
);
|
|
887
|
+
}
|
|
874
888
|
};
|
|
875
889
|
|
|
876
890
|
|
|
@@ -892,6 +906,24 @@ proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setPhone = function(
|
|
|
892
906
|
};
|
|
893
907
|
|
|
894
908
|
|
|
909
|
+
/**
|
|
910
|
+
* optional ContactType type = 2;
|
|
911
|
+
* @return {!proto.wechaty.puppet.ContactType}
|
|
912
|
+
*/
|
|
913
|
+
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.getType = function() {
|
|
914
|
+
return /** @type {!proto.wechaty.puppet.ContactType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* @param {!proto.wechaty.puppet.ContactType} value
|
|
920
|
+
* @return {!proto.wechaty.puppet.FriendshipSearchPhoneRequest} returns this
|
|
921
|
+
*/
|
|
922
|
+
proto.wechaty.puppet.FriendshipSearchPhoneRequest.prototype.setType = function(value) {
|
|
923
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
|
|
895
927
|
|
|
896
928
|
|
|
897
929
|
|
|
@@ -1105,7 +1137,8 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.toObject = function
|
|
|
1105
1137
|
*/
|
|
1106
1138
|
proto.wechaty.puppet.FriendshipSearchHandleRequest.toObject = function(includeInstance, msg) {
|
|
1107
1139
|
var f, obj = {
|
|
1108
|
-
weixin: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
1140
|
+
weixin: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1141
|
+
type: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
1109
1142
|
};
|
|
1110
1143
|
|
|
1111
1144
|
if (includeInstance) {
|
|
@@ -1146,6 +1179,10 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.deserializeBinaryFromReader =
|
|
|
1146
1179
|
var value = /** @type {string} */ (reader.readString());
|
|
1147
1180
|
msg.setWeixin(value);
|
|
1148
1181
|
break;
|
|
1182
|
+
case 2:
|
|
1183
|
+
var value = /** @type {!proto.wechaty.puppet.ContactType} */ (reader.readEnum());
|
|
1184
|
+
msg.setType(value);
|
|
1185
|
+
break;
|
|
1149
1186
|
default:
|
|
1150
1187
|
reader.skipField();
|
|
1151
1188
|
break;
|
|
@@ -1182,6 +1219,13 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.serializeBinaryToWriter = fun
|
|
|
1182
1219
|
f
|
|
1183
1220
|
);
|
|
1184
1221
|
}
|
|
1222
|
+
f = message.getType();
|
|
1223
|
+
if (f !== 0.0) {
|
|
1224
|
+
writer.writeEnum(
|
|
1225
|
+
2,
|
|
1226
|
+
f
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1185
1229
|
};
|
|
1186
1230
|
|
|
1187
1231
|
|
|
@@ -1203,6 +1247,24 @@ proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.setWeixin = functio
|
|
|
1203
1247
|
};
|
|
1204
1248
|
|
|
1205
1249
|
|
|
1250
|
+
/**
|
|
1251
|
+
* optional ContactType type = 2;
|
|
1252
|
+
* @return {!proto.wechaty.puppet.ContactType}
|
|
1253
|
+
*/
|
|
1254
|
+
proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.getType = function() {
|
|
1255
|
+
return /** @type {!proto.wechaty.puppet.ContactType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* @param {!proto.wechaty.puppet.ContactType} value
|
|
1261
|
+
* @return {!proto.wechaty.puppet.FriendshipSearchHandleRequest} returns this
|
|
1262
|
+
*/
|
|
1263
|
+
proto.wechaty.puppet.FriendshipSearchHandleRequest.prototype.setType = function(value) {
|
|
1264
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
1265
|
+
};
|
|
1266
|
+
|
|
1267
|
+
|
|
1206
1268
|
|
|
1207
1269
|
|
|
1208
1270
|
|
|
@@ -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.80
|
|
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}:
|
|
@@ -3194,6 +3228,8 @@ definitions:
|
|
|
3194
3228
|
@link https://github.com/wechaty/getting-started/issues/254
|
|
3195
3229
|
|
|
3196
3230
|
TODO: rename `weixin` to `handle` in v2.0.0
|
|
3231
|
+
type:
|
|
3232
|
+
$ref: '#/definitions/puppetContactType'
|
|
3197
3233
|
description: >-
|
|
3198
3234
|
*
|
|
3199
3235
|
|
|
@@ -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.80",
|
|
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": [
|
|
@@ -4665,6 +4695,9 @@
|
|
|
4665
4695
|
"weixin": {
|
|
4666
4696
|
"type": "string",
|
|
4667
4697
|
"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"
|
|
4698
|
+
},
|
|
4699
|
+
"type": {
|
|
4700
|
+
"$ref": "#/definitions/puppetContactType"
|
|
4668
4701
|
}
|
|
4669
4702
|
},
|
|
4670
4703
|
"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`"
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED