@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,600 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://floweb.com/schemas/performance-test.json",
4
+ "title": "PerformanceTest",
5
+ "description": "Performance test definition for load testing and API monitoring",
6
+ "type": "object",
7
+ "properties": {
8
+ "metadata": {
9
+ "$ref": "#/$defs/PerformanceTestMetadata",
10
+ "description": "Test metadata and configuration"
11
+ },
12
+ "recordedRequests": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/$defs/RecordedRequest"
16
+ },
17
+ "description": "HTTP requests recorded during test creation"
18
+ },
19
+ "loadTestConfig": {
20
+ "$ref": "#/$defs/LoadTestConfiguration",
21
+ "description": "Load test execution configuration"
22
+ },
23
+ "filterPatterns": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "string"
27
+ },
28
+ "description": "URL patterns for filtering recorded requests"
29
+ },
30
+ "onlySameDomain": {
31
+ "type": "boolean",
32
+ "description": "Restrict recording to same domain only"
33
+ },
34
+ "results": {
35
+ "$ref": "#/$defs/PerformanceTestResults",
36
+ "description": "Results from load test execution"
37
+ }
38
+ },
39
+ "required": ["metadata", "recordedRequests", "loadTestConfig"],
40
+ "$defs": {
41
+ "RecordedRequest": {
42
+ "type": "object",
43
+ "properties": {
44
+ "id": {
45
+ "type": "string",
46
+ "description": "Unique request identifier"
47
+ },
48
+ "url": {
49
+ "type": "string",
50
+ "format": "uri",
51
+ "description": "Request URL"
52
+ },
53
+ "method": {
54
+ "type": "string",
55
+ "enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"],
56
+ "description": "HTTP method"
57
+ },
58
+ "headers": {
59
+ "type": "object",
60
+ "additionalProperties": {
61
+ "type": "string"
62
+ },
63
+ "description": "Request headers"
64
+ },
65
+ "body": {
66
+ "type": "string",
67
+ "description": "Request body"
68
+ },
69
+ "timestamp": {
70
+ "type": "number",
71
+ "description": "Request timestamp in milliseconds"
72
+ },
73
+ "response": {
74
+ "$ref": "#/$defs/RecordedResponse",
75
+ "description": "Response data"
76
+ },
77
+ "resourceType": {
78
+ "type": "string",
79
+ "enum": ["document", "stylesheet", "script", "image", "fetch", "xhr", "other"],
80
+ "description": "Type of resource requested"
81
+ },
82
+ "initiator": {
83
+ "type": "string",
84
+ "description": "What triggered this request"
85
+ }
86
+ },
87
+ "required": ["id", "url", "method", "headers", "timestamp", "resourceType"]
88
+ },
89
+ "RecordedResponse": {
90
+ "type": "object",
91
+ "properties": {
92
+ "status": {
93
+ "type": "integer",
94
+ "description": "HTTP status code"
95
+ },
96
+ "statusText": {
97
+ "type": "string",
98
+ "description": "HTTP status text"
99
+ },
100
+ "headers": {
101
+ "type": "object",
102
+ "additionalProperties": {
103
+ "type": "string"
104
+ },
105
+ "description": "Response headers"
106
+ },
107
+ "body": {
108
+ "type": "string",
109
+ "description": "Response body"
110
+ },
111
+ "size": {
112
+ "type": "integer",
113
+ "description": "Response size in bytes"
114
+ },
115
+ "timing": {
116
+ "$ref": "#/$defs/ResponseTiming",
117
+ "description": "Response timing breakdown"
118
+ }
119
+ },
120
+ "required": ["status", "statusText", "headers", "size", "timing"]
121
+ },
122
+ "ResponseTiming": {
123
+ "type": "object",
124
+ "properties": {
125
+ "dns": {
126
+ "type": "number",
127
+ "description": "DNS lookup time in milliseconds"
128
+ },
129
+ "tcp": {
130
+ "type": "number",
131
+ "description": "TCP connection time in milliseconds"
132
+ },
133
+ "ssl": {
134
+ "type": "number",
135
+ "description": "SSL/TLS handshake time in milliseconds"
136
+ },
137
+ "ttfb": {
138
+ "type": "number",
139
+ "description": "Time to first byte in milliseconds"
140
+ },
141
+ "download": {
142
+ "type": "number",
143
+ "description": "Download time in milliseconds"
144
+ },
145
+ "total": {
146
+ "type": "number",
147
+ "description": "Total request time in milliseconds"
148
+ }
149
+ },
150
+ "required": ["dns", "tcp", "ssl", "ttfb", "download", "total"]
151
+ },
152
+ "PerformanceTestMetadata": {
153
+ "type": "object",
154
+ "properties": {
155
+ "id": {
156
+ "type": "string",
157
+ "description": "Unique test identifier"
158
+ },
159
+ "name": {
160
+ "type": "string",
161
+ "description": "Test name"
162
+ },
163
+ "description": {
164
+ "type": "string",
165
+ "description": "Test description"
166
+ },
167
+ "tags": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ },
172
+ "description": "Test tags for categorization"
173
+ },
174
+ "parentID": {
175
+ "type": ["string", "null"],
176
+ "description": "Parent folder ID"
177
+ },
178
+ "createdAt": {
179
+ "type": "string",
180
+ "format": "date-time",
181
+ "description": "Creation timestamp"
182
+ },
183
+ "updatedAt": {
184
+ "type": "string",
185
+ "format": "date-time",
186
+ "description": "Last update timestamp"
187
+ },
188
+ "createdBy": {
189
+ "type": "string",
190
+ "description": "Creator identifier"
191
+ },
192
+ "version": {
193
+ "type": "integer",
194
+ "minimum": 1,
195
+ "description": "Test version number"
196
+ },
197
+ "status": {
198
+ "type": "string",
199
+ "enum": ["draft", "configured", "running", "completed", "archived"],
200
+ "description": "Test status"
201
+ },
202
+ "lastRun": {
203
+ "type": "string",
204
+ "format": "date-time",
205
+ "description": "Last execution timestamp"
206
+ }
207
+ },
208
+ "required": ["id", "name", "description", "tags", "createdAt", "updatedAt", "createdBy", "version", "status"]
209
+ },
210
+ "AuthConfig": {
211
+ "type": "object",
212
+ "properties": {
213
+ "token_refresh": {
214
+ "$ref": "#/$defs/TokenRefreshConfig",
215
+ "description": "Token refresh configuration"
216
+ },
217
+ "credential_rotation": {
218
+ "$ref": "#/$defs/CredentialRotationConfig",
219
+ "description": "Credential rotation configuration"
220
+ },
221
+ "header_override": {
222
+ "type": "object",
223
+ "additionalProperties": {
224
+ "type": "string"
225
+ },
226
+ "description": "Header override configuration"
227
+ }
228
+ }
229
+ },
230
+ "TokenRefreshConfig": {
231
+ "type": "object",
232
+ "properties": {
233
+ "refresh_url": {
234
+ "type": "string",
235
+ "format": "uri",
236
+ "description": "Token refresh endpoint URL"
237
+ },
238
+ "refresh_method": {
239
+ "type": "string",
240
+ "enum": ["GET", "POST", "PUT"],
241
+ "default": "POST",
242
+ "description": "HTTP method for refresh request"
243
+ },
244
+ "refresh_body": {
245
+ "description": "Request body for token refresh"
246
+ },
247
+ "refresh_headers": {
248
+ "type": "object",
249
+ "additionalProperties": {
250
+ "type": "string"
251
+ },
252
+ "description": "Headers for refresh request"
253
+ },
254
+ "token_path": {
255
+ "type": "string",
256
+ "description": "JSON path to extract token from response"
257
+ },
258
+ "token_header": {
259
+ "type": "string",
260
+ "default": "Authorization",
261
+ "description": "Header name for token"
262
+ },
263
+ "token_prefix": {
264
+ "type": "string",
265
+ "default": "Bearer",
266
+ "description": "Token prefix"
267
+ },
268
+ "refresh_interval": {
269
+ "type": "integer",
270
+ "description": "Refresh interval in seconds"
271
+ }
272
+ },
273
+ "required": ["refresh_url", "token_path"]
274
+ },
275
+ "CredentialRotationConfig": {
276
+ "type": "object",
277
+ "properties": {
278
+ "credentials": {
279
+ "type": "array",
280
+ "items": {
281
+ "type": "object",
282
+ "properties": {
283
+ "headers": {
284
+ "type": "object",
285
+ "additionalProperties": {
286
+ "type": "string"
287
+ },
288
+ "description": "Headers for this credential set"
289
+ },
290
+ "user_id": {
291
+ "type": "string",
292
+ "description": "User identifier"
293
+ }
294
+ },
295
+ "required": ["headers"]
296
+ },
297
+ "description": "Array of credential sets"
298
+ },
299
+ "rotation_strategy": {
300
+ "type": "string",
301
+ "enum": ["round_robin", "random"],
302
+ "default": "round_robin",
303
+ "description": "Credential rotation strategy"
304
+ }
305
+ },
306
+ "required": ["credentials"]
307
+ },
308
+ "LoadTestConfiguration": {
309
+ "type": "object",
310
+ "properties": {
311
+ "targetUrl": {
312
+ "type": "string",
313
+ "format": "uri",
314
+ "description": "Base URL for the load test"
315
+ },
316
+ "duration": {
317
+ "type": "integer",
318
+ "minimum": 1,
319
+ "description": "Test duration in seconds"
320
+ },
321
+ "virtualUsers": {
322
+ "type": "integer",
323
+ "minimum": 1,
324
+ "description": "Number of concurrent virtual users"
325
+ },
326
+ "rampUpTime": {
327
+ "type": "integer",
328
+ "minimum": 0,
329
+ "description": "Time to ramp up to full load in seconds"
330
+ },
331
+ "thinkTime": {
332
+ "type": "integer",
333
+ "minimum": 0,
334
+ "description": "Delay between requests per user in milliseconds"
335
+ },
336
+ "includeRequests": {
337
+ "type": "array",
338
+ "items": {
339
+ "type": "string"
340
+ },
341
+ "description": "IDs of requests to include in load test"
342
+ },
343
+ "thresholds": {
344
+ "$ref": "#/$defs/LoadTestThresholds",
345
+ "description": "Pass/fail thresholds"
346
+ },
347
+ "authConfig": {
348
+ "$ref": "#/$defs/AuthConfig",
349
+ "description": "Authentication configuration"
350
+ }
351
+ },
352
+ "required": ["targetUrl", "duration", "virtualUsers", "includeRequests", "thresholds"]
353
+ },
354
+ "LoadTestThresholds": {
355
+ "type": "object",
356
+ "properties": {
357
+ "maxResponseTime": {
358
+ "type": "integer",
359
+ "minimum": 0,
360
+ "description": "Maximum acceptable response time in milliseconds"
361
+ },
362
+ "maxErrorRate": {
363
+ "type": "number",
364
+ "minimum": 0,
365
+ "maximum": 1,
366
+ "description": "Maximum acceptable error rate (0-1)"
367
+ },
368
+ "minThroughput": {
369
+ "type": "number",
370
+ "minimum": 0,
371
+ "description": "Minimum requests per second"
372
+ }
373
+ },
374
+ "required": ["maxResponseTime", "maxErrorRate", "minThroughput"]
375
+ },
376
+ "PerformanceTestResults": {
377
+ "type": "object",
378
+ "properties": {
379
+ "testId": {
380
+ "type": "string",
381
+ "description": "Test identifier"
382
+ },
383
+ "startTime": {
384
+ "type": "number",
385
+ "description": "Test start timestamp"
386
+ },
387
+ "endTime": {
388
+ "type": "number",
389
+ "description": "Test end timestamp"
390
+ },
391
+ "duration": {
392
+ "type": "number",
393
+ "description": "Test duration in seconds"
394
+ },
395
+ "metrics": {
396
+ "$ref": "#/$defs/AggregateMetrics",
397
+ "description": "Aggregate performance metrics"
398
+ },
399
+ "requestResults": {
400
+ "type": "array",
401
+ "items": {
402
+ "$ref": "#/$defs/RequestResults"
403
+ },
404
+ "description": "Per-request execution results"
405
+ },
406
+ "timeline": {
407
+ "type": "array",
408
+ "items": {
409
+ "$ref": "#/$defs/TimelineDataPoint"
410
+ },
411
+ "description": "Time-series data for charts"
412
+ },
413
+ "passed": {
414
+ "type": "boolean",
415
+ "description": "Whether the test passed"
416
+ },
417
+ "failureReasons": {
418
+ "type": "array",
419
+ "items": {
420
+ "type": "string"
421
+ },
422
+ "description": "Reasons for test failure"
423
+ }
424
+ },
425
+ "required": ["testId", "startTime", "endTime", "duration", "metrics", "requestResults", "timeline", "passed"]
426
+ },
427
+ "AggregateMetrics": {
428
+ "type": "object",
429
+ "properties": {
430
+ "totalRequests": {
431
+ "type": "integer",
432
+ "description": "Total number of requests executed"
433
+ },
434
+ "successfulRequests": {
435
+ "type": "integer",
436
+ "description": "Number of successful requests"
437
+ },
438
+ "failedRequests": {
439
+ "type": "integer",
440
+ "description": "Number of failed requests"
441
+ },
442
+ "errorRate": {
443
+ "type": "number",
444
+ "description": "Error rate (0-1)"
445
+ },
446
+ "throughput": {
447
+ "type": "number",
448
+ "description": "Requests per second"
449
+ },
450
+ "responseTime": {
451
+ "$ref": "#/$defs/ResponseTimeMetrics",
452
+ "description": "Response time statistics"
453
+ },
454
+ "bandwidth": {
455
+ "$ref": "#/$defs/BandwidthMetrics",
456
+ "description": "Bandwidth usage metrics"
457
+ }
458
+ },
459
+ "required": ["totalRequests", "successfulRequests", "failedRequests", "errorRate", "throughput", "responseTime", "bandwidth"]
460
+ },
461
+ "ResponseTimeMetrics": {
462
+ "type": "object",
463
+ "properties": {
464
+ "min": {
465
+ "type": "number",
466
+ "description": "Minimum response time"
467
+ },
468
+ "max": {
469
+ "type": "number",
470
+ "description": "Maximum response time"
471
+ },
472
+ "mean": {
473
+ "type": "number",
474
+ "description": "Mean response time"
475
+ },
476
+ "median": {
477
+ "type": "number",
478
+ "description": "Median response time"
479
+ },
480
+ "p90": {
481
+ "type": "number",
482
+ "description": "90th percentile response time"
483
+ },
484
+ "p95": {
485
+ "type": "number",
486
+ "description": "95th percentile response time"
487
+ },
488
+ "p99": {
489
+ "type": "number",
490
+ "description": "99th percentile response time"
491
+ }
492
+ },
493
+ "required": ["min", "max", "mean", "median", "p90", "p95", "p99"]
494
+ },
495
+ "BandwidthMetrics": {
496
+ "type": "object",
497
+ "properties": {
498
+ "sent": {
499
+ "type": "integer",
500
+ "description": "Total bytes sent"
501
+ },
502
+ "received": {
503
+ "type": "integer",
504
+ "description": "Total bytes received"
505
+ },
506
+ "avgSentPerSecond": {
507
+ "type": "number",
508
+ "description": "Average bytes sent per second"
509
+ },
510
+ "avgReceivedPerSecond": {
511
+ "type": "number",
512
+ "description": "Average bytes received per second"
513
+ }
514
+ },
515
+ "required": ["sent", "received", "avgSentPerSecond", "avgReceivedPerSecond"]
516
+ },
517
+ "RequestResults": {
518
+ "type": "object",
519
+ "properties": {
520
+ "requestId": {
521
+ "type": "string",
522
+ "description": "Request identifier"
523
+ },
524
+ "url": {
525
+ "type": "string",
526
+ "format": "uri",
527
+ "description": "Request URL"
528
+ },
529
+ "method": {
530
+ "type": "string",
531
+ "description": "HTTP method"
532
+ },
533
+ "executions": {
534
+ "type": "array",
535
+ "items": {
536
+ "$ref": "#/$defs/RequestExecution"
537
+ },
538
+ "description": "Individual execution results"
539
+ }
540
+ },
541
+ "required": ["requestId", "url", "method", "executions"]
542
+ },
543
+ "RequestExecution": {
544
+ "type": "object",
545
+ "properties": {
546
+ "timestamp": {
547
+ "type": "number",
548
+ "description": "Execution timestamp"
549
+ },
550
+ "statusCode": {
551
+ "type": "integer",
552
+ "description": "HTTP status code"
553
+ },
554
+ "responseTime": {
555
+ "type": "number",
556
+ "description": "Response time in milliseconds"
557
+ },
558
+ "size": {
559
+ "type": "integer",
560
+ "description": "Response size in bytes"
561
+ },
562
+ "success": {
563
+ "type": "boolean",
564
+ "description": "Whether the request was successful"
565
+ },
566
+ "error": {
567
+ "type": "string",
568
+ "description": "Error message if failed"
569
+ }
570
+ },
571
+ "required": ["timestamp", "statusCode", "responseTime", "size", "success"]
572
+ },
573
+ "TimelineDataPoint": {
574
+ "type": "object",
575
+ "properties": {
576
+ "timestamp": {
577
+ "type": "number",
578
+ "description": "Data point timestamp"
579
+ },
580
+ "activeUsers": {
581
+ "type": "integer",
582
+ "description": "Number of active users at this point"
583
+ },
584
+ "requestsPerSecond": {
585
+ "type": "number",
586
+ "description": "Requests per second at this point"
587
+ },
588
+ "avgResponseTime": {
589
+ "type": "number",
590
+ "description": "Average response time at this point"
591
+ },
592
+ "errorRate": {
593
+ "type": "number",
594
+ "description": "Error rate at this point"
595
+ }
596
+ },
597
+ "required": ["timestamp", "activeUsers", "requestsPerSecond", "avgResponseTime", "errorRate"]
598
+ }
599
+ }
600
+ }