@doubao-apps/create 0.0.25 → 0.0.27
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 +4 -4
- package/dist/template-empty/.ai/examples/common-patterns.md +53 -43
- package/dist/template-empty/.ai/examples/component-basics.md +0 -17
- package/dist/template-empty/.ai/guides/component-development.md +96 -214
- package/dist/template-empty/.ai/guides/system-prompt.md +14 -14
- package/dist/template-empty/.ai/reference/framework-api-quick-ref.md +46 -85
- package/dist/template-empty/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +699 -0
- package/dist/template-empty/.ai/reference/open-api/02-/345/255/230/345/202/250.md +409 -0
- package/dist/template-empty/.ai/reference/open-api/03-/350/267/257/347/224/261.md +165 -0
- package/dist/template-empty/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +432 -0
- package/dist/template-empty/.ai/reference/open-api/05-/347/225/214/351/235/242-/350/276/223/345/205/245.md +42 -0
- package/dist/template-empty/.ai/reference/open-api/06-/347/275/221/347/273/234.md +148 -0
- package/dist/template-empty/.ai/reference/open-api/07-/345/252/222/344/275/223.md +346 -0
- 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 +546 -0
- package/dist/template-empty/.ai/reference/open-api/09-/350/256/276/345/244/207-/350/223/235/347/211/231.md +961 -0
- package/dist/template-empty/.ai/reference/open-api/10-/350/256/276/345/244/207-wi-fi.md +277 -0
- package/dist/template-empty/.ai/reference/open-api/11-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +104 -0
- package/dist/template-empty/.ai/reference/open-api/12-/350/256/276/345/244/207-ibeacon.md +148 -0
- package/dist/template-empty/.ai/reference/open-api/13-/350/256/276/345/244/207-/347/275/227/347/233/230.md +82 -0
- package/dist/template-empty/.ai/reference/open-api/14-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +70 -0
- package/dist/template-empty/.ai/reference/open-api/15-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +104 -0
- package/dist/template-empty/.ai/reference/open-api/16-ui-/350/276/223/345/205/245.md +65 -0
- package/dist/template-empty/.ai/reference/open-api/17-/350/256/276/345/244/207-/347/275/221/347/273/234.md +164 -0
- package/dist/template-empty/.ai/reference/open-api/18-/350/256/276/345/244/207-/347/237/255/344/277/241.md +62 -0
- package/dist/template-empty/.ai/reference/open-api/19-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +43 -0
- package/dist/template-empty/.ai/reference/open-api/20-/350/256/276/345/244/207-/347/224/265/346/261/240.md +83 -0
- package/dist/template-empty/.ai/reference/open-api/21-/350/256/276/345/244/207-/346/227/245/345/216/206.md +215 -0
- package/dist/template-empty/.ai/reference/open-api/22-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +70 -0
- package/dist/template-empty/.ai/reference/open-api/23-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +270 -0
- package/dist/template-empty/.ai/reference/open-api/24-/350/256/276/345/244/207-/345/212/240/345/257/206.md +56 -0
- package/dist/template-empty/.ai/reference/open-api/25-/350/256/276/345/244/207-/347/224/265/350/257/235.md +41 -0
- package/dist/template-empty/.ai/reference/open-api/26-/350/256/276/345/244/207-/346/211/253/347/240/201.md +100 -0
- package/dist/template-empty/.ai/reference/open-api/27-/350/256/276/345/244/207-/345/261/217/345/271/225.md +173 -0
- package/dist/template-empty/.ai/reference/open-api/28-/350/256/276/345/244/207-/351/234/207/345/212/250.md +66 -0
- package/dist/template-empty/.ai/reference/open-api/README.md +36 -0
- package/dist/template-empty/.ai/reference/open-api.md +1758 -266
- package/dist/template-empty/.ai/rules/dos-and-donts.md +50 -37
- package/dist/template-empty/AGENTS.md +56 -33
- package/dist/template-empty/README.md +57 -10
- package/dist/template-empty/package.json +2 -2
- package/dist/template-empty/src/app.config.ts +6 -0
- package/dist/template-empty/src/app.ts +0 -6
- package/dist/template-empty/tsconfig.json +2 -0
- package/dist/template-starter/.ai/examples/common-patterns.md +53 -43
- package/dist/template-starter/.ai/examples/component-basics.md +0 -17
- package/dist/template-starter/.ai/guides/component-development.md +96 -214
- package/dist/template-starter/.ai/guides/system-prompt.md +14 -14
- package/dist/template-starter/.ai/reference/framework-api-quick-ref.md +46 -85
- package/dist/template-starter/.ai/reference/open-api/01-/345/237/272/347/241/200-/350/264/246/345/217/267-/347/263/273/347/273/237.md +699 -0
- package/dist/template-starter/.ai/reference/open-api/02-/345/255/230/345/202/250.md +409 -0
- package/dist/template-starter/.ai/reference/open-api/03-/350/267/257/347/224/261.md +165 -0
- package/dist/template-starter/.ai/reference/open-api/04-/347/225/214/351/235/242-/344/272/244/344/272/222.md +432 -0
- package/dist/template-starter/.ai/reference/open-api/05-/347/225/214/351/235/242-/350/276/223/345/205/245.md +42 -0
- package/dist/template-starter/.ai/reference/open-api/06-/347/275/221/347/273/234.md +148 -0
- package/dist/template-starter/.ai/reference/open-api/07-/345/252/222/344/275/223.md +346 -0
- 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 +546 -0
- package/dist/template-starter/.ai/reference/open-api/09-/350/256/276/345/244/207-/350/223/235/347/211/231.md +961 -0
- package/dist/template-starter/.ai/reference/open-api/10-/350/256/276/345/244/207-wi-fi.md +277 -0
- package/dist/template-starter/.ai/reference/open-api/11-/350/256/276/345/244/207-/345/212/240/351/200/237/345/272/246/350/256/241.md +104 -0
- package/dist/template-starter/.ai/reference/open-api/12-/350/256/276/345/244/207-ibeacon.md +148 -0
- package/dist/template-starter/.ai/reference/open-api/13-/350/256/276/345/244/207-/347/275/227/347/233/230.md +82 -0
- package/dist/template-starter/.ai/reference/open-api/14-/350/256/276/345/244/207-/350/256/276/345/244/207/346/226/271/345/220/221.md +70 -0
- package/dist/template-starter/.ai/reference/open-api/15-/350/256/276/345/244/207-/351/231/200/350/236/272/344/273/252.md +104 -0
- package/dist/template-starter/.ai/reference/open-api/16-ui-/350/276/223/345/205/245.md +65 -0
- package/dist/template-starter/.ai/reference/open-api/17-/350/256/276/345/244/207-/347/275/221/347/273/234.md +164 -0
- package/dist/template-starter/.ai/reference/open-api/18-/350/256/276/345/244/207-/347/237/255/344/277/241.md +62 -0
- package/dist/template-starter/.ai/reference/open-api/19-/350/256/276/345/244/207-/346/227/240/351/232/234/347/242/215.md +43 -0
- package/dist/template-starter/.ai/reference/open-api/20-/350/256/276/345/244/207-/347/224/265/346/261/240.md +83 -0
- package/dist/template-starter/.ai/reference/open-api/21-/350/256/276/345/244/207-/346/227/245/345/216/206.md +215 -0
- package/dist/template-starter/.ai/reference/open-api/22-/350/256/276/345/244/207-/345/211/252/350/264/264/346/235/277.md +70 -0
- package/dist/template-starter/.ai/reference/open-api/23-/350/256/276/345/244/207-/350/201/224/347/263/273/344/272/272.md +270 -0
- package/dist/template-starter/.ai/reference/open-api/24-/350/256/276/345/244/207-/345/212/240/345/257/206.md +56 -0
- package/dist/template-starter/.ai/reference/open-api/25-/350/256/276/345/244/207-/347/224/265/350/257/235.md +41 -0
- package/dist/template-starter/.ai/reference/open-api/26-/350/256/276/345/244/207-/346/211/253/347/240/201.md +100 -0
- package/dist/template-starter/.ai/reference/open-api/27-/350/256/276/345/244/207-/345/261/217/345/271/225.md +173 -0
- package/dist/template-starter/.ai/reference/open-api/28-/350/256/276/345/244/207-/351/234/207/345/212/250.md +66 -0
- package/dist/template-starter/.ai/reference/open-api/README.md +36 -0
- package/dist/template-starter/.ai/reference/open-api.md +1758 -266
- package/dist/template-starter/.ai/rules/dos-and-donts.md +50 -37
- package/dist/template-starter/AGENTS.md +56 -33
- package/dist/template-starter/README.md +6 -1
- package/dist/template-starter/package.json +2 -2
- package/dist/template-starter/src/app.config.ts +35 -0
- package/dist/template-starter/src/app.ts +0 -6
- package/dist/template-starter/src/pages/applet/index.tsx +0 -5
- package/dist/template-starter/src/pages/home/index.tsx +0 -5
- package/dist/template-starter/src/pages/lynx/index.tsx +0 -4
- package/dist/template-starter/src/pages/react-lynx/index.tsx +0 -5
- package/dist/template-starter/src/widgets/weather-card/index.tsx +0 -4
- package/dist/template-starter/tsconfig.json +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,546 @@
|
|
|
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"`
|