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.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -0
  3. data/README.md +16 -2
  4. data/examples/detect-email.rb +5 -0
  5. data/examples/get-billing-usage.rb +5 -0
  6. data/examples/get-team.rb +5 -0
  7. data/examples/list-notification-channels.rb +5 -0
  8. data/examples/list-pending-team-invites.rb +5 -0
  9. data/lib/emailguard_sdk/api/billing_api.rb +7 -7
  10. data/lib/emailguard_sdk/api/channels_api.rb +105 -105
  11. data/lib/emailguard_sdk/api/email_api.rb +9 -9
  12. data/lib/emailguard_sdk/api/events_api.rb +7 -7
  13. data/lib/emailguard_sdk/api/invites_api.rb +60 -60
  14. data/lib/emailguard_sdk/api/members_api.rb +27 -27
  15. data/lib/emailguard_sdk/api/rules_api.rb +71 -71
  16. data/lib/emailguard_sdk/api/teams_api.rb +14 -14
  17. data/lib/emailguard_sdk/api_client.rb +1 -1
  18. data/lib/emailguard_sdk/api_error.rb +1 -1
  19. data/lib/emailguard_sdk/api_model_base.rb +1 -1
  20. data/lib/emailguard_sdk/configuration.rb +3 -3
  21. data/lib/emailguard_sdk/facade.rb +191 -0
  22. data/lib/emailguard_sdk/models/base_response.rb +3 -3
  23. data/lib/emailguard_sdk/models/billing_usage_event.rb +1 -1
  24. data/lib/emailguard_sdk/models/billing_usage_item.rb +1 -1
  25. data/lib/emailguard_sdk/models/billing_usage_response.rb +3 -3
  26. data/lib/emailguard_sdk/models/create_notification_channel_input.rb +1 -1
  27. data/lib/emailguard_sdk/models/create_notification_rule_input.rb +1 -1
  28. data/lib/emailguard_sdk/models/email_detect_data.rb +21 -2
  29. data/lib/emailguard_sdk/models/email_detect_evidence.rb +165 -0
  30. data/lib/emailguard_sdk/models/email_detect_response.rb +3 -3
  31. data/lib/emailguard_sdk/models/get_notification_channel_response.rb +3 -3
  32. data/lib/emailguard_sdk/models/get_notification_channels_response.rb +3 -3
  33. data/lib/emailguard_sdk/models/get_notification_events_response.rb +3 -3
  34. data/lib/emailguard_sdk/models/get_notification_rules_response.rb +3 -3
  35. data/lib/emailguard_sdk/models/get_public_team_response.rb +3 -3
  36. data/lib/emailguard_sdk/models/id_data_response.rb +3 -3
  37. data/lib/emailguard_sdk/models/id_data_struct.rb +1 -1
  38. data/lib/emailguard_sdk/models/invite_team_member_input.rb +1 -1
  39. data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +3 -3
  40. data/lib/emailguard_sdk/models/list_public_team_members_response.rb +3 -3
  41. data/lib/emailguard_sdk/models/message_response.rb +3 -3
  42. data/lib/emailguard_sdk/models/notification_channel_response.rb +1 -1
  43. data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +1 -1
  44. data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +1 -1
  45. data/lib/emailguard_sdk/models/notification_rule_response.rb +1 -1
  46. data/lib/emailguard_sdk/models/public_team_invite_response.rb +1 -1
  47. data/lib/emailguard_sdk/models/public_team_member_response.rb +1 -1
  48. data/lib/emailguard_sdk/models/public_team_response.rb +1 -1
  49. data/lib/emailguard_sdk/models/{update_team_member_input.rb → public_update_team_member_input.rb} +5 -32
  50. data/lib/emailguard_sdk/models/update_notification_channel_input.rb +1 -1
  51. data/lib/emailguard_sdk/models/update_notification_rule_input.rb +1 -1
  52. data/lib/emailguard_sdk/models/update_team_input.rb +1 -1
  53. data/lib/emailguard_sdk/version.rb +2 -2
  54. data/lib/emailguard_sdk.rb +4 -2
  55. data/spec/facade_contract_spec.rb +340 -0
  56. data/spec/spec_helper.rb +1 -111
  57. metadata +15 -123
  58. data/Gemfile +0 -9
  59. data/Rakefile +0 -10
  60. data/docs/BaseResponse.md +0 -20
  61. data/docs/BillingApi.md +0 -85
  62. data/docs/BillingUsageEvent.md +0 -26
  63. data/docs/BillingUsageItem.md +0 -28
  64. data/docs/BillingUsageResponse.md +0 -22
  65. data/docs/ChannelsApi.md +0 -366
  66. data/docs/CreateNotificationChannelInput.md +0 -22
  67. data/docs/CreateNotificationRuleInput.md +0 -28
  68. data/docs/EmailApi.md +0 -72
  69. data/docs/EmailDetectData.md +0 -44
  70. data/docs/EmailDetectResponse.md +0 -22
  71. data/docs/EventsApi.md +0 -76
  72. data/docs/GetNotificationChannelResponse.md +0 -22
  73. data/docs/GetNotificationChannelsResponse.md +0 -22
  74. data/docs/GetNotificationEventsResponse.md +0 -22
  75. data/docs/GetNotificationRulesResponse.md +0 -22
  76. data/docs/GetPublicTeamResponse.md +0 -22
  77. data/docs/IdDataResponse.md +0 -22
  78. data/docs/IdDataStruct.md +0 -18
  79. data/docs/InviteTeamMemberInput.md +0 -20
  80. data/docs/InvitesApi.md +0 -220
  81. data/docs/ListPublicTeamInvitesResponse.md +0 -22
  82. data/docs/ListPublicTeamMembersResponse.md +0 -22
  83. data/docs/MembersApi.md +0 -222
  84. data/docs/MessageResponse.md +0 -20
  85. data/docs/NotificationChannelResponse.md +0 -28
  86. data/docs/NotificationRuleChannelInput.md +0 -22
  87. data/docs/NotificationRuleChannelResponse.md +0 -28
  88. data/docs/NotificationRuleResponse.md +0 -32
  89. data/docs/PublicTeamInviteResponse.md +0 -24
  90. data/docs/PublicTeamMemberResponse.md +0 -34
  91. data/docs/PublicTeamResponse.md +0 -28
  92. data/docs/RulesApi.md +0 -294
  93. data/docs/TeamsApi.md +0 -148
  94. data/docs/UpdateNotificationChannelInput.md +0 -20
  95. data/docs/UpdateNotificationRuleInput.md +0 -28
  96. data/docs/UpdateTeamInput.md +0 -24
  97. data/docs/UpdateTeamMemberInput.md +0 -22
  98. data/emailguard_sdk.gemspec +0 -44
  99. data/git_push.sh +0 -57
  100. data/spec/api/billing_api_spec.rb +0 -49
  101. data/spec/api/channels_api_spec.rb +0 -95
  102. data/spec/api/email_api_spec.rb +0 -47
  103. data/spec/api/events_api_spec.rb +0 -46
  104. data/spec/api/invites_api_spec.rb +0 -70
  105. data/spec/api/members_api_spec.rb +0 -71
  106. data/spec/api/rules_api_spec.rb +0 -83
  107. data/spec/api/teams_api_spec.rb +0 -58
  108. data/spec/models/base_response_spec.rb +0 -42
  109. data/spec/models/billing_usage_event_spec.rb +0 -60
  110. data/spec/models/billing_usage_item_spec.rb +0 -66
  111. data/spec/models/billing_usage_response_spec.rb +0 -48
  112. data/spec/models/create_notification_channel_input_spec.rb +0 -48
  113. data/spec/models/create_notification_rule_input_spec.rb +0 -66
  114. data/spec/models/email_detect_data_spec.rb +0 -114
  115. data/spec/models/email_detect_response_spec.rb +0 -48
  116. data/spec/models/get_notification_channel_response_spec.rb +0 -48
  117. data/spec/models/get_notification_channels_response_spec.rb +0 -48
  118. data/spec/models/get_notification_events_response_spec.rb +0 -48
  119. data/spec/models/get_notification_rules_response_spec.rb +0 -48
  120. data/spec/models/get_public_team_response_spec.rb +0 -48
  121. data/spec/models/id_data_response_spec.rb +0 -48
  122. data/spec/models/id_data_struct_spec.rb +0 -36
  123. data/spec/models/invite_team_member_input_spec.rb +0 -42
  124. data/spec/models/list_public_team_invites_response_spec.rb +0 -48
  125. data/spec/models/list_public_team_members_response_spec.rb +0 -48
  126. data/spec/models/message_response_spec.rb +0 -42
  127. data/spec/models/notification_channel_response_spec.rb +0 -66
  128. data/spec/models/notification_rule_channel_input_spec.rb +0 -48
  129. data/spec/models/notification_rule_channel_response_spec.rb +0 -66
  130. data/spec/models/notification_rule_response_spec.rb +0 -78
  131. data/spec/models/public_team_invite_response_spec.rb +0 -54
  132. data/spec/models/public_team_member_response_spec.rb +0 -84
  133. data/spec/models/public_team_response_spec.rb +0 -66
  134. data/spec/models/update_notification_channel_input_spec.rb +0 -42
  135. data/spec/models/update_notification_rule_input_spec.rb +0 -66
  136. data/spec/models/update_team_input_spec.rb +0 -54
  137. 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: c4d32ed6a9c4c992178555c84a684fefc3601a6bc7581d0acfedbf1961da9c4b
