@busy-app/busy-lib 0.5.0 → 0.7.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.d.ts CHANGED
@@ -1,38 +1,33 @@
1
+ export declare type AccountInfo = components["schemas"]["AccountInfo"];
2
+
3
+ export declare type AccountLink = components["schemas"]["AccountLink"];
4
+
1
5
  declare type ApiKey = string;
2
6
 
3
7
  declare type ApiSemver = components["schemas"]["VersionInfo"]["api_semver"];
4
8
 
5
- export declare interface AssetsDeleteParams {
9
+ export declare interface AssetsDeleteParams extends TimeoutOptions {
6
10
  appId: paths["/assets/upload"]["delete"]["parameters"]["query"]["app_id"];
7
11
  }
8
12
 
9
- export declare interface AssetsUploadParams {
13
+ export declare interface AssetsUploadParams extends TimeoutOptions {
10
14
  appId: paths["/assets/upload"]["post"]["parameters"]["query"]["app_id"];
11
15
  fileName: paths["/assets/upload"]["post"]["parameters"]["query"]["file"];
12
16
  file: BusyFile;
13
17
  }
14
18
 
15
- export declare interface AudioPlayParams {
19
+ export declare interface AudioPlayParams extends TimeoutOptions {
16
20
  appId: paths["/audio/play"]["post"]["parameters"]["query"]["app_id"];
17
21
  path: paths["/audio/play"]["post"]["parameters"]["query"]["path"];
18
22
  }
19
23
 
20
24
  export declare type AudioVolumeInfo = components["schemas"]["AudioVolumeInfo"];
21
25
 
22
- export declare interface AudioVolumeParams {
26
+ export declare interface AudioVolumeParams extends TimeoutOptions {
23
27
  volume: operations["setAudioVolume"]["parameters"]["query"]["volume"];
24
28
  }
25
29
 
26
- declare interface BaseConfig {
27
- deviceScreen: DeviceScreen;
28
- apiKey?: ApiKey;
29
- apiSemver?: ApiSemver;
30
- }
31
-
32
- declare interface BaseConfig_2 {
33
- apiKey?: ApiKey;
34
- apiSemver?: ApiSemver;
35
- }
30
+ export declare type BleStatusResponse = components["schemas"]["BleStatusResponse"];
36
31
 
37
32
  declare type Brightness = number | "auto";
38
33
 
@@ -47,12 +42,19 @@ export declare class BusyBar {
47
42
  * @type {BusyBarConfig['host']}
48
43
  * @readonly
49
44
  */
50
- readonly addr: BusyBarConfig["addr"];
45
+ readonly addr: string;
51
46
  /**
52
47
  * Current API semantic version.
53
48
  * @type {ApiSemver}
54
49
  */
55
50
  apiSemver: ApiSemver;
51
+ /**
52
+ * Detected connection type based on auth requirements.
53
+ * - "wifi": Device requires authentication (returned 401/403).
54
+ * - "usb": Device allows access without token (returned 200).
55
+ * - "unknown": Detection failed or not yet completed.
56
+ */
57
+ connectionType: "usb" | "wifi" | "unknown";
56
58
  /**
57
59
  * Creates an instance of BUSY Bar.
58
60
  * Initializes the API client with the provided host address.
@@ -77,106 +79,242 @@ export declare class BusyBar {
77
79
  */
78
80
  constructor(config?: BusyBarConfig);
79
81
  /**
80
- * Retrieves the API semantic version.
82
+ * Probes the device to determine connection type.
83
+ * Sends a request without authentication credentials.
84
+ */
85
+ private detectConnectionType;
86
+ /**
87
+ * Get API version information.
81
88
  *
89
+ * @param {TimeoutOptions} [params] - Optional parameters.
90
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
82
91
  * @returns {Promise<VersionInfo>} A promise that resolves to an object containing the `api_semver` string.
83
92
  */
84
- getApiVersion(): Promise<VersionInfo>;
93
+ SystemVersion(params?: TimeoutOptions): Promise<VersionInfo>;
94
+ /**
95
+ * @deprecated Use `SystemVersion` instead. will be removed in the next release.
96
+ */
97
+ getApiVersion(params?: TimeoutOptions): Promise<VersionInfo>;
85
98
  /**
86
- * Updates the firmware.
99
+ * Update firmware. Uploads a firmware update package (TAR file) and initiates the update process.
87
100
  *
88
101
  * @param {UpdateParams} params - Parameters for the firmware update.
89
- * @param {UpdateParams['name']} params.name - Name for the update package.
90
- * @param {UpdateParams['file']} params.file - File data to upload.
102
+ * @param {UpdateParams['name']} params.name - Name for the update package.
103
+ * @param {UpdateParams['file']} params.file - File data to upload.
104
+ * @param {UpdateParams['timeout']} [params.timeout] - Request timeout in milliseconds.
91
105
  * @returns {Promise<SuccessResponse>} Result of the update operation.
92
106
  */
107
+ SystemUpdate(params: SystemUpdateParams): Promise<SuccessResponse>;
108
+ /**
109
+ * @deprecated Use `SystemUpdate` instead. will be removed in the next release.
110
+ */
93
111
  updateFirmware(params: SystemUpdateParams): Promise<SuccessResponse>;
94
112
  /**
95
- * Gets the current status of the device, including system and power information.
113
+ * Get device status.
96
114
  *
115
+ * @param {TimeoutOptions} [params] - Optional parameters.
116
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
97
117
  * @returns {Promise<Status>} Current status of the device.
98
118
  */
99
- deviceStatus(): Promise<Status>;
119
+ SystemStatus(params?: TimeoutOptions): Promise<Status>;
120
+ /**
121
+ * @deprecated Use `SystemStatus` instead. will be removed in the next release.
122
+ */
123
+ deviceStatus(params?: TimeoutOptions): Promise<Status>;
100
124
  /**
101
- * Gets the current system status.
125
+ * Get system status.
102
126
  *
127
+ * @param {TimeoutOptions} [params] - Optional parameters.
128
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
103
129
  * @returns {Promise<StatusSystem>} Current system status.
104
130
  */
105
- systemStatus(): Promise<StatusSystem>;
131
+ SystemInfo(params?: TimeoutOptions): Promise<StatusSystem>;
106
132
  /**
107
- * Gets the current power status.
133
+ * @deprecated Use `SystemInfo` instead. will be removed in the next release.
134
+ */
135
+ systemStatus(params?: TimeoutOptions): Promise<StatusSystem>;
136
+ /**
137
+ * Get power status.
108
138
  *
139
+ * @param {TimeoutOptions} [params] - Optional parameters.
140
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
109
141
  * @returns {Promise<StatusPower>} Current power status.
110
142
  */
111
- powerStatus(): Promise<StatusPower>;
143
+ SystemStatusPower(params?: TimeoutOptions): Promise<StatusPower>;
144
+ /**
145
+ * @deprecated Use `SystemStatusPower` instead. will be removed in the next release.
146
+ */
147
+ powerStatus(params?: TimeoutOptions): Promise<StatusPower>;
148
+ /**
149
+ * Get current timestamp with timezone. Retrieves the current timestamp from RTC with timezone in ISO 8601 format.
150
+ *
151
+ * @param {TimeoutOptions} [params] - Optional parameters.
152
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
153
+ * @returns {Promise<TimestampInfo>} Current device timestamp as an ISO 8601 string.
154
+ */
155
+ SystemTime(params?: TimeoutOptions): Promise<TimestampInfo>;
156
+ /**
157
+ * @deprecated Use `SystemTime` instead. will be removed in the next release.
158
+ */
159
+ getTime(params?: TimeoutOptions): Promise<TimestampInfo>;
160
+ /**
161
+ * Set current timestamp. Sets the RTC timestamp in ISO 8601 format.
162
+ * * - Without 'Z': treated as local time
163
+ * * - With 'Z': treated as UTC and converted to local time using current timezone offset
164
+ *
165
+ * @param {SetTimestampParams} params - The parameters for setting the timestamp.
166
+ * @param {SetTimestampParams['timestamp']} params.timestamp - The new timestamp (ISO 8601 string).
167
+ * @param {SetTimestampParams['timeout']} [params.timeout] - Request timeout in milliseconds.
168
+ * @returns {Promise<SuccessResponse>} A success response if the timestamp was set.
169
+ */
170
+ SystemTimeTimestamp(params: SystemTimestampParams): Promise<SuccessResponse>;
112
171
  /**
113
- * Uploads an asset to the device.
172
+ * @deprecated Use `SystemTimeTimestamp` instead. will be removed in the next release.
173
+ */
174
+ setTimestamp(params: SystemTimestampParams): Promise<SuccessResponse>;
175
+ /**
176
+ * Set timezone offset. Sets the timezone offset in ±HH:MM format.
177
+ *
178
+ * @param {SetTimezoneParams} params - The parameters for setting the timezone.
179
+ * @param {SetTimezoneParams['timezone']} params.timezone - The new timezone identifier (IANA TZ string).
180
+ * @param {SetTimezoneParams['timeout']} [params.timeout] - Request timeout in milliseconds.
181
+ * @returns {Promise<SuccessResponse>} A success response if the timezone was set.
182
+ */
183
+ SystemTimeTimezone(params: SystemTimezoneParams): Promise<SuccessResponse>;
184
+ /**
185
+ * @deprecated Use `SystemTimeTimezone` instead. will be removed in the next release.
186
+ */
187
+ setTimezone(params: SystemTimezoneParams): Promise<SuccessResponse>;
188
+ /**
189
+ * Get MQTT status info.
190
+ *
191
+ * @param {TimeoutOptions} [params] - Optional parameters.
192
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
193
+ * @returns {Promise<AccountInfo>} Information about the current MQTT account status.
194
+ */
195
+ Account(params?: TimeoutOptions): Promise<AccountInfo>;
196
+ /**
197
+ * @deprecated Use `Account` instead. will be removed in the next release.
198
+ */
199
+ getMqttStatus(params?: TimeoutOptions): Promise<AccountInfo>;
200
+ /**
201
+ * Unlink device from account. Removes account linking data.
202
+ *
203
+ * @param {TimeoutOptions} [params] - Optional parameters.
204
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
205
+ * @returns {Promise<SuccessResponse>} Result of the account unlink operation.
206
+ */
207
+ AccountUnlink(params?: TimeoutOptions): Promise<SuccessResponse>;
208
+ /**
209
+ * @deprecated Use `AccountUnlink` instead. will be removed in the next release.
210
+ */
211
+ unlinkAccount(params?: TimeoutOptions): Promise<SuccessResponse>;
212
+ /**
213
+ * Link device to account. Requests account link PIN. Works only if device is connected to MQTT and is not linked to account.
214
+ *
215
+ * @param {TimeoutOptions} [params] - Optional parameters.
216
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
217
+ * @returns {Promise<AccountLink>} Information about the account link operation.
218
+ */
219
+ AccountLink(params?: TimeoutOptions): Promise<AccountLink>;
220
+ /**
221
+ * @deprecated Use `AccountLink` instead. will be removed in the next release.
222
+ */
223
+ linkAccount(params?: TimeoutOptions): Promise<AccountLink>;
224
+ /**
225
+ * Upload asset file with app ID. Uploads a file to a specific app's assets directory.
114
226
  *
115
227
  * @param {UploadParams} params - Parameters for the upload.
116
- * @param {UploadParams['appId']} params.appId - Application ID for organizing assets.
117
- * @param {UploadParams['fileName']} params.fileName - Filename for the uploaded asset.
118
- * @param {UploadParams['file']} params.file - File data to upload.
228
+ * @param {UploadParams['appId']} params.appId - Application ID for organizing assets.
229
+ * @param {UploadParams['fileName']} params.fileName - Filename for the uploaded asset.
230
+ * @param {UploadParams['file']} params.file - File data to upload.
231
+ * @param {UploadParams['timeout']} [params.timeout] - Request timeout in milliseconds.
119
232
  * @returns {Promise<SuccessResponse>} Result of the upload operation.
120
233
  */
234
+ AssetsUpload(params: AssetsUploadParams): Promise<SuccessResponse>;
235
+ /**
236
+ * @deprecated Use `AssetsUpload` instead. will be removed in the next release.
237
+ */
121
238
  uploadAsset(params: AssetsUploadParams): Promise<SuccessResponse>;
122
239
  /**
123
- * Deletes all assets for a specific application from the device.
240
+ * Delete app assets. Deletes all assets for a specific app ID.
124
241
  *
125
242
  * @param {DeleteParams} params - Parameters for the delete.
126
- * @param {DeleteParams['appId']} params.appId - Application ID whose assets should be deleted.
243
+ * @param {DeleteParams['appId']} params.appId - Application ID whose assets should be deleted.
244
+ * @param {DeleteParams['timeout']} [params.timeout] - Request timeout in milliseconds.
127
245
  * @returns {Promise<SuccessResponse>} Result of the delete operation.
128
246
  */
247
+ AssetsDelete(params: AssetsDeleteParams): Promise<SuccessResponse>;
248
+ /**
249
+ * @deprecated Use `AssetsDelete` instead. will be removed in the next release.
250
+ */
129
251
  deleteAssets(params: AssetsDeleteParams): Promise<SuccessResponse>;
130
252
  /**
131
- * Draws elements on the device display.
253
+ * Draw on display. Sends drawing data to the display. Supports JSON-defined display elements.
132
254
  *
133
255
  * @param {DrawParams} params - Parameters for the draw operation.
134
- * @param {DrawParams['appId']} params.appId - Application ID for organizing display elements.
135
- * @param {DrawParams['elements'][]} params.elements - Array of display elements (text or image).
256
+ * @param {DrawParams['appId']} params.appId - Application ID for organizing display elements.
257
+ * @param {DrawParams['elements'][]} params.elements - Array of display elements (text or image).
258
+ * @param {DrawParams['timeout']} [params.timeout] - Request timeout in milliseconds.
136
259
  * @returns {Promise<SuccessResponse>} Result of the draw operation.
137
260
  */
261
+ DisplayDraw(params: DisplayDrawParams): Promise<SuccessResponse>;
262
+ /**
263
+ * @deprecated Use `DisplayDraw` instead. will be removed in the next release.
264
+ */
138
265
  drawDisplay(params: DisplayDrawParams): Promise<SuccessResponse>;
139
266
  /**
140
- * Clears the device display and stops the Canvas application if running.
267
+ * Clear display. Clears the display and stops the Canvas application if running.
141
268
  *
269
+ * @param {TimeoutOptions} [params] - Optional parameters.
270
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
142
271
  * @returns {Promise<SuccessResponse>} Result of the clear operation.
143
272
  */
144
- clearDisplay(): Promise<SuccessResponse>;
273
+ DisplayClear(params?: TimeoutOptions): Promise<SuccessResponse>;
145
274
  /**
146
- * Plays an audio file from the assets directory.
275
+ * @deprecated Use `DisplayClear` instead. will be removed in the next release.
276
+ */
277
+ clearDisplay(params?: TimeoutOptions): Promise<SuccessResponse>;
278
+ /**
279
+ * Play audio file. Plays an audio file from the assets directory. Supported formats include .snd files.
147
280
  *
148
281
  * @param {AudioPlayParams} params - Parameters for the audio playback.
149
- * @param {AudioPlayParams['appId']} params.appId - Application ID for organizing assets.
150
- * @param {AudioPlayParams['path']} params.path - Path to the audio file within the app's assets directory.
282
+ * @param {AudioPlayParams['appId']} params.appId - Application ID for organizing assets.
283
+ * @param {AudioPlayParams['path']} params.path - Path to the audio file within the app's assets directory.
284
+ * @param {AudioPlayParams['timeout']} [params.timeout] - Request timeout in milliseconds.
151
285
  * @returns {Promise<SuccessResponse>} Result of the play operation.
152
286
  */
287
+ AudioPlay(params: AudioPlayParams): Promise<SuccessResponse>;
288
+ /**
289
+ * @deprecated Use `AudioPlay` instead. will be removed in the next release.
290
+ */
153
291
  playSound(params: AudioPlayParams): Promise<SuccessResponse>;
154
292
  /**
155
- * Stops any currently playing audio on the device.
293
+ * Stop audio playback. Stops any currently playing audio.
156
294
  *
295
+ * @param {TimeoutOptions} [params] - Optional parameters.
296
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
157
297
  * @returns {Promise<SuccessResponse>} Result of the stop operation.
158
298
  */
159
- stopSound(): Promise<SuccessResponse>;
299
+ AudioStop(params?: TimeoutOptions): Promise<SuccessResponse>;
160
300
  /**
161
- * Enables the device's Wi-Fi module.
162
- *
163
- * @returns {Promise<SuccessResponse>} Result of the enable operation.
301
+ * @deprecated Use `AudioStop` instead. will be removed in the next release.
164
302
  */
165
- enableWifi(): Promise<SuccessResponse>;
303
+ stopSound(params?: TimeoutOptions): Promise<SuccessResponse>;
166
304
  /**
167
- * Disables the device's Wi-Fi module.
305
+ * Returns current Wi-Fi status.
168
306
  *
169
- * @returns {Promise<SuccessResponse>} Result of the disable operation.
307
+ * @param {TimeoutOptions} [params] - Optional parameters.
308
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
309
+ * @returns {Promise<WifiStatusResponse>} Current Wi-Fi status.
170
310
  */
171
- disableWifi(): Promise<SuccessResponse>;
311
+ WifiStatus(params?: TimeoutOptions): Promise<WifiStatusResponse>;
172
312
  /**
173
- * Gets the current status of the Wi-Fi module.
174
- *
175
- * @returns {Promise<WifiStatusResponse>} Current Wi-Fi status.
313
+ * @deprecated Use `WifiStatus` instead. will be removed in the next release.
176
314
  */
177
- statusWifi(): Promise<WifiStatusResponse>;
315
+ statusWifi(params?: TimeoutOptions): Promise<WifiStatusResponse>;
178
316
  /**
179
- * Connects the device to a Wi-Fi network with the specified parameters.
317
+ * Attempts to connect to Wi-Fi using config.
180
318
  *
181
319
  * @param {ConnectParams} params - Connection parameters:
182
320
  * @param {ConnectParams['ssid']} params.ssid - SSID (network name) to connect to.
@@ -188,145 +326,293 @@ export declare class BusyBar {
188
326
  * @param {ConnectParams['ipConfig']['address']} [params.ipConfig.address] - Static IP address (if using "static" method).
189
327
  * @param {ConnectParams['ipConfig']['mask']} [params.ipConfig.mask] - Subnet mask (if using "static" method).
190
328
  * @param {ConnectParams['ipConfig']['gateway']} [params.ipConfig.gateway] - Gateway address (if using "static" method).
329
+ * @param {ConnectParams['timeout']} [params.timeout] - Request timeout in milliseconds.
191
330
  * @returns {Promise<SuccessResponse>} Result of the connect operation.
192
331
  */
332
+ WifiConnect(params: WifiConnectParams): Promise<SuccessResponse>;
333
+ /**
334
+ * @deprecated Use `WifiConnect` instead. will be removed in the next release.
335
+ */
193
336
  connectWifi(params: WifiConnectParams): Promise<SuccessResponse>;
194
337
  /**
195
- * Disconnects the device from the current Wi-Fi network.
338
+ * Disconnects from Wi-Fi.
196
339
  *
340
+ * @param {TimeoutOptions} [params] - Optional parameters.
341
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
197
342
  * @returns {Promise<SuccessResponse>} Result of the disconnect operation.
198
343
  */
199
- disconnectWifi(): Promise<SuccessResponse>;
344
+ WifiDisconnect(params?: TimeoutOptions): Promise<SuccessResponse>;
200
345
  /**
201
- * Scans for available Wi-Fi networks near your device.
346
+ * @deprecated Use `WifiDisconnect` instead. will be removed in the next release.
347
+ */
348
+ disconnectWifi(params?: TimeoutOptions): Promise<SuccessResponse>;
349
+ /**
350
+ * Scans environment for available Wi-Fi networks.
202
351
  *
352
+ * @param {TimeoutOptions} [params] - Optional parameters.
353
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
203
354
  * @returns {Promise<WifiNetworkResponse>} List of discovered networks.
204
355
  */
205
- networksWifi(): Promise<WifiNetworkResponse>;
356
+ WifiNetworks(params?: TimeoutOptions): Promise<WifiNetworkResponse>;
206
357
  /**
207
- * Removes the saved Wi-Fi configuration (forgets the network).
208
- *
209
- * @returns {Promise<never>} Result of the forget operation.
358
+ * @deprecated Use `WifiNetworks` instead. will be removed in the next release.
210
359
  */
211
- forgetWifi(): Promise<never>;
360
+ networksWifi(params?: TimeoutOptions): Promise<WifiNetworkResponse>;
212
361
  /**
213
- * Uploads a file to the device's internal storage.
362
+ * Upload file to internal storage. Uploads a file to a specified path.
214
363
  *
215
364
  * @param {UploadFileParams} params - Upload parameters:
216
365
  * @param {UploadFileParams['path']} params.path - Path where the file will be saved (e.g., "/ext/test.png").
217
366
  * @param {UploadFileParams['file']} params.file - File data to upload.
367
+ * @param {UploadFileParams['timeout']} [params.timeout] - Request timeout in milliseconds.
218
368
  * @returns {Promise<SuccessResponse>} Result of the upload operation.
219
369
  */
220
- uploadFile(params: UploadFileParams): Promise<SuccessResponse>;
370
+ StorageWrite(params: StorageUploadFileParams): Promise<SuccessResponse>;
371
+ /**
372
+ * @deprecated Use `StorageWrite` instead. will be removed in the next release.
373
+ */
374
+ uploadFile(params: StorageUploadFileParams): Promise<SuccessResponse>;
221
375
  /**
222
- * Downloads a file from the device's internal storage.
376
+ * Download file from internal storage. Downloads a file from a specified path.
223
377
  *
224
378
  * @param {DownloadFileParams} params - Download parameters:
225
379
  * @param {DownloadFileParams['path']} params.path - Path to the file to download (e.g., "/ext/test.png").
226
380
  * @param {DownloadFileParams['asArrayBuffer']} [params.asArrayBuffer] - If true, returns data as ArrayBuffer; otherwise, as Blob.
381
+ * @param {DownloadFileParams['timeout']} [params.timeout] - Request timeout in milliseconds.
227
382
  * @returns {Promise<StorageReadResponse>} The file data.
228
383
  */
229
- downloadFile(params: DownloadFileParams): Promise<StorageReadResponse>;
384
+ StorageRead(params: StorageDownloadFileParams): Promise<StorageReadResponse>;
385
+ /**
386
+ * @deprecated Use `StorageRead` instead. will be removed in the next release.
387
+ */
388
+ downloadFile(params: StorageDownloadFileParams): Promise<StorageReadResponse>;
230
389
  /**
231
- * Reads the contents of a directory (files and subdirectories) at the specified path.
390
+ * List files on internal storage.
232
391
  *
233
392
  * @param {ReadDirectoryParams} params - List parameters:
234
393
  * @param {ReadDirectoryParams['path']} params.path - Path to the directory to list (e.g., "/ext").
394
+ * @param {ReadDirectoryParams['timeout']} [params.timeout] - Request timeout in milliseconds.
235
395
  * @returns {Promise<StorageList>} List of files and directories.
236
396
  */
237
- readDirectory(params: ReadDirectoryParams): Promise<StorageList>;
397
+ StorageList(params: StorageReadDirectoryParams): Promise<StorageList>;
398
+ /**
399
+ * @deprecated Use `StorageList` instead. will be removed in the next release.
400
+ */
401
+ readDirectory(params: StorageReadDirectoryParams): Promise<StorageList>;
238
402
  /**
239
- * Removes a file or a directory from the device's internal storage.
403
+ * Remove a file on internal storage. Removes a file with a specified path.
240
404
  *
241
405
  * @param {RemoveParams} params - Remove parameters:
242
406
  * @param {RemoveParams['path']} params.path - Path of the file to remove (e.g., "/ext/test.png").
407
+ * @param {RemoveParams['timeout']} [params.timeout] - Request timeout in milliseconds.
243
408
  * @returns {Promise<SuccessResponse>} Result of the remove operation.
244
409
  */
245
- removeResource(params: RemoveParams): Promise<SuccessResponse>;
410
+ StorageRemove(params: StorageRemoveParams): Promise<SuccessResponse>;
411
+ /**
412
+ * @deprecated Use `StorageRemove` instead. will be removed in the next release.
413
+ */
414
+ removeResource(params: StorageRemoveParams): Promise<SuccessResponse>;
246
415
  /**
247
- * Creates a new directory in the device's internal storage.
416
+ * Create a directory on internal storage. Creates a new directory with a specified path.
248
417
  *
249
418
  * @param {CreateDirectoryParams} params - Directory creation parameters:
250
419
  * @param {CreateDirectoryParams['path']} params.path - Path to the new directory (e.g., "/ext/newdir").
420
+ * @param {CreateDirectoryParams['timeout']} [params.timeout] - Request timeout in milliseconds.
251
421
  * @returns {Promise<SuccessResponse>} Result of the create operation.
252
422
  */
253
- createDirectory(params: CreateDirectoryParams): Promise<SuccessResponse>;
423
+ StorageMkdir(params: StorageCreateDirectoryParams): Promise<SuccessResponse>;
424
+ /**
425
+ * @deprecated Use `StorageMkdir` instead. will be removed in the next release.
426
+ */
427
+ createDirectory(params: StorageCreateDirectoryParams): Promise<SuccessResponse>;
428
+ /**
429
+ * Show storage usage.
430
+ *
431
+ * @param {TimeoutOptions} [params] - Optional parameters.
432
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
433
+ * @returns {Promise<StorageStatus>} Current storage status information.
434
+ */
435
+ StorageStatus(params?: TimeoutOptions): Promise<StorageStatus>;
254
436
  /**
255
- * Gets the current display brightness settings for the device.
437
+ * @deprecated Use `StorageStatus` instead. will be removed in the next release.
438
+ */
439
+ statusStorage(params?: TimeoutOptions): Promise<StorageStatus>;
440
+ /**
441
+ * Get brightness value for displays.
256
442
  *
443
+ * @param {TimeoutOptions} [params] - Optional parameters.
444
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
257
445
  * @returns {Promise<DisplayBrightnessInfo>} Current brightness information for front and back panels.
258
446
  */
259
- getDisplayBrightness(): Promise<DisplayBrightnessInfo>;
447
+ DisplayBrightness(params?: TimeoutOptions): Promise<DisplayBrightnessInfo>;
448
+ /**
449
+ * @deprecated Use `DisplayBrightness` instead. will be removed in the next release.
450
+ */
451
+ getDisplayBrightness(params?: TimeoutOptions): Promise<DisplayBrightnessInfo>;
260
452
  /**
261
- * Sets the display brightness for the device.
453
+ * Set display brightness. Set brightness for one or both displays.
262
454
  *
263
455
  * @param {BrightnessParams} params - Brightness parameters:
264
456
  * @param {BrightnessParams['front']} [params.front] - Brightness for the front panel (0-100 or "auto").
265
457
  * @param {BrightnessParams['back']} [params.back] - Brightness for the back panel (0-100 or "auto").
458
+ * @param {BrightnessParams['timeout']} [params.timeout] - Request timeout in milliseconds.
266
459
  * @returns {Promise<SuccessResponse>} Result of the brightness update operation.
267
460
  * @throws {Error} If brightness value is outside the range 0-100 or not "auto".
268
461
  */
462
+ DisplayBrightnessSet(params: DisplayBrightnessParams): Promise<SuccessResponse>;
463
+ /**
464
+ * @deprecated Use `DisplayBrightnessSet` instead. will be removed in the next release.
465
+ */
269
466
  setDisplayBrightness(params: DisplayBrightnessParams): Promise<SuccessResponse>;
270
467
  /**
271
- * Gets the current audio volume value.
468
+ * Get audio volume.
272
469
  *
470
+ * @param {TimeoutOptions} [params] - Optional parameters.
471
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
273
472
  * @returns {Promise<AudioVolumeInfo>} Current audio volume (0-100).
274
473
  */
275
- getAudioVolume(): Promise<AudioVolumeInfo>;
474
+ AudioVolume(params?: TimeoutOptions): Promise<AudioVolumeInfo>;
475
+ /**
476
+ * @deprecated Use `AudioVolume` instead. will be removed in the next release.
477
+ */
478
+ getAudioVolume(params?: TimeoutOptions): Promise<AudioVolumeInfo>;
276
479
  /**
277
- * Sets the audio volume value.
480
+ * Set audio volume.
278
481
  *
279
482
  * @param {AudioVolumeParams} params - Audio volume parameters:
280
483
  * @param {AudioVolumeParams['volume']} params.volume - Audio volume (number from 0 to 100).
484
+ * @param {AudioVolumeParams['timeout']} [params.timeout] - Request timeout in milliseconds.
281
485
  * @returns {Promise<SuccessResponse>} Result of the volume update operation.
282
486
  * @throws {Error} If volume is outside the range 0-100 or request fails.
283
487
  */
488
+ AudioVolumeSet(params: AudioVolumeParams): Promise<SuccessResponse>;
489
+ /**
490
+ * @deprecated Use `AudioVolumeSet` instead. will be removed in the next release.
491
+ */
284
492
  setAudioVolume(params: AudioVolumeParams): Promise<SuccessResponse>;
285
493
  /**
286
- * Gets the current HTTP API access configuration.
494
+ * Get HTTP API access over Wi-Fi configuration.
287
495
  *
496
+ * @param {TimeoutOptions} [params] - Optional parameters.
497
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
288
498
  * @returns {Promise<HttpAccessInfo>} Current HTTP access info.
289
499
  */
290
- getHttpAccess(): Promise<HttpAccessInfo>;
500
+ SettingsAccess(params?: TimeoutOptions): Promise<HttpAccessInfo>;
501
+ /**
502
+ * @deprecated Use `SettingsAccess` instead. will be removed in the next release.
503
+ */
504
+ getHttpAccess(params?: TimeoutOptions): Promise<HttpAccessInfo>;
291
505
  /**
292
- * Sets the HTTP API access configuration.
506
+ * Set HTTP API access over Wi-Fi configuration.
293
507
  *
294
508
  * @param {HttpAccessParams} params - Access parameters:
295
509
  * @param {HttpAccessParams['mode']} params.mode - Access mode ("disabled", "enabled", "key").
296
510
  * @param {HttpAccessParams['key']} params.key - Access key (4-10 digits).
511
+ * @param {HttpAccessParams['timeout']} [params.timeout] - Request timeout in milliseconds.
297
512
  * @returns {Promise<SuccessResponse>} Result of the set operation.
298
513
  */
514
+ SettingsAccessSet(params: HttpAccessParams): Promise<SuccessResponse>;
515
+ /**
516
+ * @deprecated Use `SettingsAccessSet` instead. will be removed in the next release.
517
+ */
299
518
  setHttpAccess(params: HttpAccessParams): Promise<SuccessResponse>;
519
+ /**
520
+ * Get current device name.
521
+ *
522
+ * @param {TimeoutOptions} [params] - Optional parameters.
523
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
524
+ * @returns {Promise<NameInfo>} The current device name information.
525
+ */
526
+ SettingsName(params?: TimeoutOptions): Promise<NameInfo>;
527
+ /**
528
+ * @deprecated Use `SettingsName` instead. will be removed in the next release.
529
+ */
530
+ getName(params?: TimeoutOptions): Promise<NameInfo>;
531
+ /**
532
+ * Set new device name.
533
+ *
534
+ * @param {NameParams} params - The parameters for setting the device name.
535
+ * @param {NameParams['name']} params.name - The new device name.
536
+ * @param {NameParams['timeout']} [params.timeout] - Request timeout in milliseconds.
537
+ * @returns {Promise<SuccessResponse>} Result of setting the device name.
538
+ */
539
+ SettingsNameSet(params: NameParams): Promise<SuccessResponse>;
540
+ /**
541
+ * @deprecated Use `SettingsNameSet` instead. will be removed in the next release.
542
+ */
543
+ setName(params: NameParams): Promise<SuccessResponse>;
300
544
  /**
301
545
  * Sets API key for all subsequent requests.
302
546
  * @param {string} key - API key to use in "X-API-Token" header.
303
547
  */
304
548
  setApiKey(key: string): void;
305
549
  /**
306
- * Enables BLE module.
550
+ * Enable BLE. Enables BLE module and starts advertising.
551
+ * @param {TimeoutOptions} [params] - Optional parameters.
552
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
307
553
  * @returns {Promise<SuccessResponse>} Result of the enable operation.
308
554
  */
309
- enableBle(): Promise<SuccessResponse>;
555
+ BleEnable(params?: TimeoutOptions): Promise<SuccessResponse>;
310
556
  /**
311
- * Disables BLE module.
557
+ * @deprecated Use `BleEnable` instead. will be removed in the next release.
558
+ */
559
+ enableBle(params?: TimeoutOptions): Promise<SuccessResponse>;
560
+ /**
561
+ * Disable BLE. Stops advertising.
562
+ * @param {TimeoutOptions} [params] - Optional parameters.
563
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
312
564
  * @returns {Promise<SuccessResponse>} Result of the disable operation.
313
565
  */
314
- disableBle(): Promise<SuccessResponse>;
566
+ BleDisable(params?: TimeoutOptions): Promise<SuccessResponse>;
567
+ /**
568
+ * @deprecated Use `BleDisable` instead. will be removed in the next release.
569
+ */
570
+ disableBle(params?: TimeoutOptions): Promise<SuccessResponse>;
571
+ /**
572
+ * Remove pairing. Remove pairing with previous device.
573
+ *
574
+ * @param {TimeoutOptions} [params] - Optional parameters.
575
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
576
+ * @returns {Promise<SuccessResponse>} Result of the BLE pairing removal operation.
577
+ */
578
+ BleUnpair(params?: TimeoutOptions): Promise<SuccessResponse>;
579
+ /**
580
+ * @deprecated Use `BleUnpair` instead. will be removed in the next release.
581
+ */
582
+ pairingBle(params?: TimeoutOptions): Promise<SuccessResponse>;
583
+ /**
584
+ * Returns current BLE status.
585
+ *
586
+ * @param {TimeoutOptions} [params] - Optional parameters.
587
+ * @param {TimeoutOptions['timeout']} [params.timeout] - Request timeout in milliseconds.
588
+ * @returns {Promise<BleStatusResponse>} Current BLE status information.
589
+ */
590
+ BleStatus(params?: TimeoutOptions): Promise<BleStatusResponse>;
315
591
  /**
316
- * Sends a button press.
592
+ * @deprecated Use `BleStatus` instead. will be removed in the next release.
593
+ */
594
+ statusBle(params?: TimeoutOptions): Promise<BleStatusResponse>;
595
+ /**
596
+ * Send input event. Send single key press event.
317
597
  *
318
598
  * @param params - Button press parameters:
319
599
  * @param {InputKeyParams['keyName']} params.keyName - Button key.
600
+ * @param {InputKeyParams['timeout']} [params.timeout] - Request timeout in milliseconds.
320
601
  * @example
321
602
  * {
322
- * keyName: "ok"
603
+ * keyName: "ok",
604
+ * timeout: 1000
323
605
  * }
324
606
  * @returns {Promise<SuccessResponse>} Result of pressing the button.
325
607
  */
608
+ InputSend(params: InputKeyParams): Promise<SuccessResponse>;
609
+ /**
610
+ * @deprecated Use `InputSend` instead. will be removed in the next release.
611
+ */
326
612
  pressButton(params: InputKeyParams): Promise<SuccessResponse>;
327
613
  }
328
614
 
329
- declare type BusyBarConfig = {
615
+ export declare type BusyBarConfig = {
330
616
  addr?: string;
331
617
  token?: string;
332
618
  };
@@ -344,19 +630,23 @@ declare interface components {
344
630
  */
345
631
  result: string;
346
632
  };
347
- /** @example {
633
+ /**
634
+ * @example {
348
635
  * "error": "Invalid parameter",
349
636
  * "code": 400
350
- * } */
637
+ * }
638
+ */
351
639
  Error: {
352
640
  /** @description Error message */
353
641
  error: string;
354
642
  /** @description Error code */
355
643
  code?: number;
356
644
  };
357
- /** @example {
645
+ /**
646
+ * @example {
358
647
  * "api_semver": "0.0.0"
359
- * } */
648
+ * }
649
+ */
360
650
  VersionInfo: {
361
651
  /**
362
652
  * @description Api SemVer
@@ -364,6 +654,18 @@ declare interface components {
364
654
  */
365
655
  api_semver: string;
366
656
  };
657
+ /**
658
+ * @example {
659
+ * "name": "BUSY bar"
660
+ * }
661
+ */
662
+ NameInfo: {
663
+ /**
664
+ * @description Device name
665
+ * @example BUSY bar
666
+ */
667
+ name: string;
668
+ };
367
669
  HttpAccessInfo: {
368
670
  /**
369
671
  * @description Access mode
@@ -377,7 +679,8 @@ declare interface components {
377
679
  */
378
680
  key_valid?: Record<string, never>;
379
681
  };
380
- /** @example {
682
+ /**
683
+ * @example {
381
684
  * "list": [
382
685
  * {
383
686
  * "type": "file",
@@ -389,11 +692,23 @@ declare interface components {
389
692
  * "name": "assets"
390
693
  * }
391
694
  * ]
392
- * } */
695
+ * }
696
+ */
393
697
  StorageList: {
394
698
  /** @description Array of elements to display */
395
699
  list: components["schemas"]["StorageListElement"][];
396
700
  };
701
+ StorageStatus: {
702
+ /** @example 123456 */
703
+ used_bytes?: number;
704
+ /** @example 654321 */
705
+ free_bytes?: number;
706
+ /**
707
+ * @description Total size of the parition
708
+ * @example 777777
709
+ */
710
+ total_bytes?: number;
711
+ };
397
712
  StorageListElement: {
398
713
  /**
399
714
  * @description Element type
@@ -432,21 +747,39 @@ declare interface components {
432
747
  */
433
748
  file: string;
434
749
  };
435
- /** @example {
750
+ /**
751
+ * @example {
436
752
  * "app_id": "my_app",
437
753
  * "elements": [
438
754
  * {
439
755
  * "id": "0",
440
- * "timeout": 5,
756
+ * "timeout": 6,
757
+ * "align": "center",
758
+ * "x": 36,
759
+ * "y": 10,
441
760
  * "type": "text",
442
- * "text": "Hello, world!",
443
- * "x": 0,
444
- * "y": 0,
761
+ * "text": "Hello, World! Long text",
762
+ * "font": "medium",
763
+ * "color": "#FFFFFFFF",
764
+ * "width": 72,
765
+ * "scroll_rate": 160,
445
766
  * "display": "front"
446
767
  * },
447
768
  * {
448
769
  * "id": "1",
449
770
  * "timeout": 6,
771
+ * "align": "top_mid",
772
+ * "x": 36,
773
+ * "y": 0,
774
+ * "type": "text",
775
+ * "text": "top_mid",
776
+ * "font": "small",
777
+ * "color": "#AAFF00FF",
778
+ * "display": "front"
779
+ * },
780
+ * {
781
+ * "id": "2",
782
+ * "timeout": 6,
450
783
  * "type": "image",
451
784
  * "path": "data.png",
452
785
  * "x": 0,
@@ -454,7 +787,8 @@ declare interface components {
454
787
  * "display": "back"
455
788
  * }
456
789
  * ]
457
- * } */
790
+ * }
791
+ */
458
792
  DisplayElements: {
459
793
  /**
460
794
  * @description Application ID for organizing assets
@@ -467,27 +801,49 @@ declare interface components {
467
801
  DisplayElement: {
468
802
  /** @description Unique identifier for the element */
469
803
  id: string;
470
- /** @description Time in seconds the element should be displayed (0 for no timeout) */
804
+ /** @description Time in seconds the element should be displayed (0 for no timeout). Mutually exclusive with display_until. */
471
805
  timeout?: number;
806
+ /** @description The element will be hidden when system time reaches the specified Unix timestamp (in seconds). Mutually exclusive with timeout. */
807
+ display_until?: string;
472
808
  /**
473
809
  * @description Type of display element
474
810
  * @enum {string}
475
811
  */
476
812
  type: "text" | "image";
477
- /** @description X coordinate for placement on display */
478
- x: number;
479
- /** @description Y coordinate for placement on display */
480
- y: number;
813
+ /** @description X coordinate of selected anchor point relative to top-left of display */
814
+ x?: number;
815
+ /** @description Y coordinate of selected anchor point relative to top-left of display */
816
+ y?: number;
481
817
  /**
482
818
  * @description Which display to show the element on (for dual-display devices)
483
819
  * @default front
484
820
  * @enum {string}
485
821
  */
486
822
  display: "front" | "back";
823
+ /**
824
+ * @description Anchor point of element. Also use `x` and `y` to position element.
825
+ * @enum {string}
826
+ */
827
+ align?: "top_left" | "top_mid" | "top_right" | "mid_left" | "center" | "mid_right" | "bottom_left" | "bottom_mid" | "bottom_right";
487
828
  };
488
829
  TextElement: Omit<components["schemas"]["DisplayElement"], "type"> & {
489
830
  /** @description Text content to display */
490
831
  text: string;
832
+ /**
833
+ * @description One of the available fonts to display the text in
834
+ * @default tiny5_8
835
+ * @enum {string}
836
+ */
837
+ font: "small" | "medium" | "medium_condensed" | "big";
838
+ /**
839
+ * @description Color to display the text in, in #RRGGBBAA format
840
+ * @default #FFFFFFFF
841
+ */
842
+ color: string;
843
+ /** @description Width of the label */
844
+ width?: number;
845
+ /** @description Scroll rate in characters per minute */
846
+ scroll_rate?: number;
491
847
  } & {
492
848
  /**
493
849
  * @description discriminator enum property added by openapi-typescript
@@ -495,10 +851,13 @@ declare interface components {
495
851
  */
496
852
  type: "text";
497
853
  };
498
- ImageElement: Omit<components["schemas"]["DisplayElement"], "type"> & {
854
+ ImageElement: Omit<components["schemas"]["DisplayElement"], "type"> & ({
499
855
  /** @description Path to the image file in the app's assets */
500
- path: string;
501
- } & {
856
+ path?: string;
857
+ } | {
858
+ /** @description Identifier of builtin image */
859
+ builtin_image?: string;
860
+ }) & {
502
861
  /**
503
862
  * @description discriminator enum property added by openapi-typescript
504
863
  * @enum {string}
@@ -524,6 +883,13 @@ declare interface components {
524
883
  */
525
884
  volume?: number;
526
885
  };
886
+ TimestampInfo: {
887
+ /**
888
+ * @description ISO 8601 formatted timestamp with timezone
889
+ * @example 2025-10-02T14:30:45+04:00
890
+ */
891
+ timestamp: string;
892
+ };
527
893
  Status: {
528
894
  system?: components["schemas"]["StatusSystem"];
529
895
  power?: components["schemas"]["StatusPower"];
@@ -587,7 +953,7 @@ declare interface components {
587
953
  * @example WPA3
588
954
  * @enum {string}
589
955
  */
590
- WifiSecurityMethod: "Open" | "WPA" | "WPA2" | "WEP" | "WPA (Enterprise)" | "WPA2 (Enterprise)" | "WPA/WPA2" | "WPA3" | "WPA2/WPA3" | "WPA3 (Enterprise)" | "WPA2/WPA3 (Enterprise)";
956
+ WifiSecurityMethod: "Open" | "WPA" | "WPA2" | "WEP" | "WPA/WPA2" | "WPA3" | "WPA2/WPA3";
591
957
  /**
592
958
  * @example dhcp
593
959
  * @enum {string}
@@ -607,12 +973,18 @@ declare interface components {
607
973
  };
608
974
  StatusResponse: {
609
975
  /**
610
- * @example enabled
976
+ * @example disconnected
611
977
  * @enum {string}
612
978
  */
613
- state?: "disabled" | "enabled" | "connected";
979
+ state?: "unknown" | "disconnected" | "connected" | "connecting" | "disconnecting";
614
980
  /** @example Your_WIFI_SSID */
615
981
  ssid?: string;
982
+ /** @example EC:5A:00:0B:55:1D */
983
+ bssid?: string;
984
+ /** @example 3 */
985
+ channel?: number;
986
+ /** @example -43 */
987
+ rssi?: number;
616
988
  security?: components["schemas"]["WifiSecurityMethod"];
617
989
  ip_config?: {
618
990
  ip_method?: components["schemas"]["WifiIpMethod"];
@@ -629,7 +1001,6 @@ declare interface components {
629
1001
  security?: components["schemas"]["WifiSecurityMethod"];
630
1002
  ip_config?: {
631
1003
  ip_method?: components["schemas"]["WifiIpMethod"];
632
- ip_type?: components["schemas"]["WifiIpType"];
633
1004
  /** @example 192.168.50.5 */
634
1005
  address?: string;
635
1006
  /** @example 255.255.255.0 */
@@ -648,6 +1019,27 @@ declare interface components {
648
1019
  * @description Frame for requested display encoded in base64
649
1020
  */
650
1021
  ScreenResponse: string;
1022
+ AccountInfo: {
1023
+ /**
1024
+ * @example linked
1025
+ * @enum {string}
1026
+ */
1027
+ state?: "error" | "disconnected" | "not_linked" | "linked";
1028
+ /** @example 12345678-9abc-def0-1234-56789abcdef0 */
1029
+ id?: string;
1030
+ /** @example name@example.com */
1031
+ email?: string;
1032
+ };
1033
+ AccountLink: {
1034
+ /** @example ABCD */
1035
+ code?: string;
1036
+ /** @example 1761060863 */
1037
+ expires_at?: number;
1038
+ };
1039
+ BleStatusResponse: {
1040
+ /** @example connected */
1041
+ state?: string;
1042
+ };
651
1043
  };
652
1044
  responses: never;
653
1045
  parameters: never;
@@ -656,28 +1048,12 @@ declare interface components {
656
1048
  pathItems: never;
657
1049
  }
658
1050
 
659
- declare interface CreateDirectoryParams {
660
- path: operations["createStorageDir"]["parameters"]["query"]["path"];
661
- }
662
- export { CreateDirectoryParams }
663
- export { CreateDirectoryParams as StorageCreateDirectoryParams }
664
-
665
- declare type CustomElement = CustomTextElement | CustomImageElement;
666
-
667
- declare type CustomImageElement = MakeOptional<components["schemas"]["ImageElement"], OptionalFields>;
668
-
669
- declare type CustomTextElement = MakeOptional<components["schemas"]["TextElement"], OptionalFields>;
670
-
671
1051
  declare type DataListener = (data: Uint8Array) => void;
672
1052
 
673
1053
  declare type DeepCamelize<T> = T extends (...args: any[]) => any ? T : T extends Array<infer U> ? Array<DeepCamelize<U>> : T extends object ? {
674
1054
  [K in keyof T as SnakeToCamel<K & string>]: DeepCamelize<T[K]>;
675
1055
  } : T;
676
1056
 
677
- declare type DeviceConfig = LocalConfig | SiteConfig;
678
-
679
- declare type DeviceConfig_2 = LocalConfig_2 | SiteConfig_2;
680
-
681
1057
  export declare enum DeviceScreen {
682
1058
  FRONT = 0,
683
1059
  BACK = 1
@@ -685,22 +1061,15 @@ export declare enum DeviceScreen {
685
1061
 
686
1062
  export declare type DisplayBrightnessInfo = components["schemas"]["DisplayBrightnessInfo"];
687
1063
 
688
- export declare interface DisplayBrightnessParams {
1064
+ export declare interface DisplayBrightnessParams extends TimeoutOptions {
689
1065
  front?: Brightness;
690
1066
  back?: Brightness;
691
1067
  }
692
1068
 
693
- export declare interface DisplayDrawParams {
694
- appId: paths["/display/draw"]["post"]["requestBody"]["content"]["application/json"]["app_id"];
695
- elements: CustomElement[];
696
- }
697
-
698
- declare interface DownloadFileParams {
699
- path: operations["readStorageFile"]["parameters"]["query"]["path"];
700
- asArrayBuffer?: boolean;
1069
+ export declare interface DisplayDrawParams extends TimeoutOptions {
1070
+ appId: components["schemas"]["DisplayElements"]["app_id"];
1071
+ elements: components["schemas"]["DisplayElements"]["elements"];
701
1072
  }
702
- export { DownloadFileParams }
703
- export { DownloadFileParams as StorageDownloadFileParams }
704
1073
 
705
1074
  declare type Error_2 = components["schemas"]["Error"];
706
1075
  export { Error_2 as Error }
@@ -715,13 +1084,13 @@ declare interface ErrorPayload {
715
1084
 
716
1085
  export declare type HttpAccessInfo = components["schemas"]["HttpAccessInfo"];
717
1086
 
718
- export declare interface HttpAccessParams {
1087
+ export declare interface HttpAccessParams extends TimeoutOptions {
719
1088
  mode: operations["setHttpAccess"]["parameters"]["query"]["mode"];
720
1089
  key: operations["setHttpAccess"]["parameters"]["query"]["key"];
721
1090
  }
722
1091
 
723
1092
  export declare class Input {
724
- private config;
1093
+ readonly addr: string;
725
1094
  connected: boolean;
726
1095
  private apiKey?;
727
1096
  private apiSemver?;
@@ -730,7 +1099,7 @@ export declare class Input {
730
1099
  private stopListeners;
731
1100
  private errorListeners;
732
1101
  private socket;
733
- constructor(config: DeviceConfig_2);
1102
+ constructor(config?: InputConfig);
734
1103
  onData(listener: DataListener): void;
735
1104
  onStop(listener: StopListener): void;
736
1105
  onError(listener: ErrorListener): void;
@@ -745,7 +1114,13 @@ export declare class Input {
745
1114
  closeWebsocket(): Promise<void>;
746
1115
  }
747
1116
 
748
- export declare interface InputKeyParams {
1117
+ export declare interface InputConfig {
1118
+ addr?: string;
1119
+ apiKey?: ApiKey;
1120
+ apiSemver?: ApiSemver;
1121
+ }
1122
+
1123
+ export declare interface InputKeyParams extends TimeoutOptions {
749
1124
  keyName: KeyName;
750
1125
  }
751
1126
 
@@ -753,18 +1128,12 @@ export declare type KeyName = operations["setInputKey"]["parameters"]["query"]["
753
1128
 
754
1129
  export declare type KeyValue = 1 | 0;
755
1130
 
756
- declare interface LocalConfig extends BaseConfig {
757
- mode: "local";
758
- barUrl: string;
759
- }
1131
+ export declare type NameInfo = components["schemas"]["NameInfo"];
760
1132
 
761
- declare interface LocalConfig_2 extends BaseConfig_2 {
762
- mode: "local";
763
- barUrl: string;
1133
+ export declare interface NameParams extends TimeoutOptions {
1134
+ name: NameInfo["name"];
764
1135
  }
765
1136
 
766
- declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
767
-
768
1137
  declare interface operations {
769
1138
  getVersion: {
770
1139
  parameters: {
@@ -1188,6 +1557,35 @@ declare interface operations {
1188
1557
  };
1189
1558
  };
1190
1559
  };
1560
+ getStorageStatus: {
1561
+ parameters: {
1562
+ query?: never;
1563
+ header?: never;
1564
+ path?: never;
1565
+ cookie?: never;
1566
+ };
1567
+ requestBody?: never;
1568
+ responses: {
1569
+ /** @description Storage status queried successfully */
1570
+ 200: {
1571
+ headers: {
1572
+ [name: string]: unknown;
1573
+ };
1574
+ content: {
1575
+ "application/json": components["schemas"]["StorageStatus"];
1576
+ };
1577
+ };
1578
+ /** @description Invalid parameters or storage doesn't exist */
1579
+ 400: {
1580
+ headers: {
1581
+ [name: string]: unknown;
1582
+ };
1583
+ content: {
1584
+ "application/json": components["schemas"]["Error"];
1585
+ };
1586
+ };
1587
+ };
1588
+ };
1191
1589
  drawOnDisplay: {
1192
1590
  parameters: {
1193
1591
  query?: never;
@@ -1232,7 +1630,13 @@ declare interface operations {
1232
1630
  };
1233
1631
  clearDisplay: {
1234
1632
  parameters: {
1235
- query?: never;
1633
+ query?: {
1634
+ /**
1635
+ * @description Application identifier
1636
+ * @example my_app
1637
+ */
1638
+ app_id?: string;
1639
+ };
1236
1640
  header?: never;
1237
1641
  path?: never;
1238
1642
  cookie?: never;
@@ -1495,7 +1899,7 @@ declare interface operations {
1495
1899
  * @description Key name
1496
1900
  * @example ok
1497
1901
  */
1498
- key: "up" | "down" | "ok" | "back" | "start" | "busy" | "status" | "off" | "apps" | "settings";
1902
+ key: "up" | "down" | "ok" | "back" | "start" | "busy" | "custom" | "off" | "apps" | "settings";
1499
1903
  };
1500
1904
  header?: never;
1501
1905
  path?: never;
@@ -1637,46 +2041,212 @@ declare interface operations {
1637
2041
  };
1638
2042
  };
1639
2043
  };
1640
- }
1641
-
1642
- declare type OptionalFields = "timeout" | "x" | "y" | "display";
1643
-
1644
- /**
1645
- * This file was auto-generated by openapi-typescript.
1646
- * Do not make direct changes to the file.
1647
- */
1648
- declare interface paths {
1649
- "/version": {
1650
- parameters: {
1651
- query?: never;
1652
- header?: never;
1653
- path?: never;
1654
- cookie?: never;
1655
- };
1656
- /**
1657
- * Get API version information
1658
- * @description Retrieves api version
1659
- */
1660
- get: operations["getVersion"];
1661
- put?: never;
1662
- post?: never;
1663
- delete?: never;
1664
- options?: never;
1665
- head?: never;
1666
- patch?: never;
1667
- trace?: never;
1668
- };
1669
- "/access": {
2044
+ getTime: {
1670
2045
  parameters: {
1671
2046
  query?: never;
1672
2047
  header?: never;
1673
2048
  path?: never;
1674
2049
  cookie?: never;
1675
2050
  };
1676
- /**
1677
- * HTTP API access over Wi-Fi configuration get
1678
- * @description HTTP API access over Wi-Fi configuration get
1679
- */
2051
+ requestBody?: never;
2052
+ responses: {
2053
+ /** @description Timestamp retrieved successfully */
2054
+ 200: {
2055
+ headers: {
2056
+ [name: string]: unknown;
2057
+ };
2058
+ content: {
2059
+ "application/json": components["schemas"]["TimestampInfo"];
2060
+ };
2061
+ };
2062
+ /** @description Bad request */
2063
+ 400: {
2064
+ headers: {
2065
+ [name: string]: unknown;
2066
+ };
2067
+ content: {
2068
+ "application/json": components["schemas"]["Error"];
2069
+ };
2070
+ };
2071
+ };
2072
+ };
2073
+ getAccountInfo: {
2074
+ parameters: {
2075
+ query?: never;
2076
+ header?: never;
2077
+ path?: never;
2078
+ cookie?: never;
2079
+ };
2080
+ requestBody?: never;
2081
+ responses: {
2082
+ /** @description Data retrieved successfully */
2083
+ 200: {
2084
+ headers: {
2085
+ [name: string]: unknown;
2086
+ };
2087
+ content: {
2088
+ "application/json": components["schemas"]["AccountInfo"];
2089
+ };
2090
+ };
2091
+ };
2092
+ };
2093
+ unlinkAccount: {
2094
+ parameters: {
2095
+ query?: never;
2096
+ header?: never;
2097
+ path?: never;
2098
+ cookie?: never;
2099
+ };
2100
+ requestBody?: never;
2101
+ responses: {
2102
+ /** @description Done successfully */
2103
+ 200: {
2104
+ headers: {
2105
+ [name: string]: unknown;
2106
+ };
2107
+ content: {
2108
+ "application/json": components["schemas"]["SuccessResponse"];
2109
+ };
2110
+ };
2111
+ };
2112
+ };
2113
+ linkAccount: {
2114
+ parameters: {
2115
+ query?: never;
2116
+ header?: never;
2117
+ path?: never;
2118
+ cookie?: never;
2119
+ };
2120
+ requestBody?: never;
2121
+ responses: {
2122
+ /** @description Data retrieved successfully */
2123
+ 200: {
2124
+ headers: {
2125
+ [name: string]: unknown;
2126
+ };
2127
+ content: {
2128
+ "application/json": components["schemas"]["AccountLink"];
2129
+ };
2130
+ };
2131
+ /** @description Bad request */
2132
+ 400: {
2133
+ headers: {
2134
+ [name: string]: unknown;
2135
+ };
2136
+ content: {
2137
+ "application/json": components["schemas"]["Error"];
2138
+ };
2139
+ };
2140
+ };
2141
+ };
2142
+ setTimeTimestamp: {
2143
+ parameters: {
2144
+ query: {
2145
+ /**
2146
+ * @description ISO 8601 timestamp (e.g., 2025-10-02T14:30:45 for local time or 2025-10-02T14:30:45Z for UTC)
2147
+ * @example 2025-10-02T14:30:45
2148
+ */
2149
+ timestamp: string;
2150
+ };
2151
+ header?: never;
2152
+ path?: never;
2153
+ cookie?: never;
2154
+ };
2155
+ requestBody?: never;
2156
+ responses: {
2157
+ /** @description Timestamp set successfully */
2158
+ 200: {
2159
+ headers: {
2160
+ [name: string]: unknown;
2161
+ };
2162
+ content: {
2163
+ "application/json": components["schemas"]["SuccessResponse"];
2164
+ };
2165
+ };
2166
+ /** @description Invalid timestamp format or value */
2167
+ 400: {
2168
+ headers: {
2169
+ [name: string]: unknown;
2170
+ };
2171
+ content: {
2172
+ "application/json": components["schemas"]["Error"];
2173
+ };
2174
+ };
2175
+ };
2176
+ };
2177
+ setTimeTimezone: {
2178
+ parameters: {
2179
+ query: {
2180
+ /**
2181
+ * @description Timezone offset in ±HH:MM format (range -12:00 to +14:00)
2182
+ * @example +04:00
2183
+ */
2184
+ timezone: string;
2185
+ };
2186
+ header?: never;
2187
+ path?: never;
2188
+ cookie?: never;
2189
+ };
2190
+ requestBody?: never;
2191
+ responses: {
2192
+ /** @description Timezone set successfully */
2193
+ 200: {
2194
+ headers: {
2195
+ [name: string]: unknown;
2196
+ };
2197
+ content: {
2198
+ "application/json": components["schemas"]["SuccessResponse"];
2199
+ };
2200
+ };
2201
+ /** @description Invalid timezone offset */
2202
+ 400: {
2203
+ headers: {
2204
+ [name: string]: unknown;
2205
+ };
2206
+ content: {
2207
+ "application/json": components["schemas"]["Error"];
2208
+ };
2209
+ };
2210
+ };
2211
+ };
2212
+ }
2213
+
2214
+ /**
2215
+ * This file was auto-generated by openapi-typescript.
2216
+ * Do not make direct changes to the file.
2217
+ */
2218
+ declare interface paths {
2219
+ "/version": {
2220
+ parameters: {
2221
+ query?: never;
2222
+ header?: never;
2223
+ path?: never;
2224
+ cookie?: never;
2225
+ };
2226
+ /**
2227
+ * Get API version information
2228
+ * @description Retrieves api version
2229
+ */
2230
+ get: operations["getVersion"];
2231
+ put?: never;
2232
+ post?: never;
2233
+ delete?: never;
2234
+ options?: never;
2235
+ head?: never;
2236
+ patch?: never;
2237
+ trace?: never;
2238
+ };
2239
+ "/access": {
2240
+ parameters: {
2241
+ query?: never;
2242
+ header?: never;
2243
+ path?: never;
2244
+ cookie?: never;
2245
+ };
2246
+ /**
2247
+ * HTTP API access over Wi-Fi configuration get
2248
+ * @description HTTP API access over Wi-Fi configuration get
2249
+ */
1680
2250
  get: operations["getHttpAccess"];
1681
2251
  put?: never;
1682
2252
  /**
@@ -1690,6 +2260,81 @@ declare interface paths {
1690
2260
  patch?: never;
1691
2261
  trace?: never;
1692
2262
  };
2263
+ "/name": {
2264
+ parameters: {
2265
+ query?: never;
2266
+ header?: never;
2267
+ path?: never;
2268
+ cookie?: never;
2269
+ };
2270
+ /**
2271
+ * Get current device name
2272
+ * @description Get current device name
2273
+ */
2274
+ get: {
2275
+ parameters: {
2276
+ query?: never;
2277
+ header?: never;
2278
+ path?: never;
2279
+ cookie?: never;
2280
+ };
2281
+ requestBody?: never;
2282
+ responses: {
2283
+ /** @description Information retrieved successfully */
2284
+ 200: {
2285
+ headers: {
2286
+ [name: string]: unknown;
2287
+ };
2288
+ content: {
2289
+ "application/json": components["schemas"]["NameInfo"];
2290
+ };
2291
+ };
2292
+ };
2293
+ };
2294
+ put?: never;
2295
+ /**
2296
+ * Set new device name
2297
+ * @description Set new device name
2298
+ */
2299
+ post: {
2300
+ parameters: {
2301
+ query?: never;
2302
+ header?: never;
2303
+ path?: never;
2304
+ cookie?: never;
2305
+ };
2306
+ requestBody: {
2307
+ content: {
2308
+ "application/json": components["schemas"]["NameInfo"];
2309
+ };
2310
+ };
2311
+ responses: {
2312
+ /** @description New name successfully set */
2313
+ 200: {
2314
+ headers: {
2315
+ [name: string]: unknown;
2316
+ };
2317
+ content: {
2318
+ "application/json": components["schemas"]["SuccessResponse"];
2319
+ };
2320
+ };
2321
+ /** @description Invalid name parameter, or failed to store new name */
2322
+ 400: {
2323
+ headers: {
2324
+ [name: string]: unknown;
2325
+ };
2326
+ content: {
2327
+ "application/json": components["schemas"]["Error"];
2328
+ };
2329
+ };
2330
+ };
2331
+ };
2332
+ delete?: never;
2333
+ options?: never;
2334
+ head?: never;
2335
+ patch?: never;
2336
+ trace?: never;
2337
+ };
1693
2338
  "/update": {
1694
2339
  parameters: {
1695
2340
  query?: never;
@@ -1781,10 +2426,7 @@ declare interface paths {
1781
2426
  path?: never;
1782
2427
  cookie?: never;
1783
2428
  };
1784
- /**
1785
- * List files on internal storage
1786
- * @description Downloads a file from a specified path
1787
- */
2429
+ /** List files on internal storage */
1788
2430
  get: operations["listStorageFiles"];
1789
2431
  put?: never;
1790
2432
  post?: never;
@@ -1834,6 +2476,23 @@ declare interface paths {
1834
2476
  patch?: never;
1835
2477
  trace?: never;
1836
2478
  };
2479
+ "/storage/status": {
2480
+ parameters: {
2481
+ query?: never;
2482
+ header?: never;
2483
+ path?: never;
2484
+ cookie?: never;
2485
+ };
2486
+ /** Show storage usage */
2487
+ get: operations["getStorageStatus"];
2488
+ put?: never;
2489
+ post?: never;
2490
+ delete?: never;
2491
+ options?: never;
2492
+ head?: never;
2493
+ patch?: never;
2494
+ trace?: never;
2495
+ };
1837
2496
  "/display/draw": {
1838
2497
  parameters: {
1839
2498
  query?: never;
@@ -1847,7 +2506,6 @@ declare interface paths {
1847
2506
  * Draw on display
1848
2507
  * @description Sends drawing data to the display.
1849
2508
  * Supports JSON-defined display elements.
1850
- *
1851
2509
  */
1852
2510
  post: operations["drawOnDisplay"];
1853
2511
  /**
@@ -1876,7 +2534,6 @@ declare interface paths {
1876
2534
  /**
1877
2535
  * Set display brightness
1878
2536
  * @description Set brightness for one or both displays
1879
- *
1880
2537
  */
1881
2538
  post: operations["setDisplayBrightness"];
1882
2539
  delete?: never;
@@ -1898,7 +2555,6 @@ declare interface paths {
1898
2555
  * Play audio file
1899
2556
  * @description Plays an audio file from the assets directory.
1900
2557
  * Supported formats include .snd files.
1901
- *
1902
2558
  */
1903
2559
  post: operations["playAudio"];
1904
2560
  /**
@@ -2006,125 +2662,34 @@ declare interface paths {
2006
2662
  path?: never;
2007
2663
  cookie?: never;
2008
2664
  };
2009
- /**
2010
- * Get power status
2011
- * @description Get system status
2012
- */
2013
- get: operations["getStatusPower"];
2014
- put?: never;
2015
- post?: never;
2016
- delete?: never;
2017
- options?: never;
2018
- head?: never;
2019
- patch?: never;
2020
- trace?: never;
2021
- };
2022
- "/ws_test": {
2023
- parameters: {
2024
- query?: never;
2025
- header?: never;
2026
- path?: never;
2027
- cookie?: never;
2028
- };
2029
- /**
2030
- * WebSocket test endpoint
2031
- * @description WebSocket connection for real-time communication and testing.
2032
- * Upgrade from HTTP to WebSocket protocol is required.
2033
- *
2034
- */
2035
- get: operations["connectWebSocket"];
2036
- put?: never;
2037
- post?: never;
2038
- delete?: never;
2039
- options?: never;
2040
- head?: never;
2041
- patch?: never;
2042
- trace?: never;
2043
- };
2044
- "/wifi/enable": {
2045
- parameters: {
2046
- query?: never;
2047
- header?: never;
2048
- path?: never;
2049
- cookie?: never;
2050
- };
2051
- get?: never;
2052
- put?: never;
2053
- /** @description Enables wifi module */
2054
- post: {
2055
- parameters: {
2056
- query?: never;
2057
- header?: never;
2058
- path?: never;
2059
- cookie?: never;
2060
- };
2061
- requestBody?: never;
2062
- responses: {
2063
- /** @description Wifi enabled */
2064
- 200: {
2065
- headers: {
2066
- [name: string]: unknown;
2067
- };
2068
- content: {
2069
- "application/json": components["schemas"]["SuccessResponse"];
2070
- };
2071
- };
2072
- /** @description Wifi already enabled */
2073
- 400: {
2074
- headers: {
2075
- [name: string]: unknown;
2076
- };
2077
- content: {
2078
- "application/json": components["schemas"]["Error"];
2079
- };
2080
- };
2081
- };
2082
- };
2083
- delete?: never;
2084
- options?: never;
2085
- head?: never;
2086
- patch?: never;
2087
- trace?: never;
2088
- };
2089
- "/wifi/disable": {
2090
- parameters: {
2091
- query?: never;
2092
- header?: never;
2093
- path?: never;
2094
- cookie?: never;
2095
- };
2096
- get?: never;
2097
- put?: never;
2098
- /** @description Disables wifi module */
2099
- post: {
2100
- parameters: {
2101
- query?: never;
2102
- header?: never;
2103
- path?: never;
2104
- cookie?: never;
2105
- };
2106
- requestBody?: never;
2107
- responses: {
2108
- /** @description Wifi disabled */
2109
- 200: {
2110
- headers: {
2111
- [name: string]: unknown;
2112
- };
2113
- content: {
2114
- "application/json": components["schemas"]["SuccessResponse"];
2115
- };
2116
- };
2117
- /** @description Not initialized */
2118
- 400: {
2119
- headers: {
2120
- [name: string]: unknown;
2121
- };
2122
- content: {
2123
- "application/json": components["schemas"]["Error"];
2124
- };
2125
- };
2126
- };
2665
+ /**
2666
+ * Get power status
2667
+ * @description Get system status
2668
+ */
2669
+ get: operations["getStatusPower"];
2670
+ put?: never;
2671
+ post?: never;
2672
+ delete?: never;
2673
+ options?: never;
2674
+ head?: never;
2675
+ patch?: never;
2676
+ trace?: never;
2677
+ };
2678
+ "/ws_test": {
2679
+ parameters: {
2680
+ query?: never;
2681
+ header?: never;
2682
+ path?: never;
2683
+ cookie?: never;
2127
2684
  };
2685
+ /**
2686
+ * WebSocket test endpoint
2687
+ * @description WebSocket connection for real-time communication and testing.
2688
+ * Upgrade from HTTP to WebSocket protocol is required.
2689
+ */
2690
+ get: operations["connectWebSocket"];
2691
+ put?: never;
2692
+ post?: never;
2128
2693
  delete?: never;
2129
2694
  options?: never;
2130
2695
  head?: never;
@@ -2138,7 +2703,7 @@ declare interface paths {
2138
2703
  path?: never;
2139
2704
  cookie?: never;
2140
2705
  };
2141
- /** @description Returns current wifi status */
2706
+ /** @description Returns current Wi-Fi status */
2142
2707
  get: {
2143
2708
  parameters: {
2144
2709
  query?: never;
@@ -2176,7 +2741,7 @@ declare interface paths {
2176
2741
  };
2177
2742
  get?: never;
2178
2743
  put?: never;
2179
- /** @description Attempts to connect to wifi using config */
2744
+ /** @description Attempts to connect to Wi-Fi using config */
2180
2745
  post: {
2181
2746
  parameters: {
2182
2747
  query?: never;
@@ -2199,7 +2764,7 @@ declare interface paths {
2199
2764
  "application/json": components["schemas"]["SuccessResponse"];
2200
2765
  };
2201
2766
  };
2202
- /** @description Wifi already connected */
2767
+ /** @description Already connected */
2203
2768
  400: {
2204
2769
  headers: {
2205
2770
  [name: string]: unknown;
@@ -2225,7 +2790,7 @@ declare interface paths {
2225
2790
  };
2226
2791
  get?: never;
2227
2792
  put?: never;
2228
- /** @description Attempts to connect to wifi using config */
2793
+ /** @description Attempts to connect to Wi-Fi using config */
2229
2794
  post: {
2230
2795
  parameters: {
2231
2796
  query?: never;
@@ -2244,7 +2809,7 @@ declare interface paths {
2244
2809
  "application/json": components["schemas"]["SuccessResponse"];
2245
2810
  };
2246
2811
  };
2247
- /** @description Command issued in an invalid state */
2812
+ /** @description Already disconnected */
2248
2813
  400: {
2249
2814
  headers: {
2250
2815
  [name: string]: unknown;
@@ -2268,7 +2833,7 @@ declare interface paths {
2268
2833
  path?: never;
2269
2834
  cookie?: never;
2270
2835
  };
2271
- /** @description Scans environment for available wifi networks */
2836
+ /** @description Scans environment for available Wi-Fi networks */
2272
2837
  get: {
2273
2838
  parameters: {
2274
2839
  query?: never;
@@ -2287,7 +2852,7 @@ declare interface paths {
2287
2852
  "application/json": components["schemas"]["NetworkResponse"];
2288
2853
  };
2289
2854
  };
2290
- /** @description Wifi already connected */
2855
+ /** @description Scan not possible when connected */
2291
2856
  400: {
2292
2857
  headers: {
2293
2858
  [name: string]: unknown;
@@ -2306,42 +2871,6 @@ declare interface paths {
2306
2871
  patch?: never;
2307
2872
  trace?: never;
2308
2873
  };
2309
- "/wifi/forget": {
2310
- parameters: {
2311
- query?: never;
2312
- header?: never;
2313
- path?: never;
2314
- cookie?: never;
2315
- };
2316
- get?: never;
2317
- put?: never;
2318
- /** @description Forgets saved Wifi config */
2319
- post: {
2320
- parameters: {
2321
- query?: never;
2322
- header?: never;
2323
- path?: never;
2324
- cookie?: never;
2325
- };
2326
- requestBody?: never;
2327
- responses: {
2328
- /** @description Not implemented */
2329
- 400: {
2330
- headers: {
2331
- [name: string]: unknown;
2332
- };
2333
- content: {
2334
- "application/json": components["schemas"]["Error"];
2335
- };
2336
- };
2337
- };
2338
- };
2339
- delete?: never;
2340
- options?: never;
2341
- head?: never;
2342
- patch?: never;
2343
- trace?: never;
2344
- };
2345
2874
  "/screen": {
2346
2875
  parameters: {
2347
2876
  query?: never;
@@ -2406,7 +2935,6 @@ declare interface paths {
2406
2935
  * Upgrade from HTTP to WebSocket protocol is required.
2407
2936
  * After connection client must send desired display id
2408
2937
  * as json {"display": 0}
2409
- *
2410
2938
  */
2411
2939
  get: operations["connectWebSocket"];
2412
2940
  put?: never;
@@ -2426,7 +2954,10 @@ declare interface paths {
2426
2954
  };
2427
2955
  get?: never;
2428
2956
  put?: never;
2429
- /** @description Enables ble module */
2957
+ /**
2958
+ * Enable BLE
2959
+ * @description Enables BLE module and starts advertising
2960
+ */
2430
2961
  post: {
2431
2962
  parameters: {
2432
2963
  query?: never;
@@ -2436,7 +2967,7 @@ declare interface paths {
2436
2967
  };
2437
2968
  requestBody?: never;
2438
2969
  responses: {
2439
- /** @description Ble enabled */
2970
+ /** @description BLE enabled */
2440
2971
  200: {
2441
2972
  headers: {
2442
2973
  [name: string]: unknown;
@@ -2462,7 +2993,10 @@ declare interface paths {
2462
2993
  };
2463
2994
  get?: never;
2464
2995
  put?: never;
2465
- /** @description Disables ble module */
2996
+ /**
2997
+ * Disable BLE
2998
+ * @description Stop advertising
2999
+ */
2466
3000
  post: {
2467
3001
  parameters: {
2468
3002
  query?: never;
@@ -2472,7 +3006,7 @@ declare interface paths {
2472
3006
  };
2473
3007
  requestBody?: never;
2474
3008
  responses: {
2475
- /** @description Ble disabled */
3009
+ /** @description BLE disabled */
2476
3010
  200: {
2477
3011
  headers: {
2478
3012
  [name: string]: unknown;
@@ -2489,26 +3023,205 @@ declare interface paths {
2489
3023
  patch?: never;
2490
3024
  trace?: never;
2491
3025
  };
3026
+ "/ble/pairing": {
3027
+ parameters: {
3028
+ query?: never;
3029
+ header?: never;
3030
+ path?: never;
3031
+ cookie?: never;
3032
+ };
3033
+ get?: never;
3034
+ put?: never;
3035
+ post?: never;
3036
+ /**
3037
+ * Remove pairing
3038
+ * @description Remove pairing with previous device
3039
+ */
3040
+ delete: {
3041
+ parameters: {
3042
+ query?: never;
3043
+ header?: never;
3044
+ path?: never;
3045
+ cookie?: never;
3046
+ };
3047
+ requestBody?: never;
3048
+ responses: {
3049
+ /** @description Pairing removed, now device is discoverable */
3050
+ 200: {
3051
+ headers: {
3052
+ [name: string]: unknown;
3053
+ };
3054
+ content: {
3055
+ "application/json": components["schemas"]["SuccessResponse"];
3056
+ };
3057
+ };
3058
+ /** @description Failed to remove, due to BLE is not initialized, or pairing was already removed before */
3059
+ 503: {
3060
+ headers: {
3061
+ [name: string]: unknown;
3062
+ };
3063
+ content: {
3064
+ "application/json": components["schemas"]["Error"];
3065
+ };
3066
+ };
3067
+ };
3068
+ };
3069
+ options?: never;
3070
+ head?: never;
3071
+ patch?: never;
3072
+ trace?: never;
3073
+ };
3074
+ "/ble/status": {
3075
+ parameters: {
3076
+ query?: never;
3077
+ header?: never;
3078
+ path?: never;
3079
+ cookie?: never;
3080
+ };
3081
+ /** @description Returns current BLE status */
3082
+ get: {
3083
+ parameters: {
3084
+ query?: never;
3085
+ header?: never;
3086
+ path?: never;
3087
+ cookie?: never;
3088
+ };
3089
+ requestBody?: never;
3090
+ responses: {
3091
+ /** @description OK */
3092
+ 200: {
3093
+ headers: {
3094
+ [name: string]: unknown;
3095
+ };
3096
+ content: {
3097
+ "application/json": components["schemas"]["BleStatusResponse"];
3098
+ };
3099
+ };
3100
+ };
3101
+ };
3102
+ put?: never;
3103
+ post?: never;
3104
+ delete?: never;
3105
+ options?: never;
3106
+ head?: never;
3107
+ patch?: never;
3108
+ trace?: never;
3109
+ };
3110
+ "/time": {
3111
+ parameters: {
3112
+ query?: never;
3113
+ header?: never;
3114
+ path?: never;
3115
+ cookie?: never;
3116
+ };
3117
+ /**
3118
+ * Get current timestamp with timezone
3119
+ * @description Retrieves the current timestamp from RTC with timezone in ISO 8601 format
3120
+ */
3121
+ get: operations["getTime"];
3122
+ put?: never;
3123
+ post?: never;
3124
+ delete?: never;
3125
+ options?: never;
3126
+ head?: never;
3127
+ patch?: never;
3128
+ trace?: never;
3129
+ };
3130
+ "/account": {
3131
+ parameters: {
3132
+ query?: never;
3133
+ header?: never;
3134
+ path?: never;
3135
+ cookie?: never;
3136
+ };
3137
+ /**
3138
+ * Get MQTT status
3139
+ * @description Retrieves MQTT status and linked account data
3140
+ */
3141
+ get: operations["getAccountInfo"];
3142
+ put?: never;
3143
+ post?: never;
3144
+ /**
3145
+ * Unlink device from account
3146
+ * @description Removes account linking data
3147
+ */
3148
+ delete: operations["unlinkAccount"];
3149
+ options?: never;
3150
+ head?: never;
3151
+ patch?: never;
3152
+ trace?: never;
3153
+ };
3154
+ "/account/link": {
3155
+ parameters: {
3156
+ query?: never;
3157
+ header?: never;
3158
+ path?: never;
3159
+ cookie?: never;
3160
+ };
3161
+ get?: never;
3162
+ put?: never;
3163
+ /**
3164
+ * Link device to account
3165
+ * @description Requests account link PIN. Works only if device is connected to MQTT and is not linked to account
3166
+ */
3167
+ post: operations["linkAccount"];
3168
+ delete?: never;
3169
+ options?: never;
3170
+ head?: never;
3171
+ patch?: never;
3172
+ trace?: never;
3173
+ };
3174
+ "/time/timestamp": {
3175
+ parameters: {
3176
+ query?: never;
3177
+ header?: never;
3178
+ path?: never;
3179
+ cookie?: never;
3180
+ };
3181
+ get?: never;
3182
+ put?: never;
3183
+ /**
3184
+ * Set current timestamp
3185
+ * @description Sets the RTC timestamp in ISO 8601 format.
3186
+ * - Without 'Z': treated as local time
3187
+ * - With 'Z': treated as UTC and converted to local time using current timezone offset
3188
+ */
3189
+ post: operations["setTimeTimestamp"];
3190
+ delete?: never;
3191
+ options?: never;
3192
+ head?: never;
3193
+ patch?: never;
3194
+ trace?: never;
3195
+ };
3196
+ "/time/timezone": {
3197
+ parameters: {
3198
+ query?: never;
3199
+ header?: never;
3200
+ path?: never;
3201
+ cookie?: never;
3202
+ };
3203
+ get?: never;
3204
+ put?: never;
3205
+ /**
3206
+ * Set timezone offset
3207
+ * @description Sets the timezone offset in ±HH:MM format
3208
+ */
3209
+ post: operations["setTimeTimezone"];
3210
+ delete?: never;
3211
+ options?: never;
3212
+ head?: never;
3213
+ patch?: never;
3214
+ trace?: never;
3215
+ };
2492
3216
  }
2493
3217
 
2494
- declare interface ReadDirectoryParams {
2495
- path: operations["listStorageFiles"]["parameters"]["query"]["path"];
2496
- }
2497
- export { ReadDirectoryParams }
2498
- export { ReadDirectoryParams as StorageReadDirectoryParams }
2499
-
2500
- declare interface RemoveParams {
2501
- path: operations["removeStorageFile"]["parameters"]["query"]["path"];
2502
- }
2503
- export { RemoveParams }
2504
- export { RemoveParams as StorageRemoveParams }
2505
-
2506
- declare type RequiredIpConfig = RequireKeys<NonNullable<CamelizedRequest["ipConfig"]>, "ipMethod" | "ipType">;
3218
+ declare type RequiredIpConfig = RequireKeys<NonNullable<CamelizedRequest["ipConfig"]>, "ipMethod">;
2507
3219
 
2508
3220
  declare type RequireKeys<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
2509
3221
 
2510
3222
  export declare class ScreenStream {
2511
3223
  private config;
3224
+ readonly addr: string;
2512
3225
  connected: boolean;
2513
3226
  private apiKey?;
2514
3227
  private apiSemver?;
@@ -2516,7 +3229,7 @@ export declare class ScreenStream {
2516
3229
  private stopListeners;
2517
3230
  private errorListeners;
2518
3231
  private socket;
2519
- constructor(config: DeviceConfig);
3232
+ constructor(config: ScreenStreamConfig);
2520
3233
  onData(listener: DataListener): void;
2521
3234
  onStop(listener: StopListener): void;
2522
3235
  onError(listener: ErrorListener): void;
@@ -2527,18 +3240,11 @@ export declare class ScreenStream {
2527
3240
  closeWebsocket(): Promise<void>;
2528
3241
  }
2529
3242
 
2530
- declare interface SiteConfig extends BaseConfig {
2531
- mode: "cloud";
2532
- domain: string;
2533
- token: string;
2534
- idDevice: string;
2535
- }
2536
-
2537
- declare interface SiteConfig_2 extends BaseConfig_2 {
2538
- mode: "cloud";
2539
- domain: string;
2540
- token: string;
2541
- idDevice: string;
3243
+ export declare interface ScreenStreamConfig {
3244
+ deviceScreen: DeviceScreen;
3245
+ addr?: string;
3246
+ apiKey?: ApiKey;
3247
+ apiSemver?: ApiSemver;
2542
3248
  }
2543
3249
 
2544
3250
  declare type SnakeToCamel<S extends string> = S extends `${infer Head}_${infer Tail}` ? `${Head}${Capitalize<SnakeToCamel<Tail>>}` : S;
@@ -2551,35 +3257,66 @@ export declare type StatusSystem = components["schemas"]["StatusSystem"];
2551
3257
 
2552
3258
  declare type StopListener = () => void;
2553
3259
 
3260
+ export declare interface StorageCreateDirectoryParams extends TimeoutOptions {
3261
+ path: operations["createStorageDir"]["parameters"]["query"]["path"];
3262
+ }
3263
+
2554
3264
  export declare type StorageDirElement = components["schemas"]["StorageDirElement"];
2555
3265
 
3266
+ export declare interface StorageDownloadFileParams extends TimeoutOptions {
3267
+ path: operations["readStorageFile"]["parameters"]["query"]["path"];
3268
+ asArrayBuffer?: boolean;
3269
+ }
3270
+
2556
3271
  export declare type StorageFileElement = components["schemas"]["StorageFileElement"];
2557
3272
 
2558
3273
  export declare type StorageList = components["schemas"]["StorageList"];
2559
3274
 
2560
3275
  export declare type StorageListElement = components["schemas"]["StorageListElement"];
2561
3276
 
3277
+ export declare interface StorageReadDirectoryParams extends TimeoutOptions {
3278
+ path: operations["listStorageFiles"]["parameters"]["query"]["path"];
3279
+ }
3280
+
2562
3281
  export declare type StorageReadResponse = ArrayBuffer | Blob;
2563
3282
 
3283
+ export declare interface StorageRemoveParams extends TimeoutOptions {
3284
+ path: operations["removeStorageFile"]["parameters"]["query"]["path"];
3285
+ }
3286
+
3287
+ export declare type StorageStatus = components["schemas"]["StorageStatus"];
3288
+
3289
+ export declare interface StorageUploadFileParams extends TimeoutOptions {
3290
+ path: operations["writeStorageFile"]["parameters"]["query"]["path"];
3291
+ file: BusyFile;
3292
+ }
3293
+
2564
3294
  export declare type SuccessResponse = components["schemas"]["SuccessResponse"];
2565
3295
 
2566
- export declare interface SystemUpdateParams {
3296
+ export declare interface SystemTimestampParams extends TimeoutOptions {
3297
+ timestamp: operations["setTimeTimestamp"]["parameters"]["query"]["timestamp"];
3298
+ }
3299
+
3300
+ export declare interface SystemTimezoneParams extends TimeoutOptions {
3301
+ timezone: operations["setTimeTimezone"]["parameters"]["query"]["timezone"];
3302
+ }
3303
+
3304
+ export declare interface SystemUpdateParams extends TimeoutOptions {
2567
3305
  name?: string;
2568
3306
  file: BusyFile;
2569
3307
  }
2570
3308
 
2571
- declare interface UploadFileParams {
2572
- path: operations["writeStorageFile"]["parameters"]["query"]["path"];
2573
- file: BusyFile;
3309
+ declare interface TimeoutOptions {
3310
+ timeout?: number;
2574
3311
  }
2575
- export { UploadFileParams as StorageUploadFileParams }
2576
- export { UploadFileParams }
3312
+
3313
+ export declare type TimestampInfo = components["schemas"]["TimestampInfo"];
2577
3314
 
2578
3315
  export declare type VersionInfo = components["schemas"]["VersionInfo"];
2579
3316
 
2580
3317
  export declare type WifiConnectParams = RequireKeys<Omit<CamelizedRequest, "ipConfig"> & {
2581
3318
  ipConfig: RequiredIpConfig;
2582
- }, "ssid" | "security" | "ipConfig">;
3319
+ }, "ssid" | "security" | "ipConfig"> & TimeoutOptions;
2583
3320
 
2584
3321
  export declare type WifiConnectRequestConfig = components["schemas"]["ConnectRequestConfig"];
2585
3322