seatschart 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/LICENSE +21 -0
- data/README.md +552 -0
- data/lib/seatschart/api/api_keys_api.rb +364 -0
- data/lib/seatschart/api/assets_api.rb +95 -0
- data/lib/seatschart/api/audit_api.rb +88 -0
- data/lib/seatschart/api/auth_api.rb +1187 -0
- data/lib/seatschart/api/billing_api.rb +355 -0
- data/lib/seatschart/api/charts_api.rb +4195 -0
- data/lib/seatschart/api/default_api.rb +763 -0
- data/lib/seatschart/api/embed_api.rb +407 -0
- data/lib/seatschart/api/embed_origins_api.rb +281 -0
- data/lib/seatschart/api/event_log_api.rb +148 -0
- data/lib/seatschart/api/events_api.rb +6608 -0
- data/lib/seatschart/api/health_api.rb +77 -0
- data/lib/seatschart/api/map_designer_api.rb +135 -0
- data/lib/seatschart/api/object_status_api.rb +805 -0
- data/lib/seatschart/api/orders_api.rb +166 -0
- data/lib/seatschart/api/public_api.rb +455 -0
- data/lib/seatschart/api/quotes_api.rb +103 -0
- data/lib/seatschart/api/seasons_api.rb +5543 -0
- data/lib/seatschart/api/seats_api.rb +1103 -0
- data/lib/seatschart/api/sse_api.rb +83 -0
- data/lib/seatschart/api/team_api.rb +428 -0
- data/lib/seatschart/api/usage_api.rb +540 -0
- data/lib/seatschart/api/webhooks_api.rb +771 -0
- data/lib/seatschart/api/workspace_api.rb +1244 -0
- data/lib/seatschart/api_client.rb +394 -0
- data/lib/seatschart/api_error.rb +58 -0
- data/lib/seatschart/configuration.rb +316 -0
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id200_response.rb +283 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response.rb +247 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner.rb +473 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner_published_by.rb +280 -0
- data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response.rb +247 -0
- data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response_items_inner.rb +444 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response.rb +267 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response_views_value.rb +273 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views404_response.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +388 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes_sales.rb +256 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +286 -0
- data/lib/seatschart/models/get_api_workspace_integration200_response.rb +287 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response.rb +329 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_bounds.rb +237 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_bounds_hold_period_minutes.rb +237 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +269 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +241 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +339 -0
- data/lib/seatschart/models/get_api_workspaces200_response.rb +223 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +423 -0
- data/lib/seatschart/models/patch_api_charts_by_chart_id_categories_by_category_id_request.rb +304 -0
- data/lib/seatschart/models/patch_api_charts_by_chart_id_request.rb +288 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_inventory_channels_by_channel_key_id_request.rb +272 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +448 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request_categories_inner.rb +343 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request_table_booking_config.rb +266 -0
- data/lib/seatschart/models/patch_api_keys_by_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_events_by_event_id_request.rb +221 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +276 -0
- data/lib/seatschart/models/patch_api_team_members_by_user_id_request.rb +255 -0
- data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +291 -0
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request.rb +224 -0
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +543 -0
- data/lib/seatschart/models/patch_api_workspace_integration_request.rb +257 -0
- data/lib/seatschart/models/patch_api_workspace_request.rb +249 -0
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +307 -0
- data/lib/seatschart/models/post_api_auth2fa_disable_request.rb +281 -0
- data/lib/seatschart/models/post_api_auth2fa_enable_request.rb +250 -0
- data/lib/seatschart/models/post_api_auth2fa_enroll_confirm_request.rb +295 -0
- data/lib/seatschart/models/post_api_auth2fa_enroll_start_request.rb +250 -0
- data/lib/seatschart/models/post_api_auth2fa_verify_request.rb +326 -0
- data/lib/seatschart/models/post_api_auth_accept_invite_request.rb +293 -0
- data/lib/seatschart/models/post_api_auth_login_request.rb +293 -0
- data/lib/seatschart/models/post_api_auth_logout_request.rb +242 -0
- data/lib/seatschart/models/post_api_auth_refresh_request.rb +292 -0
- data/lib/seatschart/models/post_api_auth_signup_request.rb +321 -0
- data/lib/seatschart/models/post_api_auth_switch_workspace_request.rb +249 -0
- data/lib/seatschart/models/post_api_billing_checkout_session_request.rb +249 -0
- data/lib/seatschart/models/post_api_billing_confirm_checkout_request.rb +249 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response.rb +221 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response_chart.rb +249 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +287 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +348 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner.rb +555 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +356 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request.rb +361 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request_ticket_types_inner.rb +448 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_duplicate_request.rb +233 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response.rb +289 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +402 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +244 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_preview_link_request.rb +243 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_versions_by_version_actions_copy_request.rb +242 -0
- data/lib/seatschart/models/post_api_charts_request.rb +372 -0
- data/lib/seatschart/models/post_api_charts_request_categories_inner.rb +346 -0
- data/lib/seatschart/models/post_api_embed_origins_request.rb +249 -0
- data/lib/seatschart/models/post_api_embed_tokens_request.rb +394 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request.rb +251 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +737 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner.rb +104 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner_any_of.rb +335 -0
- data/lib/seatschart/models/post_api_events_bulk_request.rb +332 -0
- data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +398 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +824 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_override_season_status_request.rb +272 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request.rb +260 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +263 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_use_season_status_request.rb +252 -0
- data/lib/seatschart/models/post_api_events_by_event_id_duplicate_request.rb +261 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_assign_request.rb +321 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_request.rb +323 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_for_sale_apply_request.rb +333 -0
- data/lib/seatschart/models/post_api_events_by_event_id_objects_actions_retrieve_request.rb +252 -0
- data/lib/seatschart/models/post_api_events_request.rb +502 -0
- data/lib/seatschart/models/post_api_events_request_category_overrides_value.rb +276 -0
- data/lib/seatschart/models/post_api_events_request_channels_inner.rb +360 -0
- data/lib/seatschart/models/post_api_events_request_for_sale_config.rb +295 -0
- data/lib/seatschart/models/post_api_events_request_table_booking_config.rb +267 -0
- data/lib/seatschart/models/post_api_extract_seats_request.rb +279 -0
- data/lib/seatschart/models/post_api_ga_confirm409_response.rb +271 -0
- data/lib/seatschart/models/post_api_ga_confirm_request.rb +687 -0
- data/lib/seatschart/models/post_api_ga_release_request.rb +385 -0
- data/lib/seatschart/models/post_api_ga_reserve_request.rb +527 -0
- data/lib/seatschart/models/post_api_hold_tokens_by_token_request.rb +249 -0
- data/lib/seatschart/models/post_api_hold_tokens_request.rb +391 -0
- data/lib/seatschart/models/post_api_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_orders_by_order_id_cancel_request.rb +249 -0
- data/lib/seatschart/models/post_api_quotes_request.rb +351 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_add_events_request.rb +261 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request.rb +322 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request_events_inner.rb +289 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_remove_events_request.rb +251 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_events_request.rb +267 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_inventory_sync_request.rb +235 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +279 -0
- data/lib/seatschart/models/post_api_seasons_request.rb +395 -0
- data/lib/seatschart/models/post_api_seats_best_available_request.rb +809 -0
- data/lib/seatschart/models/post_api_seats_confirm409_response.rb +271 -0
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +711 -0
- data/lib/seatschart/models/post_api_seats_holds_renew_request.rb +249 -0
- data/lib/seatschart/models/post_api_seats_release_request.rb +387 -0
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +561 -0
- data/lib/seatschart/models/post_api_team_invitations_request.rb +299 -0
- data/lib/seatschart/models/post_api_ticket_buyers_request.rb +252 -0
- data/lib/seatschart/models/post_api_viewer_tokens_request.rb +292 -0
- data/lib/seatschart/models/post_api_webhooks_request.rb +298 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +269 -0
- data/lib/seatschart/models/put_api_charts_by_chart_id_tags_request.rb +243 -0
- data/lib/seatschart/models/put_api_charts_by_chart_id_versions_by_version_thumbnail_request.rb +261 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request.rb +242 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request_channels_inner.rb +405 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request.rb +242 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request_assignments_inner.rb +320 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_for_sale_request.rb +333 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request.rb +297 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner.rb +295 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner_ticket_types_inner.rb +425 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request.rb +320 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_buyer_limit.rb +259 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner.rb +374 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner_lots_inner.rb +364 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_quotas_inner.rb +418 -0
- data/lib/seatschart/retry.rb +118 -0
- data/lib/seatschart/version.rb +15 -0
- data/lib/seatschart.rb +198 -0
- metadata +254 -0
|
@@ -0,0 +1,1187 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SeatsChart API
|
|
3
|
+
|
|
4
|
+
#Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SeatsChart
|
|
16
|
+
class AuthApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Two-factor status of the signed-in user
|
|
23
|
+
# `{ enabled, enabledAt, recoveryCodesRemaining, workspaceRequiresTwoFactor }`.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [nil]
|
|
26
|
+
def get_api_auth2fa(opts = {})
|
|
27
|
+
get_api_auth2fa_with_http_info(opts)
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Two-factor status of the signed-in user
|
|
32
|
+
# `{ enabled, enabledAt, recoveryCodesRemaining, workspaceRequiresTwoFactor }`.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
35
|
+
def get_api_auth2fa_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.get_api_auth2fa ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/api/auth/2fa'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:debug_body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:debug_return_type]
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"AuthApi.get_api_auth2fa",
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: AuthApi#get_api_auth2fa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Preview invitation metadata
|
|
78
|
+
# @param token [String]
|
|
79
|
+
# @param [Hash] opts the optional parameters
|
|
80
|
+
# @return [nil]
|
|
81
|
+
def get_api_auth_invite_by_token(token, opts = {})
|
|
82
|
+
get_api_auth_invite_by_token_with_http_info(token, opts)
|
|
83
|
+
nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Preview invitation metadata
|
|
87
|
+
# @param token [String]
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
90
|
+
def get_api_auth_invite_by_token_with_http_info(token, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.get_api_auth_invite_by_token ...'
|
|
93
|
+
end
|
|
94
|
+
# verify the required parameter 'token' is set
|
|
95
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
96
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AuthApi.get_api_auth_invite_by_token"
|
|
97
|
+
end
|
|
98
|
+
if @api_client.config.client_side_validation && token.to_s.length > 128
|
|
99
|
+
fail ArgumentError, 'invalid value for "token" when calling AuthApi.get_api_auth_invite_by_token, the character length must be smaller than or equal to 128.'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @api_client.config.client_side_validation && token.to_s.length < 32
|
|
103
|
+
fail ArgumentError, 'invalid value for "token" when calling AuthApi.get_api_auth_invite_by_token, the character length must be great than or equal to 32.'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# resource path
|
|
107
|
+
local_var_path = '/api/auth/invite/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
|
108
|
+
|
|
109
|
+
# query parameters
|
|
110
|
+
query_params = opts[:query_params] || {}
|
|
111
|
+
|
|
112
|
+
# header parameters
|
|
113
|
+
header_params = opts[:header_params] || {}
|
|
114
|
+
|
|
115
|
+
# form parameters
|
|
116
|
+
form_params = opts[:form_params] || {}
|
|
117
|
+
|
|
118
|
+
# http body (model)
|
|
119
|
+
post_body = opts[:debug_body]
|
|
120
|
+
|
|
121
|
+
# return_type
|
|
122
|
+
return_type = opts[:debug_return_type]
|
|
123
|
+
|
|
124
|
+
# auth_names
|
|
125
|
+
auth_names = opts[:debug_auth_names] || []
|
|
126
|
+
|
|
127
|
+
new_options = opts.merge(
|
|
128
|
+
:operation => :"AuthApi.get_api_auth_invite_by_token",
|
|
129
|
+
:header_params => header_params,
|
|
130
|
+
:query_params => query_params,
|
|
131
|
+
:form_params => form_params,
|
|
132
|
+
:body => post_body,
|
|
133
|
+
:auth_names => auth_names,
|
|
134
|
+
:return_type => return_type
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
138
|
+
if @api_client.config.debugging
|
|
139
|
+
@api_client.config.logger.debug "API called: AuthApi#get_api_auth_invite_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
140
|
+
end
|
|
141
|
+
return data, status_code, headers
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Current dashboard user
|
|
145
|
+
# Returns the authenticated user when the Bearer token was issued by `/auth/login` or `/auth/signup`.
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [nil]
|
|
148
|
+
def get_api_auth_me(opts = {})
|
|
149
|
+
get_api_auth_me_with_http_info(opts)
|
|
150
|
+
nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Current dashboard user
|
|
154
|
+
# Returns the authenticated user when the Bearer token was issued by `/auth/login` or `/auth/signup`.
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
157
|
+
def get_api_auth_me_with_http_info(opts = {})
|
|
158
|
+
if @api_client.config.debugging
|
|
159
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.get_api_auth_me ...'
|
|
160
|
+
end
|
|
161
|
+
# resource path
|
|
162
|
+
local_var_path = '/api/auth/me'
|
|
163
|
+
|
|
164
|
+
# query parameters
|
|
165
|
+
query_params = opts[:query_params] || {}
|
|
166
|
+
|
|
167
|
+
# header parameters
|
|
168
|
+
header_params = opts[:header_params] || {}
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
|
|
173
|
+
# http body (model)
|
|
174
|
+
post_body = opts[:debug_body]
|
|
175
|
+
|
|
176
|
+
# return_type
|
|
177
|
+
return_type = opts[:debug_return_type]
|
|
178
|
+
|
|
179
|
+
# auth_names
|
|
180
|
+
auth_names = opts[:debug_auth_names] || []
|
|
181
|
+
|
|
182
|
+
new_options = opts.merge(
|
|
183
|
+
:operation => :"AuthApi.get_api_auth_me",
|
|
184
|
+
:header_params => header_params,
|
|
185
|
+
:query_params => query_params,
|
|
186
|
+
:form_params => form_params,
|
|
187
|
+
:body => post_body,
|
|
188
|
+
:auth_names => auth_names,
|
|
189
|
+
:return_type => return_type
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
193
|
+
if @api_client.config.debugging
|
|
194
|
+
@api_client.config.logger.debug "API called: AuthApi#get_api_auth_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
195
|
+
end
|
|
196
|
+
return data, status_code, headers
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Disable two-factor authentication
|
|
200
|
+
# Requires a current TOTP `code` or a `recoveryCode`. Refused (409) while the current workspace requires 2FA.
|
|
201
|
+
# @param post_api_auth2fa_disable_request [PostApiAuth2faDisableRequest]
|
|
202
|
+
# @param [Hash] opts the optional parameters
|
|
203
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
204
|
+
# @return [nil]
|
|
205
|
+
def post_api_auth2fa_disable(post_api_auth2fa_disable_request, opts = {})
|
|
206
|
+
post_api_auth2fa_disable_with_http_info(post_api_auth2fa_disable_request, opts)
|
|
207
|
+
nil
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Disable two-factor authentication
|
|
211
|
+
# Requires a current TOTP `code` or a `recoveryCode`. Refused (409) while the current workspace requires 2FA.
|
|
212
|
+
# @param post_api_auth2fa_disable_request [PostApiAuth2faDisableRequest]
|
|
213
|
+
# @param [Hash] opts the optional parameters
|
|
214
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
215
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
216
|
+
def post_api_auth2fa_disable_with_http_info(post_api_auth2fa_disable_request, opts = {})
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_disable ...'
|
|
219
|
+
end
|
|
220
|
+
# verify the required parameter 'post_api_auth2fa_disable_request' is set
|
|
221
|
+
if @api_client.config.client_side_validation && post_api_auth2fa_disable_request.nil?
|
|
222
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth2fa_disable_request' when calling AuthApi.post_api_auth2fa_disable"
|
|
223
|
+
end
|
|
224
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
225
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_disable, the character length must be smaller than or equal to 255.'
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
229
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_disable, the character length must be great than or equal to 1.'
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# resource path
|
|
233
|
+
local_var_path = '/api/auth/2fa/disable'
|
|
234
|
+
|
|
235
|
+
# query parameters
|
|
236
|
+
query_params = opts[:query_params] || {}
|
|
237
|
+
|
|
238
|
+
# header parameters
|
|
239
|
+
header_params = opts[:header_params] || {}
|
|
240
|
+
# HTTP header 'Content-Type'
|
|
241
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
242
|
+
if !content_type.nil?
|
|
243
|
+
header_params['Content-Type'] = content_type
|
|
244
|
+
end
|
|
245
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
246
|
+
|
|
247
|
+
# form parameters
|
|
248
|
+
form_params = opts[:form_params] || {}
|
|
249
|
+
|
|
250
|
+
# http body (model)
|
|
251
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth2fa_disable_request)
|
|
252
|
+
|
|
253
|
+
# return_type
|
|
254
|
+
return_type = opts[:debug_return_type]
|
|
255
|
+
|
|
256
|
+
# auth_names
|
|
257
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
258
|
+
|
|
259
|
+
new_options = opts.merge(
|
|
260
|
+
:operation => :"AuthApi.post_api_auth2fa_disable",
|
|
261
|
+
:header_params => header_params,
|
|
262
|
+
:query_params => query_params,
|
|
263
|
+
:form_params => form_params,
|
|
264
|
+
:body => post_body,
|
|
265
|
+
:auth_names => auth_names,
|
|
266
|
+
:return_type => return_type
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
270
|
+
if @api_client.config.debugging
|
|
271
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_disable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
272
|
+
end
|
|
273
|
+
return data, status_code, headers
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Confirm enrolment and enable two-factor authentication
|
|
277
|
+
# Verifies a code of the pending secret, enables 2FA and returns 10 one-time `recoveryCodes` (stored hashed; shown only now).
|
|
278
|
+
# @param post_api_auth2fa_enable_request [PostApiAuth2faEnableRequest]
|
|
279
|
+
# @param [Hash] opts the optional parameters
|
|
280
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
281
|
+
# @return [nil]
|
|
282
|
+
def post_api_auth2fa_enable(post_api_auth2fa_enable_request, opts = {})
|
|
283
|
+
post_api_auth2fa_enable_with_http_info(post_api_auth2fa_enable_request, opts)
|
|
284
|
+
nil
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Confirm enrolment and enable two-factor authentication
|
|
288
|
+
# Verifies a code of the pending secret, enables 2FA and returns 10 one-time `recoveryCodes` (stored hashed; shown only now).
|
|
289
|
+
# @param post_api_auth2fa_enable_request [PostApiAuth2faEnableRequest]
|
|
290
|
+
# @param [Hash] opts the optional parameters
|
|
291
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
292
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
293
|
+
def post_api_auth2fa_enable_with_http_info(post_api_auth2fa_enable_request, opts = {})
|
|
294
|
+
if @api_client.config.debugging
|
|
295
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_enable ...'
|
|
296
|
+
end
|
|
297
|
+
# verify the required parameter 'post_api_auth2fa_enable_request' is set
|
|
298
|
+
if @api_client.config.client_side_validation && post_api_auth2fa_enable_request.nil?
|
|
299
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth2fa_enable_request' when calling AuthApi.post_api_auth2fa_enable"
|
|
300
|
+
end
|
|
301
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
302
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_enable, the character length must be smaller than or equal to 255.'
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
306
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_enable, the character length must be great than or equal to 1.'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# resource path
|
|
310
|
+
local_var_path = '/api/auth/2fa/enable'
|
|
311
|
+
|
|
312
|
+
# query parameters
|
|
313
|
+
query_params = opts[:query_params] || {}
|
|
314
|
+
|
|
315
|
+
# header parameters
|
|
316
|
+
header_params = opts[:header_params] || {}
|
|
317
|
+
# HTTP header 'Content-Type'
|
|
318
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
319
|
+
if !content_type.nil?
|
|
320
|
+
header_params['Content-Type'] = content_type
|
|
321
|
+
end
|
|
322
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
323
|
+
|
|
324
|
+
# form parameters
|
|
325
|
+
form_params = opts[:form_params] || {}
|
|
326
|
+
|
|
327
|
+
# http body (model)
|
|
328
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth2fa_enable_request)
|
|
329
|
+
|
|
330
|
+
# return_type
|
|
331
|
+
return_type = opts[:debug_return_type]
|
|
332
|
+
|
|
333
|
+
# auth_names
|
|
334
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
335
|
+
|
|
336
|
+
new_options = opts.merge(
|
|
337
|
+
:operation => :"AuthApi.post_api_auth2fa_enable",
|
|
338
|
+
:header_params => header_params,
|
|
339
|
+
:query_params => query_params,
|
|
340
|
+
:form_params => form_params,
|
|
341
|
+
:body => post_body,
|
|
342
|
+
:auth_names => auth_names,
|
|
343
|
+
:return_type => return_type
|
|
344
|
+
)
|
|
345
|
+
|
|
346
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
347
|
+
if @api_client.config.debugging
|
|
348
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
349
|
+
end
|
|
350
|
+
return data, status_code, headers
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Confirm the required enrolment and finish signing in
|
|
354
|
+
# Verifies the first code of the new secret, enables 2FA, and returns the session tokens plus 10 one-time `recoveryCodes` (shown only now).
|
|
355
|
+
# @param post_api_auth2fa_enroll_confirm_request [PostApiAuth2faEnrollConfirmRequest]
|
|
356
|
+
# @param [Hash] opts the optional parameters
|
|
357
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
358
|
+
# @return [nil]
|
|
359
|
+
def post_api_auth2fa_enroll_confirm(post_api_auth2fa_enroll_confirm_request, opts = {})
|
|
360
|
+
post_api_auth2fa_enroll_confirm_with_http_info(post_api_auth2fa_enroll_confirm_request, opts)
|
|
361
|
+
nil
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Confirm the required enrolment and finish signing in
|
|
365
|
+
# Verifies the first code of the new secret, enables 2FA, and returns the session tokens plus 10 one-time `recoveryCodes` (shown only now).
|
|
366
|
+
# @param post_api_auth2fa_enroll_confirm_request [PostApiAuth2faEnrollConfirmRequest]
|
|
367
|
+
# @param [Hash] opts the optional parameters
|
|
368
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
369
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
370
|
+
def post_api_auth2fa_enroll_confirm_with_http_info(post_api_auth2fa_enroll_confirm_request, opts = {})
|
|
371
|
+
if @api_client.config.debugging
|
|
372
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_enroll_confirm ...'
|
|
373
|
+
end
|
|
374
|
+
# verify the required parameter 'post_api_auth2fa_enroll_confirm_request' is set
|
|
375
|
+
if @api_client.config.client_side_validation && post_api_auth2fa_enroll_confirm_request.nil?
|
|
376
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth2fa_enroll_confirm_request' when calling AuthApi.post_api_auth2fa_enroll_confirm"
|
|
377
|
+
end
|
|
378
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
379
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_enroll_confirm, the character length must be smaller than or equal to 255.'
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
383
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_enroll_confirm, the character length must be great than or equal to 1.'
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# resource path
|
|
387
|
+
local_var_path = '/api/auth/2fa/enroll/confirm'
|
|
388
|
+
|
|
389
|
+
# query parameters
|
|
390
|
+
query_params = opts[:query_params] || {}
|
|
391
|
+
|
|
392
|
+
# header parameters
|
|
393
|
+
header_params = opts[:header_params] || {}
|
|
394
|
+
# HTTP header 'Content-Type'
|
|
395
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
396
|
+
if !content_type.nil?
|
|
397
|
+
header_params['Content-Type'] = content_type
|
|
398
|
+
end
|
|
399
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
400
|
+
|
|
401
|
+
# form parameters
|
|
402
|
+
form_params = opts[:form_params] || {}
|
|
403
|
+
|
|
404
|
+
# http body (model)
|
|
405
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth2fa_enroll_confirm_request)
|
|
406
|
+
|
|
407
|
+
# return_type
|
|
408
|
+
return_type = opts[:debug_return_type]
|
|
409
|
+
|
|
410
|
+
# auth_names
|
|
411
|
+
auth_names = opts[:debug_auth_names] || []
|
|
412
|
+
|
|
413
|
+
new_options = opts.merge(
|
|
414
|
+
:operation => :"AuthApi.post_api_auth2fa_enroll_confirm",
|
|
415
|
+
:header_params => header_params,
|
|
416
|
+
:query_params => query_params,
|
|
417
|
+
:form_params => form_params,
|
|
418
|
+
:body => post_body,
|
|
419
|
+
:auth_names => auth_names,
|
|
420
|
+
:return_type => return_type
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_enroll_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
426
|
+
end
|
|
427
|
+
return data, status_code, headers
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Start the enrolment required by the workspace (during sign-in)
|
|
431
|
+
# When `POST /auth/login` answered `twoFactorEnrollmentRequired`, returns a new TOTP `secret` and its `otpauthUri` (render it as a QR code). Calling again replaces the secret.
|
|
432
|
+
# @param post_api_auth2fa_enroll_start_request [PostApiAuth2faEnrollStartRequest]
|
|
433
|
+
# @param [Hash] opts the optional parameters
|
|
434
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
435
|
+
# @return [nil]
|
|
436
|
+
def post_api_auth2fa_enroll_start(post_api_auth2fa_enroll_start_request, opts = {})
|
|
437
|
+
post_api_auth2fa_enroll_start_with_http_info(post_api_auth2fa_enroll_start_request, opts)
|
|
438
|
+
nil
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# Start the enrolment required by the workspace (during sign-in)
|
|
442
|
+
# When `POST /auth/login` answered `twoFactorEnrollmentRequired`, returns a new TOTP `secret` and its `otpauthUri` (render it as a QR code). Calling again replaces the secret.
|
|
443
|
+
# @param post_api_auth2fa_enroll_start_request [PostApiAuth2faEnrollStartRequest]
|
|
444
|
+
# @param [Hash] opts the optional parameters
|
|
445
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
446
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
447
|
+
def post_api_auth2fa_enroll_start_with_http_info(post_api_auth2fa_enroll_start_request, opts = {})
|
|
448
|
+
if @api_client.config.debugging
|
|
449
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_enroll_start ...'
|
|
450
|
+
end
|
|
451
|
+
# verify the required parameter 'post_api_auth2fa_enroll_start_request' is set
|
|
452
|
+
if @api_client.config.client_side_validation && post_api_auth2fa_enroll_start_request.nil?
|
|
453
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth2fa_enroll_start_request' when calling AuthApi.post_api_auth2fa_enroll_start"
|
|
454
|
+
end
|
|
455
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
456
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_enroll_start, the character length must be smaller than or equal to 255.'
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
460
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_enroll_start, the character length must be great than or equal to 1.'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# resource path
|
|
464
|
+
local_var_path = '/api/auth/2fa/enroll/start'
|
|
465
|
+
|
|
466
|
+
# query parameters
|
|
467
|
+
query_params = opts[:query_params] || {}
|
|
468
|
+
|
|
469
|
+
# header parameters
|
|
470
|
+
header_params = opts[:header_params] || {}
|
|
471
|
+
# HTTP header 'Content-Type'
|
|
472
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
473
|
+
if !content_type.nil?
|
|
474
|
+
header_params['Content-Type'] = content_type
|
|
475
|
+
end
|
|
476
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
477
|
+
|
|
478
|
+
# form parameters
|
|
479
|
+
form_params = opts[:form_params] || {}
|
|
480
|
+
|
|
481
|
+
# http body (model)
|
|
482
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth2fa_enroll_start_request)
|
|
483
|
+
|
|
484
|
+
# return_type
|
|
485
|
+
return_type = opts[:debug_return_type]
|
|
486
|
+
|
|
487
|
+
# auth_names
|
|
488
|
+
auth_names = opts[:debug_auth_names] || []
|
|
489
|
+
|
|
490
|
+
new_options = opts.merge(
|
|
491
|
+
:operation => :"AuthApi.post_api_auth2fa_enroll_start",
|
|
492
|
+
:header_params => header_params,
|
|
493
|
+
:query_params => query_params,
|
|
494
|
+
:form_params => form_params,
|
|
495
|
+
:body => post_body,
|
|
496
|
+
:auth_names => auth_names,
|
|
497
|
+
:return_type => return_type
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
501
|
+
if @api_client.config.debugging
|
|
502
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_enroll_start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
503
|
+
end
|
|
504
|
+
return data, status_code, headers
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
# Replace the recovery codes
|
|
508
|
+
# Requires a current TOTP `code` (or a recovery code). Invalidates every previous recovery code and returns 10 new ones.
|
|
509
|
+
# @param post_api_auth2fa_disable_request [PostApiAuth2faDisableRequest]
|
|
510
|
+
# @param [Hash] opts the optional parameters
|
|
511
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
512
|
+
# @return [nil]
|
|
513
|
+
def post_api_auth2fa_recovery_codes(post_api_auth2fa_disable_request, opts = {})
|
|
514
|
+
post_api_auth2fa_recovery_codes_with_http_info(post_api_auth2fa_disable_request, opts)
|
|
515
|
+
nil
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Replace the recovery codes
|
|
519
|
+
# Requires a current TOTP `code` (or a recovery code). Invalidates every previous recovery code and returns 10 new ones.
|
|
520
|
+
# @param post_api_auth2fa_disable_request [PostApiAuth2faDisableRequest]
|
|
521
|
+
# @param [Hash] opts the optional parameters
|
|
522
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
523
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
524
|
+
def post_api_auth2fa_recovery_codes_with_http_info(post_api_auth2fa_disable_request, opts = {})
|
|
525
|
+
if @api_client.config.debugging
|
|
526
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_recovery_codes ...'
|
|
527
|
+
end
|
|
528
|
+
# verify the required parameter 'post_api_auth2fa_disable_request' is set
|
|
529
|
+
if @api_client.config.client_side_validation && post_api_auth2fa_disable_request.nil?
|
|
530
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth2fa_disable_request' when calling AuthApi.post_api_auth2fa_recovery_codes"
|
|
531
|
+
end
|
|
532
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
533
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_recovery_codes, the character length must be smaller than or equal to 255.'
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
537
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_recovery_codes, the character length must be great than or equal to 1.'
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# resource path
|
|
541
|
+
local_var_path = '/api/auth/2fa/recovery-codes'
|
|
542
|
+
|
|
543
|
+
# query parameters
|
|
544
|
+
query_params = opts[:query_params] || {}
|
|
545
|
+
|
|
546
|
+
# header parameters
|
|
547
|
+
header_params = opts[:header_params] || {}
|
|
548
|
+
# HTTP header 'Content-Type'
|
|
549
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
550
|
+
if !content_type.nil?
|
|
551
|
+
header_params['Content-Type'] = content_type
|
|
552
|
+
end
|
|
553
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
554
|
+
|
|
555
|
+
# form parameters
|
|
556
|
+
form_params = opts[:form_params] || {}
|
|
557
|
+
|
|
558
|
+
# http body (model)
|
|
559
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth2fa_disable_request)
|
|
560
|
+
|
|
561
|
+
# return_type
|
|
562
|
+
return_type = opts[:debug_return_type]
|
|
563
|
+
|
|
564
|
+
# auth_names
|
|
565
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
566
|
+
|
|
567
|
+
new_options = opts.merge(
|
|
568
|
+
:operation => :"AuthApi.post_api_auth2fa_recovery_codes",
|
|
569
|
+
:header_params => header_params,
|
|
570
|
+
:query_params => query_params,
|
|
571
|
+
:form_params => form_params,
|
|
572
|
+
:body => post_body,
|
|
573
|
+
:auth_names => auth_names,
|
|
574
|
+
:return_type => return_type
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
578
|
+
if @api_client.config.debugging
|
|
579
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_recovery_codes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
580
|
+
end
|
|
581
|
+
return data, status_code, headers
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
# Start two-factor enrolment
|
|
585
|
+
# Returns a new TOTP `secret` and `otpauthUri` (render as a QR code client-side). Confirm within 10 minutes with `POST /auth/2fa/enable`.
|
|
586
|
+
# @param [Hash] opts the optional parameters
|
|
587
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
588
|
+
# @return [nil]
|
|
589
|
+
def post_api_auth2fa_setup(opts = {})
|
|
590
|
+
post_api_auth2fa_setup_with_http_info(opts)
|
|
591
|
+
nil
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Start two-factor enrolment
|
|
595
|
+
# Returns a new TOTP `secret` and `otpauthUri` (render as a QR code client-side). Confirm within 10 minutes with `POST /auth/2fa/enable`.
|
|
596
|
+
# @param [Hash] opts the optional parameters
|
|
597
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
598
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
599
|
+
def post_api_auth2fa_setup_with_http_info(opts = {})
|
|
600
|
+
if @api_client.config.debugging
|
|
601
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_setup ...'
|
|
602
|
+
end
|
|
603
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
604
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_setup, the character length must be smaller than or equal to 255.'
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
608
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_setup, the character length must be great than or equal to 1.'
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
# resource path
|
|
612
|
+
local_var_path = '/api/auth/2fa/setup'
|
|
613
|
+
|
|
614
|
+
# query parameters
|
|
615
|
+
query_params = opts[:query_params] || {}
|
|
616
|
+
|
|
617
|
+
# header parameters
|
|
618
|
+
header_params = opts[:header_params] || {}
|
|
619
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
620
|
+
|
|
621
|
+
# form parameters
|
|
622
|
+
form_params = opts[:form_params] || {}
|
|
623
|
+
|
|
624
|
+
# http body (model)
|
|
625
|
+
post_body = opts[:debug_body]
|
|
626
|
+
|
|
627
|
+
# return_type
|
|
628
|
+
return_type = opts[:debug_return_type]
|
|
629
|
+
|
|
630
|
+
# auth_names
|
|
631
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
632
|
+
|
|
633
|
+
new_options = opts.merge(
|
|
634
|
+
:operation => :"AuthApi.post_api_auth2fa_setup",
|
|
635
|
+
:header_params => header_params,
|
|
636
|
+
:query_params => query_params,
|
|
637
|
+
:form_params => form_params,
|
|
638
|
+
:body => post_body,
|
|
639
|
+
:auth_names => auth_names,
|
|
640
|
+
:return_type => return_type
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
644
|
+
if @api_client.config.debugging
|
|
645
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
646
|
+
end
|
|
647
|
+
return data, status_code, headers
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
# Complete sign-in with a two-factor code
|
|
651
|
+
# Second step after `POST /auth/login` answered `twoFactorRequired`. Send the 6-digit TOTP `code` or a one-time `recoveryCode`. Returns the same tokens as a password-only sign-in. A pending sign-in lives 5 minutes and allows 5 attempts; 10 failures lock second-factor checks for the account for 15 minutes (429 `too_many_attempts`). A code is accepted once (replay refused).
|
|
652
|
+
# @param post_api_auth2fa_verify_request [PostApiAuth2faVerifyRequest]
|
|
653
|
+
# @param [Hash] opts the optional parameters
|
|
654
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
655
|
+
# @return [nil]
|
|
656
|
+
def post_api_auth2fa_verify(post_api_auth2fa_verify_request, opts = {})
|
|
657
|
+
post_api_auth2fa_verify_with_http_info(post_api_auth2fa_verify_request, opts)
|
|
658
|
+
nil
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# Complete sign-in with a two-factor code
|
|
662
|
+
# Second step after `POST /auth/login` answered `twoFactorRequired`. Send the 6-digit TOTP `code` or a one-time `recoveryCode`. Returns the same tokens as a password-only sign-in. A pending sign-in lives 5 minutes and allows 5 attempts; 10 failures lock second-factor checks for the account for 15 minutes (429 `too_many_attempts`). A code is accepted once (replay refused).
|
|
663
|
+
# @param post_api_auth2fa_verify_request [PostApiAuth2faVerifyRequest]
|
|
664
|
+
# @param [Hash] opts the optional parameters
|
|
665
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
666
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
667
|
+
def post_api_auth2fa_verify_with_http_info(post_api_auth2fa_verify_request, opts = {})
|
|
668
|
+
if @api_client.config.debugging
|
|
669
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth2fa_verify ...'
|
|
670
|
+
end
|
|
671
|
+
# verify the required parameter 'post_api_auth2fa_verify_request' is set
|
|
672
|
+
if @api_client.config.client_side_validation && post_api_auth2fa_verify_request.nil?
|
|
673
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth2fa_verify_request' when calling AuthApi.post_api_auth2fa_verify"
|
|
674
|
+
end
|
|
675
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
676
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_verify, the character length must be smaller than or equal to 255.'
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
680
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth2fa_verify, the character length must be great than or equal to 1.'
|
|
681
|
+
end
|
|
682
|
+
|
|
683
|
+
# resource path
|
|
684
|
+
local_var_path = '/api/auth/2fa/verify'
|
|
685
|
+
|
|
686
|
+
# query parameters
|
|
687
|
+
query_params = opts[:query_params] || {}
|
|
688
|
+
|
|
689
|
+
# header parameters
|
|
690
|
+
header_params = opts[:header_params] || {}
|
|
691
|
+
# HTTP header 'Content-Type'
|
|
692
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
693
|
+
if !content_type.nil?
|
|
694
|
+
header_params['Content-Type'] = content_type
|
|
695
|
+
end
|
|
696
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
697
|
+
|
|
698
|
+
# form parameters
|
|
699
|
+
form_params = opts[:form_params] || {}
|
|
700
|
+
|
|
701
|
+
# http body (model)
|
|
702
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth2fa_verify_request)
|
|
703
|
+
|
|
704
|
+
# return_type
|
|
705
|
+
return_type = opts[:debug_return_type]
|
|
706
|
+
|
|
707
|
+
# auth_names
|
|
708
|
+
auth_names = opts[:debug_auth_names] || []
|
|
709
|
+
|
|
710
|
+
new_options = opts.merge(
|
|
711
|
+
:operation => :"AuthApi.post_api_auth2fa_verify",
|
|
712
|
+
:header_params => header_params,
|
|
713
|
+
:query_params => query_params,
|
|
714
|
+
:form_params => form_params,
|
|
715
|
+
:body => post_body,
|
|
716
|
+
:auth_names => auth_names,
|
|
717
|
+
:return_type => return_type
|
|
718
|
+
)
|
|
719
|
+
|
|
720
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
721
|
+
if @api_client.config.debugging
|
|
722
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth2fa_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
723
|
+
end
|
|
724
|
+
return data, status_code, headers
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
# Accept a workspace invitation
|
|
728
|
+
# Creates a user in the invited tenant with the invited role and returns dashboard session tokens.
|
|
729
|
+
# @param post_api_auth_accept_invite_request [PostApiAuthAcceptInviteRequest]
|
|
730
|
+
# @param [Hash] opts the optional parameters
|
|
731
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
732
|
+
# @return [nil]
|
|
733
|
+
def post_api_auth_accept_invite(post_api_auth_accept_invite_request, opts = {})
|
|
734
|
+
post_api_auth_accept_invite_with_http_info(post_api_auth_accept_invite_request, opts)
|
|
735
|
+
nil
|
|
736
|
+
end
|
|
737
|
+
|
|
738
|
+
# Accept a workspace invitation
|
|
739
|
+
# Creates a user in the invited tenant with the invited role and returns dashboard session tokens.
|
|
740
|
+
# @param post_api_auth_accept_invite_request [PostApiAuthAcceptInviteRequest]
|
|
741
|
+
# @param [Hash] opts the optional parameters
|
|
742
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
743
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
744
|
+
def post_api_auth_accept_invite_with_http_info(post_api_auth_accept_invite_request, opts = {})
|
|
745
|
+
if @api_client.config.debugging
|
|
746
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_accept_invite ...'
|
|
747
|
+
end
|
|
748
|
+
# verify the required parameter 'post_api_auth_accept_invite_request' is set
|
|
749
|
+
if @api_client.config.client_side_validation && post_api_auth_accept_invite_request.nil?
|
|
750
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_accept_invite_request' when calling AuthApi.post_api_auth_accept_invite"
|
|
751
|
+
end
|
|
752
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
753
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_accept_invite, the character length must be smaller than or equal to 255.'
|
|
754
|
+
end
|
|
755
|
+
|
|
756
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
757
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_accept_invite, the character length must be great than or equal to 1.'
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
# resource path
|
|
761
|
+
local_var_path = '/api/auth/accept-invite'
|
|
762
|
+
|
|
763
|
+
# query parameters
|
|
764
|
+
query_params = opts[:query_params] || {}
|
|
765
|
+
|
|
766
|
+
# header parameters
|
|
767
|
+
header_params = opts[:header_params] || {}
|
|
768
|
+
# HTTP header 'Content-Type'
|
|
769
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
770
|
+
if !content_type.nil?
|
|
771
|
+
header_params['Content-Type'] = content_type
|
|
772
|
+
end
|
|
773
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
774
|
+
|
|
775
|
+
# form parameters
|
|
776
|
+
form_params = opts[:form_params] || {}
|
|
777
|
+
|
|
778
|
+
# http body (model)
|
|
779
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_accept_invite_request)
|
|
780
|
+
|
|
781
|
+
# return_type
|
|
782
|
+
return_type = opts[:debug_return_type]
|
|
783
|
+
|
|
784
|
+
# auth_names
|
|
785
|
+
auth_names = opts[:debug_auth_names] || []
|
|
786
|
+
|
|
787
|
+
new_options = opts.merge(
|
|
788
|
+
:operation => :"AuthApi.post_api_auth_accept_invite",
|
|
789
|
+
:header_params => header_params,
|
|
790
|
+
:query_params => query_params,
|
|
791
|
+
:form_params => form_params,
|
|
792
|
+
:body => post_body,
|
|
793
|
+
:auth_names => auth_names,
|
|
794
|
+
:return_type => return_type
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
798
|
+
if @api_client.config.debugging
|
|
799
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_accept_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
800
|
+
end
|
|
801
|
+
return data, status_code, headers
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
# Sign in with email and password
|
|
805
|
+
# Returns tokens, or a second step: `{ twoFactorRequired: true, pendingToken }` when the account has two-factor authentication (finish with `POST /auth/2fa/verify`), or `{ twoFactorEnrollmentRequired: true, pendingToken }` when the workspace requires 2FA and the account has none yet (`POST /auth/2fa/enroll/start` then `/enroll/confirm`). No session exists until the second step succeeds.
|
|
806
|
+
# @param post_api_auth_login_request [PostApiAuthLoginRequest]
|
|
807
|
+
# @param [Hash] opts the optional parameters
|
|
808
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
809
|
+
# @return [nil]
|
|
810
|
+
def post_api_auth_login(post_api_auth_login_request, opts = {})
|
|
811
|
+
post_api_auth_login_with_http_info(post_api_auth_login_request, opts)
|
|
812
|
+
nil
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
# Sign in with email and password
|
|
816
|
+
# Returns tokens, or a second step: `{ twoFactorRequired: true, pendingToken }` when the account has two-factor authentication (finish with `POST /auth/2fa/verify`), or `{ twoFactorEnrollmentRequired: true, pendingToken }` when the workspace requires 2FA and the account has none yet (`POST /auth/2fa/enroll/start` then `/enroll/confirm`). No session exists until the second step succeeds.
|
|
817
|
+
# @param post_api_auth_login_request [PostApiAuthLoginRequest]
|
|
818
|
+
# @param [Hash] opts the optional parameters
|
|
819
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
820
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
821
|
+
def post_api_auth_login_with_http_info(post_api_auth_login_request, opts = {})
|
|
822
|
+
if @api_client.config.debugging
|
|
823
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_login ...'
|
|
824
|
+
end
|
|
825
|
+
# verify the required parameter 'post_api_auth_login_request' is set
|
|
826
|
+
if @api_client.config.client_side_validation && post_api_auth_login_request.nil?
|
|
827
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_login_request' when calling AuthApi.post_api_auth_login"
|
|
828
|
+
end
|
|
829
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
830
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_login, the character length must be smaller than or equal to 255.'
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
834
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_login, the character length must be great than or equal to 1.'
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
# resource path
|
|
838
|
+
local_var_path = '/api/auth/login'
|
|
839
|
+
|
|
840
|
+
# query parameters
|
|
841
|
+
query_params = opts[:query_params] || {}
|
|
842
|
+
|
|
843
|
+
# header parameters
|
|
844
|
+
header_params = opts[:header_params] || {}
|
|
845
|
+
# HTTP header 'Content-Type'
|
|
846
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
847
|
+
if !content_type.nil?
|
|
848
|
+
header_params['Content-Type'] = content_type
|
|
849
|
+
end
|
|
850
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
851
|
+
|
|
852
|
+
# form parameters
|
|
853
|
+
form_params = opts[:form_params] || {}
|
|
854
|
+
|
|
855
|
+
# http body (model)
|
|
856
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_login_request)
|
|
857
|
+
|
|
858
|
+
# return_type
|
|
859
|
+
return_type = opts[:debug_return_type]
|
|
860
|
+
|
|
861
|
+
# auth_names
|
|
862
|
+
auth_names = opts[:debug_auth_names] || []
|
|
863
|
+
|
|
864
|
+
new_options = opts.merge(
|
|
865
|
+
:operation => :"AuthApi.post_api_auth_login",
|
|
866
|
+
:header_params => header_params,
|
|
867
|
+
:query_params => query_params,
|
|
868
|
+
:form_params => form_params,
|
|
869
|
+
:body => post_body,
|
|
870
|
+
:auth_names => auth_names,
|
|
871
|
+
:return_type => return_type
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
875
|
+
if @api_client.config.debugging
|
|
876
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
877
|
+
end
|
|
878
|
+
return data, status_code, headers
|
|
879
|
+
end
|
|
880
|
+
|
|
881
|
+
# Revoke refresh token
|
|
882
|
+
# @param post_api_auth_logout_request [PostApiAuthLogoutRequest]
|
|
883
|
+
# @param [Hash] opts the optional parameters
|
|
884
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
885
|
+
# @return [nil]
|
|
886
|
+
def post_api_auth_logout(post_api_auth_logout_request, opts = {})
|
|
887
|
+
post_api_auth_logout_with_http_info(post_api_auth_logout_request, opts)
|
|
888
|
+
nil
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
# Revoke refresh token
|
|
892
|
+
# @param post_api_auth_logout_request [PostApiAuthLogoutRequest]
|
|
893
|
+
# @param [Hash] opts the optional parameters
|
|
894
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
895
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
896
|
+
def post_api_auth_logout_with_http_info(post_api_auth_logout_request, opts = {})
|
|
897
|
+
if @api_client.config.debugging
|
|
898
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_logout ...'
|
|
899
|
+
end
|
|
900
|
+
# verify the required parameter 'post_api_auth_logout_request' is set
|
|
901
|
+
if @api_client.config.client_side_validation && post_api_auth_logout_request.nil?
|
|
902
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_logout_request' when calling AuthApi.post_api_auth_logout"
|
|
903
|
+
end
|
|
904
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
905
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_logout, the character length must be smaller than or equal to 255.'
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
909
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_logout, the character length must be great than or equal to 1.'
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
# resource path
|
|
913
|
+
local_var_path = '/api/auth/logout'
|
|
914
|
+
|
|
915
|
+
# query parameters
|
|
916
|
+
query_params = opts[:query_params] || {}
|
|
917
|
+
|
|
918
|
+
# header parameters
|
|
919
|
+
header_params = opts[:header_params] || {}
|
|
920
|
+
# HTTP header 'Content-Type'
|
|
921
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
922
|
+
if !content_type.nil?
|
|
923
|
+
header_params['Content-Type'] = content_type
|
|
924
|
+
end
|
|
925
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
926
|
+
|
|
927
|
+
# form parameters
|
|
928
|
+
form_params = opts[:form_params] || {}
|
|
929
|
+
|
|
930
|
+
# http body (model)
|
|
931
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_logout_request)
|
|
932
|
+
|
|
933
|
+
# return_type
|
|
934
|
+
return_type = opts[:debug_return_type]
|
|
935
|
+
|
|
936
|
+
# auth_names
|
|
937
|
+
auth_names = opts[:debug_auth_names] || []
|
|
938
|
+
|
|
939
|
+
new_options = opts.merge(
|
|
940
|
+
:operation => :"AuthApi.post_api_auth_logout",
|
|
941
|
+
:header_params => header_params,
|
|
942
|
+
:query_params => query_params,
|
|
943
|
+
:form_params => form_params,
|
|
944
|
+
:body => post_body,
|
|
945
|
+
:auth_names => auth_names,
|
|
946
|
+
:return_type => return_type
|
|
947
|
+
)
|
|
948
|
+
|
|
949
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
950
|
+
if @api_client.config.debugging
|
|
951
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
952
|
+
end
|
|
953
|
+
return data, status_code, headers
|
|
954
|
+
end
|
|
955
|
+
|
|
956
|
+
# Rotate refresh token and issue new access JWT
|
|
957
|
+
# Consumes a one-time refresh token (Redis), revokes it, and returns a new refresh + access pair. Use `audience: viewer` for B2C embed tokens.
|
|
958
|
+
# @param post_api_auth_refresh_request [PostApiAuthRefreshRequest]
|
|
959
|
+
# @param [Hash] opts the optional parameters
|
|
960
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
961
|
+
# @return [nil]
|
|
962
|
+
def post_api_auth_refresh(post_api_auth_refresh_request, opts = {})
|
|
963
|
+
post_api_auth_refresh_with_http_info(post_api_auth_refresh_request, opts)
|
|
964
|
+
nil
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
# Rotate refresh token and issue new access JWT
|
|
968
|
+
# Consumes a one-time refresh token (Redis), revokes it, and returns a new refresh + access pair. Use `audience: viewer` for B2C embed tokens.
|
|
969
|
+
# @param post_api_auth_refresh_request [PostApiAuthRefreshRequest]
|
|
970
|
+
# @param [Hash] opts the optional parameters
|
|
971
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
972
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
973
|
+
def post_api_auth_refresh_with_http_info(post_api_auth_refresh_request, opts = {})
|
|
974
|
+
if @api_client.config.debugging
|
|
975
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_refresh ...'
|
|
976
|
+
end
|
|
977
|
+
# verify the required parameter 'post_api_auth_refresh_request' is set
|
|
978
|
+
if @api_client.config.client_side_validation && post_api_auth_refresh_request.nil?
|
|
979
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_refresh_request' when calling AuthApi.post_api_auth_refresh"
|
|
980
|
+
end
|
|
981
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
982
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_refresh, the character length must be smaller than or equal to 255.'
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
986
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_refresh, the character length must be great than or equal to 1.'
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
# resource path
|
|
990
|
+
local_var_path = '/api/auth/refresh'
|
|
991
|
+
|
|
992
|
+
# query parameters
|
|
993
|
+
query_params = opts[:query_params] || {}
|
|
994
|
+
|
|
995
|
+
# header parameters
|
|
996
|
+
header_params = opts[:header_params] || {}
|
|
997
|
+
# HTTP header 'Content-Type'
|
|
998
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
999
|
+
if !content_type.nil?
|
|
1000
|
+
header_params['Content-Type'] = content_type
|
|
1001
|
+
end
|
|
1002
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1003
|
+
|
|
1004
|
+
# form parameters
|
|
1005
|
+
form_params = opts[:form_params] || {}
|
|
1006
|
+
|
|
1007
|
+
# http body (model)
|
|
1008
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_refresh_request)
|
|
1009
|
+
|
|
1010
|
+
# return_type
|
|
1011
|
+
return_type = opts[:debug_return_type]
|
|
1012
|
+
|
|
1013
|
+
# auth_names
|
|
1014
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1015
|
+
|
|
1016
|
+
new_options = opts.merge(
|
|
1017
|
+
:operation => :"AuthApi.post_api_auth_refresh",
|
|
1018
|
+
:header_params => header_params,
|
|
1019
|
+
:query_params => query_params,
|
|
1020
|
+
:form_params => form_params,
|
|
1021
|
+
:body => post_body,
|
|
1022
|
+
:auth_names => auth_names,
|
|
1023
|
+
:return_type => return_type
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1027
|
+
if @api_client.config.debugging
|
|
1028
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1029
|
+
end
|
|
1030
|
+
return data, status_code, headers
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# Create account and workspace
|
|
1034
|
+
# Registers a new user, provisions a tenant workspace, and returns an HS256 dashboard JWT (`tenant_id`, `sub`, `email`, `role`).
|
|
1035
|
+
# @param post_api_auth_signup_request [PostApiAuthSignupRequest]
|
|
1036
|
+
# @param [Hash] opts the optional parameters
|
|
1037
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1038
|
+
# @return [nil]
|
|
1039
|
+
def post_api_auth_signup(post_api_auth_signup_request, opts = {})
|
|
1040
|
+
post_api_auth_signup_with_http_info(post_api_auth_signup_request, opts)
|
|
1041
|
+
nil
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
# Create account and workspace
|
|
1045
|
+
# Registers a new user, provisions a tenant workspace, and returns an HS256 dashboard JWT (`tenant_id`, `sub`, `email`, `role`).
|
|
1046
|
+
# @param post_api_auth_signup_request [PostApiAuthSignupRequest]
|
|
1047
|
+
# @param [Hash] opts the optional parameters
|
|
1048
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1049
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1050
|
+
def post_api_auth_signup_with_http_info(post_api_auth_signup_request, opts = {})
|
|
1051
|
+
if @api_client.config.debugging
|
|
1052
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_signup ...'
|
|
1053
|
+
end
|
|
1054
|
+
# verify the required parameter 'post_api_auth_signup_request' is set
|
|
1055
|
+
if @api_client.config.client_side_validation && post_api_auth_signup_request.nil?
|
|
1056
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_signup_request' when calling AuthApi.post_api_auth_signup"
|
|
1057
|
+
end
|
|
1058
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
1059
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_signup, the character length must be smaller than or equal to 255.'
|
|
1060
|
+
end
|
|
1061
|
+
|
|
1062
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
1063
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_signup, the character length must be great than or equal to 1.'
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
# resource path
|
|
1067
|
+
local_var_path = '/api/auth/signup'
|
|
1068
|
+
|
|
1069
|
+
# query parameters
|
|
1070
|
+
query_params = opts[:query_params] || {}
|
|
1071
|
+
|
|
1072
|
+
# header parameters
|
|
1073
|
+
header_params = opts[:header_params] || {}
|
|
1074
|
+
# HTTP header 'Content-Type'
|
|
1075
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
1076
|
+
if !content_type.nil?
|
|
1077
|
+
header_params['Content-Type'] = content_type
|
|
1078
|
+
end
|
|
1079
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1080
|
+
|
|
1081
|
+
# form parameters
|
|
1082
|
+
form_params = opts[:form_params] || {}
|
|
1083
|
+
|
|
1084
|
+
# http body (model)
|
|
1085
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_signup_request)
|
|
1086
|
+
|
|
1087
|
+
# return_type
|
|
1088
|
+
return_type = opts[:debug_return_type]
|
|
1089
|
+
|
|
1090
|
+
# auth_names
|
|
1091
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1092
|
+
|
|
1093
|
+
new_options = opts.merge(
|
|
1094
|
+
:operation => :"AuthApi.post_api_auth_signup",
|
|
1095
|
+
:header_params => header_params,
|
|
1096
|
+
:query_params => query_params,
|
|
1097
|
+
:form_params => form_params,
|
|
1098
|
+
:body => post_body,
|
|
1099
|
+
:auth_names => auth_names,
|
|
1100
|
+
:return_type => return_type
|
|
1101
|
+
)
|
|
1102
|
+
|
|
1103
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1104
|
+
if @api_client.config.debugging
|
|
1105
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1106
|
+
end
|
|
1107
|
+
return data, status_code, headers
|
|
1108
|
+
end
|
|
1109
|
+
|
|
1110
|
+
# Switch active workspace
|
|
1111
|
+
# Re-issues dashboard JWT and refresh token for a workspace the user already belongs to. A workspace that requires two-factor authentication refuses members without it (403 `two_factor_enrollment_required`).
|
|
1112
|
+
# @param post_api_auth_switch_workspace_request [PostApiAuthSwitchWorkspaceRequest]
|
|
1113
|
+
# @param [Hash] opts the optional parameters
|
|
1114
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1115
|
+
# @return [nil]
|
|
1116
|
+
def post_api_auth_switch_workspace(post_api_auth_switch_workspace_request, opts = {})
|
|
1117
|
+
post_api_auth_switch_workspace_with_http_info(post_api_auth_switch_workspace_request, opts)
|
|
1118
|
+
nil
|
|
1119
|
+
end
|
|
1120
|
+
|
|
1121
|
+
# Switch active workspace
|
|
1122
|
+
# Re-issues dashboard JWT and refresh token for a workspace the user already belongs to. A workspace that requires two-factor authentication refuses members without it (403 `two_factor_enrollment_required`).
|
|
1123
|
+
# @param post_api_auth_switch_workspace_request [PostApiAuthSwitchWorkspaceRequest]
|
|
1124
|
+
# @param [Hash] opts the optional parameters
|
|
1125
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1126
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1127
|
+
def post_api_auth_switch_workspace_with_http_info(post_api_auth_switch_workspace_request, opts = {})
|
|
1128
|
+
if @api_client.config.debugging
|
|
1129
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.post_api_auth_switch_workspace ...'
|
|
1130
|
+
end
|
|
1131
|
+
# verify the required parameter 'post_api_auth_switch_workspace_request' is set
|
|
1132
|
+
if @api_client.config.client_side_validation && post_api_auth_switch_workspace_request.nil?
|
|
1133
|
+
fail ArgumentError, "Missing the required parameter 'post_api_auth_switch_workspace_request' when calling AuthApi.post_api_auth_switch_workspace"
|
|
1134
|
+
end
|
|
1135
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
1136
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_switch_workspace, the character length must be smaller than or equal to 255.'
|
|
1137
|
+
end
|
|
1138
|
+
|
|
1139
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
1140
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AuthApi.post_api_auth_switch_workspace, the character length must be great than or equal to 1.'
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
# resource path
|
|
1144
|
+
local_var_path = '/api/auth/switch-workspace'
|
|
1145
|
+
|
|
1146
|
+
# query parameters
|
|
1147
|
+
query_params = opts[:query_params] || {}
|
|
1148
|
+
|
|
1149
|
+
# header parameters
|
|
1150
|
+
header_params = opts[:header_params] || {}
|
|
1151
|
+
# HTTP header 'Content-Type'
|
|
1152
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
1153
|
+
if !content_type.nil?
|
|
1154
|
+
header_params['Content-Type'] = content_type
|
|
1155
|
+
end
|
|
1156
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1157
|
+
|
|
1158
|
+
# form parameters
|
|
1159
|
+
form_params = opts[:form_params] || {}
|
|
1160
|
+
|
|
1161
|
+
# http body (model)
|
|
1162
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_auth_switch_workspace_request)
|
|
1163
|
+
|
|
1164
|
+
# return_type
|
|
1165
|
+
return_type = opts[:debug_return_type]
|
|
1166
|
+
|
|
1167
|
+
# auth_names
|
|
1168
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1169
|
+
|
|
1170
|
+
new_options = opts.merge(
|
|
1171
|
+
:operation => :"AuthApi.post_api_auth_switch_workspace",
|
|
1172
|
+
:header_params => header_params,
|
|
1173
|
+
:query_params => query_params,
|
|
1174
|
+
:form_params => form_params,
|
|
1175
|
+
:body => post_body,
|
|
1176
|
+
:auth_names => auth_names,
|
|
1177
|
+
:return_type => return_type
|
|
1178
|
+
)
|
|
1179
|
+
|
|
1180
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1181
|
+
if @api_client.config.debugging
|
|
1182
|
+
@api_client.config.logger.debug "API called: AuthApi#post_api_auth_switch_workspace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1183
|
+
end
|
|
1184
|
+
return data, status_code, headers
|
|
1185
|
+
end
|
|
1186
|
+
end
|
|
1187
|
+
end
|