ms-types 0.0.73 → 0.0.74

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 (42) hide show
  1. package/package.json +20 -20
  2. package/types/action.d.ts +296 -296
  3. package/types/{appleOcr.d.ts → appleocr.d.ts} +102 -102
  4. package/types/device.d.ts +105 -105
  5. package/types/global.d.ts +171 -171
  6. package/types/hotUpdate.d.ts +104 -104
  7. package/types/http.d.ts +300 -300
  8. package/types/ime.d.ts +99 -99
  9. package/types/index.d.ts +25 -25
  10. package/types/media.d.ts +90 -90
  11. package/types/mysql.d.ts +174 -174
  12. package/types/netCard.d.ts +42 -42
  13. package/types/node.d.ts +273 -273
  14. package/types/{paddleOcr.d.ts → paddleocr.d.ts} +73 -73
  15. package/types/pip.d.ts +50 -50
  16. package/types/system.d.ts +192 -192
  17. package/types/thread.d.ts +101 -101
  18. package/types/{tomatoOcr.d.ts → tomatoocr.d.ts} +199 -199
  19. package/types/tts.d.ts +91 -91
  20. package/types/ui.d.ts +165 -165
  21. package/types/yolo.d.ts +98 -98
  22. package/types/zh/HTTP/346/250/241/345/235/227.d.ts +301 -301
  23. package/types/zh/{MySQL → MySql}/346/250/241/345/235/227.d.ts +175 -175
  24. package/types/zh/PaddleOCR/346/250/241/345/235/227.d.ts +74 -74
  25. package/types/zh/YOLO/346/250/241/345/235/227.d.ts +101 -101
  26. package/types/zh/index.d.ts +23 -23
  27. package/types/zh//345/205/250/345/261/200/346/250/241/345/235/227.d.ts +169 -169
  28. package/types/zh//345/212/250/344/275/234/346/250/241/345/235/227.d.ts +298 -298
  29. package/types/zh//345/215/241/345/257/206/346/250/241/345/235/227.d.ts +55 -55
  30. package/types/zh//345/252/222/344/275/223/346/250/241/345/235/227.d.ts +91 -91
  31. package/types/zh//345/267/245/345/205/267/346/250/241/345/235/227.d.ts +30 -30
  32. package/types/zh//346/202/254/346/265/256/347/252/227/346/250/241/345/235/227.d.ts +54 -54
  33. package/types/zh//346/226/207/345/255/227/350/275/254/350/257/255/351/237/263/346/250/241/345/235/227.d.ts +92 -92
  34. package/types/zh//347/203/255/346/233/264/346/226/260/346/250/241/345/235/227.d.ts +105 -105
  35. package/types/zh//347/263/273/347/273/237/346/250/241/345/235/227.d.ts +193 -193
  36. package/types/zh//347/272/277/347/250/213/346/250/241/345/235/227.d.ts +102 -102
  37. package/types/zh//350/212/202/347/202/271/346/250/241/345/235/227.d.ts +274 -274
  38. package/types/zh//350/213/271/346/236/234OCR.d.ts +104 -104
  39. package/types/zh//350/247/206/345/233/276/346/250/241/345/235/227.d.ts +167 -167
  40. package/types/zh//350/256/276/345/244/207/346/250/241/345/235/227.d.ts +106 -106
  41. package/types/zh//350/276/223/345/205/245/346/263/225/346/250/241/345/235/227.d.ts +100 -100
  42. package/types/zh//351/205/215/347/275/256/346/250/241/345/235/227.d.ts +56 -56
