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
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#EmailGuard Public API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: dev@emailguard.co
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Emailguard
|
|
16
|
+
class RulesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List notification rules
|
|
23
|
+
# Returns routing rules that map event types to one or more delivery channels. Each rule includes its enabled state and channel targets.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [GetNotificationRulesResponse]
|
|
26
|
+
def api_v1_team_notifications_rules_get(opts = {})
|
|
27
|
+
data, _status_code, _headers = api_v1_team_notifications_rules_get_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# List notification rules
|
|
32
|
+
# Returns routing rules that map event types to one or more delivery channels. Each rule includes its enabled state and channel targets.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(GetNotificationRulesResponse, Integer, Hash)>] GetNotificationRulesResponse data, response status code and response headers
|
|
35
|
+
def api_v1_team_notifications_rules_get_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_get ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/api/v1/team/notifications/rules'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'GetNotificationRulesResponse'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"RulesApi.api_v1_team_notifications_rules_get",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Create notification rule
|
|
80
|
+
# Creates a rule that delivers matching events to the specified channels. At least one event type and one channel target are required.
|
|
81
|
+
# @param create_notification_rule_input [CreateNotificationRuleInput] Rule name, event types, and channel targets
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [IdDataResponse]
|
|
84
|
+
def api_v1_team_notifications_rules_post(create_notification_rule_input, opts = {})
|
|
85
|
+
data, _status_code, _headers = api_v1_team_notifications_rules_post_with_http_info(create_notification_rule_input, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Create notification rule
|
|
90
|
+
# Creates a rule that delivers matching events to the specified channels. At least one event type and one channel target are required.
|
|
91
|
+
# @param create_notification_rule_input [CreateNotificationRuleInput] Rule name, event types, and channel targets
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @return [Array<(IdDataResponse, Integer, Hash)>] IdDataResponse data, response status code and response headers
|
|
94
|
+
def api_v1_team_notifications_rules_post_with_http_info(create_notification_rule_input, opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_post ...'
|
|
97
|
+
end
|
|
98
|
+
# verify the required parameter 'create_notification_rule_input' is set
|
|
99
|
+
if @api_client.config.client_side_validation && create_notification_rule_input.nil?
|
|
100
|
+
fail ArgumentError, "Missing the required parameter 'create_notification_rule_input' when calling RulesApi.api_v1_team_notifications_rules_post"
|
|
101
|
+
end
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = '/api/v1/team/notifications/rules'
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = opts[:query_params] || {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = opts[:header_params] || {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
112
|
+
# HTTP header 'Content-Type'
|
|
113
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
114
|
+
if !content_type.nil?
|
|
115
|
+
header_params['Content-Type'] = content_type
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# form parameters
|
|
119
|
+
form_params = opts[:form_params] || {}
|
|
120
|
+
|
|
121
|
+
# http body (model)
|
|
122
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_notification_rule_input)
|
|
123
|
+
|
|
124
|
+
# return_type
|
|
125
|
+
return_type = opts[:debug_return_type] || 'IdDataResponse'
|
|
126
|
+
|
|
127
|
+
# auth_names
|
|
128
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
129
|
+
|
|
130
|
+
new_options = opts.merge(
|
|
131
|
+
:operation => :"RulesApi.api_v1_team_notifications_rules_post",
|
|
132
|
+
:header_params => header_params,
|
|
133
|
+
:query_params => query_params,
|
|
134
|
+
:form_params => form_params,
|
|
135
|
+
:body => post_body,
|
|
136
|
+
:auth_names => auth_names,
|
|
137
|
+
:return_type => return_type
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
141
|
+
if @api_client.config.debugging
|
|
142
|
+
@api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
143
|
+
end
|
|
144
|
+
return data, status_code, headers
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Delete notification rule
|
|
148
|
+
# Permanently deletes a routing rule and its channel assignments.
|
|
149
|
+
# @param rule_id [String] UUID of the notification rule to delete
|
|
150
|
+
# @param [Hash] opts the optional parameters
|
|
151
|
+
# @return [MessageResponse]
|
|
152
|
+
def api_v1_team_notifications_rules_rule_id_delete(rule_id, opts = {})
|
|
153
|
+
data, _status_code, _headers = api_v1_team_notifications_rules_rule_id_delete_with_http_info(rule_id, opts)
|
|
154
|
+
data
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Delete notification rule
|
|
158
|
+
# Permanently deletes a routing rule and its channel assignments.
|
|
159
|
+
# @param rule_id [String] UUID of the notification rule to delete
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
162
|
+
def api_v1_team_notifications_rules_rule_id_delete_with_http_info(rule_id, opts = {})
|
|
163
|
+
if @api_client.config.debugging
|
|
164
|
+
@api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_rule_id_delete ...'
|
|
165
|
+
end
|
|
166
|
+
# verify the required parameter 'rule_id' is set
|
|
167
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
|
168
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling RulesApi.api_v1_team_notifications_rules_rule_id_delete"
|
|
169
|
+
end
|
|
170
|
+
# resource path
|
|
171
|
+
local_var_path = '/api/v1/team/notifications/rules/{ruleId}'.sub('{ruleId}', CGI.escape(rule_id.to_s))
|
|
172
|
+
|
|
173
|
+
# query parameters
|
|
174
|
+
query_params = opts[:query_params] || {}
|
|
175
|
+
|
|
176
|
+
# header parameters
|
|
177
|
+
header_params = opts[:header_params] || {}
|
|
178
|
+
# HTTP header 'Accept' (if needed)
|
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
180
|
+
|
|
181
|
+
# form parameters
|
|
182
|
+
form_params = opts[:form_params] || {}
|
|
183
|
+
|
|
184
|
+
# http body (model)
|
|
185
|
+
post_body = opts[:debug_body]
|
|
186
|
+
|
|
187
|
+
# return_type
|
|
188
|
+
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
189
|
+
|
|
190
|
+
# auth_names
|
|
191
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
192
|
+
|
|
193
|
+
new_options = opts.merge(
|
|
194
|
+
:operation => :"RulesApi.api_v1_team_notifications_rules_rule_id_delete",
|
|
195
|
+
:header_params => header_params,
|
|
196
|
+
:query_params => query_params,
|
|
197
|
+
:form_params => form_params,
|
|
198
|
+
:body => post_body,
|
|
199
|
+
:auth_names => auth_names,
|
|
200
|
+
:return_type => return_type
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
204
|
+
if @api_client.config.debugging
|
|
205
|
+
@api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_rule_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
206
|
+
end
|
|
207
|
+
return data, status_code, headers
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Update notification rule
|
|
211
|
+
# Updates a rule's name, description, event types, enabled flag, or channel targets. When `channels` is sent it replaces all existing targets.
|
|
212
|
+
# @param rule_id [String] UUID of the notification rule to update
|
|
213
|
+
# @param update_notification_rule_input [UpdateNotificationRuleInput] Fields to update on the rule
|
|
214
|
+
# @param [Hash] opts the optional parameters
|
|
215
|
+
# @return [MessageResponse]
|
|
216
|
+
def api_v1_team_notifications_rules_rule_id_put(rule_id, update_notification_rule_input, opts = {})
|
|
217
|
+
data, _status_code, _headers = api_v1_team_notifications_rules_rule_id_put_with_http_info(rule_id, update_notification_rule_input, opts)
|
|
218
|
+
data
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Update notification rule
|
|
222
|
+
# Updates a rule's name, description, event types, enabled flag, or channel targets. When `channels` is sent it replaces all existing targets.
|
|
223
|
+
# @param rule_id [String] UUID of the notification rule to update
|
|
224
|
+
# @param update_notification_rule_input [UpdateNotificationRuleInput] Fields to update on the rule
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
227
|
+
def api_v1_team_notifications_rules_rule_id_put_with_http_info(rule_id, update_notification_rule_input, opts = {})
|
|
228
|
+
if @api_client.config.debugging
|
|
229
|
+
@api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_rule_id_put ...'
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'rule_id' is set
|
|
232
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling RulesApi.api_v1_team_notifications_rules_rule_id_put"
|
|
234
|
+
end
|
|
235
|
+
# verify the required parameter 'update_notification_rule_input' is set
|
|
236
|
+
if @api_client.config.client_side_validation && update_notification_rule_input.nil?
|
|
237
|
+
fail ArgumentError, "Missing the required parameter 'update_notification_rule_input' when calling RulesApi.api_v1_team_notifications_rules_rule_id_put"
|
|
238
|
+
end
|
|
239
|
+
# resource path
|
|
240
|
+
local_var_path = '/api/v1/team/notifications/rules/{ruleId}'.sub('{ruleId}', CGI.escape(rule_id.to_s))
|
|
241
|
+
|
|
242
|
+
# query parameters
|
|
243
|
+
query_params = opts[:query_params] || {}
|
|
244
|
+
|
|
245
|
+
# header parameters
|
|
246
|
+
header_params = opts[:header_params] || {}
|
|
247
|
+
# HTTP header 'Accept' (if needed)
|
|
248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
249
|
+
# HTTP header 'Content-Type'
|
|
250
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
251
|
+
if !content_type.nil?
|
|
252
|
+
header_params['Content-Type'] = content_type
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# form parameters
|
|
256
|
+
form_params = opts[:form_params] || {}
|
|
257
|
+
|
|
258
|
+
# http body (model)
|
|
259
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_notification_rule_input)
|
|
260
|
+
|
|
261
|
+
# return_type
|
|
262
|
+
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
263
|
+
|
|
264
|
+
# auth_names
|
|
265
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
266
|
+
|
|
267
|
+
new_options = opts.merge(
|
|
268
|
+
:operation => :"RulesApi.api_v1_team_notifications_rules_rule_id_put",
|
|
269
|
+
:header_params => header_params,
|
|
270
|
+
:query_params => query_params,
|
|
271
|
+
:form_params => form_params,
|
|
272
|
+
:body => post_body,
|
|
273
|
+
:auth_names => auth_names,
|
|
274
|
+
:return_type => return_type
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
278
|
+
if @api_client.config.debugging
|
|
279
|
+
@api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_rule_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
280
|
+
end
|
|
281
|
+
return data, status_code, headers
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#EmailGuard Public API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: dev@emailguard.co
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Emailguard
|
|
16
|
+
class TeamsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get team
|
|
23
|
+
# Returns profile fields for the team associated with your API key.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [GetPublicTeamResponse]
|
|
26
|
+
def api_v1_team_get(opts = {})
|
|
27
|
+
data, _status_code, _headers = api_v1_team_get_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get team
|
|
32
|
+
# Returns profile fields for the team associated with your API key.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(GetPublicTeamResponse, Integer, Hash)>] GetPublicTeamResponse data, response status code and response headers
|
|
35
|
+
def api_v1_team_get_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.api_v1_team_get ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/api/v1/team'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'GetPublicTeamResponse'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"TeamsApi.api_v1_team_get",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: TeamsApi#api_v1_team_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Update team
|
|
80
|
+
# Updates mutable team profile fields (name, emoji, URL, email). Send only the fields you want to change; omitted fields are left unchanged except `name`, which is required on every request.
|
|
81
|
+
# @param update_team_input [UpdateTeamInput] Team profile fields to update
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [GetPublicTeamResponse]
|
|
84
|
+
def api_v1_team_patch(update_team_input, opts = {})
|
|
85
|
+
data, _status_code, _headers = api_v1_team_patch_with_http_info(update_team_input, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Update team
|
|
90
|
+
# Updates mutable team profile fields (name, emoji, URL, email). Send only the fields you want to change; omitted fields are left unchanged except `name`, which is required on every request.
|
|
91
|
+
# @param update_team_input [UpdateTeamInput] Team profile fields to update
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @return [Array<(GetPublicTeamResponse, Integer, Hash)>] GetPublicTeamResponse data, response status code and response headers
|
|
94
|
+
def api_v1_team_patch_with_http_info(update_team_input, opts = {})
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.api_v1_team_patch ...'
|
|
97
|
+
end
|
|
98
|
+
# verify the required parameter 'update_team_input' is set
|
|
99
|
+
if @api_client.config.client_side_validation && update_team_input.nil?
|
|
100
|
+
fail ArgumentError, "Missing the required parameter 'update_team_input' when calling TeamsApi.api_v1_team_patch"
|
|
101
|
+
end
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = '/api/v1/team'
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = opts[:query_params] || {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = opts[:header_params] || {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
112
|
+
# HTTP header 'Content-Type'
|
|
113
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
114
|
+
if !content_type.nil?
|
|
115
|
+
header_params['Content-Type'] = content_type
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# form parameters
|
|
119
|
+
form_params = opts[:form_params] || {}
|
|
120
|
+
|
|
121
|
+
# http body (model)
|
|
122
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_team_input)
|
|
123
|
+
|
|
124
|
+
# return_type
|
|
125
|
+
return_type = opts[:debug_return_type] || 'GetPublicTeamResponse'
|
|
126
|
+
|
|
127
|
+
# auth_names
|
|
128
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
129
|
+
|
|
130
|
+
new_options = opts.merge(
|
|
131
|
+
:operation => :"TeamsApi.api_v1_team_patch",
|
|
132
|
+
:header_params => header_params,
|
|
133
|
+
:query_params => query_params,
|
|
134
|
+
:form_params => form_params,
|
|
135
|
+
:body => post_body,
|
|
136
|
+
:auth_names => auth_names,
|
|
137
|
+
:return_type => return_type
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
141
|
+
if @api_client.config.debugging
|
|
142
|
+
@api_client.config.logger.debug "API called: TeamsApi#api_v1_team_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
143
|
+
end
|
|
144
|
+
return data, status_code, headers
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|