@doubao-apps/create 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. 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
  2. package/dist/template-empty/.ai/reference/open-api/02-storage.md +417 -0
  3. package/dist/template-empty/.ai/reference/open-api/03-router.md +165 -0
  4. package/dist/template-empty/.ai/reference/open-api/04-ui-/344/272/244/344/272/222.md +432 -0
  5. package/dist/template-empty/.ai/reference/open-api/05-ui-/350/276/223/345/205/245.md +95 -0
  6. package/dist/template-empty/.ai/reference/open-api/06-network.md +298 -0
  7. package/dist/template-empty/.ai/reference/open-api/07-media.md +346 -0
  8. package/dist/template-empty/.ai/reference/open-api/08-open-/344/270/232/345/212/241/350/203/275/345/212/233.md +477 -0
  9. package/dist/template-empty/.ai/reference/open-api/09-device-bluetooth.md +985 -0
  10. package/dist/template-empty/.ai/reference/open-api/10-device-wi-fi.md +277 -0
  11. package/dist/template-empty/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md +372 -0
  12. package/dist/template-empty/.ai/reference/open-api/12-device-/346/234/254/345/234/260/350/203/275/345/212/233.md +1005 -0
  13. package/dist/template-empty/.ai/reference/open-api/README.md +20 -0
  14. package/dist/template-empty/.ai/reference/open-api.md +1532 -307
  15. package/dist/template-empty/AGENTS.md +2 -2
  16. package/dist/template-empty/package.json +2 -2
  17. 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
  18. package/dist/template-starter/.ai/reference/open-api/02-storage.md +417 -0
  19. package/dist/template-starter/.ai/reference/open-api/03-router.md +165 -0
  20. package/dist/template-starter/.ai/reference/open-api/04-ui-/344/272/244/344/272/222.md +432 -0
  21. package/dist/template-starter/.ai/reference/open-api/05-ui-/350/276/223/345/205/245.md +95 -0
  22. package/dist/template-starter/.ai/reference/open-api/06-network.md +298 -0
  23. package/dist/template-starter/.ai/reference/open-api/07-media.md +346 -0
  24. package/dist/template-starter/.ai/reference/open-api/08-open-/344/270/232/345/212/241/350/203/275/345/212/233.md +477 -0
  25. package/dist/template-starter/.ai/reference/open-api/09-device-bluetooth.md +985 -0
  26. package/dist/template-starter/.ai/reference/open-api/10-device-wi-fi.md +277 -0
  27. package/dist/template-starter/.ai/reference/open-api/11-device-/344/274/240/346/204/237/345/231/250.md +372 -0
  28. package/dist/template-starter/.ai/reference/open-api/12-device-/346/234/254/345/234/260/350/203/275/345/212/233.md +1005 -0
  29. package/dist/template-starter/.ai/reference/open-api/README.md +20 -0
  30. package/dist/template-starter/.ai/reference/open-api.md +1532 -307
  31. package/dist/template-starter/AGENTS.md +2 -2
  32. package/dist/template-starter/package.json +2 -2
  33. package/package.json +1 -1
