smallestai 4.0.0__py3-none-any.whl → 4.1.0__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 smallestai might be problematic. Click here for more details.

Files changed (135) hide show
  1. smallestai/__init__.py +34 -44
  2. smallestai/atoms/__init__.py +249 -123
  3. smallestai/atoms/api/__init__.py +0 -1
  4. smallestai/atoms/api/agent_templates_api.py +26 -26
  5. smallestai/atoms/api/agents_api.py +1316 -190
  6. smallestai/atoms/api/calls_api.py +29 -29
  7. smallestai/atoms/api/campaigns_api.py +165 -165
  8. smallestai/atoms/api/knowledge_base_api.py +290 -290
  9. smallestai/atoms/api/logs_api.py +13 -13
  10. smallestai/atoms/api/organization_api.py +13 -13
  11. smallestai/atoms/api/user_api.py +13 -13
  12. smallestai/atoms/atoms_client.py +77 -49
  13. smallestai/atoms/models/__init__.py +103 -43
  14. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_delete200_response.py +89 -0
  15. smallestai/atoms/models/{get_agent_templates200_response.py → agent_agent_id_webhook_subscriptions_get200_response.py} +7 -7
  16. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_get404_response.py +89 -0
  17. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post201_response.py +89 -0
  18. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post400_response.py +89 -0
  19. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post_request.py +97 -0
  20. smallestai/atoms/models/agent_dto.py +8 -6
  21. smallestai/atoms/models/agent_dto_language.py +17 -3
  22. smallestai/atoms/models/agent_dto_language_switching.py +95 -0
  23. smallestai/atoms/models/agent_dto_synthesizer.py +1 -1
  24. smallestai/atoms/models/{create_agent_from_template200_response.py → agent_from_template_post200_response.py} +4 -4
  25. smallestai/atoms/models/{get_agents200_response.py → agent_get200_response.py} +7 -7
  26. smallestai/atoms/models/{get_agents200_response_data.py → agent_get200_response_data.py} +9 -13
  27. smallestai/atoms/models/{delete_agent200_response.py → agent_id_delete200_response.py} +4 -4
  28. smallestai/atoms/models/{get_agent_by_id200_response.py → agent_id_get200_response.py} +4 -4
  29. smallestai/atoms/models/{update_agent200_response.py → agent_id_patch200_response.py} +4 -4
  30. smallestai/atoms/models/{update_agent_request.py → agent_id_patch_request.py} +17 -15
  31. smallestai/atoms/models/{update_agent_request_language.py → agent_id_patch_request_language.py} +14 -10
  32. smallestai/atoms/models/agent_id_patch_request_language_switching.py +96 -0
  33. smallestai/atoms/models/{update_agent_request_synthesizer.py → agent_id_patch_request_synthesizer.py} +6 -6
  34. smallestai/atoms/models/{update_agent_request_synthesizer_voice_config.py → agent_id_patch_request_synthesizer_voice_config.py} +27 -27
  35. smallestai/atoms/models/{update_agent_request_synthesizer_voice_config_one_of.py → agent_id_patch_request_synthesizer_voice_config_one_of.py} +4 -4
  36. smallestai/atoms/models/{update_agent_request_synthesizer_voice_config_one_of1.py → agent_id_patch_request_synthesizer_voice_config_one_of1.py} +4 -4
  37. smallestai/atoms/models/{get_campaign_by_id200_response.py → agent_id_workflow_get200_response.py} +7 -7
  38. smallestai/atoms/models/agent_id_workflow_get200_response_data.py +105 -0
  39. smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner.py +127 -0
  40. smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner_data.py +91 -0
  41. smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner_marker_end.py +91 -0
  42. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner.py +114 -0
  43. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data.py +115 -0
  44. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data_variables.py +97 -0
  45. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data_variables_data_inner.py +91 -0
  46. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_position.py +89 -0
  47. smallestai/atoms/models/agent_id_workflow_get404_response.py +89 -0
  48. smallestai/atoms/models/agent_template_get200_response.py +97 -0
  49. smallestai/atoms/models/{get_agent_templates200_response_data_inner.py → agent_template_get200_response_data_inner.py} +6 -6
  50. smallestai/atoms/models/{get_campaigns200_response.py → audience_get200_response.py} +7 -7
  51. smallestai/atoms/models/{create_campaign201_response_data.py → audience_get200_response_data_inner.py} +16 -18
  52. smallestai/atoms/models/audience_id_delete200_response.py +89 -0
  53. smallestai/atoms/models/audience_id_delete400_response.py +89 -0
  54. smallestai/atoms/models/{get_current_user200_response.py → audience_id_get200_response.py} +7 -7
  55. smallestai/atoms/models/audience_id_get400_response.py +89 -0
  56. smallestai/atoms/models/audience_id_get403_response.py +89 -0
  57. smallestai/atoms/models/audience_id_get404_response.py +89 -0
  58. smallestai/atoms/models/audience_id_members_delete200_response.py +93 -0
  59. smallestai/atoms/models/audience_id_members_delete200_response_data.py +87 -0
  60. smallestai/atoms/models/audience_id_members_delete_request.py +87 -0
  61. smallestai/atoms/models/audience_id_members_get200_response.py +93 -0
  62. smallestai/atoms/models/audience_id_members_get200_response_data.py +101 -0
  63. smallestai/atoms/models/{get_campaigns200_response_data_inner_audience.py → audience_id_members_get200_response_data_members_inner.py} +8 -8
  64. smallestai/atoms/models/audience_id_members_get400_response.py +89 -0
  65. smallestai/atoms/models/audience_id_members_get500_response.py +89 -0
  66. smallestai/atoms/models/audience_id_members_post200_response.py +97 -0
  67. smallestai/atoms/models/audience_id_members_post200_response_data_inner.py +93 -0
  68. smallestai/atoms/models/audience_id_members_post200_response_data_inner_data.py +89 -0
  69. smallestai/atoms/models/audience_id_members_post400_response.py +89 -0
  70. smallestai/atoms/models/audience_id_members_post403_response.py +89 -0
  71. smallestai/atoms/models/audience_id_members_post_request.py +87 -0
  72. smallestai/atoms/models/audience_id_members_search_get200_response.py +93 -0
  73. smallestai/atoms/models/audience_id_members_search_get200_response_data.py +101 -0
  74. smallestai/atoms/models/audience_id_members_search_get200_response_data_search_info.py +103 -0
  75. smallestai/atoms/models/audience_id_members_search_get400_response.py +89 -0
  76. smallestai/atoms/models/audience_id_members_search_get500_response.py +89 -0
  77. smallestai/atoms/models/{create_campaign201_response.py → audience_post200_response.py} +7 -7
  78. smallestai/atoms/models/audience_post200_response_data.py +104 -0
  79. smallestai/atoms/models/audience_post400_response.py +89 -0
  80. smallestai/atoms/models/campaign_get200_response.py +93 -0
  81. smallestai/atoms/models/campaign_get200_response_data.py +87 -0
  82. smallestai/atoms/models/{get_campaigns_request.py → campaign_get_request.py} +4 -4
  83. smallestai/atoms/models/campaign_id_get200_response.py +93 -0
  84. smallestai/atoms/models/{get_campaign_by_id200_response_data.py → campaign_id_get200_response_data.py} +4 -4
  85. smallestai/atoms/models/campaign_post201_response.py +89 -0
  86. smallestai/atoms/models/{create_campaign_request.py → campaign_post_request.py} +4 -4
  87. smallestai/atoms/models/{start_outbound_call200_response.py → conversation_id_get200_response.py} +7 -7
  88. smallestai/atoms/models/{get_conversation_logs200_response_data.py → conversation_id_get200_response_data.py} +4 -4
  89. smallestai/atoms/models/conversation_outbound_post200_response.py +93 -0
  90. smallestai/atoms/models/{start_outbound_call200_response_data.py → conversation_outbound_post200_response_data.py} +4 -4
  91. smallestai/atoms/models/{start_outbound_call_request.py → conversation_outbound_post_request.py} +4 -4
  92. smallestai/atoms/models/create_agent_request.py +10 -6
  93. smallestai/atoms/models/create_agent_request_language.py +11 -7
  94. smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +24 -24
  95. smallestai/atoms/models/{knowledge_base_dto.py → knowledge_base.py} +15 -8
  96. smallestai/atoms/models/{knowledge_base_item_dto.py → knowledge_base_item.py} +19 -17
  97. smallestai/atoms/models/{get_knowledge_bases200_response.py → knowledgebase_get200_response.py} +7 -7
  98. smallestai/atoms/models/{get_knowledge_base_by_id200_response.py → knowledgebase_id_get200_response.py} +7 -7
  99. smallestai/atoms/models/{get_knowledge_base_items200_response.py → knowledgebase_id_items_get200_response.py} +7 -7
  100. smallestai/atoms/models/{upload_text_to_knowledge_base_request.py → knowledgebase_id_items_upload_text_post_request.py} +4 -4
  101. smallestai/atoms/models/{create_knowledge_base201_response.py → knowledgebase_post201_response.py} +4 -4
  102. smallestai/atoms/models/{create_knowledge_base_request.py → knowledgebase_post_request.py} +4 -4
  103. smallestai/atoms/models/{get_organization200_response.py → organization_get200_response.py} +7 -7
  104. smallestai/atoms/models/{get_organization200_response_data.py → organization_get200_response_data.py} +10 -10
  105. smallestai/atoms/models/{get_organization200_response_data_members_inner.py → organization_get200_response_data_members_inner.py} +4 -4
  106. smallestai/atoms/models/{get_organization200_response_data_subscription.py → organization_get200_response_data_subscription.py} +4 -4
  107. smallestai/atoms/models/product_phone_numbers_get200_response.py +97 -0
  108. smallestai/atoms/models/product_phone_numbers_get200_response_data_inner.py +100 -0
  109. smallestai/atoms/models/product_phone_numbers_get200_response_data_inner_attributes.py +89 -0
  110. smallestai/atoms/models/user_get200_response.py +93 -0
  111. smallestai/atoms/models/{get_current_user200_response_data.py → user_get200_response_data.py} +4 -4
  112. smallestai/atoms/models/webhook.py +124 -0
  113. smallestai/atoms/models/{get_campaigns200_response_data_inner_agent.py → webhook_agent.py} +8 -6
  114. smallestai/atoms/models/webhook_event.py +98 -0
  115. smallestai/atoms/models/webhook_get200_response.py +93 -0
  116. smallestai/atoms/models/webhook_get200_response_data.py +140 -0
  117. smallestai/atoms/models/webhook_id_delete404_response.py +89 -0
  118. smallestai/atoms/models/webhook_post201_response.py +89 -0
  119. smallestai/atoms/models/webhook_post_request.py +99 -0
  120. smallestai/atoms/models/webhook_post_request_events_inner.py +99 -0
  121. smallestai/atoms/models/webhook_subscription.py +108 -0
  122. smallestai/atoms/models/webhook_subscription_populated.py +112 -0
  123. smallestai/waves/async_waves_client.py +63 -10
  124. smallestai/waves/exceptions.py +4 -4
  125. smallestai/waves/models.py +8 -0
  126. smallestai/waves/utils.py +19 -1
  127. smallestai/waves/waves_client.py +47 -10
  128. {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/METADATA +2 -2
  129. smallestai-4.1.0.dist-info/RECORD +147 -0
  130. smallestai/atoms/models/get_campaigns200_response_data_inner.py +0 -118
  131. smallestai/atoms/models/get_conversation_logs200_response.py +0 -93
  132. smallestai-4.0.0.dist-info/RECORD +0 -87
  133. {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/WHEEL +0 -0
  134. {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/licenses/LICENSE +0 -0
  135. {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/top_level.txt +0 -0
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class UpdateAgentRequestSynthesizerVoiceConfigOneOf1(BaseModel):
25
+ class AgentIdPatchRequestSynthesizerVoiceConfigOneOf1(BaseModel):
26
26
  """
27
- UpdateAgentRequestSynthesizerVoiceConfigOneOf1
27
+ AgentIdPatchRequestSynthesizerVoiceConfigOneOf1
28
28
  """ # noqa: E501
29
29
  model: Optional[StrictStr] = Field(default=None, description="We currently support 3 types of models for the synthesizer. Waves, Waves Lightning Large and Waves Lightning Large Voice Clone. You can clone your voice using waves platform and use the voiceId for this field and select the model as waves_lightning_large_voice_clone to use your cloned voice.")
30
30
  voice_id: Optional[StrictStr] = Field(default='nyah', description="The voice ID to use", alias="voiceId")
@@ -58,7 +58,7 @@ class UpdateAgentRequestSynthesizerVoiceConfigOneOf1(BaseModel):
58
58
 
59
59
  @classmethod
60
60
  def from_json(cls, json_str: str) -> Optional[Self]:
61
- """Create an instance of UpdateAgentRequestSynthesizerVoiceConfigOneOf1 from a JSON string"""
61
+ """Create an instance of AgentIdPatchRequestSynthesizerVoiceConfigOneOf1 from a JSON string"""
62
62
  return cls.from_dict(json.loads(json_str))
63
63
 
64
64
  def to_dict(self) -> Dict[str, Any]:
@@ -83,7 +83,7 @@ class UpdateAgentRequestSynthesizerVoiceConfigOneOf1(BaseModel):
83
83
 
84
84
  @classmethod
85
85
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of UpdateAgentRequestSynthesizerVoiceConfigOneOf1 from a dict"""
86
+ """Create an instance of AgentIdPatchRequestSynthesizerVoiceConfigOneOf1 from a dict"""
87
87
  if obj is None:
88
88
  return None
89
89
 
@@ -19,16 +19,16 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictBool
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from smallestai.atoms.models.get_campaign_by_id200_response_data import GetCampaignById200ResponseData
22
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data import AgentIdWorkflowGet200ResponseData
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class GetCampaignById200Response(BaseModel):
26
+ class AgentIdWorkflowGet200Response(BaseModel):
27
27
  """
28
- GetCampaignById200Response
28
+ AgentIdWorkflowGet200Response
29
29
  """ # noqa: E501
30
30
  status: Optional[StrictBool] = None
31
- data: Optional[GetCampaignById200ResponseData] = None
31
+ data: Optional[AgentIdWorkflowGet200ResponseData] = None
32
32
  __properties: ClassVar[List[str]] = ["status", "data"]
33
33
 
34
34
  model_config = ConfigDict(
@@ -49,7 +49,7 @@ class GetCampaignById200Response(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of GetCampaignById200Response from a JSON string"""
52
+ """Create an instance of AgentIdWorkflowGet200Response from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self) -> Dict[str, Any]:
@@ -77,7 +77,7 @@ class GetCampaignById200Response(BaseModel):
77
77
 
78
78
  @classmethod
79
79
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of GetCampaignById200Response from a dict"""
80
+ """Create an instance of AgentIdWorkflowGet200Response from a dict"""
81
81
  if obj is None:
82
82
  return None
83
83
 
@@ -86,7 +86,7 @@ class GetCampaignById200Response(BaseModel):
86
86
 
87
87
  _obj = cls.model_validate({
88
88
  "status": obj.get("status"),
89
- "data": GetCampaignById200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
89
+ "data": AgentIdWorkflowGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
90
90
  })
91
91
  return _obj
92
92
 
@@ -0,0 +1,105 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Management API
5
+
6
+ API for managing agents, their templates, and call logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data_edges_inner import AgentIdWorkflowGet200ResponseDataEdgesInner
23
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data_nodes_inner import AgentIdWorkflowGet200ResponseDataNodesInner
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class AgentIdWorkflowGet200ResponseData(BaseModel):
28
+ """
29
+ The workflow graph containing nodes and edges
30
+ """ # noqa: E501
31
+ nodes: Optional[List[AgentIdWorkflowGet200ResponseDataNodesInner]] = Field(default=None, description="Array of workflow nodes")
32
+ edges: Optional[List[AgentIdWorkflowGet200ResponseDataEdgesInner]] = Field(default=None, description="Array of workflow edges connecting nodes")
33
+ __properties: ClassVar[List[str]] = ["nodes", "edges"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of AgentIdWorkflowGet200ResponseData from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of each item in nodes (list)
75
+ _items = []
76
+ if self.nodes:
77
+ for _item_nodes in self.nodes:
78
+ if _item_nodes:
79
+ _items.append(_item_nodes.to_dict())
80
+ _dict['nodes'] = _items
81
+ # override the default output from pydantic by calling `to_dict()` of each item in edges (list)
82
+ _items = []
83
+ if self.edges:
84
+ for _item_edges in self.edges:
85
+ if _item_edges:
86
+ _items.append(_item_edges.to_dict())
87
+ _dict['edges'] = _items
88
+ return _dict
89
+
90
+ @classmethod
91
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
92
+ """Create an instance of AgentIdWorkflowGet200ResponseData from a dict"""
93
+ if obj is None:
94
+ return None
95
+
96
+ if not isinstance(obj, dict):
97
+ return cls.model_validate(obj)
98
+
99
+ _obj = cls.model_validate({
100
+ "nodes": [AgentIdWorkflowGet200ResponseDataNodesInner.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None,
101
+ "edges": [AgentIdWorkflowGet200ResponseDataEdgesInner.from_dict(_item) for _item in obj["edges"]] if obj.get("edges") is not None else None
102
+ })
103
+ return _obj
104
+
105
+
@@ -0,0 +1,127 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Management API
5
+
6
+ API for managing agents, their templates, and call logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data_edges_inner_data import AgentIdWorkflowGet200ResponseDataEdgesInnerData
23
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data_edges_inner_marker_end import AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class AgentIdWorkflowGet200ResponseDataEdgesInner(BaseModel):
28
+ """
29
+ AgentIdWorkflowGet200ResponseDataEdgesInner
30
+ """ # noqa: E501
31
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the edge")
32
+ source: Optional[StrictStr] = Field(default=None, description="ID of the source node")
33
+ source_handle: Optional[StrictStr] = Field(default=None, description="Source handle ID", alias="sourceHandle")
34
+ target: Optional[StrictStr] = Field(default=None, description="ID of the target node")
35
+ target_handle: Optional[StrictStr] = Field(default=None, description="Target handle ID", alias="targetHandle")
36
+ type: Optional[StrictStr] = Field(default=None, description="Type of the edge (e.g., smoothstep, direct)")
37
+ label: Optional[StrictStr] = Field(default=None, description="Label for the edge")
38
+ description: Optional[StrictStr] = Field(default=None, description="Description of the edge")
39
+ selected: Optional[StrictBool] = None
40
+ animated: Optional[StrictBool] = None
41
+ marker_end: Optional[AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd] = Field(default=None, alias="markerEnd")
42
+ data: Optional[AgentIdWorkflowGet200ResponseDataEdgesInnerData] = None
43
+ __properties: ClassVar[List[str]] = ["id", "source", "sourceHandle", "target", "targetHandle", "type", "label", "description", "selected", "animated", "markerEnd", "data"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of AgentIdWorkflowGet200ResponseDataEdgesInner from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ # override the default output from pydantic by calling `to_dict()` of marker_end
85
+ if self.marker_end:
86
+ _dict['markerEnd'] = self.marker_end.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of data
88
+ if self.data:
89
+ _dict['data'] = self.data.to_dict()
90
+ # set to None if source_handle (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.source_handle is None and "source_handle" in self.model_fields_set:
93
+ _dict['sourceHandle'] = None
94
+
95
+ # set to None if target_handle (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.target_handle is None and "target_handle" in self.model_fields_set:
98
+ _dict['targetHandle'] = None
99
+
100
+ return _dict
101
+
102
+ @classmethod
103
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
104
+ """Create an instance of AgentIdWorkflowGet200ResponseDataEdgesInner from a dict"""
105
+ if obj is None:
106
+ return None
107
+
108
+ if not isinstance(obj, dict):
109
+ return cls.model_validate(obj)
110
+
111
+ _obj = cls.model_validate({
112
+ "id": obj.get("id"),
113
+ "source": obj.get("source"),
114
+ "sourceHandle": obj.get("sourceHandle"),
115
+ "target": obj.get("target"),
116
+ "targetHandle": obj.get("targetHandle"),
117
+ "type": obj.get("type"),
118
+ "label": obj.get("label"),
119
+ "description": obj.get("description"),
120
+ "selected": obj.get("selected"),
121
+ "animated": obj.get("animated"),
122
+ "markerEnd": AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd.from_dict(obj["markerEnd"]) if obj.get("markerEnd") is not None else None,
123
+ "data": AgentIdWorkflowGet200ResponseDataEdgesInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None
124
+ })
125
+ return _obj
126
+
127
+
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Management API
5
+
6
+ API for managing agents, their templates, and call logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AgentIdWorkflowGet200ResponseDataEdgesInnerData(BaseModel):
26
+ """
27
+ Edge-specific data
28
+ """ # noqa: E501
29
+ label: Optional[StrictStr] = None
30
+ description: Optional[StrictStr] = None
31
+ is_conditional_edge: Optional[StrictBool] = None
32
+ __properties: ClassVar[List[str]] = ["label", "description", "is_conditional_edge"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of AgentIdWorkflowGet200ResponseDataEdgesInnerData from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of AgentIdWorkflowGet200ResponseDataEdgesInnerData from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "label": obj.get("label"),
86
+ "description": obj.get("description"),
87
+ "is_conditional_edge": obj.get("is_conditional_edge")
88
+ })
89
+ return _obj
90
+
91
+
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Management API
5
+
6
+ API for managing agents, their templates, and call logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd(BaseModel):
26
+ """
27
+ Arrow marker configuration
28
+ """ # noqa: E501
29
+ type: Optional[StrictStr] = None
30
+ width: Optional[Union[StrictFloat, StrictInt]] = None
31
+ height: Optional[Union[StrictFloat, StrictInt]] = None
32
+ __properties: ClassVar[List[str]] = ["type", "width", "height"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of AgentIdWorkflowGet200ResponseDataEdgesInnerMarkerEnd from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "type": obj.get("type"),
86
+ "width": obj.get("width"),
87
+ "height": obj.get("height")
88
+ })
89
+ return _obj
90
+
91
+
@@ -0,0 +1,114 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Management API
5
+
6
+ API for managing agents, their templates, and call logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data_nodes_inner_data import AgentIdWorkflowGet200ResponseDataNodesInnerData
23
+ from smallestai.atoms.models.agent_id_workflow_get200_response_data_nodes_inner_position import AgentIdWorkflowGet200ResponseDataNodesInnerPosition
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class AgentIdWorkflowGet200ResponseDataNodesInner(BaseModel):
28
+ """
29
+ AgentIdWorkflowGet200ResponseDataNodesInner
30
+ """ # noqa: E501
31
+ id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the node")
32
+ type: Optional[StrictStr] = Field(default=None, description="Type of the node (e.g., default_node, end_call, pre_call_api)")
33
+ position: Optional[AgentIdWorkflowGet200ResponseDataNodesInnerPosition] = None
34
+ position_absolute: Optional[AgentIdWorkflowGet200ResponseDataNodesInnerPosition] = Field(default=None, alias="positionAbsolute")
35
+ data: Optional[AgentIdWorkflowGet200ResponseDataNodesInnerData] = None
36
+ width: Optional[Union[StrictFloat, StrictInt]] = None
37
+ height: Optional[Union[StrictFloat, StrictInt]] = None
38
+ selected: Optional[StrictBool] = None
39
+ dragging: Optional[StrictBool] = None
40
+ __properties: ClassVar[List[str]] = ["id", "type", "position", "positionAbsolute", "data", "width", "height", "selected", "dragging"]
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of AgentIdWorkflowGet200ResponseDataNodesInner from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ # override the default output from pydantic by calling `to_dict()` of position
82
+ if self.position:
83
+ _dict['position'] = self.position.to_dict()
84
+ # override the default output from pydantic by calling `to_dict()` of position_absolute
85
+ if self.position_absolute:
86
+ _dict['positionAbsolute'] = self.position_absolute.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of data
88
+ if self.data:
89
+ _dict['data'] = self.data.to_dict()
90
+ return _dict
91
+
92
+ @classmethod
93
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
94
+ """Create an instance of AgentIdWorkflowGet200ResponseDataNodesInner from a dict"""
95
+ if obj is None:
96
+ return None
97
+
98
+ if not isinstance(obj, dict):
99
+ return cls.model_validate(obj)
100
+
101
+ _obj = cls.model_validate({
102
+ "id": obj.get("id"),
103
+ "type": obj.get("type"),
104
+ "position": AgentIdWorkflowGet200ResponseDataNodesInnerPosition.from_dict(obj["position"]) if obj.get("position") is not None else None,
105
+ "positionAbsolute": AgentIdWorkflowGet200ResponseDataNodesInnerPosition.from_dict(obj["positionAbsolute"]) if obj.get("positionAbsolute") is not None else None,
106
+ "data": AgentIdWorkflowGet200ResponseDataNodesInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None,
107
+ "width": obj.get("width"),
108
+ "height": obj.get("height"),
109
+ "selected": obj.get("selected"),
110
+ "dragging": obj.get("dragging")
111
+ })
112
+ return _obj
113
+
114
+