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.

Files changed (113) hide show
  1. openapi_client/__init__.py +186 -0
  2. openapi_client/api/email_insights_api.py +1491 -0
  3. openapi_client/api/ip_insights_api.py +1494 -0
  4. {lib/v1/openapi_client → openapi_client}/api_client.py +14 -7
  5. {lib/v1/openapi_client → openapi_client}/configuration.py +16 -5
  6. {lib/v1/openapi_client → openapi_client}/exceptions.py +18 -1
  7. openapi_client/models/__init__.py +84 -0
  8. {lib/v1/openapi_client → openapi_client}/models/abuse_contact.py +1 -1
  9. openapi_client/models/address_signals.py +99 -0
  10. {lib/v1/openapi_client → openapi_client}/models/admin_contact.py +1 -1
  11. openapi_client/models/analyze_email200_response.py +127 -0
  12. lib/v1/openapi_client/models/analyze_email400_response_error.py → openapi_client/models/analyze_email400_response.py +9 -9
  13. openapi_client/models/analyze_email403_response.py +207 -0
  14. openapi_client/models/analyze_email500_response.py +89 -0
  15. openapi_client/models/analyze_email_request.py +94 -0
  16. {lib/v1/openapi_client → openapi_client}/models/analyze_ip200_response.py +4 -4
  17. lib/v1/openapi_client/models/analyze_ip400_response_error.py → openapi_client/models/analyze_ip400_response.py +20 -20
  18. {lib/v1/openapi_client → openapi_client}/models/analyze_ip_request.py +1 -1
  19. {lib/v1/openapi_client → openapi_client}/models/asn.py +1 -1
  20. openapi_client/models/batch_analyze_emails202_response.py +93 -0
  21. openapi_client/models/batch_analyze_emails400_response.py +137 -0
  22. openapi_client/models/batch_analyze_emails401_response.py +89 -0
  23. openapi_client/models/batch_analyze_emails402_response.py +137 -0
  24. openapi_client/models/batch_analyze_emails403_response.py +193 -0
  25. openapi_client/models/batch_analyze_emails413_response.py +89 -0
  26. openapi_client/models/batch_analyze_emails429_response.py +89 -0
  27. openapi_client/models/batch_analyze_emails_request.py +93 -0
  28. openapi_client/models/batch_analyze_ips202_response.py +93 -0
  29. openapi_client/models/batch_analyze_ips400_response.py +137 -0
  30. openapi_client/models/batch_analyze_ips_request.py +91 -0
  31. {lib/v1/openapi_client → openapi_client}/models/block_listed.py +3 -4
  32. openapi_client/models/create_email_batch_export400_response.py +89 -0
  33. openapi_client/models/create_email_batch_export403_response.py +89 -0
  34. openapi_client/models/create_email_batch_export404_response.py +89 -0
  35. openapi_client/models/create_email_batch_export409_response.py +137 -0
  36. openapi_client/models/email_dns.py +97 -0
  37. openapi_client/models/email_domain.py +113 -0
  38. openapi_client/models/export_created_response.py +91 -0
  39. openapi_client/models/export_filter.py +95 -0
  40. openapi_client/models/export_request.py +92 -0
  41. openapi_client/models/export_status_response.py +119 -0
  42. openapi_client/models/exportnotfound.py +89 -0
  43. openapi_client/models/forbidden.py +89 -0
  44. {lib/v1/openapi_client → openapi_client}/models/geo.py +1 -1
  45. openapi_client/models/get_email_batch_export_status400_response.py +89 -0
  46. openapi_client/models/get_email_batch_export_status404_response.py +137 -0
  47. openapi_client/models/get_email_batch_status200_response.py +101 -0
  48. openapi_client/models/get_email_batch_status200_response_download_urls.py +93 -0
  49. openapi_client/models/get_email_batch_status404_response.py +89 -0
  50. openapi_client/models/get_ip_batch_status200_response.py +101 -0
  51. openapi_client/models/internalerror.py +89 -0
  52. openapi_client/models/internalerror1.py +89 -0
  53. openapi_client/models/invaliddata.py +89 -0
  54. openapi_client/models/invaliddata1.py +89 -0
  55. openapi_client/models/invalidemail.py +89 -0
  56. openapi_client/models/invalidplan.py +89 -0
  57. openapi_client/models/invalidplan1.py +89 -0
  58. openapi_client/models/invalidtoken.py +89 -0
  59. openapi_client/models/ipvalidationfailed.py +89 -0
  60. openapi_client/models/jobnotfound.py +89 -0
  61. openapi_client/models/jobnotready.py +89 -0
  62. openapi_client/models/malformedrequest.py +89 -0
  63. openapi_client/models/malformedrequest1.py +89 -0
  64. openapi_client/models/malformedrequest2.py +89 -0
  65. openapi_client/models/malformedrequest3.py +89 -0
  66. openapi_client/models/manifestnotavailable.py +89 -0
  67. openapi_client/models/notfound.py +89 -0
  68. {lib/v1/openapi_client → openapi_client}/models/organization.py +1 -1
  69. openapi_client/models/quotaexceeded.py +89 -0
  70. openapi_client/models/risk_report_email.py +92 -0
  71. openapi_client/models/risk_report_ip.py +89 -0
  72. {lib/v1/openapi_client → openapi_client}/models/tech_contact.py +1 -1
  73. openapi_client/models/toomanyrequests.py +89 -0
  74. {lib/v1/openapi_client → openapi_client}/models/trusted_provider.py +1 -1
  75. {lib/v1/openapi_client → openapi_client}/models/whois.py +2 -2
  76. {lib/v1/openapi_client → openapi_client}/rest.py +2 -1
  77. opportify_sdk/email_insights.py +427 -0
  78. opportify_sdk/ip_insights.py +410 -0
  79. opportify_sdk-0.3.1.dist-info/METADATA +300 -0
  80. opportify_sdk-0.3.1.dist-info/RECORD +86 -0
  81. {opportify_sdk-0.1.1.dist-info → opportify_sdk-0.3.1.dist-info}/WHEEL +1 -1
  82. opportify_sdk-0.3.1.dist-info/top_level.txt +2 -0
  83. lib/__init__.py +0 -0
  84. lib/v1/__init__.py +0 -0
  85. lib/v1/openapi_client/__init__.py +0 -63
  86. lib/v1/openapi_client/api/email_insights_api.py +0 -317
  87. lib/v1/openapi_client/api/ip_insights_api.py +0 -322
  88. lib/v1/openapi_client/models/__init__.py +0 -45
  89. lib/v1/openapi_client/models/analyze_email200_response.py +0 -113
  90. lib/v1/openapi_client/models/analyze_email400_response.py +0 -91
  91. lib/v1/openapi_client/models/analyze_email500_response.py +0 -91
  92. lib/v1/openapi_client/models/analyze_email500_response_error.py +0 -89
  93. lib/v1/openapi_client/models/analyze_email_request.py +0 -92
  94. lib/v1/openapi_client/models/analyze_ip400_response.py +0 -91
  95. lib/v1/openapi_client/models/analyze_ip404_response.py +0 -91
  96. lib/v1/openapi_client/models/analyze_ip500_response.py +0 -91
  97. lib/v1/openapi_client/models/email_dns.py +0 -87
  98. lib/v1/openapi_client/models/internalerror.py +0 -89
  99. lib/v1/openapi_client/models/invalidemail.py +0 -89
  100. lib/v1/openapi_client/models/ipvalidationfailed.py +0 -89
  101. lib/v1/openapi_client/models/malformedrequest.py +0 -89
  102. lib/v1/openapi_client/models/malformedrequest1.py +0 -89
  103. lib/v1/openapi_client/models/notfound.py +0 -89
  104. lib/v1/openapi_client/models/risk_report.py +0 -89
  105. opportify_sdk-0.1.1.dist-info/METADATA +0 -108
  106. opportify_sdk-0.1.1.dist-info/RECORD +0 -49
  107. opportify_sdk-0.1.1.dist-info/top_level.txt +0 -2
  108. src/email_insights.py +0 -97
  109. src/ip_insights.py +0 -93
  110. {lib/v1/openapi_client → openapi_client}/api/__init__.py +0 -0
  111. {lib/v1/openapi_client → openapi_client}/api_response.py +0 -0
  112. {lib/v1/openapi_client → openapi_client}/py.typed +0 -0
  113. {src → opportify_sdk}/__init__.py +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Opportify Insights API
