opportify-sdk 0.1.1__py3-none-any.whl → 0.2.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 opportify-sdk might be problematic. Click here for more details.

Files changed (79) hide show
  1. openapi_client/__init__.py +86 -0
  2. openapi_client/api/email_insights_api.py +883 -0
  3. openapi_client/api/ip_insights_api.py +886 -0
  4. {lib/v1/openapi_client → openapi_client}/api_client.py +2 -2
  5. {lib/v1/openapi_client → openapi_client}/configuration.py +1 -1
  6. {lib/v1/openapi_client → openapi_client}/exceptions.py +18 -1
  7. openapi_client/models/__init__.py +68 -0
  8. {lib/v1/openapi_client → openapi_client}/models/abuse_contact.py +1 -1
  9. {lib/v1/openapi_client → openapi_client}/models/admin_contact.py +1 -1
  10. {lib/v1/openapi_client → openapi_client}/models/analyze_email200_response.py +9 -7
  11. {lib/v1/openapi_client → openapi_client}/models/analyze_email400_response.py +1 -1
  12. {lib/v1/openapi_client → openapi_client}/models/analyze_email400_response_error.py +1 -1
  13. openapi_client/models/analyze_email403_response.py +91 -0
  14. openapi_client/models/analyze_email403_response_error.py +137 -0
  15. {lib/v1/openapi_client → openapi_client}/models/analyze_email500_response.py +1 -1
  16. {lib/v1/openapi_client → openapi_client}/models/analyze_email500_response_error.py +1 -1
  17. {lib/v1/openapi_client → openapi_client}/models/analyze_email_request.py +1 -1
  18. {lib/v1/openapi_client → openapi_client}/models/analyze_ip200_response.py +4 -4
  19. {lib/v1/openapi_client → openapi_client}/models/analyze_ip400_response.py +1 -1
  20. {lib/v1/openapi_client → openapi_client}/models/analyze_ip400_response_error.py +1 -1
  21. {lib/v1/openapi_client → openapi_client}/models/analyze_ip404_response.py +1 -1
  22. {lib/v1/openapi_client → openapi_client}/models/analyze_ip500_response.py +1 -1
  23. {lib/v1/openapi_client → openapi_client}/models/analyze_ip_request.py +1 -1
  24. {lib/v1/openapi_client → openapi_client}/models/asn.py +1 -1
  25. openapi_client/models/batch_analyze_emails202_response.py +101 -0
  26. openapi_client/models/batch_analyze_emails400_response.py +91 -0
  27. openapi_client/models/batch_analyze_emails400_response_error.py +137 -0
  28. openapi_client/models/batch_analyze_emails403_response.py +91 -0
  29. openapi_client/models/batch_analyze_emails403_response_error.py +89 -0
  30. openapi_client/models/batch_analyze_emails413_response.py +91 -0
  31. openapi_client/models/batch_analyze_emails413_response_error.py +89 -0
  32. openapi_client/models/batch_analyze_emails_request.py +91 -0
  33. openapi_client/models/batch_analyze_ips400_response.py +91 -0
  34. openapi_client/models/batch_analyze_ips400_response_error.py +137 -0
  35. openapi_client/models/batch_analyze_ips_request.py +89 -0
  36. {lib/v1/openapi_client → openapi_client}/models/block_listed.py +1 -1
  37. {lib/v1/openapi_client → openapi_client}/models/email_dns.py +1 -1
  38. {lib/v1/openapi_client → openapi_client}/models/geo.py +1 -1
  39. openapi_client/models/get_email_batch_status200_response.py +109 -0
  40. openapi_client/models/get_email_batch_status200_response_download_urls.py +93 -0
  41. openapi_client/models/get_email_batch_status404_response.py +91 -0
  42. openapi_client/models/get_email_batch_status404_response_error.py +89 -0
  43. {lib/v1/openapi_client → openapi_client}/models/internalerror.py +1 -1
  44. openapi_client/models/invaliddata.py +89 -0
  45. openapi_client/models/invaliddata1.py +89 -0
  46. {lib/v1/openapi_client → openapi_client}/models/invalidemail.py +1 -1
  47. openapi_client/models/invalidplan.py +89 -0
  48. openapi_client/models/invalidtoken.py +89 -0
  49. {lib/v1/openapi_client → openapi_client}/models/ipvalidationfailed.py +1 -1
  50. {lib/v1/openapi_client → openapi_client}/models/malformedrequest.py +1 -1
  51. {lib/v1/openapi_client → openapi_client}/models/malformedrequest1.py +1 -1
  52. openapi_client/models/malformedrequest2.py +89 -0
  53. {lib/v1/openapi_client → openapi_client}/models/notfound.py +1 -1
  54. {lib/v1/openapi_client → openapi_client}/models/organization.py +1 -1
  55. openapi_client/models/risk_report_email.py +91 -0
  56. lib/v1/openapi_client/models/risk_report.py → openapi_client/models/risk_report_ip.py +4 -4
  57. {lib/v1/openapi_client → openapi_client}/models/tech_contact.py +1 -1
  58. {lib/v1/openapi_client → openapi_client}/models/trusted_provider.py +1 -1
  59. {lib/v1/openapi_client → openapi_client}/models/whois.py +1 -1
  60. {lib/v1/openapi_client → openapi_client}/rest.py +1 -1
  61. {src → opportify_sdk}/email_insights.py +79 -0
  62. {src → opportify_sdk}/ip_insights.py +75 -1
  63. opportify_sdk-0.2.0.dist-info/METADATA +239 -0
  64. opportify_sdk-0.2.0.dist-info/RECORD +70 -0
  65. {opportify_sdk-0.1.1.dist-info → opportify_sdk-0.2.0.dist-info}/WHEEL +1 -1
  66. opportify_sdk-0.2.0.dist-info/top_level.txt +2 -0
  67. lib/__init__.py +0 -0
  68. lib/v1/__init__.py +0 -0
  69. lib/v1/openapi_client/__init__.py +0 -63
  70. lib/v1/openapi_client/api/email_insights_api.py +0 -317
  71. lib/v1/openapi_client/api/ip_insights_api.py +0 -322
  72. lib/v1/openapi_client/models/__init__.py +0 -45
  73. opportify_sdk-0.1.1.dist-info/METADATA +0 -108
  74. opportify_sdk-0.1.1.dist-info/RECORD +0 -49
  75. opportify_sdk-0.1.1.dist-info/top_level.txt +0 -2
  76. {lib/v1/openapi_client → openapi_client}/api/__init__.py +0 -0
  77. {lib/v1/openapi_client → openapi_client}/api_response.py +0 -0
  78. {lib/v1/openapi_client → openapi_client}/py.typed +0 -0
  79. {src → opportify_sdk}/__init__.py +0 -0
