@juzi/wechaty-grpc 1.0.75 → 1.0.76
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/message_pb.d.ts +63 -0
- package/dist/cjs/out/wechaty/puppet/message_pb.js +449 -2
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +26 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +38 -1
- package/dist/cjs/proto/wechaty/puppet/message.proto +17 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/esm/out/wechaty/puppet/message_pb.d.ts +63 -0
- package/dist/esm/out/wechaty/puppet/message_pb.js +449 -2
- package/dist/esm/out/wechaty/puppet.openapi.yaml +26 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +38 -1
- package/dist/esm/proto/wechaty/puppet/message.proto +17 -0
- package/dist/esm/src/package-json.js +1 -1
- package/out/wechaty/puppet/message_pb.d.ts +63 -0
- package/out/wechaty/puppet/message_pb.js +449 -2
- package/out/wechaty/puppet.openapi.yaml +26 -1
- package/out/wechaty/puppet.swagger.json +38 -1
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Wechaty Puppet Service OpenAPI Specification",
|
|
5
5
|
"description": "Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.\n\nWechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.76",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -4958,6 +4958,13 @@
|
|
|
4958
4958
|
},
|
|
4959
4959
|
"additionalInfo": {
|
|
4960
4960
|
"type": "string"
|
|
4961
|
+
},
|
|
4962
|
+
"textContents": {
|
|
4963
|
+
"type": "array",
|
|
4964
|
+
"items": {
|
|
4965
|
+
"type": "object",
|
|
4966
|
+
"$ref": "#/definitions/puppetTextContent"
|
|
4967
|
+
}
|
|
4961
4968
|
}
|
|
4962
4969
|
}
|
|
4963
4970
|
},
|
|
@@ -5948,6 +5955,36 @@
|
|
|
5948
5955
|
],
|
|
5949
5956
|
"default": "TAP_TYPE_UNSPECIFIED"
|
|
5950
5957
|
},
|
|
5958
|
+
"puppetTextContent": {
|
|
5959
|
+
"type": "object",
|
|
5960
|
+
"properties": {
|
|
5961
|
+
"type": {
|
|
5962
|
+
"$ref": "#/definitions/puppetTextContentType"
|
|
5963
|
+
},
|
|
5964
|
+
"text": {
|
|
5965
|
+
"type": "string"
|
|
5966
|
+
},
|
|
5967
|
+
"data": {
|
|
5968
|
+
"$ref": "#/definitions/puppetTextContentData"
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
5971
|
+
},
|
|
5972
|
+
"puppetTextContentData": {
|
|
5973
|
+
"type": "object",
|
|
5974
|
+
"properties": {
|
|
5975
|
+
"contactId": {
|
|
5976
|
+
"type": "string"
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
},
|
|
5980
|
+
"puppetTextContentType": {
|
|
5981
|
+
"type": "string",
|
|
5982
|
+
"enum": [
|
|
5983
|
+
"TEXT_CONTENT_TYPE_REGULAR",
|
|
5984
|
+
"TEXT_CONTENT_TYPE_AT"
|
|
5985
|
+
],
|
|
5986
|
+
"default": "TEXT_CONTENT_TYPE_REGULAR"
|
|
5987
|
+
},
|
|
5951
5988
|
"puppetUploadRequest": {
|
|
5952
5989
|
"type": "object",
|
|
5953
5990
|
"properties": {
|
|
@@ -49,6 +49,21 @@ enum MessageType { // 消息类型
|
|
|
49
49
|
MESSAGE_TYPE_CALL_RECORD = 20;// 通话记录
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
enum TextContentType {
|
|
53
|
+
TEXT_CONTENT_TYPE_REGULAR = 0;
|
|
54
|
+
TEXT_CONTENT_TYPE_AT = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message TextContentData {
|
|
58
|
+
string contact_id = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message TextContent {
|
|
62
|
+
TextContentType type = 1;
|
|
63
|
+
string text = 2;
|
|
64
|
+
TextContentData data = 3;
|
|
65
|
+
}
|
|
66
|
+
|
|
52
67
|
message MessagePayloadRequest {
|
|
53
68
|
string id = 1;
|
|
54
69
|
}
|
|
@@ -70,6 +85,8 @@ message MessagePayloadResponse {
|
|
|
70
85
|
optional string quote_id = 11; // 被引用的消息id
|
|
71
86
|
|
|
72
87
|
optional string additional_info = 12;
|
|
88
|
+
|
|
89
|
+
repeated TextContent text_contents = 13;
|
|
73
90
|
}
|
|
74
91
|
|
|
75
92
|
message MessageImageRequest {
|
|
@@ -13,6 +13,56 @@ import * as wechaty_puppet_post_pb from "../../wechaty/puppet/post_pb";
|
|
|
13
13
|
import * as wechaty_puppet_call_pb from "../../wechaty/puppet/call_pb";
|
|
14
14
|
import * as wechaty_puppet_chat_history_pb from "../../wechaty/puppet/chat-history_pb";
|
|
15
15
|
|
|
16
|
+
export class TextContentData extends jspb.Message {
|
|
17
|
+
getContactId(): string;
|
|
18
|
+
setContactId(value: string): void;
|
|
19
|
+
|
|
20
|
+
serializeBinary(): Uint8Array;
|
|
21
|
+
toObject(includeInstance?: boolean): TextContentData.AsObject;
|
|
22
|
+
static toObject(includeInstance: boolean, msg: TextContentData): TextContentData.AsObject;
|
|
23
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
24
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
25
|
+
static serializeBinaryToWriter(message: TextContentData, writer: jspb.BinaryWriter): void;
|
|
26
|
+
static deserializeBinary(bytes: Uint8Array): TextContentData;
|
|
27
|
+
static deserializeBinaryFromReader(message: TextContentData, reader: jspb.BinaryReader): TextContentData;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export namespace TextContentData {
|
|
31
|
+
export type AsObject = {
|
|
32
|
+
contactId: string,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class TextContent extends jspb.Message {
|
|
37
|
+
getType(): TextContentTypeMap[keyof TextContentTypeMap];
|
|
38
|
+
setType(value: TextContentTypeMap[keyof TextContentTypeMap]): void;
|
|
39
|
+
|
|
40
|
+
getText(): string;
|
|
41
|
+
setText(value: string): void;
|
|
42
|
+
|
|
43
|
+
hasData(): boolean;
|
|
44
|
+
clearData(): void;
|
|
45
|
+
getData(): TextContentData | undefined;
|
|
46
|
+
setData(value?: TextContentData): void;
|
|
47
|
+
|
|
48
|
+
serializeBinary(): Uint8Array;
|
|
49
|
+
toObject(includeInstance?: boolean): TextContent.AsObject;
|
|
50
|
+
static toObject(includeInstance: boolean, msg: TextContent): TextContent.AsObject;
|
|
51
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
52
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
53
|
+
static serializeBinaryToWriter(message: TextContent, writer: jspb.BinaryWriter): void;
|
|
54
|
+
static deserializeBinary(bytes: Uint8Array): TextContent;
|
|
55
|
+
static deserializeBinaryFromReader(message: TextContent, reader: jspb.BinaryReader): TextContent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export namespace TextContent {
|
|
59
|
+
export type AsObject = {
|
|
60
|
+
type: TextContentTypeMap[keyof TextContentTypeMap],
|
|
61
|
+
text: string,
|
|
62
|
+
data?: TextContentData.AsObject,
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
16
66
|
export class MessagePayloadRequest extends jspb.Message {
|
|
17
67
|
getId(): string;
|
|
18
68
|
setId(value: string): void;
|
|
@@ -78,6 +128,11 @@ export class MessagePayloadResponse extends jspb.Message {
|
|
|
78
128
|
getAdditionalInfo(): string;
|
|
79
129
|
setAdditionalInfo(value: string): void;
|
|
80
130
|
|
|
131
|
+
clearTextContentsList(): void;
|
|
132
|
+
getTextContentsList(): Array<TextContent>;
|
|
133
|
+
setTextContentsList(value: Array<TextContent>): void;
|
|
134
|
+
addTextContents(value?: TextContent, index?: number): TextContent;
|
|
135
|
+
|
|
81
136
|
serializeBinary(): Uint8Array;
|
|
82
137
|
toObject(includeInstance?: boolean): MessagePayloadResponse.AsObject;
|
|
83
138
|
static toObject(includeInstance: boolean, msg: MessagePayloadResponse): MessagePayloadResponse.AsObject;
|
|
@@ -102,6 +157,7 @@ export namespace MessagePayloadResponse {
|
|
|
102
157
|
receiveTime?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
103
158
|
quoteId: string,
|
|
104
159
|
additionalInfo: string,
|
|
160
|
+
textContentsList: Array<TextContent.AsObject>,
|
|
105
161
|
}
|
|
106
162
|
}
|
|
107
163
|
|
|
@@ -1183,6 +1239,13 @@ export interface MessageTypeMap {
|
|
|
1183
1239
|
|
|
1184
1240
|
export const MessageType: MessageTypeMap;
|
|
1185
1241
|
|
|
1242
|
+
export interface TextContentTypeMap {
|
|
1243
|
+
TEXT_CONTENT_TYPE_REGULAR: 0;
|
|
1244
|
+
TEXT_CONTENT_TYPE_AT: 1;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export const TextContentType: TextContentTypeMap;
|
|
1248
|
+
|
|
1186
1249
|
export interface BroadcastStatusMap {
|
|
1187
1250
|
BROADCAST_STATUS_UNKNOWN: 0;
|
|
1188
1251
|
BROADCAST_STATUS_SENDING: 1;
|
|
@@ -85,6 +85,51 @@ goog.exportSymbol('proto.wechaty.puppet.MessageSendUrlResponse', null, global);
|
|
|
85
85
|
goog.exportSymbol('proto.wechaty.puppet.MessageType', null, global);
|
|
86
86
|
goog.exportSymbol('proto.wechaty.puppet.MessageUrlRequest', null, global);
|
|
87
87
|
goog.exportSymbol('proto.wechaty.puppet.MessageUrlResponse', null, global);
|
|
88
|
+
goog.exportSymbol('proto.wechaty.puppet.TextContent', null, global);
|
|
89
|
+
goog.exportSymbol('proto.wechaty.puppet.TextContentData', null, global);
|
|
90
|
+
goog.exportSymbol('proto.wechaty.puppet.TextContentType', null, global);
|
|
91
|
+
/**
|
|
92
|
+
* Generated by JsPbCodeGenerator.
|
|
93
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
94
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
95
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
96
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
97
|
+
* valid.
|
|
98
|
+
* @extends {jspb.Message}
|
|
99
|
+
* @constructor
|
|
100
|
+
*/
|
|
101
|
+
proto.wechaty.puppet.TextContentData = function(opt_data) {
|
|
102
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
103
|
+
};
|
|
104
|
+
goog.inherits(proto.wechaty.puppet.TextContentData, jspb.Message);
|
|
105
|
+
if (goog.DEBUG && !COMPILED) {
|
|
106
|
+
/**
|
|
107
|
+
* @public
|
|
108
|
+
* @override
|
|
109
|
+
*/
|
|
110
|
+
proto.wechaty.puppet.TextContentData.displayName = 'proto.wechaty.puppet.TextContentData';
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Generated by JsPbCodeGenerator.
|
|
114
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
115
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
116
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
117
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
118
|
+
* valid.
|
|
119
|
+
* @extends {jspb.Message}
|
|
120
|
+
* @constructor
|
|
121
|
+
*/
|
|
122
|
+
proto.wechaty.puppet.TextContent = function(opt_data) {
|
|
123
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
124
|
+
};
|
|
125
|
+
goog.inherits(proto.wechaty.puppet.TextContent, jspb.Message);
|
|
126
|
+
if (goog.DEBUG && !COMPILED) {
|
|
127
|
+
/**
|
|
128
|
+
* @public
|
|
129
|
+
* @override
|
|
130
|
+
*/
|
|
131
|
+
proto.wechaty.puppet.TextContent.displayName = 'proto.wechaty.puppet.TextContent';
|
|
132
|
+
}
|
|
88
133
|
/**
|
|
89
134
|
* Generated by JsPbCodeGenerator.
|
|
90
135
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -1075,6 +1120,347 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
1075
1120
|
|
|
1076
1121
|
|
|
1077
1122
|
|
|
1123
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1124
|
+
/**
|
|
1125
|
+
* Creates an object representation of this proto.
|
|
1126
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1127
|
+
* Optional fields that are not set will be set to undefined.
|
|
1128
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1129
|
+
* For the list of reserved names please see:
|
|
1130
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1131
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1132
|
+
* JSPB instance for transitional soy proto support:
|
|
1133
|
+
* http://goto/soy-param-migration
|
|
1134
|
+
* @return {!Object}
|
|
1135
|
+
*/
|
|
1136
|
+
proto.wechaty.puppet.TextContentData.prototype.toObject = function(opt_includeInstance) {
|
|
1137
|
+
return proto.wechaty.puppet.TextContentData.toObject(opt_includeInstance, this);
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Static version of the {@see toObject} method.
|
|
1143
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1144
|
+
* the JSPB instance for transitional soy proto support:
|
|
1145
|
+
* http://goto/soy-param-migration
|
|
1146
|
+
* @param {!proto.wechaty.puppet.TextContentData} msg The msg instance to transform.
|
|
1147
|
+
* @return {!Object}
|
|
1148
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1149
|
+
*/
|
|
1150
|
+
proto.wechaty.puppet.TextContentData.toObject = function(includeInstance, msg) {
|
|
1151
|
+
var f, obj = {
|
|
1152
|
+
contactId: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
if (includeInstance) {
|
|
1156
|
+
obj.$jspbMessageInstance = msg;
|
|
1157
|
+
}
|
|
1158
|
+
return obj;
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1165
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1166
|
+
* @return {!proto.wechaty.puppet.TextContentData}
|
|
1167
|
+
*/
|
|
1168
|
+
proto.wechaty.puppet.TextContentData.deserializeBinary = function(bytes) {
|
|
1169
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1170
|
+
var msg = new proto.wechaty.puppet.TextContentData;
|
|
1171
|
+
return proto.wechaty.puppet.TextContentData.deserializeBinaryFromReader(msg, reader);
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1177
|
+
* given reader into the given message object.
|
|
1178
|
+
* @param {!proto.wechaty.puppet.TextContentData} msg The message object to deserialize into.
|
|
1179
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1180
|
+
* @return {!proto.wechaty.puppet.TextContentData}
|
|
1181
|
+
*/
|
|
1182
|
+
proto.wechaty.puppet.TextContentData.deserializeBinaryFromReader = function(msg, reader) {
|
|
1183
|
+
while (reader.nextField()) {
|
|
1184
|
+
if (reader.isEndGroup()) {
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
1187
|
+
var field = reader.getFieldNumber();
|
|
1188
|
+
switch (field) {
|
|
1189
|
+
case 1:
|
|
1190
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1191
|
+
msg.setContactId(value);
|
|
1192
|
+
break;
|
|
1193
|
+
default:
|
|
1194
|
+
reader.skipField();
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
return msg;
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1204
|
+
* @return {!Uint8Array}
|
|
1205
|
+
*/
|
|
1206
|
+
proto.wechaty.puppet.TextContentData.prototype.serializeBinary = function() {
|
|
1207
|
+
var writer = new jspb.BinaryWriter();
|
|
1208
|
+
proto.wechaty.puppet.TextContentData.serializeBinaryToWriter(this, writer);
|
|
1209
|
+
return writer.getResultBuffer();
|
|
1210
|
+
};
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1215
|
+
* format), writing to the given BinaryWriter.
|
|
1216
|
+
* @param {!proto.wechaty.puppet.TextContentData} message
|
|
1217
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1218
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1219
|
+
*/
|
|
1220
|
+
proto.wechaty.puppet.TextContentData.serializeBinaryToWriter = function(message, writer) {
|
|
1221
|
+
var f = undefined;
|
|
1222
|
+
f = message.getContactId();
|
|
1223
|
+
if (f.length > 0) {
|
|
1224
|
+
writer.writeString(
|
|
1225
|
+
1,
|
|
1226
|
+
f
|
|
1227
|
+
);
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* optional string contact_id = 1;
|
|
1234
|
+
* @return {string}
|
|
1235
|
+
*/
|
|
1236
|
+
proto.wechaty.puppet.TextContentData.prototype.getContactId = function() {
|
|
1237
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* @param {string} value
|
|
1243
|
+
* @return {!proto.wechaty.puppet.TextContentData} returns this
|
|
1244
|
+
*/
|
|
1245
|
+
proto.wechaty.puppet.TextContentData.prototype.setContactId = function(value) {
|
|
1246
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1254
|
+
/**
|
|
1255
|
+
* Creates an object representation of this proto.
|
|
1256
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1257
|
+
* Optional fields that are not set will be set to undefined.
|
|
1258
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1259
|
+
* For the list of reserved names please see:
|
|
1260
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1261
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1262
|
+
* JSPB instance for transitional soy proto support:
|
|
1263
|
+
* http://goto/soy-param-migration
|
|
1264
|
+
* @return {!Object}
|
|
1265
|
+
*/
|
|
1266
|
+
proto.wechaty.puppet.TextContent.prototype.toObject = function(opt_includeInstance) {
|
|
1267
|
+
return proto.wechaty.puppet.TextContent.toObject(opt_includeInstance, this);
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Static version of the {@see toObject} method.
|
|
1273
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1274
|
+
* the JSPB instance for transitional soy proto support:
|
|
1275
|
+
* http://goto/soy-param-migration
|
|
1276
|
+
* @param {!proto.wechaty.puppet.TextContent} msg The msg instance to transform.
|
|
1277
|
+
* @return {!Object}
|
|
1278
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1279
|
+
*/
|
|
1280
|
+
proto.wechaty.puppet.TextContent.toObject = function(includeInstance, msg) {
|
|
1281
|
+
var f, obj = {
|
|
1282
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
1283
|
+
text: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
1284
|
+
data: (f = msg.getData()) && proto.wechaty.puppet.TextContentData.toObject(includeInstance, f)
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
if (includeInstance) {
|
|
1288
|
+
obj.$jspbMessageInstance = msg;
|
|
1289
|
+
}
|
|
1290
|
+
return obj;
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1297
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1298
|
+
* @return {!proto.wechaty.puppet.TextContent}
|
|
1299
|
+
*/
|
|
1300
|
+
proto.wechaty.puppet.TextContent.deserializeBinary = function(bytes) {
|
|
1301
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1302
|
+
var msg = new proto.wechaty.puppet.TextContent;
|
|
1303
|
+
return proto.wechaty.puppet.TextContent.deserializeBinaryFromReader(msg, reader);
|
|
1304
|
+
};
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1309
|
+
* given reader into the given message object.
|
|
1310
|
+
* @param {!proto.wechaty.puppet.TextContent} msg The message object to deserialize into.
|
|
1311
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1312
|
+
* @return {!proto.wechaty.puppet.TextContent}
|
|
1313
|
+
*/
|
|
1314
|
+
proto.wechaty.puppet.TextContent.deserializeBinaryFromReader = function(msg, reader) {
|
|
1315
|
+
while (reader.nextField()) {
|
|
1316
|
+
if (reader.isEndGroup()) {
|
|
1317
|
+
break;
|
|
1318
|
+
}
|
|
1319
|
+
var field = reader.getFieldNumber();
|
|
1320
|
+
switch (field) {
|
|
1321
|
+
case 1:
|
|
1322
|
+
var value = /** @type {!proto.wechaty.puppet.TextContentType} */ (reader.readEnum());
|
|
1323
|
+
msg.setType(value);
|
|
1324
|
+
break;
|
|
1325
|
+
case 2:
|
|
1326
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1327
|
+
msg.setText(value);
|
|
1328
|
+
break;
|
|
1329
|
+
case 3:
|
|
1330
|
+
var value = new proto.wechaty.puppet.TextContentData;
|
|
1331
|
+
reader.readMessage(value,proto.wechaty.puppet.TextContentData.deserializeBinaryFromReader);
|
|
1332
|
+
msg.setData(value);
|
|
1333
|
+
break;
|
|
1334
|
+
default:
|
|
1335
|
+
reader.skipField();
|
|
1336
|
+
break;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
return msg;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1345
|
+
* @return {!Uint8Array}
|
|
1346
|
+
*/
|
|
1347
|
+
proto.wechaty.puppet.TextContent.prototype.serializeBinary = function() {
|
|
1348
|
+
var writer = new jspb.BinaryWriter();
|
|
1349
|
+
proto.wechaty.puppet.TextContent.serializeBinaryToWriter(this, writer);
|
|
1350
|
+
return writer.getResultBuffer();
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1356
|
+
* format), writing to the given BinaryWriter.
|
|
1357
|
+
* @param {!proto.wechaty.puppet.TextContent} message
|
|
1358
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1359
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1360
|
+
*/
|
|
1361
|
+
proto.wechaty.puppet.TextContent.serializeBinaryToWriter = function(message, writer) {
|
|
1362
|
+
var f = undefined;
|
|
1363
|
+
f = message.getType();
|
|
1364
|
+
if (f !== 0.0) {
|
|
1365
|
+
writer.writeEnum(
|
|
1366
|
+
1,
|
|
1367
|
+
f
|
|
1368
|
+
);
|
|
1369
|
+
}
|
|
1370
|
+
f = message.getText();
|
|
1371
|
+
if (f.length > 0) {
|
|
1372
|
+
writer.writeString(
|
|
1373
|
+
2,
|
|
1374
|
+
f
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
f = message.getData();
|
|
1378
|
+
if (f != null) {
|
|
1379
|
+
writer.writeMessage(
|
|
1380
|
+
3,
|
|
1381
|
+
f,
|
|
1382
|
+
proto.wechaty.puppet.TextContentData.serializeBinaryToWriter
|
|
1383
|
+
);
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* optional TextContentType type = 1;
|
|
1390
|
+
* @return {!proto.wechaty.puppet.TextContentType}
|
|
1391
|
+
*/
|
|
1392
|
+
proto.wechaty.puppet.TextContent.prototype.getType = function() {
|
|
1393
|
+
return /** @type {!proto.wechaty.puppet.TextContentType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
1394
|
+
};
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* @param {!proto.wechaty.puppet.TextContentType} value
|
|
1399
|
+
* @return {!proto.wechaty.puppet.TextContent} returns this
|
|
1400
|
+
*/
|
|
1401
|
+
proto.wechaty.puppet.TextContent.prototype.setType = function(value) {
|
|
1402
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
1403
|
+
};
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* optional string text = 2;
|
|
1408
|
+
* @return {string}
|
|
1409
|
+
*/
|
|
1410
|
+
proto.wechaty.puppet.TextContent.prototype.getText = function() {
|
|
1411
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
1412
|
+
};
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* @param {string} value
|
|
1417
|
+
* @return {!proto.wechaty.puppet.TextContent} returns this
|
|
1418
|
+
*/
|
|
1419
|
+
proto.wechaty.puppet.TextContent.prototype.setText = function(value) {
|
|
1420
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
1421
|
+
};
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* optional TextContentData data = 3;
|
|
1426
|
+
* @return {?proto.wechaty.puppet.TextContentData}
|
|
1427
|
+
*/
|
|
1428
|
+
proto.wechaty.puppet.TextContent.prototype.getData = function() {
|
|
1429
|
+
return /** @type{?proto.wechaty.puppet.TextContentData} */ (
|
|
1430
|
+
jspb.Message.getWrapperField(this, proto.wechaty.puppet.TextContentData, 3));
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* @param {?proto.wechaty.puppet.TextContentData|undefined} value
|
|
1436
|
+
* @return {!proto.wechaty.puppet.TextContent} returns this
|
|
1437
|
+
*/
|
|
1438
|
+
proto.wechaty.puppet.TextContent.prototype.setData = function(value) {
|
|
1439
|
+
return jspb.Message.setWrapperField(this, 3, value);
|
|
1440
|
+
};
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Clears the message field making it undefined.
|
|
1445
|
+
* @return {!proto.wechaty.puppet.TextContent} returns this
|
|
1446
|
+
*/
|
|
1447
|
+
proto.wechaty.puppet.TextContent.prototype.clearData = function() {
|
|
1448
|
+
return this.setData(undefined);
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Returns whether this field is set.
|
|
1454
|
+
* @return {boolean}
|
|
1455
|
+
*/
|
|
1456
|
+
proto.wechaty.puppet.TextContent.prototype.hasData = function() {
|
|
1457
|
+
return jspb.Message.getField(this, 3) != null;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
|
|
1078
1464
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1079
1465
|
/**
|
|
1080
1466
|
* Creates an object representation of this proto.
|
|
@@ -1208,7 +1594,7 @@ proto.wechaty.puppet.MessagePayloadRequest.prototype.setId = function(value) {
|
|
|
1208
1594
|
* @private {!Array<number>}
|
|
1209
1595
|
* @const
|
|
1210
1596
|
*/
|
|
1211
|
-
proto.wechaty.puppet.MessagePayloadResponse.repeatedFields_ = [9];
|
|
1597
|
+
proto.wechaty.puppet.MessagePayloadResponse.repeatedFields_ = [9,13];
|
|
1212
1598
|
|
|
1213
1599
|
|
|
1214
1600
|
|
|
@@ -1252,7 +1638,9 @@ proto.wechaty.puppet.MessagePayloadResponse.toObject = function(includeInstance,
|
|
|
1252
1638
|
mentionIdsList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f,
|
|
1253
1639
|
receiveTime: (f = msg.getReceiveTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
|
1254
1640
|
quoteId: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
|
1255
|
-
additionalInfo: jspb.Message.getFieldWithDefault(msg, 12, "")
|
|
1641
|
+
additionalInfo: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
|
1642
|
+
textContentsList: jspb.Message.toObjectList(msg.getTextContentsList(),
|
|
1643
|
+
proto.wechaty.puppet.TextContent.toObject, includeInstance)
|
|
1256
1644
|
};
|
|
1257
1645
|
|
|
1258
1646
|
if (includeInstance) {
|
|
@@ -1338,6 +1726,11 @@ proto.wechaty.puppet.MessagePayloadResponse.deserializeBinaryFromReader = functi
|
|
|
1338
1726
|
var value = /** @type {string} */ (reader.readString());
|
|
1339
1727
|
msg.setAdditionalInfo(value);
|
|
1340
1728
|
break;
|
|
1729
|
+
case 13:
|
|
1730
|
+
var value = new proto.wechaty.puppet.TextContent;
|
|
1731
|
+
reader.readMessage(value,proto.wechaty.puppet.TextContent.deserializeBinaryFromReader);
|
|
1732
|
+
msg.addTextContents(value);
|
|
1733
|
+
break;
|
|
1341
1734
|
default:
|
|
1342
1735
|
reader.skipField();
|
|
1343
1736
|
break;
|
|
@@ -1452,6 +1845,14 @@ proto.wechaty.puppet.MessagePayloadResponse.serializeBinaryToWriter = function(m
|
|
|
1452
1845
|
f
|
|
1453
1846
|
);
|
|
1454
1847
|
}
|
|
1848
|
+
f = message.getTextContentsList();
|
|
1849
|
+
if (f.length > 0) {
|
|
1850
|
+
writer.writeRepeatedMessage(
|
|
1851
|
+
13,
|
|
1852
|
+
f,
|
|
1853
|
+
proto.wechaty.puppet.TextContent.serializeBinaryToWriter
|
|
1854
|
+
);
|
|
1855
|
+
}
|
|
1455
1856
|
};
|
|
1456
1857
|
|
|
1457
1858
|
|
|
@@ -1745,6 +2146,44 @@ proto.wechaty.puppet.MessagePayloadResponse.prototype.hasAdditionalInfo = functi
|
|
|
1745
2146
|
};
|
|
1746
2147
|
|
|
1747
2148
|
|
|
2149
|
+
/**
|
|
2150
|
+
* repeated TextContent text_contents = 13;
|
|
2151
|
+
* @return {!Array<!proto.wechaty.puppet.TextContent>}
|
|
2152
|
+
*/
|
|
2153
|
+
proto.wechaty.puppet.MessagePayloadResponse.prototype.getTextContentsList = function() {
|
|
2154
|
+
return /** @type{!Array<!proto.wechaty.puppet.TextContent>} */ (
|
|
2155
|
+
jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.TextContent, 13));
|
|
2156
|
+
};
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* @param {!Array<!proto.wechaty.puppet.TextContent>} value
|
|
2161
|
+
* @return {!proto.wechaty.puppet.MessagePayloadResponse} returns this
|
|
2162
|
+
*/
|
|
2163
|
+
proto.wechaty.puppet.MessagePayloadResponse.prototype.setTextContentsList = function(value) {
|
|
2164
|
+
return jspb.Message.setRepeatedWrapperField(this, 13, value);
|
|
2165
|
+
};
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* @param {!proto.wechaty.puppet.TextContent=} opt_value
|
|
2170
|
+
* @param {number=} opt_index
|
|
2171
|
+
* @return {!proto.wechaty.puppet.TextContent}
|
|
2172
|
+
*/
|
|
2173
|
+
proto.wechaty.puppet.MessagePayloadResponse.prototype.addTextContents = function(opt_value, opt_index) {
|
|
2174
|
+
return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.wechaty.puppet.TextContent, opt_index);
|
|
2175
|
+
};
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* Clears the list making it empty but non-null.
|
|
2180
|
+
* @return {!proto.wechaty.puppet.MessagePayloadResponse} returns this
|
|
2181
|
+
*/
|
|
2182
|
+
proto.wechaty.puppet.MessagePayloadResponse.prototype.clearTextContentsList = function() {
|
|
2183
|
+
return this.setTextContentsList([]);
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2186
|
+
|
|
1748
2187
|
|
|
1749
2188
|
|
|
1750
2189
|
|
|
@@ -8940,6 +9379,14 @@ proto.wechaty.puppet.MessageType = {
|
|
|
8940
9379
|
MESSAGE_TYPE_CALL_RECORD: 20
|
|
8941
9380
|
};
|
|
8942
9381
|
|
|
9382
|
+
/**
|
|
9383
|
+
* @enum {number}
|
|
9384
|
+
*/
|
|
9385
|
+
proto.wechaty.puppet.TextContentType = {
|
|
9386
|
+
TEXT_CONTENT_TYPE_REGULAR: 0,
|
|
9387
|
+
TEXT_CONTENT_TYPE_AT: 1
|
|
9388
|
+
};
|
|
9389
|
+
|
|
8943
9390
|
/**
|
|
8944
9391
|
* @enum {number}
|
|
8945
9392
|
*/
|