@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,1112 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: action-configs.json
3
+ # timestamp: 2026-02-04T16:19:28+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: AnyUrl
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: AnyUrl
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]
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
+
562
+
563
+ class Direction(StrEnum):
564
+ """
565
+ Scroll direction
566
+ """
567
+
568
+ up = 'up'
569
+ down = 'down'
570
+ left = 'left'
571
+ right = 'right'
572
+
573
+
574
+ class ScrollConfig(BaseActionConfig):
575
+ model_config = ConfigDict(
576
+ populate_by_name=True,
577
+ )
578
+ direction: Direction | None = 'down'
579
+ """
580
+ Scroll direction
581
+ """
582
+ distance: int | None = 100
583
+ """
584
+ Scroll distance in pixels
585
+ """
586
+ selector: str | None = None
587
+ """
588
+ Element to scroll (optional, defaults to window)
589
+ """
590
+
591
+
592
+ class AssertVisibleConfig(BaseActionConfig):
593
+ model_config = ConfigDict(
594
+ populate_by_name=True,
595
+ )
596
+ selector: str
597
+ """
598
+ CSS selector for element to check
599
+ """
600
+ timeout: int | None = 5000
601
+ """
602
+ Timeout in milliseconds
603
+ """
604
+ waitForElement: bool | None = True
605
+ """
606
+ Wait for element to be present
607
+ """
608
+
609
+
610
+ class ClearInputConfig(BaseActionConfig):
611
+ model_config = ConfigDict(
612
+ populate_by_name=True,
613
+ )
614
+ selector: str
615
+ """
616
+ CSS selector for input element
617
+ """
618
+ waitForElement: bool | None = True
619
+ """
620
+ Wait for element to be present
621
+ """
622
+
623
+
624
+ class OpenNewTabConfig(BaseActionConfig):
625
+ model_config = ConfigDict(
626
+ populate_by_name=True,
627
+ )
628
+ url: str
629
+ """
630
+ URL to open in new tab
631
+ """
632
+
633
+
634
+ class SwitchTabConfig(BaseActionConfig):
635
+ model_config = ConfigDict(
636
+ populate_by_name=True,
637
+ )
638
+ tabIndex: Annotated[int | None, Field(ge=0)] = None
639
+ """
640
+ Tab index to switch to
641
+ """
642
+ tabTitle: str | None = None
643
+ """
644
+ Tab title to switch to (alternative to index)
645
+ """
646
+
647
+
648
+ class GoForwardConfig(BaseActionConfig):
649
+ model_config = ConfigDict(
650
+ populate_by_name=True,
651
+ )
652
+
653
+
654
+ class GoBackConfig(BaseActionConfig):
655
+ model_config = ConfigDict(
656
+ populate_by_name=True,
657
+ )
658
+
659
+
660
+ class RefreshConfig(BaseActionConfig):
661
+ model_config = ConfigDict(
662
+ populate_by_name=True,
663
+ )
664
+
665
+
666
+ class GetPageInfoConfig(BaseActionConfig):
667
+ model_config = ConfigDict(
668
+ populate_by_name=True,
669
+ )
670
+ outputVariable: str | None = 'pageInfo'
671
+ """
672
+ Variable to store page information
673
+ """
674
+
675
+
676
+ class JunctionConfig(BaseActionConfig):
677
+ model_config = ConfigDict(
678
+ populate_by_name=True,
679
+ )
680
+ condition: str | None = None
681
+ """
682
+ Condition to evaluate
683
+ """
684
+ truePath: str | None = None
685
+ """
686
+ Path to take if condition is true
687
+ """
688
+ falsePath: str | None = None
689
+ """
690
+ Path to take if condition is false
691
+ """
692
+
693
+
694
+ class Operator(StrEnum):
695
+ """
696
+ Comparison operator
697
+ """
698
+
699
+ equals = 'equals'
700
+ not_equals = 'not_equals'
701
+ greater_than = 'greater_than'
702
+ less_than = 'less_than'
703
+ greater_than_or_equal = 'greater_than_or_equal'
704
+ less_than_or_equal = 'less_than_or_equal'
705
+ contains = 'contains'
706
+ not_contains = 'not_contains'
707
+ starts_with = 'starts_with'
708
+ ends_with = 'ends_with'
709
+ exists = 'exists'
710
+ not_exists = 'not_exists'
711
+ is_empty = 'is_empty'
712
+ not_empty = 'not_empty'
713
+ is_true = 'is_true'
714
+ is_false = 'is_false'
715
+ in_ = 'in'
716
+ not_in = 'not_in'
717
+ matches = 'matches'
718
+ not_matches = 'not_matches'
719
+
720
+
721
+ class ConditionalConfig(BaseActionConfig):
722
+ model_config = ConfigDict(
723
+ populate_by_name=True,
724
+ )
725
+ condition: str
726
+ """
727
+ Variable name or {{variable_id}} pattern to evaluate
728
+ """
729
+ operator: Operator
730
+ """
731
+ Comparison operator
732
+ """
733
+ value: str
734
+ """
735
+ Value to compare against (can be plain text or {{variable_id}})
736
+ """
737
+ trueAction: str
738
+ """
739
+ Action ID to execute if condition is true
740
+ """
741
+ falseAction: str | None = None
742
+ """
743
+ Action ID to execute if condition is false
744
+ """
745
+
746
+
747
+ class LoopType(StrEnum):
748
+ """
749
+ Type of loop
750
+ """
751
+
752
+ count_ = 'count'
753
+ condition = 'condition'
754
+ foreach = 'foreach'
755
+
756
+
757
+ class LoopConfig(BaseActionConfig):
758
+ model_config = ConfigDict(
759
+ populate_by_name=True,
760
+ )
761
+ loopType: LoopType | None = 'count'
762
+ """
763
+ Type of loop
764
+ """
765
+ count: Annotated[int | None, Field(ge=1)] = None
766
+ """
767
+ Number of iterations (for count loops)
768
+ """
769
+ condition: str | None = None
770
+ """
771
+ Condition to continue loop (for condition loops)
772
+ """
773
+ arrayVariable: str | None = None
774
+ """
775
+ Variable containing array to iterate (for foreach loops)
776
+ """
777
+ itemVariable: str | None = 'item'
778
+ """
779
+ Variable name for current item (for foreach loops)
780
+ """
781
+ actions: list[dict[str, Any]]
782
+ """
783
+ Actions to execute in each iteration
784
+ """
785
+ maxIterations: Annotated[int | None, Field(ge=1)] = 100
786
+ """
787
+ Maximum iterations to prevent infinite loops
788
+ """
789
+
790
+
791
+ class DragAndDropConfig(BaseActionConfig):
792
+ model_config = ConfigDict(
793
+ populate_by_name=True,
794
+ )
795
+ sourceSelector: str
796
+ """
797
+ CSS selector for element to drag
798
+ """
799
+ targetSelector: str
800
+ """
801
+ CSS selector for drop target
802
+ """
803
+ waitForElement: bool | None = True
804
+ """
805
+ Wait for elements to be present
806
+ """
807
+
808
+
809
+ class CallToFlowConfig(BaseActionConfig):
810
+ model_config = ConfigDict(
811
+ populate_by_name=True,
812
+ )
813
+ flowId: str
814
+ """
815
+ ID of flow to call
816
+ """
817
+ inputParameters: dict[str, Any] | None = None
818
+ """
819
+ Input parameters to pass to subflow
820
+ """
821
+ outputVariable: str | None = 'flowResult'
822
+ """
823
+ Variable to store result
824
+ """
825
+ waitForCompletion: bool | None = True
826
+ """
827
+ Wait for subflow to complete
828
+ """
829
+ async_: Annotated[bool | None, Field(alias='async')] = False
830
+ """
831
+ Execute subflow asynchronously
832
+ """
833
+
834
+
835
+ class SwitchToFrameConfig(BaseActionConfig):
836
+ model_config = ConfigDict(
837
+ populate_by_name=True,
838
+ )
839
+ frameSelector: str | None = None
840
+ """
841
+ CSS selector or frame name/ID
842
+ """
843
+ frameIndex: Annotated[int | None, Field(ge=0)] = None
844
+ """
845
+ Frame index (alternative to selector)
846
+ """
847
+
848
+
849
+ class ExitFrameConfig(BaseActionConfig):
850
+ model_config = ConfigDict(
851
+ populate_by_name=True,
852
+ )
853
+
854
+
855
+ class ViewportType(StrEnum):
856
+ """
857
+ Type of viewport configuration
858
+ """
859
+
860
+ preset = 'preset'
861
+ device = 'device'
862
+ responsive = 'responsive'
863
+ custom = 'custom'
864
+
865
+
866
+ class SetViewportConfig(BaseActionConfig):
867
+ model_config = ConfigDict(
868
+ populate_by_name=True,
869
+ )
870
+ viewportType: ViewportType | None = 'custom'
871
+ """
872
+ Type of viewport configuration
873
+ """
874
+ width: Annotated[int, Field(ge=1)]
875
+ """
876
+ Viewport width in pixels
877
+ """
878
+ height: Annotated[int, Field(ge=1)]
879
+ """
880
+ Viewport height in pixels
881
+ """
882
+ screenSizePreset: str | None = None
883
+ """
884
+ Preset screen size name
885
+ """
886
+ deviceName: str | None = None
887
+ """
888
+ Device name for emulation
889
+ """
890
+ deviceScaleFactor: Annotated[float | None, Field(ge=0.1, le=5.0)] = 1.0
891
+ """
892
+ Device scale factor
893
+ """
894
+ isMobile: bool | None = False
895
+ """
896
+ Emulate mobile device
897
+ """
898
+ hasTouch: bool | None = False
899
+ """
900
+ Enable touch events
901
+ """
902
+ isLandscape: bool | None = False
903
+ """
904
+ Use landscape orientation
905
+ """
906
+ userAgent: str | None = None
907
+ """
908
+ Custom user agent string
909
+ """
910
+ waitAfterResize: bool | None = True
911
+ """
912
+ Wait after viewport resize
913
+ """
914
+ takeScreenshot: bool | None = False
915
+ """
916
+ Take screenshot after resize
917
+ """
918
+ preserveCookies: bool | None = False
919
+ """
920
+ Preserve cookies across viewport changes
921
+ """
922
+ preserveLocalStorage: bool | None = False
923
+ """
924
+ Preserve local storage across viewport changes
925
+ """
926
+ preserveSessionStorage: bool | None = False
927
+ """
928
+ Preserve session storage across viewport changes
929
+ """
930
+
931
+
932
+ class Property(StrEnum):
933
+ text = 'text'
934
+ value = 'value'
935
+ class_ = 'class'
936
+ id = 'id'
937
+ tagName = 'tagName'
938
+ innerHTML = 'innerHTML'
939
+ outerHTML = 'outerHTML'
940
+ attributes = 'attributes'
941
+ rect = 'rect'
942
+ visible = 'visible'
943
+ enabled = 'enabled'
944
+ selected = 'selected'
945
+
946
+
947
+ class GetElementPropertiesConfig(BaseActionConfig):
948
+ model_config = ConfigDict(
949
+ populate_by_name=True,
950
+ )
951
+ selector: str
952
+ """
953
+ CSS selector for element
954
+ """
955
+ properties: list[Property]
956
+ """
957
+ Properties to retrieve
958
+ """
959
+ outputVariable: str | None = 'elementProps'
960
+ """
961
+ Variable to store properties
962
+ """
963
+ waitForElement: bool | None = True
964
+ """
965
+ Wait for element to be present
966
+ """
967
+
968
+
969
+ class Action(StrEnum):
970
+ """
971
+ Action to perform on popup
972
+ """
973
+
974
+ accept = 'accept'
975
+ dismiss = 'dismiss'
976
+ text = 'text'
977
+
978
+
979
+ class HandlePopupConfig(BaseActionConfig):
980
+ model_config = ConfigDict(
981
+ populate_by_name=True,
982
+ )
983
+ action: Action | None = 'accept'
984
+ """
985
+ Action to perform on popup
986
+ """
987
+ text: str | None = None
988
+ """
989
+ Text to enter in prompt popup
990
+ """
991
+ waitForPopup: bool | None = True
992
+ """
993
+ Wait for popup to appear
994
+ """
995
+ timeout: int | None = 5000
996
+ """
997
+ Timeout in milliseconds
998
+ """
999
+
1000
+
1001
+ class FormField(BaseModel):
1002
+ model_config = ConfigDict(
1003
+ populate_by_name=True,
1004
+ )
1005
+ selector: str
1006
+ """
1007
+ CSS selector to target form field
1008
+ """
1009
+ value: Any
1010
+ """
1011
+ Value to fill
1012
+ """
1013
+ image: str | None = None
1014
+ """
1015
+ Optional screenshot path
1016
+ """
1017
+ name: str | None = None
1018
+ """
1019
+ Human-readable field name
1020
+ """
1021
+ type: Type | None = 'text'
1022
+ """
1023
+ Type of form field
1024
+ """
1025
+ options: list[FormFieldOption] | None = None
1026
+ """
1027
+ Options for select/radio fields
1028
+ """
1029
+ checked: bool | None = False
1030
+ """
1031
+ Whether checkbox is checked
1032
+ """
1033
+ multiple: bool | None = False
1034
+ """
1035
+ Whether select allows multiple selections
1036
+ """
1037
+
1038
+
1039
+ class FormFillConfig(BaseActionConfig):
1040
+ model_config = ConfigDict(
1041
+ populate_by_name=True,
1042
+ )
1043
+ fields: list[FormField]
1044
+ """
1045
+ Array of form field configurations
1046
+ """
1047
+ waitForElements: bool | None = True
1048
+ """
1049
+ Wait for all form elements to be present
1050
+ """
1051
+ clearFirst: bool | None = True
1052
+ """
1053
+ Clear existing values before filling
1054
+ """
1055
+ submitAfterFill: bool | None = False
1056
+ """
1057
+ Automatically submit form after filling
1058
+ """
1059
+ smartFieldDetection: bool | None = True
1060
+ """
1061
+ Automatically detect field types
1062
+ """
1063
+
1064
+
1065
+ class ActionConfigurations(BaseModel):
1066
+ """
1067
+ Configuration schemas for all automation actions
1068
+ """
1069
+
1070
+ model_config = ConfigDict(
1071
+ populate_by_name=True,
1072
+ )
1073
+ actionConfigs: (
1074
+ dict[
1075
+ str,
1076
+ ClickConfig
1077
+ | InputConfig
1078
+ | SendKeysConfig
1079
+ | WaitConfig
1080
+ | NavigateConfig
1081
+ | ScrollConfig
1082
+ | ScreenshotConfig
1083
+ | AssertionConfig
1084
+ | AssertVisibleConfig
1085
+ | FormFillConfig
1086
+ | ClearInputConfig
1087
+ | OpenNewTabConfig
1088
+ | SwitchTabConfig
1089
+ | GoForwardConfig
1090
+ | GoBackConfig
1091
+ | RefreshConfig
1092
+ | GetPageInfoConfig
1093
+ | JunctionConfig
1094
+ | ApiCallConfig
1095
+ | ConditionalConfig
1096
+ | LoopConfig
1097
+ | DatabaseQueryConfig
1098
+ | DatabaseInsertConfig
1099
+ | CustomCodeConfig
1100
+ | DragAndDropConfig
1101
+ | CallToFlowConfig
1102
+ | SwitchToFrameConfig
1103
+ | ExitFrameConfig
1104
+ | SetViewportConfig
1105
+ | GetElementPropertiesConfig
1106
+ | HandlePopupConfig
1107
+ | FileUploadConfig
1108
+ | FileDownloadConfig
1109
+ | SubflowConfig,
1110
+ ]
1111
+ | None
1112
+ ) = None