@lazycatcloud/sdk 0.1.437 → 0.1.439
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/box.d.ts +42 -0
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/box.js +16 -1
- package/dist/common/box.js.map +1 -1
- package/dist/common/end_device.d.ts +38 -0
- package/dist/common/end_device.d.ts.map +1 -1
- package/dist/common/end_device.js +31 -1
- package/dist/common/end_device.js.map +1 -1
- package/dist/localdevice/clipboard.d.ts +11 -11
- package/dist/localdevice/clipboard.d.ts.map +1 -1
- package/dist/localdevice/clipboard.js +53 -43
- package/dist/localdevice/clipboard.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/sys/OS_snapshot.d.ts +39 -39
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +138 -90
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +21 -21
- package/dist/sys/OS_upgrader.d.ts.map +1 -1
- package/dist/sys/OS_upgrader.js +60 -44
- package/dist/sys/OS_upgrader.js.map +1 -1
- package/dist/sys/devopt.d.ts +23 -79
- package/dist/sys/devopt.d.ts.map +1 -1
- package/dist/sys/devopt.js +36 -177
- package/dist/sys/devopt.js.map +1 -1
- package/dist/sys/dirmon.d.ts +12 -19
- package/dist/sys/dirmon.d.ts.map +1 -1
- package/dist/sys/dirmon.js +15 -39
- package/dist/sys/dirmon.js.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +53 -54
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.js +154 -126
- package/dist/sys/hc-core/hc-core.js.map +1 -1
- package/dist/sys/installer.d.ts +19 -19
- package/dist/sys/installer.d.ts.map +1 -1
- package/dist/sys/installer.js +85 -62
- package/dist/sys/installer.js.map +1 -1
- package/dist/sys/osupgrader.d.ts +256 -0
- package/dist/sys/osupgrader.d.ts.map +1 -0
- package/dist/sys/osupgrader.js +536 -0
- package/dist/sys/osupgrader.js.map +1 -0
- package/dist/sys/package_manager.d.ts +451 -0
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +966 -130
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +137 -39
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +538 -132
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/snapd.d.ts +19 -19
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +72 -50
- package/dist/sys/snapd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/sys/OS_daemon.d.ts +0 -133
- package/dist/sys/OS_daemon.d.ts.map +0 -1
- package/dist/sys/OS_daemon.js +0 -364
- package/dist/sys/OS_daemon.js.map +0 -1
- package/dist/sys/box-status.d.ts +0 -603
- package/dist/sys/box-status.d.ts.map +0 -1
- package/dist/sys/box-status.js +0 -1004
- package/dist/sys/box-status.js.map +0 -1
|
@@ -3,12 +3,15 @@ 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.
|
|
6
|
+
exports.PackageManagerGetAppCfgDesc = exports.PackageManagerClearCacheDesc = exports.PackageManagerResumeDesc = exports.PackageManagerPauseDesc = exports.PackageManagerUninstallDesc = exports.PackageManagerInstallDesc = exports.PackageManagerDesc = exports.PackageManagerClientImpl = exports.GetAppDownloadProgressResponse_ProgressesEntry = exports.GetAppDownloadProgressResponse = exports.GetAppDownloadProgressRequest = exports.SubscribeAppChangeResponse = exports.SubscribeAppChangeRequest = exports.ApplicationInfo = exports.ApplicationInfoResponse = exports.ApplicationInfoRequest = exports.AppInstance = exports.ListFileHandlerResponse = exports.FileHandlerInfo = exports.ListFileHandlerRequest = exports.GetActionURLResponse = exports.GetActionURLRequest = exports.Appid = exports.GetUserPermissionsRequest = exports.UserPermission = exports.AppStorageUsage_UserdataEntry = exports.AppStorageUsage = exports.QueryAppStorageUsageRequest = exports.QueryApplicationResponse = exports.QueryApplicationRequest = exports.SetAppCfgRequest = exports.GetAppCfgResponse = exports.GetAppCfgRequest = exports.AppCfg = exports.AppInfo = exports.AppDownloadProgress = exports.UninstallRequest = exports.InstallRequest = exports.PkgURL = exports.RestartMySelfResponse = exports.StopMySelfRequest = exports.actionToJSON = exports.actionFromJSON = exports.Action = exports.instanceStatusToJSON = exports.instanceStatusFromJSON = exports.InstanceStatus = exports.appStatusToJSON = exports.appStatusFromJSON = exports.AppStatus = void 0;
|
|
7
|
+
exports.GrpcWebError = exports.GrpcWebImpl = exports.PackageManagerStopMySelfDesc = exports.PackageManagerListFileHandlerDesc = exports.PackageManagerGetActionURLDesc = exports.PackageManagerPauseAppDownloadDesc = exports.PackageManagerGetUserPermissionsDesc = exports.PackageManagerSetUserPermissionsDesc = exports.PackageManagerQueryAppStorageUsageDesc = exports.PackageManagerGetAppDownloadProgressDesc = exports.PackageManagerSubscribeAppChangeDesc = exports.PackageManagerApplicationInfoDesc = exports.PackageManagerQueryApplicationDesc = exports.PackageManagerSetAppCfgDesc = void 0;
|
|
7
8
|
/* eslint-disable */
|
|
8
9
|
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
9
10
|
const browser_headers_1 = require("browser-headers");
|
|
10
11
|
const long_1 = __importDefault(require("long"));
|
|
11
12
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
13
|
+
const rxjs_1 = require("rxjs");
|
|
14
|
+
const operators_1 = require("rxjs/operators");
|
|
12
15
|
const empty_1 = require("../google/protobuf/empty");
|
|
13
16
|
var AppStatus;
|
|
14
17
|
(function (AppStatus) {
|
|
@@ -163,6 +166,94 @@ function actionToJSON(object) {
|
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
168
|
exports.actionToJSON = actionToJSON;
|
|
169
|
+
function createBaseStopMySelfRequest() {
|
|
170
|
+
return { needRestart: false };
|
|
171
|
+
}
|
|
172
|
+
exports.StopMySelfRequest = {
|
|
173
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
174
|
+
if (message.needRestart === true) {
|
|
175
|
+
writer.uint32(8).bool(message.needRestart);
|
|
176
|
+
}
|
|
177
|
+
return writer;
|
|
178
|
+
},
|
|
179
|
+
decode(input, length) {
|
|
180
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
181
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
182
|
+
const message = createBaseStopMySelfRequest();
|
|
183
|
+
while (reader.pos < end) {
|
|
184
|
+
const tag = reader.uint32();
|
|
185
|
+
switch (tag >>> 3) {
|
|
186
|
+
case 1:
|
|
187
|
+
if (tag !== 8) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
message.needRestart = reader.bool();
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
reader.skipType(tag & 7);
|
|
197
|
+
}
|
|
198
|
+
return message;
|
|
199
|
+
},
|
|
200
|
+
fromJSON(object) {
|
|
201
|
+
return { needRestart: isSet(object.needRestart) ? Boolean(object.needRestart) : false };
|
|
202
|
+
},
|
|
203
|
+
toJSON(message) {
|
|
204
|
+
const obj = {};
|
|
205
|
+
if (message.needRestart === true) {
|
|
206
|
+
obj.needRestart = message.needRestart;
|
|
207
|
+
}
|
|
208
|
+
return obj;
|
|
209
|
+
},
|
|
210
|
+
create(base) {
|
|
211
|
+
return exports.StopMySelfRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
212
|
+
},
|
|
213
|
+
fromPartial(object) {
|
|
214
|
+
var _a;
|
|
215
|
+
const message = createBaseStopMySelfRequest();
|
|
216
|
+
message.needRestart = (_a = object.needRestart) !== null && _a !== void 0 ? _a : false;
|
|
217
|
+
return message;
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
function createBaseRestartMySelfResponse() {
|
|
221
|
+
return {};
|
|
222
|
+
}
|
|
223
|
+
exports.RestartMySelfResponse = {
|
|
224
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
225
|
+
return writer;
|
|
226
|
+
},
|
|
227
|
+
decode(input, length) {
|
|
228
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
229
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
230
|
+
const message = createBaseRestartMySelfResponse();
|
|
231
|
+
while (reader.pos < end) {
|
|
232
|
+
const tag = reader.uint32();
|
|
233
|
+
switch (tag >>> 3) {
|
|
234
|
+
}
|
|
235
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
reader.skipType(tag & 7);
|
|
239
|
+
}
|
|
240
|
+
return message;
|
|
241
|
+
},
|
|
242
|
+
fromJSON(_) {
|
|
243
|
+
return {};
|
|
244
|
+
},
|
|
245
|
+
toJSON(_) {
|
|
246
|
+
const obj = {};
|
|
247
|
+
return obj;
|
|
248
|
+
},
|
|
249
|
+
create(base) {
|
|
250
|
+
return exports.RestartMySelfResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
251
|
+
},
|
|
252
|
+
fromPartial(_) {
|
|
253
|
+
const message = createBaseRestartMySelfResponse();
|
|
254
|
+
return message;
|
|
255
|
+
},
|
|
256
|
+
};
|
|
166
257
|
function createBasePkgURL() {
|
|
167
258
|
return { url: "", sha256: "" };
|
|
168
259
|
}
|
|
@@ -1940,145 +2031,773 @@ exports.AppInstance = {
|
|
|
1940
2031
|
return message;
|
|
1941
2032
|
},
|
|
1942
2033
|
};
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
this.rpc = rpc;
|
|
1946
|
-
this.Install = this.Install.bind(this);
|
|
1947
|
-
this.Uninstall = this.Uninstall.bind(this);
|
|
1948
|
-
this.Pause = this.Pause.bind(this);
|
|
1949
|
-
this.Resume = this.Resume.bind(this);
|
|
1950
|
-
this.ClearCache = this.ClearCache.bind(this);
|
|
1951
|
-
this.GetAppCfg = this.GetAppCfg.bind(this);
|
|
1952
|
-
this.SetAppCfg = this.SetAppCfg.bind(this);
|
|
1953
|
-
this.QueryApplication = this.QueryApplication.bind(this);
|
|
1954
|
-
this.QueryAppStorageUsage = this.QueryAppStorageUsage.bind(this);
|
|
1955
|
-
this.SetUserPermissions = this.SetUserPermissions.bind(this);
|
|
1956
|
-
this.GetUserPermissions = this.GetUserPermissions.bind(this);
|
|
1957
|
-
this.PauseAppDownload = this.PauseAppDownload.bind(this);
|
|
1958
|
-
this.GetActionURL = this.GetActionURL.bind(this);
|
|
1959
|
-
this.ListFileHandler = this.ListFileHandler.bind(this);
|
|
1960
|
-
}
|
|
1961
|
-
Install(request, metadata, abortSignal) {
|
|
1962
|
-
return this.rpc.unary(exports.PackageManagerInstallDesc, exports.InstallRequest.fromPartial(request), metadata, abortSignal);
|
|
1963
|
-
}
|
|
1964
|
-
Uninstall(request, metadata, abortSignal) {
|
|
1965
|
-
return this.rpc.unary(exports.PackageManagerUninstallDesc, exports.UninstallRequest.fromPartial(request), metadata, abortSignal);
|
|
1966
|
-
}
|
|
1967
|
-
Pause(request, metadata, abortSignal) {
|
|
1968
|
-
return this.rpc.unary(exports.PackageManagerPauseDesc, exports.AppInstance.fromPartial(request), metadata, abortSignal);
|
|
1969
|
-
}
|
|
1970
|
-
Resume(request, metadata, abortSignal) {
|
|
1971
|
-
return this.rpc.unary(exports.PackageManagerResumeDesc, exports.AppInstance.fromPartial(request), metadata, abortSignal);
|
|
1972
|
-
}
|
|
1973
|
-
ClearCache(request, metadata, abortSignal) {
|
|
1974
|
-
return this.rpc.unary(exports.PackageManagerClearCacheDesc, exports.Appid.fromPartial(request), metadata, abortSignal);
|
|
1975
|
-
}
|
|
1976
|
-
GetAppCfg(request, metadata, abortSignal) {
|
|
1977
|
-
return this.rpc.unary(exports.PackageManagerGetAppCfgDesc, exports.GetAppCfgRequest.fromPartial(request), metadata, abortSignal);
|
|
1978
|
-
}
|
|
1979
|
-
SetAppCfg(request, metadata, abortSignal) {
|
|
1980
|
-
return this.rpc.unary(exports.PackageManagerSetAppCfgDesc, exports.SetAppCfgRequest.fromPartial(request), metadata, abortSignal);
|
|
1981
|
-
}
|
|
1982
|
-
QueryApplication(request, metadata, abortSignal) {
|
|
1983
|
-
return this.rpc.unary(exports.PackageManagerQueryApplicationDesc, exports.QueryApplicationRequest.fromPartial(request), metadata, abortSignal);
|
|
1984
|
-
}
|
|
1985
|
-
QueryAppStorageUsage(request, metadata, abortSignal) {
|
|
1986
|
-
return this.rpc.unary(exports.PackageManagerQueryAppStorageUsageDesc, exports.QueryAppStorageUsageRequest.fromPartial(request), metadata, abortSignal);
|
|
1987
|
-
}
|
|
1988
|
-
SetUserPermissions(request, metadata, abortSignal) {
|
|
1989
|
-
return this.rpc.unary(exports.PackageManagerSetUserPermissionsDesc, exports.UserPermission.fromPartial(request), metadata, abortSignal);
|
|
1990
|
-
}
|
|
1991
|
-
GetUserPermissions(request, metadata, abortSignal) {
|
|
1992
|
-
return this.rpc.unary(exports.PackageManagerGetUserPermissionsDesc, exports.GetUserPermissionsRequest.fromPartial(request), metadata, abortSignal);
|
|
1993
|
-
}
|
|
1994
|
-
PauseAppDownload(request, metadata, abortSignal) {
|
|
1995
|
-
return this.rpc.unary(exports.PackageManagerPauseAppDownloadDesc, exports.Appid.fromPartial(request), metadata, abortSignal);
|
|
1996
|
-
}
|
|
1997
|
-
GetActionURL(request, metadata, abortSignal) {
|
|
1998
|
-
return this.rpc.unary(exports.PackageManagerGetActionURLDesc, exports.GetActionURLRequest.fromPartial(request), metadata, abortSignal);
|
|
1999
|
-
}
|
|
2000
|
-
ListFileHandler(request, metadata, abortSignal) {
|
|
2001
|
-
return this.rpc.unary(exports.PackageManagerListFileHandlerDesc, exports.ListFileHandlerRequest.fromPartial(request), metadata, abortSignal);
|
|
2002
|
-
}
|
|
2034
|
+
function createBaseApplicationInfoRequest() {
|
|
2035
|
+
return { appidList: [] };
|
|
2003
2036
|
}
|
|
2004
|
-
exports.
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
responseStream: false,
|
|
2011
|
-
requestType: {
|
|
2012
|
-
serializeBinary() {
|
|
2013
|
-
return exports.InstallRequest.encode(this).finish();
|
|
2014
|
-
},
|
|
2037
|
+
exports.ApplicationInfoRequest = {
|
|
2038
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2039
|
+
for (const v of message.appidList) {
|
|
2040
|
+
writer.uint32(10).string(v);
|
|
2041
|
+
}
|
|
2042
|
+
return writer;
|
|
2015
2043
|
},
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2044
|
+
decode(input, length) {
|
|
2045
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2046
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2047
|
+
const message = createBaseApplicationInfoRequest();
|
|
2048
|
+
while (reader.pos < end) {
|
|
2049
|
+
const tag = reader.uint32();
|
|
2050
|
+
switch (tag >>> 3) {
|
|
2051
|
+
case 1:
|
|
2052
|
+
if (tag !== 10) {
|
|
2053
|
+
break;
|
|
2054
|
+
}
|
|
2055
|
+
message.appidList.push(reader.string());
|
|
2056
|
+
continue;
|
|
2057
|
+
}
|
|
2058
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2059
|
+
break;
|
|
2060
|
+
}
|
|
2061
|
+
reader.skipType(tag & 7);
|
|
2062
|
+
}
|
|
2063
|
+
return message;
|
|
2023
2064
|
},
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
methodName: "Uninstall",
|
|
2027
|
-
service: exports.PackageManagerDesc,
|
|
2028
|
-
requestStream: false,
|
|
2029
|
-
responseStream: false,
|
|
2030
|
-
requestType: {
|
|
2031
|
-
serializeBinary() {
|
|
2032
|
-
return exports.UninstallRequest.encode(this).finish();
|
|
2033
|
-
},
|
|
2065
|
+
fromJSON(object) {
|
|
2066
|
+
return { appidList: Array.isArray(object === null || object === void 0 ? void 0 : object.appidList) ? object.appidList.map((e) => String(e)) : [] };
|
|
2034
2067
|
},
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2068
|
+
toJSON(message) {
|
|
2069
|
+
var _a;
|
|
2070
|
+
const obj = {};
|
|
2071
|
+
if ((_a = message.appidList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2072
|
+
obj.appidList = message.appidList;
|
|
2073
|
+
}
|
|
2074
|
+
return obj;
|
|
2042
2075
|
},
|
|
2043
|
-
|
|
2044
|
-
exports.
|
|
2045
|
-
methodName: "Pause",
|
|
2046
|
-
service: exports.PackageManagerDesc,
|
|
2047
|
-
requestStream: false,
|
|
2048
|
-
responseStream: false,
|
|
2049
|
-
requestType: {
|
|
2050
|
-
serializeBinary() {
|
|
2051
|
-
return exports.AppInstance.encode(this).finish();
|
|
2052
|
-
},
|
|
2076
|
+
create(base) {
|
|
2077
|
+
return exports.ApplicationInfoRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2053
2078
|
},
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
} });
|
|
2060
|
-
},
|
|
2079
|
+
fromPartial(object) {
|
|
2080
|
+
var _a;
|
|
2081
|
+
const message = createBaseApplicationInfoRequest();
|
|
2082
|
+
message.appidList = ((_a = object.appidList) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
2083
|
+
return message;
|
|
2061
2084
|
},
|
|
2062
2085
|
};
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2086
|
+
function createBaseApplicationInfoResponse() {
|
|
2087
|
+
return { infoList: [] };
|
|
2088
|
+
}
|
|
2089
|
+
exports.ApplicationInfoResponse = {
|
|
2090
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2091
|
+
for (const v of message.infoList) {
|
|
2092
|
+
exports.ApplicationInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
|
2093
|
+
}
|
|
2094
|
+
return writer;
|
|
2072
2095
|
},
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2096
|
+
decode(input, length) {
|
|
2097
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2098
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2099
|
+
const message = createBaseApplicationInfoResponse();
|
|
2100
|
+
while (reader.pos < end) {
|
|
2101
|
+
const tag = reader.uint32();
|
|
2102
|
+
switch (tag >>> 3) {
|
|
2103
|
+
case 1:
|
|
2104
|
+
if (tag !== 10) {
|
|
2105
|
+
break;
|
|
2106
|
+
}
|
|
2107
|
+
message.infoList.push(exports.ApplicationInfo.decode(reader, reader.uint32()));
|
|
2108
|
+
continue;
|
|
2109
|
+
}
|
|
2110
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2111
|
+
break;
|
|
2112
|
+
}
|
|
2113
|
+
reader.skipType(tag & 7);
|
|
2114
|
+
}
|
|
2115
|
+
return message;
|
|
2080
2116
|
},
|
|
2081
|
-
|
|
2117
|
+
fromJSON(object) {
|
|
2118
|
+
return {
|
|
2119
|
+
infoList: Array.isArray(object === null || object === void 0 ? void 0 : object.infoList) ? object.infoList.map((e) => exports.ApplicationInfo.fromJSON(e)) : [],
|
|
2120
|
+
};
|
|
2121
|
+
},
|
|
2122
|
+
toJSON(message) {
|
|
2123
|
+
var _a;
|
|
2124
|
+
const obj = {};
|
|
2125
|
+
if ((_a = message.infoList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2126
|
+
obj.infoList = message.infoList.map((e) => exports.ApplicationInfo.toJSON(e));
|
|
2127
|
+
}
|
|
2128
|
+
return obj;
|
|
2129
|
+
},
|
|
2130
|
+
create(base) {
|
|
2131
|
+
return exports.ApplicationInfoResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2132
|
+
},
|
|
2133
|
+
fromPartial(object) {
|
|
2134
|
+
var _a;
|
|
2135
|
+
const message = createBaseApplicationInfoResponse();
|
|
2136
|
+
message.infoList = ((_a = object.infoList) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ApplicationInfo.fromPartial(e))) || [];
|
|
2137
|
+
return message;
|
|
2138
|
+
},
|
|
2139
|
+
};
|
|
2140
|
+
function createBaseApplicationInfo() {
|
|
2141
|
+
return {
|
|
2142
|
+
appid: "",
|
|
2143
|
+
status: 0,
|
|
2144
|
+
instanceStatus: 0,
|
|
2145
|
+
multiInstance: false,
|
|
2146
|
+
title: undefined,
|
|
2147
|
+
version: undefined,
|
|
2148
|
+
description: undefined,
|
|
2149
|
+
icon: undefined,
|
|
2150
|
+
domain: undefined,
|
|
2151
|
+
builtin: undefined,
|
|
2152
|
+
errorReason: undefined,
|
|
2153
|
+
unsupportedPlatforms: [],
|
|
2154
|
+
};
|
|
2155
|
+
}
|
|
2156
|
+
exports.ApplicationInfo = {
|
|
2157
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2158
|
+
if (message.appid !== "") {
|
|
2159
|
+
writer.uint32(10).string(message.appid);
|
|
2160
|
+
}
|
|
2161
|
+
if (message.status !== 0) {
|
|
2162
|
+
writer.uint32(16).int32(message.status);
|
|
2163
|
+
}
|
|
2164
|
+
if (message.instanceStatus !== 0) {
|
|
2165
|
+
writer.uint32(24).int32(message.instanceStatus);
|
|
2166
|
+
}
|
|
2167
|
+
if (message.multiInstance === true) {
|
|
2168
|
+
writer.uint32(32).bool(message.multiInstance);
|
|
2169
|
+
}
|
|
2170
|
+
if (message.title !== undefined) {
|
|
2171
|
+
writer.uint32(42).string(message.title);
|
|
2172
|
+
}
|
|
2173
|
+
if (message.version !== undefined) {
|
|
2174
|
+
writer.uint32(50).string(message.version);
|
|
2175
|
+
}
|
|
2176
|
+
if (message.description !== undefined) {
|
|
2177
|
+
writer.uint32(58).string(message.description);
|
|
2178
|
+
}
|
|
2179
|
+
if (message.icon !== undefined) {
|
|
2180
|
+
writer.uint32(66).string(message.icon);
|
|
2181
|
+
}
|
|
2182
|
+
if (message.domain !== undefined) {
|
|
2183
|
+
writer.uint32(74).string(message.domain);
|
|
2184
|
+
}
|
|
2185
|
+
if (message.builtin !== undefined) {
|
|
2186
|
+
writer.uint32(80).bool(message.builtin);
|
|
2187
|
+
}
|
|
2188
|
+
if (message.errorReason !== undefined) {
|
|
2189
|
+
writer.uint32(90).string(message.errorReason);
|
|
2190
|
+
}
|
|
2191
|
+
for (const v of message.unsupportedPlatforms) {
|
|
2192
|
+
writer.uint32(98).string(v);
|
|
2193
|
+
}
|
|
2194
|
+
return writer;
|
|
2195
|
+
},
|
|
2196
|
+
decode(input, length) {
|
|
2197
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2198
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2199
|
+
const message = createBaseApplicationInfo();
|
|
2200
|
+
while (reader.pos < end) {
|
|
2201
|
+
const tag = reader.uint32();
|
|
2202
|
+
switch (tag >>> 3) {
|
|
2203
|
+
case 1:
|
|
2204
|
+
if (tag !== 10) {
|
|
2205
|
+
break;
|
|
2206
|
+
}
|
|
2207
|
+
message.appid = reader.string();
|
|
2208
|
+
continue;
|
|
2209
|
+
case 2:
|
|
2210
|
+
if (tag !== 16) {
|
|
2211
|
+
break;
|
|
2212
|
+
}
|
|
2213
|
+
message.status = reader.int32();
|
|
2214
|
+
continue;
|
|
2215
|
+
case 3:
|
|
2216
|
+
if (tag !== 24) {
|
|
2217
|
+
break;
|
|
2218
|
+
}
|
|
2219
|
+
message.instanceStatus = reader.int32();
|
|
2220
|
+
continue;
|
|
2221
|
+
case 4:
|
|
2222
|
+
if (tag !== 32) {
|
|
2223
|
+
break;
|
|
2224
|
+
}
|
|
2225
|
+
message.multiInstance = reader.bool();
|
|
2226
|
+
continue;
|
|
2227
|
+
case 5:
|
|
2228
|
+
if (tag !== 42) {
|
|
2229
|
+
break;
|
|
2230
|
+
}
|
|
2231
|
+
message.title = reader.string();
|
|
2232
|
+
continue;
|
|
2233
|
+
case 6:
|
|
2234
|
+
if (tag !== 50) {
|
|
2235
|
+
break;
|
|
2236
|
+
}
|
|
2237
|
+
message.version = reader.string();
|
|
2238
|
+
continue;
|
|
2239
|
+
case 7:
|
|
2240
|
+
if (tag !== 58) {
|
|
2241
|
+
break;
|
|
2242
|
+
}
|
|
2243
|
+
message.description = reader.string();
|
|
2244
|
+
continue;
|
|
2245
|
+
case 8:
|
|
2246
|
+
if (tag !== 66) {
|
|
2247
|
+
break;
|
|
2248
|
+
}
|
|
2249
|
+
message.icon = reader.string();
|
|
2250
|
+
continue;
|
|
2251
|
+
case 9:
|
|
2252
|
+
if (tag !== 74) {
|
|
2253
|
+
break;
|
|
2254
|
+
}
|
|
2255
|
+
message.domain = reader.string();
|
|
2256
|
+
continue;
|
|
2257
|
+
case 10:
|
|
2258
|
+
if (tag !== 80) {
|
|
2259
|
+
break;
|
|
2260
|
+
}
|
|
2261
|
+
message.builtin = reader.bool();
|
|
2262
|
+
continue;
|
|
2263
|
+
case 11:
|
|
2264
|
+
if (tag !== 90) {
|
|
2265
|
+
break;
|
|
2266
|
+
}
|
|
2267
|
+
message.errorReason = reader.string();
|
|
2268
|
+
continue;
|
|
2269
|
+
case 12:
|
|
2270
|
+
if (tag !== 98) {
|
|
2271
|
+
break;
|
|
2272
|
+
}
|
|
2273
|
+
message.unsupportedPlatforms.push(reader.string());
|
|
2274
|
+
continue;
|
|
2275
|
+
}
|
|
2276
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2277
|
+
break;
|
|
2278
|
+
}
|
|
2279
|
+
reader.skipType(tag & 7);
|
|
2280
|
+
}
|
|
2281
|
+
return message;
|
|
2282
|
+
},
|
|
2283
|
+
fromJSON(object) {
|
|
2284
|
+
return {
|
|
2285
|
+
appid: isSet(object.appid) ? String(object.appid) : "",
|
|
2286
|
+
status: isSet(object.status) ? appStatusFromJSON(object.status) : 0,
|
|
2287
|
+
instanceStatus: isSet(object.instanceStatus) ? instanceStatusFromJSON(object.instanceStatus) : 0,
|
|
2288
|
+
multiInstance: isSet(object.multiInstance) ? Boolean(object.multiInstance) : false,
|
|
2289
|
+
title: isSet(object.title) ? String(object.title) : undefined,
|
|
2290
|
+
version: isSet(object.version) ? String(object.version) : undefined,
|
|
2291
|
+
description: isSet(object.description) ? String(object.description) : undefined,
|
|
2292
|
+
icon: isSet(object.icon) ? String(object.icon) : undefined,
|
|
2293
|
+
domain: isSet(object.domain) ? String(object.domain) : undefined,
|
|
2294
|
+
builtin: isSet(object.builtin) ? Boolean(object.builtin) : undefined,
|
|
2295
|
+
errorReason: isSet(object.errorReason) ? String(object.errorReason) : undefined,
|
|
2296
|
+
unsupportedPlatforms: Array.isArray(object === null || object === void 0 ? void 0 : object.unsupportedPlatforms)
|
|
2297
|
+
? object.unsupportedPlatforms.map((e) => String(e))
|
|
2298
|
+
: [],
|
|
2299
|
+
};
|
|
2300
|
+
},
|
|
2301
|
+
toJSON(message) {
|
|
2302
|
+
var _a;
|
|
2303
|
+
const obj = {};
|
|
2304
|
+
if (message.appid !== "") {
|
|
2305
|
+
obj.appid = message.appid;
|
|
2306
|
+
}
|
|
2307
|
+
if (message.status !== 0) {
|
|
2308
|
+
obj.status = appStatusToJSON(message.status);
|
|
2309
|
+
}
|
|
2310
|
+
if (message.instanceStatus !== 0) {
|
|
2311
|
+
obj.instanceStatus = instanceStatusToJSON(message.instanceStatus);
|
|
2312
|
+
}
|
|
2313
|
+
if (message.multiInstance === true) {
|
|
2314
|
+
obj.multiInstance = message.multiInstance;
|
|
2315
|
+
}
|
|
2316
|
+
if (message.title !== undefined) {
|
|
2317
|
+
obj.title = message.title;
|
|
2318
|
+
}
|
|
2319
|
+
if (message.version !== undefined) {
|
|
2320
|
+
obj.version = message.version;
|
|
2321
|
+
}
|
|
2322
|
+
if (message.description !== undefined) {
|
|
2323
|
+
obj.description = message.description;
|
|
2324
|
+
}
|
|
2325
|
+
if (message.icon !== undefined) {
|
|
2326
|
+
obj.icon = message.icon;
|
|
2327
|
+
}
|
|
2328
|
+
if (message.domain !== undefined) {
|
|
2329
|
+
obj.domain = message.domain;
|
|
2330
|
+
}
|
|
2331
|
+
if (message.builtin !== undefined) {
|
|
2332
|
+
obj.builtin = message.builtin;
|
|
2333
|
+
}
|
|
2334
|
+
if (message.errorReason !== undefined) {
|
|
2335
|
+
obj.errorReason = message.errorReason;
|
|
2336
|
+
}
|
|
2337
|
+
if ((_a = message.unsupportedPlatforms) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2338
|
+
obj.unsupportedPlatforms = message.unsupportedPlatforms;
|
|
2339
|
+
}
|
|
2340
|
+
return obj;
|
|
2341
|
+
},
|
|
2342
|
+
create(base) {
|
|
2343
|
+
return exports.ApplicationInfo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2344
|
+
},
|
|
2345
|
+
fromPartial(object) {
|
|
2346
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2347
|
+
const message = createBaseApplicationInfo();
|
|
2348
|
+
message.appid = (_a = object.appid) !== null && _a !== void 0 ? _a : "";
|
|
2349
|
+
message.status = (_b = object.status) !== null && _b !== void 0 ? _b : 0;
|
|
2350
|
+
message.instanceStatus = (_c = object.instanceStatus) !== null && _c !== void 0 ? _c : 0;
|
|
2351
|
+
message.multiInstance = (_d = object.multiInstance) !== null && _d !== void 0 ? _d : false;
|
|
2352
|
+
message.title = (_e = object.title) !== null && _e !== void 0 ? _e : undefined;
|
|
2353
|
+
message.version = (_f = object.version) !== null && _f !== void 0 ? _f : undefined;
|
|
2354
|
+
message.description = (_g = object.description) !== null && _g !== void 0 ? _g : undefined;
|
|
2355
|
+
message.icon = (_h = object.icon) !== null && _h !== void 0 ? _h : undefined;
|
|
2356
|
+
message.domain = (_j = object.domain) !== null && _j !== void 0 ? _j : undefined;
|
|
2357
|
+
message.builtin = (_k = object.builtin) !== null && _k !== void 0 ? _k : undefined;
|
|
2358
|
+
message.errorReason = (_l = object.errorReason) !== null && _l !== void 0 ? _l : undefined;
|
|
2359
|
+
message.unsupportedPlatforms = ((_m = object.unsupportedPlatforms) === null || _m === void 0 ? void 0 : _m.map((e) => e)) || [];
|
|
2360
|
+
return message;
|
|
2361
|
+
},
|
|
2362
|
+
};
|
|
2363
|
+
function createBaseSubscribeAppChangeRequest() {
|
|
2364
|
+
return { appidList: [] };
|
|
2365
|
+
}
|
|
2366
|
+
exports.SubscribeAppChangeRequest = {
|
|
2367
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2368
|
+
for (const v of message.appidList) {
|
|
2369
|
+
writer.uint32(10).string(v);
|
|
2370
|
+
}
|
|
2371
|
+
return writer;
|
|
2372
|
+
},
|
|
2373
|
+
decode(input, length) {
|
|
2374
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2375
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2376
|
+
const message = createBaseSubscribeAppChangeRequest();
|
|
2377
|
+
while (reader.pos < end) {
|
|
2378
|
+
const tag = reader.uint32();
|
|
2379
|
+
switch (tag >>> 3) {
|
|
2380
|
+
case 1:
|
|
2381
|
+
if (tag !== 10) {
|
|
2382
|
+
break;
|
|
2383
|
+
}
|
|
2384
|
+
message.appidList.push(reader.string());
|
|
2385
|
+
continue;
|
|
2386
|
+
}
|
|
2387
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2388
|
+
break;
|
|
2389
|
+
}
|
|
2390
|
+
reader.skipType(tag & 7);
|
|
2391
|
+
}
|
|
2392
|
+
return message;
|
|
2393
|
+
},
|
|
2394
|
+
fromJSON(object) {
|
|
2395
|
+
return { appidList: Array.isArray(object === null || object === void 0 ? void 0 : object.appidList) ? object.appidList.map((e) => String(e)) : [] };
|
|
2396
|
+
},
|
|
2397
|
+
toJSON(message) {
|
|
2398
|
+
var _a;
|
|
2399
|
+
const obj = {};
|
|
2400
|
+
if ((_a = message.appidList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2401
|
+
obj.appidList = message.appidList;
|
|
2402
|
+
}
|
|
2403
|
+
return obj;
|
|
2404
|
+
},
|
|
2405
|
+
create(base) {
|
|
2406
|
+
return exports.SubscribeAppChangeRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2407
|
+
},
|
|
2408
|
+
fromPartial(object) {
|
|
2409
|
+
var _a;
|
|
2410
|
+
const message = createBaseSubscribeAppChangeRequest();
|
|
2411
|
+
message.appidList = ((_a = object.appidList) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
2412
|
+
return message;
|
|
2413
|
+
},
|
|
2414
|
+
};
|
|
2415
|
+
function createBaseSubscribeAppChangeResponse() {
|
|
2416
|
+
return {};
|
|
2417
|
+
}
|
|
2418
|
+
exports.SubscribeAppChangeResponse = {
|
|
2419
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
2420
|
+
return writer;
|
|
2421
|
+
},
|
|
2422
|
+
decode(input, length) {
|
|
2423
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2424
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2425
|
+
const message = createBaseSubscribeAppChangeResponse();
|
|
2426
|
+
while (reader.pos < end) {
|
|
2427
|
+
const tag = reader.uint32();
|
|
2428
|
+
switch (tag >>> 3) {
|
|
2429
|
+
}
|
|
2430
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2431
|
+
break;
|
|
2432
|
+
}
|
|
2433
|
+
reader.skipType(tag & 7);
|
|
2434
|
+
}
|
|
2435
|
+
return message;
|
|
2436
|
+
},
|
|
2437
|
+
fromJSON(_) {
|
|
2438
|
+
return {};
|
|
2439
|
+
},
|
|
2440
|
+
toJSON(_) {
|
|
2441
|
+
const obj = {};
|
|
2442
|
+
return obj;
|
|
2443
|
+
},
|
|
2444
|
+
create(base) {
|
|
2445
|
+
return exports.SubscribeAppChangeResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2446
|
+
},
|
|
2447
|
+
fromPartial(_) {
|
|
2448
|
+
const message = createBaseSubscribeAppChangeResponse();
|
|
2449
|
+
return message;
|
|
2450
|
+
},
|
|
2451
|
+
};
|
|
2452
|
+
function createBaseGetAppDownloadProgressRequest() {
|
|
2453
|
+
return { appidList: [] };
|
|
2454
|
+
}
|
|
2455
|
+
exports.GetAppDownloadProgressRequest = {
|
|
2456
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2457
|
+
for (const v of message.appidList) {
|
|
2458
|
+
writer.uint32(10).string(v);
|
|
2459
|
+
}
|
|
2460
|
+
return writer;
|
|
2461
|
+
},
|
|
2462
|
+
decode(input, length) {
|
|
2463
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2464
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2465
|
+
const message = createBaseGetAppDownloadProgressRequest();
|
|
2466
|
+
while (reader.pos < end) {
|
|
2467
|
+
const tag = reader.uint32();
|
|
2468
|
+
switch (tag >>> 3) {
|
|
2469
|
+
case 1:
|
|
2470
|
+
if (tag !== 10) {
|
|
2471
|
+
break;
|
|
2472
|
+
}
|
|
2473
|
+
message.appidList.push(reader.string());
|
|
2474
|
+
continue;
|
|
2475
|
+
}
|
|
2476
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2477
|
+
break;
|
|
2478
|
+
}
|
|
2479
|
+
reader.skipType(tag & 7);
|
|
2480
|
+
}
|
|
2481
|
+
return message;
|
|
2482
|
+
},
|
|
2483
|
+
fromJSON(object) {
|
|
2484
|
+
return { appidList: Array.isArray(object === null || object === void 0 ? void 0 : object.appidList) ? object.appidList.map((e) => String(e)) : [] };
|
|
2485
|
+
},
|
|
2486
|
+
toJSON(message) {
|
|
2487
|
+
var _a;
|
|
2488
|
+
const obj = {};
|
|
2489
|
+
if ((_a = message.appidList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
2490
|
+
obj.appidList = message.appidList;
|
|
2491
|
+
}
|
|
2492
|
+
return obj;
|
|
2493
|
+
},
|
|
2494
|
+
create(base) {
|
|
2495
|
+
return exports.GetAppDownloadProgressRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2496
|
+
},
|
|
2497
|
+
fromPartial(object) {
|
|
2498
|
+
var _a;
|
|
2499
|
+
const message = createBaseGetAppDownloadProgressRequest();
|
|
2500
|
+
message.appidList = ((_a = object.appidList) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
2501
|
+
return message;
|
|
2502
|
+
},
|
|
2503
|
+
};
|
|
2504
|
+
function createBaseGetAppDownloadProgressResponse() {
|
|
2505
|
+
return { progresses: {} };
|
|
2506
|
+
}
|
|
2507
|
+
exports.GetAppDownloadProgressResponse = {
|
|
2508
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2509
|
+
Object.entries(message.progresses).forEach(([key, value]) => {
|
|
2510
|
+
exports.GetAppDownloadProgressResponse_ProgressesEntry.encode({ key: key, value }, writer.uint32(10).fork())
|
|
2511
|
+
.ldelim();
|
|
2512
|
+
});
|
|
2513
|
+
return writer;
|
|
2514
|
+
},
|
|
2515
|
+
decode(input, length) {
|
|
2516
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2517
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2518
|
+
const message = createBaseGetAppDownloadProgressResponse();
|
|
2519
|
+
while (reader.pos < end) {
|
|
2520
|
+
const tag = reader.uint32();
|
|
2521
|
+
switch (tag >>> 3) {
|
|
2522
|
+
case 1:
|
|
2523
|
+
if (tag !== 10) {
|
|
2524
|
+
break;
|
|
2525
|
+
}
|
|
2526
|
+
const entry1 = exports.GetAppDownloadProgressResponse_ProgressesEntry.decode(reader, reader.uint32());
|
|
2527
|
+
if (entry1.value !== undefined) {
|
|
2528
|
+
message.progresses[entry1.key] = entry1.value;
|
|
2529
|
+
}
|
|
2530
|
+
continue;
|
|
2531
|
+
}
|
|
2532
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2533
|
+
break;
|
|
2534
|
+
}
|
|
2535
|
+
reader.skipType(tag & 7);
|
|
2536
|
+
}
|
|
2537
|
+
return message;
|
|
2538
|
+
},
|
|
2539
|
+
fromJSON(object) {
|
|
2540
|
+
return {
|
|
2541
|
+
progresses: isObject(object.progresses)
|
|
2542
|
+
? Object.entries(object.progresses).reduce((acc, [key, value]) => {
|
|
2543
|
+
acc[key] = exports.AppDownloadProgress.fromJSON(value);
|
|
2544
|
+
return acc;
|
|
2545
|
+
}, {})
|
|
2546
|
+
: {},
|
|
2547
|
+
};
|
|
2548
|
+
},
|
|
2549
|
+
toJSON(message) {
|
|
2550
|
+
const obj = {};
|
|
2551
|
+
if (message.progresses) {
|
|
2552
|
+
const entries = Object.entries(message.progresses);
|
|
2553
|
+
if (entries.length > 0) {
|
|
2554
|
+
obj.progresses = {};
|
|
2555
|
+
entries.forEach(([k, v]) => {
|
|
2556
|
+
obj.progresses[k] = exports.AppDownloadProgress.toJSON(v);
|
|
2557
|
+
});
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
return obj;
|
|
2561
|
+
},
|
|
2562
|
+
create(base) {
|
|
2563
|
+
return exports.GetAppDownloadProgressResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2564
|
+
},
|
|
2565
|
+
fromPartial(object) {
|
|
2566
|
+
var _a;
|
|
2567
|
+
const message = createBaseGetAppDownloadProgressResponse();
|
|
2568
|
+
message.progresses = Object.entries((_a = object.progresses) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
2569
|
+
if (value !== undefined) {
|
|
2570
|
+
acc[key] = exports.AppDownloadProgress.fromPartial(value);
|
|
2571
|
+
}
|
|
2572
|
+
return acc;
|
|
2573
|
+
}, {});
|
|
2574
|
+
return message;
|
|
2575
|
+
},
|
|
2576
|
+
};
|
|
2577
|
+
function createBaseGetAppDownloadProgressResponse_ProgressesEntry() {
|
|
2578
|
+
return { key: "", value: undefined };
|
|
2579
|
+
}
|
|
2580
|
+
exports.GetAppDownloadProgressResponse_ProgressesEntry = {
|
|
2581
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2582
|
+
if (message.key !== "") {
|
|
2583
|
+
writer.uint32(10).string(message.key);
|
|
2584
|
+
}
|
|
2585
|
+
if (message.value !== undefined) {
|
|
2586
|
+
exports.AppDownloadProgress.encode(message.value, writer.uint32(18).fork()).ldelim();
|
|
2587
|
+
}
|
|
2588
|
+
return writer;
|
|
2589
|
+
},
|
|
2590
|
+
decode(input, length) {
|
|
2591
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2592
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2593
|
+
const message = createBaseGetAppDownloadProgressResponse_ProgressesEntry();
|
|
2594
|
+
while (reader.pos < end) {
|
|
2595
|
+
const tag = reader.uint32();
|
|
2596
|
+
switch (tag >>> 3) {
|
|
2597
|
+
case 1:
|
|
2598
|
+
if (tag !== 10) {
|
|
2599
|
+
break;
|
|
2600
|
+
}
|
|
2601
|
+
message.key = reader.string();
|
|
2602
|
+
continue;
|
|
2603
|
+
case 2:
|
|
2604
|
+
if (tag !== 18) {
|
|
2605
|
+
break;
|
|
2606
|
+
}
|
|
2607
|
+
message.value = exports.AppDownloadProgress.decode(reader, reader.uint32());
|
|
2608
|
+
continue;
|
|
2609
|
+
}
|
|
2610
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2611
|
+
break;
|
|
2612
|
+
}
|
|
2613
|
+
reader.skipType(tag & 7);
|
|
2614
|
+
}
|
|
2615
|
+
return message;
|
|
2616
|
+
},
|
|
2617
|
+
fromJSON(object) {
|
|
2618
|
+
return {
|
|
2619
|
+
key: isSet(object.key) ? String(object.key) : "",
|
|
2620
|
+
value: isSet(object.value) ? exports.AppDownloadProgress.fromJSON(object.value) : undefined,
|
|
2621
|
+
};
|
|
2622
|
+
},
|
|
2623
|
+
toJSON(message) {
|
|
2624
|
+
const obj = {};
|
|
2625
|
+
if (message.key !== "") {
|
|
2626
|
+
obj.key = message.key;
|
|
2627
|
+
}
|
|
2628
|
+
if (message.value !== undefined) {
|
|
2629
|
+
obj.value = exports.AppDownloadProgress.toJSON(message.value);
|
|
2630
|
+
}
|
|
2631
|
+
return obj;
|
|
2632
|
+
},
|
|
2633
|
+
create(base) {
|
|
2634
|
+
return exports.GetAppDownloadProgressResponse_ProgressesEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2635
|
+
},
|
|
2636
|
+
fromPartial(object) {
|
|
2637
|
+
var _a;
|
|
2638
|
+
const message = createBaseGetAppDownloadProgressResponse_ProgressesEntry();
|
|
2639
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
2640
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
2641
|
+
? exports.AppDownloadProgress.fromPartial(object.value)
|
|
2642
|
+
: undefined;
|
|
2643
|
+
return message;
|
|
2644
|
+
},
|
|
2645
|
+
};
|
|
2646
|
+
class PackageManagerClientImpl {
|
|
2647
|
+
constructor(rpc) {
|
|
2648
|
+
this.rpc = rpc;
|
|
2649
|
+
this.Install = this.Install.bind(this);
|
|
2650
|
+
this.Uninstall = this.Uninstall.bind(this);
|
|
2651
|
+
this.Pause = this.Pause.bind(this);
|
|
2652
|
+
this.Resume = this.Resume.bind(this);
|
|
2653
|
+
this.ClearCache = this.ClearCache.bind(this);
|
|
2654
|
+
this.GetAppCfg = this.GetAppCfg.bind(this);
|
|
2655
|
+
this.SetAppCfg = this.SetAppCfg.bind(this);
|
|
2656
|
+
this.QueryApplication = this.QueryApplication.bind(this);
|
|
2657
|
+
this.ApplicationInfo = this.ApplicationInfo.bind(this);
|
|
2658
|
+
this.SubscribeAppChange = this.SubscribeAppChange.bind(this);
|
|
2659
|
+
this.GetAppDownloadProgress = this.GetAppDownloadProgress.bind(this);
|
|
2660
|
+
this.QueryAppStorageUsage = this.QueryAppStorageUsage.bind(this);
|
|
2661
|
+
this.SetUserPermissions = this.SetUserPermissions.bind(this);
|
|
2662
|
+
this.GetUserPermissions = this.GetUserPermissions.bind(this);
|
|
2663
|
+
this.PauseAppDownload = this.PauseAppDownload.bind(this);
|
|
2664
|
+
this.GetActionURL = this.GetActionURL.bind(this);
|
|
2665
|
+
this.ListFileHandler = this.ListFileHandler.bind(this);
|
|
2666
|
+
this.StopMySelf = this.StopMySelf.bind(this);
|
|
2667
|
+
}
|
|
2668
|
+
Install(request, metadata, abortSignal) {
|
|
2669
|
+
return this.rpc.unary(exports.PackageManagerInstallDesc, exports.InstallRequest.fromPartial(request), metadata, abortSignal);
|
|
2670
|
+
}
|
|
2671
|
+
Uninstall(request, metadata, abortSignal) {
|
|
2672
|
+
return this.rpc.unary(exports.PackageManagerUninstallDesc, exports.UninstallRequest.fromPartial(request), metadata, abortSignal);
|
|
2673
|
+
}
|
|
2674
|
+
Pause(request, metadata, abortSignal) {
|
|
2675
|
+
return this.rpc.unary(exports.PackageManagerPauseDesc, exports.AppInstance.fromPartial(request), metadata, abortSignal);
|
|
2676
|
+
}
|
|
2677
|
+
Resume(request, metadata, abortSignal) {
|
|
2678
|
+
return this.rpc.unary(exports.PackageManagerResumeDesc, exports.AppInstance.fromPartial(request), metadata, abortSignal);
|
|
2679
|
+
}
|
|
2680
|
+
ClearCache(request, metadata, abortSignal) {
|
|
2681
|
+
return this.rpc.unary(exports.PackageManagerClearCacheDesc, exports.Appid.fromPartial(request), metadata, abortSignal);
|
|
2682
|
+
}
|
|
2683
|
+
GetAppCfg(request, metadata, abortSignal) {
|
|
2684
|
+
return this.rpc.unary(exports.PackageManagerGetAppCfgDesc, exports.GetAppCfgRequest.fromPartial(request), metadata, abortSignal);
|
|
2685
|
+
}
|
|
2686
|
+
SetAppCfg(request, metadata, abortSignal) {
|
|
2687
|
+
return this.rpc.unary(exports.PackageManagerSetAppCfgDesc, exports.SetAppCfgRequest.fromPartial(request), metadata, abortSignal);
|
|
2688
|
+
}
|
|
2689
|
+
QueryApplication(request, metadata, abortSignal) {
|
|
2690
|
+
return this.rpc.unary(exports.PackageManagerQueryApplicationDesc, exports.QueryApplicationRequest.fromPartial(request), metadata, abortSignal);
|
|
2691
|
+
}
|
|
2692
|
+
ApplicationInfo(request, metadata, abortSignal) {
|
|
2693
|
+
return this.rpc.unary(exports.PackageManagerApplicationInfoDesc, exports.ApplicationInfoRequest.fromPartial(request), metadata, abortSignal);
|
|
2694
|
+
}
|
|
2695
|
+
SubscribeAppChange(request, metadata, abortSignal) {
|
|
2696
|
+
return this.rpc.invoke(exports.PackageManagerSubscribeAppChangeDesc, exports.SubscribeAppChangeRequest.fromPartial(request), metadata, abortSignal);
|
|
2697
|
+
}
|
|
2698
|
+
GetAppDownloadProgress(request, metadata, abortSignal) {
|
|
2699
|
+
return this.rpc.unary(exports.PackageManagerGetAppDownloadProgressDesc, exports.GetAppDownloadProgressRequest.fromPartial(request), metadata, abortSignal);
|
|
2700
|
+
}
|
|
2701
|
+
QueryAppStorageUsage(request, metadata, abortSignal) {
|
|
2702
|
+
return this.rpc.unary(exports.PackageManagerQueryAppStorageUsageDesc, exports.QueryAppStorageUsageRequest.fromPartial(request), metadata, abortSignal);
|
|
2703
|
+
}
|
|
2704
|
+
SetUserPermissions(request, metadata, abortSignal) {
|
|
2705
|
+
return this.rpc.unary(exports.PackageManagerSetUserPermissionsDesc, exports.UserPermission.fromPartial(request), metadata, abortSignal);
|
|
2706
|
+
}
|
|
2707
|
+
GetUserPermissions(request, metadata, abortSignal) {
|
|
2708
|
+
return this.rpc.unary(exports.PackageManagerGetUserPermissionsDesc, exports.GetUserPermissionsRequest.fromPartial(request), metadata, abortSignal);
|
|
2709
|
+
}
|
|
2710
|
+
PauseAppDownload(request, metadata, abortSignal) {
|
|
2711
|
+
return this.rpc.unary(exports.PackageManagerPauseAppDownloadDesc, exports.Appid.fromPartial(request), metadata, abortSignal);
|
|
2712
|
+
}
|
|
2713
|
+
GetActionURL(request, metadata, abortSignal) {
|
|
2714
|
+
return this.rpc.unary(exports.PackageManagerGetActionURLDesc, exports.GetActionURLRequest.fromPartial(request), metadata, abortSignal);
|
|
2715
|
+
}
|
|
2716
|
+
ListFileHandler(request, metadata, abortSignal) {
|
|
2717
|
+
return this.rpc.unary(exports.PackageManagerListFileHandlerDesc, exports.ListFileHandlerRequest.fromPartial(request), metadata, abortSignal);
|
|
2718
|
+
}
|
|
2719
|
+
StopMySelf(request, metadata, abortSignal) {
|
|
2720
|
+
return this.rpc.unary(exports.PackageManagerStopMySelfDesc, exports.StopMySelfRequest.fromPartial(request), metadata, abortSignal);
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
exports.PackageManagerClientImpl = PackageManagerClientImpl;
|
|
2724
|
+
exports.PackageManagerDesc = { serviceName: "cloud.lazycat.apis.sys.PackageManager" };
|
|
2725
|
+
exports.PackageManagerInstallDesc = {
|
|
2726
|
+
methodName: "Install",
|
|
2727
|
+
service: exports.PackageManagerDesc,
|
|
2728
|
+
requestStream: false,
|
|
2729
|
+
responseStream: false,
|
|
2730
|
+
requestType: {
|
|
2731
|
+
serializeBinary() {
|
|
2732
|
+
return exports.InstallRequest.encode(this).finish();
|
|
2733
|
+
},
|
|
2734
|
+
},
|
|
2735
|
+
responseType: {
|
|
2736
|
+
deserializeBinary(data) {
|
|
2737
|
+
const value = empty_1.Empty.decode(data);
|
|
2738
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2739
|
+
return value;
|
|
2740
|
+
} });
|
|
2741
|
+
},
|
|
2742
|
+
},
|
|
2743
|
+
};
|
|
2744
|
+
exports.PackageManagerUninstallDesc = {
|
|
2745
|
+
methodName: "Uninstall",
|
|
2746
|
+
service: exports.PackageManagerDesc,
|
|
2747
|
+
requestStream: false,
|
|
2748
|
+
responseStream: false,
|
|
2749
|
+
requestType: {
|
|
2750
|
+
serializeBinary() {
|
|
2751
|
+
return exports.UninstallRequest.encode(this).finish();
|
|
2752
|
+
},
|
|
2753
|
+
},
|
|
2754
|
+
responseType: {
|
|
2755
|
+
deserializeBinary(data) {
|
|
2756
|
+
const value = empty_1.Empty.decode(data);
|
|
2757
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2758
|
+
return value;
|
|
2759
|
+
} });
|
|
2760
|
+
},
|
|
2761
|
+
},
|
|
2762
|
+
};
|
|
2763
|
+
exports.PackageManagerPauseDesc = {
|
|
2764
|
+
methodName: "Pause",
|
|
2765
|
+
service: exports.PackageManagerDesc,
|
|
2766
|
+
requestStream: false,
|
|
2767
|
+
responseStream: false,
|
|
2768
|
+
requestType: {
|
|
2769
|
+
serializeBinary() {
|
|
2770
|
+
return exports.AppInstance.encode(this).finish();
|
|
2771
|
+
},
|
|
2772
|
+
},
|
|
2773
|
+
responseType: {
|
|
2774
|
+
deserializeBinary(data) {
|
|
2775
|
+
const value = empty_1.Empty.decode(data);
|
|
2776
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2777
|
+
return value;
|
|
2778
|
+
} });
|
|
2779
|
+
},
|
|
2780
|
+
},
|
|
2781
|
+
};
|
|
2782
|
+
exports.PackageManagerResumeDesc = {
|
|
2783
|
+
methodName: "Resume",
|
|
2784
|
+
service: exports.PackageManagerDesc,
|
|
2785
|
+
requestStream: false,
|
|
2786
|
+
responseStream: false,
|
|
2787
|
+
requestType: {
|
|
2788
|
+
serializeBinary() {
|
|
2789
|
+
return exports.AppInstance.encode(this).finish();
|
|
2790
|
+
},
|
|
2791
|
+
},
|
|
2792
|
+
responseType: {
|
|
2793
|
+
deserializeBinary(data) {
|
|
2794
|
+
const value = empty_1.Empty.decode(data);
|
|
2795
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2796
|
+
return value;
|
|
2797
|
+
} });
|
|
2798
|
+
},
|
|
2799
|
+
},
|
|
2800
|
+
};
|
|
2082
2801
|
exports.PackageManagerClearCacheDesc = {
|
|
2083
2802
|
methodName: "ClearCache",
|
|
2084
2803
|
service: exports.PackageManagerDesc,
|
|
@@ -2155,6 +2874,63 @@ exports.PackageManagerQueryApplicationDesc = {
|
|
|
2155
2874
|
},
|
|
2156
2875
|
},
|
|
2157
2876
|
};
|
|
2877
|
+
exports.PackageManagerApplicationInfoDesc = {
|
|
2878
|
+
methodName: "ApplicationInfo",
|
|
2879
|
+
service: exports.PackageManagerDesc,
|
|
2880
|
+
requestStream: false,
|
|
2881
|
+
responseStream: false,
|
|
2882
|
+
requestType: {
|
|
2883
|
+
serializeBinary() {
|
|
2884
|
+
return exports.ApplicationInfoRequest.encode(this).finish();
|
|
2885
|
+
},
|
|
2886
|
+
},
|
|
2887
|
+
responseType: {
|
|
2888
|
+
deserializeBinary(data) {
|
|
2889
|
+
const value = exports.ApplicationInfoResponse.decode(data);
|
|
2890
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2891
|
+
return value;
|
|
2892
|
+
} });
|
|
2893
|
+
},
|
|
2894
|
+
},
|
|
2895
|
+
};
|
|
2896
|
+
exports.PackageManagerSubscribeAppChangeDesc = {
|
|
2897
|
+
methodName: "SubscribeAppChange",
|
|
2898
|
+
service: exports.PackageManagerDesc,
|
|
2899
|
+
requestStream: false,
|
|
2900
|
+
responseStream: true,
|
|
2901
|
+
requestType: {
|
|
2902
|
+
serializeBinary() {
|
|
2903
|
+
return exports.SubscribeAppChangeRequest.encode(this).finish();
|
|
2904
|
+
},
|
|
2905
|
+
},
|
|
2906
|
+
responseType: {
|
|
2907
|
+
deserializeBinary(data) {
|
|
2908
|
+
const value = exports.SubscribeAppChangeResponse.decode(data);
|
|
2909
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2910
|
+
return value;
|
|
2911
|
+
} });
|
|
2912
|
+
},
|
|
2913
|
+
},
|
|
2914
|
+
};
|
|
2915
|
+
exports.PackageManagerGetAppDownloadProgressDesc = {
|
|
2916
|
+
methodName: "GetAppDownloadProgress",
|
|
2917
|
+
service: exports.PackageManagerDesc,
|
|
2918
|
+
requestStream: false,
|
|
2919
|
+
responseStream: false,
|
|
2920
|
+
requestType: {
|
|
2921
|
+
serializeBinary() {
|
|
2922
|
+
return exports.GetAppDownloadProgressRequest.encode(this).finish();
|
|
2923
|
+
},
|
|
2924
|
+
},
|
|
2925
|
+
responseType: {
|
|
2926
|
+
deserializeBinary(data) {
|
|
2927
|
+
const value = exports.GetAppDownloadProgressResponse.decode(data);
|
|
2928
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2929
|
+
return value;
|
|
2930
|
+
} });
|
|
2931
|
+
},
|
|
2932
|
+
},
|
|
2933
|
+
};
|
|
2158
2934
|
exports.PackageManagerQueryAppStorageUsageDesc = {
|
|
2159
2935
|
methodName: "QueryAppStorageUsage",
|
|
2160
2936
|
service: exports.PackageManagerDesc,
|
|
@@ -2269,6 +3045,25 @@ exports.PackageManagerListFileHandlerDesc = {
|
|
|
2269
3045
|
},
|
|
2270
3046
|
},
|
|
2271
3047
|
};
|
|
3048
|
+
exports.PackageManagerStopMySelfDesc = {
|
|
3049
|
+
methodName: "StopMySelf",
|
|
3050
|
+
service: exports.PackageManagerDesc,
|
|
3051
|
+
requestStream: false,
|
|
3052
|
+
responseStream: false,
|
|
3053
|
+
requestType: {
|
|
3054
|
+
serializeBinary() {
|
|
3055
|
+
return exports.StopMySelfRequest.encode(this).finish();
|
|
3056
|
+
},
|
|
3057
|
+
},
|
|
3058
|
+
responseType: {
|
|
3059
|
+
deserializeBinary(data) {
|
|
3060
|
+
const value = exports.RestartMySelfResponse.decode(data);
|
|
3061
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
3062
|
+
return value;
|
|
3063
|
+
} });
|
|
3064
|
+
},
|
|
3065
|
+
},
|
|
3066
|
+
};
|
|
2272
3067
|
class GrpcWebImpl {
|
|
2273
3068
|
constructor(host, options) {
|
|
2274
3069
|
this.host = host;
|
|
@@ -2299,6 +3094,47 @@ class GrpcWebImpl {
|
|
|
2299
3094
|
}
|
|
2300
3095
|
});
|
|
2301
3096
|
}
|
|
3097
|
+
invoke(methodDesc, _request, metadata, abortSignal) {
|
|
3098
|
+
var _a, _b, _c;
|
|
3099
|
+
const upStreamCodes = (_a = this.options.upStreamRetryCodes) !== null && _a !== void 0 ? _a : [];
|
|
3100
|
+
const DEFAULT_TIMEOUT_TIME = 3000;
|
|
3101
|
+
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
3102
|
+
const transport = (_b = this.options.streamingTransport) !== null && _b !== void 0 ? _b : this.options.transport;
|
|
3103
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
3104
|
+
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_c = this.options) === null || _c === void 0 ? void 0 : _c.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
3105
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
3106
|
+
return new rxjs_1.Observable((observer) => {
|
|
3107
|
+
const upStream = () => {
|
|
3108
|
+
var _a;
|
|
3109
|
+
const client = grpc_web_1.grpc.invoke(methodDesc, Object.assign(Object.assign({ host: this.host, request }, (transport !== undefined ? { transport } : {})), { metadata: maybeCombinedMetadata !== null && maybeCombinedMetadata !== void 0 ? maybeCombinedMetadata : {}, debug: (_a = this.options.debug) !== null && _a !== void 0 ? _a : false, onMessage: (next) => observer.next(next), onEnd: (code, message, trailers) => {
|
|
3110
|
+
if (code === 0) {
|
|
3111
|
+
observer.complete();
|
|
3112
|
+
}
|
|
3113
|
+
else if (upStreamCodes.includes(code)) {
|
|
3114
|
+
setTimeout(upStream, DEFAULT_TIMEOUT_TIME);
|
|
3115
|
+
}
|
|
3116
|
+
else {
|
|
3117
|
+
const err = new Error(message);
|
|
3118
|
+
err.code = code;
|
|
3119
|
+
err.metadata = trailers;
|
|
3120
|
+
observer.error(err);
|
|
3121
|
+
}
|
|
3122
|
+
} }));
|
|
3123
|
+
observer.add(() => {
|
|
3124
|
+
if (!abortSignal || !abortSignal.aborted) {
|
|
3125
|
+
return client.close();
|
|
3126
|
+
}
|
|
3127
|
+
});
|
|
3128
|
+
if (abortSignal) {
|
|
3129
|
+
abortSignal.addEventListener("abort", () => {
|
|
3130
|
+
observer.error(abortSignal.reason);
|
|
3131
|
+
client.close();
|
|
3132
|
+
});
|
|
3133
|
+
}
|
|
3134
|
+
};
|
|
3135
|
+
upStream();
|
|
3136
|
+
}).pipe((0, operators_1.share)());
|
|
3137
|
+
}
|
|
2302
3138
|
}
|
|
2303
3139
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
2304
3140
|
const tsProtoGlobalThis = (() => {
|