@autoweb/domain-models 1.0.2 → 1.0.4

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.
@@ -223,7 +223,7 @@ class Environment(BaseModel):
223
223
  """
224
224
  Environment name
225
225
  """
226
- variables: list[EnvironmentVariable] | None = None
226
+ variables: list[EnvironmentVariable | Variable] | None = None
227
227
  """
228
228
  Environment variables
229
229
  """
@@ -291,7 +291,7 @@ class Flow(BaseModel):
291
291
  """
292
292
  Parent folder ID for organization
293
293
  """
294
- type: Type | None = 'flow'
294
+ type: Type | None = Type.flow
295
295
  """
296
296
  Type of the flow
297
297
  """
@@ -1,128 +1,62 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: parallel-execution.json
3
- # timestamp: 2026-02-04T17:10:20+00:00
3
+ # timestamp: 2026-01-25T13:38:25+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
7
  from enum import StrEnum
8
- from typing import Any
8
+ from typing import Annotated, Any
9
9
 
10
- from pydantic import AwareDatetime, BaseModel, Field, RootModel
10
+ from pydantic import BaseModel, ConfigDict, Field
11
11
 
12
12
 
13
- class Mode(StrEnum):
13
+ class Flow(BaseModel):
14
14
  """
15
- Execution mode
15
+ Flow to execute (without environment/globalVariables)
16
16
  """
17
17
 
