@autoweb/domain-models 1.0.1 → 1.0.3

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.
@@ -1,12 +1,14 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: action-configs.json
3
- # timestamp: 2026-02-04T16:19:28+00:00
3
+ # timestamp: 2026-01-25T13:38:24+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
7
  from enum import StrEnum
8
8
  from typing import Annotated, Any
9
9
 
10
+ from aiohttp.web_routedef import view
11
+ from black.debug import T
10
12
  from pydantic import AnyUrl, BaseModel, ConfigDict, Field
11
13
 
12
14
 
@@ -33,39 +35,39 @@ class ClickConfig(BaseActionConfig):
33
35
  model_config = ConfigDict(
34
36
  populate_by_name=True,
35
37
  )
36
- selector: str
38
+ selector: str = ''
37
39
  """
38
40
  CSS selector for element to click
39
41
  """
40
- waitTime: int | None = 1000
42
+ waitTime: int = 1000
41
43
  """
42
44
  Wait time in milliseconds
43
45
  """
44
- forceClick: bool | None = False
46
+ forceClick: bool = False
45
47
  """
46
48
  Force click even if element not clickable
47
49
  """
48
- scrollIntoView: bool | None = True
50
+ scrollIntoView: bool = True
49
51
  """
50
52
  Scroll element into view before clicking
51
53
  """
52
- waitForElement: bool | None = True
54
+ waitForElement: bool = True
53
55
  """
54
56
  Wait for element to be present
55
57
  """
56
- clickType: ClickType | None = 'left'
58
+ clickType: ClickType = ClickType.left
57
59
  """
58
60
  Type of click to perform
59
61
  """
60
- clickCount: Annotated[int | None, Field(ge=1)] = 1
62
+ clickCount: Annotated[int, Field(ge=1)] = 1
61
63
  """
62
64
  Number of clicks to perform
63
65
  """
64
- clickAndHold: bool | None = False
66
+ clickAndHold: bool = False
65
67
  """
66
68
  Whether to click and hold
67
69
  """
68
- holdDuration: int | None = 1000
70
+ holdDuration: int = 1000
69
71
  """
70
72
  Duration to hold click in milliseconds
71
73
  """
@@ -75,23 +77,23 @@ class InputConfig(BaseActionConfig):
75
77
  model_config = ConfigDict(
76
78
  populate_by_name=True,
77
79
  )
78
- selector: str
80
+ selector: str = ''
79
81
  """
80
82
  CSS selector for input element
81
83
  """
82
- text: str
84
+ text: str = ''
83
85
  """
84
86
  Text to input
85
87
  """
86
- clearFirst: bool | None = True
88
+ clearFirst: bool = True
87
89
  """
88
90
  Clear field before typing
89
91
  """
90
- waitForElement: bool | None = True
92
+ waitForElement: bool = True
91
93
  """
92
94
  Wait for element to be present
93
95
  """
94
- scrollIntoView: bool | None = True
96
+ scrollIntoView: bool = True
95
97
  """
96
98
  Scroll element into view
97
99
  """
@@ -101,15 +103,15 @@ class NavigateConfig(BaseActionConfig):
101
103
  model_config = ConfigDict(
102
104
  populate_by_name=True,
103
105
  )
104
- url: AnyUrl
106
+ url: str
105
107
  """
106
108
  URL to navigate to
107
109
  """
108
- waitForLoad: bool | None = True
110
+ waitForLoad: bool = True
109
111
  """
110
112
  Wait for page to load
111
113
  """
112
- takeScreenshot: bool | None = False
114
+ takeScreenshot: bool = False
113
115
  """
114
116
  Take screenshot after navigation
115
117
  """
@@ -129,31 +131,31 @@ class WaitConfig(BaseActionConfig):
129
131
  model_config = ConfigDict(
130
132
  populate_by_name=True,
131
133
  )
132
- waitType: WaitType | None = 'duration'
134
+ waitType: WaitType = WaitType.duration
133
135
  """
134
136
  Type of wait to perform
135
137
  """
