smallestai 2.2.0__py3-none-any.whl → 3.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 (90) hide show
  1. smallestai/__init__.py +95 -0
  2. smallestai/atoms/__init__.py +182 -0
  3. smallestai/atoms/api/__init__.py +12 -0
  4. smallestai/atoms/api/agent_templates_api.py +573 -0
  5. smallestai/atoms/api/agents_api.py +1465 -0
  6. smallestai/atoms/api/calls_api.py +320 -0
  7. smallestai/atoms/api/campaigns_api.py +1689 -0
  8. smallestai/atoms/api/knowledge_base_api.py +2271 -0
  9. smallestai/atoms/api/logs_api.py +305 -0
  10. smallestai/atoms/api/organization_api.py +285 -0
  11. smallestai/atoms/api/user_api.py +285 -0
  12. smallestai/atoms/api_client.py +797 -0
  13. smallestai/atoms/api_response.py +21 -0
  14. smallestai/atoms/atoms_client.py +560 -0
  15. smallestai/atoms/configuration.py +582 -0
  16. smallestai/atoms/exceptions.py +216 -0
  17. smallestai/atoms/models/__init__.py +72 -0
  18. smallestai/atoms/models/agent_dto.py +130 -0
  19. smallestai/atoms/models/agent_dto_language.py +91 -0
  20. smallestai/atoms/models/agent_dto_synthesizer.py +99 -0
  21. smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +111 -0
  22. smallestai/atoms/models/api_response.py +89 -0
  23. smallestai/atoms/models/bad_request_error_response.py +89 -0
  24. smallestai/atoms/models/create_agent_from_template200_response.py +89 -0
  25. smallestai/atoms/models/create_agent_from_template_request.py +91 -0
  26. smallestai/atoms/models/create_agent_request.py +113 -0
  27. smallestai/atoms/models/create_agent_request_language.py +124 -0
  28. smallestai/atoms/models/create_agent_request_language_synthesizer.py +110 -0
  29. smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +137 -0
  30. smallestai/atoms/models/create_campaign201_response.py +93 -0
  31. smallestai/atoms/models/create_campaign201_response_data.py +104 -0
  32. smallestai/atoms/models/create_campaign_request.py +93 -0
  33. smallestai/atoms/models/create_knowledge_base201_response.py +89 -0
  34. smallestai/atoms/models/create_knowledge_base_request.py +89 -0
  35. smallestai/atoms/models/delete_agent200_response.py +87 -0
  36. smallestai/atoms/models/get_agent_by_id200_response.py +93 -0
  37. smallestai/atoms/models/get_agent_templates200_response.py +97 -0
  38. smallestai/atoms/models/get_agent_templates200_response_data_inner.py +97 -0
  39. smallestai/atoms/models/get_agents200_response.py +93 -0
  40. smallestai/atoms/models/get_agents200_response_data.py +101 -0
  41. smallestai/atoms/models/get_campaign_by_id200_response.py +93 -0
  42. smallestai/atoms/models/get_campaign_by_id200_response_data.py +110 -0
  43. smallestai/atoms/models/get_campaigns200_response.py +97 -0
  44. smallestai/atoms/models/get_campaigns200_response_data_inner.py +118 -0
  45. smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +89 -0
  46. smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +89 -0
  47. smallestai/atoms/models/get_campaigns_request.py +89 -0
  48. smallestai/atoms/models/get_conversation_logs200_response.py +93 -0
  49. smallestai/atoms/models/get_conversation_logs200_response_data.py +125 -0
  50. smallestai/atoms/models/get_current_user200_response.py +93 -0
  51. smallestai/atoms/models/get_current_user200_response_data.py +99 -0
  52. smallestai/atoms/models/get_knowledge_base_by_id200_response.py +93 -0
  53. smallestai/atoms/models/get_knowledge_base_items200_response.py +97 -0
  54. smallestai/atoms/models/get_knowledge_bases200_response.py +97 -0
  55. smallestai/atoms/models/get_organization200_response.py +93 -0
  56. smallestai/atoms/models/get_organization200_response_data.py +105 -0
  57. smallestai/atoms/models/get_organization200_response_data_members_inner.py +89 -0
  58. smallestai/atoms/models/get_organization200_response_data_subscription.py +87 -0
  59. smallestai/atoms/models/internal_server_error_response.py +89 -0
  60. smallestai/atoms/models/knowledge_base_dto.py +93 -0
  61. smallestai/atoms/models/knowledge_base_item_dto.py +124 -0
  62. smallestai/atoms/models/start_outbound_call200_response.py +93 -0
  63. smallestai/atoms/models/start_outbound_call200_response_data.py +87 -0
  64. smallestai/atoms/models/start_outbound_call_request.py +89 -0
  65. smallestai/atoms/models/unauthorized_error_reponse.py +89 -0
  66. smallestai/atoms/models/update_agent200_response.py +89 -0
  67. smallestai/atoms/models/update_agent_request.py +119 -0
  68. smallestai/atoms/models/update_agent_request_language.py +99 -0
  69. smallestai/atoms/models/update_agent_request_synthesizer.py +110 -0
  70. smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +137 -0
  71. smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +111 -0
  72. smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +99 -0
  73. smallestai/atoms/models/upload_text_to_knowledge_base_request.py +89 -0
  74. smallestai/atoms/py.typed +0 -0
  75. smallestai/atoms/rest.py +258 -0
  76. smallestai/waves/__init__.py +5 -0
  77. smallest/async_tts.py → smallestai/waves/async_waves_client.py +3 -3
  78. {smallest → smallestai/waves}/stream_tts.py +6 -6
  79. {smallest → smallestai/waves}/utils.py +2 -2
  80. smallest/tts.py → smallestai/waves/waves_client.py +3 -3
  81. {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info}/METADATA +182 -43
  82. smallestai-3.0.1.dist-info/RECORD +87 -0
  83. {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info}/WHEEL +1 -1
  84. smallestai-3.0.1.dist-info/top_level.txt +1 -0
  85. smallest/__init__.py +0 -5
  86. smallestai-2.2.0.dist-info/RECORD +0 -12
  87. smallestai-2.2.0.dist-info/top_level.txt +0 -1
  88. {smallest → smallestai/waves}/exceptions.py +0 -0
  89. {smallest → smallestai/waves}/models.py +0 -0
  90. {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info/licenses}/LICENSE +0 -0
