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.
- package/.vscode/settings.json +1 -0
- package/@deekeScript/@type/Class/Global.d.ts +1 -1
- package/@deekeScript/@type/Class/Rect.d.ts +16 -16
- package/@deekeScript/@type/Class/UiSelector.d.ts +201 -201
- package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
- package/@deekeScript/@type/interface/Access.d.ts +104 -104
- package/@deekeScript/@type/interface/App.d.ts +101 -101
- package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
- package/@deekeScript/@type/interface/Device.d.ts +88 -88
- package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
- package/@deekeScript/@type/interface/Engines.d.ts +39 -39
- package/@deekeScript/@type/interface/Files.d.ts +283 -283
- package/@deekeScript/@type/interface/FloatDialogs.d.ts +41 -41
- package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
- package/@deekeScript/@type/interface/Hid.d.ts +342 -342
- package/@deekeScript/@type/interface/Http.d.ts +94 -43
- package/@deekeScript/@type/interface/Images.d.ts +71 -71
- package/@deekeScript/@type/interface/Java.d.ts +7 -7
- package/@deekeScript/@type/interface/KeyBoards.d.ts +27 -27
- package/@deekeScript/@type/interface/Log.d.ts +16 -16
- package/@deekeScript/@type/interface/MediaStore.d.ts +146 -146
- package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
- package/@deekeScript/@type/interface/SocketIOClient.d.ts +76 -76
- package/@deekeScript/@type/interface/Storage.d.ts +119 -119
- package/@deekeScript/@type/interface/System.d.ts +114 -114
- package/@deekeScript/@type/interface/UiObject.d.ts +197 -197
- package/README.md +67 -67
- package/deekeScript.json +670 -669
- package/deekeScript.schema.json +492 -0
- package/deekeScriptZipBuild +48 -48
- package/gulpfile +17 -17
- package/images/test/statistics.png +0 -0
- package/init +32 -32
- package/jsconfig.json +11 -11
- package/package.json +44 -43
- package/script/statistics/statistics.js +120 -120
- package/script/task.html +4 -4
- package/src/statistics/statistics.js +120 -120
- package/src/task/douyin_zan.js +89 -89
- package/src/task/dy.js +14 -14
- package/src/task/dyApp.js +7 -7
- package/src/task/tool.js +19 -19
- package/src/task.html +4 -4
- package/test.json +67 -0
- package/uglify-config.json +15 -15
- package/update-types.js +118 -0
|
@@ -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 { };
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
declare global {
|
|
3
|
-
var Storage: storage;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface storage {
|
|
7
|
-
/**
|
|
8
|
-
* 创建存储实例 全局使用一个即可
|
|
9
|
-
* @param db 数据库名称
|
|
10
|
-
* @return 返回当前实例,如果已存在则直接返回
|
|
11
|
-
*/
|
|
12
|
-
public create(db: string): storage;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 设置字符串
|
|
16
|
-
* @param key 键
|
|
17
|
-
* @param value 值
|
|
18
|
-
*/
|
|
19
|
-
public put(key: string, value: string): boolean;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 设置整型值
|
|
23
|
-
* @param key 键
|
|
24
|
-
* @param value 值
|
|
25
|
-
*/
|
|
26
|
-
public putInteger(key: string, value: number): boolean;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 设置bool
|
|
30
|
-
* @param key 键
|
|
31
|
-
* @param value 值
|
|
32
|
-
*/
|
|
33
|
-
public putBoolean(key: string, value: boolean): boolean;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 设置双精度值
|
|
37
|
-
* @param key 键
|
|
38
|
-
* @param value 值
|
|
39
|
-
*/
|
|
40
|
-
public putDouble(key: string, value: number): boolean;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 设置对象
|
|
44
|
-
* @param key 键
|
|
45
|
-
* @param obj 值
|
|
46
|
-
*/
|
|
47
|
-
public putObj(key: string, obj: object): boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 设置集合(字符串)
|
|
51
|
-
* @param key 键
|
|
52
|
-
* @param set 值
|
|
53
|
-
*/
|
|
54
|
-
public putArray(key: string, arr: Array): boolean;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* 获取集合(字符串)
|
|
58
|
-
* @param key 键
|
|
59
|
-
*/
|
|
60
|
-
public getArray(key: string): Array;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 获取字符串
|
|
64
|
-
* @param key 键
|
|
65
|
-
*/
|
|
66
|
-
public get(key: string): string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 获取字符串
|
|
70
|
-
* @param key 键
|
|
71
|
-
*/
|
|
72
|
-
public getString(key: string): string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 获取bool类型的值
|
|
76
|
-
* @param key 键
|
|
77
|
-
*/
|
|
78
|
-
public getBoolean(key: string): boolean;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* 获取Double类型的值
|
|
82
|
-
* @param key 键
|
|
83
|
-
*/
|
|
84
|
-
public getDouble(key: string): number;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 获取整型类型的值
|
|
88
|
-
* @param key 键
|
|
89
|
-
*/
|
|
90
|
-
public getInteger(key: string): number;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* 获取对象类型的值
|
|
94
|
-
* @param key 键
|
|
95
|
-
*/
|
|
96
|
-
public getObj(key: string): object;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* 移除某个键
|
|
100
|
-
* @param key 键
|
|
101
|
-
* @return 返回Promise,实际使用时通过blockingSubscribe()或toCompletionStage()来获取结果
|
|
102
|
-
*/
|
|
103
|
-
public remove(key: string): any; // 实际返回Single<Preferences>,在JavaScript中可以通过异步方式处理
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 清空所有值
|
|
107
|
-
* @return 返回Promise,实际使用时通过blockingSubscribe()或toCompletionStage()来获取结果
|
|
108
|
-
*/
|
|
109
|
-
public clear(): any; // 实际返回Single<Preferences>,在JavaScript中可以通过异步方式处理
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* 判断是否包含键为key的数据
|
|
113
|
-
* @param key 键
|
|
114
|
-
* @return 返回boolean,表示是否存在该键
|
|
115
|
-
*/
|
|
116
|
-
public contains(key: string): boolean;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export { };
|
|
1
|
+
|
|
2
|
+
declare global {
|
|
3
|
+
var Storage: storage;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface storage {
|
|
7
|
+
/**
|
|
8
|
+
* 创建存储实例 全局使用一个即可
|
|
9
|
+
* @param db 数据库名称
|
|
10
|
+
* @return 返回当前实例,如果已存在则直接返回
|
|
11
|
+
*/
|
|
12
|
+
public create(db: string): storage;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 设置字符串
|
|
16
|
+
* @param key 键
|
|
17
|
+
* @param value 值
|
|
18
|
+
*/
|
|
19
|
+
public put(key: string, value: string): boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 设置整型值
|
|
23
|
+
* @param key 键
|
|
24
|
+
* @param value 值
|
|
25
|
+
*/
|
|
26
|
+
public putInteger(key: string, value: number): boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 设置bool
|
|
30
|
+
* @param key 键
|
|
31
|
+
* @param value 值
|
|
32
|
+
*/
|
|
33
|
+
public putBoolean(key: string, value: boolean): boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 设置双精度值
|
|
37
|
+
* @param key 键
|
|
38
|
+
* @param value 值
|
|
39
|
+
*/
|
|
40
|
+
public putDouble(key: string, value: number): boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 设置对象
|
|
44
|
+
* @param key 键
|
|
45
|
+
* @param obj 值
|
|
46
|
+
*/
|
|
47
|
+
public putObj(key: string, obj: object): boolean;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 设置集合(字符串)
|
|
51
|
+
* @param key 键
|
|
52
|
+
* @param set 值
|
|
53
|
+
*/
|
|
54
|
+
public putArray(key: string, arr: Array): boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 获取集合(字符串)
|
|
58
|
+
* @param key 键
|
|
59
|
+
*/
|
|
60
|
+
public getArray(key: string): Array;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 获取字符串
|
|
64
|
+
* @param key 键
|
|
65
|
+
*/
|
|
66
|
+
public get(key: string): string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 获取字符串
|
|
70
|
+
* @param key 键
|
|
71
|
+
*/
|
|
72
|
+
public getString(key: string): string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 获取bool类型的值
|
|
76
|
+
* @param key 键
|
|
77
|
+
*/
|
|
78
|
+
public getBoolean(key: string): boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 获取Double类型的值
|
|
82
|
+
* @param key 键
|
|
83
|
+
*/
|
|
84
|
+
public getDouble(key: string): number;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 获取整型类型的值
|
|
88
|
+
* @param key 键
|
|
89
|
+
*/
|
|
90
|
+
public getInteger(key: string): number;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 获取对象类型的值
|
|
94
|
+
* @param key 键
|
|
95
|
+
*/
|
|
96
|
+
public getObj(key: string): object;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 移除某个键
|
|
100
|
+
* @param key 键
|
|
101
|
+
* @return 返回Promise,实际使用时通过blockingSubscribe()或toCompletionStage()来获取结果
|
|
102
|
+
*/
|
|
103
|
+
public remove(key: string): any; // 实际返回Single<Preferences>,在JavaScript中可以通过异步方式处理
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 清空所有值
|
|
107
|
+
* @return 返回Promise,实际使用时通过blockingSubscribe()或toCompletionStage()来获取结果
|
|
108
|
+
*/
|
|
109
|
+
public clear(): any; // 实际返回Single<Preferences>,在JavaScript中可以通过异步方式处理
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 判断是否包含键为key的数据
|
|
113
|
+
* @param key 键
|
|
114
|
+
* @return 返回boolean,表示是否存在该键
|
|
115
|
+
*/
|
|
116
|
+
public contains(key: string): boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { };
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var System: System;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface System {
|
|
6
|
-
/**
|
|
7
|
-
* 休眠
|
|
8
|
-
* @param milliSecond 毫秒
|
|
9
|
-
*/
|
|
10
|
-
public sleep(milliSecond: number): void;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 释放内存
|
|
14
|
-
*/
|
|
15
|
-
public gc(): void;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 获取当前时间 yyyy-MM-dd HH:mm:ss.SSS 格式
|
|
19
|
-
*/
|
|
20
|
-
public time(): string;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 获取当前Activity
|
|
24
|
-
*/
|
|
25
|
-
public currentActivity(): string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 获取当前包名
|
|
29
|
-
*/
|
|
30
|
-
public currentPackage(): string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 将内容设置到剪切板中
|
|
34
|
-
* @param text 剪切板内容
|
|
35
|
-
*/
|
|
36
|
-
public setClip(text: string): void;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* 获取剪切板内容
|
|
40
|
-
*/
|
|
41
|
-
public getClip(): string;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 吐司
|
|
45
|
-
* @param text 显示文本
|
|
46
|
-
*/
|
|
47
|
-
public toast(text: string): void;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 吐司(显示时间较长)
|
|
51
|
-
* @param text 显示文本
|
|
52
|
-
*/
|
|
53
|
-
public toastLong(text: string): void;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @param activity 等待的Activity
|
|
58
|
-
* @param period 每次时间间隔
|
|
59
|
-
* @param timeout 等待的总时间
|
|
60
|
-
*/
|
|
61
|
-
public waitForActivity(activity: string, period: number, timeout: number): boolean;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* @param activity 等待的PackageName的App启动
|
|
66
|
-
* @param period 每次时间间隔
|
|
67
|
-
* @param timeout 等待的总时间
|
|
68
|
-
*/
|
|
69
|
-
public waitForPackage(packageName: string, period: number, timeout: number): boolean;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 停止所有脚本
|
|
73
|
-
*/
|
|
74
|
-
public exit(): void;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* 缓存清理
|
|
78
|
-
*/
|
|
79
|
-
public cleanUp(): void;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* 获取智能话术token
|
|
83
|
-
* @param key 智能话术key
|
|
84
|
-
* @param secret 智能话术secret
|
|
85
|
-
*/
|
|
86
|
-
public AiSpeechToken(key: string, secret: string): string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* 生成窗口元素,使用App的上传日志,可以拿到文件
|
|
90
|
-
*/
|
|
91
|
-
public generateWindowElements(): void;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* 获取接口返回的内容
|
|
95
|
-
* @param key
|
|
96
|
-
* @param dataForm
|
|
97
|
-
* @param content
|
|
98
|
-
*/
|
|
99
|
-
public getDataFrom(key: string, dataForm: string, content: string): string | null;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* 是否显示时间悬浮窗窗口
|
|
103
|
-
* @param show 是否显示
|
|
104
|
-
*/
|
|
105
|
-
public setTimeWindowShow(show: boolean): void;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* 切换无障碍模式,快速模式下,将自动过滤非重要控件。注意通过id或者text方式获取控件不受此模式影响;
|
|
109
|
-
* @param mode 快速模式mode为fast,非快速模式为!fast
|
|
110
|
-
*/
|
|
111
|
-
public setAccessibilityMode(mode: string): void;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var System: System;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface System {
|
|
6
|
+
/**
|
|
7
|
+
* 休眠
|
|
8
|
+
* @param milliSecond 毫秒
|
|
9
|
+
*/
|
|
10
|
+
public sleep(milliSecond: number): void;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 释放内存
|
|
14
|
+
*/
|
|
15
|
+
public gc(): void;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 获取当前时间 yyyy-MM-dd HH:mm:ss.SSS 格式
|
|
19
|
+
*/
|
|
20
|
+
public time(): string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 获取当前Activity
|
|
24
|
+
*/
|
|
25
|
+
public currentActivity(): string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 获取当前包名
|
|
29
|
+
*/
|
|
30
|
+
public currentPackage(): string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 将内容设置到剪切板中
|
|
34
|
+
* @param text 剪切板内容
|
|
35
|
+
*/
|
|
36
|
+
public setClip(text: string): void;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 获取剪切板内容
|
|
40
|
+
*/
|
|
41
|
+
public getClip(): string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 吐司
|
|
45
|
+
* @param text 显示文本
|
|
46
|
+
*/
|
|
47
|
+
public toast(text: string): void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 吐司(显示时间较长)
|
|
51
|
+
* @param text 显示文本
|
|
52
|
+
*/
|
|
53
|
+
public toastLong(text: string): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param activity 等待的Activity
|
|
58
|
+
* @param period 每次时间间隔
|
|
59
|
+
* @param timeout 等待的总时间
|
|
60
|
+
*/
|
|
61
|
+
public waitForActivity(activity: string, period: number, timeout: number): boolean;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @param activity 等待的PackageName的App启动
|
|
66
|
+
* @param period 每次时间间隔
|
|
67
|
+
* @param timeout 等待的总时间
|
|
68
|
+
*/
|
|
69
|
+
public waitForPackage(packageName: string, period: number, timeout: number): boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 停止所有脚本
|
|
73
|
+
*/
|
|
74
|
+
public exit(): void;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 缓存清理
|
|
78
|
+
*/
|
|
79
|
+
public cleanUp(): void;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 获取智能话术token
|
|
83
|
+
* @param key 智能话术key
|
|
84
|
+
* @param secret 智能话术secret
|
|
85
|
+
*/
|
|
86
|
+
public AiSpeechToken(key: string, secret: string): string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 生成窗口元素,使用App的上传日志,可以拿到文件
|
|
90
|
+
*/
|
|
91
|
+
public generateWindowElements(): void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 获取接口返回的内容
|
|
95
|
+
* @param key
|
|
96
|
+
* @param dataForm
|
|
97
|
+
* @param content
|
|
98
|
+
*/
|
|
99
|
+
public getDataFrom(key: string, dataForm: string, content: string): string | null;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 是否显示时间悬浮窗窗口
|
|
103
|
+
* @param show 是否显示
|
|
104
|
+
*/
|
|
105
|
+
public setTimeWindowShow(show: boolean): void;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 切换无障碍模式,快速模式下,将自动过滤非重要控件。注意通过id或者text方式获取控件不受此模式影响;
|
|
109
|
+
* @param mode 快速模式mode为fast,非快速模式为!fast
|
|
110
|
+
*/
|
|
111
|
+
public setAccessibilityMode(mode: string): void;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { };
|