deeke-script-app 1.7.7 → 1.7.9

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 (49) hide show
  1. package/@deekeScript/@type/Class/Global.d.ts +1 -1
  2. package/@deekeScript/@type/Class/Rect.d.ts +16 -16
  3. package/@deekeScript/@type/Class/UiSelector.d.ts +201 -201
  4. package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
  5. package/@deekeScript/@type/interface/Access.d.ts +174 -141
  6. package/@deekeScript/@type/interface/App.d.ts +101 -101
  7. package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
  8. package/@deekeScript/@type/interface/Device.d.ts +233 -212
  9. package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
  10. package/@deekeScript/@type/interface/Engines.d.ts +39 -39
  11. package/@deekeScript/@type/interface/Files.d.ts +283 -283
  12. package/@deekeScript/@type/interface/FloatDialogs.d.ts +47 -47
  13. package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
  14. package/@deekeScript/@type/interface/Hid.d.ts +342 -342
  15. package/@deekeScript/@type/interface/Http.d.ts +94 -94
  16. package/@deekeScript/@type/interface/Images.d.ts +71 -71
  17. package/@deekeScript/@type/interface/Java.d.ts +7 -7
  18. package/@deekeScript/@type/interface/KeyBoards.d.ts +54 -54
  19. package/@deekeScript/@type/interface/Log.d.ts +16 -16
  20. package/@deekeScript/@type/interface/MediaStore.d.ts +146 -146
  21. package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
  22. package/@deekeScript/@type/interface/SocketIOClient.d.ts +76 -76
  23. package/@deekeScript/@type/interface/Storage.d.ts +119 -119
  24. package/@deekeScript/@type/interface/System.d.ts +132 -120
  25. package/@deekeScript/@type/interface/UiObject.d.ts +202 -202
  26. package/README.md +67 -67
  27. package/deekeScript.json +672 -670
  28. package/deekeScript.schema.json +686 -681
  29. package/deekeScriptZipBuild +48 -48
  30. package/gulpfile +17 -17
  31. package/images/test/statistics.png +0 -0
  32. package/init +32 -32
  33. package/jsconfig.json +11 -11
  34. package/package.json +43 -43
  35. package/script/statistics/statistics.js +120 -120
  36. package/script/task/douyin_zan.js +37 -37
  37. package/script/task/dy.js +6 -6
  38. package/script/task/dyApp.js +6 -6
  39. package/script/task/tool.js +9 -9
  40. package/script/task.html +4 -4
  41. package/src/statistics/statistics.js +120 -120
  42. package/src/task/douyin_zan.js +89 -89
  43. package/src/task/dy.js +14 -14
  44. package/src/task/dyApp.js +7 -7
  45. package/src/task/tool.js +19 -19
  46. package/src/task.html +4 -4
  47. package/test.json +132 -132
  48. package/uglify-config.json +15 -15
  49. package/update-types.js +118 -118