5
5
 
6
- ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, 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.
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -23,11 +23,11 @@ from pydantic import StrictStr, Field
23
23
  from typing import Union, List, Set, Optional, Dict
24
24
  from typing_extensions import Literal, Self
25
25
 
26
- ANALYZEEMAIL400RESPONSEERROR_ONE_OF_SCHEMAS = ["INVALIDEMAIL", "MALFORMEDREQUEST"]
26
+ ANALYZEEMAIL400RESPONSE_ONE_OF_SCHEMAS = ["INVALIDEMAIL", "MALFORMEDREQUEST"]
27
27
 
28
- class AnalyzeEmail400ResponseError(BaseModel):
28
+ class AnalyzeEmail400Response(BaseModel):
29
29
  """
30
- AnalyzeEmail400ResponseError
30
+ AnalyzeEmail400Response
31
31
  """
32
32
  # data type: MALFORMEDREQUEST
33
33
  oneof_schema_1_validator: Optional[MALFORMEDREQUEST] = None
@@ -54,7 +54,7 @@ class AnalyzeEmail400ResponseError(BaseModel):
54
54
 
55
55
  @field_validator('actual_instance')
56
56
  def actual_instance_must_validate_oneof(cls, v):
57
- instance = AnalyzeEmail400ResponseError.model_construct()
57
+ instance = AnalyzeEmail400Response.model_construct()
58
58
  error_messages = []
