@doubao-apps/create 0.0.25 → 0.0.26

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.
Files changed (33) hide show
  1. package/dist/template-empty/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +699 -0
  2. package/dist/template-empty/.ai/reference/open-api/02-storage.md +417 -0
  3. package/dist/template-empty/.ai/reference/open-api/03-router.md +165 -0
  4. package/dist/template-empty/.ai/reference/open-api/04-ui-/344/272/244/344/272/222.md +432 -0
  5. package/dist/template-empty/.ai/reference/open-api/05-ui-/350/276/223/345/205/245.md +95 -0
  6. package/dist/template-empty/.ai/reference/open-api/06-network.md +298 -0
  7. package/dist/template-empty/.ai/reference/open-api/07-media.md +346 -0
  8. package/dist/template-empty/.ai/reference/open-api/08-open-/344/270/232/345/212/241/350/203/275/345/212/233.md +477 -0
  9. package/dist/template-empty/.ai/reference/open-api/09-device-bluetooth.md +985 -0
  10. package/dist/template-empty/.ai/reference/open-api/10-device-wi-fi.md +277 -0
  11. package/dist/template-empty/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md +372 -0
  12. package/dist/template-empty/.ai/reference/open-api/12-device-/346/234/254/345/234/260/350/203/275/345/212/233.md +1005 -0
  13. package/dist/template-empty/.ai/reference/open-api/README.md +20 -0
  14. package/dist/template-empty/.ai/reference/open-api.md +1532 -307
  15. package/dist/template-empty/AGENTS.md +2 -2
  16. package/dist/template-empty/package.json +2 -2
  17. package/dist/template-starter/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +699 -0
  18. package/dist/template-starter/.ai/reference/open-api/02-storage.md +417 -0
  19. package/dist/template-starter/.ai/reference/open-api/03-router.md +165 -0
  20. package/dist/template-starter/.ai/reference/open-api/04-ui-/344/272/244/344/272/222.md +432 -0
  21. package/dist/template-starter/.ai/reference/open-api/05-ui-/350/276/223/345/205/245.md +95 -0
  22. package/dist/template-starter/.ai/reference/open-api/06-network.md +298 -0
  23. package/dist/template-starter/.ai/reference/open-api/07-media.md +346 -0
  24. package/dist/template-starter/.ai/reference/open-api/08-open-/344/270/232/345/212/241/350/203/275/345/212/233.md +477 -0
  25. package/dist/template-starter/.ai/reference/open-api/09-device-bluetooth.md +985 -0
  26. package/dist/template-starter/.ai/reference/open-api/10-device-wi-fi.md +277 -0
  27. package/dist/template-starter/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md +372 -0
  28. package/dist/template-starter/.ai/reference/open-api/12-device-/346/234/254/345/234/260/350/203/275/345/212/233.md +1005 -0
  29. package/dist/template-starter/.ai/reference/open-api/README.md +20 -0
  30. package/dist/template-starter/.ai/reference/open-api.md +1532 -307
  31. package/dist/template-starter/AGENTS.md +2 -2
  32. package/dist/template-starter/package.json +2 -2
  33. package/package.json +1 -1
