@doubao-apps/ai 0.0.32 → 0.0.33

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 (76) hide show
  1. package/dist/733.js +41 -0
  2. package/dist/cli.js +1 -1
  3. package/dist/contexts/doubao-apps-dev/references/reference/open-api/README.md +0 -32
  4. package/dist/contexts/doubao-apps-dev/references/reference/open-api.md +1 -366
  5. package/dist/index.js +1 -1
  6. package/dist/manifest.json +2 -2
  7. package/dist/skills/doubao-apps-dev/SKILL.md +4 -5
  8. package/dist/skills/doubao-apps-dev/references/reference/open-api/README.md +0 -32
  9. package/dist/skills/doubao-apps-dev/references/reference/open-api.md +1 -366
  10. package/dist/skills/h5-to-doubao/SKILL.md +1 -1
  11. package/package.json +1 -1
  12. package/dist/994.js +0 -41
  13. package/dist/contexts/doubao-apps-dev/references/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +0 -536
  14. package/dist/contexts/doubao-apps-dev/references/reference/open-api/02-/345/256/232/344/275/215.md +0 -359
  15. package/dist/contexts/doubao-apps-dev/references/reference/open-api/03-/345/255/230/345/202/250.md +0 -409
  16. package/dist/contexts/doubao-apps-dev/references/reference/open-api/04-/350/267/257/347/224/261.md +0 -165
  17. package/dist/contexts/doubao-apps-dev/references/reference/open-api/05-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
  18. package/dist/contexts/doubao-apps-dev/references/reference/open-api/06-/347/225/214/351/235/242-/350/276/223/345/205/245.md +0 -72
  19. package/dist/contexts/doubao-apps-dev/references/reference/open-api/07-/347/275/221/347/273/234.md +0 -468
  20. package/dist/contexts/doubao-apps-dev/references/reference/open-api/08-/345/252/222/344/275/223.md +0 -346
  21. package/dist/contexts/doubao-apps-dev/references/reference/open-api/09-/345/274/200/346/224/276/350/203/275/345/212/233-/344/270/232/345/212/241/350/203/275/345/212/233.md +0 -1238
  22. package/dist/contexts/doubao-apps-dev/references/reference/open-api/10-/346/225/260/346/215/256/345/210/206/346/236/220.md +0 -67
  23. package/dist/contexts/doubao-apps-dev/references/reference/open-api/11-/350/256/276/345/244/207-/350/223/235/347/211/231.md +0 -961
  24. package/dist/contexts/doubao-apps-dev/references/reference/open-api/12-/350/256/276/345/244/207-wi-fi.md +0 -311
  25. package/dist/contexts/doubao-apps-dev/references/reference/open-api/13-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +0 -104
  26. package/dist/contexts/doubao-apps-dev/references/reference/open-api/14-/350/256/276/345/244/207-ibeacon.md +0 -148
  27. package/dist/contexts/doubao-apps-dev/references/reference/open-api/15-/350/256/276/345/244/207-/347/275/227/347/233/230.md +0 -82
  28. package/dist/contexts/doubao-apps-dev/references/reference/open-api/16-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +0 -104
  29. package/dist/contexts/doubao-apps-dev/references/reference/open-api/17-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +0 -104
  30. package/dist/contexts/doubao-apps-dev/references/reference/open-api/18-ui-/350/276/223/345/205/245.md +0 -49
  31. package/dist/contexts/doubao-apps-dev/references/reference/open-api/19-/350/256/276/345/244/207-/347/275/221/347/273/234.md +0 -164
  32. package/dist/contexts/doubao-apps-dev/references/reference/open-api/20-/350/256/276/345/244/207-/347/237/255/344/277/241.md +0 -62
  33. package/dist/contexts/doubao-apps-dev/references/reference/open-api/21-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +0 -43
  34. package/dist/contexts/doubao-apps-dev/references/reference/open-api/22-/350/256/276/345/244/207-/345/237/272/347/241/200/344/277/241/346/201/257.md +0 -133
  35. package/dist/contexts/doubao-apps-dev/references/reference/open-api/23-/350/256/276/345/244/207-/347/224/265/346/261/240.md +0 -83
  36. package/dist/contexts/doubao-apps-dev/references/reference/open-api/24-/350/256/276/345/244/207-/346/227/245/345/216/206.md +0 -215
  37. package/dist/contexts/doubao-apps-dev/references/reference/open-api/25-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +0 -70
  38. package/dist/contexts/doubao-apps-dev/references/reference/open-api/26-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +0 -270
  39. package/dist/contexts/doubao-apps-dev/references/reference/open-api/27-/350/256/276/345/244/207-/345/212/240/345/257/206.md +0 -56
  40. package/dist/contexts/doubao-apps-dev/references/reference/open-api/28-/350/256/276/345/244/207-/347/224/265/350/257/235.md +0 -41
  41. package/dist/contexts/doubao-apps-dev/references/reference/open-api/29-/350/256/276/345/244/207-/346/211/253/347/240/201.md +0 -100
  42. package/dist/contexts/doubao-apps-dev/references/reference/open-api/30-/350/256/276/345/244/207-/345/261/217/345/271/225.md +0 -173
  43. package/dist/contexts/doubao-apps-dev/references/reference/open-api/31-/350/256/276/345/244/207-/351/234/207/345/212/250.md +0 -66
  44. package/dist/contexts/doubao-apps-dev/references/reference/open-api/32-/346/226/207/344/273/266/347/263/273/347/273/237.md +0 -1043
  45. package/dist/skills/doubao-apps-dev/references/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +0 -536
  46. package/dist/skills/doubao-apps-dev/references/reference/open-api/02-/345/256/232/344/275/215.md +0 -359
  47. package/dist/skills/doubao-apps-dev/references/reference/open-api/03-/345/255/230/345/202/250.md +0 -409
  48. package/dist/skills/doubao-apps-dev/references/reference/open-api/04-/350/267/257/347/224/261.md +0 -165
  49. package/dist/skills/doubao-apps-dev/references/reference/open-api/05-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
  50. package/dist/skills/doubao-apps-dev/references/reference/open-api/06-/347/225/214/351/235/242-/350/276/223/345/205/245.md +0 -72
  51. package/dist/skills/doubao-apps-dev/references/reference/open-api/07-/347/275/221/347/273/234.md +0 -468
  52. package/dist/skills/doubao-apps-dev/references/reference/open-api/08-/345/252/222/344/275/223.md +0 -346
  53. package/dist/skills/doubao-apps-dev/references/reference/open-api/09-/345/274/200/346/224/276/350/203/275/345/212/233-/344/270/232/345/212/241/350/203/275/345/212/233.md +0 -1238
  54. package/dist/skills/doubao-apps-dev/references/reference/open-api/10-/346/225/260/346/215/256/345/210/206/346/236/220.md +0 -67
  55. package/dist/skills/doubao-apps-dev/references/reference/open-api/11-/350/256/276/345/244/207-/350/223/235/347/211/231.md +0 -961
  56. package/dist/skills/doubao-apps-dev/references/reference/open-api/12-/350/256/276/345/244/207-wi-fi.md +0 -311
  57. package/dist/skills/doubao-apps-dev/references/reference/open-api/13-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +0 -104
  58. package/dist/skills/doubao-apps-dev/references/reference/open-api/14-/350/256/276/345/244/207-ibeacon.md +0 -148
  59. package/dist/skills/doubao-apps-dev/references/reference/open-api/15-/350/256/276/345/244/207-/347/275/227/347/233/230.md +0 -82
  60. package/dist/skills/doubao-apps-dev/references/reference/open-api/16-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +0 -104
  61. package/dist/skills/doubao-apps-dev/references/reference/open-api/17-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +0 -104
  62. package/dist/skills/doubao-apps-dev/references/reference/open-api/18-ui-/350/276/223/345/205/245.md +0 -49
  63. package/dist/skills/doubao-apps-dev/references/reference/open-api/19-/350/256/276/345/244/207-/347/275/221/347/273/234.md +0 -164
  64. package/dist/skills/doubao-apps-dev/references/reference/open-api/20-/350/256/276/345/244/207-/347/237/255/344/277/241.md +0 -62
  65. package/dist/skills/doubao-apps-dev/references/reference/open-api/21-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +0 -43
  66. package/dist/skills/doubao-apps-dev/references/reference/open-api/22-/350/256/276/345/244/207-/345/237/272/347/241/200/344/277/241/346/201/257.md +0 -133
  67. package/dist/skills/doubao-apps-dev/references/reference/open-api/23-/350/256/276/345/244/207-/347/224/265/346/261/240.md +0 -83
  68. package/dist/skills/doubao-apps-dev/references/reference/open-api/24-/350/256/276/345/244/207-/346/227/245/345/216/206.md +0 -215
  69. package/dist/skills/doubao-apps-dev/references/reference/open-api/25-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +0 -70
  70. package/dist/skills/doubao-apps-dev/references/reference/open-api/26-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +0 -270
  71. package/dist/skills/doubao-apps-dev/references/reference/open-api/27-/350/256/276/345/244/207-/345/212/240/345/257/206.md +0 -56
  72. package/dist/skills/doubao-apps-dev/references/reference/open-api/28-/350/256/276/345/244/207-/347/224/265/350/257/235.md +0 -41
  73. package/dist/skills/doubao-apps-dev/references/reference/open-api/29-/350/256/276/345/244/207-/346/211/253/347/240/201.md +0 -100
  74. package/dist/skills/doubao-apps-dev/references/reference/open-api/30-/350/256/276/345/244/207-/345/261/217/345/271/225.md +0 -173
  75. package/dist/skills/doubao-apps-dev/references/reference/open-api/31-/350/256/276/345/244/207-/351/234/207/345/212/250.md +0 -66
  76. package/dist/skills/doubao-apps-dev/references/reference/open-api/32-/346/226/207/344/273/266/347/263/273/347/273/237.md +0 -1043
