cloudmersive-phishing-detection-api-client 2.2.1 → 2.2.3

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -4
  3. data/docs/AdvancedEmailDetectionRequest.md +2 -1
  4. data/docs/AdvancedUrlDetectionRequest.md +9 -0
  5. data/docs/PhishingDetectionAdvancedRequest.md +15 -0
  6. data/docs/PhishingDetectionAdvancedResponse.md +8 -1
  7. data/docs/PhishingDetectionApi.md +110 -0
  8. data/docs/PhishingDetectionTextStringRequest.md +10 -0
  9. data/docs/PhishingDetectionTextStringResponse.md +10 -0
  10. data/docs/PhishingDetectionUrlAdvancedResponse.md +15 -0
  11. data/docs/UnsafeUrlResult.md +12 -0
  12. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_detection_api.rb +99 -0
  13. data/lib/cloudmersive-phishing-detection-api-client/models/advanced_email_detection_request.rb +12 -1
  14. data/lib/cloudmersive-phishing-detection-api-client/models/advanced_url_detection_request.rb +196 -0
  15. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_request.rb +154 -4
  16. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_advanced_response.rb +83 -11
  17. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_text_string_request.rb +206 -0
  18. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_text_string_response.rb +206 -0
  19. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_detection_url_advanced_response.rb +256 -0
  20. data/lib/cloudmersive-phishing-detection-api-client/models/unsafe_url_result.rb +226 -0
  21. data/lib/cloudmersive-phishing-detection-api-client/version.rb +1 -1
  22. data/lib/cloudmersive-phishing-detection-api-client.rb +5 -0
  23. data/spec/api/phishing_detection_api_spec.rb +23 -0
  24. data/spec/models/advanced_email_detection_request_spec.rb +6 -0
  25. data/spec/models/advanced_url_detection_request_spec.rb +47 -0
  26. data/spec/models/phishing_detection_advanced_request_spec.rb +90 -0
  27. data/spec/models/phishing_detection_advanced_response_spec.rb +43 -1
  28. data/spec/models/phishing_detection_text_string_request_spec.rb +53 -0
  29. data/spec/models/phishing_detection_text_string_response_spec.rb +53 -0
  30. data/spec/models/phishing_detection_url_advanced_response_spec.rb +83 -0
  31. data/spec/models/unsafe_url_result_spec.rb +65 -0
  32. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65747f90d512cab686795b33bc37eb8e7a0049da707291605d9069a31ce71e85
4
- data.tar.gz: 948d142f3693b5b9587b90522b09f16177db24e5f016ce89dea97515c01d537e
3
+ metadata.gz: '0914deac554fb10ebcb51c0ccbfb8f6fd883811dad78e9722e9da05e8e098dee'
4
+ data.tar.gz: bb85570269976f3d0675d4f8617854ccb667b314f95a0e9adac3a6ebbe0818fd
5
5
  SHA512:
6
- metadata.gz: 03d817eb09b2d9ea6b0a788fbfe62c256059a83a197059f028b8e21cf1c42f03bd493d1ebdb5706e102a2957da7d7eac5bb89ba3ce3b44bbeeade1f7b696ed5e
7
- data.tar.gz: 8c2ba82aaa6976808eba44ba20c58196215e3f0983fd1b0787bdbad3e31cad25eb89b0ba5004194fd4f43e00c17dd9eacba22af142e0d569e1a4ea86ac4bae1a
6
+ metadata.gz: 152942bf4642a422f14390985b0cb60995f7925bd6796423c27e339fa35ba7fdecffc024d46e28ab001594a9f478e553cabee2f241d094fe1b352a3ac18e035a
7
+ data.tar.gz: c5ff1a5cb28235ecdbb45bd09b2b0ce57c3f246b78a8f3b85e4965d608a0f6a55084965121acf807bfb6b8cc06d0d19ab626ed24b4459b01bde122de2ccef783
data/README.md CHANGED
@@ -7,7 +7,7 @@ Easily and directly scan and block phishing security threats in input.
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 2.2.1
10
+ - Package version: 2.2.3
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-phishing-detection-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-phishing-detection-api-client-2.2.1.gem
26
+ gem install ./cloudmersive-phishing-detection-api-client-2.2.3.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.1.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.3.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-phishing-detection-api-client', '~> 2.2.1'
34
+ gem 'cloudmersive-phishing-detection-api-client', '~> 2.2.3'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -88,15 +88,22 @@ Class | Method | HTTP request | Description
88
88
  *CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_file_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_file_advanced_post) | **POST** /phishing/detect/file/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
