@autoweb/domain-models 1.0.2 → 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,281 +1,61 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: parallel-execution.json
3
- # timestamp: 2026-02-04T16:19:29+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
8
  from typing import Annotated, Any
9
9
 
10
- from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel
10
+ from pydantic import BaseModel, ConfigDict, Field
11
11
 
12
12
 
13
- class Mode(StrEnum):
14
- """
15
- Execution mode
16
- """
17
-
18
- full = 'full'
19
- partial = 'partial'
20
-
21
-
22
- class Flow(RootModel[Any]):
23
- root: Any
24
-
25
-
26
- class Position(BaseModel):
27
- model_config = ConfigDict(
28
- populate_by_name=True,
29
- )
30
- x: float
31
- """
32
- X coordinate
33
- """
34
- y: float
35
- """
36
- Y coordinate
37
- """
38
-
39
-
40
- class ActionData(BaseModel):
41
- model_config = ConfigDict(
42
- populate_by_name=True,
43
- )
44
- label: str
45
- """
46
- Human-readable label
47
- """
48
- type: str
49
- """
50
- Action type identifier
51
- """
52
- config: dict[str, Any]
53
- """
54
- Action-specific configuration
55
- """
56
-
57
-
58
- class Action(BaseModel):
59
- model_config = ConfigDict(
60
- populate_by_name=True,
61
- )
62
- id: str
63
- """
64
- Unique action identifier
65
- """
66
- type: str
67
- """
68
- Action type
69
- """
70
- position: Position
71
- data: ActionData
72
-
73
-
74
- class Edge(BaseModel):
75
- model_config = ConfigDict(
76
- populate_by_name=True,
77
- )
78
- id: str
79
- """
80
- Unique edge identifier
81
- """
82
- source: str
83
- """
84
- Source action ID
85
- """
86
- sourceHandle: str | None = None
87
- """
88
- Source handle identifier
89
- """
90
- target: str
91
- """
92
- Target action ID
93
- """
94
- targetHandle: str | None = None
95
- """
96
- Target handle identifier
97
- """
98
- type: str | None = 'step'
13
+ class Flow(BaseModel):
99
14
  """
100
- Edge type
15
+ Flow to execute (without environment/globalVariables)
101
16
  """
102
- data: dict[str, Any] | None = None
103
- """
104
- Additional edge data
105
- """
106
-
107
-
108
- class Zoom(BaseModel):
109
- model_config = ConfigDict(
110
- populate_by_name=True,
111
- )
112
- x: float
113
- """
114
- Pan X position
115
- """
116
- y: float
117
- """
118
- Pan Y position
119
- """
120
- zoom: float
121
- """
122
- Zoom level
123
- """
124
-
125
17
 
126
- class Variable(BaseModel):
127
18
  model_config = ConfigDict(
128
19
  populate_by_name=True,
129
20
  )
130
21
  id: str
131
- """
132
- Variable identifier
133
- """
134
22
  name: str
135
- """
136
- Variable name
137
- """
138
- type: str
139
- """
140
- Variable data type
141
- """
142
- value: str
143
- """
144
- Variable value
145
- """
146
- description: str | None = None
147
- """
148
- Optional description
149
- """
150
- isOutput: bool | None = None
151
- """
152
- Whether this is an output variable
153
- """
23
+ actions: list[dict[str, Any]]
24
+ edges: list[dict[str, Any]]
154
25
 
155
26
 
156
- class FlowVariables(BaseModel):
157
- model_config = ConfigDict(
158
- populate_by_name=True,
159
- )
160
- input: list[Variable]
161
- """
162
- Input variables
163
- """
164
- output: list[Variable]
165
- """
166
- Output variables
167
- """
168
-
169
-
170
- class FlowParameters(BaseModel):
171
- model_config = ConfigDict(
172
- populate_by_name=True,
173
- )
174
- input: list[Variable]
175
- """
176
- Input parameters
177
- """
178
- output: list[Variable]
27
+ class Mode(StrEnum):
179
28
  """
180
- Output parameters
29
+ Execution mode
181
30
  """
182
31
 
183
-
184
- class EnvironmentVariable(BaseModel):
185
- model_config = ConfigDict(
186
- populate_by_name=True,
187
- )
188
- id: str
189
- """
190
- Variable identifier
191
- """
192
- name: str
193
- """
194
- Variable name
195
- """
196
- type: str
197
- """
198
- Variable data type
199
- """
200
- value: str
201
- """
202
- Variable value
203
- """
204
- description: str | None = None
205
- """
206
- Optional description
207
- """
32
+ full = 'full'
33
+ partial = 'partial'
208
34
 
