emailguard_sdk 1.0.4 → 1.1.0
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.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +16 -2
- data/examples/detect-email.rb +5 -0
- data/examples/get-billing-usage.rb +5 -0
- data/examples/get-team.rb +5 -0
- data/examples/list-notification-channels.rb +5 -0
- data/examples/list-pending-team-invites.rb +5 -0
- data/lib/emailguard_sdk/api/billing_api.rb +7 -7
- data/lib/emailguard_sdk/api/channels_api.rb +105 -105
- data/lib/emailguard_sdk/api/email_api.rb +9 -9
- data/lib/emailguard_sdk/api/events_api.rb +7 -7
- data/lib/emailguard_sdk/api/invites_api.rb +60 -60
- data/lib/emailguard_sdk/api/members_api.rb +27 -27
- data/lib/emailguard_sdk/api/rules_api.rb +71 -71
- data/lib/emailguard_sdk/api/teams_api.rb +14 -14
- data/lib/emailguard_sdk/api_client.rb +1 -1
- data/lib/emailguard_sdk/api_error.rb +1 -1
- data/lib/emailguard_sdk/api_model_base.rb +1 -1
- data/lib/emailguard_sdk/configuration.rb +3 -3
- data/lib/emailguard_sdk/facade.rb +191 -0
- data/lib/emailguard_sdk/models/base_response.rb +3 -3
- data/lib/emailguard_sdk/models/billing_usage_event.rb +1 -1
- data/lib/emailguard_sdk/models/billing_usage_item.rb +1 -1
- data/lib/emailguard_sdk/models/billing_usage_response.rb +3 -3
- data/lib/emailguard_sdk/models/create_notification_channel_input.rb +1 -1
- data/lib/emailguard_sdk/models/create_notification_rule_input.rb +1 -1
- data/lib/emailguard_sdk/models/email_detect_data.rb +21 -2
- data/lib/emailguard_sdk/models/email_detect_evidence.rb +165 -0
- data/lib/emailguard_sdk/models/email_detect_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_channel_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_channels_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_events_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_rules_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_public_team_response.rb +3 -3
- data/lib/emailguard_sdk/models/id_data_response.rb +3 -3
- data/lib/emailguard_sdk/models/id_data_struct.rb +1 -1
- data/lib/emailguard_sdk/models/invite_team_member_input.rb +1 -1
- data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +3 -3
- data/lib/emailguard_sdk/models/list_public_team_members_response.rb +3 -3
- data/lib/emailguard_sdk/models/message_response.rb +3 -3
- data/lib/emailguard_sdk/models/notification_channel_response.rb +1 -1
- data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +1 -1
- data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +1 -1
- data/lib/emailguard_sdk/models/notification_rule_response.rb +1 -1
- data/lib/emailguard_sdk/models/public_team_invite_response.rb +1 -1
- data/lib/emailguard_sdk/models/public_team_member_response.rb +1 -1
- data/lib/emailguard_sdk/models/public_team_response.rb +1 -1
- data/lib/emailguard_sdk/models/{update_team_member_input.rb → public_update_team_member_input.rb} +5 -32
- data/lib/emailguard_sdk/models/update_notification_channel_input.rb +1 -1
- data/lib/emailguard_sdk/models/update_notification_rule_input.rb +1 -1
- data/lib/emailguard_sdk/models/update_team_input.rb +1 -1
- data/lib/emailguard_sdk/version.rb +2 -2
- data/lib/emailguard_sdk.rb +4 -2
- data/spec/facade_contract_spec.rb +340 -0
- data/spec/spec_helper.rb +1 -111
- metadata +15 -123
- data/Gemfile +0 -9
- data/Rakefile +0 -10
- data/docs/BaseResponse.md +0 -20
- data/docs/BillingApi.md +0 -85
- data/docs/BillingUsageEvent.md +0 -26
- data/docs/BillingUsageItem.md +0 -28
- data/docs/BillingUsageResponse.md +0 -22
- data/docs/ChannelsApi.md +0 -366
- data/docs/CreateNotificationChannelInput.md +0 -22
- data/docs/CreateNotificationRuleInput.md +0 -28
- data/docs/EmailApi.md +0 -72
- data/docs/EmailDetectData.md +0 -44
- data/docs/EmailDetectResponse.md +0 -22
- data/docs/EventsApi.md +0 -76
- data/docs/GetNotificationChannelResponse.md +0 -22
- data/docs/GetNotificationChannelsResponse.md +0 -22
- data/docs/GetNotificationEventsResponse.md +0 -22
- data/docs/GetNotificationRulesResponse.md +0 -22
- data/docs/GetPublicTeamResponse.md +0 -22
- data/docs/IdDataResponse.md +0 -22
- data/docs/IdDataStruct.md +0 -18
- data/docs/InviteTeamMemberInput.md +0 -20
- data/docs/InvitesApi.md +0 -220
- data/docs/ListPublicTeamInvitesResponse.md +0 -22
- data/docs/ListPublicTeamMembersResponse.md +0 -22
- data/docs/MembersApi.md +0 -222
- data/docs/MessageResponse.md +0 -20
- data/docs/NotificationChannelResponse.md +0 -28
- data/docs/NotificationRuleChannelInput.md +0 -22
- data/docs/NotificationRuleChannelResponse.md +0 -28
- data/docs/NotificationRuleResponse.md +0 -32
- data/docs/PublicTeamInviteResponse.md +0 -24
- data/docs/PublicTeamMemberResponse.md +0 -34
- data/docs/PublicTeamResponse.md +0 -28
- data/docs/RulesApi.md +0 -294
- data/docs/TeamsApi.md +0 -148
- data/docs/UpdateNotificationChannelInput.md +0 -20
- data/docs/UpdateNotificationRuleInput.md +0 -28
- data/docs/UpdateTeamInput.md +0 -24
- data/docs/UpdateTeamMemberInput.md +0 -22
- data/emailguard_sdk.gemspec +0 -44
- data/git_push.sh +0 -57
- data/spec/api/billing_api_spec.rb +0 -49
- data/spec/api/channels_api_spec.rb +0 -95
- data/spec/api/email_api_spec.rb +0 -47
- data/spec/api/events_api_spec.rb +0 -46
- data/spec/api/invites_api_spec.rb +0 -70
- data/spec/api/members_api_spec.rb +0 -71
- data/spec/api/rules_api_spec.rb +0 -83
- data/spec/api/teams_api_spec.rb +0 -58
- data/spec/models/base_response_spec.rb +0 -42
- data/spec/models/billing_usage_event_spec.rb +0 -60
- data/spec/models/billing_usage_item_spec.rb +0 -66
- data/spec/models/billing_usage_response_spec.rb +0 -48
- data/spec/models/create_notification_channel_input_spec.rb +0 -48
- data/spec/models/create_notification_rule_input_spec.rb +0 -66
- data/spec/models/email_detect_data_spec.rb +0 -114
- data/spec/models/email_detect_response_spec.rb +0 -48
- data/spec/models/get_notification_channel_response_spec.rb +0 -48
- data/spec/models/get_notification_channels_response_spec.rb +0 -48
- data/spec/models/get_notification_events_response_spec.rb +0 -48
- data/spec/models/get_notification_rules_response_spec.rb +0 -48
- data/spec/models/get_public_team_response_spec.rb +0 -48
- data/spec/models/id_data_response_spec.rb +0 -48
- data/spec/models/id_data_struct_spec.rb +0 -36
- data/spec/models/invite_team_member_input_spec.rb +0 -42
- data/spec/models/list_public_team_invites_response_spec.rb +0 -48
- data/spec/models/list_public_team_members_response_spec.rb +0 -48
- data/spec/models/message_response_spec.rb +0 -42
- data/spec/models/notification_channel_response_spec.rb +0 -66
- data/spec/models/notification_rule_channel_input_spec.rb +0 -48
- data/spec/models/notification_rule_channel_response_spec.rb +0 -66
- data/spec/models/notification_rule_response_spec.rb +0 -78
- data/spec/models/public_team_invite_response_spec.rb +0 -54
- data/spec/models/public_team_member_response_spec.rb +0 -84
- data/spec/models/public_team_response_spec.rb +0 -66
- data/spec/models/update_notification_channel_input_spec.rb +0 -42
- data/spec/models/update_notification_rule_input_spec.rb +0 -66
- data/spec/models/update_team_input_spec.rb +0 -54
- data/spec/models/update_team_member_input_spec.rb +0 -48
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 422f67385b6fde4358c82aad56d5419cffd9141beabadfee428f294c93686641
|
|
4
|
+
data.tar.gz: 7479209427886c1dcad84fbc7c8fa1c09145eb0444f345ae27fc7a5befc47a2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '033683f1d5a8eac7561d8450c143037a2408d6775d2d3345768dc2f14e40ffa6e4814e6b9a91b21fc1364da95ea7288b36da9564e76d55014900bfca347a4935'
|
|
7
|
+
data.tar.gz: 1de1dd05b9fc67213177ecfdf5150ad5252cab86a47766410f9970d052d91b5443edf999375d80e61dfa6748a7e229c9fd88c22a86ee0b656ffdd853731e249b
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) EmailGuard
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -30,6 +30,16 @@ For local examples, you can also set:
|
|
|
30
30
|
EMAILGUARD_API_KEY=egsk_live_...
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
client = Emailguard::Client.new(api_key: ENV.fetch('EMAILGUARD_API_KEY'))
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
See the generated [`examples/`](./examples/) directory for runnable workflows.
|
|
42
|
+
|
|
33
43
|
|
|
34
44
|
## API Responses
|
|
35
45
|
|
|
@@ -39,14 +49,14 @@ REST API responses use a JSON envelope:
|
|
|
39
49
|
{ "code": "SUCCESS", "data": {}, "message": "" }
|
|
40
50
|
```
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
The public client unwraps `data` on success and raises/returns `APIError` for unsuccessful envelopes. Generated low-level transports remain available for advanced use.
|
|
43
53
|
|
|
44
54
|
## Related Packages
|
|
45
55
|
|
|
46
56
|
- [@emailguard/sdk (TypeScript)](https://www.npmjs.com/package/@emailguard/sdk)
|
|
47
57
|
- [@emailguard/mcp (MCP)](https://www.npmjs.com/package/@emailguard/mcp)
|
|
48
58
|
- [github.com/EmailGuard/emailguard-go (Go)](https://pkg.go.dev/github.com/EmailGuard/emailguard-go)
|
|
49
|
-
- [
|
|
59
|
+
- [emailguard-sdk (Python)](https://pypi.org/project/emailguard-sdk/)
|
|
50
60
|
- [emailguard/emailguard-sdk (PHP)](https://packagist.org/packages/emailguard/emailguard-sdk)
|
|
51
61
|
- [emailguard_sdk (Ruby)](https://rubygems.org/gems/emailguard_sdk) (this package)
|
|
52
62
|
- [EmailGuard Zapier integration](https://emailguard.co/docs/api-reference/guides/getting-started)
|
|
@@ -54,3 +64,7 @@ Read `data` on success and use `code` / `message` for error handling.
|
|
|
54
64
|
## Support
|
|
55
65
|
|
|
56
66
|
Questions, issues, or feedback? Email [dev@emailguard.co](mailto:dev@emailguard.co).
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.2
|
|
7
7
|
Contact: dev@emailguard.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -26,8 +26,8 @@ module Emailguard
|
|
|
26
26
|
# @option opts [String] :start Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom
|
|
27
27
|
# @option opts [String] :_end Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom
|
|
28
28
|
# @return [BillingUsageResponse]
|
|
29
|
-
def
|
|
30
|
-
data, _status_code, _headers =
|
|
29
|
+
def get_billing_usage(opts = {})
|
|
30
|
+
data, _status_code, _headers = get_billing_usage_with_http_info(opts)
|
|
31
31
|
data
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -38,9 +38,9 @@ module Emailguard
|
|
|
38
38
|
# @option opts [String] :start Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom
|
|
39
39
|
# @option opts [String] :_end Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom
|
|
40
40
|
# @return [Array<(BillingUsageResponse, Integer, Hash)>] BillingUsageResponse data, response status code and response headers
|
|
41
|
-
def
|
|
41
|
+
def get_billing_usage_with_http_info(opts = {})
|
|
42
42
|
if @api_client.config.debugging
|
|
43
|
-
@api_client.config.logger.debug 'Calling API: BillingApi.
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: BillingApi.get_billing_usage ...'
|
|
44
44
|
end
|
|
45
45
|
allowable_values = ["current", "previous", "custom"]
|
|
46
46
|
if @api_client.config.client_side_validation && opts[:'range'] && !allowable_values.include?(opts[:'range'])
|
|
@@ -73,7 +73,7 @@ module Emailguard
|
|
|
73
73
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
74
74
|
|
|
75
75
|
new_options = opts.merge(
|
|
76
|
-
:operation => :"BillingApi.
|
|
76
|
+
:operation => :"BillingApi.get_billing_usage",
|
|
77
77
|
:header_params => header_params,
|
|
78
78
|
:query_params => query_params,
|
|
79
79
|
:form_params => form_params,
|
|
@@ -84,7 +84,7 @@ module Emailguard
|
|
|
84
84
|
|
|
85
85
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
86
86
|
if @api_client.config.debugging
|
|
87
|
-
@api_client.config.logger.debug "API called: BillingApi#
|
|
87
|
+
@api_client.config.logger.debug "API called: BillingApi#get_billing_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
88
|
end
|
|
89
89
|
return data, status_code, headers
|
|
90
90
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.2
|
|
7
7
|
Contact: dev@emailguard.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -19,31 +19,31 @@ module Emailguard
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# @param
|
|
22
|
+
# Create notification channel
|
|
23
|
+
# Creates a delivery channel for the team. Email channels require verification; webhook channels can be verified with the test endpoint.
|
|
24
|
+
# @param create_notification_channel_input [CreateNotificationChannelInput] Channel name, type, and type-specific configuration
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [
|
|
27
|
-
def
|
|
28
|
-
data, _status_code, _headers =
|
|
26
|
+
# @return [GetNotificationChannelResponse]
|
|
27
|
+
def create_notification_channel(create_notification_channel_input, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_notification_channel_with_http_info(create_notification_channel_input, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# @param
|
|
32
|
+
# Create notification channel
|
|
33
|
+
# Creates a delivery channel for the team. Email channels require verification; webhook channels can be verified with the test endpoint.
|
|
34
|
+
# @param create_notification_channel_input [CreateNotificationChannelInput] Channel name, type, and type-specific configuration
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(
|
|
37
|
-
def
|
|
36
|
+
# @return [Array<(GetNotificationChannelResponse, Integer, Hash)>] GetNotificationChannelResponse data, response status code and response headers
|
|
37
|
+
def create_notification_channel_with_http_info(create_notification_channel_input, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: ChannelsApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ChannelsApi.create_notification_channel ...'
|
|
40
40
|
end
|
|
41
|
-
# verify the required parameter '
|
|
42
|
-
if @api_client.config.client_side_validation &&
|
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'create_notification_channel_input' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_notification_channel_input.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_notification_channel_input' when calling ChannelsApi.create_notification_channel"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
|
-
local_var_path = '/api/v1/team/notifications/channels
|
|
46
|
+
local_var_path = '/api/v1/team/notifications/channels'
|
|
47
47
|
|
|
48
48
|
# query parameters
|
|
49
49
|
query_params = opts[:query_params] || {}
|
|
@@ -52,21 +52,26 @@ module Emailguard
|
|
|
52
52
|
header_params = opts[:header_params] || {}
|
|
53
53
|
# HTTP header 'Accept' (if needed)
|
|
54
54
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
55
60
|
|
|
56
61
|
# form parameters
|
|
57
62
|
form_params = opts[:form_params] || {}
|
|
58
63
|
|
|
59
64
|
# http body (model)
|
|
60
|
-
post_body = opts[:debug_body]
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_notification_channel_input)
|
|
61
66
|
|
|
62
67
|
# return_type
|
|
63
|
-
return_type = opts[:debug_return_type] || '
|
|
68
|
+
return_type = opts[:debug_return_type] || 'GetNotificationChannelResponse'
|
|
64
69
|
|
|
65
70
|
# auth_names
|
|
66
71
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
67
72
|
|
|
68
73
|
new_options = opts.merge(
|
|
69
|
-
:operation => :"ChannelsApi.
|
|
74
|
+
:operation => :"ChannelsApi.create_notification_channel",
|
|
70
75
|
:header_params => header_params,
|
|
71
76
|
:query_params => query_params,
|
|
72
77
|
:form_params => form_params,
|
|
@@ -75,41 +80,35 @@ module Emailguard
|
|
|
75
80
|
:return_type => return_type
|
|
76
81
|
)
|
|
77
82
|
|
|
78
|
-
data, status_code, headers = @api_client.call_api(:
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
84
|
if @api_client.config.debugging
|
|
80
|
-
@api_client.config.logger.debug "API called: ChannelsApi#
|
|
85
|
+
@api_client.config.logger.debug "API called: ChannelsApi#create_notification_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
86
|
end
|
|
82
87
|
return data, status_code, headers
|
|
83
88
|
end
|
|
84
89
|
|
|
85
|
-
#
|
|
86
|
-
#
|
|
87
|
-
# @param channel_id [String] UUID of the notification channel to
|
|
88
|
-
# @param update_notification_channel_input [UpdateNotificationChannelInput] Updated channel name and/or configuration
|
|
90
|
+
# Delete notification channel
|
|
91
|
+
# Permanently deletes a channel and removes it from any rules that reference it.
|
|
92
|
+
# @param channel_id [String] UUID of the notification channel to delete
|
|
89
93
|
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @return [
|
|
91
|
-
def
|
|
92
|
-
data, _status_code, _headers =
|
|
94
|
+
# @return [MessageResponse]
|
|
95
|
+
def delete_notification_channel(channel_id, opts = {})
|
|
96
|
+
data, _status_code, _headers = delete_notification_channel_with_http_info(channel_id, opts)
|
|
93
97
|
data
|
|
94
98
|
end
|
|
95
99
|
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
# @param channel_id [String] UUID of the notification channel to
|
|
99
|
-
# @param update_notification_channel_input [UpdateNotificationChannelInput] Updated channel name and/or configuration
|
|
100
|
+
# Delete notification channel
|
|
101
|
+
# Permanently deletes a channel and removes it from any rules that reference it.
|
|
102
|
+
# @param channel_id [String] UUID of the notification channel to delete
|
|
100
103
|
# @param [Hash] opts the optional parameters
|
|
101
|
-
# @return [Array<(
|
|
102
|
-
def
|
|
104
|
+
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
105
|
+
def delete_notification_channel_with_http_info(channel_id, opts = {})
|
|
103
106
|
if @api_client.config.debugging
|
|
104
|
-
@api_client.config.logger.debug 'Calling API: ChannelsApi.
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: ChannelsApi.delete_notification_channel ...'
|
|
105
108
|
end
|
|
106
109
|
# verify the required parameter 'channel_id' is set
|
|
107
110
|
if @api_client.config.client_side_validation && channel_id.nil?
|
|
108
|
-
fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChannelsApi.
|
|
109
|
-
end
|
|
110
|
-
# verify the required parameter 'update_notification_channel_input' is set
|
|
111
|
-
if @api_client.config.client_side_validation && update_notification_channel_input.nil?
|
|
112
|
-
fail ArgumentError, "Missing the required parameter 'update_notification_channel_input' when calling ChannelsApi.api_v1_team_notifications_channels_channel_id_put"
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChannelsApi.delete_notification_channel"
|
|
113
112
|
end
|
|
114
113
|
# resource path
|
|
115
114
|
local_var_path = '/api/v1/team/notifications/channels/{channelId}'.sub('{channelId}', CGI.escape(channel_id.to_s))
|
|
@@ -121,26 +120,21 @@ module Emailguard
|
|
|
121
120
|
header_params = opts[:header_params] || {}
|
|
122
121
|
# HTTP header 'Accept' (if needed)
|
|
123
122
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
124
|
-
# HTTP header 'Content-Type'
|
|
125
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
126
|
-
if !content_type.nil?
|
|
127
|
-
header_params['Content-Type'] = content_type
|
|
128
|
-
end
|
|
129
123
|
|
|
130
124
|
# form parameters
|
|
131
125
|
form_params = opts[:form_params] || {}
|
|
132
126
|
|
|
133
127
|
# http body (model)
|
|
134
|
-
post_body = opts[:debug_body]
|
|
128
|
+
post_body = opts[:debug_body]
|
|
135
129
|
|
|
136
130
|
# return_type
|
|
137
|
-
return_type = opts[:debug_return_type] || '
|
|
131
|
+
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
138
132
|
|
|
139
133
|
# auth_names
|
|
140
134
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
141
135
|
|
|
142
136
|
new_options = opts.merge(
|
|
143
|
-
:operation => :"ChannelsApi.
|
|
137
|
+
:operation => :"ChannelsApi.delete_notification_channel",
|
|
144
138
|
:header_params => header_params,
|
|
145
139
|
:query_params => query_params,
|
|
146
140
|
:form_params => form_params,
|
|
@@ -149,38 +143,32 @@ module Emailguard
|
|
|
149
143
|
:return_type => return_type
|
|
150
144
|
)
|
|
151
145
|
|
|
152
|
-
data, status_code, headers = @api_client.call_api(:
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
153
147
|
if @api_client.config.debugging
|
|
154
|
-
@api_client.config.logger.debug "API called: ChannelsApi#
|
|
148
|
+
@api_client.config.logger.debug "API called: ChannelsApi#delete_notification_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
155
149
|
end
|
|
156
150
|
return data, status_code, headers
|
|
157
151
|
end
|
|
158
152
|
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
# @param channel_id [String] UUID of the webhook channel to test
|
|
153
|
+
# List notification channels
|
|
154
|
+
# Returns every delivery channel configured for the team (email, webhook, and other supported types). Use channel IDs when attaching targets to notification rules.
|
|
162
155
|
# @param [Hash] opts the optional parameters
|
|
163
|
-
# @return [
|
|
164
|
-
def
|
|
165
|
-
data, _status_code, _headers =
|
|
156
|
+
# @return [GetNotificationChannelsResponse]
|
|
157
|
+
def list_notification_channels(opts = {})
|
|
158
|
+
data, _status_code, _headers = list_notification_channels_with_http_info(opts)
|
|
166
159
|
data
|
|
167
160
|
end
|
|
168
161
|
|
|
169
|
-
#
|
|
170
|
-
#
|
|
171
|
-
# @param channel_id [String] UUID of the webhook channel to test
|
|
162
|
+
# List notification channels
|
|
163
|
+
# Returns every delivery channel configured for the team (email, webhook, and other supported types). Use channel IDs when attaching targets to notification rules.
|
|
172
164
|
# @param [Hash] opts the optional parameters
|
|
173
|
-
# @return [Array<(
|
|
174
|
-
def
|
|
165
|
+
# @return [Array<(GetNotificationChannelsResponse, Integer, Hash)>] GetNotificationChannelsResponse data, response status code and response headers
|
|
166
|
+
def list_notification_channels_with_http_info(opts = {})
|
|
175
167
|
if @api_client.config.debugging
|
|
176
|
-
@api_client.config.logger.debug 'Calling API: ChannelsApi.
|
|
177
|
-
end
|
|
178
|
-
# verify the required parameter 'channel_id' is set
|
|
179
|
-
if @api_client.config.client_side_validation && channel_id.nil?
|
|
180
|
-
fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChannelsApi.api_v1_team_notifications_channels_channel_id_test_post"
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: ChannelsApi.list_notification_channels ...'
|
|
181
169
|
end
|
|
182
170
|
# resource path
|
|
183
|
-
local_var_path = '/api/v1/team/notifications/channels
|
|
171
|
+
local_var_path = '/api/v1/team/notifications/channels'
|
|
184
172
|
|
|
185
173
|
# query parameters
|
|
186
174
|
query_params = opts[:query_params] || {}
|
|
@@ -197,13 +185,13 @@ module Emailguard
|
|
|
197
185
|
post_body = opts[:debug_body]
|
|
198
186
|
|
|
199
187
|
# return_type
|
|
200
|
-
return_type = opts[:debug_return_type] || '
|
|
188
|
+
return_type = opts[:debug_return_type] || 'GetNotificationChannelsResponse'
|
|
201
189
|
|
|
202
190
|
# auth_names
|
|
203
191
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
204
192
|
|
|
205
193
|
new_options = opts.merge(
|
|
206
|
-
:operation => :"ChannelsApi.
|
|
194
|
+
:operation => :"ChannelsApi.list_notification_channels",
|
|
207
195
|
:header_params => header_params,
|
|
208
196
|
:query_params => query_params,
|
|
209
197
|
:form_params => form_params,
|
|
@@ -212,32 +200,38 @@ module Emailguard
|
|
|
212
200
|
:return_type => return_type
|
|
213
201
|
)
|
|
214
202
|
|
|
215
|
-
data, status_code, headers = @api_client.call_api(:
|
|
203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
216
204
|
if @api_client.config.debugging
|
|
217
|
-
@api_client.config.logger.debug "API called: ChannelsApi#
|
|
205
|
+
@api_client.config.logger.debug "API called: ChannelsApi#list_notification_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
206
|
end
|
|
219
207
|
return data, status_code, headers
|
|
220
208
|
end
|
|
221
209
|
|
|
222
|
-
#
|
|
223
|
-
#
|
|
210
|
+
# Test notification channel
|
|
211
|
+
# Sends a sample payload to a webhook channel to confirm the endpoint is reachable. On success the channel is marked verified.
|
|
212
|
+
# @param channel_id [String] UUID of the webhook channel to test
|
|
224
213
|
# @param [Hash] opts the optional parameters
|
|
225
|
-
# @return [
|
|
226
|
-
def
|
|
227
|
-
data, _status_code, _headers =
|
|
214
|
+
# @return [MessageResponse]
|
|
215
|
+
def test_notification_channel(channel_id, opts = {})
|
|
216
|
+
data, _status_code, _headers = test_notification_channel_with_http_info(channel_id, opts)
|
|
228
217
|
data
|
|
229
218
|
end
|
|
230
219
|
|
|
231
|
-
#
|
|
232
|
-
#
|
|
220
|
+
# Test notification channel
|
|
221
|
+
# Sends a sample payload to a webhook channel to confirm the endpoint is reachable. On success the channel is marked verified.
|
|
222
|
+
# @param channel_id [String] UUID of the webhook channel to test
|
|
233
223
|
# @param [Hash] opts the optional parameters
|
|
234
|
-
# @return [Array<(
|
|
235
|
-
def
|
|
224
|
+
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
225
|
+
def test_notification_channel_with_http_info(channel_id, opts = {})
|
|
236
226
|
if @api_client.config.debugging
|
|
237
|
-
@api_client.config.logger.debug 'Calling API: ChannelsApi.
|
|
227
|
+
@api_client.config.logger.debug 'Calling API: ChannelsApi.test_notification_channel ...'
|
|
228
|
+
end
|
|
229
|
+
# verify the required parameter 'channel_id' is set
|
|
230
|
+
if @api_client.config.client_side_validation && channel_id.nil?
|
|
231
|
+
fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChannelsApi.test_notification_channel"
|
|
238
232
|
end
|
|
239
233
|
# resource path
|
|
240
|
-
local_var_path = '/api/v1/team/notifications/channels'
|
|
234
|
+
local_var_path = '/api/v1/team/notifications/channels/{channelId}/test'.sub('{channelId}', CGI.escape(channel_id.to_s))
|
|
241
235
|
|
|
242
236
|
# query parameters
|
|
243
237
|
query_params = opts[:query_params] || {}
|
|
@@ -254,13 +248,13 @@ module Emailguard
|
|
|
254
248
|
post_body = opts[:debug_body]
|
|
255
249
|
|
|
256
250
|
# return_type
|
|
257
|
-
return_type = opts[:debug_return_type] || '
|
|
251
|
+
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
258
252
|
|
|
259
253
|
# auth_names
|
|
260
254
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
261
255
|
|
|
262
256
|
new_options = opts.merge(
|
|
263
|
-
:operation => :"ChannelsApi.
|
|
257
|
+
:operation => :"ChannelsApi.test_notification_channel",
|
|
264
258
|
:header_params => header_params,
|
|
265
259
|
:query_params => query_params,
|
|
266
260
|
:form_params => form_params,
|
|
@@ -269,38 +263,44 @@ module Emailguard
|
|
|
269
263
|
:return_type => return_type
|
|
270
264
|
)
|
|
271
265
|
|
|
272
|
-
data, status_code, headers = @api_client.call_api(:
|
|
266
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
273
267
|
if @api_client.config.debugging
|
|
274
|
-
@api_client.config.logger.debug "API called: ChannelsApi#
|
|
268
|
+
@api_client.config.logger.debug "API called: ChannelsApi#test_notification_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
275
269
|
end
|
|
276
270
|
return data, status_code, headers
|
|
277
271
|
end
|
|
278
272
|
|
|
279
|
-
#
|
|
280
|
-
#
|
|
281
|
-
# @param
|
|
273
|
+
# Update notification channel
|
|
274
|
+
# Updates a channel's display name or configuration. Send only fields you want to change.
|
|
275
|
+
# @param channel_id [String] UUID of the notification channel to update
|
|
276
|
+
# @param update_notification_channel_input [UpdateNotificationChannelInput] Updated channel name and/or configuration
|
|
282
277
|
# @param [Hash] opts the optional parameters
|
|
283
278
|
# @return [GetNotificationChannelResponse]
|
|
284
|
-
def
|
|
285
|
-
data, _status_code, _headers =
|
|
279
|
+
def update_notification_channel(channel_id, update_notification_channel_input, opts = {})
|
|
280
|
+
data, _status_code, _headers = update_notification_channel_with_http_info(channel_id, update_notification_channel_input, opts)
|
|
286
281
|
data
|
|
287
282
|
end
|
|
288
283
|
|
|
289
|
-
#
|
|
290
|
-
#
|
|
291
|
-
# @param
|
|
284
|
+
# Update notification channel
|
|
285
|
+
# Updates a channel's display name or configuration. Send only fields you want to change.
|
|
286
|
+
# @param channel_id [String] UUID of the notification channel to update
|
|
287
|
+
# @param update_notification_channel_input [UpdateNotificationChannelInput] Updated channel name and/or configuration
|
|
292
288
|
# @param [Hash] opts the optional parameters
|
|
293
289
|
# @return [Array<(GetNotificationChannelResponse, Integer, Hash)>] GetNotificationChannelResponse data, response status code and response headers
|
|
294
|
-
def
|
|
290
|
+
def update_notification_channel_with_http_info(channel_id, update_notification_channel_input, opts = {})
|
|
295
291
|
if @api_client.config.debugging
|
|
296
|
-
@api_client.config.logger.debug 'Calling API: ChannelsApi.
|
|
292
|
+
@api_client.config.logger.debug 'Calling API: ChannelsApi.update_notification_channel ...'
|
|
297
293
|
end
|
|
298
|
-
# verify the required parameter '
|
|
299
|
-
if @api_client.config.client_side_validation &&
|
|
300
|
-
fail ArgumentError, "Missing the required parameter '
|
|
294
|
+
# verify the required parameter 'channel_id' is set
|
|
295
|
+
if @api_client.config.client_side_validation && channel_id.nil?
|
|
296
|
+
fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChannelsApi.update_notification_channel"
|
|
297
|
+
end
|
|
298
|
+
# verify the required parameter 'update_notification_channel_input' is set
|
|
299
|
+
if @api_client.config.client_side_validation && update_notification_channel_input.nil?
|
|
300
|
+
fail ArgumentError, "Missing the required parameter 'update_notification_channel_input' when calling ChannelsApi.update_notification_channel"
|
|
301
301
|
end
|
|
302
302
|
# resource path
|
|
303
|
-
local_var_path = '/api/v1/team/notifications/channels'
|
|
303
|
+
local_var_path = '/api/v1/team/notifications/channels/{channelId}'.sub('{channelId}', CGI.escape(channel_id.to_s))
|
|
304
304
|
|
|
305
305
|
# query parameters
|
|
306
306
|
query_params = opts[:query_params] || {}
|
|
@@ -319,7 +319,7 @@ module Emailguard
|
|
|
319
319
|
form_params = opts[:form_params] || {}
|
|
320
320
|
|
|
321
321
|
# http body (model)
|
|
322
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
322
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_notification_channel_input)
|
|
323
323
|
|
|
324
324
|
# return_type
|
|
325
325
|
return_type = opts[:debug_return_type] || 'GetNotificationChannelResponse'
|
|
@@ -328,7 +328,7 @@ module Emailguard
|
|
|
328
328
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
329
329
|
|
|
330
330
|
new_options = opts.merge(
|
|
331
|
-
:operation => :"ChannelsApi.
|
|
331
|
+
:operation => :"ChannelsApi.update_notification_channel",
|
|
332
332
|
:header_params => header_params,
|
|
333
333
|
:query_params => query_params,
|
|
334
334
|
:form_params => form_params,
|
|
@@ -337,9 +337,9 @@ module Emailguard
|
|
|
337
337
|
:return_type => return_type
|
|
338
338
|
)
|
|
339
339
|
|
|
340
|
-
data, status_code, headers = @api_client.call_api(:
|
|
340
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
341
341
|
if @api_client.config.debugging
|
|
342
|
-
@api_client.config.logger.debug "API called: ChannelsApi#
|
|
342
|
+
@api_client.config.logger.debug "API called: ChannelsApi#update_notification_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
343
343
|
end
|
|
344
344
|
return data, status_code, headers
|
|
345
345
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.2
|
|
7
7
|
Contact: dev@emailguard.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -24,8 +24,8 @@ module Emailguard
|
|
|
24
24
|
# @param email [String] Email address to analyze
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [EmailDetectResponse]
|
|
27
|
-
def
|
|
28
|
-
data, _status_code, _headers =
|
|
27
|
+
def detect_email(email, opts = {})
|
|
28
|
+
data, _status_code, _headers = detect_email_with_http_info(email, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -34,13 +34,13 @@ module Emailguard
|
|
|
34
34
|
# @param email [String] Email address to analyze
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(EmailDetectResponse, Integer, Hash)>] EmailDetectResponse data, response status code and response headers
|
|
37
|
-
def
|
|
37
|
+
def detect_email_with_http_info(email, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: EmailApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: EmailApi.detect_email ...'
|
|
40
40
|
end
|
|
41
41
|
# verify the required parameter 'email' is set
|
|
42
42
|
if @api_client.config.client_side_validation && email.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling EmailApi.
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling EmailApi.detect_email"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/api/v1/emails/detect'
|
|
@@ -64,10 +64,10 @@ module Emailguard
|
|
|
64
64
|
return_type = opts[:debug_return_type] || 'EmailDetectResponse'
|
|
65
65
|
|
|
66
66
|
# auth_names
|
|
67
|
-
auth_names = opts[:debug_auth_names] || []
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
68
68
|
|
|
69
69
|
new_options = opts.merge(
|
|
70
|
-
:operation => :"EmailApi.
|
|
70
|
+
:operation => :"EmailApi.detect_email",
|
|
71
71
|
:header_params => header_params,
|
|
72
72
|
:query_params => query_params,
|
|
73
73
|
:form_params => form_params,
|
|
@@ -78,7 +78,7 @@ module Emailguard
|
|
|
78
78
|
|
|
79
79
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
80
80
|
if @api_client.config.debugging
|
|
81
|
-
@api_client.config.logger.debug "API called: EmailApi#
|
|
81
|
+
@api_client.config.logger.debug "API called: EmailApi#detect_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
82
|
end
|
|
83
83
|
return data, status_code, headers
|
|
84
84
|
end
|