@doubao-dev/plugin-app-dev 0.0.0-stage → 0.0.40-canary-dea0ddc73-20261026073950
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 +10 -2
- package/dist/147.js +9 -0
- package/dist/assets.d.ts +5 -0
- package/dist/assets.js +4 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +1378 -0
- package/dist/plugin.d.ts +102 -0
- package/dist/plugin.js +4995 -0
- package/dist/preview.js +16 -0
- package/dist/rslib-runtime.js +33 -0
- package/dist/skills/doubao-plugin-app/SKILL.md +21 -0
- package/dist/skills/doubao-plugin-app/references/app-development.md +85 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/container-overlay.md +131 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/form-controls.md +146 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/interactive-controls.md +120 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/map-canvas.md +107 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/overview.md +43 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/scroll-list.md +149 -0
- package/dist/skills/doubao-plugin-app/references/frontend/components/text-media.md +209 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/01-/345/237/272/347/241/200.md +1389 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/02-/347/263/273/347/273/237.md +1376 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/03-/350/207/252/345/256/232/344/271/211/351/200/232/344/277/241.md +127 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/04-/345/256/232/344/275/215.md +784 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/05-/345/255/230/345/202/250.md +1176 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +839 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +376 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/08-/344/272/244/344/272/222.md +1319 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/09-/350/276/223/345/205/245.md +192 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/10-/347/275/221/347/273/234.md +900 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/11-/345/252/222/344/275/223.md +1496 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/12-/344/270/232/345/212/241/350/203/275/345/212/233.md +1281 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/13-/347/231/273/345/275/225.md +511 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/14-/346/224/257/344/273/230.md +943 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/15-/346/225/260/346/215/256/345/210/206/346/236/220.md +124 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/16-/350/223/235/347/211/231.md +3364 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/17-wi-fi.md +1028 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/18-/345/212/240/351/200/237/345/272/246/350/256/241.md +354 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/19-ibeacon.md +508 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/20-/347/275/227/347/233/230.md +320 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/21-/350/256/276/345/244/207/346/226/271/345/220/221.md +351 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/22-/351/231/200/350/236/272/344/273/252.md +354 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/23-/345/252/222/344/275/223-/350/256/276/345/244/207-/347/275/221/347/273/234.md +264 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/24-/347/237/255/344/277/241.md +155 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/25-/346/227/240/351/232/234/347/242/215.md +144 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/26-/345/237/272/347/241/200/344/277/241/346/201/257.md +238 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/27-/347/224/265/346/261/240.md +235 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/28-/345/211/252/350/264/264/346/235/277.md +303 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/29-/345/212/240/345/257/206.md +126 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/30-/346/227/245/345/216/206.md +417 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/31-/347/224/265/350/257/235.md +144 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/32-/346/211/253/347/240/201.md +236 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/33-/345/261/217/345/271/225.md +747 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/34-/351/234/207/345/212/250.md +277 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/35-/346/226/207/344/273/266/347/263/273/347/273/237.md +431 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/common-errors.md +69 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/groups.md +43 -0
- package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/quick-reference.md +436 -0
- package/dist/skills/doubao-plugin-app/references/frontend/examples/common-patterns.md +590 -0
- package/dist/skills/doubao-plugin-app/references/frontend/examples/doubao-agentic-service-api-recipes.md +209 -0
- package/dist/skills/doubao-plugin-app/references/frontend/examples/page-widget-basics.md +368 -0
- package/dist/skills/doubao-plugin-app/references/frontend/examples/page-widget-recipes.md +65 -0
- package/dist/skills/doubao-plugin-app/references/frontend/framework/core.md +283 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/auth.md +277 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/best-practices.md +574 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/client-tools-and-events.md +209 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/component-development.md +832 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/debugger-mcp.md +537 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/expired-widget.md +101 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/performance-optimization.md +417 -0
- package/dist/skills/doubao-plugin-app/references/frontend/guides/troubleshooting.md +278 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/best-practices.md +720 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/pseudo-classes.md +149 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/selectors.md +224 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/supported-properties.md +269 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/values-and-units.md +314 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/flex-layout.md +334 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/grid-layout.md +408 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/linear-layout.md +355 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/relative-layout.md +189 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/lynx-vs-web/css-differences.md +737 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/lynx-vs-web/migration-guide.md +669 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/lynx-vs-web/unsupported-features.md +290 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/overview.md +60 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/patterns/animation.md +243 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/patterns/responsive.md +194 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/patterns/theming.md +143 -0
- package/dist/skills/doubao-plugin-app/references/frontend/lynx/quick-reference.md +229 -0
- package/dist/skills/doubao-plugin-app/references/frontend/rules/dos-and-donts.md +479 -0
- package/dist/skills/doubao-plugin-app/references/frontend/widget-templates/design-boundary.md +46 -0
- package/dist/skills/doubao-plugin-app/references/frontend/widget-templates/overview.md +118 -0
- package/dist/skills/doubao-plugin-app/references/frontend/widget-templates/props.md +301 -0
- package/dist/skills/doubao-plugin-app/references/mcp-and-cards.md +38 -0
- package/dist/templates/README.md.template +11 -0
- package/dist/templates/com.doubao/app/manifest.yaml +41 -0
- package/dist/templates/com.doubao/app/package.json.template +13 -0
- package/dist/templates/com.doubao/app/src/app.config.ts.template +5 -0
- package/dist/templates/com.doubao/app/src/app.ts.template +3 -0
- package/dist/templates/com.doubao/app/src/pages/home/index.css +14 -0
- package/dist/templates/com.doubao/app/src/pages/home/index.tsx.template +14 -0
- package/dist/templates/com.doubao/app/src/widgets/example/index.tsx.template +29 -0
- package/dist/templates/com.doubao/app/tsconfig.json +19 -0
- package/dist/templates/mcp.json +9 -0
- package/dist/templates/plugin.json.template +29 -0
- package/dist/templates/skills/example/SKILL.md.template +14 -0
- package/dist/upload.d.ts +44 -0
- package/dist/upload.js +38 -0
- package/package.json +60 -3
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# 豆包应用插件的端能力 API: 日历
|
|
2
|
+
|
|
3
|
+
向系统日历添加事件和重复事件。
|
|
4
|
+
|
|
5
|
+
[返回目录](./groups.md) | [返回速查](./quick-reference.md)
|
|
6
|
+
|
|
7
|
+
## 速查
|
|
8
|
+
|
|
9
|
+
| API | 说明 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [addPhoneCalendar](#addphonecalendar) | 向系统日历添加事件。 |
|
|
12
|
+
| [addPhoneRepeatCalendar](#addphonerepeatcalendar) | 向系统日历添加重复事件。 |
|
|
13
|
+
| [deletePhoneCalendar](#deletephonecalendar) | 按标题和原始时间删除全部匹配的系统日历事件。 |
|
|
14
|
+
|
|
15
|
+
## API 详情
|
|
16
|
+
|
|
17
|
+
<a id="addphonecalendar"></a>
|
|
18
|
+
### addPhoneCalendar()
|
|
19
|
+
|
|
20
|
+
# addPhoneCalendar
|
|
21
|
+
|
|
22
|
+
向系统日历添加事件。
|
|
23
|
+
|
|
24
|
+
## 扫码预览
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
## 支持版本
|
|
28
|
+
|
|
29
|
+
前端库版本不低于 `0.0.19`。
|
|
30
|
+
|
|
31
|
+
## 支持平台
|
|
32
|
+
|
|
33
|
+
<table>
|
|
34
|
+
<thead>
|
|
35
|
+
<tr><th>平台</th><th>支持情况</th></tr>
|
|
36
|
+
</thead>
|
|
37
|
+
<tbody>
|
|
38
|
+
<tr><td>Android</td><td>支持</td></tr>
|
|
39
|
+
<tr><td>iOS</td><td>支持</td></tr>
|
|
40
|
+
<tr><td>PC</td><td>不支持</td></tr>
|
|
41
|
+
<tr><td>HarmonyOS</td><td>不支持</td></tr>
|
|
42
|
+
</tbody>
|
|
43
|
+
</table>
|
|
44
|
+
|
|
45
|
+
## 支持场景
|
|
46
|
+
|
|
47
|
+
<table>
|
|
48
|
+
<thead>
|
|
49
|
+
<tr><th>场景</th><th>支持情况</th></tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
<tr><td>页面</td><td>支持</td></tr>
|
|
53
|
+
<tr><td>卡片</td><td>支持</td></tr>
|
|
54
|
+
</tbody>
|
|
55
|
+
</table>
|
|
56
|
+
|
|
57
|
+
## 接入准备
|
|
58
|
+
|
|
59
|
+
### 权限要求
|
|
60
|
+
|
|
61
|
+
<table>
|
|
62
|
+
<thead>
|
|
63
|
+
<tr><th>类型</th><th>标识</th><th>是否必须</th><th>平台</th><th>说明</th></tr>
|
|
64
|
+
</thead>
|
|
65
|
+
<tbody>
|
|
66
|
+
<tr><td>应用权限</td><td><code>scope.addPhoneCalendar</code></td><td>必须</td><td>Android、iOS</td><td>需要在 manifest 中声明 scope.addPhoneCalendar,并由用户授权写入系统日历。</td></tr>
|
|
67
|
+
</tbody>
|
|
68
|
+
</table>
|
|
69
|
+
|
|
70
|
+
### 授权行为
|
|
71
|
+
|
|
72
|
+
- **Android**:首次调用会依次申请应用日历授权和系统日历读写权限;用户拒绝、取消或权限被撤销后调用失败,可通过重新发起授权或系统设置恢复。
|
|
73
|
+
- **iOS**:首次调用会依次申请应用日历授权和系统日历写入权限;用户拒绝、取消或权限被撤销后调用失败,可通过重新发起授权或系统设置恢复。
|
|
74
|
+
|
|
75
|
+
### 前置条件
|
|
76
|
+
|
|
77
|
+
- **iOS**:设备需要存在可写入的系统日历账户
|
|
78
|
+
|
|
79
|
+
## 使用说明
|
|
80
|
+
|
|
81
|
+
- startTime、endTime 使用 Unix 秒级时间戳;alarmOffset 单位为秒,Android 系统日历提醒粒度会按分钟处理。
|
|
82
|
+
|
|
83
|
+
## 调用方式
|
|
84
|
+
|
|
85
|
+
### 异步 API
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
addPhoneCalendar(params: AddPhoneCalendarParams): Promise<object>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 入参
|
|
92
|
+
|
|
93
|
+
<table>
|
|
94
|
+
<thead>
|
|
95
|
+
<tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
|
|
96
|
+
</thead>
|
|
97
|
+
<tbody>
|
|
98
|
+
<tr><td><code>alarm</code></td><td><code>boolean</code></td><td>否</td><td><code>true</code></td><td>-</td><td>是否提醒。</td></tr>
|
|
99
|
+
<tr><td><code>alarmOffset</code></td><td><code>number</code></td><td>否</td><td><code>0</code></td><td>-</td><td>提前提醒时间,单位秒。0 表示开始时提醒。</td></tr>
|
|
100
|
+
<tr><td><code>allDay</code></td><td><code>boolean</code></td><td>否</td><td><code>false</code></td><td>-</td><td>是否为全天事件。</td></tr>
|
|
101
|
+
<tr><td><code>description</code></td><td><code>string</code></td><td>否</td><td><code>-</code></td><td>-</td><td>事件描述。</td></tr>
|
|
102
|
+
<tr><td><code>endTime</code></td><td><code>number</code></td><td>否</td><td><code>startTime</code></td><td>-</td><td>结束时间的 Unix 秒级时间戳。</td></tr>
|
|
103
|
+
<tr><td><code>location</code></td><td><code>string</code></td><td>否</td><td><code>-</code></td><td>-</td><td>事件位置。</td></tr>
|
|
104
|
+
<tr><td><code>path</code></td><td><code>string</code></td><td>否</td><td><code>-</code></td><td>-</td><td>跳转链接或客户端路由。传入后按原值追加到日历备注。</td></tr>
|
|
105
|
+
<tr><td><code>startTime</code></td><td><code>number</code></td><td>是</td><td>-</td><td>-</td><td>开始时间的 Unix 秒级时间戳。</td></tr>
|
|
106
|
+
<tr><td><code>title</code></td><td><code>string</code></td><td>是</td><td>-</td><td>-</td><td>日历事件标题。</td></tr>
|
|
107
|
+
</tbody>
|
|
108
|
+
</table>
|
|
109
|
+
|
|
110
|
+
## 调用示例
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
import { addPhoneCalendar } from '@doubao-dev/framework/api';
|
|
114
|
+
|
|
115
|
+
const startTime = Math.floor(Date.now() / 1000) + 3600;
|
|
116
|
+
|
|
117
|
+
await addPhoneCalendar({
|
|
118
|
+
title: '项目评审',
|
|
119
|
+
startTime,
|
|
120
|
+
endTime: startTime + 1800,
|
|
121
|
+
alarm: true,
|
|
122
|
+
alarmOffset: 300
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 成功返回
|
|
127
|
+
|
|
128
|
+
无返回字段。
|
|
129
|
+
|
|
130
|
+
<a id="addphonerepeatcalendar"></a>
|
|
131
|
+
### addPhoneRepeatCalendar()
|
|
132
|
+
|
|
133
|
+
# addPhoneRepeatCalendar
|
|
134
|
+
|
|
135
|
+
向系统日历添加重复事件。
|
|
136
|
+
|
|
137
|
+
## 扫码预览
|
|
138
|
+

|
|
139
|
+
|
|
140
|
+
## 支持版本
|
|
141
|
+
|
|
142
|
+
前端库版本不低于 `0.0.25`。
|
|
143
|
+
|
|
144
|
+
## 支持平台
|
|
145
|
+
|
|
146
|
+
<table>
|
|
147
|
+
<thead>
|
|
148
|
+
<tr><th>平台</th><th>支持情况</th></tr>
|
|
149
|
+
</thead>
|
|
150
|
+
<tbody>
|
|
151
|
+
<tr><td>Android</td><td>支持</td></tr>
|
|
152
|
+
<tr><td>iOS</td><td>支持</td></tr>
|
|
153
|
+
<tr><td>PC</td><td>不支持</td></tr>
|
|
154
|
+
<tr><td>HarmonyOS</td><td>不支持</td></tr>
|
|
155
|
+
</tbody>
|
|
156
|
+
</table>
|
|
157
|
+
|
|
158
|
+
## 支持场景
|
|
159
|
+
|
|
160
|
+
<table>
|
|
161
|
+
<thead>
|
|
162
|
+
<tr><th>场景</th><th>支持情况</th></tr>
|
|
163
|
+
</thead>
|
|
164
|
+
<tbody>
|
|
165
|
+
<tr><td>页面</td><td>支持</td></tr>
|
|
166
|
+
<tr><td>卡片</td><td>支持</td></tr>
|
|
167
|
+
</tbody>
|
|
168
|
+
</table>
|
|
169
|
+
|
|
170
|
+
## 接入准备
|
|
171
|
+
|
|
172
|
+
### 权限要求
|
|
173
|
+
|
|
174
|
+
<table>
|
|
175
|
+
<thead>
|
|
176
|
+
<tr><th>类型</th><th>标识</th><th>是否必须</th><th>平台</th><th>说明</th></tr>
|
|
177
|
+
</thead>
|
|
178
|
+
<tbody>
|
|
179
|
+
<tr><td>应用权限</td><td><code>scope.addPhoneCalendar</code></td><td>必须</td><td>Android、iOS</td><td>需要在 manifest 中声明 scope.addPhoneCalendar,并由用户授权写入系统日历。</td></tr>
|
|
180
|
+
</tbody>
|
|
181
|
+
</table>
|
|
182
|
+
|
|
183
|
+
### 授权行为
|
|
184
|
+
|
|
185
|
+
- **Android**:首次调用会依次申请应用日历授权和系统日历读写权限;用户拒绝、取消或权限被撤销后调用失败,可通过重新发起授权或系统设置恢复。
|
|
186
|
+
- **iOS**:首次调用会依次申请应用日历授权和系统日历写入权限;用户拒绝、取消或权限被撤销后调用失败,可通过重新发起授权或系统设置恢复。
|
|
187
|
+
|
|
188
|
+
### 前置条件
|
|
189
|
+
|
|
190
|
+
- **iOS**:设备需要存在可写入的系统日历账户
|
|
191
|
+
- repeatInterval 为 month 时,startTime 所在日期不能大于 28 日
|
|
192
|
+
|
|
193
|
+
## 使用说明
|
|
194
|
+
|
|
195
|
+
- repeatInterval 默认 month;repeatEndTime 不传表示一直重复;startTime、endTime、repeatEndTime 使用 Unix 秒级时间戳。
|
|
196
|
+
|
|
197
|
+
## 调用方式
|
|
198
|
+
|
|
199
|
+
### 异步 API
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
addPhoneRepeatCalendar(params: AddPhoneRepeatCalendarParams): Promise<object>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## 入参
|
|
206
|
+
|
|
207
|
+
<table>
|
|
208
|
+
<thead>
|
|
209
|
+
<tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
|
|
210
|
+
</thead>
|
|
211
|
+
<tbody>
|
|
212
|
+
<tr><td><code>alarm</code></td><td><code>boolean</code></td><td>否</td><td><code>true</code></td><td>-</td><td>是否提醒。</td></tr>
|
|
213
|
+
<tr><td><code>alarmOffset</code></td><td><code>number</code></td><td>否</td><td><code>0</code></td><td>-</td><td>提前提醒时间,单位秒。0 表示开始时提醒。</td></tr>
|
|
214
|
+
<tr><td><code>allDay</code></td><td><code>boolean</code></td><td>否</td><td><code>false</code></td><td>-</td><td>是否为全天事件。</td></tr>
|
|
215
|
+
<tr><td><code>description</code></td><td><code>string</code></td><td>否</td><td><code>-</code></td><td>-</td><td>事件描述。</td></tr>
|
|
216
|
+
<tr><td><code>endTime</code></td><td><code>number</code></td><td>否</td><td><code>startTime</code></td><td>-</td><td>结束时间的 Unix 秒级时间戳。</td></tr>
|
|
217
|
+
<tr><td><code>location</code></td><td><code>string</code></td><td>否</td><td><code>-</code></td><td>-</td><td>事件位置。</td></tr>
|
|
218
|
+
<tr><td><code>path</code></td><td><code>string</code></td><td>否</td><td><code>-</code></td><td>-</td><td>跳转链接或客户端路由。传入后按原值追加到日历备注。</td></tr>
|
|
219
|
+
<tr><td><code>repeatEndTime</code></td><td><code>number</code></td><td>否</td><td><code>-</code></td><td>-</td><td>重复结束时间的 Unix 秒级时间戳。</td></tr>
|
|
220
|
+
<tr><td><code>repeatInterval</code></td><td><code>CalendarRepeatInterval</code></td><td>否</td><td><code>month</code></td><td>-</td><td>重复周期。</td></tr>
|
|
221
|
+
<tr><td><code>startTime</code></td><td><code>number</code></td><td>是</td><td>-</td><td>-</td><td>开始时间的 Unix 秒级时间戳。</td></tr>
|
|
222
|
+
<tr><td><code>title</code></td><td><code>string</code></td><td>是</td><td>-</td><td>-</td><td>日历事件标题。</td></tr>
|
|
223
|
+
</tbody>
|
|
224
|
+
</table>
|
|
225
|
+
|
|
226
|
+
## 调用示例
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
import { addPhoneRepeatCalendar } from '@doubao-dev/framework/api';
|
|
230
|
+
|
|
231
|
+
const startTime = Math.floor(Date.now() / 1000) + 3600;
|
|
232
|
+
|
|
233
|
+
await addPhoneRepeatCalendar({
|
|
234
|
+
title: '每周例会',
|
|
235
|
+
startTime,
|
|
236
|
+
endTime: startTime + 1800,
|
|
237
|
+
repeatInterval: 'week'
|
|
238
|
+
});
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## 成功返回
|
|
242
|
+
|
|
243
|
+
无返回字段。
|
|
244
|
+
|
|
245
|
+
<a id="deletephonecalendar"></a>
|
|
246
|
+
### deletePhoneCalendar()
|
|
247
|
+
|
|
248
|
+
# deletePhoneCalendar
|
|
249
|
+
|
|
250
|
+
按标题和原始时间删除全部匹配的系统日历事件。
|
|
251
|
+
|
|
252
|
+
## 扫码预览
|
|
253
|
+

|
|
254
|
+
|
|
255
|
+
## 支持版本
|
|
256
|
+
|
|
257
|
+
前端库版本不低于 `0.6.0`。
|
|
258
|
+
|
|
259
|
+
## 支持平台
|
|
260
|
+
|
|
261
|
+
<table>
|
|
262
|
+
<thead>
|
|
263
|
+
<tr><th>平台</th><th>支持情况</th></tr>
|
|
264
|
+
</thead>
|
|
265
|
+
<tbody>
|
|
266
|
+
<tr><td>Android</td><td>支持</td></tr>
|
|
267
|
+
<tr><td>iOS</td><td>支持</td></tr>
|
|
268
|
+
<tr><td>PC</td><td>不支持</td></tr>
|
|
269
|
+
<tr><td>HarmonyOS</td><td>不支持</td></tr>
|
|
270
|
+
</tbody>
|
|
271
|
+
</table>
|
|
272
|
+
|
|
273
|
+
## 支持场景
|
|
274
|
+
|
|
275
|
+
<table>
|
|
276
|
+
<thead>
|
|
277
|
+
<tr><th>场景</th><th>支持情况</th></tr>
|
|
278
|
+
</thead>
|
|
279
|
+
<tbody>
|
|
280
|
+
<tr><td>页面</td><td>支持</td></tr>
|
|
281
|
+
<tr><td>卡片</td><td>支持</td></tr>
|
|
282
|
+
</tbody>
|
|
283
|
+
</table>
|
|
284
|
+
|
|
285
|
+
## 接入准备
|
|
286
|
+
|
|
287
|
+
### 权限要求
|
|
288
|
+
|
|
289
|
+
<table>
|
|
290
|
+
<thead>
|
|
291
|
+
<tr><th>类型</th><th>标识</th><th>是否必须</th><th>平台</th><th>说明</th></tr>
|
|
292
|
+
</thead>
|
|
293
|
+
<tbody>
|
|
294
|
+
<tr><td>应用权限</td><td><code>scope.addPhoneCalendar</code></td><td>必须</td><td>Android、iOS</td><td>复用系统日历写入授权。</td></tr>
|
|
295
|
+
</tbody>
|
|
296
|
+
</table>
|
|
297
|
+
|
|
298
|
+
### 授权行为
|
|
299
|
+
|
|
300
|
+
- **Android**:申请应用授权和日历写入权限,拒绝或撤销后调用失败。
|
|
301
|
+
- **iOS**:申请应用授权和日历完整访问权限,拒绝或撤销后调用失败。
|
|
302
|
+
|
|
303
|
+
### 前置条件
|
|
304
|
+
|
|
305
|
+
- 传入创建时的原始参数;重复事件使用系列首个事件的参数
|
|
306
|
+
|
|
307
|
+
## 使用说明
|
|
308
|
+
|
|
309
|
+
- 重复事件删除整个系列;事件不存在也成功;暂不支持全天事件。
|
|
310
|
+
|
|
311
|
+
## 调用方式
|
|
312
|
+
|
|
313
|
+
### 异步 API
|
|
314
|
+
|
|
315
|
+
```typescript
|
|
316
|
+
deletePhoneCalendar(params: DeletePhoneCalendarParams): Promise<object>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## 入参
|
|
320
|
+
|
|
321
|
+
<table>
|
|
322
|
+
<thead>
|
|
323
|
+
<tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
|
|
324
|
+
</thead>
|
|
325
|
+
<tbody>
|
|
326
|
+
<tr><td><code>endTime</code></td><td><code>number</code></td><td>否</td><td><code>startTime</code></td><td>-</td><td>创建时的结束时间,Unix 秒级时间戳。</td></tr>
|
|
327
|
+
<tr><td><code>startTime</code></td><td><code>number</code></td><td>是</td><td>-</td><td>-</td><td>创建时的开始时间,Unix 秒级时间戳。</td></tr>
|
|
328
|
+
<tr><td><code>title</code></td><td><code>string</code></td><td>是</td><td>-</td><td>-</td><td>创建时的标题。</td></tr>
|
|
329
|
+
</tbody>
|
|
330
|
+
</table>
|
|
331
|
+
|
|
332
|
+
## 调用示例
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
import { deletePhoneCalendar } from '@doubao-dev/framework/api';
|
|
336
|
+
await deletePhoneCalendar({ title: '项目评审', startTime: 1770000000, endTime: 1770001800 });
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## 成功返回
|
|
340
|
+
|
|
341
|
+
无返回字段。
|
|
342
|
+
|
|
343
|
+
## 错误处理
|
|
344
|
+
|
|
345
|
+
错误对象和通用错误码见 [通用错误处理](./common-errors.md#错误返回)。
|
|
346
|
+
|
|
347
|
+
### 失败示例
|
|
348
|
+
|
|
349
|
+
```json
|
|
350
|
+
{
|
|
351
|
+
"errNo": 102,
|
|
352
|
+
"errMsg": "internal error"
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### 错误码
|
|
357
|
+
|
|
358
|
+
<table>
|
|
359
|
+
<thead>
|
|
360
|
+
<tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
|
|
361
|
+
</thead>
|
|
362
|
+
<tbody>
|
|
363
|
+
<tr><td><code>102</code></td><td><code>internal error</code></td><td>Android、iOS</td><td>系统日历存储删除失败</td><td>稍后重试</td></tr>
|
|
364
|
+
<tr><td><code>104</code></td><td><code>invalid parameter</code></td><td>Android、iOS</td><td>标题或时间参数不合法</td><td>检查参数</td></tr>
|
|
365
|
+
<tr><td><code>106</code></td><td><code>system permission denied</code></td><td>Android、iOS</td><td>无系统日历权限</td><td>在系统设置中授权</td></tr>
|
|
366
|
+
<tr><td><code>107</code></td><td><code>user permission denied</code></td><td>Android、iOS</td><td>应用插件授权被拒绝或取消</td><td>重新授权</td></tr>
|
|
367
|
+
</tbody>
|
|
368
|
+
</table>
|
|
369
|
+
|
|
370
|
+
## 相关类型
|
|
371
|
+
|
|
372
|
+
<a id="addphonecalendarparams"></a>
|
|
373
|
+
### AddPhoneCalendarParams
|
|
374
|
+
|
|
375
|
+
添加系统日历事件的请求参数。
|
|
376
|
+
|
|
377
|
+
#### Properties
|
|
378
|
+
|
|
379
|
+
• **title**: `string` - 日历事件标题
|
|
380
|
+
• **startTime**: `number` - 开始时间的 Unix 秒级时间戳
|
|
381
|
+
• **allDay?**: `boolean` - 是否为全天事件
|
|
382
|
+
• **description?**: `string` - 事件描述
|
|
383
|
+
• **location?**: `string` - 事件位置
|
|
384
|
+
• **endTime?**: `number` - 结束时间的 Unix 秒级时间戳
|
|
385
|
+
• **alarm?**: `boolean` - 是否提醒
|
|
386
|
+
• **alarmOffset?**: `number` - 提前提醒时间,单位秒。0 表示开始时提醒
|
|
387
|
+
• **path?**: `string` - 跳转链接或客户端路由。传入后按原值追加到日历备注
|
|
388
|
+
|
|
389
|
+
<a id="calendarrepeatinterval"></a>
|
|
390
|
+
### CalendarRepeatInterval
|
|
391
|
+
|
|
392
|
+
日历重复周期。
|
|
393
|
+
|
|
394
|
+
#### Type
|
|
395
|
+
|
|
396
|
+
`'day' | 'week' | 'month' | 'year'`
|
|
397
|
+
|
|
398
|
+
<a id="addphonerepeatcalendarparams"></a>
|
|
399
|
+
### AddPhoneRepeatCalendarParams
|
|
400
|
+
|
|
401
|
+
添加重复日历事件的请求参数。
|
|
402
|
+
|
|
403
|
+
#### Properties
|
|
404
|
+
|
|
405
|
+
• **repeatInterval?**: `CalendarRepeatInterval` - 重复周期
|
|
406
|
+
• **repeatEndTime?**: `number` - 重复结束时间的 Unix 秒级时间戳
|
|
407
|
+
|
|
408
|
+
<a id="deletephonecalendarparams"></a>
|
|
409
|
+
### DeletePhoneCalendarParams
|
|
410
|
+
|
|
411
|
+
删除系统日历事件的请求参数。
|
|
412
|
+
|
|
413
|
+
#### Properties
|
|
414
|
+
|
|
415
|
+
• **title**: `string` - 创建时的标题
|
|
416
|
+
• **startTime**: `number` - 创建时的开始时间,Unix 秒级时间戳
|
|
417
|
+
• **endTime?**: `number` - 创建时的结束时间,Unix 秒级时间戳
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# 豆包应用插件的端能力 API: 电话
|
|
2
|
+
|
|
3
|
+
拨打电话。
|
|
4
|
+
|
|
5
|
+
[返回目录](./groups.md) | [返回速查](./quick-reference.md)
|
|
6
|
+
|
|
7
|
+
## 速查
|
|
8
|
+
|
|
9
|
+
| API | 说明 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [makePhoneCall](#makephonecall) | 拨打电话。 |
|
|
12
|
+
|
|
13
|
+
## API 详情
|
|
14
|
+
|
|
15
|
+
<a id="makephonecall"></a>
|
|
16
|
+
### makePhoneCall()
|
|
17
|
+
|
|
18
|
+
# makePhoneCall
|
|
19
|
+
|
|
20
|
+
拨打电话。
|
|
21
|
+
|
|
22
|
+
## 扫码预览
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
## 使用限制
|
|
26
|
+
|
|
27
|
+
> [!WARNING]
|
|
28
|
+
> **Android、iOS**:Android 通过 ACTION_DIAL 打开拨号盘即成功,iOS 通过 open(tel:) 唤起,是否进入拨号盘取决于系统处理结果;相同调用在双端"成功"代表的实际状态不同。
|
|
29
|
+
|
|
30
|
+
## 支持版本
|
|
31
|
+
|
|
32
|
+
前端库版本不低于 `0.0.19`。
|
|
33
|
+
|
|
34
|
+
## 支持平台
|
|
35
|
+
|
|
36
|
+
<table>
|
|
37
|
+
<thead>
|
|
38
|
+
<tr><th>平台</th><th>支持情况</th></tr>
|
|
39
|
+
</thead>
|
|
40
|
+
<tbody>
|
|
41
|
+
<tr><td>Android</td><td>支持</td></tr>
|
|
42
|
+
<tr><td>iOS</td><td>支持</td></tr>
|
|
43
|
+
<tr><td>PC</td><td>不支持</td></tr>
|
|
44
|
+
<tr><td>HarmonyOS</td><td>不支持</td></tr>
|
|
45
|
+
</tbody>
|
|
46
|
+
</table>
|
|
47
|
+
|
|
48
|
+
## 支持场景
|
|
49
|
+
|
|
50
|
+
<table>
|
|
51
|
+
<thead>
|
|
52
|
+
<tr><th>场景</th><th>支持情况</th></tr>
|
|
53
|
+
</thead>
|
|
54
|
+
<tbody>
|
|
55
|
+
<tr><td>页面</td><td>支持</td></tr>
|
|
56
|
+
<tr><td>卡片</td><td>支持</td></tr>
|
|
57
|
+
</tbody>
|
|
58
|
+
</table>
|
|
59
|
+
|
|
60
|
+
## 使用说明
|
|
61
|
+
|
|
62
|
+
- 该接口仅唤起系统拨号界面,最终是否拨出由用户在系统界面确认
|
|
63
|
+
|
|
64
|
+
## 调用方式
|
|
65
|
+
|
|
66
|
+
### 异步 API
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
makePhoneCall(params: MakePhoneCallParams): Promise<object>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 入参
|
|
73
|
+
|
|
74
|
+
<table>
|
|
75
|
+
<thead>
|
|
76
|
+
<tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
|
|
77
|
+
</thead>
|
|
78
|
+
<tbody>
|
|
79
|
+
<tr><td><code>phoneNumber</code></td><td><code>string</code></td><td>是</td><td>-</td><td>-</td><td>需要拨打的电话号码</td></tr>
|
|
80
|
+
</tbody>
|
|
81
|
+
</table>
|
|
82
|
+
|
|
83
|
+
## 调用示例
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { makePhoneCall } from '@doubao-dev/framework/api';
|
|
87
|
+
|
|
88
|
+
await makePhoneCall({ phoneNumber: '13800000000' });
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 成功返回
|
|
92
|
+
|
|
93
|
+
无返回字段。
|
|
94
|
+
|
|
95
|
+
### 返回示例
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 错误处理
|
|
102
|
+
|
|
103
|
+
错误对象和通用错误码见 [通用错误处理](./common-errors.md#错误返回)。
|
|
104
|
+
|
|
105
|
+
### 失败示例
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"errNo": 104,
|
|
110
|
+
"errMsg": "invalid parameter"
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 错误码
|
|
115
|
+
|
|
116
|
+
<table>
|
|
117
|
+
<thead>
|
|
118
|
+
<tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
|
|
119
|
+
</thead>
|
|
120
|
+
<tbody>
|
|
121
|
+
<tr><td><code>104</code></td><td><code>invalid parameter</code></td><td>Android、iOS</td><td>phoneNumber 为空,或在 iOS 上无法拼接为有效的拨号 URL</td><td>传入合法的电话号码后重试。</td></tr>
|
|
122
|
+
<tr><td><code>103</code></td><td><code>feature not support</code></td><td>iOS</td><td>当前设备不支持拨打电话</td><td>在支持拨号的设备上调用,或提前提示用户设备不支持拨号。</td></tr>
|
|
123
|
+
</tbody>
|
|
124
|
+
</table>
|
|
125
|
+
|
|
126
|
+
#### 通用错误码
|
|
127
|
+
|
|
128
|
+
<table>
|
|
129
|
+
<thead>
|
|
130
|
+
<tr><th>errNo</th><th>errMsg</th><th>说明</th><th>平台</th></tr>
|
|
131
|
+
</thead>
|
|
132
|
+
<tbody>
|
|
133
|
+
<tr><td><code>102</code></td><td><code>internal error</code></td><td>内部错误</td><td>Android、iOS</td></tr>
|
|
134
|
+
</tbody>
|
|
135
|
+
</table>
|
|
136
|
+
|
|
137
|
+
## 相关类型
|
|
138
|
+
|
|
139
|
+
<a id="makephonecallparams"></a>
|
|
140
|
+
### MakePhoneCallParams
|
|
141
|
+
|
|
142
|
+
#### Properties
|
|
143
|
+
|
|
144
|
+
• **phoneNumber**: `string` - 需要拨打的电话号码
|