opportify-sdk 0.1.1__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of opportify-sdk might be problematic. Click here for more details.
- openapi_client/__init__.py +186 -0
- openapi_client/api/email_insights_api.py +1491 -0
- openapi_client/api/ip_insights_api.py +1494 -0
- {lib/v1/openapi_client → openapi_client}/api_client.py +14 -7
- {lib/v1/openapi_client → openapi_client}/configuration.py +16 -5
- {lib/v1/openapi_client → openapi_client}/exceptions.py +18 -1
- openapi_client/models/__init__.py +84 -0
- {lib/v1/openapi_client → openapi_client}/models/abuse_contact.py +1 -1
- openapi_client/models/address_signals.py +99 -0
- {lib/v1/openapi_client → openapi_client}/models/admin_contact.py +1 -1
- openapi_client/models/analyze_email200_response.py +127 -0
- lib/v1/openapi_client/models/analyze_email400_response_error.py → openapi_client/models/analyze_email400_response.py +9 -9
- openapi_client/models/analyze_email403_response.py +207 -0
- openapi_client/models/analyze_email500_response.py +89 -0
- openapi_client/models/analyze_email_request.py +94 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip200_response.py +4 -4
- lib/v1/openapi_client/models/analyze_ip400_response_error.py → openapi_client/models/analyze_ip400_response.py +20 -20
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip_request.py +1 -1
- {lib/v1/openapi_client → openapi_client}/models/asn.py +1 -1
- openapi_client/models/batch_analyze_emails202_response.py +93 -0
- openapi_client/models/batch_analyze_emails400_response.py +137 -0
- openapi_client/models/batch_analyze_emails401_response.py +89 -0
- openapi_client/models/batch_analyze_emails402_response.py +137 -0
- openapi_client/models/batch_analyze_emails403_response.py +193 -0
- openapi_client/models/batch_analyze_emails413_response.py +89 -0
- openapi_client/models/batch_analyze_emails429_response.py +89 -0
- openapi_client/models/batch_analyze_emails_request.py +93 -0
- openapi_client/models/batch_analyze_ips202_response.py +93 -0
- openapi_client/models/batch_analyze_ips400_response.py +137 -0
- openapi_client/models/batch_analyze_ips_request.py +91 -0
- {lib/v1/openapi_client → openapi_client}/models/block_listed.py +3 -4
- openapi_client/models/create_email_batch_export400_response.py +89 -0
- openapi_client/models/create_email_batch_export403_response.py +89 -0
- openapi_client/models/create_email_batch_export404_response.py +89 -0
- openapi_client/models/create_email_batch_export409_response.py +137 -0
- openapi_client/models/email_dns.py +97 -0
- openapi_client/models/email_domain.py +113 -0
- openapi_client/models/export_created_response.py +91 -0
- openapi_client/models/export_filter.py +95 -0
- openapi_client/models/export_request.py +92 -0
- openapi_client/models/export_status_response.py +119 -0
- openapi_client/models/exportnotfound.py +89 -0
- openapi_client/models/forbidden.py +89 -0
- {lib/v1/openapi_client → openapi_client}/models/geo.py +1 -1
- openapi_client/models/get_email_batch_export_status400_response.py +89 -0
- openapi_client/models/get_email_batch_export_status404_response.py +137 -0
- openapi_client/models/get_email_batch_status200_response.py +101 -0
- openapi_client/models/get_email_batch_status200_response_download_urls.py +93 -0
- openapi_client/models/get_email_batch_status404_response.py +89 -0
- openapi_client/models/get_ip_batch_status200_response.py +101 -0
- openapi_client/models/internalerror.py +89 -0
- openapi_client/models/internalerror1.py +89 -0
- openapi_client/models/invaliddata.py +89 -0
- openapi_client/models/invaliddata1.py +89 -0
- openapi_client/models/invalidemail.py +89 -0
- openapi_client/models/invalidplan.py +89 -0
- openapi_client/models/invalidplan1.py +89 -0
- openapi_client/models/invalidtoken.py +89 -0
- openapi_client/models/ipvalidationfailed.py +89 -0
- openapi_client/models/jobnotfound.py +89 -0
- openapi_client/models/jobnotready.py +89 -0
- openapi_client/models/malformedrequest.py +89 -0
- openapi_client/models/malformedrequest1.py +89 -0
- openapi_client/models/malformedrequest2.py +89 -0
- openapi_client/models/malformedrequest3.py +89 -0
- openapi_client/models/manifestnotavailable.py +89 -0
- openapi_client/models/notfound.py +89 -0
- {lib/v1/openapi_client → openapi_client}/models/organization.py +1 -1
- openapi_client/models/quotaexceeded.py +89 -0
- openapi_client/models/risk_report_email.py +92 -0
- openapi_client/models/risk_report_ip.py +89 -0
- {lib/v1/openapi_client → openapi_client}/models/tech_contact.py +1 -1
- openapi_client/models/toomanyrequests.py +89 -0
- {lib/v1/openapi_client → openapi_client}/models/trusted_provider.py +1 -1
- {lib/v1/openapi_client → openapi_client}/models/whois.py +2 -2
- {lib/v1/openapi_client → openapi_client}/rest.py +2 -1
- opportify_sdk/email_insights.py +427 -0
- opportify_sdk/ip_insights.py +410 -0
- opportify_sdk-0.3.1.dist-info/METADATA +300 -0
- opportify_sdk-0.3.1.dist-info/RECORD +86 -0
- {opportify_sdk-0.1.1.dist-info → opportify_sdk-0.3.1.dist-info}/WHEEL +1 -1
- opportify_sdk-0.3.1.dist-info/top_level.txt +2 -0
- lib/__init__.py +0 -0
- lib/v1/__init__.py +0 -0
- lib/v1/openapi_client/__init__.py +0 -63
- lib/v1/openapi_client/api/email_insights_api.py +0 -317
- lib/v1/openapi_client/api/ip_insights_api.py +0 -322
- lib/v1/openapi_client/models/__init__.py +0 -45
- lib/v1/openapi_client/models/analyze_email200_response.py +0 -113
- lib/v1/openapi_client/models/analyze_email400_response.py +0 -91
- lib/v1/openapi_client/models/analyze_email500_response.py +0 -91
- lib/v1/openapi_client/models/analyze_email500_response_error.py +0 -89
- lib/v1/openapi_client/models/analyze_email_request.py +0 -92
- lib/v1/openapi_client/models/analyze_ip400_response.py +0 -91
- lib/v1/openapi_client/models/analyze_ip404_response.py +0 -91
- lib/v1/openapi_client/models/analyze_ip500_response.py +0 -91
- lib/v1/openapi_client/models/email_dns.py +0 -87
- lib/v1/openapi_client/models/internalerror.py +0 -89
- lib/v1/openapi_client/models/invalidemail.py +0 -89
- lib/v1/openapi_client/models/ipvalidationfailed.py +0 -89
- lib/v1/openapi_client/models/malformedrequest.py +0 -89
- lib/v1/openapi_client/models/malformedrequest1.py +0 -89
- lib/v1/openapi_client/models/notfound.py +0 -89
- lib/v1/openapi_client/models/risk_report.py +0 -89
- opportify_sdk-0.1.1.dist-info/METADATA +0 -108
- opportify_sdk-0.1.1.dist-info/RECORD +0 -49
- opportify_sdk-0.1.1.dist-info/top_level.txt +0 -2
- src/email_insights.py +0 -97
- src/ip_insights.py +0 -93
- {lib/v1/openapi_client → openapi_client}/api/__init__.py +0 -0
- {lib/v1/openapi_client → openapi_client}/api_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/py.typed +0 -0
- {src → opportify_sdk}/__init__.py +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Opportify Insights API
|
|
5
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable,
|
|
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
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
@@ -21,6 +21,7 @@ import mimetypes
|
|
|
21
21
|
import os
|
|
22
22
|
import re
|
|
23
23
|
import tempfile
|
|
24
|
+
import uuid
|
|
24
25
|
|
|
25
26
|
from urllib.parse import quote
|
|
26
27
|
from typing import Tuple, Optional, List, Dict, Union
|
|
@@ -356,6 +357,8 @@ class ApiClient:
|
|
|
356
357
|
return obj.get_secret_value()
|
|
357
358
|
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
|
358
359
|
return obj
|
|
360
|
+
elif isinstance(obj, uuid.UUID):
|
|
361
|
+
return str(obj)
|
|
359
362
|
elif isinstance(obj, list):
|
|
360
363
|
return [
|
|
361
364
|
self.sanitize_for_serialization(sub_obj) for sub_obj in obj
|
|
@@ -382,6 +385,10 @@ class ApiClient:
|
|
|
382
385
|
else:
|
|
383
386
|
obj_dict = obj.__dict__
|
|
384
387
|
|
|
388
|
+
if isinstance(obj_dict, list):
|
|
389
|
+
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict()
|
|
390
|
+
return self.sanitize_for_serialization(obj_dict)
|
|
391
|
+
|
|
385
392
|
return {
|
|
386
393
|
key: self.sanitize_for_serialization(val)
|
|
387
394
|
for key, val in obj_dict.items()
|
|
@@ -404,7 +411,7 @@ class ApiClient:
|
|
|
404
411
|
data = json.loads(response_text)
|
|
405
412
|
except ValueError:
|
|
406
413
|
data = response_text
|
|
407
|
-
elif re.match(r'^application/(json|[\w
|
|
414
|
+
elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
|
408
415
|
if response_text == "":
|
|
409
416
|
data = ""
|
|
410
417
|
else:
|
|
@@ -453,13 +460,13 @@ class ApiClient:
|
|
|
453
460
|
|
|
454
461
|
if klass in self.PRIMITIVE_TYPES:
|
|
455
462
|
return self.__deserialize_primitive(data, klass)
|
|
456
|
-
elif klass
|
|
463
|
+
elif klass is object:
|
|
457
464
|
return self.__deserialize_object(data)
|
|
458
|
-
elif klass
|
|
465
|
+
elif klass is datetime.date:
|
|
459
466
|
return self.__deserialize_date(data)
|
|
460
|
-
elif klass
|
|
467
|
+
elif klass is datetime.datetime:
|
|
461
468
|
return self.__deserialize_datetime(data)
|
|
462
|
-
elif klass
|
|
469
|
+
elif klass is decimal.Decimal:
|
|
463
470
|
return decimal.Decimal(data)
|
|
464
471
|
elif issubclass(klass, Enum):
|
|
465
472
|
return self.__deserialize_enum(data, klass)
|
|
@@ -517,7 +524,7 @@ class ApiClient:
|
|
|
517
524
|
if k in collection_formats:
|
|
518
525
|
collection_format = collection_formats[k]
|
|
519
526
|
if collection_format == 'multi':
|
|
520
|
-
new_params.extend((k, str(value)) for value in v)
|
|
527
|
+
new_params.extend((k, quote(str(value))) for value in v)
|
|
521
528
|
else:
|
|
522
529
|
if collection_format == 'ssv':
|
|
523
530
|
delimiter = ' '
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Opportify Insights API
|
|
5
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable,
|
|
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
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
@@ -18,7 +18,7 @@ import logging
|
|
|
18
18
|
from logging import FileHandler
|
|
19
19
|
import multiprocessing
|
|
20
20
|
import sys
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
|
|
22
22
|
from typing_extensions import NotRequired, Self
|
|
23
23
|
|
|
24
24
|
import urllib3
|
|
@@ -161,6 +161,10 @@ class Configuration:
|
|
|
161
161
|
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
|
162
162
|
in PEM format.
|
|
163
163
|
:param retries: Number of retries for API requests.
|
|
164
|
+
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
|
165
|
+
in PEM (str) or DER (bytes) format.
|
|
166
|
+
:param cert_file: the path to a client certificate file, for mTLS.
|
|
167
|
+
:param key_file: the path to a client key file, for mTLS.
|
|
164
168
|
|
|
165
169
|
:Example:
|
|
166
170
|
|
|
@@ -194,13 +198,16 @@ conf = openapi_client.Configuration(
|
|
|
194
198
|
username: Optional[str]=None,
|
|
195
199
|
password: Optional[str]=None,
|
|
196
200
|
access_token: Optional[str]=None,
|
|
197
|
-
server_index: Optional[int]=None,
|
|
201
|
+
server_index: Optional[int]=None,
|
|
198
202
|
server_variables: Optional[ServerVariablesT]=None,
|
|
199
203
|
server_operation_index: Optional[Dict[int, int]]=None,
|
|
200
204
|
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
|
201
205
|
ignore_operation_servers: bool=False,
|
|
202
206
|
ssl_ca_cert: Optional[str]=None,
|
|
203
207
|
retries: Optional[int] = None,
|
|
208
|
+
ca_cert_data: Optional[Union[str, bytes]] = None,
|
|
209
|
+
cert_file: Optional[str]=None,
|
|
210
|
+
key_file: Optional[str]=None,
|
|
204
211
|
*,
|
|
205
212
|
debug: Optional[bool] = None,
|
|
206
213
|
) -> None:
|
|
@@ -278,10 +285,14 @@ conf = openapi_client.Configuration(
|
|
|
278
285
|
self.ssl_ca_cert = ssl_ca_cert
|
|
279
286
|
"""Set this to customize the certificate file to verify the peer.
|
|
280
287
|
"""
|
|
281
|
-
self.
|
|
288
|
+
self.ca_cert_data = ca_cert_data
|
|
289
|
+
"""Set this to verify the peer using PEM (str) or DER (bytes)
|
|
290
|
+
certificate data.
|
|
291
|
+
"""
|
|
292
|
+
self.cert_file = cert_file
|
|
282
293
|
"""client certificate file
|
|
283
294
|
"""
|
|
284
|
-
self.key_file =
|
|
295
|
+
self.key_file = key_file
|
|
285
296
|
"""client key file
|
|
286
297
|
"""
|
|
287
298
|
self.assert_hostname = None
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Opportify Insights API
|
|
5
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable,
|
|
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
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
@@ -150,6 +150,13 @@ class ApiException(OpenApiException):
|
|
|
150
150
|
if http_resp.status == 404:
|
|
151
151
|
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
152
152
|
|
|
153
|
+
# Added new conditions for 409 and 422
|
|
154
|
+
if http_resp.status == 409:
|
|
155
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
|
156
|
+
|
|
157
|
+
if http_resp.status == 422:
|
|
158
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
|
159
|
+
|
|
153
160
|
if 500 <= http_resp.status <= 599:
|
|
154
161
|
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
155
162
|
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
@@ -188,6 +195,16 @@ class ServiceException(ApiException):
|
|
|
188
195
|
pass
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
class ConflictException(ApiException):
|
|
199
|
+
"""Exception for HTTP 409 Conflict."""
|
|
200
|
+
pass
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class UnprocessableEntityException(ApiException):
|
|
204
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
|
205
|
+
pass
|
|
206
|
+
|
|
207
|
+
|
|
191
208
|
def render_path(path_to_item):
|
|
192
209
|
"""Returns a string representation of a path"""
|
|
193
210
|
result = ""
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
Opportify Insights API
|
|
6
|
+
|
|
7
|
+
## 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.
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: 1.0.0
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
# import models into model package
|
|
16
|
+
from openapi_client.models.abuse_contact import AbuseContact
|
|
17
|
+
from openapi_client.models.address_signals import AddressSignals
|
|
18
|
+
from openapi_client.models.admin_contact import AdminContact
|
|
19
|
+
from openapi_client.models.analyze_email200_response import AnalyzeEmail200Response
|
|
20
|
+
from openapi_client.models.analyze_email400_response import AnalyzeEmail400Response
|
|
21
|
+
from openapi_client.models.analyze_email403_response import AnalyzeEmail403Response
|
|
22
|
+
from openapi_client.models.analyze_email500_response import AnalyzeEmail500Response
|
|
23
|
+
from openapi_client.models.analyze_email_request import AnalyzeEmailRequest
|
|
24
|
+
from openapi_client.models.analyze_ip200_response import AnalyzeIp200Response
|
|
25
|
+
from openapi_client.models.analyze_ip400_response import AnalyzeIp400Response
|
|
26
|
+
from openapi_client.models.analyze_ip_request import AnalyzeIpRequest
|
|
27
|
+
from openapi_client.models.asn import Asn
|
|
28
|
+
from openapi_client.models.batch_analyze_emails202_response import BatchAnalyzeEmails202Response
|
|
29
|
+
from openapi_client.models.batch_analyze_emails400_response import BatchAnalyzeEmails400Response
|
|
30
|
+
from openapi_client.models.batch_analyze_emails401_response import BatchAnalyzeEmails401Response
|
|
31
|
+
from openapi_client.models.batch_analyze_emails402_response import BatchAnalyzeEmails402Response
|
|
32
|
+
from openapi_client.models.batch_analyze_emails403_response import BatchAnalyzeEmails403Response
|
|
33
|
+
from openapi_client.models.batch_analyze_emails413_response import BatchAnalyzeEmails413Response
|
|
34
|
+
from openapi_client.models.batch_analyze_emails429_response import BatchAnalyzeEmails429Response
|
|
35
|
+
from openapi_client.models.batch_analyze_emails_request import BatchAnalyzeEmailsRequest
|
|
36
|
+
from openapi_client.models.batch_analyze_ips202_response import BatchAnalyzeIps202Response
|
|
37
|
+
from openapi_client.models.batch_analyze_ips400_response import BatchAnalyzeIps400Response
|
|
38
|
+
from openapi_client.models.batch_analyze_ips_request import BatchAnalyzeIpsRequest
|
|
39
|
+
from openapi_client.models.block_listed import BlockListed
|
|
40
|
+
from openapi_client.models.create_email_batch_export400_response import CreateEmailBatchExport400Response
|
|
41
|
+
from openapi_client.models.create_email_batch_export403_response import CreateEmailBatchExport403Response
|
|
42
|
+
from openapi_client.models.create_email_batch_export404_response import CreateEmailBatchExport404Response
|
|
43
|
+
from openapi_client.models.create_email_batch_export409_response import CreateEmailBatchExport409Response
|
|
44
|
+
from openapi_client.models.exportnotfound import EXPORTNOTFOUND
|
|
45
|
+
from openapi_client.models.email_dns import EmailDNS
|
|
46
|
+
from openapi_client.models.email_domain import EmailDomain
|
|
47
|
+
from openapi_client.models.export_created_response import ExportCreatedResponse
|
|
48
|
+
from openapi_client.models.export_filter import ExportFilter
|
|
49
|
+
from openapi_client.models.export_request import ExportRequest
|
|
50
|
+
from openapi_client.models.export_status_response import ExportStatusResponse
|
|
51
|
+
from openapi_client.models.forbidden import FORBIDDEN
|
|
52
|
+
from openapi_client.models.geo import Geo
|
|
53
|
+
from openapi_client.models.get_email_batch_export_status400_response import GetEmailBatchExportStatus400Response
|
|
54
|
+
from openapi_client.models.get_email_batch_export_status404_response import GetEmailBatchExportStatus404Response
|
|
55
|
+
from openapi_client.models.get_email_batch_status200_response import GetEmailBatchStatus200Response
|
|
56
|
+
from openapi_client.models.get_email_batch_status200_response_download_urls import GetEmailBatchStatus200ResponseDownloadUrls
|
|
57
|
+
from openapi_client.models.get_email_batch_status404_response import GetEmailBatchStatus404Response
|
|
58
|
+
from openapi_client.models.get_ip_batch_status200_response import GetIpBatchStatus200Response
|
|
59
|
+
from openapi_client.models.internalerror import INTERNALERROR
|
|
60
|
+
from openapi_client.models.internalerror1 import INTERNALERROR1
|
|
61
|
+
from openapi_client.models.invaliddata import INVALIDDATA
|
|
62
|
+
from openapi_client.models.invaliddata1 import INVALIDDATA1
|
|
63
|
+
from openapi_client.models.invalidemail import INVALIDEMAIL
|
|
64
|
+
from openapi_client.models.invalidplan import INVALIDPLAN
|
|
65
|
+
from openapi_client.models.invalidplan1 import INVALIDPLAN1
|
|
66
|
+
from openapi_client.models.invalidtoken import INVALIDTOKEN
|
|
67
|
+
from openapi_client.models.ipvalidationfailed import IPVALIDATIONFAILED
|
|
68
|
+
from openapi_client.models.jobnotfound import JOBNOTFOUND
|
|
69
|
+
from openapi_client.models.jobnotready import JOBNOTREADY
|
|
70
|
+
from openapi_client.models.malformedrequest import MALFORMEDREQUEST
|
|
71
|
+
from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
|
|
72
|
+
from openapi_client.models.malformedrequest2 import MALFORMEDREQUEST2
|
|
73
|
+
from openapi_client.models.malformedrequest3 import MALFORMEDREQUEST3
|
|
74
|
+
from openapi_client.models.manifestnotavailable import MANIFESTNOTAVAILABLE
|
|
75
|
+
from openapi_client.models.notfound import NOTFOUND
|
|
76
|
+
from openapi_client.models.organization import Organization
|
|
77
|
+
from openapi_client.models.quotaexceeded import QUOTAEXCEEDED
|
|
78
|
+
from openapi_client.models.risk_report_email import RiskReportEmail
|
|
79
|
+
from openapi_client.models.risk_report_ip import RiskReportIp
|
|
80
|
+
from openapi_client.models.toomanyrequests import TOOMANYREQUESTS
|
|
81
|
+
from openapi_client.models.tech_contact import TechContact
|
|
82
|
+
from openapi_client.models.trusted_provider import TrustedProvider
|
|
83
|
+
from openapi_client.models.whois import Whois
|
|
84
|
+
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Opportify Insights API
|
|
5
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable,
|
|
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
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AddressSignals(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Local-part parsing insights produced during analysis. The service always returns this payload; when a specific signal is unavailable, the corresponding value falls back to `false` or an empty string. When `isNoReply` is `true`, the risk engine enforces a minimum `high` risk level and appends `noreply-detected` to `riskReport.baseAnalysis`.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
tag_detected: StrictBool = Field(description="Indicates whether the local-part contains `+tag` sub-addressing. Default: false. Example: true. ", alias="tagDetected")
|
|
30
|
+
tag_value: StrictStr = Field(description="Raw tag contents following the plus sign. Empty string when a tag is not present or has no suffix. Default: empty string. Example: \"campaign-123\". ", alias="tagValue")
|
|
31
|
+
normalized_address: StrictStr = Field(description="Email rebuilt without the tag. Always lower-case. Default: empty string. Example: \"noreply@company.com\". ", alias="normalizedAddress")
|
|
32
|
+
is_role_address: StrictBool = Field(description="True when the local-part maps to a catalogued role inbox (e.g., support, sales, billing). Default: false. Example: true. ", alias="isRoleAddress")
|
|
33
|
+
role_type: StrictStr = Field(description="Role category slug. Empty string when `isRoleAddress` is false. Default: empty string. Example: \"support\". ", alias="roleType")
|
|
34
|
+
is_no_reply: StrictBool = Field(description="True when the local-part matches no-reply or do-not-reply patterns (multi-language aware). Default: false. Example: true. ", alias="isNoReply")
|
|
35
|
+
no_reply_pattern: StrictStr = Field(description="Canonical pattern matched when `isNoReply` is true (for example `noreply`, `no-responder`, `mailer-daemon`). Empty string when no pattern applies. Default: empty string. Example: \"noreply\". ", alias="noReplyPattern")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["tagDetected", "tagValue", "normalizedAddress", "isRoleAddress", "roleType", "isNoReply", "noReplyPattern"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of AddressSignals from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of AddressSignals from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"tagDetected": obj.get("tagDetected"),
|
|
90
|
+
"tagValue": obj.get("tagValue"),
|
|
91
|
+
"normalizedAddress": obj.get("normalizedAddress"),
|
|
92
|
+
"isRoleAddress": obj.get("isRoleAddress"),
|
|
93
|
+
"roleType": obj.get("roleType"),
|
|
94
|
+
"isNoReply": obj.get("isNoReply"),
|
|
95
|
+
"noReplyPattern": obj.get("noReplyPattern")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Opportify Insights API
|
|
5
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable,
|
|
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
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from openapi_client.models.address_signals import AddressSignals
|
|
23
|
+
from openapi_client.models.email_dns import EmailDNS
|
|
24
|
+
from openapi_client.models.email_domain import EmailDomain
|
|
25
|
+
from openapi_client.models.risk_report_email import RiskReportEmail
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class AnalyzeEmail200Response(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
AnalyzeEmail200Response
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
email_address: StrictStr = Field(description="Normalized email address returned by the service (always lower-case).", alias="emailAddress")
|
|
34
|
+
email_provider: StrictStr = Field(description="Provider slug derived from the domain, or `unknown` when not classified.", alias="emailProvider")
|
|
35
|
+
email_type: StrictStr = Field(description="Email classification based on provider and enrichment signals. Allowed values: `private`, `free`, `disposable`, `unknown`. Example: `free`. ", alias="emailType")
|
|
36
|
+
is_deliverable: StrictStr = Field(description="Checks if the email address exists and is deliverable using SMTP handshake simulation. This involves connecting to the mail server and issuing commands to verify deliverability. The possible answers are `yes`, `no`, or `unknown`. We guarantee a high confidence level on this parameter since this is a real time verification. Allowed values: `yes`, `no`, `unknown`. Example: `yes`. ", alias="isDeliverable")
|
|
37
|
+
is_catch_all: StrictBool = Field(description="Determines if the email domain is configured as a catch-all, which accepts emails for all addresses within the domain. This is verified through multiple email tests. ", alias="isCatchAll")
|
|
38
|
+
is_mailbox_full: StrictBool = Field(description="Determines if the mailbox associated with the email is full, in association with isDeliverable field, it can give a reason why the email is not deliverable. ", alias="isMailboxFull")
|
|
39
|
+
is_reachable: StrictBool = Field(description="Confirms if the email domain has valid MX DNS records using DNS lookup.", alias="isReachable")
|
|
40
|
+
is_format_valid: StrictBool = Field(description="Indicates if the email address meets syntax validation rules.", alias="isFormatValid")
|
|
41
|
+
email_correction: Optional[StrictStr] = Field(default=None, description="Suggested corrected email address when auto-correction is confident. Present only when `enableAutoCorrection` is true and a correction exists.", alias="emailCorrection")
|
|
42
|
+
address_signals: AddressSignals = Field(description="Local-part parsing details for the analyzed address. Always present; fields default to empty strings when a signal is not applicable.", alias="addressSignals")
|
|
43
|
+
email_dns: EmailDNS = Field(alias="emailDNS")
|
|
44
|
+
risk_report: Optional[RiskReportEmail] = Field(default=None, description="AI-generated risk report detailing the evaluated risk bucket. Returned only when `enableAI` is true.", alias="riskReport")
|
|
45
|
+
domain: Optional[EmailDomain] = Field(default=None, description="Domain summary derived from enrichment providers. Omitted when enrichment is unavailable or `enableDomainEnrichment` is set to `false`.")
|
|
46
|
+
__properties: ClassVar[List[str]] = ["emailAddress", "emailProvider", "emailType", "isDeliverable", "isCatchAll", "isMailboxFull", "isReachable", "isFormatValid", "emailCorrection", "addressSignals", "emailDNS", "riskReport", "domain"]
|
|
47
|
+
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
populate_by_name=True,
|
|
50
|
+
validate_assignment=True,
|
|
51
|
+
protected_namespaces=(),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def to_str(self) -> str:
|
|
56
|
+
"""Returns the string representation of the model using alias"""
|
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
58
|
+
|
|
59
|
+
def to_json(self) -> str:
|
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
62
|
+
return json.dumps(self.to_dict())
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
+
"""Create an instance of AnalyzeEmail200Response from a JSON string"""
|
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
|
+
|
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
|
71
|
+
|
|
72
|
+
This has the following differences from calling pydantic's
|
|
73
|
+
`self.model_dump(by_alias=True)`:
|
|
74
|
+
|
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
|
76
|
+
were set at model initialization. Other fields with value `None`
|
|
77
|
+
are ignored.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
_dict = self.model_dump(
|
|
83
|
+
by_alias=True,
|
|
84
|
+
exclude=excluded_fields,
|
|
85
|
+
exclude_none=True,
|
|
86
|
+
)
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of address_signals
|
|
88
|
+
if self.address_signals:
|
|
89
|
+
_dict['addressSignals'] = self.address_signals.to_dict()
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of email_dns
|
|
91
|
+
if self.email_dns:
|
|
92
|
+
_dict['emailDNS'] = self.email_dns.to_dict()
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of risk_report
|
|
94
|
+
if self.risk_report:
|
|
95
|
+
_dict['riskReport'] = self.risk_report.to_dict()
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of domain
|
|
97
|
+
if self.domain:
|
|
98
|
+
_dict['domain'] = self.domain.to_dict()
|
|
99
|
+
return _dict
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
103
|
+
"""Create an instance of AnalyzeEmail200Response from a dict"""
|
|
104
|
+
if obj is None:
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
if not isinstance(obj, dict):
|
|
108
|
+
return cls.model_validate(obj)
|
|
109
|
+
|
|
110
|
+
_obj = cls.model_validate({
|
|
111
|
+
"emailAddress": obj.get("emailAddress"),
|
|
112
|
+
"emailProvider": obj.get("emailProvider"),
|
|
113
|
+
"emailType": obj.get("emailType"),
|
|
114
|
+
"isDeliverable": obj.get("isDeliverable"),
|
|
115
|
+
"isCatchAll": obj.get("isCatchAll"),
|
|
116
|
+
"isMailboxFull": obj.get("isMailboxFull"),
|
|
117
|
+
"isReachable": obj.get("isReachable"),
|
|
118
|
+
"isFormatValid": obj.get("isFormatValid"),
|
|
119
|
+
"emailCorrection": obj.get("emailCorrection"),
|
|
120
|
+
"addressSignals": AddressSignals.from_dict(obj["addressSignals"]) if obj.get("addressSignals") is not None else None,
|
|
121
|
+
"emailDNS": EmailDNS.from_dict(obj["emailDNS"]) if obj.get("emailDNS") is not None else None,
|
|
122
|
+
"riskReport": RiskReportEmail.from_dict(obj["riskReport"]) if obj.get("riskReport") is not None else None,
|
|
123
|
+
"domain": EmailDomain.from_dict(obj["domain"]) if obj.get("domain") is not None else None
|
|
124
|
+
})
|
|
125
|
+
return _obj
|
|
126
|
+
|
|
127
|
+
|