Skip to content

Commit

Permalink
Update WAProto.proto
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 4, 2024
1 parent 6d3ce78 commit 2cfd289
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 1 deletion.
9 changes: 8 additions & 1 deletion WAProto.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package waproto;

/// WhatsApp Version: 2.3000.1017890487
/// WhatsApp Version: 2.3000.1017926576

message ADVDeviceIdentity {
optional uint32 rawId = 1;
Expand Down Expand Up @@ -1276,6 +1276,7 @@ message Message {
optional FutureProofMessage associatedChildMessage = 91;
optional FutureProofMessage groupStatusMentionMessage = 92;
optional FutureProofMessage pollCreationMessageV4 = 93;
optional FutureProofMessage pollCreationMessageV5 = 94;
message AlbumMessage {
optional uint32 expectedImageCount = 2;
optional uint32 expectedVideoCount = 3;
Expand Down Expand Up @@ -2205,11 +2206,17 @@ message Message {
optional uint32 selectableOptionsCount = 4;
optional ContextInfo contextInfo = 5;
optional Message.PollMediaType pollMediaType = 6;
optional PollType pollType = 7;
optional Option correctAnswer = 8;
message Option {
optional string optionName = 1;
optional string optionHash = 2;
}

enum PollType {
POLL = 0;
QUIZ = 1;
}
}

message PollEncValue {
Expand Down
24 changes: 24 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13472,6 +13472,9 @@ export namespace waproto {

/** Message pollCreationMessageV4 */
pollCreationMessageV4?: (waproto.Message.IFutureProofMessage|null);

/** Message pollCreationMessageV5 */
pollCreationMessageV5?: (waproto.Message.IFutureProofMessage|null);
}

/** Represents a Message. */
Expand Down Expand Up @@ -13714,6 +13717,9 @@ export namespace waproto {
/** Message pollCreationMessageV4. */
public pollCreationMessageV4?: (waproto.Message.IFutureProofMessage|null);

/** Message pollCreationMessageV5. */
public pollCreationMessageV5?: (waproto.Message.IFutureProofMessage|null);

/**
* Creates a new Message instance using the specified properties.
* @param [properties] Properties to set
Expand Down Expand Up @@ -25169,6 +25175,12 @@ export namespace waproto {

/** PollCreationMessage pollMediaType */
pollMediaType?: (waproto.Message.PollMediaType|null);

/** PollCreationMessage pollType */
pollType?: (waproto.Message.PollCreationMessage.PollType|null);

/** PollCreationMessage correctAnswer */
correctAnswer?: (waproto.Message.PollCreationMessage.IOption|null);
}

/** Represents a PollCreationMessage. */
Expand Down Expand Up @@ -25198,6 +25210,12 @@ export namespace waproto {
/** PollCreationMessage pollMediaType. */
public pollMediaType?: (waproto.Message.PollMediaType|null);

/** PollCreationMessage pollType. */
public pollType?: (waproto.Message.PollCreationMessage.PollType|null);

/** PollCreationMessage correctAnswer. */
public correctAnswer?: (waproto.Message.PollCreationMessage.IOption|null);

/**
* Creates a new PollCreationMessage instance using the specified properties.
* @param [properties] Properties to set
Expand Down Expand Up @@ -25380,6 +25398,12 @@ export namespace waproto {
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** PollType enum. */
enum PollType {
POLL = 0,
QUIZ = 1
}
}

/** Properties of a PollEncValue. */
Expand Down
144 changes: 144 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41543,6 +41543,7 @@ $root.waproto = (function() {
* @property {waproto.Message.IFutureProofMessage|null} [associatedChildMessage] Message associatedChildMessage
* @property {waproto.Message.IFutureProofMessage|null} [groupStatusMentionMessage] Message groupStatusMentionMessage
* @property {waproto.Message.IFutureProofMessage|null} [pollCreationMessageV4] Message pollCreationMessageV4
* @property {waproto.Message.IFutureProofMessage|null} [pollCreationMessageV5] Message pollCreationMessageV5
*/

/**
Expand Down Expand Up @@ -42176,6 +42177,14 @@ $root.waproto = (function() {
*/
Message.prototype.pollCreationMessageV4 = null;

/**
* Message pollCreationMessageV5.
* @member {waproto.Message.IFutureProofMessage|null|undefined} pollCreationMessageV5
* @memberof waproto.Message
* @instance
*/
Message.prototype.pollCreationMessageV5 = null;

// OneOf field names bound to virtual getters and setters
var $oneOfFields;

Expand Down Expand Up @@ -42641,6 +42650,12 @@ $root.waproto = (function() {
set: $util.oneOfSetter($oneOfFields)
});

// Virtual OneOf for proto3 optional field
Object.defineProperty(Message.prototype, "_pollCreationMessageV5", {
get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV5"]),
set: $util.oneOfSetter($oneOfFields)
});

/**
* Creates a new Message instance using the specified properties.
* @function create
Expand Down Expand Up @@ -42819,6 +42834,8 @@ $root.waproto = (function() {
$root.waproto.Message.FutureProofMessage.encode(message.groupStatusMentionMessage, writer.uint32(/* id 92, wireType 2 =*/738).fork()).ldelim();
if (message.pollCreationMessageV4 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV4"))
$root.waproto.Message.FutureProofMessage.encode(message.pollCreationMessageV4, writer.uint32(/* id 93, wireType 2 =*/746).fork()).ldelim();
if (message.pollCreationMessageV5 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV5"))
$root.waproto.Message.FutureProofMessage.encode(message.pollCreationMessageV5, writer.uint32(/* id 94, wireType 2 =*/754).fork()).ldelim();
return writer;
};

Expand Down Expand Up @@ -43161,6 +43178,10 @@ $root.waproto = (function() {
message.pollCreationMessageV4 = $root.waproto.Message.FutureProofMessage.decode(reader, reader.uint32());
break;
}
case 94: {
message.pollCreationMessageV5 = $root.waproto.Message.FutureProofMessage.decode(reader, reader.uint32());
break;
}
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -43810,6 +43831,14 @@ $root.waproto = (function() {
return "pollCreationMessageV4." + error;
}
}
if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) {
properties._pollCreationMessageV5 = 1;
{
var error = $root.waproto.Message.FutureProofMessage.verify(message.pollCreationMessageV5);
if (error)
return "pollCreationMessageV5." + error;
}
}
return null;
};

Expand Down Expand Up @@ -44207,6 +44236,11 @@ $root.waproto = (function() {
throw TypeError(".waproto.Message.pollCreationMessageV4: object expected");
message.pollCreationMessageV4 = $root.waproto.Message.FutureProofMessage.fromObject(object.pollCreationMessageV4);
}
if (object.pollCreationMessageV5 != null) {
if (typeof object.pollCreationMessageV5 !== "object")
throw TypeError(".waproto.Message.pollCreationMessageV5: object expected");
message.pollCreationMessageV5 = $root.waproto.Message.FutureProofMessage.fromObject(object.pollCreationMessageV5);
}
return message;
};

Expand Down Expand Up @@ -44608,6 +44642,11 @@ $root.waproto = (function() {
if (options.oneofs)
object._pollCreationMessageV4 = "pollCreationMessageV4";
}
if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) {
object.pollCreationMessageV5 = $root.waproto.Message.FutureProofMessage.toObject(message.pollCreationMessageV5, options);
if (options.oneofs)
object._pollCreationMessageV5 = "pollCreationMessageV5";
}
return object;
};

Expand Down Expand Up @@ -78687,6 +78726,8 @@ $root.waproto = (function() {
* @property {number|null} [selectableOptionsCount] PollCreationMessage selectableOptionsCount
* @property {waproto.IContextInfo|null} [contextInfo] PollCreationMessage contextInfo
* @property {waproto.Message.PollMediaType|null} [pollMediaType] PollCreationMessage pollMediaType
* @property {waproto.Message.PollCreationMessage.PollType|null} [pollType] PollCreationMessage pollType
* @property {waproto.Message.PollCreationMessage.IOption|null} [correctAnswer] PollCreationMessage correctAnswer
*/

/**
Expand Down Expand Up @@ -78753,6 +78794,22 @@ $root.waproto = (function() {
*/
PollCreationMessage.prototype.pollMediaType = null;

/**
* PollCreationMessage pollType.
* @member {waproto.Message.PollCreationMessage.PollType|null|undefined} pollType
* @memberof waproto.Message.PollCreationMessage
* @instance
*/
PollCreationMessage.prototype.pollType = null;

/**
* PollCreationMessage correctAnswer.
* @member {waproto.Message.PollCreationMessage.IOption|null|undefined} correctAnswer
* @memberof waproto.Message.PollCreationMessage
* @instance
*/
PollCreationMessage.prototype.correctAnswer = null;

// OneOf field names bound to virtual getters and setters
var $oneOfFields;

Expand Down Expand Up @@ -78786,6 +78843,18 @@ $root.waproto = (function() {
set: $util.oneOfSetter($oneOfFields)
});

// Virtual OneOf for proto3 optional field
Object.defineProperty(PollCreationMessage.prototype, "_pollType", {
get: $util.oneOfGetter($oneOfFields = ["pollType"]),
set: $util.oneOfSetter($oneOfFields)
});

// Virtual OneOf for proto3 optional field
Object.defineProperty(PollCreationMessage.prototype, "_correctAnswer", {
get: $util.oneOfGetter($oneOfFields = ["correctAnswer"]),
set: $util.oneOfSetter($oneOfFields)
});

/**
* Creates a new PollCreationMessage instance using the specified properties.
* @function create
Expand Down Expand Up @@ -78823,6 +78892,10 @@ $root.waproto = (function() {
$root.waproto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
if (message.pollMediaType != null && Object.hasOwnProperty.call(message, "pollMediaType"))
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pollMediaType);
if (message.pollType != null && Object.hasOwnProperty.call(message, "pollType"))
writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pollType);
if (message.correctAnswer != null && Object.hasOwnProperty.call(message, "correctAnswer"))
$root.waproto.Message.PollCreationMessage.Option.encode(message.correctAnswer, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
return writer;
};

Expand Down Expand Up @@ -78883,6 +78956,14 @@ $root.waproto = (function() {
message.pollMediaType = reader.int32();
break;
}
case 7: {
message.pollType = reader.int32();
break;
}
case 8: {
message.correctAnswer = $root.waproto.Message.PollCreationMessage.Option.decode(reader, reader.uint32());
break;
}
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -78961,6 +79042,24 @@ $root.waproto = (function() {
break;
}
}
if (message.pollType != null && message.hasOwnProperty("pollType")) {
properties._pollType = 1;
switch (message.pollType) {
default:
return "pollType: enum value expected";
case 0:
case 1:
break;
}
}
if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) {
properties._correctAnswer = 1;
{
var error = $root.waproto.Message.PollCreationMessage.Option.verify(message.correctAnswer);
if (error)
return "correctAnswer." + error;
}
}
return null;
};

Expand Down Expand Up @@ -79016,6 +79115,27 @@ $root.waproto = (function() {
message.pollMediaType = 2;
break;
}
switch (object.pollType) {
default:
if (typeof object.pollType === "number") {
message.pollType = object.pollType;
break;
}
break;
case "POLL":
case 0:
message.pollType = 0;
break;
case "QUIZ":
case 1:
message.pollType = 1;
break;
}
if (object.correctAnswer != null) {
if (typeof object.correctAnswer !== "object")
throw TypeError(".waproto.Message.PollCreationMessage.correctAnswer: object expected");
message.correctAnswer = $root.waproto.Message.PollCreationMessage.Option.fromObject(object.correctAnswer);
}
return message;
};

Expand Down Expand Up @@ -79064,6 +79184,16 @@ $root.waproto = (function() {
if (options.oneofs)
object._pollMediaType = "pollMediaType";
}
if (message.pollType != null && message.hasOwnProperty("pollType")) {
object.pollType = options.enums === String ? $root.waproto.Message.PollCreationMessage.PollType[message.pollType] === undefined ? message.pollType : $root.waproto.Message.PollCreationMessage.PollType[message.pollType] : message.pollType;
if (options.oneofs)
object._pollType = "pollType";
}
if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) {
object.correctAnswer = $root.waproto.Message.PollCreationMessage.Option.toObject(message.correctAnswer, options);
if (options.oneofs)
object._correctAnswer = "correctAnswer";
}
return object;
};

Expand Down Expand Up @@ -79342,6 +79472,20 @@ $root.waproto = (function() {
return Option;
})();

/**
* PollType enum.
* @name waproto.Message.PollCreationMessage.PollType
* @enum {number}
* @property {number} POLL=0 POLL value
* @property {number} QUIZ=1 QUIZ value
*/
PollCreationMessage.PollType = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "POLL"] = 0;
values[valuesById[1] = "QUIZ"] = 1;
return values;
})();

return PollCreationMessage;
})();

Expand Down

0 comments on commit 2cfd289

Please sign in to comment.