@@ -1,311 +0,0 @@
1
- # Open API: 设备 / Wi-Fi
2
-
3
- Wi-Fi 模块能力;通常先 startWifi,再获取列表或连接。
4
-
5
- [返回目录](./README.md) | [返回速查](../open-api.md)
6
-
7
- ## 速查
8
-
9
- | API | 说明 |
10
- | --- | --- |
11
- | [startWifi](#startwifi) | 初始化 Wi-Fi 模块。<br><br>Wi-Fi 流程入口。 |
12
- | [stopWifi](#stopwifi) | 关闭 Wi-Fi 模块。 |
13
- | [setWifiList](#setwifilist) | 设置 Wi-Fi 预设列表(iOS 特有)。<br><br>该接口为 iOS 特有,用于预设 Wi-Fi 列表。 |
14
- | [connectWifi](#connectwifi) | 连接指定 Wi-Fi。<br><br>通常先调用 startWifi。 |
15
- | [getConnectedWifi](#getconnectedwifi) | 获取当前已连接 Wi-Fi 信息。 |
16
- | [getWifiList](#getwifilist) | 获取 Wi-Fi 列表。<br><br>通常先调用 startWifi。 |
17
- | [onWifiConnected](#onwificonnected) | 监听连接上 Wi-Fi 的事件。<br><br>返回取消监听函数。 |
18
-
19
- ## API 详情
20
-
21
- <a id="startwifi"></a>
22
- ### startWifi()
23
-
24
- > **startWifi**(`params`?): `Promise`\<`object`\>
25
-
26
- 初始化 Wi-Fi 模块。
27
-
28
- #### Parameters
29
-
30
- • **params?**
31
-
32
- #### Returns
33
-
34
- `Promise`\<`object`\>
35
-
36
- #### Remarks
37
-
38
- Wi-Fi 流程入口。
39
-
40
- <a id="stopwifi"></a>
41
- ### stopWifi()
42
-
43
- > **stopWifi**(`params`?): `Promise`\<`object`\>
44
-
45
- 关闭 Wi-Fi 模块。
46
-
47
- #### Parameters
48
-
49
- • **params?**
50
-
51
- #### Returns
52
-
53
- `Promise`\<`object`\>
54
-
55
- <a id="setwifilist"></a>
56
- ### setWifiList()
57
-
58
- > **setWifiList**(`params`): `Promise`\<`object`\>
59
-
60
- 设置 Wi-Fi 预设列表(iOS 特有)。
61
-
62
- #### Parameters
63
-
64
- • **params**: [`SetWifiListParams`](#setwifilistparams)
65
-
66
- #### Returns
67
-
68
- `Promise`\<`object`\>
69
-
70
- #### Remarks
71
-
72
- 该接口为 iOS 特有,用于预设 Wi-Fi 列表。
73
-
74
- <a id="connectwifi"></a>
75
- ### connectWifi()
76
-
77
- > **connectWifi**(`params`): `Promise`\<`object`\>
78
-
79
- 连接指定 Wi-Fi。
80
-
81
- #### Parameters
82
-
83
- • **params**: [`ConnectWifiParams`](#connectwifiparams)
84
-
85
- #### Returns
86
-
87
- `Promise`\<`object`\>
88
-
89
- #### Remarks
90
-
91
- 通常先调用 startWifi。
92
-
93
- <a id="getconnectedwifi"></a>
94
- ### getConnectedWifi()
95
-
96
- > **getConnectedWifi**(`params`?): `Promise`\<[`GetConnectedWifiResult`](#getconnectedwifiresult)\>
97
-
98
- 获取当前已连接 Wi-Fi 信息。
99
-
100
- #### Parameters
101
-
102
- • **params?**: [`GetConnectedWifiParams`](#getconnectedwifiparams)
103
-
104
- #### Returns
105
-
106
- `Promise`\<[`GetConnectedWifiResult`](#getconnectedwifiresult)\>
107
-
108
- <a id="getwifilist"></a>
109
- ### getWifiList()
110
-
111
- > **getWifiList**(`params`?): `Promise`\<[`GetWifiListResult`](#getwifilistresult)\>
112
-
113
- 获取 Wi-Fi 列表。
114
-
115
- #### Parameters
116
-
117
- • **params?**
118
-
119
- #### Returns
120
-
121
- `Promise`\<[`GetWifiListResult`](#getwifilistresult)\>
122
-
123
- #### Remarks
124
-
125
- 通常先调用 startWifi。
126
-
127
- <a id="onwificonnected"></a>
128
- ### onWifiConnected()
129
-
130
- > **onWifiConnected**(`handler`): () => `void`
131
-
132
- 监听连接上 Wi-Fi 的事件。
133
-
134
- #### Parameters
135
-
136
- • **handler**
137
-
138
- #### Returns
139
-
140
- `Function`
141
-
142
- 返回取消当前监听函数的函数。
143
-
144
- ##### Returns
145
-
146
- `void`
147
-
148
- #### Example
149
-
150
- ```ts
151
- import { onWifiConnected } from '@doubao-apps/framework/api';
152
-
153
- const off = onWifiConnected(({ wifi }) => {
154
- console.log(wifi.ssid);
155
- });
156
-
157
- off();
158
- ```
159
-
160
- ## 相关类型
161
-
162
- <a id="setwifilistparams"></a>
163
- ### SetWifiListParams
164
-
165
- 设置 Wi-Fi 预设列表的请求参数(iOS 特有)。
166
-
167
- #### Properties
168
-
169
- ##### wifiList
170
-
171
- > **wifiList**: [`WifiListItem`](#wifilistitem)[]
172
-
173
- 预设的 Wi-Fi 列表。
174
-
175
- <a id="wifilistitem"></a>
176
- ### WifiListItem
177
-
178
- 预设 Wi-Fi 条目。
179
-
180
- #### Properties
181
-
182
- ##### bssid?
183
-
184
- > `optional` **bssid**: `string`
185
-
186
- Wi-Fi BSSID。
187
-
188
- ##### password?
189
-
190
- > `optional` **password**: `string`
191
-
192
- Wi-Fi 密码。
193
-
194
- ##### ssid?
195
-
196
- > `optional` **ssid**: `string`
197
-
198
- Wi-Fi SSID。
199
-
200
- <a id="connectwifiparams"></a>
201
- ### ConnectWifiParams
202
-
203
- 连接 Wi-Fi 的请求参数。
204
-
205
- #### Properties
206
-
207
- ##### bssid?
208
-
209
- > `optional` **bssid**: `string`
210
-
211
- Wi-Fi BSSID。
212
-
213
- ##### manual?
214
-
215
- > `optional` **manual**: `boolean`
216
-
217
- 是否跳转到系统设置页连接。
218
-
219
- ##### partialInfo?
220
-
221
- > `optional` **partialInfo**: `boolean`
222
-
223
- 是否仅返回部分 Wi-Fi 信息。
224
-
225
- ##### password
226
-
227
- > **password**: `string`
228
-
229
- Wi-Fi 密码。
230
-
231
- ##### ssid
232
-
233
- > **ssid**: `string`
234
-
235
- Wi-Fi SSID。
236
-
237
- <a id="getconnectedwifiparams"></a>
238
- ### GetConnectedWifiParams
239
-
240
- 获取当前已连接 Wi-Fi 的请求参数。
241
-
242
- #### Properties
243
-
244
- ##### partialInfo?
245
-
246
- > `optional` **partialInfo**: `boolean`
247
-
248
- 是否只返回部分 Wi-Fi 信息。
249
-
250
- <a id="getconnectedwifiresult"></a>
251
- ### GetConnectedWifiResult
252
-
253
- 获取当前已连接 Wi-Fi 的返回结果。
254
-
255
- #### Properties
256
-
257
- ##### wifi
258
-
259
- > **wifi**: [`WifiInfo`](#wifiinfo)
260
-
261
- 当前连接的 Wi-Fi 信息。
262
-
263
- <a id="wifiinfo"></a>
264
- ### WifiInfo
265
-
266
- Wi-Fi 信息。
267
-
268
- #### Properties
269
-
270
- ##### bssid?
271
-
272
- > `optional` **bssid**: `string`
273
-
274
- Wi-Fi BSSID。
275
-
276
- ##### frequency?
277
-
278
- > `optional` **frequency**: `number`
279
-
280
- 频段,单位 MHz。
281
-
282
- ##### secure?
283
-
284
- > `optional` **secure**: `boolean`
285
-
286
- Wi-Fi 是否安全。
287
-
288
- ##### signalStrength?
289
-
290
- > `optional` **signalStrength**: `number`
291
-
292
- 信号强度。
293
-
294
- ##### ssid
295
-
296
- > **ssid**: `string`
297
-
298
- Wi-Fi SSID。
299
-
300
- <a id="getwifilistresult"></a>
301
- ### GetWifiListResult
302
-
303
- 获取 Wi-Fi 列表的返回结果。
304
-
305
- #### Properties
306
-
307
- ##### wifiList
308
-
309
- > **wifiList**: [`WifiInfo`](#wifiinfo)[]
310
-
311
- 当前获取到的 Wi-Fi 列表。
@@ -1,104 +0,0 @@
1
- # Open API: 设备 / 加速度计
2
-
3
- 加速度计监听能力。
4
-
5
- [返回目录](./README.md) | [返回速查](../open-api.md)
6
-
7
- ## 速查
8
-
9
- | API | 说明 |
10
- | --- | --- |
11
- | [startAccelerometer](#startaccelerometer) | 开始监听加速度。<br><br>需配对调用 stopAccelerometer。 |
12
- | [stopAccelerometer](#stopaccelerometer) | 停止监听加速度。 |
13
- | [onAccelerometerChange](#onaccelerometerchange) | 监听加速度数据变化事件。<br><br>返回取消监听函数。 |
14
-
15
- ## API 详情
16
-
17
- <a id="startaccelerometer"></a>
18
- ### startAccelerometer()
19
-
20
- > **startAccelerometer**(`params`?): `Promise`\<`object`\>
21
-
22
- 开始监听加速度。
23
-
24
- #### Parameters
25
-
26
- • **params?**: [`StartAccelerometerParams`](#startaccelerometerparams)
27
-
28
- #### Returns
29
-
30
- `Promise`\<`object`\>
31
-
32
- #### Remarks
33
-
34
- 需配对调用 stopAccelerometer。
35
-
36
- <a id="stopaccelerometer"></a>
37
- ### stopAccelerometer()
38
-
39
- > **stopAccelerometer**(`params`?): `Promise`\<`object`\>
40
-
41
- 停止监听加速度。
42
-
43
- #### Parameters
44
-
45
- • **params?**
46
-
47
- #### Returns
48
-
49
- `Promise`\<`object`\>
50
-
51
- <a id="onaccelerometerchange"></a>
52
- ### onAccelerometerChange()
53
-
54
- > **onAccelerometerChange**(`handler`): () => `void`
55
-
56
- 监听加速度数据变化事件。
57
-
58
- #### Parameters
59
-
60
- • **handler**
61
-
62
- #### Returns
63
-
64
- `Function`
65
-
66
- 返回取消当前监听函数的函数。
67
-
68
- ##### Returns
69
-
70
- `void`
71
-
72
- #### Example
73
-
74
- ```ts
75
- import { onAccelerometerChange } from '@doubao-apps/framework/api';
76
-
77
- const off = onAccelerometerChange(({ x, y, z, timestamp }) => {
78
- console.log(x, y, z, timestamp);
79
- });
80
-
81
- off();
82
- ```
83
-
84
- ## 相关类型
85
-
86
- <a id="startaccelerometerparams"></a>
87
- ### StartAccelerometerParams
88
-
89
- 开始监听加速度的请求参数。
90
-
91
- #### Properties
92
-
93
- ##### interval?
94
-
95
- > `optional` **interval**: [`SensorInterval`](#sensorinterval)
96
-
97
- 监听频率。
98
-
99
- <a id="sensorinterval"></a>
100
- ### SensorInterval
101
-
102
- > **SensorInterval**: `"game"` \| `"ui"` \| `"normal"`
103
-
104
- 传感器监听频率。
@@ -1,148 +0,0 @@
1
- # Open API: 设备 / iBeacon
2
-
3
- iBeacon 搜索和结果读取能力。
4
-
5
- [返回目录](./README.md) | [返回速查](../open-api.md)
6
-
7
- ## 速查
8
-
9
- | API | 说明 |
10
- | --- | --- |
11
- | [startBeaconDiscovery](#startbeacondiscovery) | 开始搜索附近的 iBeacon。<br><br>需配对调用 stopBeaconDiscovery。 |
12
- | [stopBeaconDiscovery](#stopbeacondiscovery) | 停止搜索附近的 iBeacon。 |
13
- | [getBeacons](#getbeacons) | 获取已搜索到的 iBeacon 列表。 |
14
-
15
- ## API 详情
16
-
17
- <a id="startbeacondiscovery"></a>
18
- ### startBeaconDiscovery()
19
-
20
- > **startBeaconDiscovery**(`params`): `Promise`\<`object`\>
21
-
22
- 开始搜索附近的 iBeacon。
23
-
24
- #### Parameters
25
-
26
- • **params**: [`StartBeaconDiscoveryParams`](#startbeacondiscoveryparams)
27
-
28
- #### Returns
29
-
30
- `Promise`\<`object`\>
31
-
32
- #### Remarks
33
-
34
- 需配对调用 stopBeaconDiscovery。
35
-
36
- <a id="stopbeacondiscovery"></a>
37
- ### stopBeaconDiscovery()
38
-
39
- > **stopBeaconDiscovery**(`params`?): `Promise`\<`object`\>
40
-
41
- 停止搜索附近的 iBeacon。
42
-
43
- #### Parameters
44
-
45
- • **params?**
46
-
47
- #### Returns
48
-
49
- `Promise`\<`object`\>
50
-
51
- <a id="getbeacons"></a>
52
- ### getBeacons()
53
-
54
- > **getBeacons**(`params`?): `Promise`\<[`GetBeaconsResult`](#getbeaconsresult)\>
55
-
56
- 获取已搜索到的 iBeacon 列表。
57
-
58
- #### Parameters
59
-
60
- • **params?**
61
-
62
- #### Returns
63
-
64
- `Promise`\<[`GetBeaconsResult`](#getbeaconsresult)\>
65
-
66
- ## 相关类型
67
-
68
- <a id="startbeacondiscoveryparams"></a>
69
- ### StartBeaconDiscoveryParams
70
-
71
- 开始搜索 iBeacon 的请求参数。
72
-
73
- #### Properties
74
-
75
- ##### ignoreBluetoothAvailable?
76
-
77
- > `optional` **ignoreBluetoothAvailable**: `boolean`
78
-
79
- iOS 下是否忽略蓝牙可用性校验。
80
-
81
- ##### uuids
82
-
83
- > **uuids**: `string`[]
84
-
85
- 要搜索的 iBeacon UUID 列表。
86
-
87
- <a id="getbeaconsresult"></a>
88
- ### GetBeaconsResult
89
-
90
- 获取 iBeacon 列表的返回结果。
91
-
92
- #### Properties
93
-
94
- ##### beacons
95
-
96
- > **beacons**: [`BeaconInfo`](#beaconinfo)[]
97
-
98
- 当前搜到的 iBeacon 列表。
99
-
100
- <a id="beaconinfo"></a>
101
- ### BeaconInfo
102
-
103
- iBeacon 设备信息。
104
-
105
- #### Properties
106
-
107
- ##### accuracy
108
-
109
- > **accuracy**: `number`
110
-
111
- 距离,单位米。
112
-
113
- ##### major
114
-
115
- > **major**: `string`
116
-
117
- 主 ID。
118
-
119
- ##### minor
120
-
121
- > **minor**: `string`
122
-
123
- 次 ID。
124
-
125
- ##### proximity
126
-
127
- > **proximity**: [`BeaconProximity`](#beaconproximity)
128
-
129
- 距离等级。
130
-
131
- ##### rssi
132
-
133
- > **rssi**: `number`
134
-
135
- RSSI 信号强度,单位 dBm。
136
-
137
- ##### uuid
138
-
139
- > **uuid**: `string`
140
-
141
- Beacon UUID。
142
-
143
- <a id="beaconproximity"></a>
144
- ### BeaconProximity
145
-
146
- > **BeaconProximity**: `0` \| `1` \| `2` \| `3`
147
-
148
- iBeacon 距离等级。
@@ -1,82 +0,0 @@
1
- # Open API: 设备 / 罗盘
2
-
3
- 罗盘监听能力。
4
-
5
- [返回目录](./README.md) | [返回速查](../open-api.md)
6
-
7
- ## 速查
8
-
9
- | API | 说明 |
10
- | --- | --- |
11
- | [startCompass](#startcompass) | 开始监听罗盘。<br><br>需配对调用 stopCompass。 |
12
- | [stopCompass](#stopcompass) | 停止监听罗盘。 |
13
- | [onCompassChange](#oncompasschange) | 监听罗盘数据变化事件。<br><br>返回取消监听函数。 |
14
-
15
- ## API 详情
16
-
17
- <a id="startcompass"></a>
18
- ### startCompass()
19
-
20
- > **startCompass**(`params`?): `Promise`\<`object`\>
21
-
22
- 开始监听罗盘。
23
-
24
- #### Parameters
25
-
26
- • **params?**
27
-
28
- #### Returns
29
-
30
- `Promise`\<`object`\>
31
-
32
- #### Remarks
33
-
34
- 需配对调用 stopCompass。
35
-
36
- <a id="stopcompass"></a>
37
- ### stopCompass()
38
-
39
- > **stopCompass**(`params`?): `Promise`\<`object`\>
40
-
41
- 停止监听罗盘。
42
-
43
- #### Parameters
44
-
45
- • **params?**
46
-
47
- #### Returns
48
-
49
- `Promise`\<`object`\>
50
-
51
- <a id="oncompasschange"></a>
52
- ### onCompassChange()
53
-
54
- > **onCompassChange**(`handler`): () => `void`
55
-
56
- 监听罗盘数据变化事件。
57
-
58
- #### Parameters
59
-
60
- • **handler**
61
-
62
- #### Returns
63
-
64
- `Function`
65
-
66
- 返回取消当前监听函数的函数。
67
-
68
- ##### Returns
69
-
70
- `void`
71
-
72
- #### Example
73
-
74
- ```ts
75
- import { onCompassChange } from '@doubao-apps/framework/api';
76
-
77
- const off = onCompassChange(({ direction }) => {
78
- console.log(direction);
79
- });
80
-
81
- off();
82
- ```