4
- data.tar.gz: acf2c5dec0be5363966ff4a8cef3651fb7f69e509b98a0b6d3c9bcde12cb03d8
3
+ metadata.gz: 422f67385b6fde4358c82aad56d5419cffd9141beabadfee428f294c93686641
4
+ data.tar.gz: 7479209427886c1dcad84fbc7c8fa1c09145eb0444f345ae27fc7a5befc47a2d
5
5
  SHA512:
6
- metadata.gz: 636217c5bd9773519bc6d6b6c583786ca5f3229800e9be5b6a768115b0c040952caf208113b9738858e6f0886567a53c0e3b37de71fe246def3b8e33d57733fb
7
- data.tar.gz: ecd1ba6be1aec909086623b31e50c056a5b9cb68d6734527cb664b2d47f1d0dd7ae51a4c921de4f5e4dde60b203dffde6296400d235a75fe4b87ef369b9dd0ba
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
- Read `data` on success and use `code` / `message` for error handling.
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
- - [emailguard_sdk (Python)](https://pypi.org/project/emailguard_sdk/)
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
@@ -0,0 +1,5 @@
1
+ require 'emailguard_sdk'
2
+
3
+ client = Emailguard::Client.new(api_key: ENV.fetch('EMAILGUARD_API_KEY'))
4
+ result = client.email.detect_email(email: "user@example.com")
5
+ puts result.inspect
@@ -0,0 +1,5 @@
1
+ require 'emailguard_sdk'
2
+
3
+ client = Emailguard::Client.new(api_key: ENV.fetch('EMAILGUARD_API_KEY'))
4
+ result = client.billing.get_billing_usage()
5
+ puts result.inspect
@@ -0,0 +1,5 @@
1
+ require 'emailguard_sdk'
2
+
3
+ client = Emailguard::Client.new(api_key: ENV.fetch('EMAILGUARD_API_KEY'))
4
+ result = client.teams.get_team()
5
+ puts result.inspect
@@ -0,0 +1,5 @@
1
+ require 'emailguard_sdk'
2
+
3
+ client = Emailguard::Client.new(api_key: ENV.fetch('EMAILGUARD_API_KEY'))
4
+ result = client.channels.list_notification_channels()
5
+ puts result.inspect
@@ -0,0 +1,5 @@
1
+ require 'emailguard_sdk'
2
+
3
+ client = Emailguard::Client.new(api_key: ENV.fetch('EMAILGUARD_API_KEY'))
4
+ result = client.invites.list_pending_team_invites()
5
+ puts result.inspect
@@ -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.0
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 api_v1_team_billing_usage_get(opts = {})
30
- data, _status_code, _headers = api_v1_team_billing_usage_get_with_http_info(opts)
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 api_v1_team_billing_usage_get_with_http_info(opts = {})
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.api_v1_team_billing_usage_get ...'
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.api_v1_team_billing_usage_get",
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#api_v1_team_billing_usage_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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.0
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
- # Delete notification channel
23
- # Permanently deletes a channel and removes it from any rules that reference it.
24
- # @param channel_id [String] UUID of the notification channel to delete
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 [MessageResponse]
27
- def api_v1_team_notifications_channels_channel_id_delete(channel_id, opts = {})
28
- data, _status_code, _headers = api_v1_team_notifications_channels_channel_id_delete_with_http_info(channel_id, opts)
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
- # Delete notification channel
33
- # Permanently deletes a channel and removes it from any rules that reference it.
34
- # @param channel_id [String] UUID of the notification channel to delete
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<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
37
- def api_v1_team_notifications_channels_channel_id_delete_with_http_info(channel_id, opts = {})
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.api_v1_team_notifications_channels_channel_id_delete ...'
39
+ @api_client.config.logger.debug 'Calling API: ChannelsApi.create_notification_channel ...'
40
40
  end
41
- # verify the required parameter 'channel_id' is set
42
- if @api_client.config.client_side_validation && channel_id.nil?
43
- fail ArgumentError, "Missing the required parameter 'channel_id' when calling ChannelsApi.api_v1_team_notifications_channels_channel_id_delete"
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/{channelId}'.sub('{channelId}', CGI.escape(channel_id.to_s))
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] || 'MessageResponse'
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.api_v1_team_notifications_channels_channel_id_delete",
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(:DELETE, local_var_path, new_options)
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#api_v1_team_notifications_channels_channel_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Update notification channel
86
- # Updates a channel's display name or configuration. Send only fields you want to change.
87
- # @param channel_id [String] UUID of the notification channel to update
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 [GetNotificationChannelResponse]
91
- def api_v1_team_notifications_channels_channel_id_put(channel_id, update_notification_channel_input, opts = {})
92
- data, _status_code, _headers = api_v1_team_notifications_channels_channel_id_put_with_http_info(channel_id, update_notification_channel_input, opts)
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
- # Update notification channel
97
- # Updates a channel&#39;s display name or configuration. Send only fields you want to change.
98
- # @param channel_id [String] UUID of the notification channel to update
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<(GetNotificationChannelResponse, Integer, Hash)>] GetNotificationChannelResponse data, response status code and response headers
102
- def api_v1_team_notifications_channels_channel_id_put_with_http_info(channel_id, update_notification_channel_input, opts = {})
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.api_v1_team_notifications_channels_channel_id_put ...'
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.api_v1_team_notifications_channels_channel_id_put"
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] || @api_client.object_to_http_body(update_notification_channel_input)
128
+ post_body = opts[:debug_body]
135
129
 
