@doubao-dev/framework 0.0.42 → 0.1.0
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/components-style.css +1 -1
- package/dist/api.d.ts +738 -319
- package/dist/components.d.ts +54 -16
- package/dist/config.d.ts +12 -1
- package/dist/index.d.ts +458 -2
- package/jsx-runtime.d.ts +1 -0
- package/package.json +3 -2
- package/types.d.ts +3 -0
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { HealthDataType as HealthDataType_2 } from '@byted-doubao-apps/bridge-api';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* 加速度数据变化事件。
|
|
3
5
|
*
|
|
@@ -66,7 +68,8 @@ export declare enum ActionDirectiveType {
|
|
|
66
68
|
* ```
|
|
67
69
|
*
|
|
68
70
|
* @since 0.0.19
|
|
69
|
-
* @
|
|
71
|
+
* @containerSupport Page | supported
|
|
72
|
+
* @containerSupport Widget | supported
|
|
70
73
|
* @platformSupport Android | supported | 写入系统日历事件;path 传入后按原值追加到日历备注。
|
|
71
74
|
* @platformSupport iOS | supported | 写入系统日历事件;path 传入后按原值追加到日历备注。
|
|
72
75
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -154,7 +157,8 @@ export declare interface AddPhoneCalendarParams {
|
|
|
154
157
|
* ```
|
|
155
158
|
*
|
|
156
159
|
* @since 0.0.25
|
|
157
|
-
* @
|
|
160
|
+
* @containerSupport Page | supported
|
|
161
|
+
* @containerSupport Widget | supported
|
|
158
162
|
* @platformSupport Android | supported | 写入系统日历重复事件;repeatInterval 支持 day、week、month、year,path 行为与 addPhoneCalendar 一致。
|
|
159
163
|
* @platformSupport iOS | supported | 写入系统日历重复事件;repeatInterval 支持 day、week、month、year,path 行为与 addPhoneCalendar 一致。
|
|
160
164
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -248,7 +252,43 @@ export declare interface AppendFileParams {
|
|
|
248
252
|
export declare type AppTheme = 'light' | 'dark';
|
|
249
253
|
|
|
250
254
|
/**
|
|
251
|
-
*
|
|
255
|
+
* @see: https://developer.apple.com/documentation/javascriptcore/1644598-jsobjectmaketypedarraywitharrayb
|
|
256
|
+
* @description: JavaScript Core provide ArrayBuffer API In JSRuntime. But did not export some c-api on iOS9.
|
|
257
|
+
*/
|
|
258
|
+
/**
|
|
259
|
+
* 将 ArrayBuffer 转换为 Base64 字符串。
|
|
260
|
+
*
|
|
261
|
+
* @param buffer - 需要编码的二进制数据。
|
|
262
|
+
* @returns 标准 Base64 编码字符串。
|
|
263
|
+
* @example
|
|
264
|
+
* ```typescript
|
|
265
|
+
* import { arrayBufferToBase64 } from '@doubao-dev/framework/api';
|
|
266
|
+
*
|
|
267
|
+
* const base64 = arrayBufferToBase64(new Uint8Array([1, 2, 3, 4]).buffer);
|
|
268
|
+
* console.log(base64); // AQIDBA==
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* @since 0.1.0
|
|
272
|
+
* @containerSupport Page | supported
|
|
273
|
+
* @containerSupport Widget | supported
|
|
274
|
+
* @platformSupport Android | supported | 支持同步编码。
|
|
275
|
+
* @platformSupport iOS | supported | 支持同步编码。
|
|
276
|
+
* @platformSupport PC | supported | 支持同步编码。
|
|
277
|
+
* @platformSupport HarmonyOS | supported | 支持同步编码。
|
|
278
|
+
* @permission none | - | none | Android,iOS,PC,HarmonyOS | 无需额外权限
|
|
279
|
+
* @precondition All | 无额外前置条件
|
|
280
|
+
* @errorCode none | - | - | Android,iOS,PC,HarmonyOS | 无 API 专属错误码 | 无需处理
|
|
281
|
+
* @resultExample
|
|
282
|
+
* ```json
|
|
283
|
+
* "AQIDBA=="
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
export declare function arrayBufferToBase64(buffer: ArrayBuffer): string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* 提前向用户发起指定 scope 的授权;scope.healthData 仅用于选择 iOS HealthKit 系统授权路径。
|
|
252
292
|
*
|
|
253
293
|
* @param params - 授权参数,字段见 {@link AuthorizeRequest}。
|
|
254
294
|
* @returns 返回一个 Promise,用户完成授权后 resolve。
|
|
@@ -257,19 +297,29 @@ export declare type AppTheme = 'light' | 'dark';
|
|
|
257
297
|
* import { authorize } from '@doubao-dev/framework/api';
|
|
258
298
|
*
|
|
259
299
|
* await authorize({ scope: 'scope.userLocation' });
|
|
300
|
+
* await authorize({
|
|
301
|
+
* scope: 'scope.healthData',
|
|
302
|
+
* options: { types: ['heart_rate', 'step_count'] }
|
|
303
|
+
* });
|
|
260
304
|
* ```
|
|
261
305
|
*
|
|
262
306
|
* @since 0.0.18
|
|
263
|
-
* @
|
|
264
|
-
* @
|
|
265
|
-
* @platformSupport Android | supported |
|
|
266
|
-
* @platformSupport iOS | supported |
|
|
307
|
+
* @containerSupport Page | supported
|
|
308
|
+
* @containerSupport Widget | unsupported
|
|
309
|
+
* @platformSupport Android | supported | 支持既有 scope;当前不支持 scope.healthData。
|
|
310
|
+
* @platformSupport iOS | supported | 支持既有 scope;scope.healthData 会继续申请 options.types 对应的 HealthKit 读取权限。
|
|
267
311
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
268
312
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
269
|
-
* @permission applet |
|
|
270
|
-
* @
|
|
271
|
-
* @
|
|
272
|
-
* @
|
|
313
|
+
* @permission applet | 非 scope.healthData 的 scope | required | Android,iOS | 按传入 scope 发起对应的应用授权。
|
|
314
|
+
* @permission applet | scope.healthData | none | iOS | 不校验 manifest,也不查询或更新服务端小程序 scope 状态。
|
|
315
|
+
* @permission system | HealthKit read | required | iOS | scope.healthData 会申请 options.types 对应的系统读取权限。
|
|
316
|
+
* @authorizationBehavior Android | 非健康 scope 会发起小程序及相应系统授权;当前不支持 scope.healthData。
|
|
317
|
+
* @authorizationBehavior iOS | 非健康 scope 会发起小程序及相应系统授权;scope.healthData 仅可能展示 HealthKit 系统授权框。
|
|
318
|
+
* @precondition Android | 非健康 scope 需要在应用权限声明中配置;当前不支持 scope.healthData。
|
|
319
|
+
* @precondition iOS | 非健康 scope 需要在应用权限声明中配置;scope.healthData 不需要 manifest 声明。
|
|
320
|
+
* @usageNote Android | 非健康 scope 的授权状态可通过 `getSetting` 查询;当前不支持 scope.healthData。
|
|
321
|
+
* @usageNote iOS | 非健康 scope 的授权状态可通过 `getSetting` 查询;scope.healthData 的逐类型系统状态通过 `getAppAuthorizeSetting` 查询。
|
|
322
|
+
* @usageNote iOS | HealthKit 授权成功表示系统授权流程已完成;Apple 不向应用公开每个读取类型是否被用户拒绝。
|
|
273
323
|
* @errorExample
|
|
274
324
|
* ```json
|
|
275
325
|
* {
|
|
@@ -279,6 +329,7 @@ export declare type AppTheme = 'light' | 'dark';
|
|
|
279
329
|
* ```
|
|
280
330
|
* @errorCode common | 102 | Android,iOS
|
|
281
331
|
* @errorCode errNo | 104 | invalid parameter | Android,iOS | 传入的 scope 为空或不受支持(如 scope.payment) | 检查并传入受支持的 scope 后重试。
|
|
332
|
+
* @errorCode errNo | 104 | invalid parameter | iOS | scope.healthData 未传 options.types、列表为空或包含不支持类型 | 传入非空且受支持的健康数据类型列表。
|
|
282
333
|
* @errorCode errNo | 106 | system permission denied | Android,iOS | 对应能力的系统权限被拒绝 | 引导用户在系统设置中开启对应权限后重试。
|
|
283
334
|
* @errorCode errNo | 107 | user permission denied | Android,iOS | 用户拒绝了本次应用授权 | 说明能力用途后再次调用 `authorize` 重新发起授权。
|
|
284
335
|
* @errorCode errNo | 114 | operation cancelled | Android,iOS | 用户取消了授权弹窗 | 用户需要时可再次调用 `authorize` 重新发起授权。
|
|
@@ -295,12 +346,13 @@ export declare const authorize: (params: AuthorizeRequest) => Promise<object>;
|
|
|
295
346
|
|
|
296
347
|
/** @public */
|
|
297
348
|
export declare interface AuthorizeRequest {
|
|
349
|
+
/** 授权范围。 */
|
|
350
|
+
scope: Scope;
|
|
298
351
|
/**
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
* @constraint 豆包 Android、iOS 当前不支持 scope.payment,传入后授权会失败
|
|
352
|
+
* 权限扩展参数;仅 scope.healthData 生效,用于传入 HealthKit 读取类型,其他 scope 会忽略该字段。
|
|
353
|
+
* @default -
|
|
302
354
|
*/
|
|
303
|
-
|
|
355
|
+
options?: HealthDataAuthorizeOptions;
|
|
304
356
|
}
|
|
305
357
|
|
|
306
358
|
/** @public */
|
|
@@ -452,6 +504,40 @@ export declare interface BackgroundAudioState {
|
|
|
452
504
|
playbackRate?: number;
|
|
453
505
|
}
|
|
454
506
|
|
|
507
|
+
/**
|
|
508
|
+
* 将 Base64 字符串转换为 ArrayBuffer。
|
|
509
|
+
*
|
|
510
|
+
* @param base64 - 需要解码的标准 Base64 字符串。
|
|
511
|
+
* @returns 解码后的二进制数据。
|
|
512
|
+
* @example
|
|
513
|
+
* ```typescript
|
|
514
|
+
* import { base64ToArrayBuffer } from '@doubao-dev/framework/api';
|
|
515
|
+
*
|
|
516
|
+
* const buffer = base64ToArrayBuffer('AQIDBA==');
|
|
517
|
+
* console.log(Array.from(new Uint8Array(buffer))); // [1, 2, 3, 4]
|
|
518
|
+
* ```
|
|
519
|
+
*
|
|
520
|
+
* @since 0.1.0
|
|
521
|
+
* @containerSupport Page | supported
|
|
522
|
+
* @containerSupport Widget | supported
|
|
523
|
+
* @platformSupport Android | supported | 支持同步解码。
|
|
524
|
+
* @platformSupport iOS | supported | 支持同步解码。
|
|
525
|
+
* @platformSupport PC | supported | 支持同步解码。
|
|
526
|
+
* @platformSupport HarmonyOS | supported | 支持同步解码。
|
|
527
|
+
* @permission none | - | none | Android,iOS,PC,HarmonyOS | 无需额外权限
|
|
528
|
+
* @precondition All | 无额外前置条件
|
|
529
|
+
* @errorCode none | - | - | Android,iOS,PC,HarmonyOS | 无 API 专属错误码 | 无需处理
|
|
530
|
+
* @resultExample
|
|
531
|
+
* ```json
|
|
532
|
+
* {
|
|
533
|
+
* "byteLength": 4
|
|
534
|
+
* }
|
|
535
|
+
* ```
|
|
536
|
+
*
|
|
537
|
+
* @public
|
|
538
|
+
*/
|
|
539
|
+
export declare function base64ToArrayBuffer(base64: string): ArrayBuffer;
|
|
540
|
+
|
|
455
541
|
/**
|
|
456
542
|
* 只有完整授权和未授权状态的权限所使用的通用精细状态。
|
|
457
543
|
*
|
|
@@ -798,7 +884,8 @@ export declare type CalendarRepeatInterval = 'day' | 'week' | 'month' | 'year';
|
|
|
798
884
|
* ```
|
|
799
885
|
*
|
|
800
886
|
* @since 0.0.42
|
|
801
|
-
* @
|
|
887
|
+
* @containerSupport Page | supported
|
|
888
|
+
* @containerSupport Widget | supported
|
|
802
889
|
* @platformSupport Android | supported | 支持在智能服务页面和会话 Widget 中调用当前应用的 Tool。
|
|
803
890
|
* @platformSupport iOS | supported | 支持在智能服务页面和会话 Widget 中调用当前应用的 Tool。
|
|
804
891
|
* @platformSupport PC | unsupported | 客户端尚未实现 callTool。
|
|
@@ -836,7 +923,6 @@ export declare type CalendarRepeatInterval = 'day' | 'week' | 'month' | 'year';
|
|
|
836
923
|
* @errorCode errNo | 104 | invalid parameter | Android,iOS | toolName 为空、toolArgs 无法序列化为 JSON 对象,或传入的 skipWidgetUpdate 不是布尔值 | 修正 Tool 名称、参数和 Widget 更新控制参数后重试。
|
|
837
924
|
* @errorCode errNo | 112 | invalid result | Android,iOS | Tool 正常结果、业务错误或 Widget 更新错误结构无效 | 稍后重试;持续失败时反馈 Tool 或服务端返回异常。
|
|
838
925
|
* @platformNote All | 非智能服务页面、Widget 容器返回 103;参数非法返回 104;返回结构无效返回 112;上下文无效、网络或服务端调用失败返回 102。
|
|
839
|
-
* @knownIssue All | Web SDK 模拟器暂不支持 skipWidgetUpdate 为 true;请在 Android 或 iOS 豆包客户端验证跳过 Widget 更新的调用。
|
|
840
926
|
*
|
|
841
927
|
* @public
|
|
842
928
|
*/
|
|
@@ -960,7 +1046,8 @@ export declare interface ChatPanelInfo {
|
|
|
960
1046
|
/**
|
|
961
1047
|
* 对话框当前展示状态。
|
|
962
1048
|
*
|
|
963
|
-
* `preview` 表示从收起态发送消息后、收到回复前的中间态。
|
|
1049
|
+
* - `preview` 表示从收起态发送消息后、收到回复前的中间态。
|
|
1050
|
+
* - `invisible` 表示对话框当前不可见。
|
|
964
1051
|
*/
|
|
965
1052
|
state: ChatPanelState;
|
|
966
1053
|
}
|
|
@@ -970,7 +1057,7 @@ export declare interface ChatPanelInfo {
|
|
|
970
1057
|
*
|
|
971
1058
|
* @public
|
|
972
1059
|
*/
|
|
973
|
-
export declare type ChatPanelState = 'collapsed' | 'expanded' | 'preview';
|
|
1060
|
+
export declare type ChatPanelState = 'collapsed' | 'expanded' | 'preview' | 'invisible';
|
|
974
1061
|
|
|
975
1062
|
/**
|
|
976
1063
|
* 检测无障碍能力是否开启。
|
|
@@ -985,8 +1072,7 @@ export declare type ChatPanelState = 'collapsed' | 'expanded' | 'preview';
|
|
|
985
1072
|
* ```
|
|
986
1073
|
*
|
|
987
1074
|
* @since 0.0.25
|
|
988
|
-
* @
|
|
989
|
-
* @contractMismatch non-blocking | behavior | 无障碍能力口径 | Android,iOS | 返回设备是否开启视觉无障碍能力 | Android 检测系统无障碍服务是否开启,iOS 检测 VoiceOver/开关控制是否开启 | 相同返回值在双端代表的具体能力不同 | ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge/method/device/AIBridgeAccessibilityMethods.kt; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Device/AIBridgeAccessibilityMethods.swift | 统一双端无障碍检测口径
|
|
1075
|
+
* @containerSupport Page | supported
|
|
990
1076
|
* @platformSupport Android | supported | 支持检测无障碍能力
|
|
991
1077
|
* @platformSupport iOS | supported | 支持检测无障碍能力
|
|
992
1078
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1009,7 +1095,7 @@ export declare type ChatPanelState = 'collapsed' | 'expanded' | 'preview';
|
|
|
1009
1095
|
* }
|
|
1010
1096
|
* ```
|
|
1011
1097
|
* @errorCode common | 102 | Android
|
|
1012
|
-
* @errorCode errNo | 103 | feature not support | Android |
|
|
1098
|
+
* @errorCode errNo | 103 | feature not support | Android | 当前设备不支持获取系统无障碍服务状态 | 在支持系统无障碍服务的设备上调用。
|
|
1013
1099
|
*
|
|
1014
1100
|
* @public
|
|
1015
1101
|
*/
|
|
@@ -1040,9 +1126,8 @@ export declare interface CheckIsOpenAccessibilityResult {
|
|
|
1040
1126
|
* console.log(tempFilePaths);
|
|
1041
1127
|
* ```
|
|
1042
1128
|
* @since 0.0.26
|
|
1043
|
-
* @
|
|
1044
|
-
* @
|
|
1045
|
-
* @contractMismatch blocking | parameter | sourceType | Android,iOS | sourceType 数组声明允许的 album、camera、user、environment 来源 | 仅当数组只包含 camera 时打开相机;其他组合均打开相册,user 和 environment 不生效 | 传入多个来源或 user、environment 时实际入口与配置不一致 | packages/open-api/src/media/image.ts; flow_android/business/applet/impl/src/main/java/com/bytedance/applet/impl/AppletHostImageServiceImpl.kt; flow_ios/flow_iOS/Modules/FlowApplet/Sources/AIBridge/FlowAIBridgeService.swift | 实现来源选择和前后摄像头语义,或收敛公开枚举
|
|
1129
|
+
* @containerSupport Page | supported
|
|
1130
|
+
* @containerSupport Widget | unsupported
|
|
1046
1131
|
* @platformSupport Android | supported | 支持从相册选择图片;只传 camera 时支持拍照
|
|
1047
1132
|
* @platformSupport iOS | supported | 支持从相册选择图片;只传 camera 时支持拍照
|
|
1048
1133
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1164,8 +1249,6 @@ export declare type ChooseImageSourceType = 'album' | 'camera' | 'user' | 'envir
|
|
|
1164
1249
|
* ```
|
|
1165
1250
|
* @returns 用户选择的位置。
|
|
1166
1251
|
* @since 0.0.32
|
|
1167
|
-
* @contractStatus conflict | 豆包 Android、iOS 当前均未实现地图选点能力
|
|
1168
|
-
* @contractMismatch blocking | behavior | 地图选点 | Android,iOS | 打开地图供用户选择位置并返回选点结果 | 豆包 Android、iOS 均直接返回不支持 | 该 API 在豆包中无法获得成功结果 | packages/open-api/src/location/location.ts; flow_android/business/applet/impl/src/main/java/com/bytedance/applet/impl/AppletHostLocationActionServiceImpl.kt; flow_ios/flow_iOS/Modules/FlowApplet/Sources/AIBridge/FlowAIBridgeService.swift | 完成豆包双端地图选点实现后再开放文档
|
|
1169
1252
|
* @platformSupport Android | unsupported | 豆包当前未实现地图选点能力
|
|
1170
1253
|
* @platformSupport iOS | unsupported | 豆包当前未实现地图选点能力
|
|
1171
1254
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1279,7 +1362,8 @@ export declare type ChooseMessageFileType = 'all' | 'video' | 'image' | 'file';
|
|
|
1279
1362
|
* ```
|
|
1280
1363
|
*
|
|
1281
1364
|
* @since 0.0.17
|
|
1282
|
-
* @
|
|
1365
|
+
* @containerSupport Page | supported
|
|
1366
|
+
* @containerSupport Widget | supported
|
|
1283
1367
|
* @platformSupport Android | supported | 支持清空当前智能服务的全部本地缓存。
|
|
1284
1368
|
* @platformSupport iOS | supported | 支持清空当前智能服务的全部本地缓存。
|
|
1285
1369
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -1305,7 +1389,8 @@ export declare const clearStorage: (params?: object | undefined) => Promise<obje
|
|
|
1305
1389
|
* ```
|
|
1306
1390
|
*
|
|
1307
1391
|
* @since 0.0.19
|
|
1308
|
-
* @
|
|
1392
|
+
* @containerSupport Page | supported
|
|
1393
|
+
* @containerSupport Widget | supported
|
|
1309
1394
|
* @platformSupport Android | supported | 支持同步清空当前智能服务的全部本地缓存。
|
|
1310
1395
|
* @platformSupport iOS | supported | 支持同步清空当前智能服务的全部本地缓存。
|
|
1311
1396
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -1347,8 +1432,6 @@ declare type ClientEventRegistry<Params extends object = object> = (handler: (pa
|
|
|
1347
1432
|
* ```
|
|
1348
1433
|
*
|
|
1349
1434
|
* @since 0.0.17
|
|
1350
|
-
* @contractStatus conflict | close 面向全平台公开,但 iOS 当前无可调用实现。
|
|
1351
|
-
* @contractMismatch blocking | platform | close 调用可达性 | iOS | close 面向全平台公开,可关闭栈顶页面 | 当前未提供可调用实现,调用不会关闭页面 | 在 iOS 上无法通过 close 关闭页面,请改用 navigateBack 返回上一页 | packages/open-api/src/router/close.ts; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Route/AIBridgeCloseMethod.swift; ai-sdk/ios/AISDK/Sources/Core/AISDK.swift; ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge/method/router/AbsCloseMethodIDL.kt | iOS 为关闭方法补齐 doubao.close 可达实现,或公开 close 改为返回上一页
|
|
1352
1435
|
* @platformSupport Android | supported | 支持关闭栈顶页面或指定页面。
|
|
1353
1436
|
* @platformSupport iOS | unsupported | 当前未提供可调用实现,请改用 navigateBack。
|
|
1354
1437
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -1375,7 +1458,8 @@ export { close_2 as close }
|
|
|
1375
1458
|
*
|
|
1376
1459
|
* @returns 不包含字段的结果对象。
|
|
1377
1460
|
* @since 0.0.25
|
|
1378
|
-
* @
|
|
1461
|
+
* @containerSupport Page | supported
|
|
1462
|
+
* @containerSupport Widget | unsupported
|
|
1379
1463
|
* @platformSupport Android | supported | 支持关闭 BLE 连接
|
|
1380
1464
|
* @platformSupport iOS | supported | 支持关闭 BLE 连接
|
|
1381
1465
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1420,7 +1504,8 @@ export declare interface CloseBLEConnectionParams {
|
|
|
1420
1504
|
*
|
|
1421
1505
|
* @returns 不包含字段的结果对象。
|
|
1422
1506
|
* @since 0.0.25
|
|
1423
|
-
* @
|
|
1507
|
+
* @containerSupport Page | supported
|
|
1508
|
+
* @containerSupport Widget | unsupported
|
|
1424
1509
|
* @platformSupport Android | supported | 支持关闭蓝牙适配器
|
|
1425
1510
|
* @platformSupport iOS | supported | 支持关闭蓝牙适配器
|
|
1426
1511
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1481,7 +1566,8 @@ export declare type CompassChangeListener = (event: CompassChangeEvent) => void;
|
|
|
1481
1566
|
* console.log(tempFilePath);
|
|
1482
1567
|
* ```
|
|
1483
1568
|
* @since 0.0.26
|
|
1484
|
-
* @
|
|
1569
|
+
* @containerSupport Page | supported
|
|
1570
|
+
* @containerSupport Widget | unsupported
|
|
1485
1571
|
* @platformSupport Android | supported | 支持压缩豆包智能服务本地图片
|
|
1486
1572
|
* @platformSupport iOS | supported | 支持压缩豆包智能服务本地图片
|
|
1487
1573
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1608,8 +1694,8 @@ export declare interface ConnectedBluetoothDevice {
|
|
|
1608
1694
|
* ```
|
|
1609
1695
|
*
|
|
1610
1696
|
* @since 0.0.30
|
|
1611
|
-
* @
|
|
1612
|
-
* @
|
|
1697
|
+
* @containerSupport Page | supported
|
|
1698
|
+
* @containerSupport Widget | unsupported
|
|
1613
1699
|
* @platformSupport Android | supported | 支持 ws 和 wss 协议的 WebSocket 连接。
|
|
1614
1700
|
* @platformSupport iOS | supported | 支持 ws 和 wss 协议的 WebSocket 连接。
|
|
1615
1701
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -1707,8 +1793,8 @@ export declare interface ConnectSocketParams {
|
|
|
1707
1793
|
* @returns 不包含字段的结果对象。
|
|
1708
1794
|
*
|
|
1709
1795
|
* @since 0.0.25
|
|
1710
|
-
* @
|
|
1711
|
-
* @
|
|
1796
|
+
* @containerSupport Page | supported
|
|
1797
|
+
* @containerSupport Widget | unsupported
|
|
1712
1798
|
* @platformSupport Android | supported | 支持连接 Wi-Fi,可按 bssid 指定目标
|
|
1713
1799
|
* @platformSupport iOS | supported | 支持连接 Wi-Fi,忽略 bssid 参数
|
|
1714
1800
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1846,7 +1932,8 @@ export declare interface CopyFileParams {
|
|
|
1846
1932
|
*
|
|
1847
1933
|
* @returns 不包含字段的结果对象。
|
|
1848
1934
|
* @since 0.0.25
|
|
1849
|
-
* @
|
|
1935
|
+
* @containerSupport Page | supported
|
|
1936
|
+
* @containerSupport Widget | unsupported
|
|
1850
1937
|
* @platformSupport Android | supported | 支持创建 BLE 连接
|
|
1851
1938
|
* @platformSupport iOS | supported | 支持创建 BLE 连接
|
|
1852
1939
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1886,28 +1973,56 @@ export declare interface CreateBLEConnectionParams {
|
|
|
1886
1973
|
}
|
|
1887
1974
|
|
|
1888
1975
|
/**
|
|
1889
|
-
*
|
|
1976
|
+
* 创建一组用于发送和监听自定义事件的函数。
|
|
1977
|
+
*
|
|
1978
|
+
* @containerSupport Page | supported
|
|
1979
|
+
* @containerSupport Widget | supported
|
|
1980
|
+
* @public
|
|
1981
|
+
*/
|
|
1982
|
+
export declare const createCustomEvent: typeof createCustomEvent_2;
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* 创建一组用于发送和监听自定义事件的函数。
|
|
1986
|
+
*
|
|
1987
|
+
* 发送函数会向当前智能服务的其他页面或卡片实例广播事件;监听注册函数可注册多个处理函数,
|
|
1988
|
+
* 并返回对应的注销函数。发送端和接收端应复用同一份事件定义,确保事件名称和参数类型一致。
|
|
1890
1989
|
*
|
|
1891
|
-
* @
|
|
1892
|
-
* @param
|
|
1893
|
-
* @
|
|
1990
|
+
* @summary 创建自定义事件。
|
|
1991
|
+
* @param name 事件名称。建议添加业务命名空间,避免与其他事件重名。
|
|
1992
|
+
* @param options 自定义事件配置。省略时不校验接收到的事件参数。
|
|
1993
|
+
* @returns 返回一个元组,第一项用于发送事件,第二项用于注册事件处理函数。
|
|
1894
1994
|
* @category Custom API
|
|
1895
1995
|
* @example
|
|
1996
|
+
* ```typescript
|
|
1997
|
+
* import { createCustomEvent } from '@doubao-dev/framework/api';
|
|
1998
|
+
*
|
|
1896
1999
|
* interface TestEventParams {
|
|
1897
2000
|
* input: string;
|
|
1898
2001
|
* }
|
|
1899
2002
|
*
|
|
1900
|
-
* const [emitEvent, onReceiveEvent] =
|
|
2003
|
+
* const [emitEvent, onReceiveEvent] =
|
|
2004
|
+
* createCustomEvent<TestEventParams>('example.testEvent');
|
|
2005
|
+
*
|
|
2006
|
+
* const unregister = onReceiveEvent((params) => {
|
|
2007
|
+
* console.log(params.input);
|
|
2008
|
+
* });
|
|
1901
2009
|
*
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
2010
|
+
* emitEvent({ input: 'test' });
|
|
2011
|
+
* unregister();
|
|
2012
|
+
* ```
|
|
1904
2013
|
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
2014
|
+
* @since 0.0.1
|
|
2015
|
+
* @platformSupport Android | supported | 支持在智能服务的页面或卡片实例之间发送和接收自定义事件。
|
|
2016
|
+
* @platformSupport iOS | supported | 支持在智能服务的页面或卡片实例之间发送和接收自定义事件。
|
|
2017
|
+
* @platformSupport PC | supported | 支持在智能服务的页面或卡片实例之间发送和接收自定义事件。
|
|
2018
|
+
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
2019
|
+
* @permission none | - | none | Android,iOS,PC | 无需额外权限
|
|
2020
|
+
* @precondition All | 发送端与接收端需使用相同的事件名称和参数结构。
|
|
2021
|
+
* @usageNote All | 为事件名称添加业务命名空间,并在不再监听时调用注册函数返回的注销函数。
|
|
2022
|
+
* @errorCode none | - | - | Android,iOS,PC | 该 API 不返回业务错误码,发送失败时不会抛出异常 | 无需处理
|
|
2023
|
+
* @public
|
|
1909
2024
|
*/
|
|
1910
|
-
|
|
2025
|
+
declare function createCustomEvent_2<Params extends object>(name: string, options?: CustomEventOptions_2<Params>): [CustomEventCaller_2<Params>, CustomEventHandlerRegistry_2<Params>];
|
|
1911
2026
|
|
|
1912
2027
|
/**
|
|
1913
2028
|
* 创建一个内部音频上下文。
|
|
@@ -1927,7 +2042,8 @@ export declare function createCustomEvent<Params extends object>(name: string, o
|
|
|
1927
2042
|
* audio.play();
|
|
1928
2043
|
* ```
|
|
1929
2044
|
* @since 0.0.37
|
|
1930
|
-
* @
|
|
2045
|
+
* @containerSupport Page | supported
|
|
2046
|
+
* @containerSupport Widget | unsupported
|
|
1931
2047
|
* @platformSupport Android | supported | 支持多实例内部音频播放
|
|
1932
2048
|
* @platformSupport iOS | supported | 支持多实例内部音频播放
|
|
1933
2049
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -1964,7 +2080,7 @@ export declare function createCustomEvent<Params extends object>(name: string, o
|
|
|
1964
2080
|
* @errorCode event.errCode | -2006 | inner audio seek failed | Android,iOS | 播放位置跳转失败 | 等待 canplay 后在音频时长范围内重试。
|
|
1965
2081
|
* @errorCode event.errCode | -2007 | inner audio play failed | Android,iOS | 音频播放失败 | 检查资源地址和网络状态后重试。
|
|
1966
2082
|
* @errorCode event.errCode | -2009 | inner audio playback is interrupted | Android,iOS | 播放被其他音频任务中断 | 根据业务需要在中断结束后重新调用 play。
|
|
1967
|
-
* @errorCode event.errCode | -2010 | inner audio runtime is unavailable | Android,iOS |
|
|
2083
|
+
* @errorCode event.errCode | -2010 | inner audio runtime is unavailable | Android,iOS | 当前页面无法创建音频实例 | 确保页面仍处于有效状态后重新创建实例。
|
|
1968
2084
|
* @errorCode event.errCode | -2012 | invalid seek position | Android,iOS | seek 位置不是有限非负数 | 传入大于或等于 0 的秒数。
|
|
1969
2085
|
*
|
|
1970
2086
|
* @public
|
|
@@ -2000,8 +2116,8 @@ export declare function createInnerAudioContext(): InnerAudioContext;
|
|
|
2000
2116
|
* ```
|
|
2001
2117
|
*
|
|
2002
2118
|
* @since 0.0.28
|
|
2003
|
-
* @
|
|
2004
|
-
* @
|
|
2119
|
+
* @containerSupport Page | supported
|
|
2120
|
+
* @containerSupport Widget | supported
|
|
2005
2121
|
* @platformSupport Android | supported | 支持创建签约订单并返回 authOrderId。
|
|
2006
2122
|
* @platformSupport iOS | supported | 支持创建签约订单并返回 authOrderId。
|
|
2007
2123
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2095,8 +2211,8 @@ export declare interface CreateSignOrderSuccessResult {
|
|
|
2095
2211
|
* ```
|
|
2096
2212
|
*
|
|
2097
2213
|
* @since 0.0.31
|
|
2098
|
-
* @
|
|
2099
|
-
* @
|
|
2214
|
+
* @containerSupport Page | supported
|
|
2215
|
+
* @containerSupport Widget | supported
|
|
2100
2216
|
* @platformSupport Android | supported | 支持创建 remote 任务并返回 taskId、token。
|
|
2101
2217
|
* @platformSupport iOS | supported | 支持创建 remote 任务并返回 taskId、token。
|
|
2102
2218
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2139,7 +2255,7 @@ export declare interface CreateTaskParams {
|
|
|
2139
2255
|
outTaskId: string;
|
|
2140
2256
|
/** 任务样式模板,当前仅支持 remote_normal_v1 */
|
|
2141
2257
|
taskTemplate: TaskTemplate;
|
|
2142
|
-
/**
|
|
2258
|
+
/** 模板对应的数据,传入对象时会自动序列化为 JSON 字符串 */
|
|
2143
2259
|
taskDetail: TaskDetail;
|
|
2144
2260
|
/** 任务类型,当前支持 local 和 remote */
|
|
2145
2261
|
taskType: TaskType;
|
|
@@ -2159,27 +2275,50 @@ export declare interface CreateTaskResult {
|
|
|
2159
2275
|
expiresIn?: number;
|
|
2160
2276
|
}
|
|
2161
2277
|
|
|
2278
|
+
/** @public */
|
|
2279
|
+
export declare type CustomEventCaller<Params extends object = object> = CustomEventCaller_2<Params>;
|
|
2280
|
+
|
|
2162
2281
|
/**
|
|
2163
|
-
*
|
|
2282
|
+
* 自定义事件发送函数。
|
|
2164
2283
|
*
|
|
2165
|
-
*
|
|
2284
|
+
* 调用后会向当前智能服务的其他页面或卡片实例广播事件,不返回处理结果。
|
|
2285
|
+
*
|
|
2286
|
+
* @public
|
|
2166
2287
|
*/
|
|
2167
|
-
|
|
2288
|
+
declare type CustomEventCaller_2<Params extends object = object> = (params: Params) => void;
|
|
2289
|
+
|
|
2290
|
+
/** @public */
|
|
2291
|
+
export declare type CustomEventHandlerRegistry<Params extends object = object> = CustomEventHandlerRegistry_2<Params>;
|
|
2168
2292
|
|
|
2169
2293
|
/**
|
|
2170
|
-
*
|
|
2294
|
+
* 自定义事件监听注册函数。
|
|
2295
|
+
*
|
|
2296
|
+
* 可以为同一事件注册多个处理函数。调用返回的函数可注销当前处理函数。
|
|
2171
2297
|
*
|
|
2172
|
-
*
|
|
2298
|
+
* @public
|
|
2173
2299
|
*/
|
|
2174
|
-
|
|
2300
|
+
declare type CustomEventHandlerRegistry_2<Params extends object = object> = (handler: (params: Params) => void) => () => void;
|
|
2301
|
+
|
|
2302
|
+
/** @public */
|
|
2303
|
+
export declare interface CustomEventOptions<Params extends object> {
|
|
2304
|
+
/**
|
|
2305
|
+
* 接收端的参数类型守卫。返回 `false` 时会忽略当前事件,不调用已注册的处理函数。
|
|
2306
|
+
*
|
|
2307
|
+
* @default -
|
|
2308
|
+
*/
|
|
2309
|
+
paramsTypeGuard?: CustomEventOptions_2<Params>['paramsTypeGuard'];
|
|
2310
|
+
}
|
|
2175
2311
|
|
|
2176
2312
|
/**
|
|
2177
|
-
*
|
|
2313
|
+
* 创建自定义事件的配置。
|
|
2314
|
+
*
|
|
2315
|
+
* @public
|
|
2178
2316
|
*/
|
|
2179
|
-
|
|
2317
|
+
declare interface CustomEventOptions_2<Params extends object> {
|
|
2180
2318
|
/**
|
|
2181
|
-
*
|
|
2182
|
-
*
|
|
2319
|
+
* 接收端的参数类型守卫。返回 `false` 时会忽略当前事件,不调用已注册的处理函数。
|
|
2320
|
+
*
|
|
2321
|
+
* @default -
|
|
2183
2322
|
*/
|
|
2184
2323
|
paramsTypeGuard?: TypeGuard<object, Params>;
|
|
2185
2324
|
}
|
|
@@ -2217,6 +2356,37 @@ export declare type DeviceMotionChangeListener = (event: DeviceMotionChangeEvent
|
|
|
2217
2356
|
/** @public */
|
|
2218
2357
|
export declare type DeviceOrientation = 'portrait' | 'landscape';
|
|
2219
2358
|
|
|
2359
|
+
/**
|
|
2360
|
+
* 关闭页面返回前提醒。
|
|
2361
|
+
*
|
|
2362
|
+
* @returns 返回一个 Promise,在当前页面的返回提醒关闭后 resolve。
|
|
2363
|
+
* @since 0.0.43
|
|
2364
|
+
* @platformSupport Android | supported | 支持关闭当前页面已开启的返回提醒。
|
|
2365
|
+
* @platformSupport iOS | supported | 支持关闭当前页面已开启的返回提醒。
|
|
2366
|
+
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
2367
|
+
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
2368
|
+
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
2369
|
+
* @precondition All | 必须在页面容器内调用
|
|
2370
|
+
* @errorCode common | 102 | Android,iOS
|
|
2371
|
+
* @errorCode errNo | 103 | feature not support | Android,iOS | 当前调用不来自页面容器 | 请在页面生命周期内调用。
|
|
2372
|
+
* @errorExample
|
|
2373
|
+
* ```json
|
|
2374
|
+
* {
|
|
2375
|
+
* "errNo": 103,
|
|
2376
|
+
* "errMsg": "feature not support"
|
|
2377
|
+
* }
|
|
2378
|
+
* ```
|
|
2379
|
+
* @example
|
|
2380
|
+
* ```typescript
|
|
2381
|
+
* import { disableAlertBeforeUnload } from '@doubao-dev/framework/api';
|
|
2382
|
+
*
|
|
2383
|
+
* await disableAlertBeforeUnload();
|
|
2384
|
+
* ```
|
|
2385
|
+
*
|
|
2386
|
+
* @public
|
|
2387
|
+
*/
|
|
2388
|
+
export declare const disableAlertBeforeUnload: (params?: object | undefined) => Promise<object>;
|
|
2389
|
+
|
|
2220
2390
|
/**
|
|
2221
2391
|
* 禁止用户录屏。
|
|
2222
2392
|
*
|
|
@@ -2229,8 +2399,8 @@ export declare type DeviceOrientation = 'portrait' | 'landscape';
|
|
|
2229
2399
|
*
|
|
2230
2400
|
* @returns 不包含字段的结果对象。
|
|
2231
2401
|
* @since 0.0.37
|
|
2232
|
-
* @
|
|
2233
|
-
* @
|
|
2402
|
+
* @containerSupport Page | supported
|
|
2403
|
+
* @containerSupport Widget | unsupported
|
|
2234
2404
|
* @platformSupport Android | supported | 支持禁止用户录屏
|
|
2235
2405
|
* @platformSupport iOS | supported | 支持禁止用户录屏
|
|
2236
2406
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -2275,8 +2445,6 @@ export declare const disableUserScreenRecord: (params?: {} | undefined) => Promi
|
|
|
2275
2445
|
* ```
|
|
2276
2446
|
*
|
|
2277
2447
|
* @since 0.0.26
|
|
2278
|
-
* @contractStatus verified | 公开定义与 Android、iOS 的成功、失败路径一致。
|
|
2279
|
-
* @contractMismatch non-blocking | platform | params.toolParams | Android,iOS | 以键值对形式传入工具入参 | Android 将其展开为子标签透传给模型,iOS 使用 JSONSerialization 序列化后透传,两端内部处理方式不同但对调用方不可观测 | 无功能影响,仅内部传递方式存在差异 | packages/open-api/src/open/business/dispatch-action-directive.ts; ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge; ai-sdk/ios/AISDK/Sources/JSBridge | 无需对齐,保持现状
|
|
2280
2448
|
* @platformSupport Android | supported | 支持下发动作指令并约束模型行为。
|
|
2281
2449
|
* @platformSupport iOS | supported | 支持下发动作指令并约束模型行为。
|
|
2282
2450
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2339,25 +2507,25 @@ export declare interface DispatchActionDirectiveParams {
|
|
|
2339
2507
|
}
|
|
2340
2508
|
|
|
2341
2509
|
/**
|
|
2342
|
-
*
|
|
2510
|
+
* 智能服务账号信息。
|
|
2343
2511
|
*
|
|
2344
2512
|
* @public
|
|
2345
2513
|
*/
|
|
2346
2514
|
export declare interface DoubaoAppAccountInfo {
|
|
2347
|
-
/**
|
|
2515
|
+
/** 智能服务 appId */
|
|
2348
2516
|
appId: string;
|
|
2349
2517
|
/**
|
|
2350
|
-
*
|
|
2518
|
+
* 当前智能服务的版本类型。
|
|
2351
2519
|
*
|
|
2352
2520
|
* - develop:开发版
|
|
2353
2521
|
* - trial:体验版
|
|
2354
2522
|
* - release:正式版
|
|
2355
2523
|
*
|
|
2356
|
-
* @constraint
|
|
2524
|
+
* @constraint Android、iOS 当前只返回 develop 或 release,不会返回 trial
|
|
2357
2525
|
*/
|
|
2358
2526
|
envVersion: 'develop' | 'trial' | 'release';
|
|
2359
2527
|
/**
|
|
2360
|
-
*
|
|
2528
|
+
* 智能服务版本号。
|
|
2361
2529
|
*
|
|
2362
2530
|
*/
|
|
2363
2531
|
version: string;
|
|
@@ -2404,7 +2572,8 @@ export declare interface DoubaoAppAccountInfo {
|
|
|
2404
2572
|
* ```
|
|
2405
2573
|
*
|
|
2406
2574
|
* @since 0.0.40
|
|
2407
|
-
* @
|
|
2575
|
+
* @containerSupport Page | supported
|
|
2576
|
+
* @containerSupport Widget | unsupported
|
|
2408
2577
|
* @platformSupport Android | supported | 支持 HTTPS GET 下载、域名白名单校验、临时或用户目录写入、超时、取消及任务事件监听。
|
|
2409
2578
|
* @platformSupport iOS | supported | 支持 HTTPS GET 下载、域名白名单校验、临时或用户目录写入、超时、取消及任务事件监听。
|
|
2410
2579
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2524,6 +2693,99 @@ export declare interface DownloadTaskHeadersReceivedEvent {
|
|
|
2524
2693
|
header: Record<string, string>;
|
|
2525
2694
|
}
|
|
2526
2695
|
|
|
2696
|
+
/**
|
|
2697
|
+
* 发起抖音支付流程。
|
|
2698
|
+
*
|
|
2699
|
+
* @param params - 支付请求数据。
|
|
2700
|
+
* @returns 返回一个 Promise,在支付流程完成时 resolve。
|
|
2701
|
+
* @remarks
|
|
2702
|
+
* `data` 应由业务服务端生成,前端不要自行拼装或修改。
|
|
2703
|
+
*
|
|
2704
|
+
* 支付流程返回不代表最终支付状态,最终结果应以业务服务端查询结果或支付回调为准。
|
|
2705
|
+
* @example
|
|
2706
|
+
* ```typescript
|
|
2707
|
+
* import { dypay } from '@doubao-dev/framework/api';
|
|
2708
|
+
*
|
|
2709
|
+
* // 业务方自行实现:从业务服务端获取支付请求数据;该函数不是 SDK API。
|
|
2710
|
+
* declare function getDypayDataFromBusinessServer(): Promise<string>;
|
|
2711
|
+
*
|
|
2712
|
+
* const data = await getDypayDataFromBusinessServer();
|
|
2713
|
+
* await dypay({ data });
|
|
2714
|
+
* ```
|
|
2715
|
+
*
|
|
2716
|
+
* @since 0.1.0
|
|
2717
|
+
* @platformSupport Android | supported | 支持传入 data 发起抖音支付流程。
|
|
2718
|
+
* @platformSupport iOS | supported | 支持传入 data 发起抖音支付流程。
|
|
2719
|
+
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
2720
|
+
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
2721
|
+
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
2722
|
+
* @precondition All | 调用前需由业务服务端生成合法的支付请求 data。
|
|
2723
|
+
* @usageNote All | 调用会进入支付流程,请在用户明确触发支付的交互场景中调用;不要在后台逻辑中自动调用。
|
|
2724
|
+
* @errorCode none | - | - | Android,iOS | 无 API 专属错误码 | 根据调用失败信息提示用户稍后重试
|
|
2725
|
+
* @public
|
|
2726
|
+
*/
|
|
2727
|
+
export declare const dypay: (params: DypayParams) => Promise<object>;
|
|
2728
|
+
|
|
2729
|
+
/** @public */
|
|
2730
|
+
export declare interface DypayParams {
|
|
2731
|
+
/**
|
|
2732
|
+
* 支付请求数据。
|
|
2733
|
+
*
|
|
2734
|
+
* 该字段应由业务服务端按支付接入协议生成,前端需原样透传。
|
|
2735
|
+
*/
|
|
2736
|
+
data: string;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* 开启页面返回前提醒。
|
|
2741
|
+
* 当用户在智能服务的非最底层页面点击左上角返回按钮、左上角首页按钮或客户端返回键时,弹起询问弹窗
|
|
2742
|
+
*
|
|
2743
|
+
* 返回询问对话框只会对调用的当前页面生效,通过手势滑动返回时不会弹起询问对话框
|
|
2744
|
+
*
|
|
2745
|
+
* @summary 开启页面返回前提醒。
|
|
2746
|
+
* @remarks
|
|
2747
|
+
* 配合 disableAlertBeforeUnload 使用。
|
|
2748
|
+
* @param params 返回提醒参数,字段见 {@link EnableAlertBeforeUnloadParams}。
|
|
2749
|
+
* @returns 返回一个 Promise,在当前页面的返回提醒开启或更新后 resolve。
|
|
2750
|
+
* @since 0.0.43
|
|
2751
|
+
* @platformSupport Android | supported | 支持为当前页面开启返回提醒并更新提示文案。
|
|
2752
|
+
* @platformSupport iOS | supported | 支持为当前页面开启返回提醒并更新提示文案。
|
|
2753
|
+
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
2754
|
+
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
2755
|
+
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
2756
|
+
* @precondition All | 必须在页面容器内调用
|
|
2757
|
+
* @usageNote All | 仅非根页面的显式返回会展示提醒;根页面退出不拦截,iOS 侧滑返回不拦截。
|
|
2758
|
+
* @errorCode common | 102 | Android,iOS
|
|
2759
|
+
* @errorCode errNo | 103 | feature not support | Android,iOS | 当前调用不来自页面容器 | 请在页面生命周期内调用。
|
|
2760
|
+
* @errorCode errNo | 104 | invalid parameter | Android,iOS | message 缺失或类型不是字符串 | 传入字符串类型的 message。
|
|
2761
|
+
* @errorExample
|
|
2762
|
+
* ```json
|
|
2763
|
+
* {
|
|
2764
|
+
* "errNo": 103,
|
|
2765
|
+
* "errMsg": "feature not support"
|
|
2766
|
+
* }
|
|
2767
|
+
* ```
|
|
2768
|
+
* @example
|
|
2769
|
+
* ```typescript
|
|
2770
|
+
* import { enableAlertBeforeUnload } from '@doubao-dev/framework/api';
|
|
2771
|
+
*
|
|
2772
|
+
* await enableAlertBeforeUnload({ message: '确定离开当前页面吗?' });
|
|
2773
|
+
* ```
|
|
2774
|
+
*
|
|
2775
|
+
* @public
|
|
2776
|
+
*/
|
|
2777
|
+
export declare const enableAlertBeforeUnload: (params: EnableAlertBeforeUnloadParams) => Promise<object>;
|
|
2778
|
+
|
|
2779
|
+
/**
|
|
2780
|
+
* 开启返回前提醒的参数。
|
|
2781
|
+
*
|
|
2782
|
+
* @public
|
|
2783
|
+
*/
|
|
2784
|
+
export declare interface EnableAlertBeforeUnloadParams {
|
|
2785
|
+
/** 返回前确认弹窗的文案。 */
|
|
2786
|
+
message: string;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2527
2789
|
/**
|
|
2528
2790
|
* 允许用户录屏。
|
|
2529
2791
|
*
|
|
@@ -2536,8 +2798,8 @@ export declare interface DownloadTaskHeadersReceivedEvent {
|
|
|
2536
2798
|
*
|
|
2537
2799
|
* @returns 不包含字段的结果对象。
|
|
2538
2800
|
* @since 0.0.37
|
|
2539
|
-
* @
|
|
2540
|
-
* @
|
|
2801
|
+
* @containerSupport Page | supported
|
|
2802
|
+
* @containerSupport Widget | unsupported
|
|
2541
2803
|
* @platformSupport Android | supported | 支持允许用户录屏
|
|
2542
2804
|
* @platformSupport iOS | supported | 支持允许用户录屏
|
|
2543
2805
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -2567,7 +2829,8 @@ export declare const enableUserScreenRecord: (params?: {} | undefined) => Promis
|
|
|
2567
2829
|
* ```
|
|
2568
2830
|
*
|
|
2569
2831
|
* @since 0.0.20
|
|
2570
|
-
* @
|
|
2832
|
+
* @containerSupport Page | supported
|
|
2833
|
+
* @containerSupport Widget | unsupported
|
|
2571
2834
|
* @platformSupport Android | supported | 支持退出当前智能服务的全部页面。
|
|
2572
2835
|
* @platformSupport iOS | supported | 支持退出当前智能服务的全部页面。
|
|
2573
2836
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2588,7 +2851,6 @@ export declare const exitApp: () => Promise<object>;
|
|
|
2588
2851
|
* @returns 返回一个 Promise,在卡片更新完成时解析。
|
|
2589
2852
|
* @remarks
|
|
2590
2853
|
* 用于将状态已经过期的 Widget 实例转换为固定卡片,用户点击后可跳转到指定页面。
|
|
2591
|
-
* 底层通过 {@link updateWidget} 实现。
|
|
2592
2854
|
*
|
|
2593
2855
|
* `getWidgetInstanceId` 仅在卡片环境中有效,在智能服务页面中会返回 `undefined`。如果需要在页面中调用,
|
|
2594
2856
|
* 请在 `navigateTo` 时通过参数传递卡片实例 ID。
|
|
@@ -2605,7 +2867,8 @@ export declare const exitApp: () => Promise<object>;
|
|
|
2605
2867
|
* ```
|
|
2606
2868
|
*
|
|
2607
2869
|
* @since 0.0.27
|
|
2608
|
-
* @
|
|
2870
|
+
* @containerSupport Page | supported
|
|
2871
|
+
* @containerSupport Widget | supported
|
|
2609
2872
|
* @platformSupport Android | supported | 支持将过期卡片更新为固定卡片。
|
|
2610
2873
|
* @platformSupport iOS | supported | 支持将过期卡片更新为固定卡片。
|
|
2611
2874
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2748,8 +3011,8 @@ export declare interface FileSystemManager {
|
|
|
2748
3011
|
* ```
|
|
2749
3012
|
*
|
|
2750
3013
|
* @since 0.0.18
|
|
2751
|
-
* @
|
|
2752
|
-
* @
|
|
3014
|
+
* @containerSupport Page | supported
|
|
3015
|
+
* @containerSupport Widget | supported
|
|
2753
3016
|
* @platformSupport Android | supported | 支持获取当前智能服务账号信息。
|
|
2754
3017
|
* @platformSupport iOS | supported | 支持获取当前智能服务账号信息。
|
|
2755
3018
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2778,7 +3041,7 @@ export declare function getAccountInfo(params?: {}): Promise<GetAccountInfoResul
|
|
|
2778
3041
|
* @public
|
|
2779
3042
|
*/
|
|
2780
3043
|
export declare interface GetAccountInfoResult {
|
|
2781
|
-
/**
|
|
3044
|
+
/** 智能服务账号信息 */
|
|
2782
3045
|
miniProgram: DoubaoAppAccountInfo;
|
|
2783
3046
|
/** 插件账号信息(仅在插件中调用时包含) */
|
|
2784
3047
|
plugin?: PluginAccountInfo;
|
|
@@ -2797,8 +3060,8 @@ export declare interface GetAccountInfoResult {
|
|
|
2797
3060
|
* ```
|
|
2798
3061
|
*
|
|
2799
3062
|
* @since 0.0.18
|
|
2800
|
-
* @
|
|
2801
|
-
* @
|
|
3063
|
+
* @containerSupport Page | supported
|
|
3064
|
+
* @containerSupport Widget | supported
|
|
2802
3065
|
* @platformSupport Android | supported | 支持同步获取当前智能服务账号信息。
|
|
2803
3066
|
* @platformSupport iOS | supported | 支持同步获取当前智能服务账号信息。
|
|
2804
3067
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2827,7 +3090,7 @@ export declare function getAccountInfoSync(params?: {}): GetAccountInfoResult;
|
|
|
2827
3090
|
* 调用只读取当前系统授权状态,不会申请权限或触发系统授权弹窗。原有状态字段固定返回
|
|
2828
3091
|
* `authorized`、`denied` 或 `not determined`,精细授权字段用于区分部分、只读、只写、前后台等能力。
|
|
2829
3092
|
*
|
|
2830
|
-
* @returns
|
|
3093
|
+
* @returns 返回豆包客户端的相册、蓝牙、摄像头、定位、麦克风、通知、日历和健康数据系统权限状态。
|
|
2831
3094
|
* @example
|
|
2832
3095
|
* ```typescript
|
|
2833
3096
|
* import { getAppAuthorizeSetting } from '@doubao-dev/framework/api';
|
|
@@ -2839,10 +3102,12 @@ export declare function getAccountInfoSync(params?: {}): GetAccountInfoResult;
|
|
|
2839
3102
|
* detail === 'write only' ||
|
|
2840
3103
|
* (detail == null && result.phoneCalendarAuthorized === 'authorized');
|
|
2841
3104
|
* console.log(canWriteCalendar);
|
|
3105
|
+
* console.log(result.healthDataAuthorizationDetail?.readStatus);
|
|
2842
3106
|
* ```
|
|
2843
3107
|
*
|
|
2844
3108
|
* @since 0.0.40
|
|
2845
|
-
* @
|
|
3109
|
+
* @containerSupport Page | supported
|
|
3110
|
+
* @containerSupport Widget | supported
|
|
2846
3111
|
* @platformSupport Android | supported | 支持同步读取豆包客户端的系统权限状态。
|
|
2847
3112
|
* @platformSupport iOS | supported | 支持同步读取豆包客户端的系统权限状态。
|
|
2848
3113
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -2851,6 +3116,7 @@ export declare function getAccountInfoSync(params?: {}): GetAccountInfoResult;
|
|
|
2851
3116
|
* @precondition All | 无额外前置条件
|
|
2852
3117
|
* @usageNote All | 本接口查询豆包客户端的系统权限,不等同于查询当前智能服务的 scope 授权。
|
|
2853
3118
|
* @usageNote iOS | SDK 首次完成通知设置异步预热前,或应用重新激活后的刷新尚未完成时,四个通知字段可能仍为旧值或 not determined。
|
|
3119
|
+
* @usageNote iOS | healthDataAuthorizationDetail 使用异步缓存;首次预热或应用重新激活刷新完成前可能返回 UNKNOWN。Apple 不公开精确读取授权,DENIED/GRANTED 为轻量查询推断。
|
|
2854
3120
|
* @resultExample
|
|
2855
3121
|
* ```json
|
|
2856
3122
|
* {
|
|
@@ -2871,7 +3137,13 @@ export declare function getAccountInfoSync(params?: {}): GetAccountInfoResult;
|
|
|
2871
3137
|
* "locationAuthorizationDetail": "foreground precise",
|
|
2872
3138
|
* "microphoneAuthorizationDetail": "full",
|
|
2873
3139
|
* "notificationAuthorizationDetail": "provisional",
|
|
2874
|
-
* "phoneCalendarAuthorizationDetail": "write only"
|
|
3140
|
+
* "phoneCalendarAuthorizationDetail": "write only",
|
|
3141
|
+
* "healthDataAuthorizationDetail": {
|
|
3142
|
+
* "readStatus": [
|
|
3143
|
+
* { "type": "heart_rate", "status": 2 },
|
|
3144
|
+
* { "type": "step_count", "status": 0 }
|
|
3145
|
+
* ]
|
|
3146
|
+
* }
|
|
2875
3147
|
* }
|
|
2876
3148
|
* ```
|
|
2877
3149
|
* @errorCode none | - | - | Android,iOS | 无 API 专属错误码 | 无需处理
|
|
@@ -2881,6 +3153,7 @@ export declare function getAccountInfoSync(params?: {}): GetAccountInfoResult;
|
|
|
2881
3153
|
* @platformNote Android | 精细字段区分 Android 14 部分相册、日历读写、定位前后台和精度,以及蓝牙部分子权限
|
|
2882
3154
|
* @platformNote iOS | 相册 limited 映射为 authorized,通知 provisional 和 ephemeral 映射为 authorized
|
|
2883
3155
|
* @platformNote iOS | 精细字段区分相册 limited/add only、日历 write only、定位前后台和精度,以及通知 provisional;ephemeral 暂不映射
|
|
3156
|
+
* @platformNote iOS | healthDataAuthorizationDetail 返回 SDK 支持的全部健康类型,调用方可按自己申请读取权限时使用的 types 过滤;它不等同于 Apple 提供的精确读取授权结果
|
|
2884
3157
|
*
|
|
2885
3158
|
* @public
|
|
2886
3159
|
*/
|
|
@@ -2954,6 +3227,13 @@ export declare interface GetAppAuthorizeSettingResult {
|
|
|
2954
3227
|
* - `write only`:只能新增日程,不能读取现有日历数据。
|
|
2955
3228
|
*/
|
|
2956
3229
|
phoneCalendarAuthorizationDetail?: PhoneCalendarAuthorizationDetail | null;
|
|
3230
|
+
/**
|
|
3231
|
+
* HealthKit 逐类型读取授权状态;仅 iOS 新版本客户端返回。
|
|
3232
|
+
*
|
|
3233
|
+
* Apple 不提供读取权限的精确查询接口。`status` 为 1 或 2 时采用轻量查询推断,
|
|
3234
|
+
* “已授权但没有数据”和“拒绝读取”仍可能无法可靠区分;业务应以实际读取结果为准。
|
|
3235
|
+
*/
|
|
3236
|
+
healthDataAuthorizationDetail?: HealthDataAuthorizationDetail | null;
|
|
2957
3237
|
}
|
|
2958
3238
|
|
|
2959
3239
|
/**
|
|
@@ -2971,8 +3251,8 @@ export declare interface GetAppAuthorizeSettingResult {
|
|
|
2971
3251
|
* ```
|
|
2972
3252
|
*
|
|
2973
3253
|
* @since 0.0.18
|
|
2974
|
-
* @
|
|
2975
|
-
* @
|
|
3254
|
+
* @containerSupport Page | supported
|
|
3255
|
+
* @containerSupport Widget | supported
|
|
2976
3256
|
* @platformSupport Android | supported | 支持异步获取应用基础信息。
|
|
2977
3257
|
* @platformSupport iOS | unsupported | 未注册异步应用基础信息接口,请改用 getAppBaseInfoSync。
|
|
2978
3258
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -3017,7 +3297,7 @@ export declare interface GetAppBaseInfoResult {
|
|
|
3017
3297
|
/**
|
|
3018
3298
|
* 获取应用基础信息。
|
|
3019
3299
|
*
|
|
3020
|
-
* @returns 返回 SDK
|
|
3300
|
+
* @returns 返回 SDK 版本、豆包客户端信息、语言和主题等字段,见 {@link GetAppBaseInfoResult}。
|
|
3021
3301
|
* @example
|
|
3022
3302
|
* ```typescript
|
|
3023
3303
|
* import { getAppBaseInfoSync } from '@doubao-dev/framework/api';
|
|
@@ -3029,14 +3309,15 @@ export declare interface GetAppBaseInfoResult {
|
|
|
3029
3309
|
* ```
|
|
3030
3310
|
*
|
|
3031
3311
|
* @since 0.0.18
|
|
3032
|
-
* @
|
|
3312
|
+
* @containerSupport Page | supported
|
|
3313
|
+
* @containerSupport Widget | supported
|
|
3033
3314
|
* @platformSupport Android | supported | 支持同步获取应用基础信息。
|
|
3034
3315
|
* @platformSupport iOS | supported | 支持同步获取应用基础信息。
|
|
3035
3316
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
3036
3317
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
3037
3318
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
3038
3319
|
* @precondition All | 无额外前置条件
|
|
3039
|
-
* @usageNote All | enableDebug
|
|
3320
|
+
* @usageNote All | 当前不返回 `enableDebug`;如需获取调试状态,请使用 getSystemInfo 或 getSystemInfoSync。
|
|
3040
3321
|
* @resultExample
|
|
3041
3322
|
* ```json
|
|
3042
3323
|
* {
|
|
@@ -3070,7 +3351,8 @@ export declare const getAppBaseInfoSync: (_params?: {}) => GetAppBaseInfoResult;
|
|
|
3070
3351
|
* audio.play();
|
|
3071
3352
|
* ```
|
|
3072
3353
|
* @since 0.0.37
|
|
3073
|
-
* @
|
|
3354
|
+
* @containerSupport Page | supported
|
|
3355
|
+
* @containerSupport Widget | unsupported
|
|
3074
3356
|
* @platformSupport Android | supported | 支持背景音频播放和系统媒体控件
|
|
3075
3357
|
* @platformSupport iOS | supported | 支持背景音频播放和系统媒体控件
|
|
3076
3358
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3103,7 +3385,7 @@ export declare const getAppBaseInfoSync: (_params?: {}) => GetAppBaseInfoResult;
|
|
|
3103
3385
|
* }
|
|
3104
3386
|
* ```
|
|
3105
3387
|
* @errorCode event.errCode | -1001 | background audio src is empty | Android,iOS | 未设置 src 就调用 play | 设置有效 src 后重试。
|
|
3106
|
-
* @errorCode event.errCode | -1002 | background audio play failed | Android |
|
|
3388
|
+
* @errorCode event.errCode | -1002 | background audio play failed | Android | 播放器启动失败 | 检查资源地址和网络状态后重试。
|
|
3107
3389
|
* @errorCode event.errCode | -1003 | background audio seek failed | Android,iOS | 播放位置跳转失败 | 等待 canplay 后在音频时长范围内重试。
|
|
3108
3390
|
* @errorCode event.errCode | -1004 | background audio player unavailable | Android,iOS | 播放器无法创建或已经不可用 | 重新设置 src 后重试。
|
|
3109
3391
|
* @errorCode event.errCode | -1005 | background audio is occupied by another applet | Android,iOS | 另一智能服务正在占用背景音频 | 提示用户结束其他背景音频后重试。
|
|
@@ -3126,8 +3408,8 @@ export declare function getBackgroundAudioManager(): BackgroundAudioManager;
|
|
|
3126
3408
|
* console.log(isCharging, level);
|
|
3127
3409
|
* ```
|
|
3128
3410
|
* @since 0.0.25
|
|
3129
|
-
* @
|
|
3130
|
-
* @
|
|
3411
|
+
* @containerSupport Page | supported
|
|
3412
|
+
* @containerSupport Widget | unsupported
|
|
3131
3413
|
* @platformSupport Android | supported | 支持获取电池信息
|
|
3132
3414
|
* @platformSupport iOS | supported | 支持获取电池信息
|
|
3133
3415
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3176,8 +3458,8 @@ export declare interface GetBatteryInfoResult {
|
|
|
3176
3458
|
* console.log(beacons);
|
|
3177
3459
|
* ```
|
|
3178
3460
|
* @since 0.0.25
|
|
3179
|
-
* @
|
|
3180
|
-
* @
|
|
3461
|
+
* @containerSupport Page | supported
|
|
3462
|
+
* @containerSupport Widget | unsupported
|
|
3181
3463
|
* @platformSupport Android | supported | 支持获取已搜索到的 iBeacon 列表
|
|
3182
3464
|
* @platformSupport iOS | supported | 支持获取已搜索到的 iBeacon 列表
|
|
3183
3465
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3245,7 +3527,8 @@ export declare interface GetBeaconsResult {
|
|
|
3245
3527
|
* ```
|
|
3246
3528
|
*
|
|
3247
3529
|
* @since 0.0.25
|
|
3248
|
-
* @
|
|
3530
|
+
* @containerSupport Page | supported
|
|
3531
|
+
* @containerSupport Widget | unsupported
|
|
3249
3532
|
* @platformSupport Android | supported | 支持获取 BLE 特征值列表
|
|
3250
3533
|
* @platformSupport iOS | supported | 支持获取 BLE 特征值列表
|
|
3251
3534
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3315,7 +3598,8 @@ export declare interface GetBLEDeviceCharacteristicsResult {
|
|
|
3315
3598
|
* ```
|
|
3316
3599
|
*
|
|
3317
3600
|
* @since 0.0.25
|
|
3318
|
-
* @
|
|
3601
|
+
* @containerSupport Page | supported
|
|
3602
|
+
* @containerSupport Widget | unsupported
|
|
3319
3603
|
* @platformSupport Android | supported | 支持获取 BLE 设备 RSSI
|
|
3320
3604
|
* @platformSupport iOS | supported | 支持获取 BLE 设备 RSSI
|
|
3321
3605
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3373,7 +3657,8 @@ export declare interface GetBLEDeviceRSSIResult {
|
|
|
3373
3657
|
* ```
|
|
3374
3658
|
*
|
|
3375
3659
|
* @since 0.0.25
|
|
3376
|
-
* @
|
|
3660
|
+
* @containerSupport Page | supported
|
|
3661
|
+
* @containerSupport Widget | unsupported
|
|
3377
3662
|
* @platformSupport Android | supported | 支持获取 BLE 服务列表
|
|
3378
3663
|
* @platformSupport iOS | supported | 支持获取 BLE 服务列表
|
|
3379
3664
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3434,7 +3719,8 @@ export declare interface GetBLEDeviceServicesResult {
|
|
|
3434
3719
|
* ```
|
|
3435
3720
|
*
|
|
3436
3721
|
* @since 0.0.25
|
|
3437
|
-
* @
|
|
3722
|
+
* @containerSupport Page | supported
|
|
3723
|
+
* @containerSupport Widget | unsupported
|
|
3438
3724
|
* @platformSupport Android | supported | 支持获取 BLE MTU
|
|
3439
3725
|
* @platformSupport iOS | supported | 支持获取 BLE MTU
|
|
3440
3726
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3496,7 +3782,8 @@ export declare interface GetBLEMTUResult {
|
|
|
3496
3782
|
* ```
|
|
3497
3783
|
*
|
|
3498
3784
|
* @since 0.0.25
|
|
3499
|
-
* @
|
|
3785
|
+
* @containerSupport Page | supported
|
|
3786
|
+
* @containerSupport Widget | unsupported
|
|
3500
3787
|
* @platformSupport Android | supported | 支持获取蓝牙适配器状态
|
|
3501
3788
|
* @platformSupport iOS | supported | 支持获取蓝牙适配器状态
|
|
3502
3789
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3546,7 +3833,8 @@ export declare interface GetBluetoothAdapterStateResult {
|
|
|
3546
3833
|
* ```
|
|
3547
3834
|
*
|
|
3548
3835
|
* @since 0.0.25
|
|
3549
|
-
* @
|
|
3836
|
+
* @containerSupport Page | supported
|
|
3837
|
+
* @containerSupport Widget | unsupported
|
|
3550
3838
|
* @platformSupport Android | supported | 支持获取已发现的蓝牙设备列表
|
|
3551
3839
|
* @platformSupport iOS | supported | 支持获取已发现的蓝牙设备列表
|
|
3552
3840
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3554,7 +3842,7 @@ export declare interface GetBluetoothAdapterStateResult {
|
|
|
3554
3842
|
* @permission system | 蓝牙权限 | conditional | Android,iOS | 使用蓝牙能力需要系统蓝牙权限
|
|
3555
3843
|
* @authorizationBehavior All | 依赖 openBluetoothAdapter 阶段已获得的系统蓝牙权限;权限被拒绝或在系统设置中撤销后调用失败,需引导用户在系统设置中开启蓝牙权限
|
|
3556
3844
|
* @precondition All | 需先调用 startBluetoothDevicesDiscovery 开始搜索
|
|
3557
|
-
* @usageNote All | advertisData 与 serviceData
|
|
3845
|
+
* @usageNote All | `advertisData` 与 `serviceData` 以 ArrayBuffer 返回
|
|
3558
3846
|
* @resultExample
|
|
3559
3847
|
* ```json
|
|
3560
3848
|
* {
|
|
@@ -3598,7 +3886,8 @@ export declare interface GetBluetoothDevicesResult {
|
|
|
3598
3886
|
* console.log('current chat panel', { height, state });
|
|
3599
3887
|
* ```
|
|
3600
3888
|
* @since 0.0.42
|
|
3601
|
-
* @
|
|
3889
|
+
* @containerSupport Page | supported
|
|
3890
|
+
* @containerSupport Widget | unsupported
|
|
3602
3891
|
* @platformSupport Android | supported | 支持获取当前对话框状态快照。
|
|
3603
3892
|
* @platformSupport iOS | supported | 支持获取当前对话框状态快照。
|
|
3604
3893
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -3632,7 +3921,8 @@ export declare const getChatPanelInfo: (params?: {} | undefined) => Promise<Chat
|
|
|
3632
3921
|
* ```
|
|
3633
3922
|
*
|
|
3634
3923
|
* @since 0.0.25
|
|
3635
|
-
* @
|
|
3924
|
+
* @containerSupport Page | supported
|
|
3925
|
+
* @containerSupport Widget | supported
|
|
3636
3926
|
* @platformSupport Android | supported | 支持读取剪贴板
|
|
3637
3927
|
* @platformSupport iOS | supported | 支持读取剪贴板
|
|
3638
3928
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3655,7 +3945,7 @@ export declare const getChatPanelInfo: (params?: {} | undefined) => Promise<Chat
|
|
|
3655
3945
|
* }
|
|
3656
3946
|
* ```
|
|
3657
3947
|
* @errorCode common | 102 | Android,iOS
|
|
3658
|
-
* @errorCode errNo | 103 | feature not support | Android,iOS |
|
|
3948
|
+
* @errorCode errNo | 103 | feature not support | Android,iOS | 当前豆包版本不支持读取剪贴板 | 升级至支持剪贴板能力的豆包版本后重试。
|
|
3659
3949
|
*
|
|
3660
3950
|
* @public
|
|
3661
3951
|
*/
|
|
@@ -3686,7 +3976,8 @@ export declare interface GetClipboardDataResult {
|
|
|
3686
3976
|
* ```
|
|
3687
3977
|
*
|
|
3688
3978
|
* @since 0.0.25
|
|
3689
|
-
* @
|
|
3979
|
+
* @containerSupport Page | supported
|
|
3980
|
+
* @containerSupport Widget | unsupported
|
|
3690
3981
|
* @platformSupport Android | supported | 支持获取已连接的蓝牙设备列表
|
|
3691
3982
|
* @platformSupport iOS | supported | 支持获取已连接的蓝牙设备列表
|
|
3692
3983
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3747,9 +4038,8 @@ export declare interface GetConnectedBluetoothDevicesResult {
|
|
|
3747
4038
|
* ```
|
|
3748
4039
|
*
|
|
3749
4040
|
* @since 0.0.25
|
|
3750
|
-
* @
|
|
3751
|
-
* @
|
|
3752
|
-
* @contractMismatch non-blocking | return | frequency | iOS | 返回 Wi-Fi 频段 | 豆包 iOS 无法获取频段,frequency 恒为空 | iOS 上无法读取 Wi-Fi 频段 | packages/open-api/src/device/wifi/wifi.ts; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Device/Wifi/AIBridgeWifiInfoReader.swift | 记录 iOS 无频段能力
|
|
4041
|
+
* @containerSupport Page | supported
|
|
4042
|
+
* @containerSupport Widget | unsupported
|
|
3753
4043
|
* @platformSupport Android | supported | 支持获取已连接 Wi-Fi,signalStrength 为 0 到 100
|
|
3754
4044
|
* @platformSupport iOS | supported | 支持获取已连接 Wi-Fi,signalStrength 为 0 到 1 且无 frequency
|
|
3755
4045
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3835,7 +4125,8 @@ export declare interface GetConnectedWifiResult {
|
|
|
3835
4125
|
* console.log(result.platform, result.benchmarkLevel);
|
|
3836
4126
|
* ```
|
|
3837
4127
|
* @since 0.0.32
|
|
3838
|
-
* @
|
|
4128
|
+
* @containerSupport Page | supported
|
|
4129
|
+
* @containerSupport Widget | supported
|
|
3839
4130
|
* @platformSupport Android | supported | 支持获取设备信息
|
|
3840
4131
|
* @platformSupport iOS | supported | 支持获取设备信息
|
|
3841
4132
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -3901,16 +4192,17 @@ export declare interface GetDeviceInfoResult {
|
|
|
3901
4192
|
* console.log(result.platform, result.benchmarkLevel);
|
|
3902
4193
|
* ```
|
|
3903
4194
|
* @since 0.0.32
|
|
3904
|
-
* @
|
|
4195
|
+
* @containerSupport Page | supported
|
|
4196
|
+
* @containerSupport Widget | supported
|
|
3905
4197
|
* @platformSupport Android | supported | 支持同步获取设备信息
|
|
3906
4198
|
* @platformSupport iOS | supported | 支持同步获取设备信息
|
|
3907
4199
|
* @platformSupport PC | unsupported | 暂不支持
|
|
3908
4200
|
* @platformSupport HarmonyOS | unsupported | 暂不支持
|
|
3909
4201
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
3910
4202
|
* @precondition All | 无额外前置条件
|
|
3911
|
-
* @usageNote All | `
|
|
3912
|
-
* @platformNote Android | `abi`、`deviceAbi`、`cpuType`
|
|
3913
|
-
* @platformNote iOS |
|
|
4203
|
+
* @usageNote All | `platform` 返回小写的客户端平台标识;`benchmarkLevel` 无法获取时返回 -1
|
|
4204
|
+
* @platformNote Android | `abi`、`deviceAbi`、`cpuType` 为可选字段,豆包无法获取时不返回
|
|
4205
|
+
* @platformNote iOS | 不返回 `abi`、`deviceAbi`、`cpuType`
|
|
3914
4206
|
* @resultExample
|
|
3915
4207
|
* ```json
|
|
3916
4208
|
* {
|
|
@@ -3984,8 +4276,8 @@ export declare interface GetFileInfoResult {
|
|
|
3984
4276
|
* ```
|
|
3985
4277
|
*
|
|
3986
4278
|
* @since 0.0.31
|
|
3987
|
-
* @
|
|
3988
|
-
* @
|
|
4279
|
+
* @containerSupport Page | supported
|
|
4280
|
+
* @containerSupport Widget | unsupported
|
|
3989
4281
|
* @platformSupport Android | supported | 支持全部读写、目录、状态、保存与解压方法,同步与异步均可用
|
|
3990
4282
|
* @platformSupport iOS | supported | 支持全部读写、目录、状态、保存与解压方法,同步与异步均可用
|
|
3991
4283
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -4026,7 +4318,8 @@ export declare function getFileSystemManager(): FileSystemManager;
|
|
|
4026
4318
|
* console.log(width, height, path);
|
|
4027
4319
|
* ```
|
|
4028
4320
|
* @since 0.0.26
|
|
4029
|
-
* @
|
|
4321
|
+
* @containerSupport Page | supported
|
|
4322
|
+
* @containerSupport Widget | unsupported
|
|
4030
4323
|
* @platformSupport Android | supported | 支持读取本地图片和 HTTP、HTTPS 网络图片信息
|
|
4031
4324
|
* @platformSupport iOS | supported | 支持读取本地图片和 HTTP、HTTPS 网络图片信息
|
|
4032
4325
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -4117,9 +4410,8 @@ export declare interface GetImageInfoResult {
|
|
|
4117
4410
|
* fetchLocation();
|
|
4118
4411
|
* ```
|
|
4119
4412
|
* @since 0.0.28
|
|
4120
|
-
* @
|
|
4121
|
-
* @
|
|
4122
|
-
* @contractMismatch non-blocking | behavior | mode=1 | iOS | mode=1 表示仅设备定位 | iOS 将 mode=1 按高精度模式处理 | 同一参数在双端的定位策略不同 | flow_ios/flow_iOS/Modules/FlowApplet/Sources/AIBridge/AIBridgeFlowGetLocationMethod.swift | 补齐 iOS 仅设备定位策略,或收敛公开参数语义
|
|
4413
|
+
* @containerSupport Page | supported
|
|
4414
|
+
* @containerSupport Widget | supported
|
|
4123
4415
|
* @platformSupport Android | supported | 支持获取设备当前位置
|
|
4124
4416
|
* @platformSupport iOS | supported | 支持获取设备当前位置
|
|
4125
4417
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -4194,7 +4486,7 @@ export declare interface GetLocationParams {
|
|
|
4194
4486
|
*/
|
|
4195
4487
|
timeoutMs?: number;
|
|
4196
4488
|
/**
|
|
4197
|
-
*
|
|
4489
|
+
* 兼容保留字段,当前不生效。
|
|
4198
4490
|
*
|
|
4199
4491
|
* @internal
|
|
4200
4492
|
*/
|
|
@@ -4240,7 +4532,8 @@ export declare interface GetLocationResponse {
|
|
|
4240
4532
|
* ```
|
|
4241
4533
|
*
|
|
4242
4534
|
* @since 0.0.26
|
|
4243
|
-
* @
|
|
4535
|
+
* @containerSupport Page | supported
|
|
4536
|
+
* @containerSupport Widget | unsupported
|
|
4244
4537
|
* @platformSupport Android | supported | 支持获取菜单按钮布局信息。
|
|
4245
4538
|
* @platformSupport iOS | supported | 支持获取菜单按钮布局信息。
|
|
4246
4539
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -4279,9 +4572,8 @@ export declare const getMenuButtonBoundingClientRect: () => MenuButtonBoundingCl
|
|
|
4279
4572
|
* ```
|
|
4280
4573
|
*
|
|
4281
4574
|
* @since 0.0.25
|
|
4282
|
-
* @
|
|
4283
|
-
* @
|
|
4284
|
-
* @contractMismatch non-blocking | return | signalStrength | Android,iOS | 可选返回信号强度 | 仅 Android Wi-Fi 环境返回,iOS 恒不返回 | 依赖该字段的逻辑在 iOS 或蜂窝网络下取不到值 | ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge/method/device/AIBridgeNetworkMethods.kt; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Device/AIBridgeNetworkMethods.swift | 明确 signalStrength 的返回条件
|
|
4575
|
+
* @containerSupport Page | supported
|
|
4576
|
+
* @containerSupport Widget | unsupported
|
|
4285
4577
|
* @platformSupport Android | supported | 支持获取网络类型
|
|
4286
4578
|
* @platformSupport iOS | supported | 支持获取网络类型
|
|
4287
4579
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -4373,7 +4665,8 @@ export declare interface GetNetworkTypeResult {
|
|
|
4373
4665
|
* ```
|
|
4374
4666
|
*
|
|
4375
4667
|
* @since 0.0.28
|
|
4376
|
-
* @
|
|
4668
|
+
* @containerSupport Page | supported
|
|
4669
|
+
* @containerSupport Widget | supported
|
|
4377
4670
|
* @platformSupport Android | supported | 支持拉起收银台完成订单支付。
|
|
4378
4671
|
* @platformSupport iOS | supported | 支持拉起收银台完成订单支付。
|
|
4379
4672
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -4456,7 +4749,8 @@ export declare interface GetOrderPaymentResult {
|
|
|
4456
4749
|
* ```
|
|
4457
4750
|
*
|
|
4458
4751
|
* @since 0.0.28
|
|
4459
|
-
* @
|
|
4752
|
+
* @containerSupport Page | supported
|
|
4753
|
+
* @containerSupport Widget | supported
|
|
4460
4754
|
* @platformSupport Android | supported | 支持携带签名信息拉起收银台完成订单支付。
|
|
4461
4755
|
* @platformSupport iOS | supported | 支持携带签名信息拉起收银台完成订单支付。
|
|
4462
4756
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -4529,6 +4823,8 @@ export declare interface GetPackageInfoResult {
|
|
|
4529
4823
|
* 同步获取当前 package 信息,仅供 Web SDK 模拟器使用。
|
|
4530
4824
|
*
|
|
4531
4825
|
* @internal
|
|
4826
|
+
* @containerSupport Page | supported
|
|
4827
|
+
* @containerSupport Widget | supported
|
|
4532
4828
|
*/
|
|
4533
4829
|
export declare const getPackageInfoSync: () => GetPackageInfoResult;
|
|
4534
4830
|
|
|
@@ -4554,9 +4850,10 @@ export declare const getPackageInfoSync: () => GetPackageInfoResult;
|
|
|
4554
4850
|
* ```
|
|
4555
4851
|
*
|
|
4556
4852
|
* @since 0.0.42
|
|
4557
|
-
* @
|
|
4853
|
+
* @containerSupport Page | supported
|
|
4854
|
+
* @containerSupport Widget | supported
|
|
4558
4855
|
* @platformSupport Android | supported | 支持查询性能 Entry、设置性能缓冲区大小和创建性能观察者。
|
|
4559
|
-
* @platformSupport iOS |
|
|
4856
|
+
* @platformSupport iOS | supported | 支持查询性能 Entry、设置性能缓冲区大小和创建性能观察者。
|
|
4560
4857
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
4561
4858
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
4562
4859
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
@@ -4595,7 +4892,8 @@ export declare function getPerformance(): Performance_2;
|
|
|
4595
4892
|
* ```
|
|
4596
4893
|
*
|
|
4597
4894
|
* @since 0.0.19
|
|
4598
|
-
* @
|
|
4895
|
+
* @containerSupport Page | supported
|
|
4896
|
+
* @containerSupport Widget | supported
|
|
4599
4897
|
* @platformSupport Android | supported | 支持获取隐私协议授权状态。
|
|
4600
4898
|
* @platformSupport iOS | supported | 支持获取隐私协议授权状态。
|
|
4601
4899
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -4631,7 +4929,8 @@ export declare const getPrivacySetting: (params?: {} | undefined) => Promise<Pri
|
|
|
4631
4929
|
* ```
|
|
4632
4930
|
*
|
|
4633
4931
|
* @since 0.0.25
|
|
4634
|
-
* @
|
|
4932
|
+
* @containerSupport Page | supported
|
|
4933
|
+
* @containerSupport Widget | unsupported
|
|
4635
4934
|
* @platformSupport Android | supported | 支持获取安全随机数
|
|
4636
4935
|
* @platformSupport iOS | supported | 支持获取安全随机数
|
|
4637
4936
|
* @platformSupport PC | supported | 支持获取安全随机数
|
|
@@ -4645,7 +4944,7 @@ export declare const getPrivacySetting: (params?: {} | undefined) => Promise<Pri
|
|
|
4645
4944
|
* "randomValues": {}
|
|
4646
4945
|
* }
|
|
4647
4946
|
* ```
|
|
4648
|
-
* @errorCode none | - | - | Android,iOS | 入参非法时抛出 RangeError
|
|
4947
|
+
* @errorCode none | - | - | Android,iOS | 入参非法时抛出 RangeError,Crypto.getRandomValues 不可用时抛出 Error,均非顶层 errNo/errMsg | 传入合法 length,并在支持 Crypto.getRandomValues 的客户端版本中调用
|
|
4649
4948
|
*
|
|
4650
4949
|
* @public
|
|
4651
4950
|
*/
|
|
@@ -4688,8 +4987,8 @@ export declare interface GetRandomValuesResult {
|
|
|
4688
4987
|
* rm.start({ duration: 10000, format: 'aac' });
|
|
4689
4988
|
* ```
|
|
4690
4989
|
* @since 0.0.36
|
|
4691
|
-
* @
|
|
4692
|
-
* @
|
|
4990
|
+
* @containerSupport Page | supported
|
|
4991
|
+
* @containerSupport Widget | unsupported
|
|
4693
4992
|
* @platformSupport Android | supported | 支持 AAC 录音和带 frameSize 的 PCM/WAV 分片录音
|
|
4694
4993
|
* @platformSupport iOS | supported | 支持 AAC、PCM/WAV 录音和带 frameSize 的分片录音
|
|
4695
4994
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -4742,8 +5041,8 @@ export declare interface GetSavedFileListResult {
|
|
|
4742
5041
|
* ```
|
|
4743
5042
|
*
|
|
4744
5043
|
* @since 0.0.19
|
|
4745
|
-
* @
|
|
4746
|
-
* @
|
|
5044
|
+
* @containerSupport Page | supported
|
|
5045
|
+
* @containerSupport Widget | unsupported
|
|
4747
5046
|
* @platformSupport Android | supported | 支持获取屏幕亮度
|
|
4748
5047
|
* @platformSupport iOS | unsupported | 豆包 iOS 未实现获取屏幕亮度接口
|
|
4749
5048
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -4787,13 +5086,15 @@ export declare interface GetScreenBrightnessResult {
|
|
|
4787
5086
|
* ```
|
|
4788
5087
|
*
|
|
4789
5088
|
* @since 0.0.36
|
|
4790
|
-
* @
|
|
5089
|
+
* @containerSupport Page | supported
|
|
5090
|
+
* @containerSupport Widget | supported
|
|
4791
5091
|
* @platformSupport Android | supported | 支持获取用户的应用授权设置。
|
|
4792
5092
|
* @platformSupport iOS | supported | 支持获取用户的应用授权设置。
|
|
4793
5093
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
4794
5094
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
4795
5095
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
4796
5096
|
* @precondition All | 无额外前置条件
|
|
5097
|
+
* @usageNote All | authSetting 只表示当前智能服务的 scope 授权,不表示操作系统权限;HealthKit 逐类型系统状态通过 getAppAuthorizeSetting 查询。
|
|
4797
5098
|
* @usageNote All | authSetting 只包含已向用户请求过且状态明确的权限;豆包当前不支持订阅模板,不要传入 withSubscriptions: true。
|
|
4798
5099
|
* @resultExample
|
|
4799
5100
|
* ```json
|
|
@@ -4813,7 +5114,7 @@ export declare interface GetScreenBrightnessResult {
|
|
|
4813
5114
|
* ```
|
|
4814
5115
|
* @errorCode common | 102 | Android,iOS
|
|
4815
5116
|
* @errorCode errNo | 103 | feature not support | Android,iOS | 传入 withSubscriptions: true,豆包当前不支持订阅消息模板 | 不要传入 withSubscriptions: true,仅使用默认的 false
|
|
4816
|
-
* @errorCode errNo | 116 | resource not found | Android |
|
|
5117
|
+
* @errorCode errNo | 116 | resource not found | Android | 豆包未找到当前智能服务 | 确认当前智能服务已正确安装后重试
|
|
4817
5118
|
* @platformNote iOS | iOS 不返回 errNo 116(resource not found),相应失败场景统一以 errNo 102(internal error)返回。
|
|
4818
5119
|
*
|
|
4819
5120
|
* @public
|
|
@@ -4856,8 +5157,8 @@ export declare interface GetSettingResult {
|
|
|
4856
5157
|
* ```
|
|
4857
5158
|
*
|
|
4858
5159
|
* @since 0.0.17
|
|
4859
|
-
* @
|
|
4860
|
-
* @
|
|
5160
|
+
* @containerSupport Page | supported
|
|
5161
|
+
* @containerSupport Widget | supported
|
|
4861
5162
|
* @platformSupport Android | supported | 支持按智能服务维度读取本地缓存。
|
|
4862
5163
|
* @platformSupport iOS | supported | 支持按智能服务维度读取本地缓存。
|
|
4863
5164
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -4903,7 +5204,8 @@ export declare function getStorage<TData = unknown>(params: GetStorageParams): P
|
|
|
4903
5204
|
* ```
|
|
4904
5205
|
*
|
|
4905
5206
|
* @since 0.0.17
|
|
4906
|
-
* @
|
|
5207
|
+
* @containerSupport Page | supported
|
|
5208
|
+
* @containerSupport Widget | supported
|
|
4907
5209
|
* @platformSupport Android | supported | 支持查询当前智能服务的本地缓存信息。
|
|
4908
5210
|
* @platformSupport iOS | supported | 支持查询当前智能服务的本地缓存信息。
|
|
4909
5211
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -4949,7 +5251,8 @@ export declare interface GetStorageInfoResult {
|
|
|
4949
5251
|
* ```
|
|
4950
5252
|
*
|
|
4951
5253
|
* @since 0.0.19
|
|
4952
|
-
* @
|
|
5254
|
+
* @containerSupport Page | supported
|
|
5255
|
+
* @containerSupport Widget | supported
|
|
4953
5256
|
* @platformSupport Android | supported | 支持同步查询当前智能服务的本地缓存信息。
|
|
4954
5257
|
* @platformSupport iOS | supported | 支持同步查询当前智能服务的本地缓存信息。
|
|
4955
5258
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5000,8 +5303,8 @@ export declare interface GetStorageResult<TData = unknown> {
|
|
|
5000
5303
|
* ```
|
|
5001
5304
|
*
|
|
5002
5305
|
* @since 0.0.19
|
|
5003
|
-
* @
|
|
5004
|
-
* @
|
|
5306
|
+
* @containerSupport Page | supported
|
|
5307
|
+
* @containerSupport Widget | supported
|
|
5005
5308
|
* @platformSupport Android | supported | 支持按智能服务维度同步读取本地缓存。
|
|
5006
5309
|
* @platformSupport iOS | supported | 支持按智能服务维度同步读取本地缓存。
|
|
5007
5310
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5048,8 +5351,8 @@ export declare function getStorageSync<TData = unknown>(params: GetStorageParams
|
|
|
5048
5351
|
* ```
|
|
5049
5352
|
*
|
|
5050
5353
|
* @since 0.0.34
|
|
5051
|
-
* @
|
|
5052
|
-
* @
|
|
5354
|
+
* @containerSupport Page | supported
|
|
5355
|
+
* @containerSupport Widget | supported
|
|
5053
5356
|
* @platformSupport Android | supported | 支持获取系统信息。
|
|
5054
5357
|
* @platformSupport iOS | supported | 支持获取系统信息。
|
|
5055
5358
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5151,8 +5454,8 @@ export declare interface GetSystemInfoResult {
|
|
|
5151
5454
|
* ```
|
|
5152
5455
|
*
|
|
5153
5456
|
* @since 0.0.34
|
|
5154
|
-
* @
|
|
5155
|
-
* @
|
|
5457
|
+
* @containerSupport Page | supported
|
|
5458
|
+
* @containerSupport Widget | supported
|
|
5156
5459
|
* @platformSupport Android | supported | 支持同步获取系统信息。
|
|
5157
5460
|
* @platformSupport iOS | supported | 支持同步获取系统信息。
|
|
5158
5461
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5212,8 +5515,8 @@ export declare const getSystemInfoSync: (_params?: {}) => GetSystemInfoResult;
|
|
|
5212
5515
|
* ```
|
|
5213
5516
|
*
|
|
5214
5517
|
* @since 0.0.25
|
|
5215
|
-
* @
|
|
5216
|
-
* @
|
|
5518
|
+
* @containerSupport Page | supported
|
|
5519
|
+
* @containerSupport Widget | supported
|
|
5217
5520
|
* @platformSupport Android | supported | 支持获取设备系统设置。
|
|
5218
5521
|
* @platformSupport iOS | supported | 支持获取设备系统设置。
|
|
5219
5522
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5265,8 +5568,8 @@ export declare interface GetSystemSettingResult {
|
|
|
5265
5568
|
* ```
|
|
5266
5569
|
*
|
|
5267
5570
|
* @since 0.0.25
|
|
5268
|
-
* @
|
|
5269
|
-
* @
|
|
5571
|
+
* @containerSupport Page | supported
|
|
5572
|
+
* @containerSupport Widget | unsupported
|
|
5270
5573
|
* @platformSupport Android | supported | 支持扫描并返回周边 Wi-Fi 列表
|
|
5271
5574
|
* @platformSupport iOS | supported | 仅返回当前已连接的 Wi-Fi
|
|
5272
5575
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -5341,14 +5644,15 @@ export declare interface GetWifiListResult {
|
|
|
5341
5644
|
* ```
|
|
5342
5645
|
*
|
|
5343
5646
|
* @since 0.0.18
|
|
5344
|
-
* @
|
|
5647
|
+
* @containerSupport Page | supported
|
|
5648
|
+
* @containerSupport Widget | unsupported
|
|
5345
5649
|
* @platformSupport Android | supported | 支持获取窗口信息。
|
|
5346
5650
|
* @platformSupport iOS | supported | 支持获取窗口信息。
|
|
5347
5651
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
5348
5652
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
5349
5653
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
5350
5654
|
* @precondition All | 无额外前置条件
|
|
5351
|
-
* @usageNote All |
|
|
5655
|
+
* @usageNote All | 该接口与 getWindowInfoSync 返回相同信息;无需异步调用时可直接使用 getWindowInfoSync。
|
|
5352
5656
|
* @resultExample
|
|
5353
5657
|
* ```json
|
|
5354
5658
|
* {
|
|
@@ -5410,7 +5714,8 @@ export declare interface GetWindowInfoResult {
|
|
|
5410
5714
|
* ```
|
|
5411
5715
|
*
|
|
5412
5716
|
* @since 0.0.18
|
|
5413
|
-
* @
|
|
5717
|
+
* @containerSupport Page | supported
|
|
5718
|
+
* @containerSupport Widget | unsupported
|
|
5414
5719
|
* @platformSupport Android | supported | 支持同步获取窗口信息。
|
|
5415
5720
|
* @platformSupport iOS | supported | 支持同步获取窗口信息。
|
|
5416
5721
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5466,6 +5771,40 @@ export declare interface GyroscopeChangeEvent {
|
|
|
5466
5771
|
*/
|
|
5467
5772
|
export declare type GyroscopeChangeListener = (event: GyroscopeChangeEvent) => void;
|
|
5468
5773
|
|
|
5774
|
+
/** @public */
|
|
5775
|
+
export declare interface HealthDataAuthorizationDetail {
|
|
5776
|
+
/** iOS SDK 支持的全部健康类型及其读取状态。 */
|
|
5777
|
+
readStatus: HealthDataAuthorizationItem[];
|
|
5778
|
+
}
|
|
5779
|
+
|
|
5780
|
+
/** @public */
|
|
5781
|
+
export declare interface HealthDataAuthorizationItem {
|
|
5782
|
+
/** 健康数据类型。 */
|
|
5783
|
+
type: HealthDataType_2;
|
|
5784
|
+
/** 当前类型的读取权限状态码。 */
|
|
5785
|
+
status: HealthDataAuthorizationStatus;
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
/**
|
|
5789
|
+
* HealthKit 读取权限状态码。
|
|
5790
|
+
*
|
|
5791
|
+
* - `-1`:未知或当前系统不支持该类型
|
|
5792
|
+
* - `0`:系统仍需要展示授权请求
|
|
5793
|
+
* - `1`:轻量查询推断为已拒绝
|
|
5794
|
+
* - `2`:轻量查询未发现授权错误
|
|
5795
|
+
*
|
|
5796
|
+
* @public
|
|
5797
|
+
*/
|
|
5798
|
+
export declare type HealthDataAuthorizationStatus = -1 | 0 | 1 | 2;
|
|
5799
|
+
|
|
5800
|
+
/** @public */
|
|
5801
|
+
export declare interface HealthDataAuthorizeOptions {
|
|
5802
|
+
/** 健康数据类型列表;用于申请对应的 HealthKit 读取权限。 */
|
|
5803
|
+
types: HealthDataType[];
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5806
|
+
export declare type HealthDataType = HealthDataType_2;
|
|
5807
|
+
|
|
5469
5808
|
/**
|
|
5470
5809
|
* 隐藏交互提示框的公共参数。
|
|
5471
5810
|
*
|
|
@@ -5485,7 +5824,8 @@ export declare interface HideInteractionParams {
|
|
|
5485
5824
|
* ```
|
|
5486
5825
|
*
|
|
5487
5826
|
* @since 0.0.25
|
|
5488
|
-
* @
|
|
5827
|
+
* @containerSupport Page | supported
|
|
5828
|
+
* @containerSupport Widget | unsupported
|
|
5489
5829
|
* @platformSupport Android | supported | 支持收起当前键盘。
|
|
5490
5830
|
* @platformSupport iOS | supported | 支持收起当前键盘。
|
|
5491
5831
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5514,7 +5854,8 @@ export declare interface HideKeyboardParam {
|
|
|
5514
5854
|
* ```
|
|
5515
5855
|
*
|
|
5516
5856
|
* @since 0.0.26
|
|
5517
|
-
* @
|
|
5857
|
+
* @containerSupport Page | supported
|
|
5858
|
+
* @containerSupport Widget | unsupported
|
|
5518
5859
|
* @platformSupport Android | supported | 支持隐藏当前 loading。
|
|
5519
5860
|
* @platformSupport iOS | supported | 支持隐藏当前 loading。
|
|
5520
5861
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5539,7 +5880,8 @@ export declare const hideLoading: (params?: HideInteractionParams | undefined) =
|
|
|
5539
5880
|
* ```
|
|
5540
5881
|
*
|
|
5541
5882
|
* @since 0.0.26
|
|
5542
|
-
* @
|
|
5883
|
+
* @containerSupport Page | supported
|
|
5884
|
+
* @containerSupport Widget | supported
|
|
5543
5885
|
* @platformSupport Android | supported | 支持隐藏当前 Toast。
|
|
5544
5886
|
* @platformSupport iOS | supported | 支持隐藏当前 Toast。
|
|
5545
5887
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5682,8 +6024,8 @@ export declare interface InnerAudioError {
|
|
|
5682
6024
|
*
|
|
5683
6025
|
* @returns 不包含字段的结果对象。
|
|
5684
6026
|
* @since 0.0.25
|
|
5685
|
-
* @
|
|
5686
|
-
* @
|
|
6027
|
+
* @containerSupport Page | supported
|
|
6028
|
+
* @containerSupport Widget | unsupported
|
|
5687
6029
|
* @platformSupport Android | supported | 支持查询设备配对状态
|
|
5688
6030
|
* @platformSupport iOS | unsupported | 豆包 iOS 未实现查询配对状态,调用返回不支持
|
|
5689
6031
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -5838,7 +6180,8 @@ export declare type LocationOperationResult = Record<string, never>;
|
|
|
5838
6180
|
* ```
|
|
5839
6181
|
*
|
|
5840
6182
|
* @since 0.0.19
|
|
5841
|
-
* @
|
|
6183
|
+
* @containerSupport Page | supported
|
|
6184
|
+
* @containerSupport Widget | supported
|
|
5842
6185
|
* @platformSupport Android | supported | 支持获取当前智能服务的一次性登录凭证。
|
|
5843
6186
|
* @platformSupport iOS | supported | 支持获取当前智能服务的一次性登录凭证。
|
|
5844
6187
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -5951,8 +6294,8 @@ export declare const LoginType: {
|
|
|
5951
6294
|
* ```
|
|
5952
6295
|
*
|
|
5953
6296
|
* @since 0.0.19
|
|
5954
|
-
* @
|
|
5955
|
-
* @
|
|
6297
|
+
* @containerSupport Page | supported
|
|
6298
|
+
* @containerSupport Widget | supported
|
|
5956
6299
|
* @platformSupport Android | supported | 支持拉起豆包登录或隐私授权流程。
|
|
5957
6300
|
* @platformSupport iOS | supported | 支持拉起豆包登录或隐私授权流程。
|
|
5958
6301
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -6016,8 +6359,8 @@ export declare interface LoginWithWidgetResult {
|
|
|
6016
6359
|
*
|
|
6017
6360
|
* @returns 不包含字段的结果对象。
|
|
6018
6361
|
* @since 0.0.25
|
|
6019
|
-
* @
|
|
6020
|
-
* @
|
|
6362
|
+
* @containerSupport Page | supported
|
|
6363
|
+
* @containerSupport Widget | unsupported
|
|
6021
6364
|
* @platformSupport Android | supported | 支持发起蓝牙配对
|
|
6022
6365
|
* @platformSupport iOS | unsupported | 豆包 iOS 未实现蓝牙配对,调用返回不支持
|
|
6023
6366
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6073,8 +6416,8 @@ export declare interface MakeBluetoothPairParams {
|
|
|
6073
6416
|
*
|
|
6074
6417
|
* @returns 不包含字段的结果对象。
|
|
6075
6418
|
* @since 0.0.19
|
|
6076
|
-
* @
|
|
6077
|
-
* @
|
|
6419
|
+
* @containerSupport Page | supported
|
|
6420
|
+
* @containerSupport Widget | supported
|
|
6078
6421
|
* @platformSupport Android | supported | 支持唤起系统拨号
|
|
6079
6422
|
* @platformSupport iOS | supported | 支持唤起系统拨号
|
|
6080
6423
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6167,7 +6510,8 @@ export declare interface MkdirParams {
|
|
|
6167
6510
|
* ```
|
|
6168
6511
|
*
|
|
6169
6512
|
* @since 0.0.19
|
|
6170
|
-
* @
|
|
6513
|
+
* @containerSupport Page | supported
|
|
6514
|
+
* @containerSupport Widget | unsupported
|
|
6171
6515
|
* @platformSupport Android | supported | 支持在页面栈内返回指定层数。
|
|
6172
6516
|
* @platformSupport iOS | supported | 支持在页面栈内返回指定层数。
|
|
6173
6517
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -6204,7 +6548,8 @@ export declare interface NavigateBackParams {
|
|
|
6204
6548
|
* ```
|
|
6205
6549
|
*
|
|
6206
6550
|
* @since 0.0.19
|
|
6207
|
-
* @
|
|
6551
|
+
* @containerSupport Page | supported
|
|
6552
|
+
* @containerSupport Widget | supported
|
|
6208
6553
|
* @platformSupport Android | supported | 支持在当前智能服务内跳转到指定页面。
|
|
6209
6554
|
* @platformSupport iOS | supported | 支持在当前智能服务内跳转到指定页面。
|
|
6210
6555
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -6295,7 +6640,8 @@ export declare type NotificationAuthorizationDetail = BasicAuthorizationDetail |
|
|
|
6295
6640
|
*
|
|
6296
6641
|
* @returns 不包含字段的结果对象。
|
|
6297
6642
|
* @since 0.0.25
|
|
6298
|
-
* @
|
|
6643
|
+
* @containerSupport Page | supported
|
|
6644
|
+
* @containerSupport Widget | unsupported
|
|
6299
6645
|
* @platformSupport Android | supported | 支持订阅 BLE 特征值变化
|
|
6300
6646
|
* @platformSupport iOS | supported | 支持订阅 BLE 特征值变化
|
|
6301
6647
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6355,7 +6701,8 @@ export declare interface NotifyBLECharacteristicValueChangeParams {
|
|
|
6355
6701
|
* off();
|
|
6356
6702
|
* ```
|
|
6357
6703
|
* @since 0.0.27
|
|
6358
|
-
* @
|
|
6704
|
+
* @containerSupport Page | supported
|
|
6705
|
+
* @containerSupport Widget | unsupported
|
|
6359
6706
|
* @platformSupport Android | supported | 支持监听加速度数据变化
|
|
6360
6707
|
* @platformSupport iOS | supported | 支持监听加速度数据变化
|
|
6361
6708
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6394,7 +6741,8 @@ export declare const onAccelerometerChange: ClientEventRegistry<AccelerometerCha
|
|
|
6394
6741
|
* off();
|
|
6395
6742
|
* ```
|
|
6396
6743
|
* @since 0.0.25
|
|
6397
|
-
* @
|
|
6744
|
+
* @containerSupport Page | supported
|
|
6745
|
+
* @containerSupport Widget | unsupported
|
|
6398
6746
|
* @platformSupport Android | supported | 支持监听省电模式变化
|
|
6399
6747
|
* @platformSupport iOS | supported | 支持监听省电模式变化
|
|
6400
6748
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6434,7 +6782,8 @@ export declare const onBatteryInfoChange: ClientEventRegistry<BatteryInfoChangeE
|
|
|
6434
6782
|
* ```
|
|
6435
6783
|
*
|
|
6436
6784
|
* @since 0.0.36
|
|
6437
|
-
* @
|
|
6785
|
+
* @containerSupport Page | supported
|
|
6786
|
+
* @containerSupport Widget | unsupported
|
|
6438
6787
|
* @platformSupport Android | supported | 支持监听 BLE 特征值变化
|
|
6439
6788
|
* @platformSupport iOS | supported | 支持监听 BLE 特征值变化
|
|
6440
6789
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6442,7 +6791,7 @@ export declare const onBatteryInfoChange: ClientEventRegistry<BatteryInfoChangeE
|
|
|
6442
6791
|
* @permission system | 蓝牙权限 | conditional | Android,iOS | 使用蓝牙能力需要系统蓝牙权限
|
|
6443
6792
|
* @authorizationBehavior All | 依赖 openBluetoothAdapter 阶段已获得的系统蓝牙权限;权限被拒绝或在系统设置中撤销后事件不再回调,需引导用户在系统设置中开启蓝牙权限
|
|
6444
6793
|
* @precondition All | 需先调用 readBLECharacteristicValue 读取或 notifyBLECharacteristicValueChange 开启订阅
|
|
6445
|
-
* @usageNote All |
|
|
6794
|
+
* @usageNote All | 读取结果与订阅通知都会从此事件回传,`value` 以 ArrayBuffer 返回
|
|
6446
6795
|
* @resultExample
|
|
6447
6796
|
* ```json
|
|
6448
6797
|
* {
|
|
@@ -6474,7 +6823,8 @@ export declare function onBLECharacteristicValueChange(callback: BLECharacterist
|
|
|
6474
6823
|
* ```
|
|
6475
6824
|
*
|
|
6476
6825
|
* @since 0.0.36
|
|
6477
|
-
* @
|
|
6826
|
+
* @containerSupport Page | supported
|
|
6827
|
+
* @containerSupport Widget | unsupported
|
|
6478
6828
|
* @platformSupport Android | supported | 支持监听 BLE 连接状态变化
|
|
6479
6829
|
* @platformSupport iOS | supported | 支持监听 BLE 连接状态变化
|
|
6480
6830
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6513,7 +6863,8 @@ export declare const onBLEConnectionStateChange: ClientEventRegistry<BLEConnecti
|
|
|
6513
6863
|
* ```
|
|
6514
6864
|
*
|
|
6515
6865
|
* @since 0.0.36
|
|
6516
|
-
* @
|
|
6866
|
+
* @containerSupport Page | supported
|
|
6867
|
+
* @containerSupport Widget | unsupported
|
|
6517
6868
|
* @platformSupport Android | supported | 支持监听蓝牙适配器状态变化
|
|
6518
6869
|
* @platformSupport iOS | supported | 支持监听蓝牙适配器状态变化
|
|
6519
6870
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6552,7 +6903,8 @@ export declare const onBluetoothAdapterStateChange: ClientEventRegistry<GetBluet
|
|
|
6552
6903
|
* ```
|
|
6553
6904
|
*
|
|
6554
6905
|
* @since 0.0.36
|
|
6555
|
-
* @
|
|
6906
|
+
* @containerSupport Page | supported
|
|
6907
|
+
* @containerSupport Widget | unsupported
|
|
6556
6908
|
* @platformSupport Android | supported | 支持监听发现蓝牙设备
|
|
6557
6909
|
* @platformSupport iOS | supported | 支持监听发现蓝牙设备
|
|
6558
6910
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6560,7 +6912,7 @@ export declare const onBluetoothAdapterStateChange: ClientEventRegistry<GetBluet
|
|
|
6560
6912
|
* @permission system | 蓝牙权限 | conditional | Android,iOS | 扫描附近蓝牙设备需要系统蓝牙权限,Android 低版本还需定位权限
|
|
6561
6913
|
* @authorizationBehavior All | 依赖 startBluetoothDevicesDiscovery 阶段已获得的系统蓝牙权限;权限被拒绝或在系统设置中撤销后事件不再回调,需引导用户在系统设置中开启蓝牙权限
|
|
6562
6914
|
* @precondition All | 需先调用 startBluetoothDevicesDiscovery 开始搜索
|
|
6563
|
-
* @usageNote All | advertisData 与 serviceData
|
|
6915
|
+
* @usageNote All | `advertisData` 与 `serviceData` 以 ArrayBuffer 返回
|
|
6564
6916
|
* @resultExample
|
|
6565
6917
|
* ```json
|
|
6566
6918
|
* {
|
|
@@ -6596,7 +6948,8 @@ export declare function onBluetoothDeviceFound(callback: BluetoothDeviceFoundLis
|
|
|
6596
6948
|
* off();
|
|
6597
6949
|
* ```
|
|
6598
6950
|
* @since 0.0.42
|
|
6599
|
-
* @
|
|
6951
|
+
* @containerSupport Page | supported
|
|
6952
|
+
* @containerSupport Widget | unsupported
|
|
6600
6953
|
* @platformSupport Android | supported | 支持监听对话框高度或展示状态变化。
|
|
6601
6954
|
* @platformSupport iOS | supported | 支持监听对话框高度或展示状态变化。
|
|
6602
6955
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -6633,7 +6986,8 @@ export declare const onChatPanelHeightChanged: ClientEventRegistry<ChatPanelInfo
|
|
|
6633
6986
|
* off();
|
|
6634
6987
|
* ```
|
|
6635
6988
|
* @since 0.0.26
|
|
6636
|
-
* @
|
|
6989
|
+
* @containerSupport Page | supported
|
|
6990
|
+
* @containerSupport Widget | unsupported
|
|
6637
6991
|
* @platformSupport Android | supported | 支持监听罗盘数据变化
|
|
6638
6992
|
* @platformSupport iOS | supported | 支持监听罗盘数据变化
|
|
6639
6993
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6669,7 +7023,8 @@ export declare const onCompassChange: ClientEventRegistry<CompassChangeEvent>;
|
|
|
6669
7023
|
* off();
|
|
6670
7024
|
* ```
|
|
6671
7025
|
* @since 0.0.29
|
|
6672
|
-
* @
|
|
7026
|
+
* @containerSupport Page | supported
|
|
7027
|
+
* @containerSupport Widget | unsupported
|
|
6673
7028
|
* @platformSupport Android | supported | 支持监听设备方向变化
|
|
6674
7029
|
* @platformSupport iOS | supported | 支持监听设备方向变化
|
|
6675
7030
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6707,7 +7062,8 @@ export declare const onDeviceMotionChange: ClientEventRegistry<DeviceMotionChang
|
|
|
6707
7062
|
* off();
|
|
6708
7063
|
* ```
|
|
6709
7064
|
* @since 0.0.27
|
|
6710
|
-
* @
|
|
7065
|
+
* @containerSupport Page | supported
|
|
7066
|
+
* @containerSupport Widget | unsupported
|
|
6711
7067
|
* @platformSupport Android | supported | 支持监听陀螺仪数据变化
|
|
6712
7068
|
* @platformSupport iOS | supported | 支持监听陀螺仪数据变化
|
|
6713
7069
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6743,8 +7099,8 @@ export declare const onGyroscopeChange: ClientEventRegistry<GyroscopeChangeEvent
|
|
|
6743
7099
|
* ```
|
|
6744
7100
|
*
|
|
6745
7101
|
* @since 0.0.20
|
|
6746
|
-
* @
|
|
6747
|
-
* @
|
|
7102
|
+
* @containerSupport Page | supported
|
|
7103
|
+
* @containerSupport Widget | unsupported
|
|
6748
7104
|
* @platformSupport Android | supported | 支持监听键盘高度变化。
|
|
6749
7105
|
* @platformSupport iOS | supported | 支持监听键盘高度变化。
|
|
6750
7106
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -6782,8 +7138,8 @@ export declare const onKeyboardHeightChange: ClientEventRegistry<KeyboardHeightC
|
|
|
6782
7138
|
* unsubscribe();
|
|
6783
7139
|
* ```
|
|
6784
7140
|
* @since 0.0.32
|
|
6785
|
-
* @
|
|
6786
|
-
* @
|
|
7141
|
+
* @containerSupport Page | supported
|
|
7142
|
+
* @containerSupport Widget | unsupported
|
|
6787
7143
|
* @platformSupport Android | supported | 支持监听位置变化事件
|
|
6788
7144
|
* @platformSupport iOS | supported | 支持监听位置变化事件
|
|
6789
7145
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6830,8 +7186,8 @@ export declare function onLocationChange(callback: LocationChangeListener): () =
|
|
|
6830
7186
|
* unsubscribe();
|
|
6831
7187
|
* ```
|
|
6832
7188
|
* @since 0.0.32
|
|
6833
|
-
* @
|
|
6834
|
-
* @
|
|
7189
|
+
* @containerSupport Page | supported
|
|
7190
|
+
* @containerSupport Widget | unsupported
|
|
6835
7191
|
* @platformSupport Android | supported | 支持监听位置更新异常事件
|
|
6836
7192
|
* @platformSupport iOS | supported | 支持监听位置更新异常事件
|
|
6837
7193
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6882,7 +7238,8 @@ export declare function onLocationChangeError(callback: LocationChangeErrorListe
|
|
|
6882
7238
|
* ```
|
|
6883
7239
|
*
|
|
6884
7240
|
* @since 0.0.26
|
|
6885
|
-
* @
|
|
7241
|
+
* @containerSupport Page | supported
|
|
7242
|
+
* @containerSupport Widget | unsupported
|
|
6886
7243
|
* @platformSupport Android | supported | 支持监听网络状态变化
|
|
6887
7244
|
* @platformSupport iOS | supported | 支持监听网络状态变化
|
|
6888
7245
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6923,8 +7280,8 @@ export declare const onNetworkStatusChange: ClientEventRegistry<NetworkStatusCha
|
|
|
6923
7280
|
* ```
|
|
6924
7281
|
*
|
|
6925
7282
|
* @since 0.0.32
|
|
6926
|
-
* @
|
|
6927
|
-
* @
|
|
7283
|
+
* @containerSupport Page | supported
|
|
7284
|
+
* @containerSupport Widget | supported
|
|
6928
7285
|
* @platformSupport Android | supported | 支持注册主题变化监听。
|
|
6929
7286
|
* @platformSupport iOS | supported | 支持注册主题变化监听。
|
|
6930
7287
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -6939,7 +7296,7 @@ export declare const onNetworkStatusChange: ClientEventRegistry<NetworkStatusCha
|
|
|
6939
7296
|
* }
|
|
6940
7297
|
* ```
|
|
6941
7298
|
* @errorCode none | - | - | Android,iOS | 该监听只接收成功的主题变化事件 | 无需处理
|
|
6942
|
-
* @platformNote Android |
|
|
7299
|
+
* @platformNote Android | 部分豆包 Android 版本可能不会触发主题变化事件
|
|
6943
7300
|
*
|
|
6944
7301
|
* @public
|
|
6945
7302
|
*/
|
|
@@ -6962,8 +7319,8 @@ export declare function onThemeChange(callback: ThemeChangeListener): () => void
|
|
|
6962
7319
|
* ```
|
|
6963
7320
|
*
|
|
6964
7321
|
* @since 0.0.26
|
|
6965
|
-
* @
|
|
6966
|
-
* @
|
|
7322
|
+
* @containerSupport Page | supported
|
|
7323
|
+
* @containerSupport Widget | unsupported
|
|
6967
7324
|
* @platformSupport Android | supported | 支持监听用户截屏
|
|
6968
7325
|
* @platformSupport iOS | supported | 支持监听用户截屏
|
|
6969
7326
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -6998,8 +7355,8 @@ export declare const onUserCaptureScreen: ClientEventRegistry<UserCaptureScreenE
|
|
|
6998
7355
|
* ```
|
|
6999
7356
|
*
|
|
7000
7357
|
* @since 0.0.37
|
|
7001
|
-
* @
|
|
7002
|
-
* @
|
|
7358
|
+
* @containerSupport Page | supported
|
|
7359
|
+
* @containerSupport Widget | unsupported
|
|
7003
7360
|
* @platformSupport Android | supported | 支持监听用户录屏(Android 15 及以上)
|
|
7004
7361
|
* @platformSupport iOS | supported | 支持监听用户录屏
|
|
7005
7362
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -7037,7 +7394,8 @@ export declare const onUserScreenRecord: ClientEventRegistry<UserScreenRecordEve
|
|
|
7037
7394
|
* ```
|
|
7038
7395
|
*
|
|
7039
7396
|
* @since 0.0.31
|
|
7040
|
-
* @
|
|
7397
|
+
* @containerSupport Page | supported
|
|
7398
|
+
* @containerSupport Widget | unsupported
|
|
7041
7399
|
* @platformSupport Android | supported | 支持监听 Wi-Fi 连接事件
|
|
7042
7400
|
* @platformSupport iOS | supported | 支持监听 Wi-Fi 连接事件
|
|
7043
7401
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -7074,7 +7432,8 @@ export declare const onWifiConnected: ClientEventRegistry<WifiConnectedEvent>;
|
|
|
7074
7432
|
*
|
|
7075
7433
|
* @returns 不包含字段的结果对象。
|
|
7076
7434
|
* @since 0.0.25
|
|
7077
|
-
* @
|
|
7435
|
+
* @containerSupport Page | supported
|
|
7436
|
+
* @containerSupport Widget | unsupported
|
|
7078
7437
|
* @platformSupport Android | supported | 支持打开蓝牙适配器
|
|
7079
7438
|
* @platformSupport iOS | supported | 支持打开蓝牙适配器
|
|
7080
7439
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -7117,8 +7476,6 @@ export declare const openBluetoothAdapter: (params?: {} | undefined) => Promise<
|
|
|
7117
7476
|
* ```
|
|
7118
7477
|
* @returns 不包含字段的结果对象。
|
|
7119
7478
|
* @since 0.0.32
|
|
7120
|
-
* @contractStatus conflict | 豆包 Android、iOS 当前均未实现地图位置页能力
|
|
7121
|
-
* @contractMismatch blocking | behavior | 地图位置页 | Android,iOS | 打开地图位置页并展示传入坐标 | 豆包 Android、iOS 均直接返回不支持 | 该 API 在豆包中无法成功打开地图位置页 | packages/open-api/src/location/location.ts; flow_android/business/applet/impl/src/main/java/com/bytedance/applet/impl/AppletHostLocationActionServiceImpl.kt; flow_ios/flow_iOS/Modules/FlowApplet/Sources/AIBridge/FlowAIBridgeService.swift | 完成豆包双端地图位置页实现后再开放文档
|
|
7122
7479
|
* @platformSupport Android | unsupported | 豆包当前未实现地图位置页能力
|
|
7123
7480
|
* @platformSupport iOS | unsupported | 豆包当前未实现地图位置页能力
|
|
7124
7481
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -7173,7 +7530,8 @@ export declare interface OpenLocationParams {
|
|
|
7173
7530
|
/**
|
|
7174
7531
|
* 打开应用内页面。
|
|
7175
7532
|
*
|
|
7176
|
-
*
|
|
7533
|
+
* 在主对话流卡片中调用时会重新打开全页并忽略 `mode`;在全页或全页内 Chat UI 的卡片中调用时按照
|
|
7534
|
+
* `mode` 操作页面栈。
|
|
7177
7535
|
*
|
|
7178
7536
|
* @param params 打开页面参数,字段见 {@link OpenPageParams}。
|
|
7179
7537
|
* @returns 无返回字段。
|
|
@@ -7187,29 +7545,64 @@ export declare interface OpenLocationParams {
|
|
|
7187
7545
|
* });
|
|
7188
7546
|
* ```
|
|
7189
7547
|
*
|
|
7190
|
-
* @since 0.0.
|
|
7191
|
-
* @
|
|
7192
|
-
* @
|
|
7193
|
-
* @contractMismatch blocking | platform | method registration | iOS | doubao.openPage 可按新版参数调用 | 当前只注册 applet.openPage,未注册新版 doubao.openPage | iOS 无法调用该 API | packages/open-api/src/router/open-page.ts; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Route/AIBridgeOpenPageMethod.swift; ai-sdk/ios/AISDK/Sources/Core/AISDK.swift | 注册独立的 doubao.openPage handler 并实现新版路由语义
|
|
7194
|
-
* @platformSupport Android | unsupported | 当前版本尚未提供新版 openPage 路由协议。
|
|
7195
|
-
* @platformSupport iOS | unsupported | 当前版本尚未提供新版 openPage 路由协议。
|
|
7548
|
+
* @since 0.0.43
|
|
7549
|
+
* @platformSupport Android | supported | 支持 push、replace、navigate 和 pop_to 页面栈操作。
|
|
7550
|
+
* @platformSupport iOS | supported | 支持 push、replace、navigate 和 pop_to 页面栈操作。
|
|
7196
7551
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
7197
7552
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
7198
7553
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
7199
7554
|
* @precondition All | 无额外前置条件
|
|
7200
|
-
* @usageNote All | mode 省略时按 push
|
|
7201
|
-
* @errorCode none | - | - | Android,iOS |
|
|
7555
|
+
* @usageNote All | mode 省略时按 push 处理;主对话流卡片中重新打开全页,全页及其 Chat UI 中应用页面栈操作。
|
|
7556
|
+
* @errorCode none | - | - | Android,iOS | 无 API 专属错误码 | 无需处理
|
|
7202
7557
|
*
|
|
7203
7558
|
* @public
|
|
7204
7559
|
*/
|
|
7205
7560
|
export declare const openPage: (params: OpenPageParams) => Promise<object>;
|
|
7206
7561
|
|
|
7562
|
+
/**
|
|
7563
|
+
* 在当前关联的主对话流中以半屏形式打开应用内页面。
|
|
7564
|
+
*
|
|
7565
|
+
* 调用后不会创建或操作全页页面栈。需要进入全页小程序或操作已有页面栈时,请使用 {@link openPage}。
|
|
7566
|
+
*
|
|
7567
|
+
* @param params 打开页面参数,字段见 {@link OpenPageInChatParams}。
|
|
7568
|
+
* @returns 无返回字段。
|
|
7569
|
+
* @example
|
|
7570
|
+
* ```typescript
|
|
7571
|
+
* import { openPageInChat } from '@doubao-dev/framework/api';
|
|
7572
|
+
*
|
|
7573
|
+
* await openPageInChat({
|
|
7574
|
+
* url: '/pages/detail/index?id=1'
|
|
7575
|
+
* });
|
|
7576
|
+
* ```
|
|
7577
|
+
*
|
|
7578
|
+
* @since 0.0.43
|
|
7579
|
+
* @containerSupport Page | supported
|
|
7580
|
+
* @containerSupport Widget | supported
|
|
7581
|
+
* @platformSupport Android | supported | 支持在当前关联的主对话流中以半屏形式打开应用内页面。
|
|
7582
|
+
* @platformSupport iOS | supported | 支持在当前关联的主对话流中以半屏形式打开应用内页面。
|
|
7583
|
+
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
7584
|
+
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
7585
|
+
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
7586
|
+
* @precondition All | 当前应用需要关联主对话流
|
|
7587
|
+
* @usageNote All | 不接受页面栈 mode;需要进入全页小程序或操作已有页面栈时使用 openPage。
|
|
7588
|
+
* @errorCode none | - | - | Android,iOS | 无 API 专属错误码 | 无需处理
|
|
7589
|
+
*
|
|
7590
|
+
* @public
|
|
7591
|
+
*/
|
|
7592
|
+
export declare const openPageInChat: (params: OpenPageInChatParams) => Promise<object>;
|
|
7593
|
+
|
|
7594
|
+
/** @public */
|
|
7595
|
+
export declare interface OpenPageInChatParams {
|
|
7596
|
+
/** 应用内页面路径,可携带查询参数。 */
|
|
7597
|
+
url: string;
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7207
7600
|
/**
|
|
7208
7601
|
* 打开页面时使用的页面栈操作。
|
|
7209
7602
|
*
|
|
7210
7603
|
* @public
|
|
7211
7604
|
*/
|
|
7212
|
-
export declare type OpenPageMode = 'push' | 'replace' | 'navigate' | '
|
|
7605
|
+
export declare type OpenPageMode = 'push' | 'replace' | 'navigate' | 'pop_to';
|
|
7213
7606
|
|
|
7214
7607
|
/** @public */
|
|
7215
7608
|
export declare interface OpenPageParams {
|
|
@@ -7221,7 +7614,7 @@ export declare interface OpenPageParams {
|
|
|
7221
7614
|
* - `push`:始终压入新的页面实例。
|
|
7222
7615
|
* - `replace`:目标为栈顶页面时更新栈顶页面,否则替换栈顶页面。
|
|
7223
7616
|
* - `navigate`:目标已在栈中时回退到最近的目标页面并更新,否则压入新页面。
|
|
7224
|
-
* - `
|
|
7617
|
+
* - `pop_to`:目标已在栈中时回退到最近的目标页面并更新,否则替换栈顶页面。
|
|
7225
7618
|
*
|
|
7226
7619
|
* @default 'push'
|
|
7227
7620
|
*/
|
|
@@ -7250,13 +7643,15 @@ export declare interface OpenPageParams {
|
|
|
7250
7643
|
* ```
|
|
7251
7644
|
*
|
|
7252
7645
|
* @since 0.0.39
|
|
7253
|
-
* @
|
|
7646
|
+
* @containerSupport Page | supported
|
|
7647
|
+
* @containerSupport Widget | supported
|
|
7254
7648
|
* @platformSupport Android | supported | 支持打开授权设置页并在关闭后返回最新授权设置。
|
|
7255
7649
|
* @platformSupport iOS | supported | 支持打开授权设置页并在关闭后返回最新授权设置。
|
|
7256
7650
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
7257
7651
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
7258
7652
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
7259
7653
|
* @precondition All | 无额外前置条件,不要求在用户点击事件中调用。
|
|
7654
|
+
* @usageNote All | 设置页只能修改当前智能服务的 scope,不承载 HealthKit 系统权限设置。
|
|
7260
7655
|
* @usageNote All | 豆包当前不支持订阅模板,不要传入 withSubscriptions: true。
|
|
7261
7656
|
* @resultExample
|
|
7262
7657
|
* ```json
|
|
@@ -7426,9 +7821,8 @@ export declare interface PluginAccountInfo {
|
|
|
7426
7821
|
* ```
|
|
7427
7822
|
*
|
|
7428
7823
|
* @since 0.0.19
|
|
7429
|
-
* @
|
|
7430
|
-
* @
|
|
7431
|
-
* @contractMismatch blocking | parameter | params.code | Android,iOS | code 声明为可选,仅在登录结果为 true 时有效 | result 为 true 时若 code 缺省或为空,双端均按失败处理(Android reject、iOS reject) | 调用方误以为成功回传可省略 code | packages/open-api/src/open/login/post-mcp-login.ts; ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge/method/login/PostLoginResultMethod.kt; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Auth/AppletPageLoginManager.swift | 将 code 约束为 result 为 true 时必填
|
|
7824
|
+
* @containerSupport Page | supported
|
|
7825
|
+
* @containerSupport Widget | supported
|
|
7432
7826
|
* @platformSupport Android | supported | 支持向豆包回传 MCP 授权登录结果。
|
|
7433
7827
|
* @platformSupport iOS | supported | 支持向豆包回传 MCP 授权登录结果。
|
|
7434
7828
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -7494,9 +7888,8 @@ export declare interface PostLoginResultRequest {
|
|
|
7494
7888
|
* });
|
|
7495
7889
|
* ```
|
|
7496
7890
|
* @since 0.0.26
|
|
7497
|
-
* @
|
|
7498
|
-
* @
|
|
7499
|
-
* @contractMismatch blocking | parameter | referrerPolicy | Android,iOS | 用 referrerPolicy 控制预览页的 Referrer 策略 | 调用时忽略 referrerPolicy,预览请求不会应用该策略 | 调用方配置的 Referrer 策略不生效 | packages/open-api/src/media/image.ts; ai-sdk/android/ai-sdk/build/api/com/bytedance/ai/bridge/media/image/AbsPreviewImageMethodIDL.kt; ai-sdk/ios/AISDK/Sources/JSBridge/IDL/Media/AbsPreviewImageMethodIDL.swift | 补齐参数透传与预览请求配置,或移除公开字段
|
|
7891
|
+
* @containerSupport Page | supported
|
|
7892
|
+
* @containerSupport Widget | supported
|
|
7500
7893
|
* @platformSupport Android | supported | 支持预览网络图片和豆包智能服务本地图片
|
|
7501
7894
|
* @platformSupport iOS | supported | 支持预览网络图片和豆包智能服务本地图片
|
|
7502
7895
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -7595,7 +7988,8 @@ export declare interface PrivacySettingResult {
|
|
|
7595
7988
|
*
|
|
7596
7989
|
* @returns 不包含字段的结果对象。
|
|
7597
7990
|
* @since 0.0.25
|
|
7598
|
-
* @
|
|
7991
|
+
* @containerSupport Page | supported
|
|
7992
|
+
* @containerSupport Widget | unsupported
|
|
7599
7993
|
* @platformSupport Android | supported | 支持读取 BLE 特征值
|
|
7600
7994
|
* @platformSupport iOS | supported | 支持读取 BLE 特征值
|
|
7601
7995
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -7856,7 +8250,8 @@ export declare type RecorderSampleRate = 8000 | 11025 | 12000 | 16000 | 22050 |
|
|
|
7856
8250
|
* ```
|
|
7857
8251
|
*
|
|
7858
8252
|
* @since 0.0.19
|
|
7859
|
-
* @
|
|
8253
|
+
* @containerSupport Page | supported
|
|
8254
|
+
* @containerSupport Widget | unsupported
|
|
7860
8255
|
* @platformSupport Android | supported | 支持关闭当前页面并跳转到指定页面。
|
|
7861
8256
|
* @platformSupport iOS | supported | 支持关闭当前页面并跳转到指定页面。
|
|
7862
8257
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -7891,7 +8286,8 @@ export declare const redirectTo: (params: NavigateToParams) => Promise<object>;
|
|
|
7891
8286
|
* ```
|
|
7892
8287
|
*
|
|
7893
8288
|
* @since 0.0.19
|
|
7894
|
-
* @
|
|
8289
|
+
* @containerSupport Page | supported
|
|
8290
|
+
* @containerSupport Widget | unsupported
|
|
7895
8291
|
* @platformSupport Android | supported | 支持关闭所有页面并跳转到指定页面。
|
|
7896
8292
|
* @platformSupport iOS | supported | 支持关闭所有页面并跳转到指定页面。
|
|
7897
8293
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -7972,7 +8368,8 @@ export declare interface RemoveSavedFileParams {
|
|
|
7972
8368
|
* ```
|
|
7973
8369
|
*
|
|
7974
8370
|
* @since 0.0.17
|
|
7975
|
-
* @
|
|
8371
|
+
* @containerSupport Page | supported
|
|
8372
|
+
* @containerSupport Widget | supported
|
|
7976
8373
|
* @platformSupport Android | supported | 支持按智能服务维度删除指定 key。
|
|
7977
8374
|
* @platformSupport iOS | supported | 支持按智能服务维度删除指定 key。
|
|
7978
8375
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8014,7 +8411,8 @@ export declare interface RemoveStorageParams {
|
|
|
8014
8411
|
* ```
|
|
8015
8412
|
*
|
|
8016
8413
|
* @since 0.0.19
|
|
8017
|
-
* @
|
|
8414
|
+
* @containerSupport Page | supported
|
|
8415
|
+
* @containerSupport Widget | supported
|
|
8018
8416
|
* @platformSupport Android | supported | 支持按智能服务维度同步删除指定 key。
|
|
8019
8417
|
* @platformSupport iOS | supported | 支持按智能服务维度同步删除指定 key。
|
|
8020
8418
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8076,7 +8474,8 @@ export declare interface RenameParams {
|
|
|
8076
8474
|
* ```
|
|
8077
8475
|
*
|
|
8078
8476
|
* @since 0.0.28
|
|
8079
|
-
* @
|
|
8477
|
+
* @containerSupport Page | supported
|
|
8478
|
+
* @containerSupport Widget | supported
|
|
8080
8479
|
* @platformSupport Android | supported | 支持上报智能服务数据分析事件。
|
|
8081
8480
|
* @platformSupport iOS | supported | 支持上报智能服务数据分析事件。
|
|
8082
8481
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8128,9 +8527,8 @@ export declare interface ReportEventParams {
|
|
|
8128
8527
|
* ```
|
|
8129
8528
|
*
|
|
8130
8529
|
* @since 0.0.17
|
|
8131
|
-
* @
|
|
8132
|
-
* @
|
|
8133
|
-
* @contractMismatch blocking | return | RequestResponse.data | Android,iOS | dataType 传入 arraybuffer 时声明返回 ArrayBuffer | Android 将二进制响应以 base64 字符串返回;iOS doubao.request 路径不启用 arraybuffer 支持,返回 base64 编码字符串 | 调用方按 ArrayBuffer 解析会失败 | packages/open-api/src/network/request.ts; ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge/method/net/RequestMethod.kt; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Network/AIBridgeRequestMethod.swift | 统一双端 arraybuffer 返回语义,或在文档说明实际返回 base64 字符串
|
|
8530
|
+
* @containerSupport Page | supported
|
|
8531
|
+
* @containerSupport Widget | supported
|
|
8134
8532
|
* @platformSupport Android | supported | 支持发起 HTTP/HTTPS 网络请求,method 支持 GET/POST/PUT/DELETE。
|
|
8135
8533
|
* @platformSupport iOS | supported | 支持发起 HTTP/HTTPS 网络请求,method 仅支持 GET/POST。
|
|
8136
8534
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8201,7 +8599,8 @@ export declare type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' |
|
|
|
8201
8599
|
* ```
|
|
8202
8600
|
*
|
|
8203
8601
|
* @since 0.0.28
|
|
8204
|
-
* @
|
|
8602
|
+
* @containerSupport Page | supported
|
|
8603
|
+
* @containerSupport Widget | supported
|
|
8205
8604
|
* @platformSupport Android | supported | 支持发起订单支付流程并返回 orderId。
|
|
8206
8605
|
* @platformSupport iOS | supported | 支持发起订单支付流程并返回 orderId。
|
|
8207
8606
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8387,7 +8786,8 @@ export declare interface SaveFileResult {
|
|
|
8387
8786
|
* });
|
|
8388
8787
|
* ```
|
|
8389
8788
|
* @since 0.0.26
|
|
8390
|
-
* @
|
|
8789
|
+
* @containerSupport Page | supported
|
|
8790
|
+
* @containerSupport Widget | unsupported
|
|
8391
8791
|
* @platformSupport Android | supported | 支持将本地图片保存到系统相册
|
|
8392
8792
|
* @platformSupport iOS | supported | 支持将本地图片保存到系统相册
|
|
8393
8793
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -8432,9 +8832,8 @@ export declare interface SaveImageToPhotosAlbumParams {
|
|
|
8432
8832
|
* ```
|
|
8433
8833
|
*
|
|
8434
8834
|
* @since 0.0.25
|
|
8435
|
-
* @
|
|
8436
|
-
* @
|
|
8437
|
-
* @contractMismatch non-blocking | behavior | 用户取消 | Android,iOS | 用户取消扫码时的返回未在公开类型体现 | 双端在用户取消时的失败表现不一致 | 调用方需分别处理双端的取消结果 | ai-sdk/android/ai-sdk/src/main/java/com/bytedance/ai/bridge/method/device/AIBridgeScanMethods.kt; ai-sdk/ios/AISDK/Sources/JSBridge/Methods/Device/AIBridgeScanMethods.swift | 统一取消扫码的返回语义
|
|
8835
|
+
* @containerSupport Page | supported
|
|
8836
|
+
* @containerSupport Widget | supported
|
|
8438
8837
|
* @platformSupport Android | supported | 支持调起扫码
|
|
8439
8838
|
* @platformSupport iOS | supported | 支持调起扫码
|
|
8440
8839
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -8461,7 +8860,7 @@ export declare interface SaveImageToPhotosAlbumParams {
|
|
|
8461
8860
|
* }
|
|
8462
8861
|
* ```
|
|
8463
8862
|
* @errorCode common | 102 | Android,iOS
|
|
8464
|
-
* @errorCode errNo | 103 | feature not support | Android,iOS |
|
|
8863
|
+
* @errorCode errNo | 103 | feature not support | Android,iOS | 当前豆包版本不支持扫码 | 升级至支持扫码能力的豆包版本后重试。
|
|
8465
8864
|
* @errorCode errNo | 112 | invalid result | iOS | 扫码成功但未返回可用的扫码结果数据 | 稍后重试;持续失败时反馈扫码结果异常。
|
|
8466
8865
|
*
|
|
8467
8866
|
* @public
|
|
@@ -8522,7 +8921,7 @@ export declare type ScanCodeType = 'barCode' | 'qrCode' | 'datamatrix' | 'pdf417
|
|
|
8522
8921
|
export declare type ScanResultType = 'QR_CODE' | 'AZTEC' | 'CODABAR' | 'CODE_39' | 'CODE_93' | 'CODE_128' | 'DATA_MATRIX' | 'EAN_8' | 'EAN_13' | 'ITF' | 'MAXICODE' | 'PDF_417' | 'RSS_14' | 'RSS_EXPANDED' | 'UPC_A' | 'UPC_E' | 'UPC_EAN_EXTENSION' | 'WX_CODE' | 'CODE_25';
|
|
8523
8922
|
|
|
8524
8923
|
/** @public */
|
|
8525
|
-
export declare type Scope = 'scope.userLocation' | 'scope.userFuzzyLocation' | 'scope.userLocationBackground' | 'scope.payment' | 'scope.record' | 'scope.bluetooth' | 'scope.camera' | 'scope.addPhoneContact' | 'scope.addPhoneCalendar';
|
|
8924
|
+
export declare type Scope = 'scope.userLocation' | 'scope.userFuzzyLocation' | 'scope.userLocationBackground' | 'scope.payment' | 'scope.record' | 'scope.bluetooth' | 'scope.camera' | 'scope.addPhoneContact' | 'scope.addPhoneCalendar' | 'scope.healthData';
|
|
8526
8925
|
|
|
8527
8926
|
/**
|
|
8528
8927
|
* 选择消息文件后返回的文件类型。
|
|
@@ -8566,7 +8965,8 @@ export declare type SelectedMessageFileType = 'video' | 'image' | 'file';
|
|
|
8566
8965
|
* ```
|
|
8567
8966
|
*
|
|
8568
8967
|
* @since 0.0.37
|
|
8569
|
-
* @
|
|
8968
|
+
* @containerSupport Page | supported
|
|
8969
|
+
* @containerSupport Widget | supported
|
|
8570
8970
|
* @platformSupport Android | supported | 支持在卡片或智能服务页面中发送后续消息。
|
|
8571
8971
|
* @platformSupport iOS | supported | 支持在卡片和智能服务页面中发送后续消息。
|
|
8572
8972
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8614,7 +9014,6 @@ export declare interface SendFollowUpMessageParams {
|
|
|
8614
9014
|
* ```
|
|
8615
9015
|
*
|
|
8616
9016
|
* @since 0.0.9
|
|
8617
|
-
* @contractStatus verified | 公开定义与 Android、iOS 的成功、失败路径一致。
|
|
8618
9017
|
* @platformSupport Android | supported | 支持以用户身份发送文本消息。
|
|
8619
9018
|
* @platformSupport iOS | supported | 支持以用户身份发送文本消息。
|
|
8620
9019
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8652,8 +9051,8 @@ export declare interface SendQueryMessageParams {
|
|
|
8652
9051
|
* ```
|
|
8653
9052
|
*
|
|
8654
9053
|
* @since 0.0.25
|
|
8655
|
-
* @
|
|
8656
|
-
* @
|
|
9054
|
+
* @containerSupport Page | supported
|
|
9055
|
+
* @containerSupport Widget | supported
|
|
8657
9056
|
* @platformSupport Android | supported | 支持拉起系统短信面板
|
|
8658
9057
|
* @platformSupport iOS | supported | 支持拉起系统短信面板
|
|
8659
9058
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -8727,7 +9126,6 @@ export declare type SensorInterval = 'game' | 'ui' | 'normal';
|
|
|
8727
9126
|
* ```
|
|
8728
9127
|
*
|
|
8729
9128
|
* @since 0.0.9
|
|
8730
|
-
* @contractStatus verified | 公开定义与 Android、iOS 的成功、失败路径一致。
|
|
8731
9129
|
* @platformSupport Android | supported | 支持设置全局上下文。
|
|
8732
9130
|
* @platformSupport iOS | supported | 支持设置全局上下文。
|
|
8733
9131
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8781,8 +9179,8 @@ export declare interface SetAdditionalContextParams {
|
|
|
8781
9179
|
* ```
|
|
8782
9180
|
*
|
|
8783
9181
|
* @since 0.0.25
|
|
8784
|
-
* @
|
|
8785
|
-
* @
|
|
9182
|
+
* @containerSupport Page | supported
|
|
9183
|
+
* @containerSupport Widget | unsupported
|
|
8786
9184
|
* @platformSupport Android | supported | 支持设置 BLE MTU
|
|
8787
9185
|
* @platformSupport iOS | unsupported | 豆包 iOS 未实现设置 MTU,调用返回不支持
|
|
8788
9186
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -8840,7 +9238,8 @@ export declare interface SetBLEMTUResult {
|
|
|
8840
9238
|
*
|
|
8841
9239
|
* @returns 不包含字段的结果对象。
|
|
8842
9240
|
* @since 0.0.20
|
|
8843
|
-
* @
|
|
9241
|
+
* @containerSupport Page | supported
|
|
9242
|
+
* @containerSupport Widget | supported
|
|
8844
9243
|
* @platformSupport Android | supported | 支持写入剪贴板
|
|
8845
9244
|
* @platformSupport iOS | supported | 支持写入剪贴板
|
|
8846
9245
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -8861,7 +9260,7 @@ export declare interface SetBLEMTUResult {
|
|
|
8861
9260
|
* }
|
|
8862
9261
|
* ```
|
|
8863
9262
|
* @errorCode common | 102 | Android,iOS
|
|
8864
|
-
* @errorCode errNo | 103 | feature not support | Android,iOS |
|
|
9263
|
+
* @errorCode errNo | 103 | feature not support | Android,iOS | 当前豆包版本不支持写入剪贴板 | 升级至支持剪贴板能力的豆包版本后重试。
|
|
8865
9264
|
* @errorCode errNo | 106 | system permission denied | Android | 写入后系统未授予剪贴板访问权限,写入未生效 | 引导用户在系统设置中开启剪贴板相关权限后重试。
|
|
8866
9265
|
*
|
|
8867
9266
|
* @public
|
|
@@ -8886,8 +9285,8 @@ export declare interface SetClipboardDataParams {
|
|
|
8886
9285
|
*
|
|
8887
9286
|
* @returns 不包含字段的结果对象。
|
|
8888
9287
|
* @since 0.0.25
|
|
8889
|
-
* @
|
|
8890
|
-
* @
|
|
9288
|
+
* @containerSupport Page | supported
|
|
9289
|
+
* @containerSupport Widget | unsupported
|
|
8891
9290
|
* @platformSupport Android | supported | 支持设置屏幕常亮
|
|
8892
9291
|
* @platformSupport iOS | supported | 支持设置屏幕常亮
|
|
8893
9292
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -8933,7 +9332,8 @@ export declare interface SetKeepScreenOnParams {
|
|
|
8933
9332
|
* ```
|
|
8934
9333
|
*
|
|
8935
9334
|
* @since 0.0.17
|
|
8936
|
-
* @
|
|
9335
|
+
* @containerSupport Page | supported
|
|
9336
|
+
* @containerSupport Widget | supported
|
|
8937
9337
|
* @platformSupport Android | supported | 支持按智能服务维度写入本地缓存。
|
|
8938
9338
|
* @platformSupport iOS | supported | 支持按智能服务维度写入本地缓存。
|
|
8939
9339
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -8982,7 +9382,8 @@ export declare interface SetStorageParams<TData = unknown> {
|
|
|
8982
9382
|
* ```
|
|
8983
9383
|
*
|
|
8984
9384
|
* @since 0.0.19
|
|
8985
|
-
* @
|
|
9385
|
+
* @containerSupport Page | supported
|
|
9386
|
+
* @containerSupport Widget | supported
|
|
8986
9387
|
* @platformSupport Android | supported | 支持按智能服务维度同步写入本地缓存。
|
|
8987
9388
|
* @platformSupport iOS | supported | 支持按智能服务维度同步写入本地缓存。
|
|
8988
9389
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -9024,8 +9425,8 @@ export declare function setStorageSync<TData = unknown>(params: SetStorageParams
|
|
|
9024
9425
|
* @returns 不包含字段的结果对象。
|
|
9025
9426
|
*
|
|
9026
9427
|
* @since 0.0.25
|
|
9027
|
-
* @
|
|
9028
|
-
* @
|
|
9428
|
+
* @containerSupport Page | supported
|
|
9429
|
+
* @containerSupport Widget | unsupported
|
|
9029
9430
|
* @platformSupport Android | unsupported | 豆包 Android 未实现设置预设列表,调用固定失败
|
|
9030
9431
|
* @platformSupport iOS | supported | 支持设置 Wi-Fi 预设列表
|
|
9031
9432
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -9078,7 +9479,8 @@ export declare interface SetWifiListParams {
|
|
|
9078
9479
|
* ```
|
|
9079
9480
|
*
|
|
9080
9481
|
* @since 0.0.26
|
|
9081
|
-
* @
|
|
9482
|
+
* @containerSupport Page | supported
|
|
9483
|
+
* @containerSupport Widget | supported
|
|
9082
9484
|
* @platformSupport Android | supported | 支持展示操作菜单。
|
|
9083
9485
|
* @platformSupport iOS | supported | 支持展示操作菜单。
|
|
9084
9486
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -9139,11 +9541,11 @@ export declare interface ShowActionSheetResult {
|
|
|
9139
9541
|
}
|
|
9140
9542
|
|
|
9141
9543
|
/**
|
|
9142
|
-
*
|
|
9544
|
+
* 显示豆包底部弹窗。
|
|
9143
9545
|
*
|
|
9144
9546
|
* @remarks
|
|
9145
|
-
* `content` 接收受限 HTML
|
|
9146
|
-
*
|
|
9547
|
+
* `content` 接收受限 HTML 字符串,当前支持段落、加粗和链接;危险标签、事件属性和危险链接协议会被拦截。
|
|
9548
|
+
* 链接会在豆包内打开,不会关闭弹窗。
|
|
9147
9549
|
* Promise 在用户点击按钮或点击蒙层关闭后 resolve。
|
|
9148
9550
|
*
|
|
9149
9551
|
* @example
|
|
@@ -9166,10 +9568,10 @@ export declare interface ShowActionSheetResult {
|
|
|
9166
9568
|
* ```
|
|
9167
9569
|
*
|
|
9168
9570
|
* @since 0.0.36
|
|
9169
|
-
* @
|
|
9170
|
-
* @
|
|
9171
|
-
* @platformSupport Android | supported |
|
|
9172
|
-
* @platformSupport iOS | supported |
|
|
9571
|
+
* @containerSupport Page | supported
|
|
9572
|
+
* @containerSupport Widget | supported
|
|
9573
|
+
* @platformSupport Android | supported | 支持展示豆包底部弹窗。
|
|
9574
|
+
* @platformSupport iOS | supported | 支持展示豆包底部弹窗。
|
|
9173
9575
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
9174
9576
|
* @platformSupport HarmonyOS | unsupported | 当前未提供该平台实现。
|
|
9175
9577
|
* @permission none | - | none | Android,iOS | 无需额外权限
|
|
@@ -9191,8 +9593,8 @@ export declare interface ShowActionSheetResult {
|
|
|
9191
9593
|
* }
|
|
9192
9594
|
* ```
|
|
9193
9595
|
* @errorCode errNo | 104 | invalid parameter | Android,iOS | title 或 content 为空、content 含被拦截的标签/事件属性/危险链接、buttons 数量不在 1-3 范围;iOS 还会在按钮语义重复或按钮文案为空时返回 | 修正参数后重试。
|
|
9194
|
-
* @errorCode errNo | 103 | feature not support | iOS |
|
|
9195
|
-
* @platformNote iOS |
|
|
9596
|
+
* @errorCode errNo | 103 | feature not support | iOS | 豆包 iOS 无法展示底部弹窗,或不支持包含 3 个按钮的弹窗 | 降级到自定义弹窗;同场景 Android 返回 action=cancel、source=hostUnavailable 的成功结果,请一并做降级处理。
|
|
9597
|
+
* @platformNote iOS | 无法展示底部弹窗或不支持三按钮时返回 errNo 103 失败;Android 无法展示底部弹窗时返回 action=cancel、source=hostUnavailable 的成功结果,且不校验三按钮能力。
|
|
9196
9598
|
*
|
|
9197
9599
|
* @public
|
|
9198
9600
|
*/
|
|
@@ -9238,7 +9640,8 @@ export declare type ShowBottomSheetResult = BottomSheetButtonClickResult | Botto
|
|
|
9238
9640
|
* ```
|
|
9239
9641
|
*
|
|
9240
9642
|
* @since 0.0.26
|
|
9241
|
-
* @
|
|
9643
|
+
* @containerSupport Page | supported
|
|
9644
|
+
* @containerSupport Widget | unsupported
|
|
9242
9645
|
* @platformSupport Android | supported | 支持展示 loading 提示框。
|
|
9243
9646
|
* @platformSupport iOS | supported | 支持展示 loading 提示框。
|
|
9244
9647
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -9280,7 +9683,8 @@ export declare interface ShowLoadingParams {
|
|
|
9280
9683
|
* ```
|
|
9281
9684
|
*
|
|
9282
9685
|
* @since 0.0.26
|
|
9283
|
-
* @
|
|
9686
|
+
* @containerSupport Page | supported
|
|
9687
|
+
* @containerSupport Widget | supported
|
|
9284
9688
|
* @platformSupport Android | supported | 支持展示模态对话框。
|
|
9285
9689
|
* @platformSupport iOS | supported | 支持展示模态对话框。
|
|
9286
9690
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -9404,8 +9808,8 @@ export declare interface ShowModalResult {
|
|
|
9404
9808
|
* ```
|
|
9405
9809
|
*
|
|
9406
9810
|
* @since 0.0.9
|
|
9407
|
-
* @
|
|
9408
|
-
* @
|
|
9811
|
+
* @containerSupport Page | supported
|
|
9812
|
+
* @containerSupport Widget | supported
|
|
9409
9813
|
* @platformSupport Android | supported | 支持展示 Toast 提示。
|
|
9410
9814
|
* @platformSupport iOS | supported | 支持展示 Toast 提示。
|
|
9411
9815
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -9494,8 +9898,8 @@ export declare interface ShowToastParams {
|
|
|
9494
9898
|
* ```
|
|
9495
9899
|
*
|
|
9496
9900
|
* @since 0.0.28
|
|
9497
|
-
* @
|
|
9498
|
-
* @
|
|
9901
|
+
* @containerSupport Page | supported
|
|
9902
|
+
* @containerSupport Widget | supported
|
|
9499
9903
|
* @platformSupport Android | supported | 支持拉起签约流程。
|
|
9500
9904
|
* @platformSupport iOS | supported | 支持拉起签约流程。
|
|
9501
9905
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -9628,7 +10032,7 @@ export declare interface SocketTask {
|
|
|
9628
10032
|
* 监听 WebSocket 与服务器连接断开的事件。
|
|
9629
10033
|
*
|
|
9630
10034
|
* 主动关闭、服务端关闭、连接被回收都可能触发该回调。
|
|
9631
|
-
*
|
|
10035
|
+
* 回调触发后当前任务已经结束,不应继续使用。
|
|
9632
10036
|
*/
|
|
9633
10037
|
onClose: (callback: (event: SocketTaskCloseEvent) => void) => void;
|
|
9634
10038
|
/**
|
|
@@ -9641,7 +10045,7 @@ export declare interface SocketTask {
|
|
|
9641
10045
|
/**
|
|
9642
10046
|
* 监听 WebSocket 发生错误的事件。
|
|
9643
10047
|
*
|
|
9644
|
-
*
|
|
10048
|
+
* 连接创建、发送、关闭或 WebSocket 通道出现异常时触发。
|
|
9645
10049
|
* 该回调只表示发生错误,不等同于连接一定已经关闭;是否关闭应结合 `readyState`
|
|
9646
10050
|
* 或后续 `onClose` 事件判断。
|
|
9647
10051
|
*/
|
|
@@ -9678,13 +10082,13 @@ export declare interface SocketTaskCloseEvent {
|
|
|
9678
10082
|
/**
|
|
9679
10083
|
* 当前连接使用的网络传输层协议。
|
|
9680
10084
|
*
|
|
9681
|
-
*
|
|
10085
|
+
* 豆包无法获取时不返回该字段。
|
|
9682
10086
|
*/
|
|
9683
10087
|
protocolType?: string;
|
|
9684
10088
|
/**
|
|
9685
|
-
*
|
|
10089
|
+
* 当前连接使用的 WebSocket 组件类型。
|
|
9686
10090
|
*
|
|
9687
|
-
*
|
|
10091
|
+
* 具体值因客户端平台而异;豆包无法获取时不返回该字段。
|
|
9688
10092
|
*/
|
|
9689
10093
|
socketType?: string;
|
|
9690
10094
|
}
|
|
@@ -9718,7 +10122,7 @@ export declare interface SocketTaskCloseParams {
|
|
|
9718
10122
|
/**
|
|
9719
10123
|
* WebSocket 错误事件。
|
|
9720
10124
|
*
|
|
9721
|
-
*
|
|
10125
|
+
* 连接创建失败、发送失败、主动关闭失败、WebSocket 通道异常等错误都会通过该事件通知。
|
|
9722
10126
|
* 如果错误发生在连接创建阶段,`readyState` 会变为 `undefined` 或 `SocketTask.CLOSED`。
|
|
9723
10127
|
*
|
|
9724
10128
|
* @public
|
|
@@ -9727,7 +10131,7 @@ export declare interface SocketTaskErrorEvent {
|
|
|
9727
10131
|
/**
|
|
9728
10132
|
* 错误信息。
|
|
9729
10133
|
*
|
|
9730
|
-
*
|
|
10134
|
+
* 描述参数校验、数据编码或 WebSocket 操作的失败原因,可直接用于日志上报。
|
|
9731
10135
|
*/
|
|
9732
10136
|
errMsg: string;
|
|
9733
10137
|
}
|
|
@@ -9747,19 +10151,19 @@ export declare interface SocketTaskMessageEvent {
|
|
|
9747
10151
|
* - 文本消息返回 `string`;
|
|
9748
10152
|
* - 二进制消息返回 `ArrayBuffer`。
|
|
9749
10153
|
*
|
|
9750
|
-
*
|
|
10154
|
+
* 豆包无法将二进制消息转换为 `ArrayBuffer` 时,内容会保持字符串形式。
|
|
9751
10155
|
*/
|
|
9752
10156
|
data: string | ArrayBuffer;
|
|
9753
10157
|
/**
|
|
9754
10158
|
* 当前消息所属连接使用的协议。
|
|
9755
10159
|
*
|
|
9756
|
-
*
|
|
10160
|
+
* 豆包无法获取时不返回该字段。
|
|
9757
10161
|
*/
|
|
9758
10162
|
protocolType?: string;
|
|
9759
10163
|
/**
|
|
9760
|
-
*
|
|
10164
|
+
* 当前连接使用的 WebSocket 组件类型。
|
|
9761
10165
|
*
|
|
9762
|
-
*
|
|
10166
|
+
* 具体值因客户端平台而异;豆包无法获取时不返回该字段。
|
|
9763
10167
|
*/
|
|
9764
10168
|
socketType?: string;
|
|
9765
10169
|
}
|
|
@@ -9783,14 +10187,13 @@ export declare interface SocketTaskOpenEvent {
|
|
|
9783
10187
|
/**
|
|
9784
10188
|
* 当前连接使用的网络传输层协议。
|
|
9785
10189
|
*
|
|
9786
|
-
*
|
|
10190
|
+
* 豆包无法获取时不返回该字段。
|
|
9787
10191
|
*/
|
|
9788
10192
|
protocolType?: string;
|
|
9789
10193
|
/**
|
|
9790
|
-
*
|
|
10194
|
+
* 当前连接使用的 WebSocket 组件类型。
|
|
9791
10195
|
*
|
|
9792
|
-
*
|
|
9793
|
-
* 部分运行环境可能不提供。
|
|
10196
|
+
* 具体值因客户端平台而异;豆包无法获取时不返回该字段。
|
|
9794
10197
|
*/
|
|
9795
10198
|
socketType?: string;
|
|
9796
10199
|
}
|
|
@@ -9799,7 +10202,7 @@ export declare interface SocketTaskOpenEvent {
|
|
|
9799
10202
|
* {@link SocketTask.send} 的参数。
|
|
9800
10203
|
*
|
|
9801
10204
|
* `send` 只负责向已打开的 WebSocket 连接写入一条消息,不返回 Promise。
|
|
9802
|
-
*
|
|
10205
|
+
* 发送失败、连接未就绪或 WebSocket 通道异常时,会通过同一个 `SocketTask` 的 `onError` 回调通知。
|
|
9803
10206
|
*
|
|
9804
10207
|
* @public
|
|
9805
10208
|
*/
|
|
@@ -9808,7 +10211,7 @@ export declare interface SocketTaskSendParams {
|
|
|
9808
10211
|
* 需要发送给服务端的数据。
|
|
9809
10212
|
*
|
|
9810
10213
|
* - 传入 `string` 时按文本消息发送;
|
|
9811
|
-
* - 传入 `ArrayBuffer`
|
|
10214
|
+
* - 传入 `ArrayBuffer` 时按二进制消息发送。
|
|
9812
10215
|
*
|
|
9813
10216
|
* 建议只在 `onOpen` 回调触发后调用 `send`,此时 `readyState` 通常为 `SocketTask.OPEN`。
|
|
9814
10217
|
*/
|
|
@@ -9828,7 +10231,8 @@ export declare interface SocketTaskSendParams {
|
|
|
9828
10231
|
* ```
|
|
9829
10232
|
* @returns 不包含字段的结果对象。
|
|
9830
10233
|
* @since 0.0.25
|
|
9831
|
-
* @
|
|
10234
|
+
* @containerSupport Page | supported
|
|
10235
|
+
* @containerSupport Widget | unsupported
|
|
9832
10236
|
* @platformSupport Android | supported | 支持开始监听加速度
|
|
9833
10237
|
* @platformSupport iOS | supported | 支持开始监听加速度
|
|
9834
10238
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -9882,8 +10286,8 @@ export declare interface StartAccelerometerParams {
|
|
|
9882
10286
|
* ```
|
|
9883
10287
|
* @returns 不包含字段的结果对象。
|
|
9884
10288
|
* @since 0.0.25
|
|
9885
|
-
* @
|
|
9886
|
-
* @
|
|
10289
|
+
* @containerSupport Page | supported
|
|
10290
|
+
* @containerSupport Widget | unsupported
|
|
9887
10291
|
* @platformSupport Android | supported | 支持搜索附近的 iBeacon
|
|
9888
10292
|
* @platformSupport iOS | supported | 支持搜索附近的 iBeacon
|
|
9889
10293
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -9947,7 +10351,8 @@ export declare interface StartBeaconDiscoveryParams {
|
|
|
9947
10351
|
*
|
|
9948
10352
|
* @returns 不包含字段的结果对象。
|
|
9949
10353
|
* @since 0.0.25
|
|
9950
|
-
* @
|
|
10354
|
+
* @containerSupport Page | supported
|
|
10355
|
+
* @containerSupport Widget | unsupported
|
|
9951
10356
|
* @platformSupport Android | supported | 支持搜索附近蓝牙设备
|
|
9952
10357
|
* @platformSupport iOS | supported | 支持搜索附近蓝牙设备
|
|
9953
10358
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10015,8 +10420,8 @@ export declare interface StartBluetoothDevicesDiscoveryParams {
|
|
|
10015
10420
|
* ```
|
|
10016
10421
|
* @returns 不包含字段的结果对象。
|
|
10017
10422
|
* @since 0.0.25
|
|
10018
|
-
* @
|
|
10019
|
-
* @
|
|
10423
|
+
* @containerSupport Page | supported
|
|
10424
|
+
* @containerSupport Widget | unsupported
|
|
10020
10425
|
* @platformSupport Android | supported | 支持开始监听罗盘
|
|
10021
10426
|
* @platformSupport iOS | supported | 支持开始监听罗盘
|
|
10022
10427
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10055,7 +10460,8 @@ export declare const startCompass: (params?: {} | undefined) => Promise<object>;
|
|
|
10055
10460
|
* ```
|
|
10056
10461
|
* @returns 不包含字段的结果对象。
|
|
10057
10462
|
* @since 0.0.25
|
|
10058
|
-
* @
|
|
10463
|
+
* @containerSupport Page | supported
|
|
10464
|
+
* @containerSupport Widget | unsupported
|
|
10059
10465
|
* @platformSupport Android | supported | 支持开始监听设备方向变化
|
|
10060
10466
|
* @platformSupport iOS | supported | 支持开始监听设备方向变化
|
|
10061
10467
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10109,7 +10515,8 @@ export declare interface StartDeviceMotionListeningParams {
|
|
|
10109
10515
|
* ```
|
|
10110
10516
|
* @returns 不包含字段的结果对象。
|
|
10111
10517
|
* @since 0.0.25
|
|
10112
|
-
* @
|
|
10518
|
+
* @containerSupport Page | supported
|
|
10519
|
+
* @containerSupport Widget | unsupported
|
|
10113
10520
|
* @platformSupport Android | supported | 支持开始监听陀螺仪
|
|
10114
10521
|
* @platformSupport iOS | supported | 支持开始监听陀螺仪
|
|
10115
10522
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10163,8 +10570,8 @@ export declare interface StartGyroscopeParams {
|
|
|
10163
10570
|
* ```
|
|
10164
10571
|
* @returns 不包含字段的结果对象。
|
|
10165
10572
|
* @since 0.0.32
|
|
10166
|
-
* @
|
|
10167
|
-
* @
|
|
10573
|
+
* @containerSupport Page | supported
|
|
10574
|
+
* @containerSupport Widget | unsupported
|
|
10168
10575
|
* @platformSupport Android | supported | 支持启动持续定位
|
|
10169
10576
|
* @platformSupport iOS | supported | 支持启动持续定位
|
|
10170
10577
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10230,7 +10637,8 @@ export declare interface StartLocationUpdateParams {
|
|
|
10230
10637
|
* @returns 不包含字段的结果对象。
|
|
10231
10638
|
*
|
|
10232
10639
|
* @since 0.0.25
|
|
10233
|
-
* @
|
|
10640
|
+
* @containerSupport Page | supported
|
|
10641
|
+
* @containerSupport Widget | unsupported
|
|
10234
10642
|
* @platformSupport Android | supported | 支持初始化 Wi-Fi 模块
|
|
10235
10643
|
* @platformSupport iOS | supported | 支持初始化 Wi-Fi 模块
|
|
10236
10644
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10299,7 +10707,8 @@ export declare interface StatResult {
|
|
|
10299
10707
|
* ```
|
|
10300
10708
|
* @returns 不包含字段的结果对象。
|
|
10301
10709
|
* @since 0.0.25
|
|
10302
|
-
* @
|
|
10710
|
+
* @containerSupport Page | supported
|
|
10711
|
+
* @containerSupport Widget | unsupported
|
|
10303
10712
|
* @platformSupport Android | supported | 支持停止监听加速度
|
|
10304
10713
|
* @platformSupport iOS | supported | 支持停止监听加速度
|
|
10305
10714
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10328,8 +10737,8 @@ export declare const stopAccelerometer: (params?: {} | undefined) => Promise<obj
|
|
|
10328
10737
|
* ```
|
|
10329
10738
|
* @returns 不包含字段的结果对象。
|
|
10330
10739
|
* @since 0.0.25
|
|
10331
|
-
* @
|
|
10332
|
-
* @
|
|
10740
|
+
* @containerSupport Page | supported
|
|
10741
|
+
* @containerSupport Widget | unsupported
|
|
10333
10742
|
* @platformSupport Android | supported | 支持停止搜索 iBeacon
|
|
10334
10743
|
* @platformSupport iOS | supported | 支持停止搜索 iBeacon
|
|
10335
10744
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10370,7 +10779,8 @@ export declare const stopBeaconDiscovery: (params?: {} | undefined) => Promise<o
|
|
|
10370
10779
|
*
|
|
10371
10780
|
* @returns 不包含字段的结果对象。
|
|
10372
10781
|
* @since 0.0.25
|
|
10373
|
-
* @
|
|
10782
|
+
* @containerSupport Page | supported
|
|
10783
|
+
* @containerSupport Widget | unsupported
|
|
10374
10784
|
* @platformSupport Android | supported | 支持停止搜索蓝牙设备
|
|
10375
10785
|
* @platformSupport iOS | supported | 支持停止搜索蓝牙设备
|
|
10376
10786
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10401,7 +10811,8 @@ export declare const stopBluetoothDevicesDiscovery: (params?: {} | undefined) =>
|
|
|
10401
10811
|
* ```
|
|
10402
10812
|
* @returns 不包含字段的结果对象。
|
|
10403
10813
|
* @since 0.0.25
|
|
10404
|
-
* @
|
|
10814
|
+
* @containerSupport Page | supported
|
|
10815
|
+
* @containerSupport Widget | unsupported
|
|
10405
10816
|
* @platformSupport Android | supported | 支持停止监听罗盘
|
|
10406
10817
|
* @platformSupport iOS | supported | 支持停止监听罗盘
|
|
10407
10818
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10430,7 +10841,8 @@ export declare const stopCompass: (params?: {} | undefined) => Promise<object>;
|
|
|
10430
10841
|
* ```
|
|
10431
10842
|
* @returns 不包含字段的结果对象。
|
|
10432
10843
|
* @since 0.0.25
|
|
10433
|
-
* @
|
|
10844
|
+
* @containerSupport Page | supported
|
|
10845
|
+
* @containerSupport Widget | unsupported
|
|
10434
10846
|
* @platformSupport Android | supported | 支持停止监听设备方向变化
|
|
10435
10847
|
* @platformSupport iOS | supported | 支持停止监听设备方向变化
|
|
10436
10848
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10459,7 +10871,8 @@ export declare const stopDeviceMotionListening: (params?: {} | undefined) => Pro
|
|
|
10459
10871
|
* ```
|
|
10460
10872
|
* @returns 不包含字段的结果对象。
|
|
10461
10873
|
* @since 0.0.25
|
|
10462
|
-
* @
|
|
10874
|
+
* @containerSupport Page | supported
|
|
10875
|
+
* @containerSupport Widget | unsupported
|
|
10463
10876
|
* @platformSupport Android | supported | 支持停止监听陀螺仪
|
|
10464
10877
|
* @platformSupport iOS | supported | 支持停止监听陀螺仪
|
|
10465
10878
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10488,7 +10901,8 @@ export declare const stopGyroscope: (params?: {} | undefined) => Promise<object>
|
|
|
10488
10901
|
* ```
|
|
10489
10902
|
* @returns 不包含字段的结果对象。
|
|
10490
10903
|
* @since 0.0.32
|
|
10491
|
-
* @
|
|
10904
|
+
* @containerSupport Page | supported
|
|
10905
|
+
* @containerSupport Widget | unsupported
|
|
10492
10906
|
* @platformSupport Android | supported | 支持停止持续定位
|
|
10493
10907
|
* @platformSupport iOS | supported | 支持停止持续定位
|
|
10494
10908
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10528,7 +10942,8 @@ export declare function stopLocationUpdate(): Promise<LocationOperationResult>;
|
|
|
10528
10942
|
* @returns 不包含字段的结果对象。
|
|
10529
10943
|
*
|
|
10530
10944
|
* @since 0.0.25
|
|
10531
|
-
* @
|
|
10945
|
+
* @containerSupport Page | supported
|
|
10946
|
+
* @containerSupport Widget | unsupported
|
|
10532
10947
|
* @platformSupport Android | supported | 支持关闭 Wi-Fi 模块
|
|
10533
10948
|
* @platformSupport iOS | supported | 支持关闭 Wi-Fi 模块
|
|
10534
10949
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -10619,7 +11034,7 @@ export declare interface TaskActionParams {
|
|
|
10619
11034
|
}
|
|
10620
11035
|
|
|
10621
11036
|
/**
|
|
10622
|
-
*
|
|
11037
|
+
* 任务详情。传入对象时会自动序列化为 JSON 字符串。
|
|
10623
11038
|
*
|
|
10624
11039
|
* @public
|
|
10625
11040
|
*/
|
|
@@ -10794,7 +11209,8 @@ export declare interface UnzipParams {
|
|
|
10794
11209
|
* ```
|
|
10795
11210
|
*
|
|
10796
11211
|
* @since 0.0.26
|
|
10797
|
-
* @
|
|
11212
|
+
* @containerSupport Page | supported
|
|
11213
|
+
* @containerSupport Widget | supported
|
|
10798
11214
|
* @platformSupport Android | supported | 支持向 Agent 捐赠模型上下文。
|
|
10799
11215
|
* @platformSupport iOS | supported | 支持向 Agent 捐赠模型上下文。
|
|
10800
11216
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -10867,7 +11283,8 @@ export declare interface UpdateModelContextParams {
|
|
|
10867
11283
|
* ```
|
|
10868
11284
|
*
|
|
10869
11285
|
* @since 0.0.26
|
|
10870
|
-
* @
|
|
11286
|
+
* @containerSupport Page | supported
|
|
11287
|
+
* @containerSupport Widget | supported
|
|
10871
11288
|
* @platformSupport Android | supported | 支持更新 Widget 卡片实例的渲染数据。
|
|
10872
11289
|
* @platformSupport iOS | supported | 支持更新 Widget 卡片实例的渲染数据。
|
|
10873
11290
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -10955,7 +11372,8 @@ export declare interface UpdateWidgetParams {
|
|
|
10955
11372
|
* ```
|
|
10956
11373
|
*
|
|
10957
11374
|
* @since 0.0.39
|
|
10958
|
-
* @
|
|
11375
|
+
* @containerSupport Page | supported
|
|
11376
|
+
* @containerSupport Widget | unsupported
|
|
10959
11377
|
* @platformSupport Android | supported | 支持文件上传、进度监听、响应头监听和中断任务。
|
|
10960
11378
|
* @platformSupport iOS | supported | 支持文件上传、进度监听、响应头监听和中断任务。
|
|
10961
11379
|
* @platformSupport PC | unsupported | 当前未提供该平台实现。
|
|
@@ -11027,7 +11445,7 @@ export declare interface UploadFileParams {
|
|
|
11027
11445
|
*/
|
|
11028
11446
|
timeout?: number;
|
|
11029
11447
|
/**
|
|
11030
|
-
* 是否返回网络 profile
|
|
11448
|
+
* 是否返回网络 profile。豆包当前仅支持 false。
|
|
11031
11449
|
*
|
|
11032
11450
|
* @default false
|
|
11033
11451
|
*/
|
|
@@ -11161,8 +11579,8 @@ export declare type UserScreenRecordState = 'start' | 'stop';
|
|
|
11161
11579
|
*
|
|
11162
11580
|
* @returns 不包含字段的结果对象。
|
|
11163
11581
|
* @since 0.0.25
|
|
11164
|
-
* @
|
|
11165
|
-
* @
|
|
11582
|
+
* @containerSupport Page | supported
|
|
11583
|
+
* @containerSupport Widget | supported
|
|
11166
11584
|
* @platformSupport Android | supported | 支持长震动
|
|
11167
11585
|
* @platformSupport iOS | supported | 支持长震动
|
|
11168
11586
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -11201,8 +11619,8 @@ export declare const vibrateLong: (params?: {} | undefined) => Promise<object>;
|
|
|
11201
11619
|
*
|
|
11202
11620
|
* @returns 不包含字段的结果对象。
|
|
11203
11621
|
* @since 0.0.25
|
|
11204
|
-
* @
|
|
11205
|
-
* @
|
|
11622
|
+
* @containerSupport Page | supported
|
|
11623
|
+
* @containerSupport Widget | supported
|
|
11206
11624
|
* @platformSupport Android | supported | 支持短震动
|
|
11207
11625
|
* @platformSupport iOS | supported | 支持短震动
|
|
11208
11626
|
* @platformSupport PC | unsupported | 暂不支持
|
|
@@ -11347,7 +11765,8 @@ export declare interface WindowSafeArea {
|
|
|
11347
11765
|
*
|
|
11348
11766
|
* @returns 不包含字段的结果对象。
|
|
11349
11767
|
* @since 0.0.25
|
|
11350
|
-
* @
|
|
11768
|
+
* @containerSupport Page | supported
|
|
11769
|
+
* @containerSupport Widget | unsupported
|
|
11351
11770
|
* @platformSupport Android | supported | 支持写入 BLE 特征值
|
|
11352
11771
|
* @platformSupport iOS | supported | 支持写入 BLE 特征值
|
|
11353
11772
|
* @platformSupport PC | unsupported | 暂不支持
|