@doubao-apps/ai 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/994.js +16 -16
- package/dist/contexts/doubao-apps-dev/AGENTS.md +20 -20
- package/dist/contexts/doubao-apps-dev/CLAUDE.md +8 -8
- 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 +2943 -0
- package/dist/contexts/doubao-apps-dev/references/reference/open-api/02-/350/267/257/347/224/261.md +63 -0
- package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/05- → references/reference/open-api/03-}/347/225/214/351/235/242-/350/276/223/345/205/245.md +30 -0
- package/dist/contexts/doubao-apps-dev/references/reference/open-api/04-/346/225/260/346/215/256/345/210/206/346/236/220.md +67 -0
- package/dist/{skills/doubao-apps-dev/.ai/reference/open-api/16-ui- → contexts/doubao-apps-dev/references/reference/open-api/12-ui-}/350/276/223/345/205/245.md +0 -16
- package/dist/contexts/doubao-apps-dev/references/reference/open-api/README.md +32 -0
- package/dist/contexts/doubao-apps-dev/references/reference/open-api.md +303 -0
- package/dist/manifest.json +6 -6
- package/dist/skills/doubao-apps-dev/SKILL.md +20 -29
- 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 +2943 -0
- package/dist/skills/doubao-apps-dev/references/reference/open-api/02-/350/267/257/347/224/261.md +63 -0
- package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/05- → references/reference/open-api/03-}/347/225/214/351/235/242-/350/276/223/345/205/245.md +30 -0
- package/dist/skills/doubao-apps-dev/references/reference/open-api/04-/346/225/260/346/215/256/345/210/206/346/236/220.md +67 -0
- package/dist/{contexts/doubao-apps-dev/.ai/reference/open-api/16-ui- → skills/doubao-apps-dev/references/reference/open-api/12-ui-}/350/276/223/345/205/245.md +0 -16
- package/dist/skills/doubao-apps-dev/references/reference/open-api/README.md +32 -0
- package/dist/skills/doubao-apps-dev/references/reference/open-api.md +303 -0
- package/dist/skills/douyin-to-doubao/SKILL.md +4 -4
- package/dist/skills/h5-to-doubao/SKILL.md +9 -9
- package/dist/skills/uniapp-to-doubao/SKILL.md +5 -5
- package/dist/skills/weixin-to-doubao/SKILL.md +5 -5
- package/package.json +1 -1
- package/dist/contexts/doubao-apps-dev/.ai/guides/system-prompt.md +0 -331
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +0 -699
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/02-/345/255/230/345/202/250.md +0 -409
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/03-/350/267/257/347/224/261.md +0 -165
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/06-/347/275/221/347/273/234.md +0 -148
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/07-/345/252/222/344/275/223.md +0 -346
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/08-/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 -546
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api/README.md +0 -36
- package/dist/contexts/doubao-apps-dev/.ai/reference/open-api.md +0 -326
- package/dist/skills/doubao-apps-dev/.ai/guides/system-prompt.md +0 -331
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +0 -699
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/02-/345/255/230/345/202/250.md +0 -409
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/03-/350/267/257/347/224/261.md +0 -165
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/06-/347/275/221/347/273/234.md +0 -148
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/07-/345/252/222/344/275/223.md +0 -346
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/08-/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 -546
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api/README.md +0 -36
- package/dist/skills/doubao-apps-dev/.ai/reference/open-api.md +0 -326
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/examples/common-patterns.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/examples/component-basics.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/guides/best-practices.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/guides/component-development.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/guides/performance-optimization.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/guides/troubleshooting.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/reference/components-quick-ref.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/reference/framework-api-quick-ref.md +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/09- → references/reference/open-api/05-}/350/256/276/345/244/207-/350/223/235/347/211/231.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/10- → references/reference/open-api/06-}/350/256/276/345/244/207-wi-fi.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/11- → references/reference/open-api/07-}/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/12- → references/reference/open-api/08-}/350/256/276/345/244/207-ibeacon.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/13- → references/reference/open-api/09-}/350/256/276/345/244/207-/347/275/227/347/233/230.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/14- → references/reference/open-api/10-}/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/15- → references/reference/open-api/11-}/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/17- → references/reference/open-api/13-}/350/256/276/345/244/207-/347/275/221/347/273/234.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/18- → references/reference/open-api/14-}/350/256/276/345/244/207-/347/237/255/344/277/241.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/19- → references/reference/open-api/15-}/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/20- → references/reference/open-api/16-}/350/256/276/345/244/207-/347/224/265/346/261/240.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/21- → references/reference/open-api/17-}/350/256/276/345/244/207-/346/227/245/345/216/206.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/22- → references/reference/open-api/18-}/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/23- → references/reference/open-api/19-}/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/24- → references/reference/open-api/20-}/350/256/276/345/244/207-/345/212/240/345/257/206.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/25- → references/reference/open-api/21-}/350/256/276/345/244/207-/347/224/265/350/257/235.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/26- → references/reference/open-api/22-}/350/256/276/345/244/207-/346/211/253/347/240/201.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/27- → references/reference/open-api/23-}/350/256/276/345/244/207-/345/261/217/345/271/225.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai/reference/open-api/28- → references/reference/open-api/24-}/350/256/276/345/244/207-/351/234/207/345/212/250.md" +0 -0
- /package/dist/contexts/doubao-apps-dev/{.ai → references}/rules/dos-and-donts.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/examples/common-patterns.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/examples/component-basics.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/guides/best-practices.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/guides/component-development.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/guides/performance-optimization.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/guides/troubleshooting.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/reference/components-quick-ref.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/reference/framework-api-quick-ref.md +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/09- → references/reference/open-api/05-}/350/256/276/345/244/207-/350/223/235/347/211/231.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/10- → references/reference/open-api/06-}/350/256/276/345/244/207-wi-fi.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/11- → references/reference/open-api/07-}/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/12- → references/reference/open-api/08-}/350/256/276/345/244/207-ibeacon.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/13- → references/reference/open-api/09-}/350/256/276/345/244/207-/347/275/227/347/233/230.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/14- → references/reference/open-api/10-}/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/15- → references/reference/open-api/11-}/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/17- → references/reference/open-api/13-}/350/256/276/345/244/207-/347/275/221/347/273/234.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/18- → references/reference/open-api/14-}/350/256/276/345/244/207-/347/237/255/344/277/241.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/19- → references/reference/open-api/15-}/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/20- → references/reference/open-api/16-}/350/256/276/345/244/207-/347/224/265/346/261/240.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/21- → references/reference/open-api/17-}/350/256/276/345/244/207-/346/227/245/345/216/206.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/22- → references/reference/open-api/18-}/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/23- → references/reference/open-api/19-}/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/24- → references/reference/open-api/20-}/350/256/276/345/244/207-/345/212/240/345/257/206.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/25- → references/reference/open-api/21-}/350/256/276/345/244/207-/347/224/265/350/257/235.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/26- → references/reference/open-api/22-}/350/256/276/345/244/207-/346/211/253/347/240/201.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/27- → references/reference/open-api/23-}/350/256/276/345/244/207-/345/261/217/345/271/225.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai/reference/open-api/28- → references/reference/open-api/24-}/350/256/276/345/244/207-/351/234/207/345/212/250.md" +0 -0
- /package/dist/skills/doubao-apps-dev/{.ai → references}/rules/dos-and-donts.md +0 -0
package/dist/contexts/doubao-apps-dev/references/reference/open-api/02-/350/267/257/347/224/261.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Open API: 路由
|
|
2
|
+
|
|
3
|
+
应用内页面跳转和关闭。
|
|
4
|
+
|
|
5
|
+
[返回目录](./README.md) | [返回速查](../open-api.md)
|
|
6
|
+
|
|
7
|
+
## 速查
|
|
8
|
+
|
|
9
|
+
| API | 说明 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [close](#close) | 关闭栈顶页面。<br><br>已废弃,使用 navigateBack。 |
|
|
12
|
+
|
|
13
|
+
## API 详情
|
|
14
|
+
|
|
15
|
+
<a id="close"></a>
|
|
16
|
+
### close()
|
|
17
|
+
|
|
18
|
+
> **close**(`params`?): `Promise`\<`object`\>
|
|
19
|
+
|
|
20
|
+
关闭栈顶页面。
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
• **params?**: [`CloseParams`](#closeparams)
|
|
25
|
+
|
|
26
|
+
#### Returns
|
|
27
|
+
|
|
28
|
+
`Promise`\<`object`\>
|
|
29
|
+
|
|
30
|
+
返回一个 Promise,在关闭操作成功发起时解析
|
|
31
|
+
|
|
32
|
+
#### Deprecated
|
|
33
|
+
|
|
34
|
+
使用 [navigateBack](#navigateback)
|
|
35
|
+
|
|
36
|
+
#### Example
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { close } from '@doubao-apps/framework/api';
|
|
40
|
+
|
|
41
|
+
async function closeTopPage() {
|
|
42
|
+
try {
|
|
43
|
+
await close();
|
|
44
|
+
} catch (e) {
|
|
45
|
+
console.error('关闭页面失败', e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
closePage();
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 相关类型
|
|
53
|
+
|
|
54
|
+
<a id="closeparams"></a>
|
|
55
|
+
### CloseParams
|
|
56
|
+
|
|
57
|
+
#### Properties
|
|
58
|
+
|
|
59
|
+
##### containerID?
|
|
60
|
+
|
|
61
|
+
> `optional` **containerID**: `string`
|
|
62
|
+
|
|
63
|
+
指定一个要关闭的页面
|
|
@@ -8,10 +8,34 @@
|
|
|
8
8
|
|
|
9
9
|
| API | 说明 |
|
|
10
10
|
| --- | --- |
|
|
11
|
+
| [hideKeyboard](#hidekeyboard) | 收起当前键盘。 |
|
|
11
12
|
| [onKeyboardHeightChange](#onkeyboardheightchange) | 监听键盘高度变化事件。<br><br>返回取消监听函数。 |
|
|
12
13
|
|
|
13
14
|
## API 详情
|
|
14
15
|
|
|
16
|
+
<a id="hidekeyboard"></a>
|
|
17
|
+
### hideKeyboard()
|
|
18
|
+
|
|
19
|
+
> **hideKeyboard**(`params`?): `Promise`\<`object`\>
|
|
20
|
+
|
|
21
|
+
收起当前键盘。
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
• **params?**: [`HideKeyboardParam`](#hidekeyboardparam)
|
|
26
|
+
|
|
27
|
+
#### Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`object`\>
|
|
30
|
+
|
|
31
|
+
#### Example
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { hideKeyboard } from '@doubao-apps/framework/api';
|
|
35
|
+
|
|
36
|
+
await hideKeyboard({});
|
|
37
|
+
```
|
|
38
|
+
|
|
15
39
|
<a id="onkeyboardheightchange"></a>
|
|
16
40
|
### onKeyboardHeightChange()
|
|
17
41
|
|
|
@@ -40,3 +64,9 @@ const unsubscribe = onKeyboardHeightChange(({ height }) => {
|
|
|
40
64
|
console.log('Keyboard height change event:', { height });
|
|
41
65
|
});
|
|
42
66
|
```
|
|
67
|
+
|
|
68
|
+
## 相关类型
|
|
69
|
+
|
|
70
|
+
<a id="hidekeyboardparam"></a>
|
|
71
|
+
### HideKeyboardParam
|
|
72
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Open API: 数据分析
|
|
2
|
+
|
|
3
|
+
监控上报、事件和数据分析上报
|
|
4
|
+
|
|
5
|
+
[返回目录](./README.md) | [返回速查](../open-api.md)
|
|
6
|
+
|
|
7
|
+
## 速查
|
|
8
|
+
|
|
9
|
+
| API | 说明 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [reportEvent](#reportevent) | 上报数据分析事件。 |
|
|
12
|
+
|
|
13
|
+
## API 详情
|
|
14
|
+
|
|
15
|
+
<a id="reportevent"></a>
|
|
16
|
+
### reportEvent()
|
|
17
|
+
|
|
18
|
+
> **reportEvent**(`params`): `Promise`\<`object`\>
|
|
19
|
+
|
|
20
|
+
上报数据分析事件。
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
• **params**: [`ReportEventParams`](#reporteventparams)
|
|
25
|
+
|
|
26
|
+
数据分析事件上报参数。
|
|
27
|
+
|
|
28
|
+
#### Returns
|
|
29
|
+
|
|
30
|
+
`Promise`\<`object`\>
|
|
31
|
+
|
|
32
|
+
返回一个 Promise,在事件上报请求成功发起时解析。
|
|
33
|
+
|
|
34
|
+
#### Example
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { reportEvent } from '@doubao-apps/framework/api';
|
|
38
|
+
|
|
39
|
+
await reportEvent({
|
|
40
|
+
eventName: 'page_view',
|
|
41
|
+
data: {
|
|
42
|
+
pageName: 'home',
|
|
43
|
+
source: 'feed'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 相关类型
|
|
49
|
+
|
|
50
|
+
<a id="reporteventparams"></a>
|
|
51
|
+
### ReportEventParams
|
|
52
|
+
|
|
53
|
+
上报数据分析事件的请求参数。
|
|
54
|
+
|
|
55
|
+
#### Properties
|
|
56
|
+
|
|
57
|
+
##### data
|
|
58
|
+
|
|
59
|
+
> **data**: `Record`\<`string`, `any`\>
|
|
60
|
+
|
|
61
|
+
事件参数,会作为事件属性一并上报。
|
|
62
|
+
|
|
63
|
+
##### eventName
|
|
64
|
+
|
|
65
|
+
> **eventName**: `string`
|
|
66
|
+
|
|
67
|
+
事件名称。
|
|
@@ -8,26 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
| API | 说明 |
|
|
10
10
|
| --- | --- |
|
|
11
|
-
| [hideKeyboard](#hidekeyboard) | 收起键盘。 |
|
|
12
11
|
| [getSelectedTextRange](#getselectedtextrange) | 获取当前输入框的选区范围。 |
|
|
13
12
|
|
|
14
13
|
## API 详情
|
|
15
14
|
|
|
16
|
-
<a id="hidekeyboard"></a>
|
|
17
|
-
### hideKeyboard()
|
|
18
|
-
|
|
19
|
-
> **hideKeyboard**(`params`?): `Promise`\<`object`\>
|
|
20
|
-
|
|
21
|
-
收起键盘。
|
|
22
|
-
|
|
23
|
-
#### Parameters
|
|
24
|
-
|
|
25
|
-
• **params?**
|
|
26
|
-
|
|
27
|
-
#### Returns
|
|
28
|
-
|
|
29
|
-
`Promise`\<`object`\>
|
|
30
|
-
|
|
31
15
|
<a id="getselectedtextrange"></a>
|
|
32
16
|
### getSelectedTextRange()
|
|
33
17
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Open API 目录
|
|
2
|
+
|
|
3
|
+
> 这里是系统能力 Open API 的分组目录。先用 [速查索引](../open-api.md) 找 API,再进入对应分组查看完整参数、返回值、示例和相关类型。
|
|
4
|
+
|
|
5
|
+
## 分组
|
|
6
|
+
|
|
7
|
+
| 分组 | 说明 | API 数量 | 详细文档 |
|
|
8
|
+
| --- | --- | ---: | --- |
|
|
9
|
+
| 基础 / 账号 / 系统 | 账号、授权、宿主基础信息、窗口信息和定位。 | 57 | [查看](./01-基础-账号-系统.md) |
|
|
10
|
+
| 路由 | 应用内页面跳转和关闭。 | 1 | [查看](./02-路由.md) |
|
|
11
|
+
| 界面 / 输入 | 键盘和输入框选区能力。 | 2 | [查看](./03-界面-输入.md) |
|
|
12
|
+
| 数据分析 | 监控上报、事件和数据分析上报 | 1 | [查看](./04-数据分析.md) |
|
|
13
|
+
| 设备 / 蓝牙 | 蓝牙和 BLE 能力;通常先打开适配器,再扫描、连接和读写。 | 19 | [查看](./05-设备-蓝牙.md) |
|
|
14
|
+
| 设备 / Wi-Fi | Wi-Fi 模块能力;通常先 startWifi,再获取列表或连接。 | 6 | [查看](./06-设备-wi-fi.md) |
|
|
15
|
+
| 设备 / 加速度计 | 加速度计监听能力。 | 3 | [查看](./07-设备-加速度计.md) |
|
|
16
|
+
| 设备 / iBeacon | iBeacon 搜索和结果读取能力。 | 3 | [查看](./08-设备-ibeacon.md) |
|
|
17
|
+
| 设备 / 罗盘 | 罗盘监听能力。 | 3 | [查看](./09-设备-罗盘.md) |
|
|
18
|
+
| 设备 / 设备方向 | 设备方向监听能力。 | 2 | [查看](./10-设备-设备方向.md) |
|
|
19
|
+
| 设备 / 陀螺仪 | 陀螺仪监听能力。 | 3 | [查看](./11-设备-陀螺仪.md) |
|
|
20
|
+
| UI / 输入 | 键盘和输入框选区能力。 | 1 | [查看](./12-ui-输入.md) |
|
|
21
|
+
| 设备 / 网络 | 网络类型和本机局域网 IP。 | 3 | [查看](./13-设备-网络.md) |
|
|
22
|
+
| 设备 / 短信 | 拉起系统短信发送面板。 | 1 | [查看](./14-设备-短信.md) |
|
|
23
|
+
| 设备 / 无障碍 | 检测无障碍能力开关状态。 | 1 | [查看](./15-设备-无障碍.md) |
|
|
24
|
+
| 设备 / 电池 | 电池信息读取与变化监听。 | 2 | [查看](./16-设备-电池.md) |
|
|
25
|
+
| 设备 / 日历 | 向系统日历添加事件和重复事件。 | 2 | [查看](./17-设备-日历.md) |
|
|
26
|
+
| 设备 / 剪贴板 | 读取和设置系统剪贴板内容。 | 2 | [查看](./18-设备-剪贴板.md) |
|
|
27
|
+
| 设备 / 联系人 | 选择和添加手机联系人。 | 2 | [查看](./19-设备-联系人.md) |
|
|
28
|
+
| 设备 / 加密 | 安全随机数能力。 | 1 | [查看](./20-设备-加密.md) |
|
|
29
|
+
| 设备 / 电话 | 拨打电话。 | 1 | [查看](./21-设备-电话.md) |
|
|
30
|
+
| 设备 / 扫码 | 调起扫码并读取扫码结果。 | 1 | [查看](./22-设备-扫码.md) |
|
|
31
|
+
| 设备 / 屏幕 | 屏幕亮度、常亮和截屏/录屏相关能力。 | 5 | [查看](./23-设备-屏幕.md) |
|
|
32
|
+
| 设备 / 震动 | 触发短震动和长震动。 | 2 | [查看](./24-设备-震动.md) |
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Open API
|
|
2
|
+
|
|
3
|
+
> 公开可用的端能力 API。默认从 `@doubao-apps/framework/api` 导入;本文件根据 `packages/open-api/src` 的导出结构自动生成,按模块列出 API 名称和说明。
|
|
4
|
+
|
|
5
|
+
覆盖 124 个函数。详细参数、返回值、示例和相关类型请查看 [Open API 目录](open-api/README.md),精确字段也可按参数/结果类型名查看 IDE 类型提示或 `@doubao-apps/framework/api` 类型定义。
|
|
6
|
+
|
|
7
|
+
## 使用方式
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { showToast, request, getStorage } from '@doubao-apps/framework/api';
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 基础 / 账号 / 系统
|
|
14
|
+
|
|
15
|
+
账号、授权、宿主基础信息、窗口信息和定位。
|
|
16
|
+
|
|
17
|
+
| API | 说明 |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [getAccountInfo](open-api/01-基础-账号-系统.md#getaccountinfo) | 异步获取账号信息。 |
|
|
20
|
+
| [getAccountInfoSync](open-api/01-基础-账号-系统.md#getaccountinfosync) | 同步获取账号信息。<br><br>同步 API。 |
|
|
21
|
+
| [authorize](open-api/01-基础-账号-系统.md#authorize) | 初始化授权。<br><br>按 scope 申请授权。 |
|
|
22
|
+
| [canIUse](open-api/01-基础-账号-系统.md#caniuse) | 检测当前宿主是否支持指定 API 或能力。<br><br>用于兼容性判断。 |
|
|
23
|
+
| [getLocation](open-api/01-基础-账号-系统.md#getlocation) | 获取设备当前的地理位置信息。<br><br>可能涉及定位授权。 |
|
|
24
|
+
| [showModal](open-api/01-基础-账号-系统.md#showmodal) | 显示模态对话框。 |
|
|
25
|
+
| [showLoading](open-api/01-基础-账号-系统.md#showloading) | 显示 loading 提示框。<br><br>需调用 hideLoading 关闭。 |
|
|
26
|
+
| [hideToast](open-api/01-基础-账号-系统.md#hidetoast) | 隐藏当前 Toast。 |
|
|
27
|
+
| [hideLoading](open-api/01-基础-账号-系统.md#hideloading) | 隐藏当前 loading。 |
|
|
28
|
+
| [showActionSheet](open-api/01-基础-账号-系统.md#showactionsheet) | 显示操作菜单。 |
|
|
29
|
+
| [getMenuButtonBoundingClientRect](open-api/01-基础-账号-系统.md#getmenubuttonboundingclientrect) | 获取菜单按钮的布局位置信息。 |
|
|
30
|
+
| [enableAlertBeforeUnload](open-api/01-基础-账号-系统.md#enablealertbeforeunload) | 开启页面返回前提醒。<br><br>配合 disableAlertBeforeUnload 使用。 |
|
|
31
|
+
| [disableAlertBeforeUnload](open-api/01-基础-账号-系统.md#disablealertbeforeunload) | 关闭页面返回前提醒。 |
|
|
32
|
+
| [showToast](open-api/01-基础-账号-系统.md#showtoast) | 显示 Toast 提示。<br><br>duration 和 icon 可控制提示表现。 |
|
|
33
|
+
| [dispatchActionDirective](open-api/01-基础-账号-系统.md#dispatchactiondirective) | 描述用户行为,约束模型行为并指定后续执行路径。<br><br>适用于卡片交互后向模型补充结构化动作上下文,例如按钮点击、选项选择或表单提交。 |
|
|
34
|
+
| [expiredWidget](open-api/01-基础-账号-系统.md#expiredwidget) | 更新过期的 widget 为固定卡片。 |
|
|
35
|
+
| [loginWithDoubaoWidget](open-api/01-基础-账号-系统.md#loginwithdoubaowidget) | 发起豆包 Widget 登录。 |
|
|
36
|
+
| [login](open-api/01-基础-账号-系统.md#login) | 发起登录并获取登录凭证。 |
|
|
37
|
+
| [postLoginResult](open-api/01-基础-账号-系统.md#postloginresult) | 回传 MCP 授权登录凭证。 |
|
|
38
|
+
| [createSignOrder](open-api/01-基础-账号-系统.md#createsignorder) | 创建签约订单。 |
|
|
39
|
+
| [getOrderPaymentWithSign](open-api/01-基础-账号-系统.md#getorderpaymentwithsign) | 使用签名信息拉起收银台完成订单支付。 |
|
|
40
|
+
| [getOrderPayment](open-api/01-基础-账号-系统.md#getorderpayment) | 拉起收银台完成订单支付。 |
|
|
41
|
+
| [requestCombineOrder](open-api/01-基础-账号-系统.md#requestcombineorder) | 请求创建合单订单。 |
|
|
42
|
+
| [requestOrder](open-api/01-基础-账号-系统.md#requestorder) | 发起订单支付流程。 |
|
|
43
|
+
| [sign](open-api/01-基础-账号-系统.md#sign) | 拉起签约流程。 |
|
|
44
|
+
| [getPrivacySetting](open-api/01-基础-账号-系统.md#getprivacysetting) | 获取隐私设置状态。 |
|
|
45
|
+
| [sendQueryMessage](open-api/01-基础-账号-系统.md#sendquerymessage) | 以用户身份发送一条消息。<br><br>返回 void,不是 Promise。 |
|
|
46
|
+
| [setAdditionalContext](open-api/01-基础-账号-系统.md#setadditionalcontext) | 设置全局上下文供大模型理解。<br><br>设置全局上下文。 |
|
|
47
|
+
| [updateModelContext](open-api/01-基础-账号-系统.md#updatemodelcontext) | 向 Agent 捐赠上下文。 |
|
|
48
|
+
| [updateWidget](open-api/01-基础-账号-系统.md#updatewidget) | 更新指定卡片。 |
|
|
49
|
+
| [saveImageToPhotosAlbum](open-api/01-基础-账号-系统.md#saveimagetophotosalbum) | 保存图片到系统相册。 |
|
|
50
|
+
| [previewImage](open-api/01-基础-账号-系统.md#previewimage) | 预览图片。 |
|
|
51
|
+
| [getImageInfo](open-api/01-基础-账号-系统.md#getimageinfo) | 获取图片信息。 |
|
|
52
|
+
| [chooseImage](open-api/01-基础-账号-系统.md#chooseimage) | 选择图片。 |
|
|
53
|
+
| [compressImage](open-api/01-基础-账号-系统.md#compressimage) | 压缩图片。 |
|
|
54
|
+
| [request](open-api/01-基础-账号-系统.md#request) | 发起网络请求。<br><br>返回 statusCode、header 和 data。 |
|
|
55
|
+
| [openApp](open-api/01-基础-账号-系统.md#openapp) | 通过 deep link 等方式打开外部应用。 |
|
|
56
|
+
| [navigateTo](open-api/01-基础-账号-系统.md#navigateto) | 保留当前页面,跳转到应用内的某个页面。 |
|
|
57
|
+
| [redirectTo](open-api/01-基础-账号-系统.md#redirectto) | 关闭当前页面,跳转到应用内的某个页面。 |
|
|
58
|
+
| [reLaunch](open-api/01-基础-账号-系统.md#relaunch) | 关闭所有页面并跳转到应用内页面。 |
|
|
59
|
+
| [navigateBack](open-api/01-基础-账号-系统.md#navigateback) | 关闭当前页面,返回上一页面或多级页面。 |
|
|
60
|
+
| [exitApp](open-api/01-基础-账号-系统.md#exitapp) | 退出当前所有页面。<br><br>会退出当前所有页面。 |
|
|
61
|
+
| [setStorage](open-api/01-基础-账号-系统.md#setstorage) | 将数据写入本地缓存。 |
|
|
62
|
+
| [setStorageSync](open-api/01-基础-账号-系统.md#setstoragesync) | 将数据写入本地缓存。<br><br>同步 API。 |
|
|
63
|
+
| [getStorage](open-api/01-基础-账号-系统.md#getstorage) | 从本地缓存读取数据。 |
|
|
64
|
+
| [getStorageSync](open-api/01-基础-账号-系统.md#getstoragesync) | 从本地缓存同步读取数据。<br><br>同步 API。 |
|
|
65
|
+
| [removeStorage](open-api/01-基础-账号-系统.md#removestorage) | 删除本地缓存中指定 key 的数据。 |
|
|
66
|
+
| [removeStorageSync](open-api/01-基础-账号-系统.md#removestoragesync) | 删除本地缓存中指定 key 的数据。<br><br>同步 API。 |
|
|
67
|
+
| [clearStorage](open-api/01-基础-账号-系统.md#clearstorage) | 清空本地缓存。 |
|
|
68
|
+
| [clearStorageSync](open-api/01-基础-账号-系统.md#clearstoragesync) | 清空本地缓存。<br><br>同步 API。 |
|
|
69
|
+
| [getStorageInfo](open-api/01-基础-账号-系统.md#getstorageinfo) | 获取本地缓存信息。 |
|
|
70
|
+
| [getStorageInfoSync](open-api/01-基础-账号-系统.md#getstorageinfosync) | 同步获取本地缓存信息。<br><br>同步 API。 |
|
|
71
|
+
| [getWindowInfoSync](open-api/01-基础-账号-系统.md#getwindowinfosync) | 获取窗口信息。<br><br>同步 API。 |
|
|
72
|
+
| [getSystemSetting](open-api/01-基础-账号-系统.md#getsystemsetting) | 获取设备设置。 |
|
|
73
|
+
| [getAppBaseInfoSync](open-api/01-基础-账号-系统.md#getappbaseinfosync) | 获取应用基础信息。<br><br>同步 API。 |
|
|
74
|
+
| [getWindowInfo](open-api/01-基础-账号-系统.md#getwindowinfo) | 获取窗口信息。 |
|
|
75
|
+
| [getAppBaseInfo](open-api/01-基础-账号-系统.md#getappbaseinfo) | 获取应用基础信息。 |
|
|
76
|
+
|
|
77
|
+
## 路由
|
|
78
|
+
|
|
79
|
+
应用内页面跳转和关闭。
|
|
80
|
+
|
|
81
|
+
| API | 说明 |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| [close](open-api/02-路由.md#close) | 关闭栈顶页面。<br><br>已废弃,使用 navigateBack。 |
|
|
84
|
+
|
|
85
|
+
## 界面 / 输入
|
|
86
|
+
|
|
87
|
+
键盘和输入框选区能力。
|
|
88
|
+
|
|
89
|
+
| API | 说明 |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| [hideKeyboard](open-api/03-界面-输入.md#hidekeyboard) | 收起当前键盘。 |
|
|
92
|
+
| [onKeyboardHeightChange](open-api/03-界面-输入.md#onkeyboardheightchange) | 监听键盘高度变化事件。<br><br>返回取消监听函数。 |
|
|
93
|
+
|
|
94
|
+
## 数据分析
|
|
95
|
+
|
|
96
|
+
监控上报、事件和数据分析上报
|
|
97
|
+
|
|
98
|
+
| API | 说明 |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| [reportEvent](open-api/04-数据分析.md#reportevent) | 上报数据分析事件。 |
|
|
101
|
+
|
|
102
|
+
## 设备 / 蓝牙
|
|
103
|
+
|
|
104
|
+
蓝牙和 BLE 能力;通常先打开适配器,再扫描、连接和读写。
|
|
105
|
+
|
|
106
|
+
| API | 说明 |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| [openBluetoothAdapter](open-api/05-设备-蓝牙.md#openbluetoothadapter) | 打开蓝牙适配器。<br><br>蓝牙流程入口。 |
|
|
109
|
+
| [startBluetoothDevicesDiscovery](open-api/05-设备-蓝牙.md#startbluetoothdevicesdiscovery) | 开始搜索附近的蓝牙设备。<br><br>通常先调用 openBluetoothAdapter。 |
|
|
110
|
+
| [stopBluetoothDevicesDiscovery](open-api/05-设备-蓝牙.md#stopbluetoothdevicesdiscovery) | 停止搜索附近的蓝牙设备。 |
|
|
111
|
+
| [getBluetoothAdapterState](open-api/05-设备-蓝牙.md#getbluetoothadapterstate) | 获取蓝牙适配器状态。 |
|
|
112
|
+
| [getBluetoothDevices](open-api/05-设备-蓝牙.md#getbluetoothdevices) | 获取当前蓝牙模块发现的设备列表。<br><br>通常先调用 startBluetoothDevicesDiscovery。 |
|
|
113
|
+
| [getConnectedBluetoothDevices](open-api/05-设备-蓝牙.md#getconnectedbluetoothdevices) | 获取已连接的蓝牙设备列表。 |
|
|
114
|
+
| [makeBluetoothPair](open-api/05-设备-蓝牙.md#makebluetoothpair) | 发起蓝牙配对。 |
|
|
115
|
+
| [isBluetoothDevicePaired](open-api/05-设备-蓝牙.md#isbluetoothdevicepaired) | 查询蓝牙设备是否已经配对。 |
|
|
116
|
+
| [closeBluetoothAdapter](open-api/05-设备-蓝牙.md#closebluetoothadapter) | 关闭蓝牙适配器。<br><br>会关闭蓝牙模块。 |
|
|
117
|
+
| [createBLEConnection](open-api/05-设备-蓝牙.md#createbleconnection) | 创建 BLE 连接。<br><br>需要传入 deviceId。 |
|
|
118
|
+
| [closeBLEConnection](open-api/05-设备-蓝牙.md#closebleconnection) | 关闭 BLE 连接。 |
|
|
119
|
+
| [getBLEDeviceServices](open-api/05-设备-蓝牙.md#getbledeviceservices) | 获取 BLE 服务列表。<br><br>通常先调用 createBLEConnection。 |
|
|
120
|
+
| [getBLEDeviceCharacteristics](open-api/05-设备-蓝牙.md#getbledevicecharacteristics) | 获取 BLE 特征值列表。<br><br>通常先获取 BLE 服务列表。 |
|
|
121
|
+
| [getBLEDeviceRSSI](open-api/05-设备-蓝牙.md#getbledevicerssi) | 获取 BLE 设备 RSSI。 |
|
|
122
|
+
| [getBLEMTU](open-api/05-设备-蓝牙.md#getblemtu) | 获取 BLE MTU。 |
|
|
123
|
+
| [notifyBLECharacteristicValueChange](open-api/05-设备-蓝牙.md#notifyblecharacteristicvaluechange) | 订阅 BLE 特征值变化。<br><br>订阅指定特征值变化。 |
|
|
124
|
+
| [readBLECharacteristicValue](open-api/05-设备-蓝牙.md#readblecharacteristicvalue) | 读取 BLE 特征值。<br><br>需要传入 serviceId 和 characteristicId。 |
|
|
125
|
+
| [setBLEMTU](open-api/05-设备-蓝牙.md#setblemtu) | 设置 BLE MTU。 |
|
|
126
|
+
| [writeBLECharacteristicValue](open-api/05-设备-蓝牙.md#writeblecharacteristicvalue) | 写入 BLE 特征值。<br><br>value 需要是 ArrayBuffer。 |
|
|
127
|
+
|
|
128
|
+
## 设备 / Wi-Fi
|
|
129
|
+
|
|
130
|
+
Wi-Fi 模块能力;通常先 startWifi,再获取列表或连接。
|
|
131
|
+
|
|
132
|
+
| API | 说明 |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| [startWifi](open-api/06-设备-wi-fi.md#startwifi) | 初始化 Wi-Fi 模块。<br><br>Wi-Fi 流程入口。 |
|
|
135
|
+
| [stopWifi](open-api/06-设备-wi-fi.md#stopwifi) | 关闭 Wi-Fi 模块。 |
|
|
136
|
+
| [setWifiList](open-api/06-设备-wi-fi.md#setwifilist) | 设置 Wi-Fi 预设列表。<br><br>用于预设 Wi-Fi 列表。 |
|
|
137
|
+
| [connectWifi](open-api/06-设备-wi-fi.md#connectwifi) | 连接指定 Wi-Fi。<br><br>通常先调用 startWifi。 |
|
|
138
|
+
| [getConnectedWifi](open-api/06-设备-wi-fi.md#getconnectedwifi) | 获取当前已连接 Wi-Fi 信息。 |
|
|
139
|
+
| [getWifiList](open-api/06-设备-wi-fi.md#getwifilist) | 获取 Wi-Fi 列表。<br><br>通常先调用 startWifi。 |
|
|
140
|
+
|
|
141
|
+
## 设备 / 加速度计
|
|
142
|
+
|
|
143
|
+
加速度计监听能力。
|
|
144
|
+
|
|
145
|
+
| API | 说明 |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
| [startAccelerometer](open-api/07-设备-加速度计.md#startaccelerometer) | 开始监听加速度。<br><br>需配对调用 stopAccelerometer。 |
|
|
148
|
+
| [stopAccelerometer](open-api/07-设备-加速度计.md#stopaccelerometer) | 停止监听加速度。 |
|
|
149
|
+
| [onAccelerometerChange](open-api/07-设备-加速度计.md#onaccelerometerchange) | 监听加速度数据变化事件。<br><br>返回取消监听函数。 |
|
|
150
|
+
|
|
151
|
+
## 设备 / iBeacon
|
|
152
|
+
|
|
153
|
+
iBeacon 搜索和结果读取能力。
|
|
154
|
+
|
|
155
|
+
| API | 说明 |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| [startBeaconDiscovery](open-api/08-设备-ibeacon.md#startbeacondiscovery) | 开始搜索附近的 iBeacon。<br><br>需配对调用 stopBeaconDiscovery。 |
|
|
158
|
+
| [stopBeaconDiscovery](open-api/08-设备-ibeacon.md#stopbeacondiscovery) | 停止搜索附近的 iBeacon。 |
|
|
159
|
+
| [getBeacons](open-api/08-设备-ibeacon.md#getbeacons) | 获取已搜索到的 iBeacon 列表。 |
|
|
160
|
+
|
|
161
|
+
## 设备 / 罗盘
|
|
162
|
+
|
|
163
|
+
罗盘监听能力。
|
|
164
|
+
|
|
165
|
+
| API | 说明 |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| [startCompass](open-api/09-设备-罗盘.md#startcompass) | 开始监听罗盘。<br><br>需配对调用 stopCompass。 |
|
|
168
|
+
| [stopCompass](open-api/09-设备-罗盘.md#stopcompass) | 停止监听罗盘。 |
|
|
169
|
+
| [onCompassChange](open-api/09-设备-罗盘.md#oncompasschange) | 监听罗盘数据变化事件。<br><br>返回取消监听函数。 |
|
|
170
|
+
|
|
171
|
+
## 设备 / 设备方向
|
|
172
|
+
|
|
173
|
+
设备方向监听能力。
|
|
174
|
+
|
|
175
|
+
| API | 说明 |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| [startDeviceMotionListening](open-api/10-设备-设备方向.md#startdevicemotionlistening) | 开始监听设备方向变化。<br><br>需配对调用 stopDeviceMotionListening。 |
|
|
178
|
+
| [stopDeviceMotionListening](open-api/10-设备-设备方向.md#stopdevicemotionlistening) | 停止监听设备方向变化。 |
|
|
179
|
+
|
|
180
|
+
## 设备 / 陀螺仪
|
|
181
|
+
|
|
182
|
+
陀螺仪监听能力。
|
|
183
|
+
|
|
184
|
+
| API | 说明 |
|
|
185
|
+
| --- | --- |
|
|
186
|
+
| [startGyroscope](open-api/11-设备-陀螺仪.md#startgyroscope) | 开始监听陀螺仪。<br><br>需配对调用 stopGyroscope。 |
|
|
187
|
+
| [stopGyroscope](open-api/11-设备-陀螺仪.md#stopgyroscope) | 停止监听陀螺仪。 |
|
|
188
|
+
| [onGyroscopeChange](open-api/11-设备-陀螺仪.md#ongyroscopechange) | 监听陀螺仪数据变化事件。<br><br>返回取消监听函数。 |
|
|
189
|
+
|
|
190
|
+
## UI / 输入
|
|
191
|
+
|
|
192
|
+
键盘和输入框选区能力。
|
|
193
|
+
|
|
194
|
+
| API | 说明 |
|
|
195
|
+
| --- | --- |
|
|
196
|
+
| [getSelectedTextRange](open-api/12-ui-输入.md#getselectedtextrange) | 获取当前输入框的选区范围。 |
|
|
197
|
+
|
|
198
|
+
## 设备 / 网络
|
|
199
|
+
|
|
200
|
+
网络类型和本机局域网 IP。
|
|
201
|
+
|
|
202
|
+
| API | 说明 |
|
|
203
|
+
| --- | --- |
|
|
204
|
+
| [getLocalIPAddress](open-api/13-设备-网络.md#getlocalipaddress) | 获取局域网 IP 地址。 |
|
|
205
|
+
| [getNetworkType](open-api/13-设备-网络.md#getnetworktype) | 获取当前网络类型。 |
|
|
206
|
+
| [onNetworkStatusChange](open-api/13-设备-网络.md#onnetworkstatuschange) | 监听网络状态变化事件。<br><br>返回取消监听函数。 |
|
|
207
|
+
|
|
208
|
+
## 设备 / 短信
|
|
209
|
+
|
|
210
|
+
拉起系统短信发送面板。
|
|
211
|
+
|
|
212
|
+
| API | 说明 |
|
|
213
|
+
| --- | --- |
|
|
214
|
+
| [sendSms](open-api/14-设备-短信.md#sendsms) | 拉起系统短信发送面板。 |
|
|
215
|
+
|
|
216
|
+
## 设备 / 无障碍
|
|
217
|
+
|
|
218
|
+
检测无障碍能力开关状态。
|
|
219
|
+
|
|
220
|
+
| API | 说明 |
|
|
221
|
+
| --- | --- |
|
|
222
|
+
| [checkIsOpenAccessibility](open-api/15-设备-无障碍.md#checkisopenaccessibility) | 检测无障碍能力是否开启。 |
|
|
223
|
+
|
|
224
|
+
## 设备 / 电池
|
|
225
|
+
|
|
226
|
+
电池信息读取与变化监听。
|
|
227
|
+
|
|
228
|
+
| API | 说明 |
|
|
229
|
+
| --- | --- |
|
|
230
|
+
| [getBatteryInfo](open-api/16-设备-电池.md#getbatteryinfo) | 获取电池信息。 |
|
|
231
|
+
| [onBatteryInfoChange](open-api/16-设备-电池.md#onbatteryinfochange) | 监听电池信息变化事件。<br><br>返回取消监听函数。 |
|
|
232
|
+
|
|
233
|
+
## 设备 / 日历
|
|
234
|
+
|
|
235
|
+
向系统日历添加事件和重复事件。
|
|
236
|
+
|
|
237
|
+
| API | 说明 |
|
|
238
|
+
| --- | --- |
|
|
239
|
+
| [addPhoneCalendar](open-api/17-设备-日历.md#addphonecalendar) | 向系统日历添加事件。 |
|
|
240
|
+
| [addPhoneRepeatCalendar](open-api/17-设备-日历.md#addphonerepeatcalendar) | 向系统日历添加重复事件。 |
|
|
241
|
+
|
|
242
|
+
## 设备 / 剪贴板
|
|
243
|
+
|
|
244
|
+
读取和设置系统剪贴板内容。
|
|
245
|
+
|
|
246
|
+
| API | 说明 |
|
|
247
|
+
| --- | --- |
|
|
248
|
+
| [getClipboardData](open-api/18-设备-剪贴板.md#getclipboarddata) | 获取剪贴板内容。 |
|
|
249
|
+
| [setClipboardData](open-api/18-设备-剪贴板.md#setclipboarddata) | 设置系统剪贴板内容。 |
|
|
250
|
+
|
|
251
|
+
## 设备 / 联系人
|
|
252
|
+
|
|
253
|
+
选择和添加手机联系人。
|
|
254
|
+
|
|
255
|
+
| API | 说明 |
|
|
256
|
+
| --- | --- |
|
|
257
|
+
| [chooseContact](open-api/19-设备-联系人.md#choosecontact) | 选择手机联系人。 |
|
|
258
|
+
| [addPhoneContact](open-api/19-设备-联系人.md#addphonecontact) | 添加手机联系人。 |
|
|
259
|
+
|
|
260
|
+
## 设备 / 加密
|
|
261
|
+
|
|
262
|
+
安全随机数能力。
|
|
263
|
+
|
|
264
|
+
| API | 说明 |
|
|
265
|
+
| --- | --- |
|
|
266
|
+
| [getRandomValues](open-api/20-设备-加密.md#getrandomvalues) | 获取安全随机数。 |
|
|
267
|
+
|
|
268
|
+
## 设备 / 电话
|
|
269
|
+
|
|
270
|
+
拨打电话。
|
|
271
|
+
|
|
272
|
+
| API | 说明 |
|
|
273
|
+
| --- | --- |
|
|
274
|
+
| [makePhoneCall](open-api/21-设备-电话.md#makephonecall) | 拨打电话。 |
|
|
275
|
+
|
|
276
|
+
## 设备 / 扫码
|
|
277
|
+
|
|
278
|
+
调起扫码并读取扫码结果。
|
|
279
|
+
|
|
280
|
+
| API | 说明 |
|
|
281
|
+
| --- | --- |
|
|
282
|
+
| [scanCode](open-api/22-设备-扫码.md#scancode) | 调起扫码能力。 |
|
|
283
|
+
|
|
284
|
+
## 设备 / 屏幕
|
|
285
|
+
|
|
286
|
+
屏幕亮度、常亮和截屏/录屏相关能力。
|
|
287
|
+
|
|
288
|
+
| API | 说明 |
|
|
289
|
+
| --- | --- |
|
|
290
|
+
| [getScreenBrightness](open-api/23-设备-屏幕.md#getscreenbrightness) | 获取屏幕亮度。 |
|
|
291
|
+
| [setVisualEffectOnCapture](open-api/23-设备-屏幕.md#setvisualeffectoncapture) | 设置截屏或录屏时的视觉表现。<br><br>控制截屏或录屏时的视觉效果。 |
|
|
292
|
+
| [setScreenBrightness](open-api/23-设备-屏幕.md#setscreenbrightness) | 设置屏幕亮度。 |
|
|
293
|
+
| [setKeepScreenOn](open-api/23-设备-屏幕.md#setkeepscreenon) | 设置屏幕常亮状态。 |
|
|
294
|
+
| [onUserCaptureScreen](open-api/23-设备-屏幕.md#onusercapturescreen) | 监听用户主动截屏事件。<br><br>返回取消监听函数。 |
|
|
295
|
+
|
|
296
|
+
## 设备 / 震动
|
|
297
|
+
|
|
298
|
+
触发短震动和长震动。
|
|
299
|
+
|
|
300
|
+
| API | 说明 |
|
|
301
|
+
| --- | --- |
|
|
302
|
+
| [vibrateShort](open-api/24-设备-震动.md#vibrateshort) | 触发短震动。 |
|
|
303
|
+
| [vibrateLong](open-api/24-设备-震动.md#vibratelong) | 触发长震动。 |
|
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "@byted-doubao-apps/ai-assets",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"generatedAt": "2026-05-
|
|
3
|
+
"version": "0.0.28",
|
|
4
|
+
"generatedAt": "2026-05-19T13:02:35.901Z",
|
|
5
5
|
"skills": [
|
|
6
6
|
{
|
|
7
7
|
"name": "doubao-apps-dev",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
{
|
|
12
12
|
"name": "douyin-to-doubao",
|
|
13
13
|
"entry": "skills/douyin-to-doubao/SKILL.md",
|
|
14
|
-
"hasAiDir":
|
|
14
|
+
"hasAiDir": true
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "h5-to-doubao",
|
|
18
18
|
"entry": "skills/h5-to-doubao/SKILL.md",
|
|
19
|
-
"hasAiDir":
|
|
19
|
+
"hasAiDir": true
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"name": "quality-gate",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
{
|
|
27
27
|
"name": "uniapp-to-doubao",
|
|
28
28
|
"entry": "skills/uniapp-to-doubao/SKILL.md",
|
|
29
|
-
"hasAiDir":
|
|
29
|
+
"hasAiDir": true
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"name": "weixin-to-doubao",
|
|
33
33
|
"entry": "skills/weixin-to-doubao/SKILL.md",
|
|
34
|
-
"hasAiDir":
|
|
34
|
+
"hasAiDir": true
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
37
|
"contexts": [
|