smallestai 4.0.0__py3-none-any.whl → 4.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of smallestai might be problematic. Click here for more details.
- smallestai/__init__.py +34 -44
- smallestai/atoms/__init__.py +249 -123
- smallestai/atoms/api/__init__.py +0 -1
- smallestai/atoms/api/agent_templates_api.py +26 -26
- smallestai/atoms/api/agents_api.py +1316 -190
- smallestai/atoms/api/calls_api.py +29 -29
- smallestai/atoms/api/campaigns_api.py +165 -165
- smallestai/atoms/api/knowledge_base_api.py +290 -290
- smallestai/atoms/api/logs_api.py +13 -13
- smallestai/atoms/api/organization_api.py +13 -13
- smallestai/atoms/api/user_api.py +13 -13
- smallestai/atoms/atoms_client.py +77 -49
- smallestai/atoms/models/__init__.py +103 -43
- smallestai/atoms/models/agent_agent_id_webhook_subscriptions_delete200_response.py +89 -0
- smallestai/atoms/models/{get_agent_templates200_response.py → agent_agent_id_webhook_subscriptions_get200_response.py} +7 -7
- smallestai/atoms/models/agent_agent_id_webhook_subscriptions_get404_response.py +89 -0
- smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post201_response.py +89 -0
- smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post400_response.py +89 -0
- smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post_request.py +97 -0
- smallestai/atoms/models/agent_dto.py +8 -6
- smallestai/atoms/models/agent_dto_language.py +17 -3
- smallestai/atoms/models/agent_dto_language_switching.py +95 -0
- smallestai/atoms/models/agent_dto_synthesizer.py +1 -1
- smallestai/atoms/models/{create_agent_from_template200_response.py → agent_from_template_post200_response.py} +4 -4
- smallestai/atoms/models/{get_agents200_response.py → agent_get200_response.py} +7 -7
- smallestai/atoms/models/{get_agents200_response_data.py → agent_get200_response_data.py} +9 -13
- smallestai/atoms/models/{delete_agent200_response.py → agent_id_delete200_response.py} +4 -4
- smallestai/atoms/models/{get_agent_by_id200_response.py → agent_id_get200_response.py} +4 -4
- smallestai/atoms/models/{update_agent200_response.py → agent_id_patch200_response.py} +4 -4
- smallestai/atoms/models/{update_agent_request.py → agent_id_patch_request.py} +17 -15
- smallestai/atoms/models/{update_agent_request_language.py → agent_id_patch_request_language.py} +14 -10
- smallestai/atoms/models/agent_id_patch_request_language_switching.py +96 -0
- smallestai/atoms/models/{update_agent_request_synthesizer.py → agent_id_patch_request_synthesizer.py} +6 -6
- smallestai/atoms/models/{update_agent_request_synthesizer_voice_config.py → agent_id_patch_request_synthesizer_voice_config.py} +27 -27
- smallestai/atoms/models/{update_agent_request_synthesizer_voice_config_one_of.py → agent_id_patch_request_synthesizer_voice_config_one_of.py} +4 -4
- smallestai/atoms/models/{update_agent_request_synthesizer_voice_config_one_of1.py → agent_id_patch_request_synthesizer_voice_config_one_of1.py} +4 -4
- smallestai/atoms/models/{get_campaign_by_id200_response.py → agent_id_workflow_get200_response.py} +7 -7
- smallestai/atoms/models/agent_id_workflow_get200_response_data.py +105 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner.py +127 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner_data.py +91 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner_marker_end.py +91 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner.py +114 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data.py +115 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data_variables.py +97 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data_variables_data_inner.py +91 -0
- smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_position.py +89 -0
- smallestai/atoms/models/agent_id_workflow_get404_response.py +89 -0
- smallestai/atoms/models/agent_template_get200_response.py +97 -0
- smallestai/atoms/models/{get_agent_templates200_response_data_inner.py → agent_template_get200_response_data_inner.py} +6 -6
- smallestai/atoms/models/{get_campaigns200_response.py → audience_get200_response.py} +7 -7
- smallestai/atoms/models/{create_campaign201_response_data.py → audience_get200_response_data_inner.py} +16 -18
- smallestai/atoms/models/audience_id_delete200_response.py +89 -0
- smallestai/atoms/models/audience_id_delete400_response.py +89 -0
- smallestai/atoms/models/{get_current_user200_response.py → audience_id_get200_response.py} +7 -7
- smallestai/atoms/models/audience_id_get400_response.py +89 -0
- smallestai/atoms/models/audience_id_get403_response.py +89 -0
- smallestai/atoms/models/audience_id_get404_response.py +89 -0
- smallestai/atoms/models/audience_id_members_delete200_response.py +93 -0
- smallestai/atoms/models/audience_id_members_delete200_response_data.py +87 -0
- smallestai/atoms/models/audience_id_members_delete_request.py +87 -0
- smallestai/atoms/models/audience_id_members_get200_response.py +93 -0
- smallestai/atoms/models/audience_id_members_get200_response_data.py +101 -0
- smallestai/atoms/models/{get_campaigns200_response_data_inner_audience.py → audience_id_members_get200_response_data_members_inner.py} +8 -8
- smallestai/atoms/models/audience_id_members_get400_response.py +89 -0
- smallestai/atoms/models/audience_id_members_get500_response.py +89 -0
- smallestai/atoms/models/audience_id_members_post200_response.py +97 -0
- smallestai/atoms/models/audience_id_members_post200_response_data_inner.py +93 -0
- smallestai/atoms/models/audience_id_members_post200_response_data_inner_data.py +89 -0
- smallestai/atoms/models/audience_id_members_post400_response.py +89 -0
- smallestai/atoms/models/audience_id_members_post403_response.py +89 -0
- smallestai/atoms/models/audience_id_members_post_request.py +87 -0
- smallestai/atoms/models/audience_id_members_search_get200_response.py +93 -0
- smallestai/atoms/models/audience_id_members_search_get200_response_data.py +101 -0
- smallestai/atoms/models/audience_id_members_search_get200_response_data_search_info.py +103 -0
- smallestai/atoms/models/audience_id_members_search_get400_response.py +89 -0
- smallestai/atoms/models/audience_id_members_search_get500_response.py +89 -0
- smallestai/atoms/models/{create_campaign201_response.py → audience_post200_response.py} +7 -7
- smallestai/atoms/models/audience_post200_response_data.py +104 -0
- smallestai/atoms/models/audience_post400_response.py +89 -0
- smallestai/atoms/models/campaign_get200_response.py +93 -0
- smallestai/atoms/models/campaign_get200_response_data.py +87 -0
- smallestai/atoms/models/{get_campaigns_request.py → campaign_get_request.py} +4 -4
- smallestai/atoms/models/campaign_id_get200_response.py +93 -0
- smallestai/atoms/models/{get_campaign_by_id200_response_data.py → campaign_id_get200_response_data.py} +4 -4
- smallestai/atoms/models/campaign_post201_response.py +89 -0
- smallestai/atoms/models/{create_campaign_request.py → campaign_post_request.py} +4 -4
- smallestai/atoms/models/{start_outbound_call200_response.py → conversation_id_get200_response.py} +7 -7
- smallestai/atoms/models/{get_conversation_logs200_response_data.py → conversation_id_get200_response_data.py} +4 -4
- smallestai/atoms/models/conversation_outbound_post200_response.py +93 -0
- smallestai/atoms/models/{start_outbound_call200_response_data.py → conversation_outbound_post200_response_data.py} +4 -4
- smallestai/atoms/models/{start_outbound_call_request.py → conversation_outbound_post_request.py} +4 -4
- smallestai/atoms/models/create_agent_request.py +10 -6
- smallestai/atoms/models/create_agent_request_language.py +11 -7
- smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +24 -24
- smallestai/atoms/models/{knowledge_base_dto.py → knowledge_base.py} +15 -8
- smallestai/atoms/models/{knowledge_base_item_dto.py → knowledge_base_item.py} +19 -17
- smallestai/atoms/models/{get_knowledge_bases200_response.py → knowledgebase_get200_response.py} +7 -7
- smallestai/atoms/models/{get_knowledge_base_by_id200_response.py → knowledgebase_id_get200_response.py} +7 -7
- smallestai/atoms/models/{get_knowledge_base_items200_response.py → knowledgebase_id_items_get200_response.py} +7 -7
- smallestai/atoms/models/{upload_text_to_knowledge_base_request.py → knowledgebase_id_items_upload_text_post_request.py} +4 -4
- smallestai/atoms/models/{create_knowledge_base201_response.py → knowledgebase_post201_response.py} +4 -4
- smallestai/atoms/models/{create_knowledge_base_request.py → knowledgebase_post_request.py} +4 -4
- smallestai/atoms/models/{get_organization200_response.py → organization_get200_response.py} +7 -7
- smallestai/atoms/models/{get_organization200_response_data.py → organization_get200_response_data.py} +10 -10
- smallestai/atoms/models/{get_organization200_response_data_members_inner.py → organization_get200_response_data_members_inner.py} +4 -4
- smallestai/atoms/models/{get_organization200_response_data_subscription.py → organization_get200_response_data_subscription.py} +4 -4
- smallestai/atoms/models/product_phone_numbers_get200_response.py +97 -0
- smallestai/atoms/models/product_phone_numbers_get200_response_data_inner.py +100 -0
- smallestai/atoms/models/product_phone_numbers_get200_response_data_inner_attributes.py +89 -0
- smallestai/atoms/models/user_get200_response.py +93 -0
- smallestai/atoms/models/{get_current_user200_response_data.py → user_get200_response_data.py} +4 -4
- smallestai/atoms/models/webhook.py +124 -0
- smallestai/atoms/models/{get_campaigns200_response_data_inner_agent.py → webhook_agent.py} +8 -6
- smallestai/atoms/models/webhook_event.py +98 -0
- smallestai/atoms/models/webhook_get200_response.py +93 -0
- smallestai/atoms/models/webhook_get200_response_data.py +140 -0
- smallestai/atoms/models/webhook_id_delete404_response.py +89 -0
- smallestai/atoms/models/webhook_post201_response.py +89 -0
- smallestai/atoms/models/webhook_post_request.py +99 -0
- smallestai/atoms/models/webhook_post_request_events_inner.py +99 -0
- smallestai/atoms/models/webhook_subscription.py +108 -0
- smallestai/atoms/models/webhook_subscription_populated.py +112 -0
- smallestai/waves/async_waves_client.py +63 -10
- smallestai/waves/exceptions.py +4 -4
- smallestai/waves/models.py +8 -0
- smallestai/waves/utils.py +19 -1
- smallestai/waves/waves_client.py +47 -10
- {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/METADATA +2 -2
- smallestai-4.1.0.dist-info/RECORD +147 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner.py +0 -118
- smallestai/atoms/models/get_conversation_logs200_response.py +0 -93
- smallestai-4.0.0.dist-info/RECORD +0 -87
- {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/WHEEL +0 -0
- {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/licenses/LICENSE +0 -0
- {smallestai-4.0.0.dist-info → smallestai-4.1.0.dist-info}/top_level.txt +0 -0
|
@@ -16,15 +16,21 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import StrictInt, StrictStr
|
|
19
|
+
from pydantic import Field, StrictInt, StrictStr
|
|
20
20
|
from typing import Optional
|
|
21
|
-
from
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from smallestai.atoms.models.agent_agent_id_webhook_subscriptions_delete200_response import AgentAgentIdWebhookSubscriptionsDelete200Response
|
|
23
|
+
from smallestai.atoms.models.agent_agent_id_webhook_subscriptions_get200_response import AgentAgentIdWebhookSubscriptionsGet200Response
|
|
24
|
+
from smallestai.atoms.models.agent_agent_id_webhook_subscriptions_post201_response import AgentAgentIdWebhookSubscriptionsPost201Response
|
|
25
|
+
from smallestai.atoms.models.agent_agent_id_webhook_subscriptions_post_request import AgentAgentIdWebhookSubscriptionsPostRequest
|
|
26
|
+
from smallestai.atoms.models.agent_from_template_post200_response import AgentFromTemplatePost200Response
|
|
27
|
+
from smallestai.atoms.models.agent_get200_response import AgentGet200Response
|
|
28
|
+
from smallestai.atoms.models.agent_id_delete200_response import AgentIdDelete200Response
|
|
29
|
+
from smallestai.atoms.models.agent_id_get200_response import AgentIdGet200Response
|
|
30
|
+
from smallestai.atoms.models.agent_id_patch200_response import AgentIdPatch200Response
|
|
31
|
+
from smallestai.atoms.models.agent_id_patch_request import AgentIdPatchRequest
|
|
32
|
+
from smallestai.atoms.models.agent_id_workflow_get200_response import AgentIdWorkflowGet200Response
|
|
22
33
|
from smallestai.atoms.models.create_agent_request import CreateAgentRequest
|
|
23
|
-
from smallestai.atoms.models.delete_agent200_response import DeleteAgent200Response
|
|
24
|
-
from smallestai.atoms.models.get_agent_by_id200_response import GetAgentById200Response
|
|
25
|
-
from smallestai.atoms.models.get_agents200_response import GetAgents200Response
|
|
26
|
-
from smallestai.atoms.models.update_agent200_response import UpdateAgent200Response
|
|
27
|
-
from smallestai.atoms.models.update_agent_request import UpdateAgentRequest
|
|
28
34
|
|
|
29
35
|
from smallestai.atoms.api_client import ApiClient, RequestSerialized
|
|
30
36
|
from smallestai.atoms.api_response import ApiResponse
|
|
@@ -45,9 +51,9 @@ class AgentsApi:
|
|
|
45
51
|
|
|
46
52
|
|
|
47
53
|
@validate_call
|
|
48
|
-
def
|
|
54
|
+
def agent_agent_id_webhook_subscriptions_delete(
|
|
49
55
|
self,
|
|
50
|
-
|
|
56
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent to filter subscriptions by")],
|
|
51
57
|
_request_timeout: Union[
|
|
52
58
|
None,
|
|
53
59
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -60,13 +66,13 @@ class AgentsApi:
|
|
|
60
66
|
_content_type: Optional[StrictStr] = None,
|
|
61
67
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
68
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
-
) ->
|
|
64
|
-
"""
|
|
69
|
+
) -> AgentAgentIdWebhookSubscriptionsDelete200Response:
|
|
70
|
+
"""Delete webhook subscriptions for an agent
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
Delete webhook subscriptions for a given agent ID
|
|
67
73
|
|
|
68
|
-
:param
|
|
69
|
-
:type
|
|
74
|
+
:param agent_id: The ID of the agent to filter subscriptions by (required)
|
|
75
|
+
:type agent_id: str
|
|
70
76
|
:param _request_timeout: timeout setting for this request. If one
|
|
71
77
|
number provided, it will be total request
|
|
72
78
|
timeout. It can also be a pair (tuple) of
|
|
@@ -89,8 +95,8 @@ class AgentsApi:
|
|
|
89
95
|
:return: Returns the result object.
|
|
90
96
|
""" # noqa: E501
|
|
91
97
|
|
|
92
|
-
_param = self.
|
|
93
|
-
|
|
98
|
+
_param = self._agent_agent_id_webhook_subscriptions_delete_serialize(
|
|
99
|
+
agent_id=agent_id,
|
|
94
100
|
_request_auth=_request_auth,
|
|
95
101
|
_content_type=_content_type,
|
|
96
102
|
_headers=_headers,
|
|
@@ -98,9 +104,10 @@ class AgentsApi:
|
|
|
98
104
|
)
|
|
99
105
|
|
|
100
106
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
-
'
|
|
107
|
+
'200': "AgentAgentIdWebhookSubscriptionsDelete200Response",
|
|
102
108
|
'400': "BadRequestErrorResponse",
|
|
103
109
|
'401': "UnauthorizedErrorReponse",
|
|
110
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
104
111
|
'500': "InternalServerErrorResponse",
|
|
105
112
|
}
|
|
106
113
|
response_data = self.api_client.call_api(
|
|
@@ -115,9 +122,9 @@ class AgentsApi:
|
|
|
115
122
|
|
|
116
123
|
|
|
117
124
|
@validate_call
|
|
118
|
-
def
|
|
125
|
+
def agent_agent_id_webhook_subscriptions_delete_with_http_info(
|
|
119
126
|
self,
|
|
120
|
-
|
|
127
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent to filter subscriptions by")],
|
|
121
128
|
_request_timeout: Union[
|
|
122
129
|
None,
|
|
123
130
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -130,13 +137,13 @@ class AgentsApi:
|
|
|
130
137
|
_content_type: Optional[StrictStr] = None,
|
|
131
138
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
139
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
-
) -> ApiResponse[
|
|
134
|
-
"""
|
|
140
|
+
) -> ApiResponse[AgentAgentIdWebhookSubscriptionsDelete200Response]:
|
|
141
|
+
"""Delete webhook subscriptions for an agent
|
|
135
142
|
|
|
136
|
-
|
|
143
|
+
Delete webhook subscriptions for a given agent ID
|
|
137
144
|
|
|
138
|
-
:param
|
|
139
|
-
:type
|
|
145
|
+
:param agent_id: The ID of the agent to filter subscriptions by (required)
|
|
146
|
+
:type agent_id: str
|
|
140
147
|
:param _request_timeout: timeout setting for this request. If one
|
|
141
148
|
number provided, it will be total request
|
|
142
149
|
timeout. It can also be a pair (tuple) of
|
|
@@ -159,8 +166,8 @@ class AgentsApi:
|
|
|
159
166
|
:return: Returns the result object.
|
|
160
167
|
""" # noqa: E501
|
|
161
168
|
|
|
162
|
-
_param = self.
|
|
163
|
-
|
|
169
|
+
_param = self._agent_agent_id_webhook_subscriptions_delete_serialize(
|
|
170
|
+
agent_id=agent_id,
|
|
164
171
|
_request_auth=_request_auth,
|
|
165
172
|
_content_type=_content_type,
|
|
166
173
|
_headers=_headers,
|
|
@@ -168,9 +175,10 @@ class AgentsApi:
|
|
|
168
175
|
)
|
|
169
176
|
|
|
170
177
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
171
|
-
'
|
|
178
|
+
'200': "AgentAgentIdWebhookSubscriptionsDelete200Response",
|
|
172
179
|
'400': "BadRequestErrorResponse",
|
|
173
180
|
'401': "UnauthorizedErrorReponse",
|
|
181
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
174
182
|
'500': "InternalServerErrorResponse",
|
|
175
183
|
}
|
|
176
184
|
response_data = self.api_client.call_api(
|
|
@@ -185,9 +193,9 @@ class AgentsApi:
|
|
|
185
193
|
|
|
186
194
|
|
|
187
195
|
@validate_call
|
|
188
|
-
def
|
|
196
|
+
def agent_agent_id_webhook_subscriptions_delete_without_preload_content(
|
|
189
197
|
self,
|
|
190
|
-
|
|
198
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent to filter subscriptions by")],
|
|
191
199
|
_request_timeout: Union[
|
|
192
200
|
None,
|
|
193
201
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -201,12 +209,12 @@ class AgentsApi:
|
|
|
201
209
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
210
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
211
|
) -> RESTResponseType:
|
|
204
|
-
"""
|
|
212
|
+
"""Delete webhook subscriptions for an agent
|
|
205
213
|
|
|
206
|
-
|
|
214
|
+
Delete webhook subscriptions for a given agent ID
|
|
207
215
|
|
|
208
|
-
:param
|
|
209
|
-
:type
|
|
216
|
+
:param agent_id: The ID of the agent to filter subscriptions by (required)
|
|
217
|
+
:type agent_id: str
|
|
210
218
|
:param _request_timeout: timeout setting for this request. If one
|
|
211
219
|
number provided, it will be total request
|
|
212
220
|
timeout. It can also be a pair (tuple) of
|
|
@@ -229,8 +237,8 @@ class AgentsApi:
|
|
|
229
237
|
:return: Returns the result object.
|
|
230
238
|
""" # noqa: E501
|
|
231
239
|
|
|
232
|
-
_param = self.
|
|
233
|
-
|
|
240
|
+
_param = self._agent_agent_id_webhook_subscriptions_delete_serialize(
|
|
241
|
+
agent_id=agent_id,
|
|
234
242
|
_request_auth=_request_auth,
|
|
235
243
|
_content_type=_content_type,
|
|
236
244
|
_headers=_headers,
|
|
@@ -238,9 +246,10 @@ class AgentsApi:
|
|
|
238
246
|
)
|
|
239
247
|
|
|
240
248
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
241
|
-
'
|
|
249
|
+
'200': "AgentAgentIdWebhookSubscriptionsDelete200Response",
|
|
242
250
|
'400': "BadRequestErrorResponse",
|
|
243
251
|
'401': "UnauthorizedErrorReponse",
|
|
252
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
244
253
|
'500': "InternalServerErrorResponse",
|
|
245
254
|
}
|
|
246
255
|
response_data = self.api_client.call_api(
|
|
@@ -250,9 +259,9 @@ class AgentsApi:
|
|
|
250
259
|
return response_data.response
|
|
251
260
|
|
|
252
261
|
|
|
253
|
-
def
|
|
262
|
+
def _agent_agent_id_webhook_subscriptions_delete_serialize(
|
|
254
263
|
self,
|
|
255
|
-
|
|
264
|
+
agent_id,
|
|
256
265
|
_request_auth,
|
|
257
266
|
_content_type,
|
|
258
267
|
_headers,
|
|
@@ -274,12 +283,12 @@ class AgentsApi:
|
|
|
274
283
|
_body_params: Optional[bytes] = None
|
|
275
284
|
|
|
276
285
|
# process the path parameters
|
|
286
|
+
if agent_id is not None:
|
|
287
|
+
_path_params['agentId'] = agent_id
|
|
277
288
|
# process the query parameters
|
|
278
289
|
# process the header parameters
|
|
279
290
|
# process the form parameters
|
|
280
291
|
# process the body parameter
|
|
281
|
-
if create_agent_request is not None:
|
|
282
|
-
_body_params = create_agent_request
|
|
283
292
|
|
|
284
293
|
|
|
285
294
|
# set the HTTP header `Accept`
|
|
@@ -290,19 +299,6 @@ class AgentsApi:
|
|
|
290
299
|
]
|
|
291
300
|
)
|
|
292
301
|
|
|
293
|
-
# set the HTTP header `Content-Type`
|
|
294
|
-
if _content_type:
|
|
295
|
-
_header_params['Content-Type'] = _content_type
|
|
296
|
-
else:
|
|
297
|
-
_default_content_type = (
|
|
298
|
-
self.api_client.select_header_content_type(
|
|
299
|
-
[
|
|
300
|
-
'application/json'
|
|
301
|
-
]
|
|
302
|
-
)
|
|
303
|
-
)
|
|
304
|
-
if _default_content_type is not None:
|
|
305
|
-
_header_params['Content-Type'] = _default_content_type
|
|
306
302
|
|
|
307
303
|
# authentication setting
|
|
308
304
|
_auth_settings: List[str] = [
|
|
@@ -310,8 +306,8 @@ class AgentsApi:
|
|
|
310
306
|
]
|
|
311
307
|
|
|
312
308
|
return self.api_client.param_serialize(
|
|
313
|
-
method='
|
|
314
|
-
resource_path='/agent',
|
|
309
|
+
method='DELETE',
|
|
310
|
+
resource_path='/agent/{agentId}/webhook-subscriptions',
|
|
315
311
|
path_params=_path_params,
|
|
316
312
|
query_params=_query_params,
|
|
317
313
|
header_params=_header_params,
|
|
@@ -328,9 +324,9 @@ class AgentsApi:
|
|
|
328
324
|
|
|
329
325
|
|
|
330
326
|
@validate_call
|
|
331
|
-
def
|
|
327
|
+
def agent_agent_id_webhook_subscriptions_get(
|
|
332
328
|
self,
|
|
333
|
-
|
|
329
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent")],
|
|
334
330
|
_request_timeout: Union[
|
|
335
331
|
None,
|
|
336
332
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -343,12 +339,13 @@ class AgentsApi:
|
|
|
343
339
|
_content_type: Optional[StrictStr] = None,
|
|
344
340
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
345
341
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
346
|
-
) ->
|
|
347
|
-
"""
|
|
342
|
+
) -> AgentAgentIdWebhookSubscriptionsGet200Response:
|
|
343
|
+
"""Get webhook subscriptions for an agent
|
|
348
344
|
|
|
345
|
+
Retrieve webhook subscriptions for a given agent ID
|
|
349
346
|
|
|
350
|
-
:param
|
|
351
|
-
:type
|
|
347
|
+
:param agent_id: The ID of the agent (required)
|
|
348
|
+
:type agent_id: str
|
|
352
349
|
:param _request_timeout: timeout setting for this request. If one
|
|
353
350
|
number provided, it will be total request
|
|
354
351
|
timeout. It can also be a pair (tuple) of
|
|
@@ -371,8 +368,8 @@ class AgentsApi:
|
|
|
371
368
|
:return: Returns the result object.
|
|
372
369
|
""" # noqa: E501
|
|
373
370
|
|
|
374
|
-
_param = self.
|
|
375
|
-
|
|
371
|
+
_param = self._agent_agent_id_webhook_subscriptions_get_serialize(
|
|
372
|
+
agent_id=agent_id,
|
|
376
373
|
_request_auth=_request_auth,
|
|
377
374
|
_content_type=_content_type,
|
|
378
375
|
_headers=_headers,
|
|
@@ -380,10 +377,11 @@ class AgentsApi:
|
|
|
380
377
|
)
|
|
381
378
|
|
|
382
379
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
-
'200': "
|
|
380
|
+
'200': "AgentAgentIdWebhookSubscriptionsGet200Response",
|
|
384
381
|
'400': "BadRequestErrorResponse",
|
|
385
|
-
'401': "
|
|
386
|
-
'
|
|
382
|
+
'401': "UnauthorizedErrorReponse",
|
|
383
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
384
|
+
'500': "InternalServerErrorResponse",
|
|
387
385
|
}
|
|
388
386
|
response_data = self.api_client.call_api(
|
|
389
387
|
*_param,
|
|
@@ -397,9 +395,9 @@ class AgentsApi:
|
|
|
397
395
|
|
|
398
396
|
|
|
399
397
|
@validate_call
|
|
400
|
-
def
|
|
398
|
+
def agent_agent_id_webhook_subscriptions_get_with_http_info(
|
|
401
399
|
self,
|
|
402
|
-
|
|
400
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent")],
|
|
403
401
|
_request_timeout: Union[
|
|
404
402
|
None,
|
|
405
403
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -412,12 +410,13 @@ class AgentsApi:
|
|
|
412
410
|
_content_type: Optional[StrictStr] = None,
|
|
413
411
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
414
412
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
415
|
-
) -> ApiResponse[
|
|
416
|
-
"""
|
|
413
|
+
) -> ApiResponse[AgentAgentIdWebhookSubscriptionsGet200Response]:
|
|
414
|
+
"""Get webhook subscriptions for an agent
|
|
417
415
|
|
|
416
|
+
Retrieve webhook subscriptions for a given agent ID
|
|
418
417
|
|
|
419
|
-
:param
|
|
420
|
-
:type
|
|
418
|
+
:param agent_id: The ID of the agent (required)
|
|
419
|
+
:type agent_id: str
|
|
421
420
|
:param _request_timeout: timeout setting for this request. If one
|
|
422
421
|
number provided, it will be total request
|
|
423
422
|
timeout. It can also be a pair (tuple) of
|
|
@@ -440,8 +439,8 @@ class AgentsApi:
|
|
|
440
439
|
:return: Returns the result object.
|
|
441
440
|
""" # noqa: E501
|
|
442
441
|
|
|
443
|
-
_param = self.
|
|
444
|
-
|
|
442
|
+
_param = self._agent_agent_id_webhook_subscriptions_get_serialize(
|
|
443
|
+
agent_id=agent_id,
|
|
445
444
|
_request_auth=_request_auth,
|
|
446
445
|
_content_type=_content_type,
|
|
447
446
|
_headers=_headers,
|
|
@@ -449,10 +448,11 @@ class AgentsApi:
|
|
|
449
448
|
)
|
|
450
449
|
|
|
451
450
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
452
|
-
'200': "
|
|
451
|
+
'200': "AgentAgentIdWebhookSubscriptionsGet200Response",
|
|
453
452
|
'400': "BadRequestErrorResponse",
|
|
454
|
-
'401': "
|
|
455
|
-
'
|
|
453
|
+
'401': "UnauthorizedErrorReponse",
|
|
454
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
455
|
+
'500': "InternalServerErrorResponse",
|
|
456
456
|
}
|
|
457
457
|
response_data = self.api_client.call_api(
|
|
458
458
|
*_param,
|
|
@@ -466,9 +466,9 @@ class AgentsApi:
|
|
|
466
466
|
|
|
467
467
|
|
|
468
468
|
@validate_call
|
|
469
|
-
def
|
|
469
|
+
def agent_agent_id_webhook_subscriptions_get_without_preload_content(
|
|
470
470
|
self,
|
|
471
|
-
|
|
471
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent")],
|
|
472
472
|
_request_timeout: Union[
|
|
473
473
|
None,
|
|
474
474
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -482,11 +482,12 @@ class AgentsApi:
|
|
|
482
482
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
483
483
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
484
484
|
) -> RESTResponseType:
|
|
485
|
-
"""
|
|
485
|
+
"""Get webhook subscriptions for an agent
|
|
486
486
|
|
|
487
|
+
Retrieve webhook subscriptions for a given agent ID
|
|
487
488
|
|
|
488
|
-
:param
|
|
489
|
-
:type
|
|
489
|
+
:param agent_id: The ID of the agent (required)
|
|
490
|
+
:type agent_id: str
|
|
490
491
|
:param _request_timeout: timeout setting for this request. If one
|
|
491
492
|
number provided, it will be total request
|
|
492
493
|
timeout. It can also be a pair (tuple) of
|
|
@@ -509,8 +510,8 @@ class AgentsApi:
|
|
|
509
510
|
:return: Returns the result object.
|
|
510
511
|
""" # noqa: E501
|
|
511
512
|
|
|
512
|
-
_param = self.
|
|
513
|
-
|
|
513
|
+
_param = self._agent_agent_id_webhook_subscriptions_get_serialize(
|
|
514
|
+
agent_id=agent_id,
|
|
514
515
|
_request_auth=_request_auth,
|
|
515
516
|
_content_type=_content_type,
|
|
516
517
|
_headers=_headers,
|
|
@@ -518,10 +519,11 @@ class AgentsApi:
|
|
|
518
519
|
)
|
|
519
520
|
|
|
520
521
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
521
|
-
'200': "
|
|
522
|
+
'200': "AgentAgentIdWebhookSubscriptionsGet200Response",
|
|
522
523
|
'400': "BadRequestErrorResponse",
|
|
523
|
-
'401': "
|
|
524
|
-
'
|
|
524
|
+
'401': "UnauthorizedErrorReponse",
|
|
525
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
526
|
+
'500': "InternalServerErrorResponse",
|
|
525
527
|
}
|
|
526
528
|
response_data = self.api_client.call_api(
|
|
527
529
|
*_param,
|
|
@@ -530,9 +532,9 @@ class AgentsApi:
|
|
|
530
532
|
return response_data.response
|
|
531
533
|
|
|
532
534
|
|
|
533
|
-
def
|
|
535
|
+
def _agent_agent_id_webhook_subscriptions_get_serialize(
|
|
534
536
|
self,
|
|
535
|
-
|
|
537
|
+
agent_id,
|
|
536
538
|
_request_auth,
|
|
537
539
|
_content_type,
|
|
538
540
|
_headers,
|
|
@@ -554,8 +556,8 @@ class AgentsApi:
|
|
|
554
556
|
_body_params: Optional[bytes] = None
|
|
555
557
|
|
|
556
558
|
# process the path parameters
|
|
557
|
-
if
|
|
558
|
-
_path_params['
|
|
559
|
+
if agent_id is not None:
|
|
560
|
+
_path_params['agentId'] = agent_id
|
|
559
561
|
# process the query parameters
|
|
560
562
|
# process the header parameters
|
|
561
563
|
# process the form parameters
|
|
@@ -577,8 +579,8 @@ class AgentsApi:
|
|
|
577
579
|
]
|
|
578
580
|
|
|
579
581
|
return self.api_client.param_serialize(
|
|
580
|
-
method='
|
|
581
|
-
resource_path='/agent/{
|
|
582
|
+
method='GET',
|
|
583
|
+
resource_path='/agent/{agentId}/webhook-subscriptions',
|
|
582
584
|
path_params=_path_params,
|
|
583
585
|
query_params=_query_params,
|
|
584
586
|
header_params=_header_params,
|
|
@@ -595,9 +597,10 @@ class AgentsApi:
|
|
|
595
597
|
|
|
596
598
|
|
|
597
599
|
@validate_call
|
|
598
|
-
def
|
|
600
|
+
def agent_agent_id_webhook_subscriptions_post(
|
|
599
601
|
self,
|
|
600
|
-
|
|
602
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent to create subscriptions for")],
|
|
603
|
+
agent_agent_id_webhook_subscriptions_post_request: AgentAgentIdWebhookSubscriptionsPostRequest,
|
|
601
604
|
_request_timeout: Union[
|
|
602
605
|
None,
|
|
603
606
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -610,13 +613,15 @@ class AgentsApi:
|
|
|
610
613
|
_content_type: Optional[StrictStr] = None,
|
|
611
614
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
612
615
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
613
|
-
) ->
|
|
614
|
-
"""
|
|
616
|
+
) -> AgentAgentIdWebhookSubscriptionsPost201Response:
|
|
617
|
+
"""Create webhook subscriptions for an agent
|
|
615
618
|
|
|
616
|
-
|
|
619
|
+
Create webhook subscriptions for a specific agent with selected event types
|
|
617
620
|
|
|
618
|
-
:param
|
|
619
|
-
:type
|
|
621
|
+
:param agent_id: The ID of the agent to create subscriptions for (required)
|
|
622
|
+
:type agent_id: str
|
|
623
|
+
:param agent_agent_id_webhook_subscriptions_post_request: (required)
|
|
624
|
+
:type agent_agent_id_webhook_subscriptions_post_request: AgentAgentIdWebhookSubscriptionsPostRequest
|
|
620
625
|
:param _request_timeout: timeout setting for this request. If one
|
|
621
626
|
number provided, it will be total request
|
|
622
627
|
timeout. It can also be a pair (tuple) of
|
|
@@ -639,8 +644,9 @@ class AgentsApi:
|
|
|
639
644
|
:return: Returns the result object.
|
|
640
645
|
""" # noqa: E501
|
|
641
646
|
|
|
642
|
-
_param = self.
|
|
643
|
-
|
|
647
|
+
_param = self._agent_agent_id_webhook_subscriptions_post_serialize(
|
|
648
|
+
agent_id=agent_id,
|
|
649
|
+
agent_agent_id_webhook_subscriptions_post_request=agent_agent_id_webhook_subscriptions_post_request,
|
|
644
650
|
_request_auth=_request_auth,
|
|
645
651
|
_content_type=_content_type,
|
|
646
652
|
_headers=_headers,
|
|
@@ -648,9 +654,10 @@ class AgentsApi:
|
|
|
648
654
|
)
|
|
649
655
|
|
|
650
656
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
651
|
-
'
|
|
652
|
-
'400': "
|
|
657
|
+
'201': "AgentAgentIdWebhookSubscriptionsPost201Response",
|
|
658
|
+
'400': "AgentAgentIdWebhookSubscriptionsPost400Response",
|
|
653
659
|
'401': "UnauthorizedErrorReponse",
|
|
660
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
654
661
|
'500': "InternalServerErrorResponse",
|
|
655
662
|
}
|
|
656
663
|
response_data = self.api_client.call_api(
|
|
@@ -665,9 +672,10 @@ class AgentsApi:
|
|
|
665
672
|
|
|
666
673
|
|
|
667
674
|
@validate_call
|
|
668
|
-
def
|
|
675
|
+
def agent_agent_id_webhook_subscriptions_post_with_http_info(
|
|
669
676
|
self,
|
|
670
|
-
|
|
677
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent to create subscriptions for")],
|
|
678
|
+
agent_agent_id_webhook_subscriptions_post_request: AgentAgentIdWebhookSubscriptionsPostRequest,
|
|
671
679
|
_request_timeout: Union[
|
|
672
680
|
None,
|
|
673
681
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -680,13 +688,15 @@ class AgentsApi:
|
|
|
680
688
|
_content_type: Optional[StrictStr] = None,
|
|
681
689
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
682
690
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
683
|
-
) -> ApiResponse[
|
|
684
|
-
"""
|
|
691
|
+
) -> ApiResponse[AgentAgentIdWebhookSubscriptionsPost201Response]:
|
|
692
|
+
"""Create webhook subscriptions for an agent
|
|
685
693
|
|
|
686
|
-
|
|
694
|
+
Create webhook subscriptions for a specific agent with selected event types
|
|
687
695
|
|
|
688
|
-
:param
|
|
689
|
-
:type
|
|
696
|
+
:param agent_id: The ID of the agent to create subscriptions for (required)
|
|
697
|
+
:type agent_id: str
|
|
698
|
+
:param agent_agent_id_webhook_subscriptions_post_request: (required)
|
|
699
|
+
:type agent_agent_id_webhook_subscriptions_post_request: AgentAgentIdWebhookSubscriptionsPostRequest
|
|
690
700
|
:param _request_timeout: timeout setting for this request. If one
|
|
691
701
|
number provided, it will be total request
|
|
692
702
|
timeout. It can also be a pair (tuple) of
|
|
@@ -709,8 +719,9 @@ class AgentsApi:
|
|
|
709
719
|
:return: Returns the result object.
|
|
710
720
|
""" # noqa: E501
|
|
711
721
|
|
|
712
|
-
_param = self.
|
|
713
|
-
|
|
722
|
+
_param = self._agent_agent_id_webhook_subscriptions_post_serialize(
|
|
723
|
+
agent_id=agent_id,
|
|
724
|
+
agent_agent_id_webhook_subscriptions_post_request=agent_agent_id_webhook_subscriptions_post_request,
|
|
714
725
|
_request_auth=_request_auth,
|
|
715
726
|
_content_type=_content_type,
|
|
716
727
|
_headers=_headers,
|
|
@@ -718,9 +729,10 @@ class AgentsApi:
|
|
|
718
729
|
)
|
|
719
730
|
|
|
720
731
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
721
|
-
'
|
|
722
|
-
'400': "
|
|
732
|
+
'201': "AgentAgentIdWebhookSubscriptionsPost201Response",
|
|
733
|
+
'400': "AgentAgentIdWebhookSubscriptionsPost400Response",
|
|
723
734
|
'401': "UnauthorizedErrorReponse",
|
|
735
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
724
736
|
'500': "InternalServerErrorResponse",
|
|
725
737
|
}
|
|
726
738
|
response_data = self.api_client.call_api(
|
|
@@ -735,9 +747,10 @@ class AgentsApi:
|
|
|
735
747
|
|
|
736
748
|
|
|
737
749
|
@validate_call
|
|
738
|
-
def
|
|
750
|
+
def agent_agent_id_webhook_subscriptions_post_without_preload_content(
|
|
739
751
|
self,
|
|
740
|
-
|
|
752
|
+
agent_id: Annotated[StrictStr, Field(description="The ID of the agent to create subscriptions for")],
|
|
753
|
+
agent_agent_id_webhook_subscriptions_post_request: AgentAgentIdWebhookSubscriptionsPostRequest,
|
|
741
754
|
_request_timeout: Union[
|
|
742
755
|
None,
|
|
743
756
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -751,12 +764,14 @@ class AgentsApi:
|
|
|
751
764
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
752
765
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
753
766
|
) -> RESTResponseType:
|
|
754
|
-
"""
|
|
767
|
+
"""Create webhook subscriptions for an agent
|
|
755
768
|
|
|
756
|
-
|
|
769
|
+
Create webhook subscriptions for a specific agent with selected event types
|
|
757
770
|
|
|
758
|
-
:param
|
|
759
|
-
:type
|
|
771
|
+
:param agent_id: The ID of the agent to create subscriptions for (required)
|
|
772
|
+
:type agent_id: str
|
|
773
|
+
:param agent_agent_id_webhook_subscriptions_post_request: (required)
|
|
774
|
+
:type agent_agent_id_webhook_subscriptions_post_request: AgentAgentIdWebhookSubscriptionsPostRequest
|
|
760
775
|
:param _request_timeout: timeout setting for this request. If one
|
|
761
776
|
number provided, it will be total request
|
|
762
777
|
timeout. It can also be a pair (tuple) of
|
|
@@ -779,8 +794,9 @@ class AgentsApi:
|
|
|
779
794
|
:return: Returns the result object.
|
|
780
795
|
""" # noqa: E501
|
|
781
796
|
|
|
782
|
-
_param = self.
|
|
783
|
-
|
|
797
|
+
_param = self._agent_agent_id_webhook_subscriptions_post_serialize(
|
|
798
|
+
agent_id=agent_id,
|
|
799
|
+
agent_agent_id_webhook_subscriptions_post_request=agent_agent_id_webhook_subscriptions_post_request,
|
|
784
800
|
_request_auth=_request_auth,
|
|
785
801
|
_content_type=_content_type,
|
|
786
802
|
_headers=_headers,
|
|
@@ -788,9 +804,10 @@ class AgentsApi:
|
|
|
788
804
|
)
|
|
789
805
|
|
|
790
806
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
791
|
-
'
|
|
792
|
-
'400': "
|
|
807
|
+
'201': "AgentAgentIdWebhookSubscriptionsPost201Response",
|
|
808
|
+
'400': "AgentAgentIdWebhookSubscriptionsPost400Response",
|
|
793
809
|
'401': "UnauthorizedErrorReponse",
|
|
810
|
+
'404': "AgentAgentIdWebhookSubscriptionsGet404Response",
|
|
794
811
|
'500': "InternalServerErrorResponse",
|
|
795
812
|
}
|
|
796
813
|
response_data = self.api_client.call_api(
|
|
@@ -800,9 +817,10 @@ class AgentsApi:
|
|
|
800
817
|
return response_data.response
|
|
801
818
|
|
|
802
819
|
|
|
803
|
-
def
|
|
820
|
+
def _agent_agent_id_webhook_subscriptions_post_serialize(
|
|
804
821
|
self,
|
|
805
|
-
|
|
822
|
+
agent_id,
|
|
823
|
+
agent_agent_id_webhook_subscriptions_post_request,
|
|
806
824
|
_request_auth,
|
|
807
825
|
_content_type,
|
|
808
826
|
_headers,
|
|
@@ -824,12 +842,14 @@ class AgentsApi:
|
|
|
824
842
|
_body_params: Optional[bytes] = None
|
|
825
843
|
|
|
826
844
|
# process the path parameters
|
|
827
|
-
if
|
|
828
|
-
_path_params['
|
|
845
|
+
if agent_id is not None:
|
|
846
|
+
_path_params['agentId'] = agent_id
|
|
829
847
|
# process the query parameters
|
|
830
848
|
# process the header parameters
|
|
831
849
|
# process the form parameters
|
|
832
850
|
# process the body parameter
|
|
851
|
+
if agent_agent_id_webhook_subscriptions_post_request is not None:
|
|
852
|
+
_body_params = agent_agent_id_webhook_subscriptions_post_request
|
|
833
853
|
|
|
834
854
|
|
|
835
855
|
# set the HTTP header `Accept`
|
|
@@ -840,6 +860,19 @@ class AgentsApi:
|
|
|
840
860
|
]
|
|
841
861
|
)
|
|
842
862
|
|
|
863
|
+
# set the HTTP header `Content-Type`
|
|
864
|
+
if _content_type:
|
|
865
|
+
_header_params['Content-Type'] = _content_type
|
|
866
|
+
else:
|
|
867
|
+
_default_content_type = (
|
|
868
|
+
self.api_client.select_header_content_type(
|
|
869
|
+
[
|
|
870
|
+
'application/json'
|
|
871
|
+
]
|
|
872
|
+
)
|
|
873
|
+
)
|
|
874
|
+
if _default_content_type is not None:
|
|
875
|
+
_header_params['Content-Type'] = _default_content_type
|
|
843
876
|
|
|
844
877
|
# authentication setting
|
|
845
878
|
_auth_settings: List[str] = [
|
|
@@ -847,8 +880,8 @@ class AgentsApi:
|
|
|
847
880
|
]
|
|
848
881
|
|
|
849
882
|
return self.api_client.param_serialize(
|
|
850
|
-
method='
|
|
851
|
-
resource_path='/agent/{
|
|
883
|
+
method='POST',
|
|
884
|
+
resource_path='/agent/{agentId}/webhook-subscriptions',
|
|
852
885
|
path_params=_path_params,
|
|
853
886
|
query_params=_query_params,
|
|
854
887
|
header_params=_header_params,
|
|
@@ -865,7 +898,7 @@ class AgentsApi:
|
|
|
865
898
|
|
|
866
899
|
|
|
867
900
|
@validate_call
|
|
868
|
-
def
|
|
901
|
+
def agent_get(
|
|
869
902
|
self,
|
|
870
903
|
page: Optional[StrictInt] = None,
|
|
871
904
|
offset: Optional[StrictInt] = None,
|
|
@@ -882,7 +915,7 @@ class AgentsApi:
|
|
|
882
915
|
_content_type: Optional[StrictStr] = None,
|
|
883
916
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
884
917
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
885
|
-
) ->
|
|
918
|
+
) -> AgentGet200Response:
|
|
886
919
|
"""Get all agents
|
|
887
920
|
|
|
888
921
|
Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent. This API will give you the list of agents created by organization you are a part of.
|
|
@@ -915,7 +948,7 @@ class AgentsApi:
|
|
|
915
948
|
:return: Returns the result object.
|
|
916
949
|
""" # noqa: E501
|
|
917
950
|
|
|
918
|
-
_param = self.
|
|
951
|
+
_param = self._agent_get_serialize(
|
|
919
952
|
page=page,
|
|
920
953
|
offset=offset,
|
|
921
954
|
search=search,
|
|
@@ -926,7 +959,7 @@ class AgentsApi:
|
|
|
926
959
|
)
|
|
927
960
|
|
|
928
961
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
929
|
-
'200': "
|
|
962
|
+
'200': "AgentGet200Response",
|
|
930
963
|
'400': "BadRequestErrorResponse",
|
|
931
964
|
'401': "UnauthorizedErrorReponse",
|
|
932
965
|
'500': "InternalServerErrorResponse",
|
|
@@ -943,7 +976,7 @@ class AgentsApi:
|
|
|
943
976
|
|
|
944
977
|
|
|
945
978
|
@validate_call
|
|
946
|
-
def
|
|
979
|
+
def agent_get_with_http_info(
|
|
947
980
|
self,
|
|
948
981
|
page: Optional[StrictInt] = None,
|
|
949
982
|
offset: Optional[StrictInt] = None,
|
|
@@ -960,7 +993,7 @@ class AgentsApi:
|
|
|
960
993
|
_content_type: Optional[StrictStr] = None,
|
|
961
994
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
962
995
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
963
|
-
) -> ApiResponse[
|
|
996
|
+
) -> ApiResponse[AgentGet200Response]:
|
|
964
997
|
"""Get all agents
|
|
965
998
|
|
|
966
999
|
Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent. This API will give you the list of agents created by organization you are a part of.
|
|
@@ -993,7 +1026,7 @@ class AgentsApi:
|
|
|
993
1026
|
:return: Returns the result object.
|
|
994
1027
|
""" # noqa: E501
|
|
995
1028
|
|
|
996
|
-
_param = self.
|
|
1029
|
+
_param = self._agent_get_serialize(
|
|
997
1030
|
page=page,
|
|
998
1031
|
offset=offset,
|
|
999
1032
|
search=search,
|
|
@@ -1004,7 +1037,7 @@ class AgentsApi:
|
|
|
1004
1037
|
)
|
|
1005
1038
|
|
|
1006
1039
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1007
|
-
'200': "
|
|
1040
|
+
'200': "AgentGet200Response",
|
|
1008
1041
|
'400': "BadRequestErrorResponse",
|
|
1009
1042
|
'401': "UnauthorizedErrorReponse",
|
|
1010
1043
|
'500': "InternalServerErrorResponse",
|
|
@@ -1021,7 +1054,7 @@ class AgentsApi:
|
|
|
1021
1054
|
|
|
1022
1055
|
|
|
1023
1056
|
@validate_call
|
|
1024
|
-
def
|
|
1057
|
+
def agent_get_without_preload_content(
|
|
1025
1058
|
self,
|
|
1026
1059
|
page: Optional[StrictInt] = None,
|
|
1027
1060
|
offset: Optional[StrictInt] = None,
|
|
@@ -1071,7 +1104,7 @@ class AgentsApi:
|
|
|
1071
1104
|
:return: Returns the result object.
|
|
1072
1105
|
""" # noqa: E501
|
|
1073
1106
|
|
|
1074
|
-
_param = self.
|
|
1107
|
+
_param = self._agent_get_serialize(
|
|
1075
1108
|
page=page,
|
|
1076
1109
|
offset=offset,
|
|
1077
1110
|
search=search,
|
|
@@ -1082,7 +1115,7 @@ class AgentsApi:
|
|
|
1082
1115
|
)
|
|
1083
1116
|
|
|
1084
1117
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1085
|
-
'200': "
|
|
1118
|
+
'200': "AgentGet200Response",
|
|
1086
1119
|
'400': "BadRequestErrorResponse",
|
|
1087
1120
|
'401': "UnauthorizedErrorReponse",
|
|
1088
1121
|
'500': "InternalServerErrorResponse",
|
|
@@ -1094,7 +1127,7 @@ class AgentsApi:
|
|
|
1094
1127
|
return response_data.response
|
|
1095
1128
|
|
|
1096
1129
|
|
|
1097
|
-
def
|
|
1130
|
+
def _agent_get_serialize(
|
|
1098
1131
|
self,
|
|
1099
1132
|
page,
|
|
1100
1133
|
offset,
|
|
@@ -1171,10 +1204,9 @@ class AgentsApi:
|
|
|
1171
1204
|
|
|
1172
1205
|
|
|
1173
1206
|
@validate_call
|
|
1174
|
-
def
|
|
1207
|
+
def agent_id_delete(
|
|
1175
1208
|
self,
|
|
1176
1209
|
id: StrictStr,
|
|
1177
|
-
update_agent_request: UpdateAgentRequest,
|
|
1178
1210
|
_request_timeout: Union[
|
|
1179
1211
|
None,
|
|
1180
1212
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1187,14 +1219,12 @@ class AgentsApi:
|
|
|
1187
1219
|
_content_type: Optional[StrictStr] = None,
|
|
1188
1220
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1189
1221
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1190
|
-
) ->
|
|
1191
|
-
"""
|
|
1222
|
+
) -> AgentIdDelete200Response:
|
|
1223
|
+
"""Delete an agent
|
|
1192
1224
|
|
|
1193
1225
|
|
|
1194
1226
|
:param id: (required)
|
|
1195
1227
|
:type id: str
|
|
1196
|
-
:param update_agent_request: (required)
|
|
1197
|
-
:type update_agent_request: UpdateAgentRequest
|
|
1198
1228
|
:param _request_timeout: timeout setting for this request. If one
|
|
1199
1229
|
number provided, it will be total request
|
|
1200
1230
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1217,9 +1247,8 @@ class AgentsApi:
|
|
|
1217
1247
|
:return: Returns the result object.
|
|
1218
1248
|
""" # noqa: E501
|
|
1219
1249
|
|
|
1220
|
-
_param = self.
|
|
1250
|
+
_param = self._agent_id_delete_serialize(
|
|
1221
1251
|
id=id,
|
|
1222
|
-
update_agent_request=update_agent_request,
|
|
1223
1252
|
_request_auth=_request_auth,
|
|
1224
1253
|
_content_type=_content_type,
|
|
1225
1254
|
_headers=_headers,
|
|
@@ -1227,10 +1256,10 @@ class AgentsApi:
|
|
|
1227
1256
|
)
|
|
1228
1257
|
|
|
1229
1258
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1230
|
-
'200': "
|
|
1259
|
+
'200': "AgentIdDelete200Response",
|
|
1231
1260
|
'400': "BadRequestErrorResponse",
|
|
1232
1261
|
'401': "ApiResponse",
|
|
1233
|
-
'
|
|
1262
|
+
'403': "ApiResponse",
|
|
1234
1263
|
}
|
|
1235
1264
|
response_data = self.api_client.call_api(
|
|
1236
1265
|
*_param,
|
|
@@ -1244,10 +1273,9 @@ class AgentsApi:
|
|
|
1244
1273
|
|
|
1245
1274
|
|
|
1246
1275
|
@validate_call
|
|
1247
|
-
def
|
|
1276
|
+
def agent_id_delete_with_http_info(
|
|
1248
1277
|
self,
|
|
1249
1278
|
id: StrictStr,
|
|
1250
|
-
update_agent_request: UpdateAgentRequest,
|
|
1251
1279
|
_request_timeout: Union[
|
|
1252
1280
|
None,
|
|
1253
1281
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1260,14 +1288,12 @@ class AgentsApi:
|
|
|
1260
1288
|
_content_type: Optional[StrictStr] = None,
|
|
1261
1289
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1262
1290
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1263
|
-
) -> ApiResponse[
|
|
1264
|
-
"""
|
|
1291
|
+
) -> ApiResponse[AgentIdDelete200Response]:
|
|
1292
|
+
"""Delete an agent
|
|
1265
1293
|
|
|
1266
1294
|
|
|
1267
1295
|
:param id: (required)
|
|
1268
1296
|
:type id: str
|
|
1269
|
-
:param update_agent_request: (required)
|
|
1270
|
-
:type update_agent_request: UpdateAgentRequest
|
|
1271
1297
|
:param _request_timeout: timeout setting for this request. If one
|
|
1272
1298
|
number provided, it will be total request
|
|
1273
1299
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1290,9 +1316,8 @@ class AgentsApi:
|
|
|
1290
1316
|
:return: Returns the result object.
|
|
1291
1317
|
""" # noqa: E501
|
|
1292
1318
|
|
|
1293
|
-
_param = self.
|
|
1319
|
+
_param = self._agent_id_delete_serialize(
|
|
1294
1320
|
id=id,
|
|
1295
|
-
update_agent_request=update_agent_request,
|
|
1296
1321
|
_request_auth=_request_auth,
|
|
1297
1322
|
_content_type=_content_type,
|
|
1298
1323
|
_headers=_headers,
|
|
@@ -1300,10 +1325,10 @@ class AgentsApi:
|
|
|
1300
1325
|
)
|
|
1301
1326
|
|
|
1302
1327
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1303
|
-
'200': "
|
|
1328
|
+
'200': "AgentIdDelete200Response",
|
|
1304
1329
|
'400': "BadRequestErrorResponse",
|
|
1305
1330
|
'401': "ApiResponse",
|
|
1306
|
-
'
|
|
1331
|
+
'403': "ApiResponse",
|
|
1307
1332
|
}
|
|
1308
1333
|
response_data = self.api_client.call_api(
|
|
1309
1334
|
*_param,
|
|
@@ -1317,10 +1342,9 @@ class AgentsApi:
|
|
|
1317
1342
|
|
|
1318
1343
|
|
|
1319
1344
|
@validate_call
|
|
1320
|
-
def
|
|
1345
|
+
def agent_id_delete_without_preload_content(
|
|
1321
1346
|
self,
|
|
1322
1347
|
id: StrictStr,
|
|
1323
|
-
update_agent_request: UpdateAgentRequest,
|
|
1324
1348
|
_request_timeout: Union[
|
|
1325
1349
|
None,
|
|
1326
1350
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1334,13 +1358,11 @@ class AgentsApi:
|
|
|
1334
1358
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1335
1359
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1336
1360
|
) -> RESTResponseType:
|
|
1337
|
-
"""
|
|
1361
|
+
"""Delete an agent
|
|
1338
1362
|
|
|
1339
1363
|
|
|
1340
1364
|
:param id: (required)
|
|
1341
1365
|
:type id: str
|
|
1342
|
-
:param update_agent_request: (required)
|
|
1343
|
-
:type update_agent_request: UpdateAgentRequest
|
|
1344
1366
|
:param _request_timeout: timeout setting for this request. If one
|
|
1345
1367
|
number provided, it will be total request
|
|
1346
1368
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1363,9 +1385,8 @@ class AgentsApi:
|
|
|
1363
1385
|
:return: Returns the result object.
|
|
1364
1386
|
""" # noqa: E501
|
|
1365
1387
|
|
|
1366
|
-
_param = self.
|
|
1388
|
+
_param = self._agent_id_delete_serialize(
|
|
1367
1389
|
id=id,
|
|
1368
|
-
update_agent_request=update_agent_request,
|
|
1369
1390
|
_request_auth=_request_auth,
|
|
1370
1391
|
_content_type=_content_type,
|
|
1371
1392
|
_headers=_headers,
|
|
@@ -1373,10 +1394,10 @@ class AgentsApi:
|
|
|
1373
1394
|
)
|
|
1374
1395
|
|
|
1375
1396
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1376
|
-
'200': "
|
|
1397
|
+
'200': "AgentIdDelete200Response",
|
|
1377
1398
|
'400': "BadRequestErrorResponse",
|
|
1378
1399
|
'401': "ApiResponse",
|
|
1379
|
-
'
|
|
1400
|
+
'403': "ApiResponse",
|
|
1380
1401
|
}
|
|
1381
1402
|
response_data = self.api_client.call_api(
|
|
1382
1403
|
*_param,
|
|
@@ -1385,10 +1406,9 @@ class AgentsApi:
|
|
|
1385
1406
|
return response_data.response
|
|
1386
1407
|
|
|
1387
1408
|
|
|
1388
|
-
def
|
|
1409
|
+
def _agent_id_delete_serialize(
|
|
1389
1410
|
self,
|
|
1390
1411
|
id,
|
|
1391
|
-
update_agent_request,
|
|
1392
1412
|
_request_auth,
|
|
1393
1413
|
_content_type,
|
|
1394
1414
|
_headers,
|
|
@@ -1416,8 +1436,6 @@ class AgentsApi:
|
|
|
1416
1436
|
# process the header parameters
|
|
1417
1437
|
# process the form parameters
|
|
1418
1438
|
# process the body parameter
|
|
1419
|
-
if update_agent_request is not None:
|
|
1420
|
-
_body_params = update_agent_request
|
|
1421
1439
|
|
|
1422
1440
|
|
|
1423
1441
|
# set the HTTP header `Accept`
|
|
@@ -1428,19 +1446,6 @@ class AgentsApi:
|
|
|
1428
1446
|
]
|
|
1429
1447
|
)
|
|
1430
1448
|
|
|
1431
|
-
# set the HTTP header `Content-Type`
|
|
1432
|
-
if _content_type:
|
|
1433
|
-
_header_params['Content-Type'] = _content_type
|
|
1434
|
-
else:
|
|
1435
|
-
_default_content_type = (
|
|
1436
|
-
self.api_client.select_header_content_type(
|
|
1437
|
-
[
|
|
1438
|
-
'application/json'
|
|
1439
|
-
]
|
|
1440
|
-
)
|
|
1441
|
-
)
|
|
1442
|
-
if _default_content_type is not None:
|
|
1443
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1444
1449
|
|
|
1445
1450
|
# authentication setting
|
|
1446
1451
|
_auth_settings: List[str] = [
|
|
@@ -1448,7 +1453,7 @@ class AgentsApi:
|
|
|
1448
1453
|
]
|
|
1449
1454
|
|
|
1450
1455
|
return self.api_client.param_serialize(
|
|
1451
|
-
method='
|
|
1456
|
+
method='DELETE',
|
|
1452
1457
|
resource_path='/agent/{id}',
|
|
1453
1458
|
path_params=_path_params,
|
|
1454
1459
|
query_params=_query_params,
|
|
@@ -1463,3 +1468,1124 @@ class AgentsApi:
|
|
|
1463
1468
|
)
|
|
1464
1469
|
|
|
1465
1470
|
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
@validate_call
|
|
1474
|
+
def agent_id_get(
|
|
1475
|
+
self,
|
|
1476
|
+
id: StrictStr,
|
|
1477
|
+
_request_timeout: Union[
|
|
1478
|
+
None,
|
|
1479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1480
|
+
Tuple[
|
|
1481
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1482
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1483
|
+
]
|
|
1484
|
+
] = None,
|
|
1485
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1486
|
+
_content_type: Optional[StrictStr] = None,
|
|
1487
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1488
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1489
|
+
) -> AgentIdGet200Response:
|
|
1490
|
+
"""Get agent by ID
|
|
1491
|
+
|
|
1492
|
+
Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent.
|
|
1493
|
+
|
|
1494
|
+
:param id: (required)
|
|
1495
|
+
:type id: str
|
|
1496
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1497
|
+
number provided, it will be total request
|
|
1498
|
+
timeout. It can also be a pair (tuple) of
|
|
1499
|
+
(connection, read) timeouts.
|
|
1500
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1501
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1502
|
+
request; this effectively ignores the
|
|
1503
|
+
authentication in the spec for a single request.
|
|
1504
|
+
:type _request_auth: dict, optional
|
|
1505
|
+
:param _content_type: force content-type for the request.
|
|
1506
|
+
:type _content_type: str, Optional
|
|
1507
|
+
:param _headers: set to override the headers for a single
|
|
1508
|
+
request; this effectively ignores the headers
|
|
1509
|
+
in the spec for a single request.
|
|
1510
|
+
:type _headers: dict, optional
|
|
1511
|
+
:param _host_index: set to override the host_index for a single
|
|
1512
|
+
request; this effectively ignores the host_index
|
|
1513
|
+
in the spec for a single request.
|
|
1514
|
+
:type _host_index: int, optional
|
|
1515
|
+
:return: Returns the result object.
|
|
1516
|
+
""" # noqa: E501
|
|
1517
|
+
|
|
1518
|
+
_param = self._agent_id_get_serialize(
|
|
1519
|
+
id=id,
|
|
1520
|
+
_request_auth=_request_auth,
|
|
1521
|
+
_content_type=_content_type,
|
|
1522
|
+
_headers=_headers,
|
|
1523
|
+
_host_index=_host_index
|
|
1524
|
+
)
|
|
1525
|
+
|
|
1526
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1527
|
+
'200': "AgentIdGet200Response",
|
|
1528
|
+
'400': "BadRequestErrorResponse",
|
|
1529
|
+
'401': "UnauthorizedErrorReponse",
|
|
1530
|
+
'500': "InternalServerErrorResponse",
|
|
1531
|
+
}
|
|
1532
|
+
response_data = self.api_client.call_api(
|
|
1533
|
+
*_param,
|
|
1534
|
+
_request_timeout=_request_timeout
|
|
1535
|
+
)
|
|
1536
|
+
response_data.read()
|
|
1537
|
+
return self.api_client.response_deserialize(
|
|
1538
|
+
response_data=response_data,
|
|
1539
|
+
response_types_map=_response_types_map,
|
|
1540
|
+
).data
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
@validate_call
|
|
1544
|
+
def agent_id_get_with_http_info(
|
|
1545
|
+
self,
|
|
1546
|
+
id: StrictStr,
|
|
1547
|
+
_request_timeout: Union[
|
|
1548
|
+
None,
|
|
1549
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1550
|
+
Tuple[
|
|
1551
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1552
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1553
|
+
]
|
|
1554
|
+
] = None,
|
|
1555
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1556
|
+
_content_type: Optional[StrictStr] = None,
|
|
1557
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1558
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1559
|
+
) -> ApiResponse[AgentIdGet200Response]:
|
|
1560
|
+
"""Get agent by ID
|
|
1561
|
+
|
|
1562
|
+
Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent.
|
|
1563
|
+
|
|
1564
|
+
:param id: (required)
|
|
1565
|
+
:type id: str
|
|
1566
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1567
|
+
number provided, it will be total request
|
|
1568
|
+
timeout. It can also be a pair (tuple) of
|
|
1569
|
+
(connection, read) timeouts.
|
|
1570
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1571
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1572
|
+
request; this effectively ignores the
|
|
1573
|
+
authentication in the spec for a single request.
|
|
1574
|
+
:type _request_auth: dict, optional
|
|
1575
|
+
:param _content_type: force content-type for the request.
|
|
1576
|
+
:type _content_type: str, Optional
|
|
1577
|
+
:param _headers: set to override the headers for a single
|
|
1578
|
+
request; this effectively ignores the headers
|
|
1579
|
+
in the spec for a single request.
|
|
1580
|
+
:type _headers: dict, optional
|
|
1581
|
+
:param _host_index: set to override the host_index for a single
|
|
1582
|
+
request; this effectively ignores the host_index
|
|
1583
|
+
in the spec for a single request.
|
|
1584
|
+
:type _host_index: int, optional
|
|
1585
|
+
:return: Returns the result object.
|
|
1586
|
+
""" # noqa: E501
|
|
1587
|
+
|
|
1588
|
+
_param = self._agent_id_get_serialize(
|
|
1589
|
+
id=id,
|
|
1590
|
+
_request_auth=_request_auth,
|
|
1591
|
+
_content_type=_content_type,
|
|
1592
|
+
_headers=_headers,
|
|
1593
|
+
_host_index=_host_index
|
|
1594
|
+
)
|
|
1595
|
+
|
|
1596
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1597
|
+
'200': "AgentIdGet200Response",
|
|
1598
|
+
'400': "BadRequestErrorResponse",
|
|
1599
|
+
'401': "UnauthorizedErrorReponse",
|
|
1600
|
+
'500': "InternalServerErrorResponse",
|
|
1601
|
+
}
|
|
1602
|
+
response_data = self.api_client.call_api(
|
|
1603
|
+
*_param,
|
|
1604
|
+
_request_timeout=_request_timeout
|
|
1605
|
+
)
|
|
1606
|
+
response_data.read()
|
|
1607
|
+
return self.api_client.response_deserialize(
|
|
1608
|
+
response_data=response_data,
|
|
1609
|
+
response_types_map=_response_types_map,
|
|
1610
|
+
)
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
@validate_call
|
|
1614
|
+
def agent_id_get_without_preload_content(
|
|
1615
|
+
self,
|
|
1616
|
+
id: StrictStr,
|
|
1617
|
+
_request_timeout: Union[
|
|
1618
|
+
None,
|
|
1619
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1620
|
+
Tuple[
|
|
1621
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1622
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1623
|
+
]
|
|
1624
|
+
] = None,
|
|
1625
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1626
|
+
_content_type: Optional[StrictStr] = None,
|
|
1627
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1628
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1629
|
+
) -> RESTResponseType:
|
|
1630
|
+
"""Get agent by ID
|
|
1631
|
+
|
|
1632
|
+
Agents are the main entities in the system. Agents are used to create conversations. You can create workflow for an agent and configure it for different use cases. You can also create custom workflows for an agent.
|
|
1633
|
+
|
|
1634
|
+
:param id: (required)
|
|
1635
|
+
:type id: str
|
|
1636
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1637
|
+
number provided, it will be total request
|
|
1638
|
+
timeout. It can also be a pair (tuple) of
|
|
1639
|
+
(connection, read) timeouts.
|
|
1640
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1641
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1642
|
+
request; this effectively ignores the
|
|
1643
|
+
authentication in the spec for a single request.
|
|
1644
|
+
:type _request_auth: dict, optional
|
|
1645
|
+
:param _content_type: force content-type for the request.
|
|
1646
|
+
:type _content_type: str, Optional
|
|
1647
|
+
:param _headers: set to override the headers for a single
|
|
1648
|
+
request; this effectively ignores the headers
|
|
1649
|
+
in the spec for a single request.
|
|
1650
|
+
:type _headers: dict, optional
|
|
1651
|
+
:param _host_index: set to override the host_index for a single
|
|
1652
|
+
request; this effectively ignores the host_index
|
|
1653
|
+
in the spec for a single request.
|
|
1654
|
+
:type _host_index: int, optional
|
|
1655
|
+
:return: Returns the result object.
|
|
1656
|
+
""" # noqa: E501
|
|
1657
|
+
|
|
1658
|
+
_param = self._agent_id_get_serialize(
|
|
1659
|
+
id=id,
|
|
1660
|
+
_request_auth=_request_auth,
|
|
1661
|
+
_content_type=_content_type,
|
|
1662
|
+
_headers=_headers,
|
|
1663
|
+
_host_index=_host_index
|
|
1664
|
+
)
|
|
1665
|
+
|
|
1666
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1667
|
+
'200': "AgentIdGet200Response",
|
|
1668
|
+
'400': "BadRequestErrorResponse",
|
|
1669
|
+
'401': "UnauthorizedErrorReponse",
|
|
1670
|
+
'500': "InternalServerErrorResponse",
|
|
1671
|
+
}
|
|
1672
|
+
response_data = self.api_client.call_api(
|
|
1673
|
+
*_param,
|
|
1674
|
+
_request_timeout=_request_timeout
|
|
1675
|
+
)
|
|
1676
|
+
return response_data.response
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
def _agent_id_get_serialize(
|
|
1680
|
+
self,
|
|
1681
|
+
id,
|
|
1682
|
+
_request_auth,
|
|
1683
|
+
_content_type,
|
|
1684
|
+
_headers,
|
|
1685
|
+
_host_index,
|
|
1686
|
+
) -> RequestSerialized:
|
|
1687
|
+
|
|
1688
|
+
_host = None
|
|
1689
|
+
|
|
1690
|
+
_collection_formats: Dict[str, str] = {
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
_path_params: Dict[str, str] = {}
|
|
1694
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1695
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1696
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1697
|
+
_files: Dict[
|
|
1698
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1699
|
+
] = {}
|
|
1700
|
+
_body_params: Optional[bytes] = None
|
|
1701
|
+
|
|
1702
|
+
# process the path parameters
|
|
1703
|
+
if id is not None:
|
|
1704
|
+
_path_params['id'] = id
|
|
1705
|
+
# process the query parameters
|
|
1706
|
+
# process the header parameters
|
|
1707
|
+
# process the form parameters
|
|
1708
|
+
# process the body parameter
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
# set the HTTP header `Accept`
|
|
1712
|
+
if 'Accept' not in _header_params:
|
|
1713
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1714
|
+
[
|
|
1715
|
+
'application/json'
|
|
1716
|
+
]
|
|
1717
|
+
)
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
# authentication setting
|
|
1721
|
+
_auth_settings: List[str] = [
|
|
1722
|
+
'BearerAuth'
|
|
1723
|
+
]
|
|
1724
|
+
|
|
1725
|
+
return self.api_client.param_serialize(
|
|
1726
|
+
method='GET',
|
|
1727
|
+
resource_path='/agent/{id}',
|
|
1728
|
+
path_params=_path_params,
|
|
1729
|
+
query_params=_query_params,
|
|
1730
|
+
header_params=_header_params,
|
|
1731
|
+
body=_body_params,
|
|
1732
|
+
post_params=_form_params,
|
|
1733
|
+
files=_files,
|
|
1734
|
+
auth_settings=_auth_settings,
|
|
1735
|
+
collection_formats=_collection_formats,
|
|
1736
|
+
_host=_host,
|
|
1737
|
+
_request_auth=_request_auth
|
|
1738
|
+
)
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
@validate_call
|
|
1744
|
+
def agent_id_patch(
|
|
1745
|
+
self,
|
|
1746
|
+
id: StrictStr,
|
|
1747
|
+
agent_id_patch_request: AgentIdPatchRequest,
|
|
1748
|
+
_request_timeout: Union[
|
|
1749
|
+
None,
|
|
1750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1751
|
+
Tuple[
|
|
1752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1753
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1754
|
+
]
|
|
1755
|
+
] = None,
|
|
1756
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1757
|
+
_content_type: Optional[StrictStr] = None,
|
|
1758
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1759
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1760
|
+
) -> AgentIdPatch200Response:
|
|
1761
|
+
"""Update an agent
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
:param id: (required)
|
|
1765
|
+
:type id: str
|
|
1766
|
+
:param agent_id_patch_request: (required)
|
|
1767
|
+
:type agent_id_patch_request: AgentIdPatchRequest
|
|
1768
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1769
|
+
number provided, it will be total request
|
|
1770
|
+
timeout. It can also be a pair (tuple) of
|
|
1771
|
+
(connection, read) timeouts.
|
|
1772
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1773
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1774
|
+
request; this effectively ignores the
|
|
1775
|
+
authentication in the spec for a single request.
|
|
1776
|
+
:type _request_auth: dict, optional
|
|
1777
|
+
:param _content_type: force content-type for the request.
|
|
1778
|
+
:type _content_type: str, Optional
|
|
1779
|
+
:param _headers: set to override the headers for a single
|
|
1780
|
+
request; this effectively ignores the headers
|
|
1781
|
+
in the spec for a single request.
|
|
1782
|
+
:type _headers: dict, optional
|
|
1783
|
+
:param _host_index: set to override the host_index for a single
|
|
1784
|
+
request; this effectively ignores the host_index
|
|
1785
|
+
in the spec for a single request.
|
|
1786
|
+
:type _host_index: int, optional
|
|
1787
|
+
:return: Returns the result object.
|
|
1788
|
+
""" # noqa: E501
|
|
1789
|
+
|
|
1790
|
+
_param = self._agent_id_patch_serialize(
|
|
1791
|
+
id=id,
|
|
1792
|
+
agent_id_patch_request=agent_id_patch_request,
|
|
1793
|
+
_request_auth=_request_auth,
|
|
1794
|
+
_content_type=_content_type,
|
|
1795
|
+
_headers=_headers,
|
|
1796
|
+
_host_index=_host_index
|
|
1797
|
+
)
|
|
1798
|
+
|
|
1799
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1800
|
+
'200': "AgentIdPatch200Response",
|
|
1801
|
+
'400': "BadRequestErrorResponse",
|
|
1802
|
+
'401': "ApiResponse",
|
|
1803
|
+
'500': "InternalServerErrorResponse",
|
|
1804
|
+
}
|
|
1805
|
+
response_data = self.api_client.call_api(
|
|
1806
|
+
*_param,
|
|
1807
|
+
_request_timeout=_request_timeout
|
|
1808
|
+
)
|
|
1809
|
+
response_data.read()
|
|
1810
|
+
return self.api_client.response_deserialize(
|
|
1811
|
+
response_data=response_data,
|
|
1812
|
+
response_types_map=_response_types_map,
|
|
1813
|
+
).data
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
@validate_call
|
|
1817
|
+
def agent_id_patch_with_http_info(
|
|
1818
|
+
self,
|
|
1819
|
+
id: StrictStr,
|
|
1820
|
+
agent_id_patch_request: AgentIdPatchRequest,
|
|
1821
|
+
_request_timeout: Union[
|
|
1822
|
+
None,
|
|
1823
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1824
|
+
Tuple[
|
|
1825
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1827
|
+
]
|
|
1828
|
+
] = None,
|
|
1829
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1830
|
+
_content_type: Optional[StrictStr] = None,
|
|
1831
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1832
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1833
|
+
) -> ApiResponse[AgentIdPatch200Response]:
|
|
1834
|
+
"""Update an agent
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
:param id: (required)
|
|
1838
|
+
:type id: str
|
|
1839
|
+
:param agent_id_patch_request: (required)
|
|
1840
|
+
:type agent_id_patch_request: AgentIdPatchRequest
|
|
1841
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1842
|
+
number provided, it will be total request
|
|
1843
|
+
timeout. It can also be a pair (tuple) of
|
|
1844
|
+
(connection, read) timeouts.
|
|
1845
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1846
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1847
|
+
request; this effectively ignores the
|
|
1848
|
+
authentication in the spec for a single request.
|
|
1849
|
+
:type _request_auth: dict, optional
|
|
1850
|
+
:param _content_type: force content-type for the request.
|
|
1851
|
+
:type _content_type: str, Optional
|
|
1852
|
+
:param _headers: set to override the headers for a single
|
|
1853
|
+
request; this effectively ignores the headers
|
|
1854
|
+
in the spec for a single request.
|
|
1855
|
+
:type _headers: dict, optional
|
|
1856
|
+
:param _host_index: set to override the host_index for a single
|
|
1857
|
+
request; this effectively ignores the host_index
|
|
1858
|
+
in the spec for a single request.
|
|
1859
|
+
:type _host_index: int, optional
|
|
1860
|
+
:return: Returns the result object.
|
|
1861
|
+
""" # noqa: E501
|
|
1862
|
+
|
|
1863
|
+
_param = self._agent_id_patch_serialize(
|
|
1864
|
+
id=id,
|
|
1865
|
+
agent_id_patch_request=agent_id_patch_request,
|
|
1866
|
+
_request_auth=_request_auth,
|
|
1867
|
+
_content_type=_content_type,
|
|
1868
|
+
_headers=_headers,
|
|
1869
|
+
_host_index=_host_index
|
|
1870
|
+
)
|
|
1871
|
+
|
|
1872
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1873
|
+
'200': "AgentIdPatch200Response",
|
|
1874
|
+
'400': "BadRequestErrorResponse",
|
|
1875
|
+
'401': "ApiResponse",
|
|
1876
|
+
'500': "InternalServerErrorResponse",
|
|
1877
|
+
}
|
|
1878
|
+
response_data = self.api_client.call_api(
|
|
1879
|
+
*_param,
|
|
1880
|
+
_request_timeout=_request_timeout
|
|
1881
|
+
)
|
|
1882
|
+
response_data.read()
|
|
1883
|
+
return self.api_client.response_deserialize(
|
|
1884
|
+
response_data=response_data,
|
|
1885
|
+
response_types_map=_response_types_map,
|
|
1886
|
+
)
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
@validate_call
|
|
1890
|
+
def agent_id_patch_without_preload_content(
|
|
1891
|
+
self,
|
|
1892
|
+
id: StrictStr,
|
|
1893
|
+
agent_id_patch_request: AgentIdPatchRequest,
|
|
1894
|
+
_request_timeout: Union[
|
|
1895
|
+
None,
|
|
1896
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1897
|
+
Tuple[
|
|
1898
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1899
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1900
|
+
]
|
|
1901
|
+
] = None,
|
|
1902
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1903
|
+
_content_type: Optional[StrictStr] = None,
|
|
1904
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1905
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1906
|
+
) -> RESTResponseType:
|
|
1907
|
+
"""Update an agent
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
:param id: (required)
|
|
1911
|
+
:type id: str
|
|
1912
|
+
:param agent_id_patch_request: (required)
|
|
1913
|
+
:type agent_id_patch_request: AgentIdPatchRequest
|
|
1914
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1915
|
+
number provided, it will be total request
|
|
1916
|
+
timeout. It can also be a pair (tuple) of
|
|
1917
|
+
(connection, read) timeouts.
|
|
1918
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1919
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1920
|
+
request; this effectively ignores the
|
|
1921
|
+
authentication in the spec for a single request.
|
|
1922
|
+
:type _request_auth: dict, optional
|
|
1923
|
+
:param _content_type: force content-type for the request.
|
|
1924
|
+
:type _content_type: str, Optional
|
|
1925
|
+
:param _headers: set to override the headers for a single
|
|
1926
|
+
request; this effectively ignores the headers
|
|
1927
|
+
in the spec for a single request.
|
|
1928
|
+
:type _headers: dict, optional
|
|
1929
|
+
:param _host_index: set to override the host_index for a single
|
|
1930
|
+
request; this effectively ignores the host_index
|
|
1931
|
+
in the spec for a single request.
|
|
1932
|
+
:type _host_index: int, optional
|
|
1933
|
+
:return: Returns the result object.
|
|
1934
|
+
""" # noqa: E501
|
|
1935
|
+
|
|
1936
|
+
_param = self._agent_id_patch_serialize(
|
|
1937
|
+
id=id,
|
|
1938
|
+
agent_id_patch_request=agent_id_patch_request,
|
|
1939
|
+
_request_auth=_request_auth,
|
|
1940
|
+
_content_type=_content_type,
|
|
1941
|
+
_headers=_headers,
|
|
1942
|
+
_host_index=_host_index
|
|
1943
|
+
)
|
|
1944
|
+
|
|
1945
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1946
|
+
'200': "AgentIdPatch200Response",
|
|
1947
|
+
'400': "BadRequestErrorResponse",
|
|
1948
|
+
'401': "ApiResponse",
|
|
1949
|
+
'500': "InternalServerErrorResponse",
|
|
1950
|
+
}
|
|
1951
|
+
response_data = self.api_client.call_api(
|
|
1952
|
+
*_param,
|
|
1953
|
+
_request_timeout=_request_timeout
|
|
1954
|
+
)
|
|
1955
|
+
return response_data.response
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
def _agent_id_patch_serialize(
|
|
1959
|
+
self,
|
|
1960
|
+
id,
|
|
1961
|
+
agent_id_patch_request,
|
|
1962
|
+
_request_auth,
|
|
1963
|
+
_content_type,
|
|
1964
|
+
_headers,
|
|
1965
|
+
_host_index,
|
|
1966
|
+
) -> RequestSerialized:
|
|
1967
|
+
|
|
1968
|
+
_host = None
|
|
1969
|
+
|
|
1970
|
+
_collection_formats: Dict[str, str] = {
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
_path_params: Dict[str, str] = {}
|
|
1974
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1975
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1976
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1977
|
+
_files: Dict[
|
|
1978
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1979
|
+
] = {}
|
|
1980
|
+
_body_params: Optional[bytes] = None
|
|
1981
|
+
|
|
1982
|
+
# process the path parameters
|
|
1983
|
+
if id is not None:
|
|
1984
|
+
_path_params['id'] = id
|
|
1985
|
+
# process the query parameters
|
|
1986
|
+
# process the header parameters
|
|
1987
|
+
# process the form parameters
|
|
1988
|
+
# process the body parameter
|
|
1989
|
+
if agent_id_patch_request is not None:
|
|
1990
|
+
_body_params = agent_id_patch_request
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
# set the HTTP header `Accept`
|
|
1994
|
+
if 'Accept' not in _header_params:
|
|
1995
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1996
|
+
[
|
|
1997
|
+
'application/json'
|
|
1998
|
+
]
|
|
1999
|
+
)
|
|
2000
|
+
|
|
2001
|
+
# set the HTTP header `Content-Type`
|
|
2002
|
+
if _content_type:
|
|
2003
|
+
_header_params['Content-Type'] = _content_type
|
|
2004
|
+
else:
|
|
2005
|
+
_default_content_type = (
|
|
2006
|
+
self.api_client.select_header_content_type(
|
|
2007
|
+
[
|
|
2008
|
+
'application/json'
|
|
2009
|
+
]
|
|
2010
|
+
)
|
|
2011
|
+
)
|
|
2012
|
+
if _default_content_type is not None:
|
|
2013
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2014
|
+
|
|
2015
|
+
# authentication setting
|
|
2016
|
+
_auth_settings: List[str] = [
|
|
2017
|
+
'BearerAuth'
|
|
2018
|
+
]
|
|
2019
|
+
|
|
2020
|
+
return self.api_client.param_serialize(
|
|
2021
|
+
method='PATCH',
|
|
2022
|
+
resource_path='/agent/{id}',
|
|
2023
|
+
path_params=_path_params,
|
|
2024
|
+
query_params=_query_params,
|
|
2025
|
+
header_params=_header_params,
|
|
2026
|
+
body=_body_params,
|
|
2027
|
+
post_params=_form_params,
|
|
2028
|
+
files=_files,
|
|
2029
|
+
auth_settings=_auth_settings,
|
|
2030
|
+
collection_formats=_collection_formats,
|
|
2031
|
+
_host=_host,
|
|
2032
|
+
_request_auth=_request_auth
|
|
2033
|
+
)
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
@validate_call
|
|
2039
|
+
def agent_id_workflow_get(
|
|
2040
|
+
self,
|
|
2041
|
+
id: Annotated[StrictStr, Field(description="The ID of the agent")],
|
|
2042
|
+
_request_timeout: Union[
|
|
2043
|
+
None,
|
|
2044
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2045
|
+
Tuple[
|
|
2046
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2047
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2048
|
+
]
|
|
2049
|
+
] = None,
|
|
2050
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2051
|
+
_content_type: Optional[StrictStr] = None,
|
|
2052
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2053
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2054
|
+
) -> AgentIdWorkflowGet200Response:
|
|
2055
|
+
"""Get agent workflow
|
|
2056
|
+
|
|
2057
|
+
Retrieve the workflow configuration for a specific agent. The workflow contains nodes and edges that define the conversation flow and logic for the agent.
|
|
2058
|
+
|
|
2059
|
+
:param id: The ID of the agent (required)
|
|
2060
|
+
:type id: str
|
|
2061
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2062
|
+
number provided, it will be total request
|
|
2063
|
+
timeout. It can also be a pair (tuple) of
|
|
2064
|
+
(connection, read) timeouts.
|
|
2065
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2066
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2067
|
+
request; this effectively ignores the
|
|
2068
|
+
authentication in the spec for a single request.
|
|
2069
|
+
:type _request_auth: dict, optional
|
|
2070
|
+
:param _content_type: force content-type for the request.
|
|
2071
|
+
:type _content_type: str, Optional
|
|
2072
|
+
:param _headers: set to override the headers for a single
|
|
2073
|
+
request; this effectively ignores the headers
|
|
2074
|
+
in the spec for a single request.
|
|
2075
|
+
:type _headers: dict, optional
|
|
2076
|
+
:param _host_index: set to override the host_index for a single
|
|
2077
|
+
request; this effectively ignores the host_index
|
|
2078
|
+
in the spec for a single request.
|
|
2079
|
+
:type _host_index: int, optional
|
|
2080
|
+
:return: Returns the result object.
|
|
2081
|
+
""" # noqa: E501
|
|
2082
|
+
|
|
2083
|
+
_param = self._agent_id_workflow_get_serialize(
|
|
2084
|
+
id=id,
|
|
2085
|
+
_request_auth=_request_auth,
|
|
2086
|
+
_content_type=_content_type,
|
|
2087
|
+
_headers=_headers,
|
|
2088
|
+
_host_index=_host_index
|
|
2089
|
+
)
|
|
2090
|
+
|
|
2091
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2092
|
+
'200': "AgentIdWorkflowGet200Response",
|
|
2093
|
+
'400': "BadRequestErrorResponse",
|
|
2094
|
+
'401': "UnauthorizedErrorReponse",
|
|
2095
|
+
'404': "AgentIdWorkflowGet404Response",
|
|
2096
|
+
'500': "InternalServerErrorResponse",
|
|
2097
|
+
}
|
|
2098
|
+
response_data = self.api_client.call_api(
|
|
2099
|
+
*_param,
|
|
2100
|
+
_request_timeout=_request_timeout
|
|
2101
|
+
)
|
|
2102
|
+
response_data.read()
|
|
2103
|
+
return self.api_client.response_deserialize(
|
|
2104
|
+
response_data=response_data,
|
|
2105
|
+
response_types_map=_response_types_map,
|
|
2106
|
+
).data
|
|
2107
|
+
|
|
2108
|
+
|
|
2109
|
+
@validate_call
|
|
2110
|
+
def agent_id_workflow_get_with_http_info(
|
|
2111
|
+
self,
|
|
2112
|
+
id: Annotated[StrictStr, Field(description="The ID of the agent")],
|
|
2113
|
+
_request_timeout: Union[
|
|
2114
|
+
None,
|
|
2115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2116
|
+
Tuple[
|
|
2117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2119
|
+
]
|
|
2120
|
+
] = None,
|
|
2121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2122
|
+
_content_type: Optional[StrictStr] = None,
|
|
2123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2125
|
+
) -> ApiResponse[AgentIdWorkflowGet200Response]:
|
|
2126
|
+
"""Get agent workflow
|
|
2127
|
+
|
|
2128
|
+
Retrieve the workflow configuration for a specific agent. The workflow contains nodes and edges that define the conversation flow and logic for the agent.
|
|
2129
|
+
|
|
2130
|
+
:param id: The ID of the agent (required)
|
|
2131
|
+
:type id: str
|
|
2132
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2133
|
+
number provided, it will be total request
|
|
2134
|
+
timeout. It can also be a pair (tuple) of
|
|
2135
|
+
(connection, read) timeouts.
|
|
2136
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2137
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2138
|
+
request; this effectively ignores the
|
|
2139
|
+
authentication in the spec for a single request.
|
|
2140
|
+
:type _request_auth: dict, optional
|
|
2141
|
+
:param _content_type: force content-type for the request.
|
|
2142
|
+
:type _content_type: str, Optional
|
|
2143
|
+
:param _headers: set to override the headers for a single
|
|
2144
|
+
request; this effectively ignores the headers
|
|
2145
|
+
in the spec for a single request.
|
|
2146
|
+
:type _headers: dict, optional
|
|
2147
|
+
:param _host_index: set to override the host_index for a single
|
|
2148
|
+
request; this effectively ignores the host_index
|
|
2149
|
+
in the spec for a single request.
|
|
2150
|
+
:type _host_index: int, optional
|
|
2151
|
+
:return: Returns the result object.
|
|
2152
|
+
""" # noqa: E501
|
|
2153
|
+
|
|
2154
|
+
_param = self._agent_id_workflow_get_serialize(
|
|
2155
|
+
id=id,
|
|
2156
|
+
_request_auth=_request_auth,
|
|
2157
|
+
_content_type=_content_type,
|
|
2158
|
+
_headers=_headers,
|
|
2159
|
+
_host_index=_host_index
|
|
2160
|
+
)
|
|
2161
|
+
|
|
2162
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2163
|
+
'200': "AgentIdWorkflowGet200Response",
|
|
2164
|
+
'400': "BadRequestErrorResponse",
|
|
2165
|
+
'401': "UnauthorizedErrorReponse",
|
|
2166
|
+
'404': "AgentIdWorkflowGet404Response",
|
|
2167
|
+
'500': "InternalServerErrorResponse",
|
|
2168
|
+
}
|
|
2169
|
+
response_data = self.api_client.call_api(
|
|
2170
|
+
*_param,
|
|
2171
|
+
_request_timeout=_request_timeout
|
|
2172
|
+
)
|
|
2173
|
+
response_data.read()
|
|
2174
|
+
return self.api_client.response_deserialize(
|
|
2175
|
+
response_data=response_data,
|
|
2176
|
+
response_types_map=_response_types_map,
|
|
2177
|
+
)
|
|
2178
|
+
|
|
2179
|
+
|
|
2180
|
+
@validate_call
|
|
2181
|
+
def agent_id_workflow_get_without_preload_content(
|
|
2182
|
+
self,
|
|
2183
|
+
id: Annotated[StrictStr, Field(description="The ID of the agent")],
|
|
2184
|
+
_request_timeout: Union[
|
|
2185
|
+
None,
|
|
2186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2187
|
+
Tuple[
|
|
2188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2190
|
+
]
|
|
2191
|
+
] = None,
|
|
2192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2193
|
+
_content_type: Optional[StrictStr] = None,
|
|
2194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2196
|
+
) -> RESTResponseType:
|
|
2197
|
+
"""Get agent workflow
|
|
2198
|
+
|
|
2199
|
+
Retrieve the workflow configuration for a specific agent. The workflow contains nodes and edges that define the conversation flow and logic for the agent.
|
|
2200
|
+
|
|
2201
|
+
:param id: The ID of the agent (required)
|
|
2202
|
+
:type id: str
|
|
2203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2204
|
+
number provided, it will be total request
|
|
2205
|
+
timeout. It can also be a pair (tuple) of
|
|
2206
|
+
(connection, read) timeouts.
|
|
2207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2209
|
+
request; this effectively ignores the
|
|
2210
|
+
authentication in the spec for a single request.
|
|
2211
|
+
:type _request_auth: dict, optional
|
|
2212
|
+
:param _content_type: force content-type for the request.
|
|
2213
|
+
:type _content_type: str, Optional
|
|
2214
|
+
:param _headers: set to override the headers for a single
|
|
2215
|
+
request; this effectively ignores the headers
|
|
2216
|
+
in the spec for a single request.
|
|
2217
|
+
:type _headers: dict, optional
|
|
2218
|
+
:param _host_index: set to override the host_index for a single
|
|
2219
|
+
request; this effectively ignores the host_index
|
|
2220
|
+
in the spec for a single request.
|
|
2221
|
+
:type _host_index: int, optional
|
|
2222
|
+
:return: Returns the result object.
|
|
2223
|
+
""" # noqa: E501
|
|
2224
|
+
|
|
2225
|
+
_param = self._agent_id_workflow_get_serialize(
|
|
2226
|
+
id=id,
|
|
2227
|
+
_request_auth=_request_auth,
|
|
2228
|
+
_content_type=_content_type,
|
|
2229
|
+
_headers=_headers,
|
|
2230
|
+
_host_index=_host_index
|
|
2231
|
+
)
|
|
2232
|
+
|
|
2233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2234
|
+
'200': "AgentIdWorkflowGet200Response",
|
|
2235
|
+
'400': "BadRequestErrorResponse",
|
|
2236
|
+
'401': "UnauthorizedErrorReponse",
|
|
2237
|
+
'404': "AgentIdWorkflowGet404Response",
|
|
2238
|
+
'500': "InternalServerErrorResponse",
|
|
2239
|
+
}
|
|
2240
|
+
response_data = self.api_client.call_api(
|
|
2241
|
+
*_param,
|
|
2242
|
+
_request_timeout=_request_timeout
|
|
2243
|
+
)
|
|
2244
|
+
return response_data.response
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
def _agent_id_workflow_get_serialize(
|
|
2248
|
+
self,
|
|
2249
|
+
id,
|
|
2250
|
+
_request_auth,
|
|
2251
|
+
_content_type,
|
|
2252
|
+
_headers,
|
|
2253
|
+
_host_index,
|
|
2254
|
+
) -> RequestSerialized:
|
|
2255
|
+
|
|
2256
|
+
_host = None
|
|
2257
|
+
|
|
2258
|
+
_collection_formats: Dict[str, str] = {
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
_path_params: Dict[str, str] = {}
|
|
2262
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2263
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2264
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2265
|
+
_files: Dict[
|
|
2266
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2267
|
+
] = {}
|
|
2268
|
+
_body_params: Optional[bytes] = None
|
|
2269
|
+
|
|
2270
|
+
# process the path parameters
|
|
2271
|
+
if id is not None:
|
|
2272
|
+
_path_params['id'] = id
|
|
2273
|
+
# process the query parameters
|
|
2274
|
+
# process the header parameters
|
|
2275
|
+
# process the form parameters
|
|
2276
|
+
# process the body parameter
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
# set the HTTP header `Accept`
|
|
2280
|
+
if 'Accept' not in _header_params:
|
|
2281
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2282
|
+
[
|
|
2283
|
+
'application/json'
|
|
2284
|
+
]
|
|
2285
|
+
)
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
# authentication setting
|
|
2289
|
+
_auth_settings: List[str] = [
|
|
2290
|
+
'BearerAuth'
|
|
2291
|
+
]
|
|
2292
|
+
|
|
2293
|
+
return self.api_client.param_serialize(
|
|
2294
|
+
method='GET',
|
|
2295
|
+
resource_path='/agent/{id}/workflow',
|
|
2296
|
+
path_params=_path_params,
|
|
2297
|
+
query_params=_query_params,
|
|
2298
|
+
header_params=_header_params,
|
|
2299
|
+
body=_body_params,
|
|
2300
|
+
post_params=_form_params,
|
|
2301
|
+
files=_files,
|
|
2302
|
+
auth_settings=_auth_settings,
|
|
2303
|
+
collection_formats=_collection_formats,
|
|
2304
|
+
_host=_host,
|
|
2305
|
+
_request_auth=_request_auth
|
|
2306
|
+
)
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
@validate_call
|
|
2312
|
+
def agent_post(
|
|
2313
|
+
self,
|
|
2314
|
+
create_agent_request: CreateAgentRequest,
|
|
2315
|
+
_request_timeout: Union[
|
|
2316
|
+
None,
|
|
2317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2318
|
+
Tuple[
|
|
2319
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2320
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2321
|
+
]
|
|
2322
|
+
] = None,
|
|
2323
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2324
|
+
_content_type: Optional[StrictStr] = None,
|
|
2325
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2326
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2327
|
+
) -> AgentFromTemplatePost200Response:
|
|
2328
|
+
"""Create a new agent
|
|
2329
|
+
|
|
2330
|
+
You can create a new agent by passing the name of the agent in the request body.
|
|
2331
|
+
|
|
2332
|
+
:param create_agent_request: (required)
|
|
2333
|
+
:type create_agent_request: CreateAgentRequest
|
|
2334
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2335
|
+
number provided, it will be total request
|
|
2336
|
+
timeout. It can also be a pair (tuple) of
|
|
2337
|
+
(connection, read) timeouts.
|
|
2338
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2339
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2340
|
+
request; this effectively ignores the
|
|
2341
|
+
authentication in the spec for a single request.
|
|
2342
|
+
:type _request_auth: dict, optional
|
|
2343
|
+
:param _content_type: force content-type for the request.
|
|
2344
|
+
:type _content_type: str, Optional
|
|
2345
|
+
:param _headers: set to override the headers for a single
|
|
2346
|
+
request; this effectively ignores the headers
|
|
2347
|
+
in the spec for a single request.
|
|
2348
|
+
:type _headers: dict, optional
|
|
2349
|
+
:param _host_index: set to override the host_index for a single
|
|
2350
|
+
request; this effectively ignores the host_index
|
|
2351
|
+
in the spec for a single request.
|
|
2352
|
+
:type _host_index: int, optional
|
|
2353
|
+
:return: Returns the result object.
|
|
2354
|
+
""" # noqa: E501
|
|
2355
|
+
|
|
2356
|
+
_param = self._agent_post_serialize(
|
|
2357
|
+
create_agent_request=create_agent_request,
|
|
2358
|
+
_request_auth=_request_auth,
|
|
2359
|
+
_content_type=_content_type,
|
|
2360
|
+
_headers=_headers,
|
|
2361
|
+
_host_index=_host_index
|
|
2362
|
+
)
|
|
2363
|
+
|
|
2364
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2365
|
+
'201': "AgentFromTemplatePost200Response",
|
|
2366
|
+
'400': "BadRequestErrorResponse",
|
|
2367
|
+
'401': "UnauthorizedErrorReponse",
|
|
2368
|
+
'500': "InternalServerErrorResponse",
|
|
2369
|
+
}
|
|
2370
|
+
response_data = self.api_client.call_api(
|
|
2371
|
+
*_param,
|
|
2372
|
+
_request_timeout=_request_timeout
|
|
2373
|
+
)
|
|
2374
|
+
response_data.read()
|
|
2375
|
+
return self.api_client.response_deserialize(
|
|
2376
|
+
response_data=response_data,
|
|
2377
|
+
response_types_map=_response_types_map,
|
|
2378
|
+
).data
|
|
2379
|
+
|
|
2380
|
+
|
|
2381
|
+
@validate_call
|
|
2382
|
+
def agent_post_with_http_info(
|
|
2383
|
+
self,
|
|
2384
|
+
create_agent_request: CreateAgentRequest,
|
|
2385
|
+
_request_timeout: Union[
|
|
2386
|
+
None,
|
|
2387
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2388
|
+
Tuple[
|
|
2389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2390
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2391
|
+
]
|
|
2392
|
+
] = None,
|
|
2393
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2394
|
+
_content_type: Optional[StrictStr] = None,
|
|
2395
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2396
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2397
|
+
) -> ApiResponse[AgentFromTemplatePost200Response]:
|
|
2398
|
+
"""Create a new agent
|
|
2399
|
+
|
|
2400
|
+
You can create a new agent by passing the name of the agent in the request body.
|
|
2401
|
+
|
|
2402
|
+
:param create_agent_request: (required)
|
|
2403
|
+
:type create_agent_request: CreateAgentRequest
|
|
2404
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2405
|
+
number provided, it will be total request
|
|
2406
|
+
timeout. It can also be a pair (tuple) of
|
|
2407
|
+
(connection, read) timeouts.
|
|
2408
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2409
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2410
|
+
request; this effectively ignores the
|
|
2411
|
+
authentication in the spec for a single request.
|
|
2412
|
+
:type _request_auth: dict, optional
|
|
2413
|
+
:param _content_type: force content-type for the request.
|
|
2414
|
+
:type _content_type: str, Optional
|
|
2415
|
+
:param _headers: set to override the headers for a single
|
|
2416
|
+
request; this effectively ignores the headers
|
|
2417
|
+
in the spec for a single request.
|
|
2418
|
+
:type _headers: dict, optional
|
|
2419
|
+
:param _host_index: set to override the host_index for a single
|
|
2420
|
+
request; this effectively ignores the host_index
|
|
2421
|
+
in the spec for a single request.
|
|
2422
|
+
:type _host_index: int, optional
|
|
2423
|
+
:return: Returns the result object.
|
|
2424
|
+
""" # noqa: E501
|
|
2425
|
+
|
|
2426
|
+
_param = self._agent_post_serialize(
|
|
2427
|
+
create_agent_request=create_agent_request,
|
|
2428
|
+
_request_auth=_request_auth,
|
|
2429
|
+
_content_type=_content_type,
|
|
2430
|
+
_headers=_headers,
|
|
2431
|
+
_host_index=_host_index
|
|
2432
|
+
)
|
|
2433
|
+
|
|
2434
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2435
|
+
'201': "AgentFromTemplatePost200Response",
|
|
2436
|
+
'400': "BadRequestErrorResponse",
|
|
2437
|
+
'401': "UnauthorizedErrorReponse",
|
|
2438
|
+
'500': "InternalServerErrorResponse",
|
|
2439
|
+
}
|
|
2440
|
+
response_data = self.api_client.call_api(
|
|
2441
|
+
*_param,
|
|
2442
|
+
_request_timeout=_request_timeout
|
|
2443
|
+
)
|
|
2444
|
+
response_data.read()
|
|
2445
|
+
return self.api_client.response_deserialize(
|
|
2446
|
+
response_data=response_data,
|
|
2447
|
+
response_types_map=_response_types_map,
|
|
2448
|
+
)
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
@validate_call
|
|
2452
|
+
def agent_post_without_preload_content(
|
|
2453
|
+
self,
|
|
2454
|
+
create_agent_request: CreateAgentRequest,
|
|
2455
|
+
_request_timeout: Union[
|
|
2456
|
+
None,
|
|
2457
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2458
|
+
Tuple[
|
|
2459
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2460
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2461
|
+
]
|
|
2462
|
+
] = None,
|
|
2463
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2464
|
+
_content_type: Optional[StrictStr] = None,
|
|
2465
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2466
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2467
|
+
) -> RESTResponseType:
|
|
2468
|
+
"""Create a new agent
|
|
2469
|
+
|
|
2470
|
+
You can create a new agent by passing the name of the agent in the request body.
|
|
2471
|
+
|
|
2472
|
+
:param create_agent_request: (required)
|
|
2473
|
+
:type create_agent_request: CreateAgentRequest
|
|
2474
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2475
|
+
number provided, it will be total request
|
|
2476
|
+
timeout. It can also be a pair (tuple) of
|
|
2477
|
+
(connection, read) timeouts.
|
|
2478
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2479
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2480
|
+
request; this effectively ignores the
|
|
2481
|
+
authentication in the spec for a single request.
|
|
2482
|
+
:type _request_auth: dict, optional
|
|
2483
|
+
:param _content_type: force content-type for the request.
|
|
2484
|
+
:type _content_type: str, Optional
|
|
2485
|
+
:param _headers: set to override the headers for a single
|
|
2486
|
+
request; this effectively ignores the headers
|
|
2487
|
+
in the spec for a single request.
|
|
2488
|
+
:type _headers: dict, optional
|
|
2489
|
+
:param _host_index: set to override the host_index for a single
|
|
2490
|
+
request; this effectively ignores the host_index
|
|
2491
|
+
in the spec for a single request.
|
|
2492
|
+
:type _host_index: int, optional
|
|
2493
|
+
:return: Returns the result object.
|
|
2494
|
+
""" # noqa: E501
|
|
2495
|
+
|
|
2496
|
+
_param = self._agent_post_serialize(
|
|
2497
|
+
create_agent_request=create_agent_request,
|
|
2498
|
+
_request_auth=_request_auth,
|
|
2499
|
+
_content_type=_content_type,
|
|
2500
|
+
_headers=_headers,
|
|
2501
|
+
_host_index=_host_index
|
|
2502
|
+
)
|
|
2503
|
+
|
|
2504
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2505
|
+
'201': "AgentFromTemplatePost200Response",
|
|
2506
|
+
'400': "BadRequestErrorResponse",
|
|
2507
|
+
'401': "UnauthorizedErrorReponse",
|
|
2508
|
+
'500': "InternalServerErrorResponse",
|
|
2509
|
+
}
|
|
2510
|
+
response_data = self.api_client.call_api(
|
|
2511
|
+
*_param,
|
|
2512
|
+
_request_timeout=_request_timeout
|
|
2513
|
+
)
|
|
2514
|
+
return response_data.response
|
|
2515
|
+
|
|
2516
|
+
|
|
2517
|
+
def _agent_post_serialize(
|
|
2518
|
+
self,
|
|
2519
|
+
create_agent_request,
|
|
2520
|
+
_request_auth,
|
|
2521
|
+
_content_type,
|
|
2522
|
+
_headers,
|
|
2523
|
+
_host_index,
|
|
2524
|
+
) -> RequestSerialized:
|
|
2525
|
+
|
|
2526
|
+
_host = None
|
|
2527
|
+
|
|
2528
|
+
_collection_formats: Dict[str, str] = {
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
_path_params: Dict[str, str] = {}
|
|
2532
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2533
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2534
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2535
|
+
_files: Dict[
|
|
2536
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2537
|
+
] = {}
|
|
2538
|
+
_body_params: Optional[bytes] = None
|
|
2539
|
+
|
|
2540
|
+
# process the path parameters
|
|
2541
|
+
# process the query parameters
|
|
2542
|
+
# process the header parameters
|
|
2543
|
+
# process the form parameters
|
|
2544
|
+
# process the body parameter
|
|
2545
|
+
if create_agent_request is not None:
|
|
2546
|
+
_body_params = create_agent_request
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
# set the HTTP header `Accept`
|
|
2550
|
+
if 'Accept' not in _header_params:
|
|
2551
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2552
|
+
[
|
|
2553
|
+
'application/json'
|
|
2554
|
+
]
|
|
2555
|
+
)
|
|
2556
|
+
|
|
2557
|
+
# set the HTTP header `Content-Type`
|
|
2558
|
+
if _content_type:
|
|
2559
|
+
_header_params['Content-Type'] = _content_type
|
|
2560
|
+
else:
|
|
2561
|
+
_default_content_type = (
|
|
2562
|
+
self.api_client.select_header_content_type(
|
|
2563
|
+
[
|
|
2564
|
+
'application/json'
|
|
2565
|
+
]
|
|
2566
|
+
)
|
|
2567
|
+
)
|
|
2568
|
+
if _default_content_type is not None:
|
|
2569
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2570
|
+
|
|
2571
|
+
# authentication setting
|
|
2572
|
+
_auth_settings: List[str] = [
|
|
2573
|
+
'BearerAuth'
|
|
2574
|
+
]
|
|
2575
|
+
|
|
2576
|
+
return self.api_client.param_serialize(
|
|
2577
|
+
method='POST',
|
|
2578
|
+
resource_path='/agent',
|
|
2579
|
+
path_params=_path_params,
|
|
2580
|
+
query_params=_query_params,
|
|
2581
|
+
header_params=_header_params,
|
|
2582
|
+
body=_body_params,
|
|
2583
|
+
post_params=_form_params,
|
|
2584
|
+
files=_files,
|
|
2585
|
+
auth_settings=_auth_settings,
|
|
2586
|
+
collection_formats=_collection_formats,
|
|
2587
|
+
_host=_host,
|
|
2588
|
+
_request_auth=_request_auth
|
|
2589
|
+
)
|
|
2590
|
+
|
|
2591
|
+
|