59
59
  match = 0
60
60
  # validate data type: MALFORMEDREQUEST
@@ -69,10 +69,10 @@ class AnalyzeEmail400ResponseError(BaseModel):
69
69
  match += 1
70
70
  if match > 1:
71
71
  # more than 1 match
72
- raise ValueError("Multiple matches found when setting `actual_instance` in AnalyzeEmail400ResponseError with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
72
+ raise ValueError("Multiple matches found when setting `actual_instance` in AnalyzeEmail400Response with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
73
73
  elif match == 0:
74
74
  # no match
75
- raise ValueError("No match found when setting `actual_instance` in AnalyzeEmail400ResponseError with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
75
+ raise ValueError("No match found when setting `actual_instance` in AnalyzeEmail400Response with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
76
76
  else:
77
77
  return v
78
78
 
@@ -102,10 +102,10 @@ class AnalyzeEmail400ResponseError(BaseModel):
102
102
 
103
103
  if match > 1:
104
104
  # more than 1 match
105
- raise ValueError("Multiple matches found when deserializing the JSON string into AnalyzeEmail400ResponseError with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
105
+ raise ValueError("Multiple matches found when deserializing the JSON string into AnalyzeEmail400Response with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
106
106
  elif match == 0:
107
107
  # no match
108
- raise ValueError("No match found when deserializing the JSON string into AnalyzeEmail400ResponseError with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
108
+ raise ValueError("No match found when deserializing the JSON string into AnalyzeEmail400Response with oneOf schemas: INVALIDEMAIL, MALFORMEDREQUEST. Details: " + ", ".join(error_messages))
109
109
  else:
110
110
  return instance
111
111
 
@@ -0,0 +1,207 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Opportify Insights API
5
+
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import 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.forbidden import FORBIDDEN
21
+ from openapi_client.models.internalerror import INTERNALERROR
22
+ from openapi_client.models.invalidplan import INVALIDPLAN
23
+ from openapi_client.models.invalidtoken import INVALIDTOKEN
24
+ from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
25
+ from openapi_client.models.quotaexceeded import QUOTAEXCEEDED
26
+ from openapi_client.models.toomanyrequests import TOOMANYREQUESTS
27
+ from pydantic import StrictStr, Field
28
+ from typing import Union, List, Set, Optional, Dict
29
+ from typing_extensions import Literal, Self
30
+
31
+ ANALYZEEMAIL403RESPONSE_ONE_OF_SCHEMAS = ["FORBIDDEN", "INTERNALERROR", "INVALIDPLAN", "INVALIDTOKEN", "MALFORMEDREQUEST1", "QUOTAEXCEEDED", "TOOMANYREQUESTS"]
32
+
33
+ class AnalyzeEmail403Response(BaseModel):
34
+ """
35
+ AnalyzeEmail403Response
36
+ """
37
+ # data type: MALFORMEDREQUEST1
38
+ oneof_schema_1_validator: Optional[MALFORMEDREQUEST1] = None
39
+ # data type: INVALIDTOKEN
40
+ oneof_schema_2_validator: Optional[INVALIDTOKEN] = None
41
+ # data type: INVALIDPLAN
42
+ oneof_schema_3_validator: Optional[INVALIDPLAN] = None
43
+ # data type: FORBIDDEN
44
+ oneof_schema_4_validator: Optional[FORBIDDEN] = None
45
+ # data type: TOOMANYREQUESTS
46
+ oneof_schema_5_validator: Optional[TOOMANYREQUESTS] = None
47
+ # data type: INTERNALERROR
48
+ oneof_schema_6_validator: Optional[INTERNALERROR] = None
49
+ # data type: QUOTAEXCEEDED
50
+ oneof_schema_7_validator: Optional[QUOTAEXCEEDED] = None
51
+ actual_instance: Optional[Union[FORBIDDEN, INTERNALERROR, INVALIDPLAN, INVALIDTOKEN, MALFORMEDREQUEST1, QUOTAEXCEEDED, TOOMANYREQUESTS]] = None
52
+ one_of_schemas: Set[str] = { "FORBIDDEN", "INTERNALERROR", "INVALIDPLAN", "INVALIDTOKEN", "MALFORMEDREQUEST1", "QUOTAEXCEEDED", "TOOMANYREQUESTS" }
53
+
54
+ model_config = ConfigDict(
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+
60
+ def __init__(self, *args, **kwargs) -> None:
61
+ if args:
62
+ if len(args) > 1:
63
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
64
+ if kwargs:
65
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
66
+ super().__init__(actual_instance=args[0])
67
+ else:
68
+ super().__init__(**kwargs)
69
+
70
+ @field_validator('actual_instance')
71
+ def actual_instance_must_validate_oneof(cls, v):
72
+ instance = AnalyzeEmail403Response.model_construct()
73
+ error_messages = []
74
+ match = 0
75
+ # validate data type: MALFORMEDREQUEST1
76
+ if not isinstance(v, MALFORMEDREQUEST1):
77
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MALFORMEDREQUEST1`")
78
+ else:
79
+ match += 1
80
+ # validate data type: INVALIDTOKEN
81
+ if not isinstance(v, INVALIDTOKEN):
82
+ error_messages.append(f"Error! Input type `{type(v)}` is not `INVALIDTOKEN`")
83
+ else:
84
+ match += 1
85
+ # validate data type: INVALIDPLAN
86
+ if not isinstance(v, INVALIDPLAN):
87
+ error_messages.append(f"Error! Input type `{type(v)}` is not `INVALIDPLAN`")
88
+ else:
89
+ match += 1
90
+ # validate data type: FORBIDDEN
91
+ if not isinstance(v, FORBIDDEN):
92
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FORBIDDEN`")
93
+ else:
94
+ match += 1
95
+ # validate data type: TOOMANYREQUESTS
96
+ if not isinstance(v, TOOMANYREQUESTS):
97
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TOOMANYREQUESTS`")
98
+ else:
99
+ match += 1
100
+ # validate data type: INTERNALERROR
101
+ if not isinstance(v, INTERNALERROR):
102
+ error_messages.append(f"Error! Input type `{type(v)}` is not `INTERNALERROR`")
103
+ else:
104
+ match += 1
105
+ # validate data type: QUOTAEXCEEDED
106
+ if not isinstance(v, QUOTAEXCEEDED):
107
+ error_messages.append(f"Error! Input type `{type(v)}` is not `QUOTAEXCEEDED`")
108
+ else:
109
+ match += 1
110
+ if match > 1:
111
+ # more than 1 match
112
+ raise ValueError("Multiple matches found when setting `actual_instance` in AnalyzeEmail403Response with oneOf schemas: FORBIDDEN, INTERNALERROR, INVALIDPLAN, INVALIDTOKEN, MALFORMEDREQUEST1, QUOTAEXCEEDED, TOOMANYREQUESTS. Details: " + ", ".join(error_messages))
113
+ elif match == 0:
114
+ # no match
115
+ raise ValueError("No match found when setting `actual_instance` in AnalyzeEmail403Response with oneOf schemas: FORBIDDEN, INTERNALERROR, INVALIDPLAN, INVALIDTOKEN, MALFORMEDREQUEST1, QUOTAEXCEEDED, TOOMANYREQUESTS. Details: " + ", ".join(error_messages))
116
+ else:
117
+ return v
118
+
119
+ @classmethod
120
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
121
+ return cls.from_json(json.dumps(obj))
122
+
123
+ @classmethod
124
+ def from_json(cls, json_str: str) -> Self:
125
+ """Returns the object represented by the json string"""
126
+ instance = cls.model_construct()
127
+ error_messages = []
128
+ match = 0
129
+
130
+ # deserialize data into MALFORMEDREQUEST1
131
+ try:
132
+ instance.actual_instance = MALFORMEDREQUEST1.from_json(json_str)
133
+ match += 1
134
+ except (ValidationError, ValueError) as e:
135
+ error_messages.append(str(e))
136
+ # deserialize data into INVALIDTOKEN
137
+ try:
138
+ instance.actual_instance = INVALIDTOKEN.from_json(json_str)
139
+ match += 1
140
+ except (ValidationError, ValueError) as e:
141
+ error_messages.append(str(e))
142
+ # deserialize data into INVALIDPLAN
143
+ try:
144
+ instance.actual_instance = INVALIDPLAN.from_json(json_str)
145
+ match += 1
146
+ except (ValidationError, ValueError) as e:
147
+ error_messages.append(str(e))
148
+ # deserialize data into FORBIDDEN
149
+ try:
150
+ instance.actual_instance = FORBIDDEN.from_json(json_str)
151
+ match += 1
152
+ except (ValidationError, ValueError) as e:
153
+ error_messages.append(str(e))
154
+ # deserialize data into TOOMANYREQUESTS
155
+ try:
156
+ instance.actual_instance = TOOMANYREQUESTS.from_json(json_str)
157
+ match += 1
158
+ except (ValidationError, ValueError) as e:
159
+ error_messages.append(str(e))
160
+ # deserialize data into INTERNALERROR
161
+ try:
162
+ instance.actual_instance = INTERNALERROR.from_json(json_str)
163
+ match += 1
164
+ except (ValidationError, ValueError) as e:
165
+ error_messages.append(str(e))
166
+ # deserialize data into QUOTAEXCEEDED
167
+ try:
168
+ instance.actual_instance = QUOTAEXCEEDED.from_json(json_str)
169
+ match += 1
170
+ except (ValidationError, ValueError) as e:
171
+ error_messages.append(str(e))
172
+
173
+ if match > 1:
174
+ # more than 1 match
175
+ raise ValueError("Multiple matches found when deserializing the JSON string into AnalyzeEmail403Response with oneOf schemas: FORBIDDEN, INTERNALERROR, INVALIDPLAN, INVALIDTOKEN, MALFORMEDREQUEST1, QUOTAEXCEEDED, TOOMANYREQUESTS. Details: " + ", ".join(error_messages))
176
+ elif match == 0:
177
+ # no match
178
+ raise ValueError("No match found when deserializing the JSON string into AnalyzeEmail403Response with oneOf schemas: FORBIDDEN, INTERNALERROR, INVALIDPLAN, INVALIDTOKEN, MALFORMEDREQUEST1, QUOTAEXCEEDED, TOOMANYREQUESTS. Details: " + ", ".join(error_messages))
179
+ else:
180
+ return instance
181
+
182
+ def to_json(self) -> str:
183
+ """Returns the JSON representation of the actual instance"""
184
+ if self.actual_instance is None:
185
+ return "null"
186
+
187
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
188
+ return self.actual_instance.to_json()
189
+ else:
190
+ return json.dumps(self.actual_instance)
191
+
192
+ def to_dict(self) -> Optional[Union[Dict[str, Any], FORBIDDEN, INTERNALERROR, INVALIDPLAN, INVALIDTOKEN, MALFORMEDREQUEST1, QUOTAEXCEEDED, TOOMANYREQUESTS]]:
193
+ """Returns the dict representation of the actual instance"""
194
+ if self.actual_instance is None:
195
+ return None
196
+
197
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
198
+ return self.actual_instance.to_dict()
199
+ else:
200
+ # primitive type
201
+ return self.actual_instance
202
+
203
+ def to_str(self) -> str:
204
+ """Returns the string representation of the actual instance"""
205
+ return pprint.pformat(self.model_dump())
206
+
207
+
@@ -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/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, 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 AnalyzeEmail500Response(BaseModel):
26
+ """
27
+ AnalyzeEmail500Response
28
+ """ # noqa: E501
29
+ error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
30
+ error_code: Optional[StrictStr] = Field(default=None, alias="errorCode")
31
+ __properties: ClassVar[List[str]] = ["errorMessage", "errorCode"]
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
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of AnalyzeEmail500Response 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
+ "errorMessage": obj.get("errorMessage"),
85
+ "errorCode": obj.get("errorCode")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Opportify Insights API
5
+
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool
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-driven risk analysis. Optional; defaults to `true`. ", alias="enableAI")
32
+ enable_auto_correction: Optional[StrictBool] = Field(default=None, description="Attempt typo correction and return `emailCorrection` when confident. Optional; defaults to `true`. ", alias="enableAutoCorrection")
33
+ enable_domain_enrichment: Optional[StrictBool] = Field(default=None, description="Include domain-level enrichment details. Optional; defaults to `true`. Set to `false` to omit the `domain` block even when the data exists. ", alias="enableDomainEnrichment")
34
+ __properties: ClassVar[List[str]] = ["email", "enableAI", "enableAutoCorrection", "enableDomainEnrichment"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of AnalyzeEmailRequest from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of AnalyzeEmailRequest 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
+ "email": obj.get("email"),
88
+ "enableAI": obj.get("enableAI"),
89
+ "enableAutoCorrection": obj.get("enableAutoCorrection"),
90
+ "enableDomainEnrichment": obj.get("enableDomainEnrichment")
91
+ })
92
+ return _obj
93
+
94
+
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Opportify Insights API
5
5
 
6
- ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, 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.
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -21,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.risk_report import RiskReport
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: RiskReport = Field(alias="riskReport")
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": RiskReport.from_dict(obj["riskReport"]) if obj.get("riskReport") is not None else None
123
+ "riskReport": RiskReportIp.from_dict(obj["riskReport"]) if obj.get("riskReport") is not None else None
124
124
  })
125
125
  return _obj
126
126
 
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Opportify Insights API
5
5
 
6
- ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, 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.
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -18,23 +18,23 @@ import pprint
18
18
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
19
19
  from typing import Any, List, Optional
20
20
  from openapi_client.models.ipvalidationfailed import IPVALIDATIONFAILED
21
- from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
21
+ from openapi_client.models.malformedrequest2 import MALFORMEDREQUEST2
22
22
  from pydantic import StrictStr, Field
23
23
  from typing import Union, List, Set, Optional, Dict
24
24
  from typing_extensions import Literal, Self
25
25
 
26
- ANALYZEIP400RESPONSEERROR_ONE_OF_SCHEMAS = ["IPVALIDATIONFAILED", "MALFORMEDREQUEST1"]
26
+ ANALYZEIP400RESPONSE_ONE_OF_SCHEMAS = ["IPVALIDATIONFAILED", "MALFORMEDREQUEST2"]
27
27
 
28
- class AnalyzeIp400ResponseError(BaseModel):
28
+ class AnalyzeIp400Response(BaseModel):
29
29
  """
30
- AnalyzeIp400ResponseError
30
+ AnalyzeIp400Response
31
31
  """
32
32
  # data type: IPVALIDATIONFAILED
33
33
  oneof_schema_1_validator: Optional[IPVALIDATIONFAILED] = None
34
- # data type: MALFORMEDREQUEST1
35
- oneof_schema_2_validator: Optional[MALFORMEDREQUEST1] = None
36
- actual_instance: Optional[Union[IPVALIDATIONFAILED, MALFORMEDREQUEST1]] = None
37
- one_of_schemas: Set[str] = { "IPVALIDATIONFAILED", "MALFORMEDREQUEST1" }
34
+ # data type: MALFORMEDREQUEST2
35
+ oneof_schema_2_validator: Optional[MALFORMEDREQUEST2] = None
36
+ actual_instance: Optional[Union[IPVALIDATIONFAILED, MALFORMEDREQUEST2]] = None
37
+ one_of_schemas: Set[str] = { "IPVALIDATIONFAILED", "MALFORMEDREQUEST2" }
38
38
 
39
39
  model_config = ConfigDict(
40
40
  validate_assignment=True,
@@ -54,7 +54,7 @@ class AnalyzeIp400ResponseError(BaseModel):
54
54
 
55
55
  @field_validator('actual_instance')
56
56
  def actual_instance_must_validate_oneof(cls, v):
57
- instance = AnalyzeIp400ResponseError.model_construct()
57
+ instance = AnalyzeIp400Response.model_construct()
58
58
  error_messages = []
59
59
  match = 0
60
60
  # validate data type: IPVALIDATIONFAILED
@@ -62,17 +62,17 @@ class AnalyzeIp400ResponseError(BaseModel):
62
62
  error_messages.append(f"Error! Input type `{type(v)}` is not `IPVALIDATIONFAILED`")
63
63
  else:
64
64
  match += 1
65
- # validate data type: MALFORMEDREQUEST1
66
- if not isinstance(v, MALFORMEDREQUEST1):
67
- error_messages.append(f"Error! Input type `{type(v)}` is not `MALFORMEDREQUEST1`")
65
+ # validate data type: MALFORMEDREQUEST2
66
+ if not isinstance(v, MALFORMEDREQUEST2):
67
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MALFORMEDREQUEST2`")
68
68
  else:
69
69
  match += 1
70
70
  if match > 1:
71
71
  # more than 1 match
72
- raise ValueError("Multiple matches found when setting `actual_instance` in AnalyzeIp400ResponseError with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST1. Details: " + ", ".join(error_messages))
72
+ raise ValueError("Multiple matches found when setting `actual_instance` in AnalyzeIp400Response with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST2. Details: " + ", ".join(error_messages))
73
73
  elif match == 0:
74
74
  # no match
75
- raise ValueError("No match found when setting `actual_instance` in AnalyzeIp400ResponseError with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST1. Details: " + ", ".join(error_messages))
75
+ raise ValueError("No match found when setting `actual_instance` in AnalyzeIp400Response with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST2. Details: " + ", ".join(error_messages))
76
76
  else:
77
77
  return v
78
78
 
@@ -93,19 +93,19 @@ class AnalyzeIp400ResponseError(BaseModel):
93
93
  match += 1
94
94
  except (ValidationError, ValueError) as e:
95
95
  error_messages.append(str(e))
96
- # deserialize data into MALFORMEDREQUEST1
96
+ # deserialize data into MALFORMEDREQUEST2
97
97
  try:
98
- instance.actual_instance = MALFORMEDREQUEST1.from_json(json_str)
98
+ instance.actual_instance = MALFORMEDREQUEST2.from_json(json_str)
99
99
  match += 1
100
100
  except (ValidationError, ValueError) as e:
101
101
  error_messages.append(str(e))
102
102
 
103
103
  if match > 1:
104
104
  # more than 1 match
105
- raise ValueError("Multiple matches found when deserializing the JSON string into AnalyzeIp400ResponseError with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST1. Details: " + ", ".join(error_messages))
105
+ raise ValueError("Multiple matches found when deserializing the JSON string into AnalyzeIp400Response with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST2. Details: " + ", ".join(error_messages))
106
106
  elif match == 0:
107
107
  # no match
108
- raise ValueError("No match found when deserializing the JSON string into AnalyzeIp400ResponseError with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST1. Details: " + ", ".join(error_messages))
108
+ raise ValueError("No match found when deserializing the JSON string into AnalyzeIp400Response with oneOf schemas: IPVALIDATIONFAILED, MALFORMEDREQUEST2. Details: " + ", ".join(error_messages))
109
109
  else:
110
110
  return instance
111
111
 
@@ -119,7 +119,7 @@ class AnalyzeIp400ResponseError(BaseModel):
119
119
  else:
120
120
  return json.dumps(self.actual_instance)
121
121
 
122
- def to_dict(self) -> Optional[Union[Dict[str, Any], IPVALIDATIONFAILED, MALFORMEDREQUEST1]]:
122
+ def to_dict(self) -> Optional[Union[Dict[str, Any], IPVALIDATIONFAILED, MALFORMEDREQUEST2]]:
123
123
  """Returns the dict representation of the actual instance"""
124
124
  if self.actual_instance is None:
125
125
  return None