@autoweb/domain-models 1.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.
Files changed (68) hide show
  1. package/README.md +100 -0
  2. package/index.d.ts +594 -0
  3. package/index.js +3 -0
  4. package/package.json +55 -0
  5. package/python-models/__init__.py +68 -0
  6. package/python-models/action-configs.py +1112 -0
  7. package/python-models/build/lib/floweb_models/__init__.py +194 -0
  8. package/python-models/build/lib/floweb_models/action_configs.py +783 -0
  9. package/python-models/build/lib/floweb_models/debug.py +209 -0
  10. package/python-models/build/lib/floweb_models/debug_models.py +141 -0
  11. package/python-models/build/lib/floweb_models/environment.py +158 -0
  12. package/python-models/build/lib/floweb_models/execution_results.py +208 -0
  13. package/python-models/build/lib/floweb_models/flow.py +345 -0
  14. package/python-models/build/lib/floweb_models/flow_validation.py +316 -0
  15. package/python-models/build/lib/floweb_models/parallel_execution.py +258 -0
  16. package/python-models/build/lib/floweb_models/performance_test.py +605 -0
  17. package/python-models/build/lib/floweb_models/websocket_communication.py +697 -0
  18. package/python-models/debug.py +209 -0
  19. package/python-models/dist/floweb_domain_models-1.0.0-py3-none-any.whl +0 -0
  20. package/python-models/environment.py +158 -0
  21. package/python-models/execution-results.py +208 -0
  22. package/python-models/flow-validation.py +316 -0
  23. package/python-models/flow.py +369 -0
  24. package/python-models/floweb_domain_models.egg-info/PKG-INFO +9 -0
  25. package/python-models/floweb_domain_models.egg-info/SOURCES.txt +16 -0
  26. package/python-models/floweb_domain_models.egg-info/dependency_links.txt +1 -0
  27. package/python-models/floweb_domain_models.egg-info/requires.txt +1 -0
  28. package/python-models/floweb_domain_models.egg-info/top_level.txt +1 -0
  29. package/python-models/floweb_models/__init__.py +194 -0
  30. package/python-models/floweb_models/__pycache__/__init__.cpython-312.pyc +0 -0
  31. package/python-models/floweb_models/__pycache__/action_configs.cpython-312.pyc +0 -0
  32. package/python-models/floweb_models/__pycache__/debug.cpython-312.pyc +0 -0
  33. package/python-models/floweb_models/__pycache__/debug_models.cpython-312.pyc +0 -0
  34. package/python-models/floweb_models/__pycache__/environment.cpython-312.pyc +0 -0
  35. package/python-models/floweb_models/__pycache__/execution_results.cpython-312.pyc +0 -0
  36. package/python-models/floweb_models/__pycache__/flow.cpython-312.pyc +0 -0
  37. package/python-models/floweb_models/__pycache__/flow_validation.cpython-312.pyc +0 -0
  38. package/python-models/floweb_models/__pycache__/parallel_execution.cpython-312.pyc +0 -0
  39. package/python-models/floweb_models/__pycache__/performance_test.cpython-312.pyc +0 -0
  40. package/python-models/floweb_models/__pycache__/websocket_communication.cpython-312.pyc +0 -0
  41. package/python-models/floweb_models/action_configs.py +1062 -0
  42. package/python-models/floweb_models/debug.py +209 -0
  43. package/python-models/floweb_models/debug_models.py +141 -0
  44. package/python-models/floweb_models/environment.py +158 -0
  45. package/python-models/floweb_models/execution_results.py +208 -0
  46. package/python-models/floweb_models/flow.py +345 -0
  47. package/python-models/floweb_models/flow_validation.py +316 -0
  48. package/python-models/floweb_models/parallel_execution.py +229 -0
  49. package/python-models/floweb_models/performance_test.py +605 -0
  50. package/python-models/floweb_models/websocket_communication.py +697 -0
  51. package/python-models/floweb_models.egg-info/PKG-INFO +9 -0
  52. package/python-models/floweb_models.egg-info/SOURCES.txt +16 -0
  53. package/python-models/floweb_models.egg-info/dependency_links.txt +1 -0
  54. package/python-models/floweb_models.egg-info/requires.txt +1 -0
  55. package/python-models/floweb_models.egg-info/top_level.txt +1 -0
  56. package/python-models/parallel-execution.py +475 -0
  57. package/python-models/performance-test.py +605 -0
  58. package/python-models/setup.py +13 -0
  59. package/python-models/websocket-communication.py +697 -0
  60. package/schemas/action-configs.json +1501 -0
  61. package/schemas/debug.json +203 -0
  62. package/schemas/environment.json +165 -0
  63. package/schemas/execution-results.json +209 -0
  64. package/schemas/flow-validation.json +311 -0
  65. package/schemas/flow.json +381 -0
  66. package/schemas/parallel-execution.json +219 -0
  67. package/schemas/performance-test.json +600 -0
  68. package/schemas/websocket-communication.json +1118 -0
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # Floweb Domain Models
2
+
3
+ A professional domain model package for Floweb Desktop, providing centralized type definitions and schemas for both frontend and backend applications.
4
+
5
+ ## Overview
6
+
7
+ This package contains JSON Schema definitions that serve as the single source of truth for all domain objects in the Floweb ecosystem. The schemas are used to generate type-safe interfaces for TypeScript and Pydantic models for Python, ensuring consistency across the entire application stack.
8
+
9
+ ## Features
10
+
11
+ - **Single Source of Truth**: All domain models defined in JSON Schema
12
+ - **Type Safety**: Auto-generated TypeScript interfaces and Python models
13
+ - **Cross-Language Consistency**: Guaranteed compatibility between frontend and backend
14
+ - **Version Control**: Semantic versioning for model changes
15
+ - **Documentation**: Auto-generated documentation from schemas
16
+
17
+ ## Domain Models
18
+
19
+ ### Core Models
20
+
21
+ - **Flow**: Complete automation flow definitions with actions, edges, and variables
22
+ - **Performance Test**: Load testing configurations and results
23
+ - **Action Configurations**: 40+ action types for automation workflows
24
+ - **Environment**: Environment and global variable management
25
+
26
+ ### Key Components
27
+
28
+ - **Actions**: Click, Input, Navigate, Wait, API calls, Database operations, etc.
29
+ - **Variables**: Flow parameters, environment variables, global variables
30
+ - **Results**: Execution results, performance metrics, test outcomes
31
+ - **Configuration**: Authentication, thresholds, timing, and other settings
32
+
33
+ ## Usage
34
+
35
+ ### TypeScript
36
+
37
+ ```typescript
38
+ import { Flow, PerformanceTest, Environment } from '@floweb/domain-models';
39
+
40
+ // Type-safe usage
41
+ const flow: Flow = {
42
+ id: 'flow-123',
43
+ name: 'My Automation Flow',
44
+ actions: [...],
45
+ // ... fully typed
46
+ };
47
+ ```
48
+
49
+ ### Python
50
+
51
+ ```python
52
+ from floweb_domain_models import Flow, PerformanceTest, Environment
53
+
54
+ # Pydantic models with validation
55
+ flow = Flow(
56
+ id="flow-123",
57
+ name="My Automation Flow",
58
+ actions=[...]
59
+ )
60
+ ```
61
+
62
+ ## Development
63
+
64
+ ### Schema Validation
65
+
66
+ All schemas are validated against JSON Schema Draft 2020-12 specification.
67
+
68
+ ### Code Generation
69
+
70
+ - TypeScript: Generated using `json-schema-to-typescript`
71
+ - Python: Generated using `datamodel-code-generator`
72
+
73
+ ### Testing
74
+
75
+ Cross-language validation ensures generated models match schema expectations.
76
+
77
+ ## Schema Structure
78
+
79
+ ```
80
+ domain-models/
81
+ ├── schemas/ # JSON Schema definitions
82
+ │ ├── flow.json
83
+ │ ├── performance-test.json
84
+ │ ├── action-configs.json
85
+ │ └── environment.json
86
+ ├── types/ # Generated type definitions
87
+ ├── examples/ # Sample data files
88
+ └── docs/ # Generated documentation
89
+ ```
90
+
91
+ ## Contributing
92
+
93
+ 1. Modify schemas in the `schemas/` directory
94
+ 2. Run code generation scripts
95
+ 3. Update tests and examples
96
+ 4. Ensure cross-language compatibility
97
+
98
+ ## License
99
+
100
+ Copyright 2024 Floweb. All rights reserved.
package/index.d.ts ADDED
@@ -0,0 +1,594 @@
1
+ export type Primitive = string | number | boolean | null;
2
+ export type JsonValue = Primitive | JsonValue[] | { [key: string]: JsonValue };
3
+ export type AnyObject = Record<string, unknown>;
4
+
5
+ export interface Position {
6
+ x: number;
7
+ y: number;
8
+ }
9
+
10
+ export interface Zoom {
11
+ x: number;
12
+ y: number;
13
+ zoom: number;
14
+ }
15
+
16
+ export interface ActionData {
17
+ label: string;
18
+ type: string;
19
+ config: AnyObject;
20
+ }
21
+
22
+ export interface Action {
23
+ id: string;
24
+ type: string;
25
+ position: Position;
26
+ data: ActionData;
27
+ }
28
+
29
+ export interface Edge {
30
+ id: string;
31
+ source: string;
32
+ sourceHandle?: string | null;
33
+ target: string;
34
+ targetHandle?: string | null;
35
+ type?: string;
36
+ data?: AnyObject;
37
+ }
38
+
39
+ export type VariableType =
40
+ | "string"
41
+ | "number"
42
+ | "boolean"
43
+ | "object"
44
+ | "array"
45
+ | "web-identifier"
46
+ | string;
47
+
48
+ export interface Variable {
49
+ id: string;
50
+ name: string;
51
+ type: VariableType;
52
+ value: unknown;
53
+ description?: string;
54
+ isOutput?: boolean;
55
+ }
56
+
57
+ export interface FlowVariables {
58
+ input: Variable[];
59
+ output: Variable[];
60
+ }
61
+
62
+ export interface FlowParameters {
63
+ input: Variable[];
64
+ output: Variable[];
65
+ }
66
+
67
+ export interface EnvironmentVariable extends Variable {}
68
+
69
+ export interface Environment {
70
+ id: string;
71
+ name: string;
72
+ variables: EnvironmentVariable[];
73
+ description?: string;
74
+ isActive?: boolean;
75
+ isDefault?: boolean;
76
+ createdAt?: string;
77
+ updatedAt?: string;
78
+ }
79
+
80
+ export interface GlobalVariable extends Variable {
81
+ createdAt?: string;
82
+ updatedAt?: string;
83
+ }
84
+
85
+ export type FlowKind = "flow" | "test" | "performance";
86
+ export type FlowLastResult = "passed" | "failed" | "pending" | "running";
87
+
88
+ export interface Flow {
89
+ id: string;
90
+ name: string;
91
+ actions: Action[];
92
+ edges: Edge[];
93
+ type?: FlowKind;
94
+ description?: string;
95
+ tags?: string[];
96
+ zoom?: Zoom;
97
+ variables?: FlowVariables;
98
+ parameters?: FlowParameters;
99
+ environment?: Environment;
100
+ globalVariables?: GlobalVariable[];
101
+ parentID?: string | null;
102
+ createdAt?: string;
103
+ updatedAt?: string;
104
+ lastRun?: string;
105
+ lastResult?: FlowLastResult;
106
+ synced?: boolean;
107
+ }
108
+
109
+ export interface EnvironmentAndGlobalVariablesConfiguration {
110
+ environments: Environment[];
111
+ globalVariables: GlobalVariable[];
112
+ }
113
+
114
+ export interface ResponseTiming {
115
+ dns?: number;
116
+ tcp?: number;
117
+ tls?: number;
118
+ ttfb?: number;
119
+ download?: number;
120
+ }
121
+
122
+ export interface RecordedRequest {
123
+ id: string;
124
+ method: string;
125
+ url: string;
126
+ headers?: Record<string, string>;
127
+ body?: unknown;
128
+ }
129
+
130
+ export interface RecordedResponse {
131
+ status: number;
132
+ headers?: Record<string, string>;
133
+ body?: unknown;
134
+ timing?: ResponseTiming;
135
+ }
136
+
137
+ export interface LoadTestThresholds {
138
+ maxResponseTime?: number;
139
+ maxErrorRate?: number;
140
+ minThroughput?: number;
141
+ }
142
+
143
+ export interface LoadTestConfiguration {
144
+ targetUrl: string;
145
+ duration: number;
146
+ virtualUsers: number;
147
+ rampUpTime?: number;
148
+ includeRequests?: string[];
149
+ thresholds?: LoadTestThresholds;
150
+ }
151
+
152
+ export interface PerformanceTestMetadata {
153
+ id: string;
154
+ name: string;
155
+ description?: string;
156
+ tags?: string[];
157
+ createdAt: string;
158
+ updatedAt: string;
159
+ createdBy?: string;
160
+ version?: number;
161
+ status?: string;
162
+ parentID?: string | null;
163
+ }
164
+
165
+ export interface PerformanceTest {
166
+ metadata: PerformanceTestMetadata;
167
+ recordedRequests: RecordedRequest[];
168
+ loadTestConfig: LoadTestConfiguration;
169
+ results?: AnyObject;
170
+ }
171
+
172
+ export interface BaseActionConfig {
173
+ image?: string;
174
+ [key: string]: unknown;
175
+ }
176
+
177
+ export interface ClickConfig extends BaseActionConfig {}
178
+ export interface InputConfig extends BaseActionConfig {}
179
+ export interface SendKeysConfig extends BaseActionConfig {}
180
+ export interface NavigateConfig extends BaseActionConfig {}
181
+ export interface WaitConfig extends BaseActionConfig {}
182
+ export interface ScrollConfig extends BaseActionConfig {}
183
+ export interface ScreenshotConfig extends BaseActionConfig {}
184
+ export interface AssertionConfig extends BaseActionConfig {}
185
+ export interface AssertVisibleConfig extends BaseActionConfig {}
186
+ export interface FormFieldOption {
187
+ value: string;
188
+ label: string;
189
+ }
190
+ export interface FormField {
191
+ selector: string;
192
+ type?: string;
193
+ value?: unknown;
194
+ options?: FormFieldOption[];
195
+ }
196
+ export interface FormFillConfig extends BaseActionConfig {
197
+ fields?: FormField[];
198
+ }
199
+ export interface ClearInputConfig extends BaseActionConfig {}
200
+ export interface OpenNewTabConfig extends BaseActionConfig {}
201
+ export interface SwitchTabConfig extends BaseActionConfig {}
202
+ export interface GoBackConfig extends BaseActionConfig {}
203
+ export interface GoForwardConfig extends BaseActionConfig {}
204
+ export interface RefreshConfig extends BaseActionConfig {}
205
+ export interface GetPageInfoConfig extends BaseActionConfig {}
206
+ export interface JunctionConfig extends BaseActionConfig {}
207
+ export interface ApiCallConfig extends BaseActionConfig {}
208
+ export interface ConditionalConfig extends BaseActionConfig {}
209
+ export interface LoopConfig extends BaseActionConfig {}
210
+ export interface DatabaseQueryConfig extends BaseActionConfig {}
211
+ export interface DatabaseInsertConfig extends BaseActionConfig {}
212
+ export interface CustomCodeConfig extends BaseActionConfig {}
213
+ export interface DragAndDropConfig extends BaseActionConfig {}
214
+ export interface CallToFlowConfig extends BaseActionConfig {}
215
+ export interface SwitchToFrameConfig extends BaseActionConfig {}
216
+ export interface ExitFrameConfig extends BaseActionConfig {}
217
+ export interface SetViewportConfig extends BaseActionConfig {}
218
+ export interface GetElementPropertiesConfig extends BaseActionConfig {}
219
+ export interface HandlePopupConfig extends BaseActionConfig {}
220
+ export interface FileUploadConfig extends BaseActionConfig {}
221
+ export interface FileDownloadConfig extends BaseActionConfig {}
222
+ export interface SubflowConfig extends BaseActionConfig {}
223
+
224
+ export interface ActionResult {
225
+ node_id: string;
226
+ action_type: string;
227
+ config: AnyObject;
228
+ start_time: number;
229
+ end_time: number;
230
+ duration_seconds: number;
231
+ success: boolean;
232
+ message: string;
233
+ error?: string;
234
+ screenshot?: string;
235
+ data?: AnyObject;
236
+ }
237
+
238
+ export interface FlowReport {
239
+ actions: ActionResult[];
240
+ variables: Record<string, AnyObject[]>;
241
+ parameters: {
242
+ input: AnyObject[];
243
+ output: AnyObject[];
244
+ };
245
+ output: AnyObject;
246
+ recording?: string;
247
+ recording_file?: string;
248
+ recording_duration?: number;
249
+ flow_id?: string;
250
+ flow_name?: string;
251
+ start_time?: number;
252
+ end_time?: number;
253
+ total_duration?: number;
254
+ success?: boolean;
255
+ error?: string;
256
+ environment?: AnyObject;
257
+ browser_info?: AnyObject;
258
+ performance_metrics?: AnyObject;
259
+ }
260
+
261
+ export type WarningSeverity = "minor" | "medium" | "critical";
262
+
263
+ export interface FlowWarning {
264
+ type: string;
265
+ severity: WarningSeverity;
266
+ message: string;
267
+ nodeId?: string;
268
+ details?: AnyObject;
269
+ }
270
+
271
+ export interface LoopDetectionResult {
272
+ hasLoop: boolean;
273
+ loops: string[][];
274
+ }
275
+
276
+ export interface FlowValidationResult {
277
+ isValid: boolean;
278
+ warnings: FlowWarning[];
279
+ loopDetection: LoopDetectionResult;
280
+ }
281
+
282
+ export interface ValidationSummary {
283
+ totalWarnings: number;
284
+ criticalWarnings: number;
285
+ hasLoops: boolean;
286
+ }
287
+
288
+ export interface FlowExecutionRequest {
289
+ flow: Flow;
290
+ mode?: "full" | "partial";
291
+ recording?: AnyObject | null;
292
+ metadata?: AnyObject;
293
+ }
294
+
295
+ export type FlowExecutionStatus =
296
+ | "completed"
297
+ | "failed"
298
+ | "error"
299
+ | "stopped"
300
+ | "running"
301
+ | "pending"
302
+ | "skipped";
303
+
304
+ export interface FlowExecutionResult {
305
+ flow_id: string;
306
+ flow_name: string;
307
+ success: boolean;
308
+ status: FlowExecutionStatus;
309
+ total_actions: number;
310
+ executed_actions: number;
311
+ successful_actions: number;
312
+ duration_seconds: number;
313
+ report: FlowReport | AnyObject;
314
+ error?: string;
315
+ metadata?: AnyObject;
316
+ }
317
+
318
+ export type BrowserMode = "headed" | "headless" | "headful";
319
+ export type BrowserName = "chrome" | "firefox" | "edge" | "safari" | string;
320
+
321
+ export interface ParallelTestsRequest {
322
+ command?: "run_tests";
323
+ tests: FlowExecutionRequest[];
324
+ data?: {
325
+ environment?: Environment;
326
+ globalVariables?: GlobalVariable[];
327
+ [key: string]: unknown;
328
+ };
329
+ max_parallel?: number;
330
+ stop_on_failure?: boolean;
331
+ cleanup_after?: boolean;
332
+ browser_mode?: BrowserMode;
333
+ browser?: BrowserName;
334
+ incognito?: boolean;
335
+ max_retries?: number;
336
+ }
337
+
338
+ export interface ParallelTestsResult {
339
+ total_tests: number;
340
+ passed_tests: number;
341
+ failed_tests: number;
342
+ skipped_tests?: number;
343
+ total_duration_seconds: number;
344
+ results: FlowExecutionResult[];
345
+ success: boolean;
346
+ }
347
+
348
+ export interface WebSocketMessage {
349
+ command: string;
350
+ flow_id?: string;
351
+ }
352
+
353
+ export interface SessionInfo {
354
+ flowId: string;
355
+ flowName?: string;
356
+ status: string;
357
+ browser: string;
358
+ startedAt: number;
359
+ }
360
+
361
+ export interface RunCommand extends WebSocketMessage {
362
+ command: "run";
363
+ flow: Flow;
364
+ mode?: "full" | "partial";
365
+ recording?: AnyObject;
366
+ browser?: BrowserName;
367
+ headless?: boolean;
368
+ incognito?: boolean;
369
+ }
370
+
371
+ export interface RecordCommand extends WebSocketMessage {
372
+ command: "record";
373
+ session_id?: string;
374
+ url?: string;
375
+ browser?: BrowserName;
376
+ headless?: boolean;
377
+ incognito?: boolean;
378
+ config?: AnyObject;
379
+ }
380
+
381
+ export interface PauseRecordingCommand extends WebSocketMessage {
382
+ command: "pause_recording";
383
+ session_id: string;
384
+ }
385
+
386
+ export interface ResumeRecordingCommand extends WebSocketMessage {
387
+ command: "resume_recording";
388
+ session_id: string;
389
+ }
390
+
391
+ export interface StopRecordingCommand extends WebSocketMessage {
392
+ command: "stop_recording";
393
+ session_id: string;
394
+ }
395
+
396
+ export interface FinishRecordingCommand extends WebSocketMessage {
397
+ command: "finish_recording";
398
+ session_id: string;
399
+ flow_name?: string;
400
+ }
401
+
402
+ export interface GetRecordingStatusCommand extends WebSocketMessage {
403
+ command: "get_recording_status";
404
+ session_id?: string;
405
+ }
406
+
407
+ export interface ListRecordingsCommand extends WebSocketMessage {
408
+ command: "list_recordings";
409
+ }
410
+
411
+ export interface ConvertRecordingToFlowCommand extends WebSocketMessage {
412
+ command: "convert_recording_to_flow";
413
+ session_id: string;
414
+ flow_name?: string;
415
+ }
416
+
417
+ export interface GetRealtimeActionsCommand extends WebSocketMessage {
418
+ command: "get_realtime_actions";
419
+ session_id: string;
420
+ }
421
+
422
+ export interface GetLatestRealtimeActionCommand extends WebSocketMessage {
423
+ command: "get_latest_realtime_action";
424
+ session_id: string;
425
+ }
426
+
427
+ export interface StopCommand extends WebSocketMessage {
428
+ command: "stop";
429
+ flow_id?: string;
430
+ }
431
+
432
+ export interface CloseCommand extends WebSocketMessage {
433
+ command: "close";
434
+ }
435
+
436
+ export interface ListSessionsCommand extends WebSocketMessage {
437
+ command: "list_sessions";
438
+ }
439
+
440
+ export interface CloseSessionCommand extends WebSocketMessage {
441
+ command: "close_session";
442
+ flow_id?: string;
443
+ }
444
+
445
+ export interface RestartEngineCommand extends WebSocketMessage {
446
+ command: "restart_engine";
447
+ }
448
+
449
+ export interface CloseEngineCommand extends WebSocketMessage {
450
+ command: "close_engine";
451
+ }
452
+
453
+ export interface GetEngineStatusCommand extends WebSocketMessage {
454
+ command: "get_engine_status";
455
+ }
456
+
457
+ export interface StartPerformanceScanCommand extends WebSocketMessage {
458
+ command: "start_performance_scan";
459
+ test_id: string;
460
+ url: string;
461
+ }
462
+
463
+ export interface StopPerformanceScanCommand extends WebSocketMessage {
464
+ command: "stop_performance_scan";
465
+ test_id: string;
466
+ session_id: string;
467
+ }
468
+
469
+ export interface RunLoadTestCommand extends WebSocketMessage {
470
+ command: "run_load_test";
471
+ test_id: string;
472
+ config: AnyObject;
473
+ auth_config?: AnyObject;
474
+ }
475
+
476
+ export interface StopLoadTestCommand extends WebSocketMessage {
477
+ command: "stop_load_test";
478
+ test_id: string;
479
+ }
480
+
481
+ export interface WebSocketResponse {
482
+ command: string;
483
+ success: boolean;
484
+ message?: string;
485
+ }
486
+
487
+ export interface RunResponse extends WebSocketResponse {
488
+ command: "run";
489
+ mode: "full" | "partial";
490
+ reports: FlowReport;
491
+ }
492
+
493
+ export interface ListSessionsResponse extends WebSocketResponse {
494
+ command: "list_sessions";
495
+ sessions: SessionInfo[];
496
+ }
497
+
498
+ export interface EngineStatusResponse extends WebSocketResponse {
499
+ command: "get_engine_status";
500
+ status: string;
501
+ uptime: number;
502
+ active_sessions: number;
503
+ }
504
+
505
+ export interface RecordingResponse extends WebSocketResponse {
506
+ command: "record" | "pause_recording" | "resume_recording" | "stop_recording" | "finish_recording";
507
+ session_id?: string;
508
+ data?: AnyObject;
509
+ }
510
+
511
+ export interface RecordingStatusResponse extends WebSocketResponse {
512
+ command: "get_recording_status";
513
+ session_info?: AnyObject;
514
+ }
515
+
516
+ export interface ListRecordingsResponse extends WebSocketResponse {
517
+ command: "list_recordings";
518
+ recordings: AnyObject[];
519
+ }
520
+
521
+ export type DebugState = "ready" | "running" | "paused" | "stepping" | "completed" | "failed" | "stopped";
522
+ export type PauseReason = "breakpoint" | "manual" | "step" | "error";
523
+
524
+ export interface Breakpoint {
525
+ node_id: string;
526
+ enabled?: boolean;
527
+ }
528
+
529
+ export interface DebugExecutionInfo {
530
+ session_id: string;
531
+ flow_id: string;
532
+ state: DebugState;
533
+ current_action_id?: string;
534
+ current_action_index?: number;
535
+ executed_actions?: string[];
536
+ }
537
+
538
+ export interface DebugSession {
539
+ session_id: string;
540
+ flow_id: string;
541
+ state: DebugState;
542
+ breakpoints?: string[];
543
+ current_action_id?: string;
544
+ current_action_index?: number;
545
+ created_at?: number;
546
+ last_updated?: number;
547
+ }
548
+
549
+ export interface DebugActionUpdate {
550
+ session_id: string;
551
+ node_id: string;
552
+ action_index: number;
553
+ action_type?: string;
554
+ status: "started" | "completed" | "failed" | "skipped";
555
+ result?: AnyObject;
556
+ }
557
+
558
+ export interface DebugRunCommand {
559
+ command: "debug_run";
560
+ session_id: string;
561
+ flow: Flow;
562
+ breakpoints?: string[];
563
+ browser?: BrowserName;
564
+ headless?: boolean;
565
+ incognito?: boolean;
566
+ }
567
+
568
+ export interface DebugStepCommand {
569
+ command: "debug_step";
570
+ session_id: string;
571
+ }
572
+
573
+ export interface DebugContinueCommand {
574
+ command: "debug_continue";
575
+ session_id: string;
576
+ }
577
+
578
+ export interface DebugPauseCommand {
579
+ command: "debug_pause";
580
+ session_id: string;
581
+ }
582
+
583
+ export interface DebugStopCommand {
584
+ command: "debug_stop";
585
+ session_id: string;
586
+ }
587
+
588
+ export interface DebugResponse {
589
+ command: string;
590
+ success: boolean;
591
+ session_id?: string;
592
+ message?: string;
593
+ data?: AnyObject;
594
+ }
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ module.exports = {};