@lazycatcloud/sdk 0.1.142 → 0.1.144
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/common/box.ts +545 -0
- package/common/browseronly.ts +520 -0
- package/common/end_device.ts +635 -0
- package/common/file_handler.ts +485 -0
- package/common/filetrans.ts +1936 -0
- package/common/gateway.ts +663 -0
- package/common/media_meta.ts +319 -0
- package/common/message.ts +242 -0
- package/common/peripheral_device.ts +783 -0
- package/common/security_context.ts +729 -0
- package/common/users.ts +1044 -0
- package/dist/common/box.d.ts +1 -1
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/box.js +21 -37
- package/dist/common/box.js.map +1 -1
- package/dist/common/browseronly.d.ts +2 -2
- package/dist/common/browseronly.d.ts.map +1 -1
- package/dist/common/browseronly.js +12 -23
- package/dist/common/browseronly.js.map +1 -1
- package/dist/common/end_device.d.ts +2 -2
- package/dist/common/end_device.d.ts.map +1 -1
- package/dist/common/end_device.js +18 -41
- package/dist/common/end_device.js.map +1 -1
- package/dist/common/file_handler.d.ts.map +1 -1
- package/dist/common/file_handler.js +5 -15
- package/dist/common/file_handler.js.map +1 -1
- package/dist/common/filetrans.d.ts +2 -2
- package/dist/common/filetrans.d.ts.map +1 -1
- package/dist/common/filetrans.js +94 -221
- package/dist/common/filetrans.js.map +1 -1
- package/dist/common/gateway.d.ts +1 -1
- package/dist/common/gateway.d.ts.map +1 -1
- package/dist/common/gateway.js +14 -33
- package/dist/common/gateway.js.map +1 -1
- package/dist/common/media_meta.d.ts +85 -0
- package/dist/common/media_meta.d.ts.map +1 -0
- package/dist/common/media_meta.js +233 -0
- package/dist/common/media_meta.js.map +1 -0
- package/dist/common/message.d.ts.map +1 -1
- package/dist/common/message.js +13 -23
- package/dist/common/message.js.map +1 -1
- package/dist/common/peripheral_device.d.ts +2 -2
- 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.map +1 -1
- package/dist/common/security_context.js +11 -33
- package/dist/common/security_context.js.map +1 -1
- package/dist/common/users.d.ts +2 -2
- package/dist/common/users.d.ts.map +1 -1
- package/dist/common/users.js +10 -24
- package/dist/common/users.js.map +1 -1
- package/dist/dlna/dlna.d.ts +2 -2
- package/dist/dlna/dlna.d.ts.map +1 -1
- package/dist/dlna/dlna.js +23 -58
- package/dist/dlna/dlna.js.map +1 -1
- package/dist/extentions/app_common.d.ts +1 -1
- package/dist/extentions/app_common.d.ts.map +1 -1
- package/dist/extentions/app_common.js +21 -8
- package/dist/extentions/app_common.js.map +1 -1
- package/dist/extentions/index.d.ts +1 -1
- package/dist/extentions/index.d.ts.map +1 -1
- package/dist/extentions/unsafe_app.d.ts +3 -0
- package/dist/extentions/unsafe_app.d.ts.map +1 -1
- package/dist/extentions/unsafe_app.js +21 -0
- package/dist/extentions/unsafe_app.js.map +1 -1
- package/dist/google/protobuf/descriptor.d.ts +0 -1
- package/dist/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/google/protobuf/descriptor.js +176 -406
- package/dist/google/protobuf/descriptor.js.map +1 -1
- package/dist/google/protobuf/empty.d.ts.map +1 -1
- package/dist/google/protobuf/empty.js.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts +0 -2
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/google/protobuf/timestamp.js +9 -6
- package/dist/google/protobuf/timestamp.js.map +1 -1
- package/dist/lanforward/lanforward.d.ts +1 -1
- package/dist/lanforward/lanforward.d.ts.map +1 -1
- package/dist/lanforward/lanforward.js +7 -12
- package/dist/lanforward/lanforward.js.map +1 -1
- package/dist/localdevice/clipboard.d.ts +1 -1
- package/dist/localdevice/clipboard.d.ts.map +1 -1
- package/dist/localdevice/clipboard.js +17 -25
- package/dist/localdevice/clipboard.js.map +1 -1
- package/dist/localdevice/config.d.ts.map +1 -1
- package/dist/localdevice/config.js +3 -8
- package/dist/localdevice/config.js.map +1 -1
- package/dist/localdevice/device.d.ts +1 -1
- package/dist/localdevice/device.d.ts.map +1 -1
- package/dist/localdevice/device.js +4 -9
- package/dist/localdevice/device.js.map +1 -1
- package/dist/localdevice/dialog.d.ts +1 -1
- package/dist/localdevice/dialog.d.ts.map +1 -1
- package/dist/localdevice/dialog.js +8 -22
- package/dist/localdevice/dialog.js.map +1 -1
- package/dist/localdevice/local-launch.d.ts.map +1 -1
- package/dist/localdevice/local-launch.js +9 -32
- package/dist/localdevice/local-launch.js.map +1 -1
- package/dist/localdevice/network.d.ts +1 -1
- package/dist/localdevice/network.d.ts.map +1 -1
- package/dist/localdevice/network.js +3 -6
- package/dist/localdevice/network.js.map +1 -1
- package/dist/localdevice/permission.d.ts +1 -1
- package/dist/localdevice/permission.d.ts.map +1 -1
- package/dist/localdevice/permission.js +18 -35
- package/dist/localdevice/permission.js.map +1 -1
- package/dist/localdevice/photo.d.ts +1 -1
- package/dist/localdevice/photo.d.ts.map +1 -1
- package/dist/localdevice/photo.js +64 -156
- package/dist/localdevice/photo.js.map +1 -1
- package/dist/package.json +1 -5
- package/dist/ssdp/ssdp.d.ts +1 -1
- package/dist/ssdp/ssdp.d.ts.map +1 -1
- package/dist/ssdp/ssdp.js +6 -9
- package/dist/ssdp/ssdp.js.map +1 -1
- package/dist/sys/OS_daemon.d.ts +1 -1
- package/dist/sys/OS_daemon.d.ts.map +1 -1
- package/dist/sys/OS_daemon.js +5 -14
- package/dist/sys/OS_daemon.js.map +1 -1
- package/dist/sys/OS_snapshot.d.ts +1 -1
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +41 -81
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +1 -1
- 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/btrfs.d.ts +1 -1
- package/dist/sys/btrfs.d.ts.map +1 -1
- package/dist/sys/btrfs.js +14 -22
- package/dist/sys/btrfs.js.map +1 -1
- package/dist/sys/devopt.d.ts +1 -1
- package/dist/sys/devopt.d.ts.map +1 -1
- package/dist/sys/devopt.js +9 -25
- package/dist/sys/devopt.js.map +1 -1
- package/dist/sys/event.d.ts +2 -2
- package/dist/sys/event.d.ts.map +1 -1
- package/dist/sys/event.js +15 -30
- package/dist/sys/event.js.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +2 -2
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.js +32 -65
- package/dist/sys/hc-core/hc-core.js.map +1 -1
- package/dist/sys/ingress.d.ts +1 -1
- package/dist/sys/ingress.d.ts.map +1 -1
- package/dist/sys/ingress.js +19 -36
- package/dist/sys/ingress.js.map +1 -1
- package/dist/sys/network_manager.d.ts +1 -1
- package/dist/sys/network_manager.d.ts.map +1 -1
- package/dist/sys/network_manager.js +22 -66
- package/dist/sys/network_manager.js.map +1 -1
- package/dist/sys/package_manager.d.ts +1 -1
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +36 -73
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +2 -2
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +62 -157
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/snapd.d.ts +1 -1
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +20 -50
- package/dist/sys/snapd.js.map +1 -1
- package/dlna/dlna.ts +895 -0
- package/docs/contribute.md +40 -0
- package/docs/extentions/AppCommon.md +30 -0
- package/extentions/app_common.ts +63 -0
- package/extentions/base.ts +459 -0
- package/extentions/index.ts +27 -0
- package/extentions/safe_app.ts +60 -0
- package/extentions/unsafe_app.ts +107 -0
- package/google/protobuf/descriptor.ts +3778 -0
- package/google/protobuf/empty.ts +64 -0
- package/google/protobuf/timestamp.ts +214 -0
- package/grpcweb.ts +106 -0
- package/index.ts +204 -0
- package/lanforward/lanforward.ts +301 -0
- package/localdevice/clipboard.ts +499 -0
- package/localdevice/config.ts +268 -0
- package/localdevice/device.ts +218 -0
- package/localdevice/dialog.ts +707 -0
- package/localdevice/local-launch.ts +954 -0
- package/localdevice/network.ts +273 -0
- package/localdevice/permission.ts +733 -0
- package/localdevice/photo.ts +1497 -0
- package/package.json +1 -5
- package/ssdp/ssdp.ts +332 -0
- package/sys/OS_daemon.ts +325 -0
- package/sys/OS_snapshot.ts +1714 -0
- package/sys/OS_upgrader.ts +782 -0
- package/sys/btrfs.ts +530 -0
- package/sys/devopt.ts +250 -0
- package/sys/event.ts +787 -0
- package/sys/hc-core/hc-core.ts +1582 -0
- package/sys/ingress.ts +953 -0
- package/sys/network_manager.ts +874 -0
- package/sys/package_manager.ts +1931 -0
- package/sys/portal-server/portal-server.ts +2934 -0
- package/sys/snapd.ts +861 -0
- package/tsconfig.json +15 -0
- package/dist/API.d.ts +0 -24
- package/dist/API.d.ts.map +0 -1
- package/dist/API.js +0 -117
- package/dist/API.js.map +0 -1
- package/dist/google/protobuf/wrappers.d.ts +0 -182
- package/dist/google/protobuf/wrappers.d.ts.map +0 -1
- package/dist/google/protobuf/wrappers.js +0 -458
- package/dist/google/protobuf/wrappers.js.map +0 -1
- package/dist/sys/message.d.ts +0 -186
- package/dist/sys/message.d.ts.map +0 -1
- package/dist/sys/message.js +0 -493
- package/dist/sys/message.js.map +0 -1
- package/dist/sys/settings.d.ts +0 -68
- package/dist/sys/settings.d.ts.map +0 -1
- package/dist/sys/settings.js +0 -183
- package/dist/sys/settings.js.map +0 -1
package/sys/btrfs.ts
ADDED
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { grpc } from "@improbable-eng/grpc-web";
|
|
3
|
+
import { BrowserHeaders } from "browser-headers";
|
|
4
|
+
import Long from "long";
|
|
5
|
+
import _m0 from "protobufjs/minimal";
|
|
6
|
+
import { Empty } from "../google/protobuf/empty";
|
|
7
|
+
|
|
8
|
+
export interface BtrfsSubvolCreateRequest {
|
|
9
|
+
path: string;
|
|
10
|
+
force: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface BtrfsSubvolInfoRequest {
|
|
14
|
+
path: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BtrfsSubvolInfoResponse {
|
|
18
|
+
uuid: string;
|
|
19
|
+
gen: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface BtrfsSubvolFindNewRequest {
|
|
23
|
+
path: string;
|
|
24
|
+
gen: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface BtrfsSubvolFindNewResponse {
|
|
28
|
+
files: string[];
|
|
29
|
+
gen: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function createBaseBtrfsSubvolCreateRequest(): BtrfsSubvolCreateRequest {
|
|
33
|
+
return { path: "", force: false };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const BtrfsSubvolCreateRequest = {
|
|
37
|
+
encode(message: BtrfsSubvolCreateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
38
|
+
if (message.path !== "") {
|
|
39
|
+
writer.uint32(10).string(message.path);
|
|
40
|
+
}
|
|
41
|
+
if (message.force === true) {
|
|
42
|
+
writer.uint32(16).bool(message.force);
|
|
43
|
+
}
|
|
44
|
+
return writer;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolCreateRequest {
|
|
48
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
49
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
50
|
+
const message = createBaseBtrfsSubvolCreateRequest();
|
|
51
|
+
while (reader.pos < end) {
|
|
52
|
+
const tag = reader.uint32();
|
|
53
|
+
switch (tag >>> 3) {
|
|
54
|
+
case 1:
|
|
55
|
+
message.path = reader.string();
|
|
56
|
+
break;
|
|
57
|
+
case 2:
|
|
58
|
+
message.force = reader.bool();
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
reader.skipType(tag & 7);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return message;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
fromJSON(object: any): BtrfsSubvolCreateRequest {
|
|
69
|
+
return {
|
|
70
|
+
path: isSet(object.path) ? String(object.path) : "",
|
|
71
|
+
force: isSet(object.force) ? Boolean(object.force) : false,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
toJSON(message: BtrfsSubvolCreateRequest): unknown {
|
|
76
|
+
const obj: any = {};
|
|
77
|
+
message.path !== undefined && (obj.path = message.path);
|
|
78
|
+
message.force !== undefined && (obj.force = message.force);
|
|
79
|
+
return obj;
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
fromPartial<I extends Exact<DeepPartial<BtrfsSubvolCreateRequest>, I>>(object: I): BtrfsSubvolCreateRequest {
|
|
83
|
+
const message = createBaseBtrfsSubvolCreateRequest();
|
|
84
|
+
message.path = object.path ?? "";
|
|
85
|
+
message.force = object.force ?? false;
|
|
86
|
+
return message;
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
function createBaseBtrfsSubvolInfoRequest(): BtrfsSubvolInfoRequest {
|
|
91
|
+
return { path: "" };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const BtrfsSubvolInfoRequest = {
|
|
95
|
+
encode(message: BtrfsSubvolInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
96
|
+
if (message.path !== "") {
|
|
97
|
+
writer.uint32(10).string(message.path);
|
|
98
|
+
}
|
|
99
|
+
return writer;
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolInfoRequest {
|
|
103
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
104
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
105
|
+
const message = createBaseBtrfsSubvolInfoRequest();
|
|
106
|
+
while (reader.pos < end) {
|
|
107
|
+
const tag = reader.uint32();
|
|
108
|
+
switch (tag >>> 3) {
|
|
109
|
+
case 1:
|
|
110
|
+
message.path = reader.string();
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
reader.skipType(tag & 7);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return message;
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
fromJSON(object: any): BtrfsSubvolInfoRequest {
|
|
121
|
+
return { path: isSet(object.path) ? String(object.path) : "" };
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
toJSON(message: BtrfsSubvolInfoRequest): unknown {
|
|
125
|
+
const obj: any = {};
|
|
126
|
+
message.path !== undefined && (obj.path = message.path);
|
|
127
|
+
return obj;
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
fromPartial<I extends Exact<DeepPartial<BtrfsSubvolInfoRequest>, I>>(object: I): BtrfsSubvolInfoRequest {
|
|
131
|
+
const message = createBaseBtrfsSubvolInfoRequest();
|
|
132
|
+
message.path = object.path ?? "";
|
|
133
|
+
return message;
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
function createBaseBtrfsSubvolInfoResponse(): BtrfsSubvolInfoResponse {
|
|
138
|
+
return { uuid: "", gen: 0 };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export const BtrfsSubvolInfoResponse = {
|
|
142
|
+
encode(message: BtrfsSubvolInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
143
|
+
if (message.uuid !== "") {
|
|
144
|
+
writer.uint32(10).string(message.uuid);
|
|
145
|
+
}
|
|
146
|
+
if (message.gen !== 0) {
|
|
147
|
+
writer.uint32(16).uint64(message.gen);
|
|
148
|
+
}
|
|
149
|
+
return writer;
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolInfoResponse {
|
|
153
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
154
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
155
|
+
const message = createBaseBtrfsSubvolInfoResponse();
|
|
156
|
+
while (reader.pos < end) {
|
|
157
|
+
const tag = reader.uint32();
|
|
158
|
+
switch (tag >>> 3) {
|
|
159
|
+
case 1:
|
|
160
|
+
message.uuid = reader.string();
|
|
161
|
+
break;
|
|
162
|
+
case 2:
|
|
163
|
+
message.gen = longToNumber(reader.uint64() as Long);
|
|
164
|
+
break;
|
|
165
|
+
default:
|
|
166
|
+
reader.skipType(tag & 7);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return message;
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
fromJSON(object: any): BtrfsSubvolInfoResponse {
|
|
174
|
+
return { uuid: isSet(object.uuid) ? String(object.uuid) : "", gen: isSet(object.gen) ? Number(object.gen) : 0 };
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
toJSON(message: BtrfsSubvolInfoResponse): unknown {
|
|
178
|
+
const obj: any = {};
|
|
179
|
+
message.uuid !== undefined && (obj.uuid = message.uuid);
|
|
180
|
+
message.gen !== undefined && (obj.gen = Math.round(message.gen));
|
|
181
|
+
return obj;
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
fromPartial<I extends Exact<DeepPartial<BtrfsSubvolInfoResponse>, I>>(object: I): BtrfsSubvolInfoResponse {
|
|
185
|
+
const message = createBaseBtrfsSubvolInfoResponse();
|
|
186
|
+
message.uuid = object.uuid ?? "";
|
|
187
|
+
message.gen = object.gen ?? 0;
|
|
188
|
+
return message;
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
function createBaseBtrfsSubvolFindNewRequest(): BtrfsSubvolFindNewRequest {
|
|
193
|
+
return { path: "", gen: 0 };
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export const BtrfsSubvolFindNewRequest = {
|
|
197
|
+
encode(message: BtrfsSubvolFindNewRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
198
|
+
if (message.path !== "") {
|
|
199
|
+
writer.uint32(10).string(message.path);
|
|
200
|
+
}
|
|
201
|
+
if (message.gen !== 0) {
|
|
202
|
+
writer.uint32(16).uint64(message.gen);
|
|
203
|
+
}
|
|
204
|
+
return writer;
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolFindNewRequest {
|
|
208
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
209
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
210
|
+
const message = createBaseBtrfsSubvolFindNewRequest();
|
|
211
|
+
while (reader.pos < end) {
|
|
212
|
+
const tag = reader.uint32();
|
|
213
|
+
switch (tag >>> 3) {
|
|
214
|
+
case 1:
|
|
215
|
+
message.path = reader.string();
|
|
216
|
+
break;
|
|
217
|
+
case 2:
|
|
218
|
+
message.gen = longToNumber(reader.uint64() as Long);
|
|
219
|
+
break;
|
|
220
|
+
default:
|
|
221
|
+
reader.skipType(tag & 7);
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return message;
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
fromJSON(object: any): BtrfsSubvolFindNewRequest {
|
|
229
|
+
return { path: isSet(object.path) ? String(object.path) : "", gen: isSet(object.gen) ? Number(object.gen) : 0 };
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
toJSON(message: BtrfsSubvolFindNewRequest): unknown {
|
|
233
|
+
const obj: any = {};
|
|
234
|
+
message.path !== undefined && (obj.path = message.path);
|
|
235
|
+
message.gen !== undefined && (obj.gen = Math.round(message.gen));
|
|
236
|
+
return obj;
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
fromPartial<I extends Exact<DeepPartial<BtrfsSubvolFindNewRequest>, I>>(object: I): BtrfsSubvolFindNewRequest {
|
|
240
|
+
const message = createBaseBtrfsSubvolFindNewRequest();
|
|
241
|
+
message.path = object.path ?? "";
|
|
242
|
+
message.gen = object.gen ?? 0;
|
|
243
|
+
return message;
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
function createBaseBtrfsSubvolFindNewResponse(): BtrfsSubvolFindNewResponse {
|
|
248
|
+
return { files: [], gen: 0 };
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export const BtrfsSubvolFindNewResponse = {
|
|
252
|
+
encode(message: BtrfsSubvolFindNewResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
253
|
+
for (const v of message.files) {
|
|
254
|
+
writer.uint32(10).string(v!);
|
|
255
|
+
}
|
|
256
|
+
if (message.gen !== 0) {
|
|
257
|
+
writer.uint32(16).uint64(message.gen);
|
|
258
|
+
}
|
|
259
|
+
return writer;
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolFindNewResponse {
|
|
263
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
264
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
265
|
+
const message = createBaseBtrfsSubvolFindNewResponse();
|
|
266
|
+
while (reader.pos < end) {
|
|
267
|
+
const tag = reader.uint32();
|
|
268
|
+
switch (tag >>> 3) {
|
|
269
|
+
case 1:
|
|
270
|
+
message.files.push(reader.string());
|
|
271
|
+
break;
|
|
272
|
+
case 2:
|
|
273
|
+
message.gen = longToNumber(reader.uint64() as Long);
|
|
274
|
+
break;
|
|
275
|
+
default:
|
|
276
|
+
reader.skipType(tag & 7);
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return message;
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
fromJSON(object: any): BtrfsSubvolFindNewResponse {
|
|
284
|
+
return {
|
|
285
|
+
files: Array.isArray(object?.files) ? object.files.map((e: any) => String(e)) : [],
|
|
286
|
+
gen: isSet(object.gen) ? Number(object.gen) : 0,
|
|
287
|
+
};
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
toJSON(message: BtrfsSubvolFindNewResponse): unknown {
|
|
291
|
+
const obj: any = {};
|
|
292
|
+
if (message.files) {
|
|
293
|
+
obj.files = message.files.map((e) => e);
|
|
294
|
+
} else {
|
|
295
|
+
obj.files = [];
|
|
296
|
+
}
|
|
297
|
+
message.gen !== undefined && (obj.gen = Math.round(message.gen));
|
|
298
|
+
return obj;
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
fromPartial<I extends Exact<DeepPartial<BtrfsSubvolFindNewResponse>, I>>(object: I): BtrfsSubvolFindNewResponse {
|
|
302
|
+
const message = createBaseBtrfsSubvolFindNewResponse();
|
|
303
|
+
message.files = object.files?.map((e) => e) || [];
|
|
304
|
+
message.gen = object.gen ?? 0;
|
|
305
|
+
return message;
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export interface BtrfsUtil {
|
|
310
|
+
SubvolCreate(request: DeepPartial<BtrfsSubvolCreateRequest>, metadata?: grpc.Metadata): Promise<Empty>;
|
|
311
|
+
SubvolInfo(request: DeepPartial<BtrfsSubvolInfoRequest>, metadata?: grpc.Metadata): Promise<BtrfsSubvolInfoResponse>;
|
|
312
|
+
SubvolFindNew(
|
|
313
|
+
request: DeepPartial<BtrfsSubvolFindNewRequest>,
|
|
314
|
+
metadata?: grpc.Metadata,
|
|
315
|
+
): Promise<BtrfsSubvolFindNewResponse>;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export class BtrfsUtilClientImpl implements BtrfsUtil {
|
|
319
|
+
private readonly rpc: Rpc;
|
|
320
|
+
|
|
321
|
+
constructor(rpc: Rpc) {
|
|
322
|
+
this.rpc = rpc;
|
|
323
|
+
this.SubvolCreate = this.SubvolCreate.bind(this);
|
|
324
|
+
this.SubvolInfo = this.SubvolInfo.bind(this);
|
|
325
|
+
this.SubvolFindNew = this.SubvolFindNew.bind(this);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
SubvolCreate(request: DeepPartial<BtrfsSubvolCreateRequest>, metadata?: grpc.Metadata): Promise<Empty> {
|
|
329
|
+
return this.rpc.unary(BtrfsUtilSubvolCreateDesc, BtrfsSubvolCreateRequest.fromPartial(request), metadata);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
SubvolInfo(request: DeepPartial<BtrfsSubvolInfoRequest>, metadata?: grpc.Metadata): Promise<BtrfsSubvolInfoResponse> {
|
|
333
|
+
return this.rpc.unary(BtrfsUtilSubvolInfoDesc, BtrfsSubvolInfoRequest.fromPartial(request), metadata);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
SubvolFindNew(
|
|
337
|
+
request: DeepPartial<BtrfsSubvolFindNewRequest>,
|
|
338
|
+
metadata?: grpc.Metadata,
|
|
339
|
+
): Promise<BtrfsSubvolFindNewResponse> {
|
|
340
|
+
return this.rpc.unary(BtrfsUtilSubvolFindNewDesc, BtrfsSubvolFindNewRequest.fromPartial(request), metadata);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export const BtrfsUtilDesc = { serviceName: "cloud.lazycat.apis.sys.BtrfsUtil" };
|
|
345
|
+
|
|
346
|
+
export const BtrfsUtilSubvolCreateDesc: UnaryMethodDefinitionish = {
|
|
347
|
+
methodName: "SubvolCreate",
|
|
348
|
+
service: BtrfsUtilDesc,
|
|
349
|
+
requestStream: false,
|
|
350
|
+
responseStream: false,
|
|
351
|
+
requestType: {
|
|
352
|
+
serializeBinary() {
|
|
353
|
+
return BtrfsSubvolCreateRequest.encode(this).finish();
|
|
354
|
+
},
|
|
355
|
+
} as any,
|
|
356
|
+
responseType: {
|
|
357
|
+
deserializeBinary(data: Uint8Array) {
|
|
358
|
+
return {
|
|
359
|
+
...Empty.decode(data),
|
|
360
|
+
toObject() {
|
|
361
|
+
return this;
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
} as any,
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
export const BtrfsUtilSubvolInfoDesc: UnaryMethodDefinitionish = {
|
|
369
|
+
methodName: "SubvolInfo",
|
|
370
|
+
service: BtrfsUtilDesc,
|
|
371
|
+
requestStream: false,
|
|
372
|
+
responseStream: false,
|
|
373
|
+
requestType: {
|
|
374
|
+
serializeBinary() {
|
|
375
|
+
return BtrfsSubvolInfoRequest.encode(this).finish();
|
|
376
|
+
},
|
|
377
|
+
} as any,
|
|
378
|
+
responseType: {
|
|
379
|
+
deserializeBinary(data: Uint8Array) {
|
|
380
|
+
return {
|
|
381
|
+
...BtrfsSubvolInfoResponse.decode(data),
|
|
382
|
+
toObject() {
|
|
383
|
+
return this;
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
},
|
|
387
|
+
} as any,
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export const BtrfsUtilSubvolFindNewDesc: UnaryMethodDefinitionish = {
|
|
391
|
+
methodName: "SubvolFindNew",
|
|
392
|
+
service: BtrfsUtilDesc,
|
|
393
|
+
requestStream: false,
|
|
394
|
+
responseStream: false,
|
|
395
|
+
requestType: {
|
|
396
|
+
serializeBinary() {
|
|
397
|
+
return BtrfsSubvolFindNewRequest.encode(this).finish();
|
|
398
|
+
},
|
|
399
|
+
} as any,
|
|
400
|
+
responseType: {
|
|
401
|
+
deserializeBinary(data: Uint8Array) {
|
|
402
|
+
return {
|
|
403
|
+
...BtrfsSubvolFindNewResponse.decode(data),
|
|
404
|
+
toObject() {
|
|
405
|
+
return this;
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
},
|
|
409
|
+
} as any,
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
|
|
413
|
+
requestStream: any;
|
|
414
|
+
responseStream: any;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
|
|
418
|
+
|
|
419
|
+
interface Rpc {
|
|
420
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
421
|
+
methodDesc: T,
|
|
422
|
+
request: any,
|
|
423
|
+
metadata: grpc.Metadata | undefined,
|
|
424
|
+
): Promise<any>;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export class GrpcWebImpl {
|
|
428
|
+
private host: string;
|
|
429
|
+
private options: {
|
|
430
|
+
transport?: grpc.TransportFactory;
|
|
431
|
+
|
|
432
|
+
debug?: boolean;
|
|
433
|
+
metadata?: grpc.Metadata;
|
|
434
|
+
upStreamRetryCodes?: number[];
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
constructor(
|
|
438
|
+
host: string,
|
|
439
|
+
options: {
|
|
440
|
+
transport?: grpc.TransportFactory;
|
|
441
|
+
|
|
442
|
+
debug?: boolean;
|
|
443
|
+
metadata?: grpc.Metadata;
|
|
444
|
+
upStreamRetryCodes?: number[];
|
|
445
|
+
},
|
|
446
|
+
) {
|
|
447
|
+
this.host = host;
|
|
448
|
+
this.options = options;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
unary<T extends UnaryMethodDefinitionish>(
|
|
452
|
+
methodDesc: T,
|
|
453
|
+
_request: any,
|
|
454
|
+
metadata: grpc.Metadata | undefined,
|
|
455
|
+
): Promise<any> {
|
|
456
|
+
const request = { ..._request, ...methodDesc.requestType };
|
|
457
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
458
|
+
? new BrowserHeaders({ ...this.options?.metadata.headersMap, ...metadata?.headersMap })
|
|
459
|
+
: metadata || this.options.metadata;
|
|
460
|
+
return new Promise((resolve, reject) => {
|
|
461
|
+
grpc.unary(methodDesc, {
|
|
462
|
+
request,
|
|
463
|
+
host: this.host,
|
|
464
|
+
metadata: maybeCombinedMetadata,
|
|
465
|
+
transport: this.options.transport,
|
|
466
|
+
debug: this.options.debug,
|
|
467
|
+
onEnd: function (response) {
|
|
468
|
+
if (response.status === grpc.Code.OK) {
|
|
469
|
+
resolve(response.message);
|
|
470
|
+
} else {
|
|
471
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
472
|
+
reject(err);
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
declare var self: any | undefined;
|
|
481
|
+
declare var window: any | undefined;
|
|
482
|
+
declare var global: any | undefined;
|
|
483
|
+
var globalThis: any = (() => {
|
|
484
|
+
if (typeof globalThis !== "undefined") {
|
|
485
|
+
return globalThis;
|
|
486
|
+
}
|
|
487
|
+
if (typeof self !== "undefined") {
|
|
488
|
+
return self;
|
|
489
|
+
}
|
|
490
|
+
if (typeof window !== "undefined") {
|
|
491
|
+
return window;
|
|
492
|
+
}
|
|
493
|
+
if (typeof global !== "undefined") {
|
|
494
|
+
return global;
|
|
495
|
+
}
|
|
496
|
+
throw "Unable to locate global object";
|
|
497
|
+
})();
|
|
498
|
+
|
|
499
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
500
|
+
|
|
501
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
502
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
503
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
504
|
+
: Partial<T>;
|
|
505
|
+
|
|
506
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
507
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
508
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
509
|
+
|
|
510
|
+
function longToNumber(long: Long): number {
|
|
511
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
512
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
513
|
+
}
|
|
514
|
+
return long.toNumber();
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (_m0.util.Long !== Long) {
|
|
518
|
+
_m0.util.Long = Long as any;
|
|
519
|
+
_m0.configure();
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
function isSet(value: any): boolean {
|
|
523
|
+
return value !== null && value !== undefined;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export class GrpcWebError extends Error {
|
|
527
|
+
constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
|
|
528
|
+
super(message);
|
|
529
|
+
}
|
|
530
|
+
}
|