emailguard_sdk 1.0.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +169 -0
- data/Rakefile +10 -0
- data/docs/BaseResponse.md +20 -0
- data/docs/BillingApi.md +85 -0
- data/docs/BillingUsageEvent.md +26 -0
- data/docs/BillingUsageItem.md +28 -0
- data/docs/BillingUsageResponse.md +22 -0
- data/docs/ChannelsApi.md +366 -0
- data/docs/CreateNotificationChannelInput.md +22 -0
- data/docs/CreateNotificationRuleInput.md +28 -0
- data/docs/EmailApi.md +72 -0
- data/docs/EmailDetectData.md +44 -0
- data/docs/EmailDetectResponse.md +22 -0
- data/docs/EventsApi.md +76 -0
- data/docs/GetNotificationChannelResponse.md +22 -0
- data/docs/GetNotificationChannelsResponse.md +22 -0
- data/docs/GetNotificationEventsResponse.md +22 -0
- data/docs/GetNotificationRulesResponse.md +22 -0
- data/docs/GetPublicTeamResponse.md +22 -0
- data/docs/IdDataResponse.md +22 -0
- data/docs/IdDataStruct.md +18 -0
- data/docs/InviteTeamMemberInput.md +20 -0
- data/docs/InvitesApi.md +220 -0
- data/docs/ListPublicTeamInvitesResponse.md +22 -0
- data/docs/ListPublicTeamMembersResponse.md +22 -0
- data/docs/MembersApi.md +222 -0
- data/docs/MessageResponse.md +20 -0
- data/docs/NotificationChannelResponse.md +28 -0
- data/docs/NotificationRuleChannelInput.md +22 -0
- data/docs/NotificationRuleChannelResponse.md +28 -0
- data/docs/NotificationRuleResponse.md +32 -0
- data/docs/PublicTeamInviteResponse.md +24 -0
- data/docs/PublicTeamMemberResponse.md +34 -0
- data/docs/PublicTeamResponse.md +28 -0
- data/docs/RulesApi.md +294 -0
- data/docs/TeamsApi.md +148 -0
- data/docs/UpdateNotificationChannelInput.md +20 -0
- data/docs/UpdateNotificationRuleInput.md +28 -0
- data/docs/UpdateTeamInput.md +24 -0
- data/docs/UpdateTeamMemberInput.md +22 -0
- data/emailguard_sdk.gemspec +39 -0
- data/git_push.sh +57 -0
- data/lib/emailguard_sdk/api/billing_api.rb +92 -0
- data/lib/emailguard_sdk/api/channels_api.rb +347 -0
- data/lib/emailguard_sdk/api/email_api.rb +86 -0
- data/lib/emailguard_sdk/api/events_api.rb +79 -0
- data/lib/emailguard_sdk/api/invites_api.rb +210 -0
- data/lib/emailguard_sdk/api/members_api.rb +216 -0
- data/lib/emailguard_sdk/api/rules_api.rb +284 -0
- data/lib/emailguard_sdk/api/teams_api.rb +147 -0
- data/lib/emailguard_sdk/api_client.rb +397 -0
- data/lib/emailguard_sdk/api_error.rb +58 -0
- data/lib/emailguard_sdk/api_model_base.rb +88 -0
- data/lib/emailguard_sdk/configuration.rb +322 -0
- data/lib/emailguard_sdk/models/base_response.rb +175 -0
- data/lib/emailguard_sdk/models/billing_usage_event.rb +268 -0
- data/lib/emailguard_sdk/models/billing_usage_item.rb +262 -0
- data/lib/emailguard_sdk/models/billing_usage_response.rb +186 -0
- data/lib/emailguard_sdk/models/create_notification_channel_input.rb +204 -0
- data/lib/emailguard_sdk/models/create_notification_rule_input.rb +264 -0
- data/lib/emailguard_sdk/models/email_detect_data.rb +266 -0
- data/lib/emailguard_sdk/models/email_detect_response.rb +184 -0
- data/lib/emailguard_sdk/models/get_notification_channel_response.rb +184 -0
- data/lib/emailguard_sdk/models/get_notification_channels_response.rb +186 -0
- data/lib/emailguard_sdk/models/get_notification_events_response.rb +186 -0
- data/lib/emailguard_sdk/models/get_notification_rules_response.rb +186 -0
- data/lib/emailguard_sdk/models/get_public_team_response.rb +184 -0
- data/lib/emailguard_sdk/models/id_data_response.rb +184 -0
- data/lib/emailguard_sdk/models/id_data_struct.rb +148 -0
- data/lib/emailguard_sdk/models/invite_team_member_input.rb +192 -0
- data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +186 -0
- data/lib/emailguard_sdk/models/list_public_team_members_response.rb +186 -0
- data/lib/emailguard_sdk/models/message_response.rb +175 -0
- data/lib/emailguard_sdk/models/notification_channel_response.rb +200 -0
- data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +168 -0
- data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +198 -0
- data/lib/emailguard_sdk/models/notification_rule_response.rb +224 -0
- data/lib/emailguard_sdk/models/public_team_invite_response.rb +246 -0
- data/lib/emailguard_sdk/models/public_team_member_response.rb +347 -0
- data/lib/emailguard_sdk/models/public_team_response.rb +198 -0
- data/lib/emailguard_sdk/models/update_notification_channel_input.rb +160 -0
- data/lib/emailguard_sdk/models/update_notification_rule_input.rb +204 -0
- data/lib/emailguard_sdk/models/update_team_input.rb +195 -0
- data/lib/emailguard_sdk/models/update_team_member_input.rb +185 -0
- data/lib/emailguard_sdk/version.rb +15 -0
- data/lib/emailguard_sdk.rb +78 -0
- data/spec/api/billing_api_spec.rb +49 -0
- data/spec/api/channels_api_spec.rb +95 -0
- data/spec/api/email_api_spec.rb +47 -0
- data/spec/api/events_api_spec.rb +46 -0
- data/spec/api/invites_api_spec.rb +70 -0
- data/spec/api/members_api_spec.rb +71 -0
- data/spec/api/rules_api_spec.rb +83 -0
- data/spec/api/teams_api_spec.rb +58 -0
- data/spec/models/base_response_spec.rb +42 -0
- data/spec/models/billing_usage_event_spec.rb +60 -0
- data/spec/models/billing_usage_item_spec.rb +66 -0
- data/spec/models/billing_usage_response_spec.rb +48 -0
- data/spec/models/create_notification_channel_input_spec.rb +48 -0
- data/spec/models/create_notification_rule_input_spec.rb +66 -0
- data/spec/models/email_detect_data_spec.rb +114 -0
- data/spec/models/email_detect_response_spec.rb +48 -0
- data/spec/models/get_notification_channel_response_spec.rb +48 -0
- data/spec/models/get_notification_channels_response_spec.rb +48 -0
- data/spec/models/get_notification_events_response_spec.rb +48 -0
- data/spec/models/get_notification_rules_response_spec.rb +48 -0
- data/spec/models/get_public_team_response_spec.rb +48 -0
- data/spec/models/id_data_response_spec.rb +48 -0
- data/spec/models/id_data_struct_spec.rb +36 -0
- data/spec/models/invite_team_member_input_spec.rb +42 -0
- data/spec/models/list_public_team_invites_response_spec.rb +48 -0
- data/spec/models/list_public_team_members_response_spec.rb +48 -0
- data/spec/models/message_response_spec.rb +42 -0
- data/spec/models/notification_channel_response_spec.rb +66 -0
- data/spec/models/notification_rule_channel_input_spec.rb +48 -0
- data/spec/models/notification_rule_channel_response_spec.rb +66 -0
- data/spec/models/notification_rule_response_spec.rb +78 -0
- data/spec/models/public_team_invite_response_spec.rb +54 -0
- data/spec/models/public_team_member_response_spec.rb +84 -0
- data/spec/models/public_team_response_spec.rb +66 -0
- data/spec/models/update_notification_channel_input_spec.rb +42 -0
- data/spec/models/update_notification_rule_input_spec.rb +66 -0
- data/spec/models/update_team_input_spec.rb +54 -0
- data/spec/models/update_team_member_input_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +251 -0
data/docs/ChannelsApi.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
# Emailguard::ChannelsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://api.emailguard.co*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**api_v1_team_notifications_channels_channel_id_delete**](ChannelsApi.md#api_v1_team_notifications_channels_channel_id_delete) | **DELETE** /api/v1/team/notifications/channels/{channelId} | Delete notification channel |
|
|
8
|
+
| [**api_v1_team_notifications_channels_channel_id_put**](ChannelsApi.md#api_v1_team_notifications_channels_channel_id_put) | **PUT** /api/v1/team/notifications/channels/{channelId} | Update notification channel |
|
|
9
|
+
| [**api_v1_team_notifications_channels_channel_id_test_post**](ChannelsApi.md#api_v1_team_notifications_channels_channel_id_test_post) | **POST** /api/v1/team/notifications/channels/{channelId}/test | Test notification channel |
|
|
10
|
+
| [**api_v1_team_notifications_channels_get**](ChannelsApi.md#api_v1_team_notifications_channels_get) | **GET** /api/v1/team/notifications/channels | List notification channels |
|
|
11
|
+
| [**api_v1_team_notifications_channels_post**](ChannelsApi.md#api_v1_team_notifications_channels_post) | **POST** /api/v1/team/notifications/channels | Create notification channel |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## api_v1_team_notifications_channels_channel_id_delete
|
|
15
|
+
|
|
16
|
+
> <MessageResponse> api_v1_team_notifications_channels_channel_id_delete(channel_id)
|
|
17
|
+
|
|
18
|
+
Delete notification channel
|
|
19
|
+
|
|
20
|
+
Permanently deletes a channel and removes it from any rules that reference it.
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'emailguard_sdk'
|
|
27
|
+
# setup authorization
|
|
28
|
+
Emailguard.configure do |config|
|
|
29
|
+
# Configure API key authorization: ApiKeyAuth
|
|
30
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = Emailguard::ChannelsApi.new
|
|
36
|
+
channel_id = 'channel_id_example' # String | UUID of the notification channel to delete
|
|
37
|
+
|
|
38
|
+
begin
|
|
39
|
+
# Delete notification channel
|
|
40
|
+
result = api_instance.api_v1_team_notifications_channels_channel_id_delete(channel_id)
|
|
41
|
+
p result
|
|
42
|
+
rescue Emailguard::ApiError => e
|
|
43
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_channel_id_delete: #{e}"
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Using the api_v1_team_notifications_channels_channel_id_delete_with_http_info variant
|
|
48
|
+
|
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
|
50
|
+
|
|
51
|
+
> <Array(<MessageResponse>, Integer, Hash)> api_v1_team_notifications_channels_channel_id_delete_with_http_info(channel_id)
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
begin
|
|
55
|
+
# Delete notification channel
|
|
56
|
+
data, status_code, headers = api_instance.api_v1_team_notifications_channels_channel_id_delete_with_http_info(channel_id)
|
|
57
|
+
p status_code # => 2xx
|
|
58
|
+
p headers # => { ... }
|
|
59
|
+
p data # => <MessageResponse>
|
|
60
|
+
rescue Emailguard::ApiError => e
|
|
61
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_channel_id_delete_with_http_info: #{e}"
|
|
62
|
+
end
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
|
69
|
+
| **channel_id** | **String** | UUID of the notification channel to delete | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**MessageResponse**](MessageResponse.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## api_v1_team_notifications_channels_channel_id_put
|
|
86
|
+
|
|
87
|
+
> <GetNotificationChannelResponse> api_v1_team_notifications_channels_channel_id_put(channel_id, update_notification_channel_input)
|
|
88
|
+
|
|
89
|
+
Update notification channel
|
|
90
|
+
|
|
91
|
+
Updates a channel's display name or configuration. Send only fields you want to change.
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'emailguard_sdk'
|
|
98
|
+
# setup authorization
|
|
99
|
+
Emailguard.configure do |config|
|
|
100
|
+
# Configure API key authorization: ApiKeyAuth
|
|
101
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
102
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
103
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
api_instance = Emailguard::ChannelsApi.new
|
|
107
|
+
channel_id = 'channel_id_example' # String | UUID of the notification channel to update
|
|
108
|
+
update_notification_channel_input = Emailguard::UpdateNotificationChannelInput.new # UpdateNotificationChannelInput | Updated channel name and/or configuration
|
|
109
|
+
|
|
110
|
+
begin
|
|
111
|
+
# Update notification channel
|
|
112
|
+
result = api_instance.api_v1_team_notifications_channels_channel_id_put(channel_id, update_notification_channel_input)
|
|
113
|
+
p result
|
|
114
|
+
rescue Emailguard::ApiError => e
|
|
115
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_channel_id_put: #{e}"
|
|
116
|
+
end
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Using the api_v1_team_notifications_channels_channel_id_put_with_http_info variant
|
|
120
|
+
|
|
121
|
+
This returns an Array which contains the response data, status code and headers.
|
|
122
|
+
|
|
123
|
+
> <Array(<GetNotificationChannelResponse>, Integer, Hash)> api_v1_team_notifications_channels_channel_id_put_with_http_info(channel_id, update_notification_channel_input)
|
|
124
|
+
|
|
125
|
+
```ruby
|
|
126
|
+
begin
|
|
127
|
+
# Update notification channel
|
|
128
|
+
data, status_code, headers = api_instance.api_v1_team_notifications_channels_channel_id_put_with_http_info(channel_id, update_notification_channel_input)
|
|
129
|
+
p status_code # => 2xx
|
|
130
|
+
p headers # => { ... }
|
|
131
|
+
p data # => <GetNotificationChannelResponse>
|
|
132
|
+
rescue Emailguard::ApiError => e
|
|
133
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_channel_id_put_with_http_info: #{e}"
|
|
134
|
+
end
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Parameters
|
|
138
|
+
|
|
139
|
+
| Name | Type | Description | Notes |
|
|
140
|
+
| ---- | ---- | ----------- | ----- |
|
|
141
|
+
| **channel_id** | **String** | UUID of the notification channel to update | |
|
|
142
|
+
| **update_notification_channel_input** | [**UpdateNotificationChannelInput**](UpdateNotificationChannelInput.md) | Updated channel name and/or configuration | |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
[**GetNotificationChannelResponse**](GetNotificationChannelResponse.md)
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: application/json
|
|
155
|
+
- **Accept**: application/json
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## api_v1_team_notifications_channels_channel_id_test_post
|
|
159
|
+
|
|
160
|
+
> <MessageResponse> api_v1_team_notifications_channels_channel_id_test_post(channel_id)
|
|
161
|
+
|
|
162
|
+
Test notification channel
|
|
163
|
+
|
|
164
|
+
Sends a sample payload to a webhook channel to confirm the endpoint is reachable. On success the channel is marked verified.
|
|
165
|
+
|
|
166
|
+
### Examples
|
|
167
|
+
|
|
168
|
+
```ruby
|
|
169
|
+
require 'time'
|
|
170
|
+
require 'emailguard_sdk'
|
|
171
|
+
# setup authorization
|
|
172
|
+
Emailguard.configure do |config|
|
|
173
|
+
# Configure API key authorization: ApiKeyAuth
|
|
174
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
175
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
176
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
api_instance = Emailguard::ChannelsApi.new
|
|
180
|
+
channel_id = 'channel_id_example' # String | UUID of the webhook channel to test
|
|
181
|
+
|
|
182
|
+
begin
|
|
183
|
+
# Test notification channel
|
|
184
|
+
result = api_instance.api_v1_team_notifications_channels_channel_id_test_post(channel_id)
|
|
185
|
+
p result
|
|
186
|
+
rescue Emailguard::ApiError => e
|
|
187
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_channel_id_test_post: #{e}"
|
|
188
|
+
end
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Using the api_v1_team_notifications_channels_channel_id_test_post_with_http_info variant
|
|
192
|
+
|
|
193
|
+
This returns an Array which contains the response data, status code and headers.
|
|
194
|
+
|
|
195
|
+
> <Array(<MessageResponse>, Integer, Hash)> api_v1_team_notifications_channels_channel_id_test_post_with_http_info(channel_id)
|
|
196
|
+
|
|
197
|
+
```ruby
|
|
198
|
+
begin
|
|
199
|
+
# Test notification channel
|
|
200
|
+
data, status_code, headers = api_instance.api_v1_team_notifications_channels_channel_id_test_post_with_http_info(channel_id)
|
|
201
|
+
p status_code # => 2xx
|
|
202
|
+
p headers # => { ... }
|
|
203
|
+
p data # => <MessageResponse>
|
|
204
|
+
rescue Emailguard::ApiError => e
|
|
205
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_channel_id_test_post_with_http_info: #{e}"
|
|
206
|
+
end
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Parameters
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description | Notes |
|
|
212
|
+
| ---- | ---- | ----------- | ----- |
|
|
213
|
+
| **channel_id** | **String** | UUID of the webhook channel to test | |
|
|
214
|
+
|
|
215
|
+
### Return type
|
|
216
|
+
|
|
217
|
+
[**MessageResponse**](MessageResponse.md)
|
|
218
|
+
|
|
219
|
+
### Authorization
|
|
220
|
+
|
|
221
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
222
|
+
|
|
223
|
+
### HTTP request headers
|
|
224
|
+
|
|
225
|
+
- **Content-Type**: Not defined
|
|
226
|
+
- **Accept**: application/json
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
## api_v1_team_notifications_channels_get
|
|
230
|
+
|
|
231
|
+
> <GetNotificationChannelsResponse> api_v1_team_notifications_channels_get
|
|
232
|
+
|
|
233
|
+
List notification channels
|
|
234
|
+
|
|
235
|
+
Returns every delivery channel configured for the team (email, webhook, and other supported types). Use channel IDs when attaching targets to notification rules.
|
|
236
|
+
|
|
237
|
+
### Examples
|
|
238
|
+
|
|
239
|
+
```ruby
|
|
240
|
+
require 'time'
|
|
241
|
+
require 'emailguard_sdk'
|
|
242
|
+
# setup authorization
|
|
243
|
+
Emailguard.configure do |config|
|
|
244
|
+
# Configure API key authorization: ApiKeyAuth
|
|
245
|
+
config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
api_instance = Emailguard::ChannelsApi.new
|
|
251
|
+
|
|
252
|
+
begin
|
|
253
|
+
# List notification channels
|
|
254
|
+
result = api_instance.api_v1_team_notifications_channels_get
|
|
255
|
+
p result
|
|
256
|
+
rescue Emailguard::ApiError => e
|
|
257
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_get: #{e}"
|
|
258
|
+
end
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### Using the api_v1_team_notifications_channels_get_with_http_info variant
|
|
262
|
+
|
|
263
|
+
This returns an Array which contains the response data, status code and headers.
|
|
264
|
+
|
|
265
|
+
> <Array(<GetNotificationChannelsResponse>, Integer, Hash)> api_v1_team_notifications_channels_get_with_http_info
|
|
266
|
+
|
|
267
|
+
```ruby
|
|
268
|
+
begin
|
|
269
|
+
# List notification channels
|
|
270
|
+
data, status_code, headers = api_instance.api_v1_team_notifications_channels_get_with_http_info
|
|
271
|
+
p status_code # => 2xx
|
|
272
|
+
p headers # => { ... }
|
|
273
|
+
p data # => <GetNotificationChannelsResponse>
|
|
274
|
+
rescue Emailguard::ApiError => e
|
|
275
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_get_with_http_info: #{e}"
|
|
276
|
+
end
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Parameters
|
|
280
|
+
|
|
281
|
+
This endpoint does not need any parameter.
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
[**GetNotificationChannelsResponse**](GetNotificationChannelsResponse.md)
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: Not defined
|
|
294
|
+
- **Accept**: application/json
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
## api_v1_team_notifications_channels_post
|
|
298
|
+
|
|
299
|
+
> <GetNotificationChannelResponse> api_v1_team_notifications_channels_post(create_notification_channel_input)
|
|
300
|
+
|
|
301
|
+
Create notification channel
|
|
302
|
+
|
|
303
|
+
Creates a delivery channel for the team. Email channels require verification; webhook channels can be verified with the test endpoint.
|
|
304
|
+
|
|
305
|
+
### Examples
|
|
306
|
+
|
|
307
|
+
```ruby
|
|
308
|
+
require 'time'
|
|
309
|
+
require 'emailguard_sdk'
|
|
310
|
+
# setup authorization
|
|
311
|
+
Emailguard.configure do |config|
|
|
312
|
+
# Configure API key authorization: ApiKeyAuth
|
|
313
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
314
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
315
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
api_instance = Emailguard::ChannelsApi.new
|
|
319
|
+
create_notification_channel_input = Emailguard::CreateNotificationChannelInput.new({name: 'name_example', type: 'type_example'}) # CreateNotificationChannelInput | Channel name, type, and type-specific configuration
|
|
320
|
+
|
|
321
|
+
begin
|
|
322
|
+
# Create notification channel
|
|
323
|
+
result = api_instance.api_v1_team_notifications_channels_post(create_notification_channel_input)
|
|
324
|
+
p result
|
|
325
|
+
rescue Emailguard::ApiError => e
|
|
326
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_post: #{e}"
|
|
327
|
+
end
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### Using the api_v1_team_notifications_channels_post_with_http_info variant
|
|
331
|
+
|
|
332
|
+
This returns an Array which contains the response data, status code and headers.
|
|
333
|
+
|
|
334
|
+
> <Array(<GetNotificationChannelResponse>, Integer, Hash)> api_v1_team_notifications_channels_post_with_http_info(create_notification_channel_input)
|
|
335
|
+
|
|
336
|
+
```ruby
|
|
337
|
+
begin
|
|
338
|
+
# Create notification channel
|
|
339
|
+
data, status_code, headers = api_instance.api_v1_team_notifications_channels_post_with_http_info(create_notification_channel_input)
|
|
340
|
+
p status_code # => 2xx
|
|
341
|
+
p headers # => { ... }
|
|
342
|
+
p data # => <GetNotificationChannelResponse>
|
|
343
|
+
rescue Emailguard::ApiError => e
|
|
344
|
+
puts "Error when calling ChannelsApi->api_v1_team_notifications_channels_post_with_http_info: #{e}"
|
|
345
|
+
end
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Parameters
|
|
349
|
+
|
|
350
|
+
| Name | Type | Description | Notes |
|
|
351
|
+
| ---- | ---- | ----------- | ----- |
|
|
352
|
+
| **create_notification_channel_input** | [**CreateNotificationChannelInput**](CreateNotificationChannelInput.md) | Channel name, type, and type-specific configuration | |
|
|
353
|
+
|
|
354
|
+
### Return type
|
|
355
|
+
|
|
356
|
+
[**GetNotificationChannelResponse**](GetNotificationChannelResponse.md)
|
|
357
|
+
|
|
358
|
+
### Authorization
|
|
359
|
+
|
|
360
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
361
|
+
|
|
362
|
+
### HTTP request headers
|
|
363
|
+
|
|
364
|
+
- **Content-Type**: application/json
|
|
365
|
+
- **Accept**: application/json
|
|
366
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Emailguard::CreateNotificationChannelInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **config** | **Hash<String, Object>** | Type-specific configuration (email address, webhook URL, headers, and so on). | [optional] |
|
|
8
|
+
| **name** | **String** | Display name shown in team notification settings. | |
|
|
9
|
+
| **type** | **String** | Channel type (for example email or webhook). | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'emailguard_sdk'
|
|
15
|
+
|
|
16
|
+
instance = Emailguard::CreateNotificationChannelInput.new(
|
|
17
|
+
config: null,
|
|
18
|
+
name: null,
|
|
19
|
+
type: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Emailguard::CreateNotificationRuleInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **channels** | [**Array<NotificationRuleChannelInput>**](NotificationRuleChannelInput.md) | One or more channel targets to notify when matching events occur. | |
|
|
8
|
+
| **conditions** | **Hash<String, Object>** | Optional rule conditions (e.g. usage_threshold for USAGE_API_THRESHOLD). | [optional] |
|
|
9
|
+
| **description** | **String** | Optional longer description of what the rule does. | [optional] |
|
|
10
|
+
| **event_types** | **Array<String>** | Event type identifiers this rule listens for (at least one required). | |
|
|
11
|
+
| **is_enabled** | **Boolean** | When false, the rule is stored but does not deliver events. | [optional] |
|
|
12
|
+
| **name** | **String** | Display name for the rule. | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'emailguard_sdk'
|
|
18
|
+
|
|
19
|
+
instance = Emailguard::CreateNotificationRuleInput.new(
|
|
20
|
+
channels: null,
|
|
21
|
+
conditions: null,
|
|
22
|
+
description: null,
|
|
23
|
+
event_types: null,
|
|
24
|
+
is_enabled: null,
|
|
25
|
+
name: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/EmailApi.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Emailguard::EmailApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://api.emailguard.co*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**api_v1_emails_detect_get**](EmailApi.md#api_v1_emails_detect_get) | **GET** /api/v1/emails/detect | Detect email characteristics |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## api_v1_emails_detect_get
|
|
11
|
+
|
|
12
|
+
> <EmailDetectResponse> api_v1_emails_detect_get(email)
|
|
13
|
+
|
|
14
|
+
Detect email characteristics
|
|
15
|
+
|
|
16
|
+
Analyzes an email for syntax, normalization, typo suggestions, role/public/relay/disposable signals. Invalid TLDs can return suggested_email and suggested_domain while syntax_validation remains false.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'emailguard_sdk'
|
|
23
|
+
|
|
24
|
+
api_instance = Emailguard::EmailApi.new
|
|
25
|
+
email = 'email_example' # String | Email address to analyze
|
|
26
|
+
|
|
27
|
+
begin
|
|
28
|
+
# Detect email characteristics
|
|
29
|
+
result = api_instance.api_v1_emails_detect_get(email)
|
|
30
|
+
p result
|
|
31
|
+
rescue Emailguard::ApiError => e
|
|
32
|
+
puts "Error when calling EmailApi->api_v1_emails_detect_get: #{e}"
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Using the api_v1_emails_detect_get_with_http_info variant
|
|
37
|
+
|
|
38
|
+
This returns an Array which contains the response data, status code and headers.
|
|
39
|
+
|
|
40
|
+
> <Array(<EmailDetectResponse>, Integer, Hash)> api_v1_emails_detect_get_with_http_info(email)
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
begin
|
|
44
|
+
# Detect email characteristics
|
|
45
|
+
data, status_code, headers = api_instance.api_v1_emails_detect_get_with_http_info(email)
|
|
46
|
+
p status_code # => 2xx
|
|
47
|
+
p headers # => { ... }
|
|
48
|
+
p data # => <EmailDetectResponse>
|
|
49
|
+
rescue Emailguard::ApiError => e
|
|
50
|
+
puts "Error when calling EmailApi->api_v1_emails_detect_get_with_http_info: #{e}"
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parameters
|
|
55
|
+
|
|
56
|
+
| Name | Type | Description | Notes |
|
|
57
|
+
| ---- | ---- | ----------- | ----- |
|
|
58
|
+
| **email** | **String** | Email address to analyze | |
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
[**EmailDetectResponse**](EmailDetectResponse.md)
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
No authorization required
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: Not defined
|
|
71
|
+
- **Accept**: application/json
|
|
72
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Emailguard::EmailDetectData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **detection_source** | **String** | | [optional] |
|
|
8
|
+
| **disposable** | **Boolean** | | [optional] |
|
|
9
|
+
| **disposable_provider** | **String** | | [optional] |
|
|
10
|
+
| **domain** | **String** | | [optional] |
|
|
11
|
+
| **email** | **String** | | [optional] |
|
|
12
|
+
| **normalized** | **String** | | [optional] |
|
|
13
|
+
| **public_domain** | **Boolean** | | [optional] |
|
|
14
|
+
| **relay_domain** | **Boolean** | | [optional] |
|
|
15
|
+
| **relay_provider** | **String** | | [optional] |
|
|
16
|
+
| **role_address** | **Boolean** | | [optional] |
|
|
17
|
+
| **subaddressing** | **Boolean** | | [optional] |
|
|
18
|
+
| **suggested_domain** | **String** | Corrected domain candidate when a domain or TLD typo rule matches. | [optional] |
|
|
19
|
+
| **suggested_email** | **String** | Corrected email candidate when a domain or TLD typo rule matches. | [optional] |
|
|
20
|
+
| **syntax_validation** | **Boolean** | | [optional] |
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'emailguard_sdk'
|
|
26
|
+
|
|
27
|
+
instance = Emailguard::EmailDetectData.new(
|
|
28
|
+
detection_source: null,
|
|
29
|
+
disposable: null,
|
|
30
|
+
disposable_provider: null,
|
|
31
|
+
domain: null,
|
|
32
|
+
email: null,
|
|
33
|
+
normalized: null,
|
|
34
|
+
public_domain: null,
|
|
35
|
+
relay_domain: null,
|
|
36
|
+
relay_provider: null,
|
|
37
|
+
role_address: null,
|
|
38
|
+
subaddressing: null,
|
|
39
|
+
suggested_domain: null,
|
|
40
|
+
suggested_email: null,
|
|
41
|
+
syntax_validation: null
|
|
42
|
+
)
|
|
43
|
+
```
|
|
44
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Emailguard::EmailDetectResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **code** | **String** | Machine-readable status code (for example OK or INVALID_BODY). | |
|
|
8
|
+
| **data** | [**EmailDetectData**](EmailDetectData.md) | | [optional] |
|
|
9
|
+
| **message** | **String** | Human-readable detail when the code is not OK. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'emailguard_sdk'
|
|
15
|
+
|
|
16
|
+
instance = Emailguard::EmailDetectResponse.new(
|
|
17
|
+
code: null,
|
|
18
|
+
data: null,
|
|
19
|
+
message: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/EventsApi.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Emailguard::EventsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://api.emailguard.co*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**api_v1_team_notifications_events_get**](EventsApi.md#api_v1_team_notifications_events_get) | **GET** /api/v1/team/notifications/events | List notification events |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## api_v1_team_notifications_events_get
|
|
11
|
+
|
|
12
|
+
> <GetNotificationEventsResponse> api_v1_team_notifications_events_get
|
|
13
|
+
|
|
14
|
+
List notification events
|
|
15
|
+
|
|
16
|
+
Returns recent notification delivery events for polling integrations. Use this to inspect what was sent and when without configuring a webhook receiver.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'emailguard_sdk'
|
|
23
|
+
# setup authorization
|
|
24
|
+
Emailguard.configure do |config|
|
|
25
|
+
# Configure API key authorization: ApiKeyAuth
|
|
26
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
27
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
28
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = Emailguard::EventsApi.new
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
# List notification events
|
|
35
|
+
result = api_instance.api_v1_team_notifications_events_get
|
|
36
|
+
p result
|
|
37
|
+
rescue Emailguard::ApiError => e
|
|
38
|
+
puts "Error when calling EventsApi->api_v1_team_notifications_events_get: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the api_v1_team_notifications_events_get_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(<GetNotificationEventsResponse>, Integer, Hash)> api_v1_team_notifications_events_get_with_http_info
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# List notification events
|
|
51
|
+
data, status_code, headers = api_instance.api_v1_team_notifications_events_get_with_http_info
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => <GetNotificationEventsResponse>
|
|
55
|
+
rescue Emailguard::ApiError => e
|
|
56
|
+
puts "Error when calling EventsApi->api_v1_team_notifications_events_get_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
This endpoint does not need any parameter.
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
[**GetNotificationEventsResponse**](GetNotificationEventsResponse.md)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: application/json
|
|
76
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Emailguard::GetNotificationChannelResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **code** | **String** | Machine-readable status code (for example OK or INVALID_BODY). | |
|
|
8
|
+
| **data** | [**NotificationChannelResponse**](NotificationChannelResponse.md) | | [optional] |
|
|
9
|
+
| **message** | **String** | Human-readable detail when the code is not OK. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'emailguard_sdk'
|
|
15
|
+
|
|
16
|
+
instance = Emailguard::GetNotificationChannelResponse.new(
|
|
17
|
+
code: null,
|
|
18
|
+
data: null,
|
|
19
|
+
message: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Emailguard::GetNotificationChannelsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **code** | **String** | Machine-readable status code (for example OK or INVALID_BODY). | |
|
|
8
|
+
| **data** | [**Array<NotificationChannelResponse>**](NotificationChannelResponse.md) | | [optional] |
|
|
9
|
+
| **message** | **String** | Human-readable detail when the code is not OK. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'emailguard_sdk'
|
|
15
|
+
|
|
16
|
+
instance = Emailguard::GetNotificationChannelsResponse.new(
|
|
17
|
+
code: null,
|
|
18
|
+
data: null,
|
|
19
|
+
message: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|