ms-vite-plugin 1.4.41 → 1.4.45
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/docs/api/global.md +70 -15
- package/docs/api/node.md +239 -348
- package/docs/apicn/global.md +65 -10
- package/docs/apicn/node.md +242 -365
- package/docs/apipython/g.md +74 -23
- package/docs/apipython/node.md +186 -287
- package/docs/httpapi/api.md +190 -189
- package/package.json +1 -1
package/docs/httpapi/api.md
CHANGED
|
@@ -155,10 +155,10 @@ GET /api/source
|
|
|
155
155
|
|
|
156
156
|
### 请求参数
|
|
157
157
|
|
|
158
|
-
| 名称 | 位置 | 类型 | 必选 | 说明
|
|
159
|
-
| --------- | ----- | ------- | ---- |
|
|
160
|
-
| max_depth | query | integer | 是 | 页面深度,值越小快照成本越低
|
|
161
|
-
| timeout | query | integer | 是 | 超时时间(单位秒)
|
|
158
|
+
| 名称 | 位置 | 类型 | 必选 | 说明 |
|
|
159
|
+
| --------- | ----- | ------- | ---- | ------------------------------------------------ |
|
|
160
|
+
| max_depth | query | integer | 是 | 页面深度,值越小快照成本越低 |
|
|
161
|
+
| timeout | query | integer | 是 | 超时时间(单位秒) |
|
|
162
162
|
| mode | query | integer | 否 | 抓取模式。支持模式 1、模式 2、模式 3,默认模式 1 |
|
|
163
163
|
|
|
164
164
|
> 返回示例
|
|
@@ -324,9 +324,9 @@ GET /api/isLocked
|
|
|
324
324
|
|
|
325
325
|
状态码 **200**
|
|
326
326
|
|
|
327
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
328
|
-
| --------- | ------- | ---- | ---- | -------- |
|
|
329
|
-
| » success | boolean | true | none | 是否成功 | none
|
|
327
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
328
|
+
| --------- | ------- | ---- | ---- | -------- | ------------------------------------- |
|
|
329
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
330
330
|
| » data | boolean | true | none | 是否锁屏 | `true` 表示已锁屏,`false` 表示未锁屏 |
|
|
331
331
|
|
|
332
332
|
## GET 锁屏
|
|
@@ -540,9 +540,9 @@ GET /api/getClipboard
|
|
|
540
540
|
|
|
541
541
|
状态码 **200**
|
|
542
542
|
|
|
543
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
544
|
-
| --------- | ------- | ---- | ---- | ---------- |
|
|
545
|
-
| » success | boolean | true | none | 是否成功 | none
|
|
543
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
544
|
+
| --------- | ------- | ---- | ---- | ---------- | ------------------------- |
|
|
545
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
546
546
|
| » data | string | true | none | 剪切板内容 | 空内容或读取失败时为 `""` |
|
|
547
547
|
|
|
548
548
|
## GET 设置系统剪切板
|
|
@@ -553,8 +553,8 @@ GET /api/setClipboard
|
|
|
553
553
|
|
|
554
554
|
### 请求参数
|
|
555
555
|
|
|
556
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
557
|
-
| ---- | ----- | ------ | ---- | ---------- |
|
|
556
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
557
|
+
| ---- | ----- | ------ | ---- | ---------- | ------------------------------------- |
|
|
558
558
|
| text | query | string | 是 | 剪切板内容 | 需要 URL 编码;空字符串表示清空剪切板 |
|
|
559
559
|
|
|
560
560
|
> 返回示例
|
|
@@ -599,9 +599,9 @@ POST /api/login
|
|
|
599
599
|
|
|
600
600
|
### 请求参数
|
|
601
601
|
|
|
602
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
603
|
-
| ------------ | ---- | ------ | ---- | ---------- |
|
|
604
|
-
| body | body | object | 是 | | none
|
|
602
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
603
|
+
| ------------ | ---- | ------ | ---- | ---------- | -------------------------------------- |
|
|
604
|
+
| body | body | object | 是 | | none |
|
|
605
605
|
| » serverType | body | string | 是 | 服务器类型 | 用户授权模式下使用;授权卡密模式下忽略 |
|
|
606
606
|
| » username | body | string | 是 | 用户名 | 用户授权模式下使用;授权卡密模式下忽略 |
|
|
607
607
|
| » password | body | string | 是 | 密码 | 用户授权模式下使用;授权卡密模式下忽略 |
|
|
@@ -741,53 +741,53 @@ GET /api/status
|
|
|
741
741
|
|
|
742
742
|
状态码 **200**
|
|
743
743
|
|
|
744
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
745
|
-
| ------------------------- | --------------------------- | ---- | ---- | ------------------------------- |
|
|
746
|
-
| » success | boolean | true | none | 是否成功 | none
|
|
747
|
-
| » data | [软件状态](#schema软件状态) | true | none | | none
|
|
748
|
-
| »» deviceIp | string | true | none | 设备IP | none
|
|
749
|
-
| »» screenInfo | object | true | none | 屏幕信息 | none
|
|
750
|
-
| »»» logicWidth | integer | true | none | 逻辑宽带 | none
|
|
751
|
-
| »»» logicHeight | integer | true | none | 逻辑高度 | none
|
|
752
|
-
| »»» height | integer | true | none | 物理高度 | none
|
|
753
|
-
| »»» width | integer | true | none | 物理宽度 | none
|
|
754
|
-
| »»» scale | number | true | none | 缩放比 | none
|
|
755
|
-
| »» deviceName | string | true | none | 设备名称 | none
|
|
756
|
-
| »» batteryInfo | object | true | none | 电池信息 | none
|
|
757
|
-
| »»» level | integer | true | none | 电量 1-100 | none
|
|
758
|
-
| »»» isCharging | boolean | true | none | 是否充电中 | none
|
|
759
|
-
| »» appName | string | true | none | app名称 | none
|
|
760
|
-
| »» appBuildNumber | integer | true | none | app构建号 | none
|
|
761
|
-
| »» appBundleId | string | true | none | app 包名 | none
|
|
762
|
-
| »» appNo | string | true | none | 当前软件编号 | 未加载软件时为空字符串
|
|
763
|
-
| »» deviceModel | string | true | none | 设备型号 | none
|
|
764
|
-
| »» agentConnected | boolean | true | none | agent是否连接 | none
|
|
765
|
-
| »» isRun | boolean | true | none | 脚本是否启动 | none
|
|
766
|
-
| »» isDebugMode | boolean | true | none | 是否调试模式运行 | none
|
|
767
|
-
| »» isDebugAuth | boolean | true | none | 是否拥有调试授权 | none
|
|
768
|
-
| »» isAuth | boolean | true | none | 是否授权 | none
|
|
769
|
-
| »» isRecording | boolean | true | none | 是否录屏中 | none
|
|
770
|
-
| »» udid | string | true | none | 设备唯一 UDID | none
|
|
744
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
745
|
+
| ------------------------- | --------------------------- | ---- | ---- | ------------------------------- | ---------------------------------------- |
|
|
746
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
747
|
+
| » data | [软件状态](#schema软件状态) | true | none | | none |
|
|
748
|
+
| »» deviceIp | string | true | none | 设备IP | none |
|
|
749
|
+
| »» screenInfo | object | true | none | 屏幕信息 | none |
|
|
750
|
+
| »»» logicWidth | integer | true | none | 逻辑宽带 | none |
|
|
751
|
+
| »»» logicHeight | integer | true | none | 逻辑高度 | none |
|
|
752
|
+
| »»» height | integer | true | none | 物理高度 | none |
|
|
753
|
+
| »»» width | integer | true | none | 物理宽度 | none |
|
|
754
|
+
| »»» scale | number | true | none | 缩放比 | none |
|
|
755
|
+
| »» deviceName | string | true | none | 设备名称 | none |
|
|
756
|
+
| »» batteryInfo | object | true | none | 电池信息 | none |
|
|
757
|
+
| »»» level | integer | true | none | 电量 1-100 | none |
|
|
758
|
+
| »»» isCharging | boolean | true | none | 是否充电中 | none |
|
|
759
|
+
| »» appName | string | true | none | app名称 | none |
|
|
760
|
+
| »» appBuildNumber | integer | true | none | app构建号 | none |
|
|
761
|
+
| »» appBundleId | string | true | none | app 包名 | none |
|
|
762
|
+
| »» appNo | string | true | none | 当前软件编号 | 未加载软件时为空字符串 |
|
|
763
|
+
| »» deviceModel | string | true | none | 设备型号 | none |
|
|
764
|
+
| »» agentConnected | boolean | true | none | agent是否连接 | none |
|
|
765
|
+
| »» isRun | boolean | true | none | 脚本是否启动 | none |
|
|
766
|
+
| »» isDebugMode | boolean | true | none | 是否调试模式运行 | none |
|
|
767
|
+
| »» isDebugAuth | boolean | true | none | 是否拥有调试授权 | none |
|
|
768
|
+
| »» isAuth | boolean | true | none | 是否授权 | none |
|
|
769
|
+
| »» isRecording | boolean | true | none | 是否录屏中 | none |
|
|
770
|
+
| »» udid | string | true | none | 设备唯一 UDID | none |
|
|
771
771
|
| »» authMode | string | true | none | 授权模式 | `user` 表示用户授权,`card` 表示授权卡密 |
|
|
772
|
-
| »» serverDeviceId | string | true | none | 服务器设备ID | none
|
|
773
|
-
| »» orientation | string | true | none | 屏幕方向 | none
|
|
774
|
-
| »» memory | object | true | none | 内存状态 | 单位为 MB,字段与系统模块内存信息一致
|
|
775
|
-
| »»» used | number | true | none | 应用已用内存 | 当前应用内存占用,单位 MB
|
|
776
|
-
| »»» available | number | true | none | 系统可用内存 | 系统可用内存,单位 MB
|
|
777
|
-
| »»» total | number | true | none | 系统总内存 | 物理内存总量,单位 MB
|
|
778
|
-
| »»» systemUsed | number | true | none | 系统已用内存 | 系统已用内存,单位 MB
|
|
779
|
-
| »»» usagePercentage | integer | true | none | 系统内存使用率 | 系统已用内存占总内存百分比
|
|
780
|
-
| »» cpuUsage | number | true | none | CPU 使用率 | 当前应用 CPU 使用率百分比
|
|
781
|
-
| »» osVersion | string | true | none | 系统版本 | none
|
|
782
|
-
| »» ecid | string | true | none | 设备唯一 ECID | none
|
|
783
|
-
| »» isVolumeControlEnabled | boolean | true | none | 是否开启了音量键启停 | none
|
|
784
|
-
| »» agentVersion | string | true | none | agent版本号 | none
|
|
785
|
-
| »» appVersion | string | true | none | app版本号 | none
|
|
786
|
-
| »» serverType | string | true | none | 授权服务器类型 | none
|
|
787
|
-
| »» isHidConnected | boolean | true | none | hid设备是否连接 | none
|
|
788
|
-
| »» isShowUI | boolean | true | none | 实现显示了 UI | none
|
|
789
|
-
| »» isLogin | boolean | true | none | 是否登录 | none
|
|
790
|
-
| »» deviceId | string | true | none | 设备 ID,应用唯一,卸载重装变化 | none
|
|
772
|
+
| »» serverDeviceId | string | true | none | 服务器设备ID | none |
|
|
773
|
+
| »» orientation | string | true | none | 屏幕方向 | none |
|
|
774
|
+
| »» memory | object | true | none | 内存状态 | 单位为 MB,字段与系统模块内存信息一致 |
|
|
775
|
+
| »»» used | number | true | none | 应用已用内存 | 当前应用内存占用,单位 MB |
|
|
776
|
+
| »»» available | number | true | none | 系统可用内存 | 系统可用内存,单位 MB |
|
|
777
|
+
| »»» total | number | true | none | 系统总内存 | 物理内存总量,单位 MB |
|
|
778
|
+
| »»» systemUsed | number | true | none | 系统已用内存 | 系统已用内存,单位 MB |
|
|
779
|
+
| »»» usagePercentage | integer | true | none | 系统内存使用率 | 系统已用内存占总内存百分比 |
|
|
780
|
+
| »» cpuUsage | number | true | none | CPU 使用率 | 当前应用 CPU 使用率百分比 |
|
|
781
|
+
| »» osVersion | string | true | none | 系统版本 | none |
|
|
782
|
+
| »» ecid | string | true | none | 设备唯一 ECID | none |
|
|
783
|
+
| »» isVolumeControlEnabled | boolean | true | none | 是否开启了音量键启停 | none |
|
|
784
|
+
| »» agentVersion | string | true | none | agent版本号 | none |
|
|
785
|
+
| »» appVersion | string | true | none | app版本号 | none |
|
|
786
|
+
| »» serverType | string | true | none | 授权服务器类型 | none |
|
|
787
|
+
| »» isHidConnected | boolean | true | none | hid设备是否连接 | none |
|
|
788
|
+
| »» isShowUI | boolean | true | none | 实现显示了 UI | none |
|
|
789
|
+
| »» isLogin | boolean | true | none | 是否登录 | none |
|
|
790
|
+
| »» deviceId | string | true | none | 设备 ID,应用唯一,卸载重装变化 | none |
|
|
791
791
|
|
|
792
792
|
#### 枚举值
|
|
793
793
|
|
|
@@ -949,10 +949,10 @@ WebSocket Upgrade /mirror/ws
|
|
|
949
949
|
|
|
950
950
|
### 请求参数
|
|
951
951
|
|
|
952
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
953
|
-
| ------------- | ----- | ------- | ---- | ------ |
|
|
954
|
-
| fps | query | integer | 否 | | 帧率,默认 10,范围 1-60
|
|
955
|
-
| quality | query | number | 否 | | 质量,默认 0.25,范围 0.1-1.0
|
|
952
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
953
|
+
| ------------- | ----- | ------- | ---- | ------ | -------------------------------- |
|
|
954
|
+
| fps | query | integer | 否 | | 帧率,默认 10,范围 1-60 |
|
|
955
|
+
| quality | query | number | 否 | | 质量,默认 0.25,范围 0.1-1.0 |
|
|
956
956
|
| scalingFactor | query | number | 否 | | 缩放比例,默认 1.0,范围 0.1-1.0 |
|
|
957
957
|
|
|
958
958
|
### 返回数据
|
|
@@ -965,11 +965,11 @@ GET /mirror/flv
|
|
|
965
965
|
|
|
966
966
|
### 请求参数
|
|
967
967
|
|
|
968
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
969
|
-
| ------------- | ----- | ------- | ---- | ------ |
|
|
970
|
-
| fps | query | integer | 否 | | 帧率,默认 10,范围 1-60
|
|
968
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
969
|
+
| ------------- | ----- | ------- | ---- | ------ | ------------------------------------ |
|
|
970
|
+
| fps | query | integer | 否 | | 帧率,默认 10,范围 1-60 |
|
|
971
971
|
| quality | query | number | 否 | | JPEG 源质量,默认 0.25,范围 0.1-1.0 |
|
|
972
|
-
| scalingFactor | query | number | 否 | | 缩放比例,默认 1.0,范围 0.1-1.0
|
|
972
|
+
| scalingFactor | query | number | 否 | | 缩放比例,默认 1.0,范围 0.1-1.0 |
|
|
973
973
|
| bitrate | query | number | 否 | | H.264 目标码率,单位 Mbps,默认 4 |
|
|
974
974
|
|
|
975
975
|
### 返回数据
|
|
@@ -1139,10 +1139,7 @@ GET /logger/current/lines
|
|
|
1139
1139
|
|
|
1140
1140
|
```json
|
|
1141
1141
|
{
|
|
1142
|
-
"lines": [
|
|
1143
|
-
"string",
|
|
1144
|
-
"string"
|
|
1145
|
-
],
|
|
1142
|
+
"lines": ["string", "string"],
|
|
1146
1143
|
"hasMore": true
|
|
1147
1144
|
}
|
|
1148
1145
|
```
|
|
@@ -1962,17 +1959,21 @@ GET /api/control/openURL
|
|
|
1962
1959
|
| --------- | ------- | ---- | ---- | -------- | ---- |
|
|
1963
1960
|
| » success | boolean | true | none | 是否成功 | none |
|
|
1964
1961
|
|
|
1965
|
-
## GET 设置 Agent
|
|
1962
|
+
## GET 设置 Agent 触控模式
|
|
1966
1963
|
|
|
1967
|
-
GET /api/control/
|
|
1964
|
+
GET /api/control/setAgentTouchMode
|
|
1968
1965
|
|
|
1969
|
-
|
|
1966
|
+
默认 `1`,设置会持久化。
|
|
1967
|
+
|
|
1968
|
+
- `0` 标准:等待完整执行完成
|
|
1969
|
+
- `1` 快速:更快的执行速度
|
|
1970
|
+
- `2` 真实点击:更接近真实手指触控
|
|
1970
1971
|
|
|
1971
1972
|
### 请求参数
|
|
1972
1973
|
|
|
1973
|
-
| 名称
|
|
1974
|
-
|
|
|
1975
|
-
|
|
|
1974
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
1975
|
+
| ---- | ----- | ------ | ---- | ------ | ---------------------------- |
|
|
1976
|
+
| mode | query | number | 是 | 模式 | 0 标准 / 1 快速 / 2 真实点击 |
|
|
1976
1977
|
|
|
1977
1978
|
> 返回示例
|
|
1978
1979
|
|
|
@@ -1981,7 +1982,7 @@ GET /api/control/setAgentFastMode
|
|
|
1981
1982
|
```json
|
|
1982
1983
|
{
|
|
1983
1984
|
"success": true,
|
|
1984
|
-
"data":
|
|
1985
|
+
"data": 1
|
|
1985
1986
|
}
|
|
1986
1987
|
```
|
|
1987
1988
|
|
|
@@ -1995,14 +1996,14 @@ GET /api/control/setAgentFastMode
|
|
|
1995
1996
|
|
|
1996
1997
|
状态码 **200**
|
|
1997
1998
|
|
|
1998
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
1999
|
-
| --------- | ------- | ---- | ---- | -------------- |
|
|
2000
|
-
| » success | boolean | true | none | 是否成功 | none
|
|
2001
|
-
| » data |
|
|
1999
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2000
|
+
| --------- | ------- | ---- | ---- | -------------- | ----------------------- |
|
|
2001
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2002
|
+
| » data | number | true | none | Agent 触控模式 | 设置后的 Agent 触控模式 |
|
|
2002
2003
|
|
|
2003
|
-
## GET 获取 Agent
|
|
2004
|
+
## GET 获取 Agent 触控模式
|
|
2004
2005
|
|
|
2005
|
-
GET /api/control/
|
|
2006
|
+
GET /api/control/getAgentTouchMode
|
|
2006
2007
|
|
|
2007
2008
|
### 返回示例
|
|
2008
2009
|
|
|
@@ -2011,7 +2012,7 @@ GET /api/control/getAgentFastMode
|
|
|
2011
2012
|
```json
|
|
2012
2013
|
{
|
|
2013
2014
|
"success": true,
|
|
2014
|
-
"data":
|
|
2015
|
+
"data": 1
|
|
2015
2016
|
}
|
|
2016
2017
|
```
|
|
2017
2018
|
|
|
@@ -2025,10 +2026,10 @@ GET /api/control/getAgentFastMode
|
|
|
2025
2026
|
|
|
2026
2027
|
状态码 **200**
|
|
2027
2028
|
|
|
2028
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
2029
|
-
| --------- | ------- | ---- | ---- | -------------- |
|
|
2030
|
-
| » success | boolean | true | none | 是否成功 | none
|
|
2031
|
-
| » data |
|
|
2029
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2030
|
+
| --------- | ------- | ---- | ---- | -------------- | ------------------- |
|
|
2031
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2032
|
+
| » data | number | true | none | Agent 触控模式 | 当前 Agent 触控模式 |
|
|
2032
2033
|
|
|
2033
2034
|
## POST W3CActions
|
|
2034
2035
|
|
|
@@ -2852,15 +2853,15 @@ GET /api/hid/deviceInfo
|
|
|
2852
2853
|
|
|
2853
2854
|
状态码 **200**
|
|
2854
2855
|
|
|
2855
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
2856
|
-
| ------------ | ------- | ---- | ---- | -------- |
|
|
2857
|
-
| » success | boolean | true | none | 是否成功 | none
|
|
2858
|
-
| » data | object | true | none | 设备信息 | none
|
|
2856
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
2857
|
+
| ------------ | ------- | ---- | ---- | -------- | ---------------------------- |
|
|
2858
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
2859
|
+
| » data | object | true | none | 设备信息 | none |
|
|
2859
2860
|
| »» connected | boolean | true | none | 连接状态 | USB 或 BLE 任一就绪为 `true` |
|
|
2860
|
-
| »» name | string | true | none | 设备名称 | BLE 外设名;USB 通常为 `""`
|
|
2861
|
-
| »» mac | string | true | none | 设备 MAC | 未连接或查询失败为 `""`
|
|
2862
|
-
| »» model | string | true | none | 设备型号 | 如 `esp32s3`;失败为 `""`
|
|
2863
|
-
| »» version | string | true | none | 设备版本 | 固件版本;失败为 `""`
|
|
2861
|
+
| »» name | string | true | none | 设备名称 | BLE 外设名;USB 通常为 `""` |
|
|
2862
|
+
| »» mac | string | true | none | 设备 MAC | 未连接或查询失败为 `""` |
|
|
2863
|
+
| »» model | string | true | none | 设备型号 | 如 `esp32s3`;失败为 `""` |
|
|
2864
|
+
| »» version | string | true | none | 设备版本 | 固件版本;失败为 `""` |
|
|
2864
2865
|
|
|
2865
2866
|
## POST 保存图像到相册
|
|
2866
2867
|
|
|
@@ -3016,11 +3017,11 @@ POST /api/file/upload
|
|
|
3016
3017
|
|
|
3017
3018
|
### 请求参数
|
|
3018
3019
|
|
|
3019
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
3020
|
-
| ------- | ----- | -------------- | ---- | -------- |
|
|
3021
|
-
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents`
|
|
3020
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
3021
|
+
| ------- | ----- | -------------- | ---- | -------- | -------------------------------------------------------------- |
|
|
3022
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
3022
3023
|
| path | query | string | 是 | 路径 | 目标文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
3023
|
-
| body | body | string(binary) | 是 | 文件内容 | 文件原始二进制数据,不是 multipart
|
|
3024
|
+
| body | body | string(binary) | 是 | 文件内容 | 文件原始二进制数据,不是 multipart |
|
|
3024
3025
|
|
|
3025
3026
|
### 请求体
|
|
3026
3027
|
|
|
@@ -3060,9 +3061,9 @@ GET /api/file/exists
|
|
|
3060
3061
|
|
|
3061
3062
|
### 请求参数
|
|
3062
3063
|
|
|
3063
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
3064
|
-
| ------- | ----- | ------ | ---- | -------- |
|
|
3065
|
-
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents`
|
|
3064
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
3065
|
+
| ------- | ----- | ------ | ---- | -------- | -------------------------------------------------------------- |
|
|
3066
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
3066
3067
|
| path | query | string | 是 | 路径 | 目标文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
3067
3068
|
|
|
3068
3069
|
> 返回示例
|
|
@@ -3090,11 +3091,11 @@ GET /api/file/exists
|
|
|
3090
3091
|
|
|
3091
3092
|
状态码 **200**
|
|
3092
3093
|
|
|
3093
|
-
| 名称
|
|
3094
|
-
|
|
|
3095
|
-
| » success
|
|
3096
|
-
| » data
|
|
3097
|
-
| »» exists
|
|
3094
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
3095
|
+
| --------- | ------- | ---- | ---- | ------------ | ------------------------ |
|
|
3096
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
3097
|
+
| » data | object | true | none | 文件状态 | none |
|
|
3098
|
+
| »» exists | boolean | true | none | 文件是否存在 | 只判断文件,目录不算存在 |
|
|
3098
3099
|
|
|
3099
3100
|
## GET 删除沙盒文件
|
|
3100
3101
|
|
|
@@ -3102,9 +3103,9 @@ GET /api/file/delete
|
|
|
3102
3103
|
|
|
3103
3104
|
### 请求参数
|
|
3104
3105
|
|
|
3105
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
3106
|
-
| ------- | ----- | ------ | ---- | -------- |
|
|
3107
|
-
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents`
|
|
3106
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
3107
|
+
| ------- | ----- | ------ | ---- | -------- | -------------------------------------------------------------- |
|
|
3108
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
3108
3109
|
| path | query | string | 是 | 路径 | 目标文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
3109
3110
|
|
|
3110
3111
|
> 返回示例
|
|
@@ -3119,12 +3120,12 @@ GET /api/file/delete
|
|
|
3119
3120
|
|
|
3120
3121
|
### 返回结果
|
|
3121
3122
|
|
|
3122
|
-
| 状态码 | 状态码含义 | 说明
|
|
3123
|
-
| ------ | ---------------------------------------------------------------- |
|
|
3124
|
-
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none
|
|
3123
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
3124
|
+
| ------ | ---------------------------------------------------------------- | ------------------------ | -------- |
|
|
3125
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | Inline |
|
|
3125
3126
|
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | 参数不合法或目标不是文件 | Inline |
|
|
3126
|
-
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权
|
|
3127
|
-
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 文件不存在
|
|
3127
|
+
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | 设备未授权 | Inline |
|
|
3128
|
+
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | 文件不存在 | Inline |
|
|
3128
3129
|
|
|
3129
3130
|
### 返回数据结构
|
|
3130
3131
|
|
|
@@ -3140,9 +3141,9 @@ GET /api/file/list
|
|
|
3140
3141
|
|
|
3141
3142
|
### 请求参数
|
|
3142
3143
|
|
|
3143
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
3144
|
-
| ------- | ----- | ------ | ---- | -------- |
|
|
3145
|
-
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents`
|
|
3144
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
3145
|
+
| ------- | ----- | ------ | ---- | -------- | -------------------------------------------------------------------------- |
|
|
3146
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
3146
3147
|
| path | query | string | 否 | 路径 | 起始目录路径。空值表示所选根目录;支持 `/foo` 或 `foo`,会拼接到所选目录下 |
|
|
3147
3148
|
|
|
3148
3149
|
> 返回示例
|
|
@@ -3182,14 +3183,14 @@ GET /api/file/list
|
|
|
3182
3183
|
|
|
3183
3184
|
状态码 **200**
|
|
3184
3185
|
|
|
3185
|
-
| 名称
|
|
3186
|
-
|
|
|
3187
|
-
| » success
|
|
3188
|
-
| » data
|
|
3189
|
-
| »» name
|
|
3190
|
-
| »» path
|
|
3191
|
-
| »» isDirectory
|
|
3192
|
-
| »» size
|
|
3186
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
3187
|
+
| -------------- | ------- | ---- | ---- | -------- | ------------------------------------------------------ |
|
|
3188
|
+
| » success | boolean | true | none | 是否成功 | none |
|
|
3189
|
+
| » data | array | true | none | 目录列表 | none |
|
|
3190
|
+
| »» name | string | true | none | 名称 | 文件或目录名 |
|
|
3191
|
+
| »» path | string | true | none | 相对路径 | 相对所选根目录的路径 |
|
|
3192
|
+
| »» isDirectory | boolean | true | none | 是否目录 | none |
|
|
3193
|
+
| »» size | integer | true | none | 文件大小 | 文件字节数,目录返回 0;结果包含起始目录下所有后代路径 |
|
|
3193
3194
|
|
|
3194
3195
|
## GET 删除沙盒目录
|
|
3195
3196
|
|
|
@@ -3197,9 +3198,9 @@ GET /api/file/deleteDir
|
|
|
3197
3198
|
|
|
3198
3199
|
### 请求参数
|
|
3199
3200
|
|
|
3200
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
3201
|
-
| ------- | ----- | ------ | ---- | -------- |
|
|
3202
|
-
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents`
|
|
3201
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
3202
|
+
| ------- | ----- | ------ | ---- | -------- | -------------------------------------------------- |
|
|
3203
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
3203
3204
|
| path | query | string | 是 | 路径 | 目录路径。支持 `/foo` 或 `foo`,会拼接到所选目录下 |
|
|
3204
3205
|
|
|
3205
3206
|
> 返回示例
|
|
@@ -3235,9 +3236,9 @@ GET /api/file/download
|
|
|
3235
3236
|
|
|
3236
3237
|
### 请求参数
|
|
3237
3238
|
|
|
3238
|
-
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明
|
|
3239
|
-
| ------- | ----- | ------ | ---- | -------- |
|
|
3240
|
-
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents`
|
|
3239
|
+
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|
|
3240
|
+
| ------- | ----- | ------ | ---- | -------- | ---------------------------------------------------------- |
|
|
3241
|
+
| dirType | query | string | 是 | 目录类型 | 支持 `temp`、`documents` |
|
|
3241
3242
|
| path | query | string | 是 | 路径 | 文件路径。支持 `/foo.bin` 或 `foo.bin`,会拼接到所选目录下 |
|
|
3242
3243
|
|
|
3243
3244
|
### 返回结果
|
|
@@ -3257,19 +3258,19 @@ GET /mirror/image
|
|
|
3257
3258
|
|
|
3258
3259
|
### 请求参数
|
|
3259
3260
|
|
|
3260
|
-
| 名称 | 位置 | 类型 | 必选 | 说明
|
|
3261
|
-
| ------------- | ----- | ------- | ---- |
|
|
3262
|
-
| fps | query | integer | 否 | 目标帧率,范围 1-60,默认 10
|
|
3263
|
-
| quality | query | number | 否 | JPEG 质量,范围 0.1-1.0,默认 0.25
|
|
3261
|
+
| 名称 | 位置 | 类型 | 必选 | 说明 |
|
|
3262
|
+
| ------------- | ----- | ------- | ---- | ------------------------------------ |
|
|
3263
|
+
| fps | query | integer | 否 | 目标帧率,范围 1-60,默认 10 |
|
|
3264
|
+
| quality | query | number | 否 | JPEG 质量,范围 0.1-1.0,默认 0.25 |
|
|
3264
3265
|
| scalingFactor | query | number | 否 | 截图缩放因子,范围 0.1-1.0,默认 1.0 |
|
|
3265
3266
|
|
|
3266
3267
|
### 返回结果
|
|
3267
3268
|
|
|
3268
|
-
| 状态码 | 状态码含义
|
|
3269
|
-
| ------ |
|
|
3270
|
-
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)
|
|
3271
|
-
| 429 | [Too Many Requests](https://tools.ietf.org/html/rfc6585#section-4)
|
|
3272
|
-
| 503 | [Service Unavailable](https://tools.ietf.org/html/rfc7231#section-6.6.4) | HID 录屏链路未就绪
|
|
3269
|
+
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|
|
3270
|
+
| ------ | ------------------------------------------------------------------------ | -------------------------------------------------------------- | -------- |
|
|
3271
|
+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | `multipart/x-mixed-replace; boundary=kuaijs-mjpeg-boundary` 流 | file |
|
|
3272
|
+
| 429 | [Too Many Requests](https://tools.ietf.org/html/rfc6585#section-4) | 镜像流客户端数量已满 | Inline |
|
|
3273
|
+
| 503 | [Service Unavailable](https://tools.ietf.org/html/rfc7231#section-6.6.4) | HID 录屏链路未就绪 | Inline |
|
|
3273
3274
|
|
|
3274
3275
|
# 数据模型
|
|
3275
3276
|
|
|
@@ -3333,51 +3334,51 @@ GET /mirror/image
|
|
|
3333
3334
|
|
|
3334
3335
|
### 属性
|
|
3335
3336
|
|
|
3336
|
-
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明
|
|
3337
|
-
| ---------------------- | ------- | ---- | ---- | ------------------------------- |
|
|
3338
|
-
| deviceIp | string | true | none | 设备IP | none
|
|
3339
|
-
| screenInfo | object | true | none | 屏幕信息 | none
|
|
3340
|
-
| » logicWidth | integer | true | none | 逻辑宽带 | none
|
|
3341
|
-
| » logicHeight | integer | true | none | 逻辑高度 | none
|
|
3342
|
-
| » height | integer | true | none | 物理高度 | none
|
|
3343
|
-
| » width | integer | true | none | 物理宽度 | none
|
|
3344
|
-
| » scale | number | true | none | 缩放比 | none
|
|
3345
|
-
| deviceName | string | true | none | 设备名称 | none
|
|
3346
|
-
| batteryInfo | object | true | none | 电池信息 | none
|
|
3347
|
-
| » level | integer | true | none | 电量 1-100 | none
|
|
3348
|
-
| » isCharging | boolean | true | none | 是否充电中 | none
|
|
3349
|
-
| appName | string | true | none | app名称 | none
|
|
3350
|
-
| appBuildNumber | integer | true | none | app构建号 | none
|
|
3351
|
-
| appBundleId | string | true | none | app 包名 | none
|
|
3352
|
-
| appNo | string | true | none | 当前软件编号 | 未加载软件时为空字符串
|
|
3353
|
-
| deviceModel | string | true | none | 设备型号 | none
|
|
3354
|
-
| agentConnected | boolean | true | none | agent是否连接 | none
|
|
3355
|
-
| isRun | boolean | true | none | 脚本是否启动 | none
|
|
3356
|
-
| isDebugMode | boolean | true | none | 是否调试模式运行 | none
|
|
3357
|
-
| isDebugAuth | boolean | true | none | 是否拥有调试授权 | none
|
|
3358
|
-
| isAuth | boolean | true | none | 是否授权 | none
|
|
3359
|
-
| isRecording | boolean | true | none | 是否录屏中 | none
|
|
3360
|
-
| udid | string | true | none | 设备唯一 UDID | none
|
|
3337
|
+
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
|
3338
|
+
| ---------------------- | ------- | ---- | ---- | ------------------------------- | ---------------------------------------- |
|
|
3339
|
+
| deviceIp | string | true | none | 设备IP | none |
|
|
3340
|
+
| screenInfo | object | true | none | 屏幕信息 | none |
|
|
3341
|
+
| » logicWidth | integer | true | none | 逻辑宽带 | none |
|
|
3342
|
+
| » logicHeight | integer | true | none | 逻辑高度 | none |
|
|
3343
|
+
| » height | integer | true | none | 物理高度 | none |
|
|
3344
|
+
| » width | integer | true | none | 物理宽度 | none |
|
|
3345
|
+
| » scale | number | true | none | 缩放比 | none |
|
|
3346
|
+
| deviceName | string | true | none | 设备名称 | none |
|
|
3347
|
+
| batteryInfo | object | true | none | 电池信息 | none |
|
|
3348
|
+
| » level | integer | true | none | 电量 1-100 | none |
|
|
3349
|
+
| » isCharging | boolean | true | none | 是否充电中 | none |
|
|
3350
|
+
| appName | string | true | none | app名称 | none |
|
|
3351
|
+
| appBuildNumber | integer | true | none | app构建号 | none |
|
|
3352
|
+
| appBundleId | string | true | none | app 包名 | none |
|
|
3353
|
+
| appNo | string | true | none | 当前软件编号 | 未加载软件时为空字符串 |
|
|
3354
|
+
| deviceModel | string | true | none | 设备型号 | none |
|
|
3355
|
+
| agentConnected | boolean | true | none | agent是否连接 | none |
|
|
3356
|
+
| isRun | boolean | true | none | 脚本是否启动 | none |
|
|
3357
|
+
| isDebugMode | boolean | true | none | 是否调试模式运行 | none |
|
|
3358
|
+
| isDebugAuth | boolean | true | none | 是否拥有调试授权 | none |
|
|
3359
|
+
| isAuth | boolean | true | none | 是否授权 | none |
|
|
3360
|
+
| isRecording | boolean | true | none | 是否录屏中 | none |
|
|
3361
|
+
| udid | string | true | none | 设备唯一 UDID | none |
|
|
3361
3362
|
| authMode | string | true | none | 授权模式 | `user` 表示用户授权,`card` 表示授权卡密 |
|
|
3362
|
-
| serverDeviceId | string | true | none | 服务器设备ID | none
|
|
3363
|
-
| orientation | string | true | none | 屏幕方向 | none
|
|
3364
|
-
| memory | object | true | none | 内存状态 | 单位为 MB,字段与系统模块内存信息一致
|
|
3365
|
-
| » used | number | true | none | 应用已用内存 | 当前应用内存占用,单位 MB
|
|
3366
|
-
| » available | number | true | none | 系统可用内存 | 系统可用内存,单位 MB
|
|
3367
|
-
| » total | number | true | none | 系统总内存 | 物理内存总量,单位 MB
|
|
3368
|
-
| » systemUsed | number | true | none | 系统已用内存 | 系统已用内存,单位 MB
|
|
3369
|
-
| » usagePercentage | integer | true | none | 系统内存使用率 | 系统已用内存占总内存百分比
|
|
3370
|
-
| cpuUsage | number | true | none | CPU 使用率 | 当前应用 CPU 使用率百分比
|
|
3371
|
-
| osVersion | string | true | none | 系统版本 | none
|
|
3372
|
-
| ecid | string | true | none | 设备唯一 ECID | none
|
|
3373
|
-
| isVolumeControlEnabled | boolean | true | none | 是否开启了音量键启停 | none
|
|
3374
|
-
| agentVersion | string | true | none | agent版本号 | none
|
|
3375
|
-
| appVersion | string | true | none | app版本号 | none
|
|
3376
|
-
| serverType | string | true | none | 授权服务器类型 | none
|
|
3377
|
-
| isHidConnected | boolean | true | none | hid设备是否连接 | none
|
|
3378
|
-
| isShowUI | boolean | true | none | 实现显示了 UI | none
|
|
3379
|
-
| isLogin | boolean | true | none | 是否登录 | none
|
|
3380
|
-
| deviceId | string | true | none | 设备 ID,应用唯一,卸载重装变化 | none
|
|
3363
|
+
| serverDeviceId | string | true | none | 服务器设备ID | none |
|
|
3364
|
+
| orientation | string | true | none | 屏幕方向 | none |
|
|
3365
|
+
| memory | object | true | none | 内存状态 | 单位为 MB,字段与系统模块内存信息一致 |
|
|
3366
|
+
| » used | number | true | none | 应用已用内存 | 当前应用内存占用,单位 MB |
|
|
3367
|
+
| » available | number | true | none | 系统可用内存 | 系统可用内存,单位 MB |
|
|
3368
|
+
| » total | number | true | none | 系统总内存 | 物理内存总量,单位 MB |
|
|
3369
|
+
| » systemUsed | number | true | none | 系统已用内存 | 系统已用内存,单位 MB |
|
|
3370
|
+
| » usagePercentage | integer | true | none | 系统内存使用率 | 系统已用内存占总内存百分比 |
|
|
3371
|
+
| cpuUsage | number | true | none | CPU 使用率 | 当前应用 CPU 使用率百分比 |
|
|
3372
|
+
| osVersion | string | true | none | 系统版本 | none |
|
|
3373
|
+
| ecid | string | true | none | 设备唯一 ECID | none |
|
|
3374
|
+
| isVolumeControlEnabled | boolean | true | none | 是否开启了音量键启停 | none |
|
|
3375
|
+
| agentVersion | string | true | none | agent版本号 | none |
|
|
3376
|
+
| appVersion | string | true | none | app版本号 | none |
|
|
3377
|
+
| serverType | string | true | none | 授权服务器类型 | none |
|
|
3378
|
+
| isHidConnected | boolean | true | none | hid设备是否连接 | none |
|
|
3379
|
+
| isShowUI | boolean | true | none | 实现显示了 UI | none |
|
|
3380
|
+
| isLogin | boolean | true | none | 是否登录 | none |
|
|
3381
|
+
| deviceId | string | true | none | 设备 ID,应用唯一,卸载重装变化 | none |
|
|
3381
3382
|
|
|
3382
3383
|
#### 枚举值
|
|
3383
3384
|
|