one-msg-sdk 1.0.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.
- one_msg_sdk/__init__.py +189 -0
- one_msg_sdk/api/__init__.py +14 -0
- one_msg_sdk/api/calling_api.py +901 -0
- one_msg_sdk/api/catalog_api.py +607 -0
- one_msg_sdk/api/channel_api.py +874 -0
- one_msg_sdk/api/flows_api.py +3212 -0
- one_msg_sdk/api/groups_api.py +1935 -0
- one_msg_sdk/api/messaging_api.py +7419 -0
- one_msg_sdk/api/profile_api.py +609 -0
- one_msg_sdk/api/templates_api.py +1180 -0
- one_msg_sdk/api/users_api.py +903 -0
- one_msg_sdk/api/webhooks_api.py +605 -0
- one_msg_sdk/api_client.py +805 -0
- one_msg_sdk/api_response.py +21 -0
- one_msg_sdk/configuration.py +635 -0
- one_msg_sdk/exceptions.py +219 -0
- one_msg_sdk/models/__init__.py +78 -0
- one_msg_sdk/models/add_template_request.py +108 -0
- one_msg_sdk/models/block_user_request.py +102 -0
- one_msg_sdk/models/conversational_automation.py +115 -0
- one_msg_sdk/models/conversational_automation_commands_inner.py +105 -0
- one_msg_sdk/models/create_commerce200_response.py +102 -0
- one_msg_sdk/models/create_commerce_request.py +106 -0
- one_msg_sdk/models/create_commerce_request_params.py +104 -0
- one_msg_sdk/models/create_groups200_response.py +107 -0
- one_msg_sdk/models/create_read_message200_response.py +102 -0
- one_msg_sdk/models/create_read_message401_response.py +89 -0
- one_msg_sdk/models/create_read_message_request.py +93 -0
- one_msg_sdk/models/delete_flows_flow_id200_response.py +109 -0
- one_msg_sdk/models/delete_groups_group_id200_response.py +104 -0
- one_msg_sdk/models/delete_media_legacy_request.py +102 -0
- one_msg_sdk/models/error_response.py +89 -0
- one_msg_sdk/models/get_commerce200_response_inner.py +106 -0
- one_msg_sdk/models/get_mm_lite_status200_response.py +106 -0
- one_msg_sdk/models/get_webhook200_response.py +102 -0
- one_msg_sdk/models/get_whatsapp_business_encryption200_response.py +116 -0
- one_msg_sdk/models/list_blocked_users200_response.py +102 -0
- one_msg_sdk/models/list_flows200_response.py +115 -0
- one_msg_sdk/models/list_messages200_response.py +104 -0
- one_msg_sdk/models/list_templates200_response.py +106 -0
- one_msg_sdk/models/message_sent_response.py +108 -0
- one_msg_sdk/models/patch_flows_flow_id_assets200_response.py +111 -0
- one_msg_sdk/models/profile_info.py +126 -0
- one_msg_sdk/models/retrieve_media200_response.py +110 -0
- one_msg_sdk/models/send_address_message_request.py +126 -0
- one_msg_sdk/models/send_button_request.py +103 -0
- one_msg_sdk/models/send_button_request_sections_inner.py +95 -0
- one_msg_sdk/models/send_button_request_sections_inner_reply.py +91 -0
- one_msg_sdk/models/send_carousel_request1.py +97 -0
- one_msg_sdk/models/send_contact_request.py +99 -0
- one_msg_sdk/models/send_contact_request_contacts_inner.py +117 -0
- one_msg_sdk/models/send_contact_request_contacts_inner_name.py +99 -0
- one_msg_sdk/models/send_contact_request_contacts_inner_org.py +93 -0
- one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.py +93 -0
- one_msg_sdk/models/send_cta_url_request.py +116 -0
- one_msg_sdk/models/send_file_request.py +129 -0
- one_msg_sdk/models/send_flow_request1.py +141 -0
- one_msg_sdk/models/send_flow_request1_header.py +144 -0
- one_msg_sdk/models/send_flow_request_header.py +144 -0
- one_msg_sdk/models/send_list_request.py +105 -0
- one_msg_sdk/models/send_list_request_sections_inner.py +99 -0
- one_msg_sdk/models/send_list_request_sections_inner_rows_inner.py +93 -0
- one_msg_sdk/models/send_location_request1.py +101 -0
- one_msg_sdk/models/send_location_request_request.py +91 -0
- one_msg_sdk/models/send_message_request.py +122 -0
- one_msg_sdk/models/send_order_details_request.py +128 -0
- one_msg_sdk/models/send_order_details_request_language.py +104 -0
- one_msg_sdk/models/send_order_details_request_order.py +124 -0
- one_msg_sdk/models/send_order_details_request_order_items_inner.py +112 -0
- one_msg_sdk/models/send_order_details_request_order_items_inner_amount.py +104 -0
- one_msg_sdk/models/send_payment_request_request.py +117 -0
- one_msg_sdk/models/send_reaction_request.py +93 -0
- one_msg_sdk/models/send_sticker_request.py +110 -0
- one_msg_sdk/models/send_template_request.py +107 -0
- one_msg_sdk/models/send_template_request_language.py +91 -0
- one_msg_sdk/models/set_whatsapp_business_encryption_request.py +89 -0
- one_msg_sdk/models/success_response.py +102 -0
- one_msg_sdk/models/update_me_request.py +114 -0
- one_msg_sdk/py.typed +0 -0
- one_msg_sdk/rest.py +264 -0
- one_msg_sdk-1.0.0.dist-info/METADATA +19 -0
- one_msg_sdk-1.0.0.dist-info/RECORD +85 -0
- one_msg_sdk-1.0.0.dist-info/WHEEL +5 -0
- one_msg_sdk-1.0.0.dist-info/licenses/LICENSE +21 -0
- one_msg_sdk-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,874 @@
|
|
|
1
|
+
"""
|
|
2
|
+
1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Any, Dict
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from one_msg_sdk.models.conversational_automation import ConversationalAutomation
|
|
23
|
+
|
|
24
|
+
from one_msg_sdk.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from one_msg_sdk.api_response import ApiResponse
|
|
26
|
+
from one_msg_sdk.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ChannelApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def get_conversational_automation(
|
|
44
|
+
self,
|
|
45
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
) -> ConversationalAutomation:
|
|
59
|
+
"""Get conversational automation settings
|
|
60
|
+
|
|
61
|
+
Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
|
|
62
|
+
|
|
63
|
+
:param token: JWT token or API key for authorization (required)
|
|
64
|
+
:type token: str
|
|
65
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
66
|
+
number provided, it will be total request
|
|
67
|
+
timeout. It can also be a pair (tuple) of
|
|
68
|
+
(connection, read) timeouts.
|
|
69
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
70
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
71
|
+
request; this effectively ignores the
|
|
72
|
+
authentication in the spec for a single request.
|
|
73
|
+
:type _request_auth: dict, optional
|
|
74
|
+
:param _content_type: force content-type for the request.
|
|
75
|
+
:type _content_type: str, Optional
|
|
76
|
+
:param _headers: set to override the headers for a single
|
|
77
|
+
request; this effectively ignores the headers
|
|
78
|
+
in the spec for a single request.
|
|
79
|
+
:type _headers: dict, optional
|
|
80
|
+
:param _host_index: set to override the host_index for a single
|
|
81
|
+
request; this effectively ignores the host_index
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _host_index: int, optional
|
|
84
|
+
:return: Returns the result object.
|
|
85
|
+
""" # noqa: E501
|
|
86
|
+
|
|
87
|
+
_param = self._get_conversational_automation_serialize(
|
|
88
|
+
token=token,
|
|
89
|
+
_request_auth=_request_auth,
|
|
90
|
+
_content_type=_content_type,
|
|
91
|
+
_headers=_headers,
|
|
92
|
+
_host_index=_host_index
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
96
|
+
'200': "ConversationalAutomation",
|
|
97
|
+
'401': "ErrorResponse",
|
|
98
|
+
'500': "ErrorResponse",
|
|
99
|
+
}
|
|
100
|
+
response_data = self.api_client.call_api(
|
|
101
|
+
*_param,
|
|
102
|
+
_request_timeout=_request_timeout
|
|
103
|
+
)
|
|
104
|
+
response_data.read()
|
|
105
|
+
return self.api_client.response_deserialize(
|
|
106
|
+
response_data=response_data,
|
|
107
|
+
response_types_map=_response_types_map,
|
|
108
|
+
).data
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@validate_call
|
|
112
|
+
def get_conversational_automation_with_http_info(
|
|
113
|
+
self,
|
|
114
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
115
|
+
_request_timeout: Union[
|
|
116
|
+
None,
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Tuple[
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
121
|
+
]
|
|
122
|
+
] = None,
|
|
123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_content_type: Optional[StrictStr] = None,
|
|
125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
127
|
+
) -> ApiResponse[ConversationalAutomation]:
|
|
128
|
+
"""Get conversational automation settings
|
|
129
|
+
|
|
130
|
+
Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
|
|
131
|
+
|
|
132
|
+
:param token: JWT token or API key for authorization (required)
|
|
133
|
+
:type token: str
|
|
134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
135
|
+
number provided, it will be total request
|
|
136
|
+
timeout. It can also be a pair (tuple) of
|
|
137
|
+
(connection, read) timeouts.
|
|
138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
140
|
+
request; this effectively ignores the
|
|
141
|
+
authentication in the spec for a single request.
|
|
142
|
+
:type _request_auth: dict, optional
|
|
143
|
+
:param _content_type: force content-type for the request.
|
|
144
|
+
:type _content_type: str, Optional
|
|
145
|
+
:param _headers: set to override the headers for a single
|
|
146
|
+
request; this effectively ignores the headers
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
:type _headers: dict, optional
|
|
149
|
+
:param _host_index: set to override the host_index for a single
|
|
150
|
+
request; this effectively ignores the host_index
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _host_index: int, optional
|
|
153
|
+
:return: Returns the result object.
|
|
154
|
+
""" # noqa: E501
|
|
155
|
+
|
|
156
|
+
_param = self._get_conversational_automation_serialize(
|
|
157
|
+
token=token,
|
|
158
|
+
_request_auth=_request_auth,
|
|
159
|
+
_content_type=_content_type,
|
|
160
|
+
_headers=_headers,
|
|
161
|
+
_host_index=_host_index
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
165
|
+
'200': "ConversationalAutomation",
|
|
166
|
+
'401': "ErrorResponse",
|
|
167
|
+
'500': "ErrorResponse",
|
|
168
|
+
}
|
|
169
|
+
response_data = self.api_client.call_api(
|
|
170
|
+
*_param,
|
|
171
|
+
_request_timeout=_request_timeout
|
|
172
|
+
)
|
|
173
|
+
response_data.read()
|
|
174
|
+
return self.api_client.response_deserialize(
|
|
175
|
+
response_data=response_data,
|
|
176
|
+
response_types_map=_response_types_map,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validate_call
|
|
181
|
+
def get_conversational_automation_without_preload_content(
|
|
182
|
+
self,
|
|
183
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
184
|
+
_request_timeout: Union[
|
|
185
|
+
None,
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Tuple[
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
|
+
) -> RESTResponseType:
|
|
197
|
+
"""Get conversational automation settings
|
|
198
|
+
|
|
199
|
+
Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
|
|
200
|
+
|
|
201
|
+
:param token: JWT token or API key for authorization (required)
|
|
202
|
+
:type token: str
|
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
204
|
+
number provided, it will be total request
|
|
205
|
+
timeout. It can also be a pair (tuple) of
|
|
206
|
+
(connection, read) timeouts.
|
|
207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
209
|
+
request; this effectively ignores the
|
|
210
|
+
authentication in the spec for a single request.
|
|
211
|
+
:type _request_auth: dict, optional
|
|
212
|
+
:param _content_type: force content-type for the request.
|
|
213
|
+
:type _content_type: str, Optional
|
|
214
|
+
:param _headers: set to override the headers for a single
|
|
215
|
+
request; this effectively ignores the headers
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _headers: dict, optional
|
|
218
|
+
:param _host_index: set to override the host_index for a single
|
|
219
|
+
request; this effectively ignores the host_index
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _host_index: int, optional
|
|
222
|
+
:return: Returns the result object.
|
|
223
|
+
""" # noqa: E501
|
|
224
|
+
|
|
225
|
+
_param = self._get_conversational_automation_serialize(
|
|
226
|
+
token=token,
|
|
227
|
+
_request_auth=_request_auth,
|
|
228
|
+
_content_type=_content_type,
|
|
229
|
+
_headers=_headers,
|
|
230
|
+
_host_index=_host_index
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
|
+
'200': "ConversationalAutomation",
|
|
235
|
+
'401': "ErrorResponse",
|
|
236
|
+
'500': "ErrorResponse",
|
|
237
|
+
}
|
|
238
|
+
response_data = self.api_client.call_api(
|
|
239
|
+
*_param,
|
|
240
|
+
_request_timeout=_request_timeout
|
|
241
|
+
)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _get_conversational_automation_serialize(
|
|
246
|
+
self,
|
|
247
|
+
token,
|
|
248
|
+
_request_auth,
|
|
249
|
+
_content_type,
|
|
250
|
+
_headers,
|
|
251
|
+
_host_index,
|
|
252
|
+
) -> RequestSerialized:
|
|
253
|
+
|
|
254
|
+
_host = None
|
|
255
|
+
|
|
256
|
+
_collection_formats: Dict[str, str] = {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
_path_params: Dict[str, str] = {}
|
|
260
|
+
_query_params: List[Tuple[str, str]] = []
|
|
261
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
262
|
+
_form_params: List[Tuple[str, str]] = []
|
|
263
|
+
_files: Dict[
|
|
264
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
265
|
+
] = {}
|
|
266
|
+
_body_params: Optional[bytes] = None
|
|
267
|
+
|
|
268
|
+
# process the path parameters
|
|
269
|
+
# process the query parameters
|
|
270
|
+
if token is not None:
|
|
271
|
+
|
|
272
|
+
_query_params.append(('token', token))
|
|
273
|
+
|
|
274
|
+
# process the header parameters
|
|
275
|
+
# process the form parameters
|
|
276
|
+
# process the body parameter
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
# set the HTTP header `Accept`
|
|
280
|
+
if 'Accept' not in _header_params:
|
|
281
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
282
|
+
[
|
|
283
|
+
'application/json'
|
|
284
|
+
]
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# authentication setting
|
|
289
|
+
_auth_settings: List[str] = [
|
|
290
|
+
'tokenAuth'
|
|
291
|
+
]
|
|
292
|
+
|
|
293
|
+
return self.api_client.param_serialize(
|
|
294
|
+
method='GET',
|
|
295
|
+
resource_path='/conversationalAutomation',
|
|
296
|
+
path_params=_path_params,
|
|
297
|
+
query_params=_query_params,
|
|
298
|
+
header_params=_header_params,
|
|
299
|
+
body=_body_params,
|
|
300
|
+
post_params=_form_params,
|
|
301
|
+
files=_files,
|
|
302
|
+
auth_settings=_auth_settings,
|
|
303
|
+
collection_formats=_collection_formats,
|
|
304
|
+
_host=_host,
|
|
305
|
+
_request_auth=_request_auth
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
@validate_call
|
|
312
|
+
def get_status(
|
|
313
|
+
self,
|
|
314
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
315
|
+
_request_timeout: Union[
|
|
316
|
+
None,
|
|
317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
318
|
+
Tuple[
|
|
319
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
320
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
321
|
+
]
|
|
322
|
+
] = None,
|
|
323
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
324
|
+
_content_type: Optional[StrictStr] = None,
|
|
325
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
326
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
327
|
+
) -> Dict[str, object]:
|
|
328
|
+
"""Get channel status
|
|
329
|
+
|
|
330
|
+
Returns WhatsApp Business API client connection status.
|
|
331
|
+
|
|
332
|
+
:param token: JWT token or API key for authorization (required)
|
|
333
|
+
:type token: str
|
|
334
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
335
|
+
number provided, it will be total request
|
|
336
|
+
timeout. It can also be a pair (tuple) of
|
|
337
|
+
(connection, read) timeouts.
|
|
338
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
339
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
340
|
+
request; this effectively ignores the
|
|
341
|
+
authentication in the spec for a single request.
|
|
342
|
+
:type _request_auth: dict, optional
|
|
343
|
+
:param _content_type: force content-type for the request.
|
|
344
|
+
:type _content_type: str, Optional
|
|
345
|
+
:param _headers: set to override the headers for a single
|
|
346
|
+
request; this effectively ignores the headers
|
|
347
|
+
in the spec for a single request.
|
|
348
|
+
:type _headers: dict, optional
|
|
349
|
+
:param _host_index: set to override the host_index for a single
|
|
350
|
+
request; this effectively ignores the host_index
|
|
351
|
+
in the spec for a single request.
|
|
352
|
+
:type _host_index: int, optional
|
|
353
|
+
:return: Returns the result object.
|
|
354
|
+
""" # noqa: E501
|
|
355
|
+
|
|
356
|
+
_param = self._get_status_serialize(
|
|
357
|
+
token=token,
|
|
358
|
+
_request_auth=_request_auth,
|
|
359
|
+
_content_type=_content_type,
|
|
360
|
+
_headers=_headers,
|
|
361
|
+
_host_index=_host_index
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
365
|
+
'200': "Dict[str, object]",
|
|
366
|
+
'401': "ErrorResponse",
|
|
367
|
+
'500': "ErrorResponse",
|
|
368
|
+
}
|
|
369
|
+
response_data = self.api_client.call_api(
|
|
370
|
+
*_param,
|
|
371
|
+
_request_timeout=_request_timeout
|
|
372
|
+
)
|
|
373
|
+
response_data.read()
|
|
374
|
+
return self.api_client.response_deserialize(
|
|
375
|
+
response_data=response_data,
|
|
376
|
+
response_types_map=_response_types_map,
|
|
377
|
+
).data
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
@validate_call
|
|
381
|
+
def get_status_with_http_info(
|
|
382
|
+
self,
|
|
383
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
384
|
+
_request_timeout: Union[
|
|
385
|
+
None,
|
|
386
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
387
|
+
Tuple[
|
|
388
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
389
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
390
|
+
]
|
|
391
|
+
] = None,
|
|
392
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
393
|
+
_content_type: Optional[StrictStr] = None,
|
|
394
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
395
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
396
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
397
|
+
"""Get channel status
|
|
398
|
+
|
|
399
|
+
Returns WhatsApp Business API client connection status.
|
|
400
|
+
|
|
401
|
+
:param token: JWT token or API key for authorization (required)
|
|
402
|
+
:type token: str
|
|
403
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
404
|
+
number provided, it will be total request
|
|
405
|
+
timeout. It can also be a pair (tuple) of
|
|
406
|
+
(connection, read) timeouts.
|
|
407
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
408
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
409
|
+
request; this effectively ignores the
|
|
410
|
+
authentication in the spec for a single request.
|
|
411
|
+
:type _request_auth: dict, optional
|
|
412
|
+
:param _content_type: force content-type for the request.
|
|
413
|
+
:type _content_type: str, Optional
|
|
414
|
+
:param _headers: set to override the headers for a single
|
|
415
|
+
request; this effectively ignores the headers
|
|
416
|
+
in the spec for a single request.
|
|
417
|
+
:type _headers: dict, optional
|
|
418
|
+
:param _host_index: set to override the host_index for a single
|
|
419
|
+
request; this effectively ignores the host_index
|
|
420
|
+
in the spec for a single request.
|
|
421
|
+
:type _host_index: int, optional
|
|
422
|
+
:return: Returns the result object.
|
|
423
|
+
""" # noqa: E501
|
|
424
|
+
|
|
425
|
+
_param = self._get_status_serialize(
|
|
426
|
+
token=token,
|
|
427
|
+
_request_auth=_request_auth,
|
|
428
|
+
_content_type=_content_type,
|
|
429
|
+
_headers=_headers,
|
|
430
|
+
_host_index=_host_index
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
434
|
+
'200': "Dict[str, object]",
|
|
435
|
+
'401': "ErrorResponse",
|
|
436
|
+
'500': "ErrorResponse",
|
|
437
|
+
}
|
|
438
|
+
response_data = self.api_client.call_api(
|
|
439
|
+
*_param,
|
|
440
|
+
_request_timeout=_request_timeout
|
|
441
|
+
)
|
|
442
|
+
response_data.read()
|
|
443
|
+
return self.api_client.response_deserialize(
|
|
444
|
+
response_data=response_data,
|
|
445
|
+
response_types_map=_response_types_map,
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
@validate_call
|
|
450
|
+
def get_status_without_preload_content(
|
|
451
|
+
self,
|
|
452
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
453
|
+
_request_timeout: Union[
|
|
454
|
+
None,
|
|
455
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
456
|
+
Tuple[
|
|
457
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
458
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
459
|
+
]
|
|
460
|
+
] = None,
|
|
461
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
462
|
+
_content_type: Optional[StrictStr] = None,
|
|
463
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
464
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
465
|
+
) -> RESTResponseType:
|
|
466
|
+
"""Get channel status
|
|
467
|
+
|
|
468
|
+
Returns WhatsApp Business API client connection status.
|
|
469
|
+
|
|
470
|
+
:param token: JWT token or API key for authorization (required)
|
|
471
|
+
:type token: str
|
|
472
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
473
|
+
number provided, it will be total request
|
|
474
|
+
timeout. It can also be a pair (tuple) of
|
|
475
|
+
(connection, read) timeouts.
|
|
476
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
477
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
478
|
+
request; this effectively ignores the
|
|
479
|
+
authentication in the spec for a single request.
|
|
480
|
+
:type _request_auth: dict, optional
|
|
481
|
+
:param _content_type: force content-type for the request.
|
|
482
|
+
:type _content_type: str, Optional
|
|
483
|
+
:param _headers: set to override the headers for a single
|
|
484
|
+
request; this effectively ignores the headers
|
|
485
|
+
in the spec for a single request.
|
|
486
|
+
:type _headers: dict, optional
|
|
487
|
+
:param _host_index: set to override the host_index for a single
|
|
488
|
+
request; this effectively ignores the host_index
|
|
489
|
+
in the spec for a single request.
|
|
490
|
+
:type _host_index: int, optional
|
|
491
|
+
:return: Returns the result object.
|
|
492
|
+
""" # noqa: E501
|
|
493
|
+
|
|
494
|
+
_param = self._get_status_serialize(
|
|
495
|
+
token=token,
|
|
496
|
+
_request_auth=_request_auth,
|
|
497
|
+
_content_type=_content_type,
|
|
498
|
+
_headers=_headers,
|
|
499
|
+
_host_index=_host_index
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
503
|
+
'200': "Dict[str, object]",
|
|
504
|
+
'401': "ErrorResponse",
|
|
505
|
+
'500': "ErrorResponse",
|
|
506
|
+
}
|
|
507
|
+
response_data = self.api_client.call_api(
|
|
508
|
+
*_param,
|
|
509
|
+
_request_timeout=_request_timeout
|
|
510
|
+
)
|
|
511
|
+
return response_data.response
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def _get_status_serialize(
|
|
515
|
+
self,
|
|
516
|
+
token,
|
|
517
|
+
_request_auth,
|
|
518
|
+
_content_type,
|
|
519
|
+
_headers,
|
|
520
|
+
_host_index,
|
|
521
|
+
) -> RequestSerialized:
|
|
522
|
+
|
|
523
|
+
_host = None
|
|
524
|
+
|
|
525
|
+
_collection_formats: Dict[str, str] = {
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
_path_params: Dict[str, str] = {}
|
|
529
|
+
_query_params: List[Tuple[str, str]] = []
|
|
530
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
531
|
+
_form_params: List[Tuple[str, str]] = []
|
|
532
|
+
_files: Dict[
|
|
533
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
534
|
+
] = {}
|
|
535
|
+
_body_params: Optional[bytes] = None
|
|
536
|
+
|
|
537
|
+
# process the path parameters
|
|
538
|
+
# process the query parameters
|
|
539
|
+
if token is not None:
|
|
540
|
+
|
|
541
|
+
_query_params.append(('token', token))
|
|
542
|
+
|
|
543
|
+
# process the header parameters
|
|
544
|
+
# process the form parameters
|
|
545
|
+
# process the body parameter
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
# set the HTTP header `Accept`
|
|
549
|
+
if 'Accept' not in _header_params:
|
|
550
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
551
|
+
[
|
|
552
|
+
'application/json'
|
|
553
|
+
]
|
|
554
|
+
)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
# authentication setting
|
|
558
|
+
_auth_settings: List[str] = [
|
|
559
|
+
'tokenAuth'
|
|
560
|
+
]
|
|
561
|
+
|
|
562
|
+
return self.api_client.param_serialize(
|
|
563
|
+
method='GET',
|
|
564
|
+
resource_path='/status',
|
|
565
|
+
path_params=_path_params,
|
|
566
|
+
query_params=_query_params,
|
|
567
|
+
header_params=_header_params,
|
|
568
|
+
body=_body_params,
|
|
569
|
+
post_params=_form_params,
|
|
570
|
+
files=_files,
|
|
571
|
+
auth_settings=_auth_settings,
|
|
572
|
+
collection_formats=_collection_formats,
|
|
573
|
+
_host=_host,
|
|
574
|
+
_request_auth=_request_auth
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
@validate_call
|
|
581
|
+
def set_conversational_automation(
|
|
582
|
+
self,
|
|
583
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
584
|
+
conversational_automation: ConversationalAutomation,
|
|
585
|
+
_request_timeout: Union[
|
|
586
|
+
None,
|
|
587
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
588
|
+
Tuple[
|
|
589
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
590
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
591
|
+
]
|
|
592
|
+
] = None,
|
|
593
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
594
|
+
_content_type: Optional[StrictStr] = None,
|
|
595
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
596
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
597
|
+
) -> Dict[str, object]:
|
|
598
|
+
"""Set conversational automation settings
|
|
599
|
+
|
|
600
|
+
Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
|
|
601
|
+
|
|
602
|
+
:param token: JWT token or API key for authorization (required)
|
|
603
|
+
:type token: str
|
|
604
|
+
:param conversational_automation: (required)
|
|
605
|
+
:type conversational_automation: ConversationalAutomation
|
|
606
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
607
|
+
number provided, it will be total request
|
|
608
|
+
timeout. It can also be a pair (tuple) of
|
|
609
|
+
(connection, read) timeouts.
|
|
610
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
611
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
612
|
+
request; this effectively ignores the
|
|
613
|
+
authentication in the spec for a single request.
|
|
614
|
+
:type _request_auth: dict, optional
|
|
615
|
+
:param _content_type: force content-type for the request.
|
|
616
|
+
:type _content_type: str, Optional
|
|
617
|
+
:param _headers: set to override the headers for a single
|
|
618
|
+
request; this effectively ignores the headers
|
|
619
|
+
in the spec for a single request.
|
|
620
|
+
:type _headers: dict, optional
|
|
621
|
+
:param _host_index: set to override the host_index for a single
|
|
622
|
+
request; this effectively ignores the host_index
|
|
623
|
+
in the spec for a single request.
|
|
624
|
+
:type _host_index: int, optional
|
|
625
|
+
:return: Returns the result object.
|
|
626
|
+
""" # noqa: E501
|
|
627
|
+
|
|
628
|
+
_param = self._set_conversational_automation_serialize(
|
|
629
|
+
token=token,
|
|
630
|
+
conversational_automation=conversational_automation,
|
|
631
|
+
_request_auth=_request_auth,
|
|
632
|
+
_content_type=_content_type,
|
|
633
|
+
_headers=_headers,
|
|
634
|
+
_host_index=_host_index
|
|
635
|
+
)
|
|
636
|
+
|
|
637
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
638
|
+
'200': "Dict[str, object]",
|
|
639
|
+
'401': "ErrorResponse",
|
|
640
|
+
'500': "ErrorResponse",
|
|
641
|
+
}
|
|
642
|
+
response_data = self.api_client.call_api(
|
|
643
|
+
*_param,
|
|
644
|
+
_request_timeout=_request_timeout
|
|
645
|
+
)
|
|
646
|
+
response_data.read()
|
|
647
|
+
return self.api_client.response_deserialize(
|
|
648
|
+
response_data=response_data,
|
|
649
|
+
response_types_map=_response_types_map,
|
|
650
|
+
).data
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
@validate_call
|
|
654
|
+
def set_conversational_automation_with_http_info(
|
|
655
|
+
self,
|
|
656
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
657
|
+
conversational_automation: ConversationalAutomation,
|
|
658
|
+
_request_timeout: Union[
|
|
659
|
+
None,
|
|
660
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
661
|
+
Tuple[
|
|
662
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
663
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
664
|
+
]
|
|
665
|
+
] = None,
|
|
666
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
667
|
+
_content_type: Optional[StrictStr] = None,
|
|
668
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
669
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
670
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
671
|
+
"""Set conversational automation settings
|
|
672
|
+
|
|
673
|
+
Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
|
|
674
|
+
|
|
675
|
+
:param token: JWT token or API key for authorization (required)
|
|
676
|
+
:type token: str
|
|
677
|
+
:param conversational_automation: (required)
|
|
678
|
+
:type conversational_automation: ConversationalAutomation
|
|
679
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
680
|
+
number provided, it will be total request
|
|
681
|
+
timeout. It can also be a pair (tuple) of
|
|
682
|
+
(connection, read) timeouts.
|
|
683
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
684
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
685
|
+
request; this effectively ignores the
|
|
686
|
+
authentication in the spec for a single request.
|
|
687
|
+
:type _request_auth: dict, optional
|
|
688
|
+
:param _content_type: force content-type for the request.
|
|
689
|
+
:type _content_type: str, Optional
|
|
690
|
+
:param _headers: set to override the headers for a single
|
|
691
|
+
request; this effectively ignores the headers
|
|
692
|
+
in the spec for a single request.
|
|
693
|
+
:type _headers: dict, optional
|
|
694
|
+
:param _host_index: set to override the host_index for a single
|
|
695
|
+
request; this effectively ignores the host_index
|
|
696
|
+
in the spec for a single request.
|
|
697
|
+
:type _host_index: int, optional
|
|
698
|
+
:return: Returns the result object.
|
|
699
|
+
""" # noqa: E501
|
|
700
|
+
|
|
701
|
+
_param = self._set_conversational_automation_serialize(
|
|
702
|
+
token=token,
|
|
703
|
+
conversational_automation=conversational_automation,
|
|
704
|
+
_request_auth=_request_auth,
|
|
705
|
+
_content_type=_content_type,
|
|
706
|
+
_headers=_headers,
|
|
707
|
+
_host_index=_host_index
|
|
708
|
+
)
|
|
709
|
+
|
|
710
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
711
|
+
'200': "Dict[str, object]",
|
|
712
|
+
'401': "ErrorResponse",
|
|
713
|
+
'500': "ErrorResponse",
|
|
714
|
+
}
|
|
715
|
+
response_data = self.api_client.call_api(
|
|
716
|
+
*_param,
|
|
717
|
+
_request_timeout=_request_timeout
|
|
718
|
+
)
|
|
719
|
+
response_data.read()
|
|
720
|
+
return self.api_client.response_deserialize(
|
|
721
|
+
response_data=response_data,
|
|
722
|
+
response_types_map=_response_types_map,
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
@validate_call
|
|
727
|
+
def set_conversational_automation_without_preload_content(
|
|
728
|
+
self,
|
|
729
|
+
token: Annotated[StrictStr, Field(description="JWT token or API key for authorization")],
|
|
730
|
+
conversational_automation: ConversationalAutomation,
|
|
731
|
+
_request_timeout: Union[
|
|
732
|
+
None,
|
|
733
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
734
|
+
Tuple[
|
|
735
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
736
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
737
|
+
]
|
|
738
|
+
] = None,
|
|
739
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
740
|
+
_content_type: Optional[StrictStr] = None,
|
|
741
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
743
|
+
) -> RESTResponseType:
|
|
744
|
+
"""Set conversational automation settings
|
|
745
|
+
|
|
746
|
+
Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
|
|
747
|
+
|
|
748
|
+
:param token: JWT token or API key for authorization (required)
|
|
749
|
+
:type token: str
|
|
750
|
+
:param conversational_automation: (required)
|
|
751
|
+
:type conversational_automation: ConversationalAutomation
|
|
752
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
753
|
+
number provided, it will be total request
|
|
754
|
+
timeout. It can also be a pair (tuple) of
|
|
755
|
+
(connection, read) timeouts.
|
|
756
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
757
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
758
|
+
request; this effectively ignores the
|
|
759
|
+
authentication in the spec for a single request.
|
|
760
|
+
:type _request_auth: dict, optional
|
|
761
|
+
:param _content_type: force content-type for the request.
|
|
762
|
+
:type _content_type: str, Optional
|
|
763
|
+
:param _headers: set to override the headers for a single
|
|
764
|
+
request; this effectively ignores the headers
|
|
765
|
+
in the spec for a single request.
|
|
766
|
+
:type _headers: dict, optional
|
|
767
|
+
:param _host_index: set to override the host_index for a single
|
|
768
|
+
request; this effectively ignores the host_index
|
|
769
|
+
in the spec for a single request.
|
|
770
|
+
:type _host_index: int, optional
|
|
771
|
+
:return: Returns the result object.
|
|
772
|
+
""" # noqa: E501
|
|
773
|
+
|
|
774
|
+
_param = self._set_conversational_automation_serialize(
|
|
775
|
+
token=token,
|
|
776
|
+
conversational_automation=conversational_automation,
|
|
777
|
+
_request_auth=_request_auth,
|
|
778
|
+
_content_type=_content_type,
|
|
779
|
+
_headers=_headers,
|
|
780
|
+
_host_index=_host_index
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
784
|
+
'200': "Dict[str, object]",
|
|
785
|
+
'401': "ErrorResponse",
|
|
786
|
+
'500': "ErrorResponse",
|
|
787
|
+
}
|
|
788
|
+
response_data = self.api_client.call_api(
|
|
789
|
+
*_param,
|
|
790
|
+
_request_timeout=_request_timeout
|
|
791
|
+
)
|
|
792
|
+
return response_data.response
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
def _set_conversational_automation_serialize(
|
|
796
|
+
self,
|
|
797
|
+
token,
|
|
798
|
+
conversational_automation,
|
|
799
|
+
_request_auth,
|
|
800
|
+
_content_type,
|
|
801
|
+
_headers,
|
|
802
|
+
_host_index,
|
|
803
|
+
) -> RequestSerialized:
|
|
804
|
+
|
|
805
|
+
_host = None
|
|
806
|
+
|
|
807
|
+
_collection_formats: Dict[str, str] = {
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
_path_params: Dict[str, str] = {}
|
|
811
|
+
_query_params: List[Tuple[str, str]] = []
|
|
812
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
813
|
+
_form_params: List[Tuple[str, str]] = []
|
|
814
|
+
_files: Dict[
|
|
815
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
816
|
+
] = {}
|
|
817
|
+
_body_params: Optional[bytes] = None
|
|
818
|
+
|
|
819
|
+
# process the path parameters
|
|
820
|
+
# process the query parameters
|
|
821
|
+
if token is not None:
|
|
822
|
+
|
|
823
|
+
_query_params.append(('token', token))
|
|
824
|
+
|
|
825
|
+
# process the header parameters
|
|
826
|
+
# process the form parameters
|
|
827
|
+
# process the body parameter
|
|
828
|
+
if conversational_automation is not None:
|
|
829
|
+
_body_params = conversational_automation
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
# set the HTTP header `Accept`
|
|
833
|
+
if 'Accept' not in _header_params:
|
|
834
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
835
|
+
[
|
|
836
|
+
'application/json'
|
|
837
|
+
]
|
|
838
|
+
)
|
|
839
|
+
|
|
840
|
+
# set the HTTP header `Content-Type`
|
|
841
|
+
if _content_type:
|
|
842
|
+
_header_params['Content-Type'] = _content_type
|
|
843
|
+
else:
|
|
844
|
+
_default_content_type = (
|
|
845
|
+
self.api_client.select_header_content_type(
|
|
846
|
+
[
|
|
847
|
+
'application/json'
|
|
848
|
+
]
|
|
849
|
+
)
|
|
850
|
+
)
|
|
851
|
+
if _default_content_type is not None:
|
|
852
|
+
_header_params['Content-Type'] = _default_content_type
|
|
853
|
+
|
|
854
|
+
# authentication setting
|
|
855
|
+
_auth_settings: List[str] = [
|
|
856
|
+
'tokenAuth'
|
|
857
|
+
]
|
|
858
|
+
|
|
859
|
+
return self.api_client.param_serialize(
|
|
860
|
+
method='POST',
|
|
861
|
+
resource_path='/conversationalAutomation',
|
|
862
|
+
path_params=_path_params,
|
|
863
|
+
query_params=_query_params,
|
|
864
|
+
header_params=_header_params,
|
|
865
|
+
body=_body_params,
|
|
866
|
+
post_params=_form_params,
|
|
867
|
+
files=_files,
|
|
868
|
+
auth_settings=_auth_settings,
|
|
869
|
+
collection_formats=_collection_formats,
|
|
870
|
+
_host=_host,
|
|
871
|
+
_request_auth=_request_auth
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
|