@ucloud-sdks/ucloud-sdk-js 0.1.0 → 0.2.0
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/lib/services/index.d.ts +1 -0
- package/lib/services/index.js +7 -0
- package/lib/services/uphone/index.d.ts +1986 -0
- package/lib/services/uphone/index.js +352 -0
- package/package.json +1 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const client_1 = __importDefault(require("../../core/client"));
|
|
7
|
+
const request_1 = __importDefault(require("../../core/request"));
|
|
8
|
+
/**
|
|
9
|
+
* This client is used to call actions of **uphone** service
|
|
10
|
+
*/
|
|
11
|
+
class UPhoneClient extends client_1.default {
|
|
12
|
+
constructor({ config, credential, }) {
|
|
13
|
+
super({ config, credential });
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CreateUPhoneApp - 一个 app 对应多个 app_version。
|
|
17
|
+
*
|
|
18
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/create_u_phone_app
|
|
19
|
+
*/
|
|
20
|
+
createUPhoneApp(request) {
|
|
21
|
+
const args = Object.assign({ Action: 'CreateUPhoneApp' }, (request || {}));
|
|
22
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* CreateUPhoneAppVersion - 创建云手机应用版本。
|
|
26
|
+
注:一个 app 对应多个 app_version。
|
|
27
|
+
*
|
|
28
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/create_u_phone_app_version
|
|
29
|
+
*/
|
|
30
|
+
createUPhoneAppVersion(request) {
|
|
31
|
+
const args = Object.assign({ Action: 'CreateUPhoneAppVersion' }, (request || {}));
|
|
32
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* CreateUPhoneImage - 创建云手机镜像。
|
|
36
|
+
*
|
|
37
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/create_u_phone_image
|
|
38
|
+
*/
|
|
39
|
+
createUPhoneImage(request) {
|
|
40
|
+
const args = Object.assign({ Action: 'CreateUPhoneImage' }, (request || {}));
|
|
41
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* CreateUPhoneServer - 创建云手机服务器
|
|
45
|
+
*
|
|
46
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/create_u_phone_server
|
|
47
|
+
*/
|
|
48
|
+
createUPhoneServer(request) {
|
|
49
|
+
const args = Object.assign({ Action: 'CreateUPhoneServer' }, (request || {}));
|
|
50
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* DeleteUPhoneImage - 删除自制云手机镜像。
|
|
54
|
+
*
|
|
55
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/delete_u_phone_image
|
|
56
|
+
*/
|
|
57
|
+
deleteUPhoneImage(request) {
|
|
58
|
+
const args = Object.assign({ Action: 'DeleteUPhoneImage' }, (request || {}));
|
|
59
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* DeleteUPhoneServer - 删除云手机服务器。 注:关机状态下才能执行删除操作。
|
|
63
|
+
*
|
|
64
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/delete_u_phone_server
|
|
65
|
+
*/
|
|
66
|
+
deleteUPhoneServer(request) {
|
|
67
|
+
const args = Object.assign({ Action: 'DeleteUPhoneServer' }, (request || {}));
|
|
68
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* DescribeUPhone - 获取云手机列表信息。
|
|
72
|
+
*
|
|
73
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone
|
|
74
|
+
*/
|
|
75
|
+
describeUPhone(request) {
|
|
76
|
+
const args = Object.assign({ Action: 'DescribeUPhone' }, (request || {}));
|
|
77
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* DescribeUPhoneApp - 获取应用列表。
|
|
81
|
+
*
|
|
82
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_app
|
|
83
|
+
*/
|
|
84
|
+
describeUPhoneApp(request) {
|
|
85
|
+
const args = Object.assign({ Action: 'DescribeUPhoneApp' }, (request || {}));
|
|
86
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* DescribeUPhoneAppVersion - 获取应用版本列表。
|
|
90
|
+
*
|
|
91
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_app_version
|
|
92
|
+
*/
|
|
93
|
+
describeUPhoneAppVersion(request) {
|
|
94
|
+
const args = Object.assign({ Action: 'DescribeUPhoneAppVersion' }, (request || {}));
|
|
95
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* DescribeUPhoneCities - 获取云手机提供服务的城市列表
|
|
99
|
+
*
|
|
100
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities
|
|
101
|
+
*/
|
|
102
|
+
describeUPhoneCities(request) {
|
|
103
|
+
const args = Object.assign({ Action: 'DescribeUPhoneCities' }, (request || {}));
|
|
104
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* DescribeUPhoneDetailByApp - 根据AppId,查询安装该应用的云手机以及相关的应用版本信息
|
|
108
|
+
*
|
|
109
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_detail_by_app
|
|
110
|
+
*/
|
|
111
|
+
describeUPhoneDetailByApp(request) {
|
|
112
|
+
const args = Object.assign({ Action: 'DescribeUPhoneDetailByApp' }, (request || {}));
|
|
113
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* DescribeUPhoneImage - 获取云手机镜像信息列表。
|
|
117
|
+
*
|
|
118
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_image
|
|
119
|
+
*/
|
|
120
|
+
describeUPhoneImage(request) {
|
|
121
|
+
const args = Object.assign({ Action: 'DescribeUPhoneImage' }, (request || {}));
|
|
122
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* DescribeUPhoneIpRegions - 获取云手机支持绑定独立IP的城市列表
|
|
126
|
+
*
|
|
127
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_ip_regions
|
|
128
|
+
*/
|
|
129
|
+
describeUPhoneIpRegions(request) {
|
|
130
|
+
const args = Object.assign({ Action: 'DescribeUPhoneIpRegions' }, (request || {}));
|
|
131
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* DescribeUPhoneJob - 查询Job的执行状态。
|
|
135
|
+
*
|
|
136
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_job
|
|
137
|
+
*/
|
|
138
|
+
describeUPhoneJob(request) {
|
|
139
|
+
const args = Object.assign({ Action: 'DescribeUPhoneJob' }, (request || {}));
|
|
140
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* DescribeUPhoneModel -
|
|
144
|
+
*
|
|
145
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_model
|
|
146
|
+
*/
|
|
147
|
+
describeUPhoneModel(request) {
|
|
148
|
+
const args = Object.assign({ Action: 'DescribeUPhoneModel' }, (request || {}));
|
|
149
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* DescribeUPhoneServer - 获取云手机服务器列表信息。
|
|
153
|
+
*
|
|
154
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_server
|
|
155
|
+
*/
|
|
156
|
+
describeUPhoneServer(request) {
|
|
157
|
+
const args = Object.assign({ Action: 'DescribeUPhoneServer' }, (request || {}));
|
|
158
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* DescribeUPhoneServerModel - 获取ServerModel列表。
|
|
162
|
+
*
|
|
163
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_server_model
|
|
164
|
+
*/
|
|
165
|
+
describeUPhoneServerModel(request) {
|
|
166
|
+
const args = Object.assign({ Action: 'DescribeUPhoneServerModel' }, (request || {}));
|
|
167
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* GetUPhoneScreenCapture - 云手机截屏
|
|
171
|
+
*
|
|
172
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_screen_capture
|
|
173
|
+
*/
|
|
174
|
+
getUPhoneScreenCapture(request) {
|
|
175
|
+
const args = Object.assign({ Action: 'GetUPhoneScreenCapture' }, (request || {}));
|
|
176
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* GetUPhoneServerPrice - 根据服务器规格名称,获取UPhoneServer实例的价格。
|
|
180
|
+
*
|
|
181
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_server_price
|
|
182
|
+
*/
|
|
183
|
+
getUPhoneServerPrice(request) {
|
|
184
|
+
const args = Object.assign({ Action: 'GetUPhoneServerPrice' }, (request || {}));
|
|
185
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* GetUPhoneServerRenewPrice - 获取云手机服务器续费价格
|
|
189
|
+
|
|
190
|
+
提示信息: 须按照控制台服务器模型配置创建服务器。详情请参考控制台。
|
|
191
|
+
*
|
|
192
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_server_renew_price
|
|
193
|
+
*/
|
|
194
|
+
getUPhoneServerRenewPrice(request) {
|
|
195
|
+
const args = Object.assign({ Action: 'GetUPhoneServerRenewPrice' }, (request || {}));
|
|
196
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* InstallUPhoneAppVersion - 在云手机中安装应用版本相关的Apk文件。系统会根据AppVersionId将对应的Apk文件下载后安装到云手机中。一次只支持安装一个Apk。
|
|
200
|
+
*
|
|
201
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/install_u_phone_app_version
|
|
202
|
+
*/
|
|
203
|
+
installUPhoneAppVersion(request) {
|
|
204
|
+
const args = Object.assign({ Action: 'InstallUPhoneAppVersion' }, (request || {}));
|
|
205
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* ModifyUPhoneName - 修改指定云手机实例名称。
|
|
209
|
+
*
|
|
210
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/modify_u_phone_name
|
|
211
|
+
*/
|
|
212
|
+
modifyUPhoneName(request) {
|
|
213
|
+
const args = Object.assign({ Action: 'ModifyUPhoneName' }, (request || {}));
|
|
214
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* ModifyUPhoneRemark - 修改指定云手机实例备注信息。
|
|
218
|
+
*
|
|
219
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/modify_u_phone_remark
|
|
220
|
+
*/
|
|
221
|
+
modifyUPhoneRemark(request) {
|
|
222
|
+
const args = Object.assign({ Action: 'ModifyUPhoneRemark' }, (request || {}));
|
|
223
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* ModifyUPhoneServerName - 修改指定云手机服务器实例名称。
|
|
227
|
+
*
|
|
228
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/modify_u_phone_server_name
|
|
229
|
+
*/
|
|
230
|
+
modifyUPhoneServerName(request) {
|
|
231
|
+
const args = Object.assign({ Action: 'ModifyUPhoneServerName' }, (request || {}));
|
|
232
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* ModifyUPhoneServerRemark - 修改指定云手机实例备注信息。
|
|
236
|
+
*
|
|
237
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/modify_u_phone_server_remark
|
|
238
|
+
*/
|
|
239
|
+
modifyUPhoneServerRemark(request) {
|
|
240
|
+
const args = Object.assign({ Action: 'ModifyUPhoneServerRemark' }, (request || {}));
|
|
241
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* PoweroffUPhone - 关闭处于运行状态的云手机实例
|
|
245
|
+
*
|
|
246
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/poweroff_u_phone
|
|
247
|
+
*/
|
|
248
|
+
poweroffUPhone(request) {
|
|
249
|
+
const args = Object.assign({ Action: 'PoweroffUPhone' }, (request || {}));
|
|
250
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* PoweronUPhone - 启动处于关闭状态的云手机实例
|
|
254
|
+
*
|
|
255
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/poweron_u_phone
|
|
256
|
+
*/
|
|
257
|
+
poweronUPhone(request) {
|
|
258
|
+
const args = Object.assign({ Action: 'PoweronUPhone' }, (request || {}));
|
|
259
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* RebootUPhone - 重新启动云手机实例
|
|
263
|
+
*
|
|
264
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/reboot_u_phone
|
|
265
|
+
*/
|
|
266
|
+
rebootUPhone(request) {
|
|
267
|
+
const args = Object.assign({ Action: 'RebootUPhone' }, (request || {}));
|
|
268
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* ResetUPhone - 将云手机恢复为创建时的状态。
|
|
272
|
+
*
|
|
273
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/reset_u_phone
|
|
274
|
+
*/
|
|
275
|
+
resetUPhone(request) {
|
|
276
|
+
const args = Object.assign({ Action: 'ResetUPhone' }, (request || {}));
|
|
277
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* RunAsyncCommand - 在云手机中执行异步shell命令。
|
|
281
|
+
*
|
|
282
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/run_async_command
|
|
283
|
+
*/
|
|
284
|
+
runAsyncCommand(request) {
|
|
285
|
+
const args = Object.assign({ Action: 'RunAsyncCommand' }, (request || {}));
|
|
286
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* RunSyncCommand - 在云手机中执行同步shell命令。
|
|
290
|
+
*
|
|
291
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/run_sync_command
|
|
292
|
+
*/
|
|
293
|
+
runSyncCommand(request) {
|
|
294
|
+
const args = Object.assign({ Action: 'RunSyncCommand' }, (request || {}));
|
|
295
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* SetUPhoneConfig - 设置云手机画面参数(分辨率、DPI、帧率、码率)
|
|
299
|
+
*
|
|
300
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_config
|
|
301
|
+
*/
|
|
302
|
+
setUPhoneConfig(request) {
|
|
303
|
+
const args = Object.assign({ Action: 'SetUPhoneConfig' }, (request || {}));
|
|
304
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* SetUPhoneGPS - 设置云手机GPS信息
|
|
308
|
+
*
|
|
309
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_gps
|
|
310
|
+
*/
|
|
311
|
+
setUPhoneGPS(request) {
|
|
312
|
+
const args = Object.assign({ Action: 'SetUPhoneGPS' }, (request || {}));
|
|
313
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* SetUPhoneManagerMode - 管理员模式支持所有按键,普通用户模式禁用返回桌面
|
|
317
|
+
*
|
|
318
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_manager_mode
|
|
319
|
+
*/
|
|
320
|
+
setUPhoneManagerMode(request) {
|
|
321
|
+
const args = Object.assign({ Action: 'SetUPhoneManagerMode' }, (request || {}));
|
|
322
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* SetUPhoneSplashScreen - 设置云手机启动画面,通过DescribeUPhone接口可以查询该地址
|
|
326
|
+
*
|
|
327
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_splash_screen
|
|
328
|
+
*/
|
|
329
|
+
setUPhoneSplashScreen(request) {
|
|
330
|
+
const args = Object.assign({ Action: 'SetUPhoneSplashScreen' }, (request || {}));
|
|
331
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* UnInstallUPhoneAppVersion - 传入应用版本Id,在云手机中根据应用版本的PackageName卸载相关应用。一次只支持卸载一个应用。
|
|
335
|
+
*
|
|
336
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/un_install_u_phone_app_version
|
|
337
|
+
*/
|
|
338
|
+
unInstallUPhoneAppVersion(request) {
|
|
339
|
+
const args = Object.assign({ Action: 'UnInstallUPhoneAppVersion' }, (request || {}));
|
|
340
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* UpdateUPhoneImage - 更新云手机镜像信息。
|
|
344
|
+
*
|
|
345
|
+
* See also: https://docs.ucloud.cn/api/uphone-api/update_u_phone_image
|
|
346
|
+
*/
|
|
347
|
+
updateUPhoneImage(request) {
|
|
348
|
+
const args = Object.assign({ Action: 'UpdateUPhoneImage' }, (request || {}));
|
|
349
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
exports.default = UPhoneClient;
|