@@ -0,0 +1,477 @@
1
+ # Open API: Open / 业务能力
2
+
3
+ 开放业务能力、支付、隐私设置、上下文和外部应用打开。
4
+
5
+ [返回目录](./README.md) | [返回速查](../open-api.md)
6
+
7
+ ## 速查
8
+
9
+ | API | 签名 | 用途 | 参数类型 | 结果类型 | 注意点 |
10
+ | --- | --- | --- | --- | --- | --- |
11
+ | [`getOrderPayment`](#getorderpayment) | `getOrderPayment(params): Promise<GetOrderPaymentResult>` | 查询订单支付结果 | `params: GetOrderPaymentParams` | `Promise<GetOrderPaymentResult>` | - |
12
+ | [`postLoginResult`](#postloginresult) | `postLoginResult(params): Promise<object>` | 回传 MCP 授权登录凭证 | `params: PostLoginResultRequest` | `Promise<object>` | - |
13
+ | [`getPrivacySetting`](#getprivacysetting) | `getPrivacySetting(params?): Promise<PrivacySettingResult>` | 获取隐私设置状态 | `params?` | `Promise<PrivacySettingResult>` | - |
14
+ | [`requestOrder`](#requestorder) | `requestOrder(params): Promise<RequestOrderResult>` | 发起订单支付流程 | `params: RequestOrderParams` | `Promise<RequestOrderResult>` | - |
15
+ | [`loginWithDoubaoWidget`](#loginwithdoubaowidget) | `loginWithDoubaoWidget(params): Promise<LoginWithWidgetResult>` | 发起豆包 Widget 登录 | `params: LoginWithWidgetRequest` | `Promise<LoginWithWidgetResult>` | - |
16
+ | [`sendQueryMessage`](#sendquerymessage) | `sendQueryMessage(params): void` | 以用户身份发送一条消息 | `params: SendQueryMessageParams` | `void` | 返回 void,不是 Promise |
17
+ | [`updateModelContext`](#updatemodelcontext) | `updateModelContext(params?): Promise<object>` | 向 Agent 捐赠上下文 | `params?: UpdateModelContextParams` | `Promise<object>` | - |
18
+ | [`setAdditionalContext`](#setadditionalcontext) | `setAdditionalContext(params): Promise<object>` | 设置全局上下文供大模型理解 | `params: SetAdditionalContextParams` | `Promise<object>` | 设置全局上下文 |
19
+ | [`dispatchActionDirective`](#dispatchactiondirective) | `dispatchActionDirective(params): Promise<object>` | 描述用户行为,约束模型行为及指定执行路径 | `params: DispatchActionDirectiveParams` | `Promise<object>` | - |
20
+ | [`updateWidget`](#updatewidget) | `updateWidget(params): Promise<object>` | 更新指定卡片 | `params: UpdateWidgetParams` | `Promise<object>` | - |
21
+ | [`openApp`](#openapp) | `openApp(params): Promise<OpenAppResult>` | 通过 deep link 等方式打开外部应用 | `params: OpenAppRequest` | `Promise<OpenAppResult>` | - |
22
+
23
+ ## API 详情
24
+
25
+ <a id="getorderpayment"></a>
26
+ ### getOrderPayment()
27
+
28
+ > **getOrderPayment**(`params`): `Promise`\<[`GetOrderPaymentResult`](#getorderpaymentresult)\>
29
+
30
+ 查询订单支付结果。
31
+
32
+ #### Parameters
33
+
34
+ • **params**: [`GetOrderPaymentParams`](#getorderpaymentparams)
35
+
36
+ 订单支付查询参数。
37
+
38
+ #### Returns
39
+
40
+ `Promise`\<[`GetOrderPaymentResult`](#getorderpaymentresult)\>
41
+
42
+ 返回订单支付结果。
43
+
44
+ <a id="postloginresult"></a>
45
+ ### postLoginResult()
46
+
47
+ > **postLoginResult**(`params`): `Promise`\<`object`\>
48
+
49
+ 回传 MCP 授权登录凭证。
50
+
51
+ #### Parameters
52
+
53
+ • **params**: [`PostLoginResultRequest`](#postloginresultrequest)
54
+
55
+ 登录结果回传参数。
56
+
57
+ #### Returns
58
+
59
+ `Promise`\<`object`\>
60
+
61
+ 返回回传完成的 Promise。
62
+
63
+ <a id="getprivacysetting"></a>
64
+ ### getPrivacySetting()
65
+
66
+ > **getPrivacySetting**(`params`?): `Promise`\<[`PrivacySettingResult`](#privacysettingresult)\>
67
+
68
+ 获取隐私设置状态。
69
+
70
+ #### Parameters
71
+
72
+ • **params?**
73
+
74
+ #### Returns
75
+
76
+ `Promise`\<[`PrivacySettingResult`](#privacysettingresult)\>
77
+
78
+ 返回隐私设置状态。
79
+
80
+ <a id="requestorder"></a>
81
+ ### requestOrder()
82
+
83
+ > **requestOrder**(`params`): `Promise`\<[`RequestOrderResult`](#requestorderresult)\>
84
+
85
+ 发起订单支付流程。
86
+
87
+ #### Parameters
88
+
89
+ • **params**: [`RequestOrderParams`](#requestorderparams)
90
+
91
+ 订单支付请求参数。
92
+
93
+ #### Returns
94
+
95
+ `Promise`\<[`RequestOrderResult`](#requestorderresult)\>
96
+
97
+ 返回订单支付请求结果。
98
+
99
+ <a id="loginwithdoubaowidget"></a>
100
+ ### loginWithDoubaoWidget()
101
+
102
+ > **loginWithDoubaoWidget**(`params`): `Promise`\<[`LoginWithWidgetResult`](#loginwithwidgetresult)\>
103
+
104
+ 发起豆包 Widget 登录。
105
+
106
+ #### Parameters
107
+
108
+ • **params**: [`LoginWithWidgetRequest`](#loginwithwidgetrequest)
109
+
110
+ Widget 登录参数。
111
+
112
+ #### Returns
113
+
114
+ `Promise`\<[`LoginWithWidgetResult`](#loginwithwidgetresult)\>
115
+
116
+ 返回登录结果。
117
+
118
+ <a id="sendquerymessage"></a>
119
+ ### sendQueryMessage()
120
+
121
+ > **sendQueryMessage**(`params`): `void`
122
+
123
+ 以用户身份发送一条消息
124
+
125
+ 由于会自动获取页面上下文来确定向哪个 bot 发送消息,因此只能在卡片或页面中调用
126
+
127
+ #### Parameters
128
+
129
+ • **params**: [`SendQueryMessageParams`](#sendquerymessageparams)
130
+
131
+ #### Returns
132
+
133
+ `void`
134
+
135
+ #### Example
136
+
137
+ ```ts
138
+ await sendQueryMessage({ content: '订阅消息', type: 'text' })
139
+ ```
140
+
141
+ <a id="updatemodelcontext"></a>
142
+ ### updateModelContext()
143
+
144
+ > **updateModelContext**(`params`?): `Promise`\<`object`\>
145
+
146
+ 向 Agent 捐赠上下文
147
+
148
+ #### Parameters
149
+
150
+ • **params?**: [`UpdateModelContextParams`](#updatemodelcontextparams)
151
+
152
+ #### Returns
153
+
154
+ `Promise`\<`object`\>
155
+
156
+ <a id="setadditionalcontext"></a>
157
+ ### setAdditionalContext()
158
+
159
+ > **setAdditionalContext**(`params`): `Promise`\<`object`\>
160
+
161
+ 设置全局上下文供大模型理解
162
+
163
+ #### Parameters
164
+
165
+ • **params**: [`SetAdditionalContextParams`](#setadditionalcontextparams)
166
+
167
+ #### Returns
168
+
169
+ `Promise`\<`object`\>
170
+
171
+ #### Remarks
172
+
173
+ 设置全局上下文。
174
+
175
+ <a id="dispatchactiondirective"></a>
176
+ ### dispatchActionDirective()
177
+
178
+ > **dispatchActionDirective**(`params`): `Promise`\<`object`\>
179
+
180
+ 描述用户行为,约束模型行为及指定执行路径
181
+
182
+ #### Parameters
183
+
184
+ • **params**: [`DispatchActionDirectiveParams`](#dispatchactiondirectiveparams)
185
+
186
+ #### Returns
187
+
188
+ `Promise`\<`object`\>
189
+
190
+ <a id="updatewidget"></a>
191
+ ### updateWidget()
192
+
193
+ > **updateWidget**(`params`): `Promise`\<`object`\>
194
+
195
+ 更新指定卡片
196
+
197
+ #### Parameters
198
+
199
+ • **params**: [`UpdateWidgetParams`](#updatewidgetparams)
200
+
201
+ #### Returns
202
+
203
+ `Promise`\<`object`\>
204
+
205
+ <a id="openapp"></a>
206
+ ### openApp()
207
+
208
+ > **openApp**(`params`): `Promise`\<[`OpenAppResult`](#openappresult)\>
209
+
210
+ 通过 deep link 等方式打开外部应用。
211
+
212
+ #### Parameters
213
+
214
+ • **params**: [`OpenAppRequest`](#openapprequest)
215
+
216
+ 外部应用打开参数。
217
+
218
+ #### Returns
219
+
220
+ `Promise`\<[`OpenAppResult`](#openappresult)\>
221
+
222
+ 返回外部应用打开结果。
223
+
224
+ ## 相关类型
225
+
226
+ <a id="getorderpaymentparams"></a>
227
+ ### GetOrderPaymentParams
228
+
229
+ #### Properties
230
+
231
+ ##### orderId
232
+
233
+ > **orderId**: `string`
234
+
235
+ <a id="getorderpaymentresult"></a>
236
+ ### GetOrderPaymentResult
237
+
238
+ #### Properties
239
+
240
+ ##### logId
241
+
242
+ > **logId**: `string`
243
+
244
+ ##### orderId
245
+
246
+ > **orderId**: `string`
247
+
248
+ <a id="postloginresultrequest"></a>
249
+ ### PostLoginResultRequest
250
+
251
+ #### Properties
252
+
253
+ ##### code?
254
+
255
+ > `optional` **code**: `string`
256
+
257
+ Authorization login credential, valid when login result is true
258
+
259
+ ##### result
260
+
261
+ > **result**: `boolean`
262
+
263
+ Login result, true means success, false means failure
264
+
265
+ <a id="privacysettingresult"></a>
266
+ ### PrivacySettingResult
267
+
268
+ #### Properties
269
+
270
+ ##### needAuthorization
271
+
272
+ > **needAuthorization**: `boolean`
273
+
274
+ Whether user authorization for privacy agreement is required
275
+
276
+ <a id="requestorderparams"></a>
277
+ ### RequestOrderParams
278
+
279
+ #### Properties
280
+
281
+ ##### data
282
+
283
+ > **data**: `string`
284
+
285
+ ##### dbAuthorization
286
+
287
+ > **dbAuthorization**: `string`
288
+
289
+ <a id="requestorderresult"></a>
290
+ ### RequestOrderResult
291
+
292
+ #### Properties
293
+
294
+ ##### logId
295
+
296
+ > **logId**: `string`
297
+
298
+ ##### orderId
299
+
300
+ > **orderId**: `string`
301
+
302
+ <a id="loginwithwidgetrequest"></a>
303
+ ### LoginWithWidgetRequest
304
+
305
+ #### Properties
306
+
307
+ ##### loginType
308
+
309
+ > **loginType**: [`LoginType`](#logintype-1)
310
+
311
+ Login type identifier
312
+
313
+ <a id="loginwithwidgetresult"></a>
314
+ ### LoginWithWidgetResult
315
+
316
+ #### Properties
317
+
318
+ ##### result
319
+
320
+ > **result**: `boolean`
321
+
322
+ Whether the login is successful
323
+
324
+ <a id="logintype-1"></a>
325
+ <a id="logintype"></a>
326
+ ### LoginType
327
+
328
+ > **LoginType**: `0` \| `1` \| `2` \| `3`
329
+
330
+ Widget 登录类型。
331
+
332
+ - `0`: 隐私协议登录
333
+ - `1`: 仅登录
334
+ - `2`: 先登录再隐私协议,两次弹窗
335
+ - `3`: 登录和隐私协议合并,一次弹窗
336
+
337
+ <a id="sendquerymessageparams"></a>
338
+ ### SendQueryMessageParams
339
+
340
+ #### Properties
341
+
342
+ ##### content
343
+
344
+ > **content**: `string`
345
+
346
+ 要发送的消息。根据类型不同,序列化方式可能不同
347
+
348
+ ##### type
349
+
350
+ > **type**: `"text"`
351
+
352
+ 消息类型,目前仅支持 text
353
+
354
+ <a id="updatemodelcontextparams"></a>
355
+ ### UpdateModelContextParams
356
+
357
+ #### Properties
358
+
359
+ ##### content?
360
+
361
+ > `optional` **content**: `string`
362
+
363
+ 上下文内容,格式无约束,可以与 MCP 服务下发的上下文格式保持一致
364
+
365
+ ##### entityId?
366
+
367
+ > `optional` **entityId**: `string`
368
+
369
+ 上下文所属的 entityID,业务侧管理
370
+
371
+ ##### taskId?
372
+
373
+ > `optional` **taskId**: `string`
374
+
375
+ 上下文所属任务 ID,业务侧定义
376
+
377
+ <a id="setadditionalcontextparams"></a>
378
+ ### SetAdditionalContextParams
379
+
380
+ #### Properties
381
+
382
+ ##### additionalContext
383
+
384
+ > **additionalContext**: `string`
385
+
386
+ 上下文内容
387
+
388
+ ##### botId?
389
+
390
+ > `optional` **botId**: `string`
391
+
392
+ 指定 bot id
393
+
394
+ <a id="dispatchactiondirectiveparams"></a>
395
+ ### DispatchActionDirectiveParams
396
+
397
+ #### Properties
398
+
399
+ ##### actionDescribe
400
+
401
+ > **actionDescribe**: `string`
402
+
403
+ 自然语言描述,例如:用户点击支付按钮并完成话费支付
404
+
405
+ ##### actionType
406
+
407
+ > **actionType**: [`ActionDirectiveType`](#actiondirectivetype)
408
+
409
+ 动作类型,参见 [ActionDirectiveType](#actiondirectivetype)
410
+
411
+ ##### widgetInstanceId
412
+
413
+ > **widgetInstanceId**: `string`
414
+
415
+ 会话消息关联的卡片ID
416
+
417
+ <a id="updatewidgetparams"></a>
418
+ ### UpdateWidgetParams
419
+
420
+ #### Properties
421
+
422
+ ##### widgetData
423
+
424
+ > **widgetData**: `string`
425
+
426
+ 卡片渲染的数据
427
+
428
+ ##### widgetId?
429
+
430
+ > `optional` **widgetId**: `string`
431
+
432
+ 卡片更新的为新的widgetId
433
+
434
+ ##### widgetInstanceId
435
+
436
+ > **widgetInstanceId**: `string`
437
+
438
+ 需要更新的widget 实例 ID
439
+
440
+ <a id="openapprequest"></a>
441
+ ### OpenAppRequest
442
+
443
+ #### Properties
444
+
445
+ ##### fallbackUrl?
446
+
447
+ > `optional` **fallbackUrl**: `string`
448
+
449
+ Optional fallback URL when deep link fails
450
+
451
+ ##### targetPackage?
452
+
453
+ > `optional` **targetPackage**: `string`
454
+
455
+ Optional target package name for Android
456
+
457
+ ##### uri
458
+
459
+ > **uri**: `string`
460
+
461
+ Target URI to open, e.g. scheme://path?query
462
+
463
+ <a id="openappresult"></a>
464
+ ### OpenAppResult
465
+
466
+ #### Properties
467
+
468
+ ##### status
469
+
470
+ > **status**: [`OpenAppStatus`](#openappstatus)
471
+
472
+ Execution status from client
473
+
474
+ <a id="openappstatus"></a>
475
+ ### OpenAppStatus
476
+
477
+ > **OpenAppStatus**: `"deep_link"` \| `"market"` \| `"browser"`