@maaxyz/maa-node 0.0.1-alpha.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/agent/maatouch/universal/maatouch +0 -0
- package/agent/minicap/arm64-v8a/bin/minicap +0 -0
- package/agent/minicap/arm64-v8a/bin/minicap-nopie +0 -0
- package/agent/minicap/arm64-v8a/lib/android-21/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-22/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-23/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-24/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-25/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-26/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-27/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-28/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-29/minicap +0 -0
- package/agent/minicap/arm64-v8a/lib/android-29/minicap-nopie +0 -0
- package/agent/minicap/arm64-v8a/lib/android-29/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-30/minicap.so +0 -0
- package/agent/minicap/arm64-v8a/lib/android-31/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/bin/minicap +0 -0
- package/agent/minicap/armeabi-v7a/bin/minicap-nopie +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-10/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-14/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-15/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-16/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-17/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-18/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-19/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-21/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-22/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-23/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-24/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-25/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-26/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-27/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-28/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-29/minicap +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-29/minicap-nopie +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-29/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-30/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-31/minicap.so +0 -0
- package/agent/minicap/armeabi-v7a/lib/android-9/minicap.so +0 -0
- package/agent/minicap/x86/bin/minicap +0 -0
- package/agent/minicap/x86/bin/minicap-nopie +0 -0
- package/agent/minicap/x86/lib/android-14/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-15/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-16/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-17/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-18/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-19/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-21/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-22/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-23/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-24/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-25/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-26/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-27/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-28/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-29/minicap +0 -0
- package/agent/minicap/x86/lib/android-29/minicap-nopie +0 -0
- package/agent/minicap/x86/lib/android-29/minicap.so +0 -0
- package/agent/minicap/x86/lib/android-31/minicap.so +0 -0
- package/agent/minicap/x86_64/bin/minicap +0 -0
- package/agent/minicap/x86_64/bin/minicap-nopie +0 -0
- package/agent/minicap/x86_64/lib/android-21/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-22/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-23/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-24/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-25/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-26/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-27/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-28/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-29/minicap +0 -0
- package/agent/minicap/x86_64/lib/android-29/minicap-nopie +0 -0
- package/agent/minicap/x86_64/lib/android-29/minicap.so +0 -0
- package/agent/minicap/x86_64/lib/android-31/minicap.so +0 -0
- package/agent/minitouch/arm64-v8a/minitouch +0 -0
- package/agent/minitouch/armeabi/minitouch +0 -0
- package/agent/minitouch/armeabi-v7a/minitouch +0 -0
- package/agent/minitouch/x86/minitouch +0 -0
- package/agent/minitouch/x86_64/minitouch +0 -0
- package/dist/context.d.ts +52 -0
- package/dist/controller.d.ts +105 -0
- package/dist/global.d.ts +10 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1028 -0
- package/dist/job.d.ts +23 -0
- package/dist/maa.d.ts +376 -0
- package/dist/pi.d.ts +9 -0
- package/dist/pipeline.d.ts +249 -0
- package/dist/resource.d.ts +36 -0
- package/dist/tasker.d.ts +128 -0
- package/dist/types.d.ts +27 -0
- package/package.json +33 -0
- package/scripts/build.mjs +20 -0
- package/src/context.ts +78 -0
- package/src/controller.ts +366 -0
- package/src/global.ts +49 -0
- package/src/index.ts +9 -0
- package/src/job.ts +68 -0
- package/src/maa.d.ts +376 -0
- package/src/maa.js +27 -0
- package/src/pi.ts +62 -0
- package/src/pipeline.ts +694 -0
- package/src/resource.ts +173 -0
- package/src/tasker.ts +231 -0
- package/src/types.ts +31 -0
- package/tsconfig.json +9 -0
package/dist/job.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as maa from './maa';
|
|
2
|
+
export interface JobSource<Id> {
|
|
3
|
+
status(id: Id): maa.Status;
|
|
4
|
+
wait(id: Id): Promise<maa.Status>;
|
|
5
|
+
}
|
|
6
|
+
export declare class Job<Id, Source extends JobSource<Id>> {
|
|
7
|
+
#private;
|
|
8
|
+
source: Source;
|
|
9
|
+
id: Id;
|
|
10
|
+
constructor(source: Source, id: Id);
|
|
11
|
+
get status(): maa.Status;
|
|
12
|
+
wait(): Promise<this> & {
|
|
13
|
+
status: Promise<maa.Status>;
|
|
14
|
+
done: Promise<boolean>;
|
|
15
|
+
succeeded: Promise<boolean>;
|
|
16
|
+
failed: Promise<boolean>;
|
|
17
|
+
};
|
|
18
|
+
get done(): boolean;
|
|
19
|
+
get succeeded(): boolean;
|
|
20
|
+
get failed(): boolean;
|
|
21
|
+
get running(): boolean;
|
|
22
|
+
get pending(): boolean;
|
|
23
|
+
}
|
package/dist/maa.d.ts
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
export type ResourceHandle = { __brand: 'ResourceHandle' }
|
|
2
|
+
export type ControllerHandle = { __brand: 'ControllerHandle' }
|
|
3
|
+
export type TaskerHandle = { __brand: 'TaskerHandle' }
|
|
4
|
+
export type ContextHandle = { __brand: 'ContextHandle' }
|
|
5
|
+
export type DesktopHandle = string & { __brand: 'DesktopHandle' }
|
|
6
|
+
|
|
7
|
+
type Uint64 = number | string
|
|
8
|
+
type Id = Uint64
|
|
9
|
+
type ScreencapOrInputMethods = Uint64
|
|
10
|
+
|
|
11
|
+
export type ResId = Id & { __brand: 'ResId' }
|
|
12
|
+
export type CtrlId = Id & { __brand: 'CtrlId' }
|
|
13
|
+
export type TaskId = Id & { __brand: 'TaskId' }
|
|
14
|
+
export type RecoId = Id & { __brand: 'RecoId' }
|
|
15
|
+
export type NodeId = Id & { __brand: 'NodeId' }
|
|
16
|
+
|
|
17
|
+
export type Status = number & { __brand: 'Status' }
|
|
18
|
+
export type LoggingLevel = number & { __brand: 'LoggingLevel' }
|
|
19
|
+
export type InferenceDevice = number & { __brand: 'InferenceDevice' }
|
|
20
|
+
export type InferenceExecutionProvider = number & { __brand: 'InferenceExecutionProvider' }
|
|
21
|
+
|
|
22
|
+
export type ImageData = ArrayBuffer
|
|
23
|
+
|
|
24
|
+
export type Rect = {
|
|
25
|
+
x: number
|
|
26
|
+
y: number
|
|
27
|
+
width: number
|
|
28
|
+
height: number
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type FlatRect = [x: number, y: number, width: number, height: number]
|
|
32
|
+
|
|
33
|
+
type MaybePromise<T> = T | Promise<T>
|
|
34
|
+
|
|
35
|
+
export type NotificationCallback = (message: string, details_json: string) => MaybePromise<void>
|
|
36
|
+
export type CustomRecognitionCallback = (
|
|
37
|
+
context: ContextHandle,
|
|
38
|
+
task_id: TaskId,
|
|
39
|
+
current_task_name: string,
|
|
40
|
+
custom_recognition_name: string,
|
|
41
|
+
custom_recognition_param: string,
|
|
42
|
+
image: ImageData,
|
|
43
|
+
roi: Rect
|
|
44
|
+
) => MaybePromise<[out_box: Rect, out_detail: string] | null>
|
|
45
|
+
export type CustomActionCallback = (
|
|
46
|
+
context: ContextHandle,
|
|
47
|
+
task_id: TaskId,
|
|
48
|
+
current_task_name: string,
|
|
49
|
+
custom_action_name: string,
|
|
50
|
+
custom_action_param: string,
|
|
51
|
+
reco_id: RecoId,
|
|
52
|
+
box: Rect
|
|
53
|
+
) => MaybePromise<boolean>
|
|
54
|
+
|
|
55
|
+
export type CustomControllerParamResultMap = {
|
|
56
|
+
connect: [[], boolean]
|
|
57
|
+
request_uuid: [[], string | null]
|
|
58
|
+
start_app: [[intent: string], boolean]
|
|
59
|
+
stop_app: [[intent: string], boolean]
|
|
60
|
+
screencap: [[], ImageData | null]
|
|
61
|
+
click: [[x: number, y: number], boolean]
|
|
62
|
+
swipe: [[x1: number, y1: number, x2: number, y2: number, duration: number], boolean]
|
|
63
|
+
touch_down: [[contact: number, x: number, y: number, pressure: number], boolean]
|
|
64
|
+
touch_move: [[contact: number, x: number, y: number, pressure: number], boolean]
|
|
65
|
+
touch_up: [[contact: number], boolean]
|
|
66
|
+
press_key: [[keycode: number], boolean]
|
|
67
|
+
input_text: [[text: string], boolean]
|
|
68
|
+
}
|
|
69
|
+
export type CustomControllerCallback = (
|
|
70
|
+
action: keyof CustomControllerParamResultMap,
|
|
71
|
+
...param: any[]
|
|
72
|
+
) => MaybePromise<any>
|
|
73
|
+
|
|
74
|
+
// context.cpp
|
|
75
|
+
|
|
76
|
+
export declare function context_run_pipeline(
|
|
77
|
+
context: ContextHandle,
|
|
78
|
+
entry: string,
|
|
79
|
+
pipeline_override: string
|
|
80
|
+
): Promise<TaskId>
|
|
81
|
+
export declare function context_run_recognition(
|
|
82
|
+
context: ContextHandle,
|
|
83
|
+
entry: string,
|
|
84
|
+
pipeline_override: string,
|
|
85
|
+
image: ImageData
|
|
86
|
+
): Promise<RecoId>
|
|
87
|
+
export declare function context_run_action(
|
|
88
|
+
context: ContextHandle,
|
|
89
|
+
entry: string,
|
|
90
|
+
pipeline_override: string,
|
|
91
|
+
box: Rect,
|
|
92
|
+
reco_detail: string
|
|
93
|
+
): Promise<NodeId>
|
|
94
|
+
export declare function context_override_pipeline(
|
|
95
|
+
context: ContextHandle,
|
|
96
|
+
pipeline_override: string
|
|
97
|
+
): boolean
|
|
98
|
+
export declare function context_override_next(
|
|
99
|
+
context: ContextHandle,
|
|
100
|
+
name: string,
|
|
101
|
+
next: string[]
|
|
102
|
+
): boolean
|
|
103
|
+
export declare function context_get_task_id(context: ContextHandle): TaskId
|
|
104
|
+
export declare function context_get_tasker(context: ContextHandle): TaskerHandle
|
|
105
|
+
export declare function context_clone(context: ContextHandle): ContextHandle
|
|
106
|
+
|
|
107
|
+
// controller.cpp
|
|
108
|
+
|
|
109
|
+
export declare function adb_controller_create(
|
|
110
|
+
adb_path: string,
|
|
111
|
+
address: string,
|
|
112
|
+
screencap_methods: ScreencapOrInputMethods,
|
|
113
|
+
input_methods: ScreencapOrInputMethods,
|
|
114
|
+
config: string,
|
|
115
|
+
agent_path: string,
|
|
116
|
+
callback: NotificationCallback | null
|
|
117
|
+
): ControllerHandle | null
|
|
118
|
+
export declare function win32_controller_create(
|
|
119
|
+
handle: DesktopHandle,
|
|
120
|
+
screencap_methods: ScreencapOrInputMethods,
|
|
121
|
+
input_methods: ScreencapOrInputMethods,
|
|
122
|
+
callback: NotificationCallback | null
|
|
123
|
+
): ControllerHandle | null
|
|
124
|
+
export declare function custom_controller_create(
|
|
125
|
+
custom_callback: CustomControllerCallback,
|
|
126
|
+
callback: NotificationCallback | null
|
|
127
|
+
): ControllerHandle | null
|
|
128
|
+
export declare function dbg_controller_create(
|
|
129
|
+
read_path: string,
|
|
130
|
+
write_path: string,
|
|
131
|
+
type: Uint64,
|
|
132
|
+
config: string,
|
|
133
|
+
callback: NotificationCallback | null
|
|
134
|
+
): ControllerHandle | null
|
|
135
|
+
export declare function controller_destroy(handle: ControllerHandle): void
|
|
136
|
+
export declare function controller_set_option_screenshot_target_long_side(
|
|
137
|
+
handle: ControllerHandle,
|
|
138
|
+
value: number
|
|
139
|
+
): boolean
|
|
140
|
+
export declare function controller_set_option_screenshot_target_short_side(
|
|
141
|
+
handle: ControllerHandle,
|
|
142
|
+
value: number
|
|
143
|
+
): boolean
|
|
144
|
+
export declare function controller_set_option_screenshot_use_raw_size(
|
|
145
|
+
handle: ControllerHandle,
|
|
146
|
+
value: boolean
|
|
147
|
+
): boolean
|
|
148
|
+
export declare function controller_set_option_recording(
|
|
149
|
+
handle: ControllerHandle,
|
|
150
|
+
value: boolean
|
|
151
|
+
): boolean
|
|
152
|
+
export declare function controller_post_connection(handle: ControllerHandle): CtrlId
|
|
153
|
+
export declare function controller_post_click(
|
|
154
|
+
handle: ControllerHandle,
|
|
155
|
+
x: number,
|
|
156
|
+
y: number
|
|
157
|
+
): CtrlId
|
|
158
|
+
export declare function controller_post_swipe(
|
|
159
|
+
handle: ControllerHandle,
|
|
160
|
+
x1: number,
|
|
161
|
+
y1: number,
|
|
162
|
+
x2: number,
|
|
163
|
+
y2: number,
|
|
164
|
+
duration: number
|
|
165
|
+
): CtrlId
|
|
166
|
+
export declare function controller_post_press_key(handle: ControllerHandle, keycode: number): CtrlId
|
|
167
|
+
export declare function controller_post_input_text(handle: ControllerHandle, text: string): CtrlId
|
|
168
|
+
export declare function controller_post_start_app(handle: ControllerHandle, intent: string): CtrlId
|
|
169
|
+
export declare function controller_post_stop_app(handle: ControllerHandle, intent: string): CtrlId
|
|
170
|
+
export declare function controller_post_touch_down(
|
|
171
|
+
handle: ControllerHandle,
|
|
172
|
+
contact: number,
|
|
173
|
+
x: number,
|
|
174
|
+
y: number,
|
|
175
|
+
pressure: number
|
|
176
|
+
): CtrlId
|
|
177
|
+
export declare function controller_post_touch_move(
|
|
178
|
+
handle: ControllerHandle,
|
|
179
|
+
contact: number,
|
|
180
|
+
x: number,
|
|
181
|
+
y: number,
|
|
182
|
+
pressure: number
|
|
183
|
+
): CtrlId
|
|
184
|
+
export declare function controller_post_touch_up(handle: ControllerHandle, contact: number): CtrlId
|
|
185
|
+
export declare function controller_post_screencap(handle: ControllerHandle): CtrlId
|
|
186
|
+
export declare function controller_status(handle: ControllerHandle, ctrl_id: CtrlId): Status
|
|
187
|
+
export declare function controller_wait(handle: ControllerHandle, ctrl_id: CtrlId): Promise<Status>
|
|
188
|
+
export declare function controller_connected(handle: ControllerHandle): boolean
|
|
189
|
+
export declare function controller_cached_image(handle: ControllerHandle): ImageData | null
|
|
190
|
+
export declare function controller_get_uuid(handle: ControllerHandle): string | null
|
|
191
|
+
|
|
192
|
+
// resource.cpp
|
|
193
|
+
|
|
194
|
+
export declare function resource_create(
|
|
195
|
+
callback: NotificationCallback | null
|
|
196
|
+
): ResourceHandle | null
|
|
197
|
+
export declare function resource_destroy(handle: ResourceHandle): void
|
|
198
|
+
export declare function resource_set_option_inference_device(
|
|
199
|
+
handle: ResourceHandle,
|
|
200
|
+
id: InferenceDevice | number
|
|
201
|
+
): boolean
|
|
202
|
+
export declare function resource_set_option_inference_execution_provider(
|
|
203
|
+
handle: ResourceHandle,
|
|
204
|
+
provider: InferenceExecutionProvider
|
|
205
|
+
): boolean
|
|
206
|
+
export declare function resource_register_custom_recognition(
|
|
207
|
+
handle: ResourceHandle,
|
|
208
|
+
name: string,
|
|
209
|
+
recognizer: CustomRecognitionCallback
|
|
210
|
+
): boolean
|
|
211
|
+
export declare function resource_unregister_custom_recognition(
|
|
212
|
+
handle: ResourceHandle,
|
|
213
|
+
name: string
|
|
214
|
+
): boolean
|
|
215
|
+
export declare function resource_clear_custom_recognition(handle: ResourceHandle): boolean
|
|
216
|
+
export declare function resource_register_custom_action(
|
|
217
|
+
handle: ResourceHandle,
|
|
218
|
+
name: string,
|
|
219
|
+
action: CustomActionCallback
|
|
220
|
+
): boolean
|
|
221
|
+
export declare function resource_unregister_custom_action(
|
|
222
|
+
handle: ResourceHandle,
|
|
223
|
+
name: string
|
|
224
|
+
): boolean
|
|
225
|
+
export declare function resource_clear_custom_action(handle: ResourceHandle): boolean
|
|
226
|
+
export declare function resource_post_path(handle: ResourceHandle, path: string): ResId
|
|
227
|
+
export declare function resource_clear(handle: ResourceHandle): boolean
|
|
228
|
+
export declare function resource_status(handle: ResourceHandle, res_id: ResId): Status
|
|
229
|
+
export declare function resource_wait(handle: ResourceHandle, res_id: ResId): Promise<Status>
|
|
230
|
+
export declare function resource_loaded(handle: ResourceHandle): boolean
|
|
231
|
+
export declare function resource_get_hash(handle: ResourceHandle): string | null
|
|
232
|
+
export declare function resource_get_task_list(handle: ResourceHandle): string[] | null
|
|
233
|
+
|
|
234
|
+
// tasker.cpp
|
|
235
|
+
|
|
236
|
+
export declare function tasker_create(callback: NotificationCallback | null): TaskerHandle | null
|
|
237
|
+
export declare function tasker_destroy(handle: TaskerHandle): void
|
|
238
|
+
export declare function tasker_bind_resource(
|
|
239
|
+
handle: TaskerHandle,
|
|
240
|
+
resource: ResourceHandle | null
|
|
241
|
+
): boolean
|
|
242
|
+
export declare function tasker_bind_controller(
|
|
243
|
+
handle: TaskerHandle,
|
|
244
|
+
controller: ControllerHandle | null
|
|
245
|
+
): boolean
|
|
246
|
+
export declare function tasker_inited(handle: TaskerHandle): boolean
|
|
247
|
+
export declare function tasker_post_pipeline(
|
|
248
|
+
handle: TaskerHandle,
|
|
249
|
+
entry: string,
|
|
250
|
+
pipeline_override: string
|
|
251
|
+
): TaskId
|
|
252
|
+
export declare function tasker_status(handle: TaskerHandle, task_id: TaskId): Status
|
|
253
|
+
export declare function tasker_wait(handle: TaskerHandle, task_id: TaskId): Promise<Status>
|
|
254
|
+
export declare function tasker_running(handle: TaskerHandle): boolean
|
|
255
|
+
export declare function tasker_post_stop(handle: TaskerHandle): TaskId
|
|
256
|
+
export declare function tasker_get_resource(handle: TaskerHandle): ResourceHandle | null
|
|
257
|
+
export declare function tasker_get_controller(handle: TaskerHandle): ControllerHandle | null
|
|
258
|
+
export declare function tasker_clear_cache(handle: TaskerHandle): boolean
|
|
259
|
+
export declare function tasker_get_recognition_detail(
|
|
260
|
+
handle: TaskerHandle,
|
|
261
|
+
reco_id: RecoId
|
|
262
|
+
):
|
|
263
|
+
| [
|
|
264
|
+
name: string,
|
|
265
|
+
algorithm: string,
|
|
266
|
+
hit: boolean,
|
|
267
|
+
box: Rect,
|
|
268
|
+
detail: string,
|
|
269
|
+
raw: ImageData,
|
|
270
|
+
draws: ImageData[]
|
|
271
|
+
]
|
|
272
|
+
| null
|
|
273
|
+
export declare function tasker_get_node_detail(
|
|
274
|
+
handle: TaskerHandle,
|
|
275
|
+
node_id: NodeId
|
|
276
|
+
): [name: string, reco_id: RecoId, completed: boolean] | null
|
|
277
|
+
export declare function tasker_get_task_detail(
|
|
278
|
+
handle: TaskerHandle,
|
|
279
|
+
task_id: TaskId
|
|
280
|
+
): [entry: string, node_ids: NodeId[], status: Status] | null
|
|
281
|
+
export declare function tasker_get_latest_node(
|
|
282
|
+
handle: TaskerHandle,
|
|
283
|
+
task_name: string
|
|
284
|
+
): NodeId | null
|
|
285
|
+
|
|
286
|
+
// config.cpp
|
|
287
|
+
|
|
288
|
+
export declare function config_init_option(user_path: string, default_json: string): boolean
|
|
289
|
+
|
|
290
|
+
// find.cpp
|
|
291
|
+
|
|
292
|
+
export declare function find_adb(
|
|
293
|
+
adb_path: string | null
|
|
294
|
+
): Promise<
|
|
295
|
+
| [
|
|
296
|
+
name: string,
|
|
297
|
+
adb_path: string,
|
|
298
|
+
address: string,
|
|
299
|
+
screencap_methods: ScreencapOrInputMethods,
|
|
300
|
+
input_methods: ScreencapOrInputMethods,
|
|
301
|
+
config: string
|
|
302
|
+
][]
|
|
303
|
+
| null
|
|
304
|
+
>
|
|
305
|
+
export declare function find_desktop(): Promise<
|
|
306
|
+
[handle: DesktopHandle, class_name: string, window_name: string][] | null
|
|
307
|
+
>
|
|
308
|
+
|
|
309
|
+
// utility.cpp
|
|
310
|
+
|
|
311
|
+
export declare function version(): string
|
|
312
|
+
export declare function set_global_option_log_dir(value: string): boolean
|
|
313
|
+
export declare function set_global_option_save_draw(value: boolean): boolean
|
|
314
|
+
export declare function set_global_option_recording(value: boolean): boolean
|
|
315
|
+
export declare function set_global_option_stdout_level(value: LoggingLevel): boolean
|
|
316
|
+
export declare function set_global_option_show_hit_draw(value: boolean): boolean
|
|
317
|
+
export declare function set_global_option_debug_mode(value: boolean): boolean
|
|
318
|
+
|
|
319
|
+
// pi.cpp
|
|
320
|
+
|
|
321
|
+
export declare function pi_register_custom_recognizer(
|
|
322
|
+
id: Id,
|
|
323
|
+
name: string,
|
|
324
|
+
recognizer: CustomRecognitionCallback
|
|
325
|
+
): void
|
|
326
|
+
export declare function pi_register_custom_action(
|
|
327
|
+
id: Id,
|
|
328
|
+
name: string,
|
|
329
|
+
action: CustomActionCallback
|
|
330
|
+
): void
|
|
331
|
+
export declare function pi_run_cli(
|
|
332
|
+
id: Id,
|
|
333
|
+
resource_path: string,
|
|
334
|
+
user_path: string,
|
|
335
|
+
directly: boolean,
|
|
336
|
+
callback: NotificationCallback | null
|
|
337
|
+
): Promise<boolean>
|
|
338
|
+
|
|
339
|
+
// export declare function unwrap_window_hwnd(hwnd: Win32Hwnd): string
|
|
340
|
+
// export declare function wrap_window_hwnd(hwnd: string): Win32Hwnd | null
|
|
341
|
+
|
|
342
|
+
export declare const Status: Record<
|
|
343
|
+
'Invalid' | 'Pending' | 'Running' | 'Succeeded' | 'Failed',
|
|
344
|
+
Status
|
|
345
|
+
>
|
|
346
|
+
export declare const LoggingLevel: Record<
|
|
347
|
+
'Off' | 'Fatal' | 'Error' | 'Warn' | 'Info' | 'Debug' | 'Trace' | 'All',
|
|
348
|
+
LoggingLevel
|
|
349
|
+
>
|
|
350
|
+
export declare const AdbScreencapMethod: Record<
|
|
351
|
+
| 'EncodeToFileAndPull'
|
|
352
|
+
| 'Encode'
|
|
353
|
+
| 'RawWithGzip'
|
|
354
|
+
| 'RawByNetcat'
|
|
355
|
+
| 'MinicapDirect'
|
|
356
|
+
| 'MinicapStream'
|
|
357
|
+
| 'EmulatorExtras'
|
|
358
|
+
| 'All'
|
|
359
|
+
| 'Default',
|
|
360
|
+
ScreencapOrInputMethods
|
|
361
|
+
>
|
|
362
|
+
export declare const AdbInputMethod: Record<
|
|
363
|
+
'AdbShell' | 'MinitouchAndAdbKey' | 'Maatouch' | 'EmulatorExtras' | 'All' | 'Default',
|
|
364
|
+
ScreencapOrInputMethods
|
|
365
|
+
>
|
|
366
|
+
export declare const Win32ScreencapMethod: Record<
|
|
367
|
+
'GDI' | 'FramePool' | 'DXGI_DesktopDup',
|
|
368
|
+
ScreencapOrInputMethods
|
|
369
|
+
>
|
|
370
|
+
export declare const Win32InputMethod: Record<'Seize' | 'SendMessage', ScreencapOrInputMethods>
|
|
371
|
+
export declare const DbgControllerType: Record<'CarouselImage' | 'ReplayRecording', Uint64>
|
|
372
|
+
export declare const InferenceDevice: Record<'CPU' | 'Auto', InferenceDevice>
|
|
373
|
+
export declare const InferenceExecutionProvider: Record<
|
|
374
|
+
'Auto' | 'CPU' | 'DirectML' | 'CoreML' | 'CUDA',
|
|
375
|
+
InferenceExecutionProvider
|
|
376
|
+
>
|
package/dist/pi.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as maa from './maa';
|
|
2
|
+
import { CustomActionCallback, CustomRecognizerCallback } from './types';
|
|
3
|
+
export declare const Pi: {
|
|
4
|
+
__running: boolean;
|
|
5
|
+
notify(message: string, details_json: string): maa.MaybePromise<void>;
|
|
6
|
+
register_custom_recognizer(id: maa.Id, name: string, func: CustomRecognizerCallback): void;
|
|
7
|
+
register_custom_action(id: maa.Id, name: string, func: CustomActionCallback): void;
|
|
8
|
+
run_cli(id: maa.Id, resource_path: string, user_path: string, directly: boolean): Promise<boolean>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
type RecoType = 'DirectHit' | 'TemplateMatch' | 'FeatureMatch' | 'ColorMatch' | 'OCR' | 'NeuralNetworkClassify' | 'NeuralNetworkDetect' | 'Custom';
|
|
2
|
+
type ActType = 'DoNothing' | 'Click' | 'Swipe' | 'Key' | 'Text' | 'StartApp' | 'StopApp' | 'StopTask' | 'Custom';
|
|
3
|
+
type OrderByMap = {
|
|
4
|
+
TemplateMatch: 'Horizontal' | 'Vertical' | 'Score' | 'Random';
|
|
5
|
+
FeatureMatch: 'Horizontal' | 'Vertical' | 'Score' | 'Area' | 'Random';
|
|
6
|
+
ColorMatch: 'Horizontal' | 'Vertical' | 'Score' | 'Area' | 'Random';
|
|
7
|
+
OCR: 'Horizontal' | 'Vertical' | 'Area' | 'Length' | 'Random';
|
|
8
|
+
NeuralNetworkClassify: 'Horizontal' | 'Vertical' | 'Score' | 'Random';
|
|
9
|
+
NeuralNetworkDetect: 'Horizontal' | 'Vertical' | 'Score' | 'Area' | 'Random';
|
|
10
|
+
};
|
|
11
|
+
type PipelineBuilderState<Json = {}> = {
|
|
12
|
+
done: Json;
|
|
13
|
+
} & ('recognition' extends keyof Json ? {} : {
|
|
14
|
+
recognition<R extends RecoType>(reco: R): PipelineRecognitionBuilderState<Json & {
|
|
15
|
+
recognition: R;
|
|
16
|
+
}, R>;
|
|
17
|
+
}) & ('action' extends keyof Json ? {} : {
|
|
18
|
+
action<A extends ActType>(act: A): PipelineActionBuilderState<Json & {
|
|
19
|
+
action: A;
|
|
20
|
+
}, A>;
|
|
21
|
+
}) & ('next' extends keyof Json ? {} : {
|
|
22
|
+
next<N extends string[]>(...nxt: [...N]): PipelineBuilderState<Json & {
|
|
23
|
+
next: N;
|
|
24
|
+
}>;
|
|
25
|
+
}) & ('interrupt' extends keyof Json ? {} : {
|
|
26
|
+
interrupt<I extends string[]>(...int: [...I]): PipelineBuilderState<Json & {
|
|
27
|
+
interrupt: I;
|
|
28
|
+
}>;
|
|
29
|
+
}) & ('rate_limit' extends keyof Json ? {} : {
|
|
30
|
+
rate_limit<R extends number>(rate: R): PipelineBuilderState<Json & {
|
|
31
|
+
rate_limit: R;
|
|
32
|
+
}>;
|
|
33
|
+
}) & ('timeout' extends keyof Json ? {} : {
|
|
34
|
+
timeout<R extends number>(time: R): PipelineBuilderState<Json & {
|
|
35
|
+
timeout: R;
|
|
36
|
+
}>;
|
|
37
|
+
}) & ('on_error' extends keyof Json ? {} : {
|
|
38
|
+
on_error<O extends string[]>(...err: [...O]): PipelineBuilderState<Json & {
|
|
39
|
+
on_error: O;
|
|
40
|
+
}>;
|
|
41
|
+
}) & ('inverse' extends keyof Json ? {} : {
|
|
42
|
+
inverse<I extends boolean>(inv: I): PipelineBuilderState<Json & {
|
|
43
|
+
inverse: I;
|
|
44
|
+
}>;
|
|
45
|
+
}) & ('enabled' extends keyof Json ? {} : {
|
|
46
|
+
enabled<E extends boolean>(en: E): PipelineBuilderState<Json & {
|
|
47
|
+
enabled: E;
|
|
48
|
+
}>;
|
|
49
|
+
}) & ('pre_delay' extends keyof Json ? {} : {
|
|
50
|
+
pre_delay<P extends number>(pre: P): PipelineBuilderState<Json & {
|
|
51
|
+
pre_delay: P;
|
|
52
|
+
}>;
|
|
53
|
+
}) & ('post_delay' extends keyof Json ? {} : {
|
|
54
|
+
post_delay<P extends number>(post: P): PipelineBuilderState<Json & {
|
|
55
|
+
post_delay: P;
|
|
56
|
+
}>;
|
|
57
|
+
}) & ('pre_wait_freezes' extends keyof Json ? {} : {
|
|
58
|
+
pre_wait_freezes: PipelineWaitFreezeBuilderState<Json, 'pre_wait_freezes'>;
|
|
59
|
+
}) & ('post_wait_freezes' extends keyof Json ? {} : {
|
|
60
|
+
post_wait_freezes: PipelineWaitFreezeBuilderState<Json, 'post_wait_freezes'>;
|
|
61
|
+
}) & ('focus' extends keyof Json ? {} : {
|
|
62
|
+
focus<F extends boolean>(focus: F): PipelineBuilderState<Json & {
|
|
63
|
+
focus: F;
|
|
64
|
+
}>;
|
|
65
|
+
});
|
|
66
|
+
type PipelineRecognitionBuilderState<PBJson, Reco extends RecoType, Json = {}> = {
|
|
67
|
+
done: PipelineBuilderState<PBJson & Json>;
|
|
68
|
+
} & (Reco extends 'DirectHit' ? {} : ('roi' extends keyof Json ? {} : {
|
|
69
|
+
roi<R extends [string] | [number, number, number, number]>(...roi: R): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
70
|
+
roi: R extends [number, number, number, number] ? R : R[0];
|
|
71
|
+
}>;
|
|
72
|
+
}) & ('roi_offset' extends keyof Json ? {} : {
|
|
73
|
+
roi_offset<R extends [number, number, number, number]>(...roi: R): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
74
|
+
roi_offset: R;
|
|
75
|
+
}>;
|
|
76
|
+
})) & (Reco extends 'TemplateMatch' | 'FeatureMatch' ? 'template' extends keyof Json ? {} : {
|
|
77
|
+
template<T extends string[]>(...templ: [...T]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
78
|
+
template: T;
|
|
79
|
+
}>;
|
|
80
|
+
} : {}) & (Reco extends 'TemplateMatch' | 'NeuralNetworkDetect' ? 'threshold' extends keyof Json ? {} : {
|
|
81
|
+
threshold<T extends number[]>(...thres: [...T]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
82
|
+
threshold: T;
|
|
83
|
+
}>;
|
|
84
|
+
threshold$<T extends number>(thres: T): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
85
|
+
threshold: T;
|
|
86
|
+
}>;
|
|
87
|
+
} : {}) & (Reco extends keyof OrderByMap ? 'order_by' extends keyof Json ? {} : {
|
|
88
|
+
order_by<O extends OrderByMap[Reco]>(order: O): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
89
|
+
order_by: O;
|
|
90
|
+
}>;
|
|
91
|
+
} : {}) & (Reco extends keyof OrderByMap ? 'index' extends keyof Json ? {} : {
|
|
92
|
+
index<T extends number>(idx: T): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
93
|
+
index: T;
|
|
94
|
+
}>;
|
|
95
|
+
} : {}) & (Reco extends 'TemplateMatch' ? 'method' extends keyof Json ? {} : {
|
|
96
|
+
method<M extends 1 | 3 | 5>(method: M): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
97
|
+
method: M;
|
|
98
|
+
}>;
|
|
99
|
+
} : {}) & (Reco extends 'ColorMatch' ? 'method' extends keyof Json ? {} : {
|
|
100
|
+
method<M extends 4 | 40 | 6>(method: M): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
101
|
+
method: M;
|
|
102
|
+
}>;
|
|
103
|
+
} : {}) & (Reco extends 'TemplateMatch' | 'FeatureMatch' ? 'green_mask' extends keyof Json ? {} : {
|
|
104
|
+
green_mask<G extends boolean>(mask: G): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
105
|
+
green_mask: G;
|
|
106
|
+
}>;
|
|
107
|
+
} : {}) & (Reco extends 'FeatureMatch' | 'ColorMatch' ? 'count' extends keyof Json ? {} : {
|
|
108
|
+
count<C extends number>(count: C): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
109
|
+
count: C;
|
|
110
|
+
}>;
|
|
111
|
+
} : {}) & (Reco extends 'FeatureMatch' ? 'detector' extends keyof Json ? {} : {
|
|
112
|
+
detector<D extends 'SIFT' | 'KAZE' | 'AKAZE' | 'BRISK' | 'ORB'>(det: D): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
113
|
+
detector: D;
|
|
114
|
+
}>;
|
|
115
|
+
} : {}) & (Reco extends 'FeatureMatch' ? 'ratio' extends keyof Json ? {} : {
|
|
116
|
+
ratio<R extends number>(ratio: R): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
117
|
+
ratio: R;
|
|
118
|
+
}>;
|
|
119
|
+
} : {}) & (Reco extends 'ColorMatch' ? 'method' extends keyof Json ? ('lower' extends keyof Json ? {} : Json['method'] extends 4 | 40 ? {
|
|
120
|
+
lower<L extends [number, number, number][]>(...lower: [...L]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
121
|
+
lower: L;
|
|
122
|
+
}>;
|
|
123
|
+
} : {
|
|
124
|
+
lower<L extends [number][]>(...lower: [...L]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
125
|
+
lower: L;
|
|
126
|
+
}>;
|
|
127
|
+
}) & ('upper' extends keyof Json ? {} : Json['method'] extends 4 | 40 ? {
|
|
128
|
+
upper<L extends [number, number, number][]>(...upper: [...L]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
129
|
+
upper: L;
|
|
130
|
+
}>;
|
|
131
|
+
} : {
|
|
132
|
+
upper<U extends [number][]>(...upper: [...U]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
133
|
+
upper: U;
|
|
134
|
+
}>;
|
|
135
|
+
}) : {} : {}) & (Reco extends 'ColorMatch' ? 'connected' extends keyof Json ? {} : {
|
|
136
|
+
connected<C extends boolean>(conn: C): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
137
|
+
connected: C;
|
|
138
|
+
}>;
|
|
139
|
+
} : {}) & (Reco extends 'OCR' ? 'expected' extends keyof Json ? {} : {
|
|
140
|
+
expected<E extends string[]>(...exp: [...E]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
141
|
+
expected: E;
|
|
142
|
+
}>;
|
|
143
|
+
} : {}) & (Reco extends 'NeuralNetworkClassify' | 'NeuralNetworkDetect' ? 'expected' extends keyof Json ? {} : {
|
|
144
|
+
expected<E extends number[]>(...exp: [...E]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
145
|
+
expected: E;
|
|
146
|
+
}>;
|
|
147
|
+
} : {}) & (Reco extends 'OCR' ? 'replace' extends keyof Json ? {} : {
|
|
148
|
+
replace<R extends [string, string][]>(...exp: [...R]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
149
|
+
replace: R;
|
|
150
|
+
}>;
|
|
151
|
+
} : {}) & (Reco extends 'OCR' ? 'only_rec' extends keyof Json ? {} : {
|
|
152
|
+
only_rec<O extends boolean>(rec: O): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
153
|
+
only_rec: O;
|
|
154
|
+
}>;
|
|
155
|
+
} : {}) & (Reco extends 'OCR' | 'NeuralNetworkClassify' | 'NeuralNetworkDetect' ? 'model' extends keyof Json ? {} : {
|
|
156
|
+
model<M extends string>(model: M): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
157
|
+
model: M;
|
|
158
|
+
}>;
|
|
159
|
+
} : {}) & (Reco extends 'NeuralNetworkClassify' | 'NeuralNetworkDetect' ? 'labels' extends keyof Json ? {} : {
|
|
160
|
+
labels<L extends string[]>(...label: [...L]): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
161
|
+
labels: L;
|
|
162
|
+
}>;
|
|
163
|
+
} : {}) & (Reco extends 'Custom' ? 'custom_recognition' extends keyof Json ? {} : {
|
|
164
|
+
custom_recognition<C extends string>(reco: C): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
165
|
+
custom_recognition: C;
|
|
166
|
+
}>;
|
|
167
|
+
} : {}) & (Reco extends 'Custom' ? 'custom_recognition_param' extends keyof Json ? {} : {
|
|
168
|
+
custom_recognition_param<C extends Record<string, unknown>>(param: C): PipelineRecognitionBuilderState<PBJson, Reco, Json & {
|
|
169
|
+
custom_recognition_param: C;
|
|
170
|
+
}>;
|
|
171
|
+
} : {});
|
|
172
|
+
type PipelineActionBuilderState<PBJson, Act extends ActType, Json = {}> = {
|
|
173
|
+
done: PipelineBuilderState<PBJson & Json>;
|
|
174
|
+
} & (Act extends 'Click' | 'Custom' ? 'target' extends keyof Json ? {} : {
|
|
175
|
+
target<T extends [true] | [string] | [number, number, number, number]>(...target: T): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
176
|
+
target: T extends [number, number, number, number] ? T : T[0];
|
|
177
|
+
}>;
|
|
178
|
+
} : {}) & (Act extends 'Click' | 'Custom' ? 'target_offset' extends keyof Json ? {} : {
|
|
179
|
+
target_offset<O extends [number, number, number, number]>(...offset: O): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
180
|
+
target_offset: O;
|
|
181
|
+
}>;
|
|
182
|
+
} : {}) & (Act extends 'Swipe' ? 'begin' extends keyof Json ? {} : {
|
|
183
|
+
begin<B extends [true] | [string] | [number, number, number, number]>(...begin: B): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
184
|
+
begin: B extends [number, number, number, number] ? B : B[0];
|
|
185
|
+
}>;
|
|
186
|
+
} : {}) & (Act extends 'Swipe' ? 'begin_offset' extends keyof Json ? {} : {
|
|
187
|
+
begin_offset<B extends [number, number, number, number]>(...offset: B): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
188
|
+
begin_offset: B;
|
|
189
|
+
}>;
|
|
190
|
+
} : {}) & (Act extends 'Swipe' ? 'end' extends keyof Json ? {} : {
|
|
191
|
+
end<E extends [true] | [string] | [number, number, number, number]>(...end: E): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
192
|
+
end: E extends [number, number, number, number] ? E : E[0];
|
|
193
|
+
}>;
|
|
194
|
+
} : {}) & (Act extends 'Swipe' ? 'end_offset' extends keyof Json ? {} : {
|
|
195
|
+
end_offset<E extends [number, number, number, number]>(...offset: E): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
196
|
+
end_offset: E;
|
|
197
|
+
}>;
|
|
198
|
+
} : {}) & (Act extends 'Key' ? 'key' extends keyof Json ? {} : {
|
|
199
|
+
key<K extends number[]>(...key: [...K]): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
200
|
+
key: K;
|
|
201
|
+
}>;
|
|
202
|
+
} : {}) & (Act extends 'InputText' ? 'input_text' extends keyof Json ? {} : {
|
|
203
|
+
input_text<T extends string>(text: T): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
204
|
+
input_text: T;
|
|
205
|
+
}>;
|
|
206
|
+
} : {}) & (Act extends 'StartApp' | 'StopApp' ? 'package' extends keyof Json ? {} : {
|
|
207
|
+
package<P extends string>(pkg: P): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
208
|
+
package: P;
|
|
209
|
+
}>;
|
|
210
|
+
} : {}) & (Act extends 'Custom' ? 'custom_action' extends keyof Json ? {} : {
|
|
211
|
+
custom_action<C extends string>(act: C): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
212
|
+
custom_action: C;
|
|
213
|
+
}>;
|
|
214
|
+
} : {}) & (Act extends 'Custom' ? 'custom_action_param' extends keyof Json ? {} : {
|
|
215
|
+
custom_action_param<C extends Record<string, unknown>>(param: C): PipelineActionBuilderState<PBJson, Act, Json & {
|
|
216
|
+
custom_action_param: C;
|
|
217
|
+
}>;
|
|
218
|
+
} : {});
|
|
219
|
+
type PipelineWaitFreezeBuilderState<PBJson, Key extends 'pre_wait_freezes' | 'post_wait_freezes', Json = {}> = {
|
|
220
|
+
done: PipelineBuilderState<PBJson & {
|
|
221
|
+
[key in Key]: Json;
|
|
222
|
+
}>;
|
|
223
|
+
} & ('time' extends keyof Json ? {} : {
|
|
224
|
+
time<T extends number>(time: T): PipelineWaitFreezeBuilderState<PBJson, Key, Json & {
|
|
225
|
+
time: T;
|
|
226
|
+
}>;
|
|
227
|
+
}) & ('target' extends keyof Json ? {} : {
|
|
228
|
+
target<T extends [true] | [string] | [number, number, number, number]>(...target: T): PipelineWaitFreezeBuilderState<PBJson, Key, Json & {
|
|
229
|
+
target: T extends [number, number, number, number] ? T : T[0];
|
|
230
|
+
}>;
|
|
231
|
+
}) & ('target_offset' extends keyof Json ? {} : {
|
|
232
|
+
target_offset<O extends [number, number, number, number]>(...offset: O): PipelineWaitFreezeBuilderState<PBJson, Key, Json & {
|
|
233
|
+
target_offset: O;
|
|
234
|
+
}>;
|
|
235
|
+
}) & ('threshold' extends keyof Json ? {} : {
|
|
236
|
+
threshold<T extends number>(thres: T): PipelineWaitFreezeBuilderState<PBJson, Key, Json & {
|
|
237
|
+
threshold: T;
|
|
238
|
+
}>;
|
|
239
|
+
}) & ('method' extends keyof Json ? {} : {
|
|
240
|
+
method<M extends 1 | 3 | 5>(met: M): PipelineWaitFreezeBuilderState<PBJson, Key, Json & {
|
|
241
|
+
method: M;
|
|
242
|
+
}>;
|
|
243
|
+
}) & ('rate_limit' extends keyof Json ? {} : {
|
|
244
|
+
rate_limit<R extends number>(rate: R): PipelineWaitFreezeBuilderState<PBJson, Key, Json & {
|
|
245
|
+
rate_limit: R;
|
|
246
|
+
}>;
|
|
247
|
+
});
|
|
248
|
+
export declare function pp(): PipelineBuilderState;
|
|
249
|
+
export {};
|