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.
- smallestai/__init__.py +95 -0
- smallestai/atoms/__init__.py +182 -0
- smallestai/atoms/api/__init__.py +12 -0
- smallestai/atoms/api/agent_templates_api.py +573 -0
- smallestai/atoms/api/agents_api.py +1465 -0
- smallestai/atoms/api/calls_api.py +320 -0
- smallestai/atoms/api/campaigns_api.py +1689 -0
- smallestai/atoms/api/knowledge_base_api.py +2271 -0
- smallestai/atoms/api/logs_api.py +305 -0
- smallestai/atoms/api/organization_api.py +285 -0
- smallestai/atoms/api/user_api.py +285 -0
- smallestai/atoms/api_client.py +797 -0
- smallestai/atoms/api_response.py +21 -0
- smallestai/atoms/atoms_client.py +560 -0
- smallestai/atoms/configuration.py +582 -0
- smallestai/atoms/exceptions.py +216 -0
- smallestai/atoms/models/__init__.py +72 -0
- smallestai/atoms/models/agent_dto.py +130 -0
- smallestai/atoms/models/agent_dto_language.py +91 -0
- smallestai/atoms/models/agent_dto_synthesizer.py +99 -0
- smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +111 -0
- smallestai/atoms/models/api_response.py +89 -0
- smallestai/atoms/models/bad_request_error_response.py +89 -0
- smallestai/atoms/models/create_agent_from_template200_response.py +89 -0
- smallestai/atoms/models/create_agent_from_template_request.py +91 -0
- smallestai/atoms/models/create_agent_request.py +113 -0
- smallestai/atoms/models/create_agent_request_language.py +124 -0
- smallestai/atoms/models/create_agent_request_language_synthesizer.py +110 -0
- smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +137 -0
- smallestai/atoms/models/create_campaign201_response.py +93 -0
- smallestai/atoms/models/create_campaign201_response_data.py +104 -0
- smallestai/atoms/models/create_campaign_request.py +93 -0
- smallestai/atoms/models/create_knowledge_base201_response.py +89 -0
- smallestai/atoms/models/create_knowledge_base_request.py +89 -0
- smallestai/atoms/models/delete_agent200_response.py +87 -0
- smallestai/atoms/models/get_agent_by_id200_response.py +93 -0
- smallestai/atoms/models/get_agent_templates200_response.py +97 -0
- smallestai/atoms/models/get_agent_templates200_response_data_inner.py +97 -0
- smallestai/atoms/models/get_agents200_response.py +93 -0
- smallestai/atoms/models/get_agents200_response_data.py +101 -0
- smallestai/atoms/models/get_campaign_by_id200_response.py +93 -0
- smallestai/atoms/models/get_campaign_by_id200_response_data.py +110 -0
- smallestai/atoms/models/get_campaigns200_response.py +97 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner.py +118 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +89 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +89 -0
- smallestai/atoms/models/get_campaigns_request.py +89 -0
- smallestai/atoms/models/get_conversation_logs200_response.py +93 -0
- smallestai/atoms/models/get_conversation_logs200_response_data.py +125 -0
- smallestai/atoms/models/get_current_user200_response.py +93 -0
- smallestai/atoms/models/get_current_user200_response_data.py +99 -0
- smallestai/atoms/models/get_knowledge_base_by_id200_response.py +93 -0
- smallestai/atoms/models/get_knowledge_base_items200_response.py +97 -0
- smallestai/atoms/models/get_knowledge_bases200_response.py +97 -0
- smallestai/atoms/models/get_organization200_response.py +93 -0
- smallestai/atoms/models/get_organization200_response_data.py +105 -0
- smallestai/atoms/models/get_organization200_response_data_members_inner.py +89 -0
- smallestai/atoms/models/get_organization200_response_data_subscription.py +87 -0
- smallestai/atoms/models/internal_server_error_response.py +89 -0
- smallestai/atoms/models/knowledge_base_dto.py +93 -0
- smallestai/atoms/models/knowledge_base_item_dto.py +124 -0
- smallestai/atoms/models/start_outbound_call200_response.py +93 -0
- smallestai/atoms/models/start_outbound_call200_response_data.py +87 -0
- smallestai/atoms/models/start_outbound_call_request.py +89 -0
- smallestai/atoms/models/unauthorized_error_reponse.py +89 -0
- smallestai/atoms/models/update_agent200_response.py +89 -0
- smallestai/atoms/models/update_agent_request.py +119 -0
- smallestai/atoms/models/update_agent_request_language.py +99 -0
- smallestai/atoms/models/update_agent_request_synthesizer.py +110 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +137 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +111 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +99 -0
- smallestai/atoms/models/upload_text_to_knowledge_base_request.py +89 -0
- smallestai/atoms/py.typed +0 -0
- smallestai/atoms/rest.py +258 -0
- smallestai/waves/__init__.py +5 -0
- smallest/async_tts.py → smallestai/waves/async_waves_client.py +3 -3
- {smallest → smallestai/waves}/stream_tts.py +6 -6
- {smallest → smallestai/waves}/utils.py +2 -2
- smallest/tts.py → smallestai/waves/waves_client.py +3 -3
- {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info}/METADATA +182 -43
- smallestai-3.0.1.dist-info/RECORD +87 -0
- {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info}/WHEEL +1 -1
- smallestai-3.0.1.dist-info/top_level.txt +1 -0
- smallest/__init__.py +0 -5
- smallestai-2.2.0.dist-info/RECORD +0 -12
- smallestai-2.2.0.dist-info/top_level.txt +0 -1
- {smallest → smallestai/waves}/exceptions.py +0 -0
- {smallest → smallestai/waves}/models.py +0 -0
- {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""API response object."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from typing import Optional, Generic, Mapping, TypeVar
|
|
5
|
+
from pydantic import Field, StrictInt, StrictBytes, BaseModel
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T")
|
|
8
|
+
|
|
9
|
+
class ApiResponse(BaseModel, Generic[T]):
|
|
10
|
+
"""
|
|
11
|
+
API response object
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
status_code: StrictInt = Field(description="HTTP status code")
|
|
15
|
+
headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
|
|
16
|
+
data: T = Field(description="Deserialized data given the data type")
|
|
17
|
+
raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
|
|
18
|
+
|
|
19
|
+
model_config = {
|
|
20
|
+
"arbitrary_types_allowed": True
|
|
21
|
+
}
|
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
from typing import Dict, List, Optional, Tuple, Union, Any
|
|
2
|
+
from typing_extensions import Annotated
|
|
3
|
+
from pydantic import StrictFloat, StrictStr, StrictInt, StrictBytes, Field, validate_call
|
|
4
|
+
|
|
5
|
+
from smallestai.atoms.configuration import Configuration
|
|
6
|
+
from smallestai.atoms.api.agents_api import AgentsApi
|
|
7
|
+
from smallestai.atoms.api.knowledge_base_api import KnowledgeBaseApi
|
|
8
|
+
from smallestai.atoms.api.calls_api import CallsApi
|
|
9
|
+
from smallestai.atoms.models.create_agent_request import CreateAgentRequest
|
|
10
|
+
from smallestai.atoms.models.update_agent_request import UpdateAgentRequest
|
|
11
|
+
from smallestai.atoms.models.create_knowledge_base_request import CreateKnowledgeBaseRequest
|
|
12
|
+
from smallestai.atoms.models.upload_text_to_knowledge_base_request import UploadTextToKnowledgeBaseRequest
|
|
13
|
+
from smallestai.atoms.models.start_outbound_call_request import StartOutboundCallRequest
|
|
14
|
+
from smallestai.atoms.api_client import ApiClient
|
|
15
|
+
from smallestai.atoms.api.user_api import UserApi
|
|
16
|
+
from smallestai.atoms.api.organization_api import OrganizationApi
|
|
17
|
+
from smallestai.atoms.models.get_current_user200_response import GetCurrentUser200Response
|
|
18
|
+
from smallestai.atoms.models.get_organization200_response import GetOrganization200Response
|
|
19
|
+
from smallestai.atoms.api.campaigns_api import CampaignsApi
|
|
20
|
+
from smallestai.atoms.models.create_campaign_request import CreateCampaignRequest
|
|
21
|
+
from smallestai.atoms.models.get_campaigns_request import GetCampaignsRequest
|
|
22
|
+
from smallestai.atoms.api.agent_templates_api import AgentTemplatesApi
|
|
23
|
+
from smallestai.atoms.models.create_agent_from_template_request import CreateAgentFromTemplateRequest
|
|
24
|
+
from smallestai.atoms.api.logs_api import LogsApi
|
|
25
|
+
from smallestai.atoms.models.get_conversation_logs200_response import GetConversationLogs200Response
|
|
26
|
+
|
|
27
|
+
class AtomsClient:
|
|
28
|
+
def __init__(self, configuration=None) -> None:
|
|
29
|
+
if configuration is None:
|
|
30
|
+
configuration = Configuration.get_default()
|
|
31
|
+
|
|
32
|
+
self.api_client = ApiClient(configuration)
|
|
33
|
+
self.agents_api = AgentsApi(self.api_client)
|
|
34
|
+
self.knowledge_base_api = KnowledgeBaseApi(self.api_client)
|
|
35
|
+
self.calls_api = CallsApi(self.api_client)
|
|
36
|
+
self.user_api = UserApi(self.api_client)
|
|
37
|
+
self.organization_api = OrganizationApi(self.api_client)
|
|
38
|
+
self.campaigns_api = CampaignsApi(self.api_client)
|
|
39
|
+
self.agent_templates_api = AgentTemplatesApi(self.api_client)
|
|
40
|
+
self.logs_api = LogsApi(self.api_client)
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def create_agent(
|
|
44
|
+
self,
|
|
45
|
+
create_agent_request: CreateAgentRequest,
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
):
|
|
59
|
+
return self.agents_api.create_agent(
|
|
60
|
+
create_agent_request=create_agent_request,
|
|
61
|
+
_request_timeout=_request_timeout,
|
|
62
|
+
_request_auth=_request_auth,
|
|
63
|
+
_content_type=_content_type,
|
|
64
|
+
_headers=_headers,
|
|
65
|
+
_host_index=_host_index
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
@validate_call
|
|
69
|
+
def delete_agent(
|
|
70
|
+
self,
|
|
71
|
+
id: StrictStr,
|
|
72
|
+
_request_timeout: Union[
|
|
73
|
+
None,
|
|
74
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
75
|
+
Tuple[
|
|
76
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
77
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
78
|
+
]
|
|
79
|
+
] = None,
|
|
80
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
81
|
+
_content_type: Optional[StrictStr] = None,
|
|
82
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
83
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
84
|
+
):
|
|
85
|
+
return self.agents_api.delete_agent(
|
|
86
|
+
id=id,
|
|
87
|
+
_request_timeout=_request_timeout,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
@validate_call
|
|
95
|
+
def get_agent_by_id(
|
|
96
|
+
self,
|
|
97
|
+
id: StrictStr,
|
|
98
|
+
_request_timeout: Union[
|
|
99
|
+
None,
|
|
100
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
101
|
+
Tuple[
|
|
102
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
103
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
104
|
+
]
|
|
105
|
+
] = None,
|
|
106
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
107
|
+
_content_type: Optional[StrictStr] = None,
|
|
108
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
109
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
110
|
+
):
|
|
111
|
+
return self.agents_api.get_agent_by_id(
|
|
112
|
+
id=id,
|
|
113
|
+
_request_timeout=_request_timeout,
|
|
114
|
+
_request_auth=_request_auth,
|
|
115
|
+
_content_type=_content_type,
|
|
116
|
+
_headers=_headers,
|
|
117
|
+
_host_index=_host_index
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def get_agents(
|
|
122
|
+
self,
|
|
123
|
+
page: Optional[StrictInt] = None,
|
|
124
|
+
offset: Optional[StrictInt] = None,
|
|
125
|
+
search: Optional[StrictStr] = None,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
):
|
|
139
|
+
return self.agents_api.get_agents(
|
|
140
|
+
page=page,
|
|
141
|
+
offset=offset,
|
|
142
|
+
search=search,
|
|
143
|
+
_request_timeout=_request_timeout,
|
|
144
|
+
_request_auth=_request_auth,
|
|
145
|
+
_content_type=_content_type,
|
|
146
|
+
_headers=_headers,
|
|
147
|
+
_host_index=_host_index
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
@validate_call
|
|
151
|
+
def update_agent(
|
|
152
|
+
self,
|
|
153
|
+
id: StrictStr,
|
|
154
|
+
update_agent_request: UpdateAgentRequest,
|
|
155
|
+
_request_timeout: Union[
|
|
156
|
+
None,
|
|
157
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
158
|
+
Tuple[
|
|
159
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
160
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
161
|
+
]
|
|
162
|
+
] = None,
|
|
163
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
164
|
+
_content_type: Optional[StrictStr] = None,
|
|
165
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
166
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
167
|
+
):
|
|
168
|
+
return self.agents_api.update_agent(
|
|
169
|
+
id=id,
|
|
170
|
+
update_agent_request=update_agent_request,
|
|
171
|
+
_request_timeout=_request_timeout,
|
|
172
|
+
_request_auth=_request_auth,
|
|
173
|
+
_content_type=_content_type,
|
|
174
|
+
_headers=_headers,
|
|
175
|
+
_host_index=_host_index
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
# Knowledge Base Methods
|
|
179
|
+
@validate_call
|
|
180
|
+
def create_knowledge_base(
|
|
181
|
+
self,
|
|
182
|
+
create_knowledge_base_request: CreateKnowledgeBaseRequest,
|
|
183
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
184
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
185
|
+
_content_type: Optional[StrictStr] = None,
|
|
186
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
187
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
188
|
+
):
|
|
189
|
+
return self.knowledge_base_api.create_knowledge_base(
|
|
190
|
+
create_knowledge_base_request=create_knowledge_base_request,
|
|
191
|
+
_request_timeout=_request_timeout,
|
|
192
|
+
_request_auth=_request_auth,
|
|
193
|
+
_content_type=_content_type,
|
|
194
|
+
_headers=_headers,
|
|
195
|
+
_host_index=_host_index
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
@validate_call
|
|
199
|
+
def delete_knowledge_base(
|
|
200
|
+
self,
|
|
201
|
+
id: StrictStr,
|
|
202
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
):
|
|
208
|
+
return self.knowledge_base_api.delete_knowledge_base(
|
|
209
|
+
id=id,
|
|
210
|
+
_request_timeout=_request_timeout,
|
|
211
|
+
_request_auth=_request_auth,
|
|
212
|
+
_content_type=_content_type,
|
|
213
|
+
_headers=_headers,
|
|
214
|
+
_host_index=_host_index
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
@validate_call
|
|
218
|
+
def get_knowledge_base_by_id(
|
|
219
|
+
self,
|
|
220
|
+
id: StrictStr,
|
|
221
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
222
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
223
|
+
_content_type: Optional[StrictStr] = None,
|
|
224
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
225
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
226
|
+
):
|
|
227
|
+
return self.knowledge_base_api.get_knowledge_base_by_id(
|
|
228
|
+
id=id,
|
|
229
|
+
_request_timeout=_request_timeout,
|
|
230
|
+
_request_auth=_request_auth,
|
|
231
|
+
_content_type=_content_type,
|
|
232
|
+
_headers=_headers,
|
|
233
|
+
_host_index=_host_index
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
@validate_call
|
|
237
|
+
def get_knowledge_bases(
|
|
238
|
+
self,
|
|
239
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
240
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
241
|
+
_content_type: Optional[StrictStr] = None,
|
|
242
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
243
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
244
|
+
):
|
|
245
|
+
return self.knowledge_base_api.get_knowledge_bases(
|
|
246
|
+
_request_timeout=_request_timeout,
|
|
247
|
+
_request_auth=_request_auth,
|
|
248
|
+
_content_type=_content_type,
|
|
249
|
+
_headers=_headers,
|
|
250
|
+
_host_index=_host_index
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
@validate_call
|
|
254
|
+
def upload_text_to_knowledge_base(
|
|
255
|
+
self,
|
|
256
|
+
id: StrictStr,
|
|
257
|
+
upload_text_to_knowledge_base_request: UploadTextToKnowledgeBaseRequest,
|
|
258
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
259
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
260
|
+
_content_type: Optional[StrictStr] = None,
|
|
261
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
262
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
263
|
+
):
|
|
264
|
+
return self.knowledge_base_api.upload_text_to_knowledge_base(
|
|
265
|
+
id=id,
|
|
266
|
+
upload_text_to_knowledge_base_request=upload_text_to_knowledge_base_request,
|
|
267
|
+
_request_timeout=_request_timeout,
|
|
268
|
+
_request_auth=_request_auth,
|
|
269
|
+
_content_type=_content_type,
|
|
270
|
+
_headers=_headers,
|
|
271
|
+
_host_index=_host_index
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
@validate_call
|
|
275
|
+
def upload_media_to_knowledge_base(
|
|
276
|
+
self,
|
|
277
|
+
id: StrictStr,
|
|
278
|
+
media: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
279
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
280
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
281
|
+
_content_type: Optional[StrictStr] = None,
|
|
282
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
283
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
284
|
+
):
|
|
285
|
+
return self.knowledge_base_api.upload_media_to_knowledge_base(
|
|
286
|
+
id=id,
|
|
287
|
+
media=media,
|
|
288
|
+
_request_timeout=_request_timeout,
|
|
289
|
+
_request_auth=_request_auth,
|
|
290
|
+
_content_type=_content_type,
|
|
291
|
+
_headers=_headers,
|
|
292
|
+
_host_index=_host_index
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
@validate_call
|
|
296
|
+
def get_knowledge_base_items(
|
|
297
|
+
self,
|
|
298
|
+
id: StrictStr,
|
|
299
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
300
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
301
|
+
_content_type: Optional[StrictStr] = None,
|
|
302
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
303
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
304
|
+
):
|
|
305
|
+
return self.knowledge_base_api.get_knowledge_base_items(
|
|
306
|
+
id=id,
|
|
307
|
+
_request_timeout=_request_timeout,
|
|
308
|
+
_request_auth=_request_auth,
|
|
309
|
+
_content_type=_content_type,
|
|
310
|
+
_headers=_headers,
|
|
311
|
+
_host_index=_host_index
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
@validate_call
|
|
315
|
+
def delete_knowledge_base_item(
|
|
316
|
+
self,
|
|
317
|
+
knowledge_base_id: StrictStr,
|
|
318
|
+
knowledge_base_item_id: StrictStr,
|
|
319
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
320
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
321
|
+
_content_type: Optional[StrictStr] = None,
|
|
322
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
323
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
324
|
+
):
|
|
325
|
+
return self.knowledge_base_api.delete_knowledge_base_item(
|
|
326
|
+
knowledge_base_id=knowledge_base_id,
|
|
327
|
+
knowledge_base_item_id=knowledge_base_item_id,
|
|
328
|
+
_request_timeout=_request_timeout,
|
|
329
|
+
_request_auth=_request_auth,
|
|
330
|
+
_content_type=_content_type,
|
|
331
|
+
_headers=_headers,
|
|
332
|
+
_host_index=_host_index
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
# Calls Methods
|
|
336
|
+
@validate_call
|
|
337
|
+
def start_outbound_call(
|
|
338
|
+
self,
|
|
339
|
+
start_outbound_call_request: StartOutboundCallRequest,
|
|
340
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
+
):
|
|
346
|
+
return self.calls_api.start_outbound_call(
|
|
347
|
+
start_outbound_call_request=start_outbound_call_request,
|
|
348
|
+
_request_timeout=_request_timeout,
|
|
349
|
+
_request_auth=_request_auth,
|
|
350
|
+
_content_type=_content_type,
|
|
351
|
+
_headers=_headers,
|
|
352
|
+
_host_index=_host_index
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
# User Methods
|
|
356
|
+
@validate_call
|
|
357
|
+
def get_current_user(
|
|
358
|
+
self,
|
|
359
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
360
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
361
|
+
_content_type: Optional[StrictStr] = None,
|
|
362
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
364
|
+
) -> GetCurrentUser200Response:
|
|
365
|
+
return self.user_api.get_current_user(
|
|
366
|
+
_request_timeout=_request_timeout,
|
|
367
|
+
_request_auth=_request_auth,
|
|
368
|
+
_content_type=_content_type,
|
|
369
|
+
_headers=_headers,
|
|
370
|
+
_host_index=_host_index
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
# Organization Methods
|
|
374
|
+
@validate_call
|
|
375
|
+
def get_organization(
|
|
376
|
+
self,
|
|
377
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
378
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
379
|
+
_content_type: Optional[StrictStr] = None,
|
|
380
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
381
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
382
|
+
) -> GetOrganization200Response:
|
|
383
|
+
return self.organization_api.get_organization(
|
|
384
|
+
_request_timeout=_request_timeout,
|
|
385
|
+
_request_auth=_request_auth,
|
|
386
|
+
_content_type=_content_type,
|
|
387
|
+
_headers=_headers,
|
|
388
|
+
_host_index=_host_index
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
# Campaign Methods
|
|
392
|
+
@validate_call
|
|
393
|
+
def create_campaign(
|
|
394
|
+
self,
|
|
395
|
+
create_campaign_request: CreateCampaignRequest,
|
|
396
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
397
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
398
|
+
_content_type: Optional[StrictStr] = None,
|
|
399
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
400
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
401
|
+
):
|
|
402
|
+
return self.campaigns_api.create_campaign(
|
|
403
|
+
create_campaign_request=create_campaign_request,
|
|
404
|
+
_request_timeout=_request_timeout,
|
|
405
|
+
_request_auth=_request_auth,
|
|
406
|
+
_content_type=_content_type,
|
|
407
|
+
_headers=_headers,
|
|
408
|
+
_host_index=_host_index
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
@validate_call
|
|
412
|
+
def delete_campaign(
|
|
413
|
+
self,
|
|
414
|
+
id: StrictStr,
|
|
415
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
416
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
417
|
+
_content_type: Optional[StrictStr] = None,
|
|
418
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
420
|
+
):
|
|
421
|
+
return self.campaigns_api.delete_campaign(
|
|
422
|
+
id=id,
|
|
423
|
+
_request_timeout=_request_timeout,
|
|
424
|
+
_request_auth=_request_auth,
|
|
425
|
+
_content_type=_content_type,
|
|
426
|
+
_headers=_headers,
|
|
427
|
+
_host_index=_host_index
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
@validate_call
|
|
431
|
+
def get_campaign_by_id(
|
|
432
|
+
self,
|
|
433
|
+
id: StrictStr,
|
|
434
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
435
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
436
|
+
_content_type: Optional[StrictStr] = None,
|
|
437
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
438
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
439
|
+
):
|
|
440
|
+
return self.campaigns_api.get_campaign_by_id(
|
|
441
|
+
id=id,
|
|
442
|
+
_request_timeout=_request_timeout,
|
|
443
|
+
_request_auth=_request_auth,
|
|
444
|
+
_content_type=_content_type,
|
|
445
|
+
_headers=_headers,
|
|
446
|
+
_host_index=_host_index
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
@validate_call
|
|
450
|
+
def get_campaigns(
|
|
451
|
+
self,
|
|
452
|
+
get_campaigns_request: GetCampaignsRequest,
|
|
453
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
454
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
455
|
+
_content_type: Optional[StrictStr] = None,
|
|
456
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
457
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
458
|
+
):
|
|
459
|
+
return self.campaigns_api.get_campaigns(
|
|
460
|
+
get_campaigns_request=get_campaigns_request,
|
|
461
|
+
_request_timeout=_request_timeout,
|
|
462
|
+
_request_auth=_request_auth,
|
|
463
|
+
_content_type=_content_type,
|
|
464
|
+
_headers=_headers,
|
|
465
|
+
_host_index=_host_index
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
@validate_call
|
|
469
|
+
def start_campaign(
|
|
470
|
+
self,
|
|
471
|
+
id: StrictStr,
|
|
472
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
473
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
474
|
+
_content_type: Optional[StrictStr] = None,
|
|
475
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
476
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
477
|
+
):
|
|
478
|
+
return self.campaigns_api.start_campaign(
|
|
479
|
+
id=id,
|
|
480
|
+
_request_timeout=_request_timeout,
|
|
481
|
+
_request_auth=_request_auth,
|
|
482
|
+
_content_type=_content_type,
|
|
483
|
+
_headers=_headers,
|
|
484
|
+
_host_index=_host_index
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
@validate_call
|
|
488
|
+
def pause_campaign(
|
|
489
|
+
self,
|
|
490
|
+
id: StrictStr,
|
|
491
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
492
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
493
|
+
_content_type: Optional[StrictStr] = None,
|
|
494
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
495
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
496
|
+
):
|
|
497
|
+
return self.campaigns_api.pause_campaign(
|
|
498
|
+
id=id,
|
|
499
|
+
_request_timeout=_request_timeout,
|
|
500
|
+
_request_auth=_request_auth,
|
|
501
|
+
_content_type=_content_type,
|
|
502
|
+
_headers=_headers,
|
|
503
|
+
_host_index=_host_index
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
# Agent Template Methods
|
|
507
|
+
@validate_call
|
|
508
|
+
def get_agent_templates(
|
|
509
|
+
self,
|
|
510
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
511
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
512
|
+
_content_type: Optional[StrictStr] = None,
|
|
513
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
514
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
515
|
+
):
|
|
516
|
+
return self.agent_templates_api.get_agent_templates(
|
|
517
|
+
_request_timeout=_request_timeout,
|
|
518
|
+
_request_auth=_request_auth,
|
|
519
|
+
_content_type=_content_type,
|
|
520
|
+
_headers=_headers,
|
|
521
|
+
_host_index=_host_index
|
|
522
|
+
)
|
|
523
|
+
|
|
524
|
+
@validate_call
|
|
525
|
+
def create_agent_from_template(
|
|
526
|
+
self,
|
|
527
|
+
create_agent_from_template_request: CreateAgentFromTemplateRequest,
|
|
528
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
529
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
530
|
+
_content_type: Optional[StrictStr] = None,
|
|
531
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
532
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
533
|
+
):
|
|
534
|
+
return self.agent_templates_api.create_agent_from_template(
|
|
535
|
+
create_agent_from_template_request=create_agent_from_template_request,
|
|
536
|
+
_request_timeout=_request_timeout,
|
|
537
|
+
_request_auth=_request_auth,
|
|
538
|
+
_content_type=_content_type,
|
|
539
|
+
_headers=_headers,
|
|
540
|
+
_host_index=_host_index
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
@validate_call
|
|
544
|
+
def get_conversation_logs(
|
|
545
|
+
self,
|
|
546
|
+
id: StrictStr,
|
|
547
|
+
_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None,
|
|
548
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
549
|
+
_content_type: Optional[StrictStr] = None,
|
|
550
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
551
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
552
|
+
) -> GetConversationLogs200Response:
|
|
553
|
+
return self.logs_api.get_conversation_logs(
|
|
554
|
+
id=id,
|
|
555
|
+
_request_timeout=_request_timeout,
|
|
556
|
+
_request_auth=_request_auth,
|
|
557
|
+
_content_type=_content_type,
|
|
558
|
+
_headers=_headers,
|
|
559
|
+
_host_index=_host_index
|
|
560
|
+
)
|