diff --git a/lib/zitadel-client/api/session_service_api.rb b/lib/zitadel-client/api/session_service_api.rb index bcd28b7a..03c7099f 100644 --- a/lib/zitadel-client/api/session_service_api.rb +++ b/lib/zitadel-client/api/session_service_api.rb @@ -90,21 +90,21 @@ def session_service_create_session_with_http_info(session_service_create_session # Terminate an existing session # Terminate your own session or if granted any other session. # @param session_id [String] \"id of the session to terminate\" - # @param session_service_delete_session_body [SessionServiceDeleteSessionBody] + # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] # @param [Hash] opts the optional parameters # @return [SessionServiceDeleteSessionResponse] - def session_service_delete_session(session_id, session_service_delete_session_body, opts = {}) - data, _status_code, _headers = session_service_delete_session_with_http_info(session_id, session_service_delete_session_body, opts) + def session_service_delete_session(session_id, session_service_delete_session_request, opts = {}) + data, _status_code, _headers = session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts) data end # Terminate an existing session # Terminate your own session or if granted any other session. # @param session_id [String] \"id of the session to terminate\" - # @param session_service_delete_session_body [SessionServiceDeleteSessionBody] + # @param session_service_delete_session_request [SessionServiceDeleteSessionRequest] # @param [Hash] opts the optional parameters # @return [Array<(SessionServiceDeleteSessionResponse, Integer, Hash)>] SessionServiceDeleteSessionResponse data, response status code and response headers - def session_service_delete_session_with_http_info(session_id, session_service_delete_session_body, opts = {}) + def session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SessionServiceApi.session_service_delete_session ...' end @@ -112,9 +112,9 @@ def session_service_delete_session_with_http_info(session_id, session_service_de if @api_client.config.client_side_validation && session_id.nil? fail ArgumentError, "Missing the required parameter 'session_id' when calling SessionServiceApi.session_service_delete_session" end - # verify the required parameter 'session_service_delete_session_body' is set - if @api_client.config.client_side_validation && session_service_delete_session_body.nil? - fail ArgumentError, "Missing the required parameter 'session_service_delete_session_body' when calling SessionServiceApi.session_service_delete_session" + # verify the required parameter 'session_service_delete_session_request' is set + if @api_client.config.client_side_validation && session_service_delete_session_request.nil? + fail ArgumentError, "Missing the required parameter 'session_service_delete_session_request' when calling SessionServiceApi.session_service_delete_session" end # resource path local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) @@ -136,7 +136,7 @@ def session_service_delete_session_with_http_info(session_id, session_service_de form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_delete_session_body) + post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_delete_session_request) # return_type return_type = opts[:debug_return_type] || 'SessionServiceDeleteSessionResponse' diff --git a/lib/zitadel-client/models/identity_provider_service_azure_a_d_tenant.rb b/lib/zitadel-client/models/identity_provider_service_azure_a_d_tenant.rb index 9a02c8e1..971af136 100644 --- a/lib/zitadel-client/models/identity_provider_service_azure_a_d_tenant.rb +++ b/lib/zitadel-client/models/identity_provider_service_azure_a_d_tenant.rb @@ -19,28 +19,6 @@ class IdentityProviderServiceAzureADTenant attr_accessor :tenant_id - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { diff --git a/lib/zitadel-client/models/session_service_delete_session_body.rb b/lib/zitadel-client/models/session_service_delete_session_request.rb similarity index 95% rename from lib/zitadel-client/models/session_service_delete_session_body.rb rename to lib/zitadel-client/models/session_service_delete_session_request.rb index 372ba13c..6dfb6107 100644 --- a/lib/zitadel-client/models/session_service_delete_session_body.rb +++ b/lib/zitadel-client/models/session_service_delete_session_request.rb @@ -14,7 +14,7 @@ require 'time' module ZitadelClient - class SessionServiceDeleteSessionBody + class SessionServiceDeleteSessionRequest # \"The current token of the session, previously returned on the create / update request. The token is required unless the authenticated user terminates the own session or is granted the `session.delete` permission.\" attr_accessor :session_token @@ -52,14 +52,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceDeleteSessionBody` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceDeleteSessionRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceDeleteSessionBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceDeleteSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/zitadel-client/models/session_service_request_challenges_o_t_p_email_send_code.rb b/lib/zitadel-client/models/session_service_o_t_p_email_send_code.rb similarity index 96% rename from lib/zitadel-client/models/session_service_request_challenges_o_t_p_email_send_code.rb rename to lib/zitadel-client/models/session_service_o_t_p_email_send_code.rb index 298a4805..9ee214e0 100644 --- a/lib/zitadel-client/models/session_service_request_challenges_o_t_p_email_send_code.rb +++ b/lib/zitadel-client/models/session_service_o_t_p_email_send_code.rb @@ -14,7 +14,7 @@ require 'time' module ZitadelClient - class SessionServiceRequestChallengesOTPEmailSendCode + class SessionServiceOTPEmailSendCode # Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: Code, UserID, LoginName, DisplayName, PreferredLanguage, SessionID attr_accessor :url_template @@ -52,14 +52,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceRequestChallengesOTPEmailSendCode` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceOTPEmailSendCode` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceRequestChallengesOTPEmailSendCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceOTPEmailSendCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/zitadel-client/models/session_service_request_challenges_o_t_p_email.rb b/lib/zitadel-client/models/session_service_request_challenges_o_t_p_email.rb index 56f7ba85..165d1c23 100644 --- a/lib/zitadel-client/models/session_service_request_challenges_o_t_p_email.rb +++ b/lib/zitadel-client/models/session_service_request_challenges_o_t_p_email.rb @@ -40,7 +40,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'send_code' => :'SessionServiceRequestChallengesOTPEmailSendCode', + :'send_code' => :'SessionServiceOTPEmailSendCode', :'return_code' => :'Object' } end diff --git a/lib/zitadel-client/models/user_service_auth_factor.rb b/lib/zitadel-client/models/user_service_auth_factor.rb index b90172dc..cd257666 100644 --- a/lib/zitadel-client/models/user_service_auth_factor.rb +++ b/lib/zitadel-client/models/user_service_auth_factor.rb @@ -25,28 +25,6 @@ class UserServiceAuthFactor attr_accessor :otp_email - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { diff --git a/lib/zitadel-client/models/user_service_user.rb b/lib/zitadel-client/models/user_service_user.rb index b6fd4ddf..2d16bdb2 100644 --- a/lib/zitadel-client/models/user_service_user.rb +++ b/lib/zitadel-client/models/user_service_user.rb @@ -31,28 +31,6 @@ class UserServiceUser attr_accessor :machine - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { diff --git a/spec/check_session_service_spec.rb b/spec/check_session_service_spec.rb index a2fced1d..755e150b 100644 --- a/spec/check_session_service_spec.rb +++ b/spec/check_session_service_spec.rb @@ -41,7 +41,7 @@ end after do - delete_req = ZitadelClient::SessionServiceDeleteSessionBody.new + delete_req = ZitadelClient::SessionServiceDeleteSessionRequest.new begin client.sessions.session_service_delete_session(@session_id, delete_req) rescue StandardError