smallestai 3.1.0__py3-none-any.whl → 4.0.1__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 +35 -45
  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/__init__.py +2 -2
  124. smallestai/waves/async_waves_client.py +42 -69
  125. smallestai/waves/stream_tts.py +189 -254
  126. smallestai/waves/utils.py +3 -49
  127. smallestai/waves/waves_client.py +41 -69
  128. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/METADATA +3 -2
  129. smallestai-4.0.1.dist-info/RECORD +147 -0
  130. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/WHEEL +1 -1
  131. smallestai/atoms/models/get_campaigns200_response_data_inner.py +0 -118
  132. smallestai/atoms/models/get_conversation_logs200_response.py +0 -93
  133. smallestai-3.1.0.dist-info/RECORD +0 -87
  134. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/licenses/LICENSE +0 -0
  135. {smallestai-3.1.0.dist-info → smallestai-4.0.1.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 GetOrganization200ResponseDataMembersInner(BaseModel):
25
+ class OrganizationGet200ResponseDataMembersInner(BaseModel):
26
26
  """
27
- GetOrganization200ResponseDataMembersInner
27
+ OrganizationGet200ResponseDataMembersInner
28
28
  """ # noqa: E501
29
29
  id: Optional[StrictStr] = Field(default=None, alias="_id")
30
30
  user_email: Optional[StrictStr] = Field(default=None, alias="userEmail")
@@ -48,7 +48,7 @@ class GetOrganization200ResponseDataMembersInner(BaseModel):
48
48
 
49
49
  @classmethod
50
50
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of GetOrganization200ResponseDataMembersInner from a JSON string"""
51
+ """Create an instance of OrganizationGet200ResponseDataMembersInner from a JSON string"""
52
52
  return cls.from_dict(json.loads(json_str))
53
53
 
54
54
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +73,7 @@ class GetOrganization200ResponseDataMembersInner(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of GetOrganization200ResponseDataMembersInner from a dict"""
76
+ """Create an instance of OrganizationGet200ResponseDataMembersInner from a dict"""
77
77
  if obj is None:
78
78
  return None
79
79
 
@@ -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 GetOrganization200ResponseDataSubscription(BaseModel):
25
+ class OrganizationGet200ResponseDataSubscription(BaseModel):
26
26
  """
27
- GetOrganization200ResponseDataSubscription
27
+ OrganizationGet200ResponseDataSubscription
28
28
  """ # noqa: E501
29
29
  plan_id: Optional[StrictStr] = Field(default=None, alias="planId")
30
30
  __properties: ClassVar[List[str]] = ["planId"]
@@ -47,7 +47,7 @@ class GetOrganization200ResponseDataSubscription(BaseModel):
47
47
 
48
48
  @classmethod
49
49
  def from_json(cls, json_str: str) -> Optional[Self]:
50
- """Create an instance of GetOrganization200ResponseDataSubscription from a JSON string"""
50
+ """Create an instance of OrganizationGet200ResponseDataSubscription from a JSON string"""
51
51
  return cls.from_dict(json.loads(json_str))
52
52
 
53
53
  def to_dict(self) -> Dict[str, Any]:
@@ -72,7 +72,7 @@ class GetOrganization200ResponseDataSubscription(BaseModel):
72
72
 
73
73
  @classmethod
74
74
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
- """Create an instance of GetOrganization200ResponseDataSubscription from a dict"""
75
+ """Create an instance of OrganizationGet200ResponseDataSubscription from a dict"""
76
76
  if obj is None:
77
77
  return None
78
78
 
@@ -0,0 +1,97 @@
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from smallestai.atoms.models.product_phone_numbers_get200_response_data_inner import ProductPhoneNumbersGet200ResponseDataInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ProductPhoneNumbersGet200Response(BaseModel):
27
+ """
28
+ ProductPhoneNumbersGet200Response
29
+ """ # noqa: E501
30
+ status: Optional[StrictBool] = None
31
+ data: Optional[List[ProductPhoneNumbersGet200ResponseDataInner]] = None
32
+ __properties: ClassVar[List[str]] = ["status", "data"]
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 ProductPhoneNumbersGet200Response 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
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
74
+ _items = []
75
+ if self.data:
76
+ for _item_data in self.data:
77
+ if _item_data:
78
+ _items.append(_item_data.to_dict())
79
+ _dict['data'] = _items
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of ProductPhoneNumbersGet200Response from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "status": obj.get("status"),
93
+ "data": [ProductPhoneNumbersGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
94
+ })
95
+ return _obj
96
+
97
+
@@ -0,0 +1,100 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from smallestai.atoms.models.product_phone_numbers_get200_response_data_inner_attributes import ProductPhoneNumbersGet200ResponseDataInnerAttributes
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ProductPhoneNumbersGet200ResponseDataInner(BaseModel):
28
+ """
29
+ ProductPhoneNumbersGet200ResponseDataInner
30
+ """ # noqa: E501
31
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the phone number", alias="_id")
32
+ is_active: Optional[StrictBool] = Field(default=None, description="Whether the phone number is active", alias="isActive")
33
+ attributes: Optional[ProductPhoneNumbersGet200ResponseDataInnerAttributes] = None
34
+ created_at: Optional[datetime] = Field(default=None, description="The date and time when the phone number was created", alias="createdAt")
35
+ updated_at: Optional[datetime] = Field(default=None, description="The date and time when the phone number was last updated", alias="updatedAt")
36
+ __properties: ClassVar[List[str]] = ["_id", "isActive", "attributes", "createdAt", "updatedAt"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ProductPhoneNumbersGet200ResponseDataInner from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # override the default output from pydantic by calling `to_dict()` of attributes
78
+ if self.attributes:
79
+ _dict['attributes'] = self.attributes.to_dict()
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of ProductPhoneNumbersGet200ResponseDataInner from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "_id": obj.get("_id"),
93
+ "isActive": obj.get("isActive"),
94
+ "attributes": ProductPhoneNumbersGet200ResponseDataInnerAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None,
95
+ "createdAt": obj.get("createdAt"),
96
+ "updatedAt": obj.get("updatedAt")
97
+ })
98
+ return _obj
99
+
100
+
@@ -0,0 +1,89 @@
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, 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 ProductPhoneNumbersGet200ResponseDataInnerAttributes(BaseModel):
26
+ """
27
+ Additional attributes of the phone number
28
+ """ # noqa: E501
29
+ provider: Optional[StrictStr] = Field(default=None, description="The telephony provider")
30
+ phone_number: Optional[StrictStr] = Field(default=None, description="The actual phone number", alias="phoneNumber")
31
+ __properties: ClassVar[List[str]] = ["provider", "phoneNumber"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ProductPhoneNumbersGet200ResponseDataInnerAttributes from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of ProductPhoneNumbersGet200ResponseDataInnerAttributes from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "provider": obj.get("provider"),
85
+ "phoneNumber": obj.get("phoneNumber")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,93 @@
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from smallestai.atoms.models.user_get200_response_data import UserGet200ResponseData
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class UserGet200Response(BaseModel):
27
+ """
28
+ UserGet200Response
29
+ """ # noqa: E501
30
+ status: Optional[StrictBool] = None
31
+ data: Optional[UserGet200ResponseData] = None
32
+ __properties: ClassVar[List[str]] = ["status", "data"]
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 UserGet200Response 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
+ # override the default output from pydantic by calling `to_dict()` of data
74
+ if self.data:
75
+ _dict['data'] = self.data.to_dict()
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of UserGet200Response from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "status": obj.get("status"),
89
+ "data": UserGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -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 GetCurrentUser200ResponseData(BaseModel):
25
+ class UserGet200ResponseData(BaseModel):
26
26
  """
27
- GetCurrentUser200ResponseData
27
+ UserGet200ResponseData
28
28
  """ # noqa: E501
29
29
  id: Optional[StrictStr] = Field(default=None, description="The ID of the user", alias="_id")
30
30
  first_name: Optional[StrictStr] = Field(default=None, description="The first name of the user", alias="firstName")
@@ -53,7 +53,7 @@ class GetCurrentUser200ResponseData(BaseModel):
53
53
 
54
54
  @classmethod
55
55
  def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of GetCurrentUser200ResponseData from a JSON string"""
56
+ """Create an instance of UserGet200ResponseData from a JSON string"""
57
57
  return cls.from_dict(json.loads(json_str))
58
58
 
59
59
  def to_dict(self) -> Dict[str, Any]:
@@ -78,7 +78,7 @@ class GetCurrentUser200ResponseData(BaseModel):
78
78
 
79
79
  @classmethod
80
80
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
- """Create an instance of GetCurrentUser200ResponseData from a dict"""
81
+ """Create an instance of UserGet200ResponseData from a dict"""
82
82
  if obj is None:
83
83
  return None
84
84
 
@@ -0,0 +1,124 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from smallestai.atoms.models.webhook_subscription_populated import WebhookSubscriptionPopulated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class Webhook(BaseModel):
28
+ """
29
+ Webhook
30
+ """ # noqa: E501
31
+ id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the webhook", alias="_id")
32
+ url: Optional[StrictStr] = Field(default=None, description="The webhook endpoint URL")
33
+ description: Optional[StrictStr] = Field(default=None, description="The description of the webhook")
34
+ status: Optional[StrictStr] = Field(default=None, description="The status of the webhook")
35
+ organization_id: Optional[StrictStr] = Field(default=None, description="The organization ID", alias="organizationId")
36
+ created_by: Optional[StrictStr] = Field(default=None, description="The user ID who created the webhook", alias="createdBy")
37
+ subscriptions: Optional[List[WebhookSubscriptionPopulated]] = Field(default=None, description="A list of subscriptions for the webhook with populated agent details.")
38
+ decrypted_secret_key: Optional[StrictStr] = Field(default=None, description="The decrypted signing secret for the webhook. This is only returned when fetching a single webhook by ID.", alias="decryptedSecretKey")
39
+ created_at: Optional[datetime] = Field(default=None, description="The date and time when the webhook was created", alias="createdAt")
40
+ updated_at: Optional[datetime] = Field(default=None, description="The date and time when the webhook was last updated", alias="updatedAt")
41
+ __properties: ClassVar[List[str]] = ["_id", "url", "description", "status", "organizationId", "createdBy", "subscriptions", "decryptedSecretKey", "createdAt", "updatedAt"]
42
+
43
+ @field_validator('status')
44
+ def status_validate_enum(cls, value):
45
+ """Validates the enum"""
46
+ if value is None:
47
+ return value
48
+
49
+ if value not in set(['enabled', 'disabled']):
50
+ raise ValueError("must be one of enum values ('enabled', 'disabled')")
51
+ return value
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+
60
+ def to_str(self) -> str:
61
+ """Returns the string representation of the model using alias"""
62
+ return pprint.pformat(self.model_dump(by_alias=True))
63
+
64
+ def to_json(self) -> str:
65
+ """Returns the JSON representation of the model using alias"""
66
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
+ return json.dumps(self.to_dict())
68
+
69
+ @classmethod
70
+ def from_json(cls, json_str: str) -> Optional[Self]:
71
+ """Create an instance of Webhook from a JSON string"""
72
+ return cls.from_dict(json.loads(json_str))
73
+
74
+ def to_dict(self) -> Dict[str, Any]:
75
+ """Return the dictionary representation of the model using alias.
76
+
77
+ This has the following differences from calling pydantic's
78
+ `self.model_dump(by_alias=True)`:
79
+
80
+ * `None` is only added to the output dict for nullable fields that
81
+ were set at model initialization. Other fields with value `None`
82
+ are ignored.
83
+ """
84
+ excluded_fields: Set[str] = set([
85
+ ])
86
+
87
+ _dict = self.model_dump(
88
+ by_alias=True,
89
+ exclude=excluded_fields,
90
+ exclude_none=True,
91
+ )
92
+ # override the default output from pydantic by calling `to_dict()` of each item in subscriptions (list)
93
+ _items = []
94
+ if self.subscriptions:
95
+ for _item_subscriptions in self.subscriptions:
96
+ if _item_subscriptions:
97
+ _items.append(_item_subscriptions.to_dict())
98
+ _dict['subscriptions'] = _items
99
+ return _dict
100
+
101
+ @classmethod
102
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
103
+ """Create an instance of Webhook from a dict"""
104
+ if obj is None:
105
+ return None
106
+
107
+ if not isinstance(obj, dict):
108
+ return cls.model_validate(obj)
109
+
110
+ _obj = cls.model_validate({
111
+ "_id": obj.get("_id"),
112
+ "url": obj.get("url"),
113
+ "description": obj.get("description"),
114
+ "status": obj.get("status"),
115
+ "organizationId": obj.get("organizationId"),
116
+ "createdBy": obj.get("createdBy"),
117
+ "subscriptions": [WebhookSubscriptionPopulated.from_dict(_item) for _item in obj["subscriptions"]] if obj.get("subscriptions") is not None else None,
118
+ "decryptedSecretKey": obj.get("decryptedSecretKey"),
119
+ "createdAt": obj.get("createdAt"),
120
+ "updatedAt": obj.get("updatedAt")
121
+ })
122
+ return _obj
123
+
124
+
@@ -22,13 +22,14 @@ 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 GetCampaigns200ResponseDataInnerAgent(BaseModel):
25
+ class WebhookAgent(BaseModel):
26
26
  """
27
- GetCampaigns200ResponseDataInnerAgent
27
+ WebhookAgent
28
28
  """ # noqa: E501
29
29
  id: Optional[StrictStr] = Field(default=None, description="The ID of the agent", alias="_id")
30
30
  name: Optional[StrictStr] = Field(default=None, description="The name of the agent")
31
- __properties: ClassVar[List[str]] = ["_id", "name"]
31
+ description: Optional[StrictStr] = Field(default=None, description="The description of the agent")
32
+ __properties: ClassVar[List[str]] = ["_id", "name", "description"]
32
33
 
33
34
  model_config = ConfigDict(
34
35
  populate_by_name=True,
@@ -48,7 +49,7 @@ class GetCampaigns200ResponseDataInnerAgent(BaseModel):
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of GetCampaigns200ResponseDataInnerAgent from a JSON string"""
52
+ """Create an instance of WebhookAgent from a JSON string"""
52
53
  return cls.from_dict(json.loads(json_str))
53
54
 
54
55
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +74,7 @@ class GetCampaigns200ResponseDataInnerAgent(BaseModel):
73
74
 
74
75
  @classmethod
75
76
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of GetCampaigns200ResponseDataInnerAgent from a dict"""
77
+ """Create an instance of WebhookAgent from a dict"""
77
78
  if obj is None:
78
79
  return None
79
80
 
@@ -82,7 +83,8 @@ class GetCampaigns200ResponseDataInnerAgent(BaseModel):
82
83
 
83
84
  _obj = cls.model_validate({
84
85
  "_id": obj.get("_id"),
85
- "name": obj.get("name")
86
+ "name": obj.get("name"),
87
+ "description": obj.get("description")
86
88
  })
87
89
  return _obj
88
90