@bitrix24/b24jssdk 0.1.0 → 0.1.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/dist/commonjs/index.cjs +1432 -1398
- package/dist/commonjs/index.cjs.map +1 -1
- package/dist/commonjs/index.d.cts +40 -242
- package/dist/commonjs/index.d.mts +40 -242
- package/dist/commonjs/index.d.ts +40 -242
- package/dist/esm/index.d.mts +40 -242
- package/dist/esm/index.d.ts +40 -242
- package/dist/esm/index.mjs +1432 -1398
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +1432 -1398
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +16 -16
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.d.mts
CHANGED
|
@@ -107,7 +107,7 @@ declare class TypeManager {
|
|
|
107
107
|
*/
|
|
108
108
|
isString(value: any): boolean;
|
|
109
109
|
/**
|
|
110
|
-
* Returns true if a value is not empty string
|
|
110
|
+
* Returns true if a value is not an empty string
|
|
111
111
|
* @param value
|
|
112
112
|
* @returns {boolean}
|
|
113
113
|
*/
|
|
@@ -121,7 +121,7 @@ declare class TypeManager {
|
|
|
121
121
|
*/
|
|
122
122
|
isFunction(value: any): boolean;
|
|
123
123
|
/**
|
|
124
|
-
* Checks that value is object
|
|
124
|
+
* Checks that value is an object
|
|
125
125
|
* @param value
|
|
126
126
|
* @return {boolean}
|
|
127
127
|
*/
|
|
@@ -171,7 +171,7 @@ declare class TypeManager {
|
|
|
171
171
|
*/
|
|
172
172
|
isNil(value: any): boolean;
|
|
173
173
|
/**
|
|
174
|
-
* Checks that value is array
|
|
174
|
+
* Checks that value is an array
|
|
175
175
|
* @param value
|
|
176
176
|
* @return {boolean}
|
|
177
177
|
*/
|
|
@@ -195,7 +195,7 @@ declare class TypeManager {
|
|
|
195
195
|
*/
|
|
196
196
|
isDate(value: any): boolean;
|
|
197
197
|
/**
|
|
198
|
-
* Checks that is DOM node
|
|
198
|
+
* Checks that is a DOM node
|
|
199
199
|
* @param value
|
|
200
200
|
* @return {boolean}
|
|
201
201
|
*/
|
|
@@ -207,7 +207,7 @@ declare class TypeManager {
|
|
|
207
207
|
*/
|
|
208
208
|
isElementNode(value: any): boolean;
|
|
209
209
|
/**
|
|
210
|
-
* Checks that value is text node
|
|
210
|
+
* Checks that value is a text node
|
|
211
211
|
* @param value
|
|
212
212
|
* @return {boolean}
|
|
213
213
|
*/
|
|
@@ -540,7 +540,7 @@ type Payload<P> = GetPayload<P> | ListPayload<P> | BatchPayload<P>;
|
|
|
540
540
|
|
|
541
541
|
type AjaxQuery = {
|
|
542
542
|
method: string;
|
|
543
|
-
params:
|
|
543
|
+
params: object;
|
|
544
544
|
start: number;
|
|
545
545
|
};
|
|
546
546
|
type AjaxResultParams = {
|
|
@@ -910,7 +910,7 @@ declare const EnumAppStatus: {
|
|
|
910
910
|
readonly Local: "L";
|
|
911
911
|
readonly Subscription: "S";
|
|
912
912
|
};
|
|
913
|
-
declare const StatusDescriptions: Record<typeof EnumAppStatus[keyof typeof EnumAppStatus], string>;
|
|
913
|
+
declare const StatusDescriptions: Record<(typeof EnumAppStatus)[keyof typeof EnumAppStatus], string>;
|
|
914
914
|
type TypeEnumAppStatus = keyof typeof EnumAppStatus;
|
|
915
915
|
/**
|
|
916
916
|
* @link https://dev.1c-bitrix.ru/rest_help/general/app_info.php
|
|
@@ -1487,7 +1487,7 @@ declare class IbanSpecification {
|
|
|
1487
1487
|
private _cachedRegex;
|
|
1488
1488
|
constructor(countryCode: string, length: number, structure: string, example: string);
|
|
1489
1489
|
/**
|
|
1490
|
-
* Check if the passed iban is valid according to this specification.
|
|
1490
|
+
* Check if the passed iban is valid, according to this specification.
|
|
1491
1491
|
*
|
|
1492
1492
|
* @param {String} iban the iban to validate
|
|
1493
1493
|
* @returns {boolean} true if valid, false otherwise
|
|
@@ -1512,11 +1512,11 @@ declare class IbanSpecification {
|
|
|
1512
1512
|
fromBBAN(bban: string): string;
|
|
1513
1513
|
/**
|
|
1514
1514
|
* Check of the passed BBAN is valid.
|
|
1515
|
-
* This function only checks the format of the BBAN (length and
|
|
1515
|
+
* This function only checks the format of the BBAN (length and compliance with alphanumeric specifications) but does not
|
|
1516
1516
|
* verify the check digit.
|
|
1517
1517
|
*
|
|
1518
1518
|
* @param bban the BBAN to validate
|
|
1519
|
-
* @returns {boolean} true if the passed bban is a valid BBAN according to this specification, false otherwise
|
|
1519
|
+
* @returns {boolean} true if the passed bban is a valid BBAN, according to this specification, false otherwise
|
|
1520
1520
|
*/
|
|
1521
1521
|
isValidBBAN(bban: string): boolean;
|
|
1522
1522
|
/**
|
|
@@ -1525,9 +1525,11 @@ declare class IbanSpecification {
|
|
|
1525
1525
|
private _regex;
|
|
1526
1526
|
/**
|
|
1527
1527
|
* Parse the BBAN structure used to configure each IBAN Specification and returns a matching regular expression.
|
|
1528
|
-
* A structure is composed of blocks of
|
|
1529
|
-
*
|
|
1530
|
-
*
|
|
1528
|
+
* A structure is composed of blocks of three characters (one letter and two digits).
|
|
1529
|
+
* Each block represents
|
|
1530
|
+
* a logical group in the typical representation of the BBAN.
|
|
1531
|
+
* For each group, the letter indicates which characters
|
|
1532
|
+
* are allowed in this group, and the following 2-digits number tells the length of the group.
|
|
1531
1533
|
*
|
|
1532
1534
|
* @param {string} structure the structure to parse
|
|
1533
1535
|
* @returns {RegExp}
|
|
@@ -1542,7 +1544,7 @@ declare class IbanSpecification {
|
|
|
1542
1544
|
*/
|
|
1543
1545
|
private _iso13616Prepare;
|
|
1544
1546
|
/**
|
|
1545
|
-
* Calculates
|
|
1547
|
+
* Calculates MOD 97 10 of the passed IBAN as specified in ISO7064.
|
|
1546
1548
|
*
|
|
1547
1549
|
* @param iban
|
|
1548
1550
|
* @returns {number}
|
|
@@ -1690,11 +1692,11 @@ declare class AppFrame {
|
|
|
1690
1692
|
*/
|
|
1691
1693
|
getAppSid(): string;
|
|
1692
1694
|
/**
|
|
1693
|
-
* Get the account address BX24 (
|
|
1695
|
+
* Get the account address BX24 (https://name.bitrix24.com)
|
|
1694
1696
|
*/
|
|
1695
1697
|
getTargetOrigin(): string;
|
|
1696
1698
|
/**
|
|
1697
|
-
* Get the account address BX24 with Path (
|
|
1699
|
+
* Get the account address BX24 with Path (https://name.bitrix24.com/rest)
|
|
1698
1700
|
*/
|
|
1699
1701
|
getTargetOriginWithPath(): string;
|
|
1700
1702
|
/**
|
|
@@ -2339,7 +2341,7 @@ declare class OptionsManager extends AbstractHelper {
|
|
|
2339
2341
|
*/
|
|
2340
2342
|
initData(data: any): Promise<void>;
|
|
2341
2343
|
getJsonArray(key: string, defValue?: any[]): any[];
|
|
2342
|
-
getJsonObject(key: string, defValue?:
|
|
2344
|
+
getJsonObject(key: string, defValue?: object): object;
|
|
2343
2345
|
getFloat(key: string, defValue?: number): number;
|
|
2344
2346
|
getInteger(key: string, defValue?: number): number;
|
|
2345
2347
|
getBoolYN(key: string, defValue?: boolean): boolean;
|
|
@@ -2387,7 +2389,7 @@ declare class B24HelperManager {
|
|
|
2387
2389
|
get isInit(): boolean;
|
|
2388
2390
|
get forB24Form(): TypeB24Form;
|
|
2389
2391
|
/**
|
|
2390
|
-
* Get the account address BX24 (
|
|
2392
|
+
* Get the account address BX24 (https://name.bitrix24.com)
|
|
2391
2393
|
*/
|
|
2392
2394
|
get hostName(): string;
|
|
2393
2395
|
get profileInfo(): ProfileManager;
|
|
@@ -2400,7 +2402,7 @@ declare class B24HelperManager {
|
|
|
2400
2402
|
get isSelfHosted(): boolean;
|
|
2401
2403
|
/**
|
|
2402
2404
|
* Returns the increment step of fields of type ID
|
|
2403
|
-
* @memo in cloud step = 2 in box step = 1
|
|
2405
|
+
* @memo in a cloud step = 2 in box step = 1
|
|
2404
2406
|
*
|
|
2405
2407
|
* @returns {number}
|
|
2406
2408
|
*/
|
|
@@ -2468,7 +2470,6 @@ declare class PullClient implements ConnectorParent {
|
|
|
2468
2470
|
private _jsonRpcAdapter;
|
|
2469
2471
|
/**
|
|
2470
2472
|
* @depricate
|
|
2471
|
-
* @private
|
|
2472
2473
|
*/
|
|
2473
2474
|
private _checkInterval;
|
|
2474
2475
|
private _offlineTimeout;
|
|
@@ -2481,79 +2482,54 @@ declare class PullClient implements ConnectorParent {
|
|
|
2481
2482
|
private _connectPromise;
|
|
2482
2483
|
private _startingPromise;
|
|
2483
2484
|
/**
|
|
2484
|
-
* @done
|
|
2485
2485
|
* @param params
|
|
2486
2486
|
*/
|
|
2487
2487
|
constructor(params: TypePullClientParams);
|
|
2488
2488
|
setLogger(logger: LoggerBrowser): void;
|
|
2489
2489
|
getLogger(): LoggerBrowser;
|
|
2490
2490
|
destroy(): void;
|
|
2491
|
-
/**
|
|
2492
|
-
* @done
|
|
2493
|
-
* @private
|
|
2494
|
-
*/
|
|
2495
2491
|
private init;
|
|
2496
|
-
/**
|
|
2497
|
-
* @done
|
|
2498
|
-
*/
|
|
2499
2492
|
get connector(): null | TypeConnector;
|
|
2500
|
-
/**
|
|
2501
|
-
* @done
|
|
2502
|
-
*/
|
|
2503
2493
|
get status(): PullStatus;
|
|
2504
2494
|
/**
|
|
2505
|
-
* @done
|
|
2506
2495
|
* @param status
|
|
2507
2496
|
*/
|
|
2508
2497
|
set status(status: PullStatus);
|
|
2509
2498
|
get session(): TypePullClientSession;
|
|
2510
2499
|
/**
|
|
2511
|
-
* @done
|
|
2512
2500
|
* Creates a subscription to incoming messages.
|
|
2513
2501
|
*
|
|
2514
2502
|
* @param {TypeSubscriptionOptions | TypeSubscriptionCommandHandler} params
|
|
2515
|
-
* @returns {
|
|
2503
|
+
* @returns { () => void } - Unsubscribe callback function
|
|
2516
2504
|
*/
|
|
2517
|
-
subscribe(params: TypeSubscriptionOptions | TypeSubscriptionCommandHandler):
|
|
2505
|
+
subscribe(params: TypeSubscriptionOptions | TypeSubscriptionCommandHandler): () => void;
|
|
2518
2506
|
/**
|
|
2519
|
-
* @done
|
|
2520
2507
|
* @param {TypeSubscriptionCommandHandler} handler
|
|
2521
|
-
* @returns {
|
|
2508
|
+
* @returns {() => void} - Unsubscribe callback function
|
|
2522
2509
|
*/
|
|
2523
2510
|
private attachCommandHandler;
|
|
2524
2511
|
/**
|
|
2525
|
-
* @done
|
|
2526
2512
|
* @param config
|
|
2527
2513
|
*/
|
|
2528
|
-
start(config?: null | TypePullClientConfig & {
|
|
2514
|
+
start(config?: null | (TypePullClientConfig & {
|
|
2529
2515
|
skipReconnectToLastSession?: boolean;
|
|
2530
|
-
}): Promise<boolean>;
|
|
2516
|
+
})): Promise<boolean>;
|
|
2531
2517
|
/**
|
|
2532
|
-
* @done
|
|
2533
2518
|
* @param disconnectCode
|
|
2534
2519
|
* @param disconnectReason
|
|
2535
2520
|
*/
|
|
2536
2521
|
restart(disconnectCode?: number | CloseReasons, disconnectReason?: string): void;
|
|
2537
|
-
/**
|
|
2538
|
-
* @done
|
|
2539
|
-
*/
|
|
2540
2522
|
stop(disconnectCode?: number | CloseReasons, disconnectReason?: string): void;
|
|
2541
|
-
/**
|
|
2542
|
-
* @done
|
|
2543
|
-
*/
|
|
2544
2523
|
reconnect(disconnectCode: number | CloseReasons, disconnectReason: string, delay?: number): void;
|
|
2545
2524
|
/**
|
|
2546
|
-
* @done
|
|
2547
2525
|
* @param lastMessageId
|
|
2548
2526
|
*/
|
|
2549
2527
|
setLastMessageId(lastMessageId: string): void;
|
|
2550
2528
|
/**
|
|
2551
|
-
*
|
|
2552
|
-
*
|
|
2553
|
-
* Send single message to the specified users.
|
|
2529
|
+
* Send a single message to the specified users.
|
|
2554
2530
|
*
|
|
2555
2531
|
* @param users User ids of the message receivers.
|
|
2556
|
-
* @param moduleId Name of the module to receive message,
|
|
2532
|
+
* @param moduleId Name of the module to receive a message,
|
|
2557
2533
|
* @param command Command name.
|
|
2558
2534
|
* @param {object} params Command parameters.
|
|
2559
2535
|
* @param [expiry] Message expiry time in seconds.
|
|
@@ -2561,11 +2537,10 @@ declare class PullClient implements ConnectorParent {
|
|
|
2561
2537
|
*/
|
|
2562
2538
|
sendMessage(users: number[], moduleId: string, command: string, params: any, expiry?: number): Promise<any>;
|
|
2563
2539
|
/**
|
|
2564
|
-
*
|
|
2565
|
-
* Send single message to the specified public channels.
|
|
2540
|
+
* Send a single message to the specified public channels.
|
|
2566
2541
|
*
|
|
2567
|
-
* @param publicChannels Public ids of the channels to receive message.
|
|
2568
|
-
* @param moduleId Name of the module to receive message,
|
|
2542
|
+
* @param publicChannels Public ids of the channels to receive a message.
|
|
2543
|
+
* @param moduleId Name of the module to receive a message,
|
|
2569
2544
|
* @param command Command name.
|
|
2570
2545
|
* @param {object} params Command parameters.
|
|
2571
2546
|
* @param [expiry] Message expiry time in seconds.
|
|
@@ -2573,12 +2548,10 @@ declare class PullClient implements ConnectorParent {
|
|
|
2573
2548
|
*/
|
|
2574
2549
|
sendMessageToChannels(publicChannels: string[], moduleId: string, command: string, params: any, expiry?: number): Promise<any>;
|
|
2575
2550
|
/**
|
|
2576
|
-
* @done
|
|
2577
2551
|
* @param debugFlag
|
|
2578
2552
|
*/
|
|
2579
2553
|
capturePullEvent(debugFlag?: boolean): void;
|
|
2580
2554
|
/**
|
|
2581
|
-
* @done
|
|
2582
2555
|
* @param loggingFlag
|
|
2583
2556
|
*/
|
|
2584
2557
|
enableLogging(loggingFlag?: boolean): void;
|
|
@@ -2589,57 +2562,40 @@ declare class PullClient implements ConnectorParent {
|
|
|
2589
2562
|
*/
|
|
2590
2563
|
listChannels(): Promise<any>;
|
|
2591
2564
|
/**
|
|
2592
|
-
*
|
|
2593
|
-
*
|
|
2565
|
+
* Returns "last seen" time in seconds for the users.
|
|
2566
|
+
* Result format: Object{userId: int}
|
|
2594
2567
|
* If the user is currently connected - will return 0.
|
|
2595
|
-
* If the user
|
|
2596
|
-
* If the user was never online - the record for user will be missing from the result object.
|
|
2568
|
+
* If the user is offline - will return the diff between the current timestamp and the last seen timestamp in seconds.
|
|
2569
|
+
* If the user was never online - the record for the user will be missing from the result object.
|
|
2597
2570
|
*
|
|
2598
2571
|
* @param {integer[]} userList List of user ids.
|
|
2599
2572
|
* @returns {Promise}
|
|
2600
2573
|
*/
|
|
2601
2574
|
getUsersLastSeen(userList: number[]): Promise<Record<number, number>>;
|
|
2602
2575
|
/**
|
|
2603
|
-
*
|
|
2604
|
-
*
|
|
2576
|
+
* Pings server.
|
|
2577
|
+
* In case of success promise will be resolved, otherwise - rejected.
|
|
2605
2578
|
*
|
|
2606
2579
|
* @param {number} timeout Request timeout in seconds
|
|
2607
2580
|
* @returns {Promise}
|
|
2608
2581
|
*/
|
|
2609
2582
|
ping(timeout?: number): Promise<void>;
|
|
2610
2583
|
/**
|
|
2611
|
-
* @done
|
|
2612
2584
|
* @param userId {number}
|
|
2613
2585
|
* @param callback {UserStatusCallback}
|
|
2614
2586
|
* @returns {Promise}
|
|
2615
2587
|
*/
|
|
2616
2588
|
subscribeUserStatusChange(userId: number, callback: UserStatusCallback): Promise<void>;
|
|
2617
2589
|
/**
|
|
2618
|
-
* @done
|
|
2619
2590
|
* @param {number} userId
|
|
2620
2591
|
* @param {UserStatusCallback} callback
|
|
2621
2592
|
* @returns {Promise}
|
|
2622
2593
|
*/
|
|
2623
2594
|
unsubscribeUserStatusChange(userId: number, callback: UserStatusCallback): Promise<void>;
|
|
2624
|
-
/**
|
|
2625
|
-
* @done
|
|
2626
|
-
*/
|
|
2627
2595
|
getRevision(): number | null;
|
|
2628
|
-
/**
|
|
2629
|
-
* @done
|
|
2630
|
-
*/
|
|
2631
2596
|
getServerVersion(): number;
|
|
2632
|
-
/**
|
|
2633
|
-
* @done
|
|
2634
|
-
*/
|
|
2635
2597
|
getServerMode(): string | null;
|
|
2636
|
-
/**
|
|
2637
|
-
* @done
|
|
2638
|
-
*/
|
|
2639
2598
|
getConfig(): null | TypePullClientConfig;
|
|
2640
|
-
/**
|
|
2641
|
-
* @done
|
|
2642
|
-
*/
|
|
2643
2599
|
getDebugInfo(): any;
|
|
2644
2600
|
/**
|
|
2645
2601
|
* @process
|
|
@@ -2650,44 +2606,16 @@ declare class PullClient implements ConnectorParent {
|
|
|
2650
2606
|
* @process
|
|
2651
2607
|
*/
|
|
2652
2608
|
getPublicationPath(): string;
|
|
2653
|
-
/**
|
|
2654
|
-
* @done
|
|
2655
|
-
*/
|
|
2656
2609
|
isConnected(): boolean;
|
|
2657
|
-
/**
|
|
2658
|
-
* @done
|
|
2659
|
-
*/
|
|
2660
2610
|
isWebSocketSupported(): boolean;
|
|
2661
|
-
/**
|
|
2662
|
-
* @done
|
|
2663
|
-
*/
|
|
2664
2611
|
isWebSocketAllowed(): boolean;
|
|
2665
|
-
/**
|
|
2666
|
-
* @done
|
|
2667
|
-
*/
|
|
2668
2612
|
isWebSocketEnabled(): boolean;
|
|
2669
|
-
/**
|
|
2670
|
-
* @done
|
|
2671
|
-
*/
|
|
2672
2613
|
isPublishingSupported(): boolean;
|
|
2673
|
-
/**
|
|
2674
|
-
* @done
|
|
2675
|
-
*/
|
|
2676
2614
|
isPublishingEnabled(): boolean;
|
|
2677
|
-
/**
|
|
2678
|
-
* @done
|
|
2679
|
-
*/
|
|
2680
2615
|
isProtobufSupported(): boolean;
|
|
2681
|
-
/**
|
|
2682
|
-
* @done
|
|
2683
|
-
*/
|
|
2684
2616
|
isJsonRpc(): boolean;
|
|
2685
|
-
/**
|
|
2686
|
-
* @done
|
|
2687
|
-
*/
|
|
2688
2617
|
isSharedMode(): boolean;
|
|
2689
2618
|
/**
|
|
2690
|
-
* @dones
|
|
2691
2619
|
* @param {TypePullClientEmitConfig} params
|
|
2692
2620
|
* @returns {boolean}
|
|
2693
2621
|
*/
|
|
@@ -2696,18 +2624,15 @@ declare class PullClient implements ConnectorParent {
|
|
|
2696
2624
|
* @process
|
|
2697
2625
|
*
|
|
2698
2626
|
* @param message
|
|
2699
|
-
* @private
|
|
2700
2627
|
*/
|
|
2701
2628
|
private broadcastMessage;
|
|
2702
2629
|
/**
|
|
2703
2630
|
* @process
|
|
2704
2631
|
*
|
|
2705
2632
|
* @param messages
|
|
2706
|
-
* @private
|
|
2707
2633
|
*/
|
|
2708
2634
|
private broadcastMessages;
|
|
2709
2635
|
/**
|
|
2710
|
-
* @done
|
|
2711
2636
|
* Sends batch of messages to the multiple public channels.
|
|
2712
2637
|
*
|
|
2713
2638
|
* @param messageBatchList Array of messages to send.
|
|
@@ -2715,123 +2640,70 @@ declare class PullClient implements ConnectorParent {
|
|
|
2715
2640
|
*/
|
|
2716
2641
|
private sendMessageBatch;
|
|
2717
2642
|
/**
|
|
2718
|
-
* @done
|
|
2719
2643
|
* @param messageBatchList
|
|
2720
2644
|
* @param publicIds
|
|
2721
2645
|
*/
|
|
2722
2646
|
private encodeMessageBatch;
|
|
2723
2647
|
/**
|
|
2724
|
-
* @done
|
|
2725
2648
|
* @memo fix return type
|
|
2726
2649
|
* @param users
|
|
2727
2650
|
* @param publicIds
|
|
2728
2651
|
*/
|
|
2729
2652
|
private createMessageReceivers;
|
|
2730
2653
|
/**
|
|
2731
|
-
* @done
|
|
2732
2654
|
* @param userId
|
|
2733
2655
|
* @param isOnline
|
|
2734
|
-
* @private
|
|
2735
2656
|
*/
|
|
2736
2657
|
private emitUserStatusChange;
|
|
2737
|
-
/**
|
|
2738
|
-
* @done
|
|
2739
|
-
* @private
|
|
2740
|
-
*/
|
|
2741
2658
|
private restoreUserStatusSubscription;
|
|
2742
2659
|
/**
|
|
2743
|
-
* @done
|
|
2744
|
-
*
|
|
2745
2660
|
* @param logTag
|
|
2746
|
-
* @private
|
|
2747
2661
|
*/
|
|
2748
2662
|
private loadConfig;
|
|
2749
2663
|
/**
|
|
2750
|
-
* @done
|
|
2751
2664
|
* @param config
|
|
2752
2665
|
*/
|
|
2753
2666
|
private isConfigActual;
|
|
2754
|
-
/**
|
|
2755
|
-
* @done
|
|
2756
|
-
* @private
|
|
2757
|
-
*/
|
|
2758
2667
|
private startCheckConfig;
|
|
2759
|
-
/**
|
|
2760
|
-
* @done
|
|
2761
|
-
*/
|
|
2762
2668
|
private stopCheckConfig;
|
|
2763
|
-
/**
|
|
2764
|
-
* @done
|
|
2765
|
-
* @private
|
|
2766
|
-
*/
|
|
2767
2669
|
private checkConfig;
|
|
2768
2670
|
/**
|
|
2769
|
-
* @done
|
|
2770
|
-
*
|
|
2771
2671
|
* @param config
|
|
2772
2672
|
* @param allowCaching
|
|
2773
|
-
* @private
|
|
2774
2673
|
*/
|
|
2775
2674
|
private setConfig;
|
|
2776
|
-
/**
|
|
2777
|
-
* @done
|
|
2778
|
-
*/
|
|
2779
2675
|
private setPublicIds;
|
|
2780
2676
|
/**
|
|
2781
|
-
* @done
|
|
2782
2677
|
* @param serverRevision
|
|
2783
|
-
* @private
|
|
2784
2678
|
*/
|
|
2785
2679
|
private checkRevision;
|
|
2786
|
-
/**
|
|
2787
|
-
* @done
|
|
2788
|
-
*/
|
|
2789
2680
|
private disconnect;
|
|
2790
|
-
/**
|
|
2791
|
-
* @done
|
|
2792
|
-
*/
|
|
2793
2681
|
private restoreWebSocketConnection;
|
|
2794
2682
|
/**
|
|
2795
|
-
* @done
|
|
2796
2683
|
* @param connectionDelay
|
|
2797
|
-
* @private
|
|
2798
2684
|
*/
|
|
2799
2685
|
private scheduleReconnect;
|
|
2800
|
-
/**
|
|
2801
|
-
* @done
|
|
2802
|
-
* @private
|
|
2803
|
-
*/
|
|
2804
2686
|
private scheduleRestoreWebSocketConnection;
|
|
2805
2687
|
/**
|
|
2806
|
-
* @done
|
|
2807
2688
|
* @returns {Promise}
|
|
2808
2689
|
*/
|
|
2809
2690
|
private connect;
|
|
2810
2691
|
/**
|
|
2811
|
-
* @done
|
|
2812
2692
|
* @param disconnectCode
|
|
2813
2693
|
* @param disconnectReason
|
|
2814
2694
|
* @param restartDelay
|
|
2815
|
-
* @private
|
|
2816
2695
|
*/
|
|
2817
2696
|
private scheduleRestart;
|
|
2818
2697
|
/**
|
|
2819
|
-
* @done
|
|
2820
|
-
*
|
|
2821
2698
|
* @param messageFields
|
|
2822
|
-
* @private
|
|
2823
2699
|
*/
|
|
2824
2700
|
private handleRpcIncomingMessage;
|
|
2825
2701
|
/**
|
|
2826
|
-
* @done
|
|
2827
2702
|
* @param events
|
|
2828
|
-
* @private
|
|
2829
2703
|
*/
|
|
2830
2704
|
private handleIncomingEvents;
|
|
2831
2705
|
/**
|
|
2832
|
-
* @done
|
|
2833
2706
|
* @param event
|
|
2834
|
-
* @private
|
|
2835
2707
|
*/
|
|
2836
2708
|
private updateSessionFromEvent;
|
|
2837
2709
|
/**
|
|
@@ -2839,150 +2711,89 @@ declare class PullClient implements ConnectorParent {
|
|
|
2839
2711
|
*
|
|
2840
2712
|
* @param command
|
|
2841
2713
|
* @param message
|
|
2842
|
-
* @private
|
|
2843
2714
|
*/
|
|
2844
2715
|
private handleInternalPullEvent;
|
|
2845
2716
|
/**
|
|
2846
|
-
* @done
|
|
2847
2717
|
* @param response
|
|
2848
|
-
* @private
|
|
2849
2718
|
*/
|
|
2850
2719
|
private onIncomingMessage;
|
|
2851
|
-
/**
|
|
2852
|
-
* @done
|
|
2853
|
-
*/
|
|
2854
2720
|
private onLongPollingOpen;
|
|
2855
2721
|
/**
|
|
2856
|
-
* @done
|
|
2857
2722
|
* @param response
|
|
2858
|
-
* @private
|
|
2859
2723
|
*/
|
|
2860
2724
|
private onLongPollingDisconnect;
|
|
2861
2725
|
/**
|
|
2862
|
-
* @done
|
|
2863
2726
|
* @param error
|
|
2864
2727
|
*/
|
|
2865
2728
|
private onLongPollingError;
|
|
2866
2729
|
/**
|
|
2867
|
-
* @done
|
|
2868
2730
|
* @param response
|
|
2869
|
-
* @private
|
|
2870
2731
|
*/
|
|
2871
2732
|
private onWebSocketBlockChanged;
|
|
2872
|
-
/**
|
|
2873
|
-
* @done
|
|
2874
|
-
*/
|
|
2875
2733
|
private onWebSocketOpen;
|
|
2876
2734
|
/**
|
|
2877
|
-
* @done
|
|
2878
2735
|
* @param response
|
|
2879
|
-
* @private
|
|
2880
2736
|
*/
|
|
2881
2737
|
private onWebSocketDisconnect;
|
|
2882
2738
|
/**
|
|
2883
|
-
* @done
|
|
2884
2739
|
* @param error
|
|
2885
2740
|
*/
|
|
2886
2741
|
private onWebSocketError;
|
|
2887
2742
|
/**
|
|
2888
|
-
* @done
|
|
2889
2743
|
* @param pullEvent
|
|
2890
|
-
* @private
|
|
2891
2744
|
*/
|
|
2892
2745
|
private extractMessages;
|
|
2893
2746
|
/**
|
|
2894
|
-
* @done
|
|
2895
2747
|
* @param pullEvent
|
|
2896
|
-
* @private
|
|
2897
2748
|
*/
|
|
2898
2749
|
private extractProtobufMessages;
|
|
2899
2750
|
/**
|
|
2900
|
-
* @done
|
|
2901
2751
|
* @param pullEvent
|
|
2902
|
-
* @private
|
|
2903
2752
|
*/
|
|
2904
2753
|
private extractPlainTextMessages;
|
|
2905
2754
|
/**
|
|
2906
|
-
* @done
|
|
2907
2755
|
* Converts message id from byte[] to string
|
|
2908
2756
|
* @param {Uint8Array} encodedId
|
|
2909
2757
|
* @return {string}
|
|
2910
2758
|
*/
|
|
2911
2759
|
private decodeId;
|
|
2912
2760
|
/**
|
|
2913
|
-
* @done
|
|
2914
2761
|
* Converts message id from hex-encoded string to byte[]
|
|
2915
2762
|
* @param {string} id Hex-encoded string.
|
|
2916
2763
|
* @return {Uint8Array}
|
|
2917
2764
|
*/
|
|
2918
2765
|
private encodeId;
|
|
2919
|
-
/**
|
|
2920
|
-
* @done
|
|
2921
|
-
*/
|
|
2922
2766
|
private onOffline;
|
|
2923
|
-
/**
|
|
2924
|
-
* @done
|
|
2925
|
-
*/
|
|
2926
2767
|
private onOnline;
|
|
2927
|
-
/**
|
|
2928
|
-
* @done
|
|
2929
|
-
* @private
|
|
2930
|
-
*/
|
|
2931
2768
|
private onBeforeUnload;
|
|
2932
2769
|
/**
|
|
2933
|
-
* @done
|
|
2934
2770
|
* @param status
|
|
2935
2771
|
* @param delay
|
|
2936
|
-
* @private
|
|
2937
2772
|
*/
|
|
2938
2773
|
private sendPullStatusDelayed;
|
|
2939
2774
|
/**
|
|
2940
|
-
* @done
|
|
2941
2775
|
* @param status
|
|
2942
|
-
* @private
|
|
2943
2776
|
*/
|
|
2944
2777
|
private sendPullStatus;
|
|
2945
2778
|
/**
|
|
2946
|
-
* @
|
|
2947
|
-
* @memo if private ?
|
|
2779
|
+
* @memo if private?
|
|
2948
2780
|
* @param tagId
|
|
2949
2781
|
* @param force
|
|
2950
2782
|
*/
|
|
2951
2783
|
private extendWatch;
|
|
2952
2784
|
/**
|
|
2953
|
-
* @done
|
|
2954
2785
|
* @param force
|
|
2955
|
-
* @private
|
|
2956
2786
|
*/
|
|
2957
2787
|
private updateWatch;
|
|
2958
2788
|
/**
|
|
2959
|
-
* @done
|
|
2960
2789
|
* @param tagId
|
|
2961
|
-
* @private
|
|
2962
2790
|
*/
|
|
2963
2791
|
private clearWatch;
|
|
2964
|
-
/**
|
|
2965
|
-
* @done
|
|
2966
|
-
* @private
|
|
2967
|
-
*/
|
|
2968
2792
|
private onJsonRpcPing;
|
|
2969
|
-
/**
|
|
2970
|
-
* @done
|
|
2971
|
-
* @private
|
|
2972
|
-
*/
|
|
2973
2793
|
private updatePingWaitTimeout;
|
|
2974
|
-
/**
|
|
2975
|
-
* @done
|
|
2976
|
-
* @private
|
|
2977
|
-
*/
|
|
2978
2794
|
private clearPingWaitTimeout;
|
|
2979
|
-
/**
|
|
2980
|
-
* @done
|
|
2981
|
-
* @private
|
|
2982
|
-
*/
|
|
2983
2795
|
private onPingTimeout;
|
|
2984
2796
|
/**
|
|
2985
|
-
* @done
|
|
2986
2797
|
* Returns reconnect delay in seconds
|
|
2987
2798
|
*
|
|
2988
2799
|
* @param attemptNumber
|
|
@@ -2990,43 +2801,30 @@ declare class PullClient implements ConnectorParent {
|
|
|
2990
2801
|
*/
|
|
2991
2802
|
private getConnectionAttemptDelay;
|
|
2992
2803
|
/**
|
|
2993
|
-
* @done
|
|
2994
2804
|
* @param mid
|
|
2995
2805
|
*/
|
|
2996
2806
|
private checkDuplicate;
|
|
2997
|
-
/**
|
|
2998
|
-
* @done
|
|
2999
|
-
*/
|
|
3000
2807
|
private trimDuplicates;
|
|
3001
2808
|
/**
|
|
3002
|
-
* @done
|
|
3003
2809
|
* @param message
|
|
3004
|
-
* @private
|
|
3005
2810
|
*/
|
|
3006
2811
|
private logMessage;
|
|
3007
2812
|
/**
|
|
3008
|
-
* @done
|
|
3009
2813
|
* @param message
|
|
3010
2814
|
* @param force
|
|
3011
|
-
* @private
|
|
3012
2815
|
*/
|
|
3013
2816
|
private logToConsole;
|
|
3014
2817
|
/**
|
|
3015
|
-
* @done
|
|
3016
2818
|
* @param message
|
|
3017
|
-
* @private
|
|
3018
2819
|
*/
|
|
3019
2820
|
private addMessageToStat;
|
|
3020
2821
|
/**
|
|
3021
|
-
* @done
|
|
3022
|
-
*
|
|
3023
2822
|
* @param text
|
|
3024
2823
|
*/
|
|
3025
2824
|
private showNotification;
|
|
3026
2825
|
/**
|
|
3027
|
-
* @
|
|
3028
|
-
* @memo
|
|
3029
|
-
* @memo wtf ? force
|
|
2826
|
+
* @memo may be need to use onCustomEvent
|
|
2827
|
+
* @memo ? force
|
|
3030
2828
|
*/
|
|
3031
2829
|
private onCustomEvent;
|
|
3032
2830
|
}
|