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