@ekhein/lamda-node-sdk 1.0.1 → 1.0.3
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/chunk-3JBDAA2H.js +439 -0
- package/dist/chunk-4AHM55IO.js +1172 -0
- package/dist/chunk-4NKGYNMS.js +116 -0
- package/dist/chunk-6HD35RPW.js +5370 -0
- package/dist/chunk-76Y3OVVH.js +1602 -0
- package/dist/chunk-7XF22HAW.js +907 -0
- package/dist/chunk-7YGA6EOV.js +109 -0
- package/dist/chunk-ADS4GRIL.js +14 -0
- package/dist/chunk-FSLE4VGI.js +48 -0
- package/dist/chunk-H7Z6XFBF.js +134 -0
- package/dist/chunk-KJKSI2WL.js +62 -0
- package/dist/chunk-O52JGDU7.js +800 -0
- package/dist/chunk-ORXTTWPB.js +379 -0
- package/dist/chunk-OZJH6SR7.js +20 -0
- package/dist/chunk-P53F45YO.js +64 -0
- package/dist/chunk-QXMPY6EE.js +289 -0
- package/dist/chunk-SBFKX3ZY.js +1554 -0
- package/dist/chunk-WFQEBPE6.js +300 -0
- package/dist/chunk-X4LTH2UN.js +983 -0
- package/dist/chunk-XAX5BZL3.js +132 -0
- package/dist/chunk-ZXF5DGTC.js +45 -0
- package/dist/constants/activity.flag.cjs +92 -0
- package/dist/constants/activity.flag.d.cts +24 -0
- package/dist/constants/activity.flag.d.ts +24 -0
- package/dist/constants/activity.flag.js +49 -0
- package/dist/constants/android.intent.cjs +194 -0
- package/dist/constants/android.intent.d.cts +58 -0
- package/dist/constants/android.intent.d.ts +58 -0
- package/dist/constants/android.intent.js +117 -0
- package/dist/constants/android.permission.cjs +116 -0
- package/dist/constants/android.permission.d.cts +32 -0
- package/dist/constants/android.permission.d.ts +32 -0
- package/dist/constants/android.permission.js +65 -0
- package/dist/constants/index.cjs +356 -0
- package/dist/constants/index.d.cts +3 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.js +225 -0
- package/dist/decorators/inject.decorator.cjs +43 -0
- package/dist/decorators/inject.decorator.d.cts +5 -0
- package/dist/decorators/inject.decorator.d.ts +5 -0
- package/dist/decorators/inject.decorator.js +7 -0
- package/dist/main.cjs +1 -2
- package/dist/main.d.cts +17 -1152
- package/dist/main.d.ts +17 -1152
- package/dist/main.js +36 -11873
- package/dist/rpc/application.cjs +2019 -0
- package/dist/rpc/application.d.cts +138 -0
- package/dist/rpc/application.d.ts +138 -0
- package/dist/rpc/application.js +50 -0
- package/dist/rpc/debug.cjs +86 -0
- package/dist/rpc/debug.d.cts +21 -0
- package/dist/rpc/debug.d.ts +21 -0
- package/dist/rpc/debug.js +9 -0
- package/dist/rpc/file.cjs +405 -0
- package/dist/rpc/file.d.cts +40 -0
- package/dist/rpc/file.d.ts +40 -0
- package/dist/rpc/file.js +13 -0
- package/dist/rpc/google/protobuf/any.cjs +126 -0
- package/dist/rpc/google/protobuf/any.d.cts +22 -0
- package/dist/rpc/google/protobuf/any.d.ts +22 -0
- package/dist/rpc/google/protobuf/any.js +103 -0
- package/dist/rpc/google/protobuf/empty.cjs +69 -0
- package/dist/rpc/google/protobuf/empty.d.cts +20 -0
- package/dist/rpc/google/protobuf/empty.d.ts +20 -0
- package/dist/rpc/google/protobuf/empty.js +9 -0
- package/dist/rpc/google/protobuf/struct.cjs +469 -0
- package/dist/rpc/google/protobuf/struct.d.cts +65 -0
- package/dist/rpc/google/protobuf/struct.d.ts +65 -0
- package/dist/rpc/google/protobuf/struct.js +21 -0
- package/dist/rpc/policy.cjs +133 -0
- package/dist/rpc/policy.d.cts +24 -0
- package/dist/rpc/policy.d.ts +24 -0
- package/dist/rpc/policy.js +9 -0
- package/dist/rpc/proxy.cjs +1109 -0
- package/dist/rpc/proxy.d.cts +108 -0
- package/dist/rpc/proxy.d.ts +108 -0
- package/dist/rpc/proxy.js +49 -0
- package/dist/rpc/services.cjs +11898 -0
- package/dist/rpc/services.d.cts +1920 -0
- package/dist/rpc/services.d.ts +1920 -0
- package/dist/rpc/services.js +48 -0
- package/dist/rpc/settings.cjs +161 -0
- package/dist/rpc/settings.d.cts +31 -0
- package/dist/rpc/settings.d.ts +31 -0
- package/dist/rpc/settings.js +15 -0
- package/dist/rpc/shell.cjs +326 -0
- package/dist/rpc/shell.d.cts +36 -0
- package/dist/rpc/shell.d.ts +36 -0
- package/dist/rpc/shell.js +13 -0
- package/dist/rpc/status.cjs +936 -0
- package/dist/rpc/status.d.cts +76 -0
- package/dist/rpc/status.d.ts +76 -0
- package/dist/rpc/status.js +19 -0
- package/dist/rpc/storage.cjs +156 -0
- package/dist/rpc/storage.d.cts +24 -0
- package/dist/rpc/storage.d.ts +24 -0
- package/dist/rpc/storage.js +9 -0
- package/dist/rpc/types.cjs +317 -0
- package/dist/rpc/types.d.cts +36 -0
- package/dist/rpc/types.d.ts +36 -0
- package/dist/rpc/types.js +17 -0
- package/dist/rpc/uiautomator.cjs +5446 -0
- package/dist/rpc/uiautomator.d.cts +618 -0
- package/dist/rpc/uiautomator.d.ts +618 -0
- package/dist/rpc/uiautomator.js +113 -0
- package/dist/rpc/util.cjs +1212 -0
- package/dist/rpc/util.d.cts +103 -0
- package/dist/rpc/util.d.ts +103 -0
- package/dist/rpc/util.js +41 -0
- package/dist/rpc/wifi.cjs +1015 -0
- package/dist/rpc/wifi.d.cts +84 -0
- package/dist/rpc/wifi.d.ts +84 -0
- package/dist/rpc/wifi.js +25 -0
- package/package.json +3 -4
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "lamda.rpc";
|
|
4
|
+
interface BatteryInfo {
|
|
5
|
+
battCharging: boolean;
|
|
6
|
+
battPercent: number;
|
|
7
|
+
battTemperature: number;
|
|
8
|
+
}
|
|
9
|
+
declare const BatteryInfo: MessageFns<BatteryInfo>;
|
|
10
|
+
interface CpuInfo {
|
|
11
|
+
cpuPercent: number;
|
|
12
|
+
cpuCount: number;
|
|
13
|
+
cpuFreqCurrent: number;
|
|
14
|
+
cpuFreqMax: number;
|
|
15
|
+
cpuFreqMin: number;
|
|
16
|
+
cpuTimesUser: number;
|
|
17
|
+
cpuTimesSystem: number;
|
|
18
|
+
cpuTimesIdle: number;
|
|
19
|
+
}
|
|
20
|
+
declare const CpuInfo: MessageFns<CpuInfo>;
|
|
21
|
+
interface DiskUsage {
|
|
22
|
+
diskTotal: number;
|
|
23
|
+
diskUsed: number;
|
|
24
|
+
diskFree: number;
|
|
25
|
+
diskPercent: number;
|
|
26
|
+
}
|
|
27
|
+
declare const DiskUsage: MessageFns<DiskUsage>;
|
|
28
|
+
interface DiskIOInfo {
|
|
29
|
+
diskIoReadBytes: number;
|
|
30
|
+
diskIoReadCount: number;
|
|
31
|
+
diskIoWriteBytes: number;
|
|
32
|
+
diskIoWriteCount: number;
|
|
33
|
+
diskIoReadTime: number;
|
|
34
|
+
diskIoWriteTime: number;
|
|
35
|
+
diskIoBusyTime: number;
|
|
36
|
+
}
|
|
37
|
+
declare const DiskIOInfo: MessageFns<DiskIOInfo>;
|
|
38
|
+
interface NetIOInfo {
|
|
39
|
+
netIoBytesSent: number;
|
|
40
|
+
netIoPacketsSent: number;
|
|
41
|
+
netIoBytesRecv: number;
|
|
42
|
+
netIoPacketsRecv: number;
|
|
43
|
+
netIoDropin: number;
|
|
44
|
+
netIoDropout: number;
|
|
45
|
+
netIoErrin: number;
|
|
46
|
+
netIoErrout: number;
|
|
47
|
+
}
|
|
48
|
+
declare const NetIOInfo: MessageFns<NetIOInfo>;
|
|
49
|
+
interface MemInfo {
|
|
50
|
+
memTotal: number;
|
|
51
|
+
memAvailable: number;
|
|
52
|
+
memPercent: number;
|
|
53
|
+
memUsed: number;
|
|
54
|
+
memFree: number;
|
|
55
|
+
memActive: number;
|
|
56
|
+
memInactive: number;
|
|
57
|
+
memBuffers: number;
|
|
58
|
+
memCached: number;
|
|
59
|
+
memShared: number;
|
|
60
|
+
memSlab: number;
|
|
61
|
+
}
|
|
62
|
+
declare const MemInfo: MessageFns<MemInfo>;
|
|
63
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
64
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
65
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
66
|
+
} : Partial<T>;
|
|
67
|
+
interface MessageFns<T> {
|
|
68
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
69
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
70
|
+
fromJSON(object: any): T;
|
|
71
|
+
toJSON(message: T): unknown;
|
|
72
|
+
create(base?: DeepPartial<T>): T;
|
|
73
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { BatteryInfo, CpuInfo, type DeepPartial, DiskIOInfo, DiskUsage, MemInfo, type MessageFns, NetIOInfo, protobufPackage };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "lamda.rpc";
|
|
4
|
+
interface BatteryInfo {
|
|
5
|
+
battCharging: boolean;
|
|
6
|
+
battPercent: number;
|
|
7
|
+
battTemperature: number;
|
|
8
|
+
}
|
|
9
|
+
declare const BatteryInfo: MessageFns<BatteryInfo>;
|
|
10
|
+
interface CpuInfo {
|
|
11
|
+
cpuPercent: number;
|
|
12
|
+
cpuCount: number;
|
|
13
|
+
cpuFreqCurrent: number;
|
|
14
|
+
cpuFreqMax: number;
|
|
15
|
+
cpuFreqMin: number;
|
|
16
|
+
cpuTimesUser: number;
|
|
17
|
+
cpuTimesSystem: number;
|
|
18
|
+
cpuTimesIdle: number;
|
|
19
|
+
}
|
|
20
|
+
declare const CpuInfo: MessageFns<CpuInfo>;
|
|
21
|
+
interface DiskUsage {
|
|
22
|
+
diskTotal: number;
|
|
23
|
+
diskUsed: number;
|
|
24
|
+
diskFree: number;
|
|
25
|
+
diskPercent: number;
|
|
26
|
+
}
|
|
27
|
+
declare const DiskUsage: MessageFns<DiskUsage>;
|
|
28
|
+
interface DiskIOInfo {
|
|
29
|
+
diskIoReadBytes: number;
|
|
30
|
+
diskIoReadCount: number;
|
|
31
|
+
diskIoWriteBytes: number;
|
|
32
|
+
diskIoWriteCount: number;
|
|
33
|
+
diskIoReadTime: number;
|
|
34
|
+
diskIoWriteTime: number;
|
|
35
|
+
diskIoBusyTime: number;
|
|
36
|
+
}
|
|
37
|
+
declare const DiskIOInfo: MessageFns<DiskIOInfo>;
|
|
38
|
+
interface NetIOInfo {
|
|
39
|
+
netIoBytesSent: number;
|
|
40
|
+
netIoPacketsSent: number;
|
|
41
|
+
netIoBytesRecv: number;
|
|
42
|
+
netIoPacketsRecv: number;
|
|
43
|
+
netIoDropin: number;
|
|
44
|
+
netIoDropout: number;
|
|
45
|
+
netIoErrin: number;
|
|
46
|
+
netIoErrout: number;
|
|
47
|
+
}
|
|
48
|
+
declare const NetIOInfo: MessageFns<NetIOInfo>;
|
|
49
|
+
interface MemInfo {
|
|
50
|
+
memTotal: number;
|
|
51
|
+
memAvailable: number;
|
|
52
|
+
memPercent: number;
|
|
53
|
+
memUsed: number;
|
|
54
|
+
memFree: number;
|
|
55
|
+
memActive: number;
|
|
56
|
+
memInactive: number;
|
|
57
|
+
memBuffers: number;
|
|
58
|
+
memCached: number;
|
|
59
|
+
memShared: number;
|
|
60
|
+
memSlab: number;
|
|
61
|
+
}
|
|
62
|
+
declare const MemInfo: MessageFns<MemInfo>;
|
|
63
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
64
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
65
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
66
|
+
} : Partial<T>;
|
|
67
|
+
interface MessageFns<T> {
|
|
68
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
69
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
70
|
+
fromJSON(object: any): T;
|
|
71
|
+
toJSON(message: T): unknown;
|
|
72
|
+
create(base?: DeepPartial<T>): T;
|
|
73
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { BatteryInfo, CpuInfo, type DeepPartial, DiskIOInfo, DiskUsage, MemInfo, type MessageFns, NetIOInfo, protobufPackage };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BatteryInfo,
|
|
3
|
+
CpuInfo,
|
|
4
|
+
DiskIOInfo,
|
|
5
|
+
DiskUsage,
|
|
6
|
+
MemInfo,
|
|
7
|
+
NetIOInfo,
|
|
8
|
+
protobufPackage
|
|
9
|
+
} from "../chunk-7XF22HAW.js";
|
|
10
|
+
import "../chunk-ADS4GRIL.js";
|
|
11
|
+
export {
|
|
12
|
+
BatteryInfo,
|
|
13
|
+
CpuInfo,
|
|
14
|
+
DiskIOInfo,
|
|
15
|
+
DiskUsage,
|
|
16
|
+
MemInfo,
|
|
17
|
+
NetIOInfo,
|
|
18
|
+
protobufPackage
|
|
19
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/rpc/storage.ts
|
|
20
|
+
var storage_exports = {};
|
|
21
|
+
__export(storage_exports, {
|
|
22
|
+
StorageRequest: () => StorageRequest,
|
|
23
|
+
protobufPackage: () => protobufPackage
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(storage_exports);
|
|
26
|
+
var import_wire = require("@bufbuild/protobuf/wire");
|
|
27
|
+
var protobufPackage = "lamda.rpc";
|
|
28
|
+
function createBaseStorageRequest() {
|
|
29
|
+
return { container: "", key: "", value: new Uint8Array(0), ttl: 0 };
|
|
30
|
+
}
|
|
31
|
+
var StorageRequest = {
|
|
32
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
33
|
+
if (message.container !== "") {
|
|
34
|
+
writer.uint32(10).string(message.container);
|
|
35
|
+
}
|
|
36
|
+
if (message.key !== "") {
|
|
37
|
+
writer.uint32(18).string(message.key);
|
|
38
|
+
}
|
|
39
|
+
if (message.value.length !== 0) {
|
|
40
|
+
writer.uint32(26).bytes(message.value);
|
|
41
|
+
}
|
|
42
|
+
if (message.ttl !== 0) {
|
|
43
|
+
writer.uint32(32).uint32(message.ttl);
|
|
44
|
+
}
|
|
45
|
+
return writer;
|
|
46
|
+
},
|
|
47
|
+
decode(input, length) {
|
|
48
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
49
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
50
|
+
const message = createBaseStorageRequest();
|
|
51
|
+
while (reader.pos < end) {
|
|
52
|
+
const tag = reader.uint32();
|
|
53
|
+
switch (tag >>> 3) {
|
|
54
|
+
case 1: {
|
|
55
|
+
if (tag !== 10) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
message.container = reader.string();
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
case 2: {
|
|
62
|
+
if (tag !== 18) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
message.key = reader.string();
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
case 3: {
|
|
69
|
+
if (tag !== 26) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
message.value = reader.bytes();
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
case 4: {
|
|
76
|
+
if (tag !== 32) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
message.ttl = reader.uint32();
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
reader.skip(tag & 7);
|
|
87
|
+
}
|
|
88
|
+
return message;
|
|
89
|
+
},
|
|
90
|
+
fromJSON(object) {
|
|
91
|
+
return {
|
|
92
|
+
container: isSet(object.container) ? globalThis.String(object.container) : "",
|
|
93
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
94
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
95
|
+
ttl: isSet(object.ttl) ? globalThis.Number(object.ttl) : 0
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
toJSON(message) {
|
|
99
|
+
const obj = {};
|
|
100
|
+
if (message.container !== "") {
|
|
101
|
+
obj.container = message.container;
|
|
102
|
+
}
|
|
103
|
+
if (message.key !== "") {
|
|
104
|
+
obj.key = message.key;
|
|
105
|
+
}
|
|
106
|
+
if (message.value.length !== 0) {
|
|
107
|
+
obj.value = base64FromBytes(message.value);
|
|
108
|
+
}
|
|
109
|
+
if (message.ttl !== 0) {
|
|
110
|
+
obj.ttl = Math.round(message.ttl);
|
|
111
|
+
}
|
|
112
|
+
return obj;
|
|
113
|
+
},
|
|
114
|
+
create(base) {
|
|
115
|
+
return StorageRequest.fromPartial(base ?? {});
|
|
116
|
+
},
|
|
117
|
+
fromPartial(object) {
|
|
118
|
+
const message = createBaseStorageRequest();
|
|
119
|
+
message.container = object.container ?? "";
|
|
120
|
+
message.key = object.key ?? "";
|
|
121
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
122
|
+
message.ttl = object.ttl ?? 0;
|
|
123
|
+
return message;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
function bytesFromBase64(b64) {
|
|
127
|
+
if (globalThis.Buffer) {
|
|
128
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
129
|
+
} else {
|
|
130
|
+
const bin = globalThis.atob(b64);
|
|
131
|
+
const arr = new Uint8Array(bin.length);
|
|
132
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
133
|
+
arr[i] = bin.charCodeAt(i);
|
|
134
|
+
}
|
|
135
|
+
return arr;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function base64FromBytes(arr) {
|
|
139
|
+
if (globalThis.Buffer) {
|
|
140
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
141
|
+
} else {
|
|
142
|
+
const bin = [];
|
|
143
|
+
arr.forEach((byte) => {
|
|
144
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
145
|
+
});
|
|
146
|
+
return globalThis.btoa(bin.join(""));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function isSet(value) {
|
|
150
|
+
return value !== null && value !== void 0;
|
|
151
|
+
}
|
|
152
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
153
|
+
0 && (module.exports = {
|
|
154
|
+
StorageRequest,
|
|
155
|
+
protobufPackage
|
|
156
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "lamda.rpc";
|
|
4
|
+
interface StorageRequest {
|
|
5
|
+
container: string;
|
|
6
|
+
key: string;
|
|
7
|
+
value: Uint8Array;
|
|
8
|
+
ttl: number;
|
|
9
|
+
}
|
|
10
|
+
declare const StorageRequest: MessageFns<StorageRequest>;
|
|
11
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
12
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
13
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
14
|
+
} : Partial<T>;
|
|
15
|
+
interface MessageFns<T> {
|
|
16
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
17
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
18
|
+
fromJSON(object: any): T;
|
|
19
|
+
toJSON(message: T): unknown;
|
|
20
|
+
create(base?: DeepPartial<T>): T;
|
|
21
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { type DeepPartial, type MessageFns, StorageRequest, protobufPackage };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "lamda.rpc";
|
|
4
|
+
interface StorageRequest {
|
|
5
|
+
container: string;
|
|
6
|
+
key: string;
|
|
7
|
+
value: Uint8Array;
|
|
8
|
+
ttl: number;
|
|
9
|
+
}
|
|
10
|
+
declare const StorageRequest: MessageFns<StorageRequest>;
|
|
11
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
12
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
13
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
14
|
+
} : Partial<T>;
|
|
15
|
+
interface MessageFns<T> {
|
|
16
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
17
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
18
|
+
fromJSON(object: any): T;
|
|
19
|
+
toJSON(message: T): unknown;
|
|
20
|
+
create(base?: DeepPartial<T>): T;
|
|
21
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { type DeepPartial, type MessageFns, StorageRequest, protobufPackage };
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/rpc/types.ts
|
|
20
|
+
var types_exports = {};
|
|
21
|
+
__export(types_exports, {
|
|
22
|
+
Boolean: () => Boolean,
|
|
23
|
+
Bytes: () => Bytes,
|
|
24
|
+
Empty: () => Empty,
|
|
25
|
+
Integer: () => Integer,
|
|
26
|
+
String: () => String,
|
|
27
|
+
protobufPackage: () => protobufPackage
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(types_exports);
|
|
30
|
+
var import_wire = require("@bufbuild/protobuf/wire");
|
|
31
|
+
var protobufPackage = "lamda.rpc";
|
|
32
|
+
function createBaseBoolean() {
|
|
33
|
+
return { value: false };
|
|
34
|
+
}
|
|
35
|
+
var Boolean = {
|
|
36
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
37
|
+
if (message.value !== false) {
|
|
38
|
+
writer.uint32(8).bool(message.value);
|
|
39
|
+
}
|
|
40
|
+
return writer;
|
|
41
|
+
},
|
|
42
|
+
decode(input, length) {
|
|
43
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
44
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
45
|
+
const message = createBaseBoolean();
|
|
46
|
+
while (reader.pos < end) {
|
|
47
|
+
const tag = reader.uint32();
|
|
48
|
+
switch (tag >>> 3) {
|
|
49
|
+
case 1: {
|
|
50
|
+
if (tag !== 8) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
message.value = reader.bool();
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
reader.skip(tag & 7);
|
|
61
|
+
}
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
fromJSON(object) {
|
|
65
|
+
return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
|
|
66
|
+
},
|
|
67
|
+
toJSON(message) {
|
|
68
|
+
const obj = {};
|
|
69
|
+
if (message.value !== false) {
|
|
70
|
+
obj.value = message.value;
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
},
|
|
74
|
+
create(base) {
|
|
75
|
+
return Boolean.fromPartial(base ?? {});
|
|
76
|
+
},
|
|
77
|
+
fromPartial(object) {
|
|
78
|
+
const message = createBaseBoolean();
|
|
79
|
+
message.value = object.value ?? false;
|
|
80
|
+
return message;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
function createBaseInteger() {
|
|
84
|
+
return { value: 0 };
|
|
85
|
+
}
|
|
86
|
+
var Integer = {
|
|
87
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
88
|
+
if (message.value !== 0) {
|
|
89
|
+
writer.uint32(8).int64(message.value);
|
|
90
|
+
}
|
|
91
|
+
return writer;
|
|
92
|
+
},
|
|
93
|
+
decode(input, length) {
|
|
94
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
95
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
96
|
+
const message = createBaseInteger();
|
|
97
|
+
while (reader.pos < end) {
|
|
98
|
+
const tag = reader.uint32();
|
|
99
|
+
switch (tag >>> 3) {
|
|
100
|
+
case 1: {
|
|
101
|
+
if (tag !== 8) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
message.value = longToNumber(reader.int64());
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
reader.skip(tag & 7);
|
|
112
|
+
}
|
|
113
|
+
return message;
|
|
114
|
+
},
|
|
115
|
+
fromJSON(object) {
|
|
116
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
117
|
+
},
|
|
118
|
+
toJSON(message) {
|
|
119
|
+
const obj = {};
|
|
120
|
+
if (message.value !== 0) {
|
|
121
|
+
obj.value = Math.round(message.value);
|
|
122
|
+
}
|
|
123
|
+
return obj;
|
|
124
|
+
},
|
|
125
|
+
create(base) {
|
|
126
|
+
return Integer.fromPartial(base ?? {});
|
|
127
|
+
},
|
|
128
|
+
fromPartial(object) {
|
|
129
|
+
const message = createBaseInteger();
|
|
130
|
+
message.value = object.value ?? 0;
|
|
131
|
+
return message;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
function createBaseString() {
|
|
135
|
+
return { value: "" };
|
|
136
|
+
}
|
|
137
|
+
var String = {
|
|
138
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
139
|
+
if (message.value !== "") {
|
|
140
|
+
writer.uint32(10).string(message.value);
|
|
141
|
+
}
|
|
142
|
+
return writer;
|
|
143
|
+
},
|
|
144
|
+
decode(input, length) {
|
|
145
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
146
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
147
|
+
const message = createBaseString();
|
|
148
|
+
while (reader.pos < end) {
|
|
149
|
+
const tag = reader.uint32();
|
|
150
|
+
switch (tag >>> 3) {
|
|
151
|
+
case 1: {
|
|
152
|
+
if (tag !== 10) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
message.value = reader.string();
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
reader.skip(tag & 7);
|
|
163
|
+
}
|
|
164
|
+
return message;
|
|
165
|
+
},
|
|
166
|
+
fromJSON(object) {
|
|
167
|
+
return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
|
|
168
|
+
},
|
|
169
|
+
toJSON(message) {
|
|
170
|
+
const obj = {};
|
|
171
|
+
if (message.value !== "") {
|
|
172
|
+
obj.value = message.value;
|
|
173
|
+
}
|
|
174
|
+
return obj;
|
|
175
|
+
},
|
|
176
|
+
create(base) {
|
|
177
|
+
return String.fromPartial(base ?? {});
|
|
178
|
+
},
|
|
179
|
+
fromPartial(object) {
|
|
180
|
+
const message = createBaseString();
|
|
181
|
+
message.value = object.value ?? "";
|
|
182
|
+
return message;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
function createBaseBytes() {
|
|
186
|
+
return { value: new Uint8Array(0) };
|
|
187
|
+
}
|
|
188
|
+
var Bytes = {
|
|
189
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
190
|
+
if (message.value.length !== 0) {
|
|
191
|
+
writer.uint32(10).bytes(message.value);
|
|
192
|
+
}
|
|
193
|
+
return writer;
|
|
194
|
+
},
|
|
195
|
+
decode(input, length) {
|
|
196
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
197
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
198
|
+
const message = createBaseBytes();
|
|
199
|
+
while (reader.pos < end) {
|
|
200
|
+
const tag = reader.uint32();
|
|
201
|
+
switch (tag >>> 3) {
|
|
202
|
+
case 1: {
|
|
203
|
+
if (tag !== 10) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
message.value = reader.bytes();
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
reader.skip(tag & 7);
|
|
214
|
+
}
|
|
215
|
+
return message;
|
|
216
|
+
},
|
|
217
|
+
fromJSON(object) {
|
|
218
|
+
return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0) };
|
|
219
|
+
},
|
|
220
|
+
toJSON(message) {
|
|
221
|
+
const obj = {};
|
|
222
|
+
if (message.value.length !== 0) {
|
|
223
|
+
obj.value = base64FromBytes(message.value);
|
|
224
|
+
}
|
|
225
|
+
return obj;
|
|
226
|
+
},
|
|
227
|
+
create(base) {
|
|
228
|
+
return Bytes.fromPartial(base ?? {});
|
|
229
|
+
},
|
|
230
|
+
fromPartial(object) {
|
|
231
|
+
const message = createBaseBytes();
|
|
232
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
233
|
+
return message;
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
function createBaseEmpty() {
|
|
237
|
+
return {};
|
|
238
|
+
}
|
|
239
|
+
var Empty = {
|
|
240
|
+
encode(_, writer = new import_wire.BinaryWriter()) {
|
|
241
|
+
return writer;
|
|
242
|
+
},
|
|
243
|
+
decode(input, length) {
|
|
244
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
245
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
246
|
+
const message = createBaseEmpty();
|
|
247
|
+
while (reader.pos < end) {
|
|
248
|
+
const tag = reader.uint32();
|
|
249
|
+
switch (tag >>> 3) {
|
|
250
|
+
}
|
|
251
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
reader.skip(tag & 7);
|
|
255
|
+
}
|
|
256
|
+
return message;
|
|
257
|
+
},
|
|
258
|
+
fromJSON(_) {
|
|
259
|
+
return {};
|
|
260
|
+
},
|
|
261
|
+
toJSON(_) {
|
|
262
|
+
const obj = {};
|
|
263
|
+
return obj;
|
|
264
|
+
},
|
|
265
|
+
create(base) {
|
|
266
|
+
return Empty.fromPartial(base ?? {});
|
|
267
|
+
},
|
|
268
|
+
fromPartial(_) {
|
|
269
|
+
const message = createBaseEmpty();
|
|
270
|
+
return message;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
function bytesFromBase64(b64) {
|
|
274
|
+
if (globalThis.Buffer) {
|
|
275
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
276
|
+
} else {
|
|
277
|
+
const bin = globalThis.atob(b64);
|
|
278
|
+
const arr = new Uint8Array(bin.length);
|
|
279
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
280
|
+
arr[i] = bin.charCodeAt(i);
|
|
281
|
+
}
|
|
282
|
+
return arr;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function base64FromBytes(arr) {
|
|
286
|
+
if (globalThis.Buffer) {
|
|
287
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
288
|
+
} else {
|
|
289
|
+
const bin = [];
|
|
290
|
+
arr.forEach((byte) => {
|
|
291
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
292
|
+
});
|
|
293
|
+
return globalThis.btoa(bin.join(""));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function longToNumber(int64) {
|
|
297
|
+
const num = globalThis.Number(int64.toString());
|
|
298
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
299
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
300
|
+
}
|
|
301
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
302
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
303
|
+
}
|
|
304
|
+
return num;
|
|
305
|
+
}
|
|
306
|
+
function isSet(value) {
|
|
307
|
+
return value !== null && value !== void 0;
|
|
308
|
+
}
|
|
309
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
310
|
+
0 && (module.exports = {
|
|
311
|
+
Boolean,
|
|
312
|
+
Bytes,
|
|
313
|
+
Empty,
|
|
314
|
+
Integer,
|
|
315
|
+
String,
|
|
316
|
+
protobufPackage
|
|
317
|
+
});
|