136
- duration: int | None = 3000
138
+ duration: int = 3000
137
139
  """
138
140
  Duration to wait in milliseconds
139
141
  """
140
- selector: str | None = None
142
+ selector: str
141
143
  """
142
144
  CSS selector for element to wait for
143
145
  """
144
- timeout: int | None = 10000
146
+ timeout: int = 10000
145
147
  """
146
148
  Maximum time to wait in milliseconds
147
149
  """
148
- waitForInteractable: bool | None = False
150
+ waitForInteractable: bool = False
149
151
  """
150
152
  Wait for element to be interactable
151
153
  """
152
- fallbackToDuration: bool | None = True
154
+ fallbackToDuration: bool = True
153
155
  """
154
156
  Fallback to duration wait if element wait fails
155
157
  """
156
- fallbackDuration: int | None = 2000
158
+ fallbackDuration: int = 2000
157
159
  """
158
160
  Duration to wait if fallback triggered
159
161
  """
@@ -167,7 +169,7 @@ class AssertType(StrEnum):
167
169
  exists = 'exists'
168
170
  visible = 'visible'
169
171
  text = 'text'
170
- value = 'value'
172
+ value_ = 'value'
171
173
  attribute = 'attribute'
172
174
 
173
175
 
@@ -179,7 +181,7 @@ class AssertionConfig(BaseActionConfig):
179
181
  """
180
182
  CSS selector for element
181
183
  """
182
- assertType: AssertType | None = 'exists'
184
+ assertType: AssertType = AssertType.exists
183
185
  """
184
186
  Type of assertion
185
187
  """
@@ -224,7 +226,7 @@ class ScreenshotConfig(BaseActionConfig):
224
226
  model_config = ConfigDict(
225
227
  populate_by_name=True,
226
228
  )
227
- screenshotType: ScreenshotType | None = 'viewport'
229
+ screenshotType: ScreenshotType = ScreenshotType.viewport
228
230
  """
229
231
  Type of screenshot to capture
230
232
  """
@@ -244,7 +246,7 @@ class ScreenshotConfig(BaseActionConfig):
244
246
  """
245
247
  Include timestamp in filename
246
248
  """
247
- format: Format | None = 'png'
249
+ format: Format = Format.png
248
250
  """
249
251
  Output format
250
252
  """
@@ -312,11 +314,11 @@ class ApiCallConfig(BaseActionConfig):
312
314
  model_config = ConfigDict(
313
315
  populate_by_name=True,
314
316
  )
315
- method: Method | None = 'GET'
317
+ method: Method = Method.GET
316
318
  """
317
319
  HTTP method
318
320
  """
319
- url: AnyUrl
321
+ url: str | None = None
320
322
  """
321
323
  API endpoint URL
322
324
  """
@@ -370,11 +372,11 @@ class DatabaseQueryConfig(BaseActionConfig):
370
372
  model_config = ConfigDict(
371
373
  populate_by_name=True,
372
374
  )
373
- connectionString: str
375
+ connectionString: str = ''
374
376
  """
375
377
  Database connection string
376
378
  """
377
- query: str
379
+ query: str = ''
378
380
  """
379
381
  SQL query to execute
380
382
  """
@@ -386,11 +388,11 @@ class DatabaseQueryConfig(BaseActionConfig):
386
388
  """
387
389
  Log the query being executed
388
390
  """
389
- validateConnection: bool | None = True
391
+ validateConnection: bool = True
390
392
  """
391
393
  Validate database connection
392
394
  """
393
- timeout: int | None = 30000
395
+ timeout: int = 30000
394
396
  """
395
397
  Query timeout in milliseconds
396
398
  """
@@ -400,15 +402,15 @@ class DatabaseInsertConfig(BaseActionConfig):
400
402
  model_config = ConfigDict(
401
403
  populate_by_name=True,
402
404
  )
403
- connectionString: str
405
+ connectionString: str = ''
404
406
  """
405
407
  Database connection string
406
408
  """
407
- table: str
409
+ table: str = ''
408
410
  """
409
411
  Table name to insert into
410
412
  """
