emailguard_sdk 1.0.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +16 -2
- data/examples/detect-email.rb +5 -0
- data/examples/get-billing-usage.rb +5 -0
- data/examples/get-team.rb +5 -0
- data/examples/list-notification-channels.rb +5 -0
- data/examples/list-pending-team-invites.rb +5 -0
- data/lib/emailguard_sdk/api/billing_api.rb +7 -7
- data/lib/emailguard_sdk/api/channels_api.rb +105 -105
- data/lib/emailguard_sdk/api/email_api.rb +11 -11
- data/lib/emailguard_sdk/api/events_api.rb +7 -7
- data/lib/emailguard_sdk/api/invites_api.rb +60 -60
- data/lib/emailguard_sdk/api/members_api.rb +27 -27
- data/lib/emailguard_sdk/api/rules_api.rb +71 -71
- data/lib/emailguard_sdk/api/teams_api.rb +14 -14
- data/lib/emailguard_sdk/api_client.rb +1 -1
- data/lib/emailguard_sdk/api_error.rb +1 -1
- data/lib/emailguard_sdk/api_model_base.rb +1 -1
- data/lib/emailguard_sdk/configuration.rb +3 -3
- data/lib/emailguard_sdk/facade.rb +191 -0
- data/lib/emailguard_sdk/models/base_response.rb +3 -3
- data/lib/emailguard_sdk/models/billing_usage_event.rb +1 -1
- data/lib/emailguard_sdk/models/billing_usage_item.rb +1 -1
- data/lib/emailguard_sdk/models/billing_usage_response.rb +3 -3
- data/lib/emailguard_sdk/models/create_notification_channel_input.rb +1 -1
- data/lib/emailguard_sdk/models/create_notification_rule_input.rb +1 -1
- data/lib/emailguard_sdk/models/email_detect_data.rb +68 -6
- data/lib/emailguard_sdk/models/email_detect_evidence.rb +1 -1
- data/lib/emailguard_sdk/models/email_detect_matched_rule.rb +165 -0
- data/lib/emailguard_sdk/models/email_detect_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_channel_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_channels_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_events_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_notification_rules_response.rb +3 -3
- data/lib/emailguard_sdk/models/get_public_team_response.rb +3 -3
- data/lib/emailguard_sdk/models/id_data_response.rb +3 -3
- data/lib/emailguard_sdk/models/id_data_struct.rb +1 -1
- data/lib/emailguard_sdk/models/invite_team_member_input.rb +1 -1
- data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +3 -3
- data/lib/emailguard_sdk/models/list_public_team_members_response.rb +3 -3
- data/lib/emailguard_sdk/models/message_response.rb +3 -3
- data/lib/emailguard_sdk/models/notification_channel_response.rb +1 -1
- data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +1 -1
- data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +1 -1
- data/lib/emailguard_sdk/models/notification_rule_response.rb +1 -1
- data/lib/emailguard_sdk/models/public_team_invite_response.rb +1 -1
- data/lib/emailguard_sdk/models/public_team_member_response.rb +1 -1
- data/lib/emailguard_sdk/models/public_team_response.rb +1 -1
- data/lib/emailguard_sdk/models/{update_team_member_input.rb → public_update_team_member_input.rb} +5 -32
- data/lib/emailguard_sdk/models/update_notification_channel_input.rb +1 -1
- data/lib/emailguard_sdk/models/update_notification_rule_input.rb +1 -1
- data/lib/emailguard_sdk/models/update_team_input.rb +1 -1
- data/lib/emailguard_sdk/version.rb +2 -2
- data/lib/emailguard_sdk.rb +4 -2
- data/spec/facade_contract_spec.rb +340 -0
- data/spec/spec_helper.rb +1 -111
- metadata +15 -126
- data/Gemfile +0 -9
- data/Rakefile +0 -10
- data/docs/BaseResponse.md +0 -20
- data/docs/BillingApi.md +0 -85
- data/docs/BillingUsageEvent.md +0 -26
- data/docs/BillingUsageItem.md +0 -28
- data/docs/BillingUsageResponse.md +0 -22
- data/docs/ChannelsApi.md +0 -366
- data/docs/CreateNotificationChannelInput.md +0 -22
- data/docs/CreateNotificationRuleInput.md +0 -28
- data/docs/EmailApi.md +0 -72
- data/docs/EmailDetectData.md +0 -48
- data/docs/EmailDetectEvidence.md +0 -22
- data/docs/EmailDetectResponse.md +0 -22
- data/docs/EventsApi.md +0 -76
- data/docs/GetNotificationChannelResponse.md +0 -22
- data/docs/GetNotificationChannelsResponse.md +0 -22
- data/docs/GetNotificationEventsResponse.md +0 -22
- data/docs/GetNotificationRulesResponse.md +0 -22
- data/docs/GetPublicTeamResponse.md +0 -22
- data/docs/IdDataResponse.md +0 -22
- data/docs/IdDataStruct.md +0 -18
- data/docs/InviteTeamMemberInput.md +0 -20
- data/docs/InvitesApi.md +0 -220
- data/docs/ListPublicTeamInvitesResponse.md +0 -22
- data/docs/ListPublicTeamMembersResponse.md +0 -22
- data/docs/MembersApi.md +0 -222
- data/docs/MessageResponse.md +0 -20
- data/docs/NotificationChannelResponse.md +0 -28
- data/docs/NotificationRuleChannelInput.md +0 -22
- data/docs/NotificationRuleChannelResponse.md +0 -28
- data/docs/NotificationRuleResponse.md +0 -32
- data/docs/PublicTeamInviteResponse.md +0 -24
- data/docs/PublicTeamMemberResponse.md +0 -34
- data/docs/PublicTeamResponse.md +0 -28
- data/docs/RulesApi.md +0 -294
- data/docs/TeamsApi.md +0 -148
- data/docs/UpdateNotificationChannelInput.md +0 -20
- data/docs/UpdateNotificationRuleInput.md +0 -28
- data/docs/UpdateTeamInput.md +0 -24
- data/docs/UpdateTeamMemberInput.md +0 -22
- data/emailguard_sdk.gemspec +0 -44
- data/git_push.sh +0 -57
- data/spec/api/billing_api_spec.rb +0 -49
- data/spec/api/channels_api_spec.rb +0 -95
- data/spec/api/email_api_spec.rb +0 -47
- data/spec/api/events_api_spec.rb +0 -46
- data/spec/api/invites_api_spec.rb +0 -70
- data/spec/api/members_api_spec.rb +0 -71
- data/spec/api/rules_api_spec.rb +0 -83
- data/spec/api/teams_api_spec.rb +0 -58
- data/spec/models/base_response_spec.rb +0 -42
- data/spec/models/billing_usage_event_spec.rb +0 -60
- data/spec/models/billing_usage_item_spec.rb +0 -66
- data/spec/models/billing_usage_response_spec.rb +0 -48
- data/spec/models/create_notification_channel_input_spec.rb +0 -48
- data/spec/models/create_notification_rule_input_spec.rb +0 -66
- data/spec/models/email_detect_data_spec.rb +0 -126
- data/spec/models/email_detect_evidence_spec.rb +0 -48
- data/spec/models/email_detect_response_spec.rb +0 -48
- data/spec/models/get_notification_channel_response_spec.rb +0 -48
- data/spec/models/get_notification_channels_response_spec.rb +0 -48
- data/spec/models/get_notification_events_response_spec.rb +0 -48
- data/spec/models/get_notification_rules_response_spec.rb +0 -48
- data/spec/models/get_public_team_response_spec.rb +0 -48
- data/spec/models/id_data_response_spec.rb +0 -48
- data/spec/models/id_data_struct_spec.rb +0 -36
- data/spec/models/invite_team_member_input_spec.rb +0 -42
- data/spec/models/list_public_team_invites_response_spec.rb +0 -48
- data/spec/models/list_public_team_members_response_spec.rb +0 -48
- data/spec/models/message_response_spec.rb +0 -42
- data/spec/models/notification_channel_response_spec.rb +0 -66
- data/spec/models/notification_rule_channel_input_spec.rb +0 -48
- data/spec/models/notification_rule_channel_response_spec.rb +0 -66
- data/spec/models/notification_rule_response_spec.rb +0 -78
- data/spec/models/public_team_invite_response_spec.rb +0 -54
- data/spec/models/public_team_member_response_spec.rb +0 -84
- data/spec/models/public_team_response_spec.rb +0 -66
- data/spec/models/update_notification_channel_input_spec.rb +0 -42
- data/spec/models/update_notification_rule_input_spec.rb +0 -66
- data/spec/models/update_team_input_spec.rb +0 -54
- data/spec/models/update_team_member_input_spec.rb +0 -48
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.3
|
|
7
7
|
Contact: dev@emailguard.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -23,8 +23,8 @@ module Emailguard
|
|
|
23
23
|
# Returns recent notification delivery events for polling integrations. Use this to inspect what was sent and when without configuring a webhook receiver.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [GetNotificationEventsResponse]
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
26
|
+
def list_notification_events(opts = {})
|
|
27
|
+
data, _status_code, _headers = list_notification_events_with_http_info(opts)
|
|
28
28
|
data
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -32,9 +32,9 @@ module Emailguard
|
|
|
32
32
|
# Returns recent notification delivery events for polling integrations. Use this to inspect what was sent and when without configuring a webhook receiver.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(GetNotificationEventsResponse, Integer, Hash)>] GetNotificationEventsResponse data, response status code and response headers
|
|
35
|
-
def
|
|
35
|
+
def list_notification_events_with_http_info(opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: EventsApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.list_notification_events ...'
|
|
38
38
|
end
|
|
39
39
|
# resource path
|
|
40
40
|
local_var_path = '/api/v1/team/notifications/events'
|
|
@@ -60,7 +60,7 @@ module Emailguard
|
|
|
60
60
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
61
|
|
|
62
62
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"EventsApi.
|
|
63
|
+
:operation => :"EventsApi.list_notification_events",
|
|
64
64
|
:header_params => header_params,
|
|
65
65
|
:query_params => query_params,
|
|
66
66
|
:form_params => form_params,
|
|
@@ -71,7 +71,7 @@ module Emailguard
|
|
|
71
71
|
|
|
72
72
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
73
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: EventsApi#
|
|
74
|
+
@api_client.config.logger.debug "API called: EventsApi#list_notification_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
75
|
end
|
|
76
76
|
return data, status_code, headers
|
|
77
77
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.3
|
|
7
7
|
Contact: dev@emailguard.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -19,25 +19,31 @@ module Emailguard
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Cancel a pending invite
|
|
23
|
+
# Revokes a pending invite so it can no longer be accepted. The invite is identified by its UUID from the list invites response.
|
|
24
|
+
# @param invite_id [String] UUID of the pending invite to cancel
|
|
24
25
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
26
|
+
# @return [MessageResponse]
|
|
27
|
+
def cancel_pending_invite(invite_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = cancel_pending_invite_with_http_info(invite_id, opts)
|
|
28
29
|
data
|
|
29
30
|
end
|
|
30
31
|
|
|
31
|
-
#
|
|
32
|
-
#
|
|
32
|
+
# Cancel a pending invite
|
|
33
|
+
# Revokes a pending invite so it can no longer be accepted. The invite is identified by its UUID from the list invites response.
|
|
34
|
+
# @param invite_id [String] UUID of the pending invite to cancel
|
|
33
35
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
35
|
-
def
|
|
36
|
+
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
37
|
+
def cancel_pending_invite_with_http_info(invite_id, opts = {})
|
|
36
38
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: InvitesApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: InvitesApi.cancel_pending_invite ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'invite_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && invite_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'invite_id' when calling InvitesApi.cancel_pending_invite"
|
|
38
44
|
end
|
|
39
45
|
# resource path
|
|
40
|
-
local_var_path = '/api/v1/team/members/invites'
|
|
46
|
+
local_var_path = '/api/v1/team/members/invites/{inviteId}'.sub('{inviteId}', CGI.escape(invite_id.to_s))
|
|
41
47
|
|
|
42
48
|
# query parameters
|
|
43
49
|
query_params = opts[:query_params] || {}
|
|
@@ -54,13 +60,13 @@ module Emailguard
|
|
|
54
60
|
post_body = opts[:debug_body]
|
|
55
61
|
|
|
56
62
|
# return_type
|
|
57
|
-
return_type = opts[:debug_return_type] || '
|
|
63
|
+
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
58
64
|
|
|
59
65
|
# auth_names
|
|
60
66
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
67
|
|
|
62
68
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"InvitesApi.
|
|
69
|
+
:operation => :"InvitesApi.cancel_pending_invite",
|
|
64
70
|
:header_params => header_params,
|
|
65
71
|
:query_params => query_params,
|
|
66
72
|
:form_params => form_params,
|
|
@@ -69,38 +75,38 @@ module Emailguard
|
|
|
69
75
|
:return_type => return_type
|
|
70
76
|
)
|
|
71
77
|
|
|
72
|
-
data, status_code, headers = @api_client.call_api(:
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
73
79
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: InvitesApi#
|
|
80
|
+
@api_client.config.logger.debug "API called: InvitesApi#cancel_pending_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
81
|
end
|
|
76
82
|
return data, status_code, headers
|
|
77
83
|
end
|
|
78
84
|
|
|
79
|
-
#
|
|
80
|
-
#
|
|
81
|
-
# @param
|
|
85
|
+
# Invite a team member
|
|
86
|
+
# Sends an email invite to join the team with the specified role. The invitee must accept before they appear in the members list.
|
|
87
|
+
# @param invite_team_member_input [InviteTeamMemberInput] Invitee email and role to assign on acceptance
|
|
82
88
|
# @param [Hash] opts the optional parameters
|
|
83
89
|
# @return [MessageResponse]
|
|
84
|
-
def
|
|
85
|
-
data, _status_code, _headers =
|
|
90
|
+
def invite_team_member(invite_team_member_input, opts = {})
|
|
91
|
+
data, _status_code, _headers = invite_team_member_with_http_info(invite_team_member_input, opts)
|
|
86
92
|
data
|
|
87
93
|
end
|
|
88
94
|
|
|
89
|
-
#
|
|
90
|
-
#
|
|
91
|
-
# @param
|
|
95
|
+
# Invite a team member
|
|
96
|
+
# Sends an email invite to join the team with the specified role. The invitee must accept before they appear in the members list.
|
|
97
|
+
# @param invite_team_member_input [InviteTeamMemberInput] Invitee email and role to assign on acceptance
|
|
92
98
|
# @param [Hash] opts the optional parameters
|
|
93
99
|
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
94
|
-
def
|
|
100
|
+
def invite_team_member_with_http_info(invite_team_member_input, opts = {})
|
|
95
101
|
if @api_client.config.debugging
|
|
96
|
-
@api_client.config.logger.debug 'Calling API: InvitesApi.
|
|
102
|
+
@api_client.config.logger.debug 'Calling API: InvitesApi.invite_team_member ...'
|
|
97
103
|
end
|
|
98
|
-
# verify the required parameter '
|
|
99
|
-
if @api_client.config.client_side_validation &&
|
|
100
|
-
fail ArgumentError, "Missing the required parameter '
|
|
104
|
+
# verify the required parameter 'invite_team_member_input' is set
|
|
105
|
+
if @api_client.config.client_side_validation && invite_team_member_input.nil?
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'invite_team_member_input' when calling InvitesApi.invite_team_member"
|
|
101
107
|
end
|
|
102
108
|
# resource path
|
|
103
|
-
local_var_path = '/api/v1/team/members/invites
|
|
109
|
+
local_var_path = '/api/v1/team/members/invites'
|
|
104
110
|
|
|
105
111
|
# query parameters
|
|
106
112
|
query_params = opts[:query_params] || {}
|
|
@@ -109,12 +115,17 @@ module Emailguard
|
|
|
109
115
|
header_params = opts[:header_params] || {}
|
|
110
116
|
# HTTP header 'Accept' (if needed)
|
|
111
117
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
118
|
+
# HTTP header 'Content-Type'
|
|
119
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
120
|
+
if !content_type.nil?
|
|
121
|
+
header_params['Content-Type'] = content_type
|
|
122
|
+
end
|
|
112
123
|
|
|
113
124
|
# form parameters
|
|
114
125
|
form_params = opts[:form_params] || {}
|
|
115
126
|
|
|
116
127
|
# http body (model)
|
|
117
|
-
post_body = opts[:debug_body]
|
|
128
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(invite_team_member_input)
|
|
118
129
|
|
|
119
130
|
# return_type
|
|
120
131
|
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
@@ -123,7 +134,7 @@ module Emailguard
|
|
|
123
134
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
124
135
|
|
|
125
136
|
new_options = opts.merge(
|
|
126
|
-
:operation => :"InvitesApi.
|
|
137
|
+
:operation => :"InvitesApi.invite_team_member",
|
|
127
138
|
:header_params => header_params,
|
|
128
139
|
:query_params => query_params,
|
|
129
140
|
:form_params => form_params,
|
|
@@ -132,35 +143,29 @@ module Emailguard
|
|
|
132
143
|
:return_type => return_type
|
|
133
144
|
)
|
|
134
145
|
|
|
135
|
-
data, status_code, headers = @api_client.call_api(:
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
136
147
|
if @api_client.config.debugging
|
|
137
|
-
@api_client.config.logger.debug "API called: InvitesApi#
|
|
148
|
+
@api_client.config.logger.debug "API called: InvitesApi#invite_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
149
|
end
|
|
139
150
|
return data, status_code, headers
|
|
140
151
|
end
|
|
141
152
|
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
# @param invite_team_member_input [InviteTeamMemberInput] Invitee email and role to assign on acceptance
|
|
153
|
+
# List pending team invites
|
|
154
|
+
# Returns invites that have not yet been accepted or expired. Each invite includes the target email, assigned role, and expiry time.
|
|
145
155
|
# @param [Hash] opts the optional parameters
|
|
146
|
-
# @return [
|
|
147
|
-
def
|
|
148
|
-
data, _status_code, _headers =
|
|
156
|
+
# @return [ListPublicTeamInvitesResponse]
|
|
157
|
+
def list_pending_team_invites(opts = {})
|
|
158
|
+
data, _status_code, _headers = list_pending_team_invites_with_http_info(opts)
|
|
149
159
|
data
|
|
150
160
|
end
|
|
151
161
|
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
# @param invite_team_member_input [InviteTeamMemberInput] Invitee email and role to assign on acceptance
|
|
162
|
+
# List pending team invites
|
|
163
|
+
# Returns invites that have not yet been accepted or expired. Each invite includes the target email, assigned role, and expiry time.
|
|
155
164
|
# @param [Hash] opts the optional parameters
|
|
156
|
-
# @return [Array<(
|
|
157
|
-
def
|
|
165
|
+
# @return [Array<(ListPublicTeamInvitesResponse, Integer, Hash)>] ListPublicTeamInvitesResponse data, response status code and response headers
|
|
166
|
+
def list_pending_team_invites_with_http_info(opts = {})
|
|
158
167
|
if @api_client.config.debugging
|
|
159
|
-
@api_client.config.logger.debug 'Calling API: InvitesApi.
|
|
160
|
-
end
|
|
161
|
-
# verify the required parameter 'invite_team_member_input' is set
|
|
162
|
-
if @api_client.config.client_side_validation && invite_team_member_input.nil?
|
|
163
|
-
fail ArgumentError, "Missing the required parameter 'invite_team_member_input' when calling InvitesApi.api_v1_team_members_invites_post"
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: InvitesApi.list_pending_team_invites ...'
|
|
164
169
|
end
|
|
165
170
|
# resource path
|
|
166
171
|
local_var_path = '/api/v1/team/members/invites'
|
|
@@ -172,26 +177,21 @@ module Emailguard
|
|
|
172
177
|
header_params = opts[:header_params] || {}
|
|
173
178
|
# HTTP header 'Accept' (if needed)
|
|
174
179
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
175
|
-
# HTTP header 'Content-Type'
|
|
176
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
177
|
-
if !content_type.nil?
|
|
178
|
-
header_params['Content-Type'] = content_type
|
|
179
|
-
end
|
|
180
180
|
|
|
181
181
|
# form parameters
|
|
182
182
|
form_params = opts[:form_params] || {}
|
|
183
183
|
|
|
184
184
|
# http body (model)
|
|
185
|
-
post_body = opts[:debug_body]
|
|
185
|
+
post_body = opts[:debug_body]
|
|
186
186
|
|
|
187
187
|
# return_type
|
|
188
|
-
return_type = opts[:debug_return_type] || '
|
|
188
|
+
return_type = opts[:debug_return_type] || 'ListPublicTeamInvitesResponse'
|
|
189
189
|
|
|
190
190
|
# auth_names
|
|
191
191
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
192
192
|
|
|
193
193
|
new_options = opts.merge(
|
|
194
|
-
:operation => :"InvitesApi.
|
|
194
|
+
:operation => :"InvitesApi.list_pending_team_invites",
|
|
195
195
|
:header_params => header_params,
|
|
196
196
|
:query_params => query_params,
|
|
197
197
|
:form_params => form_params,
|
|
@@ -200,9 +200,9 @@ module Emailguard
|
|
|
200
200
|
:return_type => return_type
|
|
201
201
|
)
|
|
202
202
|
|
|
203
|
-
data, status_code, headers = @api_client.call_api(:
|
|
203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
204
204
|
if @api_client.config.debugging
|
|
205
|
-
@api_client.config.logger.debug "API called: InvitesApi#
|
|
205
|
+
@api_client.config.logger.debug "API called: InvitesApi#list_pending_team_invites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
206
206
|
end
|
|
207
207
|
return data, status_code, headers
|
|
208
208
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.3
|
|
7
7
|
Contact: dev@emailguard.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -23,8 +23,8 @@ module Emailguard
|
|
|
23
23
|
# Returns every member of the team, including role, profile fields, and join timestamp. Use the `user_id` field when calling member update or remove routes.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [ListPublicTeamMembersResponse]
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
26
|
+
def list_team_members(opts = {})
|
|
27
|
+
data, _status_code, _headers = list_team_members_with_http_info(opts)
|
|
28
28
|
data
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -32,9 +32,9 @@ module Emailguard
|
|
|
32
32
|
# Returns every member of the team, including role, profile fields, and join timestamp. Use the `user_id` field when calling member update or remove routes.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(ListPublicTeamMembersResponse, Integer, Hash)>] ListPublicTeamMembersResponse data, response status code and response headers
|
|
35
|
-
def
|
|
35
|
+
def list_team_members_with_http_info(opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: MembersApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: MembersApi.list_team_members ...'
|
|
38
38
|
end
|
|
39
39
|
# resource path
|
|
40
40
|
local_var_path = '/api/v1/team/members'
|
|
@@ -60,7 +60,7 @@ module Emailguard
|
|
|
60
60
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
61
|
|
|
62
62
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"MembersApi.
|
|
63
|
+
:operation => :"MembersApi.list_team_members",
|
|
64
64
|
:header_params => header_params,
|
|
65
65
|
:query_params => query_params,
|
|
66
66
|
:form_params => form_params,
|
|
@@ -71,7 +71,7 @@ module Emailguard
|
|
|
71
71
|
|
|
72
72
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
73
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: MembersApi#
|
|
74
|
+
@api_client.config.logger.debug "API called: MembersApi#list_team_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
75
|
end
|
|
76
76
|
return data, status_code, headers
|
|
77
77
|
end
|
|
@@ -81,8 +81,8 @@ module Emailguard
|
|
|
81
81
|
# @param user_id [String] User account UUID of the member to remove
|
|
82
82
|
# @param [Hash] opts the optional parameters
|
|
83
83
|
# @return [MessageResponse]
|
|
84
|
-
def
|
|
85
|
-
data, _status_code, _headers =
|
|
84
|
+
def remove_team_member(user_id, opts = {})
|
|
85
|
+
data, _status_code, _headers = remove_team_member_with_http_info(user_id, opts)
|
|
86
86
|
data
|
|
87
87
|
end
|
|
88
88
|
|
|
@@ -91,13 +91,13 @@ module Emailguard
|
|
|
91
91
|
# @param user_id [String] User account UUID of the member to remove
|
|
92
92
|
# @param [Hash] opts the optional parameters
|
|
93
93
|
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
94
|
-
def
|
|
94
|
+
def remove_team_member_with_http_info(user_id, opts = {})
|
|
95
95
|
if @api_client.config.debugging
|
|
96
|
-
@api_client.config.logger.debug 'Calling API: MembersApi.
|
|
96
|
+
@api_client.config.logger.debug 'Calling API: MembersApi.remove_team_member ...'
|
|
97
97
|
end
|
|
98
98
|
# verify the required parameter 'user_id' is set
|
|
99
99
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
100
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.
|
|
100
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.remove_team_member"
|
|
101
101
|
end
|
|
102
102
|
# resource path
|
|
103
103
|
local_var_path = '/api/v1/team/members/{userId}'.sub('{userId}', CGI.escape(user_id.to_s))
|
|
@@ -123,7 +123,7 @@ module Emailguard
|
|
|
123
123
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
124
124
|
|
|
125
125
|
new_options = opts.merge(
|
|
126
|
-
:operation => :"MembersApi.
|
|
126
|
+
:operation => :"MembersApi.remove_team_member",
|
|
127
127
|
:header_params => header_params,
|
|
128
128
|
:query_params => query_params,
|
|
129
129
|
:form_params => form_params,
|
|
@@ -134,7 +134,7 @@ module Emailguard
|
|
|
134
134
|
|
|
135
135
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
136
136
|
if @api_client.config.debugging
|
|
137
|
-
@api_client.config.logger.debug "API called: MembersApi#
|
|
137
|
+
@api_client.config.logger.debug "API called: MembersApi#remove_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
138
|
end
|
|
139
139
|
return data, status_code, headers
|
|
140
140
|
end
|
|
@@ -142,31 +142,31 @@ module Emailguard
|
|
|
142
142
|
# Update a team member role
|
|
143
143
|
# Changes a member's role or internal notes. Identify the member by user account UUID in the path (not the team membership record ID).
|
|
144
144
|
# @param user_id [String] User account UUID of the member to update
|
|
145
|
-
# @param
|
|
145
|
+
# @param public_update_team_member_input [PublicUpdateTeamMemberInput] New role and/or notes for the member
|
|
146
146
|
# @param [Hash] opts the optional parameters
|
|
147
147
|
# @return [MessageResponse]
|
|
148
|
-
def
|
|
149
|
-
data, _status_code, _headers =
|
|
148
|
+
def update_team_member(user_id, public_update_team_member_input, opts = {})
|
|
149
|
+
data, _status_code, _headers = update_team_member_with_http_info(user_id, public_update_team_member_input, opts)
|
|
150
150
|
data
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Update a team member role
|
|
154
154
|
# Changes a member's role or internal notes. Identify the member by user account UUID in the path (not the team membership record ID).
|
|
155
155
|
# @param user_id [String] User account UUID of the member to update
|
|
156
|
-
# @param
|
|
156
|
+
# @param public_update_team_member_input [PublicUpdateTeamMemberInput] New role and/or notes for the member
|
|
157
157
|
# @param [Hash] opts the optional parameters
|
|
158
158
|
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
159
|
-
def
|
|
159
|
+
def update_team_member_with_http_info(user_id, public_update_team_member_input, opts = {})
|
|
160
160
|
if @api_client.config.debugging
|
|
161
|
-
@api_client.config.logger.debug 'Calling API: MembersApi.
|
|
161
|
+
@api_client.config.logger.debug 'Calling API: MembersApi.update_team_member ...'
|
|
162
162
|
end
|
|
163
163
|
# verify the required parameter 'user_id' is set
|
|
164
164
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
165
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.
|
|
165
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.update_team_member"
|
|
166
166
|
end
|
|
167
|
-
# verify the required parameter '
|
|
168
|
-
if @api_client.config.client_side_validation &&
|
|
169
|
-
fail ArgumentError, "Missing the required parameter '
|
|
167
|
+
# verify the required parameter 'public_update_team_member_input' is set
|
|
168
|
+
if @api_client.config.client_side_validation && public_update_team_member_input.nil?
|
|
169
|
+
fail ArgumentError, "Missing the required parameter 'public_update_team_member_input' when calling MembersApi.update_team_member"
|
|
170
170
|
end
|
|
171
171
|
# resource path
|
|
172
172
|
local_var_path = '/api/v1/team/members/{userId}'.sub('{userId}', CGI.escape(user_id.to_s))
|
|
@@ -188,7 +188,7 @@ module Emailguard
|
|
|
188
188
|
form_params = opts[:form_params] || {}
|
|
189
189
|
|
|
190
190
|
# http body (model)
|
|
191
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
191
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(public_update_team_member_input)
|
|
192
192
|
|
|
193
193
|
# return_type
|
|
194
194
|
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
@@ -197,7 +197,7 @@ module Emailguard
|
|
|
197
197
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
198
198
|
|
|
199
199
|
new_options = opts.merge(
|
|
200
|
-
:operation => :"MembersApi.
|
|
200
|
+
:operation => :"MembersApi.update_team_member",
|
|
201
201
|
:header_params => header_params,
|
|
202
202
|
:query_params => query_params,
|
|
203
203
|
:form_params => form_params,
|
|
@@ -208,7 +208,7 @@ module Emailguard
|
|
|
208
208
|
|
|
209
209
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
210
210
|
if @api_client.config.debugging
|
|
211
|
-
@api_client.config.logger.debug "API called: MembersApi#
|
|
211
|
+
@api_client.config.logger.debug "API called: MembersApi#update_team_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
212
212
|
end
|
|
213
213
|
return data, status_code, headers
|
|
214
214
|
end
|