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 Sep 19, 2024
1 parent 486c94e commit 03a6668
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 1 deletion.
5 changes: 4 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.1016627401
/// WhatsApp Version: 2.3000.1016629271

message ADVDeviceIdentity {
optional uint32 rawId = 1;
Expand Down Expand Up @@ -652,6 +652,7 @@ message ContextInfo {
optional bool automatedGreetingMessageShown = 18;
optional string greetingMessageBody = 19;
optional string ctaPayload = 20;
optional bool disableNudge = 21;
enum MediaType {
NONE = 0;
IMAGE = 1;
Expand Down Expand Up @@ -867,6 +868,7 @@ message EmbeddedMusic {
optional string artworkDirectPath = 5;
optional bytes artworkSha256 = 6;
optional bytes artworkEncSha256 = 7;
optional bytes artworkMediaKey = 11;
optional string artistAttribution = 8;
optional bytes countryBlocklist = 9;
optional bool isExplicit = 10;
Expand Down Expand Up @@ -1120,6 +1122,7 @@ message MediaRetryNotification {
optional string stanzaId = 1;
optional string directPath = 2;
optional ResultType result = 3;
optional bytes messageSecret = 4;
enum ResultType {
GENERAL_ERROR = 0;
SUCCESS = 1;
Expand Down
18 changes: 18 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6428,6 +6428,9 @@ export namespace waproto {

/** ExternalAdReplyInfo ctaPayload */
ctaPayload?: (string|null);

/** ExternalAdReplyInfo disableNudge */
disableNudge?: (boolean|null);
}

/** Represents an ExternalAdReplyInfo. */
Expand Down Expand Up @@ -6499,6 +6502,9 @@ export namespace waproto {
/** ExternalAdReplyInfo ctaPayload. */
public ctaPayload?: (string|null);

/** ExternalAdReplyInfo disableNudge. */
public disableNudge?: (boolean|null);

/**
* Creates a new ExternalAdReplyInfo instance using the specified properties.
* @param [properties] Properties to set
Expand Down Expand Up @@ -8487,6 +8493,9 @@ export namespace waproto {
/** EmbeddedMusic artworkEncSha256 */
artworkEncSha256?: (Uint8Array|null);

/** EmbeddedMusic artworkMediaKey */
artworkMediaKey?: (Uint8Array|null);

/** EmbeddedMusic artistAttribution */
artistAttribution?: (string|null);

Expand Down Expand Up @@ -8527,6 +8536,9 @@ export namespace waproto {
/** EmbeddedMusic artworkEncSha256. */
public artworkEncSha256?: (Uint8Array|null);

/** EmbeddedMusic artworkMediaKey. */
public artworkMediaKey?: (Uint8Array|null);

/** EmbeddedMusic artistAttribution. */
public artistAttribution?: (string|null);

Expand Down Expand Up @@ -12219,6 +12231,9 @@ export namespace waproto {

/** MediaRetryNotification result */
result?: (waproto.MediaRetryNotification.ResultType|null);

/** MediaRetryNotification messageSecret */
messageSecret?: (Uint8Array|null);
}

/** Represents a MediaRetryNotification. */
Expand All @@ -12239,6 +12254,9 @@ export namespace waproto {
/** MediaRetryNotification result. */
public result?: (waproto.MediaRetryNotification.ResultType|null);

/** MediaRetryNotification messageSecret. */
public messageSecret?: (Uint8Array|null);

/**
* Creates a new MediaRetryNotification instance using the specified properties.
* @param [properties] Properties to set
Expand Down
105 changes: 105 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20551,6 +20551,7 @@ $root.waproto = (function() {
* @property {boolean|null} [automatedGreetingMessageShown] ExternalAdReplyInfo automatedGreetingMessageShown
* @property {string|null} [greetingMessageBody] ExternalAdReplyInfo greetingMessageBody
* @property {string|null} [ctaPayload] ExternalAdReplyInfo ctaPayload
* @property {boolean|null} [disableNudge] ExternalAdReplyInfo disableNudge
*/

/**
Expand Down Expand Up @@ -20728,6 +20729,14 @@ $root.waproto = (function() {
*/
ExternalAdReplyInfo.prototype.ctaPayload = null;

/**
* ExternalAdReplyInfo disableNudge.
* @member {boolean|null|undefined} disableNudge
* @memberof waproto.ContextInfo.ExternalAdReplyInfo
* @instance
*/
ExternalAdReplyInfo.prototype.disableNudge = null;

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

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

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

/**
* Creates a new ExternalAdReplyInfo instance using the specified properties.
* @function create
Expand Down Expand Up @@ -20915,6 +20930,8 @@ $root.waproto = (function() {
writer.uint32(/* id 19, wireType 2 =*/154).string(message.greetingMessageBody);
if (message.ctaPayload != null && Object.hasOwnProperty.call(message, "ctaPayload"))
writer.uint32(/* id 20, wireType 2 =*/162).string(message.ctaPayload);
if (message.disableNudge != null && Object.hasOwnProperty.call(message, "disableNudge"))
writer.uint32(/* id 21, wireType 0 =*/168).bool(message.disableNudge);
return writer;
};

Expand Down Expand Up @@ -21029,6 +21046,10 @@ $root.waproto = (function() {
message.ctaPayload = reader.string();
break;
}
case 21: {
message.disableNudge = reader.bool();
break;
}
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -21171,6 +21192,11 @@ $root.waproto = (function() {
if (!$util.isString(message.ctaPayload))
return "ctaPayload: string expected";
}
if (message.disableNudge != null && message.hasOwnProperty("disableNudge")) {
properties._disableNudge = 1;
if (typeof message.disableNudge !== "boolean")
return "disableNudge: boolean expected";
}
return null;
};

Expand Down Expand Up @@ -21247,6 +21273,8 @@ $root.waproto = (function() {
message.greetingMessageBody = String(object.greetingMessageBody);
if (object.ctaPayload != null)
message.ctaPayload = String(object.ctaPayload);
if (object.disableNudge != null)
message.disableNudge = Boolean(object.disableNudge);
return message;
};

Expand Down Expand Up @@ -21363,6 +21391,11 @@ $root.waproto = (function() {
if (options.oneofs)
object._ctaPayload = "ctaPayload";
}
if (message.disableNudge != null && message.hasOwnProperty("disableNudge")) {
object.disableNudge = message.disableNudge;
if (options.oneofs)
object._disableNudge = "disableNudge";
}
return object;
};

Expand Down Expand Up @@ -27840,6 +27873,7 @@ $root.waproto = (function() {
* @property {string|null} [artworkDirectPath] EmbeddedMusic artworkDirectPath
* @property {Uint8Array|null} [artworkSha256] EmbeddedMusic artworkSha256
* @property {Uint8Array|null} [artworkEncSha256] EmbeddedMusic artworkEncSha256
* @property {Uint8Array|null} [artworkMediaKey] EmbeddedMusic artworkMediaKey
* @property {string|null} [artistAttribution] EmbeddedMusic artistAttribution
* @property {Uint8Array|null} [countryBlocklist] EmbeddedMusic countryBlocklist
* @property {boolean|null} [isExplicit] EmbeddedMusic isExplicit
Expand Down Expand Up @@ -27916,6 +27950,14 @@ $root.waproto = (function() {
*/
EmbeddedMusic.prototype.artworkEncSha256 = null;

/**
* EmbeddedMusic artworkMediaKey.
* @member {Uint8Array|null|undefined} artworkMediaKey
* @memberof waproto.EmbeddedMusic
* @instance
*/
EmbeddedMusic.prototype.artworkMediaKey = null;

/**
* EmbeddedMusic artistAttribution.
* @member {string|null|undefined} artistAttribution
Expand Down Expand Up @@ -27985,6 +28027,12 @@ $root.waproto = (function() {
set: $util.oneOfSetter($oneOfFields)
});

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

// Virtual OneOf for proto3 optional field
Object.defineProperty(EmbeddedMusic.prototype, "_artistAttribution", {
get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]),
Expand Down Expand Up @@ -28047,6 +28095,8 @@ $root.waproto = (function() {
writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.countryBlocklist);
if (message.isExplicit != null && Object.hasOwnProperty.call(message, "isExplicit"))
writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isExplicit);
if (message.artworkMediaKey != null && Object.hasOwnProperty.call(message, "artworkMediaKey"))
writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.artworkMediaKey);
return writer;
};

Expand Down Expand Up @@ -28109,6 +28159,10 @@ $root.waproto = (function() {
message.artworkEncSha256 = reader.bytes();
break;
}
case 11: {
message.artworkMediaKey = reader.bytes();
break;
}
case 8: {
message.artistAttribution = reader.string();
break;
Expand Down Expand Up @@ -28192,6 +28246,11 @@ $root.waproto = (function() {
if (!(message.artworkEncSha256 && typeof message.artworkEncSha256.length === "number" || $util.isString(message.artworkEncSha256)))
return "artworkEncSha256: buffer expected";
}
if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey")) {
properties._artworkMediaKey = 1;
if (!(message.artworkMediaKey && typeof message.artworkMediaKey.length === "number" || $util.isString(message.artworkMediaKey)))
return "artworkMediaKey: buffer expected";
}
if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
properties._artistAttribution = 1;
if (!$util.isString(message.artistAttribution))
Expand Down Expand Up @@ -28242,6 +28301,11 @@ $root.waproto = (function() {
$util.base64.decode(object.artworkEncSha256, message.artworkEncSha256 = $util.newBuffer($util.base64.length(object.artworkEncSha256)), 0);
else if (object.artworkEncSha256.length >= 0)
message.artworkEncSha256 = object.artworkEncSha256;
if (object.artworkMediaKey != null)
if (typeof object.artworkMediaKey === "string")
$util.base64.decode(object.artworkMediaKey, message.artworkMediaKey = $util.newBuffer($util.base64.length(object.artworkMediaKey)), 0);
else if (object.artworkMediaKey.length >= 0)
message.artworkMediaKey = object.artworkMediaKey;
if (object.artistAttribution != null)
message.artistAttribution = String(object.artistAttribution);
if (object.countryBlocklist != null)
Expand Down Expand Up @@ -28317,6 +28381,11 @@ $root.waproto = (function() {
if (options.oneofs)
object._isExplicit = "isExplicit";
}
if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey")) {
object.artworkMediaKey = options.bytes === String ? $util.base64.encode(message.artworkMediaKey, 0, message.artworkMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkMediaKey) : message.artworkMediaKey;
if (options.oneofs)
object._artworkMediaKey = "artworkMediaKey";
}
return object;
};

Expand Down Expand Up @@ -38629,6 +38698,7 @@ $root.waproto = (function() {
* @property {string|null} [stanzaId] MediaRetryNotification stanzaId
* @property {string|null} [directPath] MediaRetryNotification directPath
* @property {waproto.MediaRetryNotification.ResultType|null} [result] MediaRetryNotification result
* @property {Uint8Array|null} [messageSecret] MediaRetryNotification messageSecret
*/

/**
Expand Down Expand Up @@ -38670,6 +38740,14 @@ $root.waproto = (function() {
*/
MediaRetryNotification.prototype.result = null;

/**
* MediaRetryNotification messageSecret.
* @member {Uint8Array|null|undefined} messageSecret
* @memberof waproto.MediaRetryNotification
* @instance
*/
MediaRetryNotification.prototype.messageSecret = null;

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

Expand All @@ -38691,6 +38769,12 @@ $root.waproto = (function() {
set: $util.oneOfSetter($oneOfFields)
});

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

/**
* Creates a new MediaRetryNotification instance using the specified properties.
* @function create
Expand Down Expand Up @@ -38721,6 +38805,8 @@ $root.waproto = (function() {
writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath);
if (message.result != null && Object.hasOwnProperty.call(message, "result"))
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result);
if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret"))
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.messageSecret);
return writer;
};

Expand Down Expand Up @@ -38767,6 +38853,10 @@ $root.waproto = (function() {
message.result = reader.int32();
break;
}
case 4: {
message.messageSecret = reader.bytes();
break;
}
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -38825,6 +38915,11 @@ $root.waproto = (function() {
break;
}
}
if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
properties._messageSecret = 1;
if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret)))
return "messageSecret: buffer expected";
}
return null;
};

Expand Down Expand Up @@ -38868,6 +38963,11 @@ $root.waproto = (function() {
message.result = 3;
break;
}
if (object.messageSecret != null)
if (typeof object.messageSecret === "string")
$util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0);
else if (object.messageSecret.length >= 0)
message.messageSecret = object.messageSecret;
return message;
};

Expand Down Expand Up @@ -38899,6 +38999,11 @@ $root.waproto = (function() {
if (options.oneofs)
object._result = "result";
}
if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret;
if (options.oneofs)
object._messageSecret = "messageSecret";
}
return object;
};

Expand Down

0 comments on commit 03a6668

Please sign in to comment.