ms-types 0.4.13 → 0.4.15

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/package.json +22 -22
  2. package/types/action.d.ts +296 -296
  3. package/types/appleocr.d.ts +102 -102
  4. package/types/config.d.ts +97 -97
  5. package/types/cryptoUtils.d.ts +59 -59
  6. package/types/device.d.ts +117 -117
  7. package/types/global.d.ts +230 -230
  8. package/types/hid.d.ts +329 -329
  9. package/types/hotUpdate.d.ts +104 -104
  10. package/types/http.d.ts +300 -300
  11. package/types/image.d.ts +19 -0
  12. package/types/ime.d.ts +99 -99
  13. package/types/index.d.ts +27 -27
  14. package/types/media.d.ts +101 -101
  15. package/types/mysql.d.ts +174 -174
  16. package/types/netCard.d.ts +77 -77
  17. package/types/node.d.ts +292 -292
  18. package/types/paddleocr.d.ts +73 -73
  19. package/types/pip.d.ts +51 -51
  20. package/types/system.d.ts +225 -225
  21. package/types/thread.d.ts +42 -42
  22. package/types/tomatoocr.d.ts +209 -209
  23. package/types/tts.d.ts +91 -91
  24. package/types/ui.d.ts +185 -185
  25. package/types/utils.d.ts +77 -77
  26. package/types/yolo.d.ts +114 -114
  27. package/types/zh/HID/346/250/241/345/235/227.d.ts +333 -333
  28. package/types/zh/HTTP/346/250/241/345/235/227.d.ts +301 -301
  29. package/types/zh/MySql/346/250/241/345/235/227.d.ts +175 -175
  30. package/types/zh/PaddleOCR/346/250/241/345/235/227.d.ts +74 -74
  31. package/types/zh/YOLO/346/250/241/345/235/227.d.ts +118 -118
  32. package/types/zh/index.d.ts +24 -24
  33. package/types/zh//345/205/250/345/261/200/346/250/241/345/235/227.d.ts +220 -220
  34. package/types/zh//345/212/250/344/275/234/346/250/241/345/235/227.d.ts +298 -298
  35. package/types/zh//345/215/241/345/257/206/346/250/241/345/235/227.d.ts +90 -90
  36. package/types/zh//345/233/276/347/211/207/346/250/241/345/235/227.d.ts +19 -0
  37. package/types/zh//345/252/222/344/275/223/346/250/241/345/235/227.d.ts +102 -102
  38. package/types/zh//345/267/245/345/205/267/346/250/241/345/235/227.d.ts +77 -77
  39. package/types/zh//346/202/254/346/265/256/347/252/227/346/250/241/345/235/227.d.ts +55 -55
  40. 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
  41. package/types/zh//347/203/255/346/233/264/346/226/260/346/250/241/345/235/227.d.ts +105 -105
  42. package/types/zh//347/263/273/347/273/237/346/250/241/345/235/227.d.ts +225 -225
  43. package/types/zh//347/272/277/347/250/213/346/250/241/345/235/227.d.ts +43 -43
  44. package/types/zh//350/212/202/347/202/271/346/250/241/345/235/227.d.ts +290 -290
  45. package/types/zh//350/213/271/346/236/234OCR.d.ts +104 -104
  46. package/types/zh//350/247/206/345/233/276/346/250/241/345/235/227.d.ts +90 -90
  47. package/types/zh//350/256/276/345/244/207/346/250/241/345/235/227.d.ts +118 -118
  48. package/types/zh//350/276/223/345/205/245/346/263/225/346/250/241/345/235/227.d.ts +100 -100
  49. package/types/zh//351/205/215/347/275/256/346/250/241/345/235/227.d.ts +99 -99
