@lazycatcloud/sdk 0.1.487 → 0.1.488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/apk_shell.d.ts +2 -2
- package/dist/common/box.d.ts +1198 -1418
- package/dist/common/browseronly.d.ts +2 -2
- package/dist/common/end_device.d.ts +2 -2
- package/dist/common/file_handler.d.ts +1937 -113
- package/dist/common/filetrans.d.ts +5183 -395
- package/dist/common/gateway.d.ts +2 -2
- package/dist/common/iscsi.d.ts +1745 -0
- package/dist/common/media_meta.d.ts +125 -11
- package/dist/common/message.d.ts +858 -60
- package/dist/common/peripheral_device.d.ts +954 -60
- package/dist/common/security_context.d.ts +2 -2
- package/dist/common/users.d.ts +2 -2
- package/dist/dlna/dlna.d.ts +2 -2
- package/dist/extentions/app_common.d.ts +10 -1
- package/dist/extentions/base.d.ts +0 -1
- package/dist/extentions/client_authorization.d.ts +2 -2
- package/dist/extentions/index.d.ts +2 -2
- package/dist/extentions/mediasession/definitions.d.ts +0 -1
- package/dist/extentions/mediasession/index.d.ts +0 -1
- package/dist/extentions/mediasession/web.d.ts +0 -1
- package/dist/extentions/safe_app.d.ts +0 -1
- package/dist/extentions/unsafe_app.d.ts +0 -1
- package/dist/extentions/vibrate_type.d.ts +0 -1
- package/dist/extentions/webview-bridge.d.ts +0 -1
- package/dist/google/protobuf/empty.d.ts +0 -1
- package/dist/google/protobuf/timestamp.d.ts +122 -8
- package/dist/grpcweb.d.ts +0 -1
- package/dist/index.d.ts +2 -1
- package/dist/localdevice/ble.d.ts +148 -2
- package/dist/localdevice/client.d.ts +123 -9
- package/dist/localdevice/cloud-driver.d.ts +2 -2
- package/dist/localdevice/config.d.ts +2 -2
- package/dist/localdevice/contacts.d.ts +123 -9
- package/dist/localdevice/device.d.ts +2 -2
- package/dist/localdevice/dialog.d.ts +2 -2
- package/dist/localdevice/local-launch.d.ts +2 -2
- package/dist/localdevice/network.d.ts +2 -2
- package/dist/localdevice/oneway-sync.d.ts +2 -2
- package/dist/localdevice/permission.d.ts +2 -2
- package/dist/localdevice/photo.d.ts +530 -22
- package/dist/localdevice/remote-control.d.ts +6 -2
- package/dist/localdevice/remote-input-method.d.ts +2 -2
- package/dist/package.json +1 -1
- package/dist/sys/btled.d.ts +2 -2
- package/dist/sys/btrfs.d.ts +366 -24
- package/dist/sys/devopt.d.ts +2 -2
- package/dist/sys/dirmon.d.ts +2 -2
- package/dist/sys/event.d.ts +2 -2
- package/dist/sys/hal.d.ts +244 -16
- package/dist/sys/ingress.d.ts +123 -9
- package/dist/sys/network_manager.d.ts +367 -25
- package/dist/sys/package_manager.d.ts +19558 -155
- package/dist/sys/stats/cgroup_metrics.d.ts +17661 -0
- package/dist/sys/tvos.d.ts +2 -2
- package/dist/sys/version.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/common/apk_shell.d.ts.map +0 -1
- package/dist/common/box.d.ts.map +0 -1
- package/dist/common/browseronly.d.ts.map +0 -1
- package/dist/common/end_device.d.ts.map +0 -1
- package/dist/common/file_handler.d.ts.map +0 -1
- package/dist/common/filetrans.d.ts.map +0 -1
- package/dist/common/gateway.d.ts.map +0 -1
- package/dist/common/media_meta.d.ts.map +0 -1
- package/dist/common/message.d.ts.map +0 -1
- package/dist/common/peripheral_device.d.ts.map +0 -1
- package/dist/common/security_context.d.ts.map +0 -1
- package/dist/common/users.d.ts.map +0 -1
- package/dist/dlna/dlna.d.ts.map +0 -1
- package/dist/extentions/app_common.d.ts.map +0 -1
- package/dist/extentions/base.d.ts.map +0 -1
- package/dist/extentions/client_authorization.d.ts.map +0 -1
- package/dist/extentions/index.d.ts.map +0 -1
- package/dist/extentions/mediasession/definitions.d.ts.map +0 -1
- package/dist/extentions/mediasession/index.d.ts.map +0 -1
- package/dist/extentions/mediasession/web.d.ts.map +0 -1
- package/dist/extentions/safe_app.d.ts.map +0 -1
- package/dist/extentions/unsafe_app.d.ts.map +0 -1
- package/dist/extentions/vibrate_type.d.ts.map +0 -1
- package/dist/extentions/webview-bridge.d.ts.map +0 -1
- package/dist/google/protobuf/descriptor.d.ts +0 -112550
- package/dist/google/protobuf/descriptor.d.ts.map +0 -1
- package/dist/google/protobuf/empty.d.ts.map +0 -1
- package/dist/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/grpcweb.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/localdevice/ble.d.ts.map +0 -1
- package/dist/localdevice/client.d.ts.map +0 -1
- package/dist/localdevice/clipboard.d.ts +0 -137
- package/dist/localdevice/clipboard.d.ts.map +0 -1
- package/dist/localdevice/clipboard.js +0 -433
- package/dist/localdevice/clipboard.js.map +0 -1
- package/dist/localdevice/cloud-driver.d.ts.map +0 -1
- package/dist/localdevice/config.d.ts.map +0 -1
- package/dist/localdevice/contacts.d.ts.map +0 -1
- package/dist/localdevice/device.d.ts.map +0 -1
- package/dist/localdevice/dialog.d.ts.map +0 -1
- package/dist/localdevice/local-launch.d.ts.map +0 -1
- package/dist/localdevice/network.d.ts.map +0 -1
- package/dist/localdevice/oneway-sync.d.ts.map +0 -1
- package/dist/localdevice/permission.d.ts.map +0 -1
- package/dist/localdevice/photo.d.ts.map +0 -1
- package/dist/localdevice/remote-control.d.ts.map +0 -1
- package/dist/localdevice/remote-input-method.d.ts.map +0 -1
- package/dist/sys/OS_daemon.d.ts +0 -133
- package/dist/sys/OS_daemon.d.ts.map +0 -1
- package/dist/sys/OS_daemon.js +0 -364
- package/dist/sys/OS_daemon.js.map +0 -1
- package/dist/sys/OS_snapshot.d.ts +0 -585
- package/dist/sys/OS_snapshot.d.ts.map +0 -1
- package/dist/sys/OS_snapshot.js +0 -1495
- package/dist/sys/OS_snapshot.js.map +0 -1
- package/dist/sys/OS_upgrader.d.ts +0 -202
- package/dist/sys/OS_upgrader.d.ts.map +0 -1
- package/dist/sys/OS_upgrader.js +0 -623
- package/dist/sys/OS_upgrader.js.map +0 -1
- package/dist/sys/box-status.d.ts +0 -603
- package/dist/sys/box-status.d.ts.map +0 -1
- package/dist/sys/box-status.js +0 -1004
- package/dist/sys/box-status.js.map +0 -1
- package/dist/sys/btled.d.ts.map +0 -1
- package/dist/sys/btrfs.d.ts.map +0 -1
- package/dist/sys/devopt.d.ts.map +0 -1
- package/dist/sys/dirmon.d.ts.map +0 -1
- package/dist/sys/event.d.ts.map +0 -1
- package/dist/sys/hal.d.ts.map +0 -1
- package/dist/sys/hc-core/hc-core.d.ts +0 -696
- package/dist/sys/hc-core/hc-core.d.ts.map +0 -1
- package/dist/sys/hc-core/hc-core.js +0 -1514
- package/dist/sys/hc-core/hc-core.js.map +0 -1
- package/dist/sys/ingress.d.ts.map +0 -1
- package/dist/sys/installer.d.ts +0 -277
- package/dist/sys/installer.d.ts.map +0 -1
- package/dist/sys/installer.js +0 -773
- package/dist/sys/installer.js.map +0 -1
- package/dist/sys/network_manager.d.ts.map +0 -1
- package/dist/sys/package_manager.d.ts.map +0 -1
- package/dist/sys/portal-server/portal-server.d.ts +0 -849
- package/dist/sys/portal-server/portal-server.d.ts.map +0 -1
- package/dist/sys/portal-server/portal-server.js +0 -2350
- package/dist/sys/portal-server/portal-server.js.map +0 -1
- package/dist/sys/snapd.d.ts +0 -343
- package/dist/sys/snapd.d.ts.map +0 -1
- package/dist/sys/snapd.js +0 -776
- package/dist/sys/snapd.js.map +0 -1
- package/dist/sys/tvos.d.ts.map +0 -1
- package/dist/sys/version.d.ts.map +0 -1
package/dist/sys/snapd.js
DELETED
|
@@ -1,776 +0,0 @@
|
|
|
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
|
-
const obj = {};
|
|
110
|
-
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
111
|
-
if (message.PathList) {
|
|
112
|
-
obj.PathList = message.PathList.map((e) => e);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
obj.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
|
-
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
167
|
-
return obj;
|
|
168
|
-
},
|
|
169
|
-
create(base) {
|
|
170
|
-
return exports.SnapdTargetRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
171
|
-
},
|
|
172
|
-
fromPartial(object) {
|
|
173
|
-
var _a;
|
|
174
|
-
const message = createBaseSnapdTargetRequest();
|
|
175
|
-
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
176
|
-
return message;
|
|
177
|
-
},
|
|
178
|
-
};
|
|
179
|
-
function createBaseSnapdConf() {
|
|
180
|
-
return { AutoStrategy: 0, AutoSnapInterval: 0, AutoSnapLifetime: 0, AutoBackupLifetime: 0 };
|
|
181
|
-
}
|
|
182
|
-
exports.SnapdConf = {
|
|
183
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
184
|
-
if (message.AutoStrategy !== 0) {
|
|
185
|
-
writer.uint32(8).int32(message.AutoStrategy);
|
|
186
|
-
}
|
|
187
|
-
if (message.AutoSnapInterval !== 0) {
|
|
188
|
-
writer.uint32(16).uint32(message.AutoSnapInterval);
|
|
189
|
-
}
|
|
190
|
-
if (message.AutoSnapLifetime !== 0) {
|
|
191
|
-
writer.uint32(24).uint32(message.AutoSnapLifetime);
|
|
192
|
-
}
|
|
193
|
-
if (message.AutoBackupLifetime !== 0) {
|
|
194
|
-
writer.uint32(32).uint32(message.AutoBackupLifetime);
|
|
195
|
-
}
|
|
196
|
-
return writer;
|
|
197
|
-
},
|
|
198
|
-
decode(input, length) {
|
|
199
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
200
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
201
|
-
const message = createBaseSnapdConf();
|
|
202
|
-
while (reader.pos < end) {
|
|
203
|
-
const tag = reader.uint32();
|
|
204
|
-
switch (tag >>> 3) {
|
|
205
|
-
case 1:
|
|
206
|
-
if (tag !== 8) {
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
message.AutoStrategy = reader.int32();
|
|
210
|
-
continue;
|
|
211
|
-
case 2:
|
|
212
|
-
if (tag !== 16) {
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
|
-
message.AutoSnapInterval = reader.uint32();
|
|
216
|
-
continue;
|
|
217
|
-
case 3:
|
|
218
|
-
if (tag !== 24) {
|
|
219
|
-
break;
|
|
220
|
-
}
|
|
221
|
-
message.AutoSnapLifetime = reader.uint32();
|
|
222
|
-
continue;
|
|
223
|
-
case 4:
|
|
224
|
-
if (tag !== 32) {
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
message.AutoBackupLifetime = reader.uint32();
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
reader.skipType(tag & 7);
|
|
234
|
-
}
|
|
235
|
-
return message;
|
|
236
|
-
},
|
|
237
|
-
fromJSON(object) {
|
|
238
|
-
return {
|
|
239
|
-
AutoStrategy: isSet(object.AutoStrategy) ? snapdAutoStrategyFromJSON(object.AutoStrategy) : 0,
|
|
240
|
-
AutoSnapInterval: isSet(object.AutoSnapInterval) ? Number(object.AutoSnapInterval) : 0,
|
|
241
|
-
AutoSnapLifetime: isSet(object.AutoSnapLifetime) ? Number(object.AutoSnapLifetime) : 0,
|
|
242
|
-
AutoBackupLifetime: isSet(object.AutoBackupLifetime) ? Number(object.AutoBackupLifetime) : 0,
|
|
243
|
-
};
|
|
244
|
-
},
|
|
245
|
-
toJSON(message) {
|
|
246
|
-
const obj = {};
|
|
247
|
-
message.AutoStrategy !== undefined && (obj.AutoStrategy = snapdAutoStrategyToJSON(message.AutoStrategy));
|
|
248
|
-
message.AutoSnapInterval !== undefined && (obj.AutoSnapInterval = Math.round(message.AutoSnapInterval));
|
|
249
|
-
message.AutoSnapLifetime !== undefined && (obj.AutoSnapLifetime = Math.round(message.AutoSnapLifetime));
|
|
250
|
-
message.AutoBackupLifetime !== undefined && (obj.AutoBackupLifetime = Math.round(message.AutoBackupLifetime));
|
|
251
|
-
return obj;
|
|
252
|
-
},
|
|
253
|
-
create(base) {
|
|
254
|
-
return exports.SnapdConf.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
255
|
-
},
|
|
256
|
-
fromPartial(object) {
|
|
257
|
-
var _a, _b, _c, _d;
|
|
258
|
-
const message = createBaseSnapdConf();
|
|
259
|
-
message.AutoStrategy = (_a = object.AutoStrategy) !== null && _a !== void 0 ? _a : 0;
|
|
260
|
-
message.AutoSnapInterval = (_b = object.AutoSnapInterval) !== null && _b !== void 0 ? _b : 0;
|
|
261
|
-
message.AutoSnapLifetime = (_c = object.AutoSnapLifetime) !== null && _c !== void 0 ? _c : 0;
|
|
262
|
-
message.AutoBackupLifetime = (_d = object.AutoBackupLifetime) !== null && _d !== void 0 ? _d : 0;
|
|
263
|
-
return message;
|
|
264
|
-
},
|
|
265
|
-
};
|
|
266
|
-
function createBaseSnapdConfSetRequest() {
|
|
267
|
-
return { TargetId: "", Config: undefined };
|
|
268
|
-
}
|
|
269
|
-
exports.SnapdConfSetRequest = {
|
|
270
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
271
|
-
if (message.TargetId !== "") {
|
|
272
|
-
writer.uint32(10).string(message.TargetId);
|
|
273
|
-
}
|
|
274
|
-
if (message.Config !== undefined) {
|
|
275
|
-
exports.SnapdConf.encode(message.Config, writer.uint32(18).fork()).ldelim();
|
|
276
|
-
}
|
|
277
|
-
return writer;
|
|
278
|
-
},
|
|
279
|
-
decode(input, length) {
|
|
280
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
281
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
282
|
-
const message = createBaseSnapdConfSetRequest();
|
|
283
|
-
while (reader.pos < end) {
|
|
284
|
-
const tag = reader.uint32();
|
|
285
|
-
switch (tag >>> 3) {
|
|
286
|
-
case 1:
|
|
287
|
-
if (tag !== 10) {
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
message.TargetId = reader.string();
|
|
291
|
-
continue;
|
|
292
|
-
case 2:
|
|
293
|
-
if (tag !== 18) {
|
|
294
|
-
break;
|
|
295
|
-
}
|
|
296
|
-
message.Config = exports.SnapdConf.decode(reader, reader.uint32());
|
|
297
|
-
continue;
|
|
298
|
-
}
|
|
299
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
reader.skipType(tag & 7);
|
|
303
|
-
}
|
|
304
|
-
return message;
|
|
305
|
-
},
|
|
306
|
-
fromJSON(object) {
|
|
307
|
-
return {
|
|
308
|
-
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
309
|
-
Config: isSet(object.Config) ? exports.SnapdConf.fromJSON(object.Config) : undefined,
|
|
310
|
-
};
|
|
311
|
-
},
|
|
312
|
-
toJSON(message) {
|
|
313
|
-
const obj = {};
|
|
314
|
-
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
315
|
-
message.Config !== undefined && (obj.Config = message.Config ? exports.SnapdConf.toJSON(message.Config) : undefined);
|
|
316
|
-
return obj;
|
|
317
|
-
},
|
|
318
|
-
create(base) {
|
|
319
|
-
return exports.SnapdConfSetRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
320
|
-
},
|
|
321
|
-
fromPartial(object) {
|
|
322
|
-
var _a;
|
|
323
|
-
const message = createBaseSnapdConfSetRequest();
|
|
324
|
-
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
325
|
-
message.Config = (object.Config !== undefined && object.Config !== null)
|
|
326
|
-
? exports.SnapdConf.fromPartial(object.Config)
|
|
327
|
-
: undefined;
|
|
328
|
-
return message;
|
|
329
|
-
},
|
|
330
|
-
};
|
|
331
|
-
function createBaseSnapdListSnapRequest() {
|
|
332
|
-
return { TargetId: "", BackupPool: "" };
|
|
333
|
-
}
|
|
334
|
-
exports.SnapdListSnapRequest = {
|
|
335
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
336
|
-
if (message.TargetId !== "") {
|
|
337
|
-
writer.uint32(10).string(message.TargetId);
|
|
338
|
-
}
|
|
339
|
-
if (message.BackupPool !== "") {
|
|
340
|
-
writer.uint32(18).string(message.BackupPool);
|
|
341
|
-
}
|
|
342
|
-
return writer;
|
|
343
|
-
},
|
|
344
|
-
decode(input, length) {
|
|
345
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
346
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
347
|
-
const message = createBaseSnapdListSnapRequest();
|
|
348
|
-
while (reader.pos < end) {
|
|
349
|
-
const tag = reader.uint32();
|
|
350
|
-
switch (tag >>> 3) {
|
|
351
|
-
case 1:
|
|
352
|
-
if (tag !== 10) {
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
message.TargetId = reader.string();
|
|
356
|
-
continue;
|
|
357
|
-
case 2:
|
|
358
|
-
if (tag !== 18) {
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
message.BackupPool = reader.string();
|
|
362
|
-
continue;
|
|
363
|
-
}
|
|
364
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
365
|
-
break;
|
|
366
|
-
}
|
|
367
|
-
reader.skipType(tag & 7);
|
|
368
|
-
}
|
|
369
|
-
return message;
|
|
370
|
-
},
|
|
371
|
-
fromJSON(object) {
|
|
372
|
-
return {
|
|
373
|
-
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
374
|
-
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
375
|
-
};
|
|
376
|
-
},
|
|
377
|
-
toJSON(message) {
|
|
378
|
-
const obj = {};
|
|
379
|
-
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
380
|
-
message.BackupPool !== undefined && (obj.BackupPool = message.BackupPool);
|
|
381
|
-
return obj;
|
|
382
|
-
},
|
|
383
|
-
create(base) {
|
|
384
|
-
return exports.SnapdListSnapRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
385
|
-
},
|
|
386
|
-
fromPartial(object) {
|
|
387
|
-
var _a, _b;
|
|
388
|
-
const message = createBaseSnapdListSnapRequest();
|
|
389
|
-
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
390
|
-
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
391
|
-
return message;
|
|
392
|
-
},
|
|
393
|
-
};
|
|
394
|
-
function createBaseSnapdListSnapResponse() {
|
|
395
|
-
return { SnapshotList: [] };
|
|
396
|
-
}
|
|
397
|
-
exports.SnapdListSnapResponse = {
|
|
398
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
399
|
-
for (const v of message.SnapshotList) {
|
|
400
|
-
OS_snapshot_1.SnapshotDesc.encode(v, writer.uint32(10).fork()).ldelim();
|
|
401
|
-
}
|
|
402
|
-
return writer;
|
|
403
|
-
},
|
|
404
|
-
decode(input, length) {
|
|
405
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
406
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
407
|
-
const message = createBaseSnapdListSnapResponse();
|
|
408
|
-
while (reader.pos < end) {
|
|
409
|
-
const tag = reader.uint32();
|
|
410
|
-
switch (tag >>> 3) {
|
|
411
|
-
case 1:
|
|
412
|
-
if (tag !== 10) {
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
message.SnapshotList.push(OS_snapshot_1.SnapshotDesc.decode(reader, reader.uint32()));
|
|
416
|
-
continue;
|
|
417
|
-
}
|
|
418
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
reader.skipType(tag & 7);
|
|
422
|
-
}
|
|
423
|
-
return message;
|
|
424
|
-
},
|
|
425
|
-
fromJSON(object) {
|
|
426
|
-
return {
|
|
427
|
-
SnapshotList: Array.isArray(object === null || object === void 0 ? void 0 : object.SnapshotList)
|
|
428
|
-
? object.SnapshotList.map((e) => OS_snapshot_1.SnapshotDesc.fromJSON(e))
|
|
429
|
-
: [],
|
|
430
|
-
};
|
|
431
|
-
},
|
|
432
|
-
toJSON(message) {
|
|
433
|
-
const obj = {};
|
|
434
|
-
if (message.SnapshotList) {
|
|
435
|
-
obj.SnapshotList = message.SnapshotList.map((e) => e ? OS_snapshot_1.SnapshotDesc.toJSON(e) : undefined);
|
|
436
|
-
}
|
|
437
|
-
else {
|
|
438
|
-
obj.SnapshotList = [];
|
|
439
|
-
}
|
|
440
|
-
return obj;
|
|
441
|
-
},
|
|
442
|
-
create(base) {
|
|
443
|
-
return exports.SnapdListSnapResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
444
|
-
},
|
|
445
|
-
fromPartial(object) {
|
|
446
|
-
var _a;
|
|
447
|
-
const message = createBaseSnapdListSnapResponse();
|
|
448
|
-
message.SnapshotList = ((_a = object.SnapshotList) === null || _a === void 0 ? void 0 : _a.map((e) => OS_snapshot_1.SnapshotDesc.fromPartial(e))) || [];
|
|
449
|
-
return message;
|
|
450
|
-
},
|
|
451
|
-
};
|
|
452
|
-
function createBaseSnapdSnapRequest() {
|
|
453
|
-
return { TargetId: "", BackupPool: "", SnapName: "" };
|
|
454
|
-
}
|
|
455
|
-
exports.SnapdSnapRequest = {
|
|
456
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
457
|
-
if (message.TargetId !== "") {
|
|
458
|
-
writer.uint32(10).string(message.TargetId);
|
|
459
|
-
}
|
|
460
|
-
if (message.BackupPool !== "") {
|
|
461
|
-
writer.uint32(18).string(message.BackupPool);
|
|
462
|
-
}
|
|
463
|
-
if (message.SnapName !== "") {
|
|
464
|
-
writer.uint32(26).string(message.SnapName);
|
|
465
|
-
}
|
|
466
|
-
return writer;
|
|
467
|
-
},
|
|
468
|
-
decode(input, length) {
|
|
469
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
470
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
471
|
-
const message = createBaseSnapdSnapRequest();
|
|
472
|
-
while (reader.pos < end) {
|
|
473
|
-
const tag = reader.uint32();
|
|
474
|
-
switch (tag >>> 3) {
|
|
475
|
-
case 1:
|
|
476
|
-
if (tag !== 10) {
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
message.TargetId = reader.string();
|
|
480
|
-
continue;
|
|
481
|
-
case 2:
|
|
482
|
-
if (tag !== 18) {
|
|
483
|
-
break;
|
|
484
|
-
}
|
|
485
|
-
message.BackupPool = reader.string();
|
|
486
|
-
continue;
|
|
487
|
-
case 3:
|
|
488
|
-
if (tag !== 26) {
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
message.SnapName = reader.string();
|
|
492
|
-
continue;
|
|
493
|
-
}
|
|
494
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
reader.skipType(tag & 7);
|
|
498
|
-
}
|
|
499
|
-
return message;
|
|
500
|
-
},
|
|
501
|
-
fromJSON(object) {
|
|
502
|
-
return {
|
|
503
|
-
TargetId: isSet(object.TargetId) ? String(object.TargetId) : "",
|
|
504
|
-
BackupPool: isSet(object.BackupPool) ? String(object.BackupPool) : "",
|
|
505
|
-
SnapName: isSet(object.SnapName) ? String(object.SnapName) : "",
|
|
506
|
-
};
|
|
507
|
-
},
|
|
508
|
-
toJSON(message) {
|
|
509
|
-
const obj = {};
|
|
510
|
-
message.TargetId !== undefined && (obj.TargetId = message.TargetId);
|
|
511
|
-
message.BackupPool !== undefined && (obj.BackupPool = message.BackupPool);
|
|
512
|
-
message.SnapName !== undefined && (obj.SnapName = message.SnapName);
|
|
513
|
-
return obj;
|
|
514
|
-
},
|
|
515
|
-
create(base) {
|
|
516
|
-
return exports.SnapdSnapRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
517
|
-
},
|
|
518
|
-
fromPartial(object) {
|
|
519
|
-
var _a, _b, _c;
|
|
520
|
-
const message = createBaseSnapdSnapRequest();
|
|
521
|
-
message.TargetId = (_a = object.TargetId) !== null && _a !== void 0 ? _a : "";
|
|
522
|
-
message.BackupPool = (_b = object.BackupPool) !== null && _b !== void 0 ? _b : "";
|
|
523
|
-
message.SnapName = (_c = object.SnapName) !== null && _c !== void 0 ? _c : "";
|
|
524
|
-
return message;
|
|
525
|
-
},
|
|
526
|
-
};
|
|
527
|
-
class SnapdServiceClientImpl {
|
|
528
|
-
constructor(rpc) {
|
|
529
|
-
this.rpc = rpc;
|
|
530
|
-
this.SnapdEnable = this.SnapdEnable.bind(this);
|
|
531
|
-
this.SnapdDisable = this.SnapdDisable.bind(this);
|
|
532
|
-
this.SnapdConfGet = this.SnapdConfGet.bind(this);
|
|
533
|
-
this.SnapdConfSet = this.SnapdConfSet.bind(this);
|
|
534
|
-
this.SnapdSnapList = this.SnapdSnapList.bind(this);
|
|
535
|
-
this.SnapdSnapAdd = this.SnapdSnapAdd.bind(this);
|
|
536
|
-
this.SnapdSnapDel = this.SnapdSnapDel.bind(this);
|
|
537
|
-
this.SnapdSnapRestore = this.SnapdSnapRestore.bind(this);
|
|
538
|
-
}
|
|
539
|
-
SnapdEnable(request, metadata) {
|
|
540
|
-
return this.rpc.unary(exports.SnapdServiceSnapdEnableDesc, exports.SnapdEnableRequest.fromPartial(request), metadata);
|
|
541
|
-
}
|
|
542
|
-
SnapdDisable(request, metadata) {
|
|
543
|
-
return this.rpc.unary(exports.SnapdServiceSnapdDisableDesc, exports.SnapdTargetRequest.fromPartial(request), metadata);
|
|
544
|
-
}
|
|
545
|
-
SnapdConfGet(request, metadata) {
|
|
546
|
-
return this.rpc.unary(exports.SnapdServiceSnapdConfGetDesc, exports.SnapdTargetRequest.fromPartial(request), metadata);
|
|
547
|
-
}
|
|
548
|
-
SnapdConfSet(request, metadata) {
|
|
549
|
-
return this.rpc.unary(exports.SnapdServiceSnapdConfSetDesc, exports.SnapdConfSetRequest.fromPartial(request), metadata);
|
|
550
|
-
}
|
|
551
|
-
SnapdSnapList(request, metadata) {
|
|
552
|
-
return this.rpc.unary(exports.SnapdServiceSnapdSnapListDesc, exports.SnapdListSnapRequest.fromPartial(request), metadata);
|
|
553
|
-
}
|
|
554
|
-
SnapdSnapAdd(request, metadata) {
|
|
555
|
-
return this.rpc.unary(exports.SnapdServiceSnapdSnapAddDesc, exports.SnapdSnapRequest.fromPartial(request), metadata);
|
|
556
|
-
}
|
|
557
|
-
SnapdSnapDel(request, metadata) {
|
|
558
|
-
return this.rpc.unary(exports.SnapdServiceSnapdSnapDelDesc, exports.SnapdSnapRequest.fromPartial(request), metadata);
|
|
559
|
-
}
|
|
560
|
-
SnapdSnapRestore(request, metadata) {
|
|
561
|
-
return this.rpc.unary(exports.SnapdServiceSnapdSnapRestoreDesc, exports.SnapdSnapRequest.fromPartial(request), metadata);
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
exports.SnapdServiceClientImpl = SnapdServiceClientImpl;
|
|
565
|
-
exports.SnapdServiceDesc = { serviceName: "cloud.lazycat.apis.sys.SnapdService" };
|
|
566
|
-
exports.SnapdServiceSnapdEnableDesc = {
|
|
567
|
-
methodName: "SnapdEnable",
|
|
568
|
-
service: exports.SnapdServiceDesc,
|
|
569
|
-
requestStream: false,
|
|
570
|
-
responseStream: false,
|
|
571
|
-
requestType: {
|
|
572
|
-
serializeBinary() {
|
|
573
|
-
return exports.SnapdEnableRequest.encode(this).finish();
|
|
574
|
-
},
|
|
575
|
-
},
|
|
576
|
-
responseType: {
|
|
577
|
-
deserializeBinary(data) {
|
|
578
|
-
const value = empty_1.Empty.decode(data);
|
|
579
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
580
|
-
return value;
|
|
581
|
-
} });
|
|
582
|
-
},
|
|
583
|
-
},
|
|
584
|
-
};
|
|
585
|
-
exports.SnapdServiceSnapdDisableDesc = {
|
|
586
|
-
methodName: "SnapdDisable",
|
|
587
|
-
service: exports.SnapdServiceDesc,
|
|
588
|
-
requestStream: false,
|
|
589
|
-
responseStream: false,
|
|
590
|
-
requestType: {
|
|
591
|
-
serializeBinary() {
|
|
592
|
-
return exports.SnapdTargetRequest.encode(this).finish();
|
|
593
|
-
},
|
|
594
|
-
},
|
|
595
|
-
responseType: {
|
|
596
|
-
deserializeBinary(data) {
|
|
597
|
-
const value = empty_1.Empty.decode(data);
|
|
598
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
599
|
-
return value;
|
|
600
|
-
} });
|
|
601
|
-
},
|
|
602
|
-
},
|
|
603
|
-
};
|
|
604
|
-
exports.SnapdServiceSnapdConfGetDesc = {
|
|
605
|
-
methodName: "SnapdConfGet",
|
|
606
|
-
service: exports.SnapdServiceDesc,
|
|
607
|
-
requestStream: false,
|
|
608
|
-
responseStream: false,
|
|
609
|
-
requestType: {
|
|
610
|
-
serializeBinary() {
|
|
611
|
-
return exports.SnapdTargetRequest.encode(this).finish();
|
|
612
|
-
},
|
|
613
|
-
},
|
|
614
|
-
responseType: {
|
|
615
|
-
deserializeBinary(data) {
|
|
616
|
-
const value = exports.SnapdConf.decode(data);
|
|
617
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
618
|
-
return value;
|
|
619
|
-
} });
|
|
620
|
-
},
|
|
621
|
-
},
|
|
622
|
-
};
|
|
623
|
-
exports.SnapdServiceSnapdConfSetDesc = {
|
|
624
|
-
methodName: "SnapdConfSet",
|
|
625
|
-
service: exports.SnapdServiceDesc,
|
|
626
|
-
requestStream: false,
|
|
627
|
-
responseStream: false,
|
|
628
|
-
requestType: {
|
|
629
|
-
serializeBinary() {
|
|
630
|
-
return exports.SnapdConfSetRequest.encode(this).finish();
|
|
631
|
-
},
|
|
632
|
-
},
|
|
633
|
-
responseType: {
|
|
634
|
-
deserializeBinary(data) {
|
|
635
|
-
const value = empty_1.Empty.decode(data);
|
|
636
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
637
|
-
return value;
|
|
638
|
-
} });
|
|
639
|
-
},
|
|
640
|
-
},
|
|
641
|
-
};
|
|
642
|
-
exports.SnapdServiceSnapdSnapListDesc = {
|
|
643
|
-
methodName: "SnapdSnapList",
|
|
644
|
-
service: exports.SnapdServiceDesc,
|
|
645
|
-
requestStream: false,
|
|
646
|
-
responseStream: false,
|
|
647
|
-
requestType: {
|
|
648
|
-
serializeBinary() {
|
|
649
|
-
return exports.SnapdListSnapRequest.encode(this).finish();
|
|
650
|
-
},
|
|
651
|
-
},
|
|
652
|
-
responseType: {
|
|
653
|
-
deserializeBinary(data) {
|
|
654
|
-
const value = exports.SnapdListSnapResponse.decode(data);
|
|
655
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
656
|
-
return value;
|
|
657
|
-
} });
|
|
658
|
-
},
|
|
659
|
-
},
|
|
660
|
-
};
|
|
661
|
-
exports.SnapdServiceSnapdSnapAddDesc = {
|
|
662
|
-
methodName: "SnapdSnapAdd",
|
|
663
|
-
service: exports.SnapdServiceDesc,
|
|
664
|
-
requestStream: false,
|
|
665
|
-
responseStream: false,
|
|
666
|
-
requestType: {
|
|
667
|
-
serializeBinary() {
|
|
668
|
-
return exports.SnapdSnapRequest.encode(this).finish();
|
|
669
|
-
},
|
|
670
|
-
},
|
|
671
|
-
responseType: {
|
|
672
|
-
deserializeBinary(data) {
|
|
673
|
-
const value = empty_1.Empty.decode(data);
|
|
674
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
675
|
-
return value;
|
|
676
|
-
} });
|
|
677
|
-
},
|
|
678
|
-
},
|
|
679
|
-
};
|
|
680
|
-
exports.SnapdServiceSnapdSnapDelDesc = {
|
|
681
|
-
methodName: "SnapdSnapDel",
|
|
682
|
-
service: exports.SnapdServiceDesc,
|
|
683
|
-
requestStream: false,
|
|
684
|
-
responseStream: false,
|
|
685
|
-
requestType: {
|
|
686
|
-
serializeBinary() {
|
|
687
|
-
return exports.SnapdSnapRequest.encode(this).finish();
|
|
688
|
-
},
|
|
689
|
-
},
|
|
690
|
-
responseType: {
|
|
691
|
-
deserializeBinary(data) {
|
|
692
|
-
const value = empty_1.Empty.decode(data);
|
|
693
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
694
|
-
return value;
|
|
695
|
-
} });
|
|
696
|
-
},
|
|
697
|
-
},
|
|
698
|
-
};
|
|
699
|
-
exports.SnapdServiceSnapdSnapRestoreDesc = {
|
|
700
|
-
methodName: "SnapdSnapRestore",
|
|
701
|
-
service: exports.SnapdServiceDesc,
|
|
702
|
-
requestStream: false,
|
|
703
|
-
responseStream: false,
|
|
704
|
-
requestType: {
|
|
705
|
-
serializeBinary() {
|
|
706
|
-
return exports.SnapdSnapRequest.encode(this).finish();
|
|
707
|
-
},
|
|
708
|
-
},
|
|
709
|
-
responseType: {
|
|
710
|
-
deserializeBinary(data) {
|
|
711
|
-
const value = empty_1.Empty.decode(data);
|
|
712
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
713
|
-
return value;
|
|
714
|
-
} });
|
|
715
|
-
},
|
|
716
|
-
},
|
|
717
|
-
};
|
|
718
|
-
class GrpcWebImpl {
|
|
719
|
-
constructor(host, options) {
|
|
720
|
-
this.host = host;
|
|
721
|
-
this.options = options;
|
|
722
|
-
}
|
|
723
|
-
unary(methodDesc, _request, metadata) {
|
|
724
|
-
var _a;
|
|
725
|
-
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
726
|
-
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
727
|
-
? 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))
|
|
728
|
-
: metadata || this.options.metadata;
|
|
729
|
-
return new Promise((resolve, reject) => {
|
|
730
|
-
grpc_web_1.grpc.unary(methodDesc, {
|
|
731
|
-
request,
|
|
732
|
-
host: this.host,
|
|
733
|
-
metadata: maybeCombinedMetadata,
|
|
734
|
-
transport: this.options.transport,
|
|
735
|
-
debug: this.options.debug,
|
|
736
|
-
onEnd: function (response) {
|
|
737
|
-
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
738
|
-
resolve(response.message.toObject());
|
|
739
|
-
}
|
|
740
|
-
else {
|
|
741
|
-
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
742
|
-
reject(err);
|
|
743
|
-
}
|
|
744
|
-
},
|
|
745
|
-
});
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
exports.GrpcWebImpl = GrpcWebImpl;
|
|
750
|
-
var tsProtoGlobalThis = (() => {
|
|
751
|
-
if (typeof globalThis !== "undefined") {
|
|
752
|
-
return globalThis;
|
|
753
|
-
}
|
|
754
|
-
if (typeof self !== "undefined") {
|
|
755
|
-
return self;
|
|
756
|
-
}
|
|
757
|
-
if (typeof window !== "undefined") {
|
|
758
|
-
return window;
|
|
759
|
-
}
|
|
760
|
-
if (typeof global !== "undefined") {
|
|
761
|
-
return global;
|
|
762
|
-
}
|
|
763
|
-
throw "Unable to locate global object";
|
|
764
|
-
})();
|
|
765
|
-
function isSet(value) {
|
|
766
|
-
return value !== null && value !== undefined;
|
|
767
|
-
}
|
|
768
|
-
class GrpcWebError extends tsProtoGlobalThis.Error {
|
|
769
|
-
constructor(message, code, metadata) {
|
|
770
|
-
super(message);
|
|
771
|
-
this.code = code;
|
|
772
|
-
this.metadata = metadata;
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
exports.GrpcWebError = GrpcWebError;
|
|
776
|
-
//# sourceMappingURL=snapd.js.map
|