@onyx-p/imlib-web 2.7.8 → 2.8.1
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/index.esm.js +591 -7
- package/index.umd.js +592 -6
- package/package.json +1 -1
- package/types/index.d.ts +9 -0
package/index.esm.js
CHANGED
|
@@ -22496,8 +22496,9 @@ class MessageCache {
|
|
|
22496
22496
|
}
|
|
22497
22497
|
return decryptedMessage;
|
|
22498
22498
|
}
|
|
22499
|
-
async addMessages(
|
|
22500
|
-
messages =
|
|
22499
|
+
async addMessages(originalMessages, toConversation, isEnd = undefined) {
|
|
22500
|
+
let messages = originalMessages?.filter(message => message.isPersited);
|
|
22501
|
+
logger$1.info('addMessages to db -> ', messages);
|
|
22501
22502
|
if (!messages || messages.length === 0 || !this.db) {
|
|
22502
22503
|
if (isDef(isEnd)) {
|
|
22503
22504
|
const dialogId = getFullDialogId(toConversation);
|
|
@@ -23182,8 +23183,11 @@ class MessageLoader {
|
|
|
23182
23183
|
await MessageCache$1.get()?.convertToRecallMessages(recallMessageUIds);
|
|
23183
23184
|
this.watcher.onRecall?.(recallMessageUIds);
|
|
23184
23185
|
}
|
|
23185
|
-
const
|
|
23186
|
-
|
|
23186
|
+
const existsPersitedMessage = messageList.some(m => m.isPersited);
|
|
23187
|
+
if (existsPersitedMessage) {
|
|
23188
|
+
const latestMessage = await MessageCache$1.get()?.getLatestMessage(conversation);
|
|
23189
|
+
ConversationManager$1.get().updateLatestMessage(conversation, latestMessage);
|
|
23190
|
+
}
|
|
23187
23191
|
}
|
|
23188
23192
|
handleBurnAfterReadingMessage(message) {
|
|
23189
23193
|
const content = message.content;
|
|
@@ -23310,7 +23314,7 @@ const GroupCloseBurnAfterReadingMessage = registerMessageType$1(NotiMessageTypes
|
|
|
23310
23314
|
|
|
23311
23315
|
const RecallCommandMessage = registerMessageType$1(MessageTypes.RECALL, true, false, false);
|
|
23312
23316
|
|
|
23313
|
-
const DEFAULT_SOCKET_URI = 'wss://test.
|
|
23317
|
+
const DEFAULT_SOCKET_URI = 'wss://test.gametalk.ai';
|
|
23314
23318
|
class LibLoader {
|
|
23315
23319
|
options;
|
|
23316
23320
|
connectionStatus = ConnectionStatus.DISCONNECTED;
|
|
@@ -32348,9 +32352,563 @@ $root.User = (() => {
|
|
|
32348
32352
|
};
|
|
32349
32353
|
return User;
|
|
32350
32354
|
})();
|
|
32355
|
+
const WebGetLoginCodeReq = $root.WebGetLoginCodeReq = (() => {
|
|
32356
|
+
/**
|
|
32357
|
+
* Properties of a WebGetLoginCodeReq.
|
|
32358
|
+
* @exports IWebGetLoginCodeReq
|
|
32359
|
+
* @interface IWebGetLoginCodeReq
|
|
32360
|
+
* @property {string|null} [account] WebGetLoginCodeReq account
|
|
32361
|
+
* @property {string|null} [langCode] WebGetLoginCodeReq langCode
|
|
32362
|
+
*/
|
|
32363
|
+
|
|
32364
|
+
/**
|
|
32365
|
+
* Constructs a new WebGetLoginCodeReq.
|
|
32366
|
+
* @exports WebGetLoginCodeReq
|
|
32367
|
+
* @classdesc Represents a WebGetLoginCodeReq.
|
|
32368
|
+
* @implements IWebGetLoginCodeReq
|
|
32369
|
+
* @constructor
|
|
32370
|
+
* @param {IWebGetLoginCodeReq=} [properties] Properties to set
|
|
32371
|
+
*/
|
|
32372
|
+
function WebGetLoginCodeReq(properties) {
|
|
32373
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32374
|
+
}
|
|
32375
|
+
|
|
32376
|
+
/**
|
|
32377
|
+
* WebGetLoginCodeReq account.
|
|
32378
|
+
* @member {string} account
|
|
32379
|
+
* @memberof WebGetLoginCodeReq
|
|
32380
|
+
* @instance
|
|
32381
|
+
*/
|
|
32382
|
+
WebGetLoginCodeReq.prototype.account = "";
|
|
32383
|
+
|
|
32384
|
+
/**
|
|
32385
|
+
* WebGetLoginCodeReq langCode.
|
|
32386
|
+
* @member {string} langCode
|
|
32387
|
+
* @memberof WebGetLoginCodeReq
|
|
32388
|
+
* @instance
|
|
32389
|
+
*/
|
|
32390
|
+
WebGetLoginCodeReq.prototype.langCode = "";
|
|
32391
|
+
|
|
32392
|
+
/**
|
|
32393
|
+
* Encodes the specified WebGetLoginCodeReq message. Does not implicitly {@link WebGetLoginCodeReq.verify|verify} messages.
|
|
32394
|
+
* @function encode
|
|
32395
|
+
* @memberof WebGetLoginCodeReq
|
|
32396
|
+
* @static
|
|
32397
|
+
* @param {IWebGetLoginCodeReq} message WebGetLoginCodeReq message or plain object to encode
|
|
32398
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32399
|
+
* @returns {$protobuf.Writer} Writer
|
|
32400
|
+
*/
|
|
32401
|
+
WebGetLoginCodeReq.encode = function encode(message, writer) {
|
|
32402
|
+
if (!writer) writer = $Writer.create();
|
|
32403
|
+
if (message.account != null && Object.hasOwnProperty.call(message, "account")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
|
|
32404
|
+
if (message.langCode != null && Object.hasOwnProperty.call(message, "langCode")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.langCode);
|
|
32405
|
+
return writer;
|
|
32406
|
+
};
|
|
32407
|
+
|
|
32408
|
+
/**
|
|
32409
|
+
* Decodes a WebGetLoginCodeReq message from the specified reader or buffer.
|
|
32410
|
+
* @function decode
|
|
32411
|
+
* @memberof WebGetLoginCodeReq
|
|
32412
|
+
* @static
|
|
32413
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32414
|
+
* @param {number} [length] Message length if known beforehand
|
|
32415
|
+
* @returns {WebGetLoginCodeReq} WebGetLoginCodeReq
|
|
32416
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32417
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32418
|
+
*/
|
|
32419
|
+
WebGetLoginCodeReq.decode = function decode(reader, length) {
|
|
32420
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32421
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32422
|
+
message = new $root.WebGetLoginCodeReq();
|
|
32423
|
+
while (reader.pos < end) {
|
|
32424
|
+
let tag = reader.uint32();
|
|
32425
|
+
switch (tag >>> 3) {
|
|
32426
|
+
case 1:
|
|
32427
|
+
{
|
|
32428
|
+
message.account = reader.string();
|
|
32429
|
+
break;
|
|
32430
|
+
}
|
|
32431
|
+
case 2:
|
|
32432
|
+
{
|
|
32433
|
+
message.langCode = reader.string();
|
|
32434
|
+
break;
|
|
32435
|
+
}
|
|
32436
|
+
default:
|
|
32437
|
+
reader.skipType(tag & 7);
|
|
32438
|
+
break;
|
|
32439
|
+
}
|
|
32440
|
+
}
|
|
32441
|
+
return message;
|
|
32442
|
+
};
|
|
32443
|
+
|
|
32444
|
+
/**
|
|
32445
|
+
* Gets the default type url for WebGetLoginCodeReq
|
|
32446
|
+
* @function getTypeUrl
|
|
32447
|
+
* @memberof WebGetLoginCodeReq
|
|
32448
|
+
* @static
|
|
32449
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32450
|
+
* @returns {string} The default type url
|
|
32451
|
+
*/
|
|
32452
|
+
WebGetLoginCodeReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32453
|
+
if (typeUrlPrefix === undefined) {
|
|
32454
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32455
|
+
}
|
|
32456
|
+
return typeUrlPrefix + "/WebGetLoginCodeReq";
|
|
32457
|
+
};
|
|
32458
|
+
return WebGetLoginCodeReq;
|
|
32459
|
+
})();
|
|
32460
|
+
const WebGetLoginCodeResp = $root.WebGetLoginCodeResp = (() => {
|
|
32461
|
+
/**
|
|
32462
|
+
* Properties of a WebGetLoginCodeResp.
|
|
32463
|
+
* @exports IWebGetLoginCodeResp
|
|
32464
|
+
* @interface IWebGetLoginCodeResp
|
|
32465
|
+
* @property {number|null} [errorCode] WebGetLoginCodeResp errorCode
|
|
32466
|
+
* @property {string|null} [errorMessage] WebGetLoginCodeResp errorMessage
|
|
32467
|
+
*/
|
|
32468
|
+
|
|
32469
|
+
/**
|
|
32470
|
+
* Constructs a new WebGetLoginCodeResp.
|
|
32471
|
+
* @exports WebGetLoginCodeResp
|
|
32472
|
+
* @classdesc Represents a WebGetLoginCodeResp.
|
|
32473
|
+
* @implements IWebGetLoginCodeResp
|
|
32474
|
+
* @constructor
|
|
32475
|
+
* @param {IWebGetLoginCodeResp=} [properties] Properties to set
|
|
32476
|
+
*/
|
|
32477
|
+
function WebGetLoginCodeResp(properties) {
|
|
32478
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32479
|
+
}
|
|
32480
|
+
|
|
32481
|
+
/**
|
|
32482
|
+
* WebGetLoginCodeResp errorCode.
|
|
32483
|
+
* @member {number} errorCode
|
|
32484
|
+
* @memberof WebGetLoginCodeResp
|
|
32485
|
+
* @instance
|
|
32486
|
+
*/
|
|
32487
|
+
WebGetLoginCodeResp.prototype.errorCode = 0;
|
|
32488
|
+
|
|
32489
|
+
/**
|
|
32490
|
+
* WebGetLoginCodeResp errorMessage.
|
|
32491
|
+
* @member {string} errorMessage
|
|
32492
|
+
* @memberof WebGetLoginCodeResp
|
|
32493
|
+
* @instance
|
|
32494
|
+
*/
|
|
32495
|
+
WebGetLoginCodeResp.prototype.errorMessage = "";
|
|
32496
|
+
|
|
32497
|
+
/**
|
|
32498
|
+
* Encodes the specified WebGetLoginCodeResp message. Does not implicitly {@link WebGetLoginCodeResp.verify|verify} messages.
|
|
32499
|
+
* @function encode
|
|
32500
|
+
* @memberof WebGetLoginCodeResp
|
|
32501
|
+
* @static
|
|
32502
|
+
* @param {IWebGetLoginCodeResp} message WebGetLoginCodeResp message or plain object to encode
|
|
32503
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32504
|
+
* @returns {$protobuf.Writer} Writer
|
|
32505
|
+
*/
|
|
32506
|
+
WebGetLoginCodeResp.encode = function encode(message, writer) {
|
|
32507
|
+
if (!writer) writer = $Writer.create();
|
|
32508
|
+
if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorCode);
|
|
32509
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
|
|
32510
|
+
return writer;
|
|
32511
|
+
};
|
|
32512
|
+
|
|
32513
|
+
/**
|
|
32514
|
+
* Decodes a WebGetLoginCodeResp message from the specified reader or buffer.
|
|
32515
|
+
* @function decode
|
|
32516
|
+
* @memberof WebGetLoginCodeResp
|
|
32517
|
+
* @static
|
|
32518
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32519
|
+
* @param {number} [length] Message length if known beforehand
|
|
32520
|
+
* @returns {WebGetLoginCodeResp} WebGetLoginCodeResp
|
|
32521
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32522
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32523
|
+
*/
|
|
32524
|
+
WebGetLoginCodeResp.decode = function decode(reader, length) {
|
|
32525
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32526
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32527
|
+
message = new $root.WebGetLoginCodeResp();
|
|
32528
|
+
while (reader.pos < end) {
|
|
32529
|
+
let tag = reader.uint32();
|
|
32530
|
+
switch (tag >>> 3) {
|
|
32531
|
+
case 1:
|
|
32532
|
+
{
|
|
32533
|
+
message.errorCode = reader.int32();
|
|
32534
|
+
break;
|
|
32535
|
+
}
|
|
32536
|
+
case 2:
|
|
32537
|
+
{
|
|
32538
|
+
message.errorMessage = reader.string();
|
|
32539
|
+
break;
|
|
32540
|
+
}
|
|
32541
|
+
default:
|
|
32542
|
+
reader.skipType(tag & 7);
|
|
32543
|
+
break;
|
|
32544
|
+
}
|
|
32545
|
+
}
|
|
32546
|
+
return message;
|
|
32547
|
+
};
|
|
32548
|
+
|
|
32549
|
+
/**
|
|
32550
|
+
* Gets the default type url for WebGetLoginCodeResp
|
|
32551
|
+
* @function getTypeUrl
|
|
32552
|
+
* @memberof WebGetLoginCodeResp
|
|
32553
|
+
* @static
|
|
32554
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32555
|
+
* @returns {string} The default type url
|
|
32556
|
+
*/
|
|
32557
|
+
WebGetLoginCodeResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32558
|
+
if (typeUrlPrefix === undefined) {
|
|
32559
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32560
|
+
}
|
|
32561
|
+
return typeUrlPrefix + "/WebGetLoginCodeResp";
|
|
32562
|
+
};
|
|
32563
|
+
return WebGetLoginCodeResp;
|
|
32564
|
+
})();
|
|
32565
|
+
const WebGetLoginCodeVerifyReq = $root.WebGetLoginCodeVerifyReq = (() => {
|
|
32566
|
+
/**
|
|
32567
|
+
* Properties of a WebGetLoginCodeVerifyReq.
|
|
32568
|
+
* @exports IWebGetLoginCodeVerifyReq
|
|
32569
|
+
* @interface IWebGetLoginCodeVerifyReq
|
|
32570
|
+
* @property {string|null} [account] WebGetLoginCodeVerifyReq account
|
|
32571
|
+
* @property {string|null} [langCode] WebGetLoginCodeVerifyReq langCode
|
|
32572
|
+
* @property {string|null} [code] WebGetLoginCodeVerifyReq code
|
|
32573
|
+
*/
|
|
32574
|
+
|
|
32575
|
+
/**
|
|
32576
|
+
* Constructs a new WebGetLoginCodeVerifyReq.
|
|
32577
|
+
* @exports WebGetLoginCodeVerifyReq
|
|
32578
|
+
* @classdesc Represents a WebGetLoginCodeVerifyReq.
|
|
32579
|
+
* @implements IWebGetLoginCodeVerifyReq
|
|
32580
|
+
* @constructor
|
|
32581
|
+
* @param {IWebGetLoginCodeVerifyReq=} [properties] Properties to set
|
|
32582
|
+
*/
|
|
32583
|
+
function WebGetLoginCodeVerifyReq(properties) {
|
|
32584
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32585
|
+
}
|
|
32586
|
+
|
|
32587
|
+
/**
|
|
32588
|
+
* WebGetLoginCodeVerifyReq account.
|
|
32589
|
+
* @member {string} account
|
|
32590
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32591
|
+
* @instance
|
|
32592
|
+
*/
|
|
32593
|
+
WebGetLoginCodeVerifyReq.prototype.account = "";
|
|
32594
|
+
|
|
32595
|
+
/**
|
|
32596
|
+
* WebGetLoginCodeVerifyReq langCode.
|
|
32597
|
+
* @member {string} langCode
|
|
32598
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32599
|
+
* @instance
|
|
32600
|
+
*/
|
|
32601
|
+
WebGetLoginCodeVerifyReq.prototype.langCode = "";
|
|
32602
|
+
|
|
32603
|
+
/**
|
|
32604
|
+
* WebGetLoginCodeVerifyReq code.
|
|
32605
|
+
* @member {string} code
|
|
32606
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32607
|
+
* @instance
|
|
32608
|
+
*/
|
|
32609
|
+
WebGetLoginCodeVerifyReq.prototype.code = "";
|
|
32610
|
+
|
|
32611
|
+
/**
|
|
32612
|
+
* Encodes the specified WebGetLoginCodeVerifyReq message. Does not implicitly {@link WebGetLoginCodeVerifyReq.verify|verify} messages.
|
|
32613
|
+
* @function encode
|
|
32614
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32615
|
+
* @static
|
|
32616
|
+
* @param {IWebGetLoginCodeVerifyReq} message WebGetLoginCodeVerifyReq message or plain object to encode
|
|
32617
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32618
|
+
* @returns {$protobuf.Writer} Writer
|
|
32619
|
+
*/
|
|
32620
|
+
WebGetLoginCodeVerifyReq.encode = function encode(message, writer) {
|
|
32621
|
+
if (!writer) writer = $Writer.create();
|
|
32622
|
+
if (message.account != null && Object.hasOwnProperty.call(message, "account")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
|
|
32623
|
+
if (message.langCode != null && Object.hasOwnProperty.call(message, "langCode")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.langCode);
|
|
32624
|
+
if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.code);
|
|
32625
|
+
return writer;
|
|
32626
|
+
};
|
|
32627
|
+
|
|
32628
|
+
/**
|
|
32629
|
+
* Decodes a WebGetLoginCodeVerifyReq message from the specified reader or buffer.
|
|
32630
|
+
* @function decode
|
|
32631
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32632
|
+
* @static
|
|
32633
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32634
|
+
* @param {number} [length] Message length if known beforehand
|
|
32635
|
+
* @returns {WebGetLoginCodeVerifyReq} WebGetLoginCodeVerifyReq
|
|
32636
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32637
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32638
|
+
*/
|
|
32639
|
+
WebGetLoginCodeVerifyReq.decode = function decode(reader, length) {
|
|
32640
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32641
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32642
|
+
message = new $root.WebGetLoginCodeVerifyReq();
|
|
32643
|
+
while (reader.pos < end) {
|
|
32644
|
+
let tag = reader.uint32();
|
|
32645
|
+
switch (tag >>> 3) {
|
|
32646
|
+
case 1:
|
|
32647
|
+
{
|
|
32648
|
+
message.account = reader.string();
|
|
32649
|
+
break;
|
|
32650
|
+
}
|
|
32651
|
+
case 2:
|
|
32652
|
+
{
|
|
32653
|
+
message.langCode = reader.string();
|
|
32654
|
+
break;
|
|
32655
|
+
}
|
|
32656
|
+
case 3:
|
|
32657
|
+
{
|
|
32658
|
+
message.code = reader.string();
|
|
32659
|
+
break;
|
|
32660
|
+
}
|
|
32661
|
+
default:
|
|
32662
|
+
reader.skipType(tag & 7);
|
|
32663
|
+
break;
|
|
32664
|
+
}
|
|
32665
|
+
}
|
|
32666
|
+
return message;
|
|
32667
|
+
};
|
|
32668
|
+
|
|
32669
|
+
/**
|
|
32670
|
+
* Gets the default type url for WebGetLoginCodeVerifyReq
|
|
32671
|
+
* @function getTypeUrl
|
|
32672
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32673
|
+
* @static
|
|
32674
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32675
|
+
* @returns {string} The default type url
|
|
32676
|
+
*/
|
|
32677
|
+
WebGetLoginCodeVerifyReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32678
|
+
if (typeUrlPrefix === undefined) {
|
|
32679
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32680
|
+
}
|
|
32681
|
+
return typeUrlPrefix + "/WebGetLoginCodeVerifyReq";
|
|
32682
|
+
};
|
|
32683
|
+
return WebGetLoginCodeVerifyReq;
|
|
32684
|
+
})();
|
|
32685
|
+
const ClickOKToWebResp = $root.ClickOKToWebResp = (() => {
|
|
32686
|
+
/**
|
|
32687
|
+
* Properties of a ClickOKToWebResp.
|
|
32688
|
+
* @exports IClickOKToWebResp
|
|
32689
|
+
* @interface IClickOKToWebResp
|
|
32690
|
+
* @property {number|null} [errorCode] ClickOKToWebResp errorCode
|
|
32691
|
+
* @property {string|null} [errorMessage] ClickOKToWebResp errorMessage
|
|
32692
|
+
* @property {Long|null} [deviceId] ClickOKToWebResp deviceId
|
|
32693
|
+
* @property {Long|null} [sessionId] ClickOKToWebResp sessionId
|
|
32694
|
+
* @property {boolean|null} [noNickName] ClickOKToWebResp noNickName
|
|
32695
|
+
* @property {boolean|null} [noEmail] ClickOKToWebResp noEmail
|
|
32696
|
+
* @property {string|null} [cert] ClickOKToWebResp cert
|
|
32697
|
+
* @property {string|null} [userFileDomain] ClickOKToWebResp userFileDomain
|
|
32698
|
+
* @property {string|null} [dialogFileDomain] ClickOKToWebResp dialogFileDomain
|
|
32699
|
+
* @property {IUser|null} [user] ClickOKToWebResp user
|
|
32700
|
+
*/
|
|
32701
|
+
|
|
32702
|
+
/**
|
|
32703
|
+
* Constructs a new ClickOKToWebResp.
|
|
32704
|
+
* @exports ClickOKToWebResp
|
|
32705
|
+
* @classdesc Represents a ClickOKToWebResp.
|
|
32706
|
+
* @implements IClickOKToWebResp
|
|
32707
|
+
* @constructor
|
|
32708
|
+
* @param {IClickOKToWebResp=} [properties] Properties to set
|
|
32709
|
+
*/
|
|
32710
|
+
function ClickOKToWebResp(properties) {
|
|
32711
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32712
|
+
}
|
|
32713
|
+
|
|
32714
|
+
/**
|
|
32715
|
+
* ClickOKToWebResp errorCode.
|
|
32716
|
+
* @member {number} errorCode
|
|
32717
|
+
* @memberof ClickOKToWebResp
|
|
32718
|
+
* @instance
|
|
32719
|
+
*/
|
|
32720
|
+
ClickOKToWebResp.prototype.errorCode = 0;
|
|
32721
|
+
|
|
32722
|
+
/**
|
|
32723
|
+
* ClickOKToWebResp errorMessage.
|
|
32724
|
+
* @member {string} errorMessage
|
|
32725
|
+
* @memberof ClickOKToWebResp
|
|
32726
|
+
* @instance
|
|
32727
|
+
*/
|
|
32728
|
+
ClickOKToWebResp.prototype.errorMessage = "";
|
|
32729
|
+
|
|
32730
|
+
/**
|
|
32731
|
+
* ClickOKToWebResp deviceId.
|
|
32732
|
+
* @member {Long} deviceId
|
|
32733
|
+
* @memberof ClickOKToWebResp
|
|
32734
|
+
* @instance
|
|
32735
|
+
*/
|
|
32736
|
+
ClickOKToWebResp.prototype.deviceId = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
|
|
32737
|
+
|
|
32738
|
+
/**
|
|
32739
|
+
* ClickOKToWebResp sessionId.
|
|
32740
|
+
* @member {Long} sessionId
|
|
32741
|
+
* @memberof ClickOKToWebResp
|
|
32742
|
+
* @instance
|
|
32743
|
+
*/
|
|
32744
|
+
ClickOKToWebResp.prototype.sessionId = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
|
|
32745
|
+
|
|
32746
|
+
/**
|
|
32747
|
+
* ClickOKToWebResp noNickName.
|
|
32748
|
+
* @member {boolean} noNickName
|
|
32749
|
+
* @memberof ClickOKToWebResp
|
|
32750
|
+
* @instance
|
|
32751
|
+
*/
|
|
32752
|
+
ClickOKToWebResp.prototype.noNickName = false;
|
|
32753
|
+
|
|
32754
|
+
/**
|
|
32755
|
+
* ClickOKToWebResp noEmail.
|
|
32756
|
+
* @member {boolean} noEmail
|
|
32757
|
+
* @memberof ClickOKToWebResp
|
|
32758
|
+
* @instance
|
|
32759
|
+
*/
|
|
32760
|
+
ClickOKToWebResp.prototype.noEmail = false;
|
|
32761
|
+
|
|
32762
|
+
/**
|
|
32763
|
+
* ClickOKToWebResp cert.
|
|
32764
|
+
* @member {string} cert
|
|
32765
|
+
* @memberof ClickOKToWebResp
|
|
32766
|
+
* @instance
|
|
32767
|
+
*/
|
|
32768
|
+
ClickOKToWebResp.prototype.cert = "";
|
|
32769
|
+
|
|
32770
|
+
/**
|
|
32771
|
+
* ClickOKToWebResp userFileDomain.
|
|
32772
|
+
* @member {string} userFileDomain
|
|
32773
|
+
* @memberof ClickOKToWebResp
|
|
32774
|
+
* @instance
|
|
32775
|
+
*/
|
|
32776
|
+
ClickOKToWebResp.prototype.userFileDomain = "";
|
|
32777
|
+
|
|
32778
|
+
/**
|
|
32779
|
+
* ClickOKToWebResp dialogFileDomain.
|
|
32780
|
+
* @member {string} dialogFileDomain
|
|
32781
|
+
* @memberof ClickOKToWebResp
|
|
32782
|
+
* @instance
|
|
32783
|
+
*/
|
|
32784
|
+
ClickOKToWebResp.prototype.dialogFileDomain = "";
|
|
32785
|
+
|
|
32786
|
+
/**
|
|
32787
|
+
* ClickOKToWebResp user.
|
|
32788
|
+
* @member {IUser|null|undefined} user
|
|
32789
|
+
* @memberof ClickOKToWebResp
|
|
32790
|
+
* @instance
|
|
32791
|
+
*/
|
|
32792
|
+
ClickOKToWebResp.prototype.user = null;
|
|
32793
|
+
|
|
32794
|
+
/**
|
|
32795
|
+
* Encodes the specified ClickOKToWebResp message. Does not implicitly {@link ClickOKToWebResp.verify|verify} messages.
|
|
32796
|
+
* @function encode
|
|
32797
|
+
* @memberof ClickOKToWebResp
|
|
32798
|
+
* @static
|
|
32799
|
+
* @param {IClickOKToWebResp} message ClickOKToWebResp message or plain object to encode
|
|
32800
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32801
|
+
* @returns {$protobuf.Writer} Writer
|
|
32802
|
+
*/
|
|
32803
|
+
ClickOKToWebResp.encode = function encode(message, writer) {
|
|
32804
|
+
if (!writer) writer = $Writer.create();
|
|
32805
|
+
if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorCode);
|
|
32806
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
|
|
32807
|
+
if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.deviceId);
|
|
32808
|
+
if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sessionId);
|
|
32809
|
+
if (message.noNickName != null && Object.hasOwnProperty.call(message, "noNickName")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.noNickName);
|
|
32810
|
+
if (message.noEmail != null && Object.hasOwnProperty.call(message, "noEmail")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.noEmail);
|
|
32811
|
+
if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.cert);
|
|
32812
|
+
if (message.userFileDomain != null && Object.hasOwnProperty.call(message, "userFileDomain")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.userFileDomain);
|
|
32813
|
+
if (message.dialogFileDomain != null && Object.hasOwnProperty.call(message, "dialogFileDomain")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.dialogFileDomain);
|
|
32814
|
+
if (message.user != null && Object.hasOwnProperty.call(message, "user")) $root.User.encode(message.user, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
32815
|
+
return writer;
|
|
32816
|
+
};
|
|
32817
|
+
|
|
32818
|
+
/**
|
|
32819
|
+
* Decodes a ClickOKToWebResp message from the specified reader or buffer.
|
|
32820
|
+
* @function decode
|
|
32821
|
+
* @memberof ClickOKToWebResp
|
|
32822
|
+
* @static
|
|
32823
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32824
|
+
* @param {number} [length] Message length if known beforehand
|
|
32825
|
+
* @returns {ClickOKToWebResp} ClickOKToWebResp
|
|
32826
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32827
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32828
|
+
*/
|
|
32829
|
+
ClickOKToWebResp.decode = function decode(reader, length) {
|
|
32830
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32831
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32832
|
+
message = new $root.ClickOKToWebResp();
|
|
32833
|
+
while (reader.pos < end) {
|
|
32834
|
+
let tag = reader.uint32();
|
|
32835
|
+
switch (tag >>> 3) {
|
|
32836
|
+
case 1:
|
|
32837
|
+
{
|
|
32838
|
+
message.errorCode = reader.int32();
|
|
32839
|
+
break;
|
|
32840
|
+
}
|
|
32841
|
+
case 2:
|
|
32842
|
+
{
|
|
32843
|
+
message.errorMessage = reader.string();
|
|
32844
|
+
break;
|
|
32845
|
+
}
|
|
32846
|
+
case 3:
|
|
32847
|
+
{
|
|
32848
|
+
message.deviceId = reader.int64();
|
|
32849
|
+
break;
|
|
32850
|
+
}
|
|
32851
|
+
case 4:
|
|
32852
|
+
{
|
|
32853
|
+
message.sessionId = reader.int64();
|
|
32854
|
+
break;
|
|
32855
|
+
}
|
|
32856
|
+
case 5:
|
|
32857
|
+
{
|
|
32858
|
+
message.noNickName = reader.bool();
|
|
32859
|
+
break;
|
|
32860
|
+
}
|
|
32861
|
+
case 6:
|
|
32862
|
+
{
|
|
32863
|
+
message.noEmail = reader.bool();
|
|
32864
|
+
break;
|
|
32865
|
+
}
|
|
32866
|
+
case 7:
|
|
32867
|
+
{
|
|
32868
|
+
message.cert = reader.string();
|
|
32869
|
+
break;
|
|
32870
|
+
}
|
|
32871
|
+
case 9:
|
|
32872
|
+
{
|
|
32873
|
+
message.userFileDomain = reader.string();
|
|
32874
|
+
break;
|
|
32875
|
+
}
|
|
32876
|
+
case 10:
|
|
32877
|
+
{
|
|
32878
|
+
message.dialogFileDomain = reader.string();
|
|
32879
|
+
break;
|
|
32880
|
+
}
|
|
32881
|
+
case 11:
|
|
32882
|
+
{
|
|
32883
|
+
message.user = $root.User.decode(reader, reader.uint32());
|
|
32884
|
+
break;
|
|
32885
|
+
}
|
|
32886
|
+
default:
|
|
32887
|
+
reader.skipType(tag & 7);
|
|
32888
|
+
break;
|
|
32889
|
+
}
|
|
32890
|
+
}
|
|
32891
|
+
return message;
|
|
32892
|
+
};
|
|
32893
|
+
|
|
32894
|
+
/**
|
|
32895
|
+
* Gets the default type url for ClickOKToWebResp
|
|
32896
|
+
* @function getTypeUrl
|
|
32897
|
+
* @memberof ClickOKToWebResp
|
|
32898
|
+
* @static
|
|
32899
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32900
|
+
* @returns {string} The default type url
|
|
32901
|
+
*/
|
|
32902
|
+
ClickOKToWebResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32903
|
+
if (typeUrlPrefix === undefined) {
|
|
32904
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32905
|
+
}
|
|
32906
|
+
return typeUrlPrefix + "/ClickOKToWebResp";
|
|
32907
|
+
};
|
|
32908
|
+
return ClickOKToWebResp;
|
|
32909
|
+
})();
|
|
32351
32910
|
|
|
32352
32911
|
const login = config => {
|
|
32353
|
-
console.log('login config===========', config);
|
|
32354
32912
|
return webSocketServer.request(0x30011011, {
|
|
32355
32913
|
langCode: config.langCode,
|
|
32356
32914
|
phoneNum: config.phone,
|
|
@@ -32366,12 +32924,32 @@ const login = config => {
|
|
|
32366
32924
|
decoder: AuthSignIn2Resp
|
|
32367
32925
|
});
|
|
32368
32926
|
};
|
|
32927
|
+
const getLoginCode = config => {
|
|
32928
|
+
return webSocketServer.request(0x30018031, {
|
|
32929
|
+
langCode: config.langCode,
|
|
32930
|
+
account: config.phone
|
|
32931
|
+
}, {
|
|
32932
|
+
encoder: WebGetLoginCodeReq,
|
|
32933
|
+
decoder: WebGetLoginCodeResp
|
|
32934
|
+
});
|
|
32935
|
+
};
|
|
32936
|
+
const verifyLoginCode = config => {
|
|
32937
|
+
return webSocketServer.request(0x30018033, {
|
|
32938
|
+
langCode: config.country,
|
|
32939
|
+
account: config.phone,
|
|
32940
|
+
code: config.code
|
|
32941
|
+
}, {
|
|
32942
|
+
encoder: WebGetLoginCodeVerifyReq,
|
|
32943
|
+
decoder: ClickOKToWebResp
|
|
32944
|
+
});
|
|
32945
|
+
};
|
|
32369
32946
|
|
|
32370
32947
|
let imClient;
|
|
32371
32948
|
const init = initOption => {
|
|
32372
32949
|
imClient = imClient || new IMClient(initOption);
|
|
32373
32950
|
};
|
|
32374
32951
|
const connect = async () => {
|
|
32952
|
+
console.log('imlib-web connect ->');
|
|
32375
32953
|
const res = await imClient.connect();
|
|
32376
32954
|
if (res.code === ErrorCode.SUCCESS) {
|
|
32377
32955
|
return {
|
|
@@ -32794,6 +33372,12 @@ const sendReadReceipts = async messages => {
|
|
|
32794
33372
|
const mockLogin = config => {
|
|
32795
33373
|
return login(config);
|
|
32796
33374
|
};
|
|
33375
|
+
const mockGetLoginCode = config => {
|
|
33376
|
+
return getLoginCode(config);
|
|
33377
|
+
};
|
|
33378
|
+
const mockVerifyLoginCode = config => {
|
|
33379
|
+
return verifyLoginCode(config);
|
|
33380
|
+
};
|
|
32797
33381
|
const _logSendBefore = conversation => {
|
|
32798
33382
|
const paramsStr = 'conversationType:' + conversation.conversationType + ',targetId:' + conversation.targetId;
|
|
32799
33383
|
logger$1.debug('send message ->' + paramsStr);
|
|
@@ -32835,4 +33419,4 @@ const getMessageByUId = async messageUId => {
|
|
|
32835
33419
|
};
|
|
32836
33420
|
};
|
|
32837
33421
|
|
|
32838
|
-
export { ChatRecordMessage, ConnectionStatus, ContactMessage, ConversationType, ErrorCode, ErrorDesc, Events, FileMessage, GIFMessage, GroupCloseBurnAfterReadingMessage, GroupOpenBurnAfterReadingMessage, VoiceMessage as HQVoiceMessage, ImageMessage, InvitationMessage, LinkMessage, LocationMessage, LogLevel, MentionedType, MessageDirection, MessageTypes, NotiMessageTypes, NotificationLevel, NotificationStatus, PrivateCloseBurnAfterReadingMessage, PrivateOpenBurnAfterReadingMessage, RecallCommandMessage, ReceivedStatus, RedEnvelopeMessage, SentStatus, TextMessage, TransferMessage, VideoMessage, addEventListener, clearAllMessagesUnreadStatus, clearBurnAfterReadingExpiredMessages, clearHistoryMessages, clearMessagesUnreadStatus, clearTextMessageDraft, connect, deleteMessages, disconnect, encodeReceivedMessage2ChatRecordMsgDetail, getAllConversationState, getAllUnreadMentionedCount, getBlockedConversationList, getConnectionStatus, getConversation, getConversationList, getConversationNotificationLevel, getConversationNotificationStatus, getConversationState, getMessageById, getMessageByUId, getRemoteHistoryMessages, getServerTime, getTextMessageDraft, getTopConversationList, getTotalUnreadCount, getUnreadCount, getUnreadMentionedCount, init, insertMessage, logOut, mockLogin, onceEventListener, parseChatRecordMsgDetails, recallMessage, registerMessageType, removeConversation, removeEventListener, request, saveTextMessageDraft, sendFileMessage, sendGIFMessage, sendHQVoiceMessage, sendImageMessage, sendMessage, sendQuoteReplyMessage, sendReadReceipts, sendSightMessage, sendTextMessage, setConversationNotificationStatus, setConversationToTop, setUserLogged };
|
|
33422
|
+
export { ChatRecordMessage, ConnectionStatus, ContactMessage, ConversationType, ErrorCode, ErrorDesc, Events, FileMessage, GIFMessage, GroupCloseBurnAfterReadingMessage, GroupOpenBurnAfterReadingMessage, VoiceMessage as HQVoiceMessage, ImageMessage, InvitationMessage, LinkMessage, LocationMessage, LogLevel, MentionedType, MessageDirection, MessageTypes, NotiMessageTypes, NotificationLevel, NotificationStatus, PrivateCloseBurnAfterReadingMessage, PrivateOpenBurnAfterReadingMessage, RecallCommandMessage, ReceivedStatus, RedEnvelopeMessage, SentStatus, TextMessage, TransferMessage, VideoMessage, addEventListener, clearAllMessagesUnreadStatus, clearBurnAfterReadingExpiredMessages, clearHistoryMessages, clearMessagesUnreadStatus, clearTextMessageDraft, connect, deleteMessages, disconnect, encodeReceivedMessage2ChatRecordMsgDetail, getAllConversationState, getAllUnreadMentionedCount, getBlockedConversationList, getConnectionStatus, getConversation, getConversationList, getConversationNotificationLevel, getConversationNotificationStatus, getConversationState, getMessageById, getMessageByUId, getRemoteHistoryMessages, getServerTime, getTextMessageDraft, getTopConversationList, getTotalUnreadCount, getUnreadCount, getUnreadMentionedCount, init, insertMessage, logOut, mockGetLoginCode, mockLogin, mockVerifyLoginCode, onceEventListener, parseChatRecordMsgDetails, recallMessage, registerMessageType, removeConversation, removeEventListener, request, saveTextMessageDraft, sendFileMessage, sendGIFMessage, sendHQVoiceMessage, sendImageMessage, sendMessage, sendQuoteReplyMessage, sendReadReceipts, sendSightMessage, sendTextMessage, setConversationNotificationStatus, setConversationToTop, setUserLogged };
|
package/index.umd.js
CHANGED
|
@@ -22502,8 +22502,9 @@
|
|
|
22502
22502
|
}
|
|
22503
22503
|
return decryptedMessage;
|
|
22504
22504
|
}
|
|
22505
|
-
async addMessages(
|
|
22506
|
-
messages =
|
|
22505
|
+
async addMessages(originalMessages, toConversation, isEnd = undefined) {
|
|
22506
|
+
let messages = originalMessages?.filter(message => message.isPersited);
|
|
22507
|
+
logger$1.info('addMessages to db -> ', messages);
|
|
22507
22508
|
if (!messages || messages.length === 0 || !this.db) {
|
|
22508
22509
|
if (isDef(isEnd)) {
|
|
22509
22510
|
const dialogId = getFullDialogId(toConversation);
|
|
@@ -23188,8 +23189,11 @@
|
|
|
23188
23189
|
await MessageCache$1.get()?.convertToRecallMessages(recallMessageUIds);
|
|
23189
23190
|
this.watcher.onRecall?.(recallMessageUIds);
|
|
23190
23191
|
}
|
|
23191
|
-
const
|
|
23192
|
-
|
|
23192
|
+
const existsPersitedMessage = messageList.some(m => m.isPersited);
|
|
23193
|
+
if (existsPersitedMessage) {
|
|
23194
|
+
const latestMessage = await MessageCache$1.get()?.getLatestMessage(conversation);
|
|
23195
|
+
ConversationManager$1.get().updateLatestMessage(conversation, latestMessage);
|
|
23196
|
+
}
|
|
23193
23197
|
}
|
|
23194
23198
|
handleBurnAfterReadingMessage(message) {
|
|
23195
23199
|
const content = message.content;
|
|
@@ -23316,7 +23320,7 @@
|
|
|
23316
23320
|
|
|
23317
23321
|
const RecallCommandMessage = registerMessageType$1(MessageTypes.RECALL, true, false, false);
|
|
23318
23322
|
|
|
23319
|
-
const DEFAULT_SOCKET_URI = 'wss://test.
|
|
23323
|
+
const DEFAULT_SOCKET_URI = 'wss://test.gametalk.ai';
|
|
23320
23324
|
class LibLoader {
|
|
23321
23325
|
options;
|
|
23322
23326
|
connectionStatus = exports.ConnectionStatus.DISCONNECTED;
|
|
@@ -32354,9 +32358,563 @@
|
|
|
32354
32358
|
};
|
|
32355
32359
|
return User;
|
|
32356
32360
|
})();
|
|
32361
|
+
const WebGetLoginCodeReq = $root.WebGetLoginCodeReq = (() => {
|
|
32362
|
+
/**
|
|
32363
|
+
* Properties of a WebGetLoginCodeReq.
|
|
32364
|
+
* @exports IWebGetLoginCodeReq
|
|
32365
|
+
* @interface IWebGetLoginCodeReq
|
|
32366
|
+
* @property {string|null} [account] WebGetLoginCodeReq account
|
|
32367
|
+
* @property {string|null} [langCode] WebGetLoginCodeReq langCode
|
|
32368
|
+
*/
|
|
32369
|
+
|
|
32370
|
+
/**
|
|
32371
|
+
* Constructs a new WebGetLoginCodeReq.
|
|
32372
|
+
* @exports WebGetLoginCodeReq
|
|
32373
|
+
* @classdesc Represents a WebGetLoginCodeReq.
|
|
32374
|
+
* @implements IWebGetLoginCodeReq
|
|
32375
|
+
* @constructor
|
|
32376
|
+
* @param {IWebGetLoginCodeReq=} [properties] Properties to set
|
|
32377
|
+
*/
|
|
32378
|
+
function WebGetLoginCodeReq(properties) {
|
|
32379
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32380
|
+
}
|
|
32381
|
+
|
|
32382
|
+
/**
|
|
32383
|
+
* WebGetLoginCodeReq account.
|
|
32384
|
+
* @member {string} account
|
|
32385
|
+
* @memberof WebGetLoginCodeReq
|
|
32386
|
+
* @instance
|
|
32387
|
+
*/
|
|
32388
|
+
WebGetLoginCodeReq.prototype.account = "";
|
|
32389
|
+
|
|
32390
|
+
/**
|
|
32391
|
+
* WebGetLoginCodeReq langCode.
|
|
32392
|
+
* @member {string} langCode
|
|
32393
|
+
* @memberof WebGetLoginCodeReq
|
|
32394
|
+
* @instance
|
|
32395
|
+
*/
|
|
32396
|
+
WebGetLoginCodeReq.prototype.langCode = "";
|
|
32397
|
+
|
|
32398
|
+
/**
|
|
32399
|
+
* Encodes the specified WebGetLoginCodeReq message. Does not implicitly {@link WebGetLoginCodeReq.verify|verify} messages.
|
|
32400
|
+
* @function encode
|
|
32401
|
+
* @memberof WebGetLoginCodeReq
|
|
32402
|
+
* @static
|
|
32403
|
+
* @param {IWebGetLoginCodeReq} message WebGetLoginCodeReq message or plain object to encode
|
|
32404
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32405
|
+
* @returns {$protobuf.Writer} Writer
|
|
32406
|
+
*/
|
|
32407
|
+
WebGetLoginCodeReq.encode = function encode(message, writer) {
|
|
32408
|
+
if (!writer) writer = $Writer.create();
|
|
32409
|
+
if (message.account != null && Object.hasOwnProperty.call(message, "account")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
|
|
32410
|
+
if (message.langCode != null && Object.hasOwnProperty.call(message, "langCode")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.langCode);
|
|
32411
|
+
return writer;
|
|
32412
|
+
};
|
|
32413
|
+
|
|
32414
|
+
/**
|
|
32415
|
+
* Decodes a WebGetLoginCodeReq message from the specified reader or buffer.
|
|
32416
|
+
* @function decode
|
|
32417
|
+
* @memberof WebGetLoginCodeReq
|
|
32418
|
+
* @static
|
|
32419
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32420
|
+
* @param {number} [length] Message length if known beforehand
|
|
32421
|
+
* @returns {WebGetLoginCodeReq} WebGetLoginCodeReq
|
|
32422
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32423
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32424
|
+
*/
|
|
32425
|
+
WebGetLoginCodeReq.decode = function decode(reader, length) {
|
|
32426
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32427
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32428
|
+
message = new $root.WebGetLoginCodeReq();
|
|
32429
|
+
while (reader.pos < end) {
|
|
32430
|
+
let tag = reader.uint32();
|
|
32431
|
+
switch (tag >>> 3) {
|
|
32432
|
+
case 1:
|
|
32433
|
+
{
|
|
32434
|
+
message.account = reader.string();
|
|
32435
|
+
break;
|
|
32436
|
+
}
|
|
32437
|
+
case 2:
|
|
32438
|
+
{
|
|
32439
|
+
message.langCode = reader.string();
|
|
32440
|
+
break;
|
|
32441
|
+
}
|
|
32442
|
+
default:
|
|
32443
|
+
reader.skipType(tag & 7);
|
|
32444
|
+
break;
|
|
32445
|
+
}
|
|
32446
|
+
}
|
|
32447
|
+
return message;
|
|
32448
|
+
};
|
|
32449
|
+
|
|
32450
|
+
/**
|
|
32451
|
+
* Gets the default type url for WebGetLoginCodeReq
|
|
32452
|
+
* @function getTypeUrl
|
|
32453
|
+
* @memberof WebGetLoginCodeReq
|
|
32454
|
+
* @static
|
|
32455
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32456
|
+
* @returns {string} The default type url
|
|
32457
|
+
*/
|
|
32458
|
+
WebGetLoginCodeReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32459
|
+
if (typeUrlPrefix === undefined) {
|
|
32460
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32461
|
+
}
|
|
32462
|
+
return typeUrlPrefix + "/WebGetLoginCodeReq";
|
|
32463
|
+
};
|
|
32464
|
+
return WebGetLoginCodeReq;
|
|
32465
|
+
})();
|
|
32466
|
+
const WebGetLoginCodeResp = $root.WebGetLoginCodeResp = (() => {
|
|
32467
|
+
/**
|
|
32468
|
+
* Properties of a WebGetLoginCodeResp.
|
|
32469
|
+
* @exports IWebGetLoginCodeResp
|
|
32470
|
+
* @interface IWebGetLoginCodeResp
|
|
32471
|
+
* @property {number|null} [errorCode] WebGetLoginCodeResp errorCode
|
|
32472
|
+
* @property {string|null} [errorMessage] WebGetLoginCodeResp errorMessage
|
|
32473
|
+
*/
|
|
32474
|
+
|
|
32475
|
+
/**
|
|
32476
|
+
* Constructs a new WebGetLoginCodeResp.
|
|
32477
|
+
* @exports WebGetLoginCodeResp
|
|
32478
|
+
* @classdesc Represents a WebGetLoginCodeResp.
|
|
32479
|
+
* @implements IWebGetLoginCodeResp
|
|
32480
|
+
* @constructor
|
|
32481
|
+
* @param {IWebGetLoginCodeResp=} [properties] Properties to set
|
|
32482
|
+
*/
|
|
32483
|
+
function WebGetLoginCodeResp(properties) {
|
|
32484
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32485
|
+
}
|
|
32486
|
+
|
|
32487
|
+
/**
|
|
32488
|
+
* WebGetLoginCodeResp errorCode.
|
|
32489
|
+
* @member {number} errorCode
|
|
32490
|
+
* @memberof WebGetLoginCodeResp
|
|
32491
|
+
* @instance
|
|
32492
|
+
*/
|
|
32493
|
+
WebGetLoginCodeResp.prototype.errorCode = 0;
|
|
32494
|
+
|
|
32495
|
+
/**
|
|
32496
|
+
* WebGetLoginCodeResp errorMessage.
|
|
32497
|
+
* @member {string} errorMessage
|
|
32498
|
+
* @memberof WebGetLoginCodeResp
|
|
32499
|
+
* @instance
|
|
32500
|
+
*/
|
|
32501
|
+
WebGetLoginCodeResp.prototype.errorMessage = "";
|
|
32502
|
+
|
|
32503
|
+
/**
|
|
32504
|
+
* Encodes the specified WebGetLoginCodeResp message. Does not implicitly {@link WebGetLoginCodeResp.verify|verify} messages.
|
|
32505
|
+
* @function encode
|
|
32506
|
+
* @memberof WebGetLoginCodeResp
|
|
32507
|
+
* @static
|
|
32508
|
+
* @param {IWebGetLoginCodeResp} message WebGetLoginCodeResp message or plain object to encode
|
|
32509
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32510
|
+
* @returns {$protobuf.Writer} Writer
|
|
32511
|
+
*/
|
|
32512
|
+
WebGetLoginCodeResp.encode = function encode(message, writer) {
|
|
32513
|
+
if (!writer) writer = $Writer.create();
|
|
32514
|
+
if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorCode);
|
|
32515
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
|
|
32516
|
+
return writer;
|
|
32517
|
+
};
|
|
32518
|
+
|
|
32519
|
+
/**
|
|
32520
|
+
* Decodes a WebGetLoginCodeResp message from the specified reader or buffer.
|
|
32521
|
+
* @function decode
|
|
32522
|
+
* @memberof WebGetLoginCodeResp
|
|
32523
|
+
* @static
|
|
32524
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32525
|
+
* @param {number} [length] Message length if known beforehand
|
|
32526
|
+
* @returns {WebGetLoginCodeResp} WebGetLoginCodeResp
|
|
32527
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32528
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32529
|
+
*/
|
|
32530
|
+
WebGetLoginCodeResp.decode = function decode(reader, length) {
|
|
32531
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32532
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32533
|
+
message = new $root.WebGetLoginCodeResp();
|
|
32534
|
+
while (reader.pos < end) {
|
|
32535
|
+
let tag = reader.uint32();
|
|
32536
|
+
switch (tag >>> 3) {
|
|
32537
|
+
case 1:
|
|
32538
|
+
{
|
|
32539
|
+
message.errorCode = reader.int32();
|
|
32540
|
+
break;
|
|
32541
|
+
}
|
|
32542
|
+
case 2:
|
|
32543
|
+
{
|
|
32544
|
+
message.errorMessage = reader.string();
|
|
32545
|
+
break;
|
|
32546
|
+
}
|
|
32547
|
+
default:
|
|
32548
|
+
reader.skipType(tag & 7);
|
|
32549
|
+
break;
|
|
32550
|
+
}
|
|
32551
|
+
}
|
|
32552
|
+
return message;
|
|
32553
|
+
};
|
|
32554
|
+
|
|
32555
|
+
/**
|
|
32556
|
+
* Gets the default type url for WebGetLoginCodeResp
|
|
32557
|
+
* @function getTypeUrl
|
|
32558
|
+
* @memberof WebGetLoginCodeResp
|
|
32559
|
+
* @static
|
|
32560
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32561
|
+
* @returns {string} The default type url
|
|
32562
|
+
*/
|
|
32563
|
+
WebGetLoginCodeResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32564
|
+
if (typeUrlPrefix === undefined) {
|
|
32565
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32566
|
+
}
|
|
32567
|
+
return typeUrlPrefix + "/WebGetLoginCodeResp";
|
|
32568
|
+
};
|
|
32569
|
+
return WebGetLoginCodeResp;
|
|
32570
|
+
})();
|
|
32571
|
+
const WebGetLoginCodeVerifyReq = $root.WebGetLoginCodeVerifyReq = (() => {
|
|
32572
|
+
/**
|
|
32573
|
+
* Properties of a WebGetLoginCodeVerifyReq.
|
|
32574
|
+
* @exports IWebGetLoginCodeVerifyReq
|
|
32575
|
+
* @interface IWebGetLoginCodeVerifyReq
|
|
32576
|
+
* @property {string|null} [account] WebGetLoginCodeVerifyReq account
|
|
32577
|
+
* @property {string|null} [langCode] WebGetLoginCodeVerifyReq langCode
|
|
32578
|
+
* @property {string|null} [code] WebGetLoginCodeVerifyReq code
|
|
32579
|
+
*/
|
|
32580
|
+
|
|
32581
|
+
/**
|
|
32582
|
+
* Constructs a new WebGetLoginCodeVerifyReq.
|
|
32583
|
+
* @exports WebGetLoginCodeVerifyReq
|
|
32584
|
+
* @classdesc Represents a WebGetLoginCodeVerifyReq.
|
|
32585
|
+
* @implements IWebGetLoginCodeVerifyReq
|
|
32586
|
+
* @constructor
|
|
32587
|
+
* @param {IWebGetLoginCodeVerifyReq=} [properties] Properties to set
|
|
32588
|
+
*/
|
|
32589
|
+
function WebGetLoginCodeVerifyReq(properties) {
|
|
32590
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32591
|
+
}
|
|
32592
|
+
|
|
32593
|
+
/**
|
|
32594
|
+
* WebGetLoginCodeVerifyReq account.
|
|
32595
|
+
* @member {string} account
|
|
32596
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32597
|
+
* @instance
|
|
32598
|
+
*/
|
|
32599
|
+
WebGetLoginCodeVerifyReq.prototype.account = "";
|
|
32600
|
+
|
|
32601
|
+
/**
|
|
32602
|
+
* WebGetLoginCodeVerifyReq langCode.
|
|
32603
|
+
* @member {string} langCode
|
|
32604
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32605
|
+
* @instance
|
|
32606
|
+
*/
|
|
32607
|
+
WebGetLoginCodeVerifyReq.prototype.langCode = "";
|
|
32608
|
+
|
|
32609
|
+
/**
|
|
32610
|
+
* WebGetLoginCodeVerifyReq code.
|
|
32611
|
+
* @member {string} code
|
|
32612
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32613
|
+
* @instance
|
|
32614
|
+
*/
|
|
32615
|
+
WebGetLoginCodeVerifyReq.prototype.code = "";
|
|
32616
|
+
|
|
32617
|
+
/**
|
|
32618
|
+
* Encodes the specified WebGetLoginCodeVerifyReq message. Does not implicitly {@link WebGetLoginCodeVerifyReq.verify|verify} messages.
|
|
32619
|
+
* @function encode
|
|
32620
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32621
|
+
* @static
|
|
32622
|
+
* @param {IWebGetLoginCodeVerifyReq} message WebGetLoginCodeVerifyReq message or plain object to encode
|
|
32623
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32624
|
+
* @returns {$protobuf.Writer} Writer
|
|
32625
|
+
*/
|
|
32626
|
+
WebGetLoginCodeVerifyReq.encode = function encode(message, writer) {
|
|
32627
|
+
if (!writer) writer = $Writer.create();
|
|
32628
|
+
if (message.account != null && Object.hasOwnProperty.call(message, "account")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
|
|
32629
|
+
if (message.langCode != null && Object.hasOwnProperty.call(message, "langCode")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.langCode);
|
|
32630
|
+
if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.code);
|
|
32631
|
+
return writer;
|
|
32632
|
+
};
|
|
32633
|
+
|
|
32634
|
+
/**
|
|
32635
|
+
* Decodes a WebGetLoginCodeVerifyReq message from the specified reader or buffer.
|
|
32636
|
+
* @function decode
|
|
32637
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32638
|
+
* @static
|
|
32639
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32640
|
+
* @param {number} [length] Message length if known beforehand
|
|
32641
|
+
* @returns {WebGetLoginCodeVerifyReq} WebGetLoginCodeVerifyReq
|
|
32642
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32643
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32644
|
+
*/
|
|
32645
|
+
WebGetLoginCodeVerifyReq.decode = function decode(reader, length) {
|
|
32646
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32647
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32648
|
+
message = new $root.WebGetLoginCodeVerifyReq();
|
|
32649
|
+
while (reader.pos < end) {
|
|
32650
|
+
let tag = reader.uint32();
|
|
32651
|
+
switch (tag >>> 3) {
|
|
32652
|
+
case 1:
|
|
32653
|
+
{
|
|
32654
|
+
message.account = reader.string();
|
|
32655
|
+
break;
|
|
32656
|
+
}
|
|
32657
|
+
case 2:
|
|
32658
|
+
{
|
|
32659
|
+
message.langCode = reader.string();
|
|
32660
|
+
break;
|
|
32661
|
+
}
|
|
32662
|
+
case 3:
|
|
32663
|
+
{
|
|
32664
|
+
message.code = reader.string();
|
|
32665
|
+
break;
|
|
32666
|
+
}
|
|
32667
|
+
default:
|
|
32668
|
+
reader.skipType(tag & 7);
|
|
32669
|
+
break;
|
|
32670
|
+
}
|
|
32671
|
+
}
|
|
32672
|
+
return message;
|
|
32673
|
+
};
|
|
32674
|
+
|
|
32675
|
+
/**
|
|
32676
|
+
* Gets the default type url for WebGetLoginCodeVerifyReq
|
|
32677
|
+
* @function getTypeUrl
|
|
32678
|
+
* @memberof WebGetLoginCodeVerifyReq
|
|
32679
|
+
* @static
|
|
32680
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32681
|
+
* @returns {string} The default type url
|
|
32682
|
+
*/
|
|
32683
|
+
WebGetLoginCodeVerifyReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32684
|
+
if (typeUrlPrefix === undefined) {
|
|
32685
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32686
|
+
}
|
|
32687
|
+
return typeUrlPrefix + "/WebGetLoginCodeVerifyReq";
|
|
32688
|
+
};
|
|
32689
|
+
return WebGetLoginCodeVerifyReq;
|
|
32690
|
+
})();
|
|
32691
|
+
const ClickOKToWebResp = $root.ClickOKToWebResp = (() => {
|
|
32692
|
+
/**
|
|
32693
|
+
* Properties of a ClickOKToWebResp.
|
|
32694
|
+
* @exports IClickOKToWebResp
|
|
32695
|
+
* @interface IClickOKToWebResp
|
|
32696
|
+
* @property {number|null} [errorCode] ClickOKToWebResp errorCode
|
|
32697
|
+
* @property {string|null} [errorMessage] ClickOKToWebResp errorMessage
|
|
32698
|
+
* @property {Long|null} [deviceId] ClickOKToWebResp deviceId
|
|
32699
|
+
* @property {Long|null} [sessionId] ClickOKToWebResp sessionId
|
|
32700
|
+
* @property {boolean|null} [noNickName] ClickOKToWebResp noNickName
|
|
32701
|
+
* @property {boolean|null} [noEmail] ClickOKToWebResp noEmail
|
|
32702
|
+
* @property {string|null} [cert] ClickOKToWebResp cert
|
|
32703
|
+
* @property {string|null} [userFileDomain] ClickOKToWebResp userFileDomain
|
|
32704
|
+
* @property {string|null} [dialogFileDomain] ClickOKToWebResp dialogFileDomain
|
|
32705
|
+
* @property {IUser|null} [user] ClickOKToWebResp user
|
|
32706
|
+
*/
|
|
32707
|
+
|
|
32708
|
+
/**
|
|
32709
|
+
* Constructs a new ClickOKToWebResp.
|
|
32710
|
+
* @exports ClickOKToWebResp
|
|
32711
|
+
* @classdesc Represents a ClickOKToWebResp.
|
|
32712
|
+
* @implements IClickOKToWebResp
|
|
32713
|
+
* @constructor
|
|
32714
|
+
* @param {IClickOKToWebResp=} [properties] Properties to set
|
|
32715
|
+
*/
|
|
32716
|
+
function ClickOKToWebResp(properties) {
|
|
32717
|
+
if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
32718
|
+
}
|
|
32719
|
+
|
|
32720
|
+
/**
|
|
32721
|
+
* ClickOKToWebResp errorCode.
|
|
32722
|
+
* @member {number} errorCode
|
|
32723
|
+
* @memberof ClickOKToWebResp
|
|
32724
|
+
* @instance
|
|
32725
|
+
*/
|
|
32726
|
+
ClickOKToWebResp.prototype.errorCode = 0;
|
|
32727
|
+
|
|
32728
|
+
/**
|
|
32729
|
+
* ClickOKToWebResp errorMessage.
|
|
32730
|
+
* @member {string} errorMessage
|
|
32731
|
+
* @memberof ClickOKToWebResp
|
|
32732
|
+
* @instance
|
|
32733
|
+
*/
|
|
32734
|
+
ClickOKToWebResp.prototype.errorMessage = "";
|
|
32735
|
+
|
|
32736
|
+
/**
|
|
32737
|
+
* ClickOKToWebResp deviceId.
|
|
32738
|
+
* @member {Long} deviceId
|
|
32739
|
+
* @memberof ClickOKToWebResp
|
|
32740
|
+
* @instance
|
|
32741
|
+
*/
|
|
32742
|
+
ClickOKToWebResp.prototype.deviceId = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
|
|
32743
|
+
|
|
32744
|
+
/**
|
|
32745
|
+
* ClickOKToWebResp sessionId.
|
|
32746
|
+
* @member {Long} sessionId
|
|
32747
|
+
* @memberof ClickOKToWebResp
|
|
32748
|
+
* @instance
|
|
32749
|
+
*/
|
|
32750
|
+
ClickOKToWebResp.prototype.sessionId = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
|
|
32751
|
+
|
|
32752
|
+
/**
|
|
32753
|
+
* ClickOKToWebResp noNickName.
|
|
32754
|
+
* @member {boolean} noNickName
|
|
32755
|
+
* @memberof ClickOKToWebResp
|
|
32756
|
+
* @instance
|
|
32757
|
+
*/
|
|
32758
|
+
ClickOKToWebResp.prototype.noNickName = false;
|
|
32759
|
+
|
|
32760
|
+
/**
|
|
32761
|
+
* ClickOKToWebResp noEmail.
|
|
32762
|
+
* @member {boolean} noEmail
|
|
32763
|
+
* @memberof ClickOKToWebResp
|
|
32764
|
+
* @instance
|
|
32765
|
+
*/
|
|
32766
|
+
ClickOKToWebResp.prototype.noEmail = false;
|
|
32767
|
+
|
|
32768
|
+
/**
|
|
32769
|
+
* ClickOKToWebResp cert.
|
|
32770
|
+
* @member {string} cert
|
|
32771
|
+
* @memberof ClickOKToWebResp
|
|
32772
|
+
* @instance
|
|
32773
|
+
*/
|
|
32774
|
+
ClickOKToWebResp.prototype.cert = "";
|
|
32775
|
+
|
|
32776
|
+
/**
|
|
32777
|
+
* ClickOKToWebResp userFileDomain.
|
|
32778
|
+
* @member {string} userFileDomain
|
|
32779
|
+
* @memberof ClickOKToWebResp
|
|
32780
|
+
* @instance
|
|
32781
|
+
*/
|
|
32782
|
+
ClickOKToWebResp.prototype.userFileDomain = "";
|
|
32783
|
+
|
|
32784
|
+
/**
|
|
32785
|
+
* ClickOKToWebResp dialogFileDomain.
|
|
32786
|
+
* @member {string} dialogFileDomain
|
|
32787
|
+
* @memberof ClickOKToWebResp
|
|
32788
|
+
* @instance
|
|
32789
|
+
*/
|
|
32790
|
+
ClickOKToWebResp.prototype.dialogFileDomain = "";
|
|
32791
|
+
|
|
32792
|
+
/**
|
|
32793
|
+
* ClickOKToWebResp user.
|
|
32794
|
+
* @member {IUser|null|undefined} user
|
|
32795
|
+
* @memberof ClickOKToWebResp
|
|
32796
|
+
* @instance
|
|
32797
|
+
*/
|
|
32798
|
+
ClickOKToWebResp.prototype.user = null;
|
|
32799
|
+
|
|
32800
|
+
/**
|
|
32801
|
+
* Encodes the specified ClickOKToWebResp message. Does not implicitly {@link ClickOKToWebResp.verify|verify} messages.
|
|
32802
|
+
* @function encode
|
|
32803
|
+
* @memberof ClickOKToWebResp
|
|
32804
|
+
* @static
|
|
32805
|
+
* @param {IClickOKToWebResp} message ClickOKToWebResp message or plain object to encode
|
|
32806
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
32807
|
+
* @returns {$protobuf.Writer} Writer
|
|
32808
|
+
*/
|
|
32809
|
+
ClickOKToWebResp.encode = function encode(message, writer) {
|
|
32810
|
+
if (!writer) writer = $Writer.create();
|
|
32811
|
+
if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorCode);
|
|
32812
|
+
if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
|
|
32813
|
+
if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.deviceId);
|
|
32814
|
+
if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sessionId);
|
|
32815
|
+
if (message.noNickName != null && Object.hasOwnProperty.call(message, "noNickName")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.noNickName);
|
|
32816
|
+
if (message.noEmail != null && Object.hasOwnProperty.call(message, "noEmail")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.noEmail);
|
|
32817
|
+
if (message.cert != null && Object.hasOwnProperty.call(message, "cert")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.cert);
|
|
32818
|
+
if (message.userFileDomain != null && Object.hasOwnProperty.call(message, "userFileDomain")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.userFileDomain);
|
|
32819
|
+
if (message.dialogFileDomain != null && Object.hasOwnProperty.call(message, "dialogFileDomain")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.dialogFileDomain);
|
|
32820
|
+
if (message.user != null && Object.hasOwnProperty.call(message, "user")) $root.User.encode(message.user, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
32821
|
+
return writer;
|
|
32822
|
+
};
|
|
32823
|
+
|
|
32824
|
+
/**
|
|
32825
|
+
* Decodes a ClickOKToWebResp message from the specified reader or buffer.
|
|
32826
|
+
* @function decode
|
|
32827
|
+
* @memberof ClickOKToWebResp
|
|
32828
|
+
* @static
|
|
32829
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
32830
|
+
* @param {number} [length] Message length if known beforehand
|
|
32831
|
+
* @returns {ClickOKToWebResp} ClickOKToWebResp
|
|
32832
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
32833
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
32834
|
+
*/
|
|
32835
|
+
ClickOKToWebResp.decode = function decode(reader, length) {
|
|
32836
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
32837
|
+
let end = length === undefined ? reader.len : reader.pos + length,
|
|
32838
|
+
message = new $root.ClickOKToWebResp();
|
|
32839
|
+
while (reader.pos < end) {
|
|
32840
|
+
let tag = reader.uint32();
|
|
32841
|
+
switch (tag >>> 3) {
|
|
32842
|
+
case 1:
|
|
32843
|
+
{
|
|
32844
|
+
message.errorCode = reader.int32();
|
|
32845
|
+
break;
|
|
32846
|
+
}
|
|
32847
|
+
case 2:
|
|
32848
|
+
{
|
|
32849
|
+
message.errorMessage = reader.string();
|
|
32850
|
+
break;
|
|
32851
|
+
}
|
|
32852
|
+
case 3:
|
|
32853
|
+
{
|
|
32854
|
+
message.deviceId = reader.int64();
|
|
32855
|
+
break;
|
|
32856
|
+
}
|
|
32857
|
+
case 4:
|
|
32858
|
+
{
|
|
32859
|
+
message.sessionId = reader.int64();
|
|
32860
|
+
break;
|
|
32861
|
+
}
|
|
32862
|
+
case 5:
|
|
32863
|
+
{
|
|
32864
|
+
message.noNickName = reader.bool();
|
|
32865
|
+
break;
|
|
32866
|
+
}
|
|
32867
|
+
case 6:
|
|
32868
|
+
{
|
|
32869
|
+
message.noEmail = reader.bool();
|
|
32870
|
+
break;
|
|
32871
|
+
}
|
|
32872
|
+
case 7:
|
|
32873
|
+
{
|
|
32874
|
+
message.cert = reader.string();
|
|
32875
|
+
break;
|
|
32876
|
+
}
|
|
32877
|
+
case 9:
|
|
32878
|
+
{
|
|
32879
|
+
message.userFileDomain = reader.string();
|
|
32880
|
+
break;
|
|
32881
|
+
}
|
|
32882
|
+
case 10:
|
|
32883
|
+
{
|
|
32884
|
+
message.dialogFileDomain = reader.string();
|
|
32885
|
+
break;
|
|
32886
|
+
}
|
|
32887
|
+
case 11:
|
|
32888
|
+
{
|
|
32889
|
+
message.user = $root.User.decode(reader, reader.uint32());
|
|
32890
|
+
break;
|
|
32891
|
+
}
|
|
32892
|
+
default:
|
|
32893
|
+
reader.skipType(tag & 7);
|
|
32894
|
+
break;
|
|
32895
|
+
}
|
|
32896
|
+
}
|
|
32897
|
+
return message;
|
|
32898
|
+
};
|
|
32899
|
+
|
|
32900
|
+
/**
|
|
32901
|
+
* Gets the default type url for ClickOKToWebResp
|
|
32902
|
+
* @function getTypeUrl
|
|
32903
|
+
* @memberof ClickOKToWebResp
|
|
32904
|
+
* @static
|
|
32905
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
32906
|
+
* @returns {string} The default type url
|
|
32907
|
+
*/
|
|
32908
|
+
ClickOKToWebResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
32909
|
+
if (typeUrlPrefix === undefined) {
|
|
32910
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
32911
|
+
}
|
|
32912
|
+
return typeUrlPrefix + "/ClickOKToWebResp";
|
|
32913
|
+
};
|
|
32914
|
+
return ClickOKToWebResp;
|
|
32915
|
+
})();
|
|
32357
32916
|
|
|
32358
32917
|
const login = config => {
|
|
32359
|
-
console.log('login config===========', config);
|
|
32360
32918
|
return webSocketServer.request(0x30011011, {
|
|
32361
32919
|
langCode: config.langCode,
|
|
32362
32920
|
phoneNum: config.phone,
|
|
@@ -32372,12 +32930,32 @@
|
|
|
32372
32930
|
decoder: AuthSignIn2Resp
|
|
32373
32931
|
});
|
|
32374
32932
|
};
|
|
32933
|
+
const getLoginCode = config => {
|
|
32934
|
+
return webSocketServer.request(0x30018031, {
|
|
32935
|
+
langCode: config.langCode,
|
|
32936
|
+
account: config.phone
|
|
32937
|
+
}, {
|
|
32938
|
+
encoder: WebGetLoginCodeReq,
|
|
32939
|
+
decoder: WebGetLoginCodeResp
|
|
32940
|
+
});
|
|
32941
|
+
};
|
|
32942
|
+
const verifyLoginCode = config => {
|
|
32943
|
+
return webSocketServer.request(0x30018033, {
|
|
32944
|
+
langCode: config.country,
|
|
32945
|
+
account: config.phone,
|
|
32946
|
+
code: config.code
|
|
32947
|
+
}, {
|
|
32948
|
+
encoder: WebGetLoginCodeVerifyReq,
|
|
32949
|
+
decoder: ClickOKToWebResp
|
|
32950
|
+
});
|
|
32951
|
+
};
|
|
32375
32952
|
|
|
32376
32953
|
let imClient;
|
|
32377
32954
|
const init = initOption => {
|
|
32378
32955
|
imClient = imClient || new IMClient(initOption);
|
|
32379
32956
|
};
|
|
32380
32957
|
const connect = async () => {
|
|
32958
|
+
console.log('imlib-web connect ->');
|
|
32381
32959
|
const res = await imClient.connect();
|
|
32382
32960
|
if (res.code === exports.ErrorCode.SUCCESS) {
|
|
32383
32961
|
return {
|
|
@@ -32800,6 +33378,12 @@
|
|
|
32800
33378
|
const mockLogin = config => {
|
|
32801
33379
|
return login(config);
|
|
32802
33380
|
};
|
|
33381
|
+
const mockGetLoginCode = config => {
|
|
33382
|
+
return getLoginCode(config);
|
|
33383
|
+
};
|
|
33384
|
+
const mockVerifyLoginCode = config => {
|
|
33385
|
+
return verifyLoginCode(config);
|
|
33386
|
+
};
|
|
32803
33387
|
const _logSendBefore = conversation => {
|
|
32804
33388
|
const paramsStr = 'conversationType:' + conversation.conversationType + ',targetId:' + conversation.targetId;
|
|
32805
33389
|
logger$1.debug('send message ->' + paramsStr);
|
|
@@ -32893,7 +33477,9 @@
|
|
|
32893
33477
|
exports.init = init;
|
|
32894
33478
|
exports.insertMessage = insertMessage;
|
|
32895
33479
|
exports.logOut = logOut;
|
|
33480
|
+
exports.mockGetLoginCode = mockGetLoginCode;
|
|
32896
33481
|
exports.mockLogin = mockLogin;
|
|
33482
|
+
exports.mockVerifyLoginCode = mockVerifyLoginCode;
|
|
32897
33483
|
exports.onceEventListener = onceEventListener;
|
|
32898
33484
|
exports.parseChatRecordMsgDetails = parseChatRecordMsgDetails;
|
|
32899
33485
|
exports.recallMessage = recallMessage;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -248,6 +248,15 @@ export declare const mockLogin: (config: {
|
|
|
248
248
|
phone: string;
|
|
249
249
|
password: string;
|
|
250
250
|
}) => CommonReqResult<import("./net/pbs/rpc.login").AuthSignIn2Resp>;
|
|
251
|
+
export declare const mockGetLoginCode: (config: {
|
|
252
|
+
langCode: string;
|
|
253
|
+
phone: string;
|
|
254
|
+
}) => CommonReqResult<import("./net/pbs/rpc.login").WebGetLoginCodeResp>;
|
|
255
|
+
export declare const mockVerifyLoginCode: (config: {
|
|
256
|
+
country: string;
|
|
257
|
+
phone: string;
|
|
258
|
+
code: string;
|
|
259
|
+
}) => CommonReqResult<import("./net/pbs/rpc.login").ClickOKToWebResp>;
|
|
251
260
|
/**
|
|
252
261
|
* 清除指定会话中阅后即焚过期的消息
|
|
253
262
|
* @param conversation 会话信息
|