@@ -1,102 +1,102 @@
1
- /**
2
- * Apple OCR模块 使用Apple Vision框架进行文本识别
3
- */
4
- declare namespace appleOcr {
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
-
31
- /**
32
- * 执行OCR识别(使用Apple Vision框架)
33
- * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
34
- * @param x 边界框左上角x坐标 默认 0
35
- * @param y 边界框左上角y坐标 默认 0
36
- * @param ex 边界框右下角x坐标 默认 0
37
- * @param ey 边界框右下角y坐标 默认 0
38
- * @param languages 识别语言数组,默认为["zh-Hans", "en-US"]
39
- * @returns 识别结果数组,包含文本、置信度、坐标等信息
40
- * @example
41
- * const results = appleOcr.recognize("screen", 0, 0, 100, 100, ["zh-Hans", "en-US"])
42
- * results.forEach(result => {
43
- * logi(`文本: ${result.text}, 置信度: ${result.confidence}`)
44
- * })
45
- */
46
- function recognize(
47
- input: string,
48
- x?: number,
49
- y?: number,
50
- ex?: number,
51
- ey?: number,
52
- languages?: string[]
53
- ): OCRResult[];
54
-
55
- /**
56
- * 执行OCR识别(仅识别数字)0-9.,+-
57
- * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
58
- * @param x 边界框左上角x坐标
59
- * @param y 边界框左上角y坐标
60
- * @param ex 边界框右下角x坐标
61
- * @param ey 边界框右下角y坐标
62
- * @returns 识别结果数组,包含文本、置信度、坐标等信息
63
- * @example
64
- * const results = appleOcr.recognizeNumbers("screen", 0, 0, 100, 100)
65
- * results.forEach(result => {
66
- * logi(`文本: ${result.text}, 置信度: ${result.confidence}`)
67
- * })
68
- */
69
- function recognizeNumbers(
70
- input: string,
71
- x?: number,
72
- y?: number,
73
- ex?: number,
74
- ey?: number
75
- ): OCRResult[];
76
-
77
- /**
78
- * 执行OCR识别(查找指定文本)
79
- * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
80
- * @param texts 要查找的文本数组
81
- * @param x 边界框左上角x坐标
82
- * @param y 边界框左上角y坐标
83
- * @param ex 边界框右下角x坐标
84
- * @param ey 边界框右下角y坐标
85
- * @param languages 识别语言数组,默认为["zh-Hans", "en-US"]
86
- * @returns 识别结果数组,包含文本、置信度、坐标等信息
87
- * @example
88
- * const results = appleOcr.findText("screen", ["123", "456"], 0, 0, 100, 100, ["zh-Hans", "en-US"])
89
- * results.forEach(result => {
90
- * logi(`文本: ${result.text}, 置信度: ${result.confidence}`)
91
- * })
92
- */
93
- function findText(
94
- input: string,
95
- texts: string[],
96
- x?: number,
97
- y?: number,
98
- ex?: number,
99
- ey?: number,
100
- languages?: string[]
101
- ): OCRResult[];
102
- }
1
+ /**
2
+ * Apple OCR模块 使用Apple Vision框架进行文本识别
3
+ */
4
+ declare namespace appleOcr {
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
+
31
+ /**
32
+ * 执行OCR识别(使用Apple Vision框架)
33
+ * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
34
+ * @param x 边界框左上角x坐标 默认 0
35
+ * @param y 边界框左上角y坐标 默认 0
36
+ * @param ex 边界框右下角x坐标 默认 0
37
+ * @param ey 边界框右下角y坐标 默认 0
38
+ * @param languages 识别语言数组,默认为["zh-Hans", "en-US"]
39
+ * @returns 识别结果数组,包含文本、置信度、坐标等信息
40
+ * @example
41
+ * const results = appleOcr.recognize("screen", 0, 0, 100, 100, ["zh-Hans", "en-US"])
42
+ * results.forEach(result => {
43
+ * logi(`文本: ${result.text}, 置信度: ${result.confidence}`)
44
+ * })
45
+ */
46
+ function recognize(
47
+ input: string,
48
+ x?: number,
49
+ y?: number,
50
+ ex?: number,
51
+ ey?: number,
52
+ languages?: string[]
53
+ ): OCRResult[];
54
+
55
+ /**
56
+ * 执行OCR识别(仅识别数字)0-9.,+-
57
+ * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
58
+ * @param x 边界框左上角x坐标
59
+ * @param y 边界框左上角y坐标
60
+ * @param ex 边界框右下角x坐标
61
+ * @param ey 边界框右下角y坐标
62
+ * @returns 识别结果数组,包含文本、置信度、坐标等信息
63
+ * @example
64
+ * const results = appleOcr.recognizeNumbers("screen", 0, 0, 100, 100)
65
+ * results.forEach(result => {
66
+ * logi(`文本: ${result.text}, 置信度: ${result.confidence}`)
67
+ * })
68
+ */
69
+ function recognizeNumbers(
70
+ input: string,
71
+ x?: number,
72
+ y?: number,
73
+ ex?: number,
74
+ ey?: number
75
+ ): OCRResult[];
76
+
77
+ /**
78
+ * 执行OCR识别(查找指定文本)
79
+ * @param input 输入源(imageId、URL字符串、文件路径或"screen","screen"表示使用当前屏幕)
80
+ * @param texts 要查找的文本数组
81
+ * @param x 边界框左上角x坐标
82
+ * @param y 边界框左上角y坐标
83
+ * @param ex 边界框右下角x坐标
84
+ * @param ey 边界框右下角y坐标
85
+ * @param languages 识别语言数组,默认为["zh-Hans", "en-US"]
86
+ * @returns 识别结果数组,包含文本、置信度、坐标等信息
87
+ * @example
88
+ * const results = appleOcr.findText("screen", ["123", "456"], 0, 0, 100, 100, ["zh-Hans", "en-US"])
89
+ * results.forEach(result => {
90
+ * logi(`文本: ${result.text}, 置信度: ${result.confidence}`)
91
+ * })
92
+ */
93
+ function findText(
94
+ input: string,
95
+ texts: string[],
96
+ x?: number,
97
+ y?: number,
98
+ ex?: number,
99
+ ey?: number,
100
+ languages?: string[]
101
+ ): OCRResult[];
102
+ }
package/types/config.d.ts CHANGED
@@ -1,97 +1,97 @@
1
- /**
2
- * 配置模块 包含读取配置、更新配置、删除配置等功能
3
- */
4
- declare namespace config {
5
- /**
6
- * 获取所有配置
7
- * @returns 所有配置
8
- * @example config.all()
9
- */
10
- function all(): Record<string, any>;
11
- /**
12
- * 设置所有配置项
13
- * @param config 包含所有配置项的字典
14
- * @returns 如果设置成功返回true,否则返回false
15
- * @example config.setAll({"key": 100})
16
- */
17
- function setAll(config: Record<string, any>): boolean;
18
- /**
19
- * 设置配置
20
- * @param key 配置key
21
- * @param value 配置值
22
- * @returns 设置是否成功
23
- * @example config.set("key", 100)
24
- */
25
- function set(key: string, value: any): boolean;
26
- /**
27
- * 获取配置
28
- * @param key 配置key
29
- * @returns 配置值
30
- * @example config.get("key")
31
- */
32
- function get(key: string): any | null;
33
- /**
34
- * 删除配置
35
- * @param key 配置key
36
- * @returns 删除是否成功
37
- * @example config.remove("key")
38
- */
39
- function remove(key: string): boolean;
40
-
41
- /**
42
- * 读取配置Int
43
- * @deprecated 请使用 config.get(key) 替代
44
- * @param key 配置key
45
- * @returns 配置值
46
- * @example config.readConfigInt("key")
47
- */
48
- function readConfigInt(key: string): number;
49
- /**
50
- * 读取配置Double
51
- * @deprecated 请使用 config.get(key) 替代
52
- * @param key 配置key
53
- * @returns 配置值
54
- * @example config.readConfigDouble("key")
55
- */
56
- function readConfigDouble(key: string): number;
57
- /**
58
- * 读取配置String
59
- * @deprecated 请使用 config.get(key) 替代
60
- * @param key 配置key
61
- * @returns 配置值,如果不存在返回 null
62
- * @example config.readConfigString("key")
63
- */
64
- function readConfigString(key: string): string | null;
65
- /**
66
- * 读取配置Bool
67
- * @deprecated 请使用 config.get(key) 替代
68
- * @param key 配置key
69
- * @returns 配置值
70
- * @example config.readConfigBool("key")
71
- */
72
- function readConfigBool(key: string): boolean;
73
- /**
74
- * 获取所有配置JSON
75
- * @deprecated 请使用 config.all() 替代
76
- * @returns 所有配置JSON
77
- * @example config.getConfigJSON()
78
- */
79
- function getConfigJSON(): Record<string, any>;
80
- /**
81
- * 更新配置
82
- * @deprecated 请使用 config.set(key, value) 替代
83
- * @param key 配置key
84
- * @param value 配置值
85
- * @returns 更新是否成功
86
- * @example config.updateConfig("key", 100)
87
- */
88
- function updateConfig(key: string, value: any): boolean;
89
- /**
90
- * 删除配置
91
- * @deprecated 请使用 config.remove(key) 替代
92
- * @param key 配置key
93
- * @returns 删除是否成功
94
- * @example config.deleteConfig("key")
95
- */
96
- function deleteConfig(key: string): boolean;
97
- }
1
+ /**
2
+ * 配置模块 包含读取配置、更新配置、删除配置等功能
3
+ */
4
+ declare namespace config {
5
+ /**
6
+ * 获取所有配置
7
+ * @returns 所有配置
8
+ * @example config.all()
9
+ */
10
+ function all(): Record<string, any>;
11
+ /**
12
+ * 设置所有配置项
13
+ * @param config 包含所有配置项的字典
14
+ * @returns 如果设置成功返回true,否则返回false
15
+ * @example config.setAll({"key": 100})
16
+ */
17
+ function setAll(config: Record<string, any>): boolean;
18
+ /**
19
+ * 设置配置
20
+ * @param key 配置key
21
+ * @param value 配置值
22
+ * @returns 设置是否成功
23
+ * @example config.set("key", 100)
24
+ */
25
+ function set(key: string, value: any): boolean;
26
+ /**
27
+ * 获取配置
28
+ * @param key 配置key
29
+ * @returns 配置值
30
+ * @example config.get("key")
31
+ */
32
+ function get(key: string): any | null;
33
+ /**
34
+ * 删除配置
35
+ * @param key 配置key
36
+ * @returns 删除是否成功
37
+ * @example config.remove("key")
38
+ */
39
+ function remove(key: string): boolean;
40
+
41
+ /**
42
+ * 读取配置Int
43
+ * @deprecated 请使用 config.get(key) 替代
44
+ * @param key 配置key
45
+ * @returns 配置值
46
+ * @example config.readConfigInt("key")
47
+ */
48
+ function readConfigInt(key: string): number;
49
+ /**
50
+ * 读取配置Double
51
+ * @deprecated 请使用 config.get(key) 替代
52
+ * @param key 配置key
53
+ * @returns 配置值
54
+ * @example config.readConfigDouble("key")
55
+ */
56
+ function readConfigDouble(key: string): number;
57
+ /**
58
+ * 读取配置String
59
+ * @deprecated 请使用 config.get(key) 替代
60
+ * @param key 配置key
61
+ * @returns 配置值,如果不存在返回 null
62
+ * @example config.readConfigString("key")
63
+ */
64
+ function readConfigString(key: string): string | null;
65
+ /**
66
+ * 读取配置Bool
67
+ * @deprecated 请使用 config.get(key) 替代
68
+ * @param key 配置key
69
+ * @returns 配置值
70
+ * @example config.readConfigBool("key")
71
+ */
72
+ function readConfigBool(key: string): boolean;
73
+ /**
74
+ * 获取所有配置JSON
75
+ * @deprecated 请使用 config.all() 替代
76
+ * @returns 所有配置JSON
77
+ * @example config.getConfigJSON()
78
+ */
79
+ function getConfigJSON(): Record<string, any>;
80
+ /**
81
+ * 更新配置
82
+ * @deprecated 请使用 config.set(key, value) 替代
83
+ * @param key 配置key
84
+ * @param value 配置值
85
+ * @returns 更新是否成功
86
+ * @example config.updateConfig("key", 100)
87
+ */
88
+ function updateConfig(key: string, value: any): boolean;
89
+ /**
90
+ * 删除配置
91
+ * @deprecated 请使用 config.remove(key) 替代
92
+ * @param key 配置key
93
+ * @returns 删除是否成功
94
+ * @example config.deleteConfig("key")
95
+ */
96
+ function deleteConfig(key: string): boolean;
97
+ }
@@ -1,59 +1,59 @@
1
- declare namespace cryptoUtils {
2
- /// 使用AES ECB模式加密数据 默认使用PKCS7填充
3
- /// - Parameters:
4
- /// - data: 要加密的数据
5
- /// - aesKey: AES密钥 支持16位、24位、32位字符串
6
- /// - noPadding: 是否禁用填充,默认为false, 默认使用PKCS7填充
7
- /// - Returns: 加密后的数据
8
- function encryptWithAES_ECB(
9
- data: string,
10
- aesKey: string,
11
- noPadding?: boolean
12
- ): string;
13
-
14
- /// 使用AES ECB模式解密数据 默认使用PKCS7填充
15
- /// - Parameters:
16
- /// - data: 要解密的数据
17
- /// - aesKey: AES密钥 支持16位、24位、32位字符串
18
- /// - noPadding: 是否禁用填充,默认为false, 默认使用PKCS7填充
19
- /// - Returns: 解密后的数据
20
- function decryptWithAES_ECB(
21
- data: string,
22
- aesKey: string,
23
- noPadding?: boolean
24
- ): string;
25
-
26
- /// 使用RSA公钥加密数据 默认使用PKCS1填充
27
- /// - Parameters:
28
- /// - data: 要加密的数据
29
- /// - rsaPublicKey: RSA公钥
30
- /// - Returns: 加密后的数据
31
- function encryptWithRSA(data: string, rsaPublicKey: string): string;
32
-
33
- /// 使用RSA私钥解密数据 默认使用PKCS1填充
34
- /// - Parameters:
35
- /// - data: 要解密的数据
36
- /// - rsaPrivateKey: RSA私钥
37
- /// - Returns: 解密后的数据
38
- function decryptWithRSA(data: string, rsaPrivateKey: string): string;
39
-
40
- /// 计算MD5值
41
- /// - Parameters:
42
- /// - data: 要计算MD5的值
43
- /// - Returns: MD5值
44
- function md5(data: string): string;
45
-
46
- /// 计算SHA1值
47
- /// - Parameters:
48
- /// - data: 要计算SHA1的值
49
- /// - key: 可选的密钥,用于HMAC-SHA1
50
- /// - Returns: SHA1值
51
- function sha1(data: string, key?: string): string;
52
-
53
- /// 计算SHA256值
54
- /// - Parameters:
55
- /// - data: 要计算SHA256的值
56
- /// - key: 可选的密钥,用于HMAC-SHA256
57
- /// - Returns: SHA256值
58
- function sha256(data: string, key?: string): string;
59
- }
1
+ declare namespace cryptoUtils {
2
+ /// 使用AES ECB模式加密数据 默认使用PKCS7填充
3
+ /// - Parameters:
4
+ /// - data: 要加密的数据
5
+ /// - aesKey: AES密钥 支持16位、24位、32位字符串
6
+ /// - noPadding: 是否禁用填充,默认为false, 默认使用PKCS7填充
7
+ /// - Returns: 加密后的数据
8
+ function encryptWithAES_ECB(
9
+ data: string,
10
+ aesKey: string,
11
+ noPadding?: boolean
12
+ ): string;
13
+
14
+ /// 使用AES ECB模式解密数据 默认使用PKCS7填充
15
+ /// - Parameters:
16
+ /// - data: 要解密的数据
17
+ /// - aesKey: AES密钥 支持16位、24位、32位字符串
18
+ /// - noPadding: 是否禁用填充,默认为false, 默认使用PKCS7填充
19
+ /// - Returns: 解密后的数据
20
+ function decryptWithAES_ECB(
21
+ data: string,
22
+ aesKey: string,
23
+ noPadding?: boolean
24
+ ): string;
25
+
26
+ /// 使用RSA公钥加密数据 默认使用PKCS1填充
27
+ /// - Parameters:
28
+ /// - data: 要加密的数据
29
+ /// - rsaPublicKey: RSA公钥
30
+ /// - Returns: 加密后的数据
31
+ function encryptWithRSA(data: string, rsaPublicKey: string): string;
32
+
33
+ /// 使用RSA私钥解密数据 默认使用PKCS1填充
34
+ /// - Parameters:
35
+ /// - data: 要解密的数据
36
+ /// - rsaPrivateKey: RSA私钥
37
+ /// - Returns: 解密后的数据
38
+ function decryptWithRSA(data: string, rsaPrivateKey: string): string;
39
+
40
+ /// 计算MD5值
41
+ /// - Parameters:
42
+ /// - data: 要计算MD5的值
43
+ /// - Returns: MD5值
44
+ function md5(data: string): string;
45
+
46
+ /// 计算SHA1值
47
+ /// - Parameters:
48
+ /// - data: 要计算SHA1的值
49
+ /// - key: 可选的密钥,用于HMAC-SHA1
50
+ /// - Returns: SHA1值
51
+ function sha1(data: string, key?: string): string;
52
+
53
+ /// 计算SHA256值
54
+ /// - Parameters:
55
+ /// - data: 要计算SHA256的值
56
+ /// - key: 可选的密钥,用于HMAC-SHA256
57
+ /// - Returns: SHA256值
58
+ function sha256(data: string, key?: string): string;
59
+ }