411
- data: dict[str, Any]
413
+ data: dict[str, Any] = Field(default_factory=dict)
412
414
  """
413
415
  Data to insert (column-value pairs)
414
416
  """
@@ -416,11 +418,11 @@ class DatabaseInsertConfig(BaseActionConfig):
416
418
  """
417
419
  Log the insert operation
418
420
  """
419
- validateConnection: bool | None = True
421
+ validateConnection: bool = True
420
422
  """
421
423
  Validate database connection
422
424
  """
423
- rollbackOnError: bool | None = True
425
+ rollbackOnError: bool = True
424
426
  """
425
427
  Rollback transaction on error
426
428
  """
@@ -430,11 +432,11 @@ class FileUploadConfig(BaseActionConfig):
430
432
  model_config = ConfigDict(
431
433
  populate_by_name=True,
432
434
  )
433
- selector: str
435
+ selector: str = ''
434
436
  """
435
437
  CSS selector for file input
436
438
  """
437
- filePath: str
439
+ filePath: str = ''
438
440
  """
439
441
  Path to file to upload
440
442
  """
@@ -442,7 +444,7 @@ class FileUploadConfig(BaseActionConfig):
442
444
  """
443
445
  Wait for element to be present
444
446
  """
445
- scrollIntoView: bool | None = True
447
+ scrollIntoView: bool = True
446
448
  """
447
449
  Scroll element into view
448
450
  """
@@ -456,11 +458,11 @@ class FileDownloadConfig(BaseActionConfig):
456
458
  model_config = ConfigDict(
457
459
  populate_by_name=True,
458
460
  )
459
- selector: str
461
+ selector: str = ''
460
462
  """
461
463
  CSS selector for download link
462
464
  """
463
- downloadPath: str
465
+ downloadPath: str = ''
464
466
  """
465
467
  Path to save downloaded file
466
468
  """
@@ -498,7 +500,7 @@ class CustomCodeConfig(BaseActionConfig):
498
500
  """
499
501
  Catch and handle errors
500
502
  """
501
- timeout: int | None = 30000
503
+ timeout: int = 30000
502
504
  """
503
505
  Execution timeout in milliseconds
504
506
  """
@@ -550,7 +552,7 @@ class SendKeysConfig(BaseActionConfig):
550
552
  """
551
553
  CSS selector for element to send keys to
552
554
  """
553
- keys: str
555
+ keys: str = ''
554
556
  """
555
557
  Keys to send
556
558
  """
@@ -558,6 +560,10 @@ class SendKeysConfig(BaseActionConfig):
558
560
  """
559
561
  Wait for element to be present
560
562
  """
563
+ keyCombinations: list[Any] | None = None
564
+ """
565
+ Optional key combinations payload used by backend actions.
566
+ """
561
567
 
562
568
 
563
569
  class Direction(StrEnum):
@@ -575,7 +581,7 @@ class ScrollConfig(BaseActionConfig):
575
581
  model_config = ConfigDict(
576
582
  populate_by_name=True,
577
583
  )
578
- direction: Direction | None = 'down'
584
+ direction: Direction = Direction.down
579
585
  """
580
586
  Scroll direction
581
587
  """
@@ -615,6 +621,14 @@ class ClearInputConfig(BaseActionConfig):
615
621
  """
616
622
  CSS selector for input element
617
623
  """
624
+ scrollIntoView: bool
625
+ """
626
+ Scroll element into view before clearing
627
+ """
628
+ maintainFocus: bool
629
+ """
630
+ Whether to keep focus on element after clearing
631
+ """
618
632
  waitForElement: bool | None = True
619
633
  """
620
634
  Wait for element to be present
@@ -639,6 +653,14 @@ class SwitchTabConfig(BaseActionConfig):
639
653
  """
640
654
  Tab index to switch to
641
655
  """
656
+ tabUrl: str | None = None
657
+ """
658
+ URL of tab to switch to (alternative to index)
659
+ """
660
+ switchMethod: str | None = 'auto'
661
+ """
662
+ Explicit switch method (auto/index/url/title)
663
+ """
642
664
  tabTitle: str | None = None
643
665
  """
