erdo 0.1.9__py3-none-any.whl → 0.1.11__py3-none-any.whl
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.
Potentially problematic release.
This version of erdo might be problematic. Click here for more details.
- erdo/__init__.py +4 -4
- erdo/_generated/actions/bot.py +6 -0
- erdo/_generated/actions/codeexec.py +32 -1
- erdo/_generated/actions/llm.py +5 -0
- erdo/_generated/types.py +1876 -575
- erdo/invoke/client.py +9 -3
- erdo/invoke/invoke.py +109 -48
- erdo/types.py +36 -5
- {erdo-0.1.9.dist-info → erdo-0.1.11.dist-info}/METADATA +44 -7
- {erdo-0.1.9.dist-info → erdo-0.1.11.dist-info}/RECORD +13 -13
- {erdo-0.1.9.dist-info → erdo-0.1.11.dist-info}/WHEEL +0 -0
- {erdo-0.1.9.dist-info → erdo-0.1.11.dist-info}/entry_points.txt +0 -0
- {erdo-0.1.9.dist-info → erdo-0.1.11.dist-info}/licenses/LICENSE +0 -0
erdo/_generated/types.py
CHANGED
|
@@ -9,9 +9,13 @@ from __future__ import annotations
|
|
|
9
9
|
from dataclasses import dataclass
|
|
10
10
|
from datetime import datetime
|
|
11
11
|
from enum import Enum
|
|
12
|
-
from typing import Any, Dict, List, Optional
|
|
12
|
+
from typing import Any, Dict, List, Optional, Union
|
|
13
13
|
from uuid import UUID
|
|
14
14
|
|
|
15
|
+
# Import TemplateString for Union types
|
|
16
|
+
if False: # TYPE_CHECKING
|
|
17
|
+
from erdo.template import TemplateString
|
|
18
|
+
|
|
15
19
|
|
|
16
20
|
# ParameterType (from ParameterType in Go)
|
|
17
21
|
class ParameterType(str, Enum):
|
|
@@ -290,34 +294,68 @@ class Bot:
|
|
|
290
294
|
source: str
|
|
291
295
|
key: Optional[str] = None
|
|
292
296
|
persona: Optional[str] = None
|
|
293
|
-
running_message: Optional[str] = None
|
|
294
|
-
finished_message: Optional[str] = None
|
|
297
|
+
running_message: Optional[Union[str, TemplateString]] = None
|
|
298
|
+
finished_message: Optional[Union[str, TemplateString]] = None
|
|
295
299
|
created_at: Optional[datetime] = None
|
|
296
300
|
updated_at: Optional[datetime] = None
|
|
297
301
|
|
|
298
302
|
def to_dict(self) -> Dict[str, Any]:
|
|
299
303
|
"""Convert to dict format expected by backend."""
|
|
300
304
|
result = {}
|
|
301
|
-
result["id"] = self.id
|
|
302
|
-
result["name"] = self.name
|
|
303
|
-
result["description"] =
|
|
304
|
-
|
|
305
|
-
|
|
305
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
306
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
307
|
+
result["description"] = (
|
|
308
|
+
self.description.value
|
|
309
|
+
if hasattr(self.description, "value")
|
|
310
|
+
else self.description
|
|
311
|
+
)
|
|
312
|
+
result["code"] = self.code.value if hasattr(self.code, "value") else self.code
|
|
313
|
+
result["file_path"] = (
|
|
314
|
+
self.file_path.value if hasattr(self.file_path, "value") else self.file_path
|
|
315
|
+
)
|
|
306
316
|
if self.key is not None:
|
|
307
|
-
result["key"] = self.key
|
|
317
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
308
318
|
if self.persona is not None:
|
|
309
|
-
result["persona"] =
|
|
319
|
+
result["persona"] = (
|
|
320
|
+
self.persona.value if hasattr(self.persona, "value") else self.persona
|
|
321
|
+
)
|
|
310
322
|
if self.running_message is not None:
|
|
311
|
-
result["running_message"] =
|
|
323
|
+
result["running_message"] = (
|
|
324
|
+
str(self.running_message)
|
|
325
|
+
if hasattr(self.running_message, "__str__")
|
|
326
|
+
else self.running_message
|
|
327
|
+
)
|
|
312
328
|
if self.finished_message is not None:
|
|
313
|
-
result["finished_message"] =
|
|
329
|
+
result["finished_message"] = (
|
|
330
|
+
str(self.finished_message)
|
|
331
|
+
if hasattr(self.finished_message, "__str__")
|
|
332
|
+
else self.finished_message
|
|
333
|
+
)
|
|
314
334
|
if self.created_at is not None:
|
|
315
|
-
result["created_at"] =
|
|
335
|
+
result["created_at"] = (
|
|
336
|
+
self.created_at.value
|
|
337
|
+
if hasattr(self.created_at, "value")
|
|
338
|
+
else self.created_at
|
|
339
|
+
)
|
|
316
340
|
if self.updated_at is not None:
|
|
317
|
-
result["updated_at"] =
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
341
|
+
result["updated_at"] = (
|
|
342
|
+
self.updated_at.value
|
|
343
|
+
if hasattr(self.updated_at, "value")
|
|
344
|
+
else self.updated_at
|
|
345
|
+
)
|
|
346
|
+
result["organization_id"] = (
|
|
347
|
+
self.organization_id.value
|
|
348
|
+
if hasattr(self.organization_id, "value")
|
|
349
|
+
else self.organization_id
|
|
350
|
+
)
|
|
351
|
+
result["visibility"] = (
|
|
352
|
+
self.visibility.value
|
|
353
|
+
if hasattr(self.visibility, "value")
|
|
354
|
+
else self.visibility
|
|
355
|
+
)
|
|
356
|
+
result["source"] = (
|
|
357
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
358
|
+
)
|
|
321
359
|
return result
|
|
322
360
|
|
|
323
361
|
|
|
@@ -341,23 +379,49 @@ class ParameterDefinition:
|
|
|
341
379
|
"""Convert to dict format expected by backend."""
|
|
342
380
|
result = {}
|
|
343
381
|
if self.id is not None:
|
|
344
|
-
result["id"] = self.id
|
|
382
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
345
383
|
if self.bot_id is not None:
|
|
346
|
-
result["bot_id"] =
|
|
347
|
-
|
|
348
|
-
|
|
384
|
+
result["bot_id"] = (
|
|
385
|
+
self.bot_id.value if hasattr(self.bot_id, "value") else self.bot_id
|
|
386
|
+
)
|
|
387
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
388
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
349
389
|
if self.description is not None:
|
|
350
|
-
result["description"] =
|
|
351
|
-
|
|
352
|
-
|
|
390
|
+
result["description"] = (
|
|
391
|
+
self.description.value
|
|
392
|
+
if hasattr(self.description, "value")
|
|
393
|
+
else self.description
|
|
394
|
+
)
|
|
395
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
396
|
+
result["is_required"] = (
|
|
397
|
+
self.is_required.value
|
|
398
|
+
if hasattr(self.is_required, "value")
|
|
399
|
+
else self.is_required
|
|
400
|
+
)
|
|
353
401
|
if self.created_at is not None:
|
|
354
|
-
result["created_at"] =
|
|
402
|
+
result["created_at"] = (
|
|
403
|
+
self.created_at.value
|
|
404
|
+
if hasattr(self.created_at, "value")
|
|
405
|
+
else self.created_at
|
|
406
|
+
)
|
|
355
407
|
if self.updated_at is not None:
|
|
356
|
-
result["updated_at"] =
|
|
408
|
+
result["updated_at"] = (
|
|
409
|
+
self.updated_at.value
|
|
410
|
+
if hasattr(self.updated_at, "value")
|
|
411
|
+
else self.updated_at
|
|
412
|
+
)
|
|
357
413
|
if self.value_sources is not None:
|
|
358
|
-
result["value_sources"] =
|
|
414
|
+
result["value_sources"] = (
|
|
415
|
+
self.value_sources.value
|
|
416
|
+
if hasattr(self.value_sources, "value")
|
|
417
|
+
else self.value_sources
|
|
418
|
+
)
|
|
359
419
|
if self.interpreters is not None:
|
|
360
|
-
result["interpreters"] =
|
|
420
|
+
result["interpreters"] = (
|
|
421
|
+
self.interpreters.value
|
|
422
|
+
if hasattr(self.interpreters, "value")
|
|
423
|
+
else self.interpreters
|
|
424
|
+
)
|
|
361
425
|
return result
|
|
362
426
|
|
|
363
427
|
|
|
@@ -377,17 +441,37 @@ class ParameterValueSource:
|
|
|
377
441
|
"""Convert to dict format expected by backend."""
|
|
378
442
|
result = {}
|
|
379
443
|
if self.id is not None:
|
|
380
|
-
result["id"] = self.id
|
|
444
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
381
445
|
if self.parameter_definition_id is not None:
|
|
382
|
-
result["parameter_definition_id"] =
|
|
383
|
-
|
|
384
|
-
|
|
446
|
+
result["parameter_definition_id"] = (
|
|
447
|
+
self.parameter_definition_id.value
|
|
448
|
+
if hasattr(self.parameter_definition_id, "value")
|
|
449
|
+
else self.parameter_definition_id
|
|
450
|
+
)
|
|
451
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
452
|
+
result["parameters"] = (
|
|
453
|
+
self.parameters.value
|
|
454
|
+
if hasattr(self.parameters, "value")
|
|
455
|
+
else self.parameters
|
|
456
|
+
)
|
|
385
457
|
if self.created_at is not None:
|
|
386
|
-
result["created_at"] =
|
|
458
|
+
result["created_at"] = (
|
|
459
|
+
self.created_at.value
|
|
460
|
+
if hasattr(self.created_at, "value")
|
|
461
|
+
else self.created_at
|
|
462
|
+
)
|
|
387
463
|
if self.updated_at is not None:
|
|
388
|
-
result["updated_at"] =
|
|
464
|
+
result["updated_at"] = (
|
|
465
|
+
self.updated_at.value
|
|
466
|
+
if hasattr(self.updated_at, "value")
|
|
467
|
+
else self.updated_at
|
|
468
|
+
)
|
|
389
469
|
if self.on_populate is not None:
|
|
390
|
-
result["on_populate"] =
|
|
470
|
+
result["on_populate"] = (
|
|
471
|
+
self.on_populate.value
|
|
472
|
+
if hasattr(self.on_populate, "value")
|
|
473
|
+
else self.on_populate
|
|
474
|
+
)
|
|
391
475
|
return result
|
|
392
476
|
|
|
393
477
|
|
|
@@ -407,16 +491,40 @@ class ParameterValueSourceHandler:
|
|
|
407
491
|
"""Convert to dict format expected by backend."""
|
|
408
492
|
result = {}
|
|
409
493
|
if self.id is not None:
|
|
410
|
-
result["id"] = self.id
|
|
494
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
411
495
|
if self.parameter_value_source_id is not None:
|
|
412
|
-
result["parameter_value_source_id"] =
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
496
|
+
result["parameter_value_source_id"] = (
|
|
497
|
+
self.parameter_value_source_id.value
|
|
498
|
+
if hasattr(self.parameter_value_source_id, "value")
|
|
499
|
+
else self.parameter_value_source_id
|
|
500
|
+
)
|
|
501
|
+
result["action_type"] = (
|
|
502
|
+
self.action_type.value
|
|
503
|
+
if hasattr(self.action_type, "value")
|
|
504
|
+
else self.action_type
|
|
505
|
+
)
|
|
506
|
+
result["parameters"] = (
|
|
507
|
+
self.parameters.value
|
|
508
|
+
if hasattr(self.parameters, "value")
|
|
509
|
+
else self.parameters
|
|
510
|
+
)
|
|
511
|
+
result["execution_mode"] = (
|
|
512
|
+
self.execution_mode.value
|
|
513
|
+
if hasattr(self.execution_mode, "value")
|
|
514
|
+
else self.execution_mode
|
|
515
|
+
)
|
|
416
516
|
if self.created_at is not None:
|
|
417
|
-
result["created_at"] =
|
|
517
|
+
result["created_at"] = (
|
|
518
|
+
self.created_at.value
|
|
519
|
+
if hasattr(self.created_at, "value")
|
|
520
|
+
else self.created_at
|
|
521
|
+
)
|
|
418
522
|
if self.updated_at is not None:
|
|
419
|
-
result["updated_at"] =
|
|
523
|
+
result["updated_at"] = (
|
|
524
|
+
self.updated_at.value
|
|
525
|
+
if hasattr(self.updated_at, "value")
|
|
526
|
+
else self.updated_at
|
|
527
|
+
)
|
|
420
528
|
return result
|
|
421
529
|
|
|
422
530
|
|
|
@@ -436,55 +544,40 @@ class ParameterInterpreter:
|
|
|
436
544
|
"""Convert to dict format expected by backend."""
|
|
437
545
|
result = {}
|
|
438
546
|
if self.id is not None:
|
|
439
|
-
result["id"] = self.id
|
|
547
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
440
548
|
if self.parameter_definition_id is not None:
|
|
441
|
-
result["parameter_definition_id"] =
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
549
|
+
result["parameter_definition_id"] = (
|
|
550
|
+
self.parameter_definition_id.value
|
|
551
|
+
if hasattr(self.parameter_definition_id, "value")
|
|
552
|
+
else self.parameter_definition_id
|
|
553
|
+
)
|
|
554
|
+
result["action_type"] = (
|
|
555
|
+
self.action_type.value
|
|
556
|
+
if hasattr(self.action_type, "value")
|
|
557
|
+
else self.action_type
|
|
558
|
+
)
|
|
559
|
+
result["parameters"] = (
|
|
560
|
+
self.parameters.value
|
|
561
|
+
if hasattr(self.parameters, "value")
|
|
562
|
+
else self.parameters
|
|
563
|
+
)
|
|
564
|
+
result["interpreter_order"] = (
|
|
565
|
+
self.interpreter_order.value
|
|
566
|
+
if hasattr(self.interpreter_order, "value")
|
|
567
|
+
else self.interpreter_order
|
|
568
|
+
)
|
|
445
569
|
if self.created_at is not None:
|
|
446
|
-
result["created_at"] =
|
|
570
|
+
result["created_at"] = (
|
|
571
|
+
self.created_at.value
|
|
572
|
+
if hasattr(self.created_at, "value")
|
|
573
|
+
else self.created_at
|
|
574
|
+
)
|
|
447
575
|
if self.updated_at is not None:
|
|
448
|
-
result["updated_at"] =
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
class AgentDiscovery:
|
|
454
|
-
"""AgentDiscovery matching Go backend structure."""
|
|
455
|
-
|
|
456
|
-
bot: "Bot"
|
|
457
|
-
parameter_definitions: List["ParameterDefinition"]
|
|
458
|
-
steps: List["StepWithHandlers"]
|
|
459
|
-
file_path: str
|
|
460
|
-
source_code: str
|
|
461
|
-
|
|
462
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
463
|
-
"""Convert to dict format expected by backend."""
|
|
464
|
-
result = {}
|
|
465
|
-
result["bot"] = self.bot
|
|
466
|
-
result["parameter_definitions"] = self.parameter_definitions
|
|
467
|
-
result["steps"] = self.steps
|
|
468
|
-
result["file_path"] = self.file_path
|
|
469
|
-
result["source_code"] = self.source_code
|
|
470
|
-
return result
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
@dataclass
|
|
474
|
-
class ExecutionModeConfig:
|
|
475
|
-
"""ExecutionMode matching Go backend structure."""
|
|
476
|
-
|
|
477
|
-
mode: Any
|
|
478
|
-
data: Any
|
|
479
|
-
if_condition: Optional["ConditionDefinition"] = None
|
|
480
|
-
|
|
481
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
482
|
-
"""Convert to dict format expected by backend."""
|
|
483
|
-
result = {}
|
|
484
|
-
result["mode"] = self.mode
|
|
485
|
-
result["data"] = self.data
|
|
486
|
-
if self.if_condition is not None:
|
|
487
|
-
result["if_condition"] = self.if_condition
|
|
576
|
+
result["updated_at"] = (
|
|
577
|
+
self.updated_at.value
|
|
578
|
+
if hasattr(self.updated_at, "value")
|
|
579
|
+
else self.updated_at
|
|
580
|
+
)
|
|
488
581
|
return result
|
|
489
582
|
|
|
490
583
|
|
|
@@ -500,11 +593,19 @@ class UpsertBotRequest:
|
|
|
500
593
|
def to_dict(self) -> Dict[str, Any]:
|
|
501
594
|
"""Convert to dict format expected by backend."""
|
|
502
595
|
result = {}
|
|
503
|
-
result["bot"] = self.bot
|
|
504
|
-
result["steps"] =
|
|
505
|
-
|
|
596
|
+
result["bot"] = self.bot.value if hasattr(self.bot, "value") else self.bot
|
|
597
|
+
result["steps"] = (
|
|
598
|
+
self.steps.value if hasattr(self.steps, "value") else self.steps
|
|
599
|
+
)
|
|
600
|
+
result["source"] = (
|
|
601
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
602
|
+
)
|
|
506
603
|
if self.parameter_definitions is not None:
|
|
507
|
-
result["parameter_definitions"] =
|
|
604
|
+
result["parameter_definitions"] = (
|
|
605
|
+
self.parameter_definitions.value
|
|
606
|
+
if hasattr(self.parameter_definitions, "value")
|
|
607
|
+
else self.parameter_definitions
|
|
608
|
+
)
|
|
508
609
|
return result
|
|
509
610
|
|
|
510
611
|
|
|
@@ -517,7 +618,7 @@ class BotsResponse:
|
|
|
517
618
|
def to_dict(self) -> Dict[str, Any]:
|
|
518
619
|
"""Convert to dict format expected by backend."""
|
|
519
620
|
result = {}
|
|
520
|
-
result["bots"] = self.bots
|
|
621
|
+
result["bots"] = self.bots.value if hasattr(self.bots, "value") else self.bots
|
|
521
622
|
return result
|
|
522
623
|
|
|
523
624
|
|
|
@@ -530,7 +631,9 @@ class StepsResponse:
|
|
|
530
631
|
def to_dict(self) -> Dict[str, Any]:
|
|
531
632
|
"""Convert to dict format expected by backend."""
|
|
532
633
|
result = {}
|
|
533
|
-
result["steps"] =
|
|
634
|
+
result["steps"] = (
|
|
635
|
+
self.steps.value if hasattr(self.steps, "value") else self.steps
|
|
636
|
+
)
|
|
534
637
|
return result
|
|
535
638
|
|
|
536
639
|
|
|
@@ -545,9 +648,15 @@ class ServiceDefinition:
|
|
|
545
648
|
def to_dict(self) -> Dict[str, Any]:
|
|
546
649
|
"""Convert to dict format expected by backend."""
|
|
547
650
|
result = {}
|
|
548
|
-
result["name"] = self.name
|
|
549
|
-
result["description"] =
|
|
550
|
-
|
|
651
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
652
|
+
result["description"] = (
|
|
653
|
+
self.description.value
|
|
654
|
+
if hasattr(self.description, "value")
|
|
655
|
+
else self.description
|
|
656
|
+
)
|
|
657
|
+
result["actions"] = (
|
|
658
|
+
self.actions.value if hasattr(self.actions, "value") else self.actions
|
|
659
|
+
)
|
|
551
660
|
return result
|
|
552
661
|
|
|
553
662
|
|
|
@@ -563,11 +672,23 @@ class ActionDefinition:
|
|
|
563
672
|
def to_dict(self) -> Dict[str, Any]:
|
|
564
673
|
"""Convert to dict format expected by backend."""
|
|
565
674
|
result = {}
|
|
566
|
-
result["name"] = self.name
|
|
567
|
-
result["description"] =
|
|
568
|
-
|
|
675
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
676
|
+
result["description"] = (
|
|
677
|
+
self.description.value
|
|
678
|
+
if hasattr(self.description, "value")
|
|
679
|
+
else self.description
|
|
680
|
+
)
|
|
681
|
+
result["parameters"] = (
|
|
682
|
+
self.parameters.value
|
|
683
|
+
if hasattr(self.parameters, "value")
|
|
684
|
+
else self.parameters
|
|
685
|
+
)
|
|
569
686
|
if self.result_schema is not None:
|
|
570
|
-
result["result_schema"] =
|
|
687
|
+
result["result_schema"] = (
|
|
688
|
+
self.result_schema.value
|
|
689
|
+
if hasattr(self.result_schema, "value")
|
|
690
|
+
else self.result_schema
|
|
691
|
+
)
|
|
571
692
|
return result
|
|
572
693
|
|
|
573
694
|
|
|
@@ -585,14 +706,34 @@ class ResultSchema:
|
|
|
585
706
|
"""Convert to dict format expected by backend."""
|
|
586
707
|
result = {}
|
|
587
708
|
if self.description is not None:
|
|
588
|
-
result["description"] =
|
|
709
|
+
result["description"] = (
|
|
710
|
+
self.description.value
|
|
711
|
+
if hasattr(self.description, "value")
|
|
712
|
+
else self.description
|
|
713
|
+
)
|
|
589
714
|
if self.required_fields is not None:
|
|
590
|
-
result["required_fields"] =
|
|
715
|
+
result["required_fields"] = (
|
|
716
|
+
self.required_fields.value
|
|
717
|
+
if hasattr(self.required_fields, "value")
|
|
718
|
+
else self.required_fields
|
|
719
|
+
)
|
|
591
720
|
if self.optional_fields is not None:
|
|
592
|
-
result["optional_fields"] =
|
|
593
|
-
|
|
721
|
+
result["optional_fields"] = (
|
|
722
|
+
self.optional_fields.value
|
|
723
|
+
if hasattr(self.optional_fields, "value")
|
|
724
|
+
else self.optional_fields
|
|
725
|
+
)
|
|
726
|
+
result["properties"] = (
|
|
727
|
+
self.properties.value
|
|
728
|
+
if hasattr(self.properties, "value")
|
|
729
|
+
else self.properties
|
|
730
|
+
)
|
|
594
731
|
if self.examples is not None:
|
|
595
|
-
result["examples"] =
|
|
732
|
+
result["examples"] = (
|
|
733
|
+
self.examples.value
|
|
734
|
+
if hasattr(self.examples, "value")
|
|
735
|
+
else self.examples
|
|
736
|
+
)
|
|
596
737
|
return result
|
|
597
738
|
|
|
598
739
|
|
|
@@ -610,17 +751,31 @@ class PropertySchema:
|
|
|
610
751
|
def to_dict(self) -> Dict[str, Any]:
|
|
611
752
|
"""Convert to dict format expected by backend."""
|
|
612
753
|
result = {}
|
|
613
|
-
result["type"] = self.type
|
|
754
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
614
755
|
if self.description is not None:
|
|
615
|
-
result["description"] =
|
|
756
|
+
result["description"] = (
|
|
757
|
+
self.description.value
|
|
758
|
+
if hasattr(self.description, "value")
|
|
759
|
+
else self.description
|
|
760
|
+
)
|
|
616
761
|
if self.items is not None:
|
|
617
|
-
result["items"] =
|
|
762
|
+
result["items"] = (
|
|
763
|
+
self.items.value if hasattr(self.items, "value") else self.items
|
|
764
|
+
)
|
|
618
765
|
if self.properties is not None:
|
|
619
|
-
result["properties"] =
|
|
766
|
+
result["properties"] = (
|
|
767
|
+
self.properties.value
|
|
768
|
+
if hasattr(self.properties, "value")
|
|
769
|
+
else self.properties
|
|
770
|
+
)
|
|
620
771
|
if self.example is not None:
|
|
621
|
-
result["example"] =
|
|
772
|
+
result["example"] = (
|
|
773
|
+
self.example.value if hasattr(self.example, "value") else self.example
|
|
774
|
+
)
|
|
622
775
|
if self.enum is not None:
|
|
623
|
-
result["enum"] =
|
|
776
|
+
result["enum"] = (
|
|
777
|
+
self.enum.value if hasattr(self.enum, "value") else self.enum
|
|
778
|
+
)
|
|
624
779
|
return result
|
|
625
780
|
|
|
626
781
|
|
|
@@ -642,18 +797,46 @@ class IntegrationSchema:
|
|
|
642
797
|
def to_dict(self) -> Dict[str, Any]:
|
|
643
798
|
"""Convert to dict format expected by backend."""
|
|
644
799
|
result = {}
|
|
645
|
-
result["key"] = self.key
|
|
646
|
-
result["name"] = self.name
|
|
647
|
-
result["description"] =
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
result["
|
|
800
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
801
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
802
|
+
result["description"] = (
|
|
803
|
+
self.description.value
|
|
804
|
+
if hasattr(self.description, "value")
|
|
805
|
+
else self.description
|
|
806
|
+
)
|
|
807
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
808
|
+
result["auth_types"] = (
|
|
809
|
+
self.auth_types.value
|
|
810
|
+
if hasattr(self.auth_types, "value")
|
|
811
|
+
else self.auth_types
|
|
812
|
+
)
|
|
813
|
+
result["credential_schema"] = (
|
|
814
|
+
self.credential_schema.value
|
|
815
|
+
if hasattr(self.credential_schema, "value")
|
|
816
|
+
else self.credential_schema
|
|
817
|
+
)
|
|
818
|
+
result["available_scopes"] = (
|
|
819
|
+
self.available_scopes.value
|
|
820
|
+
if hasattr(self.available_scopes, "value")
|
|
821
|
+
else self.available_scopes
|
|
822
|
+
)
|
|
823
|
+
result["documentation_url"] = (
|
|
824
|
+
self.documentation_url.value
|
|
825
|
+
if hasattr(self.documentation_url, "value")
|
|
826
|
+
else self.documentation_url
|
|
827
|
+
)
|
|
653
828
|
if self.codegen_details is not None:
|
|
654
|
-
result["codegen_details"] =
|
|
829
|
+
result["codegen_details"] = (
|
|
830
|
+
self.codegen_details.value
|
|
831
|
+
if hasattr(self.codegen_details, "value")
|
|
832
|
+
else self.codegen_details
|
|
833
|
+
)
|
|
655
834
|
if self.analysis_details is not None:
|
|
656
|
-
result["analysis_details"] =
|
|
835
|
+
result["analysis_details"] = (
|
|
836
|
+
self.analysis_details.value
|
|
837
|
+
if hasattr(self.analysis_details, "value")
|
|
838
|
+
else self.analysis_details
|
|
839
|
+
)
|
|
657
840
|
return result
|
|
658
841
|
|
|
659
842
|
|
|
@@ -668,10 +851,14 @@ class CodegenDetails:
|
|
|
668
851
|
def to_dict(self) -> Dict[str, Any]:
|
|
669
852
|
"""Convert to dict format expected by backend."""
|
|
670
853
|
result = {}
|
|
671
|
-
result["code"] = self.code
|
|
672
|
-
result["imports"] =
|
|
854
|
+
result["code"] = self.code.value if hasattr(self.code, "value") else self.code
|
|
855
|
+
result["imports"] = (
|
|
856
|
+
self.imports.value if hasattr(self.imports, "value") else self.imports
|
|
857
|
+
)
|
|
673
858
|
if self.hint is not None:
|
|
674
|
-
result["hint"] =
|
|
859
|
+
result["hint"] = (
|
|
860
|
+
self.hint.value if hasattr(self.hint, "value") else self.hint
|
|
861
|
+
)
|
|
675
862
|
return result
|
|
676
863
|
|
|
677
864
|
|
|
@@ -685,8 +872,10 @@ class AnalysisDetails:
|
|
|
685
872
|
def to_dict(self) -> Dict[str, Any]:
|
|
686
873
|
"""Convert to dict format expected by backend."""
|
|
687
874
|
result = {}
|
|
688
|
-
result["imports"] =
|
|
689
|
-
|
|
875
|
+
result["imports"] = (
|
|
876
|
+
self.imports.value if hasattr(self.imports, "value") else self.imports
|
|
877
|
+
)
|
|
878
|
+
result["code"] = self.code.value if hasattr(self.code, "value") else self.code
|
|
690
879
|
return result
|
|
691
880
|
|
|
692
881
|
|
|
@@ -705,16 +894,30 @@ class CredentialSchema:
|
|
|
705
894
|
def to_dict(self) -> Dict[str, Any]:
|
|
706
895
|
"""Convert to dict format expected by backend."""
|
|
707
896
|
result = {}
|
|
708
|
-
result["type"] = self.type
|
|
709
|
-
result["description"] =
|
|
710
|
-
|
|
711
|
-
|
|
897
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
898
|
+
result["description"] = (
|
|
899
|
+
self.description.value
|
|
900
|
+
if hasattr(self.description, "value")
|
|
901
|
+
else self.description
|
|
902
|
+
)
|
|
903
|
+
result["required"] = (
|
|
904
|
+
self.required.value if hasattr(self.required, "value") else self.required
|
|
905
|
+
)
|
|
906
|
+
result["source"] = (
|
|
907
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
908
|
+
)
|
|
712
909
|
if self.sensitivity is not None:
|
|
713
|
-
result["sensitivity"] =
|
|
910
|
+
result["sensitivity"] = (
|
|
911
|
+
self.sensitivity.value
|
|
912
|
+
if hasattr(self.sensitivity, "value")
|
|
913
|
+
else self.sensitivity
|
|
914
|
+
)
|
|
714
915
|
if self.jq is not None:
|
|
715
|
-
result["jq"] = self.jq
|
|
916
|
+
result["jq"] = self.jq.value if hasattr(self.jq, "value") else self.jq
|
|
716
917
|
if self.header is not None:
|
|
717
|
-
result["header"] =
|
|
918
|
+
result["header"] = (
|
|
919
|
+
self.header.value if hasattr(self.header, "value") else self.header
|
|
920
|
+
)
|
|
718
921
|
return result
|
|
719
922
|
|
|
720
923
|
|
|
@@ -728,8 +931,14 @@ class ExportActionsResponse:
|
|
|
728
931
|
def to_dict(self) -> Dict[str, Any]:
|
|
729
932
|
"""Convert to dict format expected by backend."""
|
|
730
933
|
result = {}
|
|
731
|
-
result["services"] =
|
|
732
|
-
|
|
934
|
+
result["services"] = (
|
|
935
|
+
self.services.value if hasattr(self.services, "value") else self.services
|
|
936
|
+
)
|
|
937
|
+
result["integrations"] = (
|
|
938
|
+
self.integrations.value
|
|
939
|
+
if hasattr(self.integrations, "value")
|
|
940
|
+
else self.integrations
|
|
941
|
+
)
|
|
733
942
|
return result
|
|
734
943
|
|
|
735
944
|
|
|
@@ -744,11 +953,17 @@ class ConditionDefinition:
|
|
|
744
953
|
def to_dict(self) -> Dict[str, Any]:
|
|
745
954
|
"""Convert to dict format expected by backend."""
|
|
746
955
|
result = {}
|
|
747
|
-
result["type"] = self.type
|
|
956
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
748
957
|
if self.conditions is not None:
|
|
749
|
-
result["conditions"] =
|
|
958
|
+
result["conditions"] = (
|
|
959
|
+
self.conditions.value
|
|
960
|
+
if hasattr(self.conditions, "value")
|
|
961
|
+
else self.conditions
|
|
962
|
+
)
|
|
750
963
|
if self.leaf is not None:
|
|
751
|
-
result["leaf"] =
|
|
964
|
+
result["leaf"] = (
|
|
965
|
+
self.leaf.value if hasattr(self.leaf, "value") else self.leaf
|
|
966
|
+
)
|
|
752
967
|
return result
|
|
753
968
|
|
|
754
969
|
|
|
@@ -763,53 +978,17 @@ class TempCondition:
|
|
|
763
978
|
def to_dict(self) -> Dict[str, Any]:
|
|
764
979
|
"""Convert to dict format expected by backend."""
|
|
765
980
|
result = {}
|
|
766
|
-
result["type"] = self.type
|
|
981
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
767
982
|
if self.conditions is not None:
|
|
768
|
-
result["conditions"] =
|
|
983
|
+
result["conditions"] = (
|
|
984
|
+
self.conditions.value
|
|
985
|
+
if hasattr(self.conditions, "value")
|
|
986
|
+
else self.conditions
|
|
987
|
+
)
|
|
769
988
|
if self.leaf is not None:
|
|
770
|
-
result["leaf"] =
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
@dataclass
|
|
775
|
-
class StepWithHandlers:
|
|
776
|
-
"""StepWithHandlers matching Go backend structure."""
|
|
777
|
-
|
|
778
|
-
step: "Step"
|
|
779
|
-
result_handlers: List["ResultHandler"]
|
|
780
|
-
|
|
781
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
782
|
-
"""Convert to dict format expected by backend."""
|
|
783
|
-
result = {}
|
|
784
|
-
result["step"] = self.step
|
|
785
|
-
result["result_handlers"] = self.result_handlers
|
|
786
|
-
return result
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
@dataclass
|
|
790
|
-
class ResultHandler:
|
|
791
|
-
"""ResultHandler matching Go backend structure."""
|
|
792
|
-
|
|
793
|
-
type: str
|
|
794
|
-
if_conditions: "ConditionDefinition"
|
|
795
|
-
result_handler_order: int
|
|
796
|
-
output_content_type: str
|
|
797
|
-
steps: List["StepWithHandlers"]
|
|
798
|
-
history_content_type: Optional[str] = None
|
|
799
|
-
ui_content_type: Optional[str] = None
|
|
800
|
-
|
|
801
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
802
|
-
"""Convert to dict format expected by backend."""
|
|
803
|
-
result = {}
|
|
804
|
-
result["type"] = self.type
|
|
805
|
-
result["if_conditions"] = self.if_conditions
|
|
806
|
-
result["result_handler_order"] = self.result_handler_order
|
|
807
|
-
result["output_content_type"] = self.output_content_type
|
|
808
|
-
if self.history_content_type is not None:
|
|
809
|
-
result["history_content_type"] = self.history_content_type
|
|
810
|
-
if self.ui_content_type is not None:
|
|
811
|
-
result["ui_content_type"] = self.ui_content_type
|
|
812
|
-
result["steps"] = self.steps
|
|
989
|
+
result["leaf"] = (
|
|
990
|
+
self.leaf.value if hasattr(self.leaf, "value") else self.leaf
|
|
991
|
+
)
|
|
813
992
|
return result
|
|
814
993
|
|
|
815
994
|
|
|
@@ -825,13 +1004,21 @@ class JSONSchemaProperty:
|
|
|
825
1004
|
def to_dict(self) -> Dict[str, Any]:
|
|
826
1005
|
"""Convert to dict format expected by backend."""
|
|
827
1006
|
result = {}
|
|
828
|
-
result["type"] = self.type
|
|
1007
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
829
1008
|
if self.description is not None:
|
|
830
|
-
result["description"] =
|
|
1009
|
+
result["description"] = (
|
|
1010
|
+
self.description.value
|
|
1011
|
+
if hasattr(self.description, "value")
|
|
1012
|
+
else self.description
|
|
1013
|
+
)
|
|
831
1014
|
if self.items is not None:
|
|
832
|
-
result["items"] =
|
|
1015
|
+
result["items"] = (
|
|
1016
|
+
self.items.value if hasattr(self.items, "value") else self.items
|
|
1017
|
+
)
|
|
833
1018
|
if self.enum is not None:
|
|
834
|
-
result["enum"] =
|
|
1019
|
+
result["enum"] = (
|
|
1020
|
+
self.enum.value if hasattr(self.enum, "value") else self.enum
|
|
1021
|
+
)
|
|
835
1022
|
return result
|
|
836
1023
|
|
|
837
1024
|
|
|
@@ -847,13 +1034,23 @@ class JSONSchema:
|
|
|
847
1034
|
def to_dict(self) -> Dict[str, Any]:
|
|
848
1035
|
"""Convert to dict format expected by backend."""
|
|
849
1036
|
result = {}
|
|
850
|
-
result["type"] = self.type
|
|
1037
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
851
1038
|
if self.properties is not None:
|
|
852
|
-
result["properties"] =
|
|
1039
|
+
result["properties"] = (
|
|
1040
|
+
self.properties.value
|
|
1041
|
+
if hasattr(self.properties, "value")
|
|
1042
|
+
else self.properties
|
|
1043
|
+
)
|
|
853
1044
|
if self.required is not None:
|
|
854
|
-
result["required"] =
|
|
1045
|
+
result["required"] = (
|
|
1046
|
+
self.required.value
|
|
1047
|
+
if hasattr(self.required, "value")
|
|
1048
|
+
else self.required
|
|
1049
|
+
)
|
|
855
1050
|
if self.items is not None:
|
|
856
|
-
result["items"] =
|
|
1051
|
+
result["items"] = (
|
|
1052
|
+
self.items.value if hasattr(self.items, "value") else self.items
|
|
1053
|
+
)
|
|
857
1054
|
return result
|
|
858
1055
|
|
|
859
1056
|
|
|
@@ -870,29 +1067,67 @@ class Tool:
|
|
|
870
1067
|
history_content_type: str = None
|
|
871
1068
|
ui_content_type: str = None
|
|
872
1069
|
as_root: bool = None
|
|
873
|
-
running_message: Optional[str] = None
|
|
874
|
-
finished_message: Optional[str] = None
|
|
875
|
-
|
|
876
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
877
|
-
"""Convert to dict format expected by backend."""
|
|
878
|
-
result = {}
|
|
879
|
-
result["name"] = self.name
|
|
880
|
-
result["description"] =
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
1070
|
+
running_message: Optional[Union[str, TemplateString]] = None
|
|
1071
|
+
finished_message: Optional[Union[str, TemplateString]] = None
|
|
1072
|
+
|
|
1073
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
1074
|
+
"""Convert to dict format expected by backend."""
|
|
1075
|
+
result = {}
|
|
1076
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
1077
|
+
result["description"] = (
|
|
1078
|
+
self.description.value
|
|
1079
|
+
if hasattr(self.description, "value")
|
|
1080
|
+
else self.description
|
|
1081
|
+
)
|
|
1082
|
+
result["input_schema"] = (
|
|
1083
|
+
self.input_schema.value
|
|
1084
|
+
if hasattr(self.input_schema, "value")
|
|
1085
|
+
else self.input_schema
|
|
1086
|
+
)
|
|
1087
|
+
result["action_type"] = (
|
|
1088
|
+
self.action_type.value
|
|
1089
|
+
if hasattr(self.action_type, "value")
|
|
1090
|
+
else self.action_type
|
|
1091
|
+
)
|
|
1092
|
+
result["parameters"] = (
|
|
1093
|
+
self.parameters.value
|
|
1094
|
+
if hasattr(self.parameters, "value")
|
|
1095
|
+
else self.parameters
|
|
1096
|
+
)
|
|
884
1097
|
if self.bot_output_visibility is not None:
|
|
885
|
-
result["bot_output_visibility"] =
|
|
1098
|
+
result["bot_output_visibility"] = (
|
|
1099
|
+
self.bot_output_visibility.value
|
|
1100
|
+
if hasattr(self.bot_output_visibility, "value")
|
|
1101
|
+
else self.bot_output_visibility
|
|
1102
|
+
)
|
|
886
1103
|
if self.history_content_type is not None:
|
|
887
|
-
result["history_content_type"] =
|
|
1104
|
+
result["history_content_type"] = (
|
|
1105
|
+
self.history_content_type.value
|
|
1106
|
+
if hasattr(self.history_content_type, "value")
|
|
1107
|
+
else self.history_content_type
|
|
1108
|
+
)
|
|
888
1109
|
if self.ui_content_type is not None:
|
|
889
|
-
result["ui_content_type"] =
|
|
1110
|
+
result["ui_content_type"] = (
|
|
1111
|
+
self.ui_content_type.value
|
|
1112
|
+
if hasattr(self.ui_content_type, "value")
|
|
1113
|
+
else self.ui_content_type
|
|
1114
|
+
)
|
|
890
1115
|
if self.as_root is not None:
|
|
891
|
-
result["as_root"] =
|
|
1116
|
+
result["as_root"] = (
|
|
1117
|
+
self.as_root.value if hasattr(self.as_root, "value") else self.as_root
|
|
1118
|
+
)
|
|
892
1119
|
if self.running_message is not None:
|
|
893
|
-
result["running_message"] =
|
|
1120
|
+
result["running_message"] = (
|
|
1121
|
+
str(self.running_message)
|
|
1122
|
+
if hasattr(self.running_message, "__str__")
|
|
1123
|
+
else self.running_message
|
|
1124
|
+
)
|
|
894
1125
|
if self.finished_message is not None:
|
|
895
|
-
result["finished_message"] =
|
|
1126
|
+
result["finished_message"] = (
|
|
1127
|
+
str(self.finished_message)
|
|
1128
|
+
if hasattr(self.finished_message, "__str__")
|
|
1129
|
+
else self.finished_message
|
|
1130
|
+
)
|
|
896
1131
|
return result
|
|
897
1132
|
|
|
898
1133
|
|
|
@@ -908,11 +1143,17 @@ class Message:
|
|
|
908
1143
|
def to_dict(self) -> Dict[str, Any]:
|
|
909
1144
|
"""Convert to dict format expected by backend."""
|
|
910
1145
|
result = {}
|
|
911
|
-
result["id"] = self.id
|
|
912
|
-
result["role"] = self.role
|
|
913
|
-
result["content"] =
|
|
1146
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1147
|
+
result["role"] = self.role.value if hasattr(self.role, "value") else self.role
|
|
1148
|
+
result["content"] = (
|
|
1149
|
+
self.content.value if hasattr(self.content, "value") else self.content
|
|
1150
|
+
)
|
|
914
1151
|
if self.created_at is not None:
|
|
915
|
-
result["created_at"] =
|
|
1152
|
+
result["created_at"] = (
|
|
1153
|
+
self.created_at.value
|
|
1154
|
+
if hasattr(self.created_at, "value")
|
|
1155
|
+
else self.created_at
|
|
1156
|
+
)
|
|
916
1157
|
return result
|
|
917
1158
|
|
|
918
1159
|
|
|
@@ -931,13 +1172,37 @@ class SystemParameters:
|
|
|
931
1172
|
def to_dict(self) -> Dict[str, Any]:
|
|
932
1173
|
"""Convert to dict format expected by backend."""
|
|
933
1174
|
result = {}
|
|
934
|
-
result["current_date"] =
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
result["
|
|
940
|
-
|
|
1175
|
+
result["current_date"] = (
|
|
1176
|
+
self.current_date.value
|
|
1177
|
+
if hasattr(self.current_date, "value")
|
|
1178
|
+
else self.current_date
|
|
1179
|
+
)
|
|
1180
|
+
result["messages"] = (
|
|
1181
|
+
self.messages.value if hasattr(self.messages, "value") else self.messages
|
|
1182
|
+
)
|
|
1183
|
+
result["session_messages"] = (
|
|
1184
|
+
self.session_messages.value
|
|
1185
|
+
if hasattr(self.session_messages, "value")
|
|
1186
|
+
else self.session_messages
|
|
1187
|
+
)
|
|
1188
|
+
result["current_message"] = (
|
|
1189
|
+
self.current_message.value
|
|
1190
|
+
if hasattr(self.current_message, "value")
|
|
1191
|
+
else self.current_message
|
|
1192
|
+
)
|
|
1193
|
+
result["thread_id"] = (
|
|
1194
|
+
self.thread_id.value if hasattr(self.thread_id, "value") else self.thread_id
|
|
1195
|
+
)
|
|
1196
|
+
result["organization_id"] = (
|
|
1197
|
+
self.organization_id.value
|
|
1198
|
+
if hasattr(self.organization_id, "value")
|
|
1199
|
+
else self.organization_id
|
|
1200
|
+
)
|
|
1201
|
+
result["invocation_id"] = (
|
|
1202
|
+
self.invocation_id.value
|
|
1203
|
+
if hasattr(self.invocation_id, "value")
|
|
1204
|
+
else self.invocation_id
|
|
1205
|
+
)
|
|
941
1206
|
return result
|
|
942
1207
|
|
|
943
1208
|
|
|
@@ -954,15 +1219,27 @@ class Result:
|
|
|
954
1219
|
def to_dict(self) -> Dict[str, Any]:
|
|
955
1220
|
"""Convert to dict format expected by backend."""
|
|
956
1221
|
result = {}
|
|
957
|
-
result["status"] =
|
|
1222
|
+
result["status"] = (
|
|
1223
|
+
self.status.value if hasattr(self.status, "value") else self.status
|
|
1224
|
+
)
|
|
958
1225
|
if self.parameters is not None:
|
|
959
|
-
result["parameters"] =
|
|
1226
|
+
result["parameters"] = (
|
|
1227
|
+
self.parameters.value
|
|
1228
|
+
if hasattr(self.parameters, "value")
|
|
1229
|
+
else self.parameters
|
|
1230
|
+
)
|
|
960
1231
|
if self.output is not None:
|
|
961
|
-
result["output"] =
|
|
1232
|
+
result["output"] = (
|
|
1233
|
+
self.output.value if hasattr(self.output, "value") else self.output
|
|
1234
|
+
)
|
|
962
1235
|
if self.message is not None:
|
|
963
|
-
result["message"] =
|
|
1236
|
+
result["message"] = (
|
|
1237
|
+
self.message.value if hasattr(self.message, "value") else self.message
|
|
1238
|
+
)
|
|
964
1239
|
if self.error is not None:
|
|
965
|
-
result["error"] =
|
|
1240
|
+
result["error"] = (
|
|
1241
|
+
self.error.value if hasattr(self.error, "value") else self.error
|
|
1242
|
+
)
|
|
966
1243
|
return result
|
|
967
1244
|
|
|
968
1245
|
|
|
@@ -983,8 +1260,8 @@ class APIStep:
|
|
|
983
1260
|
output_channels: List[str]
|
|
984
1261
|
depends_on: Optional[List[str]] = None
|
|
985
1262
|
key: Optional[str] = None
|
|
986
|
-
running_message: Optional[str] = None
|
|
987
|
-
finished_message: Optional[str] = None
|
|
1263
|
+
running_message: Optional[Union[str, TemplateString]] = None
|
|
1264
|
+
finished_message: Optional[Union[str, TemplateString]] = None
|
|
988
1265
|
history_content_type: Optional[str] = None
|
|
989
1266
|
ui_content_type: Optional[str] = None
|
|
990
1267
|
parameter_hydration_behaviour: Optional[Any] = None
|
|
@@ -995,37 +1272,111 @@ class APIStep:
|
|
|
995
1272
|
def to_dict(self) -> Dict[str, Any]:
|
|
996
1273
|
"""Convert to dict format expected by backend."""
|
|
997
1274
|
result = {}
|
|
998
|
-
result["id"] = self.id
|
|
999
|
-
result["bot_id"] =
|
|
1000
|
-
|
|
1001
|
-
|
|
1275
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1276
|
+
result["bot_id"] = (
|
|
1277
|
+
self.bot_id.value if hasattr(self.bot_id, "value") else self.bot_id
|
|
1278
|
+
)
|
|
1279
|
+
result["action_type"] = (
|
|
1280
|
+
self.action_type.value
|
|
1281
|
+
if hasattr(self.action_type, "value")
|
|
1282
|
+
else self.action_type
|
|
1283
|
+
)
|
|
1284
|
+
result["parameters"] = (
|
|
1285
|
+
self.parameters.value
|
|
1286
|
+
if hasattr(self.parameters, "value")
|
|
1287
|
+
else self.parameters
|
|
1288
|
+
)
|
|
1002
1289
|
if self.depends_on is not None:
|
|
1003
|
-
result["depends_on"] =
|
|
1290
|
+
result["depends_on"] = (
|
|
1291
|
+
self.depends_on.value
|
|
1292
|
+
if hasattr(self.depends_on, "value")
|
|
1293
|
+
else self.depends_on
|
|
1294
|
+
)
|
|
1004
1295
|
if self.key is not None:
|
|
1005
|
-
result["key"] = self.key
|
|
1006
|
-
result["step_order"] =
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
result["
|
|
1012
|
-
|
|
1296
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
1297
|
+
result["step_order"] = (
|
|
1298
|
+
self.step_order.value
|
|
1299
|
+
if hasattr(self.step_order, "value")
|
|
1300
|
+
else self.step_order
|
|
1301
|
+
)
|
|
1302
|
+
result["output_content_type"] = (
|
|
1303
|
+
self.output_content_type.value
|
|
1304
|
+
if hasattr(self.output_content_type, "value")
|
|
1305
|
+
else self.output_content_type
|
|
1306
|
+
)
|
|
1307
|
+
result["user_output_visibility"] = (
|
|
1308
|
+
self.user_output_visibility.value
|
|
1309
|
+
if hasattr(self.user_output_visibility, "value")
|
|
1310
|
+
else self.user_output_visibility
|
|
1311
|
+
)
|
|
1312
|
+
result["bot_output_visibility"] = (
|
|
1313
|
+
self.bot_output_visibility.value
|
|
1314
|
+
if hasattr(self.bot_output_visibility, "value")
|
|
1315
|
+
else self.bot_output_visibility
|
|
1316
|
+
)
|
|
1317
|
+
result["execution_mode"] = (
|
|
1318
|
+
self.execution_mode.value
|
|
1319
|
+
if hasattr(self.execution_mode, "value")
|
|
1320
|
+
else self.execution_mode
|
|
1321
|
+
)
|
|
1322
|
+
result["output_behaviour"] = (
|
|
1323
|
+
self.output_behaviour.value
|
|
1324
|
+
if hasattr(self.output_behaviour, "value")
|
|
1325
|
+
else self.output_behaviour
|
|
1326
|
+
)
|
|
1327
|
+
result["output_channels"] = (
|
|
1328
|
+
self.output_channels.value
|
|
1329
|
+
if hasattr(self.output_channels, "value")
|
|
1330
|
+
else self.output_channels
|
|
1331
|
+
)
|
|
1013
1332
|
if self.running_message is not None:
|
|
1014
|
-
result["running_message"] =
|
|
1333
|
+
result["running_message"] = (
|
|
1334
|
+
str(self.running_message)
|
|
1335
|
+
if hasattr(self.running_message, "__str__")
|
|
1336
|
+
else self.running_message
|
|
1337
|
+
)
|
|
1015
1338
|
if self.finished_message is not None:
|
|
1016
|
-
result["finished_message"] =
|
|
1339
|
+
result["finished_message"] = (
|
|
1340
|
+
str(self.finished_message)
|
|
1341
|
+
if hasattr(self.finished_message, "__str__")
|
|
1342
|
+
else self.finished_message
|
|
1343
|
+
)
|
|
1017
1344
|
if self.history_content_type is not None:
|
|
1018
|
-
result["history_content_type"] =
|
|
1345
|
+
result["history_content_type"] = (
|
|
1346
|
+
self.history_content_type.value
|
|
1347
|
+
if hasattr(self.history_content_type, "value")
|
|
1348
|
+
else self.history_content_type
|
|
1349
|
+
)
|
|
1019
1350
|
if self.ui_content_type is not None:
|
|
1020
|
-
result["ui_content_type"] =
|
|
1351
|
+
result["ui_content_type"] = (
|
|
1352
|
+
self.ui_content_type.value
|
|
1353
|
+
if hasattr(self.ui_content_type, "value")
|
|
1354
|
+
else self.ui_content_type
|
|
1355
|
+
)
|
|
1021
1356
|
if self.parameter_hydration_behaviour is not None:
|
|
1022
|
-
result["parameter_hydration_behaviour"] =
|
|
1357
|
+
result["parameter_hydration_behaviour"] = (
|
|
1358
|
+
self.parameter_hydration_behaviour.value
|
|
1359
|
+
if hasattr(self.parameter_hydration_behaviour, "value")
|
|
1360
|
+
else self.parameter_hydration_behaviour
|
|
1361
|
+
)
|
|
1023
1362
|
if self.result_handler_id is not None:
|
|
1024
|
-
result["result_handler_id"] =
|
|
1363
|
+
result["result_handler_id"] = (
|
|
1364
|
+
self.result_handler_id.value
|
|
1365
|
+
if hasattr(self.result_handler_id, "value")
|
|
1366
|
+
else self.result_handler_id
|
|
1367
|
+
)
|
|
1025
1368
|
if self.created_at is not None:
|
|
1026
|
-
result["created_at"] =
|
|
1369
|
+
result["created_at"] = (
|
|
1370
|
+
self.created_at.value
|
|
1371
|
+
if hasattr(self.created_at, "value")
|
|
1372
|
+
else self.created_at
|
|
1373
|
+
)
|
|
1027
1374
|
if self.updated_at is not None:
|
|
1028
|
-
result["updated_at"] =
|
|
1375
|
+
result["updated_at"] = (
|
|
1376
|
+
self.updated_at.value
|
|
1377
|
+
if hasattr(self.updated_at, "value")
|
|
1378
|
+
else self.updated_at
|
|
1379
|
+
)
|
|
1029
1380
|
return result
|
|
1030
1381
|
|
|
1031
1382
|
|
|
@@ -1045,17 +1396,37 @@ class APIParameterValueSource:
|
|
|
1045
1396
|
"""Convert to dict format expected by backend."""
|
|
1046
1397
|
result = {}
|
|
1047
1398
|
if self.id is not None:
|
|
1048
|
-
result["id"] = self.id
|
|
1399
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1049
1400
|
if self.parameter_definition_id is not None:
|
|
1050
|
-
result["parameter_definition_id"] =
|
|
1051
|
-
|
|
1052
|
-
|
|
1401
|
+
result["parameter_definition_id"] = (
|
|
1402
|
+
self.parameter_definition_id.value
|
|
1403
|
+
if hasattr(self.parameter_definition_id, "value")
|
|
1404
|
+
else self.parameter_definition_id
|
|
1405
|
+
)
|
|
1406
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1407
|
+
result["parameters"] = (
|
|
1408
|
+
self.parameters.value
|
|
1409
|
+
if hasattr(self.parameters, "value")
|
|
1410
|
+
else self.parameters
|
|
1411
|
+
)
|
|
1053
1412
|
if self.created_at is not None:
|
|
1054
|
-
result["created_at"] =
|
|
1413
|
+
result["created_at"] = (
|
|
1414
|
+
self.created_at.value
|
|
1415
|
+
if hasattr(self.created_at, "value")
|
|
1416
|
+
else self.created_at
|
|
1417
|
+
)
|
|
1055
1418
|
if self.updated_at is not None:
|
|
1056
|
-
result["updated_at"] =
|
|
1419
|
+
result["updated_at"] = (
|
|
1420
|
+
self.updated_at.value
|
|
1421
|
+
if hasattr(self.updated_at, "value")
|
|
1422
|
+
else self.updated_at
|
|
1423
|
+
)
|
|
1057
1424
|
if self.on_populate is not None:
|
|
1058
|
-
result["on_populate"] =
|
|
1425
|
+
result["on_populate"] = (
|
|
1426
|
+
self.on_populate.value
|
|
1427
|
+
if hasattr(self.on_populate, "value")
|
|
1428
|
+
else self.on_populate
|
|
1429
|
+
)
|
|
1059
1430
|
return result
|
|
1060
1431
|
|
|
1061
1432
|
|
|
@@ -1075,16 +1446,40 @@ class APIParameterValueSourceHandler:
|
|
|
1075
1446
|
"""Convert to dict format expected by backend."""
|
|
1076
1447
|
result = {}
|
|
1077
1448
|
if self.id is not None:
|
|
1078
|
-
result["id"] = self.id
|
|
1449
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1079
1450
|
if self.parameter_value_source_id is not None:
|
|
1080
|
-
result["parameter_value_source_id"] =
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1451
|
+
result["parameter_value_source_id"] = (
|
|
1452
|
+
self.parameter_value_source_id.value
|
|
1453
|
+
if hasattr(self.parameter_value_source_id, "value")
|
|
1454
|
+
else self.parameter_value_source_id
|
|
1455
|
+
)
|
|
1456
|
+
result["action_type"] = (
|
|
1457
|
+
self.action_type.value
|
|
1458
|
+
if hasattr(self.action_type, "value")
|
|
1459
|
+
else self.action_type
|
|
1460
|
+
)
|
|
1461
|
+
result["parameters"] = (
|
|
1462
|
+
self.parameters.value
|
|
1463
|
+
if hasattr(self.parameters, "value")
|
|
1464
|
+
else self.parameters
|
|
1465
|
+
)
|
|
1466
|
+
result["execution_mode"] = (
|
|
1467
|
+
self.execution_mode.value
|
|
1468
|
+
if hasattr(self.execution_mode, "value")
|
|
1469
|
+
else self.execution_mode
|
|
1470
|
+
)
|
|
1084
1471
|
if self.created_at is not None:
|
|
1085
|
-
result["created_at"] =
|
|
1472
|
+
result["created_at"] = (
|
|
1473
|
+
self.created_at.value
|
|
1474
|
+
if hasattr(self.created_at, "value")
|
|
1475
|
+
else self.created_at
|
|
1476
|
+
)
|
|
1086
1477
|
if self.updated_at is not None:
|
|
1087
|
-
result["updated_at"] =
|
|
1478
|
+
result["updated_at"] = (
|
|
1479
|
+
self.updated_at.value
|
|
1480
|
+
if hasattr(self.updated_at, "value")
|
|
1481
|
+
else self.updated_at
|
|
1482
|
+
)
|
|
1088
1483
|
return result
|
|
1089
1484
|
|
|
1090
1485
|
|
|
@@ -1104,16 +1499,40 @@ class APIParameterInterpreter:
|
|
|
1104
1499
|
"""Convert to dict format expected by backend."""
|
|
1105
1500
|
result = {}
|
|
1106
1501
|
if self.id is not None:
|
|
1107
|
-
result["id"] = self.id
|
|
1502
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1108
1503
|
if self.parameter_definition_id is not None:
|
|
1109
|
-
result["parameter_definition_id"] =
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1504
|
+
result["parameter_definition_id"] = (
|
|
1505
|
+
self.parameter_definition_id.value
|
|
1506
|
+
if hasattr(self.parameter_definition_id, "value")
|
|
1507
|
+
else self.parameter_definition_id
|
|
1508
|
+
)
|
|
1509
|
+
result["action_type"] = (
|
|
1510
|
+
self.action_type.value
|
|
1511
|
+
if hasattr(self.action_type, "value")
|
|
1512
|
+
else self.action_type
|
|
1513
|
+
)
|
|
1514
|
+
result["parameters"] = (
|
|
1515
|
+
self.parameters.value
|
|
1516
|
+
if hasattr(self.parameters, "value")
|
|
1517
|
+
else self.parameters
|
|
1518
|
+
)
|
|
1519
|
+
result["interpreter_order"] = (
|
|
1520
|
+
self.interpreter_order.value
|
|
1521
|
+
if hasattr(self.interpreter_order, "value")
|
|
1522
|
+
else self.interpreter_order
|
|
1523
|
+
)
|
|
1113
1524
|
if self.created_at is not None:
|
|
1114
|
-
result["created_at"] =
|
|
1525
|
+
result["created_at"] = (
|
|
1526
|
+
self.created_at.value
|
|
1527
|
+
if hasattr(self.created_at, "value")
|
|
1528
|
+
else self.created_at
|
|
1529
|
+
)
|
|
1115
1530
|
if self.updated_at is not None:
|
|
1116
|
-
result["updated_at"] =
|
|
1531
|
+
result["updated_at"] = (
|
|
1532
|
+
self.updated_at.value
|
|
1533
|
+
if hasattr(self.updated_at, "value")
|
|
1534
|
+
else self.updated_at
|
|
1535
|
+
)
|
|
1117
1536
|
return result
|
|
1118
1537
|
|
|
1119
1538
|
|
|
@@ -1128,10 +1547,14 @@ class APIExecutionMode:
|
|
|
1128
1547
|
def to_dict(self) -> Dict[str, Any]:
|
|
1129
1548
|
"""Convert to dict format expected by backend."""
|
|
1130
1549
|
result = {}
|
|
1131
|
-
result["mode"] = self.mode
|
|
1132
|
-
result["data"] = self.data
|
|
1550
|
+
result["mode"] = self.mode.value if hasattr(self.mode, "value") else self.mode
|
|
1551
|
+
result["data"] = self.data.value if hasattr(self.data, "value") else self.data
|
|
1133
1552
|
if self.if_condition is not None:
|
|
1134
|
-
result["if_condition"] =
|
|
1553
|
+
result["if_condition"] = (
|
|
1554
|
+
self.if_condition.value
|
|
1555
|
+
if hasattr(self.if_condition, "value")
|
|
1556
|
+
else self.if_condition
|
|
1557
|
+
)
|
|
1135
1558
|
return result
|
|
1136
1559
|
|
|
1137
1560
|
|
|
@@ -1146,11 +1569,17 @@ class APIConditionDefinition:
|
|
|
1146
1569
|
def to_dict(self) -> Dict[str, Any]:
|
|
1147
1570
|
"""Convert to dict format expected by backend."""
|
|
1148
1571
|
result = {}
|
|
1149
|
-
result["type"] = self.type
|
|
1572
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1150
1573
|
if self.conditions is not None:
|
|
1151
|
-
result["conditions"] =
|
|
1574
|
+
result["conditions"] = (
|
|
1575
|
+
self.conditions.value
|
|
1576
|
+
if hasattr(self.conditions, "value")
|
|
1577
|
+
else self.conditions
|
|
1578
|
+
)
|
|
1152
1579
|
if self.leaf is not None:
|
|
1153
|
-
result["leaf"] =
|
|
1580
|
+
result["leaf"] = (
|
|
1581
|
+
self.leaf.value if hasattr(self.leaf, "value") else self.leaf
|
|
1582
|
+
)
|
|
1154
1583
|
return result
|
|
1155
1584
|
|
|
1156
1585
|
|
|
@@ -1167,29 +1596,67 @@ class APITool:
|
|
|
1167
1596
|
history_content_type: str = None
|
|
1168
1597
|
ui_content_type: str = None
|
|
1169
1598
|
as_root: bool = None
|
|
1170
|
-
running_message: Optional[str] = None
|
|
1171
|
-
finished_message: Optional[str] = None
|
|
1172
|
-
|
|
1173
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
1174
|
-
"""Convert to dict format expected by backend."""
|
|
1175
|
-
result = {}
|
|
1176
|
-
result["name"] = self.name
|
|
1177
|
-
result["description"] =
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1599
|
+
running_message: Optional[Union[str, TemplateString]] = None
|
|
1600
|
+
finished_message: Optional[Union[str, TemplateString]] = None
|
|
1601
|
+
|
|
1602
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
1603
|
+
"""Convert to dict format expected by backend."""
|
|
1604
|
+
result = {}
|
|
1605
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
1606
|
+
result["description"] = (
|
|
1607
|
+
self.description.value
|
|
1608
|
+
if hasattr(self.description, "value")
|
|
1609
|
+
else self.description
|
|
1610
|
+
)
|
|
1611
|
+
result["input_schema"] = (
|
|
1612
|
+
self.input_schema.value
|
|
1613
|
+
if hasattr(self.input_schema, "value")
|
|
1614
|
+
else self.input_schema
|
|
1615
|
+
)
|
|
1616
|
+
result["action_type"] = (
|
|
1617
|
+
self.action_type.value
|
|
1618
|
+
if hasattr(self.action_type, "value")
|
|
1619
|
+
else self.action_type
|
|
1620
|
+
)
|
|
1621
|
+
result["parameters"] = (
|
|
1622
|
+
self.parameters.value
|
|
1623
|
+
if hasattr(self.parameters, "value")
|
|
1624
|
+
else self.parameters
|
|
1625
|
+
)
|
|
1181
1626
|
if self.bot_output_visibility is not None:
|
|
1182
|
-
result["bot_output_visibility"] =
|
|
1627
|
+
result["bot_output_visibility"] = (
|
|
1628
|
+
self.bot_output_visibility.value
|
|
1629
|
+
if hasattr(self.bot_output_visibility, "value")
|
|
1630
|
+
else self.bot_output_visibility
|
|
1631
|
+
)
|
|
1183
1632
|
if self.history_content_type is not None:
|
|
1184
|
-
result["history_content_type"] =
|
|
1633
|
+
result["history_content_type"] = (
|
|
1634
|
+
self.history_content_type.value
|
|
1635
|
+
if hasattr(self.history_content_type, "value")
|
|
1636
|
+
else self.history_content_type
|
|
1637
|
+
)
|
|
1185
1638
|
if self.ui_content_type is not None:
|
|
1186
|
-
result["ui_content_type"] =
|
|
1639
|
+
result["ui_content_type"] = (
|
|
1640
|
+
self.ui_content_type.value
|
|
1641
|
+
if hasattr(self.ui_content_type, "value")
|
|
1642
|
+
else self.ui_content_type
|
|
1643
|
+
)
|
|
1187
1644
|
if self.as_root is not None:
|
|
1188
|
-
result["as_root"] =
|
|
1645
|
+
result["as_root"] = (
|
|
1646
|
+
self.as_root.value if hasattr(self.as_root, "value") else self.as_root
|
|
1647
|
+
)
|
|
1189
1648
|
if self.running_message is not None:
|
|
1190
|
-
result["running_message"] =
|
|
1649
|
+
result["running_message"] = (
|
|
1650
|
+
str(self.running_message)
|
|
1651
|
+
if hasattr(self.running_message, "__str__")
|
|
1652
|
+
else self.running_message
|
|
1653
|
+
)
|
|
1191
1654
|
if self.finished_message is not None:
|
|
1192
|
-
result["finished_message"] =
|
|
1655
|
+
result["finished_message"] = (
|
|
1656
|
+
str(self.finished_message)
|
|
1657
|
+
if hasattr(self.finished_message, "__str__")
|
|
1658
|
+
else self.finished_message
|
|
1659
|
+
)
|
|
1193
1660
|
return result
|
|
1194
1661
|
|
|
1195
1662
|
|
|
@@ -1208,15 +1675,37 @@ class APIResultHandler:
|
|
|
1208
1675
|
def to_dict(self) -> Dict[str, Any]:
|
|
1209
1676
|
"""Convert to dict format expected by backend."""
|
|
1210
1677
|
result = {}
|
|
1211
|
-
result["type"] = self.type
|
|
1212
|
-
result["if_conditions"] =
|
|
1213
|
-
|
|
1214
|
-
|
|
1678
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1679
|
+
result["if_conditions"] = (
|
|
1680
|
+
self.if_conditions.value
|
|
1681
|
+
if hasattr(self.if_conditions, "value")
|
|
1682
|
+
else self.if_conditions
|
|
1683
|
+
)
|
|
1684
|
+
result["result_handler_order"] = (
|
|
1685
|
+
self.result_handler_order.value
|
|
1686
|
+
if hasattr(self.result_handler_order, "value")
|
|
1687
|
+
else self.result_handler_order
|
|
1688
|
+
)
|
|
1689
|
+
result["output_content_type"] = (
|
|
1690
|
+
self.output_content_type.value
|
|
1691
|
+
if hasattr(self.output_content_type, "value")
|
|
1692
|
+
else self.output_content_type
|
|
1693
|
+
)
|
|
1215
1694
|
if self.history_content_type is not None:
|
|
1216
|
-
result["history_content_type"] =
|
|
1695
|
+
result["history_content_type"] = (
|
|
1696
|
+
self.history_content_type.value
|
|
1697
|
+
if hasattr(self.history_content_type, "value")
|
|
1698
|
+
else self.history_content_type
|
|
1699
|
+
)
|
|
1217
1700
|
if self.ui_content_type is not None:
|
|
1218
|
-
result["ui_content_type"] =
|
|
1219
|
-
|
|
1701
|
+
result["ui_content_type"] = (
|
|
1702
|
+
self.ui_content_type.value
|
|
1703
|
+
if hasattr(self.ui_content_type, "value")
|
|
1704
|
+
else self.ui_content_type
|
|
1705
|
+
)
|
|
1706
|
+
result["steps"] = (
|
|
1707
|
+
self.steps.value if hasattr(self.steps, "value") else self.steps
|
|
1708
|
+
)
|
|
1220
1709
|
return result
|
|
1221
1710
|
|
|
1222
1711
|
|
|
@@ -1238,19 +1727,37 @@ class APIParameterDefinition:
|
|
|
1238
1727
|
"""Convert to dict format expected by backend."""
|
|
1239
1728
|
result = {}
|
|
1240
1729
|
if self.id is not None:
|
|
1241
|
-
result["id"] = self.id
|
|
1730
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1242
1731
|
if self.bot_id is not None:
|
|
1243
|
-
result["bot_id"] =
|
|
1244
|
-
|
|
1245
|
-
|
|
1732
|
+
result["bot_id"] = (
|
|
1733
|
+
self.bot_id.value if hasattr(self.bot_id, "value") else self.bot_id
|
|
1734
|
+
)
|
|
1735
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
1736
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
1246
1737
|
if self.description is not None:
|
|
1247
|
-
result["description"] =
|
|
1248
|
-
|
|
1249
|
-
|
|
1738
|
+
result["description"] = (
|
|
1739
|
+
self.description.value
|
|
1740
|
+
if hasattr(self.description, "value")
|
|
1741
|
+
else self.description
|
|
1742
|
+
)
|
|
1743
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1744
|
+
result["is_required"] = (
|
|
1745
|
+
self.is_required.value
|
|
1746
|
+
if hasattr(self.is_required, "value")
|
|
1747
|
+
else self.is_required
|
|
1748
|
+
)
|
|
1250
1749
|
if self.created_at is not None:
|
|
1251
|
-
result["created_at"] =
|
|
1750
|
+
result["created_at"] = (
|
|
1751
|
+
self.created_at.value
|
|
1752
|
+
if hasattr(self.created_at, "value")
|
|
1753
|
+
else self.created_at
|
|
1754
|
+
)
|
|
1252
1755
|
if self.updated_at is not None:
|
|
1253
|
-
result["updated_at"] =
|
|
1756
|
+
result["updated_at"] = (
|
|
1757
|
+
self.updated_at.value
|
|
1758
|
+
if hasattr(self.updated_at, "value")
|
|
1759
|
+
else self.updated_at
|
|
1760
|
+
)
|
|
1254
1761
|
return result
|
|
1255
1762
|
|
|
1256
1763
|
|
|
@@ -1264,8 +1771,12 @@ class APIStepWithHandlers:
|
|
|
1264
1771
|
def to_dict(self) -> Dict[str, Any]:
|
|
1265
1772
|
"""Convert to dict format expected by backend."""
|
|
1266
1773
|
result = {}
|
|
1267
|
-
result["step"] = self.step
|
|
1268
|
-
result["result_handlers"] =
|
|
1774
|
+
result["step"] = self.step.value if hasattr(self.step, "value") else self.step
|
|
1775
|
+
result["result_handlers"] = (
|
|
1776
|
+
self.result_handlers.value
|
|
1777
|
+
if hasattr(self.result_handlers, "value")
|
|
1778
|
+
else self.result_handlers
|
|
1779
|
+
)
|
|
1269
1780
|
return result
|
|
1270
1781
|
|
|
1271
1782
|
|
|
@@ -1298,48 +1809,110 @@ class Dataset:
|
|
|
1298
1809
|
def to_dict(self) -> Dict[str, Any]:
|
|
1299
1810
|
"""Convert to dict format expected by backend."""
|
|
1300
1811
|
result = {}
|
|
1301
|
-
result["id"] = self.id
|
|
1302
|
-
result["type"] = self.type
|
|
1812
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1813
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1303
1814
|
if self.key is not None:
|
|
1304
|
-
result["key"] = self.key
|
|
1815
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
1305
1816
|
if self.name is not None:
|
|
1306
|
-
result["name"] =
|
|
1817
|
+
result["name"] = (
|
|
1818
|
+
self.name.value if hasattr(self.name, "value") else self.name
|
|
1819
|
+
)
|
|
1307
1820
|
if self.description is not None:
|
|
1308
|
-
result["description"] =
|
|
1821
|
+
result["description"] = (
|
|
1822
|
+
self.description.value
|
|
1823
|
+
if hasattr(self.description, "value")
|
|
1824
|
+
else self.description
|
|
1825
|
+
)
|
|
1309
1826
|
if self.analysis_summary is not None:
|
|
1310
|
-
result["analysis_summary"] =
|
|
1827
|
+
result["analysis_summary"] = (
|
|
1828
|
+
self.analysis_summary.value
|
|
1829
|
+
if hasattr(self.analysis_summary, "value")
|
|
1830
|
+
else self.analysis_summary
|
|
1831
|
+
)
|
|
1311
1832
|
if self.last_analyzed is not None:
|
|
1312
|
-
result["last_analyzed"] =
|
|
1833
|
+
result["last_analyzed"] = (
|
|
1834
|
+
self.last_analyzed.value
|
|
1835
|
+
if hasattr(self.last_analyzed, "value")
|
|
1836
|
+
else self.last_analyzed
|
|
1837
|
+
)
|
|
1313
1838
|
if self.instructions is not None:
|
|
1314
|
-
result["instructions"] =
|
|
1839
|
+
result["instructions"] = (
|
|
1840
|
+
self.instructions.value
|
|
1841
|
+
if hasattr(self.instructions, "value")
|
|
1842
|
+
else self.instructions
|
|
1843
|
+
)
|
|
1315
1844
|
if self.file is not None:
|
|
1316
|
-
result["file"] =
|
|
1845
|
+
result["file"] = (
|
|
1846
|
+
self.file.value if hasattr(self.file, "value") else self.file
|
|
1847
|
+
)
|
|
1317
1848
|
if self.file_type is not None:
|
|
1318
|
-
result["file_type"] =
|
|
1849
|
+
result["file_type"] = (
|
|
1850
|
+
self.file_type.value
|
|
1851
|
+
if hasattr(self.file_type, "value")
|
|
1852
|
+
else self.file_type
|
|
1853
|
+
)
|
|
1319
1854
|
if self.filename is not None:
|
|
1320
|
-
result["filename"] =
|
|
1855
|
+
result["filename"] = (
|
|
1856
|
+
self.filename.value
|
|
1857
|
+
if hasattr(self.filename, "value")
|
|
1858
|
+
else self.filename
|
|
1859
|
+
)
|
|
1321
1860
|
if self.url is not None:
|
|
1322
|
-
result["url"] = self.url
|
|
1861
|
+
result["url"] = self.url.value if hasattr(self.url, "value") else self.url
|
|
1323
1862
|
if self.integration_id is not None:
|
|
1324
|
-
result["integration_id"] =
|
|
1863
|
+
result["integration_id"] = (
|
|
1864
|
+
self.integration_id.value
|
|
1865
|
+
if hasattr(self.integration_id, "value")
|
|
1866
|
+
else self.integration_id
|
|
1867
|
+
)
|
|
1325
1868
|
if self.integration_config_id is not None:
|
|
1326
|
-
result["integration_config_id"] =
|
|
1869
|
+
result["integration_config_id"] = (
|
|
1870
|
+
self.integration_config_id.value
|
|
1871
|
+
if hasattr(self.integration_config_id, "value")
|
|
1872
|
+
else self.integration_config_id
|
|
1873
|
+
)
|
|
1327
1874
|
if self.integration_config is not None:
|
|
1328
|
-
result["integration_config"] =
|
|
1875
|
+
result["integration_config"] = (
|
|
1876
|
+
self.integration_config.value
|
|
1877
|
+
if hasattr(self.integration_config, "value")
|
|
1878
|
+
else self.integration_config
|
|
1879
|
+
)
|
|
1329
1880
|
if self.encrypted_integration_credentials is not None:
|
|
1330
1881
|
result["encrypted_integration_credentials"] = (
|
|
1331
|
-
self.encrypted_integration_credentials
|
|
1882
|
+
self.encrypted_integration_credentials.value
|
|
1883
|
+
if hasattr(self.encrypted_integration_credentials, "value")
|
|
1884
|
+
else self.encrypted_integration_credentials
|
|
1332
1885
|
)
|
|
1333
1886
|
if self.credential_schema is not None:
|
|
1334
|
-
result["credential_schema"] =
|
|
1887
|
+
result["credential_schema"] = (
|
|
1888
|
+
self.credential_schema.value
|
|
1889
|
+
if hasattr(self.credential_schema, "value")
|
|
1890
|
+
else self.credential_schema
|
|
1891
|
+
)
|
|
1335
1892
|
if self.codegen_details is not None:
|
|
1336
|
-
result["codegen_details"] =
|
|
1893
|
+
result["codegen_details"] = (
|
|
1894
|
+
self.codegen_details.value
|
|
1895
|
+
if hasattr(self.codegen_details, "value")
|
|
1896
|
+
else self.codegen_details
|
|
1897
|
+
)
|
|
1337
1898
|
if self.analysis_details is not None:
|
|
1338
|
-
result["analysis_details"] =
|
|
1899
|
+
result["analysis_details"] = (
|
|
1900
|
+
self.analysis_details.value
|
|
1901
|
+
if hasattr(self.analysis_details, "value")
|
|
1902
|
+
else self.analysis_details
|
|
1903
|
+
)
|
|
1339
1904
|
if self.available_scopes is not None:
|
|
1340
|
-
result["available_scopes"] =
|
|
1905
|
+
result["available_scopes"] = (
|
|
1906
|
+
self.available_scopes.value
|
|
1907
|
+
if hasattr(self.available_scopes, "value")
|
|
1908
|
+
else self.available_scopes
|
|
1909
|
+
)
|
|
1341
1910
|
if self.parameters is not None:
|
|
1342
|
-
result["parameters"] =
|
|
1911
|
+
result["parameters"] = (
|
|
1912
|
+
self.parameters.value
|
|
1913
|
+
if hasattr(self.parameters, "value")
|
|
1914
|
+
else self.parameters
|
|
1915
|
+
)
|
|
1343
1916
|
return result
|
|
1344
1917
|
|
|
1345
1918
|
|
|
@@ -1355,11 +1928,19 @@ class BotResource:
|
|
|
1355
1928
|
def to_dict(self) -> Dict[str, Any]:
|
|
1356
1929
|
"""Convert to dict format expected by backend."""
|
|
1357
1930
|
result = {}
|
|
1358
|
-
result["id"] = self.id
|
|
1931
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
1359
1932
|
if self.dataset is not None:
|
|
1360
|
-
result["dataset"] =
|
|
1361
|
-
|
|
1362
|
-
|
|
1933
|
+
result["dataset"] = (
|
|
1934
|
+
self.dataset.value if hasattr(self.dataset, "value") else self.dataset
|
|
1935
|
+
)
|
|
1936
|
+
result["created_by"] = (
|
|
1937
|
+
self.created_by.value
|
|
1938
|
+
if hasattr(self.created_by, "value")
|
|
1939
|
+
else self.created_by
|
|
1940
|
+
)
|
|
1941
|
+
result["extra"] = (
|
|
1942
|
+
self.extra.value if hasattr(self.extra, "value") else self.extra
|
|
1943
|
+
)
|
|
1363
1944
|
return result
|
|
1364
1945
|
|
|
1365
1946
|
|
|
@@ -1373,8 +1954,8 @@ class UIConfigIcon:
|
|
|
1373
1954
|
def to_dict(self) -> Dict[str, Any]:
|
|
1374
1955
|
"""Convert to dict format expected by backend."""
|
|
1375
1956
|
result = {}
|
|
1376
|
-
result["set"] = self.set
|
|
1377
|
-
result["name"] = self.name
|
|
1957
|
+
result["set"] = self.set.value if hasattr(self.set, "value") else self.set
|
|
1958
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
1378
1959
|
return result
|
|
1379
1960
|
|
|
1380
1961
|
|
|
@@ -1389,9 +1970,21 @@ class UIConfig:
|
|
|
1389
1970
|
def to_dict(self) -> Dict[str, Any]:
|
|
1390
1971
|
"""Convert to dict format expected by backend."""
|
|
1391
1972
|
result = {}
|
|
1392
|
-
result["brand_logo_icon"] =
|
|
1393
|
-
|
|
1394
|
-
|
|
1973
|
+
result["brand_logo_icon"] = (
|
|
1974
|
+
self.brand_logo_icon.value
|
|
1975
|
+
if hasattr(self.brand_logo_icon, "value")
|
|
1976
|
+
else self.brand_logo_icon
|
|
1977
|
+
)
|
|
1978
|
+
result["brand_color"] = (
|
|
1979
|
+
self.brand_color.value
|
|
1980
|
+
if hasattr(self.brand_color, "value")
|
|
1981
|
+
else self.brand_color
|
|
1982
|
+
)
|
|
1983
|
+
result["button_style"] = (
|
|
1984
|
+
self.button_style.value
|
|
1985
|
+
if hasattr(self.button_style, "value")
|
|
1986
|
+
else self.button_style
|
|
1987
|
+
)
|
|
1395
1988
|
return result
|
|
1396
1989
|
|
|
1397
1990
|
|
|
@@ -1406,9 +1999,17 @@ class ErrorHandlingConfig:
|
|
|
1406
1999
|
"""Convert to dict format expected by backend."""
|
|
1407
2000
|
result = {}
|
|
1408
2001
|
if self.ignore_errors is not None:
|
|
1409
|
-
result["ignore_errors"] =
|
|
2002
|
+
result["ignore_errors"] = (
|
|
2003
|
+
self.ignore_errors.value
|
|
2004
|
+
if hasattr(self.ignore_errors, "value")
|
|
2005
|
+
else self.ignore_errors
|
|
2006
|
+
)
|
|
1410
2007
|
if self.error_path is not None:
|
|
1411
|
-
result["error_path"] =
|
|
2008
|
+
result["error_path"] = (
|
|
2009
|
+
self.error_path.value
|
|
2010
|
+
if hasattr(self.error_path, "value")
|
|
2011
|
+
else self.error_path
|
|
2012
|
+
)
|
|
1412
2013
|
return result
|
|
1413
2014
|
|
|
1414
2015
|
|
|
@@ -1431,25 +2032,55 @@ class SegmentLevel:
|
|
|
1431
2032
|
def to_dict(self) -> Dict[str, Any]:
|
|
1432
2033
|
"""Convert to dict format expected by backend."""
|
|
1433
2034
|
result = {}
|
|
1434
|
-
result["name"] = self.name
|
|
1435
|
-
result["type"] = self.type
|
|
1436
|
-
result["selectable"] =
|
|
2035
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
2036
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
2037
|
+
result["selectable"] = (
|
|
2038
|
+
self.selectable.value
|
|
2039
|
+
if hasattr(self.selectable, "value")
|
|
2040
|
+
else self.selectable
|
|
2041
|
+
)
|
|
1437
2042
|
if self.url_template is not None:
|
|
1438
|
-
result["url_template"] =
|
|
2043
|
+
result["url_template"] = (
|
|
2044
|
+
self.url_template.value
|
|
2045
|
+
if hasattr(self.url_template, "value")
|
|
2046
|
+
else self.url_template
|
|
2047
|
+
)
|
|
1439
2048
|
if self.method is not None:
|
|
1440
|
-
result["method"] =
|
|
2049
|
+
result["method"] = (
|
|
2050
|
+
self.method.value if hasattr(self.method, "value") else self.method
|
|
2051
|
+
)
|
|
1441
2052
|
if self.body is not None:
|
|
1442
|
-
result["body"] =
|
|
2053
|
+
result["body"] = (
|
|
2054
|
+
self.body.value if hasattr(self.body, "value") else self.body
|
|
2055
|
+
)
|
|
1443
2056
|
if self.id_path is not None:
|
|
1444
|
-
result["id_path"] =
|
|
2057
|
+
result["id_path"] = (
|
|
2058
|
+
self.id_path.value if hasattr(self.id_path, "value") else self.id_path
|
|
2059
|
+
)
|
|
1445
2060
|
if self.id_regex is not None:
|
|
1446
|
-
result["id_regex"] =
|
|
2061
|
+
result["id_regex"] = (
|
|
2062
|
+
self.id_regex.value
|
|
2063
|
+
if hasattr(self.id_regex, "value")
|
|
2064
|
+
else self.id_regex
|
|
2065
|
+
)
|
|
1447
2066
|
if self.name_path is not None:
|
|
1448
|
-
result["name_path"] =
|
|
2067
|
+
result["name_path"] = (
|
|
2068
|
+
self.name_path.value
|
|
2069
|
+
if hasattr(self.name_path, "value")
|
|
2070
|
+
else self.name_path
|
|
2071
|
+
)
|
|
1449
2072
|
if self.parent_key is not None:
|
|
1450
|
-
result["parent_key"] =
|
|
2073
|
+
result["parent_key"] = (
|
|
2074
|
+
self.parent_key.value
|
|
2075
|
+
if hasattr(self.parent_key, "value")
|
|
2076
|
+
else self.parent_key
|
|
2077
|
+
)
|
|
1451
2078
|
if self.required_credentials is not None:
|
|
1452
|
-
result["required_credentials"] =
|
|
2079
|
+
result["required_credentials"] = (
|
|
2080
|
+
self.required_credentials.value
|
|
2081
|
+
if hasattr(self.required_credentials, "value")
|
|
2082
|
+
else self.required_credentials
|
|
2083
|
+
)
|
|
1453
2084
|
return result
|
|
1454
2085
|
|
|
1455
2086
|
|
|
@@ -1469,18 +2100,48 @@ class SegmentConfig:
|
|
|
1469
2100
|
def to_dict(self) -> Dict[str, Any]:
|
|
1470
2101
|
"""Convert to dict format expected by backend."""
|
|
1471
2102
|
result = {}
|
|
1472
|
-
result["selection_type"] =
|
|
2103
|
+
result["selection_type"] = (
|
|
2104
|
+
self.selection_type.value
|
|
2105
|
+
if hasattr(self.selection_type, "value")
|
|
2106
|
+
else self.selection_type
|
|
2107
|
+
)
|
|
1473
2108
|
if self.min_selections is not None:
|
|
1474
|
-
result["min_selections"] =
|
|
2109
|
+
result["min_selections"] = (
|
|
2110
|
+
self.min_selections.value
|
|
2111
|
+
if hasattr(self.min_selections, "value")
|
|
2112
|
+
else self.min_selections
|
|
2113
|
+
)
|
|
1475
2114
|
if self.max_selections is not None:
|
|
1476
|
-
result["max_selections"] =
|
|
1477
|
-
|
|
1478
|
-
|
|
2115
|
+
result["max_selections"] = (
|
|
2116
|
+
self.max_selections.value
|
|
2117
|
+
if hasattr(self.max_selections, "value")
|
|
2118
|
+
else self.max_selections
|
|
2119
|
+
)
|
|
2120
|
+
result["description"] = (
|
|
2121
|
+
self.description.value
|
|
2122
|
+
if hasattr(self.description, "value")
|
|
2123
|
+
else self.description
|
|
2124
|
+
)
|
|
2125
|
+
result["hierarchical"] = (
|
|
2126
|
+
self.hierarchical.value
|
|
2127
|
+
if hasattr(self.hierarchical, "value")
|
|
2128
|
+
else self.hierarchical
|
|
2129
|
+
)
|
|
1479
2130
|
if self.base_url is not None:
|
|
1480
|
-
result["base_url"] =
|
|
1481
|
-
|
|
2131
|
+
result["base_url"] = (
|
|
2132
|
+
self.base_url.value
|
|
2133
|
+
if hasattr(self.base_url, "value")
|
|
2134
|
+
else self.base_url
|
|
2135
|
+
)
|
|
2136
|
+
result["levels"] = (
|
|
2137
|
+
self.levels.value if hasattr(self.levels, "value") else self.levels
|
|
2138
|
+
)
|
|
1482
2139
|
if self.error_handling is not None:
|
|
1483
|
-
result["error_handling"] =
|
|
2140
|
+
result["error_handling"] = (
|
|
2141
|
+
self.error_handling.value
|
|
2142
|
+
if hasattr(self.error_handling, "value")
|
|
2143
|
+
else self.error_handling
|
|
2144
|
+
)
|
|
1484
2145
|
return result
|
|
1485
2146
|
|
|
1486
2147
|
|
|
@@ -1499,16 +2160,32 @@ class ResourceTypeConfig:
|
|
|
1499
2160
|
def to_dict(self) -> Dict[str, Any]:
|
|
1500
2161
|
"""Convert to dict format expected by backend."""
|
|
1501
2162
|
result = {}
|
|
1502
|
-
result["type"] = self.type
|
|
1503
|
-
result["url_template"] =
|
|
2163
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
2164
|
+
result["url_template"] = (
|
|
2165
|
+
self.url_template.value
|
|
2166
|
+
if hasattr(self.url_template, "value")
|
|
2167
|
+
else self.url_template
|
|
2168
|
+
)
|
|
1504
2169
|
if self.method is not None:
|
|
1505
|
-
result["method"] =
|
|
2170
|
+
result["method"] = (
|
|
2171
|
+
self.method.value if hasattr(self.method, "value") else self.method
|
|
2172
|
+
)
|
|
1506
2173
|
if self.body is not None:
|
|
1507
|
-
result["body"] =
|
|
1508
|
-
|
|
1509
|
-
|
|
2174
|
+
result["body"] = (
|
|
2175
|
+
self.body.value if hasattr(self.body, "value") else self.body
|
|
2176
|
+
)
|
|
2177
|
+
result["id_path"] = (
|
|
2178
|
+
self.id_path.value if hasattr(self.id_path, "value") else self.id_path
|
|
2179
|
+
)
|
|
2180
|
+
result["name_path"] = (
|
|
2181
|
+
self.name_path.value if hasattr(self.name_path, "value") else self.name_path
|
|
2182
|
+
)
|
|
1510
2183
|
if self.description_path is not None:
|
|
1511
|
-
result["description_path"] =
|
|
2184
|
+
result["description_path"] = (
|
|
2185
|
+
self.description_path.value
|
|
2186
|
+
if hasattr(self.description_path, "value")
|
|
2187
|
+
else self.description_path
|
|
2188
|
+
)
|
|
1512
2189
|
return result
|
|
1513
2190
|
|
|
1514
2191
|
|
|
@@ -1530,25 +2207,65 @@ class DatasetResourceDiscoveryConfig:
|
|
|
1530
2207
|
def to_dict(self) -> Dict[str, Any]:
|
|
1531
2208
|
"""Convert to dict format expected by backend."""
|
|
1532
2209
|
result = {}
|
|
1533
|
-
result["min_resources_required"] =
|
|
2210
|
+
result["min_resources_required"] = (
|
|
2211
|
+
self.min_resources_required.value
|
|
2212
|
+
if hasattr(self.min_resources_required, "value")
|
|
2213
|
+
else self.min_resources_required
|
|
2214
|
+
)
|
|
1534
2215
|
if self.table_query is not None:
|
|
1535
|
-
result["table_query"] =
|
|
2216
|
+
result["table_query"] = (
|
|
2217
|
+
self.table_query.value
|
|
2218
|
+
if hasattr(self.table_query, "value")
|
|
2219
|
+
else self.table_query
|
|
2220
|
+
)
|
|
1536
2221
|
if self.relationship_query is not None:
|
|
1537
|
-
result["relationship_query"] =
|
|
2222
|
+
result["relationship_query"] = (
|
|
2223
|
+
self.relationship_query.value
|
|
2224
|
+
if hasattr(self.relationship_query, "value")
|
|
2225
|
+
else self.relationship_query
|
|
2226
|
+
)
|
|
1538
2227
|
if self.index_query is not None:
|
|
1539
|
-
result["index_query"] =
|
|
2228
|
+
result["index_query"] = (
|
|
2229
|
+
self.index_query.value
|
|
2230
|
+
if hasattr(self.index_query, "value")
|
|
2231
|
+
else self.index_query
|
|
2232
|
+
)
|
|
1540
2233
|
if self.constraint_query is not None:
|
|
1541
|
-
result["constraint_query"] =
|
|
2234
|
+
result["constraint_query"] = (
|
|
2235
|
+
self.constraint_query.value
|
|
2236
|
+
if hasattr(self.constraint_query, "value")
|
|
2237
|
+
else self.constraint_query
|
|
2238
|
+
)
|
|
1542
2239
|
if self.statistics_query is not None:
|
|
1543
|
-
result["statistics_query"] =
|
|
2240
|
+
result["statistics_query"] = (
|
|
2241
|
+
self.statistics_query.value
|
|
2242
|
+
if hasattr(self.statistics_query, "value")
|
|
2243
|
+
else self.statistics_query
|
|
2244
|
+
)
|
|
1544
2245
|
if self.size_query is not None:
|
|
1545
|
-
result["size_query"] =
|
|
2246
|
+
result["size_query"] = (
|
|
2247
|
+
self.size_query.value
|
|
2248
|
+
if hasattr(self.size_query, "value")
|
|
2249
|
+
else self.size_query
|
|
2250
|
+
)
|
|
1546
2251
|
if self.base_url is not None:
|
|
1547
|
-
result["base_url"] =
|
|
2252
|
+
result["base_url"] = (
|
|
2253
|
+
self.base_url.value
|
|
2254
|
+
if hasattr(self.base_url, "value")
|
|
2255
|
+
else self.base_url
|
|
2256
|
+
)
|
|
1548
2257
|
if self.resource_types is not None:
|
|
1549
|
-
result["resource_types"] =
|
|
2258
|
+
result["resource_types"] = (
|
|
2259
|
+
self.resource_types.value
|
|
2260
|
+
if hasattr(self.resource_types, "value")
|
|
2261
|
+
else self.resource_types
|
|
2262
|
+
)
|
|
1550
2263
|
if self.error_handling is not None:
|
|
1551
|
-
result["error_handling"] =
|
|
2264
|
+
result["error_handling"] = (
|
|
2265
|
+
self.error_handling.value
|
|
2266
|
+
if hasattr(self.error_handling, "value")
|
|
2267
|
+
else self.error_handling
|
|
2268
|
+
)
|
|
1552
2269
|
return result
|
|
1553
2270
|
|
|
1554
2271
|
|
|
@@ -1564,13 +2281,25 @@ class ExpiryConfig:
|
|
|
1564
2281
|
def to_dict(self) -> Dict[str, Any]:
|
|
1565
2282
|
"""Convert to dict format expected by backend."""
|
|
1566
2283
|
result = {}
|
|
1567
|
-
result["type"] = self.type
|
|
2284
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1568
2285
|
if self.duration is not None:
|
|
1569
|
-
result["duration"] =
|
|
2286
|
+
result["duration"] = (
|
|
2287
|
+
self.duration.value
|
|
2288
|
+
if hasattr(self.duration, "value")
|
|
2289
|
+
else self.duration
|
|
2290
|
+
)
|
|
1570
2291
|
if self.field_name is not None:
|
|
1571
|
-
result["field_name"] =
|
|
2292
|
+
result["field_name"] = (
|
|
2293
|
+
self.field_name.value
|
|
2294
|
+
if hasattr(self.field_name, "value")
|
|
2295
|
+
else self.field_name
|
|
2296
|
+
)
|
|
1572
2297
|
if self.refresh_token_duration is not None:
|
|
1573
|
-
result["refresh_token_duration"] =
|
|
2298
|
+
result["refresh_token_duration"] = (
|
|
2299
|
+
self.refresh_token_duration.value
|
|
2300
|
+
if hasattr(self.refresh_token_duration, "value")
|
|
2301
|
+
else self.refresh_token_duration
|
|
2302
|
+
)
|
|
1574
2303
|
return result
|
|
1575
2304
|
|
|
1576
2305
|
|
|
@@ -1588,13 +2317,21 @@ class SegmentOption:
|
|
|
1588
2317
|
def to_dict(self) -> Dict[str, Any]:
|
|
1589
2318
|
"""Convert to dict format expected by backend."""
|
|
1590
2319
|
result = {}
|
|
1591
|
-
result["id"] = self.id
|
|
1592
|
-
result["name"] = self.name
|
|
1593
|
-
result["type"] = self.type
|
|
2320
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
2321
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
2322
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1594
2323
|
if self.parent_id is not None:
|
|
1595
|
-
result["parent_id"] =
|
|
1596
|
-
|
|
1597
|
-
|
|
2324
|
+
result["parent_id"] = (
|
|
2325
|
+
self.parent_id.value
|
|
2326
|
+
if hasattr(self.parent_id, "value")
|
|
2327
|
+
else self.parent_id
|
|
2328
|
+
)
|
|
2329
|
+
result["metadata"] = (
|
|
2330
|
+
self.metadata.value if hasattr(self.metadata, "value") else self.metadata
|
|
2331
|
+
)
|
|
2332
|
+
result["children"] = (
|
|
2333
|
+
self.children.value if hasattr(self.children, "value") else self.children
|
|
2334
|
+
)
|
|
1598
2335
|
return result
|
|
1599
2336
|
|
|
1600
2337
|
|
|
@@ -1635,61 +2372,161 @@ class IntegrationDefinition:
|
|
|
1635
2372
|
def to_dict(self) -> Dict[str, Any]:
|
|
1636
2373
|
"""Convert to dict format expected by backend."""
|
|
1637
2374
|
result = {}
|
|
1638
|
-
result["name"] = self.name
|
|
1639
|
-
result["key"] = self.key
|
|
1640
|
-
result["type"] = self.type
|
|
1641
|
-
result["auth_types"] =
|
|
1642
|
-
|
|
2375
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
2376
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
2377
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
2378
|
+
result["auth_types"] = (
|
|
2379
|
+
self.auth_types.value
|
|
2380
|
+
if hasattr(self.auth_types, "value")
|
|
2381
|
+
else self.auth_types
|
|
2382
|
+
)
|
|
2383
|
+
result["status"] = (
|
|
2384
|
+
self.status.value if hasattr(self.status, "value") else self.status
|
|
2385
|
+
)
|
|
1643
2386
|
if self.description is not None:
|
|
1644
|
-
result["description"] =
|
|
2387
|
+
result["description"] = (
|
|
2388
|
+
self.description.value
|
|
2389
|
+
if hasattr(self.description, "value")
|
|
2390
|
+
else self.description
|
|
2391
|
+
)
|
|
1645
2392
|
if self.provider_name is not None:
|
|
1646
|
-
result["provider_name"] =
|
|
2393
|
+
result["provider_name"] = (
|
|
2394
|
+
self.provider_name.value
|
|
2395
|
+
if hasattr(self.provider_name, "value")
|
|
2396
|
+
else self.provider_name
|
|
2397
|
+
)
|
|
1647
2398
|
if self.documentation_url is not None:
|
|
1648
|
-
result["documentation_url"] =
|
|
2399
|
+
result["documentation_url"] = (
|
|
2400
|
+
self.documentation_url.value
|
|
2401
|
+
if hasattr(self.documentation_url, "value")
|
|
2402
|
+
else self.documentation_url
|
|
2403
|
+
)
|
|
1649
2404
|
if self.openapi_documentation_url is not None:
|
|
1650
|
-
result["openapi_documentation_url"] =
|
|
2405
|
+
result["openapi_documentation_url"] = (
|
|
2406
|
+
self.openapi_documentation_url.value
|
|
2407
|
+
if hasattr(self.openapi_documentation_url, "value")
|
|
2408
|
+
else self.openapi_documentation_url
|
|
2409
|
+
)
|
|
1651
2410
|
if self.llms_txt_url is not None:
|
|
1652
|
-
result["llms_txt_url"] =
|
|
2411
|
+
result["llms_txt_url"] = (
|
|
2412
|
+
self.llms_txt_url.value
|
|
2413
|
+
if hasattr(self.llms_txt_url, "value")
|
|
2414
|
+
else self.llms_txt_url
|
|
2415
|
+
)
|
|
1653
2416
|
if self.healthcheck_url is not None:
|
|
1654
|
-
result["healthcheck_url"] =
|
|
2417
|
+
result["healthcheck_url"] = (
|
|
2418
|
+
self.healthcheck_url.value
|
|
2419
|
+
if hasattr(self.healthcheck_url, "value")
|
|
2420
|
+
else self.healthcheck_url
|
|
2421
|
+
)
|
|
1655
2422
|
if self.auth_url is not None:
|
|
1656
|
-
result["auth_url"] =
|
|
2423
|
+
result["auth_url"] = (
|
|
2424
|
+
self.auth_url.value
|
|
2425
|
+
if hasattr(self.auth_url, "value")
|
|
2426
|
+
else self.auth_url
|
|
2427
|
+
)
|
|
1657
2428
|
if self.token_url is not None:
|
|
1658
|
-
result["token_url"] =
|
|
2429
|
+
result["token_url"] = (
|
|
2430
|
+
self.token_url.value
|
|
2431
|
+
if hasattr(self.token_url, "value")
|
|
2432
|
+
else self.token_url
|
|
2433
|
+
)
|
|
1659
2434
|
if self.client_id is not None:
|
|
1660
|
-
result["client_id"] =
|
|
2435
|
+
result["client_id"] = (
|
|
2436
|
+
self.client_id.value
|
|
2437
|
+
if hasattr(self.client_id, "value")
|
|
2438
|
+
else self.client_id
|
|
2439
|
+
)
|
|
1661
2440
|
if self.client_secret is not None:
|
|
1662
|
-
result["client_secret"] =
|
|
2441
|
+
result["client_secret"] = (
|
|
2442
|
+
self.client_secret.value
|
|
2443
|
+
if hasattr(self.client_secret, "value")
|
|
2444
|
+
else self.client_secret
|
|
2445
|
+
)
|
|
1663
2446
|
if self.available_scopes is not None:
|
|
1664
|
-
result["available_scopes"] =
|
|
2447
|
+
result["available_scopes"] = (
|
|
2448
|
+
self.available_scopes.value
|
|
2449
|
+
if hasattr(self.available_scopes, "value")
|
|
2450
|
+
else self.available_scopes
|
|
2451
|
+
)
|
|
1665
2452
|
if self.optional_scopes is not None:
|
|
1666
|
-
result["optional_scopes"] =
|
|
2453
|
+
result["optional_scopes"] = (
|
|
2454
|
+
self.optional_scopes.value
|
|
2455
|
+
if hasattr(self.optional_scopes, "value")
|
|
2456
|
+
else self.optional_scopes
|
|
2457
|
+
)
|
|
1667
2458
|
if self.scope_separator is not None:
|
|
1668
|
-
result["scope_separator"] =
|
|
2459
|
+
result["scope_separator"] = (
|
|
2460
|
+
self.scope_separator.value
|
|
2461
|
+
if hasattr(self.scope_separator, "value")
|
|
2462
|
+
else self.scope_separator
|
|
2463
|
+
)
|
|
1669
2464
|
if self.api_version is not None:
|
|
1670
|
-
result["api_version"] =
|
|
2465
|
+
result["api_version"] = (
|
|
2466
|
+
self.api_version.value
|
|
2467
|
+
if hasattr(self.api_version, "value")
|
|
2468
|
+
else self.api_version
|
|
2469
|
+
)
|
|
1671
2470
|
if self.api_version_description is not None:
|
|
1672
|
-
result["api_version_description"] =
|
|
2471
|
+
result["api_version_description"] = (
|
|
2472
|
+
self.api_version_description.value
|
|
2473
|
+
if hasattr(self.api_version_description, "value")
|
|
2474
|
+
else self.api_version_description
|
|
2475
|
+
)
|
|
1673
2476
|
if self.credential_schema is not None:
|
|
1674
|
-
result["credential_schema"] =
|
|
2477
|
+
result["credential_schema"] = (
|
|
2478
|
+
self.credential_schema.value
|
|
2479
|
+
if hasattr(self.credential_schema, "value")
|
|
2480
|
+
else self.credential_schema
|
|
2481
|
+
)
|
|
1675
2482
|
if self.ui_config is not None:
|
|
1676
|
-
result["ui_config"] =
|
|
2483
|
+
result["ui_config"] = (
|
|
2484
|
+
self.ui_config.value
|
|
2485
|
+
if hasattr(self.ui_config, "value")
|
|
2486
|
+
else self.ui_config
|
|
2487
|
+
)
|
|
1677
2488
|
if self.codegen_details is not None:
|
|
1678
|
-
result["codegen_details"] =
|
|
2489
|
+
result["codegen_details"] = (
|
|
2490
|
+
self.codegen_details.value
|
|
2491
|
+
if hasattr(self.codegen_details, "value")
|
|
2492
|
+
else self.codegen_details
|
|
2493
|
+
)
|
|
1679
2494
|
if self.analysis_details is not None:
|
|
1680
|
-
result["analysis_details"] =
|
|
2495
|
+
result["analysis_details"] = (
|
|
2496
|
+
self.analysis_details.value
|
|
2497
|
+
if hasattr(self.analysis_details, "value")
|
|
2498
|
+
else self.analysis_details
|
|
2499
|
+
)
|
|
1681
2500
|
if self.segment_config is not None:
|
|
1682
|
-
result["segment_config"] =
|
|
2501
|
+
result["segment_config"] = (
|
|
2502
|
+
self.segment_config.value
|
|
2503
|
+
if hasattr(self.segment_config, "value")
|
|
2504
|
+
else self.segment_config
|
|
2505
|
+
)
|
|
1683
2506
|
if self.dataset_resource_discovery_config is not None:
|
|
1684
2507
|
result["dataset_resource_discovery_config"] = (
|
|
1685
|
-
self.dataset_resource_discovery_config
|
|
2508
|
+
self.dataset_resource_discovery_config.value
|
|
2509
|
+
if hasattr(self.dataset_resource_discovery_config, "value")
|
|
2510
|
+
else self.dataset_resource_discovery_config
|
|
1686
2511
|
)
|
|
1687
2512
|
if self.expiry_config is not None:
|
|
1688
|
-
result["expiry_config"] =
|
|
2513
|
+
result["expiry_config"] = (
|
|
2514
|
+
self.expiry_config.value
|
|
2515
|
+
if hasattr(self.expiry_config, "value")
|
|
2516
|
+
else self.expiry_config
|
|
2517
|
+
)
|
|
1689
2518
|
if self.provider_credentials is not None:
|
|
1690
|
-
result["provider_credentials"] =
|
|
2519
|
+
result["provider_credentials"] = (
|
|
2520
|
+
self.provider_credentials.value
|
|
2521
|
+
if hasattr(self.provider_credentials, "value")
|
|
2522
|
+
else self.provider_credentials
|
|
2523
|
+
)
|
|
1691
2524
|
if self.default_resource_attach_type is not None:
|
|
1692
|
-
result["default_resource_attach_type"] =
|
|
2525
|
+
result["default_resource_attach_type"] = (
|
|
2526
|
+
self.default_resource_attach_type.value
|
|
2527
|
+
if hasattr(self.default_resource_attach_type, "value")
|
|
2528
|
+
else self.default_resource_attach_type
|
|
2529
|
+
)
|
|
1693
2530
|
return result
|
|
1694
2531
|
|
|
1695
2532
|
|
|
@@ -1704,10 +2541,20 @@ class IntegrationConfig:
|
|
|
1704
2541
|
def to_dict(self) -> Dict[str, Any]:
|
|
1705
2542
|
"""Convert to dict format expected by backend."""
|
|
1706
2543
|
result = {}
|
|
1707
|
-
result["definition"] =
|
|
1708
|
-
|
|
2544
|
+
result["definition"] = (
|
|
2545
|
+
self.definition.value
|
|
2546
|
+
if hasattr(self.definition, "value")
|
|
2547
|
+
else self.definition
|
|
2548
|
+
)
|
|
2549
|
+
result["source"] = (
|
|
2550
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
2551
|
+
)
|
|
1709
2552
|
if self.file_path is not None:
|
|
1710
|
-
result["file_path"] =
|
|
2553
|
+
result["file_path"] = (
|
|
2554
|
+
self.file_path.value
|
|
2555
|
+
if hasattr(self.file_path, "value")
|
|
2556
|
+
else self.file_path
|
|
2557
|
+
)
|
|
1711
2558
|
return result
|
|
1712
2559
|
|
|
1713
2560
|
|
|
@@ -1722,10 +2569,18 @@ class PythonIntegrationInstance:
|
|
|
1722
2569
|
def to_dict(self) -> Dict[str, Any]:
|
|
1723
2570
|
"""Convert to dict format expected by backend."""
|
|
1724
2571
|
result = {}
|
|
1725
|
-
result["config"] =
|
|
1726
|
-
|
|
2572
|
+
result["config"] = (
|
|
2573
|
+
self.config.value if hasattr(self.config, "value") else self.config
|
|
2574
|
+
)
|
|
2575
|
+
result["credentials"] = (
|
|
2576
|
+
self.credentials.value
|
|
2577
|
+
if hasattr(self.credentials, "value")
|
|
2578
|
+
else self.credentials
|
|
2579
|
+
)
|
|
1727
2580
|
if self.methods is not None:
|
|
1728
|
-
result["methods"] =
|
|
2581
|
+
result["methods"] = (
|
|
2582
|
+
self.methods.value if hasattr(self.methods, "value") else self.methods
|
|
2583
|
+
)
|
|
1729
2584
|
return result
|
|
1730
2585
|
|
|
1731
2586
|
|
|
@@ -1741,11 +2596,23 @@ class IntegrationDiscovery:
|
|
|
1741
2596
|
def to_dict(self) -> Dict[str, Any]:
|
|
1742
2597
|
"""Convert to dict format expected by backend."""
|
|
1743
2598
|
result = {}
|
|
1744
|
-
result["config"] =
|
|
2599
|
+
result["config"] = (
|
|
2600
|
+
self.config.value if hasattr(self.config, "value") else self.config
|
|
2601
|
+
)
|
|
1745
2602
|
if self.instance is not None:
|
|
1746
|
-
result["instance"] =
|
|
1747
|
-
|
|
1748
|
-
|
|
2603
|
+
result["instance"] = (
|
|
2604
|
+
self.instance.value
|
|
2605
|
+
if hasattr(self.instance, "value")
|
|
2606
|
+
else self.instance
|
|
2607
|
+
)
|
|
2608
|
+
result["file_path"] = (
|
|
2609
|
+
self.file_path.value if hasattr(self.file_path, "value") else self.file_path
|
|
2610
|
+
)
|
|
2611
|
+
result["source_code"] = (
|
|
2612
|
+
self.source_code.value
|
|
2613
|
+
if hasattr(self.source_code, "value")
|
|
2614
|
+
else self.source_code
|
|
2615
|
+
)
|
|
1749
2616
|
return result
|
|
1750
2617
|
|
|
1751
2618
|
|
|
@@ -1759,8 +2626,14 @@ class UpsertIntegrationRequest:
|
|
|
1759
2626
|
def to_dict(self) -> Dict[str, Any]:
|
|
1760
2627
|
"""Convert to dict format expected by backend."""
|
|
1761
2628
|
result = {}
|
|
1762
|
-
result["integration"] =
|
|
1763
|
-
|
|
2629
|
+
result["integration"] = (
|
|
2630
|
+
self.integration.value
|
|
2631
|
+
if hasattr(self.integration, "value")
|
|
2632
|
+
else self.integration
|
|
2633
|
+
)
|
|
2634
|
+
result["source"] = (
|
|
2635
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
2636
|
+
)
|
|
1764
2637
|
return result
|
|
1765
2638
|
|
|
1766
2639
|
|
|
@@ -1774,8 +2647,14 @@ class UpsertIntegrationResponse:
|
|
|
1774
2647
|
def to_dict(self) -> Dict[str, Any]:
|
|
1775
2648
|
"""Convert to dict format expected by backend."""
|
|
1776
2649
|
result = {}
|
|
1777
|
-
result["integration_id"] =
|
|
1778
|
-
|
|
2650
|
+
result["integration_id"] = (
|
|
2651
|
+
self.integration_id.value
|
|
2652
|
+
if hasattr(self.integration_id, "value")
|
|
2653
|
+
else self.integration_id
|
|
2654
|
+
)
|
|
2655
|
+
result["status"] = (
|
|
2656
|
+
self.status.value if hasattr(self.status, "value") else self.status
|
|
2657
|
+
)
|
|
1779
2658
|
return result
|
|
1780
2659
|
|
|
1781
2660
|
|
|
@@ -1788,7 +2667,11 @@ class ListIntegrationsResponse:
|
|
|
1788
2667
|
def to_dict(self) -> Dict[str, Any]:
|
|
1789
2668
|
"""Convert to dict format expected by backend."""
|
|
1790
2669
|
result = {}
|
|
1791
|
-
result["integrations"] =
|
|
2670
|
+
result["integrations"] = (
|
|
2671
|
+
self.integrations.value
|
|
2672
|
+
if hasattr(self.integrations, "value")
|
|
2673
|
+
else self.integrations
|
|
2674
|
+
)
|
|
1792
2675
|
return result
|
|
1793
2676
|
|
|
1794
2677
|
|
|
@@ -1801,7 +2684,11 @@ class ExportIntegrationsResponse:
|
|
|
1801
2684
|
def to_dict(self) -> Dict[str, Any]:
|
|
1802
2685
|
"""Convert to dict format expected by backend."""
|
|
1803
2686
|
result = {}
|
|
1804
|
-
result["integrations"] =
|
|
2687
|
+
result["integrations"] = (
|
|
2688
|
+
self.integrations.value
|
|
2689
|
+
if hasattr(self.integrations, "value")
|
|
2690
|
+
else self.integrations
|
|
2691
|
+
)
|
|
1805
2692
|
return result
|
|
1806
2693
|
|
|
1807
2694
|
|
|
@@ -1834,35 +2721,99 @@ class Memory:
|
|
|
1834
2721
|
def to_dict(self) -> Dict[str, Any]:
|
|
1835
2722
|
"""Convert to dict format expected by backend."""
|
|
1836
2723
|
result = {}
|
|
1837
|
-
result["id"] = self.id
|
|
1838
|
-
result["content"] =
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
result["
|
|
2724
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
2725
|
+
result["content"] = (
|
|
2726
|
+
self.content.value if hasattr(self.content, "value") else self.content
|
|
2727
|
+
)
|
|
2728
|
+
result["description"] = (
|
|
2729
|
+
self.description.value
|
|
2730
|
+
if hasattr(self.description, "value")
|
|
2731
|
+
else self.description
|
|
2732
|
+
)
|
|
2733
|
+
result["tags"] = self.tags.value if hasattr(self.tags, "value") else self.tags
|
|
2734
|
+
result["state"] = (
|
|
2735
|
+
self.state.value if hasattr(self.state, "value") else self.state
|
|
2736
|
+
)
|
|
1842
2737
|
if self.estimated_stale_at is not None:
|
|
1843
|
-
result["estimated_stale_at"] =
|
|
2738
|
+
result["estimated_stale_at"] = (
|
|
2739
|
+
self.estimated_stale_at.value
|
|
2740
|
+
if hasattr(self.estimated_stale_at, "value")
|
|
2741
|
+
else self.estimated_stale_at
|
|
2742
|
+
)
|
|
1844
2743
|
if self.stale_when_text is not None:
|
|
1845
|
-
result["stale_when_text"] =
|
|
1846
|
-
|
|
1847
|
-
|
|
2744
|
+
result["stale_when_text"] = (
|
|
2745
|
+
self.stale_when_text.value
|
|
2746
|
+
if hasattr(self.stale_when_text, "value")
|
|
2747
|
+
else self.stale_when_text
|
|
2748
|
+
)
|
|
2749
|
+
result["created_by_entity_type"] = (
|
|
2750
|
+
self.created_by_entity_type.value
|
|
2751
|
+
if hasattr(self.created_by_entity_type, "value")
|
|
2752
|
+
else self.created_by_entity_type
|
|
2753
|
+
)
|
|
2754
|
+
result["created_by_id"] = (
|
|
2755
|
+
self.created_by_id.value
|
|
2756
|
+
if hasattr(self.created_by_id, "value")
|
|
2757
|
+
else self.created_by_id
|
|
2758
|
+
)
|
|
1848
2759
|
if self.created_from is not None:
|
|
1849
|
-
result["created_from"] =
|
|
2760
|
+
result["created_from"] = (
|
|
2761
|
+
self.created_from.value
|
|
2762
|
+
if hasattr(self.created_from, "value")
|
|
2763
|
+
else self.created_from
|
|
2764
|
+
)
|
|
1850
2765
|
if self.organization_id is not None:
|
|
1851
|
-
result["organization_id"] =
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
2766
|
+
result["organization_id"] = (
|
|
2767
|
+
self.organization_id.value
|
|
2768
|
+
if hasattr(self.organization_id, "value")
|
|
2769
|
+
else self.organization_id
|
|
2770
|
+
)
|
|
2771
|
+
result["extra"] = (
|
|
2772
|
+
self.extra.value if hasattr(self.extra, "value") else self.extra
|
|
2773
|
+
)
|
|
2774
|
+
result["created_at"] = (
|
|
2775
|
+
self.created_at.value
|
|
2776
|
+
if hasattr(self.created_at, "value")
|
|
2777
|
+
else self.created_at
|
|
2778
|
+
)
|
|
2779
|
+
result["updated_at"] = (
|
|
2780
|
+
self.updated_at.value
|
|
2781
|
+
if hasattr(self.updated_at, "value")
|
|
2782
|
+
else self.updated_at
|
|
2783
|
+
)
|
|
2784
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1856
2785
|
if self.dataset_id is not None:
|
|
1857
|
-
result["dataset_id"] =
|
|
2786
|
+
result["dataset_id"] = (
|
|
2787
|
+
self.dataset_id.value
|
|
2788
|
+
if hasattr(self.dataset_id, "value")
|
|
2789
|
+
else self.dataset_id
|
|
2790
|
+
)
|
|
1858
2791
|
if self.integration_config_id is not None:
|
|
1859
|
-
result["integration_config_id"] =
|
|
2792
|
+
result["integration_config_id"] = (
|
|
2793
|
+
self.integration_config_id.value
|
|
2794
|
+
if hasattr(self.integration_config_id, "value")
|
|
2795
|
+
else self.integration_config_id
|
|
2796
|
+
)
|
|
1860
2797
|
if self.user_id is not None:
|
|
1861
|
-
result["user_id"] =
|
|
2798
|
+
result["user_id"] = (
|
|
2799
|
+
self.user_id.value if hasattr(self.user_id, "value") else self.user_id
|
|
2800
|
+
)
|
|
1862
2801
|
if self.thread_id is not None:
|
|
1863
|
-
result["thread_id"] =
|
|
1864
|
-
|
|
1865
|
-
|
|
2802
|
+
result["thread_id"] = (
|
|
2803
|
+
self.thread_id.value
|
|
2804
|
+
if hasattr(self.thread_id, "value")
|
|
2805
|
+
else self.thread_id
|
|
2806
|
+
)
|
|
2807
|
+
result["current_version"] = (
|
|
2808
|
+
self.current_version.value
|
|
2809
|
+
if hasattr(self.current_version, "value")
|
|
2810
|
+
else self.current_version
|
|
2811
|
+
)
|
|
2812
|
+
result["approval_status"] = (
|
|
2813
|
+
self.approval_status.value
|
|
2814
|
+
if hasattr(self.approval_status, "value")
|
|
2815
|
+
else self.approval_status
|
|
2816
|
+
)
|
|
1866
2817
|
return result
|
|
1867
2818
|
|
|
1868
2819
|
|
|
@@ -1878,10 +2829,20 @@ class ResourceAnalysis:
|
|
|
1878
2829
|
"""Convert to dict format expected by backend."""
|
|
1879
2830
|
result = {}
|
|
1880
2831
|
if self.summary is not None:
|
|
1881
|
-
result["summary"] =
|
|
2832
|
+
result["summary"] = (
|
|
2833
|
+
self.summary.value if hasattr(self.summary, "value") else self.summary
|
|
2834
|
+
)
|
|
1882
2835
|
if self.last_analyzed is not None:
|
|
1883
|
-
result["last_analyzed"] =
|
|
1884
|
-
|
|
2836
|
+
result["last_analyzed"] = (
|
|
2837
|
+
self.last_analyzed.value
|
|
2838
|
+
if hasattr(self.last_analyzed, "value")
|
|
2839
|
+
else self.last_analyzed
|
|
2840
|
+
)
|
|
2841
|
+
result["entity_key"] = (
|
|
2842
|
+
self.entity_key.value
|
|
2843
|
+
if hasattr(self.entity_key, "value")
|
|
2844
|
+
else self.entity_key
|
|
2845
|
+
)
|
|
1885
2846
|
return result
|
|
1886
2847
|
|
|
1887
2848
|
|
|
@@ -1909,24 +2870,62 @@ class Resource:
|
|
|
1909
2870
|
def to_dict(self) -> Dict[str, Any]:
|
|
1910
2871
|
"""Convert to dict format expected by backend."""
|
|
1911
2872
|
result = {}
|
|
1912
|
-
result["id"] = self.id
|
|
1913
|
-
result["key"] = self.key
|
|
1914
|
-
result["name"] = self.name
|
|
1915
|
-
result["type"] = self.type
|
|
2873
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
2874
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
2875
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
2876
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
1916
2877
|
if self.description is not None:
|
|
1917
|
-
result["description"] =
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
result["
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
result["
|
|
2878
|
+
result["description"] = (
|
|
2879
|
+
self.description.value
|
|
2880
|
+
if hasattr(self.description, "value")
|
|
2881
|
+
else self.description
|
|
2882
|
+
)
|
|
2883
|
+
result["use_cases"] = (
|
|
2884
|
+
self.use_cases.value if hasattr(self.use_cases, "value") else self.use_cases
|
|
2885
|
+
)
|
|
2886
|
+
result["tags"] = self.tags.value if hasattr(self.tags, "value") else self.tags
|
|
2887
|
+
result["created_at"] = (
|
|
2888
|
+
self.created_at.value
|
|
2889
|
+
if hasattr(self.created_at, "value")
|
|
2890
|
+
else self.created_at
|
|
2891
|
+
)
|
|
2892
|
+
result["updated_at"] = (
|
|
2893
|
+
self.updated_at.value
|
|
2894
|
+
if hasattr(self.updated_at, "value")
|
|
2895
|
+
else self.updated_at
|
|
2896
|
+
)
|
|
2897
|
+
result["integration_config_id"] = (
|
|
2898
|
+
self.integration_config_id.value
|
|
2899
|
+
if hasattr(self.integration_config_id, "value")
|
|
2900
|
+
else self.integration_config_id
|
|
2901
|
+
)
|
|
2902
|
+
result["state"] = (
|
|
2903
|
+
self.state.value if hasattr(self.state, "value") else self.state
|
|
2904
|
+
)
|
|
2905
|
+
result["attach_type"] = (
|
|
2906
|
+
self.attach_type.value
|
|
2907
|
+
if hasattr(self.attach_type, "value")
|
|
2908
|
+
else self.attach_type
|
|
2909
|
+
)
|
|
2910
|
+
result["dataset_id"] = (
|
|
2911
|
+
self.dataset_id.value
|
|
2912
|
+
if hasattr(self.dataset_id, "value")
|
|
2913
|
+
else self.dataset_id
|
|
2914
|
+
)
|
|
1926
2915
|
if self.instructions is not None:
|
|
1927
|
-
result["instructions"] =
|
|
1928
|
-
|
|
1929
|
-
|
|
2916
|
+
result["instructions"] = (
|
|
2917
|
+
self.instructions.value
|
|
2918
|
+
if hasattr(self.instructions, "value")
|
|
2919
|
+
else self.instructions
|
|
2920
|
+
)
|
|
2921
|
+
result["analyses"] = (
|
|
2922
|
+
self.analyses.value if hasattr(self.analyses, "value") else self.analyses
|
|
2923
|
+
)
|
|
2924
|
+
result["related_resources"] = (
|
|
2925
|
+
self.related_resources.value
|
|
2926
|
+
if hasattr(self.related_resources, "value")
|
|
2927
|
+
else self.related_resources
|
|
2928
|
+
)
|
|
1930
2929
|
return result
|
|
1931
2930
|
|
|
1932
2931
|
|
|
@@ -1941,8 +2940,8 @@ class UIConfigIcon:
|
|
|
1941
2940
|
def to_dict(self) -> Dict[str, Any]:
|
|
1942
2941
|
"""Convert to dict format expected by backend."""
|
|
1943
2942
|
result = {}
|
|
1944
|
-
result["set"] = self.set
|
|
1945
|
-
result["name"] = self.name
|
|
2943
|
+
result["set"] = self.set.value if hasattr(self.set, "value") else self.set
|
|
2944
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
1946
2945
|
return result
|
|
1947
2946
|
|
|
1948
2947
|
|
|
@@ -1957,9 +2956,21 @@ class UIConfig:
|
|
|
1957
2956
|
def to_dict(self) -> Dict[str, Any]:
|
|
1958
2957
|
"""Convert to dict format expected by backend."""
|
|
1959
2958
|
result = {}
|
|
1960
|
-
result["brand_logo_icon"] =
|
|
1961
|
-
|
|
1962
|
-
|
|
2959
|
+
result["brand_logo_icon"] = (
|
|
2960
|
+
self.brand_logo_icon.value
|
|
2961
|
+
if hasattr(self.brand_logo_icon, "value")
|
|
2962
|
+
else self.brand_logo_icon
|
|
2963
|
+
)
|
|
2964
|
+
result["brand_color"] = (
|
|
2965
|
+
self.brand_color.value
|
|
2966
|
+
if hasattr(self.brand_color, "value")
|
|
2967
|
+
else self.brand_color
|
|
2968
|
+
)
|
|
2969
|
+
result["button_style"] = (
|
|
2970
|
+
self.button_style.value
|
|
2971
|
+
if hasattr(self.button_style, "value")
|
|
2972
|
+
else self.button_style
|
|
2973
|
+
)
|
|
1963
2974
|
return result
|
|
1964
2975
|
|
|
1965
2976
|
|
|
@@ -1974,9 +2985,17 @@ class ErrorHandlingConfig:
|
|
|
1974
2985
|
"""Convert to dict format expected by backend."""
|
|
1975
2986
|
result = {}
|
|
1976
2987
|
if self.ignore_errors is not None:
|
|
1977
|
-
result["ignore_errors"] =
|
|
2988
|
+
result["ignore_errors"] = (
|
|
2989
|
+
self.ignore_errors.value
|
|
2990
|
+
if hasattr(self.ignore_errors, "value")
|
|
2991
|
+
else self.ignore_errors
|
|
2992
|
+
)
|
|
1978
2993
|
if self.error_path is not None:
|
|
1979
|
-
result["error_path"] =
|
|
2994
|
+
result["error_path"] = (
|
|
2995
|
+
self.error_path.value
|
|
2996
|
+
if hasattr(self.error_path, "value")
|
|
2997
|
+
else self.error_path
|
|
2998
|
+
)
|
|
1980
2999
|
return result
|
|
1981
3000
|
|
|
1982
3001
|
|
|
@@ -1999,25 +3018,55 @@ class SegmentLevel:
|
|
|
1999
3018
|
def to_dict(self) -> Dict[str, Any]:
|
|
2000
3019
|
"""Convert to dict format expected by backend."""
|
|
2001
3020
|
result = {}
|
|
2002
|
-
result["name"] = self.name
|
|
2003
|
-
result["type"] = self.type
|
|
2004
|
-
result["selectable"] =
|
|
3021
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
3022
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
3023
|
+
result["selectable"] = (
|
|
3024
|
+
self.selectable.value
|
|
3025
|
+
if hasattr(self.selectable, "value")
|
|
3026
|
+
else self.selectable
|
|
3027
|
+
)
|
|
2005
3028
|
if self.url_template is not None:
|
|
2006
|
-
result["url_template"] =
|
|
3029
|
+
result["url_template"] = (
|
|
3030
|
+
self.url_template.value
|
|
3031
|
+
if hasattr(self.url_template, "value")
|
|
3032
|
+
else self.url_template
|
|
3033
|
+
)
|
|
2007
3034
|
if self.method is not None:
|
|
2008
|
-
result["method"] =
|
|
3035
|
+
result["method"] = (
|
|
3036
|
+
self.method.value if hasattr(self.method, "value") else self.method
|
|
3037
|
+
)
|
|
2009
3038
|
if self.body is not None:
|
|
2010
|
-
result["body"] =
|
|
3039
|
+
result["body"] = (
|
|
3040
|
+
self.body.value if hasattr(self.body, "value") else self.body
|
|
3041
|
+
)
|
|
2011
3042
|
if self.id_path is not None:
|
|
2012
|
-
result["id_path"] =
|
|
3043
|
+
result["id_path"] = (
|
|
3044
|
+
self.id_path.value if hasattr(self.id_path, "value") else self.id_path
|
|
3045
|
+
)
|
|
2013
3046
|
if self.id_regex is not None:
|
|
2014
|
-
result["id_regex"] =
|
|
3047
|
+
result["id_regex"] = (
|
|
3048
|
+
self.id_regex.value
|
|
3049
|
+
if hasattr(self.id_regex, "value")
|
|
3050
|
+
else self.id_regex
|
|
3051
|
+
)
|
|
2015
3052
|
if self.name_path is not None:
|
|
2016
|
-
result["name_path"] =
|
|
3053
|
+
result["name_path"] = (
|
|
3054
|
+
self.name_path.value
|
|
3055
|
+
if hasattr(self.name_path, "value")
|
|
3056
|
+
else self.name_path
|
|
3057
|
+
)
|
|
2017
3058
|
if self.parent_key is not None:
|
|
2018
|
-
result["parent_key"] =
|
|
3059
|
+
result["parent_key"] = (
|
|
3060
|
+
self.parent_key.value
|
|
3061
|
+
if hasattr(self.parent_key, "value")
|
|
3062
|
+
else self.parent_key
|
|
3063
|
+
)
|
|
2019
3064
|
if self.required_credentials is not None:
|
|
2020
|
-
result["required_credentials"] =
|
|
3065
|
+
result["required_credentials"] = (
|
|
3066
|
+
self.required_credentials.value
|
|
3067
|
+
if hasattr(self.required_credentials, "value")
|
|
3068
|
+
else self.required_credentials
|
|
3069
|
+
)
|
|
2021
3070
|
return result
|
|
2022
3071
|
|
|
2023
3072
|
|
|
@@ -2037,18 +3086,48 @@ class SegmentConfig:
|
|
|
2037
3086
|
def to_dict(self) -> Dict[str, Any]:
|
|
2038
3087
|
"""Convert to dict format expected by backend."""
|
|
2039
3088
|
result = {}
|
|
2040
|
-
result["selection_type"] =
|
|
3089
|
+
result["selection_type"] = (
|
|
3090
|
+
self.selection_type.value
|
|
3091
|
+
if hasattr(self.selection_type, "value")
|
|
3092
|
+
else self.selection_type
|
|
3093
|
+
)
|
|
2041
3094
|
if self.min_selections is not None:
|
|
2042
|
-
result["min_selections"] =
|
|
3095
|
+
result["min_selections"] = (
|
|
3096
|
+
self.min_selections.value
|
|
3097
|
+
if hasattr(self.min_selections, "value")
|
|
3098
|
+
else self.min_selections
|
|
3099
|
+
)
|
|
2043
3100
|
if self.max_selections is not None:
|
|
2044
|
-
result["max_selections"] =
|
|
2045
|
-
|
|
2046
|
-
|
|
3101
|
+
result["max_selections"] = (
|
|
3102
|
+
self.max_selections.value
|
|
3103
|
+
if hasattr(self.max_selections, "value")
|
|
3104
|
+
else self.max_selections
|
|
3105
|
+
)
|
|
3106
|
+
result["description"] = (
|
|
3107
|
+
self.description.value
|
|
3108
|
+
if hasattr(self.description, "value")
|
|
3109
|
+
else self.description
|
|
3110
|
+
)
|
|
3111
|
+
result["hierarchical"] = (
|
|
3112
|
+
self.hierarchical.value
|
|
3113
|
+
if hasattr(self.hierarchical, "value")
|
|
3114
|
+
else self.hierarchical
|
|
3115
|
+
)
|
|
2047
3116
|
if self.base_url is not None:
|
|
2048
|
-
result["base_url"] =
|
|
2049
|
-
|
|
3117
|
+
result["base_url"] = (
|
|
3118
|
+
self.base_url.value
|
|
3119
|
+
if hasattr(self.base_url, "value")
|
|
3120
|
+
else self.base_url
|
|
3121
|
+
)
|
|
3122
|
+
result["levels"] = (
|
|
3123
|
+
self.levels.value if hasattr(self.levels, "value") else self.levels
|
|
3124
|
+
)
|
|
2050
3125
|
if self.error_handling is not None:
|
|
2051
|
-
result["error_handling"] =
|
|
3126
|
+
result["error_handling"] = (
|
|
3127
|
+
self.error_handling.value
|
|
3128
|
+
if hasattr(self.error_handling, "value")
|
|
3129
|
+
else self.error_handling
|
|
3130
|
+
)
|
|
2052
3131
|
return result
|
|
2053
3132
|
|
|
2054
3133
|
|
|
@@ -2067,16 +3146,32 @@ class ResourceTypeConfig:
|
|
|
2067
3146
|
def to_dict(self) -> Dict[str, Any]:
|
|
2068
3147
|
"""Convert to dict format expected by backend."""
|
|
2069
3148
|
result = {}
|
|
2070
|
-
result["type"] = self.type
|
|
2071
|
-
result["url_template"] =
|
|
3149
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
3150
|
+
result["url_template"] = (
|
|
3151
|
+
self.url_template.value
|
|
3152
|
+
if hasattr(self.url_template, "value")
|
|
3153
|
+
else self.url_template
|
|
3154
|
+
)
|
|
2072
3155
|
if self.method is not None:
|
|
2073
|
-
result["method"] =
|
|
3156
|
+
result["method"] = (
|
|
3157
|
+
self.method.value if hasattr(self.method, "value") else self.method
|
|
3158
|
+
)
|
|
2074
3159
|
if self.body is not None:
|
|
2075
|
-
result["body"] =
|
|
2076
|
-
|
|
2077
|
-
|
|
3160
|
+
result["body"] = (
|
|
3161
|
+
self.body.value if hasattr(self.body, "value") else self.body
|
|
3162
|
+
)
|
|
3163
|
+
result["id_path"] = (
|
|
3164
|
+
self.id_path.value if hasattr(self.id_path, "value") else self.id_path
|
|
3165
|
+
)
|
|
3166
|
+
result["name_path"] = (
|
|
3167
|
+
self.name_path.value if hasattr(self.name_path, "value") else self.name_path
|
|
3168
|
+
)
|
|
2078
3169
|
if self.description_path is not None:
|
|
2079
|
-
result["description_path"] =
|
|
3170
|
+
result["description_path"] = (
|
|
3171
|
+
self.description_path.value
|
|
3172
|
+
if hasattr(self.description_path, "value")
|
|
3173
|
+
else self.description_path
|
|
3174
|
+
)
|
|
2080
3175
|
return result
|
|
2081
3176
|
|
|
2082
3177
|
|
|
@@ -2098,25 +3193,65 @@ class DatasetResourceDiscoveryConfig:
|
|
|
2098
3193
|
def to_dict(self) -> Dict[str, Any]:
|
|
2099
3194
|
"""Convert to dict format expected by backend."""
|
|
2100
3195
|
result = {}
|
|
2101
|
-
result["min_resources_required"] =
|
|
3196
|
+
result["min_resources_required"] = (
|
|
3197
|
+
self.min_resources_required.value
|
|
3198
|
+
if hasattr(self.min_resources_required, "value")
|
|
3199
|
+
else self.min_resources_required
|
|
3200
|
+
)
|
|
2102
3201
|
if self.table_query is not None:
|
|
2103
|
-
result["table_query"] =
|
|
3202
|
+
result["table_query"] = (
|
|
3203
|
+
self.table_query.value
|
|
3204
|
+
if hasattr(self.table_query, "value")
|
|
3205
|
+
else self.table_query
|
|
3206
|
+
)
|
|
2104
3207
|
if self.relationship_query is not None:
|
|
2105
|
-
result["relationship_query"] =
|
|
3208
|
+
result["relationship_query"] = (
|
|
3209
|
+
self.relationship_query.value
|
|
3210
|
+
if hasattr(self.relationship_query, "value")
|
|
3211
|
+
else self.relationship_query
|
|
3212
|
+
)
|
|
2106
3213
|
if self.index_query is not None:
|
|
2107
|
-
result["index_query"] =
|
|
3214
|
+
result["index_query"] = (
|
|
3215
|
+
self.index_query.value
|
|
3216
|
+
if hasattr(self.index_query, "value")
|
|
3217
|
+
else self.index_query
|
|
3218
|
+
)
|
|
2108
3219
|
if self.constraint_query is not None:
|
|
2109
|
-
result["constraint_query"] =
|
|
3220
|
+
result["constraint_query"] = (
|
|
3221
|
+
self.constraint_query.value
|
|
3222
|
+
if hasattr(self.constraint_query, "value")
|
|
3223
|
+
else self.constraint_query
|
|
3224
|
+
)
|
|
2110
3225
|
if self.statistics_query is not None:
|
|
2111
|
-
result["statistics_query"] =
|
|
3226
|
+
result["statistics_query"] = (
|
|
3227
|
+
self.statistics_query.value
|
|
3228
|
+
if hasattr(self.statistics_query, "value")
|
|
3229
|
+
else self.statistics_query
|
|
3230
|
+
)
|
|
2112
3231
|
if self.size_query is not None:
|
|
2113
|
-
result["size_query"] =
|
|
3232
|
+
result["size_query"] = (
|
|
3233
|
+
self.size_query.value
|
|
3234
|
+
if hasattr(self.size_query, "value")
|
|
3235
|
+
else self.size_query
|
|
3236
|
+
)
|
|
2114
3237
|
if self.base_url is not None:
|
|
2115
|
-
result["base_url"] =
|
|
3238
|
+
result["base_url"] = (
|
|
3239
|
+
self.base_url.value
|
|
3240
|
+
if hasattr(self.base_url, "value")
|
|
3241
|
+
else self.base_url
|
|
3242
|
+
)
|
|
2116
3243
|
if self.resource_types is not None:
|
|
2117
|
-
result["resource_types"] =
|
|
3244
|
+
result["resource_types"] = (
|
|
3245
|
+
self.resource_types.value
|
|
3246
|
+
if hasattr(self.resource_types, "value")
|
|
3247
|
+
else self.resource_types
|
|
3248
|
+
)
|
|
2118
3249
|
if self.error_handling is not None:
|
|
2119
|
-
result["error_handling"] =
|
|
3250
|
+
result["error_handling"] = (
|
|
3251
|
+
self.error_handling.value
|
|
3252
|
+
if hasattr(self.error_handling, "value")
|
|
3253
|
+
else self.error_handling
|
|
3254
|
+
)
|
|
2120
3255
|
return result
|
|
2121
3256
|
|
|
2122
3257
|
|
|
@@ -2132,13 +3267,25 @@ class ExpiryConfig:
|
|
|
2132
3267
|
def to_dict(self) -> Dict[str, Any]:
|
|
2133
3268
|
"""Convert to dict format expected by backend."""
|
|
2134
3269
|
result = {}
|
|
2135
|
-
result["type"] = self.type
|
|
3270
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
2136
3271
|
if self.duration is not None:
|
|
2137
|
-
result["duration"] =
|
|
3272
|
+
result["duration"] = (
|
|
3273
|
+
self.duration.value
|
|
3274
|
+
if hasattr(self.duration, "value")
|
|
3275
|
+
else self.duration
|
|
3276
|
+
)
|
|
2138
3277
|
if self.field_name is not None:
|
|
2139
|
-
result["field_name"] =
|
|
3278
|
+
result["field_name"] = (
|
|
3279
|
+
self.field_name.value
|
|
3280
|
+
if hasattr(self.field_name, "value")
|
|
3281
|
+
else self.field_name
|
|
3282
|
+
)
|
|
2140
3283
|
if self.refresh_token_duration is not None:
|
|
2141
|
-
result["refresh_token_duration"] =
|
|
3284
|
+
result["refresh_token_duration"] = (
|
|
3285
|
+
self.refresh_token_duration.value
|
|
3286
|
+
if hasattr(self.refresh_token_duration, "value")
|
|
3287
|
+
else self.refresh_token_duration
|
|
3288
|
+
)
|
|
2142
3289
|
return result
|
|
2143
3290
|
|
|
2144
3291
|
|
|
@@ -2156,13 +3303,21 @@ class SegmentOption:
|
|
|
2156
3303
|
def to_dict(self) -> Dict[str, Any]:
|
|
2157
3304
|
"""Convert to dict format expected by backend."""
|
|
2158
3305
|
result = {}
|
|
2159
|
-
result["id"] = self.id
|
|
2160
|
-
result["name"] = self.name
|
|
2161
|
-
result["type"] = self.type
|
|
3306
|
+
result["id"] = self.id.value if hasattr(self.id, "value") else self.id
|
|
3307
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
3308
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
2162
3309
|
if self.parent_id is not None:
|
|
2163
|
-
result["parent_id"] =
|
|
2164
|
-
|
|
2165
|
-
|
|
3310
|
+
result["parent_id"] = (
|
|
3311
|
+
self.parent_id.value
|
|
3312
|
+
if hasattr(self.parent_id, "value")
|
|
3313
|
+
else self.parent_id
|
|
3314
|
+
)
|
|
3315
|
+
result["metadata"] = (
|
|
3316
|
+
self.metadata.value if hasattr(self.metadata, "value") else self.metadata
|
|
3317
|
+
)
|
|
3318
|
+
result["children"] = (
|
|
3319
|
+
self.children.value if hasattr(self.children, "value") else self.children
|
|
3320
|
+
)
|
|
2166
3321
|
return result
|
|
2167
3322
|
|
|
2168
3323
|
|
|
@@ -2203,61 +3358,161 @@ class IntegrationDefinition:
|
|
|
2203
3358
|
def to_dict(self) -> Dict[str, Any]:
|
|
2204
3359
|
"""Convert to dict format expected by backend."""
|
|
2205
3360
|
result = {}
|
|
2206
|
-
result["name"] = self.name
|
|
2207
|
-
result["key"] = self.key
|
|
2208
|
-
result["type"] = self.type
|
|
2209
|
-
result["auth_types"] =
|
|
2210
|
-
|
|
3361
|
+
result["name"] = self.name.value if hasattr(self.name, "value") else self.name
|
|
3362
|
+
result["key"] = self.key.value if hasattr(self.key, "value") else self.key
|
|
3363
|
+
result["type"] = self.type.value if hasattr(self.type, "value") else self.type
|
|
3364
|
+
result["auth_types"] = (
|
|
3365
|
+
self.auth_types.value
|
|
3366
|
+
if hasattr(self.auth_types, "value")
|
|
3367
|
+
else self.auth_types
|
|
3368
|
+
)
|
|
3369
|
+
result["status"] = (
|
|
3370
|
+
self.status.value if hasattr(self.status, "value") else self.status
|
|
3371
|
+
)
|
|
2211
3372
|
if self.description is not None:
|
|
2212
|
-
result["description"] =
|
|
3373
|
+
result["description"] = (
|
|
3374
|
+
self.description.value
|
|
3375
|
+
if hasattr(self.description, "value")
|
|
3376
|
+
else self.description
|
|
3377
|
+
)
|
|
2213
3378
|
if self.provider_name is not None:
|
|
2214
|
-
result["provider_name"] =
|
|
3379
|
+
result["provider_name"] = (
|
|
3380
|
+
self.provider_name.value
|
|
3381
|
+
if hasattr(self.provider_name, "value")
|
|
3382
|
+
else self.provider_name
|
|
3383
|
+
)
|
|
2215
3384
|
if self.documentation_url is not None:
|
|
2216
|
-
result["documentation_url"] =
|
|
3385
|
+
result["documentation_url"] = (
|
|
3386
|
+
self.documentation_url.value
|
|
3387
|
+
if hasattr(self.documentation_url, "value")
|
|
3388
|
+
else self.documentation_url
|
|
3389
|
+
)
|
|
2217
3390
|
if self.openapi_documentation_url is not None:
|
|
2218
|
-
result["openapi_documentation_url"] =
|
|
3391
|
+
result["openapi_documentation_url"] = (
|
|
3392
|
+
self.openapi_documentation_url.value
|
|
3393
|
+
if hasattr(self.openapi_documentation_url, "value")
|
|
3394
|
+
else self.openapi_documentation_url
|
|
3395
|
+
)
|
|
2219
3396
|
if self.llms_txt_url is not None:
|
|
2220
|
-
result["llms_txt_url"] =
|
|
3397
|
+
result["llms_txt_url"] = (
|
|
3398
|
+
self.llms_txt_url.value
|
|
3399
|
+
if hasattr(self.llms_txt_url, "value")
|
|
3400
|
+
else self.llms_txt_url
|
|
3401
|
+
)
|
|
2221
3402
|
if self.healthcheck_url is not None:
|
|
2222
|
-
result["healthcheck_url"] =
|
|
3403
|
+
result["healthcheck_url"] = (
|
|
3404
|
+
self.healthcheck_url.value
|
|
3405
|
+
if hasattr(self.healthcheck_url, "value")
|
|
3406
|
+
else self.healthcheck_url
|
|
3407
|
+
)
|
|
2223
3408
|
if self.auth_url is not None:
|
|
2224
|
-
result["auth_url"] =
|
|
3409
|
+
result["auth_url"] = (
|
|
3410
|
+
self.auth_url.value
|
|
3411
|
+
if hasattr(self.auth_url, "value")
|
|
3412
|
+
else self.auth_url
|
|
3413
|
+
)
|
|
2225
3414
|
if self.token_url is not None:
|
|
2226
|
-
result["token_url"] =
|
|
3415
|
+
result["token_url"] = (
|
|
3416
|
+
self.token_url.value
|
|
3417
|
+
if hasattr(self.token_url, "value")
|
|
3418
|
+
else self.token_url
|
|
3419
|
+
)
|
|
2227
3420
|
if self.client_id is not None:
|
|
2228
|
-
result["client_id"] =
|
|
3421
|
+
result["client_id"] = (
|
|
3422
|
+
self.client_id.value
|
|
3423
|
+
if hasattr(self.client_id, "value")
|
|
3424
|
+
else self.client_id
|
|
3425
|
+
)
|
|
2229
3426
|
if self.client_secret is not None:
|
|
2230
|
-
result["client_secret"] =
|
|
3427
|
+
result["client_secret"] = (
|
|
3428
|
+
self.client_secret.value
|
|
3429
|
+
if hasattr(self.client_secret, "value")
|
|
3430
|
+
else self.client_secret
|
|
3431
|
+
)
|
|
2231
3432
|
if self.available_scopes is not None:
|
|
2232
|
-
result["available_scopes"] =
|
|
3433
|
+
result["available_scopes"] = (
|
|
3434
|
+
self.available_scopes.value
|
|
3435
|
+
if hasattr(self.available_scopes, "value")
|
|
3436
|
+
else self.available_scopes
|
|
3437
|
+
)
|
|
2233
3438
|
if self.optional_scopes is not None:
|
|
2234
|
-
result["optional_scopes"] =
|
|
3439
|
+
result["optional_scopes"] = (
|
|
3440
|
+
self.optional_scopes.value
|
|
3441
|
+
if hasattr(self.optional_scopes, "value")
|
|
3442
|
+
else self.optional_scopes
|
|
3443
|
+
)
|
|
2235
3444
|
if self.scope_separator is not None:
|
|
2236
|
-
result["scope_separator"] =
|
|
3445
|
+
result["scope_separator"] = (
|
|
3446
|
+
self.scope_separator.value
|
|
3447
|
+
if hasattr(self.scope_separator, "value")
|
|
3448
|
+
else self.scope_separator
|
|
3449
|
+
)
|
|
2237
3450
|
if self.api_version is not None:
|
|
2238
|
-
result["api_version"] =
|
|
3451
|
+
result["api_version"] = (
|
|
3452
|
+
self.api_version.value
|
|
3453
|
+
if hasattr(self.api_version, "value")
|
|
3454
|
+
else self.api_version
|
|
3455
|
+
)
|
|
2239
3456
|
if self.api_version_description is not None:
|
|
2240
|
-
result["api_version_description"] =
|
|
3457
|
+
result["api_version_description"] = (
|
|
3458
|
+
self.api_version_description.value
|
|
3459
|
+
if hasattr(self.api_version_description, "value")
|
|
3460
|
+
else self.api_version_description
|
|
3461
|
+
)
|
|
2241
3462
|
if self.credential_schema is not None:
|
|
2242
|
-
result["credential_schema"] =
|
|
3463
|
+
result["credential_schema"] = (
|
|
3464
|
+
self.credential_schema.value
|
|
3465
|
+
if hasattr(self.credential_schema, "value")
|
|
3466
|
+
else self.credential_schema
|
|
3467
|
+
)
|
|
2243
3468
|
if self.ui_config is not None:
|
|
2244
|
-
result["ui_config"] =
|
|
3469
|
+
result["ui_config"] = (
|
|
3470
|
+
self.ui_config.value
|
|
3471
|
+
if hasattr(self.ui_config, "value")
|
|
3472
|
+
else self.ui_config
|
|
3473
|
+
)
|
|
2245
3474
|
if self.codegen_details is not None:
|
|
2246
|
-
result["codegen_details"] =
|
|
3475
|
+
result["codegen_details"] = (
|
|
3476
|
+
self.codegen_details.value
|
|
3477
|
+
if hasattr(self.codegen_details, "value")
|
|
3478
|
+
else self.codegen_details
|
|
3479
|
+
)
|
|
2247
3480
|
if self.analysis_details is not None:
|
|
2248
|
-
result["analysis_details"] =
|
|
3481
|
+
result["analysis_details"] = (
|
|
3482
|
+
self.analysis_details.value
|
|
3483
|
+
if hasattr(self.analysis_details, "value")
|
|
3484
|
+
else self.analysis_details
|
|
3485
|
+
)
|
|
2249
3486
|
if self.segment_config is not None:
|
|
2250
|
-
result["segment_config"] =
|
|
3487
|
+
result["segment_config"] = (
|
|
3488
|
+
self.segment_config.value
|
|
3489
|
+
if hasattr(self.segment_config, "value")
|
|
3490
|
+
else self.segment_config
|
|
3491
|
+
)
|
|
2251
3492
|
if self.dataset_resource_discovery_config is not None:
|
|
2252
3493
|
result["dataset_resource_discovery_config"] = (
|
|
2253
|
-
self.dataset_resource_discovery_config
|
|
3494
|
+
self.dataset_resource_discovery_config.value
|
|
3495
|
+
if hasattr(self.dataset_resource_discovery_config, "value")
|
|
3496
|
+
else self.dataset_resource_discovery_config
|
|
2254
3497
|
)
|
|
2255
3498
|
if self.expiry_config is not None:
|
|
2256
|
-
result["expiry_config"] =
|
|
3499
|
+
result["expiry_config"] = (
|
|
3500
|
+
self.expiry_config.value
|
|
3501
|
+
if hasattr(self.expiry_config, "value")
|
|
3502
|
+
else self.expiry_config
|
|
3503
|
+
)
|
|
2257
3504
|
if self.provider_credentials is not None:
|
|
2258
|
-
result["provider_credentials"] =
|
|
3505
|
+
result["provider_credentials"] = (
|
|
3506
|
+
self.provider_credentials.value
|
|
3507
|
+
if hasattr(self.provider_credentials, "value")
|
|
3508
|
+
else self.provider_credentials
|
|
3509
|
+
)
|
|
2259
3510
|
if self.default_resource_attach_type is not None:
|
|
2260
|
-
result["default_resource_attach_type"] =
|
|
3511
|
+
result["default_resource_attach_type"] = (
|
|
3512
|
+
self.default_resource_attach_type.value
|
|
3513
|
+
if hasattr(self.default_resource_attach_type, "value")
|
|
3514
|
+
else self.default_resource_attach_type
|
|
3515
|
+
)
|
|
2261
3516
|
return result
|
|
2262
3517
|
|
|
2263
3518
|
|
|
@@ -2272,10 +3527,20 @@ class IntegrationConfig:
|
|
|
2272
3527
|
def to_dict(self) -> Dict[str, Any]:
|
|
2273
3528
|
"""Convert to dict format expected by backend."""
|
|
2274
3529
|
result = {}
|
|
2275
|
-
result["definition"] =
|
|
2276
|
-
|
|
3530
|
+
result["definition"] = (
|
|
3531
|
+
self.definition.value
|
|
3532
|
+
if hasattr(self.definition, "value")
|
|
3533
|
+
else self.definition
|
|
3534
|
+
)
|
|
3535
|
+
result["source"] = (
|
|
3536
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
3537
|
+
)
|
|
2277
3538
|
if self.file_path is not None:
|
|
2278
|
-
result["file_path"] =
|
|
3539
|
+
result["file_path"] = (
|
|
3540
|
+
self.file_path.value
|
|
3541
|
+
if hasattr(self.file_path, "value")
|
|
3542
|
+
else self.file_path
|
|
3543
|
+
)
|
|
2279
3544
|
return result
|
|
2280
3545
|
|
|
2281
3546
|
|
|
@@ -2290,10 +3555,18 @@ class PythonIntegrationInstance:
|
|
|
2290
3555
|
def to_dict(self) -> Dict[str, Any]:
|
|
2291
3556
|
"""Convert to dict format expected by backend."""
|
|
2292
3557
|
result = {}
|
|
2293
|
-
result["config"] =
|
|
2294
|
-
|
|
3558
|
+
result["config"] = (
|
|
3559
|
+
self.config.value if hasattr(self.config, "value") else self.config
|
|
3560
|
+
)
|
|
3561
|
+
result["credentials"] = (
|
|
3562
|
+
self.credentials.value
|
|
3563
|
+
if hasattr(self.credentials, "value")
|
|
3564
|
+
else self.credentials
|
|
3565
|
+
)
|
|
2295
3566
|
if self.methods is not None:
|
|
2296
|
-
result["methods"] =
|
|
3567
|
+
result["methods"] = (
|
|
3568
|
+
self.methods.value if hasattr(self.methods, "value") else self.methods
|
|
3569
|
+
)
|
|
2297
3570
|
return result
|
|
2298
3571
|
|
|
2299
3572
|
|
|
@@ -2309,11 +3582,23 @@ class IntegrationDiscovery:
|
|
|
2309
3582
|
def to_dict(self) -> Dict[str, Any]:
|
|
2310
3583
|
"""Convert to dict format expected by backend."""
|
|
2311
3584
|
result = {}
|
|
2312
|
-
result["config"] =
|
|
3585
|
+
result["config"] = (
|
|
3586
|
+
self.config.value if hasattr(self.config, "value") else self.config
|
|
3587
|
+
)
|
|
2313
3588
|
if self.instance is not None:
|
|
2314
|
-
result["instance"] =
|
|
2315
|
-
|
|
2316
|
-
|
|
3589
|
+
result["instance"] = (
|
|
3590
|
+
self.instance.value
|
|
3591
|
+
if hasattr(self.instance, "value")
|
|
3592
|
+
else self.instance
|
|
3593
|
+
)
|
|
3594
|
+
result["file_path"] = (
|
|
3595
|
+
self.file_path.value if hasattr(self.file_path, "value") else self.file_path
|
|
3596
|
+
)
|
|
3597
|
+
result["source_code"] = (
|
|
3598
|
+
self.source_code.value
|
|
3599
|
+
if hasattr(self.source_code, "value")
|
|
3600
|
+
else self.source_code
|
|
3601
|
+
)
|
|
2317
3602
|
return result
|
|
2318
3603
|
|
|
2319
3604
|
|
|
@@ -2327,8 +3612,14 @@ class UpsertIntegrationRequest:
|
|
|
2327
3612
|
def to_dict(self) -> Dict[str, Any]:
|
|
2328
3613
|
"""Convert to dict format expected by backend."""
|
|
2329
3614
|
result = {}
|
|
2330
|
-
result["integration"] =
|
|
2331
|
-
|
|
3615
|
+
result["integration"] = (
|
|
3616
|
+
self.integration.value
|
|
3617
|
+
if hasattr(self.integration, "value")
|
|
3618
|
+
else self.integration
|
|
3619
|
+
)
|
|
3620
|
+
result["source"] = (
|
|
3621
|
+
self.source.value if hasattr(self.source, "value") else self.source
|
|
3622
|
+
)
|
|
2332
3623
|
return result
|
|
2333
3624
|
|
|
2334
3625
|
|
|
@@ -2342,8 +3633,14 @@ class UpsertIntegrationResponse:
|
|
|
2342
3633
|
def to_dict(self) -> Dict[str, Any]:
|
|
2343
3634
|
"""Convert to dict format expected by backend."""
|
|
2344
3635
|
result = {}
|
|
2345
|
-
result["integration_id"] =
|
|
2346
|
-
|
|
3636
|
+
result["integration_id"] = (
|
|
3637
|
+
self.integration_id.value
|
|
3638
|
+
if hasattr(self.integration_id, "value")
|
|
3639
|
+
else self.integration_id
|
|
3640
|
+
)
|
|
3641
|
+
result["status"] = (
|
|
3642
|
+
self.status.value if hasattr(self.status, "value") else self.status
|
|
3643
|
+
)
|
|
2347
3644
|
return result
|
|
2348
3645
|
|
|
2349
3646
|
|
|
@@ -2356,7 +3653,11 @@ class ListIntegrationsResponse:
|
|
|
2356
3653
|
def to_dict(self) -> Dict[str, Any]:
|
|
2357
3654
|
"""Convert to dict format expected by backend."""
|
|
2358
3655
|
result = {}
|
|
2359
|
-
result["integrations"] =
|
|
3656
|
+
result["integrations"] = (
|
|
3657
|
+
self.integrations.value
|
|
3658
|
+
if hasattr(self.integrations, "value")
|
|
3659
|
+
else self.integrations
|
|
3660
|
+
)
|
|
2360
3661
|
return result
|
|
2361
3662
|
|
|
2362
3663
|
|
|
@@ -2369,7 +3670,11 @@ class ExportIntegrationsResponse:
|
|
|
2369
3670
|
def to_dict(self) -> Dict[str, Any]:
|
|
2370
3671
|
"""Convert to dict format expected by backend."""
|
|
2371
3672
|
result = {}
|
|
2372
|
-
result["integrations"] =
|
|
3673
|
+
result["integrations"] = (
|
|
3674
|
+
self.integrations.value
|
|
3675
|
+
if hasattr(self.integrations, "value")
|
|
3676
|
+
else self.integrations
|
|
3677
|
+
)
|
|
2373
3678
|
return result
|
|
2374
3679
|
|
|
2375
3680
|
|
|
@@ -2386,7 +3691,6 @@ __all__ = [
|
|
|
2386
3691
|
"APIStepWithHandlers",
|
|
2387
3692
|
"APITool",
|
|
2388
3693
|
"ActionDefinition",
|
|
2389
|
-
"AgentDiscovery",
|
|
2390
3694
|
"AnalysisDetails",
|
|
2391
3695
|
"AuthType",
|
|
2392
3696
|
"Bot",
|
|
@@ -2401,7 +3705,6 @@ __all__ = [
|
|
|
2401
3705
|
"DatasetType",
|
|
2402
3706
|
"Error",
|
|
2403
3707
|
"ErrorHandlingConfig",
|
|
2404
|
-
"ExecutionModeConfig",
|
|
2405
3708
|
"ExecutionModeType",
|
|
2406
3709
|
"ExpiryConfig",
|
|
2407
3710
|
"ExpiryType",
|
|
@@ -2441,7 +3744,6 @@ __all__ = [
|
|
|
2441
3744
|
"ResourceType",
|
|
2442
3745
|
"ResourceTypeConfig",
|
|
2443
3746
|
"Result",
|
|
2444
|
-
"ResultHandler",
|
|
2445
3747
|
"ResultSchema",
|
|
2446
3748
|
"SegmentConfig",
|
|
2447
3749
|
"SegmentLevel",
|
|
@@ -2450,7 +3752,6 @@ __all__ = [
|
|
|
2450
3752
|
"SensitivityLevel",
|
|
2451
3753
|
"ServiceDefinition",
|
|
2452
3754
|
"Status",
|
|
2453
|
-
"StepWithHandlers",
|
|
2454
3755
|
"StepsResponse",
|
|
2455
3756
|
"SystemParameters",
|
|
2456
3757
|
"TempCondition",
|