89
89
  *CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_file_post**](docs/PhishingDetectionApi.md#phishing_detect_file_post) | **POST** /phishing/detect/file | Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
90
90
  *CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_text_string_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_text_string_advanced_post) | **POST** /phishing/detect/text-string/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
91
+ *CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_text_string_post**](docs/PhishingDetectionApi.md#phishing_detect_text_string_post) | **POST** /phishing/detect/text-string | Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
92
+ *CloudmersivePhishingDetectionApiClient::PhishingDetectionApi* | [**phishing_detect_url_advanced_post**](docs/PhishingDetectionApi.md#phishing_detect_url_advanced_post) | **POST** /phishing/detect/url/advanced | Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
91
93
 
92
94
 
93
95
  ## Documentation for Models
94
96
 
95
97
  - [CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest](docs/AdvancedEmailDetectionRequest.md)
98
+ - [CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest](docs/AdvancedUrlDetectionRequest.md)
96
99
  - [CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedRequest](docs/PhishingDetectionAdvancedRequest.md)
97
100
  - [CloudmersivePhishingDetectionApiClient::PhishingDetectionAdvancedResponse](docs/PhishingDetectionAdvancedResponse.md)
98
101
  - [CloudmersivePhishingDetectionApiClient::PhishingDetectionEmailAdvancedResponse](docs/PhishingDetectionEmailAdvancedResponse.md)
99
102
  - [CloudmersivePhishingDetectionApiClient::PhishingDetectionResponse](docs/PhishingDetectionResponse.md)
103
+ - [CloudmersivePhishingDetectionApiClient::PhishingDetectionTextStringRequest](docs/PhishingDetectionTextStringRequest.md)
104
+ - [CloudmersivePhishingDetectionApiClient::PhishingDetectionTextStringResponse](docs/PhishingDetectionTextStringResponse.md)
105
+ - [CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse](docs/PhishingDetectionUrlAdvancedResponse.md)
106
+ - [CloudmersivePhishingDetectionApiClient::UnsafeUrlResult](docs/UnsafeUrlResult.md)
100
107
 
101
108
 
102
109
  ## Documentation for Authorization
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **html_body** | **String** | Body of the email in HTML, or text | [optional]
10
10
  **allow_low_reputation_senders** | **BOOLEAN** | Allow email from low reputation senders and domains | [optional]
11
11
  **allow_sanctioned** | **BOOLEAN** | True to allow sanctioned countries and certain known sanctioned entities, false otherwise (default) | [optional]
12
- **input_email_file** | **String** | | [optional]
12
+ **custom_policy_id** | **String** | Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
13
+ **input_email_file** | **String** | Optional: Input email file bytes (EML, PDF, etc.). If not provided, HtmlBody will be used instead. | [optional]
13
14
 
14
15
 
@@ -0,0 +1,9 @@
1
+ # CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | URL to check for phishing | [optional]
7
+ **custom_policy_id** | **String** | Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
8
+
9
+
@@ -4,6 +4,21 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **input_string** | **String** | Input text string to detect phishing against | [optional]
7
+ **text_type** | **String** | Optional: Type of text being analyzed. Must be one of: \"TextMessage\", \"UserMessage\", \"SalesLead\", \"EmailMessage\", \"SupportCase\", \"AppMessage\", \"Other\". | [optional]
7
8
  **model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
9
+ **allow_unsolicited_sales** | **BOOLEAN** | Optional: True if unsolicited sales should be allowed, false otherwise. Defaults to true. | [optional]
10
+ **allow_promotional_content** | **BOOLEAN** | Optional: True if promotional content should be allowed, false otherwise. Defaults to true. | [optional]
11
+ **allow_web_urls** | **BOOLEAN** | Optional: True if web URLs should be allowed in the input text, false otherwise. Defaults to true. When false, input containing URLs (including homoglyph URLs and spaced-out URLs) will be flagged as not clean. | [optional]
12
+ **allow_phone_numbers** | **BOOLEAN** | Optional: True if phone numbers should be allowed in the input text, false otherwise. Defaults to true. When false, input containing phone numbers (including homoglyph digits and spaced-out or spelled-out workarounds) will be flagged as not clean. | [optional]
13
+ **allow_email_addresses** | **BOOLEAN** | Optional: True if email addresses should be allowed in the input text, false otherwise. Defaults to true. When false, input containing email addresses (including homoglyph characters and obfuscated workarounds like \"danny at somedomaine [DOT] com\") will be flagged as not clean. | [optional]
14
+ **provide_url_analysis** | **BOOLEAN** | Optional: True to perform deep URL analysis on any URLs detected in the text. When enabled, if the initial AI scan detects URLs, a second AI call enumerates them and each URL is individually analyzed for phishing. Defaults to true. | [optional]
15
+ **custom_policy_id** | **String** | Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
16
+ **provide_analysis_rationale** | **BOOLEAN** | Optional: Set to true to include an analysis rationale in the response explaining why the content was or was not flagged. Default is true. | [optional]
17
+ **from_name** | **String** | Optional: Name of the sender | [optional]
18
+ **to_name** | **String** | Optional: Name of the recipient | [optional]
19
+ **from_phone_number** | **String** | Optional: Phone number of the sender | [optional]
20
+ **to_phone_number** | **String** | Optional: Phone number of the recipient | [optional]
21
+ **from_email_address** | **String** | Optional: Email address of the sender | [optional]
22
+ **to_email_address** | **String** | Optional: Email address of the recipient | [optional]
8
23
 
9
24
 
@@ -4,7 +4,14 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
7
- **phishing_risk_level** | **Float** | Overall phishing risk level between 0.0 and 1.0 | [optional]
7
+ **contains_phishing** | **BOOLEAN** | True if the input text contains a phishing attempt, false otherwise | [optional]
8
+ **contains_unsolicited_sales** | **BOOLEAN** | True if the input text contains unsolicited sales, false otherwise | [optional]
9
+ **contains_promotional_content** | **BOOLEAN** | True if the input text contains promotional content, false otherwise | [optional]
10
+ **contains_web_urls** | **BOOLEAN** | True if the input text contains web URLs, including homoglyph URLs and spaced-out URL workarounds | [optional]
11
+ **contains_phone_numbers** | **BOOLEAN** | True if the input text contains phone numbers, including homoglyph digits and spaced-out or spelled-out workarounds | [optional]
12
+ **contains_email_addresses** | **BOOLEAN** | True if the input text contains email addresses, including homoglyph characters and obfuscated workarounds | [optional]
13
+ **confidence_level** | **Float** | Confidence level between 0.0 and 1.0 where values over 0.9 indicate high confidence | [optional]
8
14
  **analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
15
+ **unsafe_urls** | [**Array<UnsafeUrlResult>**](UnsafeUrlResult.md) | URLs detected in the input text that were analyzed and found to be unsafe. Only populated when ProvideUrlAnalysis is true and URLs are detected. | [optional]
9
16
 
10
17
 
@@ -8,6 +8,8 @@ Method | HTTP request | Description
8
8
  [**phishing_detect_file_advanced_post**](PhishingDetectionApi.md#phishing_detect_file_advanced_post) | **POST** /phishing/detect/file/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
9
9
  [**phishing_detect_file_post**](PhishingDetectionApi.md#phishing_detect_file_post) | **POST** /phishing/detect/file | Perform AI phishing detection and classification on an input image or document (PDF or DOCX). Analyzes input content as well as embedded URLs with AI deep learnign to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
10
10
  [**phishing_detect_text_string_advanced_post**](PhishingDetectionApi.md#phishing_detect_text_string_advanced_post) | **POST** /phishing/detect/text-string/advanced | Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
11
+ [**phishing_detect_text_string_post**](PhishingDetectionApi.md#phishing_detect_text_string_post) | **POST** /phishing/detect/text-string | Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
12
+ [**phishing_detect_url_advanced_post**](PhishingDetectionApi.md#phishing_detect_url_advanced_post) | **POST** /phishing/detect/url/advanced | Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
11
13
 
12
14
 
13
15
  # **phishing_detect_email_advanced_post**
@@ -84,6 +86,7 @@ api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
84
86
 
85
87
  opts = {
86
88
  model: 'Advanced', # String |
89
+ custom_policy_id: 'custom_policy_id_example', # String |
87
90
  input_file: File.new('/path/to/file.txt') # File |
88
91
  }
89
92
 
@@ -101,6 +104,7 @@ end
101
104
  Name | Type | Description | Notes
102
105
  ------------- | ------------- | ------------- | -------------
103
106
  **model** | **String**| | [optional] [default to Advanced]
107
+ **custom_policy_id** | **String**| | [optional]
104
108
  **input_file** | **File**| | [optional]
105
109
 
106
110
  ### Return type
@@ -226,3 +230,109 @@ Name | Type | Description | Notes
226
230
 
227
231
 
228
232
 
233
+ # **phishing_detect_text_string_post**
234
+ > PhishingDetectionTextStringResponse phishing_detect_text_string_post(opts)
235
+
236
+ Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
237
+
238
+ ### Example
239
+ ```ruby
240
+ # load the gem
241
+ require 'cloudmersive-phishing-detection-api-client'
242
+ # setup authorization
243
+ CloudmersivePhishingDetectionApiClient.configure do |config|
244
+ # Configure API key authorization: Apikey
245
+ config.api_key['Apikey'] = 'YOUR API KEY'
246
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
247
+ #config.api_key_prefix['Apikey'] = 'Bearer'
248
+ end
249
+
250
+ api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
251
+
252
+ opts = {
253
+ body: CloudmersivePhishingDetectionApiClient::PhishingDetectionTextStringRequest.new # PhishingDetectionTextStringRequest | Phishing detection request
254
+ }
255
+
256
+ begin
257
+ #Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
258
+ result = api_instance.phishing_detect_text_string_post(opts)
259
+ p result
260
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
261
+ puts "Exception when calling PhishingDetectionApi->phishing_detect_text_string_post: #{e}"
262
+ end
263
+ ```
264
+
265
+ ### Parameters
266
+
267
+ Name | Type | Description | Notes
268
+ ------------- | ------------- | ------------- | -------------
269
+ **body** | [**PhishingDetectionTextStringRequest**](PhishingDetectionTextStringRequest.md)| Phishing detection request | [optional]
270
+
271
+ ### Return type
272
+
273
+ [**PhishingDetectionTextStringResponse**](PhishingDetectionTextStringResponse.md)
274
+
275
+ ### Authorization
276
+
277
+ [Apikey](../README.md#Apikey)
278
+
279
+ ### HTTP request headers
280
+
281
+ - **Content-Type**: application/json, text/json, application/*+json
282
+ - **Accept**: text/plain, application/json, text/json
283
+
284
+
285
+
286
+ # **phishing_detect_url_advanced_post**
287
+ > PhishingDetectionUrlAdvancedResponse phishing_detect_url_advanced_post(opts)
288
+
289
+ Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
290
+
291
+ ### Example
292
+ ```ruby
293
+ # load the gem
294
+ require 'cloudmersive-phishing-detection-api-client'
295
+ # setup authorization
296
+ CloudmersivePhishingDetectionApiClient.configure do |config|
297
+ # Configure API key authorization: Apikey
298
+ config.api_key['Apikey'] = 'YOUR API KEY'
299
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
300
+ #config.api_key_prefix['Apikey'] = 'Bearer'
301
+ end
302
+
303
+ api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new
304
+
305
+ opts = {
306
+ body: CloudmersivePhishingDetectionApiClient::AdvancedUrlDetectionRequest.new # AdvancedUrlDetectionRequest | URL phishing detection request
307
+ }
308
+
309
+ begin
310
+ #Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
311
+ result = api_instance.phishing_detect_url_advanced_post(opts)
312
+ p result
313
+ rescue CloudmersivePhishingDetectionApiClient::ApiError => e
314
+ puts "Exception when calling PhishingDetectionApi->phishing_detect_url_advanced_post: #{e}"
315
+ end
316
+ ```
317
+
318
+ ### Parameters
319
+
320
+ Name | Type | Description | Notes
321
+ ------------- | ------------- | ------------- | -------------
322
+ **body** | [**AdvancedUrlDetectionRequest**](AdvancedUrlDetectionRequest.md)| URL phishing detection request | [optional]
323
+
324
+ ### Return type
325
+
326
+ [**PhishingDetectionUrlAdvancedResponse**](PhishingDetectionUrlAdvancedResponse.md)
327
+
328
+ ### Authorization
329
+
330
+ [Apikey](../README.md#Apikey)
331
+
332
+ ### HTTP request headers
333
+
334
+ - **Content-Type**: application/json, text/json, application/*+json
335
+ - **Accept**: text/plain, application/json, text/json
336
+
337
+
338
+
@@ -0,0 +1,10 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingDetectionTextStringRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_string** | **String** | Input text string to detect phishing against | [optional]
7
+ **model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
8
+ **provide_analysis_rationale** | **BOOLEAN** | Optional: Set to true to include an analysis rationale in the response explaining why the content was or was not flagged. Default is true. | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingDetectionTextStringResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
7
+ **confidence_level** | **Float** | Confidence level between 0.0 and 1.0 where values over 0.9 indicate high confidence | [optional]
8
+ **analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
9
+
10
+
@@ -0,0 +1,15 @@
1
+ # CloudmersivePhishingDetectionApiClient::PhishingDetectionUrlAdvancedResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
7
+ **phishing_risk_level** | **Float** | Overall phishing risk level between 0.0 and 1.0 | [optional]
8
+ **is_ssrf_threat** | **BOOLEAN** | True if the URL is an SSRF threat | [optional]
9
+ **contains_phishing** | **BOOLEAN** | True if the URL contains phishing threat risks, false otherwise | [optional]
10
+ **contains_unsolicited_sales** | **BOOLEAN** | True if the URL contains unsolicited sales, false otherwise | [optional]
11
+ **contains_promotional_content** | **BOOLEAN** | True if the URL contains promotional content, false otherwise | [optional]
12
+ **contains_phishing_attempt** | **BOOLEAN** | True if the URL contains a phishing attempt, false otherwise | [optional]
13
+ **analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
14
+
15
+
@@ -0,0 +1,12 @@
1
+ # CloudmersivePhishingDetectionApiClient::UnsafeUrlResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | The URL that was detected and analyzed | [optional]
7
+ **clean_result** | **BOOLEAN** | True if the result is not phishing (clean), and false otherwise | [optional]
8
+ **is_ssrf_threat** | **BOOLEAN** | True if the URL is an SSRF threat | [optional]
9
+ **contains_phishing** | **BOOLEAN** | True if the URL contains phishing threat risks, false otherwise | [optional]
10
+ **contains_phishing_attempt** | **BOOLEAN** | True if the URL contains a phishing attempt, false otherwise | [optional]
11
+
12
+
@@ -70,6 +70,7 @@ module CloudmersivePhishingDetectionApiClient
70
70
  # Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
71
71
  # @param [Hash] opts the optional parameters
72
72
  # @option opts [String] :model (default to Advanced)
73
+ # @option opts [String] :custom_policy_id
73
74
  # @option opts [File] :input_file
74
75
  # @return [PhishingDetectionAdvancedResponse]
75
76
  def phishing_detect_file_advanced_post(opts = {})
@@ -80,6 +81,7 @@ module CloudmersivePhishingDetectionApiClient
80
81
  # Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
81
82
  # @param [Hash] opts the optional parameters
82
83
  # @option opts [String] :model
84
+ # @option opts [String] :custom_policy_id
83
85
  # @option opts [File] :input_file
84
86
  # @return [Array<(PhishingDetectionAdvancedResponse, Fixnum, Hash)>] PhishingDetectionAdvancedResponse data, response status code and response headers
85
87
  def phishing_detect_file_advanced_post_with_http_info(opts = {})
@@ -99,6 +101,7 @@ module CloudmersivePhishingDetectionApiClient
99
101
  # HTTP header 'Content-Type'
100
102
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
101
103
  header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
104
+ header_params[:'customPolicyId'] = opts[:'custom_policy_id'] if !opts[:'custom_policy_id'].nil?
102
105
 
103
106
  # form parameters
104
107
  form_params = {}
@@ -219,5 +222,101 @@ module CloudmersivePhishingDetectionApiClient
219
222
  end
220
223
  return data, status_code, headers
221
224
  end
225
+ # Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
226
+ # @param [Hash] opts the optional parameters
227
+ # @option opts [PhishingDetectionTextStringRequest] :body Phishing detection request
228
+ # @return [PhishingDetectionTextStringResponse]
229
+ def phishing_detect_text_string_post(opts = {})
230
+ data, _status_code, _headers = phishing_detect_text_string_post_with_http_info(opts)
231
+ data
232
+ end
233
+
234
+ # Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
235
+ # @param [Hash] opts the optional parameters
236
+ # @option opts [PhishingDetectionTextStringRequest] :body Phishing detection request
237
+ # @return [Array<(PhishingDetectionTextStringResponse, Fixnum, Hash)>] PhishingDetectionTextStringResponse data, response status code and response headers
238
+ def phishing_detect_text_string_post_with_http_info(opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_text_string_post ...'
241
+ end
242
+ # resource path
243
+ local_var_path = '/phishing/detect/text-string'
244
+
245
+ # query parameters
246
+ query_params = {}
247
+
248
+ # header parameters
249
+ header_params = {}
250
+ # HTTP header 'Accept' (if needed)
251
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
252
+ # HTTP header 'Content-Type'
253
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
254
+
255
+ # form parameters
256
+ form_params = {}
257
+
258
+ # http body (model)
259
+ post_body = @api_client.object_to_http_body(opts[:'body'])
260
+ auth_names = ['Apikey']
261
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
262
+ :header_params => header_params,
263
+ :query_params => query_params,
264
+ :form_params => form_params,
265
+ :body => post_body,
266
+ :auth_names => auth_names,
267
+ :return_type => 'PhishingDetectionTextStringResponse')
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_text_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+ # Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [AdvancedUrlDetectionRequest] :body URL phishing detection request
276
+ # @return [PhishingDetectionUrlAdvancedResponse]
277
+ def phishing_detect_url_advanced_post(opts = {})
278
+ data, _status_code, _headers = phishing_detect_url_advanced_post_with_http_info(opts)
279
+ data
280
+ end
281
+
282
+ # Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.
283
+ # @param [Hash] opts the optional parameters
284
+ # @option opts [AdvancedUrlDetectionRequest] :body URL phishing detection request
285
+ # @return [Array<(PhishingDetectionUrlAdvancedResponse, Fixnum, Hash)>] PhishingDetectionUrlAdvancedResponse data, response status code and response headers
286
+ def phishing_detect_url_advanced_post_with_http_info(opts = {})
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug 'Calling API: PhishingDetectionApi.phishing_detect_url_advanced_post ...'
289
+ end
290
+ # resource path
291
+ local_var_path = '/phishing/detect/url/advanced'
292
+
293
+ # query parameters
294
+ query_params = {}
295
+
296
+ # header parameters
297
+ header_params = {}
298
+ # HTTP header 'Accept' (if needed)
299
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
300
+ # HTTP header 'Content-Type'
301
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
302
+
303
+ # form parameters
304
+ form_params = {}
305
+
306
+ # http body (model)
307
+ post_body = @api_client.object_to_http_body(opts[:'body'])
308
+ auth_names = ['Apikey']
309
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
310
+ :header_params => header_params,
311
+ :query_params => query_params,
312
+ :form_params => form_params,
313
+ :body => post_body,
314
+ :auth_names => auth_names,
315
+ :return_type => 'PhishingDetectionUrlAdvancedResponse')
316
+ if @api_client.config.debugging
317
+ @api_client.config.logger.debug "API called: PhishingDetectionApi#phishing_detect_url_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
318
+ end
319
+ return data, status_code, headers
320
+ end
222
321
  end
223
322
  end
@@ -33,6 +33,10 @@ module CloudmersivePhishingDetectionApiClient
33
33
  # True to allow sanctioned countries and certain known sanctioned entities, false otherwise (default)
34
34
  attr_accessor :allow_sanctioned
35
35
 
36
+ # Apply a Custom Policy for Phishing Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
37
+ attr_accessor :custom_policy_id
38
+
39
+ # Optional: Input email file bytes (EML, PDF, etc.). If not provided, HtmlBody will be used instead.
36
40
  attr_accessor :input_email_file
37
41
 
38
42
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -44,6 +48,7 @@ module CloudmersivePhishingDetectionApiClient
44
48
  :'html_body' => :'HtmlBody',
45
49
  :'allow_low_reputation_senders' => :'AllowLowReputationSenders',
46
50
  :'allow_sanctioned' => :'AllowSanctioned',
51
+ :'custom_policy_id' => :'CustomPolicyID',
47
52
  :'input_email_file' => :'InputEmailFile'
48
53
  }
49
54
  end
@@ -57,6 +62,7 @@ module CloudmersivePhishingDetectionApiClient
57
62
  :'html_body' => :'String',
58
63
  :'allow_low_reputation_senders' => :'BOOLEAN',
59
64
  :'allow_sanctioned' => :'BOOLEAN',
65
+ :'custom_policy_id' => :'String',
60
66
  :'input_email_file' => :'String'
61
67
  }
62
68
  end
@@ -93,6 +99,10 @@ module CloudmersivePhishingDetectionApiClient
93
99
  self.allow_sanctioned = attributes[:'AllowSanctioned']
94
100
  end
95
101
 
102
+ if attributes.has_key?(:'CustomPolicyID')
103
+ self.custom_policy_id = attributes[:'CustomPolicyID']
104
+ end
105
+
96
106
  if attributes.has_key?(:'InputEmailFile')
97
107
  self.input_email_file = attributes[:'InputEmailFile']
98
108
  end
@@ -137,6 +147,7 @@ module CloudmersivePhishingDetectionApiClient
137
147
  html_body == o.html_body &&
138
148
  allow_low_reputation_senders == o.allow_low_reputation_senders &&
139
149
  allow_sanctioned == o.allow_sanctioned &&
150
+ custom_policy_id == o.custom_policy_id &&
140
151
  input_email_file == o.input_email_file
141
152
  end
142
153
 
@@ -149,7 +160,7 @@ module CloudmersivePhishingDetectionApiClient
149
160
  # Calculates hash code according to all attributes.
150
161
  # @return [Fixnum] Hash code
151
162
  def hash
152
- [from_email_address, to_email_address, subject, html_body, allow_low_reputation_senders, allow_sanctioned, input_email_file].hash
163
+ [from_email_address, to_email_address, subject, html_body, allow_low_reputation_senders, allow_sanctioned, custom_policy_id, input_email_file].hash
153
164
  end
154
165
 
155
166
  # Builds the object from hash