opportify-sdk 0.1.1__py3-none-any.whl → 0.1.3__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.
- {lib/v1/openapi_client → openapi_client}/__init__.py +6 -1
- {lib/v1/openapi_client → openapi_client}/api/email_insights_api.py +6 -3
- {lib/v1/openapi_client → openapi_client}/api/ip_insights_api.py +3 -2
- {lib/v1/openapi_client → openapi_client}/models/__init__.py +6 -1
- {lib/v1/openapi_client → openapi_client}/models/analyze_email200_response.py +8 -6
- openapi_client/models/analyze_email403_response.py +91 -0
- openapi_client/models/analyze_email403_response_error.py +137 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip200_response.py +3 -3
- openapi_client/models/invalidplan.py +89 -0
- openapi_client/models/invalidtoken.py +89 -0
- openapi_client/models/risk_report_email.py +91 -0
- openapi_client/models/risk_report_ip.py +89 -0
- {src → opportify_sdk}/ip_insights.py +1 -1
- {opportify_sdk-0.1.1.dist-info → opportify_sdk-0.1.3.dist-info}/METADATA +10 -3
- opportify_sdk-0.1.3.dist-info/RECORD +53 -0
- {opportify_sdk-0.1.1.dist-info → opportify_sdk-0.1.3.dist-info}/WHEEL +1 -1
- opportify_sdk-0.1.3.dist-info/top_level.txt +2 -0
- lib/__init__.py +0 -0
- lib/v1/__init__.py +0 -0
- opportify_sdk-0.1.1.dist-info/RECORD +0 -49
- opportify_sdk-0.1.1.dist-info/top_level.txt +0 -2
- {lib/v1/openapi_client → openapi_client}/api/__init__.py +0 -0
- {lib/v1/openapi_client → openapi_client}/api_client.py +0 -0
- {lib/v1/openapi_client → openapi_client}/api_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/configuration.py +0 -0
- {lib/v1/openapi_client → openapi_client}/exceptions.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/abuse_contact.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/admin_contact.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_email400_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_email400_response_error.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_email500_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_email500_response_error.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_email_request.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip400_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip400_response_error.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip404_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip500_response.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/analyze_ip_request.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/asn.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/block_listed.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/email_dns.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/geo.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/internalerror.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/invalidemail.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/ipvalidationfailed.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/malformedrequest.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/malformedrequest1.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/notfound.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/organization.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/risk_report.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/tech_contact.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/trusted_provider.py +0 -0
- {lib/v1/openapi_client → openapi_client}/models/whois.py +0 -0
- {lib/v1/openapi_client → openapi_client}/py.typed +0 -0
- {lib/v1/openapi_client → openapi_client}/rest.py +0 -0
- {src → opportify_sdk}/__init__.py +0 -0
- {src → opportify_sdk}/email_insights.py +0 -0
|
@@ -37,6 +37,8 @@ from openapi_client.models.admin_contact import AdminContact
|
|
|
37
37
|
from openapi_client.models.analyze_email200_response import AnalyzeEmail200Response
|
|
38
38
|
from openapi_client.models.analyze_email400_response import AnalyzeEmail400Response
|
|
39
39
|
from openapi_client.models.analyze_email400_response_error import AnalyzeEmail400ResponseError
|
|
40
|
+
from openapi_client.models.analyze_email403_response import AnalyzeEmail403Response
|
|
41
|
+
from openapi_client.models.analyze_email403_response_error import AnalyzeEmail403ResponseError
|
|
40
42
|
from openapi_client.models.analyze_email500_response import AnalyzeEmail500Response
|
|
41
43
|
from openapi_client.models.analyze_email500_response_error import AnalyzeEmail500ResponseError
|
|
42
44
|
from openapi_client.models.analyze_email_request import AnalyzeEmailRequest
|
|
@@ -52,12 +54,15 @@ from openapi_client.models.email_dns import EmailDNS
|
|
|
52
54
|
from openapi_client.models.geo import Geo
|
|
53
55
|
from openapi_client.models.internalerror import INTERNALERROR
|
|
54
56
|
from openapi_client.models.invalidemail import INVALIDEMAIL
|
|
57
|
+
from openapi_client.models.invalidplan import INVALIDPLAN
|
|
58
|
+
from openapi_client.models.invalidtoken import INVALIDTOKEN
|
|
55
59
|
from openapi_client.models.ipvalidationfailed import IPVALIDATIONFAILED
|
|
56
60
|
from openapi_client.models.malformedrequest import MALFORMEDREQUEST
|
|
57
61
|
from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
|
|
58
62
|
from openapi_client.models.notfound import NOTFOUND
|
|
59
63
|
from openapi_client.models.organization import Organization
|
|
60
|
-
from openapi_client.models.
|
|
64
|
+
from openapi_client.models.risk_report_email import RiskReportEmail
|
|
65
|
+
from openapi_client.models.risk_report_ip import RiskReportIp
|
|
61
66
|
from openapi_client.models.tech_contact import TechContact
|
|
62
67
|
from openapi_client.models.trusted_provider import TrustedProvider
|
|
63
68
|
from openapi_client.models.whois import Whois
|
|
@@ -56,7 +56,7 @@ class EmailInsightsApi:
|
|
|
56
56
|
) -> AnalyzeEmail200Response:
|
|
57
57
|
"""Analyze Email
|
|
58
58
|
|
|
59
|
-
The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable,
|
|
59
|
+
The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. ### Example Request Body: ```json { \"email\": \"my-email@company.com\", \"enableAI\": true, \"enableAutoCorrection\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
|
|
60
60
|
|
|
61
61
|
:param analyze_email_request: (required)
|
|
62
62
|
:type analyze_email_request: AnalyzeEmailRequest
|
|
@@ -93,6 +93,7 @@ class EmailInsightsApi:
|
|
|
93
93
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
94
|
'200': "AnalyzeEmail200Response",
|
|
95
95
|
'400': "AnalyzeEmail400Response",
|
|
96
|
+
'403': "AnalyzeEmail403Response",
|
|
96
97
|
'500': "AnalyzeEmail500Response",
|
|
97
98
|
}
|
|
98
99
|
response_data = self.api_client.call_api(
|
|
@@ -125,7 +126,7 @@ class EmailInsightsApi:
|
|
|
125
126
|
) -> ApiResponse[AnalyzeEmail200Response]:
|
|
126
127
|
"""Analyze Email
|
|
127
128
|
|
|
128
|
-
The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable,
|
|
129
|
+
The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. ### Example Request Body: ```json { \"email\": \"my-email@company.com\", \"enableAI\": true, \"enableAutoCorrection\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
|
|
129
130
|
|
|
130
131
|
:param analyze_email_request: (required)
|
|
131
132
|
:type analyze_email_request: AnalyzeEmailRequest
|
|
@@ -162,6 +163,7 @@ class EmailInsightsApi:
|
|
|
162
163
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
163
164
|
'200': "AnalyzeEmail200Response",
|
|
164
165
|
'400': "AnalyzeEmail400Response",
|
|
166
|
+
'403': "AnalyzeEmail403Response",
|
|
165
167
|
'500': "AnalyzeEmail500Response",
|
|
166
168
|
}
|
|
167
169
|
response_data = self.api_client.call_api(
|
|
@@ -194,7 +196,7 @@ class EmailInsightsApi:
|
|
|
194
196
|
) -> RESTResponseType:
|
|
195
197
|
"""Analyze Email
|
|
196
198
|
|
|
197
|
-
The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable,
|
|
199
|
+
The **Analyze Email** endpoint validates an email address and returns its deliverability status, provider details, and potential corrections. This endpoint is ideal for ensuring accurate email data before usage. ### Features: - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. ### Example Request Body: ```json { \"email\": \"my-email@company.com\", \"enableAI\": true, \"enableAutoCorrection\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
|
|
198
200
|
|
|
199
201
|
:param analyze_email_request: (required)
|
|
200
202
|
:type analyze_email_request: AnalyzeEmailRequest
|
|
@@ -231,6 +233,7 @@ class EmailInsightsApi:
|
|
|
231
233
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
232
234
|
'200': "AnalyzeEmail200Response",
|
|
233
235
|
'400': "AnalyzeEmail400Response",
|
|
236
|
+
'403': "AnalyzeEmail403Response",
|
|
234
237
|
'500': "AnalyzeEmail500Response",
|
|
235
238
|
}
|
|
236
239
|
response_data = self.api_client.call_api(
|
|
@@ -90,12 +90,11 @@ class IPInsightsApi:
|
|
|
90
90
|
_host_index=_host_index
|
|
91
91
|
)
|
|
92
92
|
|
|
93
|
-
print ("_param", _param)
|
|
94
|
-
|
|
95
93
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
96
94
|
'200': "AnalyzeIp200Response",
|
|
97
95
|
'400': "AnalyzeIp400Response",
|
|
98
96
|
'404': "AnalyzeIp404Response",
|
|
97
|
+
'403': "AnalyzeEmail403Response",
|
|
99
98
|
'500': "AnalyzeIp500Response",
|
|
100
99
|
}
|
|
101
100
|
response_data = self.api_client.call_api(
|
|
@@ -166,6 +165,7 @@ class IPInsightsApi:
|
|
|
166
165
|
'200': "AnalyzeIp200Response",
|
|
167
166
|
'400': "AnalyzeIp400Response",
|
|
168
167
|
'404': "AnalyzeIp404Response",
|
|
168
|
+
'403': "AnalyzeEmail403Response",
|
|
169
169
|
'500': "AnalyzeIp500Response",
|
|
170
170
|
}
|
|
171
171
|
response_data = self.api_client.call_api(
|
|
@@ -236,6 +236,7 @@ class IPInsightsApi:
|
|
|
236
236
|
'200': "AnalyzeIp200Response",
|
|
237
237
|
'400': "AnalyzeIp400Response",
|
|
238
238
|
'404': "AnalyzeIp404Response",
|
|
239
|
+
'403': "AnalyzeEmail403Response",
|
|
239
240
|
'500': "AnalyzeIp500Response",
|
|
240
241
|
}
|
|
241
242
|
response_data = self.api_client.call_api(
|
|
@@ -19,6 +19,8 @@ from openapi_client.models.admin_contact import AdminContact
|
|
|
19
19
|
from openapi_client.models.analyze_email200_response import AnalyzeEmail200Response
|
|
20
20
|
from openapi_client.models.analyze_email400_response import AnalyzeEmail400Response
|
|
21
21
|
from openapi_client.models.analyze_email400_response_error import AnalyzeEmail400ResponseError
|
|
22
|
+
from openapi_client.models.analyze_email403_response import AnalyzeEmail403Response
|
|
23
|
+
from openapi_client.models.analyze_email403_response_error import AnalyzeEmail403ResponseError
|
|
22
24
|
from openapi_client.models.analyze_email500_response import AnalyzeEmail500Response
|
|
23
25
|
from openapi_client.models.analyze_email500_response_error import AnalyzeEmail500ResponseError
|
|
24
26
|
from openapi_client.models.analyze_email_request import AnalyzeEmailRequest
|
|
@@ -34,12 +36,15 @@ from openapi_client.models.email_dns import EmailDNS
|
|
|
34
36
|
from openapi_client.models.geo import Geo
|
|
35
37
|
from openapi_client.models.internalerror import INTERNALERROR
|
|
36
38
|
from openapi_client.models.invalidemail import INVALIDEMAIL
|
|
39
|
+
from openapi_client.models.invalidplan import INVALIDPLAN
|
|
40
|
+
from openapi_client.models.invalidtoken import INVALIDTOKEN
|
|
37
41
|
from openapi_client.models.ipvalidationfailed import IPVALIDATIONFAILED
|
|
38
42
|
from openapi_client.models.malformedrequest import MALFORMEDREQUEST
|
|
39
43
|
from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
|
|
40
44
|
from openapi_client.models.notfound import NOTFOUND
|
|
41
45
|
from openapi_client.models.organization import Organization
|
|
42
|
-
from openapi_client.models.
|
|
46
|
+
from openapi_client.models.risk_report_email import RiskReportEmail
|
|
47
|
+
from openapi_client.models.risk_report_ip import RiskReportIp
|
|
43
48
|
from openapi_client.models.tech_contact import TechContact
|
|
44
49
|
from openapi_client.models.trusted_provider import TrustedProvider
|
|
45
50
|
from openapi_client.models.whois import Whois
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from openapi_client.models.email_dns import EmailDNS
|
|
23
|
-
from openapi_client.models.
|
|
23
|
+
from openapi_client.models.risk_report_email import RiskReportEmail
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -30,15 +30,16 @@ class AnalyzeEmail200Response(BaseModel):
|
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
email_address: StrictStr = Field(description="The validated email address.", alias="emailAddress")
|
|
32
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,
|
|
33
|
+
email_type: StrictStr = Field(description="Type of email address (e.g., free, disposable, private, unknown).", alias="emailType")
|
|
34
34
|
is_format_valid: StrictBool = Field(description="Indicates if the email address has a valid format.", alias="isFormatValid")
|
|
35
35
|
email_correction: StrictStr = Field(description="Suggested corrected email address, if applicable.", alias="emailCorrection")
|
|
36
|
-
is_deliverable:
|
|
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. ", alias="isDeliverable")
|
|
37
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")
|
|
38
39
|
is_reachable: StrictBool = Field(description="Confirms if the email domain has valid MX DNS records using DNS lookup.", alias="isReachable")
|
|
39
40
|
email_dns: EmailDNS = Field(alias="emailDNS")
|
|
40
|
-
risk_report:
|
|
41
|
-
__properties: ClassVar[List[str]] = ["emailAddress", "emailProvider", "emailType", "isFormatValid", "emailCorrection", "isDeliverable", "isCatchAll", "isReachable", "emailDNS", "riskReport"]
|
|
41
|
+
risk_report: RiskReportEmail = Field(alias="riskReport")
|
|
42
|
+
__properties: ClassVar[List[str]] = ["emailAddress", "emailProvider", "emailType", "isFormatValid", "emailCorrection", "isDeliverable", "isCatchAll", "isMailboxFull", "isReachable", "emailDNS", "riskReport"]
|
|
42
43
|
|
|
43
44
|
model_config = ConfigDict(
|
|
44
45
|
populate_by_name=True,
|
|
@@ -104,9 +105,10 @@ class AnalyzeEmail200Response(BaseModel):
|
|
|
104
105
|
"emailCorrection": obj.get("emailCorrection"),
|
|
105
106
|
"isDeliverable": obj.get("isDeliverable"),
|
|
106
107
|
"isCatchAll": obj.get("isCatchAll"),
|
|
108
|
+
"isMailboxFull": obj.get("isMailboxFull"),
|
|
107
109
|
"isReachable": obj.get("isReachable"),
|
|
108
110
|
"emailDNS": EmailDNS.from_dict(obj["emailDNS"]) if obj.get("emailDNS") is not None else None,
|
|
109
|
-
"riskReport":
|
|
111
|
+
"riskReport": RiskReportEmail.from_dict(obj["riskReport"]) if obj.get("riskReport") is not None else None
|
|
110
112
|
})
|
|
111
113
|
return _obj
|
|
112
114
|
|
|
@@ -0,0 +1,91 @@
|
|
|
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_email403_response_error import AnalyzeEmail403ResponseError
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class AnalyzeEmail403Response(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
AnalyzeEmail403Response
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
error: Optional[AnalyzeEmail403ResponseError] = 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 AnalyzeEmail403Response 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 AnalyzeEmail403Response 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": AnalyzeEmail403ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
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 json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional
|
|
20
|
+
from openapi_client.models.invalidplan import INVALIDPLAN
|
|
21
|
+
from openapi_client.models.invalidtoken import INVALIDTOKEN
|
|
22
|
+
from pydantic import StrictStr, Field
|
|
23
|
+
from typing import Union, List, Set, Optional, Dict
|
|
24
|
+
from typing_extensions import Literal, Self
|
|
25
|
+
|
|
26
|
+
ANALYZEEMAIL403RESPONSEERROR_ONE_OF_SCHEMAS = ["INVALIDPLAN", "INVALIDTOKEN"]
|
|
27
|
+
|
|
28
|
+
class AnalyzeEmail403ResponseError(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
AnalyzeEmail403ResponseError
|
|
31
|
+
"""
|
|
32
|
+
# data type: INVALIDPLAN
|
|
33
|
+
oneof_schema_1_validator: Optional[INVALIDPLAN] = None
|
|
34
|
+
# data type: INVALIDTOKEN
|
|
35
|
+
oneof_schema_2_validator: Optional[INVALIDTOKEN] = None
|
|
36
|
+
actual_instance: Optional[Union[INVALIDPLAN, INVALIDTOKEN]] = None
|
|
37
|
+
one_of_schemas: Set[str] = { "INVALIDPLAN", "INVALIDTOKEN" }
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
46
|
+
if args:
|
|
47
|
+
if len(args) > 1:
|
|
48
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
49
|
+
if kwargs:
|
|
50
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
51
|
+
super().__init__(actual_instance=args[0])
|
|
52
|
+
else:
|
|
53
|
+
super().__init__(**kwargs)
|
|
54
|
+
|
|
55
|
+
@field_validator('actual_instance')
|
|
56
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
57
|
+
instance = AnalyzeEmail403ResponseError.model_construct()
|
|
58
|
+
error_messages = []
|
|
59
|
+
match = 0
|
|
60
|
+
# validate data type: INVALIDPLAN
|
|
61
|
+
if not isinstance(v, INVALIDPLAN):
|
|
62
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `INVALIDPLAN`")
|
|
63
|
+
else:
|
|
64
|
+
match += 1
|
|
65
|
+
# validate data type: INVALIDTOKEN
|
|
66
|
+
if not isinstance(v, INVALIDTOKEN):
|
|
67
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `INVALIDTOKEN`")
|
|
68
|
+
else:
|
|
69
|
+
match += 1
|
|
70
|
+
if match > 1:
|
|
71
|
+
# more than 1 match
|
|
72
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in AnalyzeEmail403ResponseError with oneOf schemas: INVALIDPLAN, INVALIDTOKEN. Details: " + ", ".join(error_messages))
|
|
73
|
+
elif match == 0:
|
|
74
|
+
# no match
|
|
75
|
+
raise ValueError("No match found when setting `actual_instance` in AnalyzeEmail403ResponseError with oneOf schemas: INVALIDPLAN, INVALIDTOKEN. Details: " + ", ".join(error_messages))
|
|
76
|
+
else:
|
|
77
|
+
return v
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
81
|
+
return cls.from_json(json.dumps(obj))
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_json(cls, json_str: str) -> Self:
|
|
85
|
+
"""Returns the object represented by the json string"""
|
|
86
|
+
instance = cls.model_construct()
|
|
87
|
+
error_messages = []
|
|
88
|
+
match = 0
|
|
89
|
+
|
|
90
|
+
# deserialize data into INVALIDPLAN
|
|
91
|
+
try:
|
|
92
|
+
instance.actual_instance = INVALIDPLAN.from_json(json_str)
|
|
93
|
+
match += 1
|
|
94
|
+
except (ValidationError, ValueError) as e:
|
|
95
|
+
error_messages.append(str(e))
|
|
96
|
+
# deserialize data into INVALIDTOKEN
|
|
97
|
+
try:
|
|
98
|
+
instance.actual_instance = INVALIDTOKEN.from_json(json_str)
|
|
99
|
+
match += 1
|
|
100
|
+
except (ValidationError, ValueError) as e:
|
|
101
|
+
error_messages.append(str(e))
|
|
102
|
+
|
|
103
|
+
if match > 1:
|
|
104
|
+
# more than 1 match
|
|
105
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into AnalyzeEmail403ResponseError with oneOf schemas: INVALIDPLAN, INVALIDTOKEN. Details: " + ", ".join(error_messages))
|
|
106
|
+
elif match == 0:
|
|
107
|
+
# no match
|
|
108
|
+
raise ValueError("No match found when deserializing the JSON string into AnalyzeEmail403ResponseError with oneOf schemas: INVALIDPLAN, INVALIDTOKEN. Details: " + ", ".join(error_messages))
|
|
109
|
+
else:
|
|
110
|
+
return instance
|
|
111
|
+
|
|
112
|
+
def to_json(self) -> str:
|
|
113
|
+
"""Returns the JSON representation of the actual instance"""
|
|
114
|
+
if self.actual_instance is None:
|
|
115
|
+
return "null"
|
|
116
|
+
|
|
117
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
118
|
+
return self.actual_instance.to_json()
|
|
119
|
+
else:
|
|
120
|
+
return json.dumps(self.actual_instance)
|
|
121
|
+
|
|
122
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], INVALIDPLAN, INVALIDTOKEN]]:
|
|
123
|
+
"""Returns the dict representation of the actual instance"""
|
|
124
|
+
if self.actual_instance is None:
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
128
|
+
return self.actual_instance.to_dict()
|
|
129
|
+
else:
|
|
130
|
+
# primitive type
|
|
131
|
+
return self.actual_instance
|
|
132
|
+
|
|
133
|
+
def to_str(self) -> str:
|
|
134
|
+
"""Returns the string representation of the actual instance"""
|
|
135
|
+
return pprint.pformat(self.model_dump())
|
|
136
|
+
|
|
137
|
+
|
|
@@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from openapi_client.models.block_listed import BlockListed
|
|
23
23
|
from openapi_client.models.geo import Geo
|
|
24
|
-
from openapi_client.models.
|
|
24
|
+
from openapi_client.models.risk_report_ip import RiskReportIp
|
|
25
25
|
from openapi_client.models.trusted_provider import TrustedProvider
|
|
26
26
|
from openapi_client.models.whois import Whois
|
|
27
27
|
from typing import Optional, Set
|
|
@@ -41,7 +41,7 @@ class AnalyzeIp200Response(BaseModel):
|
|
|
41
41
|
whois: Whois
|
|
42
42
|
trusted_provider: TrustedProvider = Field(alias="trustedProvider")
|
|
43
43
|
blocklisted: BlockListed
|
|
44
|
-
risk_report:
|
|
44
|
+
risk_report: RiskReportIp = Field(alias="riskReport")
|
|
45
45
|
__properties: ClassVar[List[str]] = ["ipAddress", "ipAddressNumber", "ipType", "ipCidr", "connectionType", "hostReverse", "geo", "whois", "trustedProvider", "blocklisted", "riskReport"]
|
|
46
46
|
|
|
47
47
|
model_config = ConfigDict(
|
|
@@ -120,7 +120,7 @@ class AnalyzeIp200Response(BaseModel):
|
|
|
120
120
|
"whois": Whois.from_dict(obj["whois"]) if obj.get("whois") is not None else None,
|
|
121
121
|
"trustedProvider": TrustedProvider.from_dict(obj["trustedProvider"]) if obj.get("trustedProvider") is not None else None,
|
|
122
122
|
"blocklisted": BlockListed.from_dict(obj["blocklisted"]) if obj.get("blocklisted") is not None else None,
|
|
123
|
-
"riskReport":
|
|
123
|
+
"riskReport": RiskReportIp.from_dict(obj["riskReport"]) if obj.get("riskReport") is not None else None
|
|
124
124
|
})
|
|
125
125
|
return _obj
|
|
126
126
|
|
|
@@ -0,0 +1,89 @@
|
|
|
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 INVALIDPLAN(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
INVALIDPLAN
|
|
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 INVALIDPLAN 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 INVALIDPLAN 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
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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 INVALIDTOKEN(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
INVALIDTOKEN
|
|
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 INVALIDTOKEN 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 INVALIDTOKEN 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
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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, StrictInt, 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 RiskReportEmail(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
### Risk Level Determination This documentation outlines how the risk report is determined based on a `normalizedScore` generated by analyzing multiple email-related parameters against predefined risk factors (`baseAnalysis`). The risk report encapsulates the likelihood of various risk scenarios, enabling effective classification and prioritization of risks. The underlying analysis evaluates the provided email information against key risk factors, such as the likelihood of bounces, fraud detection signals, and email deliverability issues. These insights are used to generate a comprehensive risk report, which is then mapped to static risk levels for easier interpretation. --- > **IMPORTANT:** > The risk report model is not available in the free plan. To access this feature, you need to subscribe to a paid plan. --- #### How the Score is Generated The risk score (`normalizedScore`) is derived from a multivariate analysis of input parameters, comparing them against risk factors included in `baseAnalysis`. This process involves: ##### Key Features of the Model: 1. **Dynamic Scoring:** The model assigns weights to various risk factors, dynamically updating them based on training with new data. 2. **Constant Training:** The model is continuously retrained with the latest data to improve accuracy and adapt to evolving risk patterns. 3. **Scalability:** The model supports multiple features and their interactions, deriving a comprehensive and reliable risk score. The output score is normalized to a range of **200–1000** for easier interpretation and alignment with industry practices. --- #### Risk Level Thresholds The risk level is a static representation of the `normalizedScore`, categorized into five distinct levels: | **Risk Level** | **Score Range** | **Description** | |----------------|--------------------------|---------------------------------------------------------------------------------| | `highest` | `normalizedScore > 800` | Represents the most critical level of risk. Immediate attention is required. | | `high` | `600 < normalizedScore <= 800` | Indicates a high level of risk. Consider mitigation actions promptly. | | `medium` | `400 < normalizedScore <= 600` | Reflects a moderate level of risk. Monitoring and possible action advised. | | `low` | `300 < normalizedScore <= 400` | Denotes a low level of risk. Regular monitoring is sufficient. | | `lowest` | `normalizedScore <= 300` | The lowest level of risk. Risk is considered negligible or minimal. | --- #### Usage This risk level determination serves as a human-readable representation of the machine learning model's output. It enables: - **Risk Monitoring:** Identifying entities that require immediate attention. - **Action Prioritization:** Guiding mitigation efforts based on the severity of the risk. - **Decision-Making:** Providing clear thresholds for automated and manual workflows. --- #### Key Notes 1. **Dynamic Scoring, Static Levels:** - While the score is dynamically updated through a multivariate linear regression model, the risk levels remain static to maintain consistency and interpretability. 2. **Customizable Thresholds:** - The thresholds for the levels are configurable based on organizational needs or domain-specific requirements. 3. **Model Retraining:** - Regular updates to the model ensure that scores accurately reflect real-world risk trends, improving the reliability of level assignments. --- This approach combines the adaptability of multivariate linear regression with the simplicity of static thresholds, offering a robust framework for risk assessment and decision-making. --- ### Response Elements
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
score: Optional[StrictInt] = Field(default=None, description="Risk score normalized to a range of 200–1000.")
|
|
30
|
+
level: Optional[StrictStr] = Field(default=None, description="Static representation of the risk level.")
|
|
31
|
+
base_analysis: Optional[List[StrictStr]] = Field(default=None, description="Provide the breakdown of the predefined risk factors used in the analysis.", alias="baseAnalysis")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["score", "level", "baseAnalysis"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of RiskReportEmail from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of RiskReportEmail from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"score": obj.get("score"),
|
|
86
|
+
"level": obj.get("level"),
|
|
87
|
+
"baseAnalysis": obj.get("baseAnalysis")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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, StrictInt, 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 RiskReportIp(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
### Risk Level Determination This documentation outlines how the risk level is determined based on a `normalizedScore` generated by a **multivariate linear regression model**. The risk level provides a static representation of thresholds to classify the severity of risk for an entity. --- > **IMPORTANT:** > The risk report model is not available in the free plan. To access this feature, you need to subscribe to a paid plan. --- #### How the Score is Generated The risk score (`normalizedScore`) is computed using a **multivariate linear regression model**, a machine learning approach that evaluates multiple input features to predict the risk score. ##### Key Features of the Model: 1. **Dynamic Scoring:** The model assigns weights to various risk factors, dynamically updating them based on training with new data. 2. **Constant Training:** The model is continuously retrained with the latest data to improve accuracy and adapt to evolving risk patterns. 3. **Scalability:** The model supports multiple features and their interactions, deriving a comprehensive and reliable risk score. The output score is normalized to a range of **200–1000** for easier interpretation and alignment with industry practices. --- #### Risk Level Thresholds The risk level is a static representation of the `normalizedScore`, categorized into five distinct levels: | **Risk Level** | **Score Range** | **Description** | |----------------|--------------------------|---------------------------------------------------------------------------------| | `highest` | `normalizedScore > 800` | Represents the most critical level of risk. Immediate attention is required. | | `high` | `600 < normalizedScore <= 800` | Indicates a high level of risk. Consider mitigation actions promptly. | | `medium` | `400 < normalizedScore <= 600` | Reflects a moderate level of risk. Monitoring and possible action advised. | | `low` | `300 < normalizedScore <= 400` | Denotes a low level of risk. Regular monitoring is sufficient. | | `lowest` | `normalizedScore <= 300` | The lowest level of risk. Risk is considered negligible or minimal. | --- #### Usage This risk level determination serves as a human-readable representation of the machine learning model's output. It enables: - **Risk Monitoring:** Identifying entities that require immediate attention. - **Action Prioritization:** Guiding mitigation efforts based on the severity of the risk. - **Decision-Making:** Providing clear thresholds for automated and manual workflows. --- #### Key Notes 1. **Dynamic Scoring, Static Levels:** - While the score is dynamically updated through a multivariate linear regression model, the risk levels remain static to maintain consistency and interpretability. 2. **Customizable Thresholds:** - The thresholds for the levels are configurable based on organizational needs or domain-specific requirements. 3. **Model Retraining:** - Regular updates to the model ensure that scores accurately reflect real-world risk trends, improving the reliability of level assignments. --- This approach combines the adaptability of multivariate linear regression with the simplicity of static thresholds, offering a robust framework for risk assessment and decision-making. --- ### Response Elements
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
score: Optional[StrictInt] = Field(default=None, description="Risk score normalized to a range of 200–1000.")
|
|
30
|
+
level: Optional[StrictStr] = Field(default=None, description="Static representation of the risk level.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["score", "level"]
|
|
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 RiskReportIp 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 RiskReportIp 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
|
+
"score": obj.get("score"),
|
|
85
|
+
"level": obj.get("level")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -15,7 +15,7 @@ class IpInsights:
|
|
|
15
15
|
"""
|
|
16
16
|
self.config = ApiConfiguration()
|
|
17
17
|
self.config.api_key = {"opportifyToken": api_key}
|
|
18
|
-
self.host = "https://api.opportify.
|
|
18
|
+
self.host = "https://api.opportify.ai"
|
|
19
19
|
self.version = "v1"
|
|
20
20
|
self.debug_mode = False
|
|
21
21
|
self.api_instance = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: opportify_sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Opportify Insights API
|
|
5
5
|
Home-page: https://github.com/opportify/opportify-sdk-python
|
|
6
6
|
Author: Opportify & OpenAPI-Generator
|
|
@@ -11,6 +11,13 @@ Requires-Dist: urllib3<3.0.0,>=1.25.3
|
|
|
11
11
|
Requires-Dist: python-dateutil>=2.8.2
|
|
12
12
|
Requires-Dist: pydantic>=2
|
|
13
13
|
Requires-Dist: typing-extensions>=4.7.1
|
|
14
|
+
Dynamic: author
|
|
15
|
+
Dynamic: description
|
|
16
|
+
Dynamic: description-content-type
|
|
17
|
+
Dynamic: home-page
|
|
18
|
+
Dynamic: keywords
|
|
19
|
+
Dynamic: requires-dist
|
|
20
|
+
Dynamic: summary
|
|
14
21
|
|
|
15
22
|
# Opportify-SDK-Python
|
|
16
23
|
|
|
@@ -97,7 +104,7 @@ except Exception as e:
|
|
|
97
104
|
|
|
98
105
|
```python
|
|
99
106
|
ip_insights.set_version("v1").set_debug_mode(True)
|
|
100
|
-
email_insights.set_version("v1").set_debug_mode(
|
|
107
|
+
email_insights.set_version("v1").set_debug_mode(True)
|
|
101
108
|
```
|
|
102
109
|
|
|
103
110
|
## About this package
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
openapi_client/__init__.py,sha256=StzTZIaM5CNZPP5MDOf_TO1vkRkdS3tGsNv3_Qu3NQU,6356
|
|
2
|
+
openapi_client/api_client.py,sha256=v_S3upItmHMMZXNSWYBtFIy2SSjt_MLAOcXpMiBST8g,30433
|
|
3
|
+
openapi_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
+
openapi_client/configuration.py,sha256=8U7Zd4rziMXTXvviDquxlSdDgSuSmsttGYeGDNOkod0,21544
|
|
5
|
+
openapi_client/exceptions.py,sha256=tHCC6Ij9c8ScVmZyCL5thgYXpopuUG1NSpILlHI_-Sg,8938
|
|
6
|
+
openapi_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
openapi_client/rest.py,sha256=QwKi4N39ZgYVtBPrXQzw8bkhpiZbfUUPuWhi44tMst0,12378
|
|
8
|
+
openapi_client/api/__init__.py,sha256=_2MpmNT7so7K9CyzP-_2Sd_1EU8-Gq10jtUKccY86-Q,176
|
|
9
|
+
openapi_client/api/email_insights_api.py,sha256=hLzQQ__3skAxZSElPD-hzNylWmRAEawcfPzecLSZNZs,20799
|
|
10
|
+
openapi_client/api/ip_insights_api.py,sha256=FpnXjak3cNO9zrRIoAVrHKOZ0g8qieFTabqKhMmzVC8,21921
|
|
11
|
+
openapi_client/models/__init__.py,sha256=MgeOgO8BXAbb_ZqEj1bXmQcEzLj5vz2g_QHpefnNvM0,5684
|
|
12
|
+
openapi_client/models/abuse_contact.py,sha256=MqF8oUU6hxU4vLXlC6ykcpJiZhjRw6EiJDfeDWYCBxQ,6560
|
|
13
|
+
openapi_client/models/admin_contact.py,sha256=HOmd_CnYyKtOPR-mGL3hbMZ8E5_TKlBlFgMVZOvfGH8,6560
|
|
14
|
+
openapi_client/models/analyze_email200_response.py,sha256=K_dG0wDv37iR4dmcRwUCshYlbnjT0JYIJpa81Z55ZeQ,8516
|
|
15
|
+
openapi_client/models/analyze_email400_response.py,sha256=BrhikNZYFE0L1SScOlmZKh1CQNsOWi8m8e1fOzG9nus,5843
|
|
16
|
+
openapi_client/models/analyze_email400_response_error.py,sha256=oxfixZuiMnwbqRwdDzO7q4MKhQgVyFwxjOKdXpVLc_E,8391
|
|
17
|
+
openapi_client/models/analyze_email403_response.py,sha256=u2mVjGG6jgQjqPL7UOeXo17DyJswvZucsckO0sF3gFY,5843
|
|
18
|
+
openapi_client/models/analyze_email403_response_error.py,sha256=hhu2Pe8evQ0yagEud6W5RwGgYG90x6Ky_D7qVBB3zZw,8306
|
|
19
|
+
openapi_client/models/analyze_email500_response.py,sha256=gAKw0QyVwBZdr52qCrSbRA8kdtBcIn-oW83hvK411j0,5843
|
|
20
|
+
openapi_client/models/analyze_email500_response_error.py,sha256=LuKvELP551F70uAKOnQ_0eVI9fK1V5RLdksgCMtTEwA,5615
|
|
21
|
+
openapi_client/models/analyze_email_request.py,sha256=yzu8AV6wBKWhbBUO7GtsCuKgX_KYJAg9c8bIWjMPJc4,6063
|
|
22
|
+
openapi_client/models/analyze_ip200_response.py,sha256=4Pz8nWAbPsBFLo6Ncwaqb2xfMPBsagf8VsmjF_PX_tM,9152
|
|
23
|
+
openapi_client/models/analyze_ip400_response.py,sha256=aLPWgDU-QbKLzTD1KzHna3VURVRfqwP5m8WM4GINZPM,5819
|
|
24
|
+
openapi_client/models/analyze_ip400_response_error.py,sha256=X2wjsiTtaSWmC-zeKYgwtlQ-N_onhB3Fv2pvFhsOWmg,8486
|
|
25
|
+
openapi_client/models/analyze_ip404_response.py,sha256=mzS98l1DlVKFCFaOmhBc9XjUA7DdGJSXDBmFuL8Yjyk,5748
|
|
26
|
+
openapi_client/models/analyze_ip500_response.py,sha256=FPgWlfRyaFWGNk4xmh6UBiG_Xiys-i7IMZOWu2HoCY8,5768
|
|
27
|
+
openapi_client/models/analyze_ip_request.py,sha256=SZHr8Gd0mRrziip0VH5bgPZu84JCXGKjTSOzO8iSczc,5741
|
|
28
|
+
openapi_client/models/asn.py,sha256=_PtsmGJCAogM2DryLp5SuIgKZ_5H4zkLQvBcYV8-F90,6237
|
|
29
|
+
openapi_client/models/block_listed.py,sha256=UK0LxB8cPQzr6RP18p1GfLiLyVNJqPdYYrJyuhQiwdU,6815
|
|
30
|
+
openapi_client/models/email_dns.py,sha256=0Ttu0-pEQke0lnwkA4Tq8ZKvED6nRn6abSGkPqVEa24,5546
|
|
31
|
+
openapi_client/models/geo.py,sha256=GtTV2s0pDguxBBCbkViNidTmFmRsxfMqMwbb0IWnYkQ,9879
|
|
32
|
+
openapi_client/models/internalerror.py,sha256=_LhOiY2kPKsN_WDU7tVuY65A9-mNiamedWqJddWKRZQ,5555
|
|
33
|
+
openapi_client/models/invalidemail.py,sha256=-ofiTmHw2O61p_hzzELf_wpa9zgi5FjV_Kc-duJFY-o,5551
|
|
34
|
+
openapi_client/models/invalidplan.py,sha256=uwgCaZ2MWv6fUkz2ptX8zivFz8gMLXVWzPjdi66Pi_U,5547
|
|
35
|
+
openapi_client/models/invalidtoken.py,sha256=YxplE1S-VDOol7_zEBcRzpS_G630QeqQPHNz20LvN8o,5551
|
|
36
|
+
openapi_client/models/ipvalidationfailed.py,sha256=Clmw3EqB48h6mfhUzNnWvgO5IzfLq03pMbtWfzxD8xo,5575
|
|
37
|
+
openapi_client/models/malformedrequest.py,sha256=gaOr0Bh_d_Fy0gstnQzurGUD6JAF_kk2fi7Y7PnitB0,5567
|
|
38
|
+
openapi_client/models/malformedrequest1.py,sha256=PZ1e26zin5yhpjwnsuht8XNIHweURLb3n1NwR8rTvV8,5571
|
|
39
|
+
openapi_client/models/notfound.py,sha256=HifW-VdCOp0mn5RQdeM6QVQR1kZc5PlENAik0b9SGDo,5535
|
|
40
|
+
openapi_client/models/organization.py,sha256=IcJr7vJXyKwE9VjlWwJh1PeRar3_gQ4sNkvniMSLQzk,7130
|
|
41
|
+
openapi_client/models/risk_report.py,sha256=ANg1NOURvS-2mXbU8lNHgAlTNuNUYw4NkF43TR5ujsc,9132
|
|
42
|
+
openapi_client/models/risk_report_email.py,sha256=Lz7DCiTIE4x1DCE5RsbdxlPB4yEwbDpA0RiK0zKh6lY,9789
|
|
43
|
+
openapi_client/models/risk_report_ip.py,sha256=ctLbSRt1llA5a0KI3nJVir4Kj0BoHcUd-OKM4QD9f78,9138
|
|
44
|
+
openapi_client/models/tech_contact.py,sha256=AF9myIFacYEMknGN_gGrqjRn8_mpiI7Y_fGhp1wHWpE,6549
|
|
45
|
+
openapi_client/models/trusted_provider.py,sha256=DI33v3eTc6fUhx5NqbjOE7ZpA2VcKbNLSV5MWqodGB0,6174
|
|
46
|
+
openapi_client/models/whois.py,sha256=Yoo9QsUHPMjo9nwSR_H8ZHMhP2fYNRug3jBk3Do6vcw,8833
|
|
47
|
+
opportify_sdk/__init__.py,sha256=b5dO5TZ0ac8L7meGstmpAzIWXS9jwPqV1EruY32dffk,139
|
|
48
|
+
opportify_sdk/email_insights.py,sha256=i4NaYLZiJfXeHaNRZz3V15q8nsgGMcC37iBG5AaDj-Q,3283
|
|
49
|
+
opportify_sdk/ip_insights.py,sha256=hJOAqrETps6J8J5Gb5BWeisDLsdQ4ndUH9namV4f0G0,3007
|
|
50
|
+
opportify_sdk-0.1.3.dist-info/METADATA,sha256=wjJ-x4MxXgqTL5WXo1Ej0JPPqvVkhA_VH-fmxXNzhV4,2606
|
|
51
|
+
opportify_sdk-0.1.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
52
|
+
opportify_sdk-0.1.3.dist-info/top_level.txt,sha256=90CufmKPfMOr0lxs06ndbpvXPdVbmArXAorIu2p-giU,29
|
|
53
|
+
opportify_sdk-0.1.3.dist-info/RECORD,,
|
lib/__init__.py
DELETED
|
File without changes
|
lib/v1/__init__.py
DELETED
|
File without changes
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
lib/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
lib/v1/openapi_client/__init__.py,sha256=4YbyZsJjF4Ig1mWXt6fxS7uhdr0uDEQPZQ-xsbDIwDI,5986
|
|
4
|
-
lib/v1/openapi_client/api_client.py,sha256=v_S3upItmHMMZXNSWYBtFIy2SSjt_MLAOcXpMiBST8g,30433
|
|
5
|
-
lib/v1/openapi_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
6
|
-
lib/v1/openapi_client/configuration.py,sha256=8U7Zd4rziMXTXvviDquxlSdDgSuSmsttGYeGDNOkod0,21544
|
|
7
|
-
lib/v1/openapi_client/exceptions.py,sha256=tHCC6Ij9c8ScVmZyCL5thgYXpopuUG1NSpILlHI_-Sg,8938
|
|
8
|
-
lib/v1/openapi_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
lib/v1/openapi_client/rest.py,sha256=QwKi4N39ZgYVtBPrXQzw8bkhpiZbfUUPuWhi44tMst0,12378
|
|
10
|
-
lib/v1/openapi_client/api/__init__.py,sha256=_2MpmNT7so7K9CyzP-_2Sd_1EU8-Gq10jtUKccY86-Q,176
|
|
11
|
-
lib/v1/openapi_client/api/email_insights_api.py,sha256=bbstLmF0CoBah5qxImN--ic1lBD1uMZ7jr0-ZpWUoAc,20667
|
|
12
|
-
lib/v1/openapi_client/api/ip_insights_api.py,sha256=oCmkRBxVMaVBzrBsA6BoumRl7PvhlyMJla-xYPHMxww,21817
|
|
13
|
-
lib/v1/openapi_client/models/__init__.py,sha256=9VT3hqjFqoCePDx2FhQ2qHjG4dIUbzc8VkBWgsrPtyc,5314
|
|
14
|
-
lib/v1/openapi_client/models/abuse_contact.py,sha256=MqF8oUU6hxU4vLXlC6ykcpJiZhjRw6EiJDfeDWYCBxQ,6560
|
|
15
|
-
lib/v1/openapi_client/models/admin_contact.py,sha256=HOmd_CnYyKtOPR-mGL3hbMZ8E5_TKlBlFgMVZOvfGH8,6560
|
|
16
|
-
lib/v1/openapi_client/models/analyze_email200_response.py,sha256=0YCuUfjKTB_J7FPCHeiPDG-bK5NMf-U-qFvGtQG6h-c,8043
|
|
17
|
-
lib/v1/openapi_client/models/analyze_email400_response.py,sha256=BrhikNZYFE0L1SScOlmZKh1CQNsOWi8m8e1fOzG9nus,5843
|
|
18
|
-
lib/v1/openapi_client/models/analyze_email400_response_error.py,sha256=oxfixZuiMnwbqRwdDzO7q4MKhQgVyFwxjOKdXpVLc_E,8391
|
|
19
|
-
lib/v1/openapi_client/models/analyze_email500_response.py,sha256=gAKw0QyVwBZdr52qCrSbRA8kdtBcIn-oW83hvK411j0,5843
|
|
20
|
-
lib/v1/openapi_client/models/analyze_email500_response_error.py,sha256=LuKvELP551F70uAKOnQ_0eVI9fK1V5RLdksgCMtTEwA,5615
|
|
21
|
-
lib/v1/openapi_client/models/analyze_email_request.py,sha256=yzu8AV6wBKWhbBUO7GtsCuKgX_KYJAg9c8bIWjMPJc4,6063
|
|
22
|
-
lib/v1/openapi_client/models/analyze_ip200_response.py,sha256=_8uU_YPLrwTc-Mth3keN7TlWkm7jCiIYi2i1UHzWySk,9143
|
|
23
|
-
lib/v1/openapi_client/models/analyze_ip400_response.py,sha256=aLPWgDU-QbKLzTD1KzHna3VURVRfqwP5m8WM4GINZPM,5819
|
|
24
|
-
lib/v1/openapi_client/models/analyze_ip400_response_error.py,sha256=X2wjsiTtaSWmC-zeKYgwtlQ-N_onhB3Fv2pvFhsOWmg,8486
|
|
25
|
-
lib/v1/openapi_client/models/analyze_ip404_response.py,sha256=mzS98l1DlVKFCFaOmhBc9XjUA7DdGJSXDBmFuL8Yjyk,5748
|
|
26
|
-
lib/v1/openapi_client/models/analyze_ip500_response.py,sha256=FPgWlfRyaFWGNk4xmh6UBiG_Xiys-i7IMZOWu2HoCY8,5768
|
|
27
|
-
lib/v1/openapi_client/models/analyze_ip_request.py,sha256=SZHr8Gd0mRrziip0VH5bgPZu84JCXGKjTSOzO8iSczc,5741
|
|
28
|
-
lib/v1/openapi_client/models/asn.py,sha256=_PtsmGJCAogM2DryLp5SuIgKZ_5H4zkLQvBcYV8-F90,6237
|
|
29
|
-
lib/v1/openapi_client/models/block_listed.py,sha256=UK0LxB8cPQzr6RP18p1GfLiLyVNJqPdYYrJyuhQiwdU,6815
|
|
30
|
-
lib/v1/openapi_client/models/email_dns.py,sha256=0Ttu0-pEQke0lnwkA4Tq8ZKvED6nRn6abSGkPqVEa24,5546
|
|
31
|
-
lib/v1/openapi_client/models/geo.py,sha256=GtTV2s0pDguxBBCbkViNidTmFmRsxfMqMwbb0IWnYkQ,9879
|
|
32
|
-
lib/v1/openapi_client/models/internalerror.py,sha256=_LhOiY2kPKsN_WDU7tVuY65A9-mNiamedWqJddWKRZQ,5555
|
|
33
|
-
lib/v1/openapi_client/models/invalidemail.py,sha256=-ofiTmHw2O61p_hzzELf_wpa9zgi5FjV_Kc-duJFY-o,5551
|
|
34
|
-
lib/v1/openapi_client/models/ipvalidationfailed.py,sha256=Clmw3EqB48h6mfhUzNnWvgO5IzfLq03pMbtWfzxD8xo,5575
|
|
35
|
-
lib/v1/openapi_client/models/malformedrequest.py,sha256=gaOr0Bh_d_Fy0gstnQzurGUD6JAF_kk2fi7Y7PnitB0,5567
|
|
36
|
-
lib/v1/openapi_client/models/malformedrequest1.py,sha256=PZ1e26zin5yhpjwnsuht8XNIHweURLb3n1NwR8rTvV8,5571
|
|
37
|
-
lib/v1/openapi_client/models/notfound.py,sha256=HifW-VdCOp0mn5RQdeM6QVQR1kZc5PlENAik0b9SGDo,5535
|
|
38
|
-
lib/v1/openapi_client/models/organization.py,sha256=IcJr7vJXyKwE9VjlWwJh1PeRar3_gQ4sNkvniMSLQzk,7130
|
|
39
|
-
lib/v1/openapi_client/models/risk_report.py,sha256=ANg1NOURvS-2mXbU8lNHgAlTNuNUYw4NkF43TR5ujsc,9132
|
|
40
|
-
lib/v1/openapi_client/models/tech_contact.py,sha256=AF9myIFacYEMknGN_gGrqjRn8_mpiI7Y_fGhp1wHWpE,6549
|
|
41
|
-
lib/v1/openapi_client/models/trusted_provider.py,sha256=DI33v3eTc6fUhx5NqbjOE7ZpA2VcKbNLSV5MWqodGB0,6174
|
|
42
|
-
lib/v1/openapi_client/models/whois.py,sha256=Yoo9QsUHPMjo9nwSR_H8ZHMhP2fYNRug3jBk3Do6vcw,8833
|
|
43
|
-
src/__init__.py,sha256=b5dO5TZ0ac8L7meGstmpAzIWXS9jwPqV1EruY32dffk,139
|
|
44
|
-
src/email_insights.py,sha256=i4NaYLZiJfXeHaNRZz3V15q8nsgGMcC37iBG5AaDj-Q,3283
|
|
45
|
-
src/ip_insights.py,sha256=yaydXslmi5e_cSFCniJTFCWazE1Zw4K-ZlXiLxGbfkU,3008
|
|
46
|
-
opportify_sdk-0.1.1.dist-info/METADATA,sha256=6bRgIBmdzuGi30ooeYSN51obEPgcVW-etXYZI7SwV8o,2459
|
|
47
|
-
opportify_sdk-0.1.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
48
|
-
opportify_sdk-0.1.1.dist-info/top_level.txt,sha256=4zVviOxxwoucHwO4Z7OzyNBMPn7vZjaTdyfvDO-OZfg,8
|
|
49
|
-
opportify_sdk-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|