deeke-script-app 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/@deekeScript/@type/Class/Global.d.ts +1 -1
  3. package/@deekeScript/@type/Class/Rect.d.ts +16 -16
  4. package/@deekeScript/@type/Class/UiSelector.d.ts +201 -201
  5. package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
  6. package/@deekeScript/@type/interface/Access.d.ts +104 -104
  7. package/@deekeScript/@type/interface/App.d.ts +101 -101
  8. package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
  9. package/@deekeScript/@type/interface/Device.d.ts +88 -88
  10. package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
  11. package/@deekeScript/@type/interface/Engines.d.ts +39 -39
  12. package/@deekeScript/@type/interface/Files.d.ts +283 -283
  13. package/@deekeScript/@type/interface/FloatDialogs.d.ts +41 -41
  14. package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
  15. package/@deekeScript/@type/interface/Hid.d.ts +342 -342
  16. package/@deekeScript/@type/interface/Http.d.ts +94 -43
  17. package/@deekeScript/@type/interface/Images.d.ts +71 -71
  18. package/@deekeScript/@type/interface/Java.d.ts +7 -7
  19. package/@deekeScript/@type/interface/KeyBoards.d.ts +27 -27
  20. package/@deekeScript/@type/interface/Log.d.ts +16 -16
  21. package/@deekeScript/@type/interface/MediaStore.d.ts +146 -146
  22. package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
  23. package/@deekeScript/@type/interface/SocketIOClient.d.ts +76 -76
  24. package/@deekeScript/@type/interface/Storage.d.ts +119 -119
  25. package/@deekeScript/@type/interface/System.d.ts +114 -114
  26. package/@deekeScript/@type/interface/UiObject.d.ts +197 -197
  27. package/README.md +67 -67
  28. package/deekeScript.json +670 -669
  29. package/deekeScript.schema.json +492 -0
  30. package/deekeScriptZipBuild +48 -48
  31. package/gulpfile +17 -17
  32. package/images/test/statistics.png +0 -0
  33. package/init +32 -32
  34. package/jsconfig.json +11 -11
  35. package/package.json +44 -43
  36. package/script/statistics/statistics.js +120 -120
  37. package/script/task.html +4 -4
  38. package/src/statistics/statistics.js +120 -120
  39. package/src/task/douyin_zan.js +89 -89
  40. package/src/task/dy.js +14 -14
  41. package/src/task/dyApp.js +7 -7
  42. package/src/task/tool.js +19 -19
  43. package/src/task.html +4 -4
  44. package/test.json +67 -0
  45. package/uglify-config.json +15 -15
  46. package/update-types.js +118 -0
