@doubao-apps/create 0.0.24 → 0.0.25

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.
@@ -6,6 +6,54 @@
6
6
 
7
7
  ## Functions
8
8
 
9
+ ### addPhoneCalendar()
10
+
11
+ > **addPhoneCalendar**(`params`): `Promise`\<`object`\>
12
+
13
+ 向系统日历添加事件。
14
+
15
+ #### Parameters
16
+
17
+ • **params**: [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams)
18
+
19
+ #### Returns
20
+
21
+ `Promise`\<`object`\>
22
+
23
+ ***
24
+
25
+ ### addPhoneContact()
26
+
27
+ > **addPhoneContact**(`params`): `Promise`\<`object`\>
28
+
29
+ 添加手机联系人。
30
+
31
+ #### Parameters
32
+
33
+ • **params**: [`AddPhoneContactParams`](doubao-apps-sdk-open-api.md#addphonecontactparams)
34
+
35
+ #### Returns
36
+
37
+ `Promise`\<`object`\>
38
+
39
+ ***
40
+
41
+ ### addPhoneRepeatCalendar()
42
+
43
+ > **addPhoneRepeatCalendar**(`params`): `Promise`\<`object`\>
44
+
45
+ 向系统日历添加重复事件。
46
+
47
+ #### Parameters
48
+
49
+ • **params**: [`AddPhoneRepeatCalendarParams`](doubao-apps-sdk-open-api.md#addphonerepeatcalendarparams)
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<`object`\>
54
+
55
+ ***
56
+
9
57
  ### authorize()
10
58
 
11
59
  > **authorize**(`params`): `Promise`\<`object`\>
@@ -26,6 +74,52 @@ Promise 对象,授权成功时会返回授权结果
26
74
 
27
75
  ***
28
76
 
77
+ ### canIUse()
78
+
79
+ > **canIUse**(`params`): `Promise`\<[`CanIUseResult`](doubao-apps-sdk-open-api.md#caniuseresult)\>
80
+
81
+ #### Parameters
82
+
83
+ • **params**: [`CanIUseParams`](doubao-apps-sdk-open-api.md#caniuseparams)
84
+
85
+ #### Returns
86
+
87
+ `Promise`\<[`CanIUseResult`](doubao-apps-sdk-open-api.md#caniuseresult)\>
88
+
89
+ ***
90
+
91
+ ### checkIsOpenAccessibility()
92
+
93
+ > **checkIsOpenAccessibility**(`params`?): `Promise`\<[`CheckIsOpenAccessibilityResult`](doubao-apps-sdk-open-api.md#checkisopenaccessibilityresult)\>
94
+
95
+ 检测无障碍能力是否开启。
96
+
97
+ #### Parameters
98
+
99
+ • **params?**: `Record`\<`string`, `never`\>
100
+
101
+ #### Returns
102
+
103
+ `Promise`\<[`CheckIsOpenAccessibilityResult`](doubao-apps-sdk-open-api.md#checkisopenaccessibilityresult)\>
104
+
105
+ ***
106
+
107
+ ### chooseContact()
108
+
109
+ > **chooseContact**(`params`?): `Promise`\<[`ChooseContactResult`](doubao-apps-sdk-open-api.md#choosecontactresult)\>
110
+
111
+ 选择手机联系人。
112
+
113
+ #### Parameters
114
+
115
+ • **params?**: `Record`\<`string`, `never`\>
116
+
117
+ #### Returns
118
+
119
+ `Promise`\<[`ChooseContactResult`](doubao-apps-sdk-open-api.md#choosecontactresult)\>
120
+
121
+ ***
122
+
29
123
  ### clearStorage()
30
124
 
31
125
  > **clearStorage**(`params`?): `Promise`\<`object`\>
@@ -116,6 +210,70 @@ closePage();
116
210
 
117
211
  ***
118
212
 
213
+ ### closeBLEConnection()
214
+
215
+ > **closeBLEConnection**(`params`): `Promise`\<`object`\>
216
+
217
+ 关闭 BLE 连接。
218
+
219
+ #### Parameters
220
+
221
+ • **params**: [`CloseBLEConnectionParams`](doubao-apps-sdk-open-api.md#closebleconnectionparams)
222
+
223
+ #### Returns
224
+
225
+ `Promise`\<`object`\>
226
+
227
+ ***
228
+
229
+ ### closeBluetoothAdapter()
230
+
231
+ > **closeBluetoothAdapter**(`params`?): `Promise`\<`object`\>
232
+
233
+ 关闭蓝牙适配器。
234
+
235
+ #### Parameters
236
+
237
+ • **params?**: `Record`\<`string`, `never`\>
238
+
239
+ #### Returns
240
+
241
+ `Promise`\<`object`\>
242
+
243
+ ***
244
+
245
+ ### connectWifi()
246
+
247
+ > **connectWifi**(`params`): `Promise`\<`object`\>
248
+
249
+ 连接指定 Wi-Fi。
250
+
251
+ #### Parameters
252
+
253
+ • **params**: [`ConnectWifiParams`](doubao-apps-sdk-open-api.md#connectwifiparams)
254
+
255
+ #### Returns
256
+
257
+ `Promise`\<`object`\>
258
+
259
+ ***
260
+
261
+ ### createBLEConnection()
262
+
263
+ > **createBLEConnection**(`params`): `Promise`\<`object`\>
264
+
265
+ 创建 BLE 连接。
266
+
267
+ #### Parameters
268
+
269
+ • **params**: [`CreateBLEConnectionParams`](doubao-apps-sdk-open-api.md#createbleconnectionparams)
270
+
271
+ #### Returns
272
+
273
+ `Promise`\<`object`\>
274
+
275
+ ***
276
+
119
277
  ### exitApp()
120
278
 
121
279
  > **exitApp**(): `Promise`\<`object`\>
@@ -209,13 +367,13 @@ console.log(result.host?.appId, result.enableDebug);
209
367
 
210
368
  ### getAppBaseInfoSync()
211
369
 
212
- > **getAppBaseInfoSync**(`params`?): [`GetAppBaseInfoResult`](doubao-apps-sdk-open-api.md#getappbaseinforesult)
370
+ > **getAppBaseInfoSync**(`_params`?): [`GetAppBaseInfoResult`](doubao-apps-sdk-open-api.md#getappbaseinforesult)
213
371
 
214
372
  获取应用基础信息。
215
373
 
216
374
  #### Parameters
217
375
 
218
- **params?**
376
+ **\_params?**
219
377
 
220
378
  #### Returns
221
379
 
@@ -236,305 +394,310 @@ console.log(result.host?.appId, result.enableDebug);
236
394
 
237
395
  ***
238
396
 
239
- ### getLocation()
397
+ ### getBLEDeviceCharacteristics()
240
398
 
241
- > **getLocation**(`params`?): `Promise`\<[`GetLocationResponse`](doubao-apps-sdk-open-api.md#getlocationresponse)\>
399
+ > **getBLEDeviceCharacteristics**(`params`): `Promise`\<[`GetBLEDeviceCharacteristicsResult`](doubao-apps-sdk-open-api.md#getbledevicecharacteristicsresult)\>
242
400
 
243
- 获取设备当前的地理位置信息。
401
+ 获取 BLE 特征值列表。
244
402
 
245
403
  #### Parameters
246
404
 
247
- • **params?**: [`GetLocationParams`](doubao-apps-sdk-open-api.md#getlocationparams)
405
+ • **params**: [`GetBLEDeviceCharacteristicsParams`](doubao-apps-sdk-open-api.md#getbledevicecharacteristicsparams)
248
406
 
249
407
  #### Returns
250
408
 
251
- `Promise`\<[`GetLocationResponse`](doubao-apps-sdk-open-api.md#getlocationresponse)\>
409
+ `Promise`\<[`GetBLEDeviceCharacteristicsResult`](doubao-apps-sdk-open-api.md#getbledevicecharacteristicsresult)\>
252
410
 
253
- 返回一个 Promise,成功时解析为包含地理位置信息的对象,包含:
254
- - `latitude`: number - 纬度。
255
- - `longitude`: number - 经度。
256
- - `timestamp`: string - 时间戳。
257
- - `speed`: number - 行进速度,单位:米/秒。
258
- - `accuracy`: number - 定位精度,单位:米。
259
- 参考 [GetLocationResponse](doubao-apps-sdk-open-api.md#getlocationresponse)。
411
+ ***
260
412
 
261
- #### Throws
413
+ ### getBLEDeviceRSSI()
262
414
 
263
- 如果调用失败(例如,用户拒绝权限、定位服务关闭等),则抛出此错误。
415
+ > **getBLEDeviceRSSI**(`params`): `Promise`\<[`GetBLEDeviceRSSIResult`](doubao-apps-sdk-open-api.md#getbledevicerssiresult)\>
264
416
 
265
- #### Example
417
+ 获取 BLE 设备 RSSI。
266
418
 
267
- ```typescript
268
- import { getLocation } from '@doubao-apps/framework';
419
+ #### Parameters
269
420
 
270
- async function fetchLocation() {
271
- try {
272
- const locationData = await getLocation();
273
- console.log('纬度:', locationData.latitude);
274
- console.log('经度:', locationData.longitude);
275
- console.log('时间戳:', locationData.timestamp);
276
- console.log('行进速度:', locationData.speed);
277
- console.log('定位精度:', locationData.accuracy);
278
- } catch (error) {
279
- console.error('获取位置失败:', error);
280
- // 处理错误,例如提示用户开启定位权限
281
- }
282
- }
421
+ **params**: [`GetBLEDeviceRSSIParams`](doubao-apps-sdk-open-api.md#getbledevicerssiparams)
283
422
 
284
- fetchLocation();
285
- ```
423
+ #### Returns
424
+
425
+ `Promise`\<[`GetBLEDeviceRSSIResult`](doubao-apps-sdk-open-api.md#getbledevicerssiresult)\>
286
426
 
287
427
  ***
288
428
 
289
- ### getNetworkType()
429
+ ### getBLEDeviceServices()
290
430
 
291
- > **getNetworkType**(`params`?): `Promise`\<[`GetNetworkTypeResult`](doubao-apps-sdk-open-api.md#getnetworktyperesult)\>
431
+ > **getBLEDeviceServices**(`params`): `Promise`\<[`GetBLEDeviceServicesResult`](doubao-apps-sdk-open-api.md#getbledeviceservicesresult)\>
292
432
 
293
- 获取当前网络类型。
433
+ 获取 BLE 服务列表。
294
434
 
295
435
  #### Parameters
296
436
 
297
- • **params?**: [`GetNetworkTypeParams`](doubao-apps-sdk-open-api.md#getnetworktypeparams)
437
+ • **params**: [`GetBLEDeviceServicesParams`](doubao-apps-sdk-open-api.md#getbledeviceservicesparams)
298
438
 
299
439
  #### Returns
300
440
 
301
- `Promise`\<[`GetNetworkTypeResult`](doubao-apps-sdk-open-api.md#getnetworktyperesult)\>
302
-
303
- 返回一个 Promise,解析为 [GetNetworkTypeResult](doubao-apps-sdk-open-api.md#getnetworktyperesult)。
304
-
305
- #### Example
306
-
307
- ```ts
308
- import { getNetworkType } from '@doubao-apps/framework/api';
309
-
310
- const result = await getNetworkType();
311
- console.log(result.networkType);
312
- ```
441
+ `Promise`\<[`GetBLEDeviceServicesResult`](doubao-apps-sdk-open-api.md#getbledeviceservicesresult)\>
313
442
 
314
443
  ***
315
444
 
316
- ### getOrderPayment()
445
+ ### getBLEMTU()
317
446
 
318
- > **getOrderPayment**(`params`): `Promise`\<[`GetOrderPaymentResult`](doubao-apps-sdk-open-api.md#getorderpaymentresult)\>
447
+ > **getBLEMTU**(`params`): `Promise`\<[`GetBLEMTUResult`](doubao-apps-sdk-open-api.md#getblemturesult)\>
448
+
449
+ 获取 BLE MTU。
319
450
 
320
451
  #### Parameters
321
452
 
322
- • **params**: [`GetOrderPaymentParams`](doubao-apps-sdk-open-api.md#getorderpaymentparams)
453
+ • **params**: [`GetBLEMTUParams`](doubao-apps-sdk-open-api.md#getblemtuparams)
323
454
 
324
455
  #### Returns
325
456
 
326
- `Promise`\<[`GetOrderPaymentResult`](doubao-apps-sdk-open-api.md#getorderpaymentresult)\>
457
+ `Promise`\<[`GetBLEMTUResult`](doubao-apps-sdk-open-api.md#getblemturesult)\>
327
458
 
328
459
  ***
329
460
 
330
- ### getPrivacySetting()
461
+ ### getBatteryInfo()
331
462
 
332
- > **getPrivacySetting**(`params`?): `Promise`\<[`PrivacySettingResult`](doubao-apps-sdk-open-api.md#privacysettingresult)\>
463
+ > **getBatteryInfo**(`params`?): `Promise`\<[`GetBatteryInfoResult`](doubao-apps-sdk-open-api.md#getbatteryinforesult)\>
333
464
 
334
- Get privacy setting information
465
+ 获取电池信息。
335
466
 
336
467
  #### Parameters
337
468
 
338
- • **params?**
469
+ • **params?**: `Record`\<`string`, `never`\>
339
470
 
340
471
  #### Returns
341
472
 
342
- `Promise`\<[`PrivacySettingResult`](doubao-apps-sdk-open-api.md#privacysettingresult)\>
343
-
344
- Returns a Promise containing privacy setting information
473
+ `Promise`\<[`GetBatteryInfoResult`](doubao-apps-sdk-open-api.md#getbatteryinforesult)\>
345
474
 
346
475
  ***
347
476
 
348
- ### getScreenBrightness()
477
+ ### getBeacons()
349
478
 
350
- > **getScreenBrightness**(`params`?): `Promise`\<[`GetScreenBrightnessResult`](doubao-apps-sdk-open-api.md#getscreenbrightnessresult)\>
479
+ > **getBeacons**(`params`?): `Promise`\<[`GetBeaconsResult`](doubao-apps-sdk-open-api.md#getbeaconsresult)\>
351
480
 
352
- 获取屏幕亮度。
481
+ 获取已搜索到的 iBeacon 列表。
353
482
 
354
483
  #### Parameters
355
484
 
356
- • **params?**
485
+ • **params?**: `Record`\<`string`, `never`\>
357
486
 
358
487
  #### Returns
359
488
 
360
- `Promise`\<[`GetScreenBrightnessResult`](doubao-apps-sdk-open-api.md#getscreenbrightnessresult)\>
489
+ `Promise`\<[`GetBeaconsResult`](doubao-apps-sdk-open-api.md#getbeaconsresult)\>
361
490
 
362
- 返回屏幕亮度值,范围 0 ~ 1。
491
+ ***
363
492
 
364
- #### Example
493
+ ### getBluetoothAdapterState()
365
494
 
366
- ```typescript
367
- import { getScreenBrightness } from '@doubao-apps/framework/api';
495
+ > **getBluetoothAdapterState**(`params`?): `Promise`\<[`GetBluetoothAdapterStateResult`](doubao-apps-sdk-open-api.md#getbluetoothadapterstateresult)\>
368
496
 
369
- const result = await getScreenBrightness();
497
+ 获取蓝牙适配器状态。
370
498
 
371
- console.log(result.value);
372
- ```
499
+ #### Parameters
373
500
 
374
- ***
501
+ • **params?**: `Record`\<`string`, `never`\>
375
502
 
376
- ### getStorage()
503
+ #### Returns
377
504
 
378
- > **getStorage**\<`TData`\>(`params`): `Promise`\<[`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>\>
505
+ `Promise`\<[`GetBluetoothAdapterStateResult`](doubao-apps-sdk-open-api.md#getbluetoothadapterstateresult)\>
379
506
 
380
- 从本地缓存读取数据。
507
+ ***
381
508
 
382
- #### Type parameters
509
+ ### getBluetoothDevices()
383
510
 
384
- **TData** = `unknown`
511
+ > **getBluetoothDevices**(`params`?): `Promise`\<[`GetBluetoothDevicesResult`](doubao-apps-sdk-open-api.md#getbluetoothdevicesresult)\>
385
512
 
386
- #### Parameters
513
+ 获取当前蓝牙模块发现的设备列表。
387
514
 
388
- **params**: [`GetStorageParams`](doubao-apps-sdk-open-api.md#getstorageparams)
515
+ #### Parameters
389
516
 
390
- 查询参数,字段见 [GetStorageParams](doubao-apps-sdk-open-api.md#getstorageparams)。
517
+ **params?**: `Record`\<`string`, `never`\>
391
518
 
392
519
  #### Returns
393
520
 
394
- `Promise`\<[`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>\>
521
+ `Promise`\<[`GetBluetoothDevicesResult`](doubao-apps-sdk-open-api.md#getbluetoothdevicesresult)\>
395
522
 
396
- 返回一个 Promise,解析为 [GetStorageResult](doubao-apps-sdk-open-api.md#getstorageresulttdata)。
523
+ ***
397
524
 
398
- #### Example
525
+ ### getClipboardData()
399
526
 
400
- ```typescript
401
- import { getStorage } from '@doubao-apps/framework/api';
527
+ > **getClipboardData**(`params`?): `Promise`\<[`GetClipboardDataResult`](doubao-apps-sdk-open-api.md#getclipboarddataresult)\>
402
528
 
403
- const result = await getStorage<{ name: string; age: number }>({
404
- key: 'profile',
405
- });
529
+ 获取剪贴板内容。
406
530
 
407
- console.log(result.data.name, result.data.age);
408
- ```
531
+ #### Parameters
532
+
533
+ • **params?**: `Record`\<`string`, `never`\>
534
+
535
+ #### Returns
536
+
537
+ `Promise`\<[`GetClipboardDataResult`](doubao-apps-sdk-open-api.md#getclipboarddataresult)\>
409
538
 
410
539
  ***
411
540
 
412
- ### getStorageInfo()
541
+ ### getConnectedBluetoothDevices()
413
542
 
414
- > **getStorageInfo**(`params`?): `Promise`\<[`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)\>
543
+ > **getConnectedBluetoothDevices**(`params`): `Promise`\<[`GetConnectedBluetoothDevicesResult`](doubao-apps-sdk-open-api.md#getconnectedbluetoothdevicesresult)\>
415
544
 
416
- 获取本地缓存信息。
545
+ 获取已连接的蓝牙设备列表。
417
546
 
418
547
  #### Parameters
419
548
 
420
- • **params?**
549
+ • **params**: [`GetConnectedBluetoothDevicesParams`](doubao-apps-sdk-open-api.md#getconnectedbluetoothdevicesparams)
421
550
 
422
551
  #### Returns
423
552
 
424
- `Promise`\<[`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)\>
553
+ `Promise`\<[`GetConnectedBluetoothDevicesResult`](doubao-apps-sdk-open-api.md#getconnectedbluetoothdevicesresult)\>
425
554
 
426
- 返回一个 Promise,解析为 [GetStorageInfoResult](doubao-apps-sdk-open-api.md#getstorageinforesult)。
555
+ ***
427
556
 
428
- #### Example
557
+ ### getConnectedWifi()
429
558
 
430
- ```typescript
431
- import { getStorageInfo } from '@doubao-apps/framework/api';
559
+ > **getConnectedWifi**(`params`?): `Promise`\<[`GetConnectedWifiResult`](doubao-apps-sdk-open-api.md#getconnectedwifiresult)\>
432
560
 
433
- const result = await getStorageInfo();
561
+ 获取当前已连接 Wi-Fi 信息。
434
562
 
435
- console.log(result.keys, result.currentSize, result.limitSize);
436
- ```
563
+ #### Parameters
564
+
565
+ • **params?**: [`GetConnectedWifiParams`](doubao-apps-sdk-open-api.md#getconnectedwifiparams)
566
+
567
+ #### Returns
568
+
569
+ `Promise`\<[`GetConnectedWifiResult`](doubao-apps-sdk-open-api.md#getconnectedwifiresult)\>
437
570
 
438
571
  ***
439
572
 
440
- ### getStorageInfoSync()
573
+ ### getHCEState()
441
574
 
442
- > **getStorageInfoSync**(`params`?): [`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)
575
+ > **getHCEState**(`params`?): `Promise`\<`object`\>
443
576
 
444
- 同步获取本地缓存信息。
577
+ 获取 HCE 状态。
445
578
 
446
579
  #### Parameters
447
580
 
448
- • **params?**
581
+ • **params?**: `Record`\<`string`, `never`\>
449
582
 
450
583
  #### Returns
451
584
 
452
- [`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)
585
+ `Promise`\<`object`\>
453
586
 
454
- 返回 [GetStorageInfoResult](doubao-apps-sdk-open-api.md#getstorageinforesult)。
587
+ ***
455
588
 
456
- #### Example
589
+ ### getLocalIPAddress()
457
590
 
458
- ```typescript
459
- import { getStorageInfoSync } from '@doubao-apps/framework/api';
591
+ > **getLocalIPAddress**(`params`?): `Promise`\<[`GetLocalIPAddressResult`](doubao-apps-sdk-open-api.md#getlocalipaddressresult)\>
460
592
 
461
- const result = getStorageInfoSync();
593
+ 获取局域网 IP 地址。
462
594
 
463
- console.log(result.keys, result.currentSize, result.limitSize);
464
- ```
595
+ #### Parameters
465
596
 
466
- ***
597
+ • **params?**: `Record`\<`string`, `never`\>
467
598
 
468
- ### getStorageSync()
599
+ #### Returns
469
600
 
470
- > **getStorageSync**\<`TData`\>(`params`): [`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>
601
+ `Promise`\<[`GetLocalIPAddressResult`](doubao-apps-sdk-open-api.md#getlocalipaddressresult)\>
471
602
 
472
- 从本地缓存同步读取数据。
603
+ ***
473
604
 
474
- #### Type parameters
605
+ ### getLocation()
475
606
 
476
- **TData** = `unknown`
607
+ > **getLocation**(`params`?): `Promise`\<[`GetLocationResponse`](doubao-apps-sdk-open-api.md#getlocationresponse)\>
477
608
 
478
- #### Parameters
609
+ 获取设备当前的地理位置信息。
479
610
 
480
- **params**: [`GetStorageParams`](doubao-apps-sdk-open-api.md#getstorageparams)
611
+ #### Parameters
481
612
 
482
- 查询参数,字段见 [GetStorageParams](doubao-apps-sdk-open-api.md#getstorageparams)
613
+ **params?**: [`GetLocationParams`](doubao-apps-sdk-open-api.md#getlocationparams)
483
614
 
484
615
  #### Returns
485
616
 
486
- [`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>
617
+ `Promise`\<[`GetLocationResponse`](doubao-apps-sdk-open-api.md#getlocationresponse)\>
487
618
 
488
- 返回 [GetStorageResult](doubao-apps-sdk-open-api.md#getstorageresulttdata)。
619
+ 返回一个 Promise,成功时解析为包含地理位置信息的对象,包含:
620
+ - `latitude`: number - 纬度。
621
+ - `longitude`: number - 经度。
622
+ - `timestamp`: string - 时间戳。
623
+ - `speed`: number - 行进速度,单位:米/秒。
624
+ - `accuracy`: number - 定位精度,单位:米。
625
+ 参考 [GetLocationResponse](doubao-apps-sdk-open-api.md#getlocationresponse)。
626
+
627
+ #### Throws
628
+
629
+ 如果调用失败(例如,用户拒绝权限、定位服务关闭等),则抛出此错误。
489
630
 
490
631
  #### Example
491
632
 
492
633
  ```typescript
493
- import { getStorageSync } from '@doubao-apps/framework/api';
634
+ import { getLocation } from '@doubao-apps/framework';
494
635
 
495
- const result = getStorageSync<{ name: string; age: number }>({
496
- key: 'profile',
497
- });
636
+ async function fetchLocation() {
637
+ try {
638
+ const locationData = await getLocation();
639
+ console.log('纬度:', locationData.latitude);
640
+ console.log('经度:', locationData.longitude);
641
+ console.log('时间戳:', locationData.timestamp);
642
+ console.log('行进速度:', locationData.speed);
643
+ console.log('定位精度:', locationData.accuracy);
644
+ } catch (error) {
645
+ console.error('获取位置失败:', error);
646
+ // 处理错误,例如提示用户开启定位权限
647
+ }
648
+ }
498
649
 
499
- console.log(result.data.name, result.data.age);
650
+ fetchLocation();
500
651
  ```
501
652
 
502
653
  ***
503
654
 
504
- ### getWindowInfo()
655
+ ### getNetworkType()
505
656
 
506
- > **getWindowInfo**(`params`?): `Promise`\<[`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)\>
657
+ > **getNetworkType**(`params`?): `Promise`\<[`GetNetworkTypeResult`](doubao-apps-sdk-open-api.md#getnetworktyperesult)\>
507
658
 
508
- 获取窗口信息。
659
+ 获取当前网络类型。
509
660
 
510
661
  #### Parameters
511
662
 
512
- • **params?**
663
+ • **params?**: [`GetNetworkTypeParams`](doubao-apps-sdk-open-api.md#getnetworktypeparams)
513
664
 
514
665
  #### Returns
515
666
 
516
- `Promise`\<[`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)\>
667
+ `Promise`\<[`GetNetworkTypeResult`](doubao-apps-sdk-open-api.md#getnetworktyperesult)\>
517
668
 
518
- 返回窗口尺寸、状态栏高度和安全区域等信息,字段见 [GetWindowInfoResult](doubao-apps-sdk-open-api.md#getwindowinforesult)。
669
+ 返回一个 Promise,解析为 [GetNetworkTypeResult](doubao-apps-sdk-open-api.md#getnetworktyperesult)。
519
670
 
520
671
  #### Example
521
672
 
522
- ```typescript
523
- import { getWindowInfo } from '@doubao-apps/framework/api';
524
-
525
- const result = await getWindowInfo();
673
+ ```ts
674
+ import { getNetworkType } from '@doubao-apps/framework/api';
526
675
 
527
- console.log(result.windowWidth, result.windowHeight);
528
- console.log(result.safeArea?.top, result.screenTop);
676
+ const result = await getNetworkType();
677
+ console.log(result.networkType);
529
678
  ```
530
679
 
531
680
  ***
532
681
 
533
- ### getWindowInfoSync()
682
+ ### getOrderPayment()
534
683
 
535
- > **getWindowInfoSync**(`params`?): [`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)
684
+ > **getOrderPayment**(`params`): `Promise`\<[`GetOrderPaymentResult`](doubao-apps-sdk-open-api.md#getorderpaymentresult)\>
536
685
 
537
- 获取窗口信息。
686
+ #### Parameters
687
+
688
+ • **params**: [`GetOrderPaymentParams`](doubao-apps-sdk-open-api.md#getorderpaymentparams)
689
+
690
+ #### Returns
691
+
692
+ `Promise`\<[`GetOrderPaymentResult`](doubao-apps-sdk-open-api.md#getorderpaymentresult)\>
693
+
694
+ ***
695
+
696
+ ### getPrivacySetting()
697
+
698
+ > **getPrivacySetting**(`params`?): `Promise`\<[`PrivacySettingResult`](doubao-apps-sdk-open-api.md#privacysettingresult)\>
699
+
700
+ Get privacy setting information
538
701
 
539
702
  #### Parameters
540
703
 
@@ -542,373 +705,343 @@ console.log(result.safeArea?.top, result.screenTop);
542
705
 
543
706
  #### Returns
544
707
 
545
- [`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)
708
+ `Promise`\<[`PrivacySettingResult`](doubao-apps-sdk-open-api.md#privacysettingresult)\>
546
709
 
547
- 返回窗口尺寸、状态栏高度和安全区域等信息,字段见 [GetWindowInfoResult](doubao-apps-sdk-open-api.md#getwindowinforesult)。
710
+ Returns a Promise containing privacy setting information
548
711
 
549
- #### Example
712
+ ***
550
713
 
551
- ```typescript
552
- import { getWindowInfoSync } from '@doubao-apps/framework/api';
714
+ ### getRandomValues()
553
715
 
554
- const result = getWindowInfoSync();
716
+ > **getRandomValues**(`params`): `Promise`\<[`GetRandomValuesResult`](doubao-apps-sdk-open-api.md#getrandomvaluesresult)\>
555
717
 
556
- console.log(result.windowWidth, result.windowHeight);
557
- console.log(result.safeArea?.top, result.screenTop);
558
- ```
718
+ 获取安全随机数。
719
+
720
+ #### Parameters
721
+
722
+ • **params**: [`GetRandomValuesParams`](doubao-apps-sdk-open-api.md#getrandomvaluesparams)
723
+
724
+ #### Returns
725
+
726
+ `Promise`\<[`GetRandomValuesResult`](doubao-apps-sdk-open-api.md#getrandomvaluesresult)\>
559
727
 
560
728
  ***
561
729
 
562
- ### login()
730
+ ### getScreenBrightness()
563
731
 
564
- > **login**(`params`?): `Promise`\<[`LoginResult`](doubao-apps-sdk-open-api.md#loginresult)\>
732
+ > **getScreenBrightness**(`params`?): `Promise`\<[`GetScreenBrightnessResult`](doubao-apps-sdk-open-api.md#getscreenbrightnessresult)\>
565
733
 
566
- Initiate login
734
+ 获取屏幕亮度。
567
735
 
568
736
  #### Parameters
569
737
 
570
- • **params?**: [`LoginRequest`](doubao-apps-sdk-open-api.md#loginrequest)
571
-
572
- Login parameters
738
+ • **params?**
573
739
 
574
740
  #### Returns
575
741
 
576
- `Promise`\<[`LoginResult`](doubao-apps-sdk-open-api.md#loginresult)\>
577
-
578
- Returns a Promise containing the login credential code
742
+ `Promise`\<[`GetScreenBrightnessResult`](doubao-apps-sdk-open-api.md#getscreenbrightnessresult)\>
579
743
 
580
744
  ***
581
745
 
582
- ### loginWithDoubaoWidget()
746
+ ### getSelectedTextRange()
583
747
 
584
- > **loginWithDoubaoWidget**(`params`): `Promise`\<[`LoginWithWidgetResult`](doubao-apps-sdk-open-api.md#loginwithwidgetresult)\>
748
+ > **getSelectedTextRange**(`params`?): `Promise`\<[`GetSelectedTextRangeResult`](doubao-apps-sdk-open-api.md#getselectedtextrangeresult)\>
585
749
 
586
- Initiate login
750
+ 获取当前输入框的选区范围。
587
751
 
588
752
  #### Parameters
589
753
 
590
- • **params**: [`LoginWithWidgetRequest`](doubao-apps-sdk-open-api.md#loginwithwidgetrequest)
591
-
592
- Login parameters
754
+ • **params?**: `Record`\<`string`, `never`\>
593
755
 
594
756
  #### Returns
595
757
 
596
- `Promise`\<[`LoginWithWidgetResult`](doubao-apps-sdk-open-api.md#loginwithwidgetresult)\>
597
-
598
- Returns a Promise containing the login credential code
758
+ `Promise`\<[`GetSelectedTextRangeResult`](doubao-apps-sdk-open-api.md#getselectedtextrangeresult)\>
599
759
 
600
760
  ***
601
761
 
602
- ### makePhoneCall()
762
+ ### getStorage()
603
763
 
604
- > **makePhoneCall**(`params`): `Promise`\<`object`\>
764
+ > **getStorage**\<`TData`\>(`params`): `Promise`\<[`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>\>
605
765
 
606
- 拨打电话。
766
+ 从本地缓存读取数据。
767
+
768
+ #### Type parameters
607
769
 
608
- 入参与宿主应用的拨打电话能力对齐。
770
+ • **TData** = `unknown`
609
771
 
610
772
  #### Parameters
611
773
 
612
- • **params**: [`MakePhoneCallParams`](doubao-apps-sdk-open-api.md#makephonecallparams)
774
+ • **params**: [`GetStorageParams`](doubao-apps-sdk-open-api.md#getstorageparams)
775
+
776
+ 查询参数,字段见 [GetStorageParams](doubao-apps-sdk-open-api.md#getstorageparams)。
613
777
 
614
778
  #### Returns
615
779
 
616
- `Promise`\<`object`\>
780
+ `Promise`\<[`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>\>
617
781
 
618
- 返回一个 Promise,在唤起拨号页面成功发起时解析。
782
+ 返回一个 Promise,解析为 [GetStorageResult](doubao-apps-sdk-open-api.md#getstorageresulttdata)。
619
783
 
620
784
  #### Example
621
785
 
622
786
  ```typescript
623
- import { makePhoneCall } from '@doubao-apps/framework/api';
787
+ import { getStorage } from '@doubao-apps/framework/api';
624
788
 
625
- await makePhoneCall({ phoneNumber: '10086' });
789
+ const result = await getStorage<{ name: string; age: number }>({
790
+ key: 'profile',
791
+ });
792
+
793
+ console.log(result.data.name, result.data.age);
626
794
  ```
627
795
 
628
796
  ***
629
797
 
630
- ### navigateBack()
798
+ ### getStorageInfo()
631
799
 
632
- > **navigateBack**(`params`?): `Promise`\<`object`\>
800
+ > **getStorageInfo**(`params`?): `Promise`\<[`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)\>
633
801
 
634
- 关闭当前页面,返回上一页面或多级页面。
802
+ 获取本地缓存信息。
635
803
 
636
804
  #### Parameters
637
805
 
638
- • **params?**: [`NavigateBackParams`](doubao-apps-sdk-open-api.md#navigatebackparams)
806
+ • **params?**
639
807
 
640
808
  #### Returns
641
809
 
642
- `Promise`\<`object`\>
643
-
644
- ***
645
-
646
- ### navigateTo()
647
-
648
- > **navigateTo**(`params`): `Promise`\<`object`\>
810
+ `Promise`\<[`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)\>
649
811
 
650
- 保留当前页面,跳转到应用内的某个页面。
812
+ 返回一个 Promise,解析为 [GetStorageInfoResult](doubao-apps-sdk-open-api.md#getstorageinforesult)。
651
813
 
652
- #### Parameters
814
+ #### Example
653
815
 
654
- • **params**: [`NavigateToParams`](doubao-apps-sdk-open-api.md#navigatetoparams)
816
+ ```typescript
817
+ import { getStorageInfo } from '@doubao-apps/framework/api';
655
818
 
656
- #### Returns
819
+ const result = await getStorageInfo();
657
820
 
658
- `Promise`\<`object`\>
821
+ console.log(result.keys, result.currentSize, result.limitSize);
822
+ ```
659
823
 
660
824
  ***
661
825
 
662
- ### onKeyboardHeightChange()
826
+ ### getStorageInfoSync()
663
827
 
664
- > **onKeyboardHeightChange**(`handler`): () => `void`
828
+ > **getStorageInfoSync**(`params`?): [`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)
665
829
 
666
- 监听键盘高度变化事件。
830
+ 同步获取本地缓存信息。
667
831
 
668
832
  #### Parameters
669
833
 
670
- • **handler**
834
+ • **params?**
671
835
 
672
836
  #### Returns
673
837
 
674
- `Function`
675
-
676
- ##### Returns
838
+ [`GetStorageInfoResult`](doubao-apps-sdk-open-api.md#getstorageinforesult)
677
839
 
678
- `void`
840
+ 返回 [GetStorageInfoResult](doubao-apps-sdk-open-api.md#getstorageinforesult)。
679
841
 
680
842
  #### Example
681
843
 
682
844
  ```typescript
683
- import { onKeyboardHeightChange } from '@doubao-apps/framework/api';
845
+ import { getStorageInfoSync } from '@doubao-apps/framework/api';
684
846
 
685
- const unsubscribe = onKeyboardHeightChange(({ height }) => {
686
- console.log('Keyboard height change event:', { height });
687
- });
847
+ const result = getStorageInfoSync();
848
+
849
+ console.log(result.keys, result.currentSize, result.limitSize);
688
850
  ```
689
851
 
690
852
  ***
691
853
 
692
- ### openApp()
854
+ ### getStorageSync()
693
855
 
694
- > **openApp**(`params`): `Promise`\<[`OpenAppResult`](doubao-apps-sdk-open-api.md#openappresult)\>
856
+ > **getStorageSync**\<`TData`\>(`params`): [`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>
695
857
 
696
- Open an external application using a deep link with fallbacks.
858
+ 从本地缓存同步读取数据。
697
859
 
698
- Params (see OpenAppRequest):
699
- - uri: required deep link URI to open.
700
- - targetPackage?: preferred Android package name.
701
- - fallbackUrl?: URL to open via market or browser when deep link fails.
860
+ #### Type parameters
702
861
 
703
- Returns a Promise that resolves with an execution status and optional message.
862
+ **TData** = `unknown`
704
863
 
705
864
  #### Parameters
706
865
 
707
- • **params**: [`OpenAppRequest`](doubao-apps-sdk-open-api.md#openapprequest)
708
-
709
- #### Returns
710
-
711
- `Promise`\<[`OpenAppResult`](doubao-apps-sdk-open-api.md#openappresult)\>
712
-
713
- ***
714
-
715
- ### postLoginResult()
866
+ • **params**: [`GetStorageParams`](doubao-apps-sdk-open-api.md#getstorageparams)
716
867
 
717
- > **postLoginResult**(`params`): `Promise`\<`object`\>
868
+ 查询参数,字段见 [GetStorageParams](doubao-apps-sdk-open-api.md#getstorageparams)
718
869
 
719
- Report MCP authorization login credential
870
+ #### Returns
720
871
 
721
- #### Parameters
872
+ [`GetStorageResult`](doubao-apps-sdk-open-api.md#getstorageresulttdata)\<`TData`\>
722
873
 
723
- **params**: [`PostLoginResultRequest`](doubao-apps-sdk-open-api.md#postloginresultrequest)
874
+ 返回 [GetStorageResult](doubao-apps-sdk-open-api.md#getstorageresulttdata)
724
875
 
725
- Post login result parameters
876
+ #### Example
726
877
 
727
- #### Returns
878
+ ```typescript
879
+ import { getStorageSync } from '@doubao-apps/framework/api';
728
880
 
729
- `Promise`\<`object`\>
881
+ const result = getStorageSync<{ name: string; age: number }>({
882
+ key: 'profile',
883
+ });
730
884
 
731
- Returns a Promise that resolves when the report is successful
885
+ console.log(result.data.name, result.data.age);
886
+ ```
732
887
 
733
888
  ***
734
889
 
735
- ### reLaunch()
890
+ ### getWifiList()
736
891
 
737
- > **reLaunch**(`params`): `Promise`\<`object`\>
892
+ > **getWifiList**(`params`?): `Promise`\<[`GetWifiListResult`](doubao-apps-sdk-open-api.md#getwifilistresult)\>
893
+
894
+ 获取 Wi-Fi 列表。
738
895
 
739
896
  #### Parameters
740
897
 
741
- • **params**: [`NavigateToParams`](doubao-apps-sdk-open-api.md#navigatetoparams)
898
+ • **params?**: `Record`\<`string`, `never`\>
742
899
 
743
900
  #### Returns
744
901
 
745
- `Promise`\<`object`\>
902
+ `Promise`\<[`GetWifiListResult`](doubao-apps-sdk-open-api.md#getwifilistresult)\>
746
903
 
747
904
  ***
748
905
 
749
- ### redirectTo()
906
+ ### getWindowInfo()
750
907
 
751
- > **redirectTo**(`params`): `Promise`\<`object`\>
908
+ > **getWindowInfo**(`_params`?): `Promise`\<[`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)\>
752
909
 
753
- 关闭当前页面,跳转到应用内的某个页面。
910
+ 获取窗口信息。
754
911
 
755
912
  #### Parameters
756
913
 
757
- **params**: [`NavigateToParams`](doubao-apps-sdk-open-api.md#navigatetoparams)
914
+ **\_params?**
758
915
 
759
916
  #### Returns
760
917
 
761
- `Promise`\<`object`\>
918
+ `Promise`\<[`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)\>
762
919
 
763
- ***
764
-
765
- ### removeStorage()
766
-
767
- > **removeStorage**(`params`): `Promise`\<`object`\>
768
-
769
- 删除本地缓存中指定 key 的数据。
770
-
771
- #### Parameters
772
-
773
- • **params**: [`RemoveStorageParams`](doubao-apps-sdk-open-api.md#removestorageparams)
774
-
775
- 删除参数,字段见 [RemoveStorageParams](doubao-apps-sdk-open-api.md#removestorageparams)。
776
-
777
- #### Returns
778
-
779
- `Promise`\<`object`\>
780
-
781
- 返回一个 Promise,删除完成后 resolve。
920
+ 返回窗口尺寸、状态栏高度和安全区域等信息,字段见 [GetWindowInfoResult](doubao-apps-sdk-open-api.md#getwindowinforesult)。
782
921
 
783
922
  #### Example
784
923
 
785
924
  ```typescript
786
- import { removeStorage } from '@doubao-apps/framework/api';
925
+ import { getWindowInfo } from '@doubao-apps/framework/api';
787
926
 
788
- await removeStorage({ key: 'profile' });
927
+ const result = await getWindowInfo();
928
+
929
+ console.log(result.windowWidth, result.windowHeight);
930
+ console.log(result.safeArea?.top, result.screenTop);
789
931
  ```
790
932
 
791
933
  ***
792
934
 
793
- ### removeStorageSync()
935
+ ### getWindowInfoSync()
794
936
 
795
- > **removeStorageSync**(`params`?): `object`
937
+ > **getWindowInfoSync**(`_param`?): [`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)
796
938
 
797
- 删除本地缓存中指定 key 的数据。
939
+ 获取窗口信息。
798
940
 
799
941
  #### Parameters
800
942
 
801
- **params?**: [`RemoveStorageParams`](doubao-apps-sdk-open-api.md#removestorageparams)
802
-
803
- 删除参数,字段见 [RemoveStorageParams](doubao-apps-sdk-open-api.md#removestorageparams)。
943
+ **\_param?**
804
944
 
805
945
  #### Returns
806
946
 
807
- `object`
947
+ [`GetWindowInfoResult`](doubao-apps-sdk-open-api.md#getwindowinforesult)
808
948
 
809
- 同步删除完成后返回。
949
+ 返回窗口尺寸、状态栏高度和安全区域等信息,字段见 [GetWindowInfoResult](doubao-apps-sdk-open-api.md#getwindowinforesult)。
810
950
 
811
951
  #### Example
812
952
 
813
953
  ```typescript
814
- import { removeStorageSync } from '@doubao-apps/framework/api';
954
+ import { getWindowInfoSync } from '@doubao-apps/framework/api';
815
955
 
816
- removeStorageSync({ key: 'profile' });
956
+ const result = getWindowInfoSync();
957
+
958
+ console.log(result.windowWidth, result.windowHeight);
959
+ console.log(result.safeArea?.top, result.screenTop);
817
960
  ```
818
961
 
819
962
  ***
820
963
 
821
- ### request()
964
+ ### hideKeyboard()
822
965
 
823
- > **request**(`params`): `Promise`\<[`RequestResponse`](doubao-apps-sdk-open-api.md#requestresponse)\>
966
+ > **hideKeyboard**(`params`?): `Promise`\<`object`\>
824
967
 
825
- 发起网络请求。
968
+ 收起键盘。
826
969
 
827
970
  #### Parameters
828
971
 
829
- • **params**: [`RequestParams`](doubao-apps-sdk-open-api.md#requestparams)
830
-
831
- 请求参数,字段见 [RequestParams](doubao-apps-sdk-open-api.md#requestparams)。
972
+ • **params?**: `Record`\<`string`, `never`\>
832
973
 
833
974
  #### Returns
834
975
 
835
- `Promise`\<[`RequestResponse`](doubao-apps-sdk-open-api.md#requestresponse)\>
976
+ `Promise`\<`object`\>
836
977
 
837
- 返回一个 Promise,解析为 [RequestResponse](doubao-apps-sdk-open-api.md#requestresponse)。
978
+ ***
838
979
 
839
- #### Example
980
+ ### isBluetoothDevicePaired()
840
981
 
841
- ```typescript
842
- import { request } from '@doubao-apps/framework/api';
982
+ > **isBluetoothDevicePaired**(`params`): `Promise`\<`object`\>
843
983
 
844
- const result = await request({
845
- url: 'https://postman-echo.com/post',
846
- method: 'POST',
847
- dataType: 'json',
848
- header: { 'content-type': 'application/json' },
849
- data: { hello: 'world' }
850
- });
984
+ 查询蓝牙设备是否已经配对。
851
985
 
852
- console.log(result.statusCode, result.data);
853
- ```
986
+ #### Parameters
987
+
988
+ • **params**: [`IsBluetoothDevicePairedParams`](doubao-apps-sdk-open-api.md#isbluetoothdevicepairedparams)
989
+
990
+ #### Returns
991
+
992
+ `Promise`\<`object`\>
854
993
 
855
994
  ***
856
995
 
857
- ### requestOrder()
996
+ ### login()
858
997
 
859
- > **requestOrder**(`params`): `Promise`\<[`RequestOrderResult`](doubao-apps-sdk-open-api.md#requestorderresult)\>
998
+ > **login**(`params`?): `Promise`\<[`LoginResult`](doubao-apps-sdk-open-api.md#loginresult)\>
999
+
1000
+ Initiate login
860
1001
 
861
1002
  #### Parameters
862
1003
 
863
- • **params**: [`RequestOrderParams`](doubao-apps-sdk-open-api.md#requestorderparams)
1004
+ • **params?**: [`LoginRequest`](doubao-apps-sdk-open-api.md#loginrequest)
1005
+
1006
+ Login parameters
864
1007
 
865
1008
  #### Returns
866
1009
 
867
- `Promise`\<[`RequestOrderResult`](doubao-apps-sdk-open-api.md#requestorderresult)\>
1010
+ `Promise`\<[`LoginResult`](doubao-apps-sdk-open-api.md#loginresult)\>
868
1011
 
869
- ***
1012
+ Returns a Promise containing the login credential code
870
1013
 
871
- ### sendQueryMessage()
1014
+ ***
872
1015
 
873
- > **sendQueryMessage**(`params`): `void`
1016
+ ### loginWithDoubaoWidget()
874
1017
 
875
- 以用户身份发送一条消息
1018
+ > **loginWithDoubaoWidget**(`params`): `Promise`\<[`LoginWithWidgetResult`](doubao-apps-sdk-open-api.md#loginwithwidgetresult)\>
876
1019
 
877
- 由于会自动获取页面上下文来确定向哪个 bot 发送消息,因此只能在卡片或页面中调用
1020
+ Initiate login
878
1021
 
879
1022
  #### Parameters
880
1023
 
881
- • **params**: [`SendQueryMessageParams`](doubao-apps-sdk-open-api.md#sendquerymessageparams)
1024
+ • **params**: [`LoginWithWidgetRequest`](doubao-apps-sdk-open-api.md#loginwithwidgetrequest)
882
1025
 
883
- #### Returns
1026
+ Login parameters
884
1027
 
885
- `void`
1028
+ #### Returns
886
1029
 
887
- #### Example
1030
+ `Promise`\<[`LoginWithWidgetResult`](doubao-apps-sdk-open-api.md#loginwithwidgetresult)\>
888
1031
 
889
- ```ts
890
- await sendQueryMessage({ content: '订阅消息', type: 'text' })
891
- ```
1032
+ Returns a Promise containing the login credential code
892
1033
 
893
1034
  ***
894
1035
 
895
- ### setAdditionalContext()
1036
+ ### makeBluetoothPair()
896
1037
 
897
- > **setAdditionalContext**(`params`): `Promise`\<`object`\>
1038
+ > **makeBluetoothPair**(`params`): `Promise`\<`object`\>
898
1039
 
899
- 设置全局上下文供大模型理解
1040
+ 发起蓝牙配对。
900
1041
 
901
1042
  #### Parameters
902
1043
 
903
- • **params**
904
-
905
- • **params.additionalContext**: `string`
906
-
907
- 上下文内容
908
-
909
- • **params.botId?**: `string`
910
-
911
- 指定 bot id
1044
+ • **params**: [`MakeBluetoothPairParams`](doubao-apps-sdk-open-api.md#makebluetoothpairparams)
912
1045
 
913
1046
  #### Returns
914
1047
 
@@ -916,464 +1049,2678 @@ await sendQueryMessage({ content: '订阅消息', type: 'text' })
916
1049
 
917
1050
  ***
918
1051
 
919
- ### setClipboardData()
1052
+ ### makePhoneCall()
920
1053
 
921
- > **setClipboardData**(`params`): `Promise`\<`object`\>
1054
+ > **makePhoneCall**(`params`): `Promise`\<`object`\>
922
1055
 
923
- 设置系统剪贴板内容。
1056
+ 拨打电话。
924
1057
 
925
1058
  #### Parameters
926
1059
 
927
- • **params**: [`SetClipboardDataParams`](doubao-apps-sdk-open-api.md#setclipboarddataparams)
1060
+ • **params**: [`MakePhoneCallParams`](doubao-apps-sdk-open-api.md#makephonecallparams)
928
1061
 
929
1062
  #### Returns
930
1063
 
931
1064
  `Promise`\<`object`\>
932
1065
 
933
- 返回一个 Promise,在剪贴板内容设置成功时解析。
1066
+ ***
1067
+
1068
+ ### navigateBack()
934
1069
 
935
- #### Example
1070
+ > **navigateBack**(`params`?): `Promise`\<`object`\>
936
1071
 
937
- ```typescript
938
- import { setClipboardData } from '@doubao-apps/framework/api';
1072
+ 关闭当前页面,返回上一页面或多级页面。
939
1073
 
940
- await setClipboardData({ data: 'hello' });
941
- ```
1074
+ #### Parameters
942
1075
 
943
- ***
1076
+ • **params?**: [`NavigateBackParams`](doubao-apps-sdk-open-api.md#navigatebackparams)
944
1077
 
945
- ### setStorage()
1078
+ #### Returns
946
1079
 
947
- > **setStorage**\<`TData`\>(`params`): `Promise`\<`object`\>
1080
+ `Promise`\<`object`\>
948
1081
 
949
- 将数据写入本地缓存。
1082
+ ***
950
1083
 
951
- #### Type parameters
1084
+ ### navigateTo()
952
1085
 
953
- **TData** = `unknown`
1086
+ > **navigateTo**(`params`): `Promise`\<`object`\>
954
1087
 
955
- #### Parameters
1088
+ 保留当前页面,跳转到应用内的某个页面。
956
1089
 
957
- **params**: [`SetStorageParams`](doubao-apps-sdk-open-api.md#setstorageparamstdata)\<`TData`\>
1090
+ #### Parameters
958
1091
 
959
- 存储参数,字段见 [SetStorageParams](doubao-apps-sdk-open-api.md#setstorageparamstdata)
1092
+ **params**: [`NavigateToParams`](doubao-apps-sdk-open-api.md#navigatetoparams)
960
1093
 
961
1094
  #### Returns
962
1095
 
963
1096
  `Promise`\<`object`\>
964
1097
 
965
- 返回一个 Promise,写入完成后 resolve。
1098
+ ***
966
1099
 
967
- #### Example
1100
+ ### notifyBLECharacteristicValueChange()
968
1101
 
969
- ```typescript
970
- import { setStorage } from '@doubao-apps/framework/api';
1102
+ > **notifyBLECharacteristicValueChange**(`params`): `Promise`\<`object`\>
971
1103
 
972
- await setStorage({
973
- key: 'profile',
974
- data: { name: 'Tom', age: 18 },
975
- });
976
- ```
1104
+ 订阅 BLE 特征值变化。
977
1105
 
978
- ***
1106
+ #### Parameters
979
1107
 
980
- ### setStorageSync()
1108
+ **params**: [`NotifyBLECharacteristicValueChangeParams`](doubao-apps-sdk-open-api.md#notifyblecharacteristicvaluechangeparams)
981
1109
 
982
- > **setStorageSync**\<`TData`\>(`params`): `object`
1110
+ #### Returns
983
1111
 
984
- 将数据写入本地缓存。
1112
+ `Promise`\<`object`\>
985
1113
 
986
- #### Type parameters
1114
+ ***
987
1115
 
988
- **TData** = `unknown`
1116
+ ### onKeyboardHeightChange()
989
1117
 
990
- #### Parameters
1118
+ > **onKeyboardHeightChange**(`handler`): () => `void`
991
1119
 
992
- • **params**: [`SetStorageParams`](doubao-apps-sdk-open-api.md#setstorageparamstdata)\<`TData`\>
1120
+ 监听键盘高度变化事件。
993
1121
 
994
- 存储参数,字段见 [SetStorageParams](doubao-apps-sdk-open-api.md#setstorageparamstdata)。
1122
+ #### Parameters
1123
+
1124
+ • **handler**
995
1125
 
996
1126
  #### Returns
997
1127
 
998
- `object`
1128
+ `Function`
999
1129
 
1000
- 同步写入完成后返回。
1130
+ ##### Returns
1131
+
1132
+ `void`
1001
1133
 
1002
1134
  #### Example
1003
1135
 
1004
1136
  ```typescript
1005
- import { setStorageSync } from '@doubao-apps/framework/api';
1137
+ import { onKeyboardHeightChange } from '@doubao-apps/framework/api';
1006
1138
 
1007
- setStorageSync({
1008
- key: 'profile',
1009
- data: { name: 'Tom', age: 18 },
1139
+ const unsubscribe = onKeyboardHeightChange(({ height }) => {
1140
+ console.log('Keyboard height change event:', { height });
1010
1141
  });
1011
1142
  ```
1012
1143
 
1013
1144
  ***
1014
1145
 
1015
- ### showToast()
1146
+ ### openApp()
1016
1147
 
1017
- > **showToast**(`params`): `Promise`\<`object`\>
1148
+ > **openApp**(`params`): `Promise`\<[`OpenAppResult`](doubao-apps-sdk-open-api.md#openappresult)\>
1018
1149
 
1019
- 显示 Toast 提示。
1150
+ Open an external application using a deep link with fallbacks.
1020
1151
 
1021
- 参数 `options` 包含以下字段:
1022
- - `message`: 提示的内容。
1023
- - `type`: Toast 的类型,可选值为 'success' 或 'error'。
1024
- - `duration`: 提示的延迟时间,单位毫秒,默认为 2000。
1025
- - `icon`: 图标,可选值为 'success', 'error', 'warn'。
1026
- - `customIcon`: 自定义图标的 URL base64 字符串。
1152
+ Params (see OpenAppRequest):
1153
+ - uri: required deep link URI to open.
1154
+ - targetPackage?: preferred Android package name.
1155
+ - fallbackUrl?: URL to open via market or browser when deep link fails.
1156
+
1157
+ Returns a Promise that resolves with an execution status and optional message.
1027
1158
 
1028
1159
  #### Parameters
1029
1160
 
1030
- • **params**: [`ShowToastParams`](doubao-apps-sdk-open-api.md#showtoastparams)
1161
+ • **params**: [`OpenAppRequest`](doubao-apps-sdk-open-api.md#openapprequest)
1031
1162
 
1032
1163
  #### Returns
1033
1164
 
1034
- `Promise`\<`object`\>
1165
+ `Promise`\<[`OpenAppResult`](doubao-apps-sdk-open-api.md#openappresult)\>
1035
1166
 
1036
- 返回一个 Promise,在 Toast 显示结束时 resolve。
1167
+ ***
1037
1168
 
1038
- #### Example
1169
+ ### openBluetoothAdapter()
1039
1170
 
1040
- ```typescript
1041
- import { showToast } from '@doubao-apps/framework';
1171
+ > **openBluetoothAdapter**(`params`?): `Promise`\<`object`\>
1042
1172
 
1043
- // 显示一个成功的 Toast
1044
- showToast({
1045
- message: '操作成功',
1046
- type: 'success',
1047
- icon: 'success',
1048
- duration: 1500
1049
- }).then(() => {
1050
- console.log('Toast 显示完毕');
1051
- });
1173
+ 打开蓝牙适配器。
1052
1174
 
1053
- // 显示一个错误的 Toast
1054
- showToast({
1055
- message: '网络错误',
1056
- type: 'error',
1057
- icon: 'error'
1058
- });
1059
- ```
1175
+ #### Parameters
1176
+
1177
+ **params?**: [`OpenBluetoothAdapterParams`](doubao-apps-sdk-open-api.md#openbluetoothadapterparams)
1178
+
1179
+ #### Returns
1180
+
1181
+ `Promise`\<`object`\>
1060
1182
 
1061
1183
  ***
1062
1184
 
1063
- ### updateModelContext()
1185
+ ### postLoginResult()
1064
1186
 
1065
- > **updateModelContext**(`params`?): `Promise`\<`object`\>
1187
+ > **postLoginResult**(`params`): `Promise`\<`object`\>
1066
1188
 
1067
- 前端数据捐献接口:上报当前业务状态/关键信息(blocks)。
1189
+ Report MCP authorization login credential
1068
1190
 
1069
1191
  #### Parameters
1070
1192
 
1071
- • **params?**: [`UpdateModelContextOptions`](doubao-apps-sdk-open-api.md#updatemodelcontextoptions)
1193
+ • **params**: [`PostLoginResultRequest`](doubao-apps-sdk-open-api.md#postloginresultrequest)
1194
+
1195
+ Post login result parameters
1072
1196
 
1073
1197
  #### Returns
1074
1198
 
1075
1199
  `Promise`\<`object`\>
1076
1200
 
1077
- ## Interfaces
1201
+ Returns a Promise that resolves when the report is successful
1202
+
1203
+ ***
1204
+
1205
+ ### reLaunch()
1206
+
1207
+ > **reLaunch**(`params`): `Promise`\<`object`\>
1208
+
1209
+ #### Parameters
1210
+
1211
+ • **params**: [`NavigateToParams`](doubao-apps-sdk-open-api.md#navigatetoparams)
1212
+
1213
+ #### Returns
1214
+
1215
+ `Promise`\<`object`\>
1216
+
1217
+ ***
1218
+
1219
+ ### readBLECharacteristicValue()
1220
+
1221
+ > **readBLECharacteristicValue**(`params`): `Promise`\<`object`\>
1222
+
1223
+ 读取 BLE 特征值。
1224
+
1225
+ #### Parameters
1226
+
1227
+ • **params**: [`ReadBLECharacteristicValueParams`](doubao-apps-sdk-open-api.md#readblecharacteristicvalueparams)
1228
+
1229
+ #### Returns
1230
+
1231
+ `Promise`\<`object`\>
1232
+
1233
+ ***
1234
+
1235
+ ### redirectTo()
1236
+
1237
+ > **redirectTo**(`params`): `Promise`\<`object`\>
1238
+
1239
+ 关闭当前页面,跳转到应用内的某个页面。
1240
+
1241
+ #### Parameters
1242
+
1243
+ • **params**: [`NavigateToParams`](doubao-apps-sdk-open-api.md#navigatetoparams)
1244
+
1245
+ #### Returns
1246
+
1247
+ `Promise`\<`object`\>
1248
+
1249
+ ***
1250
+
1251
+ ### removeStorage()
1252
+
1253
+ > **removeStorage**(`params`): `Promise`\<`object`\>
1254
+
1255
+ 删除本地缓存中指定 key 的数据。
1256
+
1257
+ #### Parameters
1258
+
1259
+ • **params**: [`RemoveStorageParams`](doubao-apps-sdk-open-api.md#removestorageparams)
1260
+
1261
+ 删除参数,字段见 [RemoveStorageParams](doubao-apps-sdk-open-api.md#removestorageparams)。
1262
+
1263
+ #### Returns
1264
+
1265
+ `Promise`\<`object`\>
1266
+
1267
+ 返回一个 Promise,删除完成后 resolve。
1268
+
1269
+ #### Example
1270
+
1271
+ ```typescript
1272
+ import { removeStorage } from '@doubao-apps/framework/api';
1273
+
1274
+ await removeStorage({ key: 'profile' });
1275
+ ```
1276
+
1277
+ ***
1278
+
1279
+ ### removeStorageSync()
1280
+
1281
+ > **removeStorageSync**(`params`?): `object`
1282
+
1283
+ 删除本地缓存中指定 key 的数据。
1284
+
1285
+ #### Parameters
1286
+
1287
+ • **params?**: [`RemoveStorageParams`](doubao-apps-sdk-open-api.md#removestorageparams)
1288
+
1289
+ 删除参数,字段见 [RemoveStorageParams](doubao-apps-sdk-open-api.md#removestorageparams)。
1290
+
1291
+ #### Returns
1292
+
1293
+ `object`
1294
+
1295
+ 同步删除完成后返回。
1296
+
1297
+ #### Example
1298
+
1299
+ ```typescript
1300
+ import { removeStorageSync } from '@doubao-apps/framework/api';
1301
+
1302
+ removeStorageSync({ key: 'profile' });
1303
+ ```
1304
+
1305
+ ***
1306
+
1307
+ ### request()
1308
+
1309
+ > **request**(`params`): `Promise`\<[`RequestResponse`](doubao-apps-sdk-open-api.md#requestresponse)\>
1310
+
1311
+ 发起网络请求。
1312
+
1313
+ #### Parameters
1314
+
1315
+ • **params**: [`RequestParams`](doubao-apps-sdk-open-api.md#requestparams)
1316
+
1317
+ 请求参数,字段见 [RequestParams](doubao-apps-sdk-open-api.md#requestparams)。
1318
+
1319
+ #### Returns
1320
+
1321
+ `Promise`\<[`RequestResponse`](doubao-apps-sdk-open-api.md#requestresponse)\>
1322
+
1323
+ 返回一个 Promise,解析为 [RequestResponse](doubao-apps-sdk-open-api.md#requestresponse)。
1324
+
1325
+ #### Example
1326
+
1327
+ ```typescript
1328
+ import { request } from '@doubao-apps/framework/api';
1329
+
1330
+ const result = await request({
1331
+ url: 'https://postman-echo.com/post',
1332
+ method: 'POST',
1333
+ dataType: 'json',
1334
+ header: { 'content-type': 'application/json' },
1335
+ data: { hello: 'world' }
1336
+ });
1337
+
1338
+ console.log(result.statusCode, result.data);
1339
+ ```
1340
+
1341
+ ***
1342
+
1343
+ ### requestOrder()
1344
+
1345
+ > **requestOrder**(`params`): `Promise`\<[`RequestOrderResult`](doubao-apps-sdk-open-api.md#requestorderresult)\>
1346
+
1347
+ #### Parameters
1348
+
1349
+ • **params**: [`RequestOrderParams`](doubao-apps-sdk-open-api.md#requestorderparams)
1350
+
1351
+ #### Returns
1352
+
1353
+ `Promise`\<[`RequestOrderResult`](doubao-apps-sdk-open-api.md#requestorderresult)\>
1354
+
1355
+ ***
1356
+
1357
+ ### scanCode()
1358
+
1359
+ > **scanCode**(`params`?): `Promise`\<[`ScanCodeResult`](doubao-apps-sdk-open-api.md#scancoderesult)\>
1360
+
1361
+ 调起扫码能力。
1362
+
1363
+ #### Parameters
1364
+
1365
+ • **params?**: [`ScanCodeParams`](doubao-apps-sdk-open-api.md#scancodeparams)
1366
+
1367
+ #### Returns
1368
+
1369
+ `Promise`\<[`ScanCodeResult`](doubao-apps-sdk-open-api.md#scancoderesult)\>
1370
+
1371
+ ***
1372
+
1373
+ ### sendHCEMessage()
1374
+
1375
+ > **sendHCEMessage**(`params`): `Promise`\<`object`\>
1376
+
1377
+ 发送 HCE 消息。
1378
+
1379
+ #### Parameters
1380
+
1381
+ • **params**: [`SendHCEMessageParams`](doubao-apps-sdk-open-api.md#sendhcemessageparams)
1382
+
1383
+ #### Returns
1384
+
1385
+ `Promise`\<`object`\>
1386
+
1387
+ ***
1388
+
1389
+ ### sendQueryMessage()
1390
+
1391
+ > **sendQueryMessage**(`params`): `void`
1392
+
1393
+ 以用户身份发送一条消息
1394
+
1395
+ 由于会自动获取页面上下文来确定向哪个 bot 发送消息,因此只能在卡片或页面中调用
1396
+
1397
+ #### Parameters
1398
+
1399
+ • **params**: [`SendQueryMessageParams`](doubao-apps-sdk-open-api.md#sendquerymessageparams)
1400
+
1401
+ #### Returns
1402
+
1403
+ `void`
1404
+
1405
+ #### Example
1406
+
1407
+ ```ts
1408
+ await sendQueryMessage({ content: '订阅消息', type: 'text' })
1409
+ ```
1410
+
1411
+ ***
1412
+
1413
+ ### sendSms()
1414
+
1415
+ > **sendSms**(`params`?): `Promise`\<`object`\>
1416
+
1417
+ 拉起系统短信发送面板。
1418
+
1419
+ #### Parameters
1420
+
1421
+ • **params?**: [`SendSmsParams`](doubao-apps-sdk-open-api.md#sendsmsparams)
1422
+
1423
+ #### Returns
1424
+
1425
+ `Promise`\<`object`\>
1426
+
1427
+ 返回一个 Promise,在成功拉起短信发送面板时解析。
1428
+
1429
+ #### Example
1430
+
1431
+ ```typescript
1432
+ import { sendSms } from '@doubao-apps/framework/api';
1433
+
1434
+ await sendSms({
1435
+ phoneNumber: '10086',
1436
+ message: '查询话费'
1437
+ });
1438
+ ```
1439
+
1440
+ ***
1441
+
1442
+ ### setAdditionalContext()
1443
+
1444
+ > **setAdditionalContext**(`params`): `Promise`\<`object`\>
1445
+
1446
+ 设置全局上下文供大模型理解
1447
+
1448
+ #### Parameters
1449
+
1450
+ • **params**
1451
+
1452
+ • **params.additionalContext**: `string`
1453
+
1454
+ 上下文内容
1455
+
1456
+ • **params.botId?**: `string`
1457
+
1458
+ 指定 bot id
1459
+
1460
+ #### Returns
1461
+
1462
+ `Promise`\<`object`\>
1463
+
1464
+ ***
1465
+
1466
+ ### setBLEMTU()
1467
+
1468
+ > **setBLEMTU**(`params`): `Promise`\<[`SetBLEMTUResult`](doubao-apps-sdk-open-api.md#setblemturesult)\>
1469
+
1470
+ 设置 BLE MTU。
1471
+
1472
+ #### Parameters
1473
+
1474
+ • **params**: [`SetBLEMTUParams`](doubao-apps-sdk-open-api.md#setblemtuparams)
1475
+
1476
+ #### Returns
1477
+
1478
+ `Promise`\<[`SetBLEMTUResult`](doubao-apps-sdk-open-api.md#setblemturesult)\>
1479
+
1480
+ ***
1481
+
1482
+ ### setClipboardData()
1483
+
1484
+ > **setClipboardData**(`params`): `Promise`\<`object`\>
1485
+
1486
+ 设置系统剪贴板内容。
1487
+
1488
+ #### Parameters
1489
+
1490
+ • **params**: [`SetClipboardDataParams`](doubao-apps-sdk-open-api.md#setclipboarddataparams)
1491
+
1492
+ #### Returns
1493
+
1494
+ `Promise`\<`object`\>
1495
+
1496
+ ***
1497
+
1498
+ ### setKeepScreenOn()
1499
+
1500
+ > **setKeepScreenOn**(`params`): `Promise`\<`object`\>
1501
+
1502
+ 设置屏幕常亮状态。
1503
+
1504
+ #### Parameters
1505
+
1506
+ • **params**: [`SetKeepScreenOnParams`](doubao-apps-sdk-open-api.md#setkeepscreenonparams)
1507
+
1508
+ #### Returns
1509
+
1510
+ `Promise`\<`object`\>
1511
+
1512
+ ***
1513
+
1514
+ ### setScreenBrightness()
1515
+
1516
+ > **setScreenBrightness**(`params`): `Promise`\<`object`\>
1517
+
1518
+ 设置屏幕亮度。
1519
+
1520
+ #### Parameters
1521
+
1522
+ • **params**: [`SetScreenBrightnessParams`](doubao-apps-sdk-open-api.md#setscreenbrightnessparams)
1523
+
1524
+ #### Returns
1525
+
1526
+ `Promise`\<`object`\>
1527
+
1528
+ ***
1529
+
1530
+ ### setStorage()
1531
+
1532
+ > **setStorage**\<`TData`\>(`params`): `Promise`\<`object`\>
1533
+
1534
+ 将数据写入本地缓存。
1535
+
1536
+ #### Type parameters
1537
+
1538
+ • **TData** = `unknown`
1539
+
1540
+ #### Parameters
1541
+
1542
+ • **params**: [`SetStorageParams`](doubao-apps-sdk-open-api.md#setstorageparamstdata)\<`TData`\>
1543
+
1544
+ 存储参数,字段见 [SetStorageParams](doubao-apps-sdk-open-api.md#setstorageparamstdata)。
1545
+
1546
+ #### Returns
1547
+
1548
+ `Promise`\<`object`\>
1549
+
1550
+ 返回一个 Promise,写入完成后 resolve。
1551
+
1552
+ #### Example
1553
+
1554
+ ```typescript
1555
+ import { setStorage } from '@doubao-apps/framework/api';
1556
+
1557
+ await setStorage({
1558
+ key: 'profile',
1559
+ data: { name: 'Tom', age: 18 },
1560
+ });
1561
+ ```
1562
+
1563
+ ***
1564
+
1565
+ ### setStorageSync()
1566
+
1567
+ > **setStorageSync**\<`TData`\>(`params`): `object`
1568
+
1569
+ 将数据写入本地缓存。
1570
+
1571
+ #### Type parameters
1572
+
1573
+ • **TData** = `unknown`
1574
+
1575
+ #### Parameters
1576
+
1577
+ • **params**: [`SetStorageParams`](doubao-apps-sdk-open-api.md#setstorageparamstdata)\<`TData`\>
1578
+
1579
+ 存储参数,字段见 [SetStorageParams](doubao-apps-sdk-open-api.md#setstorageparamstdata)。
1580
+
1581
+ #### Returns
1582
+
1583
+ `object`
1584
+
1585
+ 同步写入完成后返回。
1586
+
1587
+ #### Example
1588
+
1589
+ ```typescript
1590
+ import { setStorageSync } from '@doubao-apps/framework/api';
1591
+
1592
+ setStorageSync({
1593
+ key: 'profile',
1594
+ data: { name: 'Tom', age: 18 },
1595
+ });
1596
+ ```
1597
+
1598
+ ***
1599
+
1600
+ ### setVisualEffectOnCapture()
1601
+
1602
+ > **setVisualEffectOnCapture**(`params`?): `Promise`\<`object`\>
1603
+
1604
+ 设置截屏或录屏时的视觉表现。
1605
+
1606
+ #### Parameters
1607
+
1608
+ • **params?**: [`SetVisualEffectOnCaptureParams`](doubao-apps-sdk-open-api.md#setvisualeffectoncaptureparams)
1609
+
1610
+ #### Returns
1611
+
1612
+ `Promise`\<`object`\>
1613
+
1614
+ ***
1615
+
1616
+ ### setWifiList()
1617
+
1618
+ > **setWifiList**(`params`): `Promise`\<`object`\>
1619
+
1620
+ 设置 Wi-Fi 预设列表。
1621
+
1622
+ #### Parameters
1623
+
1624
+ • **params**: [`SetWifiListParams`](doubao-apps-sdk-open-api.md#setwifilistparams)
1625
+
1626
+ #### Returns
1627
+
1628
+ `Promise`\<`object`\>
1629
+
1630
+ ***
1631
+
1632
+ ### showToast()
1633
+
1634
+ > **showToast**(`params`): `Promise`\<`object`\>
1635
+
1636
+ 显示 Toast 提示。
1637
+
1638
+ 参数 `options` 包含以下字段:
1639
+ - `message`: 提示的内容。
1640
+ - `type`: Toast 的类型,可选值为 'success' 或 'error'。
1641
+ - `duration`: 提示的延迟时间,单位毫秒,默认为 2000。
1642
+ - `icon`: 图标,可选值为 'success', 'error', 'warn'。
1643
+ - `customIcon`: 自定义图标的 URL 或 base64 字符串。
1644
+
1645
+ #### Parameters
1646
+
1647
+ • **params**: [`ShowToastParams`](doubao-apps-sdk-open-api.md#showtoastparams)
1648
+
1649
+ #### Returns
1650
+
1651
+ `Promise`\<`object`\>
1652
+
1653
+ 返回一个 Promise,在 Toast 显示结束时 resolve。
1654
+
1655
+ #### Example
1656
+
1657
+ ```typescript
1658
+ import { showToast } from '@doubao-apps/framework';
1659
+
1660
+ // 显示一个成功的 Toast
1661
+ showToast({
1662
+ message: '操作成功',
1663
+ type: 'success',
1664
+ icon: 'success',
1665
+ duration: 1500
1666
+ }).then(() => {
1667
+ console.log('Toast 显示完毕');
1668
+ });
1669
+
1670
+ // 显示一个错误的 Toast
1671
+ showToast({
1672
+ message: '网络错误',
1673
+ type: 'error',
1674
+ icon: 'error'
1675
+ });
1676
+ ```
1677
+
1678
+ ***
1679
+
1680
+ ### startAccelerometer()
1681
+
1682
+ > **startAccelerometer**(`params`?): `Promise`\<`object`\>
1683
+
1684
+ 开始监听加速度。
1685
+
1686
+ #### Parameters
1687
+
1688
+ • **params?**: [`StartAccelerometerParams`](doubao-apps-sdk-open-api.md#startaccelerometerparams)
1689
+
1690
+ #### Returns
1691
+
1692
+ `Promise`\<`object`\>
1693
+
1694
+ ***
1695
+
1696
+ ### startBeaconDiscovery()
1697
+
1698
+ > **startBeaconDiscovery**(`params`): `Promise`\<`object`\>
1699
+
1700
+ 开始搜索附近的 iBeacon。
1701
+
1702
+ #### Parameters
1703
+
1704
+ • **params**: [`StartBeaconDiscoveryParams`](doubao-apps-sdk-open-api.md#startbeacondiscoveryparams)
1705
+
1706
+ #### Returns
1707
+
1708
+ `Promise`\<`object`\>
1709
+
1710
+ ***
1711
+
1712
+ ### startBluetoothDevicesDiscovery()
1713
+
1714
+ > **startBluetoothDevicesDiscovery**(`params`?): `Promise`\<`object`\>
1715
+
1716
+ 开始搜索附近的蓝牙设备。
1717
+
1718
+ #### Parameters
1719
+
1720
+ • **params?**: [`StartBluetoothDevicesDiscoveryParams`](doubao-apps-sdk-open-api.md#startbluetoothdevicesdiscoveryparams)
1721
+
1722
+ #### Returns
1723
+
1724
+ `Promise`\<`object`\>
1725
+
1726
+ ***
1727
+
1728
+ ### startCompass()
1729
+
1730
+ > **startCompass**(`params`?): `Promise`\<`object`\>
1731
+
1732
+ 开始监听罗盘。
1733
+
1734
+ #### Parameters
1735
+
1736
+ • **params?**: `Record`\<`string`, `never`\>
1737
+
1738
+ #### Returns
1739
+
1740
+ `Promise`\<`object`\>
1741
+
1742
+ ***
1743
+
1744
+ ### startDeviceMotionListening()
1745
+
1746
+ > **startDeviceMotionListening**(`params`?): `Promise`\<`object`\>
1747
+
1748
+ 开始监听设备方向变化。
1749
+
1750
+ #### Parameters
1751
+
1752
+ • **params?**: [`StartDeviceMotionListeningParams`](doubao-apps-sdk-open-api.md#startdevicemotionlisteningparams)
1753
+
1754
+ #### Returns
1755
+
1756
+ `Promise`\<`object`\>
1757
+
1758
+ ***
1759
+
1760
+ ### startGyroscope()
1761
+
1762
+ > **startGyroscope**(`params`?): `Promise`\<`object`\>
1763
+
1764
+ 开始监听陀螺仪。
1765
+
1766
+ #### Parameters
1767
+
1768
+ • **params?**: [`StartGyroscopeParams`](doubao-apps-sdk-open-api.md#startgyroscopeparams)
1769
+
1770
+ #### Returns
1771
+
1772
+ `Promise`\<`object`\>
1773
+
1774
+ ***
1775
+
1776
+ ### startHCE()
1777
+
1778
+ > **startHCE**(`params`): `Promise`\<`object`\>
1779
+
1780
+ 开启 HCE。
1781
+
1782
+ #### Parameters
1783
+
1784
+ • **params**: [`StartHCEParams`](doubao-apps-sdk-open-api.md#starthceparams)
1785
+
1786
+ #### Returns
1787
+
1788
+ `Promise`\<`object`\>
1789
+
1790
+ ***
1791
+
1792
+ ### startWifi()
1793
+
1794
+ > **startWifi**(`params`?): `Promise`\<`object`\>
1795
+
1796
+ 初始化 Wi-Fi 模块。
1797
+
1798
+ #### Parameters
1799
+
1800
+ • **params?**: `Record`\<`string`, `never`\>
1801
+
1802
+ #### Returns
1803
+
1804
+ `Promise`\<`object`\>
1805
+
1806
+ ***
1807
+
1808
+ ### stopAccelerometer()
1809
+
1810
+ > **stopAccelerometer**(`params`?): `Promise`\<`object`\>
1811
+
1812
+ 停止监听加速度。
1813
+
1814
+ #### Parameters
1815
+
1816
+ • **params?**: `Record`\<`string`, `never`\>
1817
+
1818
+ #### Returns
1819
+
1820
+ `Promise`\<`object`\>
1821
+
1822
+ ***
1823
+
1824
+ ### stopBeaconDiscovery()
1825
+
1826
+ > **stopBeaconDiscovery**(`params`?): `Promise`\<`object`\>
1827
+
1828
+ 停止搜索附近的 iBeacon。
1829
+
1830
+ #### Parameters
1831
+
1832
+ • **params?**: `Record`\<`string`, `never`\>
1833
+
1834
+ #### Returns
1835
+
1836
+ `Promise`\<`object`\>
1837
+
1838
+ ***
1839
+
1840
+ ### stopBluetoothDevicesDiscovery()
1841
+
1842
+ > **stopBluetoothDevicesDiscovery**(`params`?): `Promise`\<`object`\>
1843
+
1844
+ 停止搜索附近的蓝牙设备。
1845
+
1846
+ #### Parameters
1847
+
1848
+ • **params?**: `Record`\<`string`, `never`\>
1849
+
1850
+ #### Returns
1851
+
1852
+ `Promise`\<`object`\>
1853
+
1854
+ ***
1855
+
1856
+ ### stopCompass()
1857
+
1858
+ > **stopCompass**(`params`?): `Promise`\<`object`\>
1859
+
1860
+ 停止监听罗盘。
1861
+
1862
+ #### Parameters
1863
+
1864
+ • **params?**: `Record`\<`string`, `never`\>
1865
+
1866
+ #### Returns
1867
+
1868
+ `Promise`\<`object`\>
1869
+
1870
+ ***
1871
+
1872
+ ### stopDeviceMotionListening()
1873
+
1874
+ > **stopDeviceMotionListening**(`params`?): `Promise`\<`object`\>
1875
+
1876
+ 停止监听设备方向变化。
1877
+
1878
+ #### Parameters
1879
+
1880
+ • **params?**: `Record`\<`string`, `never`\>
1881
+
1882
+ #### Returns
1883
+
1884
+ `Promise`\<`object`\>
1885
+
1886
+ ***
1887
+
1888
+ ### stopGyroscope()
1889
+
1890
+ > **stopGyroscope**(`params`?): `Promise`\<`object`\>
1891
+
1892
+ 停止监听陀螺仪。
1893
+
1894
+ #### Parameters
1895
+
1896
+ • **params?**: `Record`\<`string`, `never`\>
1897
+
1898
+ #### Returns
1899
+
1900
+ `Promise`\<`object`\>
1901
+
1902
+ ***
1903
+
1904
+ ### stopHCE()
1905
+
1906
+ > **stopHCE**(`params`?): `Promise`\<`object`\>
1907
+
1908
+ 停止 HCE。
1909
+
1910
+ #### Parameters
1911
+
1912
+ • **params?**: `Record`\<`string`, `never`\>
1913
+
1914
+ #### Returns
1915
+
1916
+ `Promise`\<`object`\>
1917
+
1918
+ ***
1919
+
1920
+ ### stopWifi()
1921
+
1922
+ > **stopWifi**(`params`?): `Promise`\<`object`\>
1923
+
1924
+ 关闭 Wi-Fi 模块。
1925
+
1926
+ #### Parameters
1927
+
1928
+ • **params?**: `Record`\<`string`, `never`\>
1929
+
1930
+ #### Returns
1931
+
1932
+ `Promise`\<`object`\>
1933
+
1934
+ ***
1935
+
1936
+ ### updateModelContext()
1937
+
1938
+ > **updateModelContext**(`params`?): `Promise`\<`object`\>
1939
+
1940
+ 前端数据捐献接口:上报当前业务状态/关键信息(blocks)。
1941
+
1942
+ #### Parameters
1943
+
1944
+ • **params?**: [`UpdateModelContextOptions`](doubao-apps-sdk-open-api.md#updatemodelcontextoptions)
1945
+
1946
+ #### Returns
1947
+
1948
+ `Promise`\<`object`\>
1949
+
1950
+ ***
1951
+
1952
+ ### vibrateLong()
1953
+
1954
+ > **vibrateLong**(`params`?): `Promise`\<`object`\>
1955
+
1956
+ 触发长震动。
1957
+
1958
+ #### Parameters
1959
+
1960
+ • **params?**: `Record`\<`string`, `never`\>
1961
+
1962
+ #### Returns
1963
+
1964
+ `Promise`\<`object`\>
1965
+
1966
+ ***
1967
+
1968
+ ### vibrateShort()
1969
+
1970
+ > **vibrateShort**(`params`?): `Promise`\<`object`\>
1971
+
1972
+ 触发短震动。
1973
+
1974
+ #### Parameters
1975
+
1976
+ • **params?**: [`VibrateShortParams`](doubao-apps-sdk-open-api.md#vibrateshortparams)
1977
+
1978
+ #### Returns
1979
+
1980
+ `Promise`\<`object`\>
1981
+
1982
+ ***
1983
+
1984
+ ### writeBLECharacteristicValue()
1985
+
1986
+ > **writeBLECharacteristicValue**(`params`): `Promise`\<`object`\>
1987
+
1988
+ 写入 BLE 特征值。
1989
+
1990
+ #### Parameters
1991
+
1992
+ • **params**: [`WriteBLECharacteristicValueParams`](doubao-apps-sdk-open-api.md#writeblecharacteristicvalueparams)
1993
+
1994
+ #### Returns
1995
+
1996
+ `Promise`\<`object`\>
1997
+
1998
+ ## Interfaces
1999
+
2000
+ ### AddPhoneCalendarParams
2001
+
2002
+ 添加系统日历事件的请求参数。
2003
+
2004
+ #### Extended by
2005
+
2006
+ - [`AddPhoneRepeatCalendarParams`](doubao-apps-sdk-open-api.md#addphonerepeatcalendarparams)
2007
+
2008
+ #### Properties
2009
+
2010
+ ##### alarm?
2011
+
2012
+ > `optional` **alarm**: `boolean`
2013
+
2014
+ 是否提醒。
2015
+
2016
+ ##### alarmOffset?
2017
+
2018
+ > `optional` **alarmOffset**: `number`
2019
+
2020
+ 提前提醒时间,单位秒。
2021
+
2022
+ ##### allDay?
2023
+
2024
+ > `optional` **allDay**: `boolean`
2025
+
2026
+ 是否为全天事件。
2027
+
2028
+ ##### description?
2029
+
2030
+ > `optional` **description**: `string`
2031
+
2032
+ 事件描述。
2033
+
2034
+ ##### endTime?
2035
+
2036
+ > `optional` **endTime**: `number`
2037
+
2038
+ 结束时间的 Unix 秒级时间戳。
2039
+
2040
+ ##### location?
2041
+
2042
+ > `optional` **location**: `string`
2043
+
2044
+ 事件位置。
2045
+
2046
+ ##### startTime
2047
+
2048
+ > **startTime**: `number`
2049
+
2050
+ 开始时间的 Unix 秒级时间戳。
2051
+
2052
+ ##### title
2053
+
2054
+ > **title**: `string`
2055
+
2056
+ 日历事件标题。
2057
+
2058
+ ***
2059
+
2060
+ ### AddPhoneContactParams
2061
+
2062
+ 添加手机联系人的请求参数。
2063
+
2064
+ #### Properties
2065
+
2066
+ ##### addressCity?
2067
+
2068
+ > `optional` **addressCity**: `string`
2069
+
2070
+ 家庭地址城市。
2071
+
2072
+ ##### addressCountry?
2073
+
2074
+ > `optional` **addressCountry**: `string`
2075
+
2076
+ 家庭地址国家。
2077
+
2078
+ ##### addressPostalCode?
2079
+
2080
+ > `optional` **addressPostalCode**: `string`
2081
+
2082
+ 家庭地址邮编。
2083
+
2084
+ ##### addressState?
2085
+
2086
+ > `optional` **addressState**: `string`
2087
+
2088
+ 家庭地址省份。
2089
+
2090
+ ##### addressStreet?
2091
+
2092
+ > `optional` **addressStreet**: `string`
2093
+
2094
+ 家庭地址街道。
2095
+
2096
+ ##### email?
2097
+
2098
+ > `optional` **email**: `string`
2099
+
2100
+ 电子邮件。
2101
+
2102
+ ##### firstName
2103
+
2104
+ > **firstName**: `string`
2105
+
2106
+ 名字。
2107
+
2108
+ ##### homeAddressCity?
2109
+
2110
+ > `optional` **homeAddressCity**: `string`
2111
+
2112
+ 家庭地址城市。
2113
+
2114
+ ##### homeAddressCountry?
2115
+
2116
+ > `optional` **homeAddressCountry**: `string`
2117
+
2118
+ 家庭地址国家。
2119
+
2120
+ ##### homeAddressPostalCode?
2121
+
2122
+ > `optional` **homeAddressPostalCode**: `string`
2123
+
2124
+ 家庭地址邮编。
2125
+
2126
+ ##### homeAddressState?
2127
+
2128
+ > `optional` **homeAddressState**: `string`
2129
+
2130
+ 家庭地址省份。
2131
+
2132
+ ##### homeAddressStreet?
2133
+
2134
+ > `optional` **homeAddressStreet**: `string`
2135
+
2136
+ 家庭地址街道。
2137
+
2138
+ ##### homeFaxNumber?
2139
+
2140
+ > `optional` **homeFaxNumber**: `string`
2141
+
2142
+ 家庭传真。
2143
+
2144
+ ##### homePhoneNumber?
2145
+
2146
+ > `optional` **homePhoneNumber**: `string`
2147
+
2148
+ 家庭电话。
2149
+
2150
+ ##### hostNumber?
2151
+
2152
+ > `optional` **hostNumber**: `string`
2153
+
2154
+ 公司电话。
2155
+
2156
+ ##### lastName?
2157
+
2158
+ > `optional` **lastName**: `string`
2159
+
2160
+ 姓。
2161
+
2162
+ ##### middleName?
2163
+
2164
+ > `optional` **middleName**: `string`
2165
+
2166
+ 中间名。
2167
+
2168
+ ##### mobilePhoneNumber?
2169
+
2170
+ > `optional` **mobilePhoneNumber**: `string`
2171
+
2172
+ 手机号。
2173
+
2174
+ ##### nickName?
2175
+
2176
+ > `optional` **nickName**: `string`
2177
+
2178
+ 昵称。
2179
+
2180
+ ##### organization?
2181
+
2182
+ > `optional` **organization**: `string`
2183
+
2184
+ 公司。
2185
+
2186
+ ##### photoFilePath?
2187
+
2188
+ > `optional` **photoFilePath**: `string`
2189
+
2190
+ 头像文件路径。
2191
+
2192
+ ##### remark?
2193
+
2194
+ > `optional` **remark**: `string`
2195
+
2196
+ 备注。
2197
+
2198
+ ##### title?
2199
+
2200
+ > `optional` **title**: `string`
2201
+
2202
+ 职位。
2203
+
2204
+ ##### url?
2205
+
2206
+ > `optional` **url**: `string`
2207
+
2208
+ 个人网站。
2209
+
2210
+ ##### weChatNumber?
2211
+
2212
+ > `optional` **weChatNumber**: `string`
2213
+
2214
+ 微信号。
2215
+
2216
+ ##### workAddressCity?
2217
+
2218
+ > `optional` **workAddressCity**: `string`
2219
+
2220
+ 工作地址城市。
2221
+
2222
+ ##### workAddressCountry?
2223
+
2224
+ > `optional` **workAddressCountry**: `string`
2225
+
2226
+ 工作地址国家。
2227
+
2228
+ ##### workAddressPostalCode?
2229
+
2230
+ > `optional` **workAddressPostalCode**: `string`
2231
+
2232
+ 工作地址邮编。
2233
+
2234
+ ##### workAddressState?
2235
+
2236
+ > `optional` **workAddressState**: `string`
2237
+
2238
+ 工作地址省份。
2239
+
2240
+ ##### workAddressStreet?
2241
+
2242
+ > `optional` **workAddressStreet**: `string`
2243
+
2244
+ 工作地址街道。
2245
+
2246
+ ##### workFaxNumber?
2247
+
2248
+ > `optional` **workFaxNumber**: `string`
2249
+
2250
+ 工作传真。
2251
+
2252
+ ##### workPhoneNumber?
2253
+
2254
+ > `optional` **workPhoneNumber**: `string`
2255
+
2256
+ 工作电话。
2257
+
2258
+ ***
2259
+
2260
+ ### AddPhoneRepeatCalendarParams
2261
+
2262
+ 添加重复日历事件的请求参数。
2263
+
2264
+ #### Extends
2265
+
2266
+ - [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams)
2267
+
2268
+ #### Properties
2269
+
2270
+ ##### alarm?
2271
+
2272
+ > `optional` **alarm**: `boolean`
2273
+
2274
+ 是否提醒。
2275
+
2276
+ ###### Inherited from
2277
+
2278
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`alarm`](doubao-apps-sdk-open-api.md#alarm)
2279
+
2280
+ ##### alarmOffset?
2281
+
2282
+ > `optional` **alarmOffset**: `number`
2283
+
2284
+ 提前提醒时间,单位秒。
2285
+
2286
+ ###### Inherited from
2287
+
2288
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`alarmOffset`](doubao-apps-sdk-open-api.md#alarmoffset)
2289
+
2290
+ ##### allDay?
2291
+
2292
+ > `optional` **allDay**: `boolean`
2293
+
2294
+ 是否为全天事件。
2295
+
2296
+ ###### Inherited from
2297
+
2298
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`allDay`](doubao-apps-sdk-open-api.md#allday)
2299
+
2300
+ ##### description?
2301
+
2302
+ > `optional` **description**: `string`
2303
+
2304
+ 事件描述。
2305
+
2306
+ ###### Inherited from
2307
+
2308
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`description`](doubao-apps-sdk-open-api.md#description)
2309
+
2310
+ ##### endTime?
2311
+
2312
+ > `optional` **endTime**: `number`
2313
+
2314
+ 结束时间的 Unix 秒级时间戳。
2315
+
2316
+ ###### Inherited from
2317
+
2318
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`endTime`](doubao-apps-sdk-open-api.md#endtime)
2319
+
2320
+ ##### location?
2321
+
2322
+ > `optional` **location**: `string`
2323
+
2324
+ 事件位置。
2325
+
2326
+ ###### Inherited from
2327
+
2328
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`location`](doubao-apps-sdk-open-api.md#location)
2329
+
2330
+ ##### repeatEndTime?
2331
+
2332
+ > `optional` **repeatEndTime**: `number`
2333
+
2334
+ 重复结束时间的 Unix 秒级时间戳。
2335
+
2336
+ ##### repeatInterval?
2337
+
2338
+ > `optional` **repeatInterval**: [`CalendarRepeatInterval`](doubao-apps-sdk-open-api.md#calendarrepeatinterval)
2339
+
2340
+ 重复周期。
2341
+
2342
+ ##### startTime
2343
+
2344
+ > **startTime**: `number`
2345
+
2346
+ 开始时间的 Unix 秒级时间戳。
2347
+
2348
+ ###### Inherited from
2349
+
2350
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`startTime`](doubao-apps-sdk-open-api.md#starttime)
2351
+
2352
+ ##### title
2353
+
2354
+ > **title**: `string`
2355
+
2356
+ 日历事件标题。
2357
+
2358
+ ###### Inherited from
2359
+
2360
+ [`AddPhoneCalendarParams`](doubao-apps-sdk-open-api.md#addphonecalendarparams).[`title`](doubao-apps-sdk-open-api.md#title)
2361
+
2362
+ ***
2363
+
2364
+ ### AppBaseInfoHost
2365
+
2366
+ #### Properties
2367
+
2368
+ ##### appId
2369
+
2370
+ > **appId**: `string`
2371
+
2372
+ 宿主 app 对应的 appId
2373
+
2374
+ ***
2375
+
2376
+ ### AuthorizeRequest
2377
+
2378
+ #### Properties
2379
+
2380
+ ##### scope
2381
+
2382
+ > **scope**: [`Scope`](doubao-apps-sdk-open-api.md#scope-1)
2383
+
2384
+ 授权范围
2385
+
2386
+ ***
2387
+
2388
+ ### BeaconInfo
2389
+
2390
+ iBeacon 设备信息。
2391
+
2392
+ #### Properties
2393
+
2394
+ ##### accuracy
2395
+
2396
+ > **accuracy**: `number`
2397
+
2398
+ 距离,单位米。
2399
+
2400
+ ##### major
2401
+
2402
+ > **major**: `string`
2403
+
2404
+ 主 ID。
2405
+
2406
+ ##### minor
2407
+
2408
+ > **minor**: `string`
2409
+
2410
+ 次 ID。
2411
+
2412
+ ##### proximity
2413
+
2414
+ > **proximity**: [`BeaconProximity`](doubao-apps-sdk-open-api.md#beaconproximity)
2415
+
2416
+ 距离等级。
2417
+
2418
+ ##### rssi
2419
+
2420
+ > **rssi**: `number`
2421
+
2422
+ RSSI 信号强度,单位 dBm。
2423
+
2424
+ ##### uuid
2425
+
2426
+ > **uuid**: `string`
2427
+
2428
+ Beacon UUID。
2429
+
2430
+ ***
2431
+
2432
+ ### BluetoothCharacteristic
2433
+
2434
+ 蓝牙特征值信息。
2435
+
2436
+ #### Properties
2437
+
2438
+ ##### properties
2439
+
2440
+ > **properties**: [`BluetoothCharacteristicProperties`](doubao-apps-sdk-open-api.md#bluetoothcharacteristicproperties)
2441
+
2442
+ 特征值能力。
2443
+
2444
+ ##### uuid
2445
+
2446
+ > **uuid**: `string`
2447
+
2448
+ 特征值 UUID。
2449
+
2450
+ ***
2451
+
2452
+ ### BluetoothCharacteristicProperties
2453
+
2454
+ 蓝牙特征值支持的能力。
2455
+
2456
+ #### Properties
2457
+
2458
+ ##### indicate
2459
+
2460
+ > **indicate**: `boolean`
2461
+
2462
+ 是否支持 indicate。
2463
+
2464
+ ##### notify
2465
+
2466
+ > **notify**: `boolean`
2467
+
2468
+ 是否支持 notify。
2469
+
2470
+ ##### read
2471
+
2472
+ > **read**: `boolean`
2473
+
2474
+ 是否支持 read。
2475
+
2476
+ ##### write
2477
+
2478
+ > **write**: `boolean`
2479
+
2480
+ 是否支持 write。
2481
+
2482
+ ##### writeDefault
2483
+
2484
+ > **writeDefault**: `boolean`
2485
+
2486
+ 是否支持带响应写入。
2487
+
2488
+ ##### writeNoResponse
2489
+
2490
+ > **writeNoResponse**: `boolean`
2491
+
2492
+ 是否支持无响应写入。
2493
+
2494
+ ***
2495
+
2496
+ ### BluetoothDevice
2497
+
2498
+ 蓝牙设备信息。
2499
+
2500
+ #### Properties
2501
+
2502
+ ##### advertisingData
2503
+
2504
+ > **advertisingData**: `ArrayBuffer`
2505
+
2506
+ 广播二进制数据。
2507
+
2508
+ ##### advertisingServiceUuids
2509
+
2510
+ > **advertisingServiceUuids**: `string`[]
2511
+
2512
+ 广播中的服务 UUID 列表。
2513
+
2514
+ ##### connectable?
2515
+
2516
+ > `optional` **connectable**: `boolean`
2517
+
2518
+ 是否可连接。
2519
+
2520
+ ##### deviceId
2521
+
2522
+ > **deviceId**: `string`
2523
+
2524
+ 设备 ID。
2525
+
2526
+ ##### localName
2527
+
2528
+ > **localName**: `string`
2529
+
2530
+ 广播中的本地名称。
2531
+
2532
+ ##### name
2533
+
2534
+ > **name**: `string`
2535
+
2536
+ 设备名称。
2537
+
2538
+ ##### rssi
2539
+
2540
+ > **rssi**: `number`
2541
+
2542
+ RSSI 信号强度,单位 dBm。
2543
+
2544
+ ##### serviceData
2545
+
2546
+ > **serviceData**: `Record`\<`string`, `unknown`\>
2547
+
2548
+ 广播中的服务数据。
2549
+
2550
+ ***
2551
+
2552
+ ### BluetoothService
2553
+
2554
+ 蓝牙服务信息。
2555
+
2556
+ #### Properties
2557
+
2558
+ ##### isPrimary
2559
+
2560
+ > **isPrimary**: `boolean`
2561
+
2562
+ 是否为主服务。
2563
+
2564
+ ##### uuid
2565
+
2566
+ > **uuid**: `string`
2567
+
2568
+ 服务 UUID。
2569
+
2570
+ ***
2571
+
2572
+ ### CanIUseParams
2573
+
2574
+ #### Properties
2575
+
2576
+ ##### schema
2577
+
2578
+ > **schema**: `string`
2579
+
2580
+ ***
2581
+
2582
+ ### CanIUseResult
2583
+
2584
+ #### Properties
2585
+
2586
+ ##### result
2587
+
2588
+ > **result**: `boolean`
2589
+
2590
+ ***
2591
+
2592
+ ### CheckIsOpenAccessibilityResult
2593
+
2594
+ 无障碍能力检测结果。
2595
+
2596
+ #### Properties
2597
+
2598
+ ##### open
2599
+
2600
+ > **open**: `boolean`
2601
+
2602
+ 是否开启视觉无障碍能力。
2603
+
2604
+ ***
2605
+
2606
+ ### ChooseContactResult
2607
+
2608
+ 选取联系人后的返回结果。
2609
+
2610
+ #### Properties
2611
+
2612
+ ##### displayName
2613
+
2614
+ > **displayName**: `string`
2615
+
2616
+ 联系人名称。
2617
+
2618
+ ##### phoneNumber
2619
+
2620
+ > **phoneNumber**: `string`
2621
+
2622
+ 选中的手机号。
2623
+
2624
+ ##### phoneNumberList
2625
+
2626
+ > **phoneNumberList**: `string`[]
2627
+
2628
+ 联系人所有手机号。
2629
+
2630
+ ***
2631
+
2632
+ ### CloseBLEConnectionParams
2633
+
2634
+ 关闭 BLE 连接的请求参数。
2635
+
2636
+ #### Properties
2637
+
2638
+ ##### deviceId
2639
+
2640
+ > **deviceId**: `string`
2641
+
2642
+ 蓝牙设备 ID。
2643
+
2644
+ ***
2645
+
2646
+ ### CloseParams
2647
+
2648
+ #### Properties
2649
+
2650
+ ##### containerID?
2651
+
2652
+ > `optional` **containerID**: `string`
2653
+
2654
+ 指定一个要关闭的页面
2655
+
2656
+ ***
2657
+
2658
+ ### ConnectWifiParams
2659
+
2660
+ 连接 Wi-Fi 的请求参数。
2661
+
2662
+ #### Properties
2663
+
2664
+ ##### bssid?
2665
+
2666
+ > `optional` **bssid**: `string`
2667
+
2668
+ Wi-Fi BSSID。
2669
+
2670
+ ##### manual?
2671
+
2672
+ > `optional` **manual**: `boolean`
2673
+
2674
+ 是否跳转到系统设置页连接。
2675
+
2676
+ ##### partialInfo?
2677
+
2678
+ > `optional` **partialInfo**: `boolean`
2679
+
2680
+ 是否仅返回部分 Wi-Fi 信息。
2681
+
2682
+ ##### password
2683
+
2684
+ > **password**: `string`
2685
+
2686
+ Wi-Fi 密码。
2687
+
2688
+ ##### ssid
2689
+
2690
+ > **ssid**: `string`
2691
+
2692
+ Wi-Fi SSID。
2693
+
2694
+ ***
2695
+
2696
+ ### ConnectedBluetoothDevice
2697
+
2698
+ 已连接蓝牙设备信息。
2699
+
2700
+ #### Properties
2701
+
2702
+ ##### deviceId
2703
+
2704
+ > **deviceId**: `string`
2705
+
2706
+ 设备 ID。
2707
+
2708
+ ##### name
2709
+
2710
+ > **name**: `string`
2711
+
2712
+ 设备名称。
2713
+
2714
+ ***
2715
+
2716
+ ### CreateBLEConnectionParams
2717
+
2718
+ 创建 BLE 连接的请求参数。
2719
+
2720
+ #### Properties
2721
+
2722
+ ##### deviceId
2723
+
2724
+ > **deviceId**: `string`
2725
+
2726
+ 蓝牙设备 ID。
2727
+
2728
+ ##### timeout?
2729
+
2730
+ > `optional` **timeout**: `number`
2731
+
2732
+ 超时时间,单位毫秒。
2733
+
2734
+ ***
2735
+
2736
+ ### DoubaoAppAccountInfo
2737
+
2738
+ 豆包 App 账号信息。
2739
+
2740
+ #### Properties
2741
+
2742
+ ##### appId
2743
+
2744
+ > **appId**: `string`
2745
+
2746
+ 豆包 App appId
2747
+
2748
+ ##### envVersion
2749
+
2750
+ > **envVersion**: `"develop"` \| `"trial"` \| `"release"`
2751
+
2752
+ 豆包 App 运行环境。
2753
+
2754
+ - develop: 开发版
2755
+ - trial: 体验版
2756
+ - release: 正式版
2757
+
2758
+ ##### version
2759
+
2760
+ > **version**: `string`
2761
+
2762
+ 线上豆包 App 版本号。
2763
+
2764
+ ***
2765
+
2766
+ ### GetAccountInfoResult
2767
+
2768
+ 获取当前账号信息。
2769
+
2770
+ #### Properties
2771
+
2772
+ ##### miniProgram
2773
+
2774
+ > **miniProgram**: [`DoubaoAppAccountInfo`](doubao-apps-sdk-open-api.md#doubaoappaccountinfo)
2775
+
2776
+ 豆包 App账号信息
2777
+
2778
+ ##### plugin?
2779
+
2780
+ > `optional` **plugin**: [`PluginAccountInfo`](doubao-apps-sdk-open-api.md#pluginaccountinfo)
2781
+
2782
+ 插件账号信息(仅在插件中调用时包含)
2783
+
2784
+ ***
2785
+
2786
+ ### GetAppBaseInfoResult
2787
+
2788
+ #### Properties
2789
+
2790
+ ##### SDKVersion?
2791
+
2792
+ > `optional` **SDKVersion**: `string`
2793
+
2794
+ 客户端基础库版本
2795
+
2796
+ ##### enableDebug?
2797
+
2798
+ > `optional` **enableDebug**: `boolean`
2799
+
2800
+ 是否已打开调试
2801
+
2802
+ ##### host?
2803
+
2804
+ > `optional` **host**: [`AppBaseInfoHost`](doubao-apps-sdk-open-api.md#appbaseinfohost)
2805
+
2806
+ 当前豆包 App运行的宿主环境
2807
+
2808
+ ##### language
2809
+
2810
+ > **language**: `string`
2811
+
2812
+ 当前语言
2813
+
2814
+ ##### theme?
2815
+
2816
+ > `optional` **theme**: `"light"` \| `"dark"`
2817
+
2818
+ 当前主题
2819
+
2820
+ ##### version?
2821
+
2822
+ > `optional` **version**: `string`
2823
+
2824
+ 宿主版本号
2825
+
2826
+ ***
2827
+
2828
+ ### GetBLEDeviceCharacteristicsParams
2829
+
2830
+ 获取 BLE 特征值列表的请求参数。
2831
+
2832
+ #### Properties
2833
+
2834
+ ##### deviceId
2835
+
2836
+ > **deviceId**: `string`
2837
+
2838
+ 蓝牙设备 ID。
2839
+
2840
+ ##### serviceId
2841
+
2842
+ > **serviceId**: `string`
2843
+
2844
+ 服务 ID。
2845
+
2846
+ ***
2847
+
2848
+ ### GetBLEDeviceCharacteristicsResult
2849
+
2850
+ 获取 BLE 特征值列表的返回结果。
2851
+
2852
+ #### Properties
2853
+
2854
+ ##### characteristics
2855
+
2856
+ > **characteristics**: [`BluetoothCharacteristic`](doubao-apps-sdk-open-api.md#bluetoothcharacteristic)[]
2857
+
2858
+ 特征值列表。
2859
+
2860
+ ***
2861
+
2862
+ ### GetBLEDeviceRSSIParams
2863
+
2864
+ 获取 BLE RSSI 的请求参数。
2865
+
2866
+ #### Properties
2867
+
2868
+ ##### deviceId
2869
+
2870
+ > **deviceId**: `string`
2871
+
2872
+ 蓝牙设备 ID。
2873
+
2874
+ ***
2875
+
2876
+ ### GetBLEDeviceRSSIResult
2877
+
2878
+ 获取 BLE RSSI 的返回结果。
2879
+
2880
+ #### Properties
2881
+
2882
+ ##### rssi
2883
+
2884
+ > **rssi**: `number`
2885
+
2886
+ RSSI 信号强度,单位 dBm。
2887
+
2888
+ ***
2889
+
2890
+ ### GetBLEDeviceServicesParams
2891
+
2892
+ 获取 BLE 服务列表的请求参数。
2893
+
2894
+ #### Properties
2895
+
2896
+ ##### deviceId
2897
+
2898
+ > **deviceId**: `string`
2899
+
2900
+ 蓝牙设备 ID。
2901
+
2902
+ ***
2903
+
2904
+ ### GetBLEDeviceServicesResult
2905
+
2906
+ 获取 BLE 服务列表的返回结果。
2907
+
2908
+ #### Properties
2909
+
2910
+ ##### services
2911
+
2912
+ > **services**: [`BluetoothService`](doubao-apps-sdk-open-api.md#bluetoothservice)[]
2913
+
2914
+ 设备服务列表。
2915
+
2916
+ ***
2917
+
2918
+ ### GetBLEMTUParams
2919
+
2920
+ 获取 BLE MTU 的请求参数。
2921
+
2922
+ #### Properties
2923
+
2924
+ ##### deviceId
2925
+
2926
+ > **deviceId**: `string`
2927
+
2928
+ 蓝牙设备 ID。
2929
+
2930
+ ##### writeType?
2931
+
2932
+ > `optional` **writeType**: [`BluetoothWriteType`](doubao-apps-sdk-open-api.md#bluetoothwritetype)
2933
+
2934
+ 写入模式。
2935
+
2936
+ ***
2937
+
2938
+ ### GetBLEMTUResult
2939
+
2940
+ 获取 BLE MTU 的返回结果。
2941
+
2942
+ #### Properties
2943
+
2944
+ ##### mtu
2945
+
2946
+ > **mtu**: `number`
2947
+
2948
+ 当前 MTU。
2949
+
2950
+ ***
2951
+
2952
+ ### GetBatteryInfoResult
2953
+
2954
+ 电池信息。
2955
+
2956
+ #### Properties
2957
+
2958
+ ##### isCharging
2959
+
2960
+ > **isCharging**: `boolean`
2961
+
2962
+ 是否正在充电。
2963
+
2964
+ ##### level
2965
+
2966
+ > **level**: `number`
2967
+
2968
+ 当前电量,范围 1 - 100。
2969
+
2970
+ ***
2971
+
2972
+ ### GetBeaconsResult
2973
+
2974
+ 获取 iBeacon 列表的返回结果。
2975
+
2976
+ #### Properties
2977
+
2978
+ ##### beacons
2979
+
2980
+ > **beacons**: [`BeaconInfo`](doubao-apps-sdk-open-api.md#beaconinfo)[]
2981
+
2982
+ 当前搜到的 iBeacon 列表。
2983
+
2984
+ ***
2985
+
2986
+ ### GetBluetoothAdapterStateResult
2987
+
2988
+ 蓝牙适配器状态。
2989
+
2990
+ #### Properties
2991
+
2992
+ ##### available
2993
+
2994
+ > **available**: `boolean`
2995
+
2996
+ 蓝牙适配器是否可用。
2997
+
2998
+ ##### discovering
2999
+
3000
+ > **discovering**: `boolean`
3001
+
3002
+ 是否正在搜索蓝牙设备。
3003
+
3004
+ ***
3005
+
3006
+ ### GetBluetoothDevicesResult
3007
+
3008
+ 获取蓝牙设备列表的返回结果。
3009
+
3010
+ #### Properties
3011
+
3012
+ ##### devices
3013
+
3014
+ > **devices**: [`BluetoothDevice`](doubao-apps-sdk-open-api.md#bluetoothdevice)[]
3015
+
3016
+ 当前蓝牙模块已发现的设备列表。
3017
+
3018
+ ***
3019
+
3020
+ ### GetClipboardDataResult
3021
+
3022
+ 剪贴板读取结果。
3023
+
3024
+ #### Properties
3025
+
3026
+ ##### data
3027
+
3028
+ > **data**: `string`
3029
+
3030
+ 当前剪贴板内容。
3031
+
3032
+ ***
3033
+
3034
+ ### GetConnectedBluetoothDevicesParams
3035
+
3036
+ 获取已连接蓝牙设备的请求参数。
3037
+
3038
+ #### Properties
3039
+
3040
+ ##### services
3041
+
3042
+ > **services**: `string`[]
3043
+
3044
+ 蓝牙主服务 UUID 列表。
3045
+
3046
+ ***
3047
+
3048
+ ### GetConnectedBluetoothDevicesResult
3049
+
3050
+ 获取已连接蓝牙设备的返回结果。
3051
+
3052
+ #### Properties
3053
+
3054
+ ##### devices
3055
+
3056
+ > **devices**: [`ConnectedBluetoothDevice`](doubao-apps-sdk-open-api.md#connectedbluetoothdevice)[]
3057
+
3058
+ 已连接设备列表。
3059
+
3060
+ ***
3061
+
3062
+ ### GetConnectedWifiParams
3063
+
3064
+ 获取当前已连接 Wi-Fi 的请求参数。
3065
+
3066
+ #### Properties
3067
+
3068
+ ##### partialInfo?
3069
+
3070
+ > `optional` **partialInfo**: `boolean`
3071
+
3072
+ 是否只返回部分 Wi-Fi 信息。
3073
+
3074
+ ***
3075
+
3076
+ ### GetConnectedWifiResult
3077
+
3078
+ 获取当前已连接 Wi-Fi 的返回结果。
3079
+
3080
+ #### Properties
3081
+
3082
+ ##### wifi
3083
+
3084
+ > **wifi**: [`WifiInfo`](doubao-apps-sdk-open-api.md#wifiinfo)
3085
+
3086
+ 当前连接的 Wi-Fi 信息。
3087
+
3088
+ ***
3089
+
3090
+ ### GetLocalIPAddressResult
3091
+
3092
+ 获取局域网 IP 的返回结果。
3093
+
3094
+ #### Properties
3095
+
3096
+ ##### localIp
3097
+
3098
+ > **localIp**: `string`
3099
+
3100
+ 本机局域网 IP 地址。
3101
+
3102
+ ##### netmask?
3103
+
3104
+ > `optional` **netmask**: `string`
3105
+
3106
+ 子网掩码。
3107
+
3108
+ ***
3109
+
3110
+ ### GetLocationParams
3111
+
3112
+ #### Properties
3113
+
3114
+ ##### maxCacheMs?
3115
+
3116
+ > `optional` **maxCacheMs**: `number`
3117
+
3118
+ 缓存时间,单位毫秒,默认为0
3119
+
3120
+ ##### mode?
3121
+
3122
+ > `optional` **mode**: `number`
3123
+
3124
+ 定位模式
3125
+ 0:低功耗
3126
+ 1:仅设备
3127
+ 2:高精度(默认)
3128
+
3129
+ ##### source?
3130
+
3131
+ > `optional` **source**: `string`
3132
+
3133
+ 调用业务方
3134
+
3135
+ ##### timeoutMs?
3136
+
3137
+ > `optional` **timeoutMs**: `number`
3138
+
3139
+ 超时时间,单位毫秒,默认 30000
3140
+
3141
+ ***
3142
+
3143
+ ### GetLocationResponse
3144
+
3145
+ #### Properties
3146
+
3147
+ ##### accuracy
3148
+
3149
+ > **accuracy**: `number`
3150
+
3151
+ 定位精度,单位:米
3152
+
3153
+ ##### latitude
3154
+
3155
+ > **latitude**: `number`
3156
+
3157
+ 纬度
3158
+
3159
+ ##### longitude
3160
+
3161
+ > **longitude**: `number`
3162
+
3163
+ 经度
3164
+
3165
+ ##### speed
3166
+
3167
+ > **speed**: `number`
3168
+
3169
+ 行进速度,单位:米/秒
3170
+
3171
+ ##### timestamp
3172
+
3173
+ > **timestamp**: `string`
3174
+
3175
+ 时间戳
3176
+
3177
+ ***
3178
+
3179
+ ### GetNetworkTypeParams
3180
+
3181
+ 获取网络类型的请求参数。
3182
+
3183
+ 当前无需传入任何字段,预留扩展位。
3184
+
3185
+ ***
3186
+
3187
+ ### GetNetworkTypeResult
3188
+
3189
+ 获取网络类型的返回结果。
3190
+
3191
+ #### Properties
3192
+
3193
+ ##### hasSystemProxy?
3194
+
3195
+ > `optional` **hasSystemProxy**: `boolean`
3196
+
3197
+ 设备是否使用了系统代理。
3198
+
3199
+ ##### networkType
3200
+
3201
+ > **networkType**: [`NetworkType`](doubao-apps-sdk-open-api.md#networktype-1)
3202
+
3203
+ 当前网络类型。
3204
+
3205
+ ##### signalStrength?
3206
+
3207
+ > `optional` **signalStrength**: `number`
3208
+
3209
+ 信号强弱,单位 dBm。
3210
+
3211
+ ##### weakNet?
3212
+
3213
+ > `optional` **weakNet**: `boolean`
3214
+
3215
+ 是否处于弱网环境。
3216
+
3217
+ ***
3218
+
3219
+ ### GetOrderPaymentParams
3220
+
3221
+ #### Properties
3222
+
3223
+ ##### orderId
3224
+
3225
+ > **orderId**: `string`
3226
+
3227
+ ***
3228
+
3229
+ ### GetOrderPaymentResult
3230
+
3231
+ #### Properties
3232
+
3233
+ ##### logId
3234
+
3235
+ > **logId**: `string`
3236
+
3237
+ ##### orderId
3238
+
3239
+ > **orderId**: `string`
3240
+
3241
+ ***
3242
+
3243
+ ### GetRandomValuesParams
3244
+
3245
+ 获取安全随机数的请求参数。
3246
+
3247
+ #### Properties
3248
+
3249
+ ##### length
3250
+
3251
+ > **length**: `number`
3252
+
3253
+ 需要生成的字节数。
3254
+
3255
+ ***
3256
+
3257
+ ### GetRandomValuesResult
3258
+
3259
+ 获取安全随机数的返回结果。
3260
+
3261
+ #### Properties
3262
+
3263
+ ##### randomValues
3264
+
3265
+ > **randomValues**: `ArrayBuffer`
3266
+
3267
+ 生成的随机字节。
3268
+
3269
+ ***
3270
+
3271
+ ### GetScreenBrightnessResult
3272
+
3273
+ #### Properties
3274
+
3275
+ ##### value
3276
+
3277
+ > **value**: `number`
3278
+
3279
+ 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮
3280
+
3281
+ ***
3282
+
3283
+ ### GetSelectedTextRangeResult
3284
+
3285
+ 获取输入框选区范围的返回结果。
3286
+
3287
+ #### Properties
3288
+
3289
+ ##### end
3290
+
3291
+ > **end**: `number`
3292
+
3293
+ 选区结束位置。
3294
+
3295
+ ##### start
3296
+
3297
+ > **start**: `number`
3298
+
3299
+ 选区起始位置。
3300
+
3301
+ ***
3302
+
3303
+ ### GetStorageInfoResult
3304
+
3305
+ #### Properties
3306
+
3307
+ ##### currentSize
3308
+
3309
+ > **currentSize**: `number`
3310
+
3311
+ 当前占用的空间大小,单位 KB
3312
+
3313
+ ##### keys
3314
+
3315
+ > **keys**: `string`[]
3316
+
3317
+ 当前 storage 中所有的 key
3318
+
3319
+ ##### limitSize
3320
+
3321
+ > **limitSize**: `number`
3322
+
3323
+ 限制的空间大小,单位 KB
3324
+
3325
+ ***
3326
+
3327
+ ### GetStorageParams
3328
+
3329
+ #### Properties
3330
+
3331
+ ##### key
3332
+
3333
+ > **key**: `string`
3334
+
3335
+ 本地缓存键名
3336
+
3337
+ ***
1078
3338
 
1079
- ### AppBaseInfoHost
3339
+ ### GetStorageResult\<TData\>
3340
+
3341
+ #### Type parameters
3342
+
3343
+ • **TData** = `unknown`
1080
3344
 
1081
3345
  #### Properties
1082
3346
 
1083
- ##### appId
3347
+ ##### data
1084
3348
 
1085
- > **appId**: `string`
3349
+ > **data**: `TData`
1086
3350
 
1087
- 宿主 app 对应的 appId
3351
+ key 对应的数据
1088
3352
 
1089
3353
  ***
1090
3354
 
1091
- ### AuthorizeRequest
3355
+ ### GetWifiListResult
3356
+
3357
+ 获取 Wi-Fi 列表的返回结果。
1092
3358
 
1093
3359
  #### Properties
1094
3360
 
1095
- ##### scope
3361
+ ##### wifiList
1096
3362
 
1097
- > **scope**: [`Scope`](doubao-apps-sdk-open-api.md#scope-1)
3363
+ > **wifiList**: [`WifiInfo`](doubao-apps-sdk-open-api.md#wifiinfo)[]
1098
3364
 
1099
- 授权范围
3365
+ 当前获取到的 Wi-Fi 列表。
1100
3366
 
1101
3367
  ***
1102
3368
 
1103
- ### CloseParams
3369
+ ### GetWindowInfoResult
1104
3370
 
1105
3371
  #### Properties
1106
3372
 
1107
- ##### containerID?
3373
+ ##### pixelRatio
1108
3374
 
1109
- > `optional` **containerID**: `string`
3375
+ > **pixelRatio**: `number`
1110
3376
 
1111
- 指定一个要关闭的页面
3377
+ 设备像素比
1112
3378
 
1113
- ***
3379
+ ##### safeArea?
1114
3380
 
1115
- ### DoubaoAppAccountInfo
3381
+ > `optional` **safeArea**: [`WindowSafeArea`](doubao-apps-sdk-open-api.md#windowsafearea)
1116
3382
 
1117
- 豆包 App 账号信息。
3383
+ 安全区域
1118
3384
 
1119
- #### Properties
3385
+ ##### screenHeight
1120
3386
 
1121
- ##### appId
3387
+ > **screenHeight**: `number`
1122
3388
 
1123
- > **appId**: `string`
3389
+ 屏幕高度
1124
3390
 
1125
- 豆包 App appId
3391
+ ##### screenTop
1126
3392
 
1127
- ##### envVersion
3393
+ > **screenTop**: `number`
1128
3394
 
1129
- > **envVersion**: `"develop"` \| `"trial"` \| `"release"`
3395
+ 窗口上边缘的 y
1130
3396
 
1131
- 豆包 App 运行环境。
3397
+ ##### screenWidth
1132
3398
 
1133
- - develop: 开发版
1134
- - trial: 体验版
1135
- - release: 正式版
3399
+ > **screenWidth**: `number`
1136
3400
 
1137
- ##### version
3401
+ 屏幕宽度
1138
3402
 
1139
- > **version**: `string`
3403
+ ##### statusBarHeight
1140
3404
 
1141
- 线上豆包 App 版本号。
3405
+ > **statusBarHeight**: `number`
3406
+
3407
+ 状态栏高度
3408
+
3409
+ ##### windowHeight
3410
+
3411
+ > **windowHeight**: `number`
3412
+
3413
+ 可使用窗口高度
3414
+
3415
+ ##### windowWidth
3416
+
3417
+ > **windowWidth**: `number`
3418
+
3419
+ 可使用窗口宽度
1142
3420
 
1143
3421
  ***
1144
3422
 
1145
- ### GetAccountInfoResult
3423
+ ### IsBluetoothDevicePairedParams
1146
3424
 
1147
- 获取当前账号信息。
3425
+ 查询蓝牙设备配对状态的请求参数。
1148
3426
 
1149
3427
  #### Properties
1150
3428
 
1151
- ##### miniProgram
3429
+ ##### deviceId
1152
3430
 
1153
- > **miniProgram**: [`DoubaoAppAccountInfo`](doubao-apps-sdk-open-api.md#doubaoappaccountinfo)
3431
+ > **deviceId**: `string`
1154
3432
 
1155
- 豆包 App账号信息
3433
+ 蓝牙设备 ID。
1156
3434
 
1157
- ##### plugin?
3435
+ ***
1158
3436
 
1159
- > `optional` **plugin**: [`PluginAccountInfo`](doubao-apps-sdk-open-api.md#pluginaccountinfo)
3437
+ ### KeyboardHeightChangeEvent
1160
3438
 
1161
- 插件账号信息(仅在插件中调用时包含)
3439
+ #### Properties
3440
+
3441
+ ##### height
3442
+
3443
+ > **height**: `number`
3444
+
3445
+ 键盘高度,单位 px。
1162
3446
 
1163
3447
  ***
1164
3448
 
1165
- ### GetAppBaseInfoResult
3449
+ ### LoginRequest
1166
3450
 
1167
3451
  #### Properties
1168
3452
 
1169
- ##### SDKVersion?
3453
+ ##### timeout?
1170
3454
 
1171
- > `optional` **SDKVersion**: `string`
3455
+ > `optional` **timeout**: `number`
1172
3456
 
1173
- 客户端基础库版本
3457
+ Timeout in milliseconds
1174
3458
 
1175
- ##### enableDebug?
3459
+ ***
1176
3460
 
1177
- > `optional` **enableDebug**: `boolean`
3461
+ ### LoginResult
1178
3462
 
1179
- 是否已打开调试
3463
+ #### Properties
1180
3464
 
1181
- ##### host?
3465
+ ##### code
1182
3466
 
1183
- > `optional` **host**: [`AppBaseInfoHost`](doubao-apps-sdk-open-api.md#appbaseinfohost)
3467
+ > **code**: `string`
1184
3468
 
1185
- 当前豆包 App运行的宿主环境
3469
+ Login credential code
1186
3470
 
1187
- ##### language
3471
+ ***
1188
3472
 
1189
- > **language**: `string`
3473
+ ### LoginWithWidgetRequest
1190
3474
 
1191
- 当前语言
3475
+ #### Properties
1192
3476
 
1193
- ##### theme?
3477
+ ##### loginType
1194
3478
 
1195
- > `optional` **theme**: `"light"` \| `"dark"`
3479
+ > **loginType**: `LoginType`
1196
3480
 
1197
- 当前主题
3481
+ Login type identifier
1198
3482
 
1199
- ##### version?
3483
+ ***
1200
3484
 
1201
- > `optional` **version**: `string`
3485
+ ### LoginWithWidgetResult
1202
3486
 
1203
- 宿主版本号
3487
+ #### Properties
3488
+
3489
+ ##### result
3490
+
3491
+ > **result**: `boolean`
3492
+
3493
+ Whether the login is successful
1204
3494
 
1205
3495
  ***
1206
3496
 
1207
- ### GetLocationParams
3497
+ ### MakeBluetoothPairParams
3498
+
3499
+ 蓝牙配对请求参数。
1208
3500
 
1209
3501
  #### Properties
1210
3502
 
1211
- ##### maxCacheMs?
3503
+ ##### deviceId
1212
3504
 
1213
- > `optional` **maxCacheMs**: `number`
3505
+ > **deviceId**: `string`
1214
3506
 
1215
- 缓存时间,单位毫秒,默认为0
3507
+ 蓝牙设备 ID。
1216
3508
 
1217
- ##### mode?
3509
+ ##### pin
1218
3510
 
1219
- > `optional` **mode**: `number`
3511
+ > **pin**: `string`
1220
3512
 
1221
- 定位模式
1222
- 0:低功耗
1223
- 1:仅设备
1224
- 2:高精度(默认)
3513
+ 配对 PIN 码。
1225
3514
 
1226
- ##### source?
3515
+ ##### timeout?
1227
3516
 
1228
- > `optional` **source**: `string`
3517
+ > `optional` **timeout**: `number`
1229
3518
 
1230
- 调用业务方
3519
+ 超时时间,单位毫秒。
1231
3520
 
1232
- ##### timeoutMs?
3521
+ ***
1233
3522
 
1234
- > `optional` **timeoutMs**: `number`
3523
+ ### MakePhoneCallParams
1235
3524
 
1236
- 超时时间,单位毫秒,默认 30000
3525
+ #### Properties
3526
+
3527
+ ##### phoneNumber
3528
+
3529
+ > **phoneNumber**: `string`
3530
+
3531
+ 需要拨打的电话号码
1237
3532
 
1238
3533
  ***
1239
3534
 
1240
- ### GetLocationResponse
3535
+ ### NavigateBackParams
1241
3536
 
1242
3537
  #### Properties
1243
3538
 
1244
- ##### accuracy
3539
+ ##### delta?
1245
3540
 
1246
- > **accuracy**: `number`
3541
+ > `optional` **delta**: `number`
1247
3542
 
1248
- 定位精度,单位:米
3543
+ 返回的页面数,如果 delta 大于现有页面数,则返回到页面栈中只剩一个页面为止。
1249
3544
 
1250
- ##### latitude
3545
+ ***
1251
3546
 
1252
- > **latitude**: `number`
3547
+ ### NavigateToParams
1253
3548
 
1254
- 纬度
3549
+ #### Properties
1255
3550
 
1256
- ##### longitude
3551
+ ##### url
1257
3552
 
1258
- > **longitude**: `number`
3553
+ > **url**: `string`
1259
3554
 
1260
- 经度
3555
+ 跳转的页面的路径,如 'path?key=value&key2=value2'
1261
3556
 
1262
- ##### speed
3557
+ ***
1263
3558
 
1264
- > **speed**: `number`
3559
+ ### NotifyBLECharacteristicValueChangeParams
1265
3560
 
1266
- 行进速度,单位:米/秒
3561
+ 订阅 BLE 特征值变化的请求参数。
1267
3562
 
1268
- ##### timestamp
3563
+ #### Properties
1269
3564
 
1270
- > **timestamp**: `string`
3565
+ ##### characteristicId
1271
3566
 
1272
- 时间戳
3567
+ > **characteristicId**: `string`
1273
3568
 
1274
- ***
3569
+ 特征值 ID。
1275
3570
 
1276
- ### GetNetworkTypeParams
3571
+ ##### deviceId
1277
3572
 
1278
- 获取网络类型的请求参数。
3573
+ > **deviceId**: `string`
1279
3574
 
1280
- 当前无需传入任何字段,预留扩展位。
3575
+ 蓝牙设备 ID。
1281
3576
 
1282
- ***
3577
+ ##### serviceId
1283
3578
 
1284
- ### GetNetworkTypeResult
3579
+ > **serviceId**: `string`
1285
3580
 
1286
- 获取网络类型的返回结果。
3581
+ 服务 ID。
3582
+
3583
+ ##### state
3584
+
3585
+ > **state**: `boolean`
3586
+
3587
+ 是否启用订阅。
3588
+
3589
+ ##### type?
3590
+
3591
+ > `optional` **type**: [`BluetoothNotifyType`](doubao-apps-sdk-open-api.md#bluetoothnotifytype)
3592
+
3593
+ 订阅类型。
3594
+
3595
+ ***
3596
+
3597
+ ### OpenAppRequest
1287
3598
 
1288
3599
  #### Properties
1289
3600
 
1290
- ##### hasSystemProxy?
3601
+ ##### fallbackUrl?
1291
3602
 
1292
- > `optional` **hasSystemProxy**: `boolean`
3603
+ > `optional` **fallbackUrl**: `string`
1293
3604
 
1294
- 设备是否使用了系统代理。
3605
+ Optional fallback URL when deep link fails
1295
3606
 
1296
- ##### networkType
3607
+ ##### targetPackage?
1297
3608
 
1298
- > **networkType**: [`NetworkType`](doubao-apps-sdk-open-api.md#networktype-1)
3609
+ > `optional` **targetPackage**: `string`
1299
3610
 
1300
- 当前网络类型。
3611
+ Optional target package name for Android
1301
3612
 
1302
- ##### signalStrength?
3613
+ ##### uri
1303
3614
 
1304
- > `optional` **signalStrength**: `number`
3615
+ > **uri**: `string`
1305
3616
 
1306
- 信号强弱,单位 dBm。
3617
+ Target URI to open, e.g. scheme://path?query
1307
3618
 
1308
- ##### weakNet?
3619
+ ***
1309
3620
 
1310
- > `optional` **weakNet**: `boolean`
3621
+ ### OpenAppResult
1311
3622
 
1312
- 是否处于弱网环境。
3623
+ #### Properties
3624
+
3625
+ ##### status
3626
+
3627
+ > **status**: [`OpenAppStatus`](doubao-apps-sdk-open-api.md#openappstatus)
3628
+
3629
+ Execution status from client
1313
3630
 
1314
3631
  ***
1315
3632
 
1316
- ### GetOrderPaymentParams
3633
+ ### OpenBluetoothAdapterParams
3634
+
3635
+ 打开蓝牙适配器的请求参数。
3636
+
3637
+ #### Properties
3638
+
3639
+ ##### mode?
3640
+
3641
+ > `optional` **mode**: [`BluetoothAdapterMode`](doubao-apps-sdk-open-api.md#bluetoothadaptermode)
3642
+
3643
+ 蓝牙模式。
3644
+
3645
+ ***
3646
+
3647
+ ### PluginAccountInfo
3648
+
3649
+ 插件账号信息(仅在插件中调用时包含)。
3650
+
3651
+ #### Properties
3652
+
3653
+ ##### appId
3654
+
3655
+ > **appId**: `string`
3656
+
3657
+ 插件 appId
1317
3658
 
1318
- #### Properties
3659
+ ##### version
1319
3660
 
1320
- ##### orderId
3661
+ > **version**: `string`
1321
3662
 
1322
- > **orderId**: `string`
3663
+ 插件版本号,'a.b.c' 形式
1323
3664
 
1324
3665
  ***
1325
3666
 
1326
- ### GetOrderPaymentResult
3667
+ ### PostLoginResultRequest
1327
3668
 
1328
3669
  #### Properties
1329
3670
 
1330
- ##### logId
3671
+ ##### code?
1331
3672
 
1332
- > **logId**: `string`
3673
+ > `optional` **code**: `string`
1333
3674
 
1334
- ##### orderId
3675
+ Authorization login credential, valid when login result is true
1335
3676
 
1336
- > **orderId**: `string`
3677
+ ##### result
3678
+
3679
+ > **result**: `boolean`
3680
+
3681
+ Login result, true means success, false means failure
1337
3682
 
1338
3683
  ***
1339
3684
 
1340
- ### GetScreenBrightnessResult
3685
+ ### PrivacySettingResult
1341
3686
 
1342
3687
  #### Properties
1343
3688
 
1344
- ##### value
3689
+ ##### needAuthorization
1345
3690
 
1346
- > **value**: `number`
3691
+ > **needAuthorization**: `boolean`
1347
3692
 
1348
- 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮
3693
+ Whether user authorization for privacy agreement is required
1349
3694
 
1350
3695
  ***
1351
3696
 
1352
- ### GetStorageInfoResult
3697
+ ### ReadBLECharacteristicValueParams
3698
+
3699
+ 读取 BLE 特征值的请求参数。
1353
3700
 
1354
3701
  #### Properties
1355
3702
 
1356
- ##### currentSize
3703
+ ##### characteristicId
1357
3704
 
1358
- > **currentSize**: `number`
3705
+ > **characteristicId**: `string`
1359
3706
 
1360
- 当前占用的空间大小,单位 KB
3707
+ 特征值 ID。
1361
3708
 
1362
- ##### keys
3709
+ ##### deviceId
1363
3710
 
1364
- > **keys**: `string`[]
3711
+ > **deviceId**: `string`
1365
3712
 
1366
- 当前 storage 中所有的 key
3713
+ 蓝牙设备 ID。
1367
3714
 
1368
- ##### limitSize
3715
+ ##### serviceId
1369
3716
 
1370
- > **limitSize**: `number`
3717
+ > **serviceId**: `string`
1371
3718
 
1372
- 限制的空间大小,单位 KB
3719
+ 服务 ID。
1373
3720
 
1374
3721
  ***
1375
3722
 
1376
- ### GetStorageParams
3723
+ ### RemoveStorageParams
1377
3724
 
1378
3725
  #### Properties
1379
3726
 
@@ -1385,261 +3732,322 @@ showToast({
1385
3732
 
1386
3733
  ***
1387
3734
 
1388
- ### GetStorageResult\<TData\>
1389
-
1390
- #### Type parameters
1391
-
1392
- • **TData** = `unknown`
3735
+ ### RequestOrderParams
1393
3736
 
1394
3737
  #### Properties
1395
3738
 
1396
3739
  ##### data
1397
3740
 
1398
- > **data**: `TData`
3741
+ > **data**: `string`
1399
3742
 
1400
- key 对应的数据
3743
+ ##### dbAuthorization
3744
+
3745
+ > **dbAuthorization**: `string`
1401
3746
 
1402
3747
  ***
1403
3748
 
1404
- ### GetWindowInfoResult
3749
+ ### RequestOrderResult
1405
3750
 
1406
3751
  #### Properties
1407
3752
 
1408
- ##### pixelRatio
3753
+ ##### logId
1409
3754
 
1410
- > **pixelRatio**: `number`
3755
+ > **logId**: `string`
1411
3756
 
1412
- 设备像素比
3757
+ ##### orderId
1413
3758
 
1414
- ##### safeArea?
3759
+ > **orderId**: `string`
1415
3760
 
1416
- > `optional` **safeArea**: [`WindowSafeArea`](doubao-apps-sdk-open-api.md#windowsafearea)
3761
+ ***
1417
3762
 
1418
- 安全区域
3763
+ ### RequestParams
1419
3764
 
1420
- ##### screenHeight
3765
+ 网络请求参数。
1421
3766
 
1422
- > **screenHeight**: `number`
3767
+ #### Properties
1423
3768
 
1424
- 屏幕高度
3769
+ ##### data?
1425
3770
 
1426
- ##### screenTop
3771
+ > `optional` **data**: `string` \| `ArrayBuffer` \| `Record`\<`string`, `any`\>
1427
3772
 
1428
- > **screenTop**: `number`
3773
+ 请求体数据。
1429
3774
 
1430
- 窗口上边缘的 y
3775
+ 传给服务器的数据最终会是 `String` 或 `ArrayBuffer`:
3776
+ - 若 `data` 是 `string` 或 `ArrayBuffer`,直接使用;
3777
+ - 若 `header['content-type']` 是 `application/x-www-form-urlencoded`,会被编码为 query string,例如:`encodeURIComponent(k)=encodeURIComponent(v)`;
3778
+ - 若 `header['content-type']` 是 `application/json`,会执行 JSON 序列化;
3779
+ - 若 `data` 是普通对象且未命中上述类型,也会执行 JSON 序列化;
3780
+ - 其他类型会调用 `toString()`
1431
3781
 
1432
- ##### screenWidth
3782
+ ##### dataType?
1433
3783
 
1434
- > **screenWidth**: `number`
3784
+ > `optional` **dataType**: `"string"` \| `"json"`
1435
3785
 
1436
- 屏幕宽度
3786
+ 期望返回的数据格式。
3787
+ - `json`: 尝试按 JSON 解析;
3788
+ - `string`: 按字符串返回。
1437
3789
 
1438
- ##### statusBarHeight
3790
+ ###### Default
1439
3791
 
1440
- > **statusBarHeight**: `number`
3792
+ ```ts
3793
+ "json"
3794
+ ```
1441
3795
 
1442
- 状态栏高度
3796
+ ##### header?
1443
3797
 
1444
- ##### windowHeight
3798
+ > `optional` **header**: `Record`\<`string`, `string`\>
1445
3799
 
1446
- > **windowHeight**: `number`
3800
+ 请求 Header。
1447
3801
 
1448
- 可使用窗口高度
3802
+ ###### Default
1449
3803
 
1450
- ##### windowWidth
3804
+ ```ts
3805
+ {"content-type": "application/json"}
3806
+ ```
1451
3807
 
1452
- > **windowWidth**: `number`
3808
+ ##### method?
1453
3809
 
1454
- 可使用窗口宽度
3810
+ > `optional` **method**: [`RequestMethod`](doubao-apps-sdk-open-api.md#requestmethod)
1455
3811
 
1456
- ***
3812
+ 请求方法。
1457
3813
 
1458
- ### KeyboardHeightChangeEvent
3814
+ ###### Default
1459
3815
 
1460
- #### Properties
3816
+ ```ts
3817
+ "GET"
3818
+ ```
1461
3819
 
1462
- ##### height
3820
+ ##### url
1463
3821
 
1464
- > **height**: `number`
3822
+ > **url**: `string`
1465
3823
 
1466
- 键盘高度,单位 px
3824
+ 请求地址,需为完整的 **HTTPS** URL
1467
3825
 
1468
3826
  ***
1469
3827
 
1470
- ### LoginRequest
3828
+ ### RequestResponse
3829
+
3830
+ 网络请求返回结果。
1471
3831
 
1472
3832
  #### Properties
1473
3833
 
1474
- ##### timeout?
3834
+ ##### data?
1475
3835
 
1476
- > `optional` **timeout**: `number`
3836
+ > `optional` **data**: `string` \| `ArrayBuffer` \| `Record`\<`string`, `any`\>
1477
3837
 
1478
- Timeout in milliseconds
3838
+ 响应数据,类型由 `dataType` 决定。
1479
3839
 
1480
- ***
3840
+ ##### header
1481
3841
 
1482
- ### LoginResult
3842
+ > **header**: `Record`\<`string`, `string`\>
1483
3843
 
1484
- #### Properties
3844
+ HTTP 响应头。
1485
3845
 
1486
- ##### code
3846
+ ##### statusCode
1487
3847
 
1488
- > **code**: `string`
3848
+ > **statusCode**: `number`
1489
3849
 
1490
- Login credential code
3850
+ HTTP 状态码。
1491
3851
 
1492
3852
  ***
1493
3853
 
1494
- ### LoginWithWidgetRequest
3854
+ ### ScanCodeParams
3855
+
3856
+ 扫码请求参数。
1495
3857
 
1496
3858
  #### Properties
1497
3859
 
1498
- ##### loginType
3860
+ ##### onlyFromCamera?
1499
3861
 
1500
- > **loginType**: `LoginType`
3862
+ > `optional` **onlyFromCamera**: `boolean`
1501
3863
 
1502
- Login type identifier
3864
+ 是否仅允许从相机扫码。
3865
+
3866
+ ##### scanType?
3867
+
3868
+ > `optional` **scanType**: [`ScanCodeType`](doubao-apps-sdk-open-api.md#scancodetype)[]
3869
+
3870
+ 允许的扫码类型。
1503
3871
 
1504
3872
  ***
1505
3873
 
1506
- ### LoginWithWidgetResult
3874
+ ### ScanCodeResult
3875
+
3876
+ 扫码返回结果。
1507
3877
 
1508
3878
  #### Properties
1509
3879
 
1510
- ##### result
3880
+ ##### characterSet
1511
3881
 
1512
- > **result**: `boolean`
3882
+ > **characterSet**: `string`
1513
3883
 
1514
- Whether the login is successful
3884
+ 字符集。
1515
3885
 
1516
- ***
3886
+ ##### path
1517
3887
 
1518
- ### MakePhoneCallParams
3888
+ > **path**: `string`
1519
3889
 
1520
- #### Properties
3890
+ 当前宿主可识别的页面路径。
1521
3891
 
1522
- ##### phoneNumber
3892
+ ##### rawData
1523
3893
 
1524
- > **phoneNumber**: `string`
3894
+ > **rawData**: `string`
1525
3895
 
1526
- 需要拨打的电话号码
3896
+ 原始数据,通常为 Base64 字符串。
1527
3897
 
1528
- ***
3898
+ ##### result
1529
3899
 
1530
- ### NavigateBackParams
3900
+ > **result**: `string`
1531
3901
 
1532
- #### Properties
3902
+ 扫码结果文本。
1533
3903
 
1534
- ##### delta?
3904
+ ##### scanType
1535
3905
 
1536
- > `optional` **delta**: `number`
3906
+ > **scanType**: [`ScanResultType`](doubao-apps-sdk-open-api.md#scanresulttype)
1537
3907
 
1538
- 返回的页面数,如果 delta 大于现有页面数,则返回到页面栈中只剩一个页面为止。
3908
+ 扫码结果类型。
1539
3909
 
1540
3910
  ***
1541
3911
 
1542
- ### NavigateToParams
3912
+ ### SendHCEMessageParams
3913
+
3914
+ 发送 HCE 消息的请求参数。
1543
3915
 
1544
3916
  #### Properties
1545
3917
 
1546
- ##### url
3918
+ ##### data
1547
3919
 
1548
- > **url**: `string`
3920
+ > **data**: `ArrayBuffer`
1549
3921
 
1550
- 跳转的页面的路径,如 'path?key=value&key2=value2'
3922
+ 要发送的二进制数据。
1551
3923
 
1552
3924
  ***
1553
3925
 
1554
- ### OpenAppRequest
3926
+ ### SendQueryMessageParams
1555
3927
 
1556
3928
  #### Properties
1557
3929
 
1558
- ##### fallbackUrl?
3930
+ ##### content
1559
3931
 
1560
- > `optional` **fallbackUrl**: `string`
3932
+ > **content**: `string`
1561
3933
 
1562
- Optional fallback URL when deep link fails
3934
+ 要发送的消息。根据类型不同,序列化方式可能不同
1563
3935
 
1564
- ##### targetPackage?
3936
+ ##### type
1565
3937
 
1566
- > `optional` **targetPackage**: `string`
3938
+ > **type**: `"text"`
1567
3939
 
1568
- Optional target package name for Android
3940
+ 消息类型,目前仅支持 text
1569
3941
 
1570
- ##### uri
3942
+ ***
1571
3943
 
1572
- > **uri**: `string`
3944
+ ### SendSmsParams
1573
3945
 
1574
- Target URI to open, e.g. scheme://path?query
3946
+ 拉起系统短信发送面板的请求参数。
1575
3947
 
1576
- ***
3948
+ #### Properties
1577
3949
 
1578
- ### OpenAppResult
3950
+ ##### message?
1579
3951
 
1580
- #### Properties
3952
+ > `optional` **message**: `string`
1581
3953
 
1582
- ##### status
3954
+ 预填到发送短信面板的内容。
1583
3955
 
1584
- > **status**: [`OpenAppStatus`](doubao-apps-sdk-open-api.md#openappstatus)
3956
+ ##### phoneNumber?
1585
3957
 
1586
- Execution status from client
3958
+ > `optional` **phoneNumber**: `string`
3959
+
3960
+ 预填到发送短信面板的手机号。
1587
3961
 
1588
3962
  ***
1589
3963
 
1590
- ### PluginAccountInfo
3964
+ ### SetBLEMTUParams
1591
3965
 
1592
- 插件账号信息(仅在插件中调用时包含)。
3966
+ 设置 BLE MTU 的请求参数。
1593
3967
 
1594
3968
  #### Properties
1595
3969
 
1596
- ##### appId
3970
+ ##### deviceId
1597
3971
 
1598
- > **appId**: `string`
3972
+ > **deviceId**: `string`
1599
3973
 
1600
- 插件 appId
3974
+ 蓝牙设备 ID。
1601
3975
 
1602
- ##### version
3976
+ ##### mtu
1603
3977
 
1604
- > **version**: `string`
3978
+ > **mtu**: `number`
1605
3979
 
1606
- 插件版本号,'a.b.c' 形式
3980
+ 目标 MTU。
1607
3981
 
1608
3982
  ***
1609
3983
 
1610
- ### PostLoginResultRequest
3984
+ ### SetBLEMTUResult
3985
+
3986
+ 设置 BLE MTU 的返回结果。
1611
3987
 
1612
3988
  #### Properties
1613
3989
 
1614
- ##### code?
3990
+ ##### mtu
1615
3991
 
1616
- > `optional` **code**: `string`
3992
+ > **mtu**: `string` \| `number`
1617
3993
 
1618
- Authorization login credential, valid when login result is true
3994
+ 最终协商得到的 MTU。
1619
3995
 
1620
- ##### result
3996
+ ***
1621
3997
 
1622
- > **result**: `boolean`
3998
+ ### SetClipboardDataParams
1623
3999
 
1624
- Login result, true means success, false means failure
4000
+ #### Properties
4001
+
4002
+ ##### data
4003
+
4004
+ > **data**: `string`
4005
+
4006
+ 需要设置的剪贴板内容
1625
4007
 
1626
4008
  ***
1627
4009
 
1628
- ### PrivacySettingResult
4010
+ ### SetKeepScreenOnParams
4011
+
4012
+ 设置屏幕常亮的请求参数。
1629
4013
 
1630
4014
  #### Properties
1631
4015
 
1632
- ##### needAuthorization
4016
+ ##### keepScreenOn
1633
4017
 
1634
- > **needAuthorization**: `boolean`
4018
+ > **keepScreenOn**: `boolean`
4019
+
4020
+ 是否保持屏幕常亮。
4021
+
4022
+ ***
4023
+
4024
+ ### SetScreenBrightnessParams
4025
+
4026
+ 设置屏幕亮度的请求参数。
4027
+
4028
+ #### Properties
4029
+
4030
+ ##### value
4031
+
4032
+ > **value**: `number`
4033
+
4034
+ 屏幕亮度值,范围 0 ~ 1。
4035
+
4036
+ ***
4037
+
4038
+ ### SetStorageParams\<TData\>
4039
+
4040
+ #### Type parameters
4041
+
4042
+ • **TData** = `unknown`
1635
4043
 
1636
- Whether user authorization for privacy agreement is required
4044
+ #### Properties
1637
4045
 
1638
- ***
4046
+ ##### data
1639
4047
 
1640
- ### RemoveStorageParams
4048
+ > **data**: `TData`
1641
4049
 
1642
- #### Properties
4050
+ 待存储的数据
1643
4051
 
1644
4052
  ##### key
1645
4053
 
@@ -1649,200 +4057,165 @@ Whether user authorization for privacy agreement is required
1649
4057
 
1650
4058
  ***
1651
4059
 
1652
- ### RequestOrderParams
4060
+ ### SetVisualEffectOnCaptureParams
1653
4061
 
1654
- #### Properties
4062
+ 设置截屏或录屏视觉效果的请求参数。
1655
4063
 
1656
- ##### data
4064
+ #### Properties
1657
4065
 
1658
- > **data**: `string`
4066
+ ##### visualEffect?
1659
4067
 
1660
- ##### dbAuthorization
4068
+ > `optional` **visualEffect**: [`CaptureVisualEffect`](doubao-apps-sdk-open-api.md#capturevisualeffect)
1661
4069
 
1662
- > **dbAuthorization**: `string`
4070
+ 截屏或录屏时的视觉表现。
1663
4071
 
1664
4072
  ***
1665
4073
 
1666
- ### RequestOrderResult
4074
+ ### SetWifiListParams
1667
4075
 
1668
- #### Properties
4076
+ 设置 Wi-Fi 预设列表的请求参数。
1669
4077
 
1670
- ##### logId
4078
+ #### Properties
1671
4079
 
1672
- > **logId**: `string`
4080
+ ##### wifiList
1673
4081
 
1674
- ##### orderId
4082
+ > **wifiList**: [`WifiListItem`](doubao-apps-sdk-open-api.md#wifilistitem)[]
1675
4083
 
1676
- > **orderId**: `string`
4084
+ 预设的 Wi-Fi 列表。
1677
4085
 
1678
4086
  ***
1679
4087
 
1680
- ### RequestParams
1681
-
1682
- 网络请求参数。
4088
+ ### ShowToastParams
1683
4089
 
1684
4090
  #### Properties
1685
4091
 
1686
- ##### data?
1687
-
1688
- > `optional` **data**: `string` \| `Record`\<`string`, `any`\> \| `ArrayBuffer`
1689
-
1690
- 请求体数据。
1691
-
1692
- 传给服务器的数据最终会是 `String` 或 `ArrayBuffer`:
1693
- - 若 `data` 是 `string` 或 `ArrayBuffer`,直接使用;
1694
- - 若 `header['content-type']` 是 `application/x-www-form-urlencoded`,会被编码为 query string,例如:`encodeURIComponent(k)=encodeURIComponent(v)`;
1695
- - 若 `header['content-type']` 是 `application/json`,会执行 JSON 序列化;
1696
- - 若 `data` 是普通对象且未命中上述类型,也会执行 JSON 序列化;
1697
- - 其他类型会调用 `toString()`
1698
-
1699
- ##### dataType?
1700
-
1701
- > `optional` **dataType**: `"string"` \| `"json"`
4092
+ ##### customIcon?
1702
4093
 
1703
- 期望返回的数据格式。
1704
- - `json`: 尝试按 JSON 解析;
1705
- - `string`: 按字符串返回。
4094
+ > `optional` **customIcon**: `string`
1706
4095
 
1707
- ###### Default
4096
+ ##### duration?
1708
4097
 
1709
- ```ts
1710
- "json"
1711
- ```
4098
+ > `optional` **duration**: `number`
1712
4099
 
1713
- ##### header?
4100
+ ##### icon?
1714
4101
 
1715
- > `optional` **header**: `Record`\<`string`, `string`\>
4102
+ > `optional` **icon**: `"success"` \| `"error"` \| `"warn"`
1716
4103
 
1717
- 请求 Header。
4104
+ ##### message
1718
4105
 
1719
- ###### Default
4106
+ > **message**: `string`
1720
4107
 
1721
- ```ts
1722
- {"content-type": "application/json"}
1723
- ```
4108
+ ##### type?
1724
4109
 
1725
- ##### method?
4110
+ > `optional` **type**: `"default"` \| `"success"` \| `"error"` \| `"warning"`
1726
4111
 
1727
- > `optional` **method**: [`RequestMethod`](doubao-apps-sdk-open-api.md#requestmethod)
4112
+ ***
1728
4113
 
1729
- 请求方法。
4114
+ ### StartAccelerometerParams
1730
4115
 
1731
- ###### Default
4116
+ 开始监听加速度的请求参数。
1732
4117
 
1733
- ```ts
1734
- "GET"
1735
- ```
4118
+ #### Properties
1736
4119
 
1737
- ##### url
4120
+ ##### interval?
1738
4121
 
1739
- > **url**: `string`
4122
+ > `optional` **interval**: [`SensorInterval`](doubao-apps-sdk-open-api.md#sensorinterval)
1740
4123
 
1741
- 请求地址,需为完整的 **HTTPS** URL。
4124
+ 监听频率。
1742
4125
 
1743
4126
  ***
1744
4127
 
1745
- ### RequestResponse
4128
+ ### StartBeaconDiscoveryParams
1746
4129
 
1747
- 网络请求返回结果。
4130
+ 开始搜索 iBeacon 的请求参数。
1748
4131
 
1749
4132
  #### Properties
1750
4133
 
1751
- ##### data?
1752
-
1753
- > `optional` **data**: `string` \| `Record`\<`string`, `any`\> \| `ArrayBuffer`
1754
-
1755
- 响应数据,类型由 `dataType` 决定。
1756
-
1757
- ##### header
4134
+ ##### ignoreBluetoothAvailable?
1758
4135
 
1759
- > **header**: `Record`\<`string`, `string`\>
4136
+ > `optional` **ignoreBluetoothAvailable**: `boolean`
1760
4137
 
1761
- HTTP 响应头。
4138
+ iOS 下是否忽略蓝牙可用性校验。
1762
4139
 
1763
- ##### statusCode
4140
+ ##### uuids
1764
4141
 
1765
- > **statusCode**: `number`
4142
+ > **uuids**: `string`[]
1766
4143
 
1767
- HTTP 状态码。
4144
+ 要搜索的 iBeacon UUID 列表。
1768
4145
 
1769
4146
  ***
1770
4147
 
1771
- ### SendQueryMessageParams
4148
+ ### StartBluetoothDevicesDiscoveryParams
4149
+
4150
+ 开始搜索蓝牙设备的请求参数。
1772
4151
 
1773
4152
  #### Properties
1774
4153
 
1775
- ##### content
4154
+ ##### allowDuplicatesKey?
1776
4155
 
1777
- > **content**: `string`
4156
+ > `optional` **allowDuplicatesKey**: `boolean`
1778
4157
 
1779
- 要发送的消息。根据类型不同,序列化方式可能不同
4158
+ 是否允许重复上报同一设备。
1780
4159
 
1781
- ##### type
4160
+ ##### interval?
1782
4161
 
1783
- > **type**: `"text"`
4162
+ > `optional` **interval**: `number`
1784
4163
 
1785
- 消息类型,目前仅支持 text
4164
+ 上报设备的间隔,单位毫秒。
1786
4165
 
1787
- ***
4166
+ ##### powerLevel?
1788
4167
 
1789
- ### SetClipboardDataParams
4168
+ > `optional` **powerLevel**: [`BluetoothPowerLevel`](doubao-apps-sdk-open-api.md#bluetoothpowerlevel)
1790
4169
 
1791
- #### Properties
4170
+ 扫描功耗等级。
1792
4171
 
1793
- ##### data
4172
+ ##### services?
1794
4173
 
1795
- > **data**: `string`
4174
+ > `optional` **services**: `string`[]
1796
4175
 
1797
- 需要设置的剪贴板内容
4176
+ 按主服务 UUID 过滤搜索范围。
1798
4177
 
1799
4178
  ***
1800
4179
 
1801
- ### SetStorageParams\<TData\>
1802
-
1803
- #### Type parameters
4180
+ ### StartDeviceMotionListeningParams
1804
4181
 
1805
- • **TData** = `unknown`
4182
+ 开始监听设备方向变化的请求参数。
1806
4183
 
1807
4184
  #### Properties
1808
4185
 
1809
- ##### data
1810
-
1811
- > **data**: `TData`
1812
-
1813
- 待存储的数据
1814
-
1815
- ##### key
4186
+ ##### interval?
1816
4187
 
1817
- > **key**: `string`
4188
+ > `optional` **interval**: [`SensorInterval`](doubao-apps-sdk-open-api.md#sensorinterval)
1818
4189
 
1819
- 本地缓存键名
4190
+ 监听频率。
1820
4191
 
1821
4192
  ***
1822
4193
 
1823
- ### ShowToastParams
4194
+ ### StartGyroscopeParams
4195
+
4196
+ 开始监听陀螺仪的请求参数。
1824
4197
 
1825
4198
  #### Properties
1826
4199
 
1827
- ##### customIcon?
4200
+ ##### interval?
1828
4201
 
1829
- > `optional` **customIcon**: `string`
4202
+ > `optional` **interval**: [`SensorInterval`](doubao-apps-sdk-open-api.md#sensorinterval)
1830
4203
 
1831
- ##### duration?
4204
+ 监听频率。
1832
4205
 
1833
- > `optional` **duration**: `number`
4206
+ ***
1834
4207
 
1835
- ##### icon?
4208
+ ### StartHCEParams
1836
4209
 
1837
- > `optional` **icon**: `"success"` \| `"error"` \| `"warn"`
4210
+ 开启 HCE 的请求参数。
1838
4211
 
1839
- ##### message
4212
+ #### Properties
1840
4213
 
1841
- > **message**: `string`
4214
+ ##### aidList
1842
4215
 
1843
- ##### type?
4216
+ > **aidList**: `string`[]
1844
4217
 
1845
- > `optional` **type**: `"default"` \| `"success"` \| `"error"` \| `"warning"`
4218
+ 需要注册到系统的 AID 列表。
1846
4219
 
1847
4220
  ***
1848
4221
 
@@ -1943,6 +4316,84 @@ blocks 数组,支持 summary/entity 混搭。
1943
4316
 
1944
4317
  ***
1945
4318
 
4319
+ ### VibrateShortParams
4320
+
4321
+ 短震动请求参数。
4322
+
4323
+ #### Properties
4324
+
4325
+ ##### type?
4326
+
4327
+ > `optional` **type**: [`VibrateShortType`](doubao-apps-sdk-open-api.md#vibrateshorttype)
4328
+
4329
+ 震动强度类型。
4330
+
4331
+ ***
4332
+
4333
+ ### WifiInfo
4334
+
4335
+ Wi-Fi 信息。
4336
+
4337
+ #### Properties
4338
+
4339
+ ##### bssid?
4340
+
4341
+ > `optional` **bssid**: `string`
4342
+
4343
+ Wi-Fi BSSID。
4344
+
4345
+ ##### frequency?
4346
+
4347
+ > `optional` **frequency**: `number`
4348
+
4349
+ 频段,单位 MHz。
4350
+
4351
+ ##### secure?
4352
+
4353
+ > `optional` **secure**: `boolean`
4354
+
4355
+ Wi-Fi 是否安全。
4356
+
4357
+ ##### signalStrength?
4358
+
4359
+ > `optional` **signalStrength**: `number`
4360
+
4361
+ 信号强度。
4362
+
4363
+ ##### ssid
4364
+
4365
+ > **ssid**: `string`
4366
+
4367
+ Wi-Fi SSID。
4368
+
4369
+ ***
4370
+
4371
+ ### WifiListItem
4372
+
4373
+ 预设 Wi-Fi 条目。
4374
+
4375
+ #### Properties
4376
+
4377
+ ##### bssid?
4378
+
4379
+ > `optional` **bssid**: `string`
4380
+
4381
+ Wi-Fi BSSID。
4382
+
4383
+ ##### password?
4384
+
4385
+ > `optional` **password**: `string`
4386
+
4387
+ Wi-Fi 密码。
4388
+
4389
+ ##### ssid?
4390
+
4391
+ > `optional` **ssid**: `string`
4392
+
4393
+ Wi-Fi SSID。
4394
+
4395
+ ***
4396
+
1946
4397
  ### WindowSafeArea
1947
4398
 
1948
4399
  #### Properties
@@ -1983,8 +4434,102 @@ blocks 数组,支持 summary/entity 混搭。
1983
4434
 
1984
4435
  安全区域宽度
1985
4436
 
4437
+ ***
4438
+
4439
+ ### WriteBLECharacteristicValueParams
4440
+
4441
+ 写入 BLE 特征值的请求参数。
4442
+
4443
+ #### Properties
4444
+
4445
+ ##### characteristicId
4446
+
4447
+ > **characteristicId**: `string`
4448
+
4449
+ 特征值 ID。
4450
+
4451
+ ##### deviceId
4452
+
4453
+ > **deviceId**: `string`
4454
+
4455
+ 蓝牙设备 ID。
4456
+
4457
+ ##### serviceId
4458
+
4459
+ > **serviceId**: `string`
4460
+
4461
+ 服务 ID。
4462
+
4463
+ ##### value
4464
+
4465
+ > **value**: `ArrayBuffer`
4466
+
4467
+ 要写入的二进制数据。
4468
+
4469
+ ##### writeType?
4470
+
4471
+ > `optional` **writeType**: [`BluetoothWriteType`](doubao-apps-sdk-open-api.md#bluetoothwritetype)
4472
+
4473
+ 写入模式。
4474
+
1986
4475
  ## Type Aliases
1987
4476
 
4477
+ ### BeaconProximity
4478
+
4479
+ > **BeaconProximity**: `0` \| `1` \| `2` \| `3`
4480
+
4481
+ iBeacon 距离等级。
4482
+
4483
+ ***
4484
+
4485
+ ### BluetoothAdapterMode
4486
+
4487
+ > **BluetoothAdapterMode**: `"central"` \| `"peripheral"`
4488
+
4489
+ 蓝牙适配器模式。
4490
+
4491
+ ***
4492
+
4493
+ ### BluetoothNotifyType
4494
+
4495
+ > **BluetoothNotifyType**: `"notification"` \| `"indication"`
4496
+
4497
+ 蓝牙特征值订阅类型。
4498
+
4499
+ ***
4500
+
4501
+ ### BluetoothPowerLevel
4502
+
4503
+ > **BluetoothPowerLevel**: `"low"` \| `"medium"` \| `"high"`
4504
+
4505
+ 蓝牙扫描功耗等级。
4506
+
4507
+ ***
4508
+
4509
+ ### BluetoothWriteType
4510
+
4511
+ > **BluetoothWriteType**: `"write"` \| `"writeNoResponse"`
4512
+
4513
+ 蓝牙写入模式。
4514
+
4515
+ ***
4516
+
4517
+ ### CalendarRepeatInterval
4518
+
4519
+ > **CalendarRepeatInterval**: `"day"` \| `"week"` \| `"month"` \| `"year"`
4520
+
4521
+ 日历重复周期。
4522
+
4523
+ ***
4524
+
4525
+ ### CaptureVisualEffect
4526
+
4527
+ > **CaptureVisualEffect**: `"none"` \| `"hidden"`
4528
+
4529
+ 录屏或截屏时的视觉表现。
4530
+
4531
+ ***
4532
+
1988
4533
  ### NetworkType
1989
4534
 
1990
4535
  > **NetworkType**: `"wifi"` \| `"2g"` \| `"3g"` \| `"4g"` \| `"5g"` \| `"unknown"` \| `"none"`
@@ -2013,12 +4558,44 @@ blocks 数组,支持 summary/entity 混搭。
2013
4558
 
2014
4559
  ***
2015
4560
 
4561
+ ### ScanCodeType
4562
+
4563
+ > **ScanCodeType**: `"barCode"` \| `"qrCode"` \| `"datamatrix"` \| `"pdf417"`
4564
+
4565
+ 扫码类型。
4566
+
4567
+ ***
4568
+
4569
+ ### ScanResultType
4570
+
4571
+ > **ScanResultType**: `"QR_CODE"` \| `"AZTEC"` \| `"CODABAR"` \| `"CODE_39"` \| `"CODE_93"` \| `"CODE_128"` \| `"DATA_MATRIX"` \| `"EAN_8"` \| `"EAN_13"` \| `"ITF"` \| `"MAXICODE"` \| `"PDF_417"` \| `"RSS_14"` \| `"RSS_EXPANDED"` \| `"UPC_A"` \| `"UPC_E"` \| `"UPC_EAN_EXTENSION"` \| `"WX_CODE"` \| `"CODE_25"`
4572
+
4573
+ 扫码结果类型。
4574
+
4575
+ ***
4576
+
2016
4577
  ### Scope
2017
4578
 
2018
4579
  > **Scope**: `"scope.userLocation"` \| `"scope.userFuzzyLocation"` \| `"scope.userLocationBackground"` \| `"scope.payment"` \| `"scope.record"` \| `"scope.bluetooth"` \| `"scope.camera"` \| `"scope.addPhoneContact"` \| `"scope.addPhoneCalendar"`
2019
4580
 
2020
4581
  ***
2021
4582
 
4583
+ ### SensorInterval
4584
+
4585
+ > **SensorInterval**: `"game"` \| `"ui"` \| `"normal"`
4586
+
4587
+ 传感器监听频率。
4588
+
4589
+ ***
4590
+
2022
4591
  ### UpdateModelContextBlock
2023
4592
 
2024
4593
  > **UpdateModelContextBlock**: [`UpdateModelContextSummaryBlock`](doubao-apps-sdk-open-api.md#updatemodelcontextsummaryblock) \| [`UpdateModelContextEntityBlock`](doubao-apps-sdk-open-api.md#updatemodelcontextentityblock)
4594
+
4595
+ ***
4596
+
4597
+ ### VibrateShortType
4598
+
4599
+ > **VibrateShortType**: `"heavy"` \| `"medium"` \| `"light"`
4600
+
4601
+ 短震动类型。