@lazycatcloud/sdk 0.1.481 → 0.1.485
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 +600 -640
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/file_handler.d.ts +960 -1024
- package/dist/common/file_handler.d.ts.map +1 -1
- package/dist/common/filetrans.d.ts +2520 -2688
- package/dist/common/filetrans.d.ts.map +1 -1
- package/dist/common/iscsi.d.ts +180 -192
- package/dist/common/iscsi.d.ts.map +1 -1
- package/dist/common/media_meta.d.ts +60 -64
- package/dist/common/media_meta.d.ts.map +1 -1
- package/dist/common/message.d.ts +420 -448
- package/dist/common/message.d.ts.map +1 -1
- package/dist/common/peripheral_device.d.ts +360 -384
- package/dist/common/peripheral_device.d.ts.map +1 -1
- package/dist/extentions/app_common.d.ts +5 -0
- package/dist/extentions/app_common.d.ts.map +1 -1
- package/dist/extentions/app_common.js +20 -0
- package/dist/extentions/app_common.js.map +1 -1
- package/dist/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts +60 -64
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/localdevice/client.d.ts +60 -64
- package/dist/localdevice/client.d.ts.map +1 -1
- package/dist/localdevice/clipboard.d.ts +137 -0
- package/dist/localdevice/clipboard.d.ts.map +1 -0
- package/dist/localdevice/clipboard.js +433 -0
- package/dist/localdevice/clipboard.js.map +1 -0
- package/dist/localdevice/contacts.d.ts +60 -64
- package/dist/localdevice/contacts.d.ts.map +1 -1
- package/dist/localdevice/photo.d.ts +374 -192
- package/dist/localdevice/photo.d.ts.map +1 -1
- package/dist/localdevice/photo.js +157 -1
- package/dist/localdevice/photo.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/sys/OS_snapshot.d.ts +585 -0
- package/dist/sys/OS_snapshot.d.ts.map +1 -0
- package/dist/sys/OS_snapshot.js +1543 -0
- package/dist/sys/OS_snapshot.js.map +1 -0
- package/dist/sys/OS_upgrader.d.ts +202 -0
- package/dist/sys/OS_upgrader.d.ts.map +1 -0
- package/dist/sys/OS_upgrader.js +639 -0
- package/dist/sys/OS_upgrader.js.map +1 -0
- package/dist/sys/btrfs.d.ts +180 -192
- package/dist/sys/btrfs.d.ts.map +1 -1
- package/dist/sys/hal.d.ts +120 -128
- package/dist/sys/hal.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +691 -0
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -0
- package/dist/sys/hc-core/hc-core.js +1484 -0
- package/dist/sys/hc-core/hc-core.js.map +1 -0
- package/dist/sys/ingress.d.ts +60 -64
- package/dist/sys/ingress.d.ts.map +1 -1
- package/dist/sys/installer.d.ts +277 -0
- package/dist/sys/installer.d.ts.map +1 -0
- package/dist/sys/installer.js +796 -0
- package/dist/sys/installer.js.map +1 -0
- package/dist/sys/network_manager.d.ts +180 -192
- package/dist/sys/network_manager.d.ts.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 +8700 -9280
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +947 -0
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -0
- package/dist/sys/portal-server/portal-server.js +2756 -0
- package/dist/sys/portal-server/portal-server.js.map +1 -0
- package/dist/sys/snapd.d.ts +343 -0
- package/dist/sys/snapd.d.ts.map +1 -0
- package/dist/sys/snapd.js +798 -0
- package/dist/sys/snapd.js.map +1 -0
- package/dist/sys/stats/cgroup_metrics.d.ts +8220 -8768
- package/dist/sys/stats/cgroup_metrics.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GrpcWebError = exports.GrpcWebImpl = exports.SnapdServiceSnapdSnapRestoreDesc = exports.SnapdServiceSnapdSnapDelDesc = exports.SnapdServiceSnapdSnapAddDesc = exports.SnapdServiceSnapdSnapListDesc = exports.SnapdServiceSnapdConfSetDesc = exports.SnapdServiceSnapdConfGetDesc = exports.SnapdServiceSnapdDisableDesc = exports.SnapdServiceSnapdEnableDesc = exports.SnapdServiceDesc = exports.SnapdServiceClientImpl = exports.SnapdSnapRequest = exports.SnapdListSnapResponse = exports.SnapdListSnapRequest = exports.SnapdConfSetRequest = exports.SnapdConf = exports.SnapdTargetRequest = exports.SnapdEnableRequest = exports.snapdAutoStrategyToJSON = exports.snapdAutoStrategyFromJSON = exports.SnapdAutoStrategy = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
9
|
+
const browser_headers_1 = require("browser-headers");
|
|
10
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
11
|
+
const empty_1 = require("../google/protobuf/empty");
|
|
12
|
+
const OS_snapshot_1 = require("./OS_snapshot");
|
|
13
|
+
var SnapdAutoStrategy;
|
|
14
|
+
(function (SnapdAutoStrategy) {
|
|
15
|
+
/** Default - 修改该配置项时,此值表示不改变当前配置值 */
|
|
16
|
+
SnapdAutoStrategy[SnapdAutoStrategy["Default"] = 0] = "Default";
|
|
17
|
+
/** Disabled - 不自动快照(但超过生命周期的历史快照仍会被清理) */
|
|
18
|
+
SnapdAutoStrategy[SnapdAutoStrategy["Disabled"] = 1] = "Disabled";
|
|
19
|
+
/** SnapOnly - 自动快照,但不自动备份 */
|
|
20
|
+
SnapdAutoStrategy[SnapdAutoStrategy["SnapOnly"] = 2] = "SnapOnly";
|
|
21
|
+
/** SnapAndBackup - 自动快照并备份 */
|
|
22
|
+
SnapdAutoStrategy[SnapdAutoStrategy["SnapAndBackup"] = 3] = "SnapAndBackup";
|
|
23
|
+
SnapdAutoStrategy[SnapdAutoStrategy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
24
|
+
})(SnapdAutoStrategy = exports.SnapdAutoStrategy || (exports.SnapdAutoStrategy = {}));
|
|
25
|
+
function snapdAutoStrategyFromJSON(object) {
|
|
26
|
+
switch (object) {
|
|
27
|
+
case 0:
|
|
28
|
+
case "Default":
|
|
29
|
+
return SnapdAutoStrategy.Default;
|
|
30
|
+
case 1:
|
|
31
|
+
case "Disabled":
|
|
32
|
+
return SnapdAutoStrategy.Disabled;
|
|
33
|
+
case 2:
|
|
34
|
+
case "SnapOnly":
|
|
35
|
+
return SnapdAutoStrategy.SnapOnly;
|
|
36
|
+
case 3:
|
|
37
|
+
case "SnapAndBackup":
|
|
38
|
+
return SnapdAutoStrategy.SnapAndBackup;
|
|
39
|
+
case -1:
|
|
40
|
+
case "UNRECOGNIZED":
|
|
41
|
+
default:
|
|
42
|
+
return SnapdAutoStrategy.UNRECOGNIZED;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.snapdAutoStrategyFromJSON = snapdAutoStrategyFromJSON;
|
|
46
|
+
function snapdAutoStrategyToJSON(object) {
|
|
47
|
+
switch (object) {
|
|
48
|
+
case SnapdAutoStrategy.Default:
|
|
49
|
+
return "Default";
|
|
50
|
+
case SnapdAutoStrategy.Disabled:
|
|
51
|
+
return "Disabled";
|
|
52
|
+
case SnapdAutoStrategy.SnapOnly:
|
|
53
|
+
return "SnapOnly";
|
|
54
|
+
case SnapdAutoStrategy.SnapAndBackup:
|
|
55
|
+
return "SnapAndBackup";
|
|
56
|
+
case SnapdAutoStrategy.UNRECOGNIZED:
|
|
57
|
+
default:
|
|
58
|
+
return "UNRECOGNIZED";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.snapdAutoStrategyToJSON = snapdAutoStrategyToJSON;
|
|
62
|
+
function createBaseSnapdEnableRequest() {
|
|
63
|
+
return { TargetId: "", PathList: [] };
|
|
64
|
+
}
|
|
65
|
+
exports.SnapdEnableRequest = {
|
|
66
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
67
|
+
if (message.TargetId !== "") {
|
|
68
|
+
writer.uint32(10).string(message.TargetId);
|
|
69
|
+
}
|
|
70
|
+
for (const v of message.PathList) {
|
|
71
|
+
writer.uint32(18).string(v);
|
|
72
|
+
}
|
|
73
|
+
return writer;
|
|
74
|
+
},
|
|
75
|
+
decode(input, length) {
|
|
76
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
77
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
78
|
+
const message = createBaseSnapdEnableRequest();
|
|
79
|
+
while (reader.pos < end) {
|
|
80
|
+
const tag = reader.uint32();
|
|
81
|
+
switch (tag >>> 3) {
|
|
82
|
+
case 1:
|
|
83
|
+
if (tag !== 10) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
message.TargetId = reader.string();
|
|
87
|
+
continue;
|
|
88
|
+
case 2:
|
|
89
|
+
if (tag !== 18) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
message.PathList.push(reader.string());
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
reader.skipType(tag & 7);
|
|
99
|
+
}
|
|
100
|
+
return message;
|
|
101
|
+
},
|
|
102
|
+
fromJSON(object) {
|
|
103
|
+
return {
|
|
104
|
+
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
105
|
+
PathList: Array.isArray(object === null || object === void 0 ? void 0 : object.PathList) ? object.PathList.map((e) => String(e)) : [],
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
toJSON(message) {
|
|
109
|
+
var _a;
|
|
110
|
+
const obj = {};
|
|
111
|
+
if (message.TargetId !== "") {
|
|
112
|
+
obj.TargetId = message.TargetId;
|
|
113
|
+
}
|
|
114
|
+
if ((_a = message.PathList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
115
|
+
obj.PathList = message.PathList;
|
|
116
|
+
}
|
|
117
|
+
return obj;
|
|
118
|
+
},
|
|
119
|
+
create(base) {
|
|
120
|
+
return exports.SnapdEnableRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
121
|
+
},
|
|
122
|
+
fromPartial(object) {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
const message = createBaseSnapdEnableRequest();
|
|
125
|
+
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
126
|
+
message.PathList = ((_b = object.PathList) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
127
|
+
return message;
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
function createBaseSnapdTargetRequest() {
|
|
131
|
+
return { TargetId: "" };
|
|
132
|
+
}
|
|
133
|
+
exports.SnapdTargetRequest = {
|
|
134
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
135
|
+
if (message.TargetId !== "") {
|
|
136
|
+
writer.uint32(10).string(message.TargetId);
|
|
137
|
+
}
|
|
138
|
+
return writer;
|
|
139
|
+
},
|
|
140
|
+
decode(input, length) {
|
|
141
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
142
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
143
|
+
const message = createBaseSnapdTargetRequest();
|
|
144
|
+
while (reader.pos < end) {
|
|
145
|
+
const tag = reader.uint32();
|
|
146
|
+
switch (tag >>> 3) {
|
|
147
|
+
case 1:
|
|
148
|
+
if (tag !== 10) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
message.TargetId = reader.string();
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
reader.skipType(tag & 7);
|
|
158
|
+
}
|
|
159
|
+
return message;
|
|
160
|
+
},
|
|
161
|
+
fromJSON(object) {
|
|
162
|
+
return { TargetId: isSet(object.TargetId) ? String(object.TargetId) : "" };
|
|
163
|
+
},
|
|
164
|
+
toJSON(message) {
|
|
165
|
+
const obj = {};
|
|
166
|
+
if (message.TargetId !== "") {
|
|
167
|
+
obj.TargetId = message.TargetId;
|
|
168
|
+
}
|
|
169
|
+
return obj;
|
|
170
|
+
},
|
|
171
|
+
create(base) {
|
|
172
|
+
return exports.SnapdTargetRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
173
|
+
},
|
|
174
|
+
fromPartial(object) {
|
|
175
|
+
var _a;
|
|
176
|
+
const message = createBaseSnapdTargetRequest();
|
|
177
|
+
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
function createBaseSnapdConf() {
|
|
182
|
+
return { AutoStrategy: 0, AutoSnapInterval: 0, AutoSnapLifetime: 0, AutoBackupLifetime: 0 };
|
|
183
|
+
}
|
|
184
|
+
exports.SnapdConf = {
|
|
185
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
186
|
+
if (message.AutoStrategy !== 0) {
|
|
187
|
+
writer.uint32(8).int32(message.AutoStrategy);
|
|
188
|
+
}
|
|
189
|
+
if (message.AutoSnapInterval !== 0) {
|
|
190
|
+
writer.uint32(16).uint32(message.AutoSnapInterval);
|
|
191
|
+
}
|
|
192
|
+
if (message.AutoSnapLifetime !== 0) {
|
|
193
|
+
writer.uint32(24).uint32(message.AutoSnapLifetime);
|
|
194
|
+
}
|
|
195
|
+
if (message.AutoBackupLifetime !== 0) {
|
|
196
|
+
writer.uint32(32).uint32(message.AutoBackupLifetime);
|
|
197
|
+
}
|
|
198
|
+
return writer;
|
|
199
|
+
},
|
|
200
|
+
decode(input, length) {
|
|
201
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
202
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
203
|
+
const message = createBaseSnapdConf();
|
|
204
|
+
while (reader.pos < end) {
|
|
205
|
+
const tag = reader.uint32();
|
|
206
|
+
switch (tag >>> 3) {
|
|
207
|
+
case 1:
|
|
208
|
+
if (tag !== 8) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
message.AutoStrategy = reader.int32();
|
|
212
|
+
continue;
|
|
213
|
+
case 2:
|
|
214
|
+
if (tag !== 16) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
message.AutoSnapInterval = reader.uint32();
|
|
218
|
+
continue;
|
|
219
|
+
case 3:
|
|
220
|
+
if (tag !== 24) {
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
message.AutoSnapLifetime = reader.uint32();
|
|
224
|
+
continue;
|
|
225
|
+
case 4:
|
|
226
|
+
if (tag !== 32) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
message.AutoBackupLifetime = reader.uint32();
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
reader.skipType(tag & 7);
|
|
236
|
+
}
|
|
237
|
+
return message;
|
|
238
|
+
},
|
|
239
|
+
fromJSON(object) {
|
|
240
|
+
return {
|
|
241
|
+
AutoStrategy: isSet(object.AutoStrategy) ? snapdAutoStrategyFromJSON(object.AutoStrategy) : 0,
|
|
242
|
+
AutoSnapInterval: isSet(object.AutoSnapInterval) ? Number(object.AutoSnapInterval) : 0,
|
|
243
|
+
AutoSnapLifetime: isSet(object.AutoSnapLifetime) ? Number(object.AutoSnapLifetime) : 0,
|
|
244
|
+
AutoBackupLifetime: isSet(object.AutoBackupLifetime) ? Number(object.AutoBackupLifetime) : 0,
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
toJSON(message) {
|
|
248
|
+
const obj = {};
|
|
249
|
+
if (message.AutoStrategy !== 0) {
|
|
250
|
+
obj.AutoStrategy = snapdAutoStrategyToJSON(message.AutoStrategy);
|
|
251
|
+
}
|
|
252
|
+
if (message.AutoSnapInterval !== 0) {
|
|
253
|
+
obj.AutoSnapInterval = Math.round(message.AutoSnapInterval);
|
|
254
|
+
}
|
|
255
|
+
if (message.AutoSnapLifetime !== 0) {
|
|
256
|
+
obj.AutoSnapLifetime = Math.round(message.AutoSnapLifetime);
|
|
257
|
+
}
|
|
258
|
+
if (message.AutoBackupLifetime !== 0) {
|
|
259
|
+
obj.AutoBackupLifetime = Math.round(message.AutoBackupLifetime);
|
|
260
|
+
}
|
|
261
|
+
return obj;
|
|
262
|
+
},
|
|
263
|
+
create(base) {
|
|
264
|
+
return exports.SnapdConf.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
265
|
+
},
|
|
266
|
+
fromPartial(object) {
|
|
267
|
+
var _a, _b, _c, _d;
|
|
268
|
+
const message = createBaseSnapdConf();
|
|
269
|
+
message.AutoStrategy = (_a = object.AutoStrategy) !== null && _a !== void 0 ? _a : 0;
|
|
270
|
+
message.AutoSnapInterval = (_b = object.AutoSnapInterval) !== null && _b !== void 0 ? _b : 0;
|
|
271
|
+
message.AutoSnapLifetime = (_c = object.AutoSnapLifetime) !== null && _c !== void 0 ? _c : 0;
|
|
272
|
+
message.AutoBackupLifetime = (_d = object.AutoBackupLifetime) !== null && _d !== void 0 ? _d : 0;
|
|
273
|
+
return message;
|
|
274
|
+
},
|
|
275
|
+
};
|
|
276
|
+
function createBaseSnapdConfSetRequest() {
|
|
277
|
+
return { TargetId: "", Config: undefined };
|
|
278
|
+
}
|
|
279
|
+
exports.SnapdConfSetRequest = {
|
|
280
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
281
|
+
if (message.TargetId !== "") {
|
|
282
|
+
writer.uint32(10).string(message.TargetId);
|
|
283
|
+
}
|
|
284
|
+
if (message.Config !== undefined) {
|
|
285
|
+
exports.SnapdConf.encode(message.Config, writer.uint32(18).fork()).ldelim();
|
|
286
|
+
}
|
|
287
|
+
return writer;
|
|
288
|
+
},
|
|
289
|
+
decode(input, length) {
|
|
290
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
291
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
292
|
+
const message = createBaseSnapdConfSetRequest();
|
|
293
|
+
while (reader.pos < end) {
|
|
294
|
+
const tag = reader.uint32();
|
|
295
|
+
switch (tag >>> 3) {
|
|
296
|
+
case 1:
|
|
297
|
+
if (tag !== 10) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
message.TargetId = reader.string();
|
|
301
|
+
continue;
|
|
302
|
+
case 2:
|
|
303
|
+
if (tag !== 18) {
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
message.Config = exports.SnapdConf.decode(reader, reader.uint32());
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
reader.skipType(tag & 7);
|
|
313
|
+
}
|
|
314
|
+
return message;
|
|
315
|
+
},
|
|
316
|
+
fromJSON(object) {
|
|
317
|
+
return {
|
|
318
|
+
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
319
|
+
Config: isSet(object.Config) ? exports.SnapdConf.fromJSON(object.Config) : undefined,
|
|
320
|
+
};
|
|
321
|
+
},
|
|
322
|
+
toJSON(message) {
|
|
323
|
+
const obj = {};
|
|
324
|
+
if (message.TargetId !== "") {
|
|
325
|
+
obj.TargetId = message.TargetId;
|
|
326
|
+
}
|
|
327
|
+
if (message.Config !== undefined) {
|
|
328
|
+
obj.Config = exports.SnapdConf.toJSON(message.Config);
|
|
329
|
+
}
|
|
330
|
+
return obj;
|
|
331
|
+
},
|
|
332
|
+
create(base) {
|
|
333
|
+
return exports.SnapdConfSetRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
334
|
+
},
|
|
335
|
+
fromPartial(object) {
|
|
336
|
+
var _a;
|
|
337
|
+
const message = createBaseSnapdConfSetRequest();
|
|
338
|
+
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
339
|
+
message.Config = (object.Config !== undefined && object.Config !== null)
|
|
340
|
+
? exports.SnapdConf.fromPartial(object.Config)
|
|
341
|
+
: undefined;
|
|
342
|
+
return message;
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
function createBaseSnapdListSnapRequest() {
|
|
346
|
+
return { TargetId: "", BackupPool: "" };
|
|
347
|
+
}
|
|
348
|
+
exports.SnapdListSnapRequest = {
|
|
349
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
350
|
+
if (message.TargetId !== "") {
|
|
351
|
+
writer.uint32(10).string(message.TargetId);
|
|
352
|
+
}
|
|
353
|
+
if (message.BackupPool !== "") {
|
|
354
|
+
writer.uint32(18).string(message.BackupPool);
|
|
355
|
+
}
|
|
356
|
+
return writer;
|
|
357
|
+
},
|
|
358
|
+
decode(input, length) {
|
|
359
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
360
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
361
|
+
const message = createBaseSnapdListSnapRequest();
|
|
362
|
+
while (reader.pos < end) {
|
|
363
|
+
const tag = reader.uint32();
|
|
364
|
+
switch (tag >>> 3) {
|
|
365
|
+
case 1:
|
|
366
|
+
if (tag !== 10) {
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
message.TargetId = reader.string();
|
|
370
|
+
continue;
|
|
371
|
+
case 2:
|
|
372
|
+
if (tag !== 18) {
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
message.BackupPool = reader.string();
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
reader.skipType(tag & 7);
|
|
382
|
+
}
|
|
383
|
+
return message;
|
|
384
|
+
},
|
|
385
|
+
fromJSON(object) {
|
|
386
|
+
return {
|
|
387
|
+
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
388
|
+
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
389
|
+
};
|
|
390
|
+
},
|
|
391
|
+
toJSON(message) {
|
|
392
|
+
const obj = {};
|
|
393
|
+
if (message.TargetId !== "") {
|
|
394
|
+
obj.TargetId = message.TargetId;
|
|
395
|
+
}
|
|
396
|
+
if (message.BackupPool !== "") {
|
|
397
|
+
obj.BackupPool = message.BackupPool;
|
|
398
|
+
}
|
|
399
|
+
return obj;
|
|
400
|
+
},
|
|
401
|
+
create(base) {
|
|
402
|
+
return exports.SnapdListSnapRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
403
|
+
},
|
|
404
|
+
fromPartial(object) {
|
|
405
|
+
var _a, _b;
|
|
406
|
+
const message = createBaseSnapdListSnapRequest();
|
|
407
|
+
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
408
|
+
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
409
|
+
return message;
|
|
410
|
+
},
|
|
411
|
+
};
|
|
412
|
+
function createBaseSnapdListSnapResponse() {
|
|
413
|
+
return { SnapshotList: [] };
|
|
414
|
+
}
|
|
415
|
+
exports.SnapdListSnapResponse = {
|
|
416
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
417
|
+
for (const v of message.SnapshotList) {
|
|
418
|
+
OS_snapshot_1.SnapshotDesc.encode(v, writer.uint32(10).fork()).ldelim();
|
|
419
|
+
}
|
|
420
|
+
return writer;
|
|
421
|
+
},
|
|
422
|
+
decode(input, length) {
|
|
423
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
424
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
425
|
+
const message = createBaseSnapdListSnapResponse();
|
|
426
|
+
while (reader.pos < end) {
|
|
427
|
+
const tag = reader.uint32();
|
|
428
|
+
switch (tag >>> 3) {
|
|
429
|
+
case 1:
|
|
430
|
+
if (tag !== 10) {
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
message.SnapshotList.push(OS_snapshot_1.SnapshotDesc.decode(reader, reader.uint32()));
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
reader.skipType(tag & 7);
|
|
440
|
+
}
|
|
441
|
+
return message;
|
|
442
|
+
},
|
|
443
|
+
fromJSON(object) {
|
|
444
|
+
return {
|
|
445
|
+
SnapshotList: Array.isArray(object === null || object === void 0 ? void 0 : object.SnapshotList)
|
|
446
|
+
? object.SnapshotList.map((e) => OS_snapshot_1.SnapshotDesc.fromJSON(e))
|
|
447
|
+
: [],
|
|
448
|
+
};
|
|
449
|
+
},
|
|
450
|
+
toJSON(message) {
|
|
451
|
+
var _a;
|
|
452
|
+
const obj = {};
|
|
453
|
+
if ((_a = message.SnapshotList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
454
|
+
obj.SnapshotList = message.SnapshotList.map((e) => OS_snapshot_1.SnapshotDesc.toJSON(e));
|
|
455
|
+
}
|
|
456
|
+
return obj;
|
|
457
|
+
},
|
|
458
|
+
create(base) {
|
|
459
|
+
return exports.SnapdListSnapResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
460
|
+
},
|
|
461
|
+
fromPartial(object) {
|
|
462
|
+
var _a;
|
|
463
|
+
const message = createBaseSnapdListSnapResponse();
|
|
464
|
+
message.SnapshotList = ((_a = object.SnapshotList) === null || _a === void 0 ? void 0 : _a.map((e) => OS_snapshot_1.SnapshotDesc.fromPartial(e))) || [];
|
|
465
|
+
return message;
|
|
466
|
+
},
|
|
467
|
+
};
|
|
468
|
+
function createBaseSnapdSnapRequest() {
|
|
469
|
+
return { TargetId: "", BackupPool: "", SnapName: "" };
|
|
470
|
+
}
|
|
471
|
+
exports.SnapdSnapRequest = {
|
|
472
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
473
|
+
if (message.TargetId !== "") {
|
|
474
|
+
writer.uint32(10).string(message.TargetId);
|
|
475
|
+
}
|
|
476
|
+
if (message.BackupPool !== "") {
|
|
477
|
+
writer.uint32(18).string(message.BackupPool);
|
|
478
|
+
}
|
|
479
|
+
if (message.SnapName !== "") {
|
|
480
|
+
writer.uint32(26).string(message.SnapName);
|
|
481
|
+
}
|
|
482
|
+
return writer;
|
|
483
|
+
},
|
|
484
|
+
decode(input, length) {
|
|
485
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
486
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
487
|
+
const message = createBaseSnapdSnapRequest();
|
|
488
|
+
while (reader.pos < end) {
|
|
489
|
+
const tag = reader.uint32();
|
|
490
|
+
switch (tag >>> 3) {
|
|
491
|
+
case 1:
|
|
492
|
+
if (tag !== 10) {
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
message.TargetId = reader.string();
|
|
496
|
+
continue;
|
|
497
|
+
case 2:
|
|
498
|
+
if (tag !== 18) {
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
501
|
+
message.BackupPool = reader.string();
|
|
502
|
+
continue;
|
|
503
|
+
case 3:
|
|
504
|
+
if (tag !== 26) {
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
message.SnapName = reader.string();
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
reader.skipType(tag & 7);
|
|
514
|
+
}
|
|
515
|
+
return message;
|
|
516
|
+
},
|
|
517
|
+
fromJSON(object) {
|
|
518
|
+
return {
|
|
519
|
+
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
520
|
+
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
521
|
+
SnapName: isSet(object.SnapName) ? String(object.SnapName) : "",
|
|
522
|
+
};
|
|
523
|
+
},
|
|
524
|
+
toJSON(message) {
|
|
525
|
+
const obj = {};
|
|
526
|
+
if (message.TargetId !== "") {
|
|
527
|
+
obj.TargetId = message.TargetId;
|
|
528
|
+
}
|
|
529
|
+
if (message.BackupPool !== "") {
|
|
530
|
+
obj.BackupPool = message.BackupPool;
|
|
531
|
+
}
|
|
532
|
+
if (message.SnapName !== "") {
|
|
533
|
+
obj.SnapName = message.SnapName;
|
|
534
|
+
}
|
|
535
|
+
return obj;
|
|
536
|
+
},
|
|
537
|
+
create(base) {
|
|
538
|
+
return exports.SnapdSnapRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
539
|
+
},
|
|
540
|
+
fromPartial(object) {
|
|
541
|
+
var _a, _b, _c;
|
|
542
|
+
const message = createBaseSnapdSnapRequest();
|
|
543
|
+
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
544
|
+
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
545
|
+
message.SnapName = (_c = object.SnapName) !== null && _c !== void 0 ? _c : "";
|
|
546
|
+
return message;
|
|
547
|
+
},
|
|
548
|
+
};
|
|
549
|
+
class SnapdServiceClientImpl {
|
|
550
|
+
constructor(rpc) {
|
|
551
|
+
this.rpc = rpc;
|
|
552
|
+
this.SnapdEnable = this.SnapdEnable.bind(this);
|
|
553
|
+
this.SnapdDisable = this.SnapdDisable.bind(this);
|
|
554
|
+
this.SnapdConfGet = this.SnapdConfGet.bind(this);
|
|
555
|
+
this.SnapdConfSet = this.SnapdConfSet.bind(this);
|
|
556
|
+
this.SnapdSnapList = this.SnapdSnapList.bind(this);
|
|
557
|
+
this.SnapdSnapAdd = this.SnapdSnapAdd.bind(this);
|
|
558
|
+
this.SnapdSnapDel = this.SnapdSnapDel.bind(this);
|
|
559
|
+
this.SnapdSnapRestore = this.SnapdSnapRestore.bind(this);
|
|
560
|
+
}
|
|
561
|
+
SnapdEnable(request, metadata, abortSignal) {
|
|
562
|
+
return this.rpc.unary(exports.SnapdServiceSnapdEnableDesc, exports.SnapdEnableRequest.fromPartial(request), metadata, abortSignal);
|
|
563
|
+
}
|
|
564
|
+
SnapdDisable(request, metadata, abortSignal) {
|
|
565
|
+
return this.rpc.unary(exports.SnapdServiceSnapdDisableDesc, exports.SnapdTargetRequest.fromPartial(request), metadata, abortSignal);
|
|
566
|
+
}
|
|
567
|
+
SnapdConfGet(request, metadata, abortSignal) {
|
|
568
|
+
return this.rpc.unary(exports.SnapdServiceSnapdConfGetDesc, exports.SnapdTargetRequest.fromPartial(request), metadata, abortSignal);
|
|
569
|
+
}
|
|
570
|
+
SnapdConfSet(request, metadata, abortSignal) {
|
|
571
|
+
return this.rpc.unary(exports.SnapdServiceSnapdConfSetDesc, exports.SnapdConfSetRequest.fromPartial(request), metadata, abortSignal);
|
|
572
|
+
}
|
|
573
|
+
SnapdSnapList(request, metadata, abortSignal) {
|
|
574
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapListDesc, exports.SnapdListSnapRequest.fromPartial(request), metadata, abortSignal);
|
|
575
|
+
}
|
|
576
|
+
SnapdSnapAdd(request, metadata, abortSignal) {
|
|
577
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapAddDesc, exports.SnapdSnapRequest.fromPartial(request), metadata, abortSignal);
|
|
578
|
+
}
|
|
579
|
+
SnapdSnapDel(request, metadata, abortSignal) {
|
|
580
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapDelDesc, exports.SnapdSnapRequest.fromPartial(request), metadata, abortSignal);
|
|
581
|
+
}
|
|
582
|
+
SnapdSnapRestore(request, metadata, abortSignal) {
|
|
583
|
+
return this.rpc.unary(exports.SnapdServiceSnapdSnapRestoreDesc, exports.SnapdSnapRequest.fromPartial(request), metadata, abortSignal);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
exports.SnapdServiceClientImpl = SnapdServiceClientImpl;
|
|
587
|
+
exports.SnapdServiceDesc = { serviceName: "cloud.lazycat.apis.sys.SnapdService" };
|
|
588
|
+
exports.SnapdServiceSnapdEnableDesc = {
|
|
589
|
+
methodName: "SnapdEnable",
|
|
590
|
+
service: exports.SnapdServiceDesc,
|
|
591
|
+
requestStream: false,
|
|
592
|
+
responseStream: false,
|
|
593
|
+
requestType: {
|
|
594
|
+
serializeBinary() {
|
|
595
|
+
return exports.SnapdEnableRequest.encode(this).finish();
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
responseType: {
|
|
599
|
+
deserializeBinary(data) {
|
|
600
|
+
const value = empty_1.Empty.decode(data);
|
|
601
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
602
|
+
return value;
|
|
603
|
+
} });
|
|
604
|
+
},
|
|
605
|
+
},
|
|
606
|
+
};
|
|
607
|
+
exports.SnapdServiceSnapdDisableDesc = {
|
|
608
|
+
methodName: "SnapdDisable",
|
|
609
|
+
service: exports.SnapdServiceDesc,
|
|
610
|
+
requestStream: false,
|
|
611
|
+
responseStream: false,
|
|
612
|
+
requestType: {
|
|
613
|
+
serializeBinary() {
|
|
614
|
+
return exports.SnapdTargetRequest.encode(this).finish();
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
responseType: {
|
|
618
|
+
deserializeBinary(data) {
|
|
619
|
+
const value = empty_1.Empty.decode(data);
|
|
620
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
621
|
+
return value;
|
|
622
|
+
} });
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
};
|
|
626
|
+
exports.SnapdServiceSnapdConfGetDesc = {
|
|
627
|
+
methodName: "SnapdConfGet",
|
|
628
|
+
service: exports.SnapdServiceDesc,
|
|
629
|
+
requestStream: false,
|
|
630
|
+
responseStream: false,
|
|
631
|
+
requestType: {
|
|
632
|
+
serializeBinary() {
|
|
633
|
+
return exports.SnapdTargetRequest.encode(this).finish();
|
|
634
|
+
},
|
|
635
|
+
},
|
|
636
|
+
responseType: {
|
|
637
|
+
deserializeBinary(data) {
|
|
638
|
+
const value = exports.SnapdConf.decode(data);
|
|
639
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
640
|
+
return value;
|
|
641
|
+
} });
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
};
|
|
645
|
+
exports.SnapdServiceSnapdConfSetDesc = {
|
|
646
|
+
methodName: "SnapdConfSet",
|
|
647
|
+
service: exports.SnapdServiceDesc,
|
|
648
|
+
requestStream: false,
|
|
649
|
+
responseStream: false,
|
|
650
|
+
requestType: {
|
|
651
|
+
serializeBinary() {
|
|
652
|
+
return exports.SnapdConfSetRequest.encode(this).finish();
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
responseType: {
|
|
656
|
+
deserializeBinary(data) {
|
|
657
|
+
const value = empty_1.Empty.decode(data);
|
|
658
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
659
|
+
return value;
|
|
660
|
+
} });
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
};
|
|
664
|
+
exports.SnapdServiceSnapdSnapListDesc = {
|
|
665
|
+
methodName: "SnapdSnapList",
|
|
666
|
+
service: exports.SnapdServiceDesc,
|
|
667
|
+
requestStream: false,
|
|
668
|
+
responseStream: false,
|
|
669
|
+
requestType: {
|
|
670
|
+
serializeBinary() {
|
|
671
|
+
return exports.SnapdListSnapRequest.encode(this).finish();
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
responseType: {
|
|
675
|
+
deserializeBinary(data) {
|
|
676
|
+
const value = exports.SnapdListSnapResponse.decode(data);
|
|
677
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
678
|
+
return value;
|
|
679
|
+
} });
|
|
680
|
+
},
|
|
681
|
+
},
|
|
682
|
+
};
|
|
683
|
+
exports.SnapdServiceSnapdSnapAddDesc = {
|
|
684
|
+
methodName: "SnapdSnapAdd",
|
|
685
|
+
service: exports.SnapdServiceDesc,
|
|
686
|
+
requestStream: false,
|
|
687
|
+
responseStream: false,
|
|
688
|
+
requestType: {
|
|
689
|
+
serializeBinary() {
|
|
690
|
+
return exports.SnapdSnapRequest.encode(this).finish();
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
responseType: {
|
|
694
|
+
deserializeBinary(data) {
|
|
695
|
+
const value = empty_1.Empty.decode(data);
|
|
696
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
697
|
+
return value;
|
|
698
|
+
} });
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
};
|
|
702
|
+
exports.SnapdServiceSnapdSnapDelDesc = {
|
|
703
|
+
methodName: "SnapdSnapDel",
|
|
704
|
+
service: exports.SnapdServiceDesc,
|
|
705
|
+
requestStream: false,
|
|
706
|
+
responseStream: false,
|
|
707
|
+
requestType: {
|
|
708
|
+
serializeBinary() {
|
|
709
|
+
return exports.SnapdSnapRequest.encode(this).finish();
|
|
710
|
+
},
|
|
711
|
+
},
|
|
712
|
+
responseType: {
|
|
713
|
+
deserializeBinary(data) {
|
|
714
|
+
const value = empty_1.Empty.decode(data);
|
|
715
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
716
|
+
return value;
|
|
717
|
+
} });
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
};
|
|
721
|
+
exports.SnapdServiceSnapdSnapRestoreDesc = {
|
|
722
|
+
methodName: "SnapdSnapRestore",
|
|
723
|
+
service: exports.SnapdServiceDesc,
|
|
724
|
+
requestStream: false,
|
|
725
|
+
responseStream: false,
|
|
726
|
+
requestType: {
|
|
727
|
+
serializeBinary() {
|
|
728
|
+
return exports.SnapdSnapRequest.encode(this).finish();
|
|
729
|
+
},
|
|
730
|
+
},
|
|
731
|
+
responseType: {
|
|
732
|
+
deserializeBinary(data) {
|
|
733
|
+
const value = empty_1.Empty.decode(data);
|
|
734
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
735
|
+
return value;
|
|
736
|
+
} });
|
|
737
|
+
},
|
|
738
|
+
},
|
|
739
|
+
};
|
|
740
|
+
class GrpcWebImpl {
|
|
741
|
+
constructor(host, options) {
|
|
742
|
+
this.host = host;
|
|
743
|
+
this.options = options;
|
|
744
|
+
}
|
|
745
|
+
unary(methodDesc, _request, metadata, abortSignal) {
|
|
746
|
+
var _a;
|
|
747
|
+
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
748
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
749
|
+
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
750
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
751
|
+
return new Promise((resolve, reject) => {
|
|
752
|
+
var _a;
|
|
753
|
+
const client = grpc_web_1.grpc.unary(methodDesc, Object.assign(Object.assign({ request, host: this.host, metadata: maybeCombinedMetadata !== null && maybeCombinedMetadata !== void 0 ? maybeCombinedMetadata : {} }, (this.options.transport !== undefined ? { transport: this.options.transport } : {})), { debug: (_a = this.options.debug) !== null && _a !== void 0 ? _a : false, onEnd: function (response) {
|
|
754
|
+
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
755
|
+
resolve(response.message.toObject());
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
759
|
+
reject(err);
|
|
760
|
+
}
|
|
761
|
+
} }));
|
|
762
|
+
if (abortSignal) {
|
|
763
|
+
abortSignal.addEventListener("abort", () => {
|
|
764
|
+
client.close();
|
|
765
|
+
reject(abortSignal.reason);
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
exports.GrpcWebImpl = GrpcWebImpl;
|
|
772
|
+
const tsProtoGlobalThis = (() => {
|
|
773
|
+
if (typeof globalThis !== "undefined") {
|
|
774
|
+
return globalThis;
|
|
775
|
+
}
|
|
776
|
+
if (typeof self !== "undefined") {
|
|
777
|
+
return self;
|
|
778
|
+
}
|
|
779
|
+
if (typeof window !== "undefined") {
|
|
780
|
+
return window;
|
|
781
|
+
}
|
|
782
|
+
if (typeof global !== "undefined") {
|
|
783
|
+
return global;
|
|
784
|
+
}
|
|
785
|
+
throw "Unable to locate global object";
|
|
786
|
+
})();
|
|
787
|
+
function isSet(value) {
|
|
788
|
+
return value !== null && value !== undefined;
|
|
789
|
+
}
|
|
790
|
+
class GrpcWebError extends tsProtoGlobalThis.Error {
|
|
791
|
+
constructor(message, code, metadata) {
|
|
792
|
+
super(message);
|
|
793
|
+
this.code = code;
|
|
794
|
+
this.metadata = metadata;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
exports.GrpcWebError = GrpcWebError;
|
|
798
|
+
//# sourceMappingURL=snapd.js.map
|