@@ -1,43 +1,94 @@
1
- declare global {
2
- var Http: Http;
3
- }
4
-
5
- interface Http {
6
- /**
7
- * post请求
8
- * @param url 请求地址
9
- * @param json 请求内容
10
- * @param headers 请求头n的请求头,如:{"Content-Type":"application/json"}
11
- */
12
- public post(url: string, json: object, headers?: object): string | null;
13
-
14
- /**
15
- * get请求
16
- * @param url 请求地址
17
- * @param headers 请求头
18
- */
19
- public get(url: string, headers: object): string | null;
20
-
21
- /**
22
- *
23
- * @param url 请求地址
24
- * @param files
25
- * @param params
26
- * @param httpCallback
27
- */
28
- public postFile(url: string, files: Files[], params: object, httpCallback: {
29
- success: (response: any) => void,
30
- fail: (response: any) => void
31
- }): void;
32
-
33
-
34
- /**
35
- * 下载文件
36
- * @param url 下载链接
37
- * @param destPath 保存路径(含文件名称)
38
- * @param headers 请求头
39
- */
40
- public download(url: string, destPath: string, headers?: object): string | null;
41
- }
42
-
43
- export { };
1
+ declare global {
2
+ var Http: Http;
3
+ }
4
+
5
+ interface Http {
6
+ /**
7
+ * post请求
8
+ * @param url 请求地址
9
+ * @param json 请求内容
10
+ * @param headers 请求头n的请求头,如:{"Content-Type":"application/json"}
11
+ */
12
+ public post(url: string, json: object, headers?: object): string | null;
13
+
14
+ /**
15
+ * get请求
16
+ * @param url 请求地址
17
+ * @param headers 请求头
18
+ */
19
+ public get(url: string, headers: object): string | null;
20
+
21
+ /**
22
+ *
23
+ * @param url 请求地址
24
+ * @param files
25
+ * @param params
26
+ * @param httpCallback
27
+ */
28
+ public postFile(url: string, files: string[], params: object, httpCallback: {
29
+ success: (response: any) => void,
30
+ fail: (response: any) => void
31
+ }): void;
32
+
33
+
34
+ /**
35
+ * 下载文件
36
+ * @param url 下载链接
37
+ * @param destPath 保存路径(含文件名称)
38
+ * @param headers 请求头
39
+ */
40
+ public download(url: string, destPath: string, headers?: object): string | null;
41
+
42
+ /**
43
+ * 设置连接超时时间
44
+ * @param seconds 超时时间(秒),默认10秒
45
+ */
46
+ public setConnectTimeout(seconds: number): void;
47
+
48
+ /**
49
+ * 设置读取超时时间
50
+ * @param seconds 超时时间(秒),默认30秒
51
+ */
52
+ public setReadTimeout(seconds: number): void;
53
+
54
+ /**
55
+ * 设置写入超时时间
56
+ * @param seconds 超时时间(秒),默认30秒
57
+ */
58
+ public setWriteTimeout(seconds: number): void;
59
+
60
+ /**
61
+ * 设置所有超时时间
62
+ * @param connectSeconds 连接超时时间(秒)
63
+ * @param readSeconds 读取超时时间(秒)
64
+ * @param writeSeconds 写入超时时间(秒)
65
+ */
66
+ public setTimeout(connectSeconds: number, readSeconds: number, writeSeconds: number): void;
67
+
68
+ /**
69
+ * 设置所有超时时间为相同的值
70
+ * @param seconds 超时时间(秒),将应用于连接、读取和写入
71
+ */
72
+ public setTimeout(seconds: number): void;
73
+
74
+ /**
75
+ * 流式POST请求(支持Server-Sent Events等流式输出)
76
+ * @param url 请求URL
77
+ * @param json 请求体JSON对象
78
+ * @param headers 请求头(可选)
79
+ * @param onData 数据回调函数,每收到一行数据时调用,参数为数据字符串
80
+ * @param onError 错误回调函数,发生错误时调用,参数为错误信息
81
+ */
82
+ public postStream(url: string, json: object, headers: object, onData: (data: string) => void, onError: (error: string) => void): void;
83
+
84
+ /**
85
+ * 流式POST请求(支持Server-Sent Events等流式输出)
86
+ * @param url 请求URL
87
+ * @param json 请求体JSON对象
88
+ * @param onData 数据回调函数,每收到一行数据时调用,参数为数据字符串
89
+ * @param onError 错误回调函数,发生错误时调用,参数为错误信息
90
+ */
91
+ public postStream(url: string, json: object, onData: (data: string) => void, onError: (error: string) => void): void;
92
+ }
93
+
94
+ export { };
@@ -1,71 +1,71 @@
1
- declare global {
2
- var Images: Images;
3
- }
4
-
5
- interface Mat {
6
- }
7
-
8
- interface Point {
9
- x: number;
10
- y: number;
11
- }
12
-
13
- interface TextAndRegion {
14
- text: string;
15
- rect: Rect;
16
- }
17
-
18
- interface Images {
19
- public getMat(imageFile: string): Mat;
20
-
21
- public findOne(source: Mat, template: Mat, threshold: number): Point;
22
-
23
- public find(source: Mat, template: Mat, threshold: number): Point[];
24
-
25
- public capture(): string;
26
-
27
- public getColor(imageFile: string, pixelX: number, pixelY: number): string;
28
-
29
- public findColor(imageFile: string, color: string): Point[];
30
-
31
- public findColor(imageFile: string, startColor: string, endColor: string): Point[];
32
-
33
- public crop(imageFile: string, left: number, top: number, width: number, height: number): string;
34
-
35
- /**
36
- *
37
- * @param imageFile 图片文件路径
38
- * @param multiple 缩放倍数
39
- * @throws Error 当参数非法时或者图片文件不存在时抛出异常
40
- */
41
- public scale(imageFile: string, multiple: number): string;
42
-
43
- /**
44
- * 返回图片的文本和区域
45
- * @param imageFile 图片文件路径
46
- * @throws Error 当图像识别失败或参数非法时
47
- */
48
- public getTextAndRegion(imageFile: string): TextAndRegion[];
49
-
50
- /**
51
- * 查找文本位置
52
- * @param imageFile 图片文件路径
53
- * @param keyword 查找的文本
54
- * @throws Error 当图像识别失败或参数非法时
55
- */
56
- public findTextPosition(imageFile: string, keyword: string): Rect[];
57
-
58
- /**
59
- * 在指定区域内查找文本。
60
- * @param imageFile 图片文件路径
61
- * @param left 区域左边界
62
- * @param top 区域上边界
63
- * @param width 区域宽度
64
- * @param height 区域高度
65
- * @returns 识别出的文本数组
66
- * @throws Error 当图像识别失败或参数非法时
67
- */
68
- public findTextInRegion(imageFile: string, left: number, top: number, width: number, height: number): string[];
69
- }
70
-
71
- export { };
1
+ declare global {
2
+ var Images: Images;
3
+ }
4
+
5
+ interface Mat {
6
+ }
7
+
8
+ interface Point {
9
+ x: number;
10
+ y: number;
11
+ }
12
+
13
+ interface TextAndRegion {
14
+ text: string;
15
+ rect: Rect;
16
+ }
17
+
18
+ interface Images {
19
+ public getMat(imageFile: string): Mat;
20
+
21
+ public findOne(source: Mat, template: Mat, threshold: number): Point;
22
+
23
+ public find(source: Mat, template: Mat, threshold: number): Point[];
24
+
25
+ public capture(): string;
26
+
27
+ public getColor(imageFile: string, pixelX: number, pixelY: number): string;
28
+
29
+ public findColor(imageFile: string, color: string): Point[];
30
+
31
+ public findColor(imageFile: string, startColor: string, endColor: string): Point[];
32
+
33
+ public crop(imageFile: string, left: number, top: number, width: number, height: number): string;
34
+
35
+ /**
36
+ *
37
+ * @param imageFile 图片文件路径
38
+ * @param multiple 缩放倍数
39
+ * @throws Error 当参数非法时或者图片文件不存在时抛出异常
40
+ */
41
+ public scale(imageFile: string, multiple: number): string;
42
+
43
+ /**
44
+ * 返回图片的文本和区域
45
+ * @param imageFile 图片文件路径
46
+ * @throws Error 当图像识别失败或参数非法时
47
+ */
48
+ public getTextAndRegion(imageFile: string): TextAndRegion[];
49
+
50
+ /**
51
+ * 查找文本位置
52
+ * @param imageFile 图片文件路径
53
+ * @param keyword 查找的文本
54
+ * @throws Error 当图像识别失败或参数非法时
55
+ */
56
+ public findTextPosition(imageFile: string, keyword: string): Rect[];
57
+
58
+ /**
59
+ * 在指定区域内查找文本。
60
+ * @param imageFile 图片文件路径
61
+ * @param left 区域左边界
62
+ * @param top 区域上边界
63
+ * @param width 区域宽度
64
+ * @param height 区域高度
65
+ * @returns 识别出的文本数组
66
+ * @throws Error 当图像识别失败或参数非法时
67
+ */
68
+ public findTextInRegion(imageFile: string, left: number, top: number, width: number, height: number): string[];
69
+ }
70
+
71
+ export { };
@@ -1,7 +1,7 @@
1
- declare global {
2
- var java: any;
3
- var Packages: any;
4
- function JavaImporter(...packages: any[]): any;
5
- }
6
-
7
- export { };
1
+ declare global {
2
+ var java: any;
3
+ var Packages: any;
4
+ function JavaImporter(...packages: any[]): any;
5
+ }
6
+
7
+ export { };
@@ -1,27 +1,27 @@
1
- global {
2
- var KeyBoards: KeyBoards;
3
- }
4
-
5
- interface KeyBoards {
6
- /**
7
- * DeekeScript输入法是否启用(未设置为默认,也返回true,但是此时不能输入和删除)
8
- */
9
- public isEnabled(): boolean;
10
-
11
- /**
12
- * 判断DeekeScript输入法是否设置为默认,是的话,则可以使用输入和删除方法
13
- */
14
- public canInput():boolean;
15
-
16
- /**
17
- * 往文本框追加字符串
18
- */
19
- public input(str: string): boolean;
20
-
21
- /**
22
- * 删除文本框最后一个字符
23
- */
24
- public delete():boolean;
25
- }
26
-
27
- export { };
1
+ global {
2
+ var KeyBoards: KeyBoards;
3
+ }
4
+
5
+ interface KeyBoards {
6
+ /**
7
+ * DeekeScript输入法是否启用(未设置为默认,也返回true,但是此时不能输入和删除)
8
+ */
9
+ public isEnabled(): boolean;
10
+
11
+ /**
12
+ * 判断DeekeScript输入法是否设置为默认,是的话,则可以使用输入和删除方法
13
+ */
14
+ public canInput():boolean;
15
+
16
+ /**
17
+ * 往文本框追加字符串
18
+ */
19
+ public input(str: string): boolean;
20
+
21
+ /**
22
+ * 删除文本框最后一个字符
23
+ */
24
+ public delete():boolean;
25
+ }
26
+
27
+ export { };
@@ -1,16 +1,16 @@
1
- global {
2
- var Log: log;
3
- }
4
-
5
- interface log {
6
- /**
7
- * 全局设置日志输出文件
8
- */
9
- public setFile(filename: string): boolean;
10
- /**
11
- * 输出日志内容
12
- */
13
- public log(...obj: object): void;
14
- }
15
-
16
- export { };
1
+ global {
2
+ var Log: log;
3
+ }
4
+
5
+ interface log {
6
+ /**
7
+ * 全局设置日志输出文件
8
+ */
9
+ public setFile(filename: string): boolean;
10
+ /**
11
+ * 输出日志内容
12
+ */
13
+ public log(...obj: object): void;
14
+ }
15
+
16
+ export { };
@@ -1,146 +1,146 @@
1
- declare global {
2
- var MediaStore: MediaStore;
3
- }
4
-
5
- /**
6
- * MediaStore 媒体库操作类
7
- * 用于操作 Android 系统相册、下载、文档等媒体文件
8
- */
9
- interface MediaStore {
10
- // ==================== 图片操作 ====================
11
-
12
- /**
13
- * 获取相册中的所有图片
14
- * @return JavaScript 数组,包含图片信息对象 {id, name, path, uri, size, date}
15
- */
16
- public getImages(): any[];
17
-
18
- /**
19
- * 保存图片到相册
20
- * @param sourcePath 源图片路径
21
- * @param displayName 显示名称(可选)
22
- * @param relativePath 相对路径(可选,如 "Pictures/MyApp")
23
- * @return 保存后的 content:// Uri 字符串,失败返回 null
24
- */
25
- public saveImage(sourcePath: string, displayName?: string, relativePath?: string): string | null;
26
-
27
- /**
28
- * 保存图片到相册(使用默认配置)
29
- * @param sourcePath 源图片路径
30
- * @return 保存后的 content:// Uri 字符串
31
- */
32
- public saveImage(sourcePath: string): string | null;
33
-
34
- /**
35
- * 删除图片
36
- * @param uriString content:// Uri 字符串
37
- * @return 删除成功返回 true
38
- */
39
- public deleteImage(uriString: string): boolean;
40
-
41
- // ==================== 视频操作 ====================
42
-
43
- /**
44
- * 获取相册中的所有视频
45
- * @return JavaScript 数组,包含视频信息对象 {id, name, path, uri, size, duration, date}
46
- */
47
- public getVideos(): any[];
48
-
49
- /**
50
- * 保存视频到相册
51
- * @param sourcePath 源视频路径
52
- * @param displayName 显示名称(可选)
53
- * @param relativePath 相对路径(可选)
54
- * @return 保存后的 content:// Uri 字符串,失败返回 null
55
- */
56
- public saveVideo(sourcePath: string, displayName?: string, relativePath?: string): string | null;
57
-
58
- /**
59
- * 保存视频到相册(使用默认配置)
60
- * @param sourcePath 源视频路径
61
- * @return 保存后的 content:// Uri 字符串
62
- */
63
- public saveVideo(sourcePath: string): string | null;
64
-
65
- /**
66
- * 删除视频
67
- * @param uriString content:// Uri 字符串
68
- * @return 删除成功返回 true
69
- */
70
- public deleteVideo(uriString: string): boolean;
71
-
72
- // ==================== 音频操作 ====================
73
-
74
- /**
75
- * 获取所有音频文件
76
- * @return JavaScript 数组,包含音频信息对象 {id, name, path, uri, size, duration, artist, album}
77
- */
78
- public getAudios(): any[];
79
-
80
- /**
81
- * 保存音频文件
82
- * @param sourcePath 源文件路径
83
- * @param displayName 显示名称(可选)
84
- * @return 保存后的 content:// Uri 字符串,失败返回 null
85
- */
86
- public saveAudio(sourcePath: string, displayName?: string): string | null;
87
-
88
- // ==================== 下载文件操作 ====================
89
-
90
- /**
91
- * 保存文件到下载目录
92
- * @param sourcePath 源文件路径
93
- * @param displayName 显示名称(可选)
94
- * @return 保存后的 content:// Uri 字符串(Android 10+)或文件路径(Android 9-),失败返回 null
95
- */
96
- public saveToDownloads(sourcePath: string, displayName?: string): string | null;
97
-
98
- /**
99
- * 获取下载目录的所有文件
100
- * API 29+ 使用 MediaStore,API 26-28 使用文件系统
101
- * @return JavaScript 数组,包含文件信息对象 {id, name, uri, size, date} 或 {name, path, uri, size, date}
102
- */
103
- public getDownloads(): any[];
104
-
105
- // ==================== 文档操作 ====================
106
-
107
- /**
108
- * 保存文档文件到文档目录
109
- * @param sourcePath 源文件路径
110
- * @param displayName 显示名称(可选)
111
- * @return 保存后的 content:// Uri 字符串(Android 10+)或文件路径(Android 9-),失败返回 null
112
- */
113
- public saveToDocuments(sourcePath: string, displayName?: string): string | null;
114
-
115
- /**
116
- * 保存文档文件到文档目录(使用默认名称)
117
- * @param sourcePath 源文件路径
118
- * @return 保存后的 content:// Uri 字符串或文件路径
119
- */
120
- public saveToDocuments(sourcePath: string): string | null;
121
-
122
- /**
123
- * 获取文档目录的所有文件
124
- * @return JavaScript 数组,包含文件信息对象 {id, name, uri, size, date, mimeType} 或 {name, path, uri, size, date}
125
- */
126
- public getDocuments(): any[];
127
-
128
- // ==================== 通用操作 ====================
129
-
130
- /**
131
- * 从 URI 读取文件内容
132
- * @param uriString content:// Uri 字符串
133
- * @return 文件内容字节数组,失败返回 null
134
- */
135
- public readFromUri(uriString: string): number[] | null;
136
-
137
- /**
138
- * 查询媒体文件信息
139
- * @param uriString content:// Uri 字符串
140
- * @return JavaScript 对象,包含文件信息 {name, size, mimeType}
141
- */
142
- public queryMediaInfo(uriString: string): any;
143
- }
144
-
145
- export { };
146
-
1
+ declare global {
2
+ var MediaStore: MediaStore;
3
+ }
4
+
5
+ /**
6
+ * MediaStore 媒体库操作类
7
+ * 用于操作 Android 系统相册、下载、文档等媒体文件
8
+ */
9
+ interface MediaStore {
10
+ // ==================== 图片操作 ====================
11
+
12
+ /**
13
+ * 获取相册中的所有图片
14
+ * @return JavaScript 数组,包含图片信息对象 {id, name, path, uri, size, date}
15
+ */
16
+ public getImages(): any[];
17
+
18
+ /**
19
+ * 保存图片到相册
20
+ * @param sourcePath 源图片路径
21
+ * @param displayName 显示名称(可选)
22
+ * @param relativePath 相对路径(可选,如 "Pictures/MyApp")
23
+ * @return 保存后的 content:// Uri 字符串,失败返回 null
24
+ */
25
+ public saveImage(sourcePath: string, displayName?: string, relativePath?: string): string | null;
26
+
27
+ /**
28
+ * 保存图片到相册(使用默认配置)
29
+ * @param sourcePath 源图片路径
30
+ * @return 保存后的 content:// Uri 字符串
31
+ */
32
+ public saveImage(sourcePath: string): string | null;
33
+
34
+ /**
35
+ * 删除图片
36
+ * @param uriString content:// Uri 字符串
37
+ * @return 删除成功返回 true
38
+ */
39
+ public deleteImage(uriString: string): boolean;
40
+
41
+ // ==================== 视频操作 ====================
42
+
43
+ /**
44
+ * 获取相册中的所有视频
45
+ * @return JavaScript 数组,包含视频信息对象 {id, name, path, uri, size, duration, date}
46
+ */
47
+ public getVideos(): any[];
48
+
49
+ /**
50
+ * 保存视频到相册
51
+ * @param sourcePath 源视频路径
52
+ * @param displayName 显示名称(可选)
53
+ * @param relativePath 相对路径(可选)
54
+ * @return 保存后的 content:// Uri 字符串,失败返回 null
55
+ */
56
+ public saveVideo(sourcePath: string, displayName?: string, relativePath?: string): string | null;
57
+
58
+ /**
59
+ * 保存视频到相册(使用默认配置)
60
+ * @param sourcePath 源视频路径
61
+ * @return 保存后的 content:// Uri 字符串
62
+ */
63
+ public saveVideo(sourcePath: string): string | null;
64
+
65
+ /**
66
+ * 删除视频
67
+ * @param uriString content:// Uri 字符串
68
+ * @return 删除成功返回 true
69
+ */
70
+ public deleteVideo(uriString: string): boolean;
71
+
72
+ // ==================== 音频操作 ====================
73
+
74
+ /**
75
+ * 获取所有音频文件
76
+ * @return JavaScript 数组,包含音频信息对象 {id, name, path, uri, size, duration, artist, album}
77
+ */
78
+ public getAudios(): any[];
79
+
80
+ /**
81
+ * 保存音频文件
82
+ * @param sourcePath 源文件路径
83
+ * @param displayName 显示名称(可选)
84
+ * @return 保存后的 content:// Uri 字符串,失败返回 null
85
+ */
86
+ public saveAudio(sourcePath: string, displayName?: string): string | null;
87
+
88
+ // ==================== 下载文件操作 ====================
89
+
90
+ /**
91
+ * 保存文件到下载目录
92
+ * @param sourcePath 源文件路径
93
+ * @param displayName 显示名称(可选)
94
+ * @return 保存后的 content:// Uri 字符串(Android 10+)或文件路径(Android 9-),失败返回 null
95
+ */
96
+ public saveToDownloads(sourcePath: string, displayName?: string): string | null;
97
+
98
+ /**
99
+ * 获取下载目录的所有文件
100
+ * API 29+ 使用 MediaStore,API 26-28 使用文件系统
101
+ * @return JavaScript 数组,包含文件信息对象 {id, name, uri, size, date} 或 {name, path, uri, size, date}
102
+ */
103
+ public getDownloads(): any[];
104
+
105
+ // ==================== 文档操作 ====================
106
+
107
+ /**
108
+ * 保存文档文件到文档目录
109
+ * @param sourcePath 源文件路径
110
+ * @param displayName 显示名称(可选)
111
+ * @return 保存后的 content:// Uri 字符串(Android 10+)或文件路径(Android 9-),失败返回 null
112
+ */
113
+ public saveToDocuments(sourcePath: string, displayName?: string): string | null;
114
+
115
+ /**
116
+ * 保存文档文件到文档目录(使用默认名称)
117
+ * @param sourcePath 源文件路径
118
+ * @return 保存后的 content:// Uri 字符串或文件路径
119
+ */
120
+ public saveToDocuments(sourcePath: string): string | null;
121
+
122
+ /**
123
+ * 获取文档目录的所有文件
124
+ * @return JavaScript 数组,包含文件信息对象 {id, name, uri, size, date, mimeType} 或 {name, path, uri, size, date}
125
+ */
126
+ public getDocuments(): any[];
127
+
128
+ // ==================== 通用操作 ====================
129
+
130
+ /**
131
+ * 从 URI 读取文件内容
132
+ * @param uriString content:// Uri 字符串
133
+ * @return 文件内容字节数组,失败返回 null
134
+ */
135
+ public readFromUri(uriString: string): number[] | null;
136
+
137
+ /**
138
+ * 查询媒体文件信息
139
+ * @param uriString content:// Uri 字符串
140
+ * @return JavaScript 对象,包含文件信息 {name, size, mimeType}
141
+ */
142
+ public queryMediaInfo(uriString: string): any;
143
+ }
144
+
145
+ export { };
146
+