@busy-app/busy-lib 0.14.2 → 0.15.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/index.cjs +1551 -1551
- package/dist/index.d.ts +27 -3
- package/dist/index.js +1831 -1809
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -170,9 +170,14 @@ export declare enum AuthStatus {
|
|
|
170
170
|
UNAUTHENTICATED = "UNAUTHENTICATED",
|
|
171
171
|
AUTHENTICATING = "AUTHENTICATING",
|
|
172
172
|
AUTHENTICATED = "AUTHENTICATED",
|
|
173
|
+
REAUTHENTICATING = "REAUTHENTICATING",
|
|
173
174
|
FAILED = "FAILED"
|
|
174
175
|
}
|
|
175
176
|
|
|
177
|
+
export declare interface AuthStatusComponent extends StatusComponent<AuthStatus> {
|
|
178
|
+
attempts?: number;
|
|
179
|
+
}
|
|
180
|
+
|
|
176
181
|
declare interface AutoUpdateParams extends TimeoutOptions, AutoUpdateSettings {
|
|
177
182
|
}
|
|
178
183
|
|
|
@@ -188,6 +193,9 @@ declare abstract class BaseStateStream {
|
|
|
188
193
|
protected isBinary: boolean;
|
|
189
194
|
protected connectTimeout: number;
|
|
190
195
|
protected dataTimeout: number;
|
|
196
|
+
protected maxReconnectAttempts: number;
|
|
197
|
+
protected maxAuthAttempts: number;
|
|
198
|
+
protected reconnectDelay: number;
|
|
191
199
|
protected abstract streamMode: StreamMode;
|
|
192
200
|
private worker;
|
|
193
201
|
private connectionTimer;
|
|
@@ -1722,6 +1730,10 @@ export declare enum ConnectionStatus {
|
|
|
1722
1730
|
RECONNECTING = "RECONNECTING"
|
|
1723
1731
|
}
|
|
1724
1732
|
|
|
1733
|
+
export declare interface ConnectionStatusComponent extends StatusComponent<ConnectionStatus> {
|
|
1734
|
+
attempts?: number;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1725
1737
|
declare type ConnectParams = RequireKeys<Omit<WifiConnectRequestConfig, 'ip_config'> & {
|
|
1726
1738
|
ip_config: RequiredIpConfig;
|
|
1727
1739
|
}, 'ssid' | 'security' | 'ip_config'> & TimeoutOptions;
|
|
@@ -5170,7 +5182,8 @@ export declare type RemoteState = Prettify<{
|
|
|
5170
5182
|
export declare class RemoteStateStream extends BaseStateStream {
|
|
5171
5183
|
protected streamMode: StreamMode;
|
|
5172
5184
|
private tokenProvider?;
|
|
5173
|
-
|
|
5185
|
+
protected maxAuthAttempts: number;
|
|
5186
|
+
constructor(options: RemoteStreamOptions, config?: RemoteStreamConfig);
|
|
5174
5187
|
/**
|
|
5175
5188
|
* Subscribes to updates for a specific device GUID.
|
|
5176
5189
|
*/
|
|
@@ -5190,6 +5203,10 @@ export declare class RemoteStateStream extends BaseStateStream {
|
|
|
5190
5203
|
protected onTokenExpired(): Promise<string> | void;
|
|
5191
5204
|
}
|
|
5192
5205
|
|
|
5206
|
+
export declare interface RemoteStreamConfig extends StreamConfig {
|
|
5207
|
+
maxAuthAttempts?: number;
|
|
5208
|
+
}
|
|
5209
|
+
|
|
5193
5210
|
/**
|
|
5194
5211
|
* Options for remote connections
|
|
5195
5212
|
*/
|
|
@@ -5486,6 +5503,8 @@ export declare interface StreamConfig {
|
|
|
5486
5503
|
timeout?: number;
|
|
5487
5504
|
/** Data inactivity timeout in milliseconds. Default: 15000ms */
|
|
5488
5505
|
dataTimeout?: number;
|
|
5506
|
+
maxReconnectAttempts?: number;
|
|
5507
|
+
reconnectDelay?: number;
|
|
5489
5508
|
}
|
|
5490
5509
|
|
|
5491
5510
|
/**
|
|
@@ -5518,8 +5537,8 @@ declare interface StreamOptions {
|
|
|
5518
5537
|
*/
|
|
5519
5538
|
export declare interface StreamStatus {
|
|
5520
5539
|
main: StatusComponent<StreamLifecycle>;
|
|
5521
|
-
connection:
|
|
5522
|
-
auth:
|
|
5540
|
+
connection: ConnectionStatusComponent;
|
|
5541
|
+
auth: AuthStatusComponent;
|
|
5523
5542
|
data: StatusComponent<DataStatus> & {
|
|
5524
5543
|
lastActivity?: number;
|
|
5525
5544
|
};
|
|
@@ -5817,6 +5836,9 @@ declare type WorkerCommand = {
|
|
|
5817
5836
|
token?: string;
|
|
5818
5837
|
isBinary: boolean;
|
|
5819
5838
|
mode: StreamMode;
|
|
5839
|
+
maxReconnectAttempts: number;
|
|
5840
|
+
maxAuthAttempts: number;
|
|
5841
|
+
reconnectDelay: number;
|
|
5820
5842
|
} | {
|
|
5821
5843
|
type: 'STOP';
|
|
5822
5844
|
} | {
|
|
@@ -5853,7 +5875,9 @@ declare type WorkerEvent = {
|
|
|
5853
5875
|
} | {
|
|
5854
5876
|
type: 'STATUS_UPDATE';
|
|
5855
5877
|
connection?: ConnectionStatus;
|
|
5878
|
+
connectionAttempts?: number;
|
|
5856
5879
|
auth?: AuthStatus;
|
|
5880
|
+
authAttempts?: number;
|
|
5857
5881
|
worker?: WorkerStatus;
|
|
5858
5882
|
};
|
|
5859
5883
|
|