@lazycatcloud/sdk 0.1.24 → 0.1.25
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 +12 -6
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/box.js +22 -39
- package/dist/common/box.js.map +1 -1
- package/dist/common/browseronly.d.ts +10 -4
- package/dist/common/browseronly.d.ts.map +1 -1
- package/dist/common/browseronly.js +25 -37
- package/dist/common/browseronly.js.map +1 -1
- package/dist/common/end_device.d.ts +14 -8
- package/dist/common/end_device.d.ts.map +1 -1
- package/dist/common/end_device.js +29 -41
- package/dist/common/end_device.js.map +1 -1
- package/dist/common/gateway.d.ts +12 -6
- package/dist/common/gateway.d.ts.map +1 -1
- package/dist/common/gateway.js +23 -37
- package/dist/common/gateway.js.map +1 -1
- package/dist/common/peripheral_device.d.ts +15 -9
- package/dist/common/peripheral_device.d.ts.map +1 -1
- package/dist/common/peripheral_device.js +22 -39
- package/dist/common/peripheral_device.js.map +1 -1
- package/dist/common/security_context.d.ts +15 -9
- package/dist/common/security_context.d.ts.map +1 -1
- package/dist/common/security_context.js +25 -39
- package/dist/common/security_context.js.map +1 -1
- package/dist/common/users.d.ts +18 -12
- package/dist/common/users.d.ts.map +1 -1
- package/dist/common/users.js +33 -47
- package/dist/common/users.js.map +1 -1
- package/dist/google/protobuf/descriptor.d.ts +1644 -1644
- package/dist/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/google/protobuf/descriptor.js +78 -95
- package/dist/google/protobuf/descriptor.js.map +1 -1
- package/dist/google/protobuf/empty.d.ts +2 -2
- package/dist/google/protobuf/empty.d.ts.map +1 -1
- package/dist/google/protobuf/empty.js +5 -25
- package/dist/google/protobuf/empty.js.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts +2 -2
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/google/protobuf/timestamp.js +6 -29
- package/dist/google/protobuf/timestamp.js.map +1 -1
- package/dist/localdevice/clipboard.d.ts +11 -5
- package/dist/localdevice/clipboard.d.ts.map +1 -1
- package/dist/localdevice/clipboard.js +47 -53
- package/dist/localdevice/clipboard.js.map +1 -1
- package/dist/localdevice/device.d.ts +8 -2
- package/dist/localdevice/device.d.ts.map +1 -1
- package/dist/localdevice/device.js +15 -29
- package/dist/localdevice/device.js.map +1 -1
- package/dist/localdevice/dialog.d.ts +12 -6
- package/dist/localdevice/dialog.d.ts.map +1 -1
- package/dist/localdevice/dialog.js +23 -37
- package/dist/localdevice/dialog.js.map +1 -1
- package/dist/localdevice/network.d.ts +8 -2
- package/dist/localdevice/network.d.ts.map +1 -1
- package/dist/localdevice/network.js +15 -29
- package/dist/localdevice/network.js.map +1 -1
- package/dist/localdevice/photo.d.ts +25 -19
- package/dist/localdevice/photo.d.ts.map +1 -1
- package/dist/localdevice/photo.js +44 -59
- package/dist/localdevice/photo.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/sys/OS_snapshot.d.ts +26 -20
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +42 -59
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +13 -7
- package/dist/sys/OS_upgrader.d.ts.map +1 -1
- package/dist/sys/OS_upgrader.js +22 -39
- package/dist/sys/OS_upgrader.js.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +35 -29
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.js +61 -69
- package/dist/sys/hc-core/hc-core.js.map +1 -1
- package/dist/sys/ingress.d.ts +17 -11
- package/dist/sys/ingress.d.ts.map +1 -1
- package/dist/sys/ingress.js +30 -47
- package/dist/sys/ingress.js.map +1 -1
- package/dist/sys/package_manager.d.ts +135 -19
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +346 -55
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +41 -32
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +123 -87
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/snapd.d.ts +63 -91
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +150 -161
- package/dist/sys/snapd.js.map +1 -1
- package/package.json +1 -1
- package/dist/common/permissions.d.ts +0 -93
- package/dist/common/permissions.d.ts.map +0 -1
- package/dist/common/permissions.js +0 -267
- package/dist/common/permissions.js.map +0 -1
package/dist/sys/snapd.js
CHANGED
|
@@ -1,35 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.GrpcWebImpl = exports.
|
|
6
|
+
exports.GrpcWebError = exports.GrpcWebImpl = exports.SnapdServiceSnapdSnapRestoreDesc = exports.SnapdServiceSnapdSnapDelDesc = exports.SnapdServiceSnapdSnapAddDesc = exports.SnapdServiceSnapdSnapListDesc = exports.SnapdServiceSnapdPoolListDesc = exports.SnapdServiceSnapdPoolDelDesc = exports.SnapdServiceSnapdPoolAddDesc = exports.SnapdServiceSnapdConfSetDesc = exports.SnapdServiceSnapdConfGetDesc = exports.SnapdServiceSnapdDisableDesc = exports.SnapdServiceSnapdEnableDesc = exports.SnapdServiceDesc = exports.SnapdServiceClientImpl = exports.SnapdSnapRequest = exports.SnapdListSnapResponse = exports.SnapdListSnapRequest = exports.SnapdConfSetRequest = exports.SnapdConf = exports.SnapdPoolListResponse = exports.SnapdPoolRequest = exports.SnapdTargetRequest = exports.SnapdEnableRequest = exports.snapdAutoStrategyToJSON = exports.snapdAutoStrategyFromJSON = exports.SnapdAutoStrategy = void 0;
|
|
27
7
|
/* eslint-disable */
|
|
28
8
|
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
29
9
|
const empty_1 = require("../google/protobuf/empty");
|
|
30
10
|
const browser_headers_1 = require("browser-headers");
|
|
31
11
|
const OS_snapshot_1 = require("./OS_snapshot");
|
|
32
|
-
const
|
|
12
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
33
13
|
var SnapdAutoStrategy;
|
|
34
14
|
(function (SnapdAutoStrategy) {
|
|
35
15
|
/** Default - 修改该配置项时,此值表示不改变当前配置值 */
|
|
@@ -83,7 +63,7 @@ function createBaseSnapdEnableRequest() {
|
|
|
83
63
|
return { TargetId: "", PathList: [] };
|
|
84
64
|
}
|
|
85
65
|
exports.SnapdEnableRequest = {
|
|
86
|
-
encode(message, writer =
|
|
66
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
87
67
|
if (message.TargetId !== "") {
|
|
88
68
|
writer.uint32(10).string(message.TargetId);
|
|
89
69
|
}
|
|
@@ -93,7 +73,7 @@ exports.SnapdEnableRequest = {
|
|
|
93
73
|
return writer;
|
|
94
74
|
},
|
|
95
75
|
decode(input, length) {
|
|
96
|
-
const reader = input instanceof
|
|
76
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
97
77
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
98
78
|
const message = createBaseSnapdEnableRequest();
|
|
99
79
|
while (reader.pos < end) {
|
|
@@ -143,14 +123,14 @@ function createBaseSnapdTargetRequest() {
|
|
|
143
123
|
return { TargetId: "" };
|
|
144
124
|
}
|
|
145
125
|
exports.SnapdTargetRequest = {
|
|
146
|
-
encode(message, writer =
|
|
126
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
147
127
|
if (message.TargetId !== "") {
|
|
148
128
|
writer.uint32(10).string(message.TargetId);
|
|
149
129
|
}
|
|
150
130
|
return writer;
|
|
151
131
|
},
|
|
152
132
|
decode(input, length) {
|
|
153
|
-
const reader = input instanceof
|
|
133
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
154
134
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
155
135
|
const message = createBaseSnapdTargetRequest();
|
|
156
136
|
while (reader.pos < end) {
|
|
@@ -183,31 +163,25 @@ exports.SnapdTargetRequest = {
|
|
|
183
163
|
return message;
|
|
184
164
|
},
|
|
185
165
|
};
|
|
186
|
-
function
|
|
187
|
-
return {
|
|
166
|
+
function createBaseSnapdPoolRequest() {
|
|
167
|
+
return { PoolName: "" };
|
|
188
168
|
}
|
|
189
|
-
exports.
|
|
190
|
-
encode(message, writer =
|
|
191
|
-
if (message.
|
|
192
|
-
writer.uint32(10).string(message.
|
|
193
|
-
}
|
|
194
|
-
if (message.BackupPool !== "") {
|
|
195
|
-
writer.uint32(18).string(message.BackupPool);
|
|
169
|
+
exports.SnapdPoolRequest = {
|
|
170
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
171
|
+
if (message.PoolName !== "") {
|
|
172
|
+
writer.uint32(10).string(message.PoolName);
|
|
196
173
|
}
|
|
197
174
|
return writer;
|
|
198
175
|
},
|
|
199
176
|
decode(input, length) {
|
|
200
|
-
const reader = input instanceof
|
|
177
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
201
178
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
202
|
-
const message =
|
|
179
|
+
const message = createBaseSnapdPoolRequest();
|
|
203
180
|
while (reader.pos < end) {
|
|
204
181
|
const tag = reader.uint32();
|
|
205
182
|
switch (tag >>> 3) {
|
|
206
183
|
case 1:
|
|
207
|
-
message.
|
|
208
|
-
break;
|
|
209
|
-
case 2:
|
|
210
|
-
message.BackupPool = reader.string();
|
|
184
|
+
message.PoolName = reader.string();
|
|
211
185
|
break;
|
|
212
186
|
default:
|
|
213
187
|
reader.skipType(tag & 7);
|
|
@@ -218,43 +192,40 @@ exports.SnapdListPathRequest = {
|
|
|
218
192
|
},
|
|
219
193
|
fromJSON(object) {
|
|
220
194
|
return {
|
|
221
|
-
|
|
222
|
-
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
195
|
+
PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
|
|
223
196
|
};
|
|
224
197
|
},
|
|
225
198
|
toJSON(message) {
|
|
226
199
|
const obj = {};
|
|
227
|
-
message.
|
|
228
|
-
message.BackupPool !== undefined && (obj.BackupPool = message.BackupPool);
|
|
200
|
+
message.PoolName !== undefined && (obj.PoolName = message.PoolName);
|
|
229
201
|
return obj;
|
|
230
202
|
},
|
|
231
203
|
fromPartial(object) {
|
|
232
|
-
var _a
|
|
233
|
-
const message =
|
|
234
|
-
message.
|
|
235
|
-
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
204
|
+
var _a;
|
|
205
|
+
const message = createBaseSnapdPoolRequest();
|
|
206
|
+
message.PoolName = (_a = object.PoolName) !== null && _a !== void 0 ? _a : "";
|
|
236
207
|
return message;
|
|
237
208
|
},
|
|
238
209
|
};
|
|
239
|
-
function
|
|
240
|
-
return {
|
|
210
|
+
function createBaseSnapdPoolListResponse() {
|
|
211
|
+
return { PoolNameList: [] };
|
|
241
212
|
}
|
|
242
|
-
exports.
|
|
243
|
-
encode(message, writer =
|
|
244
|
-
for (const v of message.
|
|
245
|
-
|
|
213
|
+
exports.SnapdPoolListResponse = {
|
|
214
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
215
|
+
for (const v of message.PoolNameList) {
|
|
216
|
+
writer.uint32(10).string(v);
|
|
246
217
|
}
|
|
247
218
|
return writer;
|
|
248
219
|
},
|
|
249
220
|
decode(input, length) {
|
|
250
|
-
const reader = input instanceof
|
|
221
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
251
222
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
252
|
-
const message =
|
|
223
|
+
const message = createBaseSnapdPoolListResponse();
|
|
253
224
|
while (reader.pos < end) {
|
|
254
225
|
const tag = reader.uint32();
|
|
255
226
|
switch (tag >>> 3) {
|
|
256
227
|
case 1:
|
|
257
|
-
message.
|
|
228
|
+
message.PoolNameList.push(reader.string());
|
|
258
229
|
break;
|
|
259
230
|
default:
|
|
260
231
|
reader.skipType(tag & 7);
|
|
@@ -265,26 +236,25 @@ exports.SnapdListPathResponse = {
|
|
|
265
236
|
},
|
|
266
237
|
fromJSON(object) {
|
|
267
238
|
return {
|
|
268
|
-
|
|
269
|
-
? object.
|
|
239
|
+
PoolNameList: Array.isArray(object === null || object === void 0 ? void 0 : object.PoolNameList)
|
|
240
|
+
? object.PoolNameList.map((e) => String(e))
|
|
270
241
|
: [],
|
|
271
242
|
};
|
|
272
243
|
},
|
|
273
244
|
toJSON(message) {
|
|
274
245
|
const obj = {};
|
|
275
|
-
if (message.
|
|
276
|
-
obj.
|
|
246
|
+
if (message.PoolNameList) {
|
|
247
|
+
obj.PoolNameList = message.PoolNameList.map((e) => e);
|
|
277
248
|
}
|
|
278
249
|
else {
|
|
279
|
-
obj.
|
|
250
|
+
obj.PoolNameList = [];
|
|
280
251
|
}
|
|
281
252
|
return obj;
|
|
282
253
|
},
|
|
283
254
|
fromPartial(object) {
|
|
284
255
|
var _a;
|
|
285
|
-
const message =
|
|
286
|
-
message.
|
|
287
|
-
((_a = object.PathList) === null || _a === void 0 ? void 0 : _a.map((e) => OS_snapshot_1.SnapshotDatasetDesc.fromPartial(e))) || [];
|
|
256
|
+
const message = createBaseSnapdPoolListResponse();
|
|
257
|
+
message.PoolNameList = ((_a = object.PoolNameList) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
288
258
|
return message;
|
|
289
259
|
},
|
|
290
260
|
};
|
|
@@ -293,12 +263,11 @@ function createBaseSnapdConf() {
|
|
|
293
263
|
AutoStrategy: 0,
|
|
294
264
|
AutoSnapInterval: 0,
|
|
295
265
|
AutoSnapLifetime: 0,
|
|
296
|
-
AutoBackupInterval: 0,
|
|
297
266
|
AutoBackupLifetime: 0,
|
|
298
267
|
};
|
|
299
268
|
}
|
|
300
269
|
exports.SnapdConf = {
|
|
301
|
-
encode(message, writer =
|
|
270
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
302
271
|
if (message.AutoStrategy !== 0) {
|
|
303
272
|
writer.uint32(8).int32(message.AutoStrategy);
|
|
304
273
|
}
|
|
@@ -308,16 +277,13 @@ exports.SnapdConf = {
|
|
|
308
277
|
if (message.AutoSnapLifetime !== 0) {
|
|
309
278
|
writer.uint32(24).uint32(message.AutoSnapLifetime);
|
|
310
279
|
}
|
|
311
|
-
if (message.AutoBackupInterval !== 0) {
|
|
312
|
-
writer.uint32(32).uint32(message.AutoBackupInterval);
|
|
313
|
-
}
|
|
314
280
|
if (message.AutoBackupLifetime !== 0) {
|
|
315
|
-
writer.uint32(
|
|
281
|
+
writer.uint32(32).uint32(message.AutoBackupLifetime);
|
|
316
282
|
}
|
|
317
283
|
return writer;
|
|
318
284
|
},
|
|
319
285
|
decode(input, length) {
|
|
320
|
-
const reader = input instanceof
|
|
286
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
321
287
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
322
288
|
const message = createBaseSnapdConf();
|
|
323
289
|
while (reader.pos < end) {
|
|
@@ -333,9 +299,6 @@ exports.SnapdConf = {
|
|
|
333
299
|
message.AutoSnapLifetime = reader.uint32();
|
|
334
300
|
break;
|
|
335
301
|
case 4:
|
|
336
|
-
message.AutoBackupInterval = reader.uint32();
|
|
337
|
-
break;
|
|
338
|
-
case 5:
|
|
339
302
|
message.AutoBackupLifetime = reader.uint32();
|
|
340
303
|
break;
|
|
341
304
|
default:
|
|
@@ -356,9 +319,6 @@ exports.SnapdConf = {
|
|
|
356
319
|
AutoSnapLifetime: isSet(object.AutoSnapLifetime)
|
|
357
320
|
? Number(object.AutoSnapLifetime)
|
|
358
321
|
: 0,
|
|
359
|
-
AutoBackupInterval: isSet(object.AutoBackupInterval)
|
|
360
|
-
? Number(object.AutoBackupInterval)
|
|
361
|
-
: 0,
|
|
362
322
|
AutoBackupLifetime: isSet(object.AutoBackupLifetime)
|
|
363
323
|
? Number(object.AutoBackupLifetime)
|
|
364
324
|
: 0,
|
|
@@ -372,20 +332,17 @@ exports.SnapdConf = {
|
|
|
372
332
|
(obj.AutoSnapInterval = Math.round(message.AutoSnapInterval));
|
|
373
333
|
message.AutoSnapLifetime !== undefined &&
|
|
374
334
|
(obj.AutoSnapLifetime = Math.round(message.AutoSnapLifetime));
|
|
375
|
-
message.AutoBackupInterval !== undefined &&
|
|
376
|
-
(obj.AutoBackupInterval = Math.round(message.AutoBackupInterval));
|
|
377
335
|
message.AutoBackupLifetime !== undefined &&
|
|
378
336
|
(obj.AutoBackupLifetime = Math.round(message.AutoBackupLifetime));
|
|
379
337
|
return obj;
|
|
380
338
|
},
|
|
381
339
|
fromPartial(object) {
|
|
382
|
-
var _a, _b, _c, _d
|
|
340
|
+
var _a, _b, _c, _d;
|
|
383
341
|
const message = createBaseSnapdConf();
|
|
384
342
|
message.AutoStrategy = (_a = object.AutoStrategy) !== null && _a !== void 0 ? _a : 0;
|
|
385
343
|
message.AutoSnapInterval = (_b = object.AutoSnapInterval) !== null && _b !== void 0 ? _b : 0;
|
|
386
344
|
message.AutoSnapLifetime = (_c = object.AutoSnapLifetime) !== null && _c !== void 0 ? _c : 0;
|
|
387
|
-
message.
|
|
388
|
-
message.AutoBackupLifetime = (_e = object.AutoBackupLifetime) !== null && _e !== void 0 ? _e : 0;
|
|
345
|
+
message.AutoBackupLifetime = (_d = object.AutoBackupLifetime) !== null && _d !== void 0 ? _d : 0;
|
|
389
346
|
return message;
|
|
390
347
|
},
|
|
391
348
|
};
|
|
@@ -393,7 +350,7 @@ function createBaseSnapdConfSetRequest() {
|
|
|
393
350
|
return { TargetId: "", Config: undefined };
|
|
394
351
|
}
|
|
395
352
|
exports.SnapdConfSetRequest = {
|
|
396
|
-
encode(message, writer =
|
|
353
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
397
354
|
if (message.TargetId !== "") {
|
|
398
355
|
writer.uint32(10).string(message.TargetId);
|
|
399
356
|
}
|
|
@@ -403,7 +360,7 @@ exports.SnapdConfSetRequest = {
|
|
|
403
360
|
return writer;
|
|
404
361
|
},
|
|
405
362
|
decode(input, length) {
|
|
406
|
-
const reader = input instanceof
|
|
363
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
407
364
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
408
365
|
const message = createBaseSnapdConfSetRequest();
|
|
409
366
|
while (reader.pos < end) {
|
|
@@ -451,23 +408,20 @@ exports.SnapdConfSetRequest = {
|
|
|
451
408
|
},
|
|
452
409
|
};
|
|
453
410
|
function createBaseSnapdListSnapRequest() {
|
|
454
|
-
return { TargetId: "",
|
|
411
|
+
return { TargetId: "", BackupPool: "" };
|
|
455
412
|
}
|
|
456
413
|
exports.SnapdListSnapRequest = {
|
|
457
|
-
encode(message, writer =
|
|
414
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
458
415
|
if (message.TargetId !== "") {
|
|
459
416
|
writer.uint32(10).string(message.TargetId);
|
|
460
417
|
}
|
|
461
|
-
if (message.Path !== "") {
|
|
462
|
-
writer.uint32(18).string(message.Path);
|
|
463
|
-
}
|
|
464
418
|
if (message.BackupPool !== "") {
|
|
465
|
-
writer.uint32(
|
|
419
|
+
writer.uint32(18).string(message.BackupPool);
|
|
466
420
|
}
|
|
467
421
|
return writer;
|
|
468
422
|
},
|
|
469
423
|
decode(input, length) {
|
|
470
|
-
const reader = input instanceof
|
|
424
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
471
425
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
472
426
|
const message = createBaseSnapdListSnapRequest();
|
|
473
427
|
while (reader.pos < end) {
|
|
@@ -477,9 +431,6 @@ exports.SnapdListSnapRequest = {
|
|
|
477
431
|
message.TargetId = reader.string();
|
|
478
432
|
break;
|
|
479
433
|
case 2:
|
|
480
|
-
message.Path = reader.string();
|
|
481
|
-
break;
|
|
482
|
-
case 3:
|
|
483
434
|
message.BackupPool = reader.string();
|
|
484
435
|
break;
|
|
485
436
|
default:
|
|
@@ -492,23 +443,20 @@ exports.SnapdListSnapRequest = {
|
|
|
492
443
|
fromJSON(object) {
|
|
493
444
|
return {
|
|
494
445
|
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
495
|
-
Path: isSet(object.Path) ? String(object.Path) : "",
|
|
496
446
|
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
497
447
|
};
|
|
498
448
|
},
|
|
499
449
|
toJSON(message) {
|
|
500
450
|
const obj = {};
|
|
501
451
|
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
502
|
-
message.Path !== undefined && (obj.Path = message.Path);
|
|
503
452
|
message.BackupPool !== undefined && (obj.BackupPool = message.BackupPool);
|
|
504
453
|
return obj;
|
|
505
454
|
},
|
|
506
455
|
fromPartial(object) {
|
|
507
|
-
var _a, _b
|
|
456
|
+
var _a, _b;
|
|
508
457
|
const message = createBaseSnapdListSnapRequest();
|
|
509
458
|
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
510
|
-
message.
|
|
511
|
-
message.BackupPool = (_c = object.BackupPool) !== null && _c !== void 0 ? _c : "";
|
|
459
|
+
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
512
460
|
return message;
|
|
513
461
|
},
|
|
514
462
|
};
|
|
@@ -516,14 +464,14 @@ function createBaseSnapdListSnapResponse() {
|
|
|
516
464
|
return { SnapshotList: [] };
|
|
517
465
|
}
|
|
518
466
|
exports.SnapdListSnapResponse = {
|
|
519
|
-
encode(message, writer =
|
|
467
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
520
468
|
for (const v of message.SnapshotList) {
|
|
521
469
|
OS_snapshot_1.SnapshotDesc.encode(v, writer.uint32(10).fork()).ldelim();
|
|
522
470
|
}
|
|
523
471
|
return writer;
|
|
524
472
|
},
|
|
525
473
|
decode(input, length) {
|
|
526
|
-
const reader = input instanceof
|
|
474
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
527
475
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
528
476
|
const message = createBaseSnapdListSnapResponse();
|
|
529
477
|
while (reader.pos < end) {
|
|
@@ -565,26 +513,23 @@ exports.SnapdListSnapResponse = {
|
|
|
565
513
|
},
|
|
566
514
|
};
|
|
567
515
|
function createBaseSnapdSnapRequest() {
|
|
568
|
-
return { TargetId: "",
|
|
516
|
+
return { TargetId: "", BackupPool: "", SnapName: "" };
|
|
569
517
|
}
|
|
570
518
|
exports.SnapdSnapRequest = {
|
|
571
|
-
encode(message, writer =
|
|
519
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
572
520
|
if (message.TargetId !== "") {
|
|
573
521
|
writer.uint32(10).string(message.TargetId);
|
|
574
522
|
}
|
|
575
|
-
if (message.Path !== "") {
|
|
576
|
-
writer.uint32(18).string(message.Path);
|
|
577
|
-
}
|
|
578
523
|
if (message.BackupPool !== "") {
|
|
579
|
-
writer.uint32(
|
|
524
|
+
writer.uint32(18).string(message.BackupPool);
|
|
580
525
|
}
|
|
581
526
|
if (message.SnapName !== "") {
|
|
582
|
-
writer.uint32(
|
|
527
|
+
writer.uint32(26).string(message.SnapName);
|
|
583
528
|
}
|
|
584
529
|
return writer;
|
|
585
530
|
},
|
|
586
531
|
decode(input, length) {
|
|
587
|
-
const reader = input instanceof
|
|
532
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
588
533
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
589
534
|
const message = createBaseSnapdSnapRequest();
|
|
590
535
|
while (reader.pos < end) {
|
|
@@ -594,12 +539,9 @@ exports.SnapdSnapRequest = {
|
|
|
594
539
|
message.TargetId = reader.string();
|
|
595
540
|
break;
|
|
596
541
|
case 2:
|
|
597
|
-
message.Path = reader.string();
|
|
598
|
-
break;
|
|
599
|
-
case 3:
|
|
600
542
|
message.BackupPool = reader.string();
|
|
601
543
|
break;
|
|
602
|
-
case
|
|
544
|
+
case 3:
|
|
603
545
|
message.SnapName = reader.string();
|
|
604
546
|
break;
|
|
605
547
|
default:
|
|
@@ -612,7 +554,6 @@ exports.SnapdSnapRequest = {
|
|
|
612
554
|
fromJSON(object) {
|
|
613
555
|
return {
|
|
614
556
|
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
615
|
-
Path: isSet(object.Path) ? String(object.Path) : "",
|
|
616
557
|
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
617
558
|
SnapName: isSet(object.SnapName) ? String(object.SnapName) : "",
|
|
618
559
|
};
|
|
@@ -620,18 +561,16 @@ exports.SnapdSnapRequest = {
|
|
|
620
561
|
toJSON(message) {
|
|
621
562
|
const obj = {};
|
|
622
563
|
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
623
|
-
message.Path !== undefined && (obj.Path = message.Path);
|
|
624
564
|
message.BackupPool !== undefined && (obj.BackupPool = message.BackupPool);
|
|
625
565
|
message.SnapName !== undefined && (obj.SnapName = message.SnapName);
|
|
626
566
|
return obj;
|
|
627
567
|
},
|
|
628
568
|
fromPartial(object) {
|
|
629
|
-
var _a, _b, _c
|
|
569
|
+
var _a, _b, _c;
|
|
630
570
|
const message = createBaseSnapdSnapRequest();
|
|
631
571
|
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
632
|
-
message.
|
|
633
|
-
message.
|
|
634
|
-
message.SnapName = (_d = object.SnapName) !== null && _d !== void 0 ? _d : "";
|
|
572
|
+
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
573
|
+
message.SnapName = (_c = object.SnapName) !== null && _c !== void 0 ? _c : "";
|
|
635
574
|
return message;
|
|
636
575
|
},
|
|
637
576
|
};
|
|
@@ -640,13 +579,15 @@ class SnapdServiceClientImpl {
|
|
|
640
579
|
this.rpc = rpc;
|
|
641
580
|
this.SnapdEnable = this.SnapdEnable.bind(this);
|
|
642
581
|
this.SnapdDisable = this.SnapdDisable.bind(this);
|
|
643
|
-
this.SnapdListPath = this.SnapdListPath.bind(this);
|
|
644
582
|
this.SnapdConfGet = this.SnapdConfGet.bind(this);
|
|
645
583
|
this.SnapdConfSet = this.SnapdConfSet.bind(this);
|
|
646
|
-
this.
|
|
647
|
-
this.
|
|
648
|
-
this.
|
|
649
|
-
this.
|
|
584
|
+
this.SnapdPoolAdd = this.SnapdPoolAdd.bind(this);
|
|
585
|
+
this.SnapdPoolDel = this.SnapdPoolDel.bind(this);
|
|
586
|
+
this.SnapdPoolList = this.SnapdPoolList.bind(this);
|
|
587
|
+
this.SnapdSnapList = this.SnapdSnapList.bind(this);
|
|
588
|
+
this.SnapdSnapAdd = this.SnapdSnapAdd.bind(this);
|
|
589
|
+
this.SnapdSnapDel = this.SnapdSnapDel.bind(this);
|
|
590
|
+
this.SnapdSnapRestore = this.SnapdSnapRestore.bind(this);
|
|
650
591
|
}
|
|
651
592
|
SnapdEnable(request, metadata) {
|
|
652
593
|
return this.rpc.unary(exports.SnapdServiceSnapdEnableDesc, exports.SnapdEnableRequest.fromPartial(request), metadata);
|
|
@@ -654,26 +595,32 @@ class SnapdServiceClientImpl {
|
|
|
654
595
|
SnapdDisable(request, metadata) {
|
|
655
596
|
return this.rpc.unary(exports.SnapdServiceSnapdDisableDesc, exports.SnapdTargetRequest.fromPartial(request), metadata);
|
|
656
597
|
}
|
|
657
|
-
SnapdListPath(request, metadata) {
|
|
658
|
-
return this.rpc.unary(exports.SnapdServiceSnapdListPathDesc, exports.SnapdListPathRequest.fromPartial(request), metadata);
|
|
659
|
-
}
|
|
660
598
|
SnapdConfGet(request, metadata) {
|
|
661
599
|
return this.rpc.unary(exports.SnapdServiceSnapdConfGetDesc, exports.SnapdTargetRequest.fromPartial(request), metadata);
|
|
662
600
|
}
|
|
663
601
|
SnapdConfSet(request, metadata) {
|
|
664
602
|
return this.rpc.unary(exports.SnapdServiceSnapdConfSetDesc, exports.SnapdConfSetRequest.fromPartial(request), metadata);
|
|
665
603
|
}
|
|
666
|
-
|
|
667
|
-
return this.rpc.unary(exports.
|
|
604
|
+
SnapdPoolAdd(request, metadata) {
|
|
605
|
+
return this.rpc.unary(exports.SnapdServiceSnapdPoolAddDesc, exports.SnapdPoolRequest.fromPartial(request), metadata);
|
|
606
|
+
}
|
|
607
|
+
SnapdPoolDel(request, metadata) {
|
|
608
|
+
return this.rpc.unary(exports.SnapdServiceSnapdPoolDelDesc, exports.SnapdPoolRequest.fromPartial(request), metadata);
|
|
609
|
+
}
|
|
610
|
+
SnapdPoolList(request, metadata) {
|
|
611
|
+
return this.rpc.unary(exports.SnapdServiceSnapdPoolListDesc, empty_1.Empty.fromPartial(request), metadata);
|
|
668
612
|
}
|
|
669
|
-
|
|
670
|
-
return this.rpc.unary(exports.
|
|
613
|
+
SnapdSnapList(request, metadata) {
|
|
614
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapListDesc, exports.SnapdListSnapRequest.fromPartial(request), metadata);
|
|
671
615
|
}
|
|
672
|
-
|
|
673
|
-
return this.rpc.unary(exports.
|
|
616
|
+
SnapdSnapAdd(request, metadata) {
|
|
617
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapAddDesc, exports.SnapdSnapRequest.fromPartial(request), metadata);
|
|
674
618
|
}
|
|
675
|
-
|
|
676
|
-
return this.rpc.unary(exports.
|
|
619
|
+
SnapdSnapDel(request, metadata) {
|
|
620
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapDelDesc, exports.SnapdSnapRequest.fromPartial(request), metadata);
|
|
621
|
+
}
|
|
622
|
+
SnapdSnapRestore(request, metadata) {
|
|
623
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapRestoreDesc, exports.SnapdSnapRequest.fromPartial(request), metadata);
|
|
677
624
|
}
|
|
678
625
|
}
|
|
679
626
|
exports.SnapdServiceClientImpl = SnapdServiceClientImpl;
|
|
@@ -716,50 +663,50 @@ exports.SnapdServiceSnapdDisableDesc = {
|
|
|
716
663
|
},
|
|
717
664
|
},
|
|
718
665
|
};
|
|
719
|
-
exports.
|
|
720
|
-
methodName: "
|
|
666
|
+
exports.SnapdServiceSnapdConfGetDesc = {
|
|
667
|
+
methodName: "SnapdConfGet",
|
|
721
668
|
service: exports.SnapdServiceDesc,
|
|
722
669
|
requestStream: false,
|
|
723
670
|
responseStream: false,
|
|
724
671
|
requestType: {
|
|
725
672
|
serializeBinary() {
|
|
726
|
-
return exports.
|
|
673
|
+
return exports.SnapdTargetRequest.encode(this).finish();
|
|
727
674
|
},
|
|
728
675
|
},
|
|
729
676
|
responseType: {
|
|
730
677
|
deserializeBinary(data) {
|
|
731
|
-
return Object.assign(Object.assign({}, exports.
|
|
678
|
+
return Object.assign(Object.assign({}, exports.SnapdConf.decode(data)), { toObject() {
|
|
732
679
|
return this;
|
|
733
680
|
} });
|
|
734
681
|
},
|
|
735
682
|
},
|
|
736
683
|
};
|
|
737
|
-
exports.
|
|
738
|
-
methodName: "
|
|
684
|
+
exports.SnapdServiceSnapdConfSetDesc = {
|
|
685
|
+
methodName: "SnapdConfSet",
|
|
739
686
|
service: exports.SnapdServiceDesc,
|
|
740
687
|
requestStream: false,
|
|
741
688
|
responseStream: false,
|
|
742
689
|
requestType: {
|
|
743
690
|
serializeBinary() {
|
|
744
|
-
return exports.
|
|
691
|
+
return exports.SnapdConfSetRequest.encode(this).finish();
|
|
745
692
|
},
|
|
746
693
|
},
|
|
747
694
|
responseType: {
|
|
748
695
|
deserializeBinary(data) {
|
|
749
|
-
return Object.assign(Object.assign({},
|
|
696
|
+
return Object.assign(Object.assign({}, empty_1.Empty.decode(data)), { toObject() {
|
|
750
697
|
return this;
|
|
751
698
|
} });
|
|
752
699
|
},
|
|
753
700
|
},
|
|
754
701
|
};
|
|
755
|
-
exports.
|
|
756
|
-
methodName: "
|
|
702
|
+
exports.SnapdServiceSnapdPoolAddDesc = {
|
|
703
|
+
methodName: "SnapdPoolAdd",
|
|
757
704
|
service: exports.SnapdServiceDesc,
|
|
758
705
|
requestStream: false,
|
|
759
706
|
responseStream: false,
|
|
760
707
|
requestType: {
|
|
761
708
|
serializeBinary() {
|
|
762
|
-
return exports.
|
|
709
|
+
return exports.SnapdPoolRequest.encode(this).finish();
|
|
763
710
|
},
|
|
764
711
|
},
|
|
765
712
|
responseType: {
|
|
@@ -770,8 +717,44 @@ exports.SnapdServiceSnapdConfSetDesc = {
|
|
|
770
717
|
},
|
|
771
718
|
},
|
|
772
719
|
};
|
|
773
|
-
exports.
|
|
774
|
-
methodName: "
|
|
720
|
+
exports.SnapdServiceSnapdPoolDelDesc = {
|
|
721
|
+
methodName: "SnapdPoolDel",
|
|
722
|
+
service: exports.SnapdServiceDesc,
|
|
723
|
+
requestStream: false,
|
|
724
|
+
responseStream: false,
|
|
725
|
+
requestType: {
|
|
726
|
+
serializeBinary() {
|
|
727
|
+
return exports.SnapdPoolRequest.encode(this).finish();
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
responseType: {
|
|
731
|
+
deserializeBinary(data) {
|
|
732
|
+
return Object.assign(Object.assign({}, empty_1.Empty.decode(data)), { toObject() {
|
|
733
|
+
return this;
|
|
734
|
+
} });
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
};
|
|
738
|
+
exports.SnapdServiceSnapdPoolListDesc = {
|
|
739
|
+
methodName: "SnapdPoolList",
|
|
740
|
+
service: exports.SnapdServiceDesc,
|
|
741
|
+
requestStream: false,
|
|
742
|
+
responseStream: false,
|
|
743
|
+
requestType: {
|
|
744
|
+
serializeBinary() {
|
|
745
|
+
return empty_1.Empty.encode(this).finish();
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
responseType: {
|
|
749
|
+
deserializeBinary(data) {
|
|
750
|
+
return Object.assign(Object.assign({}, exports.SnapdPoolListResponse.decode(data)), { toObject() {
|
|
751
|
+
return this;
|
|
752
|
+
} });
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
};
|
|
756
|
+
exports.SnapdServiceSnapdSnapListDesc = {
|
|
757
|
+
methodName: "SnapdSnapList",
|
|
775
758
|
service: exports.SnapdServiceDesc,
|
|
776
759
|
requestStream: false,
|
|
777
760
|
responseStream: false,
|
|
@@ -788,8 +771,8 @@ exports.SnapdServiceSnapdListSnapDesc = {
|
|
|
788
771
|
},
|
|
789
772
|
},
|
|
790
773
|
};
|
|
791
|
-
exports.
|
|
792
|
-
methodName: "
|
|
774
|
+
exports.SnapdServiceSnapdSnapAddDesc = {
|
|
775
|
+
methodName: "SnapdSnapAdd",
|
|
793
776
|
service: exports.SnapdServiceDesc,
|
|
794
777
|
requestStream: false,
|
|
795
778
|
responseStream: false,
|
|
@@ -806,8 +789,8 @@ exports.SnapdServiceSnapdTakeSnapDesc = {
|
|
|
806
789
|
},
|
|
807
790
|
},
|
|
808
791
|
};
|
|
809
|
-
exports.
|
|
810
|
-
methodName: "
|
|
792
|
+
exports.SnapdServiceSnapdSnapDelDesc = {
|
|
793
|
+
methodName: "SnapdSnapDel",
|
|
811
794
|
service: exports.SnapdServiceDesc,
|
|
812
795
|
requestStream: false,
|
|
813
796
|
responseStream: false,
|
|
@@ -824,8 +807,8 @@ exports.SnapdServiceSnapdDelSnapDesc = {
|
|
|
824
807
|
},
|
|
825
808
|
},
|
|
826
809
|
};
|
|
827
|
-
exports.
|
|
828
|
-
methodName: "
|
|
810
|
+
exports.SnapdServiceSnapdSnapRestoreDesc = {
|
|
811
|
+
methodName: "SnapdSnapRestore",
|
|
829
812
|
service: exports.SnapdServiceDesc,
|
|
830
813
|
requestStream: false,
|
|
831
814
|
responseStream: false,
|
|
@@ -865,9 +848,7 @@ class GrpcWebImpl {
|
|
|
865
848
|
resolve(response.message);
|
|
866
849
|
}
|
|
867
850
|
else {
|
|
868
|
-
const err = new
|
|
869
|
-
err.code = response.status;
|
|
870
|
-
err.metadata = response.trailers;
|
|
851
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
871
852
|
reject(err);
|
|
872
853
|
}
|
|
873
854
|
},
|
|
@@ -879,4 +860,12 @@ exports.GrpcWebImpl = GrpcWebImpl;
|
|
|
879
860
|
function isSet(value) {
|
|
880
861
|
return value !== null && value !== undefined;
|
|
881
862
|
}
|
|
863
|
+
class GrpcWebError extends Error {
|
|
864
|
+
constructor(message, code, metadata) {
|
|
865
|
+
super(message);
|
|
866
|
+
this.code = code;
|
|
867
|
+
this.metadata = metadata;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
exports.GrpcWebError = GrpcWebError;
|
|
882
871
|
//# sourceMappingURL=snapd.js.map
|