@ekhein/lamda-node-sdk 1.0.3 → 2.0.1
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/src/constants/activity.flag.d.ts +22 -0
- package/dist/src/constants/activity.flag.js +22 -0
- package/dist/src/constants/android.intent.d.ts +56 -0
- package/dist/src/constants/android.intent.js +56 -0
- package/dist/src/constants/android.permission.d.ts +30 -0
- package/dist/src/constants/android.permission.js +30 -0
- package/dist/src/constants/index.d.ts +3 -0
- package/dist/src/constants/index.js +3 -0
- package/dist/src/decorators/inject.decorator.d.ts +2 -0
- package/dist/src/decorators/inject.decorator.js +15 -0
- package/dist/src/exceptions/remoteCall.exception.d.ts +7 -0
- package/dist/src/exceptions/remoteCall.exception.js +12 -0
- package/dist/src/exceptions/timeout.exception.d.ts +4 -0
- package/dist/src/exceptions/timeout.exception.js +6 -0
- package/dist/src/interceptor/remoteException.Interceptor.d.ts +2 -0
- package/dist/src/interceptor/remoteException.Interceptor.js +13 -0
- package/dist/{main.d.ts → src/main.d.ts} +9 -21
- package/dist/src/main.js +135 -0
- package/dist/src/rpc/application.d.ts +136 -0
- package/dist/src/rpc/application.js +1537 -0
- package/dist/src/rpc/debug.d.ts +19 -0
- package/dist/src/rpc/debug.js +56 -0
- package/dist/{rpc → src/rpc}/file.d.ts +11 -13
- package/dist/src/rpc/file.js +373 -0
- package/dist/src/rpc/google/protobuf/any.d.ts +20 -0
- package/dist/src/rpc/google/protobuf/any.js +98 -0
- package/dist/src/rpc/google/protobuf/empty.d.ts +18 -0
- package/dist/src/rpc/google/protobuf/empty.js +39 -0
- package/dist/{rpc → src/rpc}/google/protobuf/struct.d.ts +19 -21
- package/dist/src/rpc/google/protobuf/struct.js +438 -0
- package/dist/src/rpc/policy.d.ts +22 -0
- package/dist/src/rpc/policy.js +103 -0
- package/dist/src/rpc/proxy.d.ts +106 -0
- package/dist/src/rpc/proxy.js +774 -0
- package/dist/{rpc → src/rpc}/services.d.ts +421 -424
- package/dist/src/rpc/services.js +1493 -0
- package/dist/src/rpc/settings.d.ts +29 -0
- package/dist/src/rpc/settings.js +125 -0
- package/dist/src/rpc/shell.d.ts +34 -0
- package/dist/src/rpc/shell.js +294 -0
- package/dist/{rpc → src/rpc}/status.d.ts +17 -19
- package/dist/src/rpc/status.js +896 -0
- package/dist/src/rpc/storage.d.ts +22 -0
- package/dist/src/rpc/storage.js +128 -0
- package/dist/src/rpc/types.d.ts +34 -0
- package/dist/src/rpc/types.js +281 -0
- package/dist/{rpc → src/rpc}/uiautomator.d.ts +87 -89
- package/dist/src/rpc/uiautomator.js +5350 -0
- package/dist/src/rpc/util.d.ts +101 -0
- package/dist/src/rpc/util.js +1158 -0
- package/dist/{rpc → src/rpc}/wifi.d.ts +23 -25
- package/dist/src/rpc/wifi.js +971 -0
- package/package.json +5 -10
- package/dist/chunk-3JBDAA2H.js +0 -439
- package/dist/chunk-4AHM55IO.js +0 -1172
- package/dist/chunk-4NKGYNMS.js +0 -116
- package/dist/chunk-6HD35RPW.js +0 -5370
- package/dist/chunk-76Y3OVVH.js +0 -1602
- package/dist/chunk-7XF22HAW.js +0 -907
- package/dist/chunk-7YGA6EOV.js +0 -109
- package/dist/chunk-ADS4GRIL.js +0 -14
- package/dist/chunk-FSLE4VGI.js +0 -48
- package/dist/chunk-H7Z6XFBF.js +0 -134
- package/dist/chunk-KJKSI2WL.js +0 -62
- package/dist/chunk-O52JGDU7.js +0 -800
- package/dist/chunk-ORXTTWPB.js +0 -379
- package/dist/chunk-OZJH6SR7.js +0 -20
- package/dist/chunk-P53F45YO.js +0 -64
- package/dist/chunk-QXMPY6EE.js +0 -289
- package/dist/chunk-SBFKX3ZY.js +0 -1554
- package/dist/chunk-WFQEBPE6.js +0 -300
- package/dist/chunk-X4LTH2UN.js +0 -983
- package/dist/chunk-XAX5BZL3.js +0 -132
- package/dist/chunk-ZXF5DGTC.js +0 -45
- package/dist/constants/activity.flag.cjs +0 -92
- package/dist/constants/activity.flag.d.cts +0 -24
- package/dist/constants/activity.flag.d.ts +0 -24
- package/dist/constants/activity.flag.js +0 -49
- package/dist/constants/android.intent.cjs +0 -194
- package/dist/constants/android.intent.d.cts +0 -58
- package/dist/constants/android.intent.d.ts +0 -58
- package/dist/constants/android.intent.js +0 -117
- package/dist/constants/android.permission.cjs +0 -116
- package/dist/constants/android.permission.d.cts +0 -32
- package/dist/constants/android.permission.d.ts +0 -32
- package/dist/constants/android.permission.js +0 -65
- package/dist/constants/index.cjs +0 -356
- package/dist/constants/index.d.cts +0 -3
- package/dist/constants/index.d.ts +0 -3
- package/dist/constants/index.js +0 -225
- package/dist/decorators/inject.decorator.cjs +0 -43
- package/dist/decorators/inject.decorator.d.cts +0 -5
- package/dist/decorators/inject.decorator.d.ts +0 -5
- package/dist/decorators/inject.decorator.js +0 -7
- package/dist/main.cjs +0 -11969
- package/dist/main.d.cts +0 -37
- package/dist/main.js +0 -112
- package/dist/rpc/application.cjs +0 -2019
- package/dist/rpc/application.d.cts +0 -138
- package/dist/rpc/application.d.ts +0 -138
- package/dist/rpc/application.js +0 -50
- package/dist/rpc/debug.cjs +0 -86
- package/dist/rpc/debug.d.cts +0 -21
- package/dist/rpc/debug.d.ts +0 -21
- package/dist/rpc/debug.js +0 -9
- package/dist/rpc/file.cjs +0 -405
- package/dist/rpc/file.d.cts +0 -40
- package/dist/rpc/file.js +0 -13
- package/dist/rpc/google/protobuf/any.cjs +0 -126
- package/dist/rpc/google/protobuf/any.d.cts +0 -22
- package/dist/rpc/google/protobuf/any.d.ts +0 -22
- package/dist/rpc/google/protobuf/any.js +0 -103
- package/dist/rpc/google/protobuf/empty.cjs +0 -69
- package/dist/rpc/google/protobuf/empty.d.cts +0 -20
- package/dist/rpc/google/protobuf/empty.d.ts +0 -20
- package/dist/rpc/google/protobuf/empty.js +0 -9
- package/dist/rpc/google/protobuf/struct.cjs +0 -469
- package/dist/rpc/google/protobuf/struct.d.cts +0 -65
- package/dist/rpc/google/protobuf/struct.js +0 -21
- package/dist/rpc/policy.cjs +0 -133
- package/dist/rpc/policy.d.cts +0 -24
- package/dist/rpc/policy.d.ts +0 -24
- package/dist/rpc/policy.js +0 -9
- package/dist/rpc/proxy.cjs +0 -1109
- package/dist/rpc/proxy.d.cts +0 -108
- package/dist/rpc/proxy.d.ts +0 -108
- package/dist/rpc/proxy.js +0 -49
- package/dist/rpc/services.cjs +0 -11898
- package/dist/rpc/services.d.cts +0 -1920
- package/dist/rpc/services.js +0 -48
- package/dist/rpc/settings.cjs +0 -161
- package/dist/rpc/settings.d.cts +0 -31
- package/dist/rpc/settings.d.ts +0 -31
- package/dist/rpc/settings.js +0 -15
- package/dist/rpc/shell.cjs +0 -326
- package/dist/rpc/shell.d.cts +0 -36
- package/dist/rpc/shell.d.ts +0 -36
- package/dist/rpc/shell.js +0 -13
- package/dist/rpc/status.cjs +0 -936
- package/dist/rpc/status.d.cts +0 -76
- package/dist/rpc/status.js +0 -19
- package/dist/rpc/storage.cjs +0 -156
- package/dist/rpc/storage.d.cts +0 -24
- package/dist/rpc/storage.d.ts +0 -24
- package/dist/rpc/storage.js +0 -9
- package/dist/rpc/types.cjs +0 -317
- package/dist/rpc/types.d.cts +0 -36
- package/dist/rpc/types.d.ts +0 -36
- package/dist/rpc/types.js +0 -17
- package/dist/rpc/uiautomator.cjs +0 -5446
- package/dist/rpc/uiautomator.d.cts +0 -618
- package/dist/rpc/uiautomator.js +0 -113
- package/dist/rpc/util.cjs +0 -1212
- package/dist/rpc/util.d.cts +0 -103
- package/dist/rpc/util.d.ts +0 -103
- package/dist/rpc/util.js +0 -41
- package/dist/rpc/wifi.cjs +0 -1015
- package/dist/rpc/wifi.d.cts +0 -84
- package/dist/rpc/wifi.js +0 -25
package/package.json
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekhein/lamda-node-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"author": "ekhein",
|
|
5
6
|
"license": "MIT",
|
|
6
|
-
"main": "./dist/main.
|
|
7
|
-
"module": "./dist/main.js",
|
|
7
|
+
"main": "./dist/main.js",
|
|
8
8
|
"types": "./dist/main.d.ts",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist
|
|
10
|
+
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "
|
|
14
|
-
"watch": "pnpm build --watch src",
|
|
15
|
-
"dev": "tsx example/index.ts"
|
|
13
|
+
"build": "tsc"
|
|
16
14
|
},
|
|
17
|
-
"author": "ekhein",
|
|
18
|
-
"description": "",
|
|
19
15
|
"engines": {
|
|
20
16
|
"node": ">=18.0.0"
|
|
21
17
|
},
|
|
@@ -29,7 +25,6 @@
|
|
|
29
25
|
"devDependencies": {
|
|
30
26
|
"protoc-gen-ts": "^0.8.7",
|
|
31
27
|
"ts-proto": "^2.7.0",
|
|
32
|
-
"tsup": "^8.5.0",
|
|
33
28
|
"tsx": "^4.19.4",
|
|
34
29
|
"typescript": "^5.8.3"
|
|
35
30
|
}
|
package/dist/chunk-3JBDAA2H.js
DELETED
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
// src/rpc/google/protobuf/struct.ts
|
|
2
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
|
-
var protobufPackage = "google.protobuf";
|
|
4
|
-
var NullValue = /* @__PURE__ */ ((NullValue2) => {
|
|
5
|
-
NullValue2[NullValue2["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
6
|
-
NullValue2[NullValue2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
7
|
-
return NullValue2;
|
|
8
|
-
})(NullValue || {});
|
|
9
|
-
function nullValueFromJSON(object) {
|
|
10
|
-
switch (object) {
|
|
11
|
-
case 0:
|
|
12
|
-
case "NULL_VALUE":
|
|
13
|
-
return 0 /* NULL_VALUE */;
|
|
14
|
-
case -1:
|
|
15
|
-
case "UNRECOGNIZED":
|
|
16
|
-
default:
|
|
17
|
-
return -1 /* UNRECOGNIZED */;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function nullValueToJSON(object) {
|
|
21
|
-
switch (object) {
|
|
22
|
-
case 0 /* NULL_VALUE */:
|
|
23
|
-
return "NULL_VALUE";
|
|
24
|
-
case -1 /* UNRECOGNIZED */:
|
|
25
|
-
default:
|
|
26
|
-
return "UNRECOGNIZED";
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function createBaseStruct() {
|
|
30
|
-
return { fields: {} };
|
|
31
|
-
}
|
|
32
|
-
var Struct = {
|
|
33
|
-
encode(message, writer = new BinaryWriter()) {
|
|
34
|
-
Object.entries(message.fields).forEach(([key, value]) => {
|
|
35
|
-
if (value !== void 0) {
|
|
36
|
-
Struct_FieldsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return writer;
|
|
40
|
-
},
|
|
41
|
-
decode(input, length) {
|
|
42
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
43
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
44
|
-
const message = createBaseStruct();
|
|
45
|
-
while (reader.pos < end) {
|
|
46
|
-
const tag = reader.uint32();
|
|
47
|
-
switch (tag >>> 3) {
|
|
48
|
-
case 1: {
|
|
49
|
-
if (tag !== 10) {
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
53
|
-
if (entry1.value !== void 0) {
|
|
54
|
-
message.fields[entry1.key] = entry1.value;
|
|
55
|
-
}
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
reader.skip(tag & 7);
|
|
63
|
-
}
|
|
64
|
-
return message;
|
|
65
|
-
},
|
|
66
|
-
fromJSON(object) {
|
|
67
|
-
return {
|
|
68
|
-
fields: isObject(object.fields) ? Object.entries(object.fields).reduce((acc, [key, value]) => {
|
|
69
|
-
acc[key] = value;
|
|
70
|
-
return acc;
|
|
71
|
-
}, {}) : {}
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
toJSON(message) {
|
|
75
|
-
const obj = {};
|
|
76
|
-
if (message.fields) {
|
|
77
|
-
const entries = Object.entries(message.fields);
|
|
78
|
-
if (entries.length > 0) {
|
|
79
|
-
obj.fields = {};
|
|
80
|
-
entries.forEach(([k, v]) => {
|
|
81
|
-
obj.fields[k] = v;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return obj;
|
|
86
|
-
},
|
|
87
|
-
create(base) {
|
|
88
|
-
return Struct.fromPartial(base ?? {});
|
|
89
|
-
},
|
|
90
|
-
fromPartial(object) {
|
|
91
|
-
const message = createBaseStruct();
|
|
92
|
-
message.fields = Object.entries(object.fields ?? {}).reduce(
|
|
93
|
-
(acc, [key, value]) => {
|
|
94
|
-
if (value !== void 0) {
|
|
95
|
-
acc[key] = value;
|
|
96
|
-
}
|
|
97
|
-
return acc;
|
|
98
|
-
},
|
|
99
|
-
{}
|
|
100
|
-
);
|
|
101
|
-
return message;
|
|
102
|
-
},
|
|
103
|
-
wrap(object) {
|
|
104
|
-
const struct = createBaseStruct();
|
|
105
|
-
if (object !== void 0) {
|
|
106
|
-
for (const key of Object.keys(object)) {
|
|
107
|
-
struct.fields[key] = object[key];
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return struct;
|
|
111
|
-
},
|
|
112
|
-
unwrap(message) {
|
|
113
|
-
const object = {};
|
|
114
|
-
if (message.fields) {
|
|
115
|
-
for (const key of Object.keys(message.fields)) {
|
|
116
|
-
object[key] = message.fields[key];
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return object;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
function createBaseStruct_FieldsEntry() {
|
|
123
|
-
return { key: "", value: void 0 };
|
|
124
|
-
}
|
|
125
|
-
var Struct_FieldsEntry = {
|
|
126
|
-
encode(message, writer = new BinaryWriter()) {
|
|
127
|
-
if (message.key !== "") {
|
|
128
|
-
writer.uint32(10).string(message.key);
|
|
129
|
-
}
|
|
130
|
-
if (message.value !== void 0) {
|
|
131
|
-
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
132
|
-
}
|
|
133
|
-
return writer;
|
|
134
|
-
},
|
|
135
|
-
decode(input, length) {
|
|
136
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
137
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
138
|
-
const message = createBaseStruct_FieldsEntry();
|
|
139
|
-
while (reader.pos < end) {
|
|
140
|
-
const tag = reader.uint32();
|
|
141
|
-
switch (tag >>> 3) {
|
|
142
|
-
case 1: {
|
|
143
|
-
if (tag !== 10) {
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
message.key = reader.string();
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
case 2: {
|
|
150
|
-
if (tag !== 18) {
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
reader.skip(tag & 7);
|
|
161
|
-
}
|
|
162
|
-
return message;
|
|
163
|
-
},
|
|
164
|
-
fromJSON(object) {
|
|
165
|
-
return {
|
|
166
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
167
|
-
value: isSet(object?.value) ? object.value : void 0
|
|
168
|
-
};
|
|
169
|
-
},
|
|
170
|
-
toJSON(message) {
|
|
171
|
-
const obj = {};
|
|
172
|
-
if (message.key !== "") {
|
|
173
|
-
obj.key = message.key;
|
|
174
|
-
}
|
|
175
|
-
if (message.value !== void 0) {
|
|
176
|
-
obj.value = message.value;
|
|
177
|
-
}
|
|
178
|
-
return obj;
|
|
179
|
-
},
|
|
180
|
-
create(base) {
|
|
181
|
-
return Struct_FieldsEntry.fromPartial(base ?? {});
|
|
182
|
-
},
|
|
183
|
-
fromPartial(object) {
|
|
184
|
-
const message = createBaseStruct_FieldsEntry();
|
|
185
|
-
message.key = object.key ?? "";
|
|
186
|
-
message.value = object.value ?? void 0;
|
|
187
|
-
return message;
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
function createBaseValue() {
|
|
191
|
-
return {
|
|
192
|
-
nullValue: void 0,
|
|
193
|
-
numberValue: void 0,
|
|
194
|
-
stringValue: void 0,
|
|
195
|
-
boolValue: void 0,
|
|
196
|
-
structValue: void 0,
|
|
197
|
-
listValue: void 0
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
var Value = {
|
|
201
|
-
encode(message, writer = new BinaryWriter()) {
|
|
202
|
-
if (message.nullValue !== void 0) {
|
|
203
|
-
writer.uint32(8).int32(message.nullValue);
|
|
204
|
-
}
|
|
205
|
-
if (message.numberValue !== void 0) {
|
|
206
|
-
writer.uint32(17).double(message.numberValue);
|
|
207
|
-
}
|
|
208
|
-
if (message.stringValue !== void 0) {
|
|
209
|
-
writer.uint32(26).string(message.stringValue);
|
|
210
|
-
}
|
|
211
|
-
if (message.boolValue !== void 0) {
|
|
212
|
-
writer.uint32(32).bool(message.boolValue);
|
|
213
|
-
}
|
|
214
|
-
if (message.structValue !== void 0) {
|
|
215
|
-
Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
|
|
216
|
-
}
|
|
217
|
-
if (message.listValue !== void 0) {
|
|
218
|
-
ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
|
|
219
|
-
}
|
|
220
|
-
return writer;
|
|
221
|
-
},
|
|
222
|
-
decode(input, length) {
|
|
223
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
224
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
225
|
-
const message = createBaseValue();
|
|
226
|
-
while (reader.pos < end) {
|
|
227
|
-
const tag = reader.uint32();
|
|
228
|
-
switch (tag >>> 3) {
|
|
229
|
-
case 1: {
|
|
230
|
-
if (tag !== 8) {
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
message.nullValue = reader.int32();
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
case 2: {
|
|
237
|
-
if (tag !== 17) {
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
message.numberValue = reader.double();
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
case 3: {
|
|
244
|
-
if (tag !== 26) {
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
message.stringValue = reader.string();
|
|
248
|
-
continue;
|
|
249
|
-
}
|
|
250
|
-
case 4: {
|
|
251
|
-
if (tag !== 32) {
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
message.boolValue = reader.bool();
|
|
255
|
-
continue;
|
|
256
|
-
}
|
|
257
|
-
case 5: {
|
|
258
|
-
if (tag !== 42) {
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
262
|
-
continue;
|
|
263
|
-
}
|
|
264
|
-
case 6: {
|
|
265
|
-
if (tag !== 50) {
|
|
266
|
-
break;
|
|
267
|
-
}
|
|
268
|
-
message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
reader.skip(tag & 7);
|
|
276
|
-
}
|
|
277
|
-
return message;
|
|
278
|
-
},
|
|
279
|
-
fromJSON(object) {
|
|
280
|
-
return {
|
|
281
|
-
nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : void 0,
|
|
282
|
-
numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : void 0,
|
|
283
|
-
stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : void 0,
|
|
284
|
-
boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : void 0,
|
|
285
|
-
structValue: isObject(object.structValue) ? object.structValue : void 0,
|
|
286
|
-
listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : void 0
|
|
287
|
-
};
|
|
288
|
-
},
|
|
289
|
-
toJSON(message) {
|
|
290
|
-
const obj = {};
|
|
291
|
-
if (message.nullValue !== void 0) {
|
|
292
|
-
obj.nullValue = nullValueToJSON(message.nullValue);
|
|
293
|
-
}
|
|
294
|
-
if (message.numberValue !== void 0) {
|
|
295
|
-
obj.numberValue = message.numberValue;
|
|
296
|
-
}
|
|
297
|
-
if (message.stringValue !== void 0) {
|
|
298
|
-
obj.stringValue = message.stringValue;
|
|
299
|
-
}
|
|
300
|
-
if (message.boolValue !== void 0) {
|
|
301
|
-
obj.boolValue = message.boolValue;
|
|
302
|
-
}
|
|
303
|
-
if (message.structValue !== void 0) {
|
|
304
|
-
obj.structValue = message.structValue;
|
|
305
|
-
}
|
|
306
|
-
if (message.listValue !== void 0) {
|
|
307
|
-
obj.listValue = message.listValue;
|
|
308
|
-
}
|
|
309
|
-
return obj;
|
|
310
|
-
},
|
|
311
|
-
create(base) {
|
|
312
|
-
return Value.fromPartial(base ?? {});
|
|
313
|
-
},
|
|
314
|
-
fromPartial(object) {
|
|
315
|
-
const message = createBaseValue();
|
|
316
|
-
message.nullValue = object.nullValue ?? void 0;
|
|
317
|
-
message.numberValue = object.numberValue ?? void 0;
|
|
318
|
-
message.stringValue = object.stringValue ?? void 0;
|
|
319
|
-
message.boolValue = object.boolValue ?? void 0;
|
|
320
|
-
message.structValue = object.structValue ?? void 0;
|
|
321
|
-
message.listValue = object.listValue ?? void 0;
|
|
322
|
-
return message;
|
|
323
|
-
},
|
|
324
|
-
wrap(value) {
|
|
325
|
-
const result = createBaseValue();
|
|
326
|
-
if (value === null) {
|
|
327
|
-
result.nullValue = 0 /* NULL_VALUE */;
|
|
328
|
-
} else if (typeof value === "boolean") {
|
|
329
|
-
result.boolValue = value;
|
|
330
|
-
} else if (typeof value === "number") {
|
|
331
|
-
result.numberValue = value;
|
|
332
|
-
} else if (typeof value === "string") {
|
|
333
|
-
result.stringValue = value;
|
|
334
|
-
} else if (globalThis.Array.isArray(value)) {
|
|
335
|
-
result.listValue = value;
|
|
336
|
-
} else if (typeof value === "object") {
|
|
337
|
-
result.structValue = value;
|
|
338
|
-
} else if (typeof value !== "undefined") {
|
|
339
|
-
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
340
|
-
}
|
|
341
|
-
return result;
|
|
342
|
-
},
|
|
343
|
-
unwrap(message) {
|
|
344
|
-
if (message.stringValue !== void 0) {
|
|
345
|
-
return message.stringValue;
|
|
346
|
-
} else if (message?.numberValue !== void 0) {
|
|
347
|
-
return message.numberValue;
|
|
348
|
-
} else if (message?.boolValue !== void 0) {
|
|
349
|
-
return message.boolValue;
|
|
350
|
-
} else if (message?.structValue !== void 0) {
|
|
351
|
-
return message.structValue;
|
|
352
|
-
} else if (message?.listValue !== void 0) {
|
|
353
|
-
return message.listValue;
|
|
354
|
-
} else if (message?.nullValue !== void 0) {
|
|
355
|
-
return null;
|
|
356
|
-
}
|
|
357
|
-
return void 0;
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
function createBaseListValue() {
|
|
361
|
-
return { values: [] };
|
|
362
|
-
}
|
|
363
|
-
var ListValue = {
|
|
364
|
-
encode(message, writer = new BinaryWriter()) {
|
|
365
|
-
for (const v of message.values) {
|
|
366
|
-
Value.encode(Value.wrap(v), writer.uint32(10).fork()).join();
|
|
367
|
-
}
|
|
368
|
-
return writer;
|
|
369
|
-
},
|
|
370
|
-
decode(input, length) {
|
|
371
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
372
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
373
|
-
const message = createBaseListValue();
|
|
374
|
-
while (reader.pos < end) {
|
|
375
|
-
const tag = reader.uint32();
|
|
376
|
-
switch (tag >>> 3) {
|
|
377
|
-
case 1: {
|
|
378
|
-
if (tag !== 10) {
|
|
379
|
-
break;
|
|
380
|
-
}
|
|
381
|
-
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
|
382
|
-
continue;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
386
|
-
break;
|
|
387
|
-
}
|
|
388
|
-
reader.skip(tag & 7);
|
|
389
|
-
}
|
|
390
|
-
return message;
|
|
391
|
-
},
|
|
392
|
-
fromJSON(object) {
|
|
393
|
-
return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
|
|
394
|
-
},
|
|
395
|
-
toJSON(message) {
|
|
396
|
-
const obj = {};
|
|
397
|
-
if (message.values?.length) {
|
|
398
|
-
obj.values = message.values;
|
|
399
|
-
}
|
|
400
|
-
return obj;
|
|
401
|
-
},
|
|
402
|
-
create(base) {
|
|
403
|
-
return ListValue.fromPartial(base ?? {});
|
|
404
|
-
},
|
|
405
|
-
fromPartial(object) {
|
|
406
|
-
const message = createBaseListValue();
|
|
407
|
-
message.values = object.values?.map((e) => e) || [];
|
|
408
|
-
return message;
|
|
409
|
-
},
|
|
410
|
-
wrap(array) {
|
|
411
|
-
const result = createBaseListValue();
|
|
412
|
-
result.values = array ?? [];
|
|
413
|
-
return result;
|
|
414
|
-
},
|
|
415
|
-
unwrap(message) {
|
|
416
|
-
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
|
|
417
|
-
return message.values;
|
|
418
|
-
} else {
|
|
419
|
-
return message;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
function isObject(value) {
|
|
424
|
-
return typeof value === "object" && value !== null;
|
|
425
|
-
}
|
|
426
|
-
function isSet(value) {
|
|
427
|
-
return value !== null && value !== void 0;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export {
|
|
431
|
-
protobufPackage,
|
|
432
|
-
NullValue,
|
|
433
|
-
nullValueFromJSON,
|
|
434
|
-
nullValueToJSON,
|
|
435
|
-
Struct,
|
|
436
|
-
Struct_FieldsEntry,
|
|
437
|
-
Value,
|
|
438
|
-
ListValue
|
|
439
|
-
};
|