@@ -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
+
@@ -1,28 +1,28 @@
1
-
2
- declare global {
3
- var NotificationBridge: notificationBridge;
4
- }
5
-
6
- interface notificationBridge {
7
- /**
8
- * 开启读取通知服务
9
- */
10
- public startService(): void;
11
-
12
- /**
13
- * 监听通知
14
- * @param onNotification 通知发起后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
15
- * @param onNotificationRemoved 通知移除后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
16
- */
17
- public startListening(
18
- onNotification: (packageName: string, title: string, text: string) => void,
19
- onNotificationRemoved: (packageName: string, title: string, text: string) => void
20
- ): void;
21
-
22
- /**
23
- * 关闭服务
24
- */
25
- public stopService(): void;
26
- }
27
-
28
- export { };
1
+
2
+ declare global {
3
+ var NotificationBridge: notificationBridge;
4
+ }
5
+
6
+ interface notificationBridge {
7
+ /**
8
+ * 开启读取通知服务
9
+ */
10
+ public startService(): void;
11
+
12
+ /**
13
+ * 监听通知
14
+ * @param onNotification 通知发起后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
15
+ * @param onNotificationRemoved 通知移除后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
16
+ */
17
+ public startListening(
18
+ onNotification: (packageName: string, title: string, text: string) => void,
19
+ onNotificationRemoved: (packageName: string, title: string, text: string) => void
20
+ ): void;
21
+
22
+ /**
23
+ * 关闭服务
24
+ */
25
+ public stopService(): void;
26
+ }
27
+
28
+ export { };
@@ -1,76 +1,76 @@
1
- global {
2
- var SocketIoClient: socketIoClient;
3
- }
4
-
5
- interface socketIoClient {
6
- /**
7
- * 获取socketIOClient实例
8
- * @param serverUrl socketIOServer地址
9
- * @param reconnect 是否自动重连(默认为true)
10
- * @param timeout 重连超时时间(毫秒)(默认为5000毫秒)
11
- */
12
- public getInstance(serverUrl: string, reconnect: boolean = true, timeout: number = 5000): socketIOClient;
13
-
14
- /**
15
- * 连接socketIOServer
16
- */
17
- public connect(): void;
18
-
19
- /**
20
- * 断开socketIOServer
21
- */
22
- public disconnect(): void;
23
-
24
- /**
25
- * 是否已连接
26
- */
27
- public isConnected(): boolean;
28
-
29
- /**
30
- * 向服务器发送事件和数据
31
- * @param eventName 事件名称
32
- * @param data 数据
33
- */
34
- public emit(eventName: string, data: string): void;
35
-
36
- /**
37
- * 向服务器发送事件和数据
38
- * @param eventName 事件名称
39
- * @param data 数据
40
- * @param callback 服务器确认后的回调函数
41
- */
42
- public emit(eventName: string, data: string, callback: function): void;
43
-
44
- /**
45
- * 监听事件
46
- * @param eventName
47
- * @param callback
48
- */
49
- public on(eventName: string, callback: (data: string) => void): void;
50
-
51
- /**
52
- * 移除事件监听器
53
- * @param eventName
54
- * @param callback
55
- */
56
- public off(eventName: string, callback: (data: string) => void): void;
57
-
58
- /**
59
- * 移除事件监听器
60
- * @param eventName
61
- */
62
- public off(eventName: string): void;
63
-
64
- /**
65
- * 移除所有事件监听器
66
- */
67
- public off(): void;
68
-
69
- /**
70
- * 重置当前实例的是否重连
71
- * @param bool 是否自动重连
72
- */
73
- public setReconnect(bool: boolean): void;
74
- }
75
-
76
- export { };
1
+ global {
2
+ var SocketIoClient: socketIoClient;
3
+ }
4
+
5
+ interface socketIoClient {
6
+ /**
7
+ * 获取socketIOClient实例
8
+ * @param serverUrl socketIOServer地址
9
+ * @param reconnect 是否自动重连(默认为true)
10
+ * @param timeout 重连超时时间(毫秒)(默认为5000毫秒)
11
+ */
12
+ public getInstance(serverUrl: string, reconnect: boolean = true, timeout: number = 5000): socketIOClient;
13
+
14
+ /**
15
+ * 连接socketIOServer
16
+ */
17
+ public connect(): void;
18
+
19
+ /**
20
+ * 断开socketIOServer
21
+ */
22
+ public disconnect(): void;
23
+
24
+ /**
25
+ * 是否已连接
26
+ */
27
+ public isConnected(): boolean;
28
+
29
+ /**
30
+ * 向服务器发送事件和数据
31
+ * @param eventName 事件名称
32
+ * @param data 数据
33
+ */
34
+ public emit(eventName: string, data: string): void;
35
+
36
+ /**
37
+ * 向服务器发送事件和数据
38
+ * @param eventName 事件名称
39
+ * @param data 数据
40
+ * @param callback 服务器确认后的回调函数
41
+ */
42
+ public emit(eventName: string, data: string, callback: function): void;
43
+
44
+ /**
45
+ * 监听事件
46
+ * @param eventName
47
+ * @param callback
48
+ */
49
+ public on(eventName: string, callback: (data: string) => void): void;
50
+
51
+ /**
52
+ * 移除事件监听器
53
+ * @param eventName
54
+ * @param callback
55
+ */
56
+ public off(eventName: string, callback: (data: string) => void): void;
57
+
58
+ /**
59
+ * 移除事件监听器
60
+ * @param eventName
61
+ */
62
+ public off(eventName: string): void;
63
+
64
+ /**
65
+ * 移除所有事件监听器
66
+ */
67
+ public off(): void;
68
+
69
+ /**
70
+ * 重置当前实例的是否重连
71
+ * @param bool 是否自动重连
72
+ */
73
+ public setReconnect(bool: boolean): void;
74
+ }
75
+
76
+ export { };