@doubao-apps/create 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/dist/36.js +1 -1
- package/dist/cli.js +10 -10
- package/dist/template-empty/AGENTS.md +20 -20
- package/dist/template-empty/package.json +2 -2
- package/dist/template-empty/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/template-empty/references/reference/open-api/02-/350/267/257/347/224/261.md +63 -0
- package/dist/template-empty/{.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/template-empty/references/reference/open-api/04-/346/225/260/346/215/256/345/210/206/346/236/220.md +67 -0
- package/dist/{template-starter/.ai/reference/open-api/16-ui- → template-empty/references/reference/open-api/12-ui-}/350/276/223/345/205/245.md +0 -16
- package/dist/template-empty/references/reference/open-api/README.md +32 -0
- package/dist/template-empty/{.ai → references}/reference/open-api.md +420 -10
- package/dist/template-starter/AGENTS.md +20 -20
- package/dist/template-starter/README.md +48 -33
- package/dist/template-starter/package.json +2 -2
- package/dist/template-starter/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/template-starter/references/reference/open-api/02-/350/267/257/347/224/261.md +63 -0
- package/dist/template-starter/{.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/template-starter/references/reference/open-api/04-/346/225/260/346/215/256/345/210/206/346/236/220.md +67 -0
- package/dist/{template-empty/.ai/reference/open-api/16-ui- → template-starter/references/reference/open-api/12-ui-}/350/276/223/345/205/245.md +0 -16
- package/dist/template-starter/references/reference/open-api/README.md +32 -0
- package/dist/template-starter/{.ai → references}/reference/open-api.md +420 -10
- package/package.json +1 -1
- package/dist/template-empty/.ai/guides/system-prompt.md +0 -331
- 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 +0 -699
- package/dist/template-empty/.ai/reference/open-api/02-/345/255/230/345/202/250.md +0 -409
- package/dist/template-empty/.ai/reference/open-api/03-/350/267/257/347/224/261.md +0 -165
- package/dist/template-empty/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
- package/dist/template-empty/.ai/reference/open-api/06-/347/275/221/347/273/234.md +0 -148
- package/dist/template-empty/.ai/reference/open-api/07-/345/252/222/344/275/223.md +0 -346
- package/dist/template-empty/.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/template-empty/.ai/reference/open-api/README.md +0 -36
- package/dist/template-starter/.ai/guides/system-prompt.md +0 -331
- 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 +0 -699
- package/dist/template-starter/.ai/reference/open-api/02-/345/255/230/345/202/250.md +0 -409
- package/dist/template-starter/.ai/reference/open-api/03-/350/267/257/347/224/261.md +0 -165
- package/dist/template-starter/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +0 -432
- package/dist/template-starter/.ai/reference/open-api/06-/347/275/221/347/273/234.md +0 -148
- package/dist/template-starter/.ai/reference/open-api/07-/345/252/222/344/275/223.md +0 -346
- package/dist/template-starter/.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/template-starter/.ai/reference/open-api/README.md +0 -36
- /package/dist/template-empty/{.ai → references}/examples/common-patterns.md +0 -0
- /package/dist/template-empty/{.ai → references}/examples/component-basics.md +0 -0
- /package/dist/template-empty/{.ai → references}/guides/best-practices.md +0 -0
- /package/dist/template-empty/{.ai → references}/guides/component-development.md +0 -0
- /package/dist/template-empty/{.ai → references}/guides/performance-optimization.md +0 -0
- /package/dist/template-empty/{.ai → references}/guides/troubleshooting.md +0 -0
- /package/dist/template-empty/{.ai → references}/reference/components-quick-ref.md +0 -0
- /package/dist/template-empty/{.ai → references}/reference/framework-api-quick-ref.md +0 -0
- /package/dist/template-empty/{.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/template-empty/{.ai/reference/open-api/10- → references/reference/open-api/06-}/350/256/276/345/244/207-wi-fi.md" +0 -0
- /package/dist/template-empty/{.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/template-empty/{.ai/reference/open-api/12- → references/reference/open-api/08-}/350/256/276/345/244/207-ibeacon.md" +0 -0
- /package/dist/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.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/template-empty/{.ai → references}/rules/dos-and-donts.md +0 -0
- /package/dist/template-starter/{.ai → references}/examples/common-patterns.md +0 -0
- /package/dist/template-starter/{.ai → references}/examples/component-basics.md +0 -0
- /package/dist/template-starter/{.ai → references}/guides/best-practices.md +0 -0
- /package/dist/template-starter/{.ai → references}/guides/component-development.md +0 -0
- /package/dist/template-starter/{.ai → references}/guides/performance-optimization.md +0 -0
- /package/dist/template-starter/{.ai → references}/guides/troubleshooting.md +0 -0
- /package/dist/template-starter/{.ai → references}/reference/components-quick-ref.md +0 -0
- /package/dist/template-starter/{.ai → references}/reference/framework-api-quick-ref.md +0 -0
- /package/dist/template-starter/{.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/template-starter/{.ai/reference/open-api/10- → references/reference/open-api/06-}/350/256/276/345/244/207-wi-fi.md" +0 -0
- /package/dist/template-starter/{.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/template-starter/{.ai/reference/open-api/12- → references/reference/open-api/08-}/350/256/276/345/244/207-ibeacon.md" +0 -0
- /package/dist/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.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/template-starter/{.ai → references}/rules/dos-and-donts.md +0 -0
|
@@ -1,546 +0,0 @@
|
|
|
1
|
-
# Open API: 开放能力 / 业务能力
|
|
2
|
-
|
|
3
|
-
开放业务能力、支付、隐私设置、上下文和外部应用打开。
|
|
4
|
-
|
|
5
|
-
[返回目录](./README.md) | [返回速查](../open-api.md)
|
|
6
|
-
|
|
7
|
-
## 速查
|
|
8
|
-
|
|
9
|
-
| API | 说明 |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| [getOrderPayment](#getorderpayment) | 查询订单支付结果。 |
|
|
12
|
-
| [postLoginResult](#postloginresult) | 回传 MCP 授权登录凭证。 |
|
|
13
|
-
| [getPrivacySetting](#getprivacysetting) | 获取隐私设置状态。 |
|
|
14
|
-
| [requestOrder](#requestorder) | 发起订单支付流程。 |
|
|
15
|
-
| [loginWithDoubaoWidget](#loginwithdoubaowidget) | 发起豆包 Widget 登录。 |
|
|
16
|
-
| [sendQueryMessage](#sendquerymessage) | 以用户身份发送一条消息。<br><br>返回 void,不是 Promise。 |
|
|
17
|
-
| [updateModelContext](#updatemodelcontext) | 向 Agent 捐赠上下文。 |
|
|
18
|
-
| [setAdditionalContext](#setadditionalcontext) | 设置全局上下文供大模型理解。<br><br>设置全局上下文。 |
|
|
19
|
-
| [dispatchActionDirective](#dispatchactiondirective) | 描述用户行为,约束模型行为及指定执行路径。 |
|
|
20
|
-
| [updateWidget](#updatewidget) | 更新指定卡片。 |
|
|
21
|
-
| [expiredWidget](#expiredwidget) | 更新过期的 widget 为固定卡片。 |
|
|
22
|
-
| [openApp](#openapp) | 通过 deep link 等方式打开外部应用。 |
|
|
23
|
-
|
|
24
|
-
## API 详情
|
|
25
|
-
|
|
26
|
-
<a id="getorderpayment"></a>
|
|
27
|
-
### getOrderPayment()
|
|
28
|
-
|
|
29
|
-
> **getOrderPayment**(`params`): `Promise`\<[`GetOrderPaymentResult`](#getorderpaymentresult)\>
|
|
30
|
-
|
|
31
|
-
查询订单支付结果。
|
|
32
|
-
|
|
33
|
-
#### Parameters
|
|
34
|
-
|
|
35
|
-
• **params**: [`GetOrderPaymentParams`](#getorderpaymentparams)
|
|
36
|
-
|
|
37
|
-
订单支付查询参数。
|
|
38
|
-
|
|
39
|
-
#### Returns
|
|
40
|
-
|
|
41
|
-
`Promise`\<[`GetOrderPaymentResult`](#getorderpaymentresult)\>
|
|
42
|
-
|
|
43
|
-
返回订单支付结果。
|
|
44
|
-
|
|
45
|
-
<a id="postloginresult"></a>
|
|
46
|
-
### postLoginResult()
|
|
47
|
-
|
|
48
|
-
> **postLoginResult**(`params`): `Promise`\<`object`\>
|
|
49
|
-
|
|
50
|
-
回传 MCP 授权登录凭证。
|
|
51
|
-
|
|
52
|
-
#### Parameters
|
|
53
|
-
|
|
54
|
-
• **params**: [`PostLoginResultRequest`](#postloginresultrequest)
|
|
55
|
-
|
|
56
|
-
登录结果回传参数。
|
|
57
|
-
|
|
58
|
-
#### Returns
|
|
59
|
-
|
|
60
|
-
`Promise`\<`object`\>
|
|
61
|
-
|
|
62
|
-
返回回传完成的 Promise。
|
|
63
|
-
|
|
64
|
-
<a id="getprivacysetting"></a>
|
|
65
|
-
### getPrivacySetting()
|
|
66
|
-
|
|
67
|
-
> **getPrivacySetting**(`params`?): `Promise`\<[`PrivacySettingResult`](#privacysettingresult)\>
|
|
68
|
-
|
|
69
|
-
获取隐私设置状态。
|
|
70
|
-
|
|
71
|
-
#### Parameters
|
|
72
|
-
|
|
73
|
-
• **params?**
|
|
74
|
-
|
|
75
|
-
#### Returns
|
|
76
|
-
|
|
77
|
-
`Promise`\<[`PrivacySettingResult`](#privacysettingresult)\>
|
|
78
|
-
|
|
79
|
-
返回隐私设置状态。
|
|
80
|
-
|
|
81
|
-
<a id="requestorder"></a>
|
|
82
|
-
### requestOrder()
|
|
83
|
-
|
|
84
|
-
> **requestOrder**(`params`): `Promise`\<[`RequestOrderResult`](#requestorderresult)\>
|
|
85
|
-
|
|
86
|
-
发起订单支付流程。
|
|
87
|
-
|
|
88
|
-
#### Parameters
|
|
89
|
-
|
|
90
|
-
• **params**: [`RequestOrderParams`](#requestorderparams)
|
|
91
|
-
|
|
92
|
-
订单支付请求参数。
|
|
93
|
-
|
|
94
|
-
#### Returns
|
|
95
|
-
|
|
96
|
-
`Promise`\<[`RequestOrderResult`](#requestorderresult)\>
|
|
97
|
-
|
|
98
|
-
返回订单支付请求结果。
|
|
99
|
-
|
|
100
|
-
<a id="loginwithdoubaowidget"></a>
|
|
101
|
-
### loginWithDoubaoWidget()
|
|
102
|
-
|
|
103
|
-
> **loginWithDoubaoWidget**(`params`): `Promise`\<[`LoginWithWidgetResult`](#loginwithwidgetresult)\>
|
|
104
|
-
|
|
105
|
-
发起豆包 Widget 登录。
|
|
106
|
-
|
|
107
|
-
#### Parameters
|
|
108
|
-
|
|
109
|
-
• **params**: [`LoginWithWidgetRequest`](#loginwithwidgetrequest)
|
|
110
|
-
|
|
111
|
-
Widget 登录参数。
|
|
112
|
-
|
|
113
|
-
#### Returns
|
|
114
|
-
|
|
115
|
-
`Promise`\<[`LoginWithWidgetResult`](#loginwithwidgetresult)\>
|
|
116
|
-
|
|
117
|
-
返回登录结果。
|
|
118
|
-
|
|
119
|
-
<a id="sendquerymessage"></a>
|
|
120
|
-
### sendQueryMessage()
|
|
121
|
-
|
|
122
|
-
> **sendQueryMessage**(`params`): `void`
|
|
123
|
-
|
|
124
|
-
以用户身份发送一条消息
|
|
125
|
-
|
|
126
|
-
由于会自动获取页面上下文来确定向哪个 bot 发送消息,因此只能在卡片或页面中调用
|
|
127
|
-
|
|
128
|
-
#### Parameters
|
|
129
|
-
|
|
130
|
-
• **params**: [`SendQueryMessageParams`](#sendquerymessageparams)
|
|
131
|
-
|
|
132
|
-
#### Returns
|
|
133
|
-
|
|
134
|
-
`void`
|
|
135
|
-
|
|
136
|
-
#### Example
|
|
137
|
-
|
|
138
|
-
```ts
|
|
139
|
-
await sendQueryMessage({ content: '订阅消息', type: 'text' })
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
<a id="updatemodelcontext"></a>
|
|
143
|
-
### updateModelContext()
|
|
144
|
-
|
|
145
|
-
> **updateModelContext**(`params`?): `Promise`\<`object`\>
|
|
146
|
-
|
|
147
|
-
向 Agent 捐赠上下文
|
|
148
|
-
|
|
149
|
-
#### Parameters
|
|
150
|
-
|
|
151
|
-
• **params?**: [`UpdateModelContextParams`](#updatemodelcontextparams)
|
|
152
|
-
|
|
153
|
-
#### Returns
|
|
154
|
-
|
|
155
|
-
`Promise`\<`object`\>
|
|
156
|
-
|
|
157
|
-
<a id="setadditionalcontext"></a>
|
|
158
|
-
### setAdditionalContext()
|
|
159
|
-
|
|
160
|
-
> **setAdditionalContext**(`params`): `Promise`\<`object`\>
|
|
161
|
-
|
|
162
|
-
设置全局上下文供大模型理解
|
|
163
|
-
|
|
164
|
-
#### Parameters
|
|
165
|
-
|
|
166
|
-
• **params**: [`SetAdditionalContextParams`](#setadditionalcontextparams)
|
|
167
|
-
|
|
168
|
-
#### Returns
|
|
169
|
-
|
|
170
|
-
`Promise`\<`object`\>
|
|
171
|
-
|
|
172
|
-
#### Remarks
|
|
173
|
-
|
|
174
|
-
设置全局上下文。
|
|
175
|
-
|
|
176
|
-
<a id="dispatchactiondirective"></a>
|
|
177
|
-
### dispatchActionDirective()
|
|
178
|
-
|
|
179
|
-
> **dispatchActionDirective**(`params`): `Promise`\<`object`\>
|
|
180
|
-
|
|
181
|
-
描述用户行为,约束模型行为及指定执行路径
|
|
182
|
-
|
|
183
|
-
#### Parameters
|
|
184
|
-
|
|
185
|
-
• **params**: [`DispatchActionDirectiveParams`](#dispatchactiondirectiveparams)
|
|
186
|
-
|
|
187
|
-
#### Returns
|
|
188
|
-
|
|
189
|
-
`Promise`\<`object`\>
|
|
190
|
-
|
|
191
|
-
<a id="updatewidget"></a>
|
|
192
|
-
### updateWidget()
|
|
193
|
-
|
|
194
|
-
> **updateWidget**(`params`): `Promise`\<`object`\>
|
|
195
|
-
|
|
196
|
-
更新指定卡片
|
|
197
|
-
|
|
198
|
-
#### Parameters
|
|
199
|
-
|
|
200
|
-
• **params**: [`UpdateWidgetParams`](#updatewidgetparams)
|
|
201
|
-
|
|
202
|
-
#### Returns
|
|
203
|
-
|
|
204
|
-
`Promise`\<`object`\>
|
|
205
|
-
|
|
206
|
-
<a id="expiredwidget"></a>
|
|
207
|
-
### expiredWidget()
|
|
208
|
-
|
|
209
|
-
> **expiredWidget**(`__namedParameters`): `Promise`\<`object`\>
|
|
210
|
-
|
|
211
|
-
更新过期的 widget 为固定卡片
|
|
212
|
-
|
|
213
|
-
#### Parameters
|
|
214
|
-
|
|
215
|
-
• **\_\_namedParameters**: [`ExpiredWidgetParams`](#expiredwidgetparams)
|
|
216
|
-
|
|
217
|
-
#### Returns
|
|
218
|
-
|
|
219
|
-
`Promise`\<`object`\>
|
|
220
|
-
|
|
221
|
-
#### Description
|
|
222
|
-
|
|
223
|
-
用于将状态已经过期的 widget 实例转换为固定的卡片
|
|
224
|
-
|
|
225
|
-
#### Example
|
|
226
|
-
|
|
227
|
-
```ts
|
|
228
|
-
expiredWidget({
|
|
229
|
-
widgetInstanceId: 'instance_123',
|
|
230
|
-
schema: '${pageId}?key=value'
|
|
231
|
-
});
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
<a id="openapp"></a>
|
|
235
|
-
### openApp()
|
|
236
|
-
|
|
237
|
-
> **openApp**(`params`): `Promise`\<[`OpenAppResult`](#openappresult)\>
|
|
238
|
-
|
|
239
|
-
通过 deep link 等方式打开外部应用。
|
|
240
|
-
|
|
241
|
-
#### Parameters
|
|
242
|
-
|
|
243
|
-
• **params**: [`OpenAppRequest`](#openapprequest)
|
|
244
|
-
|
|
245
|
-
外部应用打开参数。
|
|
246
|
-
|
|
247
|
-
#### Returns
|
|
248
|
-
|
|
249
|
-
`Promise`\<[`OpenAppResult`](#openappresult)\>
|
|
250
|
-
|
|
251
|
-
返回外部应用打开结果。
|
|
252
|
-
|
|
253
|
-
## 相关类型
|
|
254
|
-
|
|
255
|
-
<a id="getorderpaymentparams"></a>
|
|
256
|
-
### GetOrderPaymentParams
|
|
257
|
-
|
|
258
|
-
#### Properties
|
|
259
|
-
|
|
260
|
-
##### orderId
|
|
261
|
-
|
|
262
|
-
> **orderId**: `string`
|
|
263
|
-
|
|
264
|
-
<a id="getorderpaymentresult"></a>
|
|
265
|
-
### GetOrderPaymentResult
|
|
266
|
-
|
|
267
|
-
#### Properties
|
|
268
|
-
|
|
269
|
-
##### logId
|
|
270
|
-
|
|
271
|
-
> **logId**: `string`
|
|
272
|
-
|
|
273
|
-
##### orderId
|
|
274
|
-
|
|
275
|
-
> **orderId**: `string`
|
|
276
|
-
|
|
277
|
-
<a id="postloginresultrequest"></a>
|
|
278
|
-
### PostLoginResultRequest
|
|
279
|
-
|
|
280
|
-
#### Properties
|
|
281
|
-
|
|
282
|
-
##### code?
|
|
283
|
-
|
|
284
|
-
> `optional` **code**: `string`
|
|
285
|
-
|
|
286
|
-
Authorization login credential, valid when login result is true
|
|
287
|
-
|
|
288
|
-
##### result
|
|
289
|
-
|
|
290
|
-
> **result**: `boolean`
|
|
291
|
-
|
|
292
|
-
Login result, true means success, false means failure
|
|
293
|
-
|
|
294
|
-
<a id="privacysettingresult"></a>
|
|
295
|
-
### PrivacySettingResult
|
|
296
|
-
|
|
297
|
-
#### Properties
|
|
298
|
-
|
|
299
|
-
##### needAuthorization
|
|
300
|
-
|
|
301
|
-
> **needAuthorization**: `boolean`
|
|
302
|
-
|
|
303
|
-
Whether user authorization for privacy agreement is required
|
|
304
|
-
|
|
305
|
-
<a id="requestorderparams"></a>
|
|
306
|
-
### RequestOrderParams
|
|
307
|
-
|
|
308
|
-
#### Properties
|
|
309
|
-
|
|
310
|
-
##### data
|
|
311
|
-
|
|
312
|
-
> **data**: `string`
|
|
313
|
-
|
|
314
|
-
##### dbAuthorization
|
|
315
|
-
|
|
316
|
-
> **dbAuthorization**: `string`
|
|
317
|
-
|
|
318
|
-
<a id="requestorderresult"></a>
|
|
319
|
-
### RequestOrderResult
|
|
320
|
-
|
|
321
|
-
#### Properties
|
|
322
|
-
|
|
323
|
-
##### logId
|
|
324
|
-
|
|
325
|
-
> **logId**: `string`
|
|
326
|
-
|
|
327
|
-
##### orderId
|
|
328
|
-
|
|
329
|
-
> **orderId**: `string`
|
|
330
|
-
|
|
331
|
-
<a id="loginwithwidgetrequest"></a>
|
|
332
|
-
### LoginWithWidgetRequest
|
|
333
|
-
|
|
334
|
-
#### Properties
|
|
335
|
-
|
|
336
|
-
##### loginType
|
|
337
|
-
|
|
338
|
-
> **loginType**: [`LoginType`](#logintype-1)
|
|
339
|
-
|
|
340
|
-
Login type identifier
|
|
341
|
-
|
|
342
|
-
<a id="loginwithwidgetresult"></a>
|
|
343
|
-
### LoginWithWidgetResult
|
|
344
|
-
|
|
345
|
-
#### Properties
|
|
346
|
-
|
|
347
|
-
##### result
|
|
348
|
-
|
|
349
|
-
> **result**: `boolean`
|
|
350
|
-
|
|
351
|
-
Whether the login is successful
|
|
352
|
-
|
|
353
|
-
<a id="logintype-1"></a>
|
|
354
|
-
<a id="logintype"></a>
|
|
355
|
-
### LoginType
|
|
356
|
-
|
|
357
|
-
> **LoginType**: `0` \| `1` \| `2` \| `3`
|
|
358
|
-
|
|
359
|
-
Widget 登录类型。
|
|
360
|
-
|
|
361
|
-
- `0`: 隐私协议登录
|
|
362
|
-
- `1`: 仅登录
|
|
363
|
-
- `2`: 先登录再隐私协议,两次弹窗
|
|
364
|
-
- `3`: 登录和隐私协议合并,一次弹窗
|
|
365
|
-
|
|
366
|
-
<a id="sendquerymessageparams"></a>
|
|
367
|
-
### SendQueryMessageParams
|
|
368
|
-
|
|
369
|
-
#### Properties
|
|
370
|
-
|
|
371
|
-
##### content
|
|
372
|
-
|
|
373
|
-
> **content**: `string`
|
|
374
|
-
|
|
375
|
-
要发送的消息。根据类型不同,序列化方式可能不同
|
|
376
|
-
|
|
377
|
-
##### type
|
|
378
|
-
|
|
379
|
-
> **type**: `"text"`
|
|
380
|
-
|
|
381
|
-
消息类型,目前仅支持 text
|
|
382
|
-
|
|
383
|
-
<a id="updatemodelcontextparams"></a>
|
|
384
|
-
### UpdateModelContextParams
|
|
385
|
-
|
|
386
|
-
#### Properties
|
|
387
|
-
|
|
388
|
-
##### content?
|
|
389
|
-
|
|
390
|
-
> `optional` **content**: `string`
|
|
391
|
-
|
|
392
|
-
上下文内容,格式无约束,可以与 MCP 服务下发的上下文格式保持一致
|
|
393
|
-
|
|
394
|
-
##### entityId?
|
|
395
|
-
|
|
396
|
-
> `optional` **entityId**: `string`
|
|
397
|
-
|
|
398
|
-
上下文所属的 entityID,业务侧管理
|
|
399
|
-
|
|
400
|
-
##### taskId?
|
|
401
|
-
|
|
402
|
-
> `optional` **taskId**: `string`
|
|
403
|
-
|
|
404
|
-
上下文所属任务 ID,业务侧定义
|
|
405
|
-
|
|
406
|
-
<a id="setadditionalcontextparams"></a>
|
|
407
|
-
### SetAdditionalContextParams
|
|
408
|
-
|
|
409
|
-
#### Properties
|
|
410
|
-
|
|
411
|
-
##### additionalContext
|
|
412
|
-
|
|
413
|
-
> **additionalContext**: `string`
|
|
414
|
-
|
|
415
|
-
上下文内容
|
|
416
|
-
|
|
417
|
-
##### botId?
|
|
418
|
-
|
|
419
|
-
> `optional` **botId**: `string`
|
|
420
|
-
|
|
421
|
-
指定 bot id
|
|
422
|
-
|
|
423
|
-
<a id="dispatchactiondirectiveparams"></a>
|
|
424
|
-
### DispatchActionDirectiveParams
|
|
425
|
-
|
|
426
|
-
#### Properties
|
|
427
|
-
|
|
428
|
-
##### actionDescribe
|
|
429
|
-
|
|
430
|
-
> **actionDescribe**: `string`
|
|
431
|
-
|
|
432
|
-
自然语言描述,例如:用户点击支付按钮并完成话费支付
|
|
433
|
-
|
|
434
|
-
##### actionType
|
|
435
|
-
|
|
436
|
-
> **actionType**: [`ActionDirectiveType`](#actiondirectivetype)
|
|
437
|
-
|
|
438
|
-
动作类型,参见 [ActionDirectiveType](#actiondirectivetype)
|
|
439
|
-
|
|
440
|
-
##### widgetInstanceId
|
|
441
|
-
|
|
442
|
-
> **widgetInstanceId**: `string`
|
|
443
|
-
|
|
444
|
-
会话消息关联的卡片ID
|
|
445
|
-
|
|
446
|
-
<a id="actiondirectivetype"></a>
|
|
447
|
-
### ActionDirectiveType
|
|
448
|
-
|
|
449
|
-
#### Enumeration Members
|
|
450
|
-
|
|
451
|
-
##### BUTTON\_CLICK
|
|
452
|
-
|
|
453
|
-
> **BUTTON\_CLICK**: `"button_click"`
|
|
454
|
-
|
|
455
|
-
按钮点击
|
|
456
|
-
|
|
457
|
-
##### FORM\_SUBMIT
|
|
458
|
-
|
|
459
|
-
> **FORM\_SUBMIT**: `"form_submit"`
|
|
460
|
-
|
|
461
|
-
表单提交(复杂的信息提交场景)
|
|
462
|
-
|
|
463
|
-
##### OPTION\_SELECT
|
|
464
|
-
|
|
465
|
-
> **OPTION\_SELECT**: `"option_select"`
|
|
466
|
-
|
|
467
|
-
选择(下拉列表场景)
|
|
468
|
-
|
|
469
|
-
<a id="updatewidgetparams"></a>
|
|
470
|
-
### UpdateWidgetParams
|
|
471
|
-
|
|
472
|
-
#### Properties
|
|
473
|
-
|
|
474
|
-
##### widgetData
|
|
475
|
-
|
|
476
|
-
> **widgetData**: `string`
|
|
477
|
-
|
|
478
|
-
卡片渲染的数据
|
|
479
|
-
|
|
480
|
-
##### widgetId?
|
|
481
|
-
|
|
482
|
-
> `optional` **widgetId**: `string`
|
|
483
|
-
|
|
484
|
-
卡片更新的为新的widgetId
|
|
485
|
-
|
|
486
|
-
##### widgetInstanceId
|
|
487
|
-
|
|
488
|
-
> **widgetInstanceId**: `string`
|
|
489
|
-
|
|
490
|
-
需要更新的widget 实例 ID
|
|
491
|
-
|
|
492
|
-
<a id="expiredwidgetparams"></a>
|
|
493
|
-
### ExpiredWidgetParams
|
|
494
|
-
|
|
495
|
-
#### Properties
|
|
496
|
-
|
|
497
|
-
##### schema?
|
|
498
|
-
|
|
499
|
-
> `optional` **schema**: `string`
|
|
500
|
-
|
|
501
|
-
点击失效卡要跳转的页面 schema,格式与 navigateTo 的 url 相同
|
|
502
|
-
|
|
503
|
-
##### widgetInstanceId
|
|
504
|
-
|
|
505
|
-
> **widgetInstanceId**: `string`
|
|
506
|
-
|
|
507
|
-
卡片实例 ID,在卡片环境通过getWidgetInstanceId来获取,其他环境(比如页面)需要通过传参或通信的方式传递过去
|
|
508
|
-
|
|
509
|
-
<a id="openapprequest"></a>
|
|
510
|
-
### OpenAppRequest
|
|
511
|
-
|
|
512
|
-
#### Properties
|
|
513
|
-
|
|
514
|
-
##### fallbackUrl?
|
|
515
|
-
|
|
516
|
-
> `optional` **fallbackUrl**: `string`
|
|
517
|
-
|
|
518
|
-
Optional fallback URL when deep link fails
|
|
519
|
-
|
|
520
|
-
##### targetPackage?
|
|
521
|
-
|
|
522
|
-
> `optional` **targetPackage**: `string`
|
|
523
|
-
|
|
524
|
-
Optional target package name for Android
|
|
525
|
-
|
|
526
|
-
##### uri
|
|
527
|
-
|
|
528
|
-
> **uri**: `string`
|
|
529
|
-
|
|
530
|
-
Target URI to open, e.g. scheme://path?query
|
|
531
|
-
|
|
532
|
-
<a id="openappresult"></a>
|
|
533
|
-
### OpenAppResult
|
|
534
|
-
|
|
535
|
-
#### Properties
|
|
536
|
-
|
|
537
|
-
##### status
|
|
538
|
-
|
|
539
|
-
> **status**: [`OpenAppStatus`](#openappstatus)
|
|
540
|
-
|
|
541
|
-
Execution status from client
|
|
542
|
-
|
|
543
|
-
<a id="openappstatus"></a>
|
|
544
|
-
### OpenAppStatus
|
|
545
|
-
|
|
546
|
-
> **OpenAppStatus**: `"deep_link"` \| `"market"` \| `"browser"`
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Open API 目录
|
|
2
|
-
|
|
3
|
-
> 这里是系统能力 Open API 的分组目录。先用 [速查索引](../open-api.md) 找 API,再进入对应分组查看完整参数、返回值、示例和相关类型。
|
|
4
|
-
|
|
5
|
-
## 分组
|
|
6
|
-
|
|
7
|
-
| 分组 | 说明 | API 数量 | 详细文档 |
|
|
8
|
-
| --- | --- | ---: | --- |
|
|
9
|
-
| 基础 / 账号 / 系统 | 账号、授权、宿主基础信息、窗口信息和定位。 | 11 | [查看](./01-基础-账号-系统.md) |
|
|
10
|
-
| 存储 | 本地缓存;带 Sync 后缀的是同步 API。 | 10 | [查看](./02-存储.md) |
|
|
11
|
-
| 路由 | 应用内页面跳转和关闭。 | 6 | [查看](./03-路由.md) |
|
|
12
|
-
| 界面 / 交互 | Toast、Loading、Modal、ActionSheet 和返回前提醒。 | 9 | [查看](./04-界面-交互.md) |
|
|
13
|
-
| 界面 / 输入 | 键盘和输入框选区能力。 | 1 | [查看](./05-界面-输入.md) |
|
|
14
|
-
| 网络 | 网络请求 | 1 | [查看](./06-网络.md) |
|
|
15
|
-
| 媒体 | 图片选择、预览、保存、压缩和信息读取。 | 5 | [查看](./07-媒体.md) |
|
|
16
|
-
| 开放能力 / 业务能力 | 开放业务能力、支付、隐私设置、上下文和外部应用打开。 | 12 | [查看](./08-开放能力-业务能力.md) |
|
|
17
|
-
| 设备 / 蓝牙 | 蓝牙和 BLE 能力;通常先打开适配器,再扫描、连接和读写。 | 19 | [查看](./09-设备-蓝牙.md) |
|
|
18
|
-
| 设备 / Wi-Fi | Wi-Fi 模块能力;通常先 startWifi,再获取列表或连接。 | 6 | [查看](./10-设备-wi-fi.md) |
|
|
19
|
-
| 设备 / 加速度计 | 加速度计监听能力。 | 3 | [查看](./11-设备-加速度计.md) |
|
|
20
|
-
| 设备 / iBeacon | iBeacon 搜索和结果读取能力。 | 3 | [查看](./12-设备-ibeacon.md) |
|
|
21
|
-
| 设备 / 罗盘 | 罗盘监听能力。 | 3 | [查看](./13-设备-罗盘.md) |
|
|
22
|
-
| 设备 / 设备方向 | 设备方向监听能力。 | 2 | [查看](./14-设备-设备方向.md) |
|
|
23
|
-
| 设备 / 陀螺仪 | 陀螺仪监听能力。 | 3 | [查看](./15-设备-陀螺仪.md) |
|
|
24
|
-
| UI / 输入 | 键盘和输入框选区能力。 | 2 | [查看](./16-ui-输入.md) |
|
|
25
|
-
| 设备 / 网络 | 网络类型和本机局域网 IP。 | 3 | [查看](./17-设备-网络.md) |
|
|
26
|
-
| 设备 / 短信 | 拉起系统短信发送面板。 | 1 | [查看](./18-设备-短信.md) |
|
|
27
|
-
| 设备 / 无障碍 | 检测无障碍能力开关状态。 | 1 | [查看](./19-设备-无障碍.md) |
|
|
28
|
-
| 设备 / 电池 | 电池信息读取与变化监听。 | 2 | [查看](./20-设备-电池.md) |
|
|
29
|
-
| 设备 / 日历 | 向系统日历添加事件和重复事件。 | 2 | [查看](./21-设备-日历.md) |
|
|
30
|
-
| 设备 / 剪贴板 | 读取和设置系统剪贴板内容。 | 2 | [查看](./22-设备-剪贴板.md) |
|
|
31
|
-
| 设备 / 联系人 | 选择和添加手机联系人。 | 2 | [查看](./23-设备-联系人.md) |
|
|
32
|
-
| 设备 / 加密 | 安全随机数能力。 | 1 | [查看](./24-设备-加密.md) |
|
|
33
|
-
| 设备 / 电话 | 拨打电话。 | 1 | [查看](./25-设备-电话.md) |
|
|
34
|
-
| 设备 / 扫码 | 调起扫码并读取扫码结果。 | 1 | [查看](./26-设备-扫码.md) |
|
|
35
|
-
| 设备 / 屏幕 | 屏幕亮度、常亮和截屏/录屏相关能力。 | 5 | [查看](./27-设备-屏幕.md) |
|
|
36
|
-
| 设备 / 震动 | 触发短震动和长震动。 | 2 | [查看](./28-设备-震动.md) |
|