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
|
@@ -1,45 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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
|
-
|
|
16
|
-
# import models into model package
|
|
17
|
-
from openapi_client.models.abuse_contact import AbuseContact
|
|
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_email400_response_error import AnalyzeEmail400ResponseError
|
|
22
|
-
from openapi_client.models.analyze_email500_response import AnalyzeEmail500Response
|
|
23
|
-
from openapi_client.models.analyze_email500_response_error import AnalyzeEmail500ResponseError
|
|
24
|
-
from openapi_client.models.analyze_email_request import AnalyzeEmailRequest
|
|
25
|
-
from openapi_client.models.analyze_ip200_response import AnalyzeIp200Response
|
|
26
|
-
from openapi_client.models.analyze_ip400_response import AnalyzeIp400Response
|
|
27
|
-
from openapi_client.models.analyze_ip400_response_error import AnalyzeIp400ResponseError
|
|
28
|
-
from openapi_client.models.analyze_ip404_response import AnalyzeIp404Response
|
|
29
|
-
from openapi_client.models.analyze_ip500_response import AnalyzeIp500Response
|
|
30
|
-
from openapi_client.models.analyze_ip_request import AnalyzeIpRequest
|
|
31
|
-
from openapi_client.models.asn import Asn
|
|
32
|
-
from openapi_client.models.block_listed import BlockListed
|
|
33
|
-
from openapi_client.models.email_dns import EmailDNS
|
|
34
|
-
from openapi_client.models.geo import Geo
|
|
35
|
-
from openapi_client.models.internalerror import INTERNALERROR
|
|
36
|
-
from openapi_client.models.invalidemail import INVALIDEMAIL
|
|
37
|
-
from openapi_client.models.ipvalidationfailed import IPVALIDATIONFAILED
|
|
38
|
-
from openapi_client.models.malformedrequest import MALFORMEDREQUEST
|
|
39
|
-
from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
|
|
40
|
-
from openapi_client.models.notfound import NOTFOUND
|
|
41
|
-
from openapi_client.models.organization import Organization
|
|
42
|
-
from openapi_client.models.risk_report import RiskReport
|
|
43
|
-
from openapi_client.models.tech_contact import TechContact
|
|
44
|
-
from openapi_client.models.trusted_provider import TrustedProvider
|
|
45
|
-
from openapi_client.models.whois import Whois
|
|
@@ -1,113 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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 openapi_client.models.email_dns import EmailDNS
|
|
23
|
-
from openapi_client.models.risk_report import RiskReport
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class AnalyzeEmail200Response(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
AnalyzeEmail200Response
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
email_address: StrictStr = Field(description="The validated email address.", alias="emailAddress")
|
|
32
|
-
email_provider: StrictStr = Field(description="The email provider or domain name.", alias="emailProvider")
|
|
33
|
-
email_type: StrictStr = Field(description="Type of email address (e.g., free, disposable, corporate, unknown).", alias="emailType")
|
|
34
|
-
is_format_valid: StrictBool = Field(description="Indicates if the email address has a valid format.", alias="isFormatValid")
|
|
35
|
-
email_correction: StrictStr = Field(description="Suggested corrected email address, if applicable.", alias="emailCorrection")
|
|
36
|
-
is_deliverable: StrictBool = 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. ", 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_reachable: StrictBool = Field(description="Confirms if the email domain has valid MX DNS records using DNS lookup.", alias="isReachable")
|
|
39
|
-
email_dns: EmailDNS = Field(alias="emailDNS")
|
|
40
|
-
risk_report: RiskReport = Field(alias="riskReport")
|
|
41
|
-
__properties: ClassVar[List[str]] = ["emailAddress", "emailProvider", "emailType", "isFormatValid", "emailCorrection", "isDeliverable", "isCatchAll", "isReachable", "emailDNS", "riskReport"]
|
|
42
|
-
|
|
43
|
-
model_config = ConfigDict(
|
|
44
|
-
populate_by_name=True,
|
|
45
|
-
validate_assignment=True,
|
|
46
|
-
protected_namespaces=(),
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def to_str(self) -> str:
|
|
51
|
-
"""Returns the string representation of the model using alias"""
|
|
52
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
-
|
|
54
|
-
def to_json(self) -> str:
|
|
55
|
-
"""Returns the JSON representation of the model using alias"""
|
|
56
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
-
return json.dumps(self.to_dict())
|
|
58
|
-
|
|
59
|
-
@classmethod
|
|
60
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
-
"""Create an instance of AnalyzeEmail200Response from a JSON string"""
|
|
62
|
-
return cls.from_dict(json.loads(json_str))
|
|
63
|
-
|
|
64
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
-
"""Return the dictionary representation of the model using alias.
|
|
66
|
-
|
|
67
|
-
This has the following differences from calling pydantic's
|
|
68
|
-
`self.model_dump(by_alias=True)`:
|
|
69
|
-
|
|
70
|
-
* `None` is only added to the output dict for nullable fields that
|
|
71
|
-
were set at model initialization. Other fields with value `None`
|
|
72
|
-
are ignored.
|
|
73
|
-
"""
|
|
74
|
-
excluded_fields: Set[str] = set([
|
|
75
|
-
])
|
|
76
|
-
|
|
77
|
-
_dict = self.model_dump(
|
|
78
|
-
by_alias=True,
|
|
79
|
-
exclude=excluded_fields,
|
|
80
|
-
exclude_none=True,
|
|
81
|
-
)
|
|
82
|
-
# override the default output from pydantic by calling `to_dict()` of email_dns
|
|
83
|
-
if self.email_dns:
|
|
84
|
-
_dict['emailDNS'] = self.email_dns.to_dict()
|
|
85
|
-
# override the default output from pydantic by calling `to_dict()` of risk_report
|
|
86
|
-
if self.risk_report:
|
|
87
|
-
_dict['riskReport'] = self.risk_report.to_dict()
|
|
88
|
-
return _dict
|
|
89
|
-
|
|
90
|
-
@classmethod
|
|
91
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
-
"""Create an instance of AnalyzeEmail200Response from a dict"""
|
|
93
|
-
if obj is None:
|
|
94
|
-
return None
|
|
95
|
-
|
|
96
|
-
if not isinstance(obj, dict):
|
|
97
|
-
return cls.model_validate(obj)
|
|
98
|
-
|
|
99
|
-
_obj = cls.model_validate({
|
|
100
|
-
"emailAddress": obj.get("emailAddress"),
|
|
101
|
-
"emailProvider": obj.get("emailProvider"),
|
|
102
|
-
"emailType": obj.get("emailType"),
|
|
103
|
-
"isFormatValid": obj.get("isFormatValid"),
|
|
104
|
-
"emailCorrection": obj.get("emailCorrection"),
|
|
105
|
-
"isDeliverable": obj.get("isDeliverable"),
|
|
106
|
-
"isCatchAll": obj.get("isCatchAll"),
|
|
107
|
-
"isReachable": obj.get("isReachable"),
|
|
108
|
-
"emailDNS": EmailDNS.from_dict(obj["emailDNS"]) if obj.get("emailDNS") is not None else None,
|
|
109
|
-
"riskReport": RiskReport.from_dict(obj["riskReport"]) if obj.get("riskReport") is not None else None
|
|
110
|
-
})
|
|
111
|
-
return _obj
|
|
112
|
-
|
|
113
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from openapi_client.models.analyze_email400_response_error import AnalyzeEmail400ResponseError
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class AnalyzeEmail400Response(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
AnalyzeEmail400Response
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
error: Optional[AnalyzeEmail400ResponseError] = None
|
|
31
|
-
__properties: ClassVar[List[str]] = ["error"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of AnalyzeEmail400Response from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of error
|
|
73
|
-
if self.error:
|
|
74
|
-
_dict['error'] = self.error.to_dict()
|
|
75
|
-
return _dict
|
|
76
|
-
|
|
77
|
-
@classmethod
|
|
78
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of AnalyzeEmail400Response from a dict"""
|
|
80
|
-
if obj is None:
|
|
81
|
-
return None
|
|
82
|
-
|
|
83
|
-
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
85
|
-
|
|
86
|
-
_obj = cls.model_validate({
|
|
87
|
-
"error": AnalyzeEmail400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None
|
|
88
|
-
})
|
|
89
|
-
return _obj
|
|
90
|
-
|
|
91
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from openapi_client.models.analyze_email500_response_error import AnalyzeEmail500ResponseError
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class AnalyzeEmail500Response(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
AnalyzeEmail500Response
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
error: Optional[AnalyzeEmail500ResponseError] = None
|
|
31
|
-
__properties: ClassVar[List[str]] = ["error"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of AnalyzeEmail500Response from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of error
|
|
73
|
-
if self.error:
|
|
74
|
-
_dict['error'] = self.error.to_dict()
|
|
75
|
-
return _dict
|
|
76
|
-
|
|
77
|
-
@classmethod
|
|
78
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of AnalyzeEmail500Response from a dict"""
|
|
80
|
-
if obj is None:
|
|
81
|
-
return None
|
|
82
|
-
|
|
83
|
-
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
85
|
-
|
|
86
|
-
_obj = cls.model_validate({
|
|
87
|
-
"error": AnalyzeEmail500ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None
|
|
88
|
-
})
|
|
89
|
-
return _obj
|
|
90
|
-
|
|
91
|
-
|
|
@@ -1,89 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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, StrictStr
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from typing import Optional, Set
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
class AnalyzeEmail500ResponseError(BaseModel):
|
|
26
|
-
"""
|
|
27
|
-
AnalyzeEmail500ResponseError
|
|
28
|
-
""" # noqa: E501
|
|
29
|
-
message: Optional[StrictStr] = None
|
|
30
|
-
code: Optional[StrictStr] = None
|
|
31
|
-
__properties: ClassVar[List[str]] = ["message", "code"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of AnalyzeEmail500ResponseError from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
return _dict
|
|
73
|
-
|
|
74
|
-
@classmethod
|
|
75
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of AnalyzeEmail500ResponseError from a dict"""
|
|
77
|
-
if obj is None:
|
|
78
|
-
return None
|
|
79
|
-
|
|
80
|
-
if not isinstance(obj, dict):
|
|
81
|
-
return cls.model_validate(obj)
|
|
82
|
-
|
|
83
|
-
_obj = cls.model_validate({
|
|
84
|
-
"message": obj.get("message"),
|
|
85
|
-
"code": obj.get("code")
|
|
86
|
-
})
|
|
87
|
-
return _obj
|
|
88
|
-
|
|
89
|
-
|
|
@@ -1,92 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from typing_extensions import Annotated
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class AnalyzeEmailRequest(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
AnalyzeEmailRequest
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
email: Annotated[str, Field(strict=True, max_length=320)] = Field(description="The email address to validate.")
|
|
31
|
-
enable_ai: Optional[StrictBool] = Field(default=None, description="Enable AI-based analysis for insights.", alias="enableAI")
|
|
32
|
-
enable_auto_correction: Optional[StrictBool] = Field(default=None, description="Suggest possible corrections for misspelled emails.", alias="enableAutoCorrection")
|
|
33
|
-
__properties: ClassVar[List[str]] = ["email", "enableAI", "enableAutoCorrection"]
|
|
34
|
-
|
|
35
|
-
model_config = ConfigDict(
|
|
36
|
-
populate_by_name=True,
|
|
37
|
-
validate_assignment=True,
|
|
38
|
-
protected_namespaces=(),
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def to_str(self) -> str:
|
|
43
|
-
"""Returns the string representation of the model using alias"""
|
|
44
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
-
|
|
46
|
-
def to_json(self) -> str:
|
|
47
|
-
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
-
|
|
51
|
-
@classmethod
|
|
52
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of AnalyzeEmailRequest from a JSON string"""
|
|
54
|
-
return cls.from_dict(json.loads(json_str))
|
|
55
|
-
|
|
56
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
-
"""Return the dictionary representation of the model using alias.
|
|
58
|
-
|
|
59
|
-
This has the following differences from calling pydantic's
|
|
60
|
-
`self.model_dump(by_alias=True)`:
|
|
61
|
-
|
|
62
|
-
* `None` is only added to the output dict for nullable fields that
|
|
63
|
-
were set at model initialization. Other fields with value `None`
|
|
64
|
-
are ignored.
|
|
65
|
-
"""
|
|
66
|
-
excluded_fields: Set[str] = set([
|
|
67
|
-
])
|
|
68
|
-
|
|
69
|
-
_dict = self.model_dump(
|
|
70
|
-
by_alias=True,
|
|
71
|
-
exclude=excluded_fields,
|
|
72
|
-
exclude_none=True,
|
|
73
|
-
)
|
|
74
|
-
return _dict
|
|
75
|
-
|
|
76
|
-
@classmethod
|
|
77
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of AnalyzeEmailRequest from a dict"""
|
|
79
|
-
if obj is None:
|
|
80
|
-
return None
|
|
81
|
-
|
|
82
|
-
if not isinstance(obj, dict):
|
|
83
|
-
return cls.model_validate(obj)
|
|
84
|
-
|
|
85
|
-
_obj = cls.model_validate({
|
|
86
|
-
"email": obj.get("email"),
|
|
87
|
-
"enableAI": obj.get("enableAI"),
|
|
88
|
-
"enableAutoCorrection": obj.get("enableAutoCorrection")
|
|
89
|
-
})
|
|
90
|
-
return _obj
|
|
91
|
-
|
|
92
|
-
|
|
@@ -1,91 +0,0 @@
|
|
|
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-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate 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-reference/email-insights) - [**IP Insights:**](/docs/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-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
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from openapi_client.models.analyze_ip400_response_error import AnalyzeIp400ResponseError
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class AnalyzeIp400Response(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
AnalyzeIp400Response
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
error: Optional[AnalyzeIp400ResponseError] = None
|
|
31
|
-
__properties: ClassVar[List[str]] = ["error"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of AnalyzeIp400Response from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of error
|
|
73
|
-
if self.error:
|
|
74
|
-
_dict['error'] = self.error.to_dict()
|
|
75
|
-
return _dict
|
|
76
|
-
|
|
77
|
-
@classmethod
|
|
78
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of AnalyzeIp400Response from a dict"""
|
|
80
|
-
if obj is None:
|
|
81
|
-
return None
|
|
82
|
-
|
|
83
|
-
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
85
|
-
|
|
86
|
-
_obj = cls.model_validate({
|
|
87
|
-
"error": AnalyzeIp400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None
|
|
88
|
-
})
|
|
89
|
-
return _obj
|
|
90
|
-
|
|
91
|
-
|