@@ -0,0 +1,883 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Opportify Insights API
5
+
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ 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_extensions import Annotated
21
+ from openapi_client.models.analyze_email200_response import AnalyzeEmail200Response
22
+ from openapi_client.models.analyze_email_request import AnalyzeEmailRequest
23
+ from openapi_client.models.batch_analyze_emails202_response import BatchAnalyzeEmails202Response
24
+ from openapi_client.models.batch_analyze_emails_request import BatchAnalyzeEmailsRequest
25
+ from openapi_client.models.get_email_batch_status200_response import GetEmailBatchStatus200Response
26
+
27
+ from openapi_client.api_client import ApiClient, RequestSerialized
28
+ from openapi_client.api_response import ApiResponse
29
+ from openapi_client.rest import RESTResponseType
30
+
31
+
32
+ class EmailInsightsApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ def analyze_email(
47
+ self,
48
+ analyze_email_request: AnalyzeEmailRequest,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> AnalyzeEmail200Response:
62
+ """Analyze Email
63
+
64
+ The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. ### Example Request Body: ```json { \"email\": \"my-email@company.com\", \"enableAI\": true, \"enableAutoCorrection\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
65
+
66
+ :param analyze_email_request: (required)
67
+ :type analyze_email_request: AnalyzeEmailRequest
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._analyze_email_serialize(
91
+ analyze_email_request=analyze_email_request,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "AnalyzeEmail200Response",
100
+ '400': "AnalyzeEmail400Response",
101
+ '403': "AnalyzeEmail403Response",
102
+ '500': "AnalyzeEmail500Response",
103
+ }
104
+ response_data = self.api_client.call_api(
105
+ *_param,
106
+ _request_timeout=_request_timeout
107
+ )
108
+ response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+
115
+ @validate_call
116
+ def analyze_email_with_http_info(
117
+ self,
118
+ analyze_email_request: AnalyzeEmailRequest,
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[AnalyzeEmail200Response]:
132
+ """Analyze Email
133
+
134
+ The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. ### Example Request Body: ```json { \"email\": \"my-email@company.com\", \"enableAI\": true, \"enableAutoCorrection\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
135
+
136
+ :param analyze_email_request: (required)
137
+ :type analyze_email_request: AnalyzeEmailRequest
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._analyze_email_serialize(
161
+ analyze_email_request=analyze_email_request,
162
+ _request_auth=_request_auth,
163
+ _content_type=_content_type,
164
+ _headers=_headers,
165
+ _host_index=_host_index
166
+ )
167
+
168
+ _response_types_map: Dict[str, Optional[str]] = {
169
+ '200': "AnalyzeEmail200Response",
170
+ '400': "AnalyzeEmail400Response",
171
+ '403': "AnalyzeEmail403Response",
172
+ '500': "AnalyzeEmail500Response",
173
+ }
174
+ response_data = self.api_client.call_api(
175
+ *_param,
176
+ _request_timeout=_request_timeout
177
+ )
178
+ response_data.read()
179
+ return self.api_client.response_deserialize(
180
+ response_data=response_data,
181
+ response_types_map=_response_types_map,
182
+ )
183
+
184
+
185
+ @validate_call
186
+ def analyze_email_without_preload_content(
187
+ self,
188
+ analyze_email_request: AnalyzeEmailRequest,
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Analyze Email
203
+
204
+ The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. ### Example Request Body: ```json { \"email\": \"my-email@company.com\", \"enableAI\": true, \"enableAutoCorrection\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
205
+
206
+ :param analyze_email_request: (required)
207
+ :type analyze_email_request: AnalyzeEmailRequest
208
+ :param _request_timeout: timeout setting for this request. If one
209
+ number provided, it will be total request
210
+ timeout. It can also be a pair (tuple) of
211
+ (connection, read) timeouts.
212
+ :type _request_timeout: int, tuple(int, int), optional
213
+ :param _request_auth: set to override the auth_settings for an a single
214
+ request; this effectively ignores the
215
+ authentication in the spec for a single request.
216
+ :type _request_auth: dict, optional
217
+ :param _content_type: force content-type for the request.
218
+ :type _content_type: str, Optional
219
+ :param _headers: set to override the headers for a single
220
+ request; this effectively ignores the headers
221
+ in the spec for a single request.
222
+ :type _headers: dict, optional
223
+ :param _host_index: set to override the host_index for a single
224
+ request; this effectively ignores the host_index
225
+ in the spec for a single request.
226
+ :type _host_index: int, optional
227
+ :return: Returns the result object.
228
+ """ # noqa: E501
229
+
230
+ _param = self._analyze_email_serialize(
231
+ analyze_email_request=analyze_email_request,
232
+ _request_auth=_request_auth,
233
+ _content_type=_content_type,
234
+ _headers=_headers,
235
+ _host_index=_host_index
236
+ )
237
+
238
+ _response_types_map: Dict[str, Optional[str]] = {
239
+ '200': "AnalyzeEmail200Response",
240
+ '400': "AnalyzeEmail400Response",
241
+ '403': "AnalyzeEmail403Response",
242
+ '500': "AnalyzeEmail500Response",
243
+ }
244
+ response_data = self.api_client.call_api(
245
+ *_param,
246
+ _request_timeout=_request_timeout
247
+ )
248
+ return response_data.response
249
+
250
+
251
+ def _analyze_email_serialize(
252
+ self,
253
+ analyze_email_request,
254
+ _request_auth,
255
+ _content_type,
256
+ _headers,
257
+ _host_index,
258
+ ) -> RequestSerialized:
259
+
260
+ _host = None
261
+
262
+ _collection_formats: Dict[str, str] = {
263
+ }
264
+
265
+ _path_params: Dict[str, str] = {}
266
+ _query_params: List[Tuple[str, str]] = []
267
+ _header_params: Dict[str, Optional[str]] = _headers or {}
268
+ _form_params: List[Tuple[str, str]] = []
269
+ _files: Dict[
270
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
271
+ ] = {}
272
+ _body_params: Optional[bytes] = None
273
+
274
+ # process the path parameters
275
+ # process the query parameters
276
+ # process the header parameters
277
+ # process the form parameters
278
+ # process the body parameter
279
+ if analyze_email_request is not None:
280
+ _body_params = analyze_email_request
281
+
282
+
283
+ # set the HTTP header `Accept`
284
+ if 'Accept' not in _header_params:
285
+ _header_params['Accept'] = self.api_client.select_header_accept(
286
+ [
287
+ 'application/json'
288
+ ]
289
+ )
290
+
291
+ # set the HTTP header `Content-Type`
292
+ if _content_type:
293
+ _header_params['Content-Type'] = _content_type
294
+ else:
295
+ _default_content_type = (
296
+ self.api_client.select_header_content_type(
297
+ [
298
+ 'application/json'
299
+ ]
300
+ )
301
+ )
302
+ if _default_content_type is not None:
303
+ _header_params['Content-Type'] = _default_content_type
304
+
305
+ # authentication setting
306
+ _auth_settings: List[str] = [
307
+ 'opportifyToken'
308
+ ]
309
+
310
+ return self.api_client.param_serialize(
311
+ method='POST',
312
+ resource_path='/email/analyze',
313
+ path_params=_path_params,
314
+ query_params=_query_params,
315
+ header_params=_header_params,
316
+ body=_body_params,
317
+ post_params=_form_params,
318
+ files=_files,
319
+ auth_settings=_auth_settings,
320
+ collection_formats=_collection_formats,
321
+ _host=_host,
322
+ _request_auth=_request_auth
323
+ )
324
+
325
+
326
+
327
+
328
+ @validate_call
329
+ def batch_analyze_emails(
330
+ self,
331
+ batch_analyze_emails_request: BatchAnalyzeEmailsRequest,
332
+ _request_timeout: Union[
333
+ None,
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Tuple[
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Annotated[StrictFloat, Field(gt=0)]
338
+ ]
339
+ ] = None,
340
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
341
+ _content_type: Optional[StrictStr] = None,
342
+ _headers: Optional[Dict[StrictStr, Any]] = None,
343
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
344
+ ) -> BatchAnalyzeEmails202Response:
345
+ """Batch Analyze Emails
346
+
347
+ The **Batch Analyze Emails** endpoint enables processing of large volumes of email addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of emails for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, CSV files, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Input Formats: - **JSON Array**: Submit a JSON object containing an array of email addresses. - **CSV Upload**: Upload a CSV file with email addresses in a single column (with header row). - **Line-Separated Text**: Submit a plain text file with one email address per line. ### Example JSON Request: ```json { \"emails\": [ \"first-email@domain.com\", \"second-email@domain.com\", \"third-email@domain.com\" ] } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
348
+
349
+ :param batch_analyze_emails_request: (required)
350
+ :type batch_analyze_emails_request: BatchAnalyzeEmailsRequest
351
+ :param _request_timeout: timeout setting for this request. If one
352
+ number provided, it will be total request
353
+ timeout. It can also be a pair (tuple) of
354
+ (connection, read) timeouts.
355
+ :type _request_timeout: int, tuple(int, int), optional
356
+ :param _request_auth: set to override the auth_settings for an a single
357
+ request; this effectively ignores the
358
+ authentication in the spec for a single request.
359
+ :type _request_auth: dict, optional
360
+ :param _content_type: force content-type for the request.
361
+ :type _content_type: str, Optional
362
+ :param _headers: set to override the headers for a single
363
+ request; this effectively ignores the headers
364
+ in the spec for a single request.
365
+ :type _headers: dict, optional
366
+ :param _host_index: set to override the host_index for a single
367
+ request; this effectively ignores the host_index
368
+ in the spec for a single request.
369
+ :type _host_index: int, optional
370
+ :return: Returns the result object.
371
+ """ # noqa: E501
372
+
373
+ _param = self._batch_analyze_emails_serialize(
374
+ batch_analyze_emails_request=batch_analyze_emails_request,
375
+ _request_auth=_request_auth,
376
+ _content_type=_content_type,
377
+ _headers=_headers,
378
+ _host_index=_host_index
379
+ )
380
+
381
+ _response_types_map: Dict[str, Optional[str]] = {
382
+ '202': "BatchAnalyzeEmails202Response",
383
+ '400': "BatchAnalyzeEmails400Response",
384
+ '413': "BatchAnalyzeEmails413Response",
385
+ '403': "BatchAnalyzeEmails403Response",
386
+ '500': "AnalyzeEmail500Response",
387
+ }
388
+ response_data = self.api_client.call_api(
389
+ *_param,
390
+ _request_timeout=_request_timeout
391
+ )
392
+ response_data.read()
393
+ return self.api_client.response_deserialize(
394
+ response_data=response_data,
395
+ response_types_map=_response_types_map,
396
+ ).data
397
+
398
+
399
+ @validate_call
400
+ def batch_analyze_emails_with_http_info(
401
+ self,
402
+ batch_analyze_emails_request: BatchAnalyzeEmailsRequest,
403
+ _request_timeout: Union[
404
+ None,
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Tuple[
407
+ Annotated[StrictFloat, Field(gt=0)],
408
+ Annotated[StrictFloat, Field(gt=0)]
409
+ ]
410
+ ] = None,
411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
412
+ _content_type: Optional[StrictStr] = None,
413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
415
+ ) -> ApiResponse[BatchAnalyzeEmails202Response]:
416
+ """Batch Analyze Emails
417
+
418
+ The **Batch Analyze Emails** endpoint enables processing of large volumes of email addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of emails for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, CSV files, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Input Formats: - **JSON Array**: Submit a JSON object containing an array of email addresses. - **CSV Upload**: Upload a CSV file with email addresses in a single column (with header row). - **Line-Separated Text**: Submit a plain text file with one email address per line. ### Example JSON Request: ```json { \"emails\": [ \"first-email@domain.com\", \"second-email@domain.com\", \"third-email@domain.com\" ] } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
419
+
420
+ :param batch_analyze_emails_request: (required)
421
+ :type batch_analyze_emails_request: BatchAnalyzeEmailsRequest
422
+ :param _request_timeout: timeout setting for this request. If one
423
+ number provided, it will be total request
424
+ timeout. It can also be a pair (tuple) of
425
+ (connection, read) timeouts.
426
+ :type _request_timeout: int, tuple(int, int), optional
427
+ :param _request_auth: set to override the auth_settings for an a single
428
+ request; this effectively ignores the
429
+ authentication in the spec for a single request.
430
+ :type _request_auth: dict, optional
431
+ :param _content_type: force content-type for the request.
432
+ :type _content_type: str, Optional
433
+ :param _headers: set to override the headers for a single
434
+ request; this effectively ignores the headers
435
+ in the spec for a single request.
436
+ :type _headers: dict, optional
437
+ :param _host_index: set to override the host_index for a single
438
+ request; this effectively ignores the host_index
439
+ in the spec for a single request.
440
+ :type _host_index: int, optional
441
+ :return: Returns the result object.
442
+ """ # noqa: E501
443
+
444
+ _param = self._batch_analyze_emails_serialize(
445
+ batch_analyze_emails_request=batch_analyze_emails_request,
446
+ _request_auth=_request_auth,
447
+ _content_type=_content_type,
448
+ _headers=_headers,
449
+ _host_index=_host_index
450
+ )
451
+
452
+ _response_types_map: Dict[str, Optional[str]] = {
453
+ '202': "BatchAnalyzeEmails202Response",
454
+ '400': "BatchAnalyzeEmails400Response",
455
+ '413': "BatchAnalyzeEmails413Response",
456
+ '403': "BatchAnalyzeEmails403Response",
457
+ '500': "AnalyzeEmail500Response",
458
+ }
459
+ response_data = self.api_client.call_api(
460
+ *_param,
461
+ _request_timeout=_request_timeout
462
+ )
463
+ response_data.read()
464
+ return self.api_client.response_deserialize(
465
+ response_data=response_data,
466
+ response_types_map=_response_types_map,
467
+ )
468
+
469
+
470
+ @validate_call
471
+ def batch_analyze_emails_without_preload_content(
472
+ self,
473
+ batch_analyze_emails_request: BatchAnalyzeEmailsRequest,
474
+ _request_timeout: Union[
475
+ None,
476
+ Annotated[StrictFloat, Field(gt=0)],
477
+ Tuple[
478
+ Annotated[StrictFloat, Field(gt=0)],
479
+ Annotated[StrictFloat, Field(gt=0)]
480
+ ]
481
+ ] = None,
482
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
483
+ _content_type: Optional[StrictStr] = None,
484
+ _headers: Optional[Dict[StrictStr, Any]] = None,
485
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
486
+ ) -> RESTResponseType:
487
+ """Batch Analyze Emails
488
+
489
+ The **Batch Analyze Emails** endpoint enables processing of large volumes of email addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of emails for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, CSV files, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Input Formats: - **JSON Array**: Submit a JSON object containing an array of email addresses. - **CSV Upload**: Upload a CSV file with email addresses in a single column (with header row). - **Line-Separated Text**: Submit a plain text file with one email address per line. ### Example JSON Request: ```json { \"emails\": [ \"first-email@domain.com\", \"second-email@domain.com\", \"third-email@domain.com\" ] } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
490
+
491
+ :param batch_analyze_emails_request: (required)
492
+ :type batch_analyze_emails_request: BatchAnalyzeEmailsRequest
493
+ :param _request_timeout: timeout setting for this request. If one
494
+ number provided, it will be total request
495
+ timeout. It can also be a pair (tuple) of
496
+ (connection, read) timeouts.
497
+ :type _request_timeout: int, tuple(int, int), optional
498
+ :param _request_auth: set to override the auth_settings for an a single
499
+ request; this effectively ignores the
500
+ authentication in the spec for a single request.
501
+ :type _request_auth: dict, optional
502
+ :param _content_type: force content-type for the request.
503
+ :type _content_type: str, Optional
504
+ :param _headers: set to override the headers for a single
505
+ request; this effectively ignores the headers
506
+ in the spec for a single request.
507
+ :type _headers: dict, optional
508
+ :param _host_index: set to override the host_index for a single
509
+ request; this effectively ignores the host_index
510
+ in the spec for a single request.
511
+ :type _host_index: int, optional
512
+ :return: Returns the result object.
513
+ """ # noqa: E501
514
+
515
+ _param = self._batch_analyze_emails_serialize(
516
+ batch_analyze_emails_request=batch_analyze_emails_request,
517
+ _request_auth=_request_auth,
518
+ _content_type=_content_type,
519
+ _headers=_headers,
520
+ _host_index=_host_index
521
+ )
522
+
523
+ _response_types_map: Dict[str, Optional[str]] = {
524
+ '202': "BatchAnalyzeEmails202Response",
525
+ '400': "BatchAnalyzeEmails400Response",
526
+ '413': "BatchAnalyzeEmails413Response",
527
+ '403': "BatchAnalyzeEmails403Response",
528
+ '500': "AnalyzeEmail500Response",
529
+ }
530
+ response_data = self.api_client.call_api(
531
+ *_param,
532
+ _request_timeout=_request_timeout
533
+ )
534
+ return response_data.response
535
+
536
+
537
+ def _batch_analyze_emails_serialize(
538
+ self,
539
+ batch_analyze_emails_request,
540
+ _request_auth,
541
+ _content_type,
542
+ _headers,
543
+ _host_index,
544
+ ) -> RequestSerialized:
545
+
546
+ _host = None
547
+
548
+ _collection_formats: Dict[str, str] = {
549
+ }
550
+
551
+ _path_params: Dict[str, str] = {}
552
+ _query_params: List[Tuple[str, str]] = []
553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
554
+ _form_params: List[Tuple[str, str]] = []
555
+ _files: Dict[
556
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
557
+ ] = {}
558
+ _body_params: Optional[bytes] = None
559
+
560
+ # process the path parameters
561
+ # process the query parameters
562
+ # process the header parameters
563
+ # process the form parameters
564
+ # process the body parameter
565
+ if batch_analyze_emails_request is not None:
566
+ _body_params = batch_analyze_emails_request
567
+
568
+
569
+ # set the HTTP header `Accept`
570
+ if 'Accept' not in _header_params:
571
+ _header_params['Accept'] = self.api_client.select_header_accept(
572
+ [
573
+ 'application/json'
574
+ ]
575
+ )
576
+
577
+ # set the HTTP header `Content-Type`
578
+ if _content_type:
579
+ _header_params['Content-Type'] = _content_type
580
+ else:
581
+ _default_content_type = (
582
+ self.api_client.select_header_content_type(
583
+ [
584
+ 'application/json',
585
+ 'multipart/form-data',
586
+ 'text/plain'
587
+ ]
588
+ )
589
+ )
590
+ if _default_content_type is not None:
591
+ _header_params['Content-Type'] = _default_content_type
592
+
593
+ # authentication setting
594
+ _auth_settings: List[str] = [
595
+ 'opportifyToken'
596
+ ]
597
+
598
+ return self.api_client.param_serialize(
599
+ method='POST',
600
+ resource_path='/email/batch',
601
+ path_params=_path_params,
602
+ query_params=_query_params,
603
+ header_params=_header_params,
604
+ body=_body_params,
605
+ post_params=_form_params,
606
+ files=_files,
607
+ auth_settings=_auth_settings,
608
+ collection_formats=_collection_formats,
609
+ _host=_host,
610
+ _request_auth=_request_auth
611
+ )
612
+
613
+
614
+
615
+
616
+ @validate_call
617
+ def get_email_batch_status(
618
+ self,
619
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
620
+ _request_timeout: Union[
621
+ None,
622
+ Annotated[StrictFloat, Field(gt=0)],
623
+ Tuple[
624
+ Annotated[StrictFloat, Field(gt=0)],
625
+ Annotated[StrictFloat, Field(gt=0)]
626
+ ]
627
+ ] = None,
628
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
629
+ _content_type: Optional[StrictStr] = None,
630
+ _headers: Optional[Dict[StrictStr, Any]] = None,
631
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
632
+ ) -> GetEmailBatchStatus200Response:
633
+ """Get Email Batch Status
634
+
635
+ The **Get Email Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch email analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
636
+
637
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
638
+ :type job_id: str
639
+ :param _request_timeout: timeout setting for this request. If one
640
+ number provided, it will be total request
641
+ timeout. It can also be a pair (tuple) of
642
+ (connection, read) timeouts.
643
+ :type _request_timeout: int, tuple(int, int), optional
644
+ :param _request_auth: set to override the auth_settings for an a single
645
+ request; this effectively ignores the
646
+ authentication in the spec for a single request.
647
+ :type _request_auth: dict, optional
648
+ :param _content_type: force content-type for the request.
649
+ :type _content_type: str, Optional
650
+ :param _headers: set to override the headers for a single
651
+ request; this effectively ignores the headers
652
+ in the spec for a single request.
653
+ :type _headers: dict, optional
654
+ :param _host_index: set to override the host_index for a single
655
+ request; this effectively ignores the host_index
656
+ in the spec for a single request.
657
+ :type _host_index: int, optional
658
+ :return: Returns the result object.
659
+ """ # noqa: E501
660
+
661
+ _param = self._get_email_batch_status_serialize(
662
+ job_id=job_id,
663
+ _request_auth=_request_auth,
664
+ _content_type=_content_type,
665
+ _headers=_headers,
666
+ _host_index=_host_index
667
+ )
668
+
669
+ _response_types_map: Dict[str, Optional[str]] = {
670
+ '200': "GetEmailBatchStatus200Response",
671
+ '404': "GetEmailBatchStatus404Response",
672
+ '403': "BatchAnalyzeEmails403Response",
673
+ '500': "AnalyzeEmail500Response",
674
+ }
675
+ response_data = self.api_client.call_api(
676
+ *_param,
677
+ _request_timeout=_request_timeout
678
+ )
679
+ response_data.read()
680
+ return self.api_client.response_deserialize(
681
+ response_data=response_data,
682
+ response_types_map=_response_types_map,
683
+ ).data
684
+
685
+
686
+ @validate_call
687
+ def get_email_batch_status_with_http_info(
688
+ self,
689
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
690
+ _request_timeout: Union[
691
+ None,
692
+ Annotated[StrictFloat, Field(gt=0)],
693
+ Tuple[
694
+ Annotated[StrictFloat, Field(gt=0)],
695
+ Annotated[StrictFloat, Field(gt=0)]
696
+ ]
697
+ ] = None,
698
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
699
+ _content_type: Optional[StrictStr] = None,
700
+ _headers: Optional[Dict[StrictStr, Any]] = None,
701
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
702
+ ) -> ApiResponse[GetEmailBatchStatus200Response]:
703
+ """Get Email Batch Status
704
+
705
+ The **Get Email Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch email analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
706
+
707
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
708
+ :type job_id: str
709
+ :param _request_timeout: timeout setting for this request. If one
710
+ number provided, it will be total request
711
+ timeout. It can also be a pair (tuple) of
712
+ (connection, read) timeouts.
713
+ :type _request_timeout: int, tuple(int, int), optional
714
+ :param _request_auth: set to override the auth_settings for an a single
715
+ request; this effectively ignores the
716
+ authentication in the spec for a single request.
717
+ :type _request_auth: dict, optional
718
+ :param _content_type: force content-type for the request.
719
+ :type _content_type: str, Optional
720
+ :param _headers: set to override the headers for a single
721
+ request; this effectively ignores the headers
722
+ in the spec for a single request.
723
+ :type _headers: dict, optional
724
+ :param _host_index: set to override the host_index for a single
725
+ request; this effectively ignores the host_index
726
+ in the spec for a single request.
727
+ :type _host_index: int, optional
728
+ :return: Returns the result object.
729
+ """ # noqa: E501
730
+
731
+ _param = self._get_email_batch_status_serialize(
732
+ job_id=job_id,
733
+ _request_auth=_request_auth,
734
+ _content_type=_content_type,
735
+ _headers=_headers,
736
+ _host_index=_host_index
737
+ )
738
+
739
+ _response_types_map: Dict[str, Optional[str]] = {
740
+ '200': "GetEmailBatchStatus200Response",
741
+ '404': "GetEmailBatchStatus404Response",
742
+ '403': "BatchAnalyzeEmails403Response",
743
+ '500': "AnalyzeEmail500Response",
744
+ }
745
+ response_data = self.api_client.call_api(
746
+ *_param,
747
+ _request_timeout=_request_timeout
748
+ )
749
+ response_data.read()
750
+ return self.api_client.response_deserialize(
751
+ response_data=response_data,
752
+ response_types_map=_response_types_map,
753
+ )
754
+
755
+
756
+ @validate_call
757
+ def get_email_batch_status_without_preload_content(
758
+ self,
759
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
760
+ _request_timeout: Union[
761
+ None,
762
+ Annotated[StrictFloat, Field(gt=0)],
763
+ Tuple[
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Annotated[StrictFloat, Field(gt=0)]
766
+ ]
767
+ ] = None,
768
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
769
+ _content_type: Optional[StrictStr] = None,
770
+ _headers: Optional[Dict[StrictStr, Any]] = None,
771
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
772
+ ) -> RESTResponseType:
773
+ """Get Email Batch Status
774
+
775
+ The **Get Email Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch email analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
776
+
777
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
778
+ :type job_id: str
779
+ :param _request_timeout: timeout setting for this request. If one
780
+ number provided, it will be total request
781
+ timeout. It can also be a pair (tuple) of
782
+ (connection, read) timeouts.
783
+ :type _request_timeout: int, tuple(int, int), optional
784
+ :param _request_auth: set to override the auth_settings for an a single
785
+ request; this effectively ignores the
786
+ authentication in the spec for a single request.
787
+ :type _request_auth: dict, optional
788
+ :param _content_type: force content-type for the request.
789
+ :type _content_type: str, Optional
790
+ :param _headers: set to override the headers for a single
791
+ request; this effectively ignores the headers
792
+ in the spec for a single request.
793
+ :type _headers: dict, optional
794
+ :param _host_index: set to override the host_index for a single
795
+ request; this effectively ignores the host_index
796
+ in the spec for a single request.
797
+ :type _host_index: int, optional
798
+ :return: Returns the result object.
799
+ """ # noqa: E501
800
+
801
+ _param = self._get_email_batch_status_serialize(
802
+ job_id=job_id,
803
+ _request_auth=_request_auth,
804
+ _content_type=_content_type,
805
+ _headers=_headers,
806
+ _host_index=_host_index
807
+ )
808
+
809
+ _response_types_map: Dict[str, Optional[str]] = {
810
+ '200': "GetEmailBatchStatus200Response",
811
+ '404': "GetEmailBatchStatus404Response",
812
+ '403': "BatchAnalyzeEmails403Response",
813
+ '500': "AnalyzeEmail500Response",
814
+ }
815
+ response_data = self.api_client.call_api(
816
+ *_param,
817
+ _request_timeout=_request_timeout
818
+ )
819
+ return response_data.response
820
+
821
+
822
+ def _get_email_batch_status_serialize(
823
+ self,
824
+ job_id,
825
+ _request_auth,
826
+ _content_type,
827
+ _headers,
828
+ _host_index,
829
+ ) -> RequestSerialized:
830
+
831
+ _host = None
832
+
833
+ _collection_formats: Dict[str, str] = {
834
+ }
835
+
836
+ _path_params: Dict[str, str] = {}
837
+ _query_params: List[Tuple[str, str]] = []
838
+ _header_params: Dict[str, Optional[str]] = _headers or {}
839
+ _form_params: List[Tuple[str, str]] = []
840
+ _files: Dict[
841
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
842
+ ] = {}
843
+ _body_params: Optional[bytes] = None
844
+
845
+ # process the path parameters
846
+ if job_id is not None:
847
+ _path_params['jobId'] = job_id
848
+ # process the query parameters
849
+ # process the header parameters
850
+ # process the form parameters
851
+ # process the body parameter
852
+
853
+
854
+ # set the HTTP header `Accept`
855
+ if 'Accept' not in _header_params:
856
+ _header_params['Accept'] = self.api_client.select_header_accept(
857
+ [
858
+ 'application/json'
859
+ ]
860
+ )
861
+
862
+
863
+ # authentication setting
864
+ _auth_settings: List[str] = [
865
+ 'opportifyToken'
866
+ ]
867
+
868
+ return self.api_client.param_serialize(
869
+ method='GET',
870
+ resource_path='/email/batch/{jobId}',
871
+ path_params=_path_params,
872
+ query_params=_query_params,
873
+ header_params=_header_params,
874
+ body=_body_params,
875
+ post_params=_form_params,
876
+ files=_files,
877
+ auth_settings=_auth_settings,
878
+ collection_formats=_collection_formats,
879
+ _host=_host,
880
+ _request_auth=_request_auth
881
+ )
882
+
883
+