18
- full = 'full'
19
- partial = 'partial'
20
-
21
-
22
- class Flow(RootModel[Any]):
23
- root: Any
24
-
25
-
26
- class Position(BaseModel):
27
- x: float = Field(..., description='X coordinate')
28
- y: float = Field(..., description='Y coordinate')
29
-
30
-
31
- class ActionData(BaseModel):
32
- label: str = Field(..., description='Human-readable label')
33
- type: str = Field(..., description='Action type identifier')
34
- config: dict[str, Any] = Field(..., description='Action-specific configuration')
35
-
36
-
37
- class Action(BaseModel):
38
- id: str = Field(..., description='Unique action identifier')
39
- type: str = Field(..., description='Action type')
40
- position: Position
41
- data: ActionData
42
-
43
-
44
- class Edge(BaseModel):
45
- id: str = Field(..., description='Unique edge identifier')
46
- source: str = Field(..., description='Source action ID')
47
- source_handle: str | None = Field(
48
- None, alias='sourceHandle', description='Source handle identifier'
18
+ model_config = ConfigDict(
19
+ populate_by_name=True,
49
20
  )
50
- target: str = Field(..., description='Target action ID')
51
- target_handle: str | None = Field(
52
- None, alias='targetHandle', description='Target handle identifier'
53
- )
54
- type: str | None = Field('step', description='Edge type')
55
- data: dict[str, Any] | None = Field(None, description='Additional edge data')
56
-
21
+ id: str
22
+ name: str
23
+ actions: list[dict[str, Any]]
24
+ edges: list[dict[str, Any]]
57
25
 
58
- class Zoom(BaseModel):
59
- x: float = Field(..., description='Pan X position')
60
- y: float = Field(..., description='Pan Y position')
61
- zoom: float = Field(..., description='Zoom level')
62
-
63
-
64
- class Variable(BaseModel):
65
- id: str = Field(..., description='Variable identifier')
66
- name: str = Field(..., description='Variable name')
67
- type: str = Field(..., description='Variable data type')
68
- value: str = Field(..., description='Variable value')
69
- description: str | None = Field(None, description='Optional description')
70
- is_output: bool | None = Field(
71
- None, alias='isOutput', description='Whether this is an output variable'
72
- )
73
-
74
-
75
- class FlowVariables(BaseModel):
76
- input: list[Variable] = Field(..., description='Input variables')
77
- output: list[Variable] = Field(..., description='Output variables')
78
-
79
-
80
- class FlowParameters(BaseModel):
81
- input: list[Variable] = Field(..., description='Input parameters')
82
- output: list[Variable] = Field(..., description='Output parameters')
83
26
 
27
+ class Mode(StrEnum):
28
+ """
29
+ Execution mode
30
+ """
84
31
 
85
- class EnvironmentVariable(BaseModel):
86
- id: str = Field(..., description='Variable identifier')
87
- name: str = Field(..., description='Variable name')
88
- type: str = Field(..., description='Variable data type')
89
- value: str = Field(..., description='Variable value')
90
- description: str | None = Field(None, description='Optional description')
32
+ full = 'full'
33
+ partial = 'partial'
91
34
 
92
35
 
93
- class Environment(BaseModel):
94
- id: str = Field(..., description='Environment identifier')
95
- name: str = Field(..., description='Environment name')
96
- variables: list[EnvironmentVariable] = Field(
97
- ..., description='Environment variables'
98
- )
99
- description: str | None = Field(None, description='Environment description')
100
- is_default: bool | None = Field(
101
- None, alias='isDefault', description='Whether this is the default environment'
102
- )
103
- is_active: bool | None = Field(
104
- None, alias='isActive', description='Whether this environment is active'
105
- )
106
- created_at: AwareDatetime = Field(
107
- ..., alias='createdAt', description='Creation timestamp'
108
- )
109
- updated_at: AwareDatetime = Field(
110
- ..., alias='updatedAt', description='Last update timestamp'
111
- )
112
-
36
+ class FlowExecutionRequest(BaseModel):
37
+ """
38
+ Request to execute a single test/flow
39
+ """
113
40
 
114
- class GlobalVariable(BaseModel):
115
- id: str = Field(..., description='Variable identifier')
116
- name: str = Field(..., description='Variable name')
117
- type: str = Field(..., description='Variable data type')
118
- value: str = Field(..., description='Variable value')
119
- description: str | None = Field(None, description='Optional description')
120
- created_at: AwareDatetime = Field(
121
- ..., alias='createdAt', description='Creation timestamp'
122
- )
123
- updated_at: AwareDatetime = Field(
124
- ..., alias='updatedAt', description='Last update timestamp'
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
125
43
  )
44
+ flow: Any
45
+ """
46
+ Flow to execute (without environment/globalVariables)
47
+ """
48
+ mode: Mode | None = 'full'
49
+ """
50
+ Execution mode
51
+ """
52
+ recording: dict[str, Any] | None = None
53
+ """
54
+ Recording configuration
55
+ """
56
+ metadata: dict[str, Any] | None = {}
57
+ """
58
+ Additional test metadata
59
+ """
126
60
 
127
61
 
128
62
  class Status(StrEnum):
@@ -142,21 +76,53 @@ class FlowExecutionResult(BaseModel):
142
76
  Result of a single test execution
143
77
  """
144
78
 
145
- flow_id: str = Field(..., description='ID of the executed flow')
146
- flow_name: str = Field(..., description='Name of the executed flow')
147
- success: bool = Field(..., description='Whether the test passed')
148
- status: Status = Field(..., description='Execution status')
149
- total_actions: int = Field(..., description='Total actions in the flow', ge=0)
150
- executed_actions: int = Field(..., description='Number of actions executed', ge=0)
151
- successful_actions: int = Field(
152
- ..., description='Number of successful actions', ge=0
153
- )
154
- duration_seconds: float = Field(
155
- ..., description='Total execution time in seconds', ge=0.0
79
+ model_config = ConfigDict(
80
+ populate_by_name=True,
156
81
  )
157
- report: dict[str, Any] = Field(..., description='Full flow report')
158
- error: str | None = Field(None, description='Error message if failed')
159
- metadata: dict[str, Any] | None = Field({}, description='Additional test metadata')
82
+ flow_id: str
83
+ """
84
+ ID of the executed flow
85
+ """
86
+ flow_name: str
87
+ """
88
+ Name of the executed flow
89
+ """
90
+ success: bool
91
+ """
92
+ Whether the test passed
93
+ """
94
+ status: Status
95
+ """
96
+ Execution status
97
+ """
98
+ total_actions: Annotated[int, Field(ge=0)]
99
+ """
100
+ Total actions in the flow
101
+ """
102
+ executed_actions: Annotated[int, Field(ge=0)]
103
+ """
104
+ Number of actions executed
105
+ """
106
+ successful_actions: Annotated[int, Field(ge=0)]
107
+ """
108
+ Number of successful actions
109
+ """
110
+ duration_seconds: Annotated[float, Field(ge=0.0)]
111
+ """
112
+ Total execution time in seconds
113
+ """
114
+ report: dict[str, Any]
115
+ """
116
+ Full flow report
117
+ """
118
+ error: str | None = None
119
+ """
120
+ Error message if failed
121
+ """
122
+ metadata: dict[str, Any] | None = {}
123
+ """
124
+ Additional test metadata
125
+ """
160
126
 
161
127
 
162
128
  class BrowserMode(StrEnum):
@@ -164,19 +130,46 @@ class BrowserMode(StrEnum):
164
130
  Browser mode
165
131
  """
166
132
 
167
- headful = 'headful'
133
+ headed = 'headed'
168
134
  headless = 'headless'
169
135
 
170
136
 
171
- class Browser(StrEnum):
137
+ class ParallelTestsRequest(BaseModel):
172
138
  """
173
- Browser to use for execution
139
+ Request to execute multiple tests in parallel
174
140
  """
175
141
 
176
- chrome = 'chrome'
177
- firefox = 'firefox'
178
- safari = 'safari'
179
- edge = 'edge'
142
+ model_config = ConfigDict(
143
+ populate_by_name=True,
144
+ )
145
+ tests: list[FlowExecutionRequest]
146
+ """
147
+ List of tests to execute
148
+ """
149
+ data: dict[str, Any] | None = None
150
+ """
151
+ Shared data containing environment and globalVariables for all tests
152
+ """
153
+ max_parallel: Annotated[int | None, Field(ge=1, le=50)] = 10
154
+ """
155
+ Maximum number of parallel executions
156
+ """
157
+ stop_on_failure: bool | None = False
158
+ """
159
+ Stop all tests if one fails
160
+ """
161
+ cleanup_after: bool | None = True
162
+ """
163
+ Cleanup resources after execution
164
+ """
165
+ browser_mode: BrowserMode | None = 'headed'
166
+ """
167
+ Browser mode
168
+ """
169
+ max_retries: Annotated[int | None, Field(ge=0, le=10)] = 3
170
+ """
171
+ Maximum retries for transient failures
172
+ """
180
173
 
181
174
 
182
175
  class ParallelTestsResult(BaseModel):
@@ -184,66 +177,43 @@ class ParallelTestsResult(BaseModel):
184
177
  Result of parallel test execution
185
178
  """
186
179
 
187
- total_tests: int = Field(..., description='Total number of tests', ge=0)
188
- passed_tests: int = Field(..., description='Number of passed tests', ge=0)
189
- failed_tests: int = Field(..., description='Number of failed tests', ge=0)
190
- skipped_tests: int | None = Field(0, description='Number of skipped tests', ge=0)
191
- total_duration_seconds: float = Field(
192
- ..., description='Total execution time', ge=0.0
193
- )
194
- results: list[FlowExecutionResult] = Field(
195
- ..., description='Individual test results'
180
+ model_config = ConfigDict(
181
+ populate_by_name=True,
196
182
  )
197
- success: bool = Field(..., description='Overall success status')
198
-
199
-
200
- class FlowExecutionRequest(BaseModel):
183
+ total_tests: Annotated[int, Field(ge=0)]
201
184
  """
202
- Request to execute a single test/flow
185
+ Total number of tests
203
186
  """
204
-
205
- flow: Flow = Field(..., description='Flow to execute with all required fields')
206
- mode: Mode | None = Field('full', description='Execution mode')
207
- recording: dict[str, Any] | None = Field(
208
- None, description='Recording configuration'
209
- )
210
- metadata: dict[str, Any] | None = Field({}, description='Additional test metadata')
211
-
212
-
213
- class ParallelTestsRequest(BaseModel):
187
+ passed_tests: Annotated[int, Field(ge=0)]
214
188
  """
215
- Request to execute multiple tests in parallel
189
+ Number of passed tests
190
+ """
191
+ failed_tests: Annotated[int, Field(ge=0)]
192
+ """
193
+ Number of failed tests
194
+ """
195
+ skipped_tests: Annotated[int | None, Field(ge=0)] = 0
196
+ """
197
+ Number of skipped tests
198
+ """
199
+ total_duration_seconds: Annotated[float, Field(ge=0.0)]
200
+ """
201
+ Total execution time
202
+ """
203
+ results: list[FlowExecutionResult]
204
+ """
205
+ Individual test results
206
+ """
207
+ success: bool
208
+ """
209
+ Overall success status
216
210
  """
217
-
218
- tests: list[FlowExecutionRequest] = Field(
219
- ..., description='List of tests to execute'
220
- )
221
- data: dict[str, Any] | None = Field(
222
- None,
223
- description='Shared data containing environment and globalVariables for all tests',
224
- )
225
- max_parallel: int | None = Field(
226
- 10, description='Maximum number of parallel executions', ge=1, le=50
227
- )
228
- stop_on_failure: bool | None = Field(
229
- False, description='Stop all tests if one fails'
230
- )
231
- cleanup_after: bool | None = Field(
232
- True, description='Cleanup resources after execution'
233
- )
234
- browser_mode: BrowserMode | None = Field('headful', description='Browser mode')
235
- browser: Browser | None = Field(
236
- 'chrome', description='Browser to use for execution'
237
- )
238
- incognito: bool | None = Field(
239
- False, description='Run tests in incognito/private mode'
240
- )
241
- max_retries: int | None = Field(
242
- 3, description='Maximum retries for transient failures', ge=0, le=10
243
- )
244
211
 
245
212
 
246
213
  class ParallelExecution(BaseModel):
214
+ model_config = ConfigDict(
215
+ populate_by_name=True,
216
+ )
247
217
  requests: list[ParallelTestsRequest] | None = None
248
218
  results: list[ParallelTestsResult] | None = None
249
219
 
@@ -253,6 +223,7 @@ class ParallelExecutionModels(BaseModel):
253
223
  Schema for parallel test execution requests and results
254
224
  """
255
225
 
256
- parallel_execution: ParallelExecution | None = Field(
257
- None, alias='parallelExecution'
226
+ model_config = ConfigDict(
227
+ populate_by_name=True,
258
228
  )
229
+ parallelExecution: ParallelExecution | None = None
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: debug.json
3
- # timestamp: 2026-02-04T16:19:32+00:00
3
+ # timestamp: 2026-02-04T15:36:47+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: environment.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
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: execution-results.json
3
- # timestamp: 2026-02-04T16:19:31+00:00
3
+ # timestamp: 2026-01-25T13:38:26+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: flow-validation.json
3
- # timestamp: 2026-02-04T16:19:31+00:00
3
+ # timestamp: 2026-01-25T13:38:27+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: flow.json
3
- # timestamp: 2026-02-04T16:19:25+00:00
3
+ # timestamp: 2026-01-25T13:38:22+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -147,7 +147,7 @@ class Variable(BaseModel):
147
147
  """
148
148
  Variable data type
149
149
  """
150
- value: str
150
+ value: Any
151
151
  """
152
152
  Variable value
153
153
  """
@@ -155,10 +155,6 @@ class Variable(BaseModel):
155
155
  """
156
156
  Optional description
157
157
  """
158
- isOutput: bool | None = None
159
- """
160
- Whether this is an output variable
161
- """
162
158
 
163
159
 
164
160
  class FlowVariables(BaseModel):
@@ -183,6 +179,14 @@ class FlowParameters(BaseModel):
183
179
  """
184
180
  Input parameters
185
181
  """
182
+ parameterBefore: list[Variable]
183
+ """
184
+ Parameters to be set before execution
185
+ """
186
+ variableBefore: list[Variable]
187
+ """
188
+ Variables to be set before execution
189
+ """
186
190
  output: list[Variable]
187
191
  """
188
192
  Output parameters
@@ -205,7 +209,7 @@ class EnvironmentVariable(BaseModel):
205
209
  """
206
210
  Variable data type
207
211
  """
208
- value: str
212
+ value: Any
209
213
  """
210
214
  Variable value
211
215
  """
@@ -227,7 +231,7 @@ class Environment(BaseModel):
227
231
  """
228
232
  Environment name
229
233
  """
230
- variables: list[EnvironmentVariable]
234
+ variables: list[EnvironmentVariable | Variable] = None
231
235
  """
232
236
  Environment variables
233
237
  """
@@ -243,11 +247,11 @@ class Environment(BaseModel):
243
247
  """
244
248
  Whether this environment is active
245
249
  """
246
- createdAt: AwareDatetime
250
+ createdAt: AwareDatetime | None = None
247
251
  """
248
252
  Creation timestamp
249
253
  """
250
- updatedAt: AwareDatetime
254
+ updatedAt: AwareDatetime | None = None
251
255
  """
252
256
  Last update timestamp
253
257
  """
@@ -269,7 +273,7 @@ class GlobalVariable(BaseModel):
269
273
  """
270
274
  Variable data type
271
275
  """
272
- value: str
276
+ value: Any
273
277
  """
274
278
  Variable value
275
279
  """
@@ -277,14 +281,6 @@ class GlobalVariable(BaseModel):
277
281
  """
278
282
  Optional description
279
283
  """
280
- createdAt: AwareDatetime
281
- """
282
- Creation timestamp
283
- """
284
- updatedAt: AwareDatetime
285
- """
286
- Last update timestamp
287
- """
288
284
 
289
285
 
290
286
  class Flow(BaseModel):
@@ -315,7 +311,7 @@ class Flow(BaseModel):
315
311
  """
316
312
  Parent folder ID for organization
317
313
  """
318
- type: Type | None = None
314
+ type: Type | None = Type.flow
319
315
  """
320
316
  Type of the flow
321
317
  """
@@ -339,11 +335,11 @@ class Flow(BaseModel):
339
335
  """
340
336
  Last update timestamp
341
337
  """
342
- variables: FlowVariables | None = None
338
+ variables: FlowVariables = None
343
339
  """
344
340
  Flow input and output variables
345
341
  """
346
- parameters: FlowParameters | None = None
342
+ parameters: FlowParameters = None
347
343
  """
348
344
  Flow parameters for configuration
349
345
  """