@ekhein/lamda-node-sdk 1.0.3 → 2.0.0
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 +4 -9
- 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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const FLAG_ACTIVITY_BROUGHT_TO_FRONT = 4194304;
|
|
2
|
+
export declare const FLAG_ACTIVITY_CLEAR_TASK = 32768;
|
|
3
|
+
export declare const FLAG_ACTIVITY_CLEAR_TOP = 67108864;
|
|
4
|
+
export declare const FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS = 8388608;
|
|
5
|
+
export declare const FLAG_ACTIVITY_FORWARD_RESULT = 33554432;
|
|
6
|
+
export declare const FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY = 1048576;
|
|
7
|
+
export declare const FLAG_ACTIVITY_LAUNCH_ADJACENT = 4096;
|
|
8
|
+
export declare const FLAG_ACTIVITY_MATCH_EXTERNAL = 2048;
|
|
9
|
+
export declare const FLAG_ACTIVITY_MULTIPLE_TASK = 134217728;
|
|
10
|
+
export declare const FLAG_ACTIVITY_NEW_DOCUMENT = 524288;
|
|
11
|
+
export declare const FLAG_ACTIVITY_NEW_TASK = 268435456;
|
|
12
|
+
export declare const FLAG_ACTIVITY_NO_ANIMATION = 65536;
|
|
13
|
+
export declare const FLAG_ACTIVITY_NO_HISTORY = 1073741824;
|
|
14
|
+
export declare const FLAG_ACTIVITY_NO_USER_ACTION = 262144;
|
|
15
|
+
export declare const FLAG_ACTIVITY_PREVIOUS_IS_TOP = 16777216;
|
|
16
|
+
export declare const FLAG_ACTIVITY_REORDER_TO_FRONT = 131072;
|
|
17
|
+
export declare const FLAG_ACTIVITY_REQUIRE_DEFAULT = 512;
|
|
18
|
+
export declare const FLAG_ACTIVITY_REQUIRE_NON_BROWSER = 1024;
|
|
19
|
+
export declare const FLAG_ACTIVITY_RESET_TASK_IF_NEEDED = 2097152;
|
|
20
|
+
export declare const FLAG_ACTIVITY_RETAIN_IN_RECENTS = 8192;
|
|
21
|
+
export declare const FLAG_ACTIVITY_SINGLE_TOP = 536870912;
|
|
22
|
+
export declare const FLAG_ACTIVITY_TASK_ON_HOME = 16384;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const FLAG_ACTIVITY_BROUGHT_TO_FRONT = 0x00400000;
|
|
2
|
+
export const FLAG_ACTIVITY_CLEAR_TASK = 0x00008000;
|
|
3
|
+
export const FLAG_ACTIVITY_CLEAR_TOP = 0x04000000;
|
|
4
|
+
export const FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS = 0x00800000;
|
|
5
|
+
export const FLAG_ACTIVITY_FORWARD_RESULT = 0x02000000;
|
|
6
|
+
export const FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY = 0x00100000;
|
|
7
|
+
export const FLAG_ACTIVITY_LAUNCH_ADJACENT = 0x00001000;
|
|
8
|
+
export const FLAG_ACTIVITY_MATCH_EXTERNAL = 0x00000800;
|
|
9
|
+
export const FLAG_ACTIVITY_MULTIPLE_TASK = 0x08000000;
|
|
10
|
+
export const FLAG_ACTIVITY_NEW_DOCUMENT = 0x00080000;
|
|
11
|
+
export const FLAG_ACTIVITY_NEW_TASK = 0x10000000;
|
|
12
|
+
export const FLAG_ACTIVITY_NO_ANIMATION = 0x00010000;
|
|
13
|
+
export const FLAG_ACTIVITY_NO_HISTORY = 0x40000000;
|
|
14
|
+
export const FLAG_ACTIVITY_NO_USER_ACTION = 0x00040000;
|
|
15
|
+
export const FLAG_ACTIVITY_PREVIOUS_IS_TOP = 0x01000000;
|
|
16
|
+
export const FLAG_ACTIVITY_REORDER_TO_FRONT = 0x00020000;
|
|
17
|
+
export const FLAG_ACTIVITY_REQUIRE_DEFAULT = 0x00000200;
|
|
18
|
+
export const FLAG_ACTIVITY_REQUIRE_NON_BROWSER = 0x00000400;
|
|
19
|
+
export const FLAG_ACTIVITY_RESET_TASK_IF_NEEDED = 0x00200000;
|
|
20
|
+
export const FLAG_ACTIVITY_RETAIN_IN_RECENTS = 0x00002000;
|
|
21
|
+
export const FLAG_ACTIVITY_SINGLE_TOP = 0x20000000;
|
|
22
|
+
export const FLAG_ACTIVITY_TASK_ON_HOME = 0x00004000;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const ACTION_VIEW = "android.intent.action.VIEW";
|
|
2
|
+
export declare const ACTION_EDIT = "android.intent.action.EDIT";
|
|
3
|
+
export declare const ACTION_SEND = "android.intent.action.SEND";
|
|
4
|
+
export declare const ACTION_SENDTO = "android.intent.action.SENDTO";
|
|
5
|
+
export declare const ACTION_DIAL = "android.intent.action.DIAL";
|
|
6
|
+
export declare const ACTION_CALL = "android.intent.action.CALL";
|
|
7
|
+
export declare const ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
|
|
8
|
+
export declare const ACTION_SMS = "android.intent.action.SMS";
|
|
9
|
+
export declare const ACTION_SEND_MULTIPLE = "android.intent.action.SEND_MULTIPLE";
|
|
10
|
+
export declare const ACTION_PICK = "android.intent.action.PICK";
|
|
11
|
+
export declare const ACTION_CHOOSER = "android.intent.action.CHOOSER";
|
|
12
|
+
export declare const ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT";
|
|
13
|
+
export declare const ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
|
|
14
|
+
export declare const ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE";
|
|
15
|
+
export declare const ACTION_SYNC = "android.intent.action.SYNC";
|
|
16
|
+
export declare const ACTION_MAIN = "android.intent.action.MAIN";
|
|
17
|
+
export declare const ACTION_POWER_CONNECTED = "android.intent.action.ACTION_POWER_CONNECTED";
|
|
18
|
+
export declare const ACTION_POWER_DISCONNECTED = "android.intent.action.ACTION_POWER_DISCONNECTED";
|
|
19
|
+
export declare const ACTION_BATTERY_LOW = "android.intent.action.ACTION_BATTERY_LOW";
|
|
20
|
+
export declare const ACTION_BATTERY_OKAY = "android.intent.action.ACTION_BATTERY_OKAY";
|
|
21
|
+
export declare const ACTION_HEADSET_PLUG = "android.intent.action.ACTION_HEADSET_PLUG";
|
|
22
|
+
export declare const ACTION_SCREEN_ON = "android.intent.action.ACTION_SCREEN_ON";
|
|
23
|
+
export declare const ACTION_SCREEN_OFF = "android.intent.action.ACTION_SCREEN_OFF";
|
|
24
|
+
export declare const ACTION_TIME_CHANGED = "android.intent.action.ACTION_TIME_CHANGED";
|
|
25
|
+
export declare const ACTION_DATE_CHANGED = "android.intent.action.ACTION_DATE_CHANGED";
|
|
26
|
+
export declare const ACTION_TIMEZONE_CHANGED = "android.intent.action.ACTION_TIMEZONE_CHANGED";
|
|
27
|
+
export declare const ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.ACTION_AIRPLANE_MODE_CHANGED";
|
|
28
|
+
export declare const ACTION_LOCALE_CHANGED = "android.intent.action.ACTION_LOCALE_CHANGED";
|
|
29
|
+
export declare const ACTION_CONFIGURATION_CHANGED = "android.intent.action.ACTION_CONFIGURATION_CHANGED";
|
|
30
|
+
export declare const ACTION_MEDIA_SCANNER_SCAN_FILE = "android.intent.action.ACTION_MEDIA_SCANNER_SCAN_FILE";
|
|
31
|
+
export declare const ACTION_MEDIA_SCANNER_STARTED = "android.intent.action.ACTION_MEDIA_SCANNER_STARTED";
|
|
32
|
+
export declare const ACTION_MEDIA_SCANNER_FINISHED = "android.intent.action.ACTION_MEDIA_SCANNER_FINISHED";
|
|
33
|
+
export declare const ACTION_MEDIA_MOUNTED = "android.intent.action.ACTION_MEDIA_MOUNTED";
|
|
34
|
+
export declare const ACTION_MEDIA_UNMOUNTED = "android.intent.action.ACTION_MEDIA_UNMOUNTED";
|
|
35
|
+
export declare const ACTION_MEDIA_BAD_REMOVAL = "android.intent.action.ACTION_MEDIA_BAD_REMOVAL";
|
|
36
|
+
export declare const ACTION_MEDIA_UNMOUNTABLE = "android.intent.action.ACTION_MEDIA_UNMOUNTABLE";
|
|
37
|
+
export declare const ACTION_MEDIA_SHARED = "android.intent.action.ACTION_MEDIA_SHARED";
|
|
38
|
+
export declare const ACTION_MEDIA_EJECT = "android.intent.action.ACTION_MEDIA_EJECT";
|
|
39
|
+
export declare const ACTION_MEDIA_REORDER = "android.intent.action.ACTION_MEDIA_REORDER";
|
|
40
|
+
export declare const ACTION_MEDIA_PLAY = "android.intent.action.ACTION_MEDIA_PLAY";
|
|
41
|
+
export declare const ACTION_MEDIA_PAUSE = "android.intent.action.ACTION_MEDIA_PAUSE";
|
|
42
|
+
export declare const ACTION_MEDIA_STOP = "android.intent.action.ACTION_MEDIA_STOP";
|
|
43
|
+
export declare const ACTION_MEDIA_NEXT = "android.intent.action.ACTION_MEDIA_NEXT";
|
|
44
|
+
export declare const ACTION_MEDIA_PREVIOUS = "android.intent.action.ACTION_MEDIA_PREVIOUS";
|
|
45
|
+
export declare const ACTION_MEDIA_FAST_FORWARD = "android.intent.action.ACTION_MEDIA_FAST_FORWARD";
|
|
46
|
+
export declare const ACTION_MEDIA_REWIND = "android.intent.action.ACTION_MEDIA_REWIND";
|
|
47
|
+
export declare const ACTION_MEDIA_PLAY_PAUSE = "android.intent.action.ACTION_MEDIA_PLAY_PAUSE";
|
|
48
|
+
export declare const ACTION_MEDIA_STOP_RECORDING = "android.intent.action.ACTION_MEDIA_STOP_RECORDING";
|
|
49
|
+
export declare const ACTION_MEDIA_RECORD = "android.intent.action.ACTION_MEDIA_RECORD";
|
|
50
|
+
export declare const ACTION_MEDIA_RECORD_PAUSE = "android.intent.action.ACTION_MEDIA_RECORD_PAUSE";
|
|
51
|
+
export declare const ACTION_MEDIA_RECORD_STOP = "android.intent.action.ACTION_MEDIA_RECORD_STOP";
|
|
52
|
+
export declare const ACTION_MEDIA_RECORD_RESUME = "android.intent.action.ACTION_MEDIA_RECORD_RESUME";
|
|
53
|
+
export declare const ACTION_MEDIA_RECORD_START = "android.intent.action.ACTION_MEDIA_RECORD_START";
|
|
54
|
+
export declare const ACTION_MEDIA_RECORD_END = "android.intent.action.ACTION_MEDIA_RECORD_END";
|
|
55
|
+
export declare const ACTION_MEDIA_RECORD_RESTART = "android.intent.action.ACTION_MEDIA_RECORD_RESTART";
|
|
56
|
+
export declare const ACTION_MEDIA_RECORD_RESET = "android.intent.action.ACTION_MEDIA_RECORD_RESET";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const ACTION_VIEW = "android.intent.action.VIEW";
|
|
2
|
+
export const ACTION_EDIT = "android.intent.action.EDIT";
|
|
3
|
+
export const ACTION_SEND = "android.intent.action.SEND";
|
|
4
|
+
export const ACTION_SENDTO = "android.intent.action.SENDTO";
|
|
5
|
+
export const ACTION_DIAL = "android.intent.action.DIAL";
|
|
6
|
+
export const ACTION_CALL = "android.intent.action.CALL";
|
|
7
|
+
export const ACTION_CALL_BUTTON = "android.intent.action.CALL_BUTTON";
|
|
8
|
+
export const ACTION_SMS = "android.intent.action.SMS";
|
|
9
|
+
export const ACTION_SEND_MULTIPLE = "android.intent.action.SEND_MULTIPLE";
|
|
10
|
+
export const ACTION_PICK = "android.intent.action.PICK";
|
|
11
|
+
export const ACTION_CHOOSER = "android.intent.action.CHOOSER";
|
|
12
|
+
export const ACTION_GET_CONTENT = "android.intent.action.GET_CONTENT";
|
|
13
|
+
export const ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE";
|
|
14
|
+
export const ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE";
|
|
15
|
+
export const ACTION_SYNC = "android.intent.action.SYNC";
|
|
16
|
+
export const ACTION_MAIN = "android.intent.action.MAIN";
|
|
17
|
+
export const ACTION_POWER_CONNECTED = "android.intent.action.ACTION_POWER_CONNECTED";
|
|
18
|
+
export const ACTION_POWER_DISCONNECTED = "android.intent.action.ACTION_POWER_DISCONNECTED";
|
|
19
|
+
export const ACTION_BATTERY_LOW = "android.intent.action.ACTION_BATTERY_LOW";
|
|
20
|
+
export const ACTION_BATTERY_OKAY = "android.intent.action.ACTION_BATTERY_OKAY";
|
|
21
|
+
export const ACTION_HEADSET_PLUG = "android.intent.action.ACTION_HEADSET_PLUG";
|
|
22
|
+
export const ACTION_SCREEN_ON = "android.intent.action.ACTION_SCREEN_ON";
|
|
23
|
+
export const ACTION_SCREEN_OFF = "android.intent.action.ACTION_SCREEN_OFF";
|
|
24
|
+
export const ACTION_TIME_CHANGED = "android.intent.action.ACTION_TIME_CHANGED";
|
|
25
|
+
export const ACTION_DATE_CHANGED = "android.intent.action.ACTION_DATE_CHANGED";
|
|
26
|
+
export const ACTION_TIMEZONE_CHANGED = "android.intent.action.ACTION_TIMEZONE_CHANGED";
|
|
27
|
+
export const ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.ACTION_AIRPLANE_MODE_CHANGED";
|
|
28
|
+
export const ACTION_LOCALE_CHANGED = "android.intent.action.ACTION_LOCALE_CHANGED";
|
|
29
|
+
export const ACTION_CONFIGURATION_CHANGED = "android.intent.action.ACTION_CONFIGURATION_CHANGED";
|
|
30
|
+
export const ACTION_MEDIA_SCANNER_SCAN_FILE = "android.intent.action.ACTION_MEDIA_SCANNER_SCAN_FILE";
|
|
31
|
+
export const ACTION_MEDIA_SCANNER_STARTED = "android.intent.action.ACTION_MEDIA_SCANNER_STARTED";
|
|
32
|
+
export const ACTION_MEDIA_SCANNER_FINISHED = "android.intent.action.ACTION_MEDIA_SCANNER_FINISHED";
|
|
33
|
+
export const ACTION_MEDIA_MOUNTED = "android.intent.action.ACTION_MEDIA_MOUNTED";
|
|
34
|
+
export const ACTION_MEDIA_UNMOUNTED = "android.intent.action.ACTION_MEDIA_UNMOUNTED";
|
|
35
|
+
export const ACTION_MEDIA_BAD_REMOVAL = "android.intent.action.ACTION_MEDIA_BAD_REMOVAL";
|
|
36
|
+
export const ACTION_MEDIA_UNMOUNTABLE = "android.intent.action.ACTION_MEDIA_UNMOUNTABLE";
|
|
37
|
+
export const ACTION_MEDIA_SHARED = "android.intent.action.ACTION_MEDIA_SHARED";
|
|
38
|
+
export const ACTION_MEDIA_EJECT = "android.intent.action.ACTION_MEDIA_EJECT";
|
|
39
|
+
export const ACTION_MEDIA_REORDER = "android.intent.action.ACTION_MEDIA_REORDER";
|
|
40
|
+
export const ACTION_MEDIA_PLAY = "android.intent.action.ACTION_MEDIA_PLAY";
|
|
41
|
+
export const ACTION_MEDIA_PAUSE = "android.intent.action.ACTION_MEDIA_PAUSE";
|
|
42
|
+
export const ACTION_MEDIA_STOP = "android.intent.action.ACTION_MEDIA_STOP";
|
|
43
|
+
export const ACTION_MEDIA_NEXT = "android.intent.action.ACTION_MEDIA_NEXT";
|
|
44
|
+
export const ACTION_MEDIA_PREVIOUS = "android.intent.action.ACTION_MEDIA_PREVIOUS";
|
|
45
|
+
export const ACTION_MEDIA_FAST_FORWARD = "android.intent.action.ACTION_MEDIA_FAST_FORWARD";
|
|
46
|
+
export const ACTION_MEDIA_REWIND = "android.intent.action.ACTION_MEDIA_REWIND";
|
|
47
|
+
export const ACTION_MEDIA_PLAY_PAUSE = "android.intent.action.ACTION_MEDIA_PLAY_PAUSE";
|
|
48
|
+
export const ACTION_MEDIA_STOP_RECORDING = "android.intent.action.ACTION_MEDIA_STOP_RECORDING";
|
|
49
|
+
export const ACTION_MEDIA_RECORD = "android.intent.action.ACTION_MEDIA_RECORD";
|
|
50
|
+
export const ACTION_MEDIA_RECORD_PAUSE = "android.intent.action.ACTION_MEDIA_RECORD_PAUSE";
|
|
51
|
+
export const ACTION_MEDIA_RECORD_STOP = "android.intent.action.ACTION_MEDIA_RECORD_STOP";
|
|
52
|
+
export const ACTION_MEDIA_RECORD_RESUME = "android.intent.action.ACTION_MEDIA_RECORD_RESUME";
|
|
53
|
+
export const ACTION_MEDIA_RECORD_START = "android.intent.action.ACTION_MEDIA_RECORD_START";
|
|
54
|
+
export const ACTION_MEDIA_RECORD_END = "android.intent.action.ACTION_MEDIA_RECORD_END";
|
|
55
|
+
export const ACTION_MEDIA_RECORD_RESTART = "android.intent.action.ACTION_MEDIA_RECORD_RESTART";
|
|
56
|
+
export const ACTION_MEDIA_RECORD_RESET = "android.intent.action.ACTION_MEDIA_RECORD_RESET";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const PERMISSION_READ_SMS = "android.permission.READ_SMS";
|
|
2
|
+
export declare const PERMISSION_READ_CALENDAR = "android.permission.READ_CALENDAR";
|
|
3
|
+
export declare const PERMISSION_READ_CALL_LOG = "android.permission.READ_CALL_LOG";
|
|
4
|
+
export declare const PERMISSION_ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
|
|
5
|
+
export declare const PERMISSION_ANSWER_PHONE_CALLS = "android.permission.ANSWER_PHONE_CALLS";
|
|
6
|
+
export declare const PERMISSION_RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH";
|
|
7
|
+
export declare const PERMISSION_BODY_SENSORS = "android.permission.BODY_SENSORS";
|
|
8
|
+
export declare const PERMISSION_READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
|
|
9
|
+
export declare const PERMISSION_RECEIVE_MMS = "android.permission.RECEIVE_MMS";
|
|
10
|
+
export declare const PERMISSION_RECEIVE_SMS = "android.permission.RECEIVE_SMS";
|
|
11
|
+
export declare const PERMISSION_READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
|
|
12
|
+
export declare const PERMISSION_ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
|
|
13
|
+
export declare const PERMISSION_READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
|
|
14
|
+
export declare const PERMISSION_SEND_SMS = "android.permission.SEND_SMS";
|
|
15
|
+
export declare const PERMISSION_CALL_PHONE = "android.permission.CALL_PHONE";
|
|
16
|
+
export declare const PERMISSION_WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
|
|
17
|
+
export declare const PERMISSION_ACCEPT_HANDOVER = "android.permission.ACCEPT_HANDOVER";
|
|
18
|
+
export declare const PERMISSION_CAMERA = "android.permission.CAMERA";
|
|
19
|
+
export declare const PERMISSION_WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
|
|
20
|
+
export declare const PERMISSION_WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
|
|
21
|
+
export declare const PERMISSION_USE_SIP = "android.permission.USE_SIP";
|
|
22
|
+
export declare const PERMISSION_PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
|
|
23
|
+
export declare const PERMISSION_READ_CELL_BROADCASTS = "android.permission.READ_CELL_BROADCASTS";
|
|
24
|
+
export declare const PERMISSION_GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
|
|
25
|
+
export declare const PERMISSION_WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
|
|
26
|
+
export declare const PERMISSION_ACTIVITY_RECOGNITION = "android.permission.ACTIVITY_RECOGNITION";
|
|
27
|
+
export declare const PERMISSION_RECORD_AUDIO = "android.permission.RECORD_AUDIO";
|
|
28
|
+
export declare const PERMISSION_READ_CONTACTS = "android.permission.READ_CONTACTS";
|
|
29
|
+
export declare const PERMISSION_ACCESS_BACKGROUND_LOCATION = "android.permission.ACCESS_BACKGROUND_LOCATION";
|
|
30
|
+
export declare const PERMISSION_ACCESS_MEDIA_LOCATION = "android.permission.ACCESS_MEDIA_LOCATION";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const PERMISSION_READ_SMS = "android.permission.READ_SMS";
|
|
2
|
+
export const PERMISSION_READ_CALENDAR = "android.permission.READ_CALENDAR";
|
|
3
|
+
export const PERMISSION_READ_CALL_LOG = "android.permission.READ_CALL_LOG";
|
|
4
|
+
export const PERMISSION_ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
|
|
5
|
+
export const PERMISSION_ANSWER_PHONE_CALLS = "android.permission.ANSWER_PHONE_CALLS";
|
|
6
|
+
export const PERMISSION_RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH";
|
|
7
|
+
export const PERMISSION_BODY_SENSORS = "android.permission.BODY_SENSORS";
|
|
8
|
+
export const PERMISSION_READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
|
|
9
|
+
export const PERMISSION_RECEIVE_MMS = "android.permission.RECEIVE_MMS";
|
|
10
|
+
export const PERMISSION_RECEIVE_SMS = "android.permission.RECEIVE_SMS";
|
|
11
|
+
export const PERMISSION_READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
|
|
12
|
+
export const PERMISSION_ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
|
|
13
|
+
export const PERMISSION_READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
|
|
14
|
+
export const PERMISSION_SEND_SMS = "android.permission.SEND_SMS";
|
|
15
|
+
export const PERMISSION_CALL_PHONE = "android.permission.CALL_PHONE";
|
|
16
|
+
export const PERMISSION_WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
|
|
17
|
+
export const PERMISSION_ACCEPT_HANDOVER = "android.permission.ACCEPT_HANDOVER";
|
|
18
|
+
export const PERMISSION_CAMERA = "android.permission.CAMERA";
|
|
19
|
+
export const PERMISSION_WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
|
|
20
|
+
export const PERMISSION_WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
|
|
21
|
+
export const PERMISSION_USE_SIP = "android.permission.USE_SIP";
|
|
22
|
+
export const PERMISSION_PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
|
|
23
|
+
export const PERMISSION_READ_CELL_BROADCASTS = "android.permission.READ_CELL_BROADCASTS";
|
|
24
|
+
export const PERMISSION_GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
|
|
25
|
+
export const PERMISSION_WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
|
|
26
|
+
export const PERMISSION_ACTIVITY_RECOGNITION = "android.permission.ACTIVITY_RECOGNITION";
|
|
27
|
+
export const PERMISSION_RECORD_AUDIO = "android.permission.RECORD_AUDIO";
|
|
28
|
+
export const PERMISSION_READ_CONTACTS = "android.permission.READ_CONTACTS";
|
|
29
|
+
export const PERMISSION_ACCESS_BACKGROUND_LOCATION = "android.permission.ACCESS_BACKGROUND_LOCATION";
|
|
30
|
+
export const PERMISSION_ACCESS_MEDIA_LOCATION = "android.permission.ACCESS_MEDIA_LOCATION";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function Inject(service) {
|
|
2
|
+
return function (target, key) {
|
|
3
|
+
Object.defineProperty(target, key, {
|
|
4
|
+
get() {
|
|
5
|
+
this._services = this._services || new Map();
|
|
6
|
+
const instance = this._services.get(service.name);
|
|
7
|
+
if (instance)
|
|
8
|
+
return instance;
|
|
9
|
+
const client = this.client.create(service, this.channel);
|
|
10
|
+
this._services.set(service.name, client);
|
|
11
|
+
return client;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ClientMiddlewareCall } from "nice-grpc";
|
|
2
|
+
export declare class RemoteCallException<Request, Response> extends Error {
|
|
3
|
+
readonly call: ClientMiddlewareCall<Request, Response>;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly args: string;
|
|
6
|
+
constructor(call: ClientMiddlewareCall<Request, Response>, name: string, args: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { format } from 'util';
|
|
2
|
+
export class RemoteCallException extends Error {
|
|
3
|
+
call;
|
|
4
|
+
name;
|
|
5
|
+
args;
|
|
6
|
+
constructor(call, name, args) {
|
|
7
|
+
super(format("%s %s::%s", name, call.method.path, args));
|
|
8
|
+
this.call = call;
|
|
9
|
+
this.name = name;
|
|
10
|
+
this.args = args;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CallOptions, ClientMiddlewareCall } from "nice-grpc";
|
|
2
|
+
export declare function RemoteExceptionInterceptor(): <Request, Response>(call: ClientMiddlewareCall<Request, Response>, options: CallOptions) => AsyncGenerator<Awaited<Response>, void | Awaited<Response>, undefined>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RemoteCallException } from "../exceptions/remoteCall.exception";
|
|
2
|
+
export function RemoteExceptionInterceptor() {
|
|
3
|
+
return async function* (call, options) {
|
|
4
|
+
try {
|
|
5
|
+
return yield* call.next(call.request, options);
|
|
6
|
+
}
|
|
7
|
+
catch (error) {
|
|
8
|
+
const { exception } = JSON.parse(error.details);
|
|
9
|
+
const { name, args } = JSON.parse(exception);
|
|
10
|
+
throw new RemoteCallException(call, name, args);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import { UtilClient, UiAutomatorClient, ApplicationClient, DebugClient, FileClient, LockClient, ProxyClient, SelinuxPolicyClient, ShellClient, StatusClient, StorageClient, WifiClient, SettingsClient } from './rpc/services
|
|
2
|
-
|
|
3
|
-
import '@bufbuild/protobuf/wire';
|
|
4
|
-
import './rpc/file.js';
|
|
5
|
-
import './rpc/util.js';
|
|
6
|
-
import './rpc/wifi.js';
|
|
7
|
-
import './rpc/uiautomator.js';
|
|
8
|
-
import './rpc/status.js';
|
|
9
|
-
import './rpc/shell.js';
|
|
10
|
-
import './rpc/settings.js';
|
|
11
|
-
import './rpc/policy.js';
|
|
12
|
-
import './rpc/proxy.js';
|
|
13
|
-
import './rpc/application.js';
|
|
14
|
-
import './rpc/debug.js';
|
|
15
|
-
import './rpc/google/protobuf/empty.js';
|
|
16
|
-
import './rpc/types.js';
|
|
17
|
-
import 'nice-grpc-common';
|
|
18
|
-
|
|
19
|
-
declare class Device {
|
|
1
|
+
import { UtilClient, UiAutomatorClient, ApplicationClient, DebugClient, FileClient, LockClient, ProxyClient, SelinuxPolicyClient, ShellClient, StatusClient, StorageClient, WifiClient, SettingsClient } from './rpc/services';
|
|
2
|
+
export declare class Device {
|
|
20
3
|
readonly Util: UtilClient;
|
|
21
4
|
readonly UiAutomator: UiAutomatorClient;
|
|
22
5
|
readonly Application: ApplicationClient;
|
|
@@ -31,7 +14,12 @@ declare class Device {
|
|
|
31
14
|
readonly Wifi: WifiClient;
|
|
32
15
|
readonly Settings: SettingsClient;
|
|
33
16
|
private channel;
|
|
17
|
+
private client;
|
|
34
18
|
constructor(host?: string, prot?: number);
|
|
19
|
+
click(...args: Parameters<typeof this.UiAutomator["selectorClick"]>): Promise<import("./rpc/types").Boolean>;
|
|
20
|
+
waitFor(...args: Parameters<typeof this.UiAutomator["selectorWaitForExists"]>): Promise<void>;
|
|
21
|
+
sleep(min?: number, max?: number): Promise<unknown>;
|
|
22
|
+
passwd(pwd: string, keyboard: Record<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9", Parameters<typeof this.UiAutomator["selectorClick"]>[0]>): Promise<void>;
|
|
23
|
+
open(data: string): Promise<import("./rpc/types").Boolean>;
|
|
24
|
+
stop(...args: Parameters<typeof this.Application["stopApplication"]>): Promise<import("./rpc/types").Boolean>;
|
|
35
25
|
}
|
|
36
|
-
|
|
37
|
-
export { Device };
|
package/dist/src/main.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { createChannel, ChannelCredentials, createClientFactory } from 'nice-grpc';
|
|
11
|
+
import { Inject } from './decorators/inject.decorator';
|
|
12
|
+
import { ACTION_VIEW } from './constants/android.intent';
|
|
13
|
+
import { FLAG_ACTIVITY_CLEAR_TASK, FLAG_ACTIVITY_CLEAR_TOP, FLAG_ACTIVITY_NEW_TASK } from './constants/activity.flag';
|
|
14
|
+
import { RemoteExceptionInterceptor } from './interceptor/remoteException.Interceptor';
|
|
15
|
+
import { TimeoutException } from './exceptions/timeout.exception';
|
|
16
|
+
import { UtilDefinition, UiAutomatorDefinition, ApplicationDefinition, DebugDefinition, FileDefinition, LockDefinition, ProxyDefinition, SelinuxPolicyDefinition, ShellDefinition, StatusDefinition, StorageDefinition, WifiDefinition, SettingsDefinition, } from './rpc/services';
|
|
17
|
+
export class Device {
|
|
18
|
+
channel;
|
|
19
|
+
client;
|
|
20
|
+
constructor(host = "127.0.0.1", prot = 65000) {
|
|
21
|
+
const address = Array(host, prot).join(":");
|
|
22
|
+
const credentials = ChannelCredentials.createInsecure();
|
|
23
|
+
this.client = createClientFactory()
|
|
24
|
+
.use(RemoteExceptionInterceptor());
|
|
25
|
+
this.channel = createChannel(address, credentials, {
|
|
26
|
+
["grpc.max_send_message_length"]: 64 * 1024 * 1024,
|
|
27
|
+
["grpc.max_receive_message_length"]: 128 * 1024 * 1024,
|
|
28
|
+
["grpc.keepalive_time_ms"]: 30 * 1000,
|
|
29
|
+
["grpc.keepalive_timeout_ms"]: 15 * 1000,
|
|
30
|
+
["grpc.keepalive_permit_without_calls"]: 1,
|
|
31
|
+
["grpc.max_pings_without_data"]: 0,
|
|
32
|
+
["grpc.enable_http_proxy"]: 0,
|
|
33
|
+
["grpc.service_config"]: JSON.stringify({
|
|
34
|
+
["methodConfig"]: [{
|
|
35
|
+
["name"]: [{}]
|
|
36
|
+
}],
|
|
37
|
+
["retryPolicy"]: {
|
|
38
|
+
["maxAttempts"]: 5,
|
|
39
|
+
["retryableStatusCodes"]: ["UNAVAILABLE"],
|
|
40
|
+
["backoffMultiplier"]: 2,
|
|
41
|
+
["initialBackoff"]: "0.5s",
|
|
42
|
+
["maxBackoff"]: "15s",
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async click(...args) {
|
|
48
|
+
return this.UiAutomator
|
|
49
|
+
.selectorClick(...args);
|
|
50
|
+
}
|
|
51
|
+
async waitFor(...args) {
|
|
52
|
+
args[0] = Object.assign({ timeout: 10000 }, args[0]);
|
|
53
|
+
return this.UiAutomator
|
|
54
|
+
.selectorWaitForExists(...args)
|
|
55
|
+
.then(async (exists) => {
|
|
56
|
+
if (!exists.value) {
|
|
57
|
+
throw new TimeoutException(args[0]);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async sleep(min = 500, max = min) {
|
|
62
|
+
const ms = Math.random() * (max - min) + min;
|
|
63
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
64
|
+
}
|
|
65
|
+
async passwd(pwd, keyboard) {
|
|
66
|
+
for (let i = 0; i < pwd.length; i++) {
|
|
67
|
+
await this.click(keyboard[pwd[i]]);
|
|
68
|
+
await this.sleep(100, 200);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async open(data) {
|
|
72
|
+
return this.Application
|
|
73
|
+
.startActivity({
|
|
74
|
+
data,
|
|
75
|
+
action: ACTION_VIEW,
|
|
76
|
+
flags: (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_CLEAR_TASK)
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async stop(...args) {
|
|
80
|
+
return this.Application
|
|
81
|
+
.stopApplication(...args);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
__decorate([
|
|
85
|
+
Inject(UtilDefinition),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], Device.prototype, "Util", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
Inject(UiAutomatorDefinition),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], Device.prototype, "UiAutomator", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
Inject(ApplicationDefinition),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], Device.prototype, "Application", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
Inject(DebugDefinition),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], Device.prototype, "Debug", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
Inject(FileDefinition),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], Device.prototype, "File", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
Inject(LockDefinition),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], Device.prototype, "Lock", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
Inject(ProxyDefinition),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], Device.prototype, "Proxy", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
Inject(SelinuxPolicyDefinition),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], Device.prototype, "Selinux", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
Inject(ShellDefinition),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], Device.prototype, "Shell", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
Inject(StatusDefinition),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], Device.prototype, "Status", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
Inject(StorageDefinition),
|
|
126
|
+
__metadata("design:type", Object)
|
|
127
|
+
], Device.prototype, "Storage", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
Inject(WifiDefinition),
|
|
130
|
+
__metadata("design:type", Object)
|
|
131
|
+
], Device.prototype, "Wifi", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
Inject(SettingsDefinition),
|
|
134
|
+
__metadata("design:type", Object)
|
|
135
|
+
], Device.prototype, "Settings", void 0);
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "lamda.rpc";
|
|
3
|
+
export declare enum GrantType {
|
|
4
|
+
GRANT_ALLOW = 0,
|
|
5
|
+
GRANT_DENY = 1,
|
|
6
|
+
GRANT_IGNORE = 2,
|
|
7
|
+
UNRECOGNIZED = -1
|
|
8
|
+
}
|
|
9
|
+
export declare function grantTypeFromJSON(object: any): GrantType;
|
|
10
|
+
export declare function grantTypeToJSON(object: GrantType): string;
|
|
11
|
+
export declare enum DataEncode {
|
|
12
|
+
DATA_ENCODE_NONE = 0,
|
|
13
|
+
DATA_ENCODE_ZLIB = 1,
|
|
14
|
+
UNRECOGNIZED = -1
|
|
15
|
+
}
|
|
16
|
+
export declare function dataEncodeFromJSON(object: any): DataEncode;
|
|
17
|
+
export declare function dataEncodeToJSON(object: DataEncode): string;
|
|
18
|
+
export declare enum ScriptRuntime {
|
|
19
|
+
RUNTIME_QJS = 0,
|
|
20
|
+
RUNTIME_V8 = 1,
|
|
21
|
+
UNRECOGNIZED = -1
|
|
22
|
+
}
|
|
23
|
+
export declare function scriptRuntimeFromJSON(object: any): ScriptRuntime;
|
|
24
|
+
export declare function scriptRuntimeToJSON(object: ScriptRuntime): string;
|
|
25
|
+
export interface ApplicationRequest {
|
|
26
|
+
name: string;
|
|
27
|
+
permission: string;
|
|
28
|
+
mode: GrantType;
|
|
29
|
+
path: string;
|
|
30
|
+
user: number;
|
|
31
|
+
}
|
|
32
|
+
export interface ApplicationActivityRequest {
|
|
33
|
+
package: string;
|
|
34
|
+
action: string;
|
|
35
|
+
category: string;
|
|
36
|
+
component: string;
|
|
37
|
+
extras: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
} | undefined;
|
|
40
|
+
categories: string[];
|
|
41
|
+
flags: number;
|
|
42
|
+
debug: boolean;
|
|
43
|
+
data: string;
|
|
44
|
+
user: number;
|
|
45
|
+
}
|
|
46
|
+
export interface ApplicationActivityInfo {
|
|
47
|
+
package: string;
|
|
48
|
+
action: string;
|
|
49
|
+
category: string;
|
|
50
|
+
component: string;
|
|
51
|
+
extras: {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
} | undefined;
|
|
54
|
+
categories: string[];
|
|
55
|
+
flags: number;
|
|
56
|
+
debug: boolean;
|
|
57
|
+
data: string;
|
|
58
|
+
user: number;
|
|
59
|
+
}
|
|
60
|
+
export interface ApplicationActivityInfoList {
|
|
61
|
+
activities: ApplicationActivityInfo[];
|
|
62
|
+
}
|
|
63
|
+
export interface ApplicationPermissions {
|
|
64
|
+
permissions: string[];
|
|
65
|
+
}
|
|
66
|
+
export interface ApplicationInfo {
|
|
67
|
+
packageName: string;
|
|
68
|
+
uid: number;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
processName: string;
|
|
71
|
+
sourceDir: string;
|
|
72
|
+
dataDir: string;
|
|
73
|
+
baseRevisionCode: number;
|
|
74
|
+
firstInstallTime: number;
|
|
75
|
+
lastUpdateTime: number;
|
|
76
|
+
versionCode: number;
|
|
77
|
+
versionName: string;
|
|
78
|
+
activity: string;
|
|
79
|
+
user: number;
|
|
80
|
+
}
|
|
81
|
+
export interface ApplicationProcess {
|
|
82
|
+
packages: string[];
|
|
83
|
+
processName: string;
|
|
84
|
+
uid: number;
|
|
85
|
+
pid: number;
|
|
86
|
+
}
|
|
87
|
+
export interface ApplicationProcesses {
|
|
88
|
+
processes: ApplicationProcess[];
|
|
89
|
+
}
|
|
90
|
+
export interface ApplicationPkgNames {
|
|
91
|
+
names: string[];
|
|
92
|
+
}
|
|
93
|
+
export interface HookRequest {
|
|
94
|
+
package: string;
|
|
95
|
+
script: Uint8Array;
|
|
96
|
+
runtime: ScriptRuntime;
|
|
97
|
+
destination: string;
|
|
98
|
+
encode: DataEncode;
|
|
99
|
+
standup: number;
|
|
100
|
+
spawn: boolean;
|
|
101
|
+
user: number;
|
|
102
|
+
}
|
|
103
|
+
export interface HookRpcRequest {
|
|
104
|
+
package: string;
|
|
105
|
+
callinfo: string;
|
|
106
|
+
user: number;
|
|
107
|
+
}
|
|
108
|
+
export interface HookRpcResponse {
|
|
109
|
+
package: string;
|
|
110
|
+
callresult: string;
|
|
111
|
+
}
|
|
112
|
+
export declare const ApplicationRequest: MessageFns<ApplicationRequest>;
|
|
113
|
+
export declare const ApplicationActivityRequest: MessageFns<ApplicationActivityRequest>;
|
|
114
|
+
export declare const ApplicationActivityInfo: MessageFns<ApplicationActivityInfo>;
|
|
115
|
+
export declare const ApplicationActivityInfoList: MessageFns<ApplicationActivityInfoList>;
|
|
116
|
+
export declare const ApplicationPermissions: MessageFns<ApplicationPermissions>;
|
|
117
|
+
export declare const ApplicationInfo: MessageFns<ApplicationInfo>;
|
|
118
|
+
export declare const ApplicationProcess: MessageFns<ApplicationProcess>;
|
|
119
|
+
export declare const ApplicationProcesses: MessageFns<ApplicationProcesses>;
|
|
120
|
+
export declare const ApplicationPkgNames: MessageFns<ApplicationPkgNames>;
|
|
121
|
+
export declare const HookRequest: MessageFns<HookRequest>;
|
|
122
|
+
export declare const HookRpcRequest: MessageFns<HookRpcRequest>;
|
|
123
|
+
export declare const HookRpcResponse: MessageFns<HookRpcResponse>;
|
|
124
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
125
|
+
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 {} ? {
|
|
126
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
127
|
+
} : Partial<T>;
|
|
128
|
+
export interface MessageFns<T> {
|
|
129
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
130
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
131
|
+
fromJSON(object: any): T;
|
|
132
|
+
toJSON(message: T): unknown;
|
|
133
|
+
create(base?: DeepPartial<T>): T;
|
|
134
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
135
|
+
}
|
|
136
|
+
export {};
|