package/types/node.d.ts CHANGED
@@ -1,273 +1,273 @@
1
- /**
2
- * 节点模块 包含节点操作、节点内容读写等功能
3
- */
4
- declare function createNodeSelector(params?: {
5
- /**
6
- * 1 代表不管visible是true还是false都获取,2 代表只获取 visible=true的节点
7
- */
8
- visibleFilter: 1 | 2;
9
- /**
10
- * 1 代表不管label是否有值都获取,2 代表只获取label有值的节点
11
- */
12
- labelFilter: 1 | 2;
13
- /**
14
- * 1 代表不过滤 2 bounds 区域属性x,y,w,h都小于0就被过滤
15
- */
16
- boundsFilter: 1 | 2;
17
- /**
18
- * 代表要获取节点的层级,越少速度越快,建议 1 - 50
19
- */
20
- maxDepth: number;
21
- /**
22
- * 最大获取子节点数量,0代表不限制
23
- */
24
- maxChildCount: number;
25
- /**
26
- * 代表要过滤的属性,用英文逗号分割,可以增加抓取速度,例如 visible,enable
27
- */
28
- excludedAttributes: string;
29
- }): NodeSelector;
30
-
31
- declare interface NodeBoundsInfo {
32
- /**
33
- * x坐标
34
- */
35
- x: number;
36
- /**
37
- * y坐标
38
- */
39
- y: number;
40
- /**
41
- * 宽度
42
- */
43
- width: number;
44
- /**
45
- * 高度
46
- */
47
- height: number;
48
- /**
49
- * 节点中心x坐标
50
- */
51
- centerX: number;
52
- /**
53
- * 节点中心y坐标
54
- */
55
- centerY: number;
56
- }
57
-
58
- declare interface NodeInfo {
59
- id: number;
60
- /**
61
- * 节点标签
62
- */
63
- label: string;
64
- /**
65
- * 节点类型
66
- */
67
- type: string;
68
- /**
69
- * 节点值
70
- */
71
- value: string;
72
- /**
73
- * 节点名称
74
- */
75
- name: string;
76
- /**
77
- * 节点是否可见
78
- */
79
- visible: boolean;
80
- /**
81
- * 节点是否启用
82
- */
83
- enabled: boolean;
84
- /**
85
- * 节点是否可访问
86
- */
87
- accessible: boolean;
88
- /**
89
- * 节点位置
90
- */
91
- bounds: NodeBoundsInfo;
92
- /**
93
- * 节点层级
94
- */
95
- depth: number;
96
- /**
97
- * 节点索引
98
- */
99
- index: number;
100
- /**
101
- * 父节点id
102
- */
103
- parentId: number;
104
- /**
105
- * 子节点数量
106
- */
107
- childCount: number;
108
- /**
109
- * 点击节点中心
110
- */
111
- clickCenter(): boolean;
112
- /**
113
- * 点击节点随机位置
114
- */
115
- clickRandom(): boolean;
116
- /**
117
- * 获取父节点
118
- */
119
- parent(): NodeInfo | null;
120
- /**
121
- * 获取子节点
122
- * @param index 子节点索引
123
- */
124
- child(index: number): NodeInfo | null;
125
- /**
126
- * 获取所有子节点
127
- */
128
- allChildren(): NodeInfo[];
129
- /**
130
- * 获取所有兄弟节点
131
- */
132
- siblings(): NodeInfo[];
133
- /**
134
- * 获取所有前兄弟节点
135
- */
136
- previousSiblings(): NodeInfo[];
137
- /**
138
- * 获取所有后兄弟节点
139
- */
140
- nextSiblings(): NodeInfo[];
141
- }
142
-
143
- /**
144
- * 节点选择器 包含节点选择、节点操作等功能
145
- */
146
- declare class NodeSelector {
147
- /**
148
- * 获取节点信息
149
- * @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
150
- * @returns 节点信息数组
151
- */
152
- getNodeInfo(timeout?: number): NodeInfo[];
153
- /**
154
- * 获取一个节点信息
155
- * @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
156
- * @returns 节点信息
157
- */
158
- getOneNodeInfo(timeout?: number): NodeInfo | null;
159
- /**
160
- * 加载节点
161
- * @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
162
- */
163
- loadNode(timeout?: number): NodeSelector;
164
- /**
165
- * 清除条件
166
- */
167
- clearSelector(): NodeSelector;
168
- /**
169
- * 获取节点xpath
170
- * @param path xpath路径
171
- * @returns 节点选择器
172
- */
173
- xpath(path: string): NodeSelector;
174
- /**
175
- * 获取节点标签
176
- * @param label 节点标签
177
- * @returns 节点选择器
178
- */
179
- label(label: string): NodeSelector;
180
- /**
181
- * 获取节点标签匹配
182
- * @param match 匹配字符串
183
- * @returns 节点选择器
184
- */
185
- labelMatch(match: string): NodeSelector;
186
- /**
187
- * 获取节点名称
188
- * @param name 节点名称
189
- * @returns 节点选择器
190
- */
191
- name(name: string): NodeSelector;
192
- /**
193
- * 获取节点名称匹配
194
- * @param match 匹配字符串
195
- * @returns 节点选择器
196
- */
197
- nameMatch(match: string): NodeSelector;
198
- /**
199
- * 获取节点类型
200
- * @param type 节点类型
201
- * @returns 节点选择器
202
- */
203
- type(type: string): NodeSelector;
204
- /**
205
- * 获取节点类型匹配
206
- * @param match 匹配字符串
207
- * @returns 节点选择器
208
- */
209
- typeMatch(match: string): NodeSelector;
210
- /**
211
- * 获取节点值
212
- * @param value 节点值
213
- * @returns 节点选择器
214
- */
215
- value(value: string): NodeSelector;
216
- /**
217
- * 获取节点值匹配
218
- * @param match 匹配字符串
219
- * @returns 节点选择器
220
- */
221
- valueMatch(match: string): NodeSelector;
222
- /**
223
- * 获取节点是否启用
224
- * @param enable 是否启用
225
- * @returns 节点选择器
226
- */
227
- enable(enable: boolean): NodeSelector;
228
- /**
229
- * 获取节点是否可访问
230
- * @param accessible 是否可访问
231
- * @returns 节点选择器
232
- */
233
- accessible(accessible: boolean): NodeSelector;
234
- /**
235
- * 获取节点是否可见
236
- * @param visible 是否可见
237
- * @returns 节点选择器
238
- */
239
- visible(visible: boolean): NodeSelector;
240
- /**
241
- * 获取节点索引
242
- * @param index 节点索引
243
- * @returns 节点选择器
244
- */
245
- index(index: number): NodeSelector;
246
- /**
247
- * 获取节点层级
248
- * @param depth 节点层级
249
- * @returns 节点选择器
250
- */
251
- depth(depth: number): NodeSelector;
252
- /**
253
- * 获取节点是否选中
254
- * @param selected 是否选中
255
- * @returns 节点选择器
256
- */
257
- selected(selected: boolean): NodeSelector;
258
- /**
259
- * 获取节点子节点数量
260
- * @param childCount 子节点数量
261
- * @returns 节点选择器
262
- */
263
- childCount(childCount: string): NodeSelector;
264
- /**
265
- * 获取节点位置
266
- * @param x x坐标
267
- * @param y y坐标
268
- * @param width 宽度
269
- * @param height 高度
270
- * @returns 节点选择器
271
- */
272
- bounds(x: number, y: number, width: number, height: number): NodeSelector;
273
- }
1
+ /**
2
+ * 节点模块 包含节点操作、节点内容读写等功能
3
+ */
4
+ declare function createNodeSelector(params?: {
5
+ /**
6
+ * 1 代表不管visible是true还是false都获取,2 代表只获取 visible=true的节点
7
+ */
8
+ visibleFilter: 1 | 2;
9
+ /**
10
+ * 1 代表不管label是否有值都获取,2 代表只获取label有值的节点
11
+ */
12
+ labelFilter: 1 | 2;
13
+ /**
14
+ * 1 代表不过滤 2 bounds 区域属性x,y,w,h都小于0就被过滤
15
+ */
16
+ boundsFilter: 1 | 2;
17
+ /**
18
+ * 代表要获取节点的层级,越少速度越快,建议 1 - 50
19
+ */
20
+ maxDepth: number;
21
+ /**
22
+ * 最大获取子节点数量,0代表不限制
23
+ */
24
+ maxChildCount: number;
25
+ /**
26
+ * 代表要过滤的属性,用英文逗号分割,可以增加抓取速度,例如 visible,enable
27
+ */
28
+ excludedAttributes: string;
29
+ }): NodeSelector;
30
+
31
+ declare interface NodeBoundsInfo {
32
+ /**
33
+ * x坐标
34
+ */
35
+ x: number;
36
+ /**
37
+ * y坐标
38
+ */
39
+ y: number;
40
+ /**
41
+ * 宽度
42
+ */
43
+ width: number;
44
+ /**
45
+ * 高度
46
+ */
47
+ height: number;
48
+ /**
49
+ * 节点中心x坐标
50
+ */
51
+ centerX: number;
52
+ /**
53
+ * 节点中心y坐标
54
+ */
55
+ centerY: number;
56
+ }
57
+
58
+ declare interface NodeInfo {
59
+ id: number;
60
+ /**
61
+ * 节点标签
62
+ */
63
+ label: string;
64
+ /**
65
+ * 节点类型
66
+ */
67
+ type: string;
68
+ /**
69
+ * 节点值
70
+ */
71
+ value: string;
72
+ /**
73
+ * 节点名称
74
+ */
75
+ name: string;
76
+ /**
77
+ * 节点是否可见
78
+ */
79
+ visible: boolean;
80
+ /**
81
+ * 节点是否启用
82
+ */
83
+ enabled: boolean;
84
+ /**
85
+ * 节点是否可访问
86
+ */
87
+ accessible: boolean;
88
+ /**
89
+ * 节点位置
90
+ */
91
+ bounds: NodeBoundsInfo;
92
+ /**
93
+ * 节点层级
94
+ */
95
+ depth: number;
96
+ /**
97
+ * 节点索引
98
+ */
99
+ index: number;
100
+ /**
101
+ * 父节点id
102
+ */
103
+ parentId: number;
104
+ /**
105
+ * 子节点数量
106
+ */
107
+ childCount: number;
108
+ /**
109
+ * 点击节点中心
110
+ */
111
+ clickCenter(): boolean;
112
+ /**
113
+ * 点击节点随机位置
114
+ */
115
+ clickRandom(): boolean;
116
+ /**
117
+ * 获取父节点
118
+ */
119
+ parent(): NodeInfo | null;
120
+ /**
121
+ * 获取子节点
122
+ * @param index 子节点索引
123
+ */
124
+ child(index: number): NodeInfo | null;
125
+ /**
126
+ * 获取所有子节点
127
+ */
128
+ allChildren(): NodeInfo[];
129
+ /**
130
+ * 获取所有兄弟节点
131
+ */
132
+ siblings(): NodeInfo[];
133
+ /**
134
+ * 获取所有前兄弟节点
135
+ */
136
+ previousSiblings(): NodeInfo[];
137
+ /**
138
+ * 获取所有后兄弟节点
139
+ */
140
+ nextSiblings(): NodeInfo[];
141
+ }
142
+
143
+ /**
144
+ * 节点选择器 包含节点选择、节点操作等功能
145
+ */
146
+ declare class NodeSelector {
147
+ /**
148
+ * 获取节点信息
149
+ * @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
150
+ * @returns 节点信息数组
151
+ */
152
+ getNodeInfo(timeout?: number): NodeInfo[];
153
+ /**
154
+ * 获取一个节点信息
155
+ * @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
156
+ * @returns 节点信息
157
+ */
158
+ getOneNodeInfo(timeout?: number): NodeInfo | null;
159
+ /**
160
+ * 加载节点
161
+ * @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
162
+ */
163
+ loadNode(timeout?: number): NodeSelector;
164
+ /**
165
+ * 清除条件
166
+ */
167
+ clearSelector(): NodeSelector;
168
+ /**
169
+ * 获取节点xpath
170
+ * @param path xpath路径
171
+ * @returns 节点选择器
172
+ */
173
+ xpath(path: string): NodeSelector;
174
+ /**
175
+ * 获取节点标签
176
+ * @param label 节点标签
177
+ * @returns 节点选择器
178
+ */
179
+ label(label: string): NodeSelector;
180
+ /**
181
+ * 获取节点标签匹配
182
+ * @param match 匹配字符串
183
+ * @returns 节点选择器
184
+ */
185
+ labelMatch(match: string): NodeSelector;
186
+ /**
187
+ * 获取节点名称
188
+ * @param name 节点名称
189
+ * @returns 节点选择器
190
+ */
191
+ name(name: string): NodeSelector;
192
+ /**
193
+ * 获取节点名称匹配
194
+ * @param match 匹配字符串
195
+ * @returns 节点选择器
196
+ */
197
+ nameMatch(match: string): NodeSelector;
198
+ /**
199
+ * 获取节点类型
200
+ * @param type 节点类型
201
+ * @returns 节点选择器
202
+ */
203
+ type(type: string): NodeSelector;
204
+ /**
205
+ * 获取节点类型匹配
206
+ * @param match 匹配字符串
207
+ * @returns 节点选择器
208
+ */
209
+ typeMatch(match: string): NodeSelector;
210
+ /**
211
+ * 获取节点值
212
+ * @param value 节点值
213
+ * @returns 节点选择器
214
+ */
215
+ value(value: string): NodeSelector;
216
+ /**
217
+ * 获取节点值匹配
218
+ * @param match 匹配字符串
219
+ * @returns 节点选择器
220
+ */
221
+ valueMatch(match: string): NodeSelector;
222
+ /**
223
+ * 获取节点是否启用
224
+ * @param enable 是否启用
225
+ * @returns 节点选择器
226
+ */
227
+ enable(enable: boolean): NodeSelector;
228
+ /**
229
+ * 获取节点是否可访问
230
+ * @param accessible 是否可访问
231
+ * @returns 节点选择器
232
+ */
233
+ accessible(accessible: boolean): NodeSelector;
234
+ /**
235
+ * 获取节点是否可见
236
+ * @param visible 是否可见
237
+ * @returns 节点选择器
238
+ */
239
+ visible(visible: boolean): NodeSelector;
240
+ /**
241
+ * 获取节点索引
242
+ * @param index 节点索引
243
+ * @returns 节点选择器
244
+ */
245
+ index(index: number): NodeSelector;
246
+ /**
247
+ * 获取节点层级
248
+ * @param depth 节点层级
249
+ * @returns 节点选择器
250
+ */
251
+ depth(depth: number): NodeSelector;
252
+ /**
253
+ * 获取节点是否选中
254
+ * @param selected 是否选中
255
+ * @returns 节点选择器
256
+ */
257
+ selected(selected: boolean): NodeSelector;
258
+ /**
259
+ * 获取节点子节点数量
260
+ * @param childCount 子节点数量
261
+ * @returns 节点选择器
262
+ */
263
+ childCount(childCount: string): NodeSelector;
264
+ /**
265
+ * 获取节点位置
266
+ * @param x x坐标
267
+ * @param y y坐标
268
+ * @param width 宽度
269
+ * @param height 高度
270
+ * @returns 节点选择器
271
+ */
272
+ bounds(x: number, y: number, width: number, height: number): NodeSelector;
273
+ }
@@ -1,73 +1,73 @@
1
- /**
2
- * 飞桨OCR模块 包含OCR识别、OCR模型加载等功能
3
- */
4
- declare namespace paddleOcr {
5
- /**
6
- * OCR识别结果接口
7
- */
8
- interface OCRResult {
9
- /** 识别的文本内容 */
10
- text: string;
11
- /** 识别置信度 (0-1) */
12
- confidence: number;
13
- /** 文本区域左上角 x 坐标 */
14
- x: number;
15
- /** 文本区域左上角 y 坐标 */
16
- y: number;
17
- /** 文本区域右下角 x 坐标 */
18
- ex: number;
19
- /** 文本区域右下角 y 坐标 */
20
- ey: number;
21
- /** 文本区域宽度 */
22
- width: number;
23
- /** 文本区域高度 */
24
- height: number;
25
- /** 文本区域中心点 x 坐标 */
26
- centerX: number;
27
- /** 文本区域中心点 y 坐标 */
28
- centerY: number;
29
- /** 文本区域角度 */
30
- angle: number;
31
- /** 文本区域方向 0 横向 1 竖向 */
32
- orientation: number;
33
- }
34
-
35
- /**
36
- * 初始化PP-OCRv5模型
37
- * @param maxSideLen 最大边长,默认640,可不传
38
- * @returns 初始化是否成功
39
- * @example
40
- * const loaded = paddleOcr.loadV5(640)
41
- * if (loaded) {
42
- * logi("加载成功")
43
- * }
44
- */
45
- function loadV5(maxSideLen?: number): boolean;
46
- /**
47
- * 执行OCR识别
48
- * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
49
- * @param x 边界框左上角x坐标 全屏传0
50
- * @param y 边界框左上角y坐标 全屏传0
51
- * @param ex 边界框右下角x坐标 全屏传0
52
- * @param ey 边界框右下角y坐标 全屏传0
53
- * @param confidenceThreshold 置信度阈值,默认0.6
54
- * @returns 识别结果数组
55
- * @example
56
- * const results = paddleOcr.recognize("screen", 0, 0, 100, 100)
57
- * if (results.length > 0) {
58
- * logi("识别到文本")
59
- * }
60
- */
61
- function recognize(
62
- input: string,
63
- x?: number,
64
- y?: number,
65
- ex?: number,
66
- ey?: number,
67
- confidenceThreshold?: number
68
- ): OCRResult[];
69
- /**
70
- * 释放OCR模型资源
71
- */
72
- function free(): void;
73
- }
1
+ /**
2
+ * 飞桨OCR模块 包含OCR识别、OCR模型加载等功能
3
+ */
4
+ declare namespace paddleOcr {
5
+ /**
6
+ * OCR识别结果接口
7
+ */
8
+ interface OCRResult {
9
+ /** 识别的文本内容 */
10
+ text: string;
11
+ /** 识别置信度 (0-1) */
12
+ confidence: number;
13
+ /** 文本区域左上角 x 坐标 */
14
+ x: number;
15
+ /** 文本区域左上角 y 坐标 */
16
+ y: number;
17
+ /** 文本区域右下角 x 坐标 */
18
+ ex: number;
19
+ /** 文本区域右下角 y 坐标 */
20
+ ey: number;
21
+ /** 文本区域宽度 */
22
+ width: number;
23
+ /** 文本区域高度 */
24
+ height: number;
25
+ /** 文本区域中心点 x 坐标 */
26
+ centerX: number;
27
+ /** 文本区域中心点 y 坐标 */
28
+ centerY: number;
29
+ /** 文本区域角度 */
30
+ angle: number;
31
+ /** 文本区域方向 0 横向 1 竖向 */
32
+ orientation: number;
33
+ }
34
+
35
+ /**
36
+ * 初始化PP-OCRv5模型
37
+ * @param maxSideLen 最大边长,默认640,可不传
38
+ * @returns 初始化是否成功
39
+ * @example
40
+ * const loaded = paddleOcr.loadV5(640)
41
+ * if (loaded) {
42
+ * logi("加载成功")
43
+ * }
44
+ */
45
+ function loadV5(maxSideLen?: number): boolean;
46
+ /**
47
+ * 执行OCR识别
48
+ * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
49
+ * @param x 边界框左上角x坐标 全屏传0
50
+ * @param y 边界框左上角y坐标 全屏传0
51
+ * @param ex 边界框右下角x坐标 全屏传0
52
+ * @param ey 边界框右下角y坐标 全屏传0
53
+ * @param confidenceThreshold 置信度阈值,默认0.6
54
+ * @returns 识别结果数组
55
+ * @example
56
+ * const results = paddleOcr.recognize("screen", 0, 0, 100, 100)
57
+ * if (results.length > 0) {
58
+ * logi("识别到文本")
59
+ * }
60
+ */
61
+ function recognize(
62
+ input: string,
63
+ x?: number,
64
+ y?: number,
65
+ ex?: number,
66
+ ey?: number,
67
+ confidenceThreshold?: number
68
+ ): OCRResult[];
69
+ /**
70
+ * 释放OCR模型资源
71
+ */
72
+ function free(): void;
73
+ }