vialeys 0.0.1 → 0.0.2
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/README.md +11 -5
- package/WAProto/AICommon/AICommon.js +13991 -9169
- package/WAProto/AICommon/AICommon.proto +110 -3
- package/WAProto/CompanionReg/CompanionReg.js +114 -0
- package/WAProto/CompanionReg/CompanionReg.proto +3 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.js +652 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.proto +19 -0
- package/WAProto/E2E/E2E.js +77193 -51248
- package/WAProto/E2E/E2E.proto +68 -12
- package/WAProto/HistorySync/HistorySync.js +3375 -178
- package/WAProto/HistorySync/HistorySync.proto +3 -3
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.js +98 -49
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.proto +2 -2
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +75226 -48422
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.proto +6 -0
- package/WAProto/StatusAttributions/StatusAttributions.js +21 -0
- package/WAProto/StatusAttributions/StatusAttributions.proto +3 -0
- package/WAProto/SyncAction/SyncAction.js +9423 -2023
- package/WAProto/SyncAction/SyncAction.proto +208 -15
- package/WAProto/Wa6/Wa6.js +83 -0
- package/WAProto/Wa6/Wa6.proto +3 -0
- package/WAProto/Web/Web.js +92664 -63403
- package/WAProto/Web/Web.proto +31 -13
- package/engine-requirements.js +9 -7
- package/lib/Defaults/baileys-version.json +2 -2
- package/lib/Defaults/connection.js +51 -0
- package/lib/Defaults/constants.js +62 -0
- package/lib/Defaults/history.js +17 -0
- package/lib/Defaults/index.js +36 -142
- package/lib/Defaults/media.js +48 -0
- package/lib/Defaults/prefix.js +18 -0
- package/lib/Signal/Group/group-session-builder.js +10 -42
- package/lib/Signal/Group/group_cipher.js +9 -6
- package/lib/Signal/Group/index.js +39 -53
- package/lib/Signal/Group/keyhelper.js +8 -41
- package/lib/Signal/Group/sender-chain-key.js +4 -4
- package/lib/Signal/Group/sender-key-distribution-message.js +5 -5
- package/lib/Signal/Group/sender-key-message.js +12 -8
- package/lib/Signal/Group/sender-key-state.js +4 -4
- package/lib/Signal/Group/sender-message-key.js +2 -2
- package/lib/Signal/libsignal.js +45 -69
- package/lib/Signal/lid-mapping.js +15 -11
- package/lib/Socket/Client/types.js +2 -2
- package/lib/Socket/Client/websocket.js +16 -14
- package/lib/Socket/business.js +41 -32
- package/lib/Socket/chats.js +123 -98
- package/lib/Socket/community.js +50 -40
- package/lib/Socket/groups.js +59 -47
- package/lib/Socket/index.js +4 -4
- package/lib/Socket/messages-recv.js +226 -171
- package/lib/Socket/messages-send.js +187 -143
- package/lib/Socket/newsletter.js +61 -47
- package/lib/Socket/socket.js +133 -90
- package/lib/Socket/usync.js +6 -6
- package/lib/Store/index.js +27 -11
- package/lib/Store/make-cache-manager-store.js +14 -15
- package/lib/Store/make-in-memory-store.js +28 -24
- package/lib/Types/LabelAssociation.js +2 -2
- package/lib/Types/Message.js +6 -6
- package/lib/Types/MexUpdates.js +5 -4
- package/lib/Types/State.js +4 -4
- package/lib/Types/index.js +28 -12
- package/lib/Utils/auth-utils.js +28 -26
- package/lib/Utils/baileys-event-stream.js +68 -69
- package/lib/Utils/business.js +63 -53
- package/lib/Utils/chat-utils.js +81 -71
- package/lib/Utils/crypto.js +25 -45
- package/lib/Utils/decode-wa-message.js +319 -311
- package/lib/Utils/event-buffer.js +21 -22
- package/lib/Utils/generics.js +103 -73
- package/lib/Utils/history.js +21 -21
- package/lib/Utils/index.js +27 -13
- package/lib/Utils/link-preview.js +7 -30
- package/lib/Utils/logger.js +5 -5
- package/lib/Utils/lt-hash.js +3 -3
- package/lib/Utils/message-retry-manager.js +4 -4
- package/lib/Utils/messages-media.js +104 -109
- package/lib/Utils/messages.js +203 -171
- package/lib/Utils/noise-handler.js +28 -19
- package/lib/Utils/process-message.js +370 -136
- package/lib/Utils/signal.js +36 -25
- package/lib/Utils/use-multi-file-auth-state.js +18 -22
- package/lib/Utils/validate-connection.js +52 -45
- package/lib/WABinary/decode.js +6 -32
- package/lib/WABinary/encode.js +3 -29
- package/lib/WABinary/generic-utils.js +4 -4
- package/lib/WABinary/index.js +27 -11
- package/lib/WAM/encode.js +16 -8
- package/lib/WAM/index.js +27 -11
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
- package/lib/WAUSync/Protocols/index.js +27 -11
- package/lib/WAUSync/USyncQuery.js +17 -10
- package/lib/WAUSync/index.js +27 -11
- package/lib/index.js +62 -37
- package/package.json +1 -1
- package/WAProto/index.d.ts +0 -55
- package/lib/index.d.ts +0 -13
|
@@ -27,6 +27,9 @@ $root.DeviceCapabilities = (function() {
|
|
|
27
27
|
* @property {DeviceCapabilities.DeviceCapabilities.ChatLockSupportLevel|null} [chatLockSupportLevel] DeviceCapabilities chatLockSupportLevel
|
|
28
28
|
* @property {DeviceCapabilities.DeviceCapabilities.ILIDMigration|null} [lidMigration] DeviceCapabilities lidMigration
|
|
29
29
|
* @property {DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast|null} [businessBroadcast] DeviceCapabilities businessBroadcast
|
|
30
|
+
* @property {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar|null} [userHasAvatar] DeviceCapabilities userHasAvatar
|
|
31
|
+
* @property {DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport|null} [memberNameTagPrimarySupport] DeviceCapabilities memberNameTagPrimarySupport
|
|
32
|
+
* @property {DeviceCapabilities.DeviceCapabilities.IAiThread|null} [aiThread] DeviceCapabilities aiThread
|
|
30
33
|
*/
|
|
31
34
|
|
|
32
35
|
/**
|
|
@@ -68,6 +71,30 @@ $root.DeviceCapabilities = (function() {
|
|
|
68
71
|
*/
|
|
69
72
|
DeviceCapabilities.prototype.businessBroadcast = null;
|
|
70
73
|
|
|
74
|
+
/**
|
|
75
|
+
* DeviceCapabilities userHasAvatar.
|
|
76
|
+
* @member {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar|null|undefined} userHasAvatar
|
|
77
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
78
|
+
* @instance
|
|
79
|
+
*/
|
|
80
|
+
DeviceCapabilities.prototype.userHasAvatar = null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* DeviceCapabilities memberNameTagPrimarySupport.
|
|
84
|
+
* @member {DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport|null|undefined} memberNameTagPrimarySupport
|
|
85
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
86
|
+
* @instance
|
|
87
|
+
*/
|
|
88
|
+
DeviceCapabilities.prototype.memberNameTagPrimarySupport = null;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* DeviceCapabilities aiThread.
|
|
92
|
+
* @member {DeviceCapabilities.DeviceCapabilities.IAiThread|null|undefined} aiThread
|
|
93
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
94
|
+
* @instance
|
|
95
|
+
*/
|
|
96
|
+
DeviceCapabilities.prototype.aiThread = null;
|
|
97
|
+
|
|
71
98
|
// OneOf field names bound to virtual getters and setters
|
|
72
99
|
var $oneOfFields;
|
|
73
100
|
|
|
@@ -104,6 +131,39 @@ $root.DeviceCapabilities = (function() {
|
|
|
104
131
|
set: $util.oneOfSetter($oneOfFields)
|
|
105
132
|
});
|
|
106
133
|
|
|
134
|
+
/**
|
|
135
|
+
* DeviceCapabilities _userHasAvatar.
|
|
136
|
+
* @member {"userHasAvatar"|undefined} _userHasAvatar
|
|
137
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
138
|
+
* @instance
|
|
139
|
+
*/
|
|
140
|
+
Object.defineProperty(DeviceCapabilities.prototype, "_userHasAvatar", {
|
|
141
|
+
get: $util.oneOfGetter($oneOfFields = ["userHasAvatar"]),
|
|
142
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* DeviceCapabilities _memberNameTagPrimarySupport.
|
|
147
|
+
* @member {"memberNameTagPrimarySupport"|undefined} _memberNameTagPrimarySupport
|
|
148
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
149
|
+
* @instance
|
|
150
|
+
*/
|
|
151
|
+
Object.defineProperty(DeviceCapabilities.prototype, "_memberNameTagPrimarySupport", {
|
|
152
|
+
get: $util.oneOfGetter($oneOfFields = ["memberNameTagPrimarySupport"]),
|
|
153
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* DeviceCapabilities _aiThread.
|
|
158
|
+
* @member {"aiThread"|undefined} _aiThread
|
|
159
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
160
|
+
* @instance
|
|
161
|
+
*/
|
|
162
|
+
Object.defineProperty(DeviceCapabilities.prototype, "_aiThread", {
|
|
163
|
+
get: $util.oneOfGetter($oneOfFields = ["aiThread"]),
|
|
164
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
165
|
+
});
|
|
166
|
+
|
|
107
167
|
/**
|
|
108
168
|
* Creates a new DeviceCapabilities instance using the specified properties.
|
|
109
169
|
* @function create
|
|
@@ -134,6 +194,12 @@ $root.DeviceCapabilities = (function() {
|
|
|
134
194
|
$root.DeviceCapabilities.DeviceCapabilities.LIDMigration.encode(message.lidMigration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
135
195
|
if (message.businessBroadcast != null && Object.hasOwnProperty.call(message, "businessBroadcast"))
|
|
136
196
|
$root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.encode(message.businessBroadcast, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
197
|
+
if (message.userHasAvatar != null && Object.hasOwnProperty.call(message, "userHasAvatar"))
|
|
198
|
+
$root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.encode(message.userHasAvatar, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
199
|
+
if (message.memberNameTagPrimarySupport != null && Object.hasOwnProperty.call(message, "memberNameTagPrimarySupport"))
|
|
200
|
+
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.memberNameTagPrimarySupport);
|
|
201
|
+
if (message.aiThread != null && Object.hasOwnProperty.call(message, "aiThread"))
|
|
202
|
+
$root.DeviceCapabilities.DeviceCapabilities.AiThread.encode(message.aiThread, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
137
203
|
return writer;
|
|
138
204
|
};
|
|
139
205
|
|
|
@@ -182,6 +248,18 @@ $root.DeviceCapabilities = (function() {
|
|
|
182
248
|
message.businessBroadcast = $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.decode(reader, reader.uint32());
|
|
183
249
|
break;
|
|
184
250
|
}
|
|
251
|
+
case 4: {
|
|
252
|
+
message.userHasAvatar = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.decode(reader, reader.uint32());
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
case 5: {
|
|
256
|
+
message.memberNameTagPrimarySupport = reader.int32();
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
case 6: {
|
|
260
|
+
message.aiThread = $root.DeviceCapabilities.DeviceCapabilities.AiThread.decode(reader, reader.uint32());
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
185
263
|
default:
|
|
186
264
|
reader.skipType(tag & 7);
|
|
187
265
|
break;
|
|
@@ -245,6 +323,33 @@ $root.DeviceCapabilities = (function() {
|
|
|
245
323
|
return "businessBroadcast." + error;
|
|
246
324
|
}
|
|
247
325
|
}
|
|
326
|
+
if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar")) {
|
|
327
|
+
properties._userHasAvatar = 1;
|
|
328
|
+
{
|
|
329
|
+
var error = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify(message.userHasAvatar);
|
|
330
|
+
if (error)
|
|
331
|
+
return "userHasAvatar." + error;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (message.memberNameTagPrimarySupport != null && message.hasOwnProperty("memberNameTagPrimarySupport")) {
|
|
335
|
+
properties._memberNameTagPrimarySupport = 1;
|
|
336
|
+
switch (message.memberNameTagPrimarySupport) {
|
|
337
|
+
default:
|
|
338
|
+
return "memberNameTagPrimarySupport: enum value expected";
|
|
339
|
+
case 0:
|
|
340
|
+
case 1:
|
|
341
|
+
case 2:
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (message.aiThread != null && message.hasOwnProperty("aiThread")) {
|
|
346
|
+
properties._aiThread = 1;
|
|
347
|
+
{
|
|
348
|
+
var error = $root.DeviceCapabilities.DeviceCapabilities.AiThread.verify(message.aiThread);
|
|
349
|
+
if (error)
|
|
350
|
+
return "aiThread." + error;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
248
353
|
return null;
|
|
249
354
|
};
|
|
250
355
|
|
|
@@ -290,6 +395,36 @@ $root.DeviceCapabilities = (function() {
|
|
|
290
395
|
throw TypeError(".DeviceCapabilities.DeviceCapabilities.businessBroadcast: object expected");
|
|
291
396
|
message.businessBroadcast = $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.fromObject(object.businessBroadcast);
|
|
292
397
|
}
|
|
398
|
+
if (object.userHasAvatar != null) {
|
|
399
|
+
if (typeof object.userHasAvatar !== "object")
|
|
400
|
+
throw TypeError(".DeviceCapabilities.DeviceCapabilities.userHasAvatar: object expected");
|
|
401
|
+
message.userHasAvatar = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.fromObject(object.userHasAvatar);
|
|
402
|
+
}
|
|
403
|
+
switch (object.memberNameTagPrimarySupport) {
|
|
404
|
+
default:
|
|
405
|
+
if (typeof object.memberNameTagPrimarySupport === "number") {
|
|
406
|
+
message.memberNameTagPrimarySupport = object.memberNameTagPrimarySupport;
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
break;
|
|
410
|
+
case "DISABLED":
|
|
411
|
+
case 0:
|
|
412
|
+
message.memberNameTagPrimarySupport = 0;
|
|
413
|
+
break;
|
|
414
|
+
case "RECEIVER_ENABLED":
|
|
415
|
+
case 1:
|
|
416
|
+
message.memberNameTagPrimarySupport = 1;
|
|
417
|
+
break;
|
|
418
|
+
case "SENDER_ENABLED":
|
|
419
|
+
case 2:
|
|
420
|
+
message.memberNameTagPrimarySupport = 2;
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
if (object.aiThread != null) {
|
|
424
|
+
if (typeof object.aiThread !== "object")
|
|
425
|
+
throw TypeError(".DeviceCapabilities.DeviceCapabilities.aiThread: object expected");
|
|
426
|
+
message.aiThread = $root.DeviceCapabilities.DeviceCapabilities.AiThread.fromObject(object.aiThread);
|
|
427
|
+
}
|
|
293
428
|
return message;
|
|
294
429
|
};
|
|
295
430
|
|
|
@@ -321,6 +456,21 @@ $root.DeviceCapabilities = (function() {
|
|
|
321
456
|
if (options.oneofs)
|
|
322
457
|
object._businessBroadcast = "businessBroadcast";
|
|
323
458
|
}
|
|
459
|
+
if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar")) {
|
|
460
|
+
object.userHasAvatar = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.toObject(message.userHasAvatar, options);
|
|
461
|
+
if (options.oneofs)
|
|
462
|
+
object._userHasAvatar = "userHasAvatar";
|
|
463
|
+
}
|
|
464
|
+
if (message.memberNameTagPrimarySupport != null && message.hasOwnProperty("memberNameTagPrimarySupport")) {
|
|
465
|
+
object.memberNameTagPrimarySupport = options.enums === String ? $root.DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport[message.memberNameTagPrimarySupport] === undefined ? message.memberNameTagPrimarySupport : $root.DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport[message.memberNameTagPrimarySupport] : message.memberNameTagPrimarySupport;
|
|
466
|
+
if (options.oneofs)
|
|
467
|
+
object._memberNameTagPrimarySupport = "memberNameTagPrimarySupport";
|
|
468
|
+
}
|
|
469
|
+
if (message.aiThread != null && message.hasOwnProperty("aiThread")) {
|
|
470
|
+
object.aiThread = $root.DeviceCapabilities.DeviceCapabilities.AiThread.toObject(message.aiThread, options);
|
|
471
|
+
if (options.oneofs)
|
|
472
|
+
object._aiThread = "aiThread";
|
|
473
|
+
}
|
|
324
474
|
return object;
|
|
325
475
|
};
|
|
326
476
|
|
|
@@ -350,6 +500,269 @@ $root.DeviceCapabilities = (function() {
|
|
|
350
500
|
return typeUrlPrefix + "/DeviceCapabilities.DeviceCapabilities";
|
|
351
501
|
};
|
|
352
502
|
|
|
503
|
+
DeviceCapabilities.AiThread = (function() {
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Properties of an AiThread.
|
|
507
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
508
|
+
* @interface IAiThread
|
|
509
|
+
* @property {DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel|null} [supportLevel] AiThread supportLevel
|
|
510
|
+
*/
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Constructs a new AiThread.
|
|
514
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
515
|
+
* @classdesc Represents an AiThread.
|
|
516
|
+
* @implements IAiThread
|
|
517
|
+
* @constructor
|
|
518
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IAiThread=} [properties] Properties to set
|
|
519
|
+
*/
|
|
520
|
+
function AiThread(properties) {
|
|
521
|
+
if (properties)
|
|
522
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
523
|
+
if (properties[keys[i]] != null)
|
|
524
|
+
this[keys[i]] = properties[keys[i]];
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* AiThread supportLevel.
|
|
529
|
+
* @member {DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel|null|undefined} supportLevel
|
|
530
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
531
|
+
* @instance
|
|
532
|
+
*/
|
|
533
|
+
AiThread.prototype.supportLevel = null;
|
|
534
|
+
|
|
535
|
+
// OneOf field names bound to virtual getters and setters
|
|
536
|
+
var $oneOfFields;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* AiThread _supportLevel.
|
|
540
|
+
* @member {"supportLevel"|undefined} _supportLevel
|
|
541
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
542
|
+
* @instance
|
|
543
|
+
*/
|
|
544
|
+
Object.defineProperty(AiThread.prototype, "_supportLevel", {
|
|
545
|
+
get: $util.oneOfGetter($oneOfFields = ["supportLevel"]),
|
|
546
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Creates a new AiThread instance using the specified properties.
|
|
551
|
+
* @function create
|
|
552
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
553
|
+
* @static
|
|
554
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IAiThread=} [properties] Properties to set
|
|
555
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.AiThread} AiThread instance
|
|
556
|
+
*/
|
|
557
|
+
AiThread.create = function create(properties) {
|
|
558
|
+
return new AiThread(properties);
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Encodes the specified AiThread message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.AiThread.verify|verify} messages.
|
|
563
|
+
* @function encode
|
|
564
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
565
|
+
* @static
|
|
566
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IAiThread} message AiThread message or plain object to encode
|
|
567
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
568
|
+
* @returns {$protobuf.Writer} Writer
|
|
569
|
+
*/
|
|
570
|
+
AiThread.encode = function encode(message, writer) {
|
|
571
|
+
if (!writer)
|
|
572
|
+
writer = $Writer.create();
|
|
573
|
+
if (message.supportLevel != null && Object.hasOwnProperty.call(message, "supportLevel"))
|
|
574
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.supportLevel);
|
|
575
|
+
return writer;
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Encodes the specified AiThread message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.AiThread.verify|verify} messages.
|
|
580
|
+
* @function encodeDelimited
|
|
581
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
582
|
+
* @static
|
|
583
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IAiThread} message AiThread message or plain object to encode
|
|
584
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
585
|
+
* @returns {$protobuf.Writer} Writer
|
|
586
|
+
*/
|
|
587
|
+
AiThread.encodeDelimited = function encodeDelimited(message, writer) {
|
|
588
|
+
return this.encode(message, writer).ldelim();
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Decodes an AiThread message from the specified reader or buffer.
|
|
593
|
+
* @function decode
|
|
594
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
595
|
+
* @static
|
|
596
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
597
|
+
* @param {number} [length] Message length if known beforehand
|
|
598
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.AiThread} AiThread
|
|
599
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
600
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
601
|
+
*/
|
|
602
|
+
AiThread.decode = function decode(reader, length, error) {
|
|
603
|
+
if (!(reader instanceof $Reader))
|
|
604
|
+
reader = $Reader.create(reader);
|
|
605
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeviceCapabilities.DeviceCapabilities.AiThread();
|
|
606
|
+
while (reader.pos < end) {
|
|
607
|
+
var tag = reader.uint32();
|
|
608
|
+
if (tag === error)
|
|
609
|
+
break;
|
|
610
|
+
switch (tag >>> 3) {
|
|
611
|
+
case 1: {
|
|
612
|
+
message.supportLevel = reader.int32();
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
default:
|
|
616
|
+
reader.skipType(tag & 7);
|
|
617
|
+
break;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return message;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Decodes an AiThread message from the specified reader or buffer, length delimited.
|
|
625
|
+
* @function decodeDelimited
|
|
626
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
627
|
+
* @static
|
|
628
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
629
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.AiThread} AiThread
|
|
630
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
631
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
632
|
+
*/
|
|
633
|
+
AiThread.decodeDelimited = function decodeDelimited(reader) {
|
|
634
|
+
if (!(reader instanceof $Reader))
|
|
635
|
+
reader = new $Reader(reader);
|
|
636
|
+
return this.decode(reader, reader.uint32());
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Verifies an AiThread message.
|
|
641
|
+
* @function verify
|
|
642
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
643
|
+
* @static
|
|
644
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
645
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
646
|
+
*/
|
|
647
|
+
AiThread.verify = function verify(message) {
|
|
648
|
+
if (typeof message !== "object" || message === null)
|
|
649
|
+
return "object expected";
|
|
650
|
+
var properties = {};
|
|
651
|
+
if (message.supportLevel != null && message.hasOwnProperty("supportLevel")) {
|
|
652
|
+
properties._supportLevel = 1;
|
|
653
|
+
switch (message.supportLevel) {
|
|
654
|
+
default:
|
|
655
|
+
return "supportLevel: enum value expected";
|
|
656
|
+
case 0:
|
|
657
|
+
case 1:
|
|
658
|
+
case 2:
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
return null;
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Creates an AiThread message from a plain object. Also converts values to their respective internal types.
|
|
667
|
+
* @function fromObject
|
|
668
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
669
|
+
* @static
|
|
670
|
+
* @param {Object.<string,*>} object Plain object
|
|
671
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.AiThread} AiThread
|
|
672
|
+
*/
|
|
673
|
+
AiThread.fromObject = function fromObject(object) {
|
|
674
|
+
if (object instanceof $root.DeviceCapabilities.DeviceCapabilities.AiThread)
|
|
675
|
+
return object;
|
|
676
|
+
var message = new $root.DeviceCapabilities.DeviceCapabilities.AiThread();
|
|
677
|
+
switch (object.supportLevel) {
|
|
678
|
+
default:
|
|
679
|
+
if (typeof object.supportLevel === "number") {
|
|
680
|
+
message.supportLevel = object.supportLevel;
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
break;
|
|
684
|
+
case "NONE":
|
|
685
|
+
case 0:
|
|
686
|
+
message.supportLevel = 0;
|
|
687
|
+
break;
|
|
688
|
+
case "INFRA":
|
|
689
|
+
case 1:
|
|
690
|
+
message.supportLevel = 1;
|
|
691
|
+
break;
|
|
692
|
+
case "FULL":
|
|
693
|
+
case 2:
|
|
694
|
+
message.supportLevel = 2;
|
|
695
|
+
break;
|
|
696
|
+
}
|
|
697
|
+
return message;
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Creates a plain object from an AiThread message. Also converts values to other types if specified.
|
|
702
|
+
* @function toObject
|
|
703
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
704
|
+
* @static
|
|
705
|
+
* @param {DeviceCapabilities.DeviceCapabilities.AiThread} message AiThread
|
|
706
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
707
|
+
* @returns {Object.<string,*>} Plain object
|
|
708
|
+
*/
|
|
709
|
+
AiThread.toObject = function toObject(message, options) {
|
|
710
|
+
if (!options)
|
|
711
|
+
options = {};
|
|
712
|
+
var object = {};
|
|
713
|
+
if (message.supportLevel != null && message.hasOwnProperty("supportLevel")) {
|
|
714
|
+
object.supportLevel = options.enums === String ? $root.DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel[message.supportLevel] === undefined ? message.supportLevel : $root.DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel[message.supportLevel] : message.supportLevel;
|
|
715
|
+
if (options.oneofs)
|
|
716
|
+
object._supportLevel = "supportLevel";
|
|
717
|
+
}
|
|
718
|
+
return object;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Converts this AiThread to JSON.
|
|
723
|
+
* @function toJSON
|
|
724
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
725
|
+
* @instance
|
|
726
|
+
* @returns {Object.<string,*>} JSON object
|
|
727
|
+
*/
|
|
728
|
+
AiThread.prototype.toJSON = function toJSON() {
|
|
729
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
730
|
+
};
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Gets the default type url for AiThread
|
|
734
|
+
* @function getTypeUrl
|
|
735
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.AiThread
|
|
736
|
+
* @static
|
|
737
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
738
|
+
* @returns {string} The default type url
|
|
739
|
+
*/
|
|
740
|
+
AiThread.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
741
|
+
if (typeUrlPrefix === undefined) {
|
|
742
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
743
|
+
}
|
|
744
|
+
return typeUrlPrefix + "/DeviceCapabilities.DeviceCapabilities.AiThread";
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* SupportLevel enum.
|
|
749
|
+
* @name DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel
|
|
750
|
+
* @enum {number}
|
|
751
|
+
* @property {number} NONE=0 NONE value
|
|
752
|
+
* @property {number} INFRA=1 INFRA value
|
|
753
|
+
* @property {number} FULL=2 FULL value
|
|
754
|
+
*/
|
|
755
|
+
AiThread.SupportLevel = (function() {
|
|
756
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
757
|
+
values[valuesById[0] = "NONE"] = 0;
|
|
758
|
+
values[valuesById[1] = "INFRA"] = 1;
|
|
759
|
+
values[valuesById[2] = "FULL"] = 2;
|
|
760
|
+
return values;
|
|
761
|
+
})();
|
|
762
|
+
|
|
763
|
+
return AiThread;
|
|
764
|
+
})();
|
|
765
|
+
|
|
353
766
|
DeviceCapabilities.BusinessBroadcast = (function() {
|
|
354
767
|
|
|
355
768
|
/**
|
|
@@ -822,6 +1235,245 @@ $root.DeviceCapabilities = (function() {
|
|
|
822
1235
|
return LIDMigration;
|
|
823
1236
|
})();
|
|
824
1237
|
|
|
1238
|
+
/**
|
|
1239
|
+
* MemberNameTagPrimarySupport enum.
|
|
1240
|
+
* @name DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport
|
|
1241
|
+
* @enum {number}
|
|
1242
|
+
* @property {number} DISABLED=0 DISABLED value
|
|
1243
|
+
* @property {number} RECEIVER_ENABLED=1 RECEIVER_ENABLED value
|
|
1244
|
+
* @property {number} SENDER_ENABLED=2 SENDER_ENABLED value
|
|
1245
|
+
*/
|
|
1246
|
+
DeviceCapabilities.MemberNameTagPrimarySupport = (function() {
|
|
1247
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
1248
|
+
values[valuesById[0] = "DISABLED"] = 0;
|
|
1249
|
+
values[valuesById[1] = "RECEIVER_ENABLED"] = 1;
|
|
1250
|
+
values[valuesById[2] = "SENDER_ENABLED"] = 2;
|
|
1251
|
+
return values;
|
|
1252
|
+
})();
|
|
1253
|
+
|
|
1254
|
+
DeviceCapabilities.UserHasAvatar = (function() {
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Properties of a UserHasAvatar.
|
|
1258
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
1259
|
+
* @interface IUserHasAvatar
|
|
1260
|
+
* @property {boolean|null} [userHasAvatar] UserHasAvatar userHasAvatar
|
|
1261
|
+
*/
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Constructs a new UserHasAvatar.
|
|
1265
|
+
* @memberof DeviceCapabilities.DeviceCapabilities
|
|
1266
|
+
* @classdesc Represents a UserHasAvatar.
|
|
1267
|
+
* @implements IUserHasAvatar
|
|
1268
|
+
* @constructor
|
|
1269
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar=} [properties] Properties to set
|
|
1270
|
+
*/
|
|
1271
|
+
function UserHasAvatar(properties) {
|
|
1272
|
+
if (properties)
|
|
1273
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1274
|
+
if (properties[keys[i]] != null)
|
|
1275
|
+
this[keys[i]] = properties[keys[i]];
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* UserHasAvatar userHasAvatar.
|
|
1280
|
+
* @member {boolean|null|undefined} userHasAvatar
|
|
1281
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1282
|
+
* @instance
|
|
1283
|
+
*/
|
|
1284
|
+
UserHasAvatar.prototype.userHasAvatar = null;
|
|
1285
|
+
|
|
1286
|
+
// OneOf field names bound to virtual getters and setters
|
|
1287
|
+
var $oneOfFields;
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* UserHasAvatar _userHasAvatar.
|
|
1291
|
+
* @member {"userHasAvatar"|undefined} _userHasAvatar
|
|
1292
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1293
|
+
* @instance
|
|
1294
|
+
*/
|
|
1295
|
+
Object.defineProperty(UserHasAvatar.prototype, "_userHasAvatar", {
|
|
1296
|
+
get: $util.oneOfGetter($oneOfFields = ["userHasAvatar"]),
|
|
1297
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* Creates a new UserHasAvatar instance using the specified properties.
|
|
1302
|
+
* @function create
|
|
1303
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1304
|
+
* @static
|
|
1305
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar=} [properties] Properties to set
|
|
1306
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar instance
|
|
1307
|
+
*/
|
|
1308
|
+
UserHasAvatar.create = function create(properties) {
|
|
1309
|
+
return new UserHasAvatar(properties);
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Encodes the specified UserHasAvatar message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify|verify} messages.
|
|
1314
|
+
* @function encode
|
|
1315
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1316
|
+
* @static
|
|
1317
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar} message UserHasAvatar message or plain object to encode
|
|
1318
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1319
|
+
* @returns {$protobuf.Writer} Writer
|
|
1320
|
+
*/
|
|
1321
|
+
UserHasAvatar.encode = function encode(message, writer) {
|
|
1322
|
+
if (!writer)
|
|
1323
|
+
writer = $Writer.create();
|
|
1324
|
+
if (message.userHasAvatar != null && Object.hasOwnProperty.call(message, "userHasAvatar"))
|
|
1325
|
+
writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userHasAvatar);
|
|
1326
|
+
return writer;
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Encodes the specified UserHasAvatar message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify|verify} messages.
|
|
1331
|
+
* @function encodeDelimited
|
|
1332
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1333
|
+
* @static
|
|
1334
|
+
* @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar} message UserHasAvatar message or plain object to encode
|
|
1335
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1336
|
+
* @returns {$protobuf.Writer} Writer
|
|
1337
|
+
*/
|
|
1338
|
+
UserHasAvatar.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1339
|
+
return this.encode(message, writer).ldelim();
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Decodes a UserHasAvatar message from the specified reader or buffer.
|
|
1344
|
+
* @function decode
|
|
1345
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1346
|
+
* @static
|
|
1347
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1348
|
+
* @param {number} [length] Message length if known beforehand
|
|
1349
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar
|
|
1350
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1351
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1352
|
+
*/
|
|
1353
|
+
UserHasAvatar.decode = function decode(reader, length, error) {
|
|
1354
|
+
if (!(reader instanceof $Reader))
|
|
1355
|
+
reader = $Reader.create(reader);
|
|
1356
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar();
|
|
1357
|
+
while (reader.pos < end) {
|
|
1358
|
+
var tag = reader.uint32();
|
|
1359
|
+
if (tag === error)
|
|
1360
|
+
break;
|
|
1361
|
+
switch (tag >>> 3) {
|
|
1362
|
+
case 1: {
|
|
1363
|
+
message.userHasAvatar = reader.bool();
|
|
1364
|
+
break;
|
|
1365
|
+
}
|
|
1366
|
+
default:
|
|
1367
|
+
reader.skipType(tag & 7);
|
|
1368
|
+
break;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
return message;
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Decodes a UserHasAvatar message from the specified reader or buffer, length delimited.
|
|
1376
|
+
* @function decodeDelimited
|
|
1377
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1378
|
+
* @static
|
|
1379
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1380
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar
|
|
1381
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1382
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1383
|
+
*/
|
|
1384
|
+
UserHasAvatar.decodeDelimited = function decodeDelimited(reader) {
|
|
1385
|
+
if (!(reader instanceof $Reader))
|
|
1386
|
+
reader = new $Reader(reader);
|
|
1387
|
+
return this.decode(reader, reader.uint32());
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Verifies a UserHasAvatar message.
|
|
1392
|
+
* @function verify
|
|
1393
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1394
|
+
* @static
|
|
1395
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
1396
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
1397
|
+
*/
|
|
1398
|
+
UserHasAvatar.verify = function verify(message) {
|
|
1399
|
+
if (typeof message !== "object" || message === null)
|
|
1400
|
+
return "object expected";
|
|
1401
|
+
var properties = {};
|
|
1402
|
+
if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar")) {
|
|
1403
|
+
properties._userHasAvatar = 1;
|
|
1404
|
+
if (typeof message.userHasAvatar !== "boolean")
|
|
1405
|
+
return "userHasAvatar: boolean expected";
|
|
1406
|
+
}
|
|
1407
|
+
return null;
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Creates a UserHasAvatar message from a plain object. Also converts values to their respective internal types.
|
|
1412
|
+
* @function fromObject
|
|
1413
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1414
|
+
* @static
|
|
1415
|
+
* @param {Object.<string,*>} object Plain object
|
|
1416
|
+
* @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar
|
|
1417
|
+
*/
|
|
1418
|
+
UserHasAvatar.fromObject = function fromObject(object) {
|
|
1419
|
+
if (object instanceof $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar)
|
|
1420
|
+
return object;
|
|
1421
|
+
var message = new $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar();
|
|
1422
|
+
if (object.userHasAvatar != null)
|
|
1423
|
+
message.userHasAvatar = Boolean(object.userHasAvatar);
|
|
1424
|
+
return message;
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Creates a plain object from a UserHasAvatar message. Also converts values to other types if specified.
|
|
1429
|
+
* @function toObject
|
|
1430
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1431
|
+
* @static
|
|
1432
|
+
* @param {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} message UserHasAvatar
|
|
1433
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1434
|
+
* @returns {Object.<string,*>} Plain object
|
|
1435
|
+
*/
|
|
1436
|
+
UserHasAvatar.toObject = function toObject(message, options) {
|
|
1437
|
+
if (!options)
|
|
1438
|
+
options = {};
|
|
1439
|
+
var object = {};
|
|
1440
|
+
if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar")) {
|
|
1441
|
+
object.userHasAvatar = message.userHasAvatar;
|
|
1442
|
+
if (options.oneofs)
|
|
1443
|
+
object._userHasAvatar = "userHasAvatar";
|
|
1444
|
+
}
|
|
1445
|
+
return object;
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Converts this UserHasAvatar to JSON.
|
|
1450
|
+
* @function toJSON
|
|
1451
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1452
|
+
* @instance
|
|
1453
|
+
* @returns {Object.<string,*>} JSON object
|
|
1454
|
+
*/
|
|
1455
|
+
UserHasAvatar.prototype.toJSON = function toJSON() {
|
|
1456
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1457
|
+
};
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* Gets the default type url for UserHasAvatar
|
|
1461
|
+
* @function getTypeUrl
|
|
1462
|
+
* @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
|
|
1463
|
+
* @static
|
|
1464
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1465
|
+
* @returns {string} The default type url
|
|
1466
|
+
*/
|
|
1467
|
+
UserHasAvatar.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1468
|
+
if (typeUrlPrefix === undefined) {
|
|
1469
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1470
|
+
}
|
|
1471
|
+
return typeUrlPrefix + "/DeviceCapabilities.DeviceCapabilities.UserHasAvatar";
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
return UserHasAvatar;
|
|
1475
|
+
})();
|
|
1476
|
+
|
|
825
1477
|
return DeviceCapabilities;
|
|
826
1478
|
})();
|
|
827
1479
|
|