@@ -0,0 +1,985 @@
1
+ # Open API: Device / Bluetooth
2
+
3
+ 蓝牙和 BLE 能力;通常先打开适配器,再扫描、连接和读写。
4
+
5
+ [返回目录](./README.md) | [返回速查](../open-api.md)
6
+
7
+ ## 速查
8
+
9
+ | API | 签名 | 用途 | 参数类型 | 结果类型 | 注意点 |
10
+ | --- | --- | --- | --- | --- | --- |
11
+ | [`openBluetoothAdapter`](#openbluetoothadapter) | `openBluetoothAdapter(params?): Promise<object>` | 打开蓝牙适配器 | `params?: OpenBluetoothAdapterParams` | `Promise<object>` | 蓝牙流程入口 |
12
+ | [`startBluetoothDevicesDiscovery`](#startbluetoothdevicesdiscovery) | `startBluetoothDevicesDiscovery(params?): Promise<object>` | 开始搜索附近的蓝牙设备 | `params?: StartBluetoothDevicesDiscoveryParams` | `Promise<object>` | 通常先调用 openBluetoothAdapter |
13
+ | [`stopBluetoothDevicesDiscovery`](#stopbluetoothdevicesdiscovery) | `stopBluetoothDevicesDiscovery(params?): Promise<object>` | 停止搜索附近的蓝牙设备 | `params?` | `Promise<object>` | - |
14
+ | [`getBluetoothAdapterState`](#getbluetoothadapterstate) | `getBluetoothAdapterState(params?): Promise<GetBluetoothAdapterStateResult>` | 获取蓝牙适配器状态 | `params?` | `Promise<GetBluetoothAdapterStateResult>` | - |
15
+ | [`getBluetoothDevices`](#getbluetoothdevices) | `getBluetoothDevices(params?): Promise<GetBluetoothDevicesResult>` | 获取当前蓝牙模块发现的设备列表 | `params?` | `Promise<GetBluetoothDevicesResult>` | 通常先调用 startBluetoothDevicesDiscovery |
16
+ | [`getConnectedBluetoothDevices`](#getconnectedbluetoothdevices) | `getConnectedBluetoothDevices(params): Promise<GetConnectedBluetoothDevicesResult>` | 获取已连接的蓝牙设备列表 | `params: GetConnectedBluetoothDevicesParams` | `Promise<GetConnectedBluetoothDevicesResult>` | - |
17
+ | [`makeBluetoothPair`](#makebluetoothpair) | `makeBluetoothPair(params): Promise<object>` | 发起蓝牙配对 | `params: MakeBluetoothPairParams` | `Promise<object>` | - |
18
+ | [`isBluetoothDevicePaired`](#isbluetoothdevicepaired) | `isBluetoothDevicePaired(params): Promise<object>` | 查询蓝牙设备是否已经配对 | `params: IsBluetoothDevicePairedParams` | `Promise<object>` | - |
19
+ | [`closeBluetoothAdapter`](#closebluetoothadapter) | `closeBluetoothAdapter(params?): Promise<object>` | 关闭蓝牙适配器 | `params?` | `Promise<object>` | 会关闭蓝牙模块 |
20
+ | [`createBLEConnection`](#createbleconnection) | `createBLEConnection(params): Promise<object>` | 创建 BLE 连接 | `params: CreateBLEConnectionParams` | `Promise<object>` | 需要传入 deviceId |
21
+ | [`closeBLEConnection`](#closebleconnection) | `closeBLEConnection(params): Promise<object>` | 关闭 BLE 连接 | `params: CloseBLEConnectionParams` | `Promise<object>` | - |
22
+ | [`getBLEDeviceServices`](#getbledeviceservices) | `getBLEDeviceServices(params): Promise<GetBLEDeviceServicesResult>` | 获取 BLE 服务列表 | `params: GetBLEDeviceServicesParams` | `Promise<GetBLEDeviceServicesResult>` | 通常先调用 createBLEConnection |
23
+ | [`getBLEDeviceCharacteristics`](#getbledevicecharacteristics) | `getBLEDeviceCharacteristics(params): Promise<GetBLEDeviceCharacteristicsResult>` | 获取 BLE 特征值列表 | `params: GetBLEDeviceCharacteristicsParams` | `Promise<GetBLEDeviceCharacteristicsResult>` | 通常先获取 BLE 服务列表 |
24
+ | [`getBLEDeviceRSSI`](#getbledevicerssi) | `getBLEDeviceRSSI(params): Promise<GetBLEDeviceRSSIResult>` | 获取 BLE 设备 RSSI | `params: GetBLEDeviceRSSIParams` | `Promise<GetBLEDeviceRSSIResult>` | - |
25
+ | [`getBLEMTU`](#getblemtu) | `getBLEMTU(params): Promise<GetBLEMTUResult>` | 获取 BLE MTU | `params: GetBLEMTUParams` | `Promise<GetBLEMTUResult>` | - |
26
+ | [`notifyBLECharacteristicValueChange`](#notifyblecharacteristicvaluechange) | `notifyBLECharacteristicValueChange(params): Promise<object>` | 订阅 BLE 特征值变化 | `params: NotifyBLECharacteristicValueChangeParams` | `Promise<object>` | 订阅指定特征值变化 |
27
+ | [`readBLECharacteristicValue`](#readblecharacteristicvalue) | `readBLECharacteristicValue(params): Promise<object>` | 读取 BLE 特征值 | `params: ReadBLECharacteristicValueParams` | `Promise<object>` | 需要传入 serviceId 和 characteristicId |
28
+ | [`setBLEMTU`](#setblemtu) | `setBLEMTU(params): Promise<SetBLEMTUResult>` | 设置 BLE MTU | `params: SetBLEMTUParams` | `Promise<SetBLEMTUResult>` | - |
29
+ | [`writeBLECharacteristicValue`](#writeblecharacteristicvalue) | `writeBLECharacteristicValue(params): Promise<object>` | 写入 BLE 特征值 | `params: WriteBLECharacteristicValueParams` | `Promise<object>` | value 需要是 ArrayBuffer。 ## Enumerations ### ActionDirectiveType |
30
+
31
+ ## API 详情
32
+
33
+ <a id="openbluetoothadapter"></a>
34
+ ### openBluetoothAdapter()
35
+
36
+ > **openBluetoothAdapter**(`params`?): `Promise`\<`object`\>
37
+
38
+ 打开蓝牙适配器。
39
+
40
+ #### Parameters
41
+
42
+ • **params?**: [`OpenBluetoothAdapterParams`](#openbluetoothadapterparams)
43
+
44
+ #### Returns
45
+
46
+ `Promise`\<`object`\>
47
+
48
+ #### Remarks
49
+
50
+ 蓝牙流程入口。
51
+
52
+ <a id="startbluetoothdevicesdiscovery"></a>
53
+ ### startBluetoothDevicesDiscovery()
54
+
55
+ > **startBluetoothDevicesDiscovery**(`params`?): `Promise`\<`object`\>
56
+
57
+ 开始搜索附近的蓝牙设备。
58
+
59
+ #### Parameters
60
+
61
+ • **params?**: [`StartBluetoothDevicesDiscoveryParams`](#startbluetoothdevicesdiscoveryparams)
62
+
63
+ #### Returns
64
+
65
+ `Promise`\<`object`\>
66
+
67
+ #### Remarks
68
+
69
+ 通常先调用 openBluetoothAdapter。
70
+
71
+ <a id="stopbluetoothdevicesdiscovery"></a>
72
+ ### stopBluetoothDevicesDiscovery()
73
+
74
+ > **stopBluetoothDevicesDiscovery**(`params`?): `Promise`\<`object`\>
75
+
76
+ 停止搜索附近的蓝牙设备。
77
+
78
+ #### Parameters
79
+
80
+ • **params?**
81
+
82
+ #### Returns
83
+
84
+ `Promise`\<`object`\>
85
+
86
+ <a id="getbluetoothadapterstate"></a>
87
+ ### getBluetoothAdapterState()
88
+
89
+ > **getBluetoothAdapterState**(`params`?): `Promise`\<[`GetBluetoothAdapterStateResult`](#getbluetoothadapterstateresult)\>
90
+
91
+ 获取蓝牙适配器状态。
92
+
93
+ #### Parameters
94
+
95
+ • **params?**
96
+
97
+ #### Returns
98
+
99
+ `Promise`\<[`GetBluetoothAdapterStateResult`](#getbluetoothadapterstateresult)\>
100
+
101
+ <a id="getbluetoothdevices"></a>
102
+ ### getBluetoothDevices()
103
+
104
+ > **getBluetoothDevices**(`params`?): `Promise`\<[`GetBluetoothDevicesResult`](#getbluetoothdevicesresult)\>
105
+
106
+ 获取当前蓝牙模块发现的设备列表。
107
+
108
+ #### Parameters
109
+
110
+ • **params?**
111
+
112
+ #### Returns
113
+
114
+ `Promise`\<[`GetBluetoothDevicesResult`](#getbluetoothdevicesresult)\>
115
+
116
+ #### Remarks
117
+
118
+ 通常先调用 startBluetoothDevicesDiscovery。
119
+
120
+ <a id="getconnectedbluetoothdevices"></a>
121
+ ### getConnectedBluetoothDevices()
122
+
123
+ > **getConnectedBluetoothDevices**(`params`): `Promise`\<[`GetConnectedBluetoothDevicesResult`](#getconnectedbluetoothdevicesresult)\>
124
+
125
+ 获取已连接的蓝牙设备列表。
126
+
127
+ #### Parameters
128
+
129
+ • **params**: [`GetConnectedBluetoothDevicesParams`](#getconnectedbluetoothdevicesparams)
130
+
131
+ #### Returns
132
+
133
+ `Promise`\<[`GetConnectedBluetoothDevicesResult`](#getconnectedbluetoothdevicesresult)\>
134
+
135
+ <a id="makebluetoothpair"></a>
136
+ ### makeBluetoothPair()
137
+
138
+ > **makeBluetoothPair**(`params`): `Promise`\<`object`\>
139
+
140
+ 发起蓝牙配对。
141
+
142
+ #### Parameters
143
+
144
+ • **params**: [`MakeBluetoothPairParams`](#makebluetoothpairparams)
145
+
146
+ #### Returns
147
+
148
+ `Promise`\<`object`\>
149
+
150
+ <a id="isbluetoothdevicepaired"></a>
151
+ ### isBluetoothDevicePaired()
152
+
153
+ > **isBluetoothDevicePaired**(`params`): `Promise`\<`object`\>
154
+
155
+ 查询蓝牙设备是否已经配对。
156
+
157
+ #### Parameters
158
+
159
+ • **params**: [`IsBluetoothDevicePairedParams`](#isbluetoothdevicepairedparams)
160
+
161
+ #### Returns
162
+
163
+ `Promise`\<`object`\>
164
+
165
+ <a id="closebluetoothadapter"></a>
166
+ ### closeBluetoothAdapter()
167
+
168
+ > **closeBluetoothAdapter**(`params`?): `Promise`\<`object`\>
169
+
170
+ 关闭蓝牙适配器。
171
+
172
+ #### Parameters
173
+
174
+ • **params?**
175
+
176
+ #### Returns
177
+
178
+ `Promise`\<`object`\>
179
+
180
+ #### Remarks
181
+
182
+ 会关闭蓝牙模块。
183
+
184
+ <a id="createbleconnection"></a>
185
+ ### createBLEConnection()
186
+
187
+ > **createBLEConnection**(`params`): `Promise`\<`object`\>
188
+
189
+ 创建 BLE 连接。
190
+
191
+ #### Parameters
192
+
193
+ • **params**: [`CreateBLEConnectionParams`](#createbleconnectionparams)
194
+
195
+ #### Returns
196
+
197
+ `Promise`\<`object`\>
198
+
199
+ #### Remarks
200
+
201
+ 需要传入 deviceId。
202
+
203
+ <a id="closebleconnection"></a>
204
+ ### closeBLEConnection()
205
+
206
+ > **closeBLEConnection**(`params`): `Promise`\<`object`\>
207
+
208
+ 关闭 BLE 连接。
209
+
210
+ #### Parameters
211
+
212
+ • **params**: [`CloseBLEConnectionParams`](#closebleconnectionparams)
213
+
214
+ #### Returns
215
+
216
+ `Promise`\<`object`\>
217
+
218
+ <a id="getbledeviceservices"></a>
219
+ ### getBLEDeviceServices()
220
+
221
+ > **getBLEDeviceServices**(`params`): `Promise`\<[`GetBLEDeviceServicesResult`](#getbledeviceservicesresult)\>
222
+
223
+ 获取 BLE 服务列表。
224
+
225
+ #### Parameters
226
+
227
+ • **params**: [`GetBLEDeviceServicesParams`](#getbledeviceservicesparams)
228
+
229
+ #### Returns
230
+
231
+ `Promise`\<[`GetBLEDeviceServicesResult`](#getbledeviceservicesresult)\>
232
+
233
+ #### Remarks
234
+
235
+ 通常先调用 createBLEConnection。
236
+
237
+ <a id="getbledevicecharacteristics"></a>
238
+ ### getBLEDeviceCharacteristics()
239
+
240
+ > **getBLEDeviceCharacteristics**(`params`): `Promise`\<[`GetBLEDeviceCharacteristicsResult`](#getbledevicecharacteristicsresult)\>
241
+
242
+ 获取 BLE 特征值列表。
243
+
244
+ #### Parameters
245
+
246
+ • **params**: [`GetBLEDeviceCharacteristicsParams`](#getbledevicecharacteristicsparams)
247
+
248
+ #### Returns
249
+
250
+ `Promise`\<[`GetBLEDeviceCharacteristicsResult`](#getbledevicecharacteristicsresult)\>
251
+
252
+ #### Remarks
253
+
254
+ 通常先获取 BLE 服务列表。
255
+
256
+ <a id="getbledevicerssi"></a>
257
+ ### getBLEDeviceRSSI()
258
+
259
+ > **getBLEDeviceRSSI**(`params`): `Promise`\<[`GetBLEDeviceRSSIResult`](#getbledevicerssiresult)\>
260
+
261
+ 获取 BLE 设备 RSSI。
262
+
263
+ #### Parameters
264
+
265
+ • **params**: [`GetBLEDeviceRSSIParams`](#getbledevicerssiparams)
266
+
267
+ #### Returns
268
+
269
+ `Promise`\<[`GetBLEDeviceRSSIResult`](#getbledevicerssiresult)\>
270
+
271
+ <a id="getblemtu"></a>
272
+ ### getBLEMTU()
273
+
274
+ > **getBLEMTU**(`params`): `Promise`\<[`GetBLEMTUResult`](#getblemturesult)\>
275
+
276
+ 获取 BLE MTU。
277
+
278
+ #### Parameters
279
+
280
+ • **params**: [`GetBLEMTUParams`](#getblemtuparams)
281
+
282
+ #### Returns
283
+
284
+ `Promise`\<[`GetBLEMTUResult`](#getblemturesult)\>
285
+
286
+ <a id="notifyblecharacteristicvaluechange"></a>
287
+ ### notifyBLECharacteristicValueChange()
288
+
289
+ > **notifyBLECharacteristicValueChange**(`params`): `Promise`\<`object`\>
290
+
291
+ 订阅 BLE 特征值变化。
292
+
293
+ #### Parameters
294
+
295
+ • **params**: [`NotifyBLECharacteristicValueChangeParams`](#notifyblecharacteristicvaluechangeparams)
296
+
297
+ #### Returns
298
+
299
+ `Promise`\<`object`\>
300
+
301
+ #### Remarks
302
+
303
+ 订阅指定特征值变化。
304
+
305
+ <a id="readblecharacteristicvalue"></a>
306
+ ### readBLECharacteristicValue()
307
+
308
+ > **readBLECharacteristicValue**(`params`): `Promise`\<`object`\>
309
+
310
+ 读取 BLE 特征值。
311
+
312
+ #### Parameters
313
+
314
+ • **params**: [`ReadBLECharacteristicValueParams`](#readblecharacteristicvalueparams)
315
+
316
+ #### Returns
317
+
318
+ `Promise`\<`object`\>
319
+
320
+ #### Remarks
321
+
322
+ 需要传入 serviceId 和 characteristicId。
323
+
324
+ <a id="setblemtu"></a>
325
+ ### setBLEMTU()
326
+
327
+ > **setBLEMTU**(`params`): `Promise`\<[`SetBLEMTUResult`](#setblemturesult)\>
328
+
329
+ 设置 BLE MTU。
330
+
331
+ #### Parameters
332
+
333
+ • **params**: [`SetBLEMTUParams`](#setblemtuparams)
334
+
335
+ #### Returns
336
+
337
+ `Promise`\<[`SetBLEMTUResult`](#setblemturesult)\>
338
+
339
+ <a id="writeblecharacteristicvalue"></a>
340
+ ### writeBLECharacteristicValue()
341
+
342
+ > **writeBLECharacteristicValue**(`params`): `Promise`\<`object`\>
343
+
344
+ 写入 BLE 特征值。
345
+
346
+ #### Parameters
347
+
348
+ • **params**: [`WriteBLECharacteristicValueParams`](#writeblecharacteristicvalueparams)
349
+
350
+ #### Returns
351
+
352
+ `Promise`\<`object`\>
353
+
354
+ #### Remarks
355
+
356
+ value 需要是 ArrayBuffer。
357
+
358
+ ## Enumerations
359
+
360
+ ### ActionDirectiveType
361
+
362
+ #### Enumeration Members
363
+
364
+ ##### BUTTON\_CLICK
365
+
366
+ > **BUTTON\_CLICK**: `"button_click"`
367
+
368
+ 按钮点击
369
+
370
+ ##### FORM\_SUBMIT
371
+
372
+ > **FORM\_SUBMIT**: `"form_submit"`
373
+
374
+ 表单提交(复杂的信息提交场景)
375
+
376
+ ##### OPTION\_SELECT
377
+
378
+ > **OPTION\_SELECT**: `"option_select"`
379
+
380
+ 选择(下拉列表场景)
381
+
382
+ ## 相关类型
383
+
384
+ <a id="openbluetoothadapterparams"></a>
385
+ ### OpenBluetoothAdapterParams
386
+
387
+ 打开蓝牙适配器的请求参数。
388
+
389
+ #### Properties
390
+
391
+ ##### mode?
392
+
393
+ > `optional` **mode**: [`BluetoothAdapterMode`](#bluetoothadaptermode)
394
+
395
+ 蓝牙模式。
396
+
397
+ <a id="bluetoothadaptermode"></a>
398
+ ### BluetoothAdapterMode
399
+
400
+ > **BluetoothAdapterMode**: `"central"` \| `"peripheral"`
401
+
402
+ 蓝牙适配器模式。
403
+
404
+ <a id="startbluetoothdevicesdiscoveryparams"></a>
405
+ ### StartBluetoothDevicesDiscoveryParams
406
+
407
+ 开始搜索蓝牙设备的请求参数。
408
+
409
+ #### Properties
410
+
411
+ ##### allowDuplicatesKey?
412
+
413
+ > `optional` **allowDuplicatesKey**: `boolean`
414
+
415
+ 是否允许重复上报同一设备。
416
+
417
+ ##### interval?
418
+
419
+ > `optional` **interval**: `number`
420
+
421
+ 上报设备的间隔,单位毫秒。
422
+
423
+ ##### powerLevel?
424
+
425
+ > `optional` **powerLevel**: [`BluetoothPowerLevel`](#bluetoothpowerlevel)
426
+
427
+ 扫描功耗等级。
428
+
429
+ ##### services?
430
+
431
+ > `optional` **services**: `string`[]
432
+
433
+ 按主服务 UUID 过滤搜索范围。
434
+
435
+ <a id="bluetoothpowerlevel"></a>
436
+ ### BluetoothPowerLevel
437
+
438
+ > **BluetoothPowerLevel**: `"low"` \| `"medium"` \| `"high"`
439
+
440
+ 蓝牙扫描功耗等级。
441
+
442
+ <a id="getbluetoothadapterstateresult"></a>
443
+ ### GetBluetoothAdapterStateResult
444
+
445
+ 蓝牙适配器状态。
446
+
447
+ #### Properties
448
+
449
+ ##### available
450
+
451
+ > **available**: `boolean`
452
+
453
+ 蓝牙适配器是否可用。
454
+
455
+ ##### discovering
456
+
457
+ > **discovering**: `boolean`
458
+
459
+ 是否正在搜索蓝牙设备。
460
+
461
+ <a id="getbluetoothdevicesresult"></a>
462
+ ### GetBluetoothDevicesResult
463
+
464
+ 获取蓝牙设备列表的返回结果。
465
+
466
+ #### Properties
467
+
468
+ ##### devices
469
+
470
+ > **devices**: [`BluetoothDevice`](#bluetoothdevice)[]
471
+
472
+ 当前蓝牙模块已发现的设备列表。
473
+
474
+ <a id="bluetoothdevice"></a>
475
+ ### BluetoothDevice
476
+
477
+ 蓝牙设备信息。
478
+
479
+ #### Properties
480
+
481
+ ##### advertisingData
482
+
483
+ > **advertisingData**: `ArrayBuffer`
484
+
485
+ 广播二进制数据。
486
+
487
+ ##### advertisingServiceUuids
488
+
489
+ > **advertisingServiceUuids**: `string`[]
490
+
491
+ 广播中的服务 UUID 列表。
492
+
493
+ ##### connectable?
494
+
495
+ > `optional` **connectable**: `boolean`
496
+
497
+ 是否可连接。
498
+
499
+ ##### deviceId
500
+
501
+ > **deviceId**: `string`
502
+
503
+ 设备 ID。
504
+
505
+ ##### localName
506
+
507
+ > **localName**: `string`
508
+
509
+ 广播中的本地名称。
510
+
511
+ ##### name
512
+
513
+ > **name**: `string`
514
+
515
+ 设备名称。
516
+
517
+ ##### rssi
518
+
519
+ > **rssi**: `number`
520
+
521
+ RSSI 信号强度,单位 dBm。
522
+
523
+ ##### serviceData
524
+
525
+ > **serviceData**: `Record`\<`string`, `unknown`\>
526
+
527
+ 广播中的服务数据。
528
+
529
+ <a id="getconnectedbluetoothdevicesparams"></a>
530
+ ### GetConnectedBluetoothDevicesParams
531
+
532
+ 获取已连接蓝牙设备的请求参数。
533
+
534
+ #### Properties
535
+
536
+ ##### services
537
+
538
+ > **services**: `string`[]
539
+
540
+ 蓝牙主服务 UUID 列表。
541
+
542
+ <a id="getconnectedbluetoothdevicesresult"></a>
543
+ ### GetConnectedBluetoothDevicesResult
544
+
545
+ 获取已连接蓝牙设备的返回结果。
546
+
547
+ #### Properties
548
+
549
+ ##### devices
550
+
551
+ > **devices**: [`ConnectedBluetoothDevice`](#connectedbluetoothdevice)[]
552
+
553
+ 已连接设备列表。
554
+
555
+ <a id="connectedbluetoothdevice"></a>
556
+ ### ConnectedBluetoothDevice
557
+
558
+ 已连接蓝牙设备信息。
559
+
560
+ #### Properties
561
+
562
+ ##### deviceId
563
+
564
+ > **deviceId**: `string`
565
+
566
+ 设备 ID。
567
+
568
+ ##### name
569
+
570
+ > **name**: `string`
571
+
572
+ 设备名称。
573
+
574
+ <a id="makebluetoothpairparams"></a>
575
+ ### MakeBluetoothPairParams
576
+
577
+ 蓝牙配对请求参数。
578
+
579
+ #### Properties
580
+
581
+ ##### deviceId
582
+
583
+ > **deviceId**: `string`
584
+
585
+ 蓝牙设备 ID。
586
+
587
+ ##### pin
588
+
589
+ > **pin**: `string`
590
+
591
+ 配对 PIN 码。
592
+
593
+ ##### timeout?
594
+
595
+ > `optional` **timeout**: `number`
596
+
597
+ 超时时间,单位毫秒。
598
+
599
+ <a id="isbluetoothdevicepairedparams"></a>
600
+ ### IsBluetoothDevicePairedParams
601
+
602
+ 查询蓝牙设备配对状态的请求参数。
603
+
604
+ #### Properties
605
+
606
+ ##### deviceId
607
+
608
+ > **deviceId**: `string`
609
+
610
+ 蓝牙设备 ID。
611
+
612
+ <a id="createbleconnectionparams"></a>
613
+ ### CreateBLEConnectionParams
614
+
615
+ 创建 BLE 连接的请求参数。
616
+
617
+ #### Properties
618
+
619
+ ##### deviceId
620
+
621
+ > **deviceId**: `string`
622
+
623
+ 蓝牙设备 ID。
624
+
625
+ ##### timeout?
626
+
627
+ > `optional` **timeout**: `number`
628
+
629
+ 超时时间,单位毫秒。
630
+
631
+ <a id="closebleconnectionparams"></a>
632
+ ### CloseBLEConnectionParams
633
+
634
+ 关闭 BLE 连接的请求参数。
635
+
636
+ #### Properties
637
+
638
+ ##### deviceId
639
+
640
+ > **deviceId**: `string`
641
+
642
+ 蓝牙设备 ID。
643
+
644
+ <a id="getbledeviceservicesparams"></a>
645
+ ### GetBLEDeviceServicesParams
646
+
647
+ 获取 BLE 服务列表的请求参数。
648
+
649
+ #### Properties
650
+
651
+ ##### deviceId
652
+
653
+ > **deviceId**: `string`
654
+
655
+ 蓝牙设备 ID。
656
+
657
+ <a id="getbledeviceservicesresult"></a>
658
+ ### GetBLEDeviceServicesResult
659
+
660
+ 获取 BLE 服务列表的返回结果。
661
+
662
+ #### Properties
663
+
664
+ ##### services
665
+
666
+ > **services**: [`BluetoothService`](#bluetoothservice)[]
667
+
668
+ 设备服务列表。
669
+
670
+ <a id="bluetoothservice"></a>
671
+ ### BluetoothService
672
+
673
+ 蓝牙服务信息。
674
+
675
+ #### Properties
676
+
677
+ ##### isPrimary
678
+
679
+ > **isPrimary**: `boolean`
680
+
681
+ 是否为主服务。
682
+
683
+ ##### uuid
684
+
685
+ > **uuid**: `string`
686
+
687
+ 服务 UUID。
688
+
689
+ <a id="getbledevicecharacteristicsparams"></a>
690
+ ### GetBLEDeviceCharacteristicsParams
691
+
692
+ 获取 BLE 特征值列表的请求参数。
693
+
694
+ #### Properties
695
+
696
+ ##### deviceId
697
+
698
+ > **deviceId**: `string`
699
+
700
+ 蓝牙设备 ID。
701
+
702
+ ##### serviceId
703
+
704
+ > **serviceId**: `string`
705
+
706
+ 服务 ID。
707
+
708
+ <a id="getbledevicecharacteristicsresult"></a>
709
+ ### GetBLEDeviceCharacteristicsResult
710
+
711
+ 获取 BLE 特征值列表的返回结果。
712
+
713
+ #### Properties
714
+
715
+ ##### characteristics
716
+
717
+ > **characteristics**: [`BluetoothCharacteristic`](#bluetoothcharacteristic)[]
718
+
719
+ 特征值列表。
720
+
721
+ <a id="bluetoothcharacteristicproperties"></a>
722
+ <a id="bluetoothcharacteristic"></a>
723
+ ### BluetoothCharacteristic
724
+
725
+ 蓝牙特征值信息。
726
+
727
+ #### Properties
728
+
729
+ ##### properties
730
+
731
+ > **properties**: [`BluetoothCharacteristicProperties`](#bluetoothcharacteristicproperties)
732
+
733
+ 特征值能力。
734
+
735
+ ##### uuid
736
+
737
+ > **uuid**: `string`
738
+
739
+ 特征值 UUID。
740
+
741
+ <a id="bluetoothcharacteristicproperties"></a>
742
+ ### BluetoothCharacteristicProperties
743
+
744
+ 蓝牙特征值支持的能力。
745
+
746
+ #### Properties
747
+
748
+ ##### indicate
749
+
750
+ > **indicate**: `boolean`
751
+
752
+ 是否支持 indicate。
753
+
754
+ ##### notify
755
+
756
+ > **notify**: `boolean`
757
+
758
+ 是否支持 notify。
759
+
760
+ ##### read
761
+
762
+ > **read**: `boolean`
763
+
764
+ 是否支持 read。
765
+
766
+ ##### write
767
+
768
+ > **write**: `boolean`
769
+
770
+ 是否支持 write。
771
+
772
+ ##### writeDefault
773
+
774
+ > **writeDefault**: `boolean`
775
+
776
+ 是否支持带响应写入。
777
+
778
+ ##### writeNoResponse
779
+
780
+ > **writeNoResponse**: `boolean`
781
+
782
+ 是否支持无响应写入。
783
+
784
+ <a id="getbledevicerssiparams"></a>
785
+ ### GetBLEDeviceRSSIParams
786
+
787
+ 获取 BLE RSSI 的请求参数。
788
+
789
+ #### Properties
790
+
791
+ ##### deviceId
792
+
793
+ > **deviceId**: `string`
794
+
795
+ 蓝牙设备 ID。
796
+
797
+ <a id="getbledevicerssiresult"></a>
798
+ ### GetBLEDeviceRSSIResult
799
+
800
+ 获取 BLE RSSI 的返回结果。
801
+
802
+ #### Properties
803
+
804
+ ##### rssi
805
+
806
+ > **rssi**: `number`
807
+
808
+ RSSI 信号强度,单位 dBm。
809
+
810
+ <a id="getblemtuparams"></a>
811
+ ### GetBLEMTUParams
812
+
813
+ 获取 BLE MTU 的请求参数。
814
+
815
+ #### Properties
816
+
817
+ ##### deviceId
818
+
819
+ > **deviceId**: `string`
820
+
821
+ 蓝牙设备 ID。
822
+
823
+ ##### writeType?
824
+
825
+ > `optional` **writeType**: [`BluetoothWriteType`](#bluetoothwritetype)
826
+
827
+ 写入模式。
828
+
829
+ <a id="getblemturesult"></a>
830
+ ### GetBLEMTUResult
831
+
832
+ 获取 BLE MTU 的返回结果。
833
+
834
+ #### Properties
835
+
836
+ ##### mtu
837
+
838
+ > **mtu**: `number`
839
+
840
+ 当前 MTU。
841
+
842
+ <a id="bluetoothwritetype"></a>
843
+ ### BluetoothWriteType
844
+
845
+ > **BluetoothWriteType**: `"write"` \| `"writeNoResponse"`
846
+
847
+ 蓝牙写入模式。
848
+
849
+ <a id="notifyblecharacteristicvaluechangeparams"></a>
850
+ ### NotifyBLECharacteristicValueChangeParams
851
+
852
+ 订阅 BLE 特征值变化的请求参数。
853
+
854
+ #### Properties
855
+
856
+ ##### characteristicId
857
+
858
+ > **characteristicId**: `string`
859
+
860
+ 特征值 ID。
861
+
862
+ ##### deviceId
863
+
864
+ > **deviceId**: `string`
865
+
866
+ 蓝牙设备 ID。
867
+
868
+ ##### serviceId
869
+
870
+ > **serviceId**: `string`
871
+
872
+ 服务 ID。
873
+
874
+ ##### state
875
+
876
+ > **state**: `boolean`
877
+
878
+ 是否启用订阅。
879
+
880
+ ##### type?
881
+
882
+ > `optional` **type**: [`BluetoothNotifyType`](#bluetoothnotifytype)
883
+
884
+ 订阅类型。
885
+
886
+ <a id="bluetoothnotifytype"></a>
887
+ ### BluetoothNotifyType
888
+
889
+ > **BluetoothNotifyType**: `"notification"` \| `"indication"`
890
+
891
+ 蓝牙特征值订阅类型。
892
+
893
+ <a id="readblecharacteristicvalueparams"></a>
894
+ ### ReadBLECharacteristicValueParams
895
+
896
+ 读取 BLE 特征值的请求参数。
897
+
898
+ #### Properties
899
+
900
+ ##### characteristicId
901
+
902
+ > **characteristicId**: `string`
903
+
904
+ 特征值 ID。
905
+
906
+ ##### deviceId
907
+
908
+ > **deviceId**: `string`
909
+
910
+ 蓝牙设备 ID。
911
+
912
+ ##### serviceId
913
+
914
+ > **serviceId**: `string`
915
+
916
+ 服务 ID。
917
+
918
+ <a id="setblemtuparams"></a>
919
+ ### SetBLEMTUParams
920
+
921
+ 设置 BLE MTU 的请求参数。
922
+
923
+ #### Properties
924
+
925
+ ##### deviceId
926
+
927
+ > **deviceId**: `string`
928
+
929
+ 蓝牙设备 ID。
930
+
931
+ ##### mtu
932
+
933
+ > **mtu**: `number`
934
+
935
+ 目标 MTU。
936
+
937
+ <a id="setblemturesult"></a>
938
+ ### SetBLEMTUResult
939
+
940
+ 设置 BLE MTU 的返回结果。
941
+
942
+ #### Properties
943
+
944
+ ##### mtu
945
+
946
+ > **mtu**: `string` \| `number`
947
+
948
+ 最终协商得到的 MTU。
949
+
950
+ <a id="writeblecharacteristicvalueparams"></a>
951
+ ### WriteBLECharacteristicValueParams
952
+
953
+ 写入 BLE 特征值的请求参数。
954
+
955
+ #### Properties
956
+
957
+ ##### characteristicId
958
+
959
+ > **characteristicId**: `string`
960
+
961
+ 特征值 ID。
962
+
963
+ ##### deviceId
964
+
965
+ > **deviceId**: `string`
966
+
967
+ 蓝牙设备 ID。
968
+
969
+ ##### serviceId
970
+
971
+ > **serviceId**: `string`
972
+
973
+ 服务 ID。
974
+
975
+ ##### value
976
+
977
+ > **value**: `ArrayBuffer`
978
+
979
+ 要写入的二进制数据。
980
+
981
+ ##### writeType?
982
+
983
+ > `optional` **writeType**: [`BluetoothWriteType`](#bluetoothwritetype)
984
+
985
+ 写入模式。