209
35
 
210
- class Environment(BaseModel):
211
- model_config = ConfigDict(
212
- populate_by_name=True,
213
- )
214
- id: str
215
- """
216
- Environment identifier
217
- """
218
- name: str
219
- """
220
- Environment name
221
- """
222
- variables: list[EnvironmentVariable]
223
- """
224
- Environment variables
225
- """
226
- description: str | None = None
227
- """
228
- Environment description
229
- """
230
- isDefault: bool | None = None
231
- """
232
- Whether this is the default environment
233
- """
234
- isActive: bool | None = None
235
- """
236
- Whether this environment is active
237
- """
238
- createdAt: AwareDatetime
239
- """
240
- Creation timestamp
241
- """
242
- updatedAt: AwareDatetime
36
+ class FlowExecutionRequest(BaseModel):
243
37
  """
244
- Last update timestamp
38
+ Request to execute a single test/flow
245
39
  """
246
40
 
247
-
248
- class GlobalVariable(BaseModel):
249
41
  model_config = ConfigDict(
250
42
  populate_by_name=True,
251
43
  )
252
- id: str
44
+ flow: Any
253
45
  """
254
- Variable identifier
46
+ Flow to execute (without environment/globalVariables)
255
47
  """
256
- name: str
257
- """
258
- Variable name
259
- """
260
- type: str
261
- """
262
- Variable data type
263
- """
264
- value: str
265
- """
266
- Variable value
267
- """
268
- description: str | None = None
48
+ mode: Mode = Mode.full
269
49
  """
270
- Optional description
50
+ Execution mode
271
51
  """
272
- createdAt: AwareDatetime
52
+ recording: dict[str, Any] | None = None
273
53
  """
274
- Creation timestamp
54
+ Recording configuration
275
55
  """
276
- updatedAt: AwareDatetime
56
+ metadata: dict[str, Any] = {}
277
57
  """
278
- Last update timestamp
58
+ Additional test metadata
279
59
  """
280
60
 
281
61
 
@@ -339,7 +119,7 @@ class FlowExecutionResult(BaseModel):
339
119
  """
340
120
  Error message if failed
341
121
  """
342
- metadata: dict[str, Any] | None = {}
122
+ metadata: dict[str, Any] = {}
343
123
  """
344
124
  Additional test metadata
345
125
  """
@@ -350,109 +130,91 @@ class BrowserMode(StrEnum):
350
130
  Browser mode
351
131
  """
352
132
 
353
- headful = 'headful'
133
+ headed = 'headed'
354
134
  headless = 'headless'
355
135
 
356
136
 
357
- class ParallelTestsResult(BaseModel):
137
+ class ParallelTestsRequest(BaseModel):
358
138
  """
359
- Result of parallel test execution
139
+ Request to execute multiple tests in parallel
360
140
  """
361
141
 
362
142
  model_config = ConfigDict(
363
143
  populate_by_name=True,
364
144
  )
365
- total_tests: Annotated[int, Field(ge=0)]
366
- """
367
- Total number of tests
368
- """
369
- passed_tests: Annotated[int, Field(ge=0)]
370
- """
371
- Number of passed tests
372
- """
373
- failed_tests: Annotated[int, Field(ge=0)]
374
- """
375
- Number of failed tests
376
- """
377
- skipped_tests: Annotated[int | None, Field(ge=0)] = 0
145
+ tests: list[FlowExecutionRequest]
378
146
  """
379
- Number of skipped tests
147
+ List of tests to execute
380
148
  """
381
- total_duration_seconds: Annotated[float, Field(ge=0.0)]
149
+ data: dict[str, Any]
382
150
  """
383
- Total execution time
151
+ Shared data containing environment and globalVariables for all tests
384
152
  """
385
- results: list[FlowExecutionResult]
153
+ max_parallel: Annotated[int, Field(ge=1, le=50)] = 10
386
154
  """
387
- Individual test results
155
+ Maximum number of parallel executions
388
156
  """
389
- success: bool
157
+ stop_on_failure: bool = False
390
158
  """
391
- Overall success status
159
+ Stop all tests if one fails
392
160
  """
393
-
394
-
395
- class FlowExecutionRequest(BaseModel):
161
+ cleanup_after: bool = True
396
162
  """
