@ekhein/lamda-node-sdk 1.0.1 → 1.0.2
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-3HDKHFYE.js +1602 -0
- package/dist/chunk-3JBDAA2H.js +439 -0
- package/dist/chunk-4AHM55IO.js +1172 -0
- package/dist/chunk-6HD35RPW.js +5370 -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.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 +186 -0
- package/dist/constants/index.d.cts +2 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +111 -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,103 @@
|
|
|
1
|
+
import "../../../chunk-ADS4GRIL.js";
|
|
2
|
+
|
|
3
|
+
// src/rpc/google/protobuf/any.ts
|
|
4
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
5
|
+
var protobufPackage = "google.protobuf";
|
|
6
|
+
function createBaseAny() {
|
|
7
|
+
return { typeUrl: "", value: new Uint8Array(0) };
|
|
8
|
+
}
|
|
9
|
+
var Any = {
|
|
10
|
+
encode(message, writer = new BinaryWriter()) {
|
|
11
|
+
if (message.typeUrl !== "") {
|
|
12
|
+
writer.uint32(10).string(message.typeUrl);
|
|
13
|
+
}
|
|
14
|
+
if (message.value.length !== 0) {
|
|
15
|
+
writer.uint32(18).bytes(message.value);
|
|
16
|
+
}
|
|
17
|
+
return writer;
|
|
18
|
+
},
|
|
19
|
+
decode(input, length) {
|
|
20
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
21
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
22
|
+
const message = createBaseAny();
|
|
23
|
+
while (reader.pos < end) {
|
|
24
|
+
const tag = reader.uint32();
|
|
25
|
+
switch (tag >>> 3) {
|
|
26
|
+
case 1: {
|
|
27
|
+
if (tag !== 10) {
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
message.typeUrl = reader.string();
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
case 2: {
|
|
34
|
+
if (tag !== 18) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
message.value = reader.bytes();
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
reader.skip(tag & 7);
|
|
45
|
+
}
|
|
46
|
+
return message;
|
|
47
|
+
},
|
|
48
|
+
fromJSON(object) {
|
|
49
|
+
return {
|
|
50
|
+
typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
|
|
51
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0)
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
toJSON(message) {
|
|
55
|
+
const obj = {};
|
|
56
|
+
if (message.typeUrl !== "") {
|
|
57
|
+
obj.typeUrl = message.typeUrl;
|
|
58
|
+
}
|
|
59
|
+
if (message.value.length !== 0) {
|
|
60
|
+
obj.value = base64FromBytes(message.value);
|
|
61
|
+
}
|
|
62
|
+
return obj;
|
|
63
|
+
},
|
|
64
|
+
create(base) {
|
|
65
|
+
return Any.fromPartial(base ?? {});
|
|
66
|
+
},
|
|
67
|
+
fromPartial(object) {
|
|
68
|
+
const message = createBaseAny();
|
|
69
|
+
message.typeUrl = object.typeUrl ?? "";
|
|
70
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
71
|
+
return message;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
function bytesFromBase64(b64) {
|
|
75
|
+
if (globalThis.Buffer) {
|
|
76
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
77
|
+
} else {
|
|
78
|
+
const bin = globalThis.atob(b64);
|
|
79
|
+
const arr = new Uint8Array(bin.length);
|
|
80
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
81
|
+
arr[i] = bin.charCodeAt(i);
|
|
82
|
+
}
|
|
83
|
+
return arr;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function base64FromBytes(arr) {
|
|
87
|
+
if (globalThis.Buffer) {
|
|
88
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
89
|
+
} else {
|
|
90
|
+
const bin = [];
|
|
91
|
+
arr.forEach((byte) => {
|
|
92
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
93
|
+
});
|
|
94
|
+
return globalThis.btoa(bin.join(""));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function isSet(value) {
|
|
98
|
+
return value !== null && value !== void 0;
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
Any,
|
|
102
|
+
protobufPackage
|
|
103
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
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/google/protobuf/empty.ts
|
|
20
|
+
var empty_exports = {};
|
|
21
|
+
__export(empty_exports, {
|
|
22
|
+
Empty: () => Empty,
|
|
23
|
+
protobufPackage: () => protobufPackage
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(empty_exports);
|
|
26
|
+
var import_wire = require("@bufbuild/protobuf/wire");
|
|
27
|
+
var protobufPackage = "google.protobuf";
|
|
28
|
+
function createBaseEmpty() {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
var Empty = {
|
|
32
|
+
encode(_, writer = new import_wire.BinaryWriter()) {
|
|
33
|
+
return writer;
|
|
34
|
+
},
|
|
35
|
+
decode(input, length) {
|
|
36
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
37
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
38
|
+
const message = createBaseEmpty();
|
|
39
|
+
while (reader.pos < end) {
|
|
40
|
+
const tag = reader.uint32();
|
|
41
|
+
switch (tag >>> 3) {
|
|
42
|
+
}
|
|
43
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
reader.skip(tag & 7);
|
|
47
|
+
}
|
|
48
|
+
return message;
|
|
49
|
+
},
|
|
50
|
+
fromJSON(_) {
|
|
51
|
+
return {};
|
|
52
|
+
},
|
|
53
|
+
toJSON(_) {
|
|
54
|
+
const obj = {};
|
|
55
|
+
return obj;
|
|
56
|
+
},
|
|
57
|
+
create(base) {
|
|
58
|
+
return Empty.fromPartial(base ?? {});
|
|
59
|
+
},
|
|
60
|
+
fromPartial(_) {
|
|
61
|
+
const message = createBaseEmpty();
|
|
62
|
+
return message;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
Empty,
|
|
68
|
+
protobufPackage
|
|
69
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "google.protobuf";
|
|
4
|
+
interface Empty {
|
|
5
|
+
}
|
|
6
|
+
declare const Empty: MessageFns<Empty>;
|
|
7
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
8
|
+
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 {} ? {
|
|
9
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
10
|
+
} : Partial<T>;
|
|
11
|
+
interface MessageFns<T> {
|
|
12
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
13
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
14
|
+
fromJSON(object: any): T;
|
|
15
|
+
toJSON(message: T): unknown;
|
|
16
|
+
create(base?: DeepPartial<T>): T;
|
|
17
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { type DeepPartial, Empty, type MessageFns, protobufPackage };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "google.protobuf";
|
|
4
|
+
interface Empty {
|
|
5
|
+
}
|
|
6
|
+
declare const Empty: MessageFns<Empty>;
|
|
7
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
8
|
+
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 {} ? {
|
|
9
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
10
|
+
} : Partial<T>;
|
|
11
|
+
interface MessageFns<T> {
|
|
12
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
13
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
14
|
+
fromJSON(object: any): T;
|
|
15
|
+
toJSON(message: T): unknown;
|
|
16
|
+
create(base?: DeepPartial<T>): T;
|
|
17
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { type DeepPartial, Empty, type MessageFns, protobufPackage };
|
|
@@ -0,0 +1,469 @@
|
|
|
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/google/protobuf/struct.ts
|
|
20
|
+
var struct_exports = {};
|
|
21
|
+
__export(struct_exports, {
|
|
22
|
+
ListValue: () => ListValue,
|
|
23
|
+
NullValue: () => NullValue,
|
|
24
|
+
Struct: () => Struct,
|
|
25
|
+
Struct_FieldsEntry: () => Struct_FieldsEntry,
|
|
26
|
+
Value: () => Value,
|
|
27
|
+
nullValueFromJSON: () => nullValueFromJSON,
|
|
28
|
+
nullValueToJSON: () => nullValueToJSON,
|
|
29
|
+
protobufPackage: () => protobufPackage
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(struct_exports);
|
|
32
|
+
var import_wire = require("@bufbuild/protobuf/wire");
|
|
33
|
+
var protobufPackage = "google.protobuf";
|
|
34
|
+
var NullValue = /* @__PURE__ */ ((NullValue2) => {
|
|
35
|
+
NullValue2[NullValue2["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
36
|
+
NullValue2[NullValue2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
|
+
return NullValue2;
|
|
38
|
+
})(NullValue || {});
|
|
39
|
+
function nullValueFromJSON(object) {
|
|
40
|
+
switch (object) {
|
|
41
|
+
case 0:
|
|
42
|
+
case "NULL_VALUE":
|
|
43
|
+
return 0 /* NULL_VALUE */;
|
|
44
|
+
case -1:
|
|
45
|
+
case "UNRECOGNIZED":
|
|
46
|
+
default:
|
|
47
|
+
return -1 /* UNRECOGNIZED */;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function nullValueToJSON(object) {
|
|
51
|
+
switch (object) {
|
|
52
|
+
case 0 /* NULL_VALUE */:
|
|
53
|
+
return "NULL_VALUE";
|
|
54
|
+
case -1 /* UNRECOGNIZED */:
|
|
55
|
+
default:
|
|
56
|
+
return "UNRECOGNIZED";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function createBaseStruct() {
|
|
60
|
+
return { fields: {} };
|
|
61
|
+
}
|
|
62
|
+
var Struct = {
|
|
63
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
64
|
+
Object.entries(message.fields).forEach(([key, value]) => {
|
|
65
|
+
if (value !== void 0) {
|
|
66
|
+
Struct_FieldsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return writer;
|
|
70
|
+
},
|
|
71
|
+
decode(input, length) {
|
|
72
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
73
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
74
|
+
const message = createBaseStruct();
|
|
75
|
+
while (reader.pos < end) {
|
|
76
|
+
const tag = reader.uint32();
|
|
77
|
+
switch (tag >>> 3) {
|
|
78
|
+
case 1: {
|
|
79
|
+
if (tag !== 10) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
83
|
+
if (entry1.value !== void 0) {
|
|
84
|
+
message.fields[entry1.key] = entry1.value;
|
|
85
|
+
}
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
reader.skip(tag & 7);
|
|
93
|
+
}
|
|
94
|
+
return message;
|
|
95
|
+
},
|
|
96
|
+
fromJSON(object) {
|
|
97
|
+
return {
|
|
98
|
+
fields: isObject(object.fields) ? Object.entries(object.fields).reduce((acc, [key, value]) => {
|
|
99
|
+
acc[key] = value;
|
|
100
|
+
return acc;
|
|
101
|
+
}, {}) : {}
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
toJSON(message) {
|
|
105
|
+
const obj = {};
|
|
106
|
+
if (message.fields) {
|
|
107
|
+
const entries = Object.entries(message.fields);
|
|
108
|
+
if (entries.length > 0) {
|
|
109
|
+
obj.fields = {};
|
|
110
|
+
entries.forEach(([k, v]) => {
|
|
111
|
+
obj.fields[k] = v;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return obj;
|
|
116
|
+
},
|
|
117
|
+
create(base) {
|
|
118
|
+
return Struct.fromPartial(base ?? {});
|
|
119
|
+
},
|
|
120
|
+
fromPartial(object) {
|
|
121
|
+
const message = createBaseStruct();
|
|
122
|
+
message.fields = Object.entries(object.fields ?? {}).reduce(
|
|
123
|
+
(acc, [key, value]) => {
|
|
124
|
+
if (value !== void 0) {
|
|
125
|
+
acc[key] = value;
|
|
126
|
+
}
|
|
127
|
+
return acc;
|
|
128
|
+
},
|
|
129
|
+
{}
|
|
130
|
+
);
|
|
131
|
+
return message;
|
|
132
|
+
},
|
|
133
|
+
wrap(object) {
|
|
134
|
+
const struct = createBaseStruct();
|
|
135
|
+
if (object !== void 0) {
|
|
136
|
+
for (const key of Object.keys(object)) {
|
|
137
|
+
struct.fields[key] = object[key];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return struct;
|
|
141
|
+
},
|
|
142
|
+
unwrap(message) {
|
|
143
|
+
const object = {};
|
|
144
|
+
if (message.fields) {
|
|
145
|
+
for (const key of Object.keys(message.fields)) {
|
|
146
|
+
object[key] = message.fields[key];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return object;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
function createBaseStruct_FieldsEntry() {
|
|
153
|
+
return { key: "", value: void 0 };
|
|
154
|
+
}
|
|
155
|
+
var Struct_FieldsEntry = {
|
|
156
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
157
|
+
if (message.key !== "") {
|
|
158
|
+
writer.uint32(10).string(message.key);
|
|
159
|
+
}
|
|
160
|
+
if (message.value !== void 0) {
|
|
161
|
+
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
162
|
+
}
|
|
163
|
+
return writer;
|
|
164
|
+
},
|
|
165
|
+
decode(input, length) {
|
|
166
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
167
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
168
|
+
const message = createBaseStruct_FieldsEntry();
|
|
169
|
+
while (reader.pos < end) {
|
|
170
|
+
const tag = reader.uint32();
|
|
171
|
+
switch (tag >>> 3) {
|
|
172
|
+
case 1: {
|
|
173
|
+
if (tag !== 10) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
message.key = reader.string();
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
case 2: {
|
|
180
|
+
if (tag !== 18) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
reader.skip(tag & 7);
|
|
191
|
+
}
|
|
192
|
+
return message;
|
|
193
|
+
},
|
|
194
|
+
fromJSON(object) {
|
|
195
|
+
return {
|
|
196
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
197
|
+
value: isSet(object?.value) ? object.value : void 0
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
toJSON(message) {
|
|
201
|
+
const obj = {};
|
|
202
|
+
if (message.key !== "") {
|
|
203
|
+
obj.key = message.key;
|
|
204
|
+
}
|
|
205
|
+
if (message.value !== void 0) {
|
|
206
|
+
obj.value = message.value;
|
|
207
|
+
}
|
|
208
|
+
return obj;
|
|
209
|
+
},
|
|
210
|
+
create(base) {
|
|
211
|
+
return Struct_FieldsEntry.fromPartial(base ?? {});
|
|
212
|
+
},
|
|
213
|
+
fromPartial(object) {
|
|
214
|
+
const message = createBaseStruct_FieldsEntry();
|
|
215
|
+
message.key = object.key ?? "";
|
|
216
|
+
message.value = object.value ?? void 0;
|
|
217
|
+
return message;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
function createBaseValue() {
|
|
221
|
+
return {
|
|
222
|
+
nullValue: void 0,
|
|
223
|
+
numberValue: void 0,
|
|
224
|
+
stringValue: void 0,
|
|
225
|
+
boolValue: void 0,
|
|
226
|
+
structValue: void 0,
|
|
227
|
+
listValue: void 0
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
var Value = {
|
|
231
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
232
|
+
if (message.nullValue !== void 0) {
|
|
233
|
+
writer.uint32(8).int32(message.nullValue);
|
|
234
|
+
}
|
|
235
|
+
if (message.numberValue !== void 0) {
|
|
236
|
+
writer.uint32(17).double(message.numberValue);
|
|
237
|
+
}
|
|
238
|
+
if (message.stringValue !== void 0) {
|
|
239
|
+
writer.uint32(26).string(message.stringValue);
|
|
240
|
+
}
|
|
241
|
+
if (message.boolValue !== void 0) {
|
|
242
|
+
writer.uint32(32).bool(message.boolValue);
|
|
243
|
+
}
|
|
244
|
+
if (message.structValue !== void 0) {
|
|
245
|
+
Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
|
|
246
|
+
}
|
|
247
|
+
if (message.listValue !== void 0) {
|
|
248
|
+
ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
|
|
249
|
+
}
|
|
250
|
+
return writer;
|
|
251
|
+
},
|
|
252
|
+
decode(input, length) {
|
|
253
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
254
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
255
|
+
const message = createBaseValue();
|
|
256
|
+
while (reader.pos < end) {
|
|
257
|
+
const tag = reader.uint32();
|
|
258
|
+
switch (tag >>> 3) {
|
|
259
|
+
case 1: {
|
|
260
|
+
if (tag !== 8) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.nullValue = reader.int32();
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
case 2: {
|
|
267
|
+
if (tag !== 17) {
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
message.numberValue = reader.double();
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
case 3: {
|
|
274
|
+
if (tag !== 26) {
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
message.stringValue = reader.string();
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
case 4: {
|
|
281
|
+
if (tag !== 32) {
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
message.boolValue = reader.bool();
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
case 5: {
|
|
288
|
+
if (tag !== 42) {
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
case 6: {
|
|
295
|
+
if (tag !== 50) {
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
reader.skip(tag & 7);
|
|
306
|
+
}
|
|
307
|
+
return message;
|
|
308
|
+
},
|
|
309
|
+
fromJSON(object) {
|
|
310
|
+
return {
|
|
311
|
+
nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : void 0,
|
|
312
|
+
numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : void 0,
|
|
313
|
+
stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : void 0,
|
|
314
|
+
boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : void 0,
|
|
315
|
+
structValue: isObject(object.structValue) ? object.structValue : void 0,
|
|
316
|
+
listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : void 0
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
toJSON(message) {
|
|
320
|
+
const obj = {};
|
|
321
|
+
if (message.nullValue !== void 0) {
|
|
322
|
+
obj.nullValue = nullValueToJSON(message.nullValue);
|
|
323
|
+
}
|
|
324
|
+
if (message.numberValue !== void 0) {
|
|
325
|
+
obj.numberValue = message.numberValue;
|
|
326
|
+
}
|
|
327
|
+
if (message.stringValue !== void 0) {
|
|
328
|
+
obj.stringValue = message.stringValue;
|
|
329
|
+
}
|
|
330
|
+
if (message.boolValue !== void 0) {
|
|
331
|
+
obj.boolValue = message.boolValue;
|
|
332
|
+
}
|
|
333
|
+
if (message.structValue !== void 0) {
|
|
334
|
+
obj.structValue = message.structValue;
|
|
335
|
+
}
|
|
336
|
+
if (message.listValue !== void 0) {
|
|
337
|
+
obj.listValue = message.listValue;
|
|
338
|
+
}
|
|
339
|
+
return obj;
|
|
340
|
+
},
|
|
341
|
+
create(base) {
|
|
342
|
+
return Value.fromPartial(base ?? {});
|
|
343
|
+
},
|
|
344
|
+
fromPartial(object) {
|
|
345
|
+
const message = createBaseValue();
|
|
346
|
+
message.nullValue = object.nullValue ?? void 0;
|
|
347
|
+
message.numberValue = object.numberValue ?? void 0;
|
|
348
|
+
message.stringValue = object.stringValue ?? void 0;
|
|
349
|
+
message.boolValue = object.boolValue ?? void 0;
|
|
350
|
+
message.structValue = object.structValue ?? void 0;
|
|
351
|
+
message.listValue = object.listValue ?? void 0;
|
|
352
|
+
return message;
|
|
353
|
+
},
|
|
354
|
+
wrap(value) {
|
|
355
|
+
const result = createBaseValue();
|
|
356
|
+
if (value === null) {
|
|
357
|
+
result.nullValue = 0 /* NULL_VALUE */;
|
|
358
|
+
} else if (typeof value === "boolean") {
|
|
359
|
+
result.boolValue = value;
|
|
360
|
+
} else if (typeof value === "number") {
|
|
361
|
+
result.numberValue = value;
|
|
362
|
+
} else if (typeof value === "string") {
|
|
363
|
+
result.stringValue = value;
|
|
364
|
+
} else if (globalThis.Array.isArray(value)) {
|
|
365
|
+
result.listValue = value;
|
|
366
|
+
} else if (typeof value === "object") {
|
|
367
|
+
result.structValue = value;
|
|
368
|
+
} else if (typeof value !== "undefined") {
|
|
369
|
+
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
370
|
+
}
|
|
371
|
+
return result;
|
|
372
|
+
},
|
|
373
|
+
unwrap(message) {
|
|
374
|
+
if (message.stringValue !== void 0) {
|
|
375
|
+
return message.stringValue;
|
|
376
|
+
} else if (message?.numberValue !== void 0) {
|
|
377
|
+
return message.numberValue;
|
|
378
|
+
} else if (message?.boolValue !== void 0) {
|
|
379
|
+
return message.boolValue;
|
|
380
|
+
} else if (message?.structValue !== void 0) {
|
|
381
|
+
return message.structValue;
|
|
382
|
+
} else if (message?.listValue !== void 0) {
|
|
383
|
+
return message.listValue;
|
|
384
|
+
} else if (message?.nullValue !== void 0) {
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
return void 0;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
function createBaseListValue() {
|
|
391
|
+
return { values: [] };
|
|
392
|
+
}
|
|
393
|
+
var ListValue = {
|
|
394
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
395
|
+
for (const v of message.values) {
|
|
396
|
+
Value.encode(Value.wrap(v), writer.uint32(10).fork()).join();
|
|
397
|
+
}
|
|
398
|
+
return writer;
|
|
399
|
+
},
|
|
400
|
+
decode(input, length) {
|
|
401
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
402
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
403
|
+
const message = createBaseListValue();
|
|
404
|
+
while (reader.pos < end) {
|
|
405
|
+
const tag = reader.uint32();
|
|
406
|
+
switch (tag >>> 3) {
|
|
407
|
+
case 1: {
|
|
408
|
+
if (tag !== 10) {
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
reader.skip(tag & 7);
|
|
419
|
+
}
|
|
420
|
+
return message;
|
|
421
|
+
},
|
|
422
|
+
fromJSON(object) {
|
|
423
|
+
return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
|
|
424
|
+
},
|
|
425
|
+
toJSON(message) {
|
|
426
|
+
const obj = {};
|
|
427
|
+
if (message.values?.length) {
|
|
428
|
+
obj.values = message.values;
|
|
429
|
+
}
|
|
430
|
+
return obj;
|
|
431
|
+
},
|
|
432
|
+
create(base) {
|
|
433
|
+
return ListValue.fromPartial(base ?? {});
|
|
434
|
+
},
|
|
435
|
+
fromPartial(object) {
|
|
436
|
+
const message = createBaseListValue();
|
|
437
|
+
message.values = object.values?.map((e) => e) || [];
|
|
438
|
+
return message;
|
|
439
|
+
},
|
|
440
|
+
wrap(array) {
|
|
441
|
+
const result = createBaseListValue();
|
|
442
|
+
result.values = array ?? [];
|
|
443
|
+
return result;
|
|
444
|
+
},
|
|
445
|
+
unwrap(message) {
|
|
446
|
+
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
|
|
447
|
+
return message.values;
|
|
448
|
+
} else {
|
|
449
|
+
return message;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
function isObject(value) {
|
|
454
|
+
return typeof value === "object" && value !== null;
|
|
455
|
+
}
|
|
456
|
+
function isSet(value) {
|
|
457
|
+
return value !== null && value !== void 0;
|
|
458
|
+
}
|
|
459
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
460
|
+
0 && (module.exports = {
|
|
461
|
+
ListValue,
|
|
462
|
+
NullValue,
|
|
463
|
+
Struct,
|
|
464
|
+
Struct_FieldsEntry,
|
|
465
|
+
Value,
|
|
466
|
+
nullValueFromJSON,
|
|
467
|
+
nullValueToJSON,
|
|
468
|
+
protobufPackage
|
|
469
|
+
});
|