136
130
  # return_type
137
- return_type = opts[:debug_return_type] || 'GetNotificationChannelResponse'
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.api_v1_team_notifications_channels_channel_id_put",
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(:PUT, local_var_path, new_options)
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#api_v1_team_notifications_channels_channel_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Test notification channel
160
- # Sends a sample payload to a webhook channel to confirm the endpoint is reachable. On success the channel is marked verified.
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 [MessageResponse]
164
- def api_v1_team_notifications_channels_channel_id_test_post(channel_id, opts = {})
165
- data, _status_code, _headers = api_v1_team_notifications_channels_channel_id_test_post_with_http_info(channel_id, opts)
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
- # Test notification channel
170
- # Sends a sample payload to a webhook channel to confirm the endpoint is reachable. On success the channel is marked verified.
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<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
174
- def api_v1_team_notifications_channels_channel_id_test_post_with_http_info(channel_id, opts = {})
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.api_v1_team_notifications_channels_channel_id_test_post ...'
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/{channelId}/test'.sub('{channelId}', CGI.escape(channel_id.to_s))
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] || 'MessageResponse'
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.api_v1_team_notifications_channels_channel_id_test_post",
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(:POST, local_var_path, new_options)
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#api_v1_team_notifications_channels_channel_id_test_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # List notification channels
223
- # Returns every delivery channel configured for the team (email, webhook, and other supported types). Use channel IDs when attaching targets to notification rules.
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 [GetNotificationChannelsResponse]
226
- def api_v1_team_notifications_channels_get(opts = {})
227
- data, _status_code, _headers = api_v1_team_notifications_channels_get_with_http_info(opts)
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
- # List notification channels
232
- # Returns every delivery channel configured for the team (email, webhook, and other supported types). Use channel IDs when attaching targets to notification rules.
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<(GetNotificationChannelsResponse, Integer, Hash)>] GetNotificationChannelsResponse data, response status code and response headers
235
- def api_v1_team_notifications_channels_get_with_http_info(opts = {})
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.api_v1_team_notifications_channels_get ...'
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] || 'GetNotificationChannelsResponse'
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.api_v1_team_notifications_channels_get",
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(:GET, local_var_path, new_options)
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#api_v1_team_notifications_channels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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
- # Create notification channel
280
- # Creates a delivery channel for the team. Email channels require verification; webhook channels can be verified with the test endpoint.
281
- # @param create_notification_channel_input [CreateNotificationChannelInput] Channel name, type, and type-specific configuration
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 api_v1_team_notifications_channels_post(create_notification_channel_input, opts = {})
285
- data, _status_code, _headers = api_v1_team_notifications_channels_post_with_http_info(create_notification_channel_input, opts)
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
- # Create notification channel
290
- # Creates a delivery channel for the team. Email channels require verification; webhook channels can be verified with the test endpoint.
291
- # @param create_notification_channel_input [CreateNotificationChannelInput] Channel name, type, and type-specific configuration
284
+ # Update notification channel
285
+ # Updates a channel&#39;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 api_v1_team_notifications_channels_post_with_http_info(create_notification_channel_input, opts = {})
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.api_v1_team_notifications_channels_post ...'
292
+ @api_client.config.logger.debug 'Calling API: ChannelsApi.update_notification_channel ...'
297
293
  end
298
- # verify the required parameter 'create_notification_channel_input' is set
299
- if @api_client.config.client_side_validation && create_notification_channel_input.nil?
300
- fail ArgumentError, "Missing the required parameter 'create_notification_channel_input' when calling ChannelsApi.api_v1_team_notifications_channels_post"
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(create_notification_channel_input)
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.api_v1_team_notifications_channels_post",
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(:POST, local_var_path, new_options)
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#api_v1_team_notifications_channels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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.0
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 api_v1_emails_detect_get(email, opts = {})
28
- data, _status_code, _headers = api_v1_emails_detect_get_with_http_info(email, opts)
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 api_v1_emails_detect_get_with_http_info(email, opts = {})
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.api_v1_emails_detect_get ...'
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.api_v1_emails_detect_get"
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.api_v1_emails_detect_get",
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#api_v1_emails_detect_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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