@@ -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, 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 KnowledgeBaseDTO(BaseModel):
26
+ """
27
+ KnowledgeBaseDTO
28
+ """ # noqa: E501
29
+ id: StrictStr = Field(description="The unique identifier for the knowledge base", alias="_id")
30
+ name: StrictStr = Field(description="The name of the knowledge base")
31
+ description: Optional[StrictStr] = Field(default=None, description="Description of the knowledge base")
32
+ organization: StrictStr = Field(description="The organization ID this knowledge base belongs to")
33
+ __properties: ClassVar[List[str]] = ["_id", "name", "description", "organization"]
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 KnowledgeBaseDTO 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
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of KnowledgeBaseDTO from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "_id": obj.get("_id"),
87
+ "name": obj.get("name"),
88
+ "description": obj.get("description"),
89
+ "organization": obj.get("organization")
90
+ })
91
+ return _obj
92
+
93
+
@@ -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, StrictFloat, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class KnowledgeBaseItemDTO(BaseModel):
27
+ """
28
+ KnowledgeBaseItemDTO
29
+ """ # noqa: E501
30
+ id: StrictStr = Field(alias="_id")
31
+ item_type: StrictStr = Field(alias="itemType")
32
+ metadata: Optional[Dict[str, Any]] = None
33
+ knowledge_base_id: StrictStr = Field(alias="knowledgeBaseId")
34
+ processing_status: StrictStr = Field(alias="processingStatus")
35
+ content_type: Optional[StrictStr] = Field(default=None, alias="contentType")
36
+ size: Optional[Union[StrictFloat, StrictInt]] = None
37
+ key: Optional[StrictStr] = None
38
+ title: Optional[StrictStr] = None
39
+ content: Optional[StrictStr] = None
40
+ created_at: datetime = Field(alias="createdAt")
41
+ updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
42
+ __properties: ClassVar[List[str]] = ["_id", "itemType", "metadata", "knowledgeBaseId", "processingStatus", "contentType", "size", "key", "title", "content", "createdAt", "updatedAt"]
43
+
44
+ @field_validator('item_type')
45
+ def item_type_validate_enum(cls, value):
46
+ """Validates the enum"""
47
+ if value not in set(['file', 'text']):
48
+ raise ValueError("must be one of enum values ('file', 'text')")
49
+ return value
50
+
51
+ @field_validator('processing_status')
52
+ def processing_status_validate_enum(cls, value):
53
+ """Validates the enum"""
54
+ if value not in set(['pending', 'processing', 'completed', 'failed']):
55
+ raise ValueError("must be one of enum values ('pending', 'processing', 'completed', 'failed')")
56
+ return value
57
+
58
+ model_config = ConfigDict(
59
+ populate_by_name=True,
60
+ validate_assignment=True,
61
+ protected_namespaces=(),
62
+ )
63
+
64
+
65
+ def to_str(self) -> str:
66
+ """Returns the string representation of the model using alias"""
67
+ return pprint.pformat(self.model_dump(by_alias=True))
68
+
69
+ def to_json(self) -> str:
70
+ """Returns the JSON representation of the model using alias"""
71
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
72
+ return json.dumps(self.to_dict())
73
+
74
+ @classmethod
75
+ def from_json(cls, json_str: str) -> Optional[Self]:
76
+ """Create an instance of KnowledgeBaseItemDTO from a JSON string"""
77
+ return cls.from_dict(json.loads(json_str))
78
+
79
+ def to_dict(self) -> Dict[str, Any]:
80
+ """Return the dictionary representation of the model using alias.
81
+
82
+ This has the following differences from calling pydantic's
83
+ `self.model_dump(by_alias=True)`:
84
+
85
+ * `None` is only added to the output dict for nullable fields that
86
+ were set at model initialization. Other fields with value `None`
87
+ are ignored.
88
+ """
89
+ excluded_fields: Set[str] = set([
90
+ ])
91
+
92
+ _dict = self.model_dump(
93
+ by_alias=True,
94
+ exclude=excluded_fields,
95
+ exclude_none=True,
96
+ )
97
+ return _dict
98
+
99
+ @classmethod
100
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
101
+ """Create an instance of KnowledgeBaseItemDTO from a dict"""
102
+ if obj is None:
103
+ return None
104
+
105
+ if not isinstance(obj, dict):
106
+ return cls.model_validate(obj)
107
+
108
+ _obj = cls.model_validate({
109
+ "_id": obj.get("_id"),
110
+ "itemType": obj.get("itemType"),
111
+ "metadata": obj.get("metadata"),
112
+ "knowledgeBaseId": obj.get("knowledgeBaseId"),
113
+ "processingStatus": obj.get("processingStatus"),
114
+ "contentType": obj.get("contentType"),
115
+ "size": obj.get("size"),
116
+ "key": obj.get("key"),
117
+ "title": obj.get("title"),
118
+ "content": obj.get("content"),
119
+ "createdAt": obj.get("createdAt"),
120
+ "updatedAt": obj.get("updatedAt")
121
+ })
122
+ return _obj
123
+
124
+
@@ -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.start_outbound_call200_response_data import StartOutboundCall200ResponseData
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class StartOutboundCall200Response(BaseModel):
27
+ """
28
+ StartOutboundCall200Response
29
+ """ # noqa: E501
30
+ status: Optional[StrictBool] = None
31
+ data: Optional[StartOutboundCall200ResponseData] = 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 StartOutboundCall200Response 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 StartOutboundCall200Response 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": StartOutboundCall200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,87 @@
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 StartOutboundCall200ResponseData(BaseModel):
26
+ """
27
+ StartOutboundCall200ResponseData
28
+ """ # noqa: E501
29
+ conversation_id: Optional[StrictStr] = Field(default=None, description="The ID of the initiated call", alias="conversationId")
30
+ __properties: ClassVar[List[str]] = ["conversationId"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of StartOutboundCall200ResponseData from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of StartOutboundCall200ResponseData from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "conversationId": obj.get("conversationId")
84
+ })
85
+ return _obj
86
+
87
+
@@ -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
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class StartOutboundCallRequest(BaseModel):
26
+ """
27
+ StartOutboundCallRequest
28
+ """ # noqa: E501
29
+ agent_id: StrictStr = Field(description="The ID of the agent initiating the conversation", alias="agentId")
30
+ phone_number: StrictStr = Field(description="The phone number to call", alias="phoneNumber")
31
+ __properties: ClassVar[List[str]] = ["agentId", "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 StartOutboundCallRequest 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 StartOutboundCallRequest 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
+ "agentId": obj.get("agentId"),
85
+ "phoneNumber": obj.get("phoneNumber")
86
+ })
87
+ return _obj
88
+
89
+
@@ -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, 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 UnauthorizedErrorReponse(BaseModel):
26
+ """
27
+ UnauthorizedErrorReponse
28
+ """ # noqa: E501
29
+ status: Optional[StrictBool] = None
30
+ errors: Optional[List[StrictStr]] = None
31
+ __properties: ClassVar[List[str]] = ["status", "errors"]
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 UnauthorizedErrorReponse 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 UnauthorizedErrorReponse 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
+ "status": obj.get("status"),
85
+ "errors": obj.get("errors")
86
+ })
87
+ return _obj
88
+
89
+
@@ -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, 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 UpdateAgent200Response(BaseModel):
26
+ """
27
+ UpdateAgent200Response
28
+ """ # noqa: E501
29
+ status: Optional[StrictBool] = None
30
+ data: Optional[StrictStr] = Field(default=None, description="The ID of the updated agent")
31
+ __properties: ClassVar[List[str]] = ["status", "data"]
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 UpdateAgent200Response 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 UpdateAgent200Response 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
+ "status": obj.get("status"),
85
+ "data": obj.get("data")
86
+ })
87
+ return _obj
88
+
89
+