@lazycatcloud/sdk 0.1.215 → 0.1.216
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/dist/common/apk_shell.d.ts +1 -1
- package/dist/common/apk_shell.d.ts.map +1 -1
- package/dist/common/apk_shell.js +46 -70
- package/dist/common/apk_shell.js.map +1 -1
- package/dist/common/box.d.ts +46 -11
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/box.js +212 -201
- package/dist/common/box.js.map +1 -1
- package/dist/common/browseronly.d.ts +1 -1
- package/dist/common/browseronly.d.ts.map +1 -1
- package/dist/common/browseronly.js +57 -95
- package/dist/common/browseronly.js.map +1 -1
- package/dist/common/end_device.d.ts +1 -1
- package/dist/common/end_device.d.ts.map +1 -1
- package/dist/common/end_device.js +77 -133
- package/dist/common/end_device.js.map +1 -1
- package/dist/common/file_handler.d.ts +1 -1
- package/dist/common/file_handler.d.ts.map +1 -1
- package/dist/common/file_handler.js +55 -100
- package/dist/common/file_handler.js.map +1 -1
- package/dist/common/filetrans.d.ts +1 -1
- package/dist/common/filetrans.d.ts.map +1 -1
- package/dist/common/filetrans.js +240 -497
- package/dist/common/filetrans.js.map +1 -1
- package/dist/common/gateway.d.ts +1 -1
- package/dist/common/gateway.d.ts.map +1 -1
- package/dist/common/gateway.js +61 -135
- package/dist/common/gateway.js.map +1 -1
- package/dist/common/media_meta.d.ts +1 -1
- package/dist/common/media_meta.d.ts.map +1 -1
- package/dist/common/media_meta.js +45 -67
- package/dist/common/media_meta.js.map +1 -1
- package/dist/common/message.d.ts +1 -1
- package/dist/common/message.d.ts.map +1 -1
- package/dist/common/message.js +79 -136
- package/dist/common/message.js.map +1 -1
- package/dist/common/peripheral_device.d.ts +1 -1
- package/dist/common/peripheral_device.d.ts.map +1 -1
- package/dist/common/peripheral_device.js +91 -163
- package/dist/common/peripheral_device.js.map +1 -1
- package/dist/common/security_context.d.ts +1 -1
- package/dist/common/security_context.d.ts.map +1 -1
- package/dist/common/security_context.js +68 -113
- package/dist/common/security_context.js.map +1 -1
- package/dist/common/users.d.ts +1 -1
- package/dist/common/users.d.ts.map +1 -1
- package/dist/common/users.js +107 -214
- package/dist/common/users.js.map +1 -1
- package/dist/dlna/dlna.d.ts +1 -1
- package/dist/dlna/dlna.d.ts.map +1 -1
- package/dist/dlna/dlna.js +99 -197
- package/dist/dlna/dlna.js.map +1 -1
- package/dist/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/google/protobuf/descriptor.js +559 -1107
- package/dist/google/protobuf/descriptor.js.map +1 -1
- package/dist/google/protobuf/empty.d.ts.map +1 -1
- package/dist/google/protobuf/empty.js +4 -5
- package/dist/google/protobuf/empty.js.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/google/protobuf/timestamp.js +9 -20
- package/dist/google/protobuf/timestamp.js.map +1 -1
- package/dist/lanforward/lanforward.d.ts +99 -0
- package/dist/lanforward/lanforward.d.ts.map +1 -0
- package/dist/lanforward/lanforward.js +239 -0
- package/dist/lanforward/lanforward.js.map +1 -0
- package/dist/localdevice/clipboard.d.ts +1 -1
- package/dist/localdevice/clipboard.d.ts.map +1 -1
- package/dist/localdevice/clipboard.js +59 -76
- package/dist/localdevice/clipboard.js.map +1 -1
- package/dist/localdevice/config.d.ts +1 -1
- package/dist/localdevice/config.d.ts.map +1 -1
- package/dist/localdevice/config.js +47 -95
- package/dist/localdevice/config.js.map +1 -1
- package/dist/localdevice/device.d.ts +1 -1
- package/dist/localdevice/device.d.ts.map +1 -1
- package/dist/localdevice/device.js +23 -38
- package/dist/localdevice/device.js.map +1 -1
- package/dist/localdevice/dialog.d.ts +1 -1
- package/dist/localdevice/dialog.d.ts.map +1 -1
- package/dist/localdevice/dialog.js +71 -138
- package/dist/localdevice/dialog.js.map +1 -1
- package/dist/localdevice/local-launch.d.ts +1 -1
- package/dist/localdevice/local-launch.d.ts.map +1 -1
- package/dist/localdevice/local-launch.js +85 -163
- package/dist/localdevice/local-launch.js.map +1 -1
- package/dist/localdevice/network.d.ts +1 -1
- package/dist/localdevice/network.d.ts.map +1 -1
- package/dist/localdevice/network.js +19 -24
- package/dist/localdevice/network.js.map +1 -1
- package/dist/localdevice/permission.d.ts +1 -1
- package/dist/localdevice/permission.d.ts.map +1 -1
- package/dist/localdevice/permission.js +70 -118
- package/dist/localdevice/permission.js.map +1 -1
- package/dist/localdevice/photo.d.ts +1 -1
- package/dist/localdevice/photo.d.ts.map +1 -1
- package/dist/localdevice/photo.js +191 -401
- package/dist/localdevice/photo.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/ssdp/ssdp.d.ts +113 -0
- package/dist/ssdp/ssdp.d.ts.map +1 -0
- package/dist/ssdp/ssdp.js +268 -0
- package/dist/ssdp/ssdp.js.map +1 -0
- package/dist/sys/OS_snapshot.d.ts +1 -1
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +139 -285
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +266 -0
- package/dist/sys/OS_upgrader.d.ts.map +1 -0
- package/dist/sys/OS_upgrader.js +710 -0
- package/dist/sys/OS_upgrader.js.map +1 -0
- package/dist/sys/btled.d.ts +1 -1
- package/dist/sys/btled.d.ts.map +1 -1
- package/dist/sys/btled.js +52 -79
- package/dist/sys/btled.js.map +1 -1
- package/dist/sys/btrfs.d.ts +1 -1
- package/dist/sys/btrfs.d.ts.map +1 -1
- package/dist/sys/btrfs.js +62 -118
- package/dist/sys/btrfs.js.map +1 -1
- package/dist/sys/devopt.d.ts +1 -1
- package/dist/sys/devopt.d.ts.map +1 -1
- package/dist/sys/devopt.js +25 -45
- package/dist/sys/devopt.js.map +1 -1
- package/dist/sys/dirmon.d.ts +1 -1
- package/dist/sys/dirmon.d.ts.map +1 -1
- package/dist/sys/dirmon.js +38 -48
- package/dist/sys/dirmon.js.map +1 -1
- package/dist/sys/event.d.ts +1 -1
- package/dist/sys/event.d.ts.map +1 -1
- package/dist/sys/event.js +91 -168
- package/dist/sys/event.js.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +1 -1
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.js +134 -246
- package/dist/sys/hc-core/hc-core.js.map +1 -1
- package/dist/sys/ingress.d.ts +1 -1
- package/dist/sys/ingress.d.ts.map +1 -1
- package/dist/sys/ingress.js +84 -145
- package/dist/sys/ingress.js.map +1 -1
- package/dist/sys/installer.d.ts +1 -1
- package/dist/sys/installer.d.ts.map +1 -1
- package/dist/sys/installer.js +76 -131
- package/dist/sys/installer.js.map +1 -1
- package/dist/sys/network_manager.d.ts +1 -1
- package/dist/sys/network_manager.d.ts.map +1 -1
- package/dist/sys/network_manager.js +80 -175
- package/dist/sys/network_manager.js.map +1 -1
- package/dist/sys/package_manager.d.ts +1 -1
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +214 -475
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +3 -3
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +364 -799
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/portal-server/remote_listen.d.ts +121 -0
- package/dist/sys/portal-server/remote_listen.d.ts.map +1 -0
- package/dist/sys/portal-server/remote_listen.js +262 -0
- package/dist/sys/portal-server/remote_listen.js.map +1 -0
- package/dist/sys/snapd.d.ts +1 -1
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +76 -144
- package/dist/sys/snapd.js.map +1 -1
- package/dist/sys/version.d.ts +1 -1
- package/dist/sys/version.d.ts.map +1 -1
- package/dist/sys/version.js +17 -17
- package/dist/sys/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/common/box.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GrpcWebError = exports.GrpcWebImpl = exports.BoxServiceQueryDisksInfoDesc = exports.BoxServiceShutdownDesc = exports.BoxServiceChangeDisplayNameDesc = exports.BoxServiceQueryInfoDesc = exports.BoxServiceDesc = exports.BoxServiceClientImpl = exports.DisksInfo = exports.DiskInfo = exports.ShutdownRequest = exports.ChangeDisplayNameRequest = exports.BoxInfo_DiskSpace = exports.BoxInfo = exports.diskInfo_HealthToJSON = exports.diskInfo_HealthFromJSON = exports.DiskInfo_Health = exports.diskInfo_DiskTypeToJSON = exports.diskInfo_DiskTypeFromJSON = exports.DiskInfo_DiskType = exports.shutdownRequest_ActionToJSON = exports.shutdownRequest_ActionFromJSON = exports.ShutdownRequest_Action = void 0;
|
|
6
|
+
exports.GrpcWebError = exports.GrpcWebImpl = exports.BoxServiceQueryDisksInfoDesc = exports.BoxServiceShutdownDesc = exports.BoxServiceSetBootOptionDesc = exports.BoxServiceChangeDisplayNameDesc = exports.BoxServiceQueryInfoDesc = exports.BoxServiceDesc = exports.BoxServiceClientImpl = exports.DisksInfo = exports.DiskInfo = exports.BootOption = exports.ShutdownRequest = exports.ChangeDisplayNameRequest = exports.BoxInfo_DiskSpace = exports.BoxInfo = exports.diskInfo_HealthToJSON = exports.diskInfo_HealthFromJSON = exports.DiskInfo_Health = exports.diskInfo_DiskTypeToJSON = exports.diskInfo_DiskTypeFromJSON = exports.DiskInfo_DiskType = exports.bootOption_BootOptionTypeToJSON = exports.bootOption_BootOptionTypeFromJSON = exports.BootOption_BootOptionType = exports.shutdownRequest_ActionToJSON = exports.shutdownRequest_ActionFromJSON = exports.ShutdownRequest_Action = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
9
9
|
const browser_headers_1 = require("browser-headers");
|
|
@@ -12,10 +12,15 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
12
12
|
const empty_1 = require("../google/protobuf/empty");
|
|
13
13
|
var ShutdownRequest_Action;
|
|
14
14
|
(function (ShutdownRequest_Action) {
|
|
15
|
+
/** Poweroff - 关机 */
|
|
15
16
|
ShutdownRequest_Action[ShutdownRequest_Action["Poweroff"] = 0] = "Poweroff";
|
|
16
|
-
|
|
17
|
-
ShutdownRequest_Action[ShutdownRequest_Action["Reboot"] =
|
|
18
|
-
|
|
17
|
+
/** Reboot - 重启 */
|
|
18
|
+
ShutdownRequest_Action[ShutdownRequest_Action["Reboot"] = 1] = "Reboot";
|
|
19
|
+
/**
|
|
20
|
+
* SoftReboot - 软重启(仅重启 lzc-os 容器,不关闭 lzc-base-os)
|
|
21
|
+
* 通常用于系统更新、故障修复等场景
|
|
22
|
+
*/
|
|
23
|
+
ShutdownRequest_Action[ShutdownRequest_Action["SoftReboot"] = 2] = "SoftReboot";
|
|
19
24
|
ShutdownRequest_Action[ShutdownRequest_Action["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
25
|
})(ShutdownRequest_Action = exports.ShutdownRequest_Action || (exports.ShutdownRequest_Action = {}));
|
|
21
26
|
function shutdownRequest_ActionFromJSON(object) {
|
|
@@ -24,14 +29,11 @@ function shutdownRequest_ActionFromJSON(object) {
|
|
|
24
29
|
case "Poweroff":
|
|
25
30
|
return ShutdownRequest_Action.Poweroff;
|
|
26
31
|
case 1:
|
|
27
|
-
case "Halt":
|
|
28
|
-
return ShutdownRequest_Action.Halt;
|
|
29
|
-
case 2:
|
|
30
32
|
case "Reboot":
|
|
31
33
|
return ShutdownRequest_Action.Reboot;
|
|
32
|
-
case
|
|
33
|
-
case "
|
|
34
|
-
return ShutdownRequest_Action.
|
|
34
|
+
case 2:
|
|
35
|
+
case "SoftReboot":
|
|
36
|
+
return ShutdownRequest_Action.SoftReboot;
|
|
35
37
|
case -1:
|
|
36
38
|
case "UNRECOGNIZED":
|
|
37
39
|
default:
|
|
@@ -43,18 +45,65 @@ function shutdownRequest_ActionToJSON(object) {
|
|
|
43
45
|
switch (object) {
|
|
44
46
|
case ShutdownRequest_Action.Poweroff:
|
|
45
47
|
return "Poweroff";
|
|
46
|
-
case ShutdownRequest_Action.Halt:
|
|
47
|
-
return "Halt";
|
|
48
48
|
case ShutdownRequest_Action.Reboot:
|
|
49
49
|
return "Reboot";
|
|
50
|
-
case ShutdownRequest_Action.
|
|
51
|
-
return "
|
|
50
|
+
case ShutdownRequest_Action.SoftReboot:
|
|
51
|
+
return "SoftReboot";
|
|
52
52
|
case ShutdownRequest_Action.UNRECOGNIZED:
|
|
53
53
|
default:
|
|
54
54
|
return "UNRECOGNIZED";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
exports.shutdownRequest_ActionToJSON = shutdownRequest_ActionToJSON;
|
|
58
|
+
var BootOption_BootOptionType;
|
|
59
|
+
(function (BootOption_BootOptionType) {
|
|
60
|
+
/** BOOT_OPTION_NONE - 无操作(清空所有已设置的操作) */
|
|
61
|
+
BootOption_BootOptionType[BootOption_BootOptionType["BOOT_OPTION_NONE"] = 0] = "BOOT_OPTION_NONE";
|
|
62
|
+
/** BOOT_OPTION_ROLLBACK - 回滚到上一个版本 */
|
|
63
|
+
BootOption_BootOptionType[BootOption_BootOptionType["BOOT_OPTION_ROLLBACK"] = 1] = "BOOT_OPTION_ROLLBACK";
|
|
64
|
+
/** BOOT_OPTION_RESET - 重置系统(清空系统的 var 数据) */
|
|
65
|
+
BootOption_BootOptionType[BootOption_BootOptionType["BOOT_OPTION_RESET"] = 2] = "BOOT_OPTION_RESET";
|
|
66
|
+
/** BOOT_OPTION_FACTORY_RESET - 恢复出厂设置(清空用户信息、系统的 var 数据和用户数据) */
|
|
67
|
+
BootOption_BootOptionType[BootOption_BootOptionType["BOOT_OPTION_FACTORY_RESET"] = 3] = "BOOT_OPTION_FACTORY_RESET";
|
|
68
|
+
BootOption_BootOptionType[BootOption_BootOptionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
69
|
+
})(BootOption_BootOptionType = exports.BootOption_BootOptionType || (exports.BootOption_BootOptionType = {}));
|
|
70
|
+
function bootOption_BootOptionTypeFromJSON(object) {
|
|
71
|
+
switch (object) {
|
|
72
|
+
case 0:
|
|
73
|
+
case "BOOT_OPTION_NONE":
|
|
74
|
+
return BootOption_BootOptionType.BOOT_OPTION_NONE;
|
|
75
|
+
case 1:
|
|
76
|
+
case "BOOT_OPTION_ROLLBACK":
|
|
77
|
+
return BootOption_BootOptionType.BOOT_OPTION_ROLLBACK;
|
|
78
|
+
case 2:
|
|
79
|
+
case "BOOT_OPTION_RESET":
|
|
80
|
+
return BootOption_BootOptionType.BOOT_OPTION_RESET;
|
|
81
|
+
case 3:
|
|
82
|
+
case "BOOT_OPTION_FACTORY_RESET":
|
|
83
|
+
return BootOption_BootOptionType.BOOT_OPTION_FACTORY_RESET;
|
|
84
|
+
case -1:
|
|
85
|
+
case "UNRECOGNIZED":
|
|
86
|
+
default:
|
|
87
|
+
return BootOption_BootOptionType.UNRECOGNIZED;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.bootOption_BootOptionTypeFromJSON = bootOption_BootOptionTypeFromJSON;
|
|
91
|
+
function bootOption_BootOptionTypeToJSON(object) {
|
|
92
|
+
switch (object) {
|
|
93
|
+
case BootOption_BootOptionType.BOOT_OPTION_NONE:
|
|
94
|
+
return "BOOT_OPTION_NONE";
|
|
95
|
+
case BootOption_BootOptionType.BOOT_OPTION_ROLLBACK:
|
|
96
|
+
return "BOOT_OPTION_ROLLBACK";
|
|
97
|
+
case BootOption_BootOptionType.BOOT_OPTION_RESET:
|
|
98
|
+
return "BOOT_OPTION_RESET";
|
|
99
|
+
case BootOption_BootOptionType.BOOT_OPTION_FACTORY_RESET:
|
|
100
|
+
return "BOOT_OPTION_FACTORY_RESET";
|
|
101
|
+
case BootOption_BootOptionType.UNRECOGNIZED:
|
|
102
|
+
default:
|
|
103
|
+
return "UNRECOGNIZED";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.bootOption_BootOptionTypeToJSON = bootOption_BootOptionTypeToJSON;
|
|
58
107
|
var DiskInfo_DiskType;
|
|
59
108
|
(function (DiskInfo_DiskType) {
|
|
60
109
|
DiskInfo_DiskType[DiskInfo_DiskType["Unknown"] = 0] = "Unknown";
|
|
@@ -157,47 +206,31 @@ exports.BoxInfo = {
|
|
|
157
206
|
return writer;
|
|
158
207
|
},
|
|
159
208
|
decode(input, length) {
|
|
160
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader
|
|
209
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
161
210
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
162
211
|
const message = createBaseBoxInfo();
|
|
163
212
|
while (reader.pos < end) {
|
|
164
213
|
const tag = reader.uint32();
|
|
165
214
|
switch (tag >>> 3) {
|
|
166
215
|
case 1:
|
|
167
|
-
if (tag !== 10) {
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
216
|
message.udid = reader.string();
|
|
171
|
-
|
|
217
|
+
break;
|
|
172
218
|
case 2:
|
|
173
|
-
if (tag !== 18) {
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
219
|
message.boxName = reader.string();
|
|
177
|
-
|
|
220
|
+
break;
|
|
178
221
|
case 3:
|
|
179
|
-
if (tag !== 26) {
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
222
|
message.boxDomain = reader.string();
|
|
183
|
-
|
|
223
|
+
break;
|
|
184
224
|
case 4:
|
|
185
|
-
if (tag !== 34) {
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
225
|
message.displayName = reader.string();
|
|
189
|
-
|
|
226
|
+
break;
|
|
190
227
|
case 5:
|
|
191
|
-
if (tag !== 42) {
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
228
|
message.diskSpace = exports.BoxInfo_DiskSpace.decode(reader, reader.uint32());
|
|
195
|
-
|
|
229
|
+
break;
|
|
230
|
+
default:
|
|
231
|
+
reader.skipType(tag & 7);
|
|
232
|
+
break;
|
|
196
233
|
}
|
|
197
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
reader.skipType(tag & 7);
|
|
201
234
|
}
|
|
202
235
|
return message;
|
|
203
236
|
},
|
|
@@ -212,21 +245,12 @@ exports.BoxInfo = {
|
|
|
212
245
|
},
|
|
213
246
|
toJSON(message) {
|
|
214
247
|
const obj = {};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (message.boxDomain !== "") {
|
|
222
|
-
obj.boxDomain = message.boxDomain;
|
|
223
|
-
}
|
|
224
|
-
if (message.displayName !== "") {
|
|
225
|
-
obj.displayName = message.displayName;
|
|
226
|
-
}
|
|
227
|
-
if (message.diskSpace !== undefined) {
|
|
228
|
-
obj.diskSpace = exports.BoxInfo_DiskSpace.toJSON(message.diskSpace);
|
|
229
|
-
}
|
|
248
|
+
message.udid !== undefined && (obj.udid = message.udid);
|
|
249
|
+
message.boxName !== undefined && (obj.boxName = message.boxName);
|
|
250
|
+
message.boxDomain !== undefined && (obj.boxDomain = message.boxDomain);
|
|
251
|
+
message.displayName !== undefined && (obj.displayName = message.displayName);
|
|
252
|
+
message.diskSpace !== undefined &&
|
|
253
|
+
(obj.diskSpace = message.diskSpace ? exports.BoxInfo_DiskSpace.toJSON(message.diskSpace) : undefined);
|
|
230
254
|
return obj;
|
|
231
255
|
},
|
|
232
256
|
create(base) {
|
|
@@ -259,29 +283,22 @@ exports.BoxInfo_DiskSpace = {
|
|
|
259
283
|
return writer;
|
|
260
284
|
},
|
|
261
285
|
decode(input, length) {
|
|
262
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader
|
|
286
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
263
287
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
264
288
|
const message = createBaseBoxInfo_DiskSpace();
|
|
265
289
|
while (reader.pos < end) {
|
|
266
290
|
const tag = reader.uint32();
|
|
267
291
|
switch (tag >>> 3) {
|
|
268
292
|
case 1:
|
|
269
|
-
if (tag !== 8) {
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
293
|
message.total = longToNumber(reader.int64());
|
|
273
|
-
|
|
294
|
+
break;
|
|
274
295
|
case 2:
|
|
275
|
-
if (tag !== 16) {
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
296
|
message.free = longToNumber(reader.int64());
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
297
|
+
break;
|
|
298
|
+
default:
|
|
299
|
+
reader.skipType(tag & 7);
|
|
300
|
+
break;
|
|
283
301
|
}
|
|
284
|
-
reader.skipType(tag & 7);
|
|
285
302
|
}
|
|
286
303
|
return message;
|
|
287
304
|
},
|
|
@@ -293,12 +310,8 @@ exports.BoxInfo_DiskSpace = {
|
|
|
293
310
|
},
|
|
294
311
|
toJSON(message) {
|
|
295
312
|
const obj = {};
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
if (message.free !== 0) {
|
|
300
|
-
obj.free = Math.round(message.free);
|
|
301
|
-
}
|
|
313
|
+
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
314
|
+
message.free !== undefined && (obj.free = Math.round(message.free));
|
|
302
315
|
return obj;
|
|
303
316
|
},
|
|
304
317
|
create(base) {
|
|
@@ -323,23 +336,19 @@ exports.ChangeDisplayNameRequest = {
|
|
|
323
336
|
return writer;
|
|
324
337
|
},
|
|
325
338
|
decode(input, length) {
|
|
326
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader
|
|
339
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
327
340
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
328
341
|
const message = createBaseChangeDisplayNameRequest();
|
|
329
342
|
while (reader.pos < end) {
|
|
330
343
|
const tag = reader.uint32();
|
|
331
344
|
switch (tag >>> 3) {
|
|
332
345
|
case 1:
|
|
333
|
-
if (tag !== 10) {
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
346
|
message.displayName = reader.string();
|
|
337
|
-
|
|
347
|
+
break;
|
|
348
|
+
default:
|
|
349
|
+
reader.skipType(tag & 7);
|
|
350
|
+
break;
|
|
338
351
|
}
|
|
339
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
340
|
-
break;
|
|
341
|
-
}
|
|
342
|
-
reader.skipType(tag & 7);
|
|
343
352
|
}
|
|
344
353
|
return message;
|
|
345
354
|
},
|
|
@@ -348,9 +357,7 @@ exports.ChangeDisplayNameRequest = {
|
|
|
348
357
|
},
|
|
349
358
|
toJSON(message) {
|
|
350
359
|
const obj = {};
|
|
351
|
-
|
|
352
|
-
obj.displayName = message.displayName;
|
|
353
|
-
}
|
|
360
|
+
message.displayName !== undefined && (obj.displayName = message.displayName);
|
|
354
361
|
return obj;
|
|
355
362
|
},
|
|
356
363
|
create(base) {
|
|
@@ -364,69 +371,92 @@ exports.ChangeDisplayNameRequest = {
|
|
|
364
371
|
},
|
|
365
372
|
};
|
|
366
373
|
function createBaseShutdownRequest() {
|
|
367
|
-
return { action: 0
|
|
374
|
+
return { action: 0 };
|
|
368
375
|
}
|
|
369
376
|
exports.ShutdownRequest = {
|
|
370
377
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
371
378
|
if (message.action !== 0) {
|
|
372
379
|
writer.uint32(8).int32(message.action);
|
|
373
380
|
}
|
|
374
|
-
if (message.reasone !== "") {
|
|
375
|
-
writer.uint32(18).string(message.reasone);
|
|
376
|
-
}
|
|
377
381
|
return writer;
|
|
378
382
|
},
|
|
379
383
|
decode(input, length) {
|
|
380
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader
|
|
384
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
381
385
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
382
386
|
const message = createBaseShutdownRequest();
|
|
383
387
|
while (reader.pos < end) {
|
|
384
388
|
const tag = reader.uint32();
|
|
385
389
|
switch (tag >>> 3) {
|
|
386
390
|
case 1:
|
|
387
|
-
if (tag !== 8) {
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
391
|
message.action = reader.int32();
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
message.reasone = reader.string();
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
400
|
-
break;
|
|
392
|
+
break;
|
|
393
|
+
default:
|
|
394
|
+
reader.skipType(tag & 7);
|
|
395
|
+
break;
|
|
401
396
|
}
|
|
402
|
-
reader.skipType(tag & 7);
|
|
403
397
|
}
|
|
404
398
|
return message;
|
|
405
399
|
},
|
|
406
400
|
fromJSON(object) {
|
|
407
|
-
return {
|
|
408
|
-
action: isSet(object.action) ? shutdownRequest_ActionFromJSON(object.action) : 0,
|
|
409
|
-
reasone: isSet(object.reasone) ? String(object.reasone) : "",
|
|
410
|
-
};
|
|
401
|
+
return { action: isSet(object.action) ? shutdownRequest_ActionFromJSON(object.action) : 0 };
|
|
411
402
|
},
|
|
412
403
|
toJSON(message) {
|
|
413
404
|
const obj = {};
|
|
414
|
-
|
|
415
|
-
obj.action = shutdownRequest_ActionToJSON(message.action);
|
|
416
|
-
}
|
|
417
|
-
if (message.reasone !== "") {
|
|
418
|
-
obj.reasone = message.reasone;
|
|
419
|
-
}
|
|
405
|
+
message.action !== undefined && (obj.action = shutdownRequest_ActionToJSON(message.action));
|
|
420
406
|
return obj;
|
|
421
407
|
},
|
|
422
408
|
create(base) {
|
|
423
409
|
return exports.ShutdownRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
424
410
|
},
|
|
425
411
|
fromPartial(object) {
|
|
426
|
-
var _a
|
|
412
|
+
var _a;
|
|
427
413
|
const message = createBaseShutdownRequest();
|
|
428
414
|
message.action = (_a = object.action) !== null && _a !== void 0 ? _a : 0;
|
|
429
|
-
message
|
|
415
|
+
return message;
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
function createBaseBootOption() {
|
|
419
|
+
return { type: 0 };
|
|
420
|
+
}
|
|
421
|
+
exports.BootOption = {
|
|
422
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
423
|
+
if (message.type !== 0) {
|
|
424
|
+
writer.uint32(8).int32(message.type);
|
|
425
|
+
}
|
|
426
|
+
return writer;
|
|
427
|
+
},
|
|
428
|
+
decode(input, length) {
|
|
429
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
430
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
431
|
+
const message = createBaseBootOption();
|
|
432
|
+
while (reader.pos < end) {
|
|
433
|
+
const tag = reader.uint32();
|
|
434
|
+
switch (tag >>> 3) {
|
|
435
|
+
case 1:
|
|
436
|
+
message.type = reader.int32();
|
|
437
|
+
break;
|
|
438
|
+
default:
|
|
439
|
+
reader.skipType(tag & 7);
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return message;
|
|
444
|
+
},
|
|
445
|
+
fromJSON(object) {
|
|
446
|
+
return { type: isSet(object.type) ? bootOption_BootOptionTypeFromJSON(object.type) : 0 };
|
|
447
|
+
},
|
|
448
|
+
toJSON(message) {
|
|
449
|
+
const obj = {};
|
|
450
|
+
message.type !== undefined && (obj.type = bootOption_BootOptionTypeToJSON(message.type));
|
|
451
|
+
return obj;
|
|
452
|
+
},
|
|
453
|
+
create(base) {
|
|
454
|
+
return exports.BootOption.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
455
|
+
},
|
|
456
|
+
fromPartial(object) {
|
|
457
|
+
var _a;
|
|
458
|
+
const message = createBaseBootOption();
|
|
459
|
+
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0;
|
|
430
460
|
return message;
|
|
431
461
|
},
|
|
432
462
|
};
|
|
@@ -475,71 +505,43 @@ exports.DiskInfo = {
|
|
|
475
505
|
return writer;
|
|
476
506
|
},
|
|
477
507
|
decode(input, length) {
|
|
478
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader
|
|
508
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
479
509
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
480
510
|
const message = createBaseDiskInfo();
|
|
481
511
|
while (reader.pos < end) {
|
|
482
512
|
const tag = reader.uint32();
|
|
483
513
|
switch (tag >>> 3) {
|
|
484
514
|
case 1:
|
|
485
|
-
if (tag !== 8) {
|
|
486
|
-
break;
|
|
487
|
-
}
|
|
488
515
|
message.type = reader.int32();
|
|
489
|
-
|
|
516
|
+
break;
|
|
490
517
|
case 2:
|
|
491
|
-
if (tag !== 18) {
|
|
492
|
-
break;
|
|
493
|
-
}
|
|
494
518
|
message.model = reader.string();
|
|
495
|
-
|
|
519
|
+
break;
|
|
496
520
|
case 3:
|
|
497
|
-
if (tag !== 26) {
|
|
498
|
-
break;
|
|
499
|
-
}
|
|
500
521
|
message.serial = reader.string();
|
|
501
|
-
|
|
522
|
+
break;
|
|
502
523
|
case 4:
|
|
503
|
-
if (tag !== 32) {
|
|
504
|
-
break;
|
|
505
|
-
}
|
|
506
524
|
message.size = longToNumber(reader.int64());
|
|
507
|
-
|
|
525
|
+
break;
|
|
508
526
|
case 5:
|
|
509
|
-
if (tag !== 40) {
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
527
|
message.free = longToNumber(reader.int64());
|
|
513
|
-
|
|
528
|
+
break;
|
|
514
529
|
case 6:
|
|
515
|
-
if (tag !== 48) {
|
|
516
|
-
break;
|
|
517
|
-
}
|
|
518
530
|
message.temperature = reader.int32();
|
|
519
|
-
|
|
531
|
+
break;
|
|
520
532
|
case 7:
|
|
521
|
-
if (tag !== 56) {
|
|
522
|
-
break;
|
|
523
|
-
}
|
|
524
533
|
message.powerOnHours = reader.int32();
|
|
525
|
-
|
|
534
|
+
break;
|
|
526
535
|
case 8:
|
|
527
|
-
if (tag !== 64) {
|
|
528
|
-
break;
|
|
529
|
-
}
|
|
530
536
|
message.health = reader.int32();
|
|
531
|
-
|
|
537
|
+
break;
|
|
532
538
|
case 9:
|
|
533
|
-
if (tag !== 74) {
|
|
534
|
-
break;
|
|
535
|
-
}
|
|
536
539
|
message.healthReason = reader.string();
|
|
537
|
-
|
|
540
|
+
break;
|
|
541
|
+
default:
|
|
542
|
+
reader.skipType(tag & 7);
|
|
543
|
+
break;
|
|
538
544
|
}
|
|
539
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
540
|
-
break;
|
|
541
|
-
}
|
|
542
|
-
reader.skipType(tag & 7);
|
|
543
545
|
}
|
|
544
546
|
return message;
|
|
545
547
|
},
|
|
@@ -558,33 +560,15 @@ exports.DiskInfo = {
|
|
|
558
560
|
},
|
|
559
561
|
toJSON(message) {
|
|
560
562
|
const obj = {};
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if (message.size !== 0) {
|
|
571
|
-
obj.size = Math.round(message.size);
|
|
572
|
-
}
|
|
573
|
-
if (message.free !== 0) {
|
|
574
|
-
obj.free = Math.round(message.free);
|
|
575
|
-
}
|
|
576
|
-
if (message.temperature !== 0) {
|
|
577
|
-
obj.temperature = Math.round(message.temperature);
|
|
578
|
-
}
|
|
579
|
-
if (message.powerOnHours !== 0) {
|
|
580
|
-
obj.powerOnHours = Math.round(message.powerOnHours);
|
|
581
|
-
}
|
|
582
|
-
if (message.health !== 0) {
|
|
583
|
-
obj.health = diskInfo_HealthToJSON(message.health);
|
|
584
|
-
}
|
|
585
|
-
if (message.healthReason !== "") {
|
|
586
|
-
obj.healthReason = message.healthReason;
|
|
587
|
-
}
|
|
563
|
+
message.type !== undefined && (obj.type = diskInfo_DiskTypeToJSON(message.type));
|
|
564
|
+
message.model !== undefined && (obj.model = message.model);
|
|
565
|
+
message.serial !== undefined && (obj.serial = message.serial);
|
|
566
|
+
message.size !== undefined && (obj.size = Math.round(message.size));
|
|
567
|
+
message.free !== undefined && (obj.free = Math.round(message.free));
|
|
568
|
+
message.temperature !== undefined && (obj.temperature = Math.round(message.temperature));
|
|
569
|
+
message.powerOnHours !== undefined && (obj.powerOnHours = Math.round(message.powerOnHours));
|
|
570
|
+
message.health !== undefined && (obj.health = diskInfo_HealthToJSON(message.health));
|
|
571
|
+
message.healthReason !== undefined && (obj.healthReason = message.healthReason);
|
|
588
572
|
return obj;
|
|
589
573
|
},
|
|
590
574
|
create(base) {
|
|
@@ -616,23 +600,19 @@ exports.DisksInfo = {
|
|
|
616
600
|
return writer;
|
|
617
601
|
},
|
|
618
602
|
decode(input, length) {
|
|
619
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader
|
|
603
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
620
604
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
621
605
|
const message = createBaseDisksInfo();
|
|
622
606
|
while (reader.pos < end) {
|
|
623
607
|
const tag = reader.uint32();
|
|
624
608
|
switch (tag >>> 3) {
|
|
625
609
|
case 1:
|
|
626
|
-
if (tag !== 10) {
|
|
627
|
-
break;
|
|
628
|
-
}
|
|
629
610
|
message.disks.push(exports.DiskInfo.decode(reader, reader.uint32()));
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
611
|
+
break;
|
|
612
|
+
default:
|
|
613
|
+
reader.skipType(tag & 7);
|
|
614
|
+
break;
|
|
634
615
|
}
|
|
635
|
-
reader.skipType(tag & 7);
|
|
636
616
|
}
|
|
637
617
|
return message;
|
|
638
618
|
},
|
|
@@ -640,10 +620,12 @@ exports.DisksInfo = {
|
|
|
640
620
|
return { disks: Array.isArray(object === null || object === void 0 ? void 0 : object.disks) ? object.disks.map((e) => exports.DiskInfo.fromJSON(e)) : [] };
|
|
641
621
|
},
|
|
642
622
|
toJSON(message) {
|
|
643
|
-
var _a;
|
|
644
623
|
const obj = {};
|
|
645
|
-
if (
|
|
646
|
-
obj.disks = message.disks.map((e) => exports.DiskInfo.toJSON(e));
|
|
624
|
+
if (message.disks) {
|
|
625
|
+
obj.disks = message.disks.map((e) => e ? exports.DiskInfo.toJSON(e) : undefined);
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
obj.disks = [];
|
|
647
629
|
}
|
|
648
630
|
return obj;
|
|
649
631
|
},
|
|
@@ -662,6 +644,7 @@ class BoxServiceClientImpl {
|
|
|
662
644
|
this.rpc = rpc;
|
|
663
645
|
this.QueryInfo = this.QueryInfo.bind(this);
|
|
664
646
|
this.ChangeDisplayName = this.ChangeDisplayName.bind(this);
|
|
647
|
+
this.SetBootOption = this.SetBootOption.bind(this);
|
|
665
648
|
this.Shutdown = this.Shutdown.bind(this);
|
|
666
649
|
this.QueryDisksInfo = this.QueryDisksInfo.bind(this);
|
|
667
650
|
}
|
|
@@ -671,6 +654,9 @@ class BoxServiceClientImpl {
|
|
|
671
654
|
ChangeDisplayName(request, metadata) {
|
|
672
655
|
return this.rpc.unary(exports.BoxServiceChangeDisplayNameDesc, exports.ChangeDisplayNameRequest.fromPartial(request), metadata);
|
|
673
656
|
}
|
|
657
|
+
SetBootOption(request, metadata) {
|
|
658
|
+
return this.rpc.unary(exports.BoxServiceSetBootOptionDesc, exports.BootOption.fromPartial(request), metadata);
|
|
659
|
+
}
|
|
674
660
|
Shutdown(request, metadata) {
|
|
675
661
|
return this.rpc.unary(exports.BoxServiceShutdownDesc, exports.ShutdownRequest.fromPartial(request), metadata);
|
|
676
662
|
}
|
|
@@ -718,6 +704,25 @@ exports.BoxServiceChangeDisplayNameDesc = {
|
|
|
718
704
|
},
|
|
719
705
|
},
|
|
720
706
|
};
|
|
707
|
+
exports.BoxServiceSetBootOptionDesc = {
|
|
708
|
+
methodName: "SetBootOption",
|
|
709
|
+
service: exports.BoxServiceDesc,
|
|
710
|
+
requestStream: false,
|
|
711
|
+
responseStream: false,
|
|
712
|
+
requestType: {
|
|
713
|
+
serializeBinary() {
|
|
714
|
+
return exports.BootOption.encode(this).finish();
|
|
715
|
+
},
|
|
716
|
+
},
|
|
717
|
+
responseType: {
|
|
718
|
+
deserializeBinary(data) {
|
|
719
|
+
const value = empty_1.Empty.decode(data);
|
|
720
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
721
|
+
return value;
|
|
722
|
+
} });
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
};
|
|
721
726
|
exports.BoxServiceShutdownDesc = {
|
|
722
727
|
methodName: "Shutdown",
|
|
723
728
|
service: exports.BoxServiceDesc,
|
|
@@ -766,10 +771,15 @@ class GrpcWebImpl {
|
|
|
766
771
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
767
772
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
768
773
|
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
769
|
-
: metadata
|
|
774
|
+
: metadata || this.options.metadata;
|
|
770
775
|
return new Promise((resolve, reject) => {
|
|
771
|
-
|
|
772
|
-
|
|
776
|
+
grpc_web_1.grpc.unary(methodDesc, {
|
|
777
|
+
request,
|
|
778
|
+
host: this.host,
|
|
779
|
+
metadata: maybeCombinedMetadata,
|
|
780
|
+
transport: this.options.transport,
|
|
781
|
+
debug: this.options.debug,
|
|
782
|
+
onEnd: function (response) {
|
|
773
783
|
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
774
784
|
resolve(response.message.toObject());
|
|
775
785
|
}
|
|
@@ -777,12 +787,13 @@ class GrpcWebImpl {
|
|
|
777
787
|
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
778
788
|
reject(err);
|
|
779
789
|
}
|
|
780
|
-
}
|
|
790
|
+
},
|
|
791
|
+
});
|
|
781
792
|
});
|
|
782
793
|
}
|
|
783
794
|
}
|
|
784
795
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
785
|
-
|
|
796
|
+
var tsProtoGlobalThis = (() => {
|
|
786
797
|
if (typeof globalThis !== "undefined") {
|
|
787
798
|
return globalThis;
|
|
788
799
|
}
|