397
- Request to execute a single test/flow
163
+ Cleanup resources after execution
398
164
  """
399
-
400
- model_config = ConfigDict(
401
- populate_by_name=True,
402
- )
403
- flow: Flow
165
+ browser_mode: BrowserMode = BrowserMode.headed
404
166
  """
405
- Flow to execute with all required fields
167
+ Browser mode
406
168
  """
407
- mode: Mode | None = 'full'
169
+ incognito: bool = False
408
170
  """
409
- Execution mode
171
+ Whether to use incognito/private mode
410
172
  """
411
- recording: dict[str, Any] | None = None
173
+ browser: str = 'chrome'
412
174
  """
413
- Recording configuration
175
+ Browser type (chrome, firefox, etc.)
414
176
  """
415
- metadata: dict[str, Any] | None = {}
177
+ max_retries: Annotated[int, Field(ge=0, le=10)] = 3
416
178
  """
417
- Additional test metadata
179
+ Maximum retries for transient failures
418
180
  """
419
181
 
420
182
 
421
- class ParallelTestsRequest(BaseModel):
183
+ class ParallelTestsResult(BaseModel):
422
184
  """
423
- Request to execute multiple tests in parallel
185
+ Result of parallel test execution
424
186
  """
425
187
 
426
188
  model_config = ConfigDict(
427
189
  populate_by_name=True,
428
190
  )
429
- tests: list[FlowExecutionRequest]
191
+ total_tests: Annotated[int, Field(ge=0)]
430
192
  """
431
- List of tests to execute
193
+ Total number of tests
432
194
  """
433
- data: dict[str, Any] | None = None
195
+ passed_tests: Annotated[int, Field(ge=0)]
434
196
  """
435
- Shared data containing environment and globalVariables for all tests
197
+ Number of passed tests
436
198
  """
437
- max_parallel: Annotated[int | None, Field(ge=1, le=50)] = 10
199
+ failed_tests: Annotated[int, Field(ge=0)]
438
200
  """
439
- Maximum number of parallel executions
201
+ Number of failed tests
440
202
  """
441
- stop_on_failure: bool | None = False
203
+ skipped_tests: Annotated[int | None, Field(ge=0)] = 0
442
204
  """
443
- Stop all tests if one fails
205
+ Number of skipped tests
444
206
  """
445
- cleanup_after: bool | None = True
207
+ total_duration_seconds: Annotated[float, Field(ge=0.0)]
446
208
  """
447
- Cleanup resources after execution
209
+ Total execution time
448
210
  """
449
- browser_mode: BrowserMode | None = 'headful'
211
+ results: list[FlowExecutionResult]
450
212
  """
451
- Browser mode
213
+ Individual test results
452
214
  """
453
- max_retries: Annotated[int | None, Field(ge=0, le=10)] = 3
215
+ success: bool
454
216
  """
455
- Maximum retries for transient failures
217
+ Overall success status
456
218
  """
457
219
 
458
220
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: performance-test.json
3
- # timestamp: 2026-02-04T16:19:26+00:00
3
+ # timestamp: 2026-01-25T13:38:23+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -148,7 +148,7 @@ class TokenRefreshConfig(BaseModel):
148
148
  """
149
149
  Token refresh endpoint URL
150
150
  """
151
- refresh_method: RefreshMethod | None = 'POST'
151
+ refresh_method: RefreshMethod = RefreshMethod.POST
152
152
  """
153
153
  HTTP method for refresh request
154
154
  """
@@ -209,7 +209,7 @@ class CredentialRotationConfig(BaseModel):
209
209
  """
210
210
  Array of credential sets
211
211
  """
212
- rotation_strategy: RotationStrategy | None = 'round_robin'
212
+ rotation_strategy: RotationStrategy = RotationStrategy.round_robin
213
213
  """
214
214
  Credential rotation strategy
215
215
  """
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: websocket-communication.json
3
- # timestamp: 2026-02-04T16:19:31+00:00
3
+ # timestamp: 2026-02-04T15:38:26+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -9,6 +9,8 @@ from typing import Any, Literal
9
9
 
10
10
  from pydantic import BaseModel, ConfigDict
11
11
 
12
+ from engine.server.ws.handlers import flow
13
+
12
14
 
13
15
  class WebSocketMessage(BaseModel):
14
16
  """
@@ -48,6 +50,10 @@ class SessionInfo(BaseModel):
48
50
  """
49
51
  Browser type
50
52
  """
53
+ flowName: str | None = None
54
+ """
55
+ Flow name
56
+ """
51
57
  startedAt: int
52
58
  """
53
59
  Start timestamp