agent_push_kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +145 -0
- data/LICENSE +21 -0
- data/README.md +195 -0
- data/Rakefile +10 -0
- data/agent_push_kit.gemspec +39 -0
- data/docs/AcceptedResponse.md +18 -0
- data/docs/AccountApi.md +137 -0
- data/docs/AddMemberInput.md +18 -0
- data/docs/AgentToken.md +30 -0
- data/docs/AgentTokenCreated.md +32 -0
- data/docs/AgentTokensApi.md +279 -0
- data/docs/ApiKeySummary.md +22 -0
- data/docs/AuthResponse.md +24 -0
- data/docs/AuthenticationApi.md +385 -0
- data/docs/CreateAgentTokenInput.md +18 -0
- data/docs/CreateOrganizationInput.md +18 -0
- data/docs/CurrentAccount.md +20 -0
- data/docs/CustomerAccountsApi.md +348 -0
- data/docs/DeletedResponse.md +18 -0
- data/docs/DeliverySummary.md +24 -0
- data/docs/Device.md +28 -0
- data/docs/DevicesApi.md +344 -0
- data/docs/DisabledResponse.md +18 -0
- data/docs/ErrorResponse.md +22 -0
- data/docs/EventDetail.md +36 -0
- data/docs/EventFilter.md +53 -0
- data/docs/EventPage.md +20 -0
- data/docs/EventSummary.md +32 -0
- data/docs/EventsApi.md +505 -0
- data/docs/FilterGroup.md +20 -0
- data/docs/FilterNot.md +20 -0
- data/docs/HealthApi.md +67 -0
- data/docs/HealthResponse.md +20 -0
- data/docs/IngestionResult.md +22 -0
- data/docs/InheritedResponse.md +18 -0
- data/docs/Membership.md +24 -0
- data/docs/MembershipUser.md +22 -0
- data/docs/Organization.md +32 -0
- data/docs/OrganizationApiKeyCreated.md +24 -0
- data/docs/OrganizationCount.md +20 -0
- data/docs/OrganizationCreated.md +20 -0
- data/docs/OrganizationRecord.md +24 -0
- data/docs/PasswordLoginInput.md +20 -0
- data/docs/PasswordResetCompleteInput.md +20 -0
- data/docs/PasswordResetRequestInput.md +18 -0
- data/docs/PreferenceRecord.md +24 -0
- data/docs/PreferencesApi.md +287 -0
- data/docs/ProviderLoginInput.md +20 -0
- data/docs/RegisterDeviceInput.md +24 -0
- data/docs/RegisterInput.md +22 -0
- data/docs/RegisterWebPushSubscriptionInput.md +20 -0
- data/docs/RegisterWebPushSubscriptionInputKeys.md +20 -0
- data/docs/RevokedResponse.md +18 -0
- data/docs/SearchEventsInput.md +22 -0
- data/docs/SendEventInput.md +32 -0
- data/docs/Service.md +26 -0
- data/docs/ServiceAllOfCount.md +18 -0
- data/docs/ServicePreference.md +26 -0
- data/docs/ServiceSummary.md +22 -0
- data/docs/SetEnabledInput.md +18 -0
- data/docs/TextFilterCondition.md +22 -0
- data/docs/TimeFilterCondition.md +22 -0
- data/docs/TypeOverride.md +22 -0
- data/docs/User.md +28 -0
- data/docs/WebPushConfiguration.md +20 -0
- data/docs/WebPushSubscription.md +22 -0
- data/git_push.sh +57 -0
- data/lib/agent_push_kit/api/account_api.rb +132 -0
- data/lib/agent_push_kit/api/agent_tokens_api.rb +274 -0
- data/lib/agent_push_kit/api/authentication_api.rb +418 -0
- data/lib/agent_push_kit/api/customer_accounts_api.rb +339 -0
- data/lib/agent_push_kit/api/devices_api.rb +339 -0
- data/lib/agent_push_kit/api/events_api.rb +520 -0
- data/lib/agent_push_kit/api/health_api.rb +77 -0
- data/lib/agent_push_kit/api/preferences_api.rb +308 -0
- data/lib/agent_push_kit/api_client.rb +397 -0
- data/lib/agent_push_kit/api_error.rb +58 -0
- data/lib/agent_push_kit/api_model_base.rb +88 -0
- data/lib/agent_push_kit/configuration.rb +325 -0
- data/lib/agent_push_kit/models/accepted_response.rb +164 -0
- data/lib/agent_push_kit/models/add_member_input.rb +173 -0
- data/lib/agent_push_kit/models/agent_token.rb +292 -0
- data/lib/agent_push_kit/models/agent_token_created.rb +364 -0
- data/lib/agent_push_kit/models/api_key_summary.rb +165 -0
- data/lib/agent_push_kit/models/auth_response.rb +228 -0
- data/lib/agent_push_kit/models/create_agent_token_input.rb +182 -0
- data/lib/agent_push_kit/models/create_organization_input.rb +182 -0
- data/lib/agent_push_kit/models/current_account.rb +192 -0
- data/lib/agent_push_kit/models/deleted_response.rb +164 -0
- data/lib/agent_push_kit/models/delivery_summary.rb +242 -0
- data/lib/agent_push_kit/models/device.rb +304 -0
- data/lib/agent_push_kit/models/disabled_response.rb +164 -0
- data/lib/agent_push_kit/models/error_response.rb +199 -0
- data/lib/agent_push_kit/models/event_detail.rb +393 -0
- data/lib/agent_push_kit/models/event_filter.rb +106 -0
- data/lib/agent_push_kit/models/event_page.rb +178 -0
- data/lib/agent_push_kit/models/event_summary.rb +318 -0
- data/lib/agent_push_kit/models/filter_group.rb +234 -0
- data/lib/agent_push_kit/models/filter_not.rb +214 -0
- data/lib/agent_push_kit/models/health_response.rb +216 -0
- data/lib/agent_push_kit/models/ingestion_result.rb +216 -0
- data/lib/agent_push_kit/models/inherited_response.rb +164 -0
- data/lib/agent_push_kit/models/membership.rb +266 -0
- data/lib/agent_push_kit/models/membership_user.rb +202 -0
- data/lib/agent_push_kit/models/organization.rb +337 -0
- data/lib/agent_push_kit/models/organization_api_key_created.rb +253 -0
- data/lib/agent_push_kit/models/organization_count.rb +156 -0
- data/lib/agent_push_kit/models/organization_created.rb +201 -0
- data/lib/agent_push_kit/models/organization_record.rb +242 -0
- data/lib/agent_push_kit/models/password_login_input.rb +217 -0
- data/lib/agent_push_kit/models/password_reset_complete_input.rb +217 -0
- data/lib/agent_push_kit/models/password_reset_request_input.rb +173 -0
- data/lib/agent_push_kit/models/preference_record.rb +242 -0
- data/lib/agent_push_kit/models/provider_login_input.rb +201 -0
- data/lib/agent_push_kit/models/register_device_input.rb +304 -0
- data/lib/agent_push_kit/models/register_input.rb +245 -0
- data/lib/agent_push_kit/models/register_web_push_subscription_input.rb +199 -0
- data/lib/agent_push_kit/models/register_web_push_subscription_input_keys.rb +226 -0
- data/lib/agent_push_kit/models/revoked_response.rb +164 -0
- data/lib/agent_push_kit/models/search_events_input.rb +212 -0
- data/lib/agent_push_kit/models/send_event_input.rb +427 -0
- data/lib/agent_push_kit/models/service.rb +275 -0
- data/lib/agent_push_kit/models/service_all_of_count.rb +164 -0
- data/lib/agent_push_kit/models/service_preference.rb +270 -0
- data/lib/agent_push_kit/models/service_summary.rb +216 -0
- data/lib/agent_push_kit/models/set_enabled_input.rb +164 -0
- data/lib/agent_push_kit/models/text_filter_condition.rb +260 -0
- data/lib/agent_push_kit/models/time_filter_condition.rb +242 -0
- data/lib/agent_push_kit/models/type_override.rb +216 -0
- data/lib/agent_push_kit/models/user.rb +280 -0
- data/lib/agent_push_kit/models/web_push_configuration.rb +176 -0
- data/lib/agent_push_kit/models/web_push_subscription.rb +216 -0
- data/lib/agent_push_kit/version.rb +15 -0
- data/lib/agent_push_kit.rb +101 -0
- data/spec/api/account_api_spec.rb +55 -0
- data/spec/api/agent_tokens_api_spec.rb +80 -0
- data/spec/api/authentication_api_spec.rb +101 -0
- data/spec/api/customer_accounts_api_spec.rb +91 -0
- data/spec/api/devices_api_spec.rb +89 -0
- data/spec/api/events_api_spec.rb +121 -0
- data/spec/api/health_api_spec.rb +45 -0
- data/spec/api/preferences_api_spec.rb +83 -0
- data/spec/models/accepted_response_spec.rb +36 -0
- data/spec/models/add_member_input_spec.rb +36 -0
- data/spec/models/agent_token_created_spec.rb +78 -0
- data/spec/models/agent_token_spec.rb +72 -0
- data/spec/models/api_key_summary_spec.rb +48 -0
- data/spec/models/auth_response_spec.rb +54 -0
- data/spec/models/create_agent_token_input_spec.rb +36 -0
- data/spec/models/create_organization_input_spec.rb +36 -0
- data/spec/models/current_account_spec.rb +42 -0
- data/spec/models/deleted_response_spec.rb +36 -0
- data/spec/models/delivery_summary_spec.rb +54 -0
- data/spec/models/device_spec.rb +70 -0
- data/spec/models/disabled_response_spec.rb +36 -0
- data/spec/models/error_response_spec.rb +48 -0
- data/spec/models/event_detail_spec.rb +90 -0
- data/spec/models/event_filter_spec.rb +32 -0
- data/spec/models/event_page_spec.rb +42 -0
- data/spec/models/event_summary_spec.rb +78 -0
- data/spec/models/filter_group_spec.rb +46 -0
- data/spec/models/filter_not_spec.rb +46 -0
- data/spec/models/health_response_spec.rb +50 -0
- data/spec/models/ingestion_result_spec.rb +48 -0
- data/spec/models/inherited_response_spec.rb +36 -0
- data/spec/models/membership_spec.rb +58 -0
- data/spec/models/membership_user_spec.rb +48 -0
- data/spec/models/organization_api_key_created_spec.rb +54 -0
- data/spec/models/organization_count_spec.rb +42 -0
- data/spec/models/organization_created_spec.rb +42 -0
- data/spec/models/organization_record_spec.rb +54 -0
- data/spec/models/organization_spec.rb +82 -0
- data/spec/models/password_login_input_spec.rb +42 -0
- data/spec/models/password_reset_complete_input_spec.rb +42 -0
- data/spec/models/password_reset_request_input_spec.rb +36 -0
- data/spec/models/preference_record_spec.rb +54 -0
- data/spec/models/provider_login_input_spec.rb +42 -0
- data/spec/models/register_device_input_spec.rb +58 -0
- data/spec/models/register_input_spec.rb +48 -0
- data/spec/models/register_web_push_subscription_input_keys_spec.rb +42 -0
- data/spec/models/register_web_push_subscription_input_spec.rb +42 -0
- data/spec/models/revoked_response_spec.rb +36 -0
- data/spec/models/search_events_input_spec.rb +48 -0
- data/spec/models/send_event_input_spec.rb +78 -0
- data/spec/models/service_all_of_count_spec.rb +36 -0
- data/spec/models/service_preference_spec.rb +60 -0
- data/spec/models/service_spec.rb +60 -0
- data/spec/models/service_summary_spec.rb +48 -0
- data/spec/models/set_enabled_input_spec.rb +36 -0
- data/spec/models/text_filter_condition_spec.rb +56 -0
- data/spec/models/time_filter_condition_spec.rb +56 -0
- data/spec/models/type_override_spec.rb +48 -0
- data/spec/models/user_spec.rb +66 -0
- data/spec/models/web_push_configuration_spec.rb +42 -0
- data/spec/models/web_push_subscription_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +344 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Agent Push Kit API
|
|
3
|
+
|
|
4
|
+
#The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module AgentPushKit
|
|
16
|
+
class AgentTokensApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Connect through stateless MCP Streamable HTTP
|
|
23
|
+
# This endpoint accepts only an `apt_` agent access token.
|
|
24
|
+
# @param request_body [Hash<String, Object>]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def call_mcp(request_body, opts = {})
|
|
28
|
+
call_mcp_with_http_info(request_body, opts)
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Connect through stateless MCP Streamable HTTP
|
|
33
|
+
# This endpoint accepts only an `apt_` agent access token.
|
|
34
|
+
# @param request_body [Hash<String, Object>]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def call_mcp_with_http_info(request_body, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AgentTokensApi.call_mcp ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'request_body' is set
|
|
42
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling AgentTokensApi.call_mcp"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/mcp'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type]
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['AgentToken']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"AgentTokensApi.call_mcp",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: AgentTokensApi#call_mcp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Create a named non-expiring agent token
|
|
91
|
+
# The raw `apt_` token is shown once. Store it before dismissing the response.
|
|
92
|
+
# @param create_agent_token_input [CreateAgentTokenInput]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [AgentTokenCreated]
|
|
95
|
+
def create_agent_token(create_agent_token_input, opts = {})
|
|
96
|
+
data, _status_code, _headers = create_agent_token_with_http_info(create_agent_token_input, opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Create a named non-expiring agent token
|
|
101
|
+
# The raw `apt_` token is shown once. Store it before dismissing the response.
|
|
102
|
+
# @param create_agent_token_input [CreateAgentTokenInput]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(AgentTokenCreated, Integer, Hash)>] AgentTokenCreated data, response status code and response headers
|
|
105
|
+
def create_agent_token_with_http_info(create_agent_token_input, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: AgentTokensApi.create_agent_token ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'create_agent_token_input' is set
|
|
110
|
+
if @api_client.config.client_side_validation && create_agent_token_input.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'create_agent_token_input' when calling AgentTokensApi.create_agent_token"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/agent-tokens'
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
# HTTP header 'Content-Type'
|
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
125
|
+
if !content_type.nil?
|
|
126
|
+
header_params['Content-Type'] = content_type
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_agent_token_input)
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'AgentTokenCreated'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"AgentTokensApi.create_agent_token",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: AgentTokensApi#create_agent_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# List agent access tokens without their secrets
|
|
159
|
+
# @param [Hash] opts the optional parameters
|
|
160
|
+
# @return [Array<AgentToken>]
|
|
161
|
+
def list_agent_tokens(opts = {})
|
|
162
|
+
data, _status_code, _headers = list_agent_tokens_with_http_info(opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# List agent access tokens without their secrets
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @return [Array<(Array<AgentToken>, Integer, Hash)>] Array<AgentToken> data, response status code and response headers
|
|
169
|
+
def list_agent_tokens_with_http_info(opts = {})
|
|
170
|
+
if @api_client.config.debugging
|
|
171
|
+
@api_client.config.logger.debug 'Calling API: AgentTokensApi.list_agent_tokens ...'
|
|
172
|
+
end
|
|
173
|
+
# resource path
|
|
174
|
+
local_var_path = '/agent-tokens'
|
|
175
|
+
|
|
176
|
+
# query parameters
|
|
177
|
+
query_params = opts[:query_params] || {}
|
|
178
|
+
|
|
179
|
+
# header parameters
|
|
180
|
+
header_params = opts[:header_params] || {}
|
|
181
|
+
# HTTP header 'Accept' (if needed)
|
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
183
|
+
|
|
184
|
+
# form parameters
|
|
185
|
+
form_params = opts[:form_params] || {}
|
|
186
|
+
|
|
187
|
+
# http body (model)
|
|
188
|
+
post_body = opts[:debug_body]
|
|
189
|
+
|
|
190
|
+
# return_type
|
|
191
|
+
return_type = opts[:debug_return_type] || 'Array<AgentToken>'
|
|
192
|
+
|
|
193
|
+
# auth_names
|
|
194
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
195
|
+
|
|
196
|
+
new_options = opts.merge(
|
|
197
|
+
:operation => :"AgentTokensApi.list_agent_tokens",
|
|
198
|
+
:header_params => header_params,
|
|
199
|
+
:query_params => query_params,
|
|
200
|
+
:form_params => form_params,
|
|
201
|
+
:body => post_body,
|
|
202
|
+
:auth_names => auth_names,
|
|
203
|
+
:return_type => return_type
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
207
|
+
if @api_client.config.debugging
|
|
208
|
+
@api_client.config.logger.debug "API called: AgentTokensApi#list_agent_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
209
|
+
end
|
|
210
|
+
return data, status_code, headers
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Revoke one of the current user's agent tokens
|
|
214
|
+
# @param token_id [String]
|
|
215
|
+
# @param [Hash] opts the optional parameters
|
|
216
|
+
# @return [RevokedResponse]
|
|
217
|
+
def revoke_agent_token(token_id, opts = {})
|
|
218
|
+
data, _status_code, _headers = revoke_agent_token_with_http_info(token_id, opts)
|
|
219
|
+
data
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Revoke one of the current user's agent tokens
|
|
223
|
+
# @param token_id [String]
|
|
224
|
+
# @param [Hash] opts the optional parameters
|
|
225
|
+
# @return [Array<(RevokedResponse, Integer, Hash)>] RevokedResponse data, response status code and response headers
|
|
226
|
+
def revoke_agent_token_with_http_info(token_id, opts = {})
|
|
227
|
+
if @api_client.config.debugging
|
|
228
|
+
@api_client.config.logger.debug 'Calling API: AgentTokensApi.revoke_agent_token ...'
|
|
229
|
+
end
|
|
230
|
+
# verify the required parameter 'token_id' is set
|
|
231
|
+
if @api_client.config.client_side_validation && token_id.nil?
|
|
232
|
+
fail ArgumentError, "Missing the required parameter 'token_id' when calling AgentTokensApi.revoke_agent_token"
|
|
233
|
+
end
|
|
234
|
+
# resource path
|
|
235
|
+
local_var_path = '/agent-tokens/{tokenId}'.sub('{tokenId}', CGI.escape(token_id.to_s))
|
|
236
|
+
|
|
237
|
+
# query parameters
|
|
238
|
+
query_params = opts[:query_params] || {}
|
|
239
|
+
|
|
240
|
+
# header parameters
|
|
241
|
+
header_params = opts[:header_params] || {}
|
|
242
|
+
# HTTP header 'Accept' (if needed)
|
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
244
|
+
|
|
245
|
+
# form parameters
|
|
246
|
+
form_params = opts[:form_params] || {}
|
|
247
|
+
|
|
248
|
+
# http body (model)
|
|
249
|
+
post_body = opts[:debug_body]
|
|
250
|
+
|
|
251
|
+
# return_type
|
|
252
|
+
return_type = opts[:debug_return_type] || 'RevokedResponse'
|
|
253
|
+
|
|
254
|
+
# auth_names
|
|
255
|
+
auth_names = opts[:debug_auth_names] || ['UserOrAgent']
|
|
256
|
+
|
|
257
|
+
new_options = opts.merge(
|
|
258
|
+
:operation => :"AgentTokensApi.revoke_agent_token",
|
|
259
|
+
:header_params => header_params,
|
|
260
|
+
:query_params => query_params,
|
|
261
|
+
:form_params => form_params,
|
|
262
|
+
:body => post_body,
|
|
263
|
+
:auth_names => auth_names,
|
|
264
|
+
:return_type => return_type
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
268
|
+
if @api_client.config.debugging
|
|
269
|
+
@api_client.config.logger.debug "API called: AgentTokensApi#revoke_agent_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
270
|
+
end
|
|
271
|
+
return data, status_code, headers
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
end
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Agent Push Kit API
|
|
3
|
+
|
|
4
|
+
#The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with `apk_`. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with `apt_`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module AgentPushKit
|
|
16
|
+
class AuthenticationApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Choose a new password and log in
|
|
23
|
+
# @param password_reset_complete_input [PasswordResetCompleteInput]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [AuthResponse]
|
|
26
|
+
def complete_password_reset(password_reset_complete_input, opts = {})
|
|
27
|
+
data, _status_code, _headers = complete_password_reset_with_http_info(password_reset_complete_input, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Choose a new password and log in
|
|
32
|
+
# @param password_reset_complete_input [PasswordResetCompleteInput]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(AuthResponse, Integer, Hash)>] AuthResponse data, response status code and response headers
|
|
35
|
+
def complete_password_reset_with_http_info(password_reset_complete_input, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.complete_password_reset ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'password_reset_complete_input' is set
|
|
40
|
+
if @api_client.config.client_side_validation && password_reset_complete_input.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'password_reset_complete_input' when calling AuthenticationApi.complete_password_reset"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/auth/password-reset/complete'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(password_reset_complete_input)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'AuthResponse'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || []
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"AuthenticationApi.complete_password_reset",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#complete_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Log in or attach an account using a Sign in with Apple identity token
|
|
89
|
+
# @param provider_login_input [ProviderLoginInput]
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [AuthResponse]
|
|
92
|
+
def login_with_apple(provider_login_input, opts = {})
|
|
93
|
+
data, _status_code, _headers = login_with_apple_with_http_info(provider_login_input, opts)
|
|
94
|
+
data
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Log in or attach an account using a Sign in with Apple identity token
|
|
98
|
+
# @param provider_login_input [ProviderLoginInput]
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [Array<(AuthResponse, Integer, Hash)>] AuthResponse data, response status code and response headers
|
|
101
|
+
def login_with_apple_with_http_info(provider_login_input, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.login_with_apple ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'provider_login_input' is set
|
|
106
|
+
if @api_client.config.client_side_validation && provider_login_input.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'provider_login_input' when calling AuthenticationApi.login_with_apple"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/auth/apple'
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
# HTTP header 'Accept' (if needed)
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
+
# HTTP header 'Content-Type'
|
|
120
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
121
|
+
if !content_type.nil?
|
|
122
|
+
header_params['Content-Type'] = content_type
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(provider_login_input)
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:debug_return_type] || 'AuthResponse'
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:debug_auth_names] || []
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:operation => :"AuthenticationApi.login_with_apple",
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#login_with_apple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Log in or attach an account using a verified Google ID token
|
|
155
|
+
# @param provider_login_input [ProviderLoginInput]
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @return [AuthResponse]
|
|
158
|
+
def login_with_google(provider_login_input, opts = {})
|
|
159
|
+
data, _status_code, _headers = login_with_google_with_http_info(provider_login_input, opts)
|
|
160
|
+
data
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Log in or attach an account using a verified Google ID token
|
|
164
|
+
# @param provider_login_input [ProviderLoginInput]
|
|
165
|
+
# @param [Hash] opts the optional parameters
|
|
166
|
+
# @return [Array<(AuthResponse, Integer, Hash)>] AuthResponse data, response status code and response headers
|
|
167
|
+
def login_with_google_with_http_info(provider_login_input, opts = {})
|
|
168
|
+
if @api_client.config.debugging
|
|
169
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.login_with_google ...'
|
|
170
|
+
end
|
|
171
|
+
# verify the required parameter 'provider_login_input' is set
|
|
172
|
+
if @api_client.config.client_side_validation && provider_login_input.nil?
|
|
173
|
+
fail ArgumentError, "Missing the required parameter 'provider_login_input' when calling AuthenticationApi.login_with_google"
|
|
174
|
+
end
|
|
175
|
+
# resource path
|
|
176
|
+
local_var_path = '/auth/google'
|
|
177
|
+
|
|
178
|
+
# query parameters
|
|
179
|
+
query_params = opts[:query_params] || {}
|
|
180
|
+
|
|
181
|
+
# header parameters
|
|
182
|
+
header_params = opts[:header_params] || {}
|
|
183
|
+
# HTTP header 'Accept' (if needed)
|
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
185
|
+
# HTTP header 'Content-Type'
|
|
186
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
187
|
+
if !content_type.nil?
|
|
188
|
+
header_params['Content-Type'] = content_type
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# form parameters
|
|
192
|
+
form_params = opts[:form_params] || {}
|
|
193
|
+
|
|
194
|
+
# http body (model)
|
|
195
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(provider_login_input)
|
|
196
|
+
|
|
197
|
+
# return_type
|
|
198
|
+
return_type = opts[:debug_return_type] || 'AuthResponse'
|
|
199
|
+
|
|
200
|
+
# auth_names
|
|
201
|
+
auth_names = opts[:debug_auth_names] || []
|
|
202
|
+
|
|
203
|
+
new_options = opts.merge(
|
|
204
|
+
:operation => :"AuthenticationApi.login_with_google",
|
|
205
|
+
:header_params => header_params,
|
|
206
|
+
:query_params => query_params,
|
|
207
|
+
:form_params => form_params,
|
|
208
|
+
:body => post_body,
|
|
209
|
+
:auth_names => auth_names,
|
|
210
|
+
:return_type => return_type
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
214
|
+
if @api_client.config.debugging
|
|
215
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#login_with_google\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
216
|
+
end
|
|
217
|
+
return data, status_code, headers
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Log in with email and password
|
|
221
|
+
# @param password_login_input [PasswordLoginInput]
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @return [AuthResponse]
|
|
224
|
+
def login_with_password(password_login_input, opts = {})
|
|
225
|
+
data, _status_code, _headers = login_with_password_with_http_info(password_login_input, opts)
|
|
226
|
+
data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Log in with email and password
|
|
230
|
+
# @param password_login_input [PasswordLoginInput]
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @return [Array<(AuthResponse, Integer, Hash)>] AuthResponse data, response status code and response headers
|
|
233
|
+
def login_with_password_with_http_info(password_login_input, opts = {})
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.login_with_password ...'
|
|
236
|
+
end
|
|
237
|
+
# verify the required parameter 'password_login_input' is set
|
|
238
|
+
if @api_client.config.client_side_validation && password_login_input.nil?
|
|
239
|
+
fail ArgumentError, "Missing the required parameter 'password_login_input' when calling AuthenticationApi.login_with_password"
|
|
240
|
+
end
|
|
241
|
+
# resource path
|
|
242
|
+
local_var_path = '/auth/login'
|
|
243
|
+
|
|
244
|
+
# query parameters
|
|
245
|
+
query_params = opts[:query_params] || {}
|
|
246
|
+
|
|
247
|
+
# header parameters
|
|
248
|
+
header_params = opts[:header_params] || {}
|
|
249
|
+
# HTTP header 'Accept' (if needed)
|
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
251
|
+
# HTTP header 'Content-Type'
|
|
252
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
253
|
+
if !content_type.nil?
|
|
254
|
+
header_params['Content-Type'] = content_type
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# form parameters
|
|
258
|
+
form_params = opts[:form_params] || {}
|
|
259
|
+
|
|
260
|
+
# http body (model)
|
|
261
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(password_login_input)
|
|
262
|
+
|
|
263
|
+
# return_type
|
|
264
|
+
return_type = opts[:debug_return_type] || 'AuthResponse'
|
|
265
|
+
|
|
266
|
+
# auth_names
|
|
267
|
+
auth_names = opts[:debug_auth_names] || []
|
|
268
|
+
|
|
269
|
+
new_options = opts.merge(
|
|
270
|
+
:operation => :"AuthenticationApi.login_with_password",
|
|
271
|
+
:header_params => header_params,
|
|
272
|
+
:query_params => query_params,
|
|
273
|
+
:form_params => form_params,
|
|
274
|
+
:body => post_body,
|
|
275
|
+
:auth_names => auth_names,
|
|
276
|
+
:return_type => return_type
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
280
|
+
if @api_client.config.debugging
|
|
281
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#login_with_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
282
|
+
end
|
|
283
|
+
return data, status_code, headers
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Create a user and first customer account
|
|
287
|
+
# @param register_input [RegisterInput]
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @return [AuthResponse]
|
|
290
|
+
def register(register_input, opts = {})
|
|
291
|
+
data, _status_code, _headers = register_with_http_info(register_input, opts)
|
|
292
|
+
data
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Create a user and first customer account
|
|
296
|
+
# @param register_input [RegisterInput]
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @return [Array<(AuthResponse, Integer, Hash)>] AuthResponse data, response status code and response headers
|
|
299
|
+
def register_with_http_info(register_input, opts = {})
|
|
300
|
+
if @api_client.config.debugging
|
|
301
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.register ...'
|
|
302
|
+
end
|
|
303
|
+
# verify the required parameter 'register_input' is set
|
|
304
|
+
if @api_client.config.client_side_validation && register_input.nil?
|
|
305
|
+
fail ArgumentError, "Missing the required parameter 'register_input' when calling AuthenticationApi.register"
|
|
306
|
+
end
|
|
307
|
+
# resource path
|
|
308
|
+
local_var_path = '/auth/register'
|
|
309
|
+
|
|
310
|
+
# query parameters
|
|
311
|
+
query_params = opts[:query_params] || {}
|
|
312
|
+
|
|
313
|
+
# header parameters
|
|
314
|
+
header_params = opts[:header_params] || {}
|
|
315
|
+
# HTTP header 'Accept' (if needed)
|
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
317
|
+
# HTTP header 'Content-Type'
|
|
318
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
319
|
+
if !content_type.nil?
|
|
320
|
+
header_params['Content-Type'] = content_type
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# form parameters
|
|
324
|
+
form_params = opts[:form_params] || {}
|
|
325
|
+
|
|
326
|
+
# http body (model)
|
|
327
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(register_input)
|
|
328
|
+
|
|
329
|
+
# return_type
|
|
330
|
+
return_type = opts[:debug_return_type] || 'AuthResponse'
|
|
331
|
+
|
|
332
|
+
# auth_names
|
|
333
|
+
auth_names = opts[:debug_auth_names] || []
|
|
334
|
+
|
|
335
|
+
new_options = opts.merge(
|
|
336
|
+
:operation => :"AuthenticationApi.register",
|
|
337
|
+
:header_params => header_params,
|
|
338
|
+
:query_params => query_params,
|
|
339
|
+
:form_params => form_params,
|
|
340
|
+
:body => post_body,
|
|
341
|
+
:auth_names => auth_names,
|
|
342
|
+
:return_type => return_type
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
346
|
+
if @api_client.config.debugging
|
|
347
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#register\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
348
|
+
end
|
|
349
|
+
return data, status_code, headers
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Email a single-use password reset token
|
|
353
|
+
# @param password_reset_request_input [PasswordResetRequestInput]
|
|
354
|
+
# @param [Hash] opts the optional parameters
|
|
355
|
+
# @return [AcceptedResponse]
|
|
356
|
+
def request_password_reset(password_reset_request_input, opts = {})
|
|
357
|
+
data, _status_code, _headers = request_password_reset_with_http_info(password_reset_request_input, opts)
|
|
358
|
+
data
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Email a single-use password reset token
|
|
362
|
+
# @param password_reset_request_input [PasswordResetRequestInput]
|
|
363
|
+
# @param [Hash] opts the optional parameters
|
|
364
|
+
# @return [Array<(AcceptedResponse, Integer, Hash)>] AcceptedResponse data, response status code and response headers
|
|
365
|
+
def request_password_reset_with_http_info(password_reset_request_input, opts = {})
|
|
366
|
+
if @api_client.config.debugging
|
|
367
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.request_password_reset ...'
|
|
368
|
+
end
|
|
369
|
+
# verify the required parameter 'password_reset_request_input' is set
|
|
370
|
+
if @api_client.config.client_side_validation && password_reset_request_input.nil?
|
|
371
|
+
fail ArgumentError, "Missing the required parameter 'password_reset_request_input' when calling AuthenticationApi.request_password_reset"
|
|
372
|
+
end
|
|
373
|
+
# resource path
|
|
374
|
+
local_var_path = '/auth/password-reset/request'
|
|
375
|
+
|
|
376
|
+
# query parameters
|
|
377
|
+
query_params = opts[:query_params] || {}
|
|
378
|
+
|
|
379
|
+
# header parameters
|
|
380
|
+
header_params = opts[:header_params] || {}
|
|
381
|
+
# HTTP header 'Accept' (if needed)
|
|
382
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
383
|
+
# HTTP header 'Content-Type'
|
|
384
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
385
|
+
if !content_type.nil?
|
|
386
|
+
header_params['Content-Type'] = content_type
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# form parameters
|
|
390
|
+
form_params = opts[:form_params] || {}
|
|
391
|
+
|
|
392
|
+
# http body (model)
|
|
393
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(password_reset_request_input)
|
|
394
|
+
|
|
395
|
+
# return_type
|
|
396
|
+
return_type = opts[:debug_return_type] || 'AcceptedResponse'
|
|
397
|
+
|
|
398
|
+
# auth_names
|
|
399
|
+
auth_names = opts[:debug_auth_names] || []
|
|
400
|
+
|
|
401
|
+
new_options = opts.merge(
|
|
402
|
+
:operation => :"AuthenticationApi.request_password_reset",
|
|
403
|
+
:header_params => header_params,
|
|
404
|
+
:query_params => query_params,
|
|
405
|
+
:form_params => form_params,
|
|
406
|
+
:body => post_body,
|
|
407
|
+
:auth_names => auth_names,
|
|
408
|
+
:return_type => return_type
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
412
|
+
if @api_client.config.debugging
|
|
413
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#request_password_reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
414
|
+
end
|
|
415
|
+
return data, status_code, headers
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
end
|