@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,289 @@
|
|
|
1
|
+
// src/rpc/types.ts
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
|
+
var protobufPackage = "lamda.rpc";
|
|
4
|
+
function createBaseBoolean() {
|
|
5
|
+
return { value: false };
|
|
6
|
+
}
|
|
7
|
+
var Boolean = {
|
|
8
|
+
encode(message, writer = new BinaryWriter()) {
|
|
9
|
+
if (message.value !== false) {
|
|
10
|
+
writer.uint32(8).bool(message.value);
|
|
11
|
+
}
|
|
12
|
+
return writer;
|
|
13
|
+
},
|
|
14
|
+
decode(input, length) {
|
|
15
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
16
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
17
|
+
const message = createBaseBoolean();
|
|
18
|
+
while (reader.pos < end) {
|
|
19
|
+
const tag = reader.uint32();
|
|
20
|
+
switch (tag >>> 3) {
|
|
21
|
+
case 1: {
|
|
22
|
+
if (tag !== 8) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
message.value = reader.bool();
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
reader.skip(tag & 7);
|
|
33
|
+
}
|
|
34
|
+
return message;
|
|
35
|
+
},
|
|
36
|
+
fromJSON(object) {
|
|
37
|
+
return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
|
|
38
|
+
},
|
|
39
|
+
toJSON(message) {
|
|
40
|
+
const obj = {};
|
|
41
|
+
if (message.value !== false) {
|
|
42
|
+
obj.value = message.value;
|
|
43
|
+
}
|
|
44
|
+
return obj;
|
|
45
|
+
},
|
|
46
|
+
create(base) {
|
|
47
|
+
return Boolean.fromPartial(base ?? {});
|
|
48
|
+
},
|
|
49
|
+
fromPartial(object) {
|
|
50
|
+
const message = createBaseBoolean();
|
|
51
|
+
message.value = object.value ?? false;
|
|
52
|
+
return message;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
function createBaseInteger() {
|
|
56
|
+
return { value: 0 };
|
|
57
|
+
}
|
|
58
|
+
var Integer = {
|
|
59
|
+
encode(message, writer = new BinaryWriter()) {
|
|
60
|
+
if (message.value !== 0) {
|
|
61
|
+
writer.uint32(8).int64(message.value);
|
|
62
|
+
}
|
|
63
|
+
return writer;
|
|
64
|
+
},
|
|
65
|
+
decode(input, length) {
|
|
66
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
67
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
68
|
+
const message = createBaseInteger();
|
|
69
|
+
while (reader.pos < end) {
|
|
70
|
+
const tag = reader.uint32();
|
|
71
|
+
switch (tag >>> 3) {
|
|
72
|
+
case 1: {
|
|
73
|
+
if (tag !== 8) {
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
message.value = longToNumber(reader.int64());
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
reader.skip(tag & 7);
|
|
84
|
+
}
|
|
85
|
+
return message;
|
|
86
|
+
},
|
|
87
|
+
fromJSON(object) {
|
|
88
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
89
|
+
},
|
|
90
|
+
toJSON(message) {
|
|
91
|
+
const obj = {};
|
|
92
|
+
if (message.value !== 0) {
|
|
93
|
+
obj.value = Math.round(message.value);
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
},
|
|
97
|
+
create(base) {
|
|
98
|
+
return Integer.fromPartial(base ?? {});
|
|
99
|
+
},
|
|
100
|
+
fromPartial(object) {
|
|
101
|
+
const message = createBaseInteger();
|
|
102
|
+
message.value = object.value ?? 0;
|
|
103
|
+
return message;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
function createBaseString() {
|
|
107
|
+
return { value: "" };
|
|
108
|
+
}
|
|
109
|
+
var String = {
|
|
110
|
+
encode(message, writer = new BinaryWriter()) {
|
|
111
|
+
if (message.value !== "") {
|
|
112
|
+
writer.uint32(10).string(message.value);
|
|
113
|
+
}
|
|
114
|
+
return writer;
|
|
115
|
+
},
|
|
116
|
+
decode(input, length) {
|
|
117
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
118
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
119
|
+
const message = createBaseString();
|
|
120
|
+
while (reader.pos < end) {
|
|
121
|
+
const tag = reader.uint32();
|
|
122
|
+
switch (tag >>> 3) {
|
|
123
|
+
case 1: {
|
|
124
|
+
if (tag !== 10) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
message.value = reader.string();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
reader.skip(tag & 7);
|
|
135
|
+
}
|
|
136
|
+
return message;
|
|
137
|
+
},
|
|
138
|
+
fromJSON(object) {
|
|
139
|
+
return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
|
|
140
|
+
},
|
|
141
|
+
toJSON(message) {
|
|
142
|
+
const obj = {};
|
|
143
|
+
if (message.value !== "") {
|
|
144
|
+
obj.value = message.value;
|
|
145
|
+
}
|
|
146
|
+
return obj;
|
|
147
|
+
},
|
|
148
|
+
create(base) {
|
|
149
|
+
return String.fromPartial(base ?? {});
|
|
150
|
+
},
|
|
151
|
+
fromPartial(object) {
|
|
152
|
+
const message = createBaseString();
|
|
153
|
+
message.value = object.value ?? "";
|
|
154
|
+
return message;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
function createBaseBytes() {
|
|
158
|
+
return { value: new Uint8Array(0) };
|
|
159
|
+
}
|
|
160
|
+
var Bytes = {
|
|
161
|
+
encode(message, writer = new BinaryWriter()) {
|
|
162
|
+
if (message.value.length !== 0) {
|
|
163
|
+
writer.uint32(10).bytes(message.value);
|
|
164
|
+
}
|
|
165
|
+
return writer;
|
|
166
|
+
},
|
|
167
|
+
decode(input, length) {
|
|
168
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
169
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
170
|
+
const message = createBaseBytes();
|
|
171
|
+
while (reader.pos < end) {
|
|
172
|
+
const tag = reader.uint32();
|
|
173
|
+
switch (tag >>> 3) {
|
|
174
|
+
case 1: {
|
|
175
|
+
if (tag !== 10) {
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
message.value = reader.bytes();
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
reader.skip(tag & 7);
|
|
186
|
+
}
|
|
187
|
+
return message;
|
|
188
|
+
},
|
|
189
|
+
fromJSON(object) {
|
|
190
|
+
return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0) };
|
|
191
|
+
},
|
|
192
|
+
toJSON(message) {
|
|
193
|
+
const obj = {};
|
|
194
|
+
if (message.value.length !== 0) {
|
|
195
|
+
obj.value = base64FromBytes(message.value);
|
|
196
|
+
}
|
|
197
|
+
return obj;
|
|
198
|
+
},
|
|
199
|
+
create(base) {
|
|
200
|
+
return Bytes.fromPartial(base ?? {});
|
|
201
|
+
},
|
|
202
|
+
fromPartial(object) {
|
|
203
|
+
const message = createBaseBytes();
|
|
204
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
205
|
+
return message;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
function createBaseEmpty() {
|
|
209
|
+
return {};
|
|
210
|
+
}
|
|
211
|
+
var Empty = {
|
|
212
|
+
encode(_, writer = new BinaryWriter()) {
|
|
213
|
+
return writer;
|
|
214
|
+
},
|
|
215
|
+
decode(input, length) {
|
|
216
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
217
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
218
|
+
const message = createBaseEmpty();
|
|
219
|
+
while (reader.pos < end) {
|
|
220
|
+
const tag = reader.uint32();
|
|
221
|
+
switch (tag >>> 3) {
|
|
222
|
+
}
|
|
223
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
reader.skip(tag & 7);
|
|
227
|
+
}
|
|
228
|
+
return message;
|
|
229
|
+
},
|
|
230
|
+
fromJSON(_) {
|
|
231
|
+
return {};
|
|
232
|
+
},
|
|
233
|
+
toJSON(_) {
|
|
234
|
+
const obj = {};
|
|
235
|
+
return obj;
|
|
236
|
+
},
|
|
237
|
+
create(base) {
|
|
238
|
+
return Empty.fromPartial(base ?? {});
|
|
239
|
+
},
|
|
240
|
+
fromPartial(_) {
|
|
241
|
+
const message = createBaseEmpty();
|
|
242
|
+
return message;
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
function bytesFromBase64(b64) {
|
|
246
|
+
if (globalThis.Buffer) {
|
|
247
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
248
|
+
} else {
|
|
249
|
+
const bin = globalThis.atob(b64);
|
|
250
|
+
const arr = new Uint8Array(bin.length);
|
|
251
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
252
|
+
arr[i] = bin.charCodeAt(i);
|
|
253
|
+
}
|
|
254
|
+
return arr;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function base64FromBytes(arr) {
|
|
258
|
+
if (globalThis.Buffer) {
|
|
259
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
260
|
+
} else {
|
|
261
|
+
const bin = [];
|
|
262
|
+
arr.forEach((byte) => {
|
|
263
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
264
|
+
});
|
|
265
|
+
return globalThis.btoa(bin.join(""));
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function longToNumber(int64) {
|
|
269
|
+
const num = globalThis.Number(int64.toString());
|
|
270
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
271
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
272
|
+
}
|
|
273
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
274
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
275
|
+
}
|
|
276
|
+
return num;
|
|
277
|
+
}
|
|
278
|
+
function isSet(value) {
|
|
279
|
+
return value !== null && value !== void 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export {
|
|
283
|
+
protobufPackage,
|
|
284
|
+
Boolean,
|
|
285
|
+
Integer,
|
|
286
|
+
String,
|
|
287
|
+
Bytes,
|
|
288
|
+
Empty
|
|
289
|
+
};
|