@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
@@ -0,0 +1,1062 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: action-configs.json
3
+ # timestamp: 2026-01-25T13:38:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import StrEnum
8
+ from typing import Annotated, Any
9
+
10
+ from pydantic import AnyUrl, BaseModel, ConfigDict, Field
11
+
12
+
13
+ class BaseActionConfig(BaseModel):
14
+ model_config = ConfigDict(
15
+ populate_by_name=True,
16
+ )
17
+ image: str | None = None
18
+ """
19
+ Base64 encoded reference image
20
+ """
21
+
22
+
23
+ class ClickType(StrEnum):
24
+ """
25
+ Type of click to perform
26
+ """
27
+
28
+ left = 'left'
29
+ right = 'right'
30
+
31
+
32
+ class ClickConfig(BaseActionConfig):
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ )
36
+ selector: str = ''
37
+ """
38
+ CSS selector for element to click
39
+ """
40
+ waitTime: int | None = 1000
41
+ """
42
+ Wait time in milliseconds
43
+ """
44
+ forceClick: bool | None = False
45
+ """
46
+ Force click even if element not clickable
47
+ """
48
+ scrollIntoView: bool | None = True
49
+ """
50
+ Scroll element into view before clicking
51
+ """
52
+ waitForElement: bool | None = True
53
+ """
54
+ Wait for element to be present
55
+ """
56
+ clickType: ClickType | None = 'left'
57
+ """
58
+ Type of click to perform
59
+ """
60
+ clickCount: Annotated[int | None, Field(ge=1)] = 1
61
+ """
62
+ Number of clicks to perform
63
+ """
64
+ clickAndHold: bool | None = False
65
+ """
66
+ Whether to click and hold
67
+ """
68
+ holdDuration: int | None = 1000
69
+ """
70
+ Duration to hold click in milliseconds
71
+ """
72
+
73
+
74
+ class InputConfig(BaseActionConfig):
75
+ model_config = ConfigDict(
76
+ populate_by_name=True,
77
+ )
78
+ selector: str = ''
79
+ """
80
+ CSS selector for input element
81
+ """
82
+ text: str = ''
83
+ """
84
+ Text to input
85
+ """
86
+ clearFirst: bool | None = True
87
+ """
88
+ Clear field before typing
89
+ """
90
+ waitForElement: bool | None = True
91
+ """
92
+ Wait for element to be present
93
+ """
94
+ scrollIntoView: bool | None = True
95
+ """
96
+ Scroll element into view
97
+ """
98
+
99
+
100
+ class NavigateConfig(BaseActionConfig):
101
+ model_config = ConfigDict(
102
+ populate_by_name=True,
103
+ )
104
+ url: str
105
+ """
106
+ URL to navigate to
107
+ """
108
+ waitForLoad: bool | None = True
109
+ """
110
+ Wait for page to load
111
+ """
112
+ takeScreenshot: bool | None = False
113
+ """
114
+ Take screenshot after navigation
115
+ """
116
+
117
+
118
+ class WaitType(StrEnum):
119
+ """
120
+ Type of wait to perform
121
+ """
122
+
123
+ duration = 'duration'
124
+ element = 'element'
125
+ interactable = 'interactable'
126
+
127
+
128
+ class WaitConfig(BaseActionConfig):
129
+ model_config = ConfigDict(
130
+ populate_by_name=True,
131
+ )
132
+ waitType: WaitType | None = 'duration'
133
+ """
134
+ Type of wait to perform
135
+ """
136
+ duration: int | None = 3000
137
+ """
138
+ Duration to wait in milliseconds
139
+ """
140
+ selector: str | None = None
141
+ """
142
+ CSS selector for element to wait for
143
+ """
144
+ timeout: int | None = 10000
145
+ """
146
+ Maximum time to wait in milliseconds
147
+ """
148
+ waitForInteractable: bool | None = False
149
+ """
150
+ Wait for element to be interactable
151
+ """
152
+ fallbackToDuration: bool | None = True
153
+ """
154
+ Fallback to duration wait if element wait fails
155
+ """
156
+ fallbackDuration: int | None = 2000
157
+ """
158
+ Duration to wait if fallback triggered
159
+ """
160
+
161
+
162
+ class AssertType(StrEnum):
163
+ """
164
+ Type of assertion
165
+ """
166
+
167
+ exists = 'exists'
168
+ visible = 'visible'
169
+ text = 'text'
170
+ value = 'value'
171
+ attribute = 'attribute'
172
+
173
+
174
+ class AssertionConfig(BaseActionConfig):
175
+ model_config = ConfigDict(
176
+ populate_by_name=True,
177
+ )
178
+ selector: str
179
+ """
180
+ CSS selector for element
181
+ """
182
+ assertType: AssertType | None = 'exists'
183
+ """
184
+ Type of assertion
185
+ """
186
+ expectedValue: str
187
+ """
188
+ Expected value for assertion
189
+ """
190
+ waitForElement: bool | None = True
191
+ """
192
+ Wait for element to be present
193
+ """
194
+ caseSensitive: bool | None = False
195
+ """
196
+ Case sensitive comparison
197
+ """
198
+ partialMatch: bool | None = False
199
+ """
200
+ Allow partial text matching
201
+ """
202
+
203
+
204
+ class ScreenshotType(StrEnum):
205
+ """
206
+ Type of screenshot to capture
207
+ """
208
+
209
+ viewport = 'viewport'
210
+ fullPage = 'fullPage'
211
+ element = 'element'
212
+
213
+
214
+ class Format(StrEnum):
215
+ """
216
+ Output format
217
+ """
218
+
219
+ png = 'png'
220
+ jpg = 'jpg'
221
+
222
+
223
+ class ScreenshotConfig(BaseActionConfig):
224
+ model_config = ConfigDict(
225
+ populate_by_name=True,
226
+ )
227
+ screenshotType: ScreenshotType | None = 'viewport'
228
+ """
229
+ Type of screenshot to capture
230
+ """
231
+ selector: str | None = None
232
+ """
233
+ CSS selector for element screenshots
234
+ """
235
+ filename: str | None = 'screenshot.png'
236
+ """
237
+ Output filename
238
+ """
239
+ saveToFile: bool | None = True
240
+ """
241
+ Save screenshot to file system
242
+ """
243
+ includeTimestamp: bool | None = True
244
+ """
245
+ Include timestamp in filename
246
+ """
247
+ format: Format | None = 'png'
248
+ """
249
+ Output format
250
+ """
251
+ waitForElement: bool | None = True
252
+ """
253
+ Wait for element to be present
254
+ """
255
+ scrollIntoView: bool | None = True
256
+ """
257
+ Scroll element into view
258
+ """
259
+ fullPage: bool | None = False
260
+ """
261
+ Take full page screenshot
262
+ """
263
+
264
+
265
+ class Type(StrEnum):
266
+ """
267
+ Type of form field
268
+ """
269
+
270
+ text = 'text'
271
+ password = 'password'
272
+ email = 'email'
273
+ number = 'number'
274
+ tel = 'tel'
275
+ textarea = 'textarea'
276
+ date = 'date'
277
+ time = 'time'
278
+ datetime_local = 'datetime-local'
279
+ checkbox = 'checkbox'
280
+ radio = 'radio'
281
+ select = 'select'
282
+ file = 'file'
283
+
284
+
285
+ class FormFieldOption(BaseModel):
286
+ model_config = ConfigDict(
287
+ populate_by_name=True,
288
+ )
289
+ value: str
290
+ """
291
+ Option value
292
+ """
293
+ label: str
294
+ """
295
+ Option label
296
+ """
297
+
298
+
299
+ class Method(StrEnum):
300
+ """
301
+ HTTP method
302
+ """
303
+
304
+ GET = 'GET'
305
+ POST = 'POST'
306
+ PUT = 'PUT'
307
+ DELETE = 'DELETE'
308
+ PATCH = 'PATCH'
309
+
310
+
311
+ class ApiCallConfig(BaseActionConfig):
312
+ model_config = ConfigDict(
313
+ populate_by_name=True,
314
+ )
315
+ method: Method | None = 'GET'
316
+ """
317
+ HTTP method
318
+ """
319
+ url: str | None = None
320
+ """
321
+ API endpoint URL
322
+ """
323
+ headers: dict[str, str] | None = None
324
+ """
325
+ HTTP headers
326
+ """
327
+ body: str | None = None
328
+ """
329
+ Request body
330
+ """
331
+ outputVariable: str | None = 'apiResponse'
332
+ """
333
+ Variable to store response
334
+ """
335
+ timeout: int | None = 30000
336
+ """
337
+ Request timeout in milliseconds
338
+ """
339
+ retryCount: int | None = 0
340
+ """
341
+ Number of retries
342
+ """
343
+ parseJson: bool | None = True
344
+ """
345
+ Parse response as JSON
346
+ """
347
+ validateStatus: bool | None = True
348
+ """
349
+ Validate HTTP status code
350
+ """
351
+ followRedirects: bool | None = True
352
+ """
353
+ Follow HTTP redirects
354
+ """
355
+ verifySSL: bool | None = True
356
+ """
357
+ Verify SSL certificates
358
+ """
359
+ basicAuthUsername: str | None = None
360
+ """
361
+ Basic auth username
362
+ """
363
+ basicAuthPassword: str | None = None
364
+ """
365
+ Basic auth password
366
+ """
367
+
368
+
369
+ class DatabaseQueryConfig(BaseActionConfig):
370
+ model_config = ConfigDict(
371
+ populate_by_name=True,
372
+ )
373
+ connectionString: str = ''
374
+ """
375
+ Database connection string
376
+ """
377
+ query: str = ''
378
+ """
379
+ SQL query to execute
380
+ """
381
+ outputVariable: str | None = 'queryResult'
382
+ """
383
+ Variable to store result
384
+ """
385
+ logQuery: bool | None = True
386
+ """
387
+ Log the query being executed
388
+ """
389
+ validateConnection: bool | None = True
390
+ """
391
+ Validate database connection
392
+ """
393
+ timeout: int | None = 30000
394
+ """
395
+ Query timeout in milliseconds
396
+ """
397
+
398
+
399
+ class DatabaseInsertConfig(BaseActionConfig):
400
+ model_config = ConfigDict(
401
+ populate_by_name=True,
402
+ )
403
+ connectionString: str = ''
404
+ """
405
+ Database connection string
406
+ """
407
+ table: str = ''
408
+ """
409
+ Table name to insert into
410
+ """
411
+ data: dict[str, Any] = Field(default_factory=dict)
412
+ """
413
+ Data to insert (column-value pairs)
414
+ """
415
+ logOperation: bool | None = True
416
+ """
417
+ Log the insert operation
418
+ """
419
+ validateConnection: bool | None = True
420
+ """
421
+ Validate database connection
422
+ """
423
+ rollbackOnError: bool | None = True
424
+ """
425
+ Rollback transaction on error
426
+ """
427
+
428
+
429
+ class FileUploadConfig(BaseActionConfig):
430
+ model_config = ConfigDict(
431
+ populate_by_name=True,
432
+ )
433
+ selector: str = ''
434
+ """
435
+ CSS selector for file input
436
+ """
437
+ filePath: str = ''
438
+ """
439
+ Path to file to upload
440
+ """
441
+ waitForElement: bool | None = True
442
+ """
443
+ Wait for element to be present
444
+ """
445
+ scrollIntoView: bool | None = True
446
+ """
447
+ Scroll element into view
448
+ """
449
+ validateFile: bool | None = True
450
+ """
451
+ Validate file exists before upload
452
+ """
453
+
454
+
455
+ class FileDownloadConfig(BaseActionConfig):
456
+ model_config = ConfigDict(
457
+ populate_by_name=True,
458
+ )
459
+ selector: str = ''
460
+ """
461
+ CSS selector for download link
462
+ """
463
+ downloadPath: str = ''
464
+ """
465
+ Path to save downloaded file
466
+ """
467
+ waitForElement: bool | None = True
468
+ """
469
+ Wait for element to be present
470
+ """
471
+ validateDownload: bool | None = True
472
+ """
473
+ Validate download completed
474
+ """
475
+ overwriteExisting: bool | None = False
476
+ """
477
+ Overwrite existing files
478
+ """
479
+
480
+
481
+ class CustomCodeConfig(BaseActionConfig):
482
+ model_config = ConfigDict(
483
+ populate_by_name=True,
484
+ )
485
+ code: str
486
+ """
487
+ JavaScript code to execute
488
+ """
489
+ outputVariable: str | None = 'customResult'
490
+ """
491
+ Variable to store result
492
+ """
493
+ logExecution: bool | None = True
494
+ """
495
+ Log code execution
496
+ """
497
+ catchErrors: bool | None = True
498
+ """
499
+ Catch and handle errors
500
+ """
501
+ timeout: int | None = 30000
502
+ """
503
+ Execution timeout in milliseconds
504
+ """
505
+
506
+
507
+ class SubflowConfig(BaseActionConfig):
508
+ model_config = ConfigDict(
509
+ populate_by_name=True,
510
+ )
511
+ flowId: str
512
+ """
513
+ ID of flow to call
514
+ """
515
+ flowName: str | None = None
516
+ """
517
+ Name of flow to call
518
+ """
519
+ inputParameters: list[dict[str, Any]] | None = None
520
+ """
521
+ Input parameters for subflow
522
+ """
523
+ outputParameters: list[dict[str, Any]] | None = None
524
+ """
525
+ Output parameters from subflow
526
+ """
527
+ outputVariable: str | None = 'flowResult'
528
+ """
529
+ Variable to store result
530
+ """
531
+ waitForCompletion: bool | None = True
532
+ """
533
+ Wait for flow to complete
534
+ """
535
+ logExecution: bool | None = True
536
+ """
537
+ Log flow execution
538
+ """
539
+ propagateErrors: bool | None = True
540
+ """
541
+ Propagate errors from subflow
542
+ """
543
+
544
+
545
+ class SendKeysConfig(BaseActionConfig):
546
+ model_config = ConfigDict(
547
+ populate_by_name=True,
548
+ )
549
+ selector: str | None = None
550
+ """
551
+ CSS selector for element to send keys to
552
+ """
553
+ keys: str = ''
554
+ """
555
+ Keys to send
556
+ """
557
+ waitForElement: bool | None = True
558
+ """
559
+ Wait for element to be present
560
+ """
561
+ keyCombinations: list[Any] | None = None
562
+ """
563
+ Optional key combinations payload used by backend actions.
564
+ """
565
+
566
+
567
+ class Direction(StrEnum):
568
+ """
569
+ Scroll direction
570
+ """
571
+
572
+ up = 'up'
573
+ down = 'down'
574
+ left = 'left'
575
+ right = 'right'
576
+
577
+
578
+ class ScrollConfig(BaseActionConfig):
579
+ model_config = ConfigDict(
580
+ populate_by_name=True,
581
+ )
582
+ direction: Direction | None = 'down'
583
+ """
584
+ Scroll direction
585
+ """
586
+ distance: int | None = 100
587
+ """
588
+ Scroll distance in pixels
589
+ """
590
+ selector: str | None = None
591
+ """
592
+ Element to scroll (optional, defaults to window)
593
+ """
594
+
595
+
596
+ class AssertVisibleConfig(BaseActionConfig):
597
+ model_config = ConfigDict(
598
+ populate_by_name=True,
599
+ )
600
+ selector: str
601
+ """
602
+ CSS selector for element to check
603
+ """
604
+ timeout: int | None = 5000
605
+ """
606
+ Timeout in milliseconds
607
+ """
608
+ waitForElement: bool | None = True
609
+ """
610
+ Wait for element to be present
611
+ """
612
+
613
+
614
+ class ClearInputConfig(BaseActionConfig):
615
+ model_config = ConfigDict(
616
+ populate_by_name=True,
617
+ )
618
+ selector: str
619
+ """
620
+ CSS selector for input element
621
+ """
622
+ waitForElement: bool | None = True
623
+ """
624
+ Wait for element to be present
625
+ """
626
+
627
+
628
+ class OpenNewTabConfig(BaseActionConfig):
629
+ model_config = ConfigDict(
630
+ populate_by_name=True,
631
+ )
632
+ url: str
633
+ """
634
+ URL to open in new tab
635
+ """
636
+
637
+
638
+ class SwitchTabConfig(BaseActionConfig):
639
+ model_config = ConfigDict(
640
+ populate_by_name=True,
641
+ )
642
+ tabIndex: Annotated[int | None, Field(ge=0)] = None
643
+ """
644
+ Tab index to switch to
645
+ """
646
+ tabTitle: str | None = None
647
+ """
648
+ Tab title to switch to (alternative to index)
649
+ """
650
+
651
+
652
+ class GoForwardConfig(BaseActionConfig):
653
+ model_config = ConfigDict(
654
+ populate_by_name=True,
655
+ )
656
+
657
+
658
+ class GoBackConfig(BaseActionConfig):
659
+ model_config = ConfigDict(
660
+ populate_by_name=True,
661
+ )
662
+
663
+
664
+ class RefreshConfig(BaseActionConfig):
665
+ model_config = ConfigDict(
666
+ populate_by_name=True,
667
+ )
668
+
669
+
670
+ class GetPageInfoConfig(BaseActionConfig):
671
+ model_config = ConfigDict(
672
+ populate_by_name=True,
673
+ )
674
+ outputVariable: str | None = 'pageInfo'
675
+ """
676
+ Variable to store page information
677
+ """
678
+
679
+
680
+ class JunctionConfig(BaseActionConfig):
681
+ model_config = ConfigDict(
682
+ populate_by_name=True,
683
+ )
684
+ condition: str | None = None
685
+ """
686
+ Condition to evaluate
687
+ """
688
+ truePath: str | None = None
689
+ """
690
+ Path to take if condition is true
691
+ """
692
+ falsePath: str | None = None
693
+ """
694
+ Path to take if condition is false
695
+ """
696
+
697
+
698
+ class ConditionalConfig(BaseActionConfig):
699
+ model_config = ConfigDict(
700
+ populate_by_name=True,
701
+ )
702
+ condition: str
703
+ """
704
+ JavaScript condition to evaluate
705
+ """
706
+ operator: str | None = None
707
+ """
708
+ Optional comparison operator used by editor helpers.
709
+ """
710
+ value: Any | None = None
711
+ """
712
+ Optional comparison value used by editor helpers.
713
+ """
714
+ thenActions: list[dict[str, Any]] | None = None
715
+ """
716
+ Actions to execute if condition is true
717
+ """
718
+ elseActions: list[dict[str, Any]] | None = None
719
+ """
720
+ Actions to execute if condition is false
721
+ """
722
+
723
+
724
+ class LoopType(StrEnum):
725
+ """
726
+ Type of loop
727
+ """
728
+
729
+ count_ = 'count'
730
+ condition = 'condition'
731
+ foreach = 'foreach'
732
+
733
+
734
+ class LoopConfig(BaseActionConfig):
735
+ model_config = ConfigDict(
736
+ populate_by_name=True,
737
+ )
738
+ loopType: LoopType | None = 'count'
739
+ """
740
+ Type of loop
741
+ """
742
+ count: Annotated[int | None, Field(ge=1)] = None
743
+ """
744
+ Number of iterations (for count loops)
745
+ """
746
+ condition: str | None = None
747
+ """
748
+ Condition to continue loop (for condition loops)
749
+ """
750
+ arrayVariable: str | None = None
751
+ """
752
+ Variable containing array to iterate (for foreach loops)
753
+ """
754
+ itemVariable: str | None = 'item'
755
+ """
756
+ Variable name for current item (for foreach loops)
757
+ """
758
+ actions: list[dict[str, Any]] = Field(default_factory=list)
759
+ """
760
+ Actions to execute in each iteration
761
+ """
762
+ maxIterations: Annotated[int | None, Field(ge=1)] = 100
763
+ """
764
+ Maximum iterations to prevent infinite loops
765
+ """
766
+
767
+
768
+ class DragAndDropConfig(BaseActionConfig):
769
+ model_config = ConfigDict(
770
+ populate_by_name=True,
771
+ )
772
+ sourceSelector: str
773
+ """
774
+ CSS selector for element to drag
775
+ """
776
+ targetSelector: str
777
+ """
778
+ CSS selector for drop target
779
+ """
780
+ waitForElement: bool | None = True
781
+ """
782
+ Wait for elements to be present
783
+ """
784
+
785
+
786
+ class CallToFlowConfig(BaseActionConfig):
787
+ model_config = ConfigDict(
788
+ populate_by_name=True,
789
+ )
790
+ flowId: str
791
+ """
792
+ ID of flow to call
793
+ """
794
+ inputParameters: dict[str, Any] | None = None
795
+ """
796
+ Input parameters to pass to subflow
797
+ """
798
+ outputVariable: str | None = 'flowResult'
799
+ """
800
+ Variable to store result
801
+ """
802
+ waitForCompletion: bool | None = True
803
+ """
804
+ Wait for subflow to complete
805
+ """
806
+ async_: Annotated[bool | None, Field(alias='async')] = False
807
+ """
808
+ Execute subflow asynchronously
809
+ """
810
+
811
+
812
+ class SwitchToFrameConfig(BaseActionConfig):
813
+ model_config = ConfigDict(
814
+ populate_by_name=True,
815
+ )
816
+ switchMethod: str | None = 'selector'
817
+ """
818
+ Switch strategy (selector/index/name/id).
819
+ """
820
+ frameSelector: str | None = None
821
+ """
822
+ CSS selector or frame name/ID
823
+ """
824
+ frameIndex: Annotated[int | None, Field(ge=0)] = None
825
+ """
826
+ Frame index (alternative to selector)
827
+ """
828
+ frameName: str | None = None
829
+ """
830
+ Frame name (alternative to selector/index).
831
+ """
832
+ frameId: str | None = None
833
+ """
834
+ Frame id (alternative to selector/index).
835
+ """
836
+ waitForFrame: bool | None = True
837
+ """
838
+ Wait for frame to become available.
839
+ """
840
+ timeout: int | None = 10000
841
+ """
842
+ Wait timeout in milliseconds.
843
+ """
844
+ scrollIntoView: bool | None = True
845
+ """
846
+ Scroll frame into view before switching.
847
+ """
848
+
849
+
850
+ class ExitFrameConfig(BaseActionConfig):
851
+ model_config = ConfigDict(
852
+ populate_by_name=True,
853
+ )
854
+ exitMethod: str | None = 'parent'
855
+ """
856
+ Exit strategy (parent/main/levels).
857
+ """
858
+ levels: Annotated[int | None, Field(ge=1)] = 1
859
+ """
860
+ Number of parent levels when exitMethod is levels.
861
+ """
862
+ returnToMain: bool | None = False
863
+ """
864
+ Force returning to main content after exit.
865
+ """
866
+
867
+
868
+ class SetViewportConfig(BaseActionConfig):
869
+ model_config = ConfigDict(
870
+ populate_by_name=True,
871
+ )
872
+ width: Annotated[int, Field(ge=1)] = 1920
873
+ """
874
+ Viewport width in pixels
875
+ """
876
+ height: Annotated[int, Field(ge=1)] = 1080
877
+ """
878
+ Viewport height in pixels
879
+ """
880
+
881
+
882
+ class Property(StrEnum):
883
+ text = 'text'
884
+ value = 'value'
885
+ class_ = 'class'
886
+ id = 'id'
887
+ tagName = 'tagName'
888
+ innerHTML = 'innerHTML'
889
+ outerHTML = 'outerHTML'
890
+ attributes = 'attributes'
891
+ rect = 'rect'
892
+ visible = 'visible'
893
+ enabled = 'enabled'
894
+ selected = 'selected'
895
+
896
+
897
+ class GetElementPropertiesConfig(BaseActionConfig):
898
+ model_config = ConfigDict(
899
+ populate_by_name=True,
900
+ )
901
+ selector: str = ''
902
+ """
903
+ CSS selector for element
904
+ """
905
+ properties: list[Property] = Field(default_factory=list)
906
+ """
907
+ Properties to retrieve
908
+ """
909
+ outputVariable: str | None = 'elementProps'
910
+ """
911
+ Variable to store properties
912
+ """
913
+ waitForElement: bool | None = True
914
+ """
915
+ Wait for element to be present
916
+ """
917
+
918
+
919
+ class Action(StrEnum):
920
+ """
921
+ Action to perform on popup
922
+ """
923
+
924
+ accept = 'accept'
925
+ dismiss = 'dismiss'
926
+ text = 'text'
927
+
928
+
929
+ class HandlePopupConfig(BaseActionConfig):
930
+ model_config = ConfigDict(
931
+ populate_by_name=True,
932
+ )
933
+ action: Action | None = 'accept'
934
+ """
935
+ Action to perform on popup
936
+ """
937
+ text: str | None = None
938
+ """
939
+ Text to enter in prompt popup
940
+ """
941
+ waitForPopup: bool | None = True
942
+ """
943
+ Wait for popup to appear
944
+ """
945
+ timeout: int | None = 5000
946
+ """
947
+ Timeout in milliseconds
948
+ """
949
+
950
+
951
+ class FormField(BaseModel):
952
+ model_config = ConfigDict(
953
+ populate_by_name=True,
954
+ )
955
+ selector: str
956
+ """
957
+ CSS selector to target form field
958
+ """
959
+ value: Any
960
+ """
961
+ Value to fill
962
+ """
963
+ image: str | None = None
964
+ """
965
+ Optional screenshot path
966
+ """
967
+ name: str | None = None
968
+ """
969
+ Human-readable field name
970
+ """
971
+ type: Type | None = 'text'
972
+ """
973
+ Type of form field
974
+ """
975
+ options: list[FormFieldOption] | None = None
976
+ """
977
+ Options for select/radio fields
978
+ """
979
+ checked: bool | None = False
980
+ """
981
+ Whether checkbox is checked
982
+ """
983
+ multiple: bool | None = False
984
+ """
985
+ Whether select allows multiple selections
986
+ """
987
+
988
+
989
+ class FormFillConfig(BaseActionConfig):
990
+ model_config = ConfigDict(
991
+ populate_by_name=True,
992
+ )
993
+ fields: list[FormField] = Field(default_factory=list)
994
+ """
995
+ Array of form field configurations
996
+ """
997
+ waitForElements: bool | None = True
998
+ """
999
+ Wait for all form elements to be present
1000
+ """
1001
+ clearFirst: bool | None = True
1002
+ """
1003
+ Clear existing values before filling
1004
+ """
1005
+ submitAfterFill: bool | None = False
1006
+ """
1007
+ Automatically submit form after filling
1008
+ """
1009
+ smartFieldDetection: bool | None = True
1010
+ """
1011
+ Automatically detect field types
1012
+ """
1013
+
1014
+
1015
+ class ActionConfigurations(BaseModel):
1016
+ """
1017
+ Configuration schemas for all automation actions
1018
+ """
1019
+
1020
+ model_config = ConfigDict(
1021
+ populate_by_name=True,
1022
+ )
1023
+ actionConfigs: (
1024
+ dict[
1025
+ str,
1026
+ ClickConfig
1027
+ | InputConfig
1028
+ | SendKeysConfig
1029
+ | WaitConfig
1030
+ | NavigateConfig
1031
+ | ScrollConfig
1032
+ | ScreenshotConfig
1033
+ | AssertionConfig
1034
+ | AssertVisibleConfig
1035
+ | FormFillConfig
1036
+ | ClearInputConfig
1037
+ | OpenNewTabConfig
1038
+ | SwitchTabConfig
1039
+ | GoForwardConfig
1040
+ | GoBackConfig
1041
+ | RefreshConfig
1042
+ | GetPageInfoConfig
1043
+ | JunctionConfig
1044
+ | ApiCallConfig
1045
+ | ConditionalConfig
1046
+ | LoopConfig
1047
+ | DatabaseQueryConfig
1048
+ | DatabaseInsertConfig
1049
+ | CustomCodeConfig
1050
+ | DragAndDropConfig
1051
+ | CallToFlowConfig
1052
+ | SwitchToFrameConfig
1053
+ | ExitFrameConfig
1054
+ | SetViewportConfig
1055
+ | GetElementPropertiesConfig
1056
+ | HandlePopupConfig
1057
+ | FileUploadConfig
1058
+ | FileDownloadConfig
1059
+ | SubflowConfig,
1060
+ ]
1061
+ | None
1062
+ ) = None