644
666
  Tab title to switch to (alternative to index)
@@ -691,56 +713,29 @@ class JunctionConfig(BaseActionConfig):
691
713
  """
692
714
 
693
715
 
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
716
  class ConditionalConfig(BaseActionConfig):
722
717
  model_config = ConfigDict(
723
718
  populate_by_name=True,
724
719
  )
725
720
  condition: str
726
721
  """
727
- Variable name or {{variable_id}} pattern to evaluate
722
+ JavaScript condition to evaluate
728
723
  """
729
- operator: Operator
724
+ operator: str
730
725
  """
731
- Comparison operator
726
+ Optional comparison operator used by editor helpers.
732
727
  """
733
- value: str
728
+ value: Any
734
729
  """
735
- Value to compare against (can be plain text or {{variable_id}})
730
+ Optional comparison value used by editor helpers.
736
731
  """
737
- trueAction: str
732
+ thenActions: list[dict[str, Any]] | None = None
738
733
  """
739
- Action ID to execute if condition is true
734
+ Actions to execute if condition is true
740
735
  """
741
- falseAction: str | None = None
736
+ elseActions: list[dict[str, Any]] | None = None
742
737
  """
743
- Action ID to execute if condition is false
738
+ Actions to execute if condition is false
744
739
  """
745
740
 
746
741
 
@@ -758,15 +753,15 @@ class LoopConfig(BaseActionConfig):
758
753
  model_config = ConfigDict(
759
754
  populate_by_name=True,
760
755
  )
761
- loopType: LoopType | None = 'count'
756
+ loopType: LoopType
762
757
  """
763
758
  Type of loop
764
759
  """
765
- count: Annotated[int | None, Field(ge=1)] = None
760
+ count: Annotated[int, Field(ge=1)]
766
761
  """
767
762
  Number of iterations (for count loops)
768
763
  """
769
- condition: str | None = None
764
+ condition: str
770
765
  """
771
766
  Condition to continue loop (for condition loops)
772
767
  """
@@ -778,7 +773,7 @@ class LoopConfig(BaseActionConfig):
778
773
  """
779
774
  Variable name for current item (for foreach loops)
780
775
  """
781
- actions: list[dict[str, Any]]
776
+ actions: list[dict[str, Any]] = Field(default_factory=list)
782
777
  """
783
778
  Actions to execute in each iteration
784
779
  """
@@ -814,19 +809,35 @@ class CallToFlowConfig(BaseActionConfig):
814
809
  """
815
810
  ID of flow to call
816
811
  """
817
- inputParameters: dict[str, Any] | None = None
812
+ flowName: str | None = None
818
813
  """
819
- Input parameters to pass to subflow
814
+ Name of flow to call
820
815
  """
821
816
  outputVariable: str | None = 'flowResult'
822
817
  """
823
818
  Variable to store result
824
819
  """
825
- waitForCompletion: bool | None = True
820
+ inputParameters: list[dict[str, Any]]
821
+ """
822
+ Input parameters to pass to subflow
823
+ """
824
+ outputParameters: list[dict[str, Any]]
825
+ """
826
+ Output parameters to store result
827
+ """
828
+ propagateErrors: bool
829
+ """
830
+ Whether to propagate errors from the subflow
831
+ """
832
+ logExecution: bool
833
+ """
834
+ Whether to log execution of the subflow
835
+ """
836
+ waitForCompletion: bool
826
837
  """
827
838
  Wait for subflow to complete
828
839
  """
829
- async_: Annotated[bool | None, Field(alias='async')] = False
840
+ async_: Annotated[bool, Field(alias='async')]
830
841
  """
831
842
  Execute subflow asynchronously
832
843
  """
@@ -836,6 +847,10 @@ class SwitchToFrameConfig(BaseActionConfig):
836
847
  model_config = ConfigDict(
837
848
  populate_by_name=True,
838
849
  )
850
+ switchMethod: str | None = 'selector'
851
+ """
852
+ Switch strategy (selector/index/name/id).
853
+ """
839
854
  frameSelector: str | None = None
840
855
  """
841
856
  CSS selector or frame name/ID
@@ -844,94 +859,114 @@ class SwitchToFrameConfig(BaseActionConfig):
844
859
  """
845
860
  Frame index (alternative to selector)
846
861
  """
862
+ frameName: str | None = None
863
+ """
864
+ Frame name (alternative to selector/index).
865
+ """
866
+ frameId: str | None = None
867
+ """
868
+ Frame id (alternative to selector/index).
869
+ """
870
+ waitForFrame: bool | None = True
871
+ """
872
+ Wait for frame to become available.
873
+ """
874
+ timeout: int | None = 10000
875
+ """
876
+ Wait timeout in milliseconds.
877
+ """
878
+ scrollIntoView: bool | None = True
879
+ """
880
+ Scroll frame into view before switching.
881
+ """
847
882
 
848
883
 
849
884
  class ExitFrameConfig(BaseActionConfig):
850
885
  model_config = ConfigDict(
851
886
  populate_by_name=True,
852
887
  )
853
-
854
-
855
- class ViewportType(StrEnum):
888
+ exitMethod: str | None = 'parent'
856
889
  """
857
- Type of viewport configuration
890
+ Exit strategy (parent/main/levels).
891
+ """
892
+ levels: Annotated[int | None, Field(ge=1)] = 1
893
+ """
894
+ Number of parent levels when exitMethod is levels.
895
+ """
896
+ returnToMain: bool | None = False
897
+ """
898
+ Force returning to main content after exit.
858
899
  """
859
-
860
- preset = 'preset'
861
- device = 'device'
862
- responsive = 'responsive'
863
- custom = 'custom'
864
900
 
865
901
 
866
902
  class SetViewportConfig(BaseActionConfig):
867
903
  model_config = ConfigDict(
868
904
  populate_by_name=True,
869
905
  )
870
- viewportType: ViewportType | None = 'custom'
906
+ width: Annotated[int, Field(ge=1)] = 1920
871
907
  """
872
- Type of viewport configuration
908
+ Viewport width in pixels
873
909
  """
874
- width: Annotated[int, Field(ge=1)]
910
+ viewportType: str = 'desktop'
875
911
  """
876
- Viewport width in pixels
912
+ Type of viewport (desktop, mobile, tablet, custom)
877
913
  """
878
- height: Annotated[int, Field(ge=1)]
914
+ waitAfterResize: int = 1000
879
915
  """
880
- Viewport height in pixels
916
+ Time to wait after resizing viewport in milliseconds
881
917
  """
882
- screenSizePreset: str | None = None
918
+ screenSizePreset: str = '1080p'
883
919
  """
884
- Preset screen size name
920
+ Optional preset screen size (e.g. 1080p, 720p) for quick configuration
885
921
  """
886
922
  deviceName: str | None = None
923
+ """Optional device name (e.g. iPhone 12) for device emulation mode
887
924
  """
888
- Device name for emulation
889
- """
890
- deviceScaleFactor: Annotated[float | None, Field(ge=0.1, le=5.0)] = 1.0
925
+ deviceScaleFactor: int | None = None
891
926
  """
892
- Device scale factor
927
+ Device scale factor for high DPI emulation (e.g. 3 for iPhone Plus models)
893
928
  """
894
- isMobile: bool | None = False
929
+ isMobile: bool | None = None
895
930
  """
896
- Emulate mobile device
931
+ Whether to emulate mobile device (affects user agent and viewport behavior)
897
932
  """
898
- hasTouch: bool | None = False
933
+ hasTouch: bool | None = None
899
934
  """
900
- Enable touch events
935
+ Whether to emulate touch screen (enables touch events)
901
936
  """
902
- isLandscape: bool | None = False
937
+ isLandscape: bool | None = None
903
938
  """
904
- Use landscape orientation
939
+ Whether to set landscape orientation (swaps width and height)
905
940
  """
906
941
  userAgent: str | None = None
907
942
  """
908
- Custom user agent string
943
+ Custom user agent string to use in mobile emulation mode
909
944
  """
910
- waitAfterResize: bool | None = True
945
+ preserveCookies: bool = False
911
946
  """
912
- Wait after viewport resize
947
+ Whether to preserve cookies when changing viewport
913
948
  """
914
- takeScreenshot: bool | None = False
949
+ preserveLocalStorage: bool = False
915
950
  """
916
- Take screenshot after resize
951
+ Whether to preserve local storage when changing viewport
917
952
  """
918
- preserveCookies: bool | None = False
953
+ preserveSessionStorage: bool = False
919
954
  """
920
- Preserve cookies across viewport changes
955
+ Whether to preserve session storage when changing viewport
921
956
  """
922
- preserveLocalStorage: bool | None = False
957
+ takeScreenshot: bool = False
923
958
  """
924
- Preserve local storage across viewport changes
959
+ Whether to take screenshot after resizing viewport
925
960
  """
926
- preserveSessionStorage: bool | None = False
961
+ height: Annotated[int, Field(ge=1)] = 1080
927
962
  """
928
- Preserve session storage across viewport changes
963
+ Viewport height in pixels
929
964
  """
930
965
 
931
966
 
932
967
  class Property(StrEnum):
933
968
  text = 'text'
934
- value = 'value'
969
+ value_ = 'value'
935
970
  class_ = 'class'
936
971
  id = 'id'
937
972
  tagName = 'tagName'
@@ -948,11 +983,11 @@ class GetElementPropertiesConfig(BaseActionConfig):
948
983
  model_config = ConfigDict(
949
984
  populate_by_name=True,
950
985
  )
951
- selector: str
986
+ selector: str = ''
952
987
  """
953
988
  CSS selector for element
954
989
  """
955
- properties: list[Property]
990
+ properties: list[Property] = Field(default_factory=list)
956
991
  """
957
992
  Properties to retrieve
958
993
  """
@@ -980,7 +1015,7 @@ class HandlePopupConfig(BaseActionConfig):
980
1015
  model_config = ConfigDict(
981
1016
  populate_by_name=True,
982
1017
  )
983
- action: Action | None = 'accept'
1018
+ action: Action = Action.accept
984
1019
  """
985
1020
  Action to perform on popup
986
1021
  """
@@ -1018,7 +1053,7 @@ class FormField(BaseModel):
1018
1053
  """
1019
1054
  Human-readable field name
1020
1055
  """
1021
- type: Type | None = 'text'
1056
+ type: Type = Type.text
1022
1057
  """
1023
1058
  Type of form field
1024
1059
  """
@@ -1030,7 +1065,7 @@ class FormField(BaseModel):
1030
1065
  """
1031
1066
  Whether checkbox is checked
1032
1067
  """
1033
- multiple: bool | None = False
1068
+ multiple: bool = False
1034
1069
  """
1035
1070
  Whether select allows multiple selections
1036
1071
  """
@@ -1040,23 +1075,23 @@ class FormFillConfig(BaseActionConfig):
1040
1075
  model_config = ConfigDict(
1041
1076
  populate_by_name=True,
1042
1077
  )
1043
- fields: list[FormField]
1078
+ fields: list[FormField] = Field(default_factory=list)
1044
1079
  """
1045
1080
  Array of form field configurations
1046
1081
  """
1047
- waitForElements: bool | None = True
1082
+ waitForElements: bool = True
1048
1083
  """
1049
1084
  Wait for all form elements to be present
1050
1085
  """
1051
- clearFirst: bool | None = True
1086
+ clearFirst: bool = True
1052
1087
  """
1053
1088
  Clear existing values before filling
1054
1089
  """
1055
- submitAfterFill: bool | None = False
1090
+ submitAfterFill: bool = False
1056
1091
  """
1057
1092
  Automatically submit form after filling
1058
1093
  """
1059
- smartFieldDetection: bool | None = True
1094
+ smartFieldDetection: bool = True
1060
1095
  """
1061
1096
  Automatically detect field types
1062
1097
  """