@lazycatcloud/sdk 0.1.438 → 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/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/package.json +1 -1
- package/dist/sys/package_manager.d.ts +417 -0
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +726 -2
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,13 +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.
|
|
7
|
-
exports.GrpcWebError = exports.GrpcWebImpl = exports.PackageManagerStopMySelfDesc = void 0;
|
|
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;
|
|
8
8
|
/* eslint-disable */
|
|
9
9
|
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
10
10
|
const browser_headers_1 = require("browser-headers");
|
|
11
11
|
const long_1 = __importDefault(require("long"));
|
|
12
12
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
13
|
+
const rxjs_1 = require("rxjs");
|
|
14
|
+
const operators_1 = require("rxjs/operators");
|
|
13
15
|
const empty_1 = require("../google/protobuf/empty");
|
|
14
16
|
var AppStatus;
|
|
15
17
|
(function (AppStatus) {
|
|
@@ -2029,6 +2031,618 @@ exports.AppInstance = {
|
|
|
2029
2031
|
return message;
|
|
2030
2032
|
},
|
|
2031
2033
|
};
|
|
2034
|
+
function createBaseApplicationInfoRequest() {
|
|
2035
|
+
return { appidList: [] };
|
|
2036
|
+
}
|
|
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;
|
|
2043
|
+
},
|
|
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;
|
|
2064
|
+
},
|
|
2065
|
+
fromJSON(object) {
|
|
2066
|
+
return { appidList: Array.isArray(object === null || object === void 0 ? void 0 : object.appidList) ? object.appidList.map((e) => String(e)) : [] };
|
|
2067
|
+
},
|
|
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;
|
|
2075
|
+
},
|
|
2076
|
+
create(base) {
|
|
2077
|
+
return exports.ApplicationInfoRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2078
|
+
},
|
|
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;
|
|
2084
|
+
},
|
|
2085
|
+
};
|
|
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;
|
|
2095
|
+
},
|
|
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;
|
|
2116
|
+
},
|
|
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
|
+
};
|
|
2032
2646
|
class PackageManagerClientImpl {
|
|
2033
2647
|
constructor(rpc) {
|
|
2034
2648
|
this.rpc = rpc;
|
|
@@ -2040,6 +2654,9 @@ class PackageManagerClientImpl {
|
|
|
2040
2654
|
this.GetAppCfg = this.GetAppCfg.bind(this);
|
|
2041
2655
|
this.SetAppCfg = this.SetAppCfg.bind(this);
|
|
2042
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);
|
|
2043
2660
|
this.QueryAppStorageUsage = this.QueryAppStorageUsage.bind(this);
|
|
2044
2661
|
this.SetUserPermissions = this.SetUserPermissions.bind(this);
|
|
2045
2662
|
this.GetUserPermissions = this.GetUserPermissions.bind(this);
|
|
@@ -2072,6 +2689,15 @@ class PackageManagerClientImpl {
|
|
|
2072
2689
|
QueryApplication(request, metadata, abortSignal) {
|
|
2073
2690
|
return this.rpc.unary(exports.PackageManagerQueryApplicationDesc, exports.QueryApplicationRequest.fromPartial(request), metadata, abortSignal);
|
|
2074
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
|
+
}
|
|
2075
2701
|
QueryAppStorageUsage(request, metadata, abortSignal) {
|
|
2076
2702
|
return this.rpc.unary(exports.PackageManagerQueryAppStorageUsageDesc, exports.QueryAppStorageUsageRequest.fromPartial(request), metadata, abortSignal);
|
|
2077
2703
|
}
|
|
@@ -2248,6 +2874,63 @@ exports.PackageManagerQueryApplicationDesc = {
|
|
|
2248
2874
|
},
|
|
2249
2875
|
},
|
|
2250
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
|
+
};
|
|
2251
2934
|
exports.PackageManagerQueryAppStorageUsageDesc = {
|
|
2252
2935
|
methodName: "QueryAppStorageUsage",
|
|
2253
2936
|
service: exports.PackageManagerDesc,
|
|
@@ -2411,6 +3094,47 @@ class GrpcWebImpl {
|
|
|
2411
3094
|
}
|
|
2412
3095
|
});
|
|
2413
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
|
+
}
|
|
2414
3138
|
}
|
|
2415
3139
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
2416
3140
|
const tsProtoGlobalThis = (() => {
|