@busy-app/busy-lib 0.11.0 → 0.13.0
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 +41 -1
- package/dist/index.d.ts +1386 -242
- package/dist/index.js +1189 -703
- package/dist/index.worker.cjs +11 -0
- package/dist/index.worker.d.ts +1 -0
- package/dist/index.worker.js +4025 -0
- package/dist/types.status-BeqxtQVd.cjs +1 -0
- package/dist/types.status-gCPe7MrJ.js +16 -0
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Client } from 'openapi-fetch';
|
|
1
|
+
import { Client as Client_2 } from 'openapi-fetch';
|
|
2
|
+
import Long_2 = require('long');
|
|
2
3
|
|
|
3
4
|
export declare type AccountInfo = components['schemas']['AccountInfo'];
|
|
4
5
|
|
|
@@ -18,9 +19,9 @@ declare class AccountMethods {
|
|
|
18
19
|
*
|
|
19
20
|
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
20
21
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
21
|
-
* @returns {Promise<
|
|
22
|
+
* @returns {Promise<AccountStatus>} A promise that resolves to the account state.
|
|
22
23
|
*/
|
|
23
|
-
AccountStateGet(this: BusyBar, params?: TimeoutOptions): Promise<
|
|
24
|
+
AccountStateGet(this: BusyBar, params?: TimeoutOptions): Promise<AccountStatus>;
|
|
24
25
|
/**
|
|
25
26
|
* Get account profile.
|
|
26
27
|
*
|
|
@@ -33,7 +34,8 @@ declare class AccountMethods {
|
|
|
33
34
|
* Set account profile.
|
|
34
35
|
*
|
|
35
36
|
* @param {SetAccountProfileParams} params - Parameters for setting the account profile.
|
|
36
|
-
* @param {string} params.profile - Profile
|
|
37
|
+
* @param {string} params.profile - Profile name.
|
|
38
|
+
* @param {string} [params.custom_url] - Custom profile URL.
|
|
37
39
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
38
40
|
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
39
41
|
*/
|
|
@@ -58,29 +60,31 @@ declare class AccountMethods {
|
|
|
58
60
|
|
|
59
61
|
export declare type AccountProfile = components['schemas']['AccountProfile'];
|
|
60
62
|
|
|
61
|
-
export declare interface AccountProfileSetParams extends TimeoutOptions {
|
|
62
|
-
profile: operations['setAccountProfile']['parameters']['query']['profile'];
|
|
63
|
+
export declare interface AccountProfileSetParams extends TimeoutOptions, AccountProfile {
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
export declare type
|
|
66
|
+
export declare type AccountStatus = components['schemas']['AccountStatus'];
|
|
67
|
+
|
|
68
|
+
export declare type AnimationElement = components['schemas']['AnimationElement'];
|
|
66
69
|
|
|
67
70
|
declare type ApiKey = string;
|
|
68
71
|
|
|
69
72
|
declare type ApiSemver = components['schemas']['VersionInfo']['api_semver'];
|
|
70
73
|
|
|
71
|
-
export declare interface AssetsDeleteParams extends TimeoutOptions {
|
|
72
|
-
appId: paths['/assets/upload']['delete']['parameters']['query']['app_id'];
|
|
74
|
+
export declare interface AssetsDeleteParams extends TimeoutOptions, AssetsDeleteQuery {
|
|
73
75
|
}
|
|
74
76
|
|
|
77
|
+
declare type AssetsDeleteQuery = operations['deleteAppAssets']['parameters']['query'];
|
|
78
|
+
|
|
75
79
|
declare class AssetsMethods {
|
|
76
80
|
/**
|
|
77
81
|
* Upload asset file with app ID. Uploads a file to a specific app's assets directory.
|
|
78
82
|
*
|
|
79
83
|
* @param {UploadParams} params - Parameters for the upload.
|
|
80
|
-
* @param {
|
|
81
|
-
* @param {
|
|
82
|
-
* @param {
|
|
83
|
-
* @param {
|
|
84
|
+
* @param {string} params.application_name - Application name for organizing assets.
|
|
85
|
+
* @param {string} params.file - Filename for the uploaded asset.
|
|
86
|
+
* @param {BusyFile} params.data - File data to upload.
|
|
87
|
+
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
84
88
|
* @returns {Promise<SuccessResponse>} Result of the upload operation.
|
|
85
89
|
*/
|
|
86
90
|
AssetsUpload(this: BusyBar, params: AssetsUploadParams): Promise<SuccessResponse>;
|
|
@@ -88,25 +92,25 @@ declare class AssetsMethods {
|
|
|
88
92
|
* Delete app assets. Deletes all assets for a specific app ID.
|
|
89
93
|
*
|
|
90
94
|
* @param {DeleteParams} params - Parameters for the delete.
|
|
91
|
-
* @param {
|
|
92
|
-
* @param {
|
|
95
|
+
* @param {string} params.application_name - Application name whose assets should be deleted.
|
|
96
|
+
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
93
97
|
* @returns {Promise<SuccessResponse>} Result of the delete operation.
|
|
94
98
|
*/
|
|
95
99
|
AssetsDelete(this: BusyBar, params: AssetsDeleteParams): Promise<SuccessResponse>;
|
|
96
100
|
}
|
|
97
101
|
|
|
98
|
-
export declare interface AssetsUploadParams extends TimeoutOptions {
|
|
99
|
-
|
|
100
|
-
fileName: paths['/assets/upload']['post']['parameters']['query']['file'];
|
|
101
|
-
file: BusyFile;
|
|
102
|
+
export declare interface AssetsUploadParams extends TimeoutOptions, AssetsUploadQuery {
|
|
103
|
+
data: BusyFile_2;
|
|
102
104
|
}
|
|
103
105
|
|
|
106
|
+
declare type AssetsUploadQuery = operations['uploadAssetWithAppId']['parameters']['query'];
|
|
107
|
+
|
|
104
108
|
declare class AudioMethods {
|
|
105
109
|
/**
|
|
106
110
|
* Play audio file. Plays a file from internal storage.
|
|
107
111
|
*
|
|
108
112
|
* @param {AudioPlayParams} params - Parameters for audio playback.
|
|
109
|
-
* @param {string} params.
|
|
113
|
+
* @param {string} params.application_name - Application name.
|
|
110
114
|
* @param {string} params.path - Path to the audio file.
|
|
111
115
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
112
116
|
* @returns {Promise<SuccessResponse>} A promise that resolves on successful play command.
|
|
@@ -139,19 +143,129 @@ declare class AudioMethods {
|
|
|
139
143
|
AudioVolumeSet(this: BusyBar, params: AudioVolumeParams): Promise<SuccessResponse>;
|
|
140
144
|
}
|
|
141
145
|
|
|
142
|
-
export declare interface AudioPlayParams extends TimeoutOptions {
|
|
143
|
-
appId: paths['/audio/play']['post']['parameters']['query']['app_id'];
|
|
144
|
-
path: paths['/audio/play']['post']['parameters']['query']['path'];
|
|
146
|
+
export declare interface AudioPlayParams extends TimeoutOptions, AudioPlayQuery {
|
|
145
147
|
}
|
|
146
148
|
|
|
149
|
+
declare type AudioPlayQuery = operations['playAudio']['parameters']['query'];
|
|
150
|
+
|
|
147
151
|
export declare type AudioVolumeInfo = components['schemas']['AudioVolumeInfo'];
|
|
148
152
|
|
|
149
|
-
export declare interface AudioVolumeParams extends TimeoutOptions {
|
|
150
|
-
|
|
153
|
+
export declare interface AudioVolumeParams extends TimeoutOptions, AudioVolumeQuery {
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare type AudioVolumeQuery = operations['setAudioVolume']['parameters']['query'];
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Authentication progress (Handshake/Token refresh)
|
|
160
|
+
*/
|
|
161
|
+
export declare enum AuthStatus {
|
|
162
|
+
UNAUTHENTICATED = "UNAUTHENTICATED",
|
|
163
|
+
AUTHENTICATING = "AUTHENTICATING",
|
|
164
|
+
AUTHENTICATED = "AUTHENTICATED",
|
|
165
|
+
FAILED = "FAILED"
|
|
151
166
|
}
|
|
152
167
|
|
|
153
168
|
export declare type AutoUpdateSettings = components['schemas']['AutoupdateSettings'];
|
|
154
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Base class for all StateStream connections.
|
|
172
|
+
* Orchestrates worker communication and callback management.
|
|
173
|
+
*/
|
|
174
|
+
declare abstract class BaseStateStream {
|
|
175
|
+
protected addr: string;
|
|
176
|
+
protected token?: string;
|
|
177
|
+
protected isBinary: boolean;
|
|
178
|
+
protected connectTimeout: number;
|
|
179
|
+
protected dataTimeout: number;
|
|
180
|
+
protected abstract streamMode: StreamMode;
|
|
181
|
+
private worker;
|
|
182
|
+
private connectionTimer;
|
|
183
|
+
private dataTimer;
|
|
184
|
+
private _status;
|
|
185
|
+
get status(): StreamStatus;
|
|
186
|
+
/** Static map to deduplicate token refresh requests across all instances in this JS context */
|
|
187
|
+
private static tokenRefreshPromises;
|
|
188
|
+
protected dataCallback?: DataCallback;
|
|
189
|
+
protected rawDataCallback?: RawDataCallback;
|
|
190
|
+
protected errorCallback?: ErrorCallback_2;
|
|
191
|
+
protected statusCallback?: StatusCallback;
|
|
192
|
+
constructor(options: StreamOptions, config?: StreamConfig);
|
|
193
|
+
/**
|
|
194
|
+
* Transforms http/https to ws/wss and prefixes with auto-inferred protocol if no protocol present.
|
|
195
|
+
*/
|
|
196
|
+
protected resolveProtocol(addr: string): string;
|
|
197
|
+
/**
|
|
198
|
+
* Starts the stream connection.
|
|
199
|
+
* Throws an error if already running.
|
|
200
|
+
*/
|
|
201
|
+
start({ dataCallback, rawDataCallback, errorCallback, statusCallback }: {
|
|
202
|
+
dataCallback?: DataCallback;
|
|
203
|
+
rawDataCallback?: RawDataCallback;
|
|
204
|
+
errorCallback?: ErrorCallback_2;
|
|
205
|
+
statusCallback?: StatusCallback;
|
|
206
|
+
}): void;
|
|
207
|
+
/**
|
|
208
|
+
* Stops the stream connection.
|
|
209
|
+
*/
|
|
210
|
+
stop(): void;
|
|
211
|
+
/**
|
|
212
|
+
* Cleans up all resources.
|
|
213
|
+
*/
|
|
214
|
+
destroy(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Clears all registered callbacks.
|
|
217
|
+
*/
|
|
218
|
+
private clearCallbacks;
|
|
219
|
+
/**
|
|
220
|
+
* Sends a new token to the worker (for auth or token refresh).
|
|
221
|
+
*/
|
|
222
|
+
protected sendToken(token: string): void;
|
|
223
|
+
/**
|
|
224
|
+
* Subclasses must provide their own URL normalization.
|
|
225
|
+
*/
|
|
226
|
+
protected abstract normalizeUrl(addr: string): string;
|
|
227
|
+
/**
|
|
228
|
+
* Sends a command to the worker port.
|
|
229
|
+
*/
|
|
230
|
+
protected sendCommand(cmd: WorkerCommand): void;
|
|
231
|
+
private ensureWorker;
|
|
232
|
+
/**
|
|
233
|
+
* Processes messages from the worker.
|
|
234
|
+
*/
|
|
235
|
+
protected handleWorkerMessage(event: WorkerEvent): void;
|
|
236
|
+
/**
|
|
237
|
+
* Maps an error code to the corresponding status component
|
|
238
|
+
*/
|
|
239
|
+
private mapErrorToStatus;
|
|
240
|
+
/**
|
|
241
|
+
* Updates a single component of the status and notifies listeners
|
|
242
|
+
*/
|
|
243
|
+
private updateStatusComponent;
|
|
244
|
+
/**
|
|
245
|
+
* Safe timer cleanup
|
|
246
|
+
*/
|
|
247
|
+
private clearConnectionTimer;
|
|
248
|
+
/**
|
|
249
|
+
* Reset the data inactivity timer
|
|
250
|
+
*/
|
|
251
|
+
private resetDataTimer;
|
|
252
|
+
private clearDataTimer;
|
|
253
|
+
/**
|
|
254
|
+
* Normalizes the raw state from the worker into a ProcessedState for the UI.
|
|
255
|
+
* Extracts the 'state' key for each update and merges bar_id for remote mode.
|
|
256
|
+
*/
|
|
257
|
+
private normalizeState;
|
|
258
|
+
/**
|
|
259
|
+
* Internally deduplicates token refresh requests for the same address.
|
|
260
|
+
*/
|
|
261
|
+
private handleTokenExpiredInternal;
|
|
262
|
+
/**
|
|
263
|
+
* Hook for handling token expiration.
|
|
264
|
+
* Return a promise with the new token to enable deduplication.
|
|
265
|
+
*/
|
|
266
|
+
protected onTokenExpired?(): Promise<string> | void;
|
|
267
|
+
}
|
|
268
|
+
|
|
155
269
|
declare class BleMethods {
|
|
156
270
|
/**
|
|
157
271
|
* Enable BLE. Starts advertising.
|
|
@@ -191,7 +305,618 @@ export declare type BleStatusResponse = components['schemas']['BleStatusResponse
|
|
|
191
305
|
|
|
192
306
|
declare type Brightness = number | 'auto';
|
|
193
307
|
|
|
194
|
-
|
|
308
|
+
/** Namespace BSB_Error. */
|
|
309
|
+
export declare namespace BSB_Error {
|
|
310
|
+
|
|
311
|
+
/** Cause enum. */
|
|
312
|
+
export enum Cause {
|
|
313
|
+
RESOURCE_LIMIT = 0
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** Severity enum. */
|
|
317
|
+
export enum Severity {
|
|
318
|
+
FATAL = 0,
|
|
319
|
+
ERROR = 1,
|
|
320
|
+
WARNING = 2
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** Properties of an Error. */
|
|
324
|
+
export interface Error {
|
|
325
|
+
|
|
326
|
+
/** Error cause */
|
|
327
|
+
cause?: (BSB_Error.Cause|null);
|
|
328
|
+
|
|
329
|
+
/** Error severity */
|
|
330
|
+
severity?: (BSB_Error.Severity|null);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** Namespace BSB_Frame. */
|
|
336
|
+
export declare namespace BSB_Frame {
|
|
337
|
+
|
|
338
|
+
/** Encoding enum. */
|
|
339
|
+
export enum Encoding {
|
|
340
|
+
PLAIN = 0,
|
|
341
|
+
RUN_LENGTH = 1,
|
|
342
|
+
DEFLATE = 2,
|
|
343
|
+
DEFLATE_RUN_LENGTH = 3
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** PixelFormat enum. */
|
|
347
|
+
export enum PixelFormat {
|
|
348
|
+
RGB888 = 0,
|
|
349
|
+
L8 = 1,
|
|
350
|
+
L4 = 2
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** Screen enum. */
|
|
354
|
+
export enum Screen {
|
|
355
|
+
FRONT = 0,
|
|
356
|
+
BACK = 1
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** Properties of a Frame. */
|
|
360
|
+
export interface Frame {
|
|
361
|
+
|
|
362
|
+
/** Frame screen */
|
|
363
|
+
screen?: (BSB_Frame.Screen|null);
|
|
364
|
+
|
|
365
|
+
/** Frame width */
|
|
366
|
+
width?: (number|null);
|
|
367
|
+
|
|
368
|
+
/** Frame height */
|
|
369
|
+
height?: (number|null);
|
|
370
|
+
|
|
371
|
+
/** Frame encoding */
|
|
372
|
+
encoding?: (BSB_Frame.Encoding|null);
|
|
373
|
+
|
|
374
|
+
/** Frame pixelFormat */
|
|
375
|
+
pixelFormat?: (BSB_Frame.PixelFormat|null);
|
|
376
|
+
|
|
377
|
+
/** Frame data */
|
|
378
|
+
data?: (Uint8Array|null);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/** Namespace BSB_Input. */
|
|
384
|
+
export declare namespace BSB_Input {
|
|
385
|
+
|
|
386
|
+
/** Button enum. */
|
|
387
|
+
export enum Button {
|
|
388
|
+
OK = 0,
|
|
389
|
+
BACK = 1,
|
|
390
|
+
START = 2
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/** ButtonAction enum. */
|
|
394
|
+
export enum ButtonAction {
|
|
395
|
+
PRESS = 0,
|
|
396
|
+
RELEASE = 1
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** SwitchPosition enum. */
|
|
400
|
+
export enum SwitchPosition {
|
|
401
|
+
BUSY = 0,
|
|
402
|
+
CUSTOM = 1,
|
|
403
|
+
OFF = 2,
|
|
404
|
+
APPS = 3,
|
|
405
|
+
SETTINGS = 4
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/** Properties of a ButtonEvent. */
|
|
409
|
+
export interface ButtonEvent {
|
|
410
|
+
|
|
411
|
+
/** ButtonEvent button */
|
|
412
|
+
button?: (BSB_Input.Button|null);
|
|
413
|
+
|
|
414
|
+
/** ButtonEvent action */
|
|
415
|
+
action?: (BSB_Input.ButtonAction|null);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
/** Properties of a SwitchEvent. */
|
|
420
|
+
export interface SwitchEvent {
|
|
421
|
+
|
|
422
|
+
/** SwitchEvent position */
|
|
423
|
+
position?: (BSB_Input.SwitchPosition|null);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
/** Properties of an EncoderEvent. */
|
|
428
|
+
export interface EncoderEvent {
|
|
429
|
+
|
|
430
|
+
/** EncoderEvent delta */
|
|
431
|
+
delta?: (number|null);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
/** Properties of an InputEvent. */
|
|
436
|
+
export interface InputEvent {
|
|
437
|
+
|
|
438
|
+
/** InputEvent buttonEvent */
|
|
439
|
+
buttonEvent?: (BSB_Input.ButtonEvent|null);
|
|
440
|
+
|
|
441
|
+
/** InputEvent switchEvent */
|
|
442
|
+
switchEvent?: (BSB_Input.SwitchEvent|null);
|
|
443
|
+
|
|
444
|
+
/** InputEvent encoderEvent */
|
|
445
|
+
encoderEvent?: (BSB_Input.EncoderEvent|null);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/** Namespace BSB_State. */
|
|
451
|
+
export declare namespace BSB_State {
|
|
452
|
+
|
|
453
|
+
/** Properties of a StateUpdate. */
|
|
454
|
+
export interface StateUpdate {
|
|
455
|
+
|
|
456
|
+
/** StateUpdate deviceName */
|
|
457
|
+
deviceName?: (BSB_State.DeviceName|null);
|
|
458
|
+
|
|
459
|
+
/** StateUpdate power */
|
|
460
|
+
power?: (BSB_State.Power|null);
|
|
461
|
+
|
|
462
|
+
/** StateUpdate brightness */
|
|
463
|
+
brightness?: (BSB_State.Brightness|null);
|
|
464
|
+
|
|
465
|
+
/** StateUpdate audioVolume */
|
|
466
|
+
audioVolume?: (BSB_State.AudioVolume|null);
|
|
467
|
+
|
|
468
|
+
/** StateUpdate wifi */
|
|
469
|
+
wifi?: (BSB_State.Wifi|null);
|
|
470
|
+
|
|
471
|
+
/** StateUpdate updateState */
|
|
472
|
+
updateState?: (BSB_Update.UpdateState|null);
|
|
473
|
+
|
|
474
|
+
/** StateUpdate updateCheck */
|
|
475
|
+
updateCheck?: (BSB_Update.CheckState|null);
|
|
476
|
+
|
|
477
|
+
/** StateUpdate timezone */
|
|
478
|
+
timezone?: (BSB_State.Timezone|null);
|
|
479
|
+
|
|
480
|
+
/** StateUpdate matter */
|
|
481
|
+
matter?: (BSB_State.Matter|null);
|
|
482
|
+
|
|
483
|
+
/** StateUpdate frame */
|
|
484
|
+
frame?: (BSB_Frame.Frame|null);
|
|
485
|
+
|
|
486
|
+
/** StateUpdate input */
|
|
487
|
+
input?: (BSB_Input.InputEvent|null);
|
|
488
|
+
|
|
489
|
+
/** StateUpdate timer */
|
|
490
|
+
timer?: (BSB_Timer.Timer|null);
|
|
491
|
+
|
|
492
|
+
/** StateUpdate ble */
|
|
493
|
+
ble?: (BSB_State.Ble.Ble|null);
|
|
494
|
+
|
|
495
|
+
/** StateUpdate autoUpdateState */
|
|
496
|
+
autoUpdateState?: (BSB_Update.AutoUpdateState|null);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
/** Properties of a State. */
|
|
501
|
+
export interface State {
|
|
502
|
+
|
|
503
|
+
/** State timestamp */
|
|
504
|
+
timestamp?: (number|Long_2|null);
|
|
505
|
+
|
|
506
|
+
/** State updates */
|
|
507
|
+
updates?: (BSB_State.StateUpdate[]|null);
|
|
508
|
+
|
|
509
|
+
/** State error */
|
|
510
|
+
error?: (BSB_Error.Error|null);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
/** Properties of a DeviceName. */
|
|
515
|
+
export interface DeviceName {
|
|
516
|
+
|
|
517
|
+
/** DeviceName name */
|
|
518
|
+
name?: (string|null);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
/** Properties of a BrightnessAutomatic. */
|
|
523
|
+
export interface BrightnessAutomatic {
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
/** Properties of a BrightnessManual. */
|
|
528
|
+
export interface BrightnessManual {
|
|
529
|
+
|
|
530
|
+
/** BrightnessManual brightness */
|
|
531
|
+
brightness?: (number|null);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
/** Properties of a Brightness. */
|
|
536
|
+
export interface Brightness {
|
|
537
|
+
|
|
538
|
+
/** Brightness automatic */
|
|
539
|
+
automatic?: (BSB_State.BrightnessAutomatic|null);
|
|
540
|
+
|
|
541
|
+
/** Brightness manual */
|
|
542
|
+
manual?: (BSB_State.BrightnessManual|null);
|
|
543
|
+
|
|
544
|
+
/** Brightness actualBrightness */
|
|
545
|
+
actualBrightness?: (number|null);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
/** BatteryStatus enum. */
|
|
550
|
+
export enum BatteryStatus {
|
|
551
|
+
DISCHARGING = 0,
|
|
552
|
+
CHARGING = 1,
|
|
553
|
+
CHARGED = 2
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/** Properties of an UnknownPowerState. */
|
|
557
|
+
export interface UnknownPowerState {
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
/** Properties of a PowerState. */
|
|
562
|
+
export interface PowerState {
|
|
563
|
+
|
|
564
|
+
/** PowerState batteryStatus */
|
|
565
|
+
batteryStatus?: (BSB_State.BatteryStatus|null);
|
|
566
|
+
|
|
567
|
+
/** PowerState batteryChargePercent */
|
|
568
|
+
batteryChargePercent?: (number|null);
|
|
569
|
+
|
|
570
|
+
/** PowerState batteryVoltageMv */
|
|
571
|
+
batteryVoltageMv?: (number|null);
|
|
572
|
+
|
|
573
|
+
/** PowerState batteryCurrentMa */
|
|
574
|
+
batteryCurrentMa?: (number|null);
|
|
575
|
+
|
|
576
|
+
/** PowerState usbVoltageMv */
|
|
577
|
+
usbVoltageMv?: (number|null);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
/** Properties of a Power. */
|
|
582
|
+
export interface Power {
|
|
583
|
+
|
|
584
|
+
/** Power unknown */
|
|
585
|
+
unknown?: (BSB_State.UnknownPowerState|null);
|
|
586
|
+
|
|
587
|
+
/** Power known */
|
|
588
|
+
known?: (BSB_State.PowerState|null);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
/** Properties of an AudioVolume. */
|
|
593
|
+
export interface AudioVolume {
|
|
594
|
+
|
|
595
|
+
/** AudioVolume volume */
|
|
596
|
+
volume?: (number|null);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
/** WifiConnectionStatus enum. */
|
|
601
|
+
export enum WifiConnectionStatus {
|
|
602
|
+
CONNECTED = 0,
|
|
603
|
+
CONNECTING = 1,
|
|
604
|
+
DISCONNECTING = 2,
|
|
605
|
+
RECONNECTING = 3
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/** WifiSecurity enum. */
|
|
609
|
+
export enum WifiSecurity {
|
|
610
|
+
UNKNOWN = 0,
|
|
611
|
+
OPEN = 1,
|
|
612
|
+
WPA = 2,
|
|
613
|
+
WPA2 = 3,
|
|
614
|
+
WEP = 4,
|
|
615
|
+
WPA_WPA2 = 5,
|
|
616
|
+
WPA3 = 6,
|
|
617
|
+
WPA2_WPA3 = 7
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/** IpConfigurationMethod enum. */
|
|
621
|
+
export enum IpConfigurationMethod {
|
|
622
|
+
DHCP = 0,
|
|
623
|
+
STATIC = 1
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/** IpProtocol enum. */
|
|
627
|
+
export enum IpProtocol {
|
|
628
|
+
IPV4 = 0,
|
|
629
|
+
IPV6 = 1
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/** Properties of a WifiStateUnknown. */
|
|
633
|
+
export interface WifiStateUnknown {
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
/** Properties of a WifiStateDisconnected. */
|
|
638
|
+
export interface WifiStateDisconnected {
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
/** Properties of a WifiStateConnected. */
|
|
643
|
+
export interface WifiStateConnected {
|
|
644
|
+
|
|
645
|
+
/** WifiStateConnected status */
|
|
646
|
+
status?: (BSB_State.WifiConnectionStatus|null);
|
|
647
|
+
|
|
648
|
+
/** WifiStateConnected ssid */
|
|
649
|
+
ssid?: (string|null);
|
|
650
|
+
|
|
651
|
+
/** WifiStateConnected bssid */
|
|
652
|
+
bssid?: (string|null);
|
|
653
|
+
|
|
654
|
+
/** WifiStateConnected channel */
|
|
655
|
+
channel?: (number|null);
|
|
656
|
+
|
|
657
|
+
/** WifiStateConnected rssi */
|
|
658
|
+
rssi?: (number|null);
|
|
659
|
+
|
|
660
|
+
/** WifiStateConnected security */
|
|
661
|
+
security?: (BSB_State.WifiSecurity|null);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
/** Properties of an IpAddress. */
|
|
666
|
+
export interface IpAddress {
|
|
667
|
+
|
|
668
|
+
/** IpAddress protocol */
|
|
669
|
+
protocol?: (BSB_State.IpProtocol|null);
|
|
670
|
+
|
|
671
|
+
/** IpAddress method */
|
|
672
|
+
method?: (BSB_State.IpConfigurationMethod|null);
|
|
673
|
+
|
|
674
|
+
/** IpAddress address */
|
|
675
|
+
address?: (string|null);
|
|
676
|
+
|
|
677
|
+
/** IpAddress gateway */
|
|
678
|
+
gateway?: (string|null);
|
|
679
|
+
|
|
680
|
+
/** IpAddress netmask */
|
|
681
|
+
netmask?: (string|null);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
/** Properties of a Wifi. */
|
|
686
|
+
export interface Wifi {
|
|
687
|
+
|
|
688
|
+
/** Wifi unknown */
|
|
689
|
+
unknown?: (BSB_State.WifiStateUnknown|null);
|
|
690
|
+
|
|
691
|
+
/** Wifi disconnected */
|
|
692
|
+
disconnected?: (BSB_State.WifiStateDisconnected|null);
|
|
693
|
+
|
|
694
|
+
/** Wifi connected */
|
|
695
|
+
connected?: (BSB_State.WifiStateConnected|null);
|
|
696
|
+
|
|
697
|
+
/** Wifi ipAddresses */
|
|
698
|
+
ipAddresses?: (BSB_State.IpAddress[]|null);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
/** Properties of a Timezone. */
|
|
703
|
+
export interface Timezone {
|
|
704
|
+
|
|
705
|
+
/** Timezone name */
|
|
706
|
+
name?: (string|null);
|
|
707
|
+
|
|
708
|
+
/** Timezone offset */
|
|
709
|
+
offset?: (number|null);
|
|
710
|
+
|
|
711
|
+
/** Timezone abbr */
|
|
712
|
+
abbr?: (string|null);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
/** MatterCommissioningStatus enum. */
|
|
717
|
+
export enum MatterCommissioningStatus {
|
|
718
|
+
NEVER_STARTED = 0,
|
|
719
|
+
STARTED = 1,
|
|
720
|
+
COMPLETED_SUCCESSFULLY = 2,
|
|
721
|
+
FAILED = 3
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** Properties of a MatterCommissioningState. */
|
|
725
|
+
export interface MatterCommissioningState {
|
|
726
|
+
|
|
727
|
+
/** MatterCommissioningState status */
|
|
728
|
+
status?: (BSB_State.MatterCommissioningStatus|null);
|
|
729
|
+
|
|
730
|
+
/** MatterCommissioningState timestamp */
|
|
731
|
+
timestamp?: (number|Long_2|null);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
/** Properties of a Matter. */
|
|
736
|
+
export interface Matter {
|
|
737
|
+
|
|
738
|
+
/** Matter fabricCount */
|
|
739
|
+
fabricCount?: (number|null);
|
|
740
|
+
|
|
741
|
+
/** Matter state */
|
|
742
|
+
state?: (BSB_State.MatterCommissioningState|null);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
/** Namespace Ble. */
|
|
747
|
+
export namespace Ble {
|
|
748
|
+
|
|
749
|
+
/** ServiceStatus enum. */
|
|
750
|
+
export enum ServiceStatus {
|
|
751
|
+
RESET = 0,
|
|
752
|
+
INITIALIZATION = 1,
|
|
753
|
+
READY = 2,
|
|
754
|
+
ADVERTISING = 3,
|
|
755
|
+
CONNECTABLE = 4,
|
|
756
|
+
CONNECTED = 5,
|
|
757
|
+
ERROR = 6
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/** Properties of a Ble. */
|
|
761
|
+
export interface Ble {
|
|
762
|
+
|
|
763
|
+
/** Ble status */
|
|
764
|
+
status?: (BSB_State.Ble.ServiceStatus|null);
|
|
765
|
+
|
|
766
|
+
/** Ble remoteAddress */
|
|
767
|
+
remoteAddress?: (string|null);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/** Namespace BSB_Timer. */
|
|
774
|
+
export declare namespace BSB_Timer {
|
|
775
|
+
|
|
776
|
+
/** Properties of a Timer. */
|
|
777
|
+
export interface Timer {
|
|
778
|
+
|
|
779
|
+
/** Timer json */
|
|
780
|
+
json?: (BSB_Util.Json|null);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** Namespace BSB_Update. */
|
|
786
|
+
export declare namespace BSB_Update {
|
|
787
|
+
|
|
788
|
+
/** UpdateEvent enum. */
|
|
789
|
+
export enum UpdateEvent {
|
|
790
|
+
SESSION_START = 0,
|
|
791
|
+
SESSION_STOP = 1,
|
|
792
|
+
ACTION_BEGIN = 2,
|
|
793
|
+
ACTION_DONE = 3,
|
|
794
|
+
DETAIL_CHANGE = 4,
|
|
795
|
+
ACTION_PROGRESS = 5,
|
|
796
|
+
EVENT_NONE = 6
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/** UpdateAction enum. */
|
|
800
|
+
export enum UpdateAction {
|
|
801
|
+
DOWNLOAD = 0,
|
|
802
|
+
SHA_VERIFICATION = 1,
|
|
803
|
+
UNPACK = 2,
|
|
804
|
+
INSTALLATION_PREPARE = 3,
|
|
805
|
+
INSTALLATION_APPLY = 4,
|
|
806
|
+
ACTION_NONE = 5
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/** UpdateStatus enum. */
|
|
810
|
+
export enum UpdateStatus {
|
|
811
|
+
OK = 0,
|
|
812
|
+
BATTERY_LOW = 1,
|
|
813
|
+
BUSY = 2,
|
|
814
|
+
DOWNLOAD_FAILURE = 3,
|
|
815
|
+
DOWNLOAD_ABORT = 4,
|
|
816
|
+
SHA_MISMATCH = 5,
|
|
817
|
+
UNPACK_CREATE_STAGING_DIRECTORY_FAILURE = 6,
|
|
818
|
+
UNPACK_ARCHIVE_OPEN_FAILURE = 7,
|
|
819
|
+
UNPACK_ARCHIVE_UNPACK_FAILURE = 8,
|
|
820
|
+
INSTALLATION_PREPARE_MANIFEST_NOT_FOUND = 9,
|
|
821
|
+
INSTALLATION_PREPARE_MANIFEST_INVALID = 10,
|
|
822
|
+
INSTALLATION_PREPARE_SESSION_CONFIG_SETUP_FAILURE = 11,
|
|
823
|
+
INSTALLATION_PREPARE_POINTER_SETUP_FAILURE = 12,
|
|
824
|
+
UNKNOWN_FAILURE = 13
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/** CheckError enum. */
|
|
828
|
+
export enum CheckError {
|
|
829
|
+
NOT_AVAILABLE = 0,
|
|
830
|
+
FAILURE = 1,
|
|
831
|
+
IDLE = 2
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/** Properties of an UpdateAvailable. */
|
|
835
|
+
export interface UpdateAvailable {
|
|
836
|
+
|
|
837
|
+
/** UpdateAvailable version */
|
|
838
|
+
version?: (string|null);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
/** Properties of an UpdateUnavailable. */
|
|
843
|
+
export interface UpdateUnavailable {
|
|
844
|
+
|
|
845
|
+
/** UpdateUnavailable reason */
|
|
846
|
+
reason?: (BSB_Update.CheckError|null);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
/** Properties of an UpdateState. */
|
|
851
|
+
export interface UpdateState {
|
|
852
|
+
|
|
853
|
+
/** UpdateState event */
|
|
854
|
+
event?: (BSB_Update.UpdateEvent|null);
|
|
855
|
+
|
|
856
|
+
/** UpdateState action */
|
|
857
|
+
action?: (BSB_Update.UpdateAction|null);
|
|
858
|
+
|
|
859
|
+
/** UpdateState status */
|
|
860
|
+
status?: (BSB_Update.UpdateStatus|null);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
/** Properties of a CheckState. */
|
|
865
|
+
export interface CheckState {
|
|
866
|
+
|
|
867
|
+
/** CheckState available */
|
|
868
|
+
available?: (BSB_Update.UpdateAvailable|null);
|
|
869
|
+
|
|
870
|
+
/** CheckState unavailable */
|
|
871
|
+
unavailable?: (BSB_Update.UpdateUnavailable|null);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
/** Properties of an AutoUpdateInterval. */
|
|
876
|
+
export interface AutoUpdateInterval {
|
|
877
|
+
|
|
878
|
+
/** AutoUpdateInterval start */
|
|
879
|
+
start?: (number|null);
|
|
880
|
+
|
|
881
|
+
/** AutoUpdateInterval end */
|
|
882
|
+
end?: (number|null);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
/** Properties of an AutoUpdateState. */
|
|
887
|
+
export interface AutoUpdateState {
|
|
888
|
+
|
|
889
|
+
/** AutoUpdateState enabled */
|
|
890
|
+
enabled?: (boolean|null);
|
|
891
|
+
|
|
892
|
+
/** AutoUpdateState interval */
|
|
893
|
+
interval?: (BSB_Update.AutoUpdateInterval|null);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/** Namespace BSB_Util. */
|
|
899
|
+
export declare namespace BSB_Util {
|
|
900
|
+
|
|
901
|
+
/** Compression enum. */
|
|
902
|
+
export enum Compression {
|
|
903
|
+
PLAIN = 0,
|
|
904
|
+
GZIP = 1
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
/** Properties of a Json. */
|
|
908
|
+
export interface Json {
|
|
909
|
+
|
|
910
|
+
/** Json compression */
|
|
911
|
+
compression?: (BSB_Util.Compression|null);
|
|
912
|
+
|
|
913
|
+
/** Json data */
|
|
914
|
+
data?: (Uint8Array|null);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
export declare interface BusyBar extends SystemMethods, UpdateMethods, TimeMethods, AccountMethods, DisplayMethods, AudioMethods, WifiMethods, StorageMethods, SettingsMethods, BleMethods, InputMethods, AssetsMethods, SmartHomeMethods {
|
|
195
920
|
}
|
|
196
921
|
|
|
197
922
|
/**
|
|
@@ -264,16 +989,18 @@ export declare class BusyBar {
|
|
|
264
989
|
setToken(token: string): void;
|
|
265
990
|
}
|
|
266
991
|
|
|
267
|
-
declare type BusyBarClient =
|
|
992
|
+
declare type BusyBarClient = Client_2<paths, `${string}/${string}`>;
|
|
268
993
|
|
|
269
994
|
export declare type BusyBarConfig = {
|
|
270
995
|
addr?: string;
|
|
271
996
|
token?: string;
|
|
272
997
|
};
|
|
273
998
|
|
|
274
|
-
declare type BusyFile = Buffer | Blob | File | ArrayBuffer;
|
|
999
|
+
export declare type BusyFile = Buffer | Blob | File | ArrayBuffer;
|
|
275
1000
|
|
|
276
|
-
declare type
|
|
1001
|
+
declare type BusyFile_2 = Buffer | Blob | File | ArrayBuffer;
|
|
1002
|
+
|
|
1003
|
+
declare type ClearDisplayQuery = NonNullable<operations['clearDisplay']['parameters']['query']>;
|
|
277
1004
|
|
|
278
1005
|
declare interface components {
|
|
279
1006
|
schemas: {
|
|
@@ -476,7 +1203,7 @@ declare interface components {
|
|
|
476
1203
|
file: string;
|
|
477
1204
|
};
|
|
478
1205
|
/** @example {
|
|
479
|
-
* "
|
|
1206
|
+
* "application_name": "my_app",
|
|
480
1207
|
* "elements": [
|
|
481
1208
|
* {
|
|
482
1209
|
* "id": "0",
|
|
@@ -520,14 +1247,14 @@ declare interface components {
|
|
|
520
1247
|
* @description Application ID for organizing assets
|
|
521
1248
|
* @example my_app
|
|
522
1249
|
*/
|
|
523
|
-
|
|
1250
|
+
application_name: string;
|
|
524
1251
|
/**
|
|
525
|
-
* @description Draw
|
|
526
|
-
* @default
|
|
1252
|
+
* @description Draw priority in the range [1, 100] inclusive. A draw request is accepted when its priority is greater than or equal to (>=) the priority of the currently running system app. Equal-priority requests from a different application_name override whatever is on screen. System app priority levels: stub/poweroff apps = 0 (always preemptable), any standard built-in app = 10, active BUSY/CUSTOM work session = 90. The draw API only accepts values 1–100; 0 is reserved for internal use.
|
|
1253
|
+
* @default 50
|
|
527
1254
|
*/
|
|
528
1255
|
priority: number;
|
|
529
1256
|
/** @description Array of elements to display */
|
|
530
|
-
elements: (components['schemas']['TextElement'] | components['schemas']['ImageElement'] | components['schemas']['
|
|
1257
|
+
elements: (components['schemas']['TextElement'] | components['schemas']['ImageElement'] | components['schemas']['AnimationElement'] | components['schemas']['CountdownElement'])[];
|
|
531
1258
|
};
|
|
532
1259
|
DisplayElement: {
|
|
533
1260
|
/** @description Unique identifier for the element */
|
|
@@ -540,11 +1267,17 @@ declare interface components {
|
|
|
540
1267
|
* @description Type of display element
|
|
541
1268
|
* @enum {string}
|
|
542
1269
|
*/
|
|
543
|
-
type: 'text' | 'image' | '
|
|
544
|
-
/**
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
1270
|
+
type: 'text' | 'image' | 'animation' | 'countdown';
|
|
1271
|
+
/**
|
|
1272
|
+
* @description X coordinate of selected anchor point relative to top-left of display
|
|
1273
|
+
* @default 0
|
|
1274
|
+
*/
|
|
1275
|
+
x: number;
|
|
1276
|
+
/**
|
|
1277
|
+
* @description Y coordinate of selected anchor point relative to top-left of display
|
|
1278
|
+
* @default 0
|
|
1279
|
+
*/
|
|
1280
|
+
y: number;
|
|
548
1281
|
/**
|
|
549
1282
|
* @description Which display to show the element on (for dual-display devices)
|
|
550
1283
|
* @default front
|
|
@@ -562,7 +1295,6 @@ declare interface components {
|
|
|
562
1295
|
text: string;
|
|
563
1296
|
/**
|
|
564
1297
|
* @description One of the available fonts to display the text in
|
|
565
|
-
* @default tiny5_8
|
|
566
1298
|
* @enum {string}
|
|
567
1299
|
*/
|
|
568
1300
|
font: 'small' | 'medium' | 'medium_condensed' | 'big';
|
|
@@ -584,10 +1316,10 @@ declare interface components {
|
|
|
584
1316
|
};
|
|
585
1317
|
ImageElement: Omit<components['schemas']['DisplayElement'], 'type'> & ({
|
|
586
1318
|
/** @description Path to the image file in the app's assets */
|
|
587
|
-
path
|
|
1319
|
+
path: string;
|
|
588
1320
|
} | {
|
|
589
|
-
/** @description
|
|
590
|
-
|
|
1321
|
+
/** @description Stock image file name */
|
|
1322
|
+
stock_path: string;
|
|
591
1323
|
}) & {
|
|
592
1324
|
/**
|
|
593
1325
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -595,12 +1327,12 @@ declare interface components {
|
|
|
595
1327
|
*/
|
|
596
1328
|
type: 'image';
|
|
597
1329
|
};
|
|
598
|
-
|
|
1330
|
+
AnimationElement: Omit<components['schemas']['DisplayElement'], 'type'> & (({
|
|
599
1331
|
/** @description Path to the animation file in the app's assets */
|
|
600
1332
|
path?: string;
|
|
601
1333
|
} | {
|
|
602
|
-
/** @description
|
|
603
|
-
|
|
1334
|
+
/** @description Stock animation file name */
|
|
1335
|
+
stock_path?: string;
|
|
604
1336
|
}) & {
|
|
605
1337
|
/**
|
|
606
1338
|
* @description Whether to loop the requested part of the animation
|
|
@@ -612,14 +1344,14 @@ declare interface components {
|
|
|
612
1344
|
* @default false
|
|
613
1345
|
*/
|
|
614
1346
|
await_previous_end: boolean;
|
|
615
|
-
/** @description Name of the section to play back. Specifying
|
|
616
|
-
|
|
1347
|
+
/** @description Name of the section to play back. Specifying "default" selects the entire animation. */
|
|
1348
|
+
section?: string;
|
|
617
1349
|
}) & {
|
|
618
1350
|
/**
|
|
619
1351
|
* @description discriminator enum property added by openapi-typescript
|
|
620
1352
|
* @enum {string}
|
|
621
1353
|
*/
|
|
622
|
-
type: '
|
|
1354
|
+
type: 'animation';
|
|
623
1355
|
};
|
|
624
1356
|
CountdownElement: Omit<components['schemas']['DisplayElement'], 'type'> & {
|
|
625
1357
|
/** @description Seconds-based Unix UTC timestamp to count down or up to. Note: it's a number in a string. */
|
|
@@ -669,10 +1401,20 @@ declare interface components {
|
|
|
669
1401
|
};
|
|
670
1402
|
TimezoneInfo: {
|
|
671
1403
|
/**
|
|
672
|
-
* @description
|
|
673
|
-
* @example
|
|
1404
|
+
* @description Time zone name
|
|
1405
|
+
* @example Bangalore
|
|
674
1406
|
*/
|
|
675
|
-
|
|
1407
|
+
name: string;
|
|
1408
|
+
/**
|
|
1409
|
+
* @description Time zone offset from UTC
|
|
1410
|
+
* @example +05:30
|
|
1411
|
+
*/
|
|
1412
|
+
offset: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* @description Time zone abbreviation
|
|
1415
|
+
* @example IST
|
|
1416
|
+
*/
|
|
1417
|
+
abbr: string;
|
|
676
1418
|
};
|
|
677
1419
|
Status: {
|
|
678
1420
|
device?: components['schemas']['StatusDevice'];
|
|
@@ -798,7 +1540,7 @@ declare interface components {
|
|
|
798
1540
|
* @example WPA3
|
|
799
1541
|
* @enum {string}
|
|
800
1542
|
*/
|
|
801
|
-
WifiSecurityMethod: 'Open' | 'WPA' | 'WPA2' | 'WEP' | 'WPA/WPA2' | 'WPA3' | 'WPA2/WPA3';
|
|
1543
|
+
WifiSecurityMethod: 'Open' | 'WPA' | 'WPA2' | 'WEP' | 'WPA/WPA2' | 'WPA3' | 'WPA2/WPA3' | 'Unsupported';
|
|
802
1544
|
/**
|
|
803
1545
|
* @example dhcp
|
|
804
1546
|
* @enum {string}
|
|
@@ -816,21 +1558,38 @@ declare interface components {
|
|
|
816
1558
|
/** @example 58 */
|
|
817
1559
|
rssi?: number;
|
|
818
1560
|
};
|
|
1561
|
+
/** @description Wi-Fi status. Only `state` is always present.
|
|
1562
|
+
* Fields `ssid`, `bssid`, `channel`, `rssi`, `security`, and `ip_config` are only included when state is "connected".
|
|
1563
|
+
* */
|
|
819
1564
|
StatusResponse: {
|
|
820
1565
|
/**
|
|
821
1566
|
* @example disconnected
|
|
822
1567
|
* @enum {string}
|
|
823
1568
|
*/
|
|
824
|
-
state
|
|
825
|
-
/**
|
|
1569
|
+
state: 'unknown' | 'disconnected' | 'connected' | 'connecting' | 'disconnecting' | 'reconnecting';
|
|
1570
|
+
/**
|
|
1571
|
+
* @description Only present when connected
|
|
1572
|
+
* @example Your_WIFI_SSID
|
|
1573
|
+
*/
|
|
826
1574
|
ssid?: string;
|
|
827
|
-
/**
|
|
1575
|
+
/**
|
|
1576
|
+
* @description Only present when connected
|
|
1577
|
+
* @example EC:5A:00:0B:55:1D
|
|
1578
|
+
*/
|
|
828
1579
|
bssid?: string;
|
|
829
|
-
/**
|
|
1580
|
+
/**
|
|
1581
|
+
* @description Only present when connected
|
|
1582
|
+
* @example 3
|
|
1583
|
+
*/
|
|
830
1584
|
channel?: number;
|
|
831
|
-
/**
|
|
1585
|
+
/**
|
|
1586
|
+
* @description Only present when connected
|
|
1587
|
+
* @example -43
|
|
1588
|
+
*/
|
|
832
1589
|
rssi?: number;
|
|
1590
|
+
/** @description Only present when connected */
|
|
833
1591
|
security?: components['schemas']['WifiSecurityMethod'];
|
|
1592
|
+
/** @description Only present when connected */
|
|
834
1593
|
ip_config?: {
|
|
835
1594
|
ip_method?: components['schemas']['WifiIpMethod'];
|
|
836
1595
|
ip_type?: components['schemas']['WifiIpType'];
|
|
@@ -879,20 +1638,23 @@ declare interface components {
|
|
|
879
1638
|
/** @example 12345678-9abc-def0-1234-56789abcdef0 */
|
|
880
1639
|
user_id?: string;
|
|
881
1640
|
};
|
|
882
|
-
|
|
1641
|
+
AccountStatus: {
|
|
883
1642
|
/**
|
|
884
1643
|
* @example connected
|
|
885
1644
|
* @enum {string}
|
|
886
1645
|
*/
|
|
887
|
-
|
|
1646
|
+
status?: 'error' | 'disconnected' | 'connected';
|
|
888
1647
|
};
|
|
889
1648
|
AccountProfile: {
|
|
890
1649
|
/**
|
|
891
1650
|
* @example dev
|
|
892
1651
|
* @enum {string}
|
|
893
1652
|
*/
|
|
894
|
-
|
|
895
|
-
/**
|
|
1653
|
+
profile: 'dev' | 'prod' | 'local' | 'custom';
|
|
1654
|
+
/**
|
|
1655
|
+
* @description Only present when profile is "custom"
|
|
1656
|
+
* @example mqtts://mqtt.example.com:8883
|
|
1657
|
+
*/
|
|
896
1658
|
custom_url?: string;
|
|
897
1659
|
};
|
|
898
1660
|
AccountLink: {
|
|
@@ -906,18 +1668,17 @@ declare interface components {
|
|
|
906
1668
|
* @example connected
|
|
907
1669
|
* @enum {string}
|
|
908
1670
|
*/
|
|
909
|
-
|
|
910
|
-
/** @example 50:DA:D6:FE:DD:A9 */
|
|
911
|
-
address?: string;
|
|
1671
|
+
status: 'reset' | 'initialization' | 'disabled' | 'enabled' | 'connectable' | 'connected' | 'internal error';
|
|
912
1672
|
/**
|
|
913
|
-
* @
|
|
914
|
-
* @
|
|
1673
|
+
* @description Remote device address. Only present when status is "connected".
|
|
1674
|
+
* @example 50:DA:D6:FE:DD:A9
|
|
915
1675
|
*/
|
|
916
|
-
|
|
1676
|
+
address?: string;
|
|
917
1677
|
};
|
|
918
1678
|
BusySnapshot: {
|
|
919
|
-
snapshot: components['schemas']['BusySnapshotNotStarted'] | components['schemas']['BusySnapshotInfinite'] | components['schemas']['BusySnapshotSimple'] | components['schemas']['BusySnapshotInterval']
|
|
920
|
-
|
|
1679
|
+
snapshot: (components['schemas']['BusySnapshotNotStarted'] | components['schemas']['BusySnapshotInfinite'] | components['schemas']['BusySnapshotSimple'] | components['schemas']['BusySnapshotInterval']) & {
|
|
1680
|
+
busy_bar_settings: components['schemas']['BusyBarSettings'];
|
|
1681
|
+
};
|
|
921
1682
|
/** @example 1761582532251 */
|
|
922
1683
|
snapshot_timestamp_ms: number;
|
|
923
1684
|
};
|
|
@@ -1018,75 +1779,54 @@ declare interface components {
|
|
|
1018
1779
|
trigger_smart_home: boolean;
|
|
1019
1780
|
};
|
|
1020
1781
|
TimezoneListResponse: {
|
|
1021
|
-
list?:
|
|
1022
|
-
/**
|
|
1023
|
-
* @description Time zone name
|
|
1024
|
-
* @example Bangalore
|
|
1025
|
-
*/
|
|
1026
|
-
name?: string;
|
|
1027
|
-
/**
|
|
1028
|
-
* @description Time zone offset from UTC
|
|
1029
|
-
* @example +05:30
|
|
1030
|
-
*/
|
|
1031
|
-
offset?: string;
|
|
1032
|
-
/**
|
|
1033
|
-
* @description Time zone abbreviation
|
|
1034
|
-
* @example IST
|
|
1035
|
-
*/
|
|
1036
|
-
abbr?: string;
|
|
1037
|
-
}[];
|
|
1782
|
+
list?: components['schemas']['TimezoneInfo'][];
|
|
1038
1783
|
};
|
|
1039
|
-
|
|
1784
|
+
SmartHomePairingInfo: {
|
|
1040
1785
|
/**
|
|
1041
|
-
* @description Number of
|
|
1786
|
+
* @description Number of smart homes (Matter "fabrics") that this device is paired with ("commissioned into")
|
|
1042
1787
|
* @example 1
|
|
1043
1788
|
*/
|
|
1044
1789
|
fabric_count?: number;
|
|
1045
|
-
|
|
1790
|
+
latest_pairing_status?: {
|
|
1046
1791
|
/**
|
|
1047
|
-
* @description Latest state of
|
|
1792
|
+
* @description Latest state of smart home pairing (Matter "commissioning") process. Note: "never_started" only refers to the current power cycle of the device; this status is not recorded across reboots.
|
|
1048
1793
|
* @example completed_successfully
|
|
1049
1794
|
* @enum {string}
|
|
1050
1795
|
*/
|
|
1051
1796
|
value?: 'never_started' | 'started' | 'completed_successfully' | 'failed';
|
|
1052
1797
|
/**
|
|
1053
|
-
* @description UTC Unix
|
|
1054
|
-
* @example
|
|
1798
|
+
* @description UTC Unix second timestamp of latest state update. Only present when a status update has occurred.
|
|
1799
|
+
* @example 1769436711
|
|
1055
1800
|
*/
|
|
1056
|
-
timestamp?:
|
|
1801
|
+
timestamp?: number;
|
|
1057
1802
|
};
|
|
1058
1803
|
};
|
|
1059
|
-
|
|
1804
|
+
/** @description Set of information for pairing with a Matter smart home */
|
|
1805
|
+
SmartHomePairingPayload: {
|
|
1060
1806
|
/**
|
|
1061
|
-
* @description
|
|
1807
|
+
* @description Pairing with ("commissioning into") a Matter smart home using the provided payload is possible before this UTC Unix millisecond timestamp. Note: it's a number in a string.
|
|
1062
1808
|
* @example 1769437579000
|
|
1063
1809
|
*/
|
|
1064
1810
|
available_until?: string;
|
|
1065
1811
|
/**
|
|
1066
|
-
* @description Payload of the QR code for
|
|
1812
|
+
* @description Payload of the QR code for pairing with ("commissioning into") a smart home
|
|
1067
1813
|
* @example MT:YNDA0-O913..VV7I000
|
|
1068
1814
|
*/
|
|
1069
1815
|
qr_code?: string;
|
|
1070
1816
|
/**
|
|
1071
|
-
* @description Manual code for
|
|
1817
|
+
* @description Manual code for pairing with ("commissioning into") a smart home
|
|
1072
1818
|
* @example 1155-360-0377
|
|
1073
1819
|
*/
|
|
1074
|
-
manual_code?: string;
|
|
1075
|
-
};
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* @description Type of device emulated by a Matter endpoint. Currently only "switch" is implemented.
|
|
1079
|
-
* @example switch
|
|
1080
|
-
* @enum {string}
|
|
1081
|
-
*/
|
|
1082
|
-
type?: 'switch';
|
|
1820
|
+
manual_code?: string;
|
|
1821
|
+
};
|
|
1822
|
+
SmartHomeSwitchState: {
|
|
1083
1823
|
/**
|
|
1084
|
-
* @description State of
|
|
1824
|
+
* @description State of emulated switch.
|
|
1085
1825
|
* @example false
|
|
1086
1826
|
*/
|
|
1087
1827
|
state?: boolean;
|
|
1088
1828
|
/**
|
|
1089
|
-
* @description
|
|
1829
|
+
* @description State of emulated switch on startup. Never sent by the server, but can be specified by the client.
|
|
1090
1830
|
* @enum {string}
|
|
1091
1831
|
*/
|
|
1092
1832
|
startup?: 'off' | 'on' | 'toggle' | 'last';
|
|
@@ -1099,11 +1839,33 @@ declare interface components {
|
|
|
1099
1839
|
pathItems: never;
|
|
1100
1840
|
}
|
|
1101
1841
|
|
|
1842
|
+
/**
|
|
1843
|
+
* Detailed WebSocket connection state
|
|
1844
|
+
*/
|
|
1845
|
+
export declare enum ConnectionStatus {
|
|
1846
|
+
DISCONNECTED = "DISCONNECTED",
|
|
1847
|
+
CONNECTING = "CONNECTING",
|
|
1848
|
+
CONNECTED = "CONNECTED",
|
|
1849
|
+
RECONNECTING = "RECONNECTING"
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
export declare type CountdownElement = components['schemas']['CountdownElement'];
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* Callbacks for the main thread
|
|
1856
|
+
*/
|
|
1857
|
+
export declare type DataCallback = (data: ProcessedState) => void;
|
|
1858
|
+
|
|
1102
1859
|
declare type DataListener = (data: Uint8Array) => void;
|
|
1103
1860
|
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1861
|
+
/**
|
|
1862
|
+
* Data throughput state
|
|
1863
|
+
*/
|
|
1864
|
+
export declare enum DataStatus {
|
|
1865
|
+
NONE = "NONE",
|
|
1866
|
+
ACTIVE = "ACTIVE",
|
|
1867
|
+
STALE = "STALE"
|
|
1868
|
+
}
|
|
1107
1869
|
|
|
1108
1870
|
export declare enum DeviceScreen {
|
|
1109
1871
|
FRONT = 0,
|
|
@@ -1113,41 +1875,46 @@ export declare enum DeviceScreen {
|
|
|
1113
1875
|
export declare type DisplayBrightnessInfo = components['schemas']['DisplayBrightnessInfo'];
|
|
1114
1876
|
|
|
1115
1877
|
export declare interface DisplayBrightnessParams extends TimeoutOptions {
|
|
1116
|
-
value
|
|
1878
|
+
value: Brightness;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
export declare interface DisplayClearParams extends TimeoutOptions, Partial<ClearDisplayQuery> {
|
|
1117
1882
|
}
|
|
1118
1883
|
|
|
1119
|
-
export declare interface DisplayDrawParams extends TimeoutOptions {
|
|
1120
|
-
appId: components['schemas']['DisplayElements']['app_id'];
|
|
1121
|
-
elements: components['schemas']['DisplayElements']['elements'];
|
|
1122
|
-
/** @default 6 */
|
|
1123
|
-
priority?: components['schemas']['DisplayElements']['priority'];
|
|
1884
|
+
export declare interface DisplayDrawParams extends TimeoutOptions, DisplayElements {
|
|
1124
1885
|
}
|
|
1125
1886
|
|
|
1887
|
+
export declare type DisplayElement = components['schemas']['DisplayElement'];
|
|
1888
|
+
|
|
1889
|
+
export declare type DisplayElements = components['schemas']['DisplayElements'];
|
|
1890
|
+
|
|
1126
1891
|
declare class DisplayMethods {
|
|
1127
1892
|
/**
|
|
1128
|
-
* Draw on display.
|
|
1893
|
+
* Draw on display. Sends drawing data to the display. Supports JSON-defined display elements.
|
|
1129
1894
|
*
|
|
1130
1895
|
* @param {DrawParams} params - Parameters for the draw operation.
|
|
1131
|
-
* @param {
|
|
1132
|
-
* @param {
|
|
1133
|
-
* @param {
|
|
1896
|
+
* @param {string} params.application_name - Application ID for organizing assets.
|
|
1897
|
+
* @param {Array} params.elements - Display elements to draw.
|
|
1898
|
+
* @param {number} [params.priority=50] - Draw priority in the range [1, 100].
|
|
1134
1899
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1135
1900
|
* @returns {Promise<SuccessResponse>} A promise that resolves on successful draw command.
|
|
1136
1901
|
*/
|
|
1137
1902
|
DisplayDraw(this: BusyBar, params: DisplayDrawParams): Promise<SuccessResponse>;
|
|
1138
1903
|
/**
|
|
1139
|
-
* Clear display.
|
|
1904
|
+
* Clear display. Deletes display elements drawn by the Canvas application.
|
|
1905
|
+
* If application_name is specified, only elements for that app are removed.
|
|
1140
1906
|
*
|
|
1141
|
-
* @param {
|
|
1907
|
+
* @param {ClearParams} [params] - Optional parameters.
|
|
1908
|
+
* @param {string} [params.application_name] - Application identifier.
|
|
1142
1909
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1143
1910
|
* @returns {Promise<SuccessResponse>} A promise that resolves on successful clear command.
|
|
1144
1911
|
*/
|
|
1145
|
-
DisplayClear(this: BusyBar, params?:
|
|
1912
|
+
DisplayClear(this: BusyBar, params?: DisplayClearParams): Promise<SuccessResponse>;
|
|
1146
1913
|
/**
|
|
1147
1914
|
* Get single frame for requested screen.
|
|
1148
1915
|
*
|
|
1149
1916
|
* @param {GetScreenFrameParams} params - Parameters for the frame request.
|
|
1150
|
-
* @param {
|
|
1917
|
+
* @param {number} params.display - Type of the display (Front = 0, Back = 1).
|
|
1151
1918
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1152
1919
|
* @returns {Promise<Blob>} A promise that resolves to the screen frame as a Blob.
|
|
1153
1920
|
*/
|
|
@@ -1163,8 +1930,8 @@ declare class DisplayMethods {
|
|
|
1163
1930
|
/**
|
|
1164
1931
|
* Set display brightness.
|
|
1165
1932
|
*
|
|
1166
|
-
* @param {BrightnessParams} params - Brightness parameters
|
|
1167
|
-
* @param {
|
|
1933
|
+
* @param {BrightnessParams} params - Brightness parameters.
|
|
1934
|
+
* @param {number | 'auto'} params.value - Brightness (0-100 or "auto").
|
|
1168
1935
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1169
1936
|
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
1170
1937
|
*/
|
|
@@ -1174,6 +1941,9 @@ declare class DisplayMethods {
|
|
|
1174
1941
|
declare type Error_2 = components['schemas']['Error'];
|
|
1175
1942
|
export { Error_2 as Error }
|
|
1176
1943
|
|
|
1944
|
+
declare type ErrorCallback_2 = (error: StateStreamError) => void;
|
|
1945
|
+
export { ErrorCallback_2 as ErrorCallback }
|
|
1946
|
+
|
|
1177
1947
|
declare type ErrorListener = (payload: ErrorPayload) => void;
|
|
1178
1948
|
|
|
1179
1949
|
declare interface ErrorPayload {
|
|
@@ -1184,11 +1954,13 @@ declare interface ErrorPayload {
|
|
|
1184
1954
|
|
|
1185
1955
|
export declare type HttpAccessInfo = components['schemas']['HttpAccessInfo'];
|
|
1186
1956
|
|
|
1187
|
-
export declare interface HttpAccessParams extends TimeoutOptions {
|
|
1188
|
-
mode: operations['setHttpAccess']['parameters']['query']['mode'];
|
|
1189
|
-
key: operations['setHttpAccess']['parameters']['query']['key'];
|
|
1957
|
+
export declare interface HttpAccessParams extends TimeoutOptions, HttpAccessQuery {
|
|
1190
1958
|
}
|
|
1191
1959
|
|
|
1960
|
+
declare type HttpAccessQuery = operations['setHttpAccess']['parameters']['query'];
|
|
1961
|
+
|
|
1962
|
+
export declare type ImageElement = components['schemas']['ImageElement'];
|
|
1963
|
+
|
|
1192
1964
|
export declare class Input {
|
|
1193
1965
|
readonly addr: string;
|
|
1194
1966
|
connected: boolean;
|
|
@@ -1220,16 +1992,17 @@ export declare interface InputConfig {
|
|
|
1220
1992
|
apiSemver?: ApiSemver;
|
|
1221
1993
|
}
|
|
1222
1994
|
|
|
1223
|
-
export declare interface InputKeyParams extends TimeoutOptions {
|
|
1224
|
-
keyName: KeyName;
|
|
1995
|
+
export declare interface InputKeyParams extends TimeoutOptions, InputKeyQuery {
|
|
1225
1996
|
}
|
|
1226
1997
|
|
|
1998
|
+
declare type InputKeyQuery = operations['setInputKey']['parameters']['query'];
|
|
1999
|
+
|
|
1227
2000
|
declare class InputMethods {
|
|
1228
2001
|
/**
|
|
1229
2002
|
* Send input event. Send single key press event.
|
|
1230
2003
|
*
|
|
1231
2004
|
* @param {InputKeyParams} params - Button press parameters:
|
|
1232
|
-
* @param {KeyName} params.
|
|
2005
|
+
* @param {KeyName} params.key - Key name.
|
|
1233
2006
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1234
2007
|
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
1235
2008
|
*/
|
|
@@ -1240,41 +2013,61 @@ export declare type KeyName = operations['setInputKey']['parameters']['query']['
|
|
|
1240
2013
|
|
|
1241
2014
|
export declare type KeyValue = 1 | 0;
|
|
1242
2015
|
|
|
1243
|
-
declare
|
|
2016
|
+
export declare const LEDRenderer: LEDRenderer_2;
|
|
2017
|
+
|
|
2018
|
+
/**
|
|
2019
|
+
* LEDRenderer - A singleton WebGL2-based engine for rendering pixel grids.
|
|
2020
|
+
*/
|
|
2021
|
+
declare class LEDRenderer_2 {
|
|
2022
|
+
private static instance;
|
|
2023
|
+
private gl;
|
|
2024
|
+
private program;
|
|
2025
|
+
private texture;
|
|
2026
|
+
private vs;
|
|
2027
|
+
private fs;
|
|
2028
|
+
constructor();
|
|
1244
2029
|
/**
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1247
|
-
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
1248
|
-
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1249
|
-
* @returns {Promise<MatterStatus>} A promise that resolves to the Matter status.
|
|
2030
|
+
* Lazily initializes the WebGL context and resources.
|
|
2031
|
+
* Only executes in a browser environment.
|
|
1250
2032
|
*/
|
|
1251
|
-
|
|
2033
|
+
private init;
|
|
1252
2034
|
/**
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1255
|
-
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
1256
|
-
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1257
|
-
* @returns {Promise<MatterPairingInfo>} A promise that resolves on success.
|
|
2035
|
+
* Internal WebGL rendering pass.
|
|
1258
2036
|
*/
|
|
1259
|
-
|
|
2037
|
+
private render;
|
|
1260
2038
|
/**
|
|
1261
|
-
*
|
|
1262
|
-
*
|
|
1263
|
-
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
1264
|
-
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
1265
|
-
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
2039
|
+
* Public API: Renders the LED frame to a target 2D canvas.
|
|
1266
2040
|
*/
|
|
1267
|
-
|
|
2041
|
+
renderFrame(targetCanvas: HTMLCanvasElement, data: Uint8Array | Uint8ClampedArray, width: number, height: number, options?: {
|
|
2042
|
+
pixelSize?: number;
|
|
2043
|
+
radius?: number;
|
|
2044
|
+
darkThreshold?: number;
|
|
2045
|
+
} | undefined): void;
|
|
2046
|
+
private createProgram;
|
|
1268
2047
|
}
|
|
1269
2048
|
|
|
1270
|
-
|
|
2049
|
+
/**
|
|
2050
|
+
* Connection for local BUSY Bar devices via direct IP.
|
|
2051
|
+
* Uses ws:// and binary protobuf protocol.
|
|
2052
|
+
*/
|
|
2053
|
+
export declare class LocalStateStream extends BaseStateStream {
|
|
2054
|
+
protected streamMode: StreamMode;
|
|
2055
|
+
constructor(options?: LocalStreamOptions, config?: StreamConfig);
|
|
2056
|
+
/**
|
|
2057
|
+
* Normalizes the address to use ws:// protocol and adds default path if missing.
|
|
2058
|
+
*/
|
|
2059
|
+
protected normalizeUrl(addr: string): string;
|
|
2060
|
+
}
|
|
1271
2061
|
|
|
1272
|
-
|
|
2062
|
+
/**
|
|
2063
|
+
* Options for local device connections
|
|
2064
|
+
*/
|
|
2065
|
+
export declare interface LocalStreamOptions extends StreamOptions {
|
|
2066
|
+
}
|
|
1273
2067
|
|
|
1274
2068
|
export declare type NameInfo = components['schemas']['NameInfo'];
|
|
1275
2069
|
|
|
1276
|
-
export declare interface NameParams extends TimeoutOptions {
|
|
1277
|
-
name: NameInfo['name'];
|
|
2070
|
+
export declare interface NameParams extends TimeoutOptions, NameInfo {
|
|
1278
2071
|
}
|
|
1279
2072
|
|
|
1280
2073
|
declare interface operations {
|
|
@@ -1336,10 +2129,10 @@ declare interface operations {
|
|
|
1336
2129
|
*/
|
|
1337
2130
|
mode: 'disabled' | 'enabled' | 'key';
|
|
1338
2131
|
/**
|
|
1339
|
-
* @description Access key (4-10 digits length)
|
|
2132
|
+
* @description Access key (4-10 digits length). Required when mode is "key".
|
|
1340
2133
|
* @example 12345678
|
|
1341
2134
|
*/
|
|
1342
|
-
key
|
|
2135
|
+
key?: string;
|
|
1343
2136
|
};
|
|
1344
2137
|
header?: never;
|
|
1345
2138
|
path?: never;
|
|
@@ -1674,7 +2467,7 @@ declare interface operations {
|
|
|
1674
2467
|
* @description Application ID for organizing assets
|
|
1675
2468
|
* @example my_app
|
|
1676
2469
|
*/
|
|
1677
|
-
|
|
2470
|
+
application_name: string;
|
|
1678
2471
|
/**
|
|
1679
2472
|
* @description Filename for the uploaded asset
|
|
1680
2473
|
* @example data.png
|
|
@@ -1727,7 +2520,7 @@ declare interface operations {
|
|
|
1727
2520
|
* @description Application ID whose assets should be deleted
|
|
1728
2521
|
* @example my_app
|
|
1729
2522
|
*/
|
|
1730
|
-
|
|
2523
|
+
application_name: string;
|
|
1731
2524
|
};
|
|
1732
2525
|
header?: never;
|
|
1733
2526
|
path?: never;
|
|
@@ -2061,8 +2854,8 @@ declare interface operations {
|
|
|
2061
2854
|
'application/json': components['schemas']['Error'];
|
|
2062
2855
|
};
|
|
2063
2856
|
};
|
|
2064
|
-
/** @description
|
|
2065
|
-
|
|
2857
|
+
/** @description Failed to load canvas app */
|
|
2858
|
+
503: {
|
|
2066
2859
|
headers: {
|
|
2067
2860
|
[name: string]: unknown;
|
|
2068
2861
|
};
|
|
@@ -2079,7 +2872,7 @@ declare interface operations {
|
|
|
2079
2872
|
* @description Application identifier
|
|
2080
2873
|
* @example my_app
|
|
2081
2874
|
*/
|
|
2082
|
-
|
|
2875
|
+
application_name?: string;
|
|
2083
2876
|
};
|
|
2084
2877
|
header?: never;
|
|
2085
2878
|
path?: never;
|
|
@@ -2096,15 +2889,6 @@ declare interface operations {
|
|
|
2096
2889
|
'application/json': components['schemas']['SuccessResponse'];
|
|
2097
2890
|
};
|
|
2098
2891
|
};
|
|
2099
|
-
/** @description Display error */
|
|
2100
|
-
500: {
|
|
2101
|
-
headers: {
|
|
2102
|
-
[name: string]: unknown;
|
|
2103
|
-
};
|
|
2104
|
-
content: {
|
|
2105
|
-
'application/json': components['schemas']['Error'];
|
|
2106
|
-
};
|
|
2107
|
-
};
|
|
2108
2892
|
};
|
|
2109
2893
|
};
|
|
2110
2894
|
getDisplayBrightness: {
|
|
@@ -2129,12 +2913,12 @@ declare interface operations {
|
|
|
2129
2913
|
};
|
|
2130
2914
|
setDisplayBrightness: {
|
|
2131
2915
|
parameters: {
|
|
2132
|
-
query
|
|
2916
|
+
query: {
|
|
2133
2917
|
/**
|
|
2134
2918
|
* @description Displays brightness (0-100/auto)
|
|
2135
2919
|
* @example 50
|
|
2136
2920
|
*/
|
|
2137
|
-
value
|
|
2921
|
+
value: string;
|
|
2138
2922
|
};
|
|
2139
2923
|
header?: never;
|
|
2140
2924
|
path?: never;
|
|
@@ -2169,7 +2953,7 @@ declare interface operations {
|
|
|
2169
2953
|
* @description Application ID for organizing assets
|
|
2170
2954
|
* @example my_app
|
|
2171
2955
|
*/
|
|
2172
|
-
|
|
2956
|
+
application_name: string;
|
|
2173
2957
|
/**
|
|
2174
2958
|
* @description Path to audio file within app's assets directory
|
|
2175
2959
|
* @example data.snd
|
|
@@ -2538,7 +3322,7 @@ declare interface operations {
|
|
|
2538
3322
|
};
|
|
2539
3323
|
};
|
|
2540
3324
|
};
|
|
2541
|
-
|
|
3325
|
+
connectScreenWebSocket: {
|
|
2542
3326
|
parameters: {
|
|
2543
3327
|
query?: never;
|
|
2544
3328
|
header?: never;
|
|
@@ -2547,16 +3331,14 @@ declare interface operations {
|
|
|
2547
3331
|
};
|
|
2548
3332
|
requestBody?: never;
|
|
2549
3333
|
responses: {
|
|
2550
|
-
/** @description
|
|
2551
|
-
|
|
3334
|
+
/** @description WebSocket connection established */
|
|
3335
|
+
101: {
|
|
2552
3336
|
headers: {
|
|
2553
3337
|
[name: string]: unknown;
|
|
2554
3338
|
};
|
|
2555
|
-
content
|
|
2556
|
-
'application/json': components['schemas']['TimestampInfo'];
|
|
2557
|
-
};
|
|
3339
|
+
content?: never;
|
|
2558
3340
|
};
|
|
2559
|
-
/** @description
|
|
3341
|
+
/** @description Exceed max clients count */
|
|
2560
3342
|
400: {
|
|
2561
3343
|
headers: {
|
|
2562
3344
|
[name: string]: unknown;
|
|
@@ -2567,6 +3349,26 @@ declare interface operations {
|
|
|
2567
3349
|
};
|
|
2568
3350
|
};
|
|
2569
3351
|
};
|
|
3352
|
+
getTime: {
|
|
3353
|
+
parameters: {
|
|
3354
|
+
query?: never;
|
|
3355
|
+
header?: never;
|
|
3356
|
+
path?: never;
|
|
3357
|
+
cookie?: never;
|
|
3358
|
+
};
|
|
3359
|
+
requestBody?: never;
|
|
3360
|
+
responses: {
|
|
3361
|
+
/** @description Timestamp retrieved successfully */
|
|
3362
|
+
200: {
|
|
3363
|
+
headers: {
|
|
3364
|
+
[name: string]: unknown;
|
|
3365
|
+
};
|
|
3366
|
+
content: {
|
|
3367
|
+
'application/json': components['schemas']['TimestampInfo'];
|
|
3368
|
+
};
|
|
3369
|
+
};
|
|
3370
|
+
};
|
|
3371
|
+
};
|
|
2570
3372
|
unlinkAccount: {
|
|
2571
3373
|
parameters: {
|
|
2572
3374
|
query?: never;
|
|
@@ -2636,7 +3438,7 @@ declare interface operations {
|
|
|
2636
3438
|
};
|
|
2637
3439
|
};
|
|
2638
3440
|
};
|
|
2639
|
-
|
|
3441
|
+
getAccountStatus: {
|
|
2640
3442
|
parameters: {
|
|
2641
3443
|
query?: never;
|
|
2642
3444
|
header?: never;
|
|
@@ -2651,7 +3453,7 @@ declare interface operations {
|
|
|
2651
3453
|
[name: string]: unknown;
|
|
2652
3454
|
};
|
|
2653
3455
|
content: {
|
|
2654
|
-
'application/json': components['schemas']['
|
|
3456
|
+
'application/json': components['schemas']['AccountStatus'];
|
|
2655
3457
|
};
|
|
2656
3458
|
};
|
|
2657
3459
|
};
|
|
@@ -2965,7 +3767,7 @@ declare interface operations {
|
|
|
2965
3767
|
};
|
|
2966
3768
|
};
|
|
2967
3769
|
};
|
|
2968
|
-
|
|
3770
|
+
getSmartHomeCommissioningStatus: {
|
|
2969
3771
|
parameters: {
|
|
2970
3772
|
query?: never;
|
|
2971
3773
|
header?: never;
|
|
@@ -2974,18 +3776,18 @@ declare interface operations {
|
|
|
2974
3776
|
};
|
|
2975
3777
|
requestBody?: never;
|
|
2976
3778
|
responses: {
|
|
2977
|
-
/** @description Successfully got
|
|
3779
|
+
/** @description Successfully got smart home commissioning status */
|
|
2978
3780
|
200: {
|
|
2979
3781
|
headers: {
|
|
2980
3782
|
[name: string]: unknown;
|
|
2981
3783
|
};
|
|
2982
3784
|
content: {
|
|
2983
|
-
'application/json': components['schemas']['
|
|
3785
|
+
'application/json': components['schemas']['SmartHomePairingInfo'];
|
|
2984
3786
|
};
|
|
2985
3787
|
};
|
|
2986
3788
|
};
|
|
2987
3789
|
};
|
|
2988
|
-
|
|
3790
|
+
startSmartHomePairing: {
|
|
2989
3791
|
parameters: {
|
|
2990
3792
|
query?: never;
|
|
2991
3793
|
header?: never;
|
|
@@ -2994,16 +3796,16 @@ declare interface operations {
|
|
|
2994
3796
|
};
|
|
2995
3797
|
requestBody?: never;
|
|
2996
3798
|
responses: {
|
|
2997
|
-
/** @description Successfully started
|
|
3799
|
+
/** @description Successfully started smart home pairing */
|
|
2998
3800
|
200: {
|
|
2999
3801
|
headers: {
|
|
3000
3802
|
[name: string]: unknown;
|
|
3001
3803
|
};
|
|
3002
3804
|
content: {
|
|
3003
|
-
'application/json': components['schemas']['
|
|
3805
|
+
'application/json': components['schemas']['SmartHomePairingPayload'];
|
|
3004
3806
|
};
|
|
3005
3807
|
};
|
|
3006
|
-
/** @description Internal
|
|
3808
|
+
/** @description Internal smart home service is broken */
|
|
3007
3809
|
503: {
|
|
3008
3810
|
headers: {
|
|
3009
3811
|
[name: string]: unknown;
|
|
@@ -3463,7 +4265,7 @@ declare interface paths {
|
|
|
3463
4265
|
post: operations['drawOnDisplay'];
|
|
3464
4266
|
/**
|
|
3465
4267
|
* Clear display
|
|
3466
|
-
* @description
|
|
4268
|
+
* @description Deletes display elements drawn by the Canvas application. If application_name is specified, only elements for that app are removed.
|
|
3467
4269
|
*/
|
|
3468
4270
|
delete: operations['clearDisplay'];
|
|
3469
4271
|
options?: never;
|
|
@@ -3670,6 +4472,29 @@ declare interface paths {
|
|
|
3670
4472
|
patch?: never;
|
|
3671
4473
|
trace?: never;
|
|
3672
4474
|
};
|
|
4475
|
+
'/status/ws': {
|
|
4476
|
+
parameters: {
|
|
4477
|
+
query?: never;
|
|
4478
|
+
header?: never;
|
|
4479
|
+
path?: never;
|
|
4480
|
+
cookie?: never;
|
|
4481
|
+
};
|
|
4482
|
+
/**
|
|
4483
|
+
* Device status streaming WebSocket endpoint
|
|
4484
|
+
* @description WebSocket connection for real-time device status and screen streaming.
|
|
4485
|
+
* Upgrade from HTTP to WebSocket protocol is required.
|
|
4486
|
+
* After connection, client must enable streaming by sending JSON: {"enable": true}
|
|
4487
|
+
*
|
|
4488
|
+
*/
|
|
4489
|
+
get: operations['connectWebSocket'];
|
|
4490
|
+
put?: never;
|
|
4491
|
+
post?: never;
|
|
4492
|
+
delete?: never;
|
|
4493
|
+
options?: never;
|
|
4494
|
+
head?: never;
|
|
4495
|
+
patch?: never;
|
|
4496
|
+
trace?: never;
|
|
4497
|
+
};
|
|
3673
4498
|
'/wifi/status': {
|
|
3674
4499
|
parameters: {
|
|
3675
4500
|
query?: never;
|
|
@@ -3911,7 +4736,7 @@ declare interface paths {
|
|
|
3911
4736
|
* as JSON {"display": 0}
|
|
3912
4737
|
*
|
|
3913
4738
|
*/
|
|
3914
|
-
get: operations['
|
|
4739
|
+
get: operations['connectScreenWebSocket'];
|
|
3915
4740
|
put?: never;
|
|
3916
4741
|
post?: never;
|
|
3917
4742
|
delete?: never;
|
|
@@ -3951,6 +4776,15 @@ declare interface paths {
|
|
|
3951
4776
|
'application/json': components['schemas']['SuccessResponse'];
|
|
3952
4777
|
};
|
|
3953
4778
|
};
|
|
4779
|
+
/** @description Unable to start BLE */
|
|
4780
|
+
503: {
|
|
4781
|
+
headers: {
|
|
4782
|
+
[name: string]: unknown;
|
|
4783
|
+
};
|
|
4784
|
+
content: {
|
|
4785
|
+
'application/json': components['schemas']['Error'];
|
|
4786
|
+
};
|
|
4787
|
+
};
|
|
3954
4788
|
};
|
|
3955
4789
|
};
|
|
3956
4790
|
delete?: never;
|
|
@@ -3990,6 +4824,15 @@ declare interface paths {
|
|
|
3990
4824
|
'application/json': components['schemas']['SuccessResponse'];
|
|
3991
4825
|
};
|
|
3992
4826
|
};
|
|
4827
|
+
/** @description Unable to stop BLE */
|
|
4828
|
+
503: {
|
|
4829
|
+
headers: {
|
|
4830
|
+
[name: string]: unknown;
|
|
4831
|
+
};
|
|
4832
|
+
content: {
|
|
4833
|
+
'application/json': components['schemas']['Error'];
|
|
4834
|
+
};
|
|
4835
|
+
};
|
|
3993
4836
|
};
|
|
3994
4837
|
};
|
|
3995
4838
|
delete?: never;
|
|
@@ -4173,7 +5016,7 @@ declare interface paths {
|
|
|
4173
5016
|
* Get MQTT status info
|
|
4174
5017
|
* @description Retrieves MQTT status
|
|
4175
5018
|
*/
|
|
4176
|
-
get: operations['
|
|
5019
|
+
get: operations['getAccountStatus'];
|
|
4177
5020
|
put?: never;
|
|
4178
5021
|
post?: never;
|
|
4179
5022
|
delete?: never;
|
|
@@ -4319,7 +5162,7 @@ declare interface paths {
|
|
|
4319
5162
|
patch?: never;
|
|
4320
5163
|
trace?: never;
|
|
4321
5164
|
};
|
|
4322
|
-
'/
|
|
5165
|
+
'/smart_home/pairing': {
|
|
4323
5166
|
parameters: {
|
|
4324
5167
|
query?: never;
|
|
4325
5168
|
header?: never;
|
|
@@ -4327,10 +5170,10 @@ declare interface paths {
|
|
|
4327
5170
|
cookie?: never;
|
|
4328
5171
|
};
|
|
4329
5172
|
/** Smart home commissioning status */
|
|
4330
|
-
get: operations['
|
|
5173
|
+
get: operations['getSmartHomeCommissioningStatus'];
|
|
4331
5174
|
put?: never;
|
|
4332
5175
|
/** Link device to a smart home */
|
|
4333
|
-
post: operations['
|
|
5176
|
+
post: operations['startSmartHomePairing'];
|
|
4334
5177
|
/** Erase all smart home links */
|
|
4335
5178
|
delete: {
|
|
4336
5179
|
parameters: {
|
|
@@ -4341,7 +5184,7 @@ declare interface paths {
|
|
|
4341
5184
|
};
|
|
4342
5185
|
requestBody?: never;
|
|
4343
5186
|
responses: {
|
|
4344
|
-
/** @description Successfully erased all
|
|
5187
|
+
/** @description Successfully erased all smart home pairing info, device restart is needed */
|
|
4345
5188
|
200: {
|
|
4346
5189
|
headers: {
|
|
4347
5190
|
[name: string]: unknown;
|
|
@@ -4350,7 +5193,7 @@ declare interface paths {
|
|
|
4350
5193
|
'application/json': components['schemas']['SuccessResponse'];
|
|
4351
5194
|
};
|
|
4352
5195
|
};
|
|
4353
|
-
/** @description Internal
|
|
5196
|
+
/** @description Internal smart home service is broken */
|
|
4354
5197
|
503: {
|
|
4355
5198
|
headers: {
|
|
4356
5199
|
[name: string]: unknown;
|
|
@@ -4366,14 +5209,14 @@ declare interface paths {
|
|
|
4366
5209
|
patch?: never;
|
|
4367
5210
|
trace?: never;
|
|
4368
5211
|
};
|
|
4369
|
-
'/
|
|
5212
|
+
'/smart_home/switch': {
|
|
4370
5213
|
parameters: {
|
|
4371
5214
|
query?: never;
|
|
4372
5215
|
header?: never;
|
|
4373
5216
|
path?: never;
|
|
4374
5217
|
cookie?: never;
|
|
4375
5218
|
};
|
|
4376
|
-
/** Get
|
|
5219
|
+
/** Get state of emulated smart home switch */
|
|
4377
5220
|
get: {
|
|
4378
5221
|
parameters: {
|
|
4379
5222
|
query?: never;
|
|
@@ -4383,16 +5226,16 @@ declare interface paths {
|
|
|
4383
5226
|
};
|
|
4384
5227
|
requestBody?: never;
|
|
4385
5228
|
responses: {
|
|
4386
|
-
/** @description Successfully got
|
|
5229
|
+
/** @description Successfully got state of emulated smart home switch */
|
|
4387
5230
|
200: {
|
|
4388
5231
|
headers: {
|
|
4389
5232
|
[name: string]: unknown;
|
|
4390
5233
|
};
|
|
4391
5234
|
content: {
|
|
4392
|
-
'application/json': components['schemas']['
|
|
5235
|
+
'application/json': components['schemas']['SmartHomeSwitchState'];
|
|
4393
5236
|
};
|
|
4394
5237
|
};
|
|
4395
|
-
/** @description Internal
|
|
5238
|
+
/** @description Internal smart home service is broken */
|
|
4396
5239
|
503: {
|
|
4397
5240
|
headers: {
|
|
4398
5241
|
[name: string]: unknown;
|
|
@@ -4404,7 +5247,7 @@ declare interface paths {
|
|
|
4404
5247
|
};
|
|
4405
5248
|
};
|
|
4406
5249
|
put?: never;
|
|
4407
|
-
/** Set
|
|
5250
|
+
/** Set state of emulated smart home switch */
|
|
4408
5251
|
post: {
|
|
4409
5252
|
parameters: {
|
|
4410
5253
|
query?: never;
|
|
@@ -4414,11 +5257,11 @@ declare interface paths {
|
|
|
4414
5257
|
};
|
|
4415
5258
|
requestBody: {
|
|
4416
5259
|
content: {
|
|
4417
|
-
'application/json': components['schemas']['
|
|
5260
|
+
'application/json': components['schemas']['SmartHomeSwitchState'];
|
|
4418
5261
|
};
|
|
4419
5262
|
};
|
|
4420
5263
|
responses: {
|
|
4421
|
-
/** @description Successfully set
|
|
5264
|
+
/** @description Successfully set state of emulated smart home switch */
|
|
4422
5265
|
200: {
|
|
4423
5266
|
headers: {
|
|
4424
5267
|
[name: string]: unknown;
|
|
@@ -4427,7 +5270,7 @@ declare interface paths {
|
|
|
4427
5270
|
'application/json': components['schemas']['SuccessResponse'];
|
|
4428
5271
|
};
|
|
4429
5272
|
};
|
|
4430
|
-
/** @description Internal
|
|
5273
|
+
/** @description Internal smart home service is broken */
|
|
4431
5274
|
503: {
|
|
4432
5275
|
headers: {
|
|
4433
5276
|
[name: string]: unknown;
|
|
@@ -4446,16 +5289,100 @@ declare interface paths {
|
|
|
4446
5289
|
};
|
|
4447
5290
|
}
|
|
4448
5291
|
|
|
4449
|
-
|
|
5292
|
+
/**
|
|
5293
|
+
* Helper to force TypeScript to expand complex types in tooltips.
|
|
5294
|
+
* It maps over each property and "flattens" the type.
|
|
5295
|
+
*/
|
|
5296
|
+
declare type Prettify<T> = {
|
|
5297
|
+
[K in keyof T]: T[K];
|
|
5298
|
+
} & {};
|
|
5299
|
+
|
|
5300
|
+
/**
|
|
5301
|
+
* Frame with RGBA support after worker processing
|
|
5302
|
+
*/
|
|
5303
|
+
export declare type ProcessedFrame = Prettify<Omit<BSB_Frame.Frame, 'data'> & {
|
|
5304
|
+
data?: Uint8Array | Uint8ClampedArray | null;
|
|
5305
|
+
}>;
|
|
5306
|
+
|
|
5307
|
+
/**
|
|
5308
|
+
* Protobuf State with processed updates.
|
|
5309
|
+
*/
|
|
5310
|
+
export declare type ProcessedSchemaState = Prettify<Omit<BSB_State.State, 'updates'> & {
|
|
5311
|
+
updates?: ProcessedUpdate[] | null;
|
|
5312
|
+
}>;
|
|
5313
|
+
|
|
5314
|
+
/**
|
|
5315
|
+
* Final state structure passed to callers.
|
|
5316
|
+
*/
|
|
5317
|
+
export declare type ProcessedState = Prettify<ProcessedSchemaState & {
|
|
5318
|
+
bar_id?: string;
|
|
5319
|
+
}>;
|
|
5320
|
+
|
|
5321
|
+
/**
|
|
5322
|
+
* StateUpdate with an optional 'state' key identifying the active module.
|
|
5323
|
+
* Also uses our ProcessedFrame for the 'frame' field.
|
|
5324
|
+
*/
|
|
5325
|
+
export declare type ProcessedUpdate = Prettify<Omit<BSB_State.StateUpdate, 'frame'> & {
|
|
5326
|
+
state?: StateUpdateKey;
|
|
5327
|
+
frame?: ProcessedFrame | null;
|
|
5328
|
+
}>;
|
|
5329
|
+
|
|
5330
|
+
export declare type RawDataCallback = (data: Uint8Array | string) => void;
|
|
5331
|
+
|
|
5332
|
+
/**
|
|
5333
|
+
* Wrapped structure for Remote mode
|
|
5334
|
+
*/
|
|
5335
|
+
export declare type RemoteState = Prettify<{
|
|
5336
|
+
bar_id: string;
|
|
5337
|
+
state: ProcessedSchemaState;
|
|
5338
|
+
}>;
|
|
5339
|
+
|
|
5340
|
+
/**
|
|
5341
|
+
* Connection for remote BUSY Bar devices via Remote.
|
|
5342
|
+
* Uses wss:// and provides subscription management.
|
|
5343
|
+
*/
|
|
5344
|
+
export declare class RemoteStateStream extends BaseStateStream {
|
|
5345
|
+
protected streamMode: StreamMode;
|
|
5346
|
+
private tokenProvider?;
|
|
5347
|
+
constructor(options: RemoteStreamOptions, config?: StreamConfig);
|
|
5348
|
+
/**
|
|
5349
|
+
* Subscribes to updates for a specific device GUID.
|
|
5350
|
+
*/
|
|
5351
|
+
subscribe(guid: string): void;
|
|
5352
|
+
/**
|
|
5353
|
+
* Unsubscribes from updates for a specific device GUID.
|
|
5354
|
+
*/
|
|
5355
|
+
unsubscribe(guid: string): void;
|
|
5356
|
+
/**
|
|
5357
|
+
* Standardizes the address to use wss:// or ws:// protocol.
|
|
5358
|
+
*/
|
|
5359
|
+
protected normalizeUrl(addr: string): string;
|
|
5360
|
+
/**
|
|
5361
|
+
* Handles token expiration by invoking the tokenProvider.
|
|
5362
|
+
* Returns the promise for deduplication.
|
|
5363
|
+
*/
|
|
5364
|
+
protected onTokenExpired(): Promise<string> | void;
|
|
5365
|
+
}
|
|
5366
|
+
|
|
5367
|
+
/**
|
|
5368
|
+
* Options for remote connections
|
|
5369
|
+
*/
|
|
5370
|
+
export declare interface RemoteStreamOptions extends StreamOptions {
|
|
5371
|
+
addr: string;
|
|
5372
|
+
tokenProvider?: () => Promise<string>;
|
|
5373
|
+
}
|
|
4450
5374
|
|
|
4451
|
-
declare type RequiredIpConfig = RequireKeys<NonNullable<
|
|
5375
|
+
declare type RequiredIpConfig = RequireKeys<NonNullable<WifiConnectRequestConfig['ip_config']>, 'ip_method'>;
|
|
4452
5376
|
|
|
4453
5377
|
declare type RequireKeys<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
|
|
4454
5378
|
|
|
4455
|
-
export declare interface ScreenFrameGetParams extends TimeoutOptions {
|
|
4456
|
-
display: paths['/screen']['get']['parameters']['query']['display'];
|
|
5379
|
+
export declare interface ScreenFrameGetParams extends TimeoutOptions, ScreenQuery {
|
|
4457
5380
|
}
|
|
4458
5381
|
|
|
5382
|
+
declare type ScreenQuery = paths['/screen']['get']['parameters']['query'];
|
|
5383
|
+
|
|
5384
|
+
export declare type ScreenResponse = components['schemas']['ScreenResponse'];
|
|
5385
|
+
|
|
4459
5386
|
export declare class ScreenStream {
|
|
4460
5387
|
private config;
|
|
4461
5388
|
readonly addr: string;
|
|
@@ -4484,6 +5411,8 @@ export declare interface ScreenStreamConfig {
|
|
|
4484
5411
|
apiSemver?: ApiSemver;
|
|
4485
5412
|
}
|
|
4486
5413
|
|
|
5414
|
+
declare type SetTimezoneQuery = operations['setTimeTimezone']['parameters']['query'];
|
|
5415
|
+
|
|
4487
5416
|
declare class SettingsMethods {
|
|
4488
5417
|
/**
|
|
4489
5418
|
* Get HTTP API access over Wi-Fi configuration.
|
|
@@ -4498,7 +5427,7 @@ declare class SettingsMethods {
|
|
|
4498
5427
|
*
|
|
4499
5428
|
* @param {HttpAccessParams} params - Access parameters:
|
|
4500
5429
|
* @param {boolean} params.mode - Enable/disable access.
|
|
4501
|
-
* @param {string} params.key - Access key (4-10 digits).
|
|
5430
|
+
* @param {string} [params.key] - Access key (4-10 digits).
|
|
4502
5431
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
4503
5432
|
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
4504
5433
|
*/
|
|
@@ -4522,10 +5451,109 @@ declare class SettingsMethods {
|
|
|
4522
5451
|
SettingsNameSet(this: BusyBar, params: NameParams): Promise<SuccessResponse>;
|
|
4523
5452
|
}
|
|
4524
5453
|
|
|
4525
|
-
declare
|
|
5454
|
+
declare class SmartHomeMethods {
|
|
5455
|
+
/**
|
|
5456
|
+
* Smart home commissioning status.
|
|
5457
|
+
*
|
|
5458
|
+
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
5459
|
+
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
5460
|
+
* @returns {Promise<SmartHomePairingInfo>} A promise that resolves to the pairing info.
|
|
5461
|
+
*/
|
|
5462
|
+
SmartHomePairingGet(this: BusyBar, params?: TimeoutOptions): Promise<SmartHomePairingInfo>;
|
|
5463
|
+
/**
|
|
5464
|
+
* Link device to a smart home.
|
|
5465
|
+
*
|
|
5466
|
+
* @param {TimeoutOptions} [params] - Optional timeout.
|
|
5467
|
+
* @returns {Promise<SmartHomePairingPayload>} A promise that resolves to the pairing payload.
|
|
5468
|
+
*/
|
|
5469
|
+
SmartHomePair(this: BusyBar, params?: TimeoutOptions): Promise<SmartHomePairingPayload>;
|
|
5470
|
+
/**
|
|
5471
|
+
* Erase all smart home links.
|
|
5472
|
+
*
|
|
5473
|
+
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
5474
|
+
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
5475
|
+
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
5476
|
+
*/
|
|
5477
|
+
SmartHomeErase(this: BusyBar, params?: TimeoutOptions): Promise<SuccessResponse>;
|
|
5478
|
+
/**
|
|
5479
|
+
* Get state of emulated smart home switch.
|
|
5480
|
+
*
|
|
5481
|
+
* @param {TimeoutOptions} [params] - Optional parameters.
|
|
5482
|
+
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
5483
|
+
* @returns {Promise<SmartHomeSwitchState>} A promise that resolves to the switch state.
|
|
5484
|
+
*/
|
|
5485
|
+
SmartHomeSwitchStateGet(this: BusyBar, params?: TimeoutOptions): Promise<SmartHomeSwitchState>;
|
|
5486
|
+
/**
|
|
5487
|
+
* Set state of emulated smart home switch.
|
|
5488
|
+
*
|
|
5489
|
+
* @param {SmartHomeSwitchState & TimeoutOptions} params - Switch state and optional timeout.
|
|
5490
|
+
* @returns {Promise<SuccessResponse>} A promise that resolves on success.
|
|
5491
|
+
*/
|
|
5492
|
+
SmartHomeSwitchStateSet(this: BusyBar, params: SmartHomeSwitchState & TimeoutOptions): Promise<SuccessResponse>;
|
|
5493
|
+
/**
|
|
5494
|
+
* @deprecated Use SmartHomePairingGet instead.
|
|
5495
|
+
*/
|
|
5496
|
+
MatterStatusGet(this: BusyBar, params?: TimeoutOptions): Promise<SmartHomePairingInfo>;
|
|
5497
|
+
/**
|
|
5498
|
+
* @deprecated Use SmartHomePair instead.
|
|
5499
|
+
*/
|
|
5500
|
+
MatterPair(this: BusyBar, params?: TimeoutOptions): Promise<SmartHomePairingPayload>;
|
|
5501
|
+
/**
|
|
5502
|
+
* @deprecated Use SmartHomeErase instead.
|
|
5503
|
+
*/
|
|
5504
|
+
MatterErase(this: BusyBar, params?: TimeoutOptions): Promise<SuccessResponse>;
|
|
5505
|
+
}
|
|
5506
|
+
|
|
5507
|
+
export declare type SmartHomePairingInfo = components['schemas']['SmartHomePairingInfo'];
|
|
5508
|
+
|
|
5509
|
+
export declare type SmartHomePairingPayload = components['schemas']['SmartHomePairingPayload'];
|
|
5510
|
+
|
|
5511
|
+
export declare type SmartHomeSwitchState = components['schemas']['SmartHomeSwitchState'];
|
|
5512
|
+
|
|
5513
|
+
/**
|
|
5514
|
+
* Custom error class for StateStream with machine-readable codes
|
|
5515
|
+
*/
|
|
5516
|
+
export declare class StateStreamError extends Error {
|
|
5517
|
+
readonly code: StateStreamErrorCode;
|
|
5518
|
+
readonly data?: any | undefined;
|
|
5519
|
+
constructor(code: StateStreamErrorCode, message: string, data?: any | undefined);
|
|
5520
|
+
}
|
|
5521
|
+
|
|
5522
|
+
/**
|
|
5523
|
+
* Error codes for StateStream
|
|
5524
|
+
*/
|
|
5525
|
+
export declare enum StateStreamErrorCode {
|
|
5526
|
+
CONNECTION_FAILED = "CONNECTION_FAILED",
|
|
5527
|
+
RECONNECT_FAILED = "RECONNECT_FAILED",
|
|
5528
|
+
CONNECTION_LOST = "CONNECTION_LOST",
|
|
5529
|
+
CONNECTION_TIMEOUT = "CONNECTION_TIMEOUT",
|
|
5530
|
+
AUTH_FAILED = "AUTH_FAILED",
|
|
5531
|
+
AUTH_REFRESH_FAILED = "AUTH_REFRESH_FAILED",
|
|
5532
|
+
DEVICE_ERROR = "DEVICE_ERROR",
|
|
5533
|
+
DECODE_ERROR = "DECODE_ERROR",
|
|
5534
|
+
FRAME_PROCESS_ERROR = "FRAME_PROCESS_ERROR",
|
|
5535
|
+
STREAM_ALREADY_STARTED = "STREAM_ALREADY_STARTED",
|
|
5536
|
+
WORKER_INIT_FAILED = "WORKER_INIT_FAILED",
|
|
5537
|
+
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
5538
|
+
}
|
|
5539
|
+
|
|
5540
|
+
/**
|
|
5541
|
+
* All possible keys in BSB_State.StateUpdate, automatically inferred from the schema.
|
|
5542
|
+
*/
|
|
5543
|
+
export declare type StateUpdateKey = keyof BSB_State.StateUpdate & string;
|
|
4526
5544
|
|
|
4527
5545
|
export declare type Status = components['schemas']['Status'];
|
|
4528
5546
|
|
|
5547
|
+
export declare type StatusCallback = (status: StreamStatus) => void;
|
|
5548
|
+
|
|
5549
|
+
/**
|
|
5550
|
+
* Generic container for status and error, reused across components
|
|
5551
|
+
*/
|
|
5552
|
+
export declare interface StatusComponent<E> {
|
|
5553
|
+
status: E;
|
|
5554
|
+
lastError?: StateStreamError;
|
|
5555
|
+
}
|
|
5556
|
+
|
|
4529
5557
|
export declare type StatusDevice = components['schemas']['StatusDevice'];
|
|
4530
5558
|
|
|
4531
5559
|
export declare type StatusFirmware = components['schemas']['StatusFirmware'];
|
|
@@ -4536,15 +5564,15 @@ export declare type StatusSystem = components['schemas']['StatusSystem'];
|
|
|
4536
5564
|
|
|
4537
5565
|
declare type StopListener = () => void;
|
|
4538
5566
|
|
|
4539
|
-
export declare interface StorageCreateDirectoryParams extends TimeoutOptions {
|
|
4540
|
-
path: operations['createStorageDir']['parameters']['query']['path'];
|
|
5567
|
+
export declare interface StorageCreateDirectoryParams extends TimeoutOptions, StorageCreateDirQuery {
|
|
4541
5568
|
}
|
|
4542
5569
|
|
|
5570
|
+
declare type StorageCreateDirQuery = operations['createStorageDir']['parameters']['query'];
|
|
5571
|
+
|
|
4543
5572
|
export declare type StorageDirElement = components['schemas']['StorageDirElement'];
|
|
4544
5573
|
|
|
4545
|
-
export declare interface StorageDownloadFileParams extends TimeoutOptions {
|
|
4546
|
-
|
|
4547
|
-
asArrayBuffer?: boolean;
|
|
5574
|
+
export declare interface StorageDownloadFileParams extends TimeoutOptions, StorageReadQuery {
|
|
5575
|
+
as_array_buffer?: boolean;
|
|
4548
5576
|
}
|
|
4549
5577
|
|
|
4550
5578
|
export declare type StorageFileElement = components['schemas']['StorageFileElement'];
|
|
@@ -4553,6 +5581,8 @@ export declare type StorageList = components['schemas']['StorageList'];
|
|
|
4553
5581
|
|
|
4554
5582
|
export declare type StorageListElement = components['schemas']['StorageListElement'];
|
|
4555
5583
|
|
|
5584
|
+
declare type StorageListQuery = operations['listStorageFiles']['parameters']['query'];
|
|
5585
|
+
|
|
4556
5586
|
declare class StorageMethods {
|
|
4557
5587
|
/**
|
|
4558
5588
|
* Upload file to internal storage. Uploads a file to a specified path.
|
|
@@ -4569,7 +5599,7 @@ declare class StorageMethods {
|
|
|
4569
5599
|
*
|
|
4570
5600
|
* @param {DownloadFileParams} params - Download parameters:
|
|
4571
5601
|
* @param {string} params.path - Path to the file.
|
|
4572
|
-
* @param {boolean} [params.
|
|
5602
|
+
* @param {boolean} [params.as_array_buffer] - Whether to return ArrayBuffer instead of Blob.
|
|
4573
5603
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
4574
5604
|
* @returns {Promise<StorageReadResponse>} A promise that resolves to the file content (Blob or ArrayBuffer).
|
|
4575
5605
|
*/
|
|
@@ -4621,24 +5651,77 @@ declare class StorageMethods {
|
|
|
4621
5651
|
StorageRename(this: BusyBar, params: StorageRenameParams): Promise<SuccessResponse>;
|
|
4622
5652
|
}
|
|
4623
5653
|
|
|
4624
|
-
export declare interface StorageReadDirectoryParams extends TimeoutOptions {
|
|
4625
|
-
path: operations['listStorageFiles']['parameters']['query']['path'];
|
|
5654
|
+
export declare interface StorageReadDirectoryParams extends TimeoutOptions, StorageListQuery {
|
|
4626
5655
|
}
|
|
4627
5656
|
|
|
5657
|
+
declare type StorageReadQuery = operations['readStorageFile']['parameters']['query'];
|
|
5658
|
+
|
|
4628
5659
|
export declare type StorageReadResponse = ArrayBuffer | Blob;
|
|
4629
5660
|
|
|
4630
|
-
export declare interface StorageRemoveParams extends TimeoutOptions {
|
|
4631
|
-
path: operations['removeStorageFile']['parameters']['query']['path'];
|
|
5661
|
+
export declare interface StorageRemoveParams extends TimeoutOptions, StorageRemoveQuery {
|
|
4632
5662
|
}
|
|
4633
5663
|
|
|
4634
|
-
|
|
5664
|
+
declare type StorageRemoveQuery = operations['removeStorageFile']['parameters']['query'];
|
|
5665
|
+
|
|
5666
|
+
export declare interface StorageRenameParams extends TimeoutOptions, StorageRenameQuery {
|
|
4635
5667
|
}
|
|
4636
5668
|
|
|
5669
|
+
declare type StorageRenameQuery = operations['RenameStorageFile']['parameters']['query'];
|
|
5670
|
+
|
|
4637
5671
|
export declare type StorageStatus = components['schemas']['StorageStatus'];
|
|
4638
5672
|
|
|
4639
|
-
export declare interface StorageUploadFileParams extends TimeoutOptions {
|
|
4640
|
-
|
|
4641
|
-
|
|
5673
|
+
export declare interface StorageUploadFileParams extends TimeoutOptions, StorageWriteQuery {
|
|
5674
|
+
file: BusyFile_2;
|
|
5675
|
+
}
|
|
5676
|
+
|
|
5677
|
+
declare type StorageWriteQuery = operations['writeStorageFile']['parameters']['query'];
|
|
5678
|
+
|
|
5679
|
+
/**
|
|
5680
|
+
* Global configuration for the stream behavior
|
|
5681
|
+
*/
|
|
5682
|
+
export declare interface StreamConfig {
|
|
5683
|
+
/** Connection timeout in milliseconds. Default: 5000ms */
|
|
5684
|
+
timeout?: number;
|
|
5685
|
+
/** Data inactivity timeout in milliseconds. Default: 15000ms */
|
|
5686
|
+
dataTimeout?: number;
|
|
5687
|
+
}
|
|
5688
|
+
|
|
5689
|
+
/**
|
|
5690
|
+
* High-level lifecycle of the StateStream class instance
|
|
5691
|
+
*/
|
|
5692
|
+
export declare enum StreamLifecycle {
|
|
5693
|
+
IDLE = "IDLE",
|
|
5694
|
+
STARTING = "STARTING",
|
|
5695
|
+
RUNNING = "RUNNING",
|
|
5696
|
+
STOPPED = "STOPPED",
|
|
5697
|
+
FAILED = "FAILED"
|
|
5698
|
+
}
|
|
5699
|
+
|
|
5700
|
+
/**
|
|
5701
|
+
* Generic container for status and error, reused across components
|
|
5702
|
+
*/
|
|
5703
|
+
declare type StreamMode = 'local' | 'remote';
|
|
5704
|
+
|
|
5705
|
+
/**
|
|
5706
|
+
* Base internal options for connections
|
|
5707
|
+
*/
|
|
5708
|
+
declare interface StreamOptions {
|
|
5709
|
+
addr?: string;
|
|
5710
|
+
token?: string;
|
|
5711
|
+
isBinary?: boolean;
|
|
5712
|
+
}
|
|
5713
|
+
|
|
5714
|
+
/**
|
|
5715
|
+
* The unified StateStream status object
|
|
5716
|
+
*/
|
|
5717
|
+
export declare interface StreamStatus {
|
|
5718
|
+
main: StatusComponent<StreamLifecycle>;
|
|
5719
|
+
connection: StatusComponent<ConnectionStatus>;
|
|
5720
|
+
auth: StatusComponent<AuthStatus>;
|
|
5721
|
+
data: StatusComponent<DataStatus> & {
|
|
5722
|
+
lastActivity?: number;
|
|
5723
|
+
};
|
|
5724
|
+
worker: StatusComponent<WorkerStatus>;
|
|
4642
5725
|
}
|
|
4643
5726
|
|
|
4644
5727
|
export declare type SuccessResponse = components['schemas']['SuccessResponse'];
|
|
@@ -4694,6 +5777,8 @@ declare class SystemMethods {
|
|
|
4694
5777
|
SystemStatusFirmwareGet(this: BusyBar, params?: TimeoutOptions): Promise<StatusFirmware>;
|
|
4695
5778
|
}
|
|
4696
5779
|
|
|
5780
|
+
export declare type TextElement = components['schemas']['TextElement'];
|
|
5781
|
+
|
|
4697
5782
|
declare class TimeMethods {
|
|
4698
5783
|
/**
|
|
4699
5784
|
* Get current timestamp info.
|
|
@@ -4745,12 +5830,10 @@ export declare interface TimeoutOptions {
|
|
|
4745
5830
|
|
|
4746
5831
|
export declare type TimestampInfo = components['schemas']['TimestampInfo'];
|
|
4747
5832
|
|
|
4748
|
-
export declare interface TimeTimestampParams extends TimeoutOptions {
|
|
4749
|
-
timestamp: operations['setTimeTimestamp']['parameters']['query']['timestamp'];
|
|
5833
|
+
export declare interface TimeTimestampParams extends TimeoutOptions, TimestampInfo {
|
|
4750
5834
|
}
|
|
4751
5835
|
|
|
4752
|
-
export declare interface TimeTimezoneParams extends TimeoutOptions {
|
|
4753
|
-
timezone: operations['setTimeTimezone']['parameters']['query']['timezone'];
|
|
5836
|
+
export declare interface TimeTimezoneParams extends TimeoutOptions, SetTimezoneQuery {
|
|
4754
5837
|
}
|
|
4755
5838
|
|
|
4756
5839
|
export declare type TimezoneInfo = components['schemas']['TimezoneInfo'];
|
|
@@ -4764,18 +5847,20 @@ export declare interface UpdateAutoUpdateParams extends TimeoutOptions, AutoUpda
|
|
|
4764
5847
|
|
|
4765
5848
|
export declare type UpdateChangelog = operations['getUpdateChangelog']['responses']['200']['content']['application/json'];
|
|
4766
5849
|
|
|
4767
|
-
export declare interface UpdateChangelogParams extends TimeoutOptions {
|
|
4768
|
-
version: string;
|
|
5850
|
+
export declare interface UpdateChangelogParams extends TimeoutOptions, UpdateChangelogQuery {
|
|
4769
5851
|
}
|
|
4770
5852
|
|
|
5853
|
+
declare type UpdateChangelogQuery = operations['getUpdateChangelog']['parameters']['query'];
|
|
5854
|
+
|
|
4771
5855
|
export declare interface UpdateFromFileParams extends TimeoutOptions {
|
|
4772
|
-
file:
|
|
5856
|
+
file: BusyFile_2;
|
|
4773
5857
|
}
|
|
4774
5858
|
|
|
4775
|
-
export declare interface UpdateInstallParams extends TimeoutOptions {
|
|
4776
|
-
version: string;
|
|
5859
|
+
export declare interface UpdateInstallParams extends TimeoutOptions, UpdateInstallQuery {
|
|
4777
5860
|
}
|
|
4778
5861
|
|
|
5862
|
+
declare type UpdateInstallQuery = operations['installFirmwareUpdate']['parameters']['query'];
|
|
5863
|
+
|
|
4779
5864
|
declare class UpdateMethods {
|
|
4780
5865
|
/**
|
|
4781
5866
|
* Upload firmware update package.
|
|
@@ -4853,9 +5938,9 @@ export declare type UpdateStatus = components['schemas']['UpdateStatus'];
|
|
|
4853
5938
|
|
|
4854
5939
|
export declare type VersionInfo = components['schemas']['VersionInfo'];
|
|
4855
5940
|
|
|
4856
|
-
export declare type WifiConnectParams = RequireKeys<Omit<
|
|
4857
|
-
|
|
4858
|
-
}, 'ssid' | 'security' | '
|
|
5941
|
+
export declare type WifiConnectParams = RequireKeys<Omit<WifiConnectRequestConfig, 'ip_config'> & {
|
|
5942
|
+
ip_config: RequiredIpConfig;
|
|
5943
|
+
}, 'ssid' | 'security' | 'ip_config'> & TimeoutOptions;
|
|
4859
5944
|
|
|
4860
5945
|
export declare type WifiConnectRequestConfig = components['schemas']['ConnectRequestConfig'];
|
|
4861
5946
|
|
|
@@ -4879,7 +5964,7 @@ declare class WifiMethods {
|
|
|
4879
5964
|
* @param {string} params.ssid - Network SSID.
|
|
4880
5965
|
* @param {string} params.password - Network password.
|
|
4881
5966
|
* @param {WifiSecurityMethod} params.security - Security method.
|
|
4882
|
-
* @param {object} params.
|
|
5967
|
+
* @param {object} [params.ip_config] - IP configuration.
|
|
4883
5968
|
* @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
|
|
4884
5969
|
* @returns {Promise<SuccessResponse>} A promise that resolves on successful connection initiation.
|
|
4885
5970
|
*/
|
|
@@ -4910,4 +5995,63 @@ export declare type WifiSecurityMethod = components['schemas']['WifiSecurityMeth
|
|
|
4910
5995
|
|
|
4911
5996
|
export declare type WifiStatusResponse = components['schemas']['StatusResponse'];
|
|
4912
5997
|
|
|
5998
|
+
/**
|
|
5999
|
+
* Worker Commands (Sent from main thread to worker)
|
|
6000
|
+
*/
|
|
6001
|
+
declare type WorkerCommand = {
|
|
6002
|
+
type: 'START';
|
|
6003
|
+
addr: string;
|
|
6004
|
+
token?: string;
|
|
6005
|
+
isBinary: boolean;
|
|
6006
|
+
mode: StreamMode;
|
|
6007
|
+
} | {
|
|
6008
|
+
type: 'STOP';
|
|
6009
|
+
} | {
|
|
6010
|
+
type: 'UPDATE_TOKEN';
|
|
6011
|
+
token: string;
|
|
6012
|
+
} | {
|
|
6013
|
+
type: 'SUBSCRIBE';
|
|
6014
|
+
guid: string;
|
|
6015
|
+
} | {
|
|
6016
|
+
type: 'UNSUBSCRIBE';
|
|
6017
|
+
guid: string;
|
|
6018
|
+
};
|
|
6019
|
+
|
|
6020
|
+
/**
|
|
6021
|
+
* Worker Events (Sent from worker to main thread)
|
|
6022
|
+
*/
|
|
6023
|
+
declare type WorkerEvent = {
|
|
6024
|
+
type: 'CONNECTED';
|
|
6025
|
+
} | {
|
|
6026
|
+
type: 'DISCONNECTED';
|
|
6027
|
+
} | {
|
|
6028
|
+
type: 'TOKEN_EXPIRED';
|
|
6029
|
+
} | {
|
|
6030
|
+
type: 'ERROR';
|
|
6031
|
+
code: StateStreamErrorCode;
|
|
6032
|
+
message: string;
|
|
6033
|
+
data?: any;
|
|
6034
|
+
} | {
|
|
6035
|
+
type: 'RAW_DATA';
|
|
6036
|
+
data: Uint8Array | string;
|
|
6037
|
+
} | {
|
|
6038
|
+
type: 'DATA';
|
|
6039
|
+
data: ProcessedSchemaState | RemoteState;
|
|
6040
|
+
} | {
|
|
6041
|
+
type: 'STATUS_UPDATE';
|
|
6042
|
+
connection?: ConnectionStatus;
|
|
6043
|
+
auth?: AuthStatus;
|
|
6044
|
+
worker?: WorkerStatus;
|
|
6045
|
+
};
|
|
6046
|
+
|
|
6047
|
+
/**
|
|
6048
|
+
* Internal Worker/Infrastructure state
|
|
6049
|
+
*/
|
|
6050
|
+
export declare enum WorkerStatus {
|
|
6051
|
+
OFF = "OFF",
|
|
6052
|
+
INITIALIZING = "INITIALIZING",
|
|
6053
|
+
READY = "READY",
|
|
6054
|
+
ERROR = "ERROR"
|
|
6055
|
+
}
|
|
6056
|
+
|
|
4913
6057
|
export { }
|