@wppconnect/wa-proto 2.3000.1024744989 → 2.3000.1024884592
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/CHANGELOG.md +4 -0
- package/WAProto.proto +7 -1
- package/dist/index.d.ts +109 -0
- package/dist/index.js +294 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/WAProto.proto
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
package waproto;
|
|
3
3
|
|
|
4
|
-
/// WhatsApp Version: 2.3000.
|
|
4
|
+
/// WhatsApp Version: 2.3000.1024884592
|
|
5
5
|
|
|
6
6
|
message ADVDeviceIdentity {
|
|
7
7
|
optional uint32 rawId = 1;
|
|
@@ -1812,6 +1812,7 @@ message Message {
|
|
|
1812
1812
|
optional FutureProofMessage botForwardedMessage = 104;
|
|
1813
1813
|
optional StatusQuestionAnswerMessage statusQuestionAnswerMessage = 105;
|
|
1814
1814
|
optional QuestionAdminReplyMessage questionAdminReplyMessage = 106;
|
|
1815
|
+
optional QuestionResponseMessage questionResponseMessage = 107;
|
|
1815
1816
|
message AlbumMessage {
|
|
1816
1817
|
optional uint32 expectedImageCount = 2;
|
|
1817
1818
|
optional uint32 expectedVideoCount = 3;
|
|
@@ -2990,6 +2991,11 @@ message Message {
|
|
|
2990
2991
|
|
|
2991
2992
|
}
|
|
2992
2993
|
|
|
2994
|
+
message QuestionResponseMessage {
|
|
2995
|
+
optional MessageKey key = 1;
|
|
2996
|
+
optional string text = 2;
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2993
2999
|
message ReactionMessage {
|
|
2994
3000
|
optional MessageKey key = 1;
|
|
2995
3001
|
optional string text = 2;
|
package/dist/index.d.ts
CHANGED
|
@@ -19100,6 +19100,9 @@ export namespace waproto {
|
|
|
19100
19100
|
|
|
19101
19101
|
/** Message questionAdminReplyMessage */
|
|
19102
19102
|
questionAdminReplyMessage?: (waproto.Message.IQuestionAdminReplyMessage|null);
|
|
19103
|
+
|
|
19104
|
+
/** Message questionResponseMessage */
|
|
19105
|
+
questionResponseMessage?: (waproto.Message.IQuestionResponseMessage|null);
|
|
19103
19106
|
}
|
|
19104
19107
|
|
|
19105
19108
|
/** Represents a Message. */
|
|
@@ -19381,6 +19384,9 @@ export namespace waproto {
|
|
|
19381
19384
|
/** Message questionAdminReplyMessage. */
|
|
19382
19385
|
public questionAdminReplyMessage?: (waproto.Message.IQuestionAdminReplyMessage|null);
|
|
19383
19386
|
|
|
19387
|
+
/** Message questionResponseMessage. */
|
|
19388
|
+
public questionResponseMessage?: (waproto.Message.IQuestionResponseMessage|null);
|
|
19389
|
+
|
|
19384
19390
|
/**
|
|
19385
19391
|
* Creates a new Message instance using the specified properties.
|
|
19386
19392
|
* @param [properties] Properties to set
|
|
@@ -33961,6 +33967,109 @@ export namespace waproto {
|
|
|
33961
33967
|
}
|
|
33962
33968
|
}
|
|
33963
33969
|
|
|
33970
|
+
/** Properties of a QuestionResponseMessage. */
|
|
33971
|
+
interface IQuestionResponseMessage {
|
|
33972
|
+
|
|
33973
|
+
/** QuestionResponseMessage key */
|
|
33974
|
+
key?: (waproto.IMessageKey|null);
|
|
33975
|
+
|
|
33976
|
+
/** QuestionResponseMessage text */
|
|
33977
|
+
text?: (string|null);
|
|
33978
|
+
}
|
|
33979
|
+
|
|
33980
|
+
/** Represents a QuestionResponseMessage. */
|
|
33981
|
+
class QuestionResponseMessage implements IQuestionResponseMessage {
|
|
33982
|
+
|
|
33983
|
+
/**
|
|
33984
|
+
* Constructs a new QuestionResponseMessage.
|
|
33985
|
+
* @param [properties] Properties to set
|
|
33986
|
+
*/
|
|
33987
|
+
constructor(properties?: waproto.Message.IQuestionResponseMessage);
|
|
33988
|
+
|
|
33989
|
+
/** QuestionResponseMessage key. */
|
|
33990
|
+
public key?: (waproto.IMessageKey|null);
|
|
33991
|
+
|
|
33992
|
+
/** QuestionResponseMessage text. */
|
|
33993
|
+
public text?: (string|null);
|
|
33994
|
+
|
|
33995
|
+
/**
|
|
33996
|
+
* Creates a new QuestionResponseMessage instance using the specified properties.
|
|
33997
|
+
* @param [properties] Properties to set
|
|
33998
|
+
* @returns QuestionResponseMessage instance
|
|
33999
|
+
*/
|
|
34000
|
+
public static create(properties?: waproto.Message.IQuestionResponseMessage): waproto.Message.QuestionResponseMessage;
|
|
34001
|
+
|
|
34002
|
+
/**
|
|
34003
|
+
* Encodes the specified QuestionResponseMessage message. Does not implicitly {@link waproto.Message.QuestionResponseMessage.verify|verify} messages.
|
|
34004
|
+
* @param message QuestionResponseMessage message or plain object to encode
|
|
34005
|
+
* @param [writer] Writer to encode to
|
|
34006
|
+
* @returns Writer
|
|
34007
|
+
*/
|
|
34008
|
+
public static encode(message: waproto.Message.IQuestionResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
34009
|
+
|
|
34010
|
+
/**
|
|
34011
|
+
* Encodes the specified QuestionResponseMessage message, length delimited. Does not implicitly {@link waproto.Message.QuestionResponseMessage.verify|verify} messages.
|
|
34012
|
+
* @param message QuestionResponseMessage message or plain object to encode
|
|
34013
|
+
* @param [writer] Writer to encode to
|
|
34014
|
+
* @returns Writer
|
|
34015
|
+
*/
|
|
34016
|
+
public static encodeDelimited(message: waproto.Message.IQuestionResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
34017
|
+
|
|
34018
|
+
/**
|
|
34019
|
+
* Decodes a QuestionResponseMessage message from the specified reader or buffer.
|
|
34020
|
+
* @param reader Reader or buffer to decode from
|
|
34021
|
+
* @param [length] Message length if known beforehand
|
|
34022
|
+
* @returns QuestionResponseMessage
|
|
34023
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
34024
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
34025
|
+
*/
|
|
34026
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): waproto.Message.QuestionResponseMessage;
|
|
34027
|
+
|
|
34028
|
+
/**
|
|
34029
|
+
* Decodes a QuestionResponseMessage message from the specified reader or buffer, length delimited.
|
|
34030
|
+
* @param reader Reader or buffer to decode from
|
|
34031
|
+
* @returns QuestionResponseMessage
|
|
34032
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
34033
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
34034
|
+
*/
|
|
34035
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): waproto.Message.QuestionResponseMessage;
|
|
34036
|
+
|
|
34037
|
+
/**
|
|
34038
|
+
* Verifies a QuestionResponseMessage message.
|
|
34039
|
+
* @param message Plain object to verify
|
|
34040
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
34041
|
+
*/
|
|
34042
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
34043
|
+
|
|
34044
|
+
/**
|
|
34045
|
+
* Creates a QuestionResponseMessage message from a plain object. Also converts values to their respective internal types.
|
|
34046
|
+
* @param object Plain object
|
|
34047
|
+
* @returns QuestionResponseMessage
|
|
34048
|
+
*/
|
|
34049
|
+
public static fromObject(object: { [k: string]: any }): waproto.Message.QuestionResponseMessage;
|
|
34050
|
+
|
|
34051
|
+
/**
|
|
34052
|
+
* Creates a plain object from a QuestionResponseMessage message. Also converts values to other types if specified.
|
|
34053
|
+
* @param message QuestionResponseMessage
|
|
34054
|
+
* @param [options] Conversion options
|
|
34055
|
+
* @returns Plain object
|
|
34056
|
+
*/
|
|
34057
|
+
public static toObject(message: waproto.Message.QuestionResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
34058
|
+
|
|
34059
|
+
/**
|
|
34060
|
+
* Converts this QuestionResponseMessage to JSON.
|
|
34061
|
+
* @returns JSON object
|
|
34062
|
+
*/
|
|
34063
|
+
public toJSON(): { [k: string]: any };
|
|
34064
|
+
|
|
34065
|
+
/**
|
|
34066
|
+
* Gets the default type url for QuestionResponseMessage
|
|
34067
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
34068
|
+
* @returns The default type url
|
|
34069
|
+
*/
|
|
34070
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
34071
|
+
}
|
|
34072
|
+
|
|
33964
34073
|
/** Properties of a ReactionMessage. */
|
|
33965
34074
|
interface IReactionMessage {
|
|
33966
34075
|
|
package/dist/index.js
CHANGED
|
@@ -57991,6 +57991,7 @@ $root.waproto = (function() {
|
|
|
57991
57991
|
* @property {waproto.Message.IFutureProofMessage|null} [botForwardedMessage] Message botForwardedMessage
|
|
57992
57992
|
* @property {waproto.Message.IStatusQuestionAnswerMessage|null} [statusQuestionAnswerMessage] Message statusQuestionAnswerMessage
|
|
57993
57993
|
* @property {waproto.Message.IQuestionAdminReplyMessage|null} [questionAdminReplyMessage] Message questionAdminReplyMessage
|
|
57994
|
+
* @property {waproto.Message.IQuestionResponseMessage|null} [questionResponseMessage] Message questionResponseMessage
|
|
57994
57995
|
*/
|
|
57995
57996
|
|
|
57996
57997
|
/**
|
|
@@ -58728,6 +58729,14 @@ $root.waproto = (function() {
|
|
|
58728
58729
|
*/
|
|
58729
58730
|
Message.prototype.questionAdminReplyMessage = null;
|
|
58730
58731
|
|
|
58732
|
+
/**
|
|
58733
|
+
* Message questionResponseMessage.
|
|
58734
|
+
* @member {waproto.Message.IQuestionResponseMessage|null|undefined} questionResponseMessage
|
|
58735
|
+
* @memberof waproto.Message
|
|
58736
|
+
* @instance
|
|
58737
|
+
*/
|
|
58738
|
+
Message.prototype.questionResponseMessage = null;
|
|
58739
|
+
|
|
58731
58740
|
// OneOf field names bound to virtual getters and setters
|
|
58732
58741
|
var $oneOfFields;
|
|
58733
58742
|
|
|
@@ -59271,6 +59280,12 @@ $root.waproto = (function() {
|
|
|
59271
59280
|
set: $util.oneOfSetter($oneOfFields)
|
|
59272
59281
|
});
|
|
59273
59282
|
|
|
59283
|
+
// Virtual OneOf for proto3 optional field
|
|
59284
|
+
Object.defineProperty(Message.prototype, "_questionResponseMessage", {
|
|
59285
|
+
get: $util.oneOfGetter($oneOfFields = ["questionResponseMessage"]),
|
|
59286
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
59287
|
+
});
|
|
59288
|
+
|
|
59274
59289
|
/**
|
|
59275
59290
|
* Creates a new Message instance using the specified properties.
|
|
59276
59291
|
* @function create
|
|
@@ -59475,6 +59490,8 @@ $root.waproto = (function() {
|
|
|
59475
59490
|
$root.waproto.Message.StatusQuestionAnswerMessage.encode(message.statusQuestionAnswerMessage, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim();
|
|
59476
59491
|
if (message.questionAdminReplyMessage != null && Object.hasOwnProperty.call(message, "questionAdminReplyMessage"))
|
|
59477
59492
|
$root.waproto.Message.QuestionAdminReplyMessage.encode(message.questionAdminReplyMessage, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim();
|
|
59493
|
+
if (message.questionResponseMessage != null && Object.hasOwnProperty.call(message, "questionResponseMessage"))
|
|
59494
|
+
$root.waproto.Message.QuestionResponseMessage.encode(message.questionResponseMessage, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim();
|
|
59478
59495
|
return writer;
|
|
59479
59496
|
};
|
|
59480
59497
|
|
|
@@ -59869,6 +59886,10 @@ $root.waproto = (function() {
|
|
|
59869
59886
|
message.questionAdminReplyMessage = $root.waproto.Message.QuestionAdminReplyMessage.decode(reader, reader.uint32());
|
|
59870
59887
|
break;
|
|
59871
59888
|
}
|
|
59889
|
+
case 107: {
|
|
59890
|
+
message.questionResponseMessage = $root.waproto.Message.QuestionResponseMessage.decode(reader, reader.uint32());
|
|
59891
|
+
break;
|
|
59892
|
+
}
|
|
59872
59893
|
default:
|
|
59873
59894
|
reader.skipType(tag & 7);
|
|
59874
59895
|
break;
|
|
@@ -60622,6 +60643,14 @@ $root.waproto = (function() {
|
|
|
60622
60643
|
return "questionAdminReplyMessage." + error;
|
|
60623
60644
|
}
|
|
60624
60645
|
}
|
|
60646
|
+
if (message.questionResponseMessage != null && message.hasOwnProperty("questionResponseMessage")) {
|
|
60647
|
+
properties._questionResponseMessage = 1;
|
|
60648
|
+
{
|
|
60649
|
+
var error = $root.waproto.Message.QuestionResponseMessage.verify(message.questionResponseMessage);
|
|
60650
|
+
if (error)
|
|
60651
|
+
return "questionResponseMessage." + error;
|
|
60652
|
+
}
|
|
60653
|
+
}
|
|
60625
60654
|
return null;
|
|
60626
60655
|
};
|
|
60627
60656
|
|
|
@@ -61084,6 +61113,11 @@ $root.waproto = (function() {
|
|
|
61084
61113
|
throw TypeError(".waproto.Message.questionAdminReplyMessage: object expected");
|
|
61085
61114
|
message.questionAdminReplyMessage = $root.waproto.Message.QuestionAdminReplyMessage.fromObject(object.questionAdminReplyMessage);
|
|
61086
61115
|
}
|
|
61116
|
+
if (object.questionResponseMessage != null) {
|
|
61117
|
+
if (typeof object.questionResponseMessage !== "object")
|
|
61118
|
+
throw TypeError(".waproto.Message.questionResponseMessage: object expected");
|
|
61119
|
+
message.questionResponseMessage = $root.waproto.Message.QuestionResponseMessage.fromObject(object.questionResponseMessage);
|
|
61120
|
+
}
|
|
61087
61121
|
return message;
|
|
61088
61122
|
};
|
|
61089
61123
|
|
|
@@ -61550,6 +61584,11 @@ $root.waproto = (function() {
|
|
|
61550
61584
|
if (options.oneofs)
|
|
61551
61585
|
object._questionAdminReplyMessage = "questionAdminReplyMessage";
|
|
61552
61586
|
}
|
|
61587
|
+
if (message.questionResponseMessage != null && message.hasOwnProperty("questionResponseMessage")) {
|
|
61588
|
+
object.questionResponseMessage = $root.waproto.Message.QuestionResponseMessage.toObject(message.questionResponseMessage, options);
|
|
61589
|
+
if (options.oneofs)
|
|
61590
|
+
object._questionResponseMessage = "questionResponseMessage";
|
|
61591
|
+
}
|
|
61553
61592
|
return object;
|
|
61554
61593
|
};
|
|
61555
61594
|
|
|
@@ -105174,6 +105213,261 @@ $root.waproto = (function() {
|
|
|
105174
105213
|
return QuestionAdminReplyMessage;
|
|
105175
105214
|
})();
|
|
105176
105215
|
|
|
105216
|
+
Message.QuestionResponseMessage = (function() {
|
|
105217
|
+
|
|
105218
|
+
/**
|
|
105219
|
+
* Properties of a QuestionResponseMessage.
|
|
105220
|
+
* @memberof waproto.Message
|
|
105221
|
+
* @interface IQuestionResponseMessage
|
|
105222
|
+
* @property {waproto.IMessageKey|null} [key] QuestionResponseMessage key
|
|
105223
|
+
* @property {string|null} [text] QuestionResponseMessage text
|
|
105224
|
+
*/
|
|
105225
|
+
|
|
105226
|
+
/**
|
|
105227
|
+
* Constructs a new QuestionResponseMessage.
|
|
105228
|
+
* @memberof waproto.Message
|
|
105229
|
+
* @classdesc Represents a QuestionResponseMessage.
|
|
105230
|
+
* @implements IQuestionResponseMessage
|
|
105231
|
+
* @constructor
|
|
105232
|
+
* @param {waproto.Message.IQuestionResponseMessage=} [properties] Properties to set
|
|
105233
|
+
*/
|
|
105234
|
+
function QuestionResponseMessage(properties) {
|
|
105235
|
+
if (properties)
|
|
105236
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
105237
|
+
if (properties[keys[i]] != null)
|
|
105238
|
+
this[keys[i]] = properties[keys[i]];
|
|
105239
|
+
}
|
|
105240
|
+
|
|
105241
|
+
/**
|
|
105242
|
+
* QuestionResponseMessage key.
|
|
105243
|
+
* @member {waproto.IMessageKey|null|undefined} key
|
|
105244
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105245
|
+
* @instance
|
|
105246
|
+
*/
|
|
105247
|
+
QuestionResponseMessage.prototype.key = null;
|
|
105248
|
+
|
|
105249
|
+
/**
|
|
105250
|
+
* QuestionResponseMessage text.
|
|
105251
|
+
* @member {string|null|undefined} text
|
|
105252
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105253
|
+
* @instance
|
|
105254
|
+
*/
|
|
105255
|
+
QuestionResponseMessage.prototype.text = null;
|
|
105256
|
+
|
|
105257
|
+
// OneOf field names bound to virtual getters and setters
|
|
105258
|
+
var $oneOfFields;
|
|
105259
|
+
|
|
105260
|
+
// Virtual OneOf for proto3 optional field
|
|
105261
|
+
Object.defineProperty(QuestionResponseMessage.prototype, "_key", {
|
|
105262
|
+
get: $util.oneOfGetter($oneOfFields = ["key"]),
|
|
105263
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
105264
|
+
});
|
|
105265
|
+
|
|
105266
|
+
// Virtual OneOf for proto3 optional field
|
|
105267
|
+
Object.defineProperty(QuestionResponseMessage.prototype, "_text", {
|
|
105268
|
+
get: $util.oneOfGetter($oneOfFields = ["text"]),
|
|
105269
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
105270
|
+
});
|
|
105271
|
+
|
|
105272
|
+
/**
|
|
105273
|
+
* Creates a new QuestionResponseMessage instance using the specified properties.
|
|
105274
|
+
* @function create
|
|
105275
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105276
|
+
* @static
|
|
105277
|
+
* @param {waproto.Message.IQuestionResponseMessage=} [properties] Properties to set
|
|
105278
|
+
* @returns {waproto.Message.QuestionResponseMessage} QuestionResponseMessage instance
|
|
105279
|
+
*/
|
|
105280
|
+
QuestionResponseMessage.create = function create(properties) {
|
|
105281
|
+
return new QuestionResponseMessage(properties);
|
|
105282
|
+
};
|
|
105283
|
+
|
|
105284
|
+
/**
|
|
105285
|
+
* Encodes the specified QuestionResponseMessage message. Does not implicitly {@link waproto.Message.QuestionResponseMessage.verify|verify} messages.
|
|
105286
|
+
* @function encode
|
|
105287
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105288
|
+
* @static
|
|
105289
|
+
* @param {waproto.Message.IQuestionResponseMessage} message QuestionResponseMessage message or plain object to encode
|
|
105290
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105291
|
+
* @returns {$protobuf.Writer} Writer
|
|
105292
|
+
*/
|
|
105293
|
+
QuestionResponseMessage.encode = function encode(message, writer) {
|
|
105294
|
+
if (!writer)
|
|
105295
|
+
writer = $Writer.create();
|
|
105296
|
+
if (message.key != null && Object.hasOwnProperty.call(message, "key"))
|
|
105297
|
+
$root.waproto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
105298
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
105299
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
|
|
105300
|
+
return writer;
|
|
105301
|
+
};
|
|
105302
|
+
|
|
105303
|
+
/**
|
|
105304
|
+
* Encodes the specified QuestionResponseMessage message, length delimited. Does not implicitly {@link waproto.Message.QuestionResponseMessage.verify|verify} messages.
|
|
105305
|
+
* @function encodeDelimited
|
|
105306
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105307
|
+
* @static
|
|
105308
|
+
* @param {waproto.Message.IQuestionResponseMessage} message QuestionResponseMessage message or plain object to encode
|
|
105309
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
105310
|
+
* @returns {$protobuf.Writer} Writer
|
|
105311
|
+
*/
|
|
105312
|
+
QuestionResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
|
|
105313
|
+
return this.encode(message, writer).ldelim();
|
|
105314
|
+
};
|
|
105315
|
+
|
|
105316
|
+
/**
|
|
105317
|
+
* Decodes a QuestionResponseMessage message from the specified reader or buffer.
|
|
105318
|
+
* @function decode
|
|
105319
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105320
|
+
* @static
|
|
105321
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105322
|
+
* @param {number} [length] Message length if known beforehand
|
|
105323
|
+
* @returns {waproto.Message.QuestionResponseMessage} QuestionResponseMessage
|
|
105324
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105325
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105326
|
+
*/
|
|
105327
|
+
QuestionResponseMessage.decode = function decode(reader, length) {
|
|
105328
|
+
if (!(reader instanceof $Reader))
|
|
105329
|
+
reader = $Reader.create(reader);
|
|
105330
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.waproto.Message.QuestionResponseMessage();
|
|
105331
|
+
while (reader.pos < end) {
|
|
105332
|
+
var tag = reader.uint32();
|
|
105333
|
+
switch (tag >>> 3) {
|
|
105334
|
+
case 1: {
|
|
105335
|
+
message.key = $root.waproto.MessageKey.decode(reader, reader.uint32());
|
|
105336
|
+
break;
|
|
105337
|
+
}
|
|
105338
|
+
case 2: {
|
|
105339
|
+
message.text = reader.string();
|
|
105340
|
+
break;
|
|
105341
|
+
}
|
|
105342
|
+
default:
|
|
105343
|
+
reader.skipType(tag & 7);
|
|
105344
|
+
break;
|
|
105345
|
+
}
|
|
105346
|
+
}
|
|
105347
|
+
return message;
|
|
105348
|
+
};
|
|
105349
|
+
|
|
105350
|
+
/**
|
|
105351
|
+
* Decodes a QuestionResponseMessage message from the specified reader or buffer, length delimited.
|
|
105352
|
+
* @function decodeDelimited
|
|
105353
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105354
|
+
* @static
|
|
105355
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
105356
|
+
* @returns {waproto.Message.QuestionResponseMessage} QuestionResponseMessage
|
|
105357
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
105358
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
105359
|
+
*/
|
|
105360
|
+
QuestionResponseMessage.decodeDelimited = function decodeDelimited(reader) {
|
|
105361
|
+
if (!(reader instanceof $Reader))
|
|
105362
|
+
reader = new $Reader(reader);
|
|
105363
|
+
return this.decode(reader, reader.uint32());
|
|
105364
|
+
};
|
|
105365
|
+
|
|
105366
|
+
/**
|
|
105367
|
+
* Verifies a QuestionResponseMessage message.
|
|
105368
|
+
* @function verify
|
|
105369
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105370
|
+
* @static
|
|
105371
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
105372
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
105373
|
+
*/
|
|
105374
|
+
QuestionResponseMessage.verify = function verify(message) {
|
|
105375
|
+
if (typeof message !== "object" || message === null)
|
|
105376
|
+
return "object expected";
|
|
105377
|
+
var properties = {};
|
|
105378
|
+
if (message.key != null && message.hasOwnProperty("key")) {
|
|
105379
|
+
properties._key = 1;
|
|
105380
|
+
{
|
|
105381
|
+
var error = $root.waproto.MessageKey.verify(message.key);
|
|
105382
|
+
if (error)
|
|
105383
|
+
return "key." + error;
|
|
105384
|
+
}
|
|
105385
|
+
}
|
|
105386
|
+
if (message.text != null && message.hasOwnProperty("text")) {
|
|
105387
|
+
properties._text = 1;
|
|
105388
|
+
if (!$util.isString(message.text))
|
|
105389
|
+
return "text: string expected";
|
|
105390
|
+
}
|
|
105391
|
+
return null;
|
|
105392
|
+
};
|
|
105393
|
+
|
|
105394
|
+
/**
|
|
105395
|
+
* Creates a QuestionResponseMessage message from a plain object. Also converts values to their respective internal types.
|
|
105396
|
+
* @function fromObject
|
|
105397
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105398
|
+
* @static
|
|
105399
|
+
* @param {Object.<string,*>} object Plain object
|
|
105400
|
+
* @returns {waproto.Message.QuestionResponseMessage} QuestionResponseMessage
|
|
105401
|
+
*/
|
|
105402
|
+
QuestionResponseMessage.fromObject = function fromObject(object) {
|
|
105403
|
+
if (object instanceof $root.waproto.Message.QuestionResponseMessage)
|
|
105404
|
+
return object;
|
|
105405
|
+
var message = new $root.waproto.Message.QuestionResponseMessage();
|
|
105406
|
+
if (object.key != null) {
|
|
105407
|
+
if (typeof object.key !== "object")
|
|
105408
|
+
throw TypeError(".waproto.Message.QuestionResponseMessage.key: object expected");
|
|
105409
|
+
message.key = $root.waproto.MessageKey.fromObject(object.key);
|
|
105410
|
+
}
|
|
105411
|
+
if (object.text != null)
|
|
105412
|
+
message.text = String(object.text);
|
|
105413
|
+
return message;
|
|
105414
|
+
};
|
|
105415
|
+
|
|
105416
|
+
/**
|
|
105417
|
+
* Creates a plain object from a QuestionResponseMessage message. Also converts values to other types if specified.
|
|
105418
|
+
* @function toObject
|
|
105419
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105420
|
+
* @static
|
|
105421
|
+
* @param {waproto.Message.QuestionResponseMessage} message QuestionResponseMessage
|
|
105422
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
105423
|
+
* @returns {Object.<string,*>} Plain object
|
|
105424
|
+
*/
|
|
105425
|
+
QuestionResponseMessage.toObject = function toObject(message, options) {
|
|
105426
|
+
if (!options)
|
|
105427
|
+
options = {};
|
|
105428
|
+
var object = {};
|
|
105429
|
+
if (message.key != null && message.hasOwnProperty("key")) {
|
|
105430
|
+
object.key = $root.waproto.MessageKey.toObject(message.key, options);
|
|
105431
|
+
if (options.oneofs)
|
|
105432
|
+
object._key = "key";
|
|
105433
|
+
}
|
|
105434
|
+
if (message.text != null && message.hasOwnProperty("text")) {
|
|
105435
|
+
object.text = message.text;
|
|
105436
|
+
if (options.oneofs)
|
|
105437
|
+
object._text = "text";
|
|
105438
|
+
}
|
|
105439
|
+
return object;
|
|
105440
|
+
};
|
|
105441
|
+
|
|
105442
|
+
/**
|
|
105443
|
+
* Converts this QuestionResponseMessage to JSON.
|
|
105444
|
+
* @function toJSON
|
|
105445
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105446
|
+
* @instance
|
|
105447
|
+
* @returns {Object.<string,*>} JSON object
|
|
105448
|
+
*/
|
|
105449
|
+
QuestionResponseMessage.prototype.toJSON = function toJSON() {
|
|
105450
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
105451
|
+
};
|
|
105452
|
+
|
|
105453
|
+
/**
|
|
105454
|
+
* Gets the default type url for QuestionResponseMessage
|
|
105455
|
+
* @function getTypeUrl
|
|
105456
|
+
* @memberof waproto.Message.QuestionResponseMessage
|
|
105457
|
+
* @static
|
|
105458
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
105459
|
+
* @returns {string} The default type url
|
|
105460
|
+
*/
|
|
105461
|
+
QuestionResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
105462
|
+
if (typeUrlPrefix === undefined) {
|
|
105463
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
105464
|
+
}
|
|
105465
|
+
return typeUrlPrefix + "/waproto.Message.QuestionResponseMessage";
|
|
105466
|
+
};
|
|
105467
|
+
|
|
105468
|
+
return QuestionResponseMessage;
|
|
105469
|
+
})();
|
|
105470
|
+
|
|
105177
105471
|
Message.ReactionMessage = (function() {
|
|
105178
105472
|
|
|
105179
105473
|
/**
|