diff --git a/.fern/metadata.json b/.fern/metadata.json index a8dda9b3c..de53e112b 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { "cliVersion": "5.92.1", "generatorName": "fernapi/fern-ruby-sdk", - "generatorVersion": "1.17.8", + "generatorVersion": "1.24.1", "generatorConfig": { "clientModuleName": "Management", "package-name": "auth0", @@ -10,8 +10,8 @@ "offsetSemantics": "page-index", "useDefaultRequestParameterValues": true }, - "originGitCommit": "7f24c4964990643851db215c3e2f6ff220fca35b", + "originGitCommit": "147c530f85f27d4dbbec076dde0bcd7a4b17ed5c", "originGitCommitIsDirty": true, "invokedBy": "manual", - "sdkVersion": "6.1.1" + "sdkVersion": "6.2.1" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index 5dbe7dbaa..9f02f0f67 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -42,5 +42,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.17.8 -current_generation: 78116dc530cd08317c9323863f3127c2fdec29ee + - commit_sha: 83074ed870797568e512cc7f0fb71dc679cdd7f4 + tree_hash: cbc5c6ccd2dfd5be3b5d68f7bc45a51e62fa6704 + timestamp: 2026-09-15T12:33:08.051Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.24.1 +current_generation: 83074ed870797568e512cc7f0fb71dc679cdd7f4 patches: [] diff --git a/lib/auth0.rb b/lib/auth0.rb index 2648ce5f2..8ade10b9e 100644 --- a/lib/auth0.rb +++ b/lib/auth0.rb @@ -131,9 +131,11 @@ require_relative "auth0/types/acul_configs" require_relative "auth0/types/organization_connection_information" require_relative "auth0/types/add_organization_connection_response_content" +require_relative "auth0/types/advance_ramp_response_content" require_relative "auth0/types/agent_metadata" require_relative "auth0/types/agent_response_content" require_relative "auth0/types/anomaly_ip_format" +require_relative "auth0/types/anonymous_sessions" require_relative "auth0/types/app_metadata" require_relative "auth0/types/assessors_type_enum" require_relative "auth0/types/organization_usage_enum" @@ -579,6 +581,7 @@ require_relative "auth0/types/connection_sign_in_endpoint_ad" require_relative "auth0/types/connection_tenant_domain_ad" require_relative "auth0/types/connection_thumbprints_ad" +require_relative "auth0/types/connection_thumbprints_sha384ad" require_relative "auth0/types/connection_upstream_alias_enum" require_relative "auth0/types/connection_upstream_alias" require_relative "auth0/types/connection_upstream_value" @@ -589,6 +592,7 @@ require_relative "auth0/types/connection_sign_in_endpoint_adfs" require_relative "auth0/types/connection_tenant_domain" require_relative "auth0/types/connection_thumbprints" +require_relative "auth0/types/connection_thumbprints_sha384" require_relative "auth0/types/connection_options_adfs" require_relative "auth0/types/connection_scope_amazon" require_relative "auth0/types/connection_options_amazon" @@ -677,6 +681,7 @@ require_relative "auth0/types/connection_signing_certificate_der_saml" require_relative "auth0/types/connection_tenant_domain_saml" require_relative "auth0/types/connection_thumbprints_saml" +require_relative "auth0/types/connection_thumbprints_sha384saml" require_relative "auth0/types/connection_options_common_saml" require_relative "auth0/types/connection_options_custom" require_relative "auth0/types/connection_options_daccount" @@ -933,6 +938,7 @@ require_relative "auth0/types/create_action_module_response_content" require_relative "auth0/types/create_action_module_version_response_content" require_relative "auth0/types/create_action_response_content" +require_relative "auth0/types/create_anonymous_sessions" require_relative "auth0/types/custom_provider_delivery_method_enum" require_relative "auth0/types/custom_provider_configuration" require_relative "auth0/types/phone_provider_channel_enum" @@ -1774,6 +1780,7 @@ require_relative "auth0/types/log_stream_sumo_response_schema" require_relative "auth0/types/create_log_stream_response_content" require_relative "auth0/types/organization_access_level_enum" +require_relative "auth0/types/organization_member_access_level_enum" require_relative "auth0/types/create_organization_all_connection_response_content" require_relative "auth0/types/create_organization_client_request_item" require_relative "auth0/types/organization_client_metadata_organization_usage_enum" @@ -1810,12 +1817,18 @@ require_relative "auth0/types/rate_limit_policy_consumer_enum" require_relative "auth0/types/rate_limit_policy_resource_enum" require_relative "auth0/types/create_rate_limit_policy_response_content" +require_relative "auth0/types/resource_server_access_token_custom_claims_mapping_rule" +require_relative "auth0/types/resource_server_access_token_custom_claims_mapping" +require_relative "auth0/types/resource_server_access_token_claims_mapping" +require_relative "auth0/types/resource_server_access_token" require_relative "auth0/types/resource_server_authorization_policy" require_relative "auth0/types/resource_server_consent_policy_enum" require_relative "auth0/types/resource_server_proof_of_possession_mechanism_enum" require_relative "auth0/types/resource_server_proof_of_possession_required_for_enum" require_relative "auth0/types/resource_server_proof_of_possession" require_relative "auth0/types/resource_server_scope" +require_relative "auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum" +require_relative "auth0/types/resource_server_subject_type_authorization_anonymous_user" require_relative "auth0/types/resource_server_subject_type_authorization_client_policy_enum" require_relative "auth0/types/resource_server_subject_type_authorization_client" require_relative "auth0/types/resource_server_subject_type_authorization_user_policy_enum" @@ -3262,6 +3275,7 @@ require_relative "auth0/types/get_default_domain_response_content" require_relative "auth0/types/get_directory_provisioning_default_mapping_response_content" require_relative "auth0/types/get_directory_provisioning_response_content" +require_relative "auth0/types/get_email_factor_settings_response_content" require_relative "auth0/types/get_email_provider_response_content" require_relative "auth0/types/get_email_template_response_content" require_relative "auth0/types/get_encryption_key_response_content" @@ -3295,6 +3309,7 @@ require_relative "auth0/types/get_guardian_factors_provider_sms_response_content" require_relative "auth0/types/get_guardian_factors_provider_sms_twilio_response_content" require_relative "auth0/types/get_guardian_factors_provider_sns_response_content" +require_relative "auth0/types/get_guardian_settings_response_content" require_relative "auth0/types/get_hook_response_content" require_relative "auth0/types/get_hook_secret_response_content" require_relative "auth0/types/get_job_summary" @@ -3332,6 +3347,7 @@ require_relative "auth0/types/get_organization_invitation_response_content" require_relative "auth0/types/get_organization_response_content" require_relative "auth0/types/get_partials_response_content" +require_relative "auth0/types/get_phone_factor_settings_response_content" require_relative "auth0/types/phone_provider_protection_backoff_strategy_enum" require_relative "auth0/types/get_phone_provider_protection_response_content" require_relative "auth0/types/get_phone_template_response_content" @@ -3397,6 +3413,7 @@ require_relative "auth0/types/tenant_settings_nullable_security_headers" require_relative "auth0/types/tenant_settings_password_page" require_relative "auth0/types/tenant_settings_resource_parameter_profile" +require_relative "auth0/types/tenant_settings_sessions_anonymous" require_relative "auth0/types/tenant_settings_sessions" require_relative "auth0/types/get_tenant_settings_response_content" require_relative "auth0/types/get_token_exchange_profile_response_content" @@ -3483,14 +3500,6 @@ require_relative "auth0/types/list_organization_role_groups_response_content" require_relative "auth0/types/role_member" require_relative "auth0/types/list_organization_role_members_response_content" -require_relative "auth0/types/organization_deletion_behavior_enum" -require_relative "auth0/types/organization_template_allowed_strategy_enum" -require_relative "auth0/types/organization_template_role_visibility_enum" -require_relative "auth0/types/organization_template_role_visibility_override" -require_relative "auth0/types/organization_template_role_visibility_policy" -require_relative "auth0/types/organization_template_use_for_organization_discovery" -require_relative "auth0/types/organization_template" -require_relative "auth0/types/list_organization_templates_paginated_response_content" require_relative "auth0/types/list_organizations_paginated_response_content" require_relative "auth0/types/phone_template" require_relative "auth0/types/list_phone_templates_response_content" @@ -3514,8 +3523,6 @@ require_relative "auth0/types/list_self_service_profiles_paginated_response_content" require_relative "auth0/types/synchronized_group_payload" require_relative "auth0/types/list_synchronized_groups_response_content" -require_relative "auth0/types/organization_template_assigned_organization" -require_relative "auth0/types/list_template_organizations_paginated_response_content" require_relative "auth0/types/token_exchange_profile_response_content" require_relative "auth0/types/list_token_exchange_profile_response_content" require_relative "auth0/types/user_attribute_profile_template_item" @@ -3561,6 +3568,15 @@ require_relative "auth0/types/not_found_schema_error" require_relative "auth0/types/not_found_schema" require_relative "auth0/types/organization_access_level_enum_with_null" +require_relative "auth0/types/organization_deletion_behavior_enum" +require_relative "auth0/types/organization_member_access_level_enum_with_null" +require_relative "auth0/types/organization_sort_field_enum" +require_relative "auth0/types/organization_template_allowed_strategy_enum" +require_relative "auth0/types/organization_template_role_visibility_enum" +require_relative "auth0/types/organization_template_role_visibility_override" +require_relative "auth0/types/organization_template_role_visibility_policy" +require_relative "auth0/types/organization_template_use_for_organization_discovery" +require_relative "auth0/types/organization_template" require_relative "auth0/types/partial_groups_enum" require_relative "auth0/types/partial_phone_template_content" require_relative "auth0/types/patch_client_credential_response_content" @@ -3588,6 +3604,8 @@ require_relative "auth0/types/register_cimd_client_response_content" require_relative "auth0/types/reset_phone_template_request_content" require_relative "auth0/types/reset_phone_template_response_content" +require_relative "auth0/types/resource_server_search_response" +require_relative "auth0/types/resource_server_sort_field_enum" require_relative "auth0/types/resource_server_token_dialect_schema_enum" require_relative "auth0/types/resource_server_verification_key_pem_certificate" require_relative "auth0/types/revoked_signing_keys_response_content" @@ -3599,6 +3617,10 @@ require_relative "auth0/types/rotate_signing_keys_response_content" require_relative "auth0/types/rules_config" require_relative "auth0/types/search_engine_versions_enum" +require_relative "auth0/types/search_organization" +require_relative "auth0/types/search_organizations_paginated_response_content" +require_relative "auth0/types/search_parser_enum" +require_relative "auth0/types/search_resource_servers_response_content" require_relative "auth0/types/self_service_profile_branding" require_relative "auth0/types/self_service_profile_custom_text_language_enum" require_relative "auth0/types/self_service_profile_custom_text_page_enum" @@ -3617,6 +3639,7 @@ require_relative "auth0/types/self_service_profile_user_attributes" require_relative "auth0/types/session_actor_claim_value" require_relative "auth0/types/set_custom_signing_keys_response_content" +require_relative "auth0/types/set_email_factor_settings_response_content" require_relative "auth0/types/set_email_template_response_content" require_relative "auth0/types/set_guardian_factor_duo_settings_response_content" require_relative "auth0/types/set_guardian_factor_phone_message_types_response_content" @@ -3634,8 +3657,10 @@ require_relative "auth0/types/set_guardian_factors_provider_sms_twilio_response_content" require_relative "auth0/types/set_guardian_policies_request_content" require_relative "auth0/types/set_guardian_policies_response_content" +require_relative "auth0/types/set_guardian_settings_response_content" require_relative "auth0/types/set_network_acls_response_content" require_relative "auth0/types/set_partials_request_content" +require_relative "auth0/types/set_phone_factor_settings_response_content" require_relative "auth0/types/set_rules_config_response_content" require_relative "auth0/types/set_self_service_profile_custom_text_request_content" require_relative "auth0/types/set_self_service_profile_custom_text_response_content" @@ -3662,6 +3687,7 @@ require_relative "auth0/types/update_action_module_response_content" require_relative "auth0/types/update_action_response_content" require_relative "auth0/types/update_acul_response_content" +require_relative "auth0/types/update_anonymous_sessions" require_relative "auth0/types/update_attack_protection_captcha_response_content" require_relative "auth0/types/update_bot_detection_settings_response_content" require_relative "auth0/types/update_branding_page_background" @@ -3859,6 +3885,8 @@ require_relative "auth0/user_grants/types/delete_user_grant_by_user_id_request_parameters" require_relative "auth0/groups/client" require_relative "auth0/groups/types/list_groups_request_parameters" +require_relative "auth0/guardian/client" +require_relative "auth0/guardian/types/set_guardian_settings_request_content" require_relative "auth0/hooks/client" require_relative "auth0/hooks/types/list_hooks_request_parameters" require_relative "auth0/hooks/types/create_hook_request_content" @@ -3874,14 +3902,10 @@ require_relative "auth0/network_acls/types/create_network_acl_request_content" require_relative "auth0/network_acls/types/set_network_acl_request_content" require_relative "auth0/network_acls/types/update_network_acl_request_content" -require_relative "auth0/organization_templates/client" -require_relative "auth0/organization_templates/types/list_organization_templates_request_parameters" -require_relative "auth0/organization_templates/types/create_organization_template_request_content" -require_relative "auth0/organization_templates/types/update_organization_template_request_content" -require_relative "auth0/organization_templates/types/list_template_organizations_request_parameters" require_relative "auth0/organizations/client" require_relative "auth0/organizations/types/list_organizations_request_parameters" require_relative "auth0/organizations/types/create_organization_request_content" +require_relative "auth0/organizations/types/search_organizations_request_parameters" require_relative "auth0/organizations/types/update_organization_request_content" require_relative "auth0/prompts/client" require_relative "auth0/prompts/types/update_settings_request_content" @@ -3896,6 +3920,7 @@ require_relative "auth0/resource_servers/client" require_relative "auth0/resource_servers/types/list_resource_server_request_parameters" require_relative "auth0/resource_servers/types/create_resource_server_request_content" +require_relative "auth0/resource_servers/types/search_resource_servers_request_parameters" require_relative "auth0/resource_servers/types/get_resource_server_request_parameters" require_relative "auth0/resource_servers/types/update_resource_server_request_content" require_relative "auth0/roles/client" @@ -4019,6 +4044,9 @@ require_relative "auth0/event_streams/deliveries/types/list_event_stream_deliveries_request_parameters" require_relative "auth0/event_streams/redeliveries/client" require_relative "auth0/event_streams/redeliveries/types/create_event_stream_redelivery_request_content" +require_relative "auth0/experimentation/client" +require_relative "auth0/experimentation/experiments/client" +require_relative "auth0/experimentation/experiments/types/advance_ramp_request_content" require_relative "auth0/flows/executions/client" require_relative "auth0/flows/executions/types/list_flow_executions_request_parameters" require_relative "auth0/flows/executions/types/get_flow_execution_request_parameters" @@ -4032,16 +4060,18 @@ require_relative "auth0/groups/roles/types/list_group_roles_request_parameters" require_relative "auth0/groups/roles/types/create_group_roles_request_parameters" require_relative "auth0/groups/roles/types/delete_group_roles_request_content" -require_relative "auth0/guardian/client" require_relative "auth0/guardian/enrollments/client" require_relative "auth0/guardian/enrollments/types/create_guardian_enrollment_ticket_request_content" require_relative "auth0/guardian/factors/client" require_relative "auth0/guardian/factors/types/set_guardian_factor_request_content" require_relative "auth0/guardian/policies/client" +require_relative "auth0/guardian/factors/email/client" +require_relative "auth0/guardian/factors/email/types/set_email_factor_settings_request_content" require_relative "auth0/guardian/factors/phone/client" require_relative "auth0/guardian/factors/phone/types/set_guardian_factor_phone_message_types_request_content" require_relative "auth0/guardian/factors/phone/types/set_guardian_factors_provider_phone_twilio_request_content" require_relative "auth0/guardian/factors/phone/types/set_guardian_factors_provider_phone_request_content" +require_relative "auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content" require_relative "auth0/guardian/factors/phone/types/set_guardian_factor_phone_templates_request_content" require_relative "auth0/guardian/factors/push_notification/client" require_relative "auth0/guardian/factors/push_notification/types/set_guardian_factors_provider_push_notification_apns_request_content" diff --git a/lib/auth0/actions/client.rb b/lib/auth0/actions/client.rb index 5ca92badb..81526ad17 100644 --- a/lib/auth0/actions/client.rb +++ b/lib/auth0/actions/client.rb @@ -26,6 +26,16 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :installed # + # @example + # client.actions.list( + # trigger_id: "post-login", + # action_name: "actionName", + # deployed: true, + # page: 1, + # per_page: 1, + # installed: true + # ) + # # @return [Auth0::Types::ListActionsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,7 +68,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListActionsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListActionsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -78,6 +88,14 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.actions.create( + # name: "name", + # supported_triggers: [{ + # id: "post-login" + # }] + # ) + # # @return [Auth0::Types::CreateActionResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -95,7 +113,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateActionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateActionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -113,6 +131,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.get(id: "id") + # # @return [Auth0::Types::GetActionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -129,7 +150,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetActionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetActionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -149,6 +170,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [Boolean, nil] :force # + # @example + # client.actions.delete( + # id: "id", + # force: true + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -186,6 +213,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.update(id: "id") + # # @return [Auth0::Types::UpdateActionResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -207,7 +237,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateActionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateActionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -227,6 +257,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.deploy(id: "id") + # # @return [Auth0::Types::DeployActionResponseContent] def deploy(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -243,7 +276,7 @@ def deploy(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::DeployActionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::DeployActionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -262,6 +295,14 @@ def deploy(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.test( + # id: "id", + # payload: { + # key: "value" + # } + # ) + # # @return [Auth0::Types::TestActionResponseContent] def test(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -283,7 +324,7 @@ def test(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::TestActionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::TestActionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/actions/executions/client.rb b/lib/auth0/actions/executions/client.rb index c794930af..60f3367f8 100644 --- a/lib/auth0/actions/executions/client.rb +++ b/lib/auth0/actions/executions/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.executions.get(id: "id") + # # @return [Auth0::Types::GetActionExecutionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -40,7 +43,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetActionExecutionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetActionExecutionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/actions/modules/client.rb b/lib/auth0/actions/modules/client.rb index f678df44a..4a2e2e23c 100644 --- a/lib/auth0/actions/modules/client.rb +++ b/lib/auth0/actions/modules/client.rb @@ -23,6 +23,12 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Integer, nil] :per_page # + # @example + # client.actions.modules.list( + # page: 1, + # per_page: 1 + # ) + # # @return [Auth0::Types::GetActionModulesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +57,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetActionModulesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModulesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -70,6 +76,12 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.actions.modules.create( + # name: "name", + # code: "code" + # ) + # # @return [Auth0::Types::CreateActionModuleResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -87,7 +99,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateActionModuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateActionModuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -105,6 +117,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.modules.get(id: "id") + # # @return [Auth0::Types::GetActionModuleResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -121,7 +136,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetActionModuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -139,6 +154,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.modules.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,6 +189,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.modules.update(id: "id") + # # @return [Auth0::Types::UpdateActionModuleResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -192,7 +213,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateActionModuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateActionModuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -213,6 +234,13 @@ def update(request_options: {}, **params) # @option params [Integer, nil] :page # @option params [Integer, nil] :per_page # + # @example + # client.actions.modules.list_actions( + # id: "id", + # page: 1, + # per_page: 1 + # ) + # # @return [Auth0::Types::GetActionModuleActionsResponseContent] def list_actions(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -241,7 +269,7 @@ def list_actions(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetActionModuleActionsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleActionsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -262,6 +290,12 @@ def list_actions(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.modules.rollback( + # id: "id", + # module_version_id: "module_version_id" + # ) + # # @return [Auth0::Types::RollbackActionModuleResponseContent] def rollback(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -283,7 +317,7 @@ def rollback(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RollbackActionModuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RollbackActionModuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/actions/modules/versions/client.rb b/lib/auth0/actions/modules/versions/client.rb index ef24ddee3..8cf648927 100644 --- a/lib/auth0/actions/modules/versions/client.rb +++ b/lib/auth0/actions/modules/versions/client.rb @@ -25,6 +25,13 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Integer, nil] :per_page # + # @example + # client.actions.modules.versions.list( + # id: "id", + # page: 1, + # per_page: 1 + # ) + # # @return [Auth0::Types::GetActionModuleVersionsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +60,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetActionModuleVersionsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleVersionsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -75,6 +82,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.actions.modules.versions.create(id: "id") + # # @return [Auth0::Types::CreateActionModuleVersionResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -91,7 +101,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateActionModuleVersionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateActionModuleVersionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -110,6 +120,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String] :version_id # + # @example + # client.actions.modules.versions.get( + # id: "id", + # version_id: "versionId" + # ) + # # @return [Auth0::Types::GetActionModuleVersionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -126,7 +142,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetActionModuleVersionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetActionModuleVersionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/actions/triggers/bindings/client.rb b/lib/auth0/actions/triggers/bindings/client.rb index a518737ad..156084625 100644 --- a/lib/auth0/actions/triggers/bindings/client.rb +++ b/lib/auth0/actions/triggers/bindings/client.rb @@ -27,6 +27,13 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Integer, nil] :per_page # + # @example + # client.actions.triggers.bindings.list( + # trigger_id: "post-login", + # page: 1, + # per_page: 1 + # ) + # # @return [Auth0::Types::ListActionBindingsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -55,7 +62,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListActionBindingsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListActionBindingsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -77,6 +84,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::ActionTriggerTypeEnum] :trigger_id # + # @example + # client.actions.triggers.bindings.update_many(trigger_id: "post-login") + # # @return [Auth0::Types::UpdateActionBindingsResponseContent] def update_many(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -98,7 +108,7 @@ def update_many(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateActionBindingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateActionBindingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/actions/triggers/client.rb b/lib/auth0/actions/triggers/client.rb index e202a298c..4408e5796 100644 --- a/lib/auth0/actions/triggers/client.rb +++ b/lib/auth0/actions/triggers/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.actions.triggers.list + # # @return [Auth0::Types::ListActionTriggersResponseContent] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -37,7 +40,7 @@ def list(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListActionTriggersResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListActionTriggersResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/actions/versions/client.rb b/lib/auth0/actions/versions/client.rb index 75d107d5b..a090ae886 100644 --- a/lib/auth0/actions/versions/client.rb +++ b/lib/auth0/actions/versions/client.rb @@ -25,6 +25,13 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Integer, nil] :per_page # + # @example + # client.actions.versions.list( + # action_id: "actionId", + # page: 1, + # per_page: 1 + # ) + # # @return [Auth0::Types::ListActionVersionsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +60,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListActionVersionsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListActionVersionsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -75,6 +82,12 @@ def list(request_options: {}, **params) # @option params [String] :action_id # @option params [String] :id # + # @example + # client.actions.versions.get( + # action_id: "actionId", + # id: "id" + # ) + # # @return [Auth0::Types::GetActionVersionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -91,7 +104,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetActionVersionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetActionVersionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -112,14 +125,24 @@ def get(request_options: {}, **params) # @option params [String] :action_id # @option params [String] :id # + # @example + # client.actions.versions.deploy( + # action_id: "actionId", + # id: "id", + # request: {} + # ) + # # @return [Auth0::Types::DeployActionVersionResponseContent] def deploy(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[action_id id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "actions/actions/#{URI.encode_uri_component(params[:action_id].to_s)}/versions/#{URI.encode_uri_component(params[:id].to_s)}/deploy", - body: params, + body: body_params, request_options: request_options ) begin @@ -129,7 +152,7 @@ def deploy(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::DeployActionVersionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::DeployActionVersionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/agents/client.rb b/lib/auth0/agents/client.rb index 4f66ed67f..5e09381a3 100644 --- a/lib/auth0/agents/client.rb +++ b/lib/auth0/agents/client.rb @@ -22,6 +22,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.agents.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListAgentsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -49,7 +55,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListAgentsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListAgentsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -68,6 +74,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.agents.create(name: "name") + # # @return [Auth0::Types::AgentResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -85,7 +94,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::AgentResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::AgentResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -103,6 +112,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.agents.read(id: "id") + # # @return [Auth0::Types::AgentResponseContent] def read(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -119,7 +131,7 @@ def read(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::AgentResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::AgentResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -137,6 +149,9 @@ def read(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.agents.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -169,6 +184,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.agents.update(id: "id") + # # @return [Auth0::Types::AgentResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -190,7 +208,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::AgentResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::AgentResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/anomaly/blocks/client.rb b/lib/auth0/anomaly/blocks/client.rb index 7a6cc7623..9456c1a9e 100644 --- a/lib/auth0/anomaly/blocks/client.rb +++ b/lib/auth0/anomaly/blocks/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::AnomalyIPFormat] :id # + # @example + # client.anomaly.blocks.check_ip(id: "id") + # # @return [untyped] def check_ip(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,6 +61,9 @@ def check_ip(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::AnomalyIPFormat] :id # + # @example + # client.anomaly.blocks.unblock_ip(id: "id") + # # @return [untyped] def unblock_ip(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/attack_protection/bot_detection/client.rb b/lib/auth0/attack_protection/bot_detection/client.rb index fe9b060c7..f57b4bf4d 100644 --- a/lib/auth0/attack_protection/bot_detection/client.rb +++ b/lib/auth0/attack_protection/bot_detection/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.bot_detection.get + # # @return [Auth0::Types::GetBotDetectionSettingsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBotDetectionSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBotDetectionSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.bot_detection.update + # # @return [Auth0::Types::UpdateBotDetectionSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateBotDetectionSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateBotDetectionSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/attack_protection/breached_password_detection/client.rb b/lib/auth0/attack_protection/breached_password_detection/client.rb index 7c83c0676..e08f16265 100644 --- a/lib/auth0/attack_protection/breached_password_detection/client.rb +++ b/lib/auth0/attack_protection/breached_password_detection/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.breached_password_detection.get + # # @return [Auth0::Types::GetBreachedPasswordDetectionSettingsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBreachedPasswordDetectionSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBreachedPasswordDetectionSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.breached_password_detection.update + # # @return [Auth0::Types::UpdateBreachedPasswordDetectionSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateBreachedPasswordDetectionSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateBreachedPasswordDetectionSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/attack_protection/brute_force_protection/client.rb b/lib/auth0/attack_protection/brute_force_protection/client.rb index 926176545..4326386bf 100644 --- a/lib/auth0/attack_protection/brute_force_protection/client.rb +++ b/lib/auth0/attack_protection/brute_force_protection/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.brute_force_protection.get + # # @return [Auth0::Types::GetBruteForceSettingsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBruteForceSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBruteForceSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.brute_force_protection.update + # # @return [Auth0::Types::UpdateBruteForceSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateBruteForceSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateBruteForceSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/attack_protection/captcha/client.rb b/lib/auth0/attack_protection/captcha/client.rb index 0aeb98457..8c597935d 100644 --- a/lib/auth0/attack_protection/captcha/client.rb +++ b/lib/auth0/attack_protection/captcha/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.captcha.get + # # @return [Auth0::Types::GetAttackProtectionCaptchaResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetAttackProtectionCaptchaResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetAttackProtectionCaptchaResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.captcha.update + # # @return [Auth0::Types::UpdateAttackProtectionCaptchaResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateAttackProtectionCaptchaResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateAttackProtectionCaptchaResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/attack_protection/phone_provider_protection/client.rb b/lib/auth0/attack_protection/phone_provider_protection/client.rb index ab34aaf26..264a67b53 100644 --- a/lib/auth0/attack_protection/phone_provider_protection/client.rb +++ b/lib/auth0/attack_protection/phone_provider_protection/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.phone_provider_protection.get + # # @return [Auth0::Types::GetPhoneProviderProtectionResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetPhoneProviderProtectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetPhoneProviderProtectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.phone_provider_protection.patch(type: "exponential") + # # @return [Auth0::Types::PatchPhoneProviderProtectionResponseContent] def patch(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def patch(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::PatchPhoneProviderProtectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::PatchPhoneProviderProtectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb b/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb index 3054d4bbb..2d915705e 100644 --- a/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb +++ b/lib/auth0/attack_protection/suspicious_ip_throttling/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.suspicious_ip_throttling.get + # # @return [Auth0::Types::GetSuspiciousIPThrottlingSettingsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSuspiciousIPThrottlingSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSuspiciousIPThrottlingSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.attack_protection.suspicious_ip_throttling.update + # # @return [Auth0::Types::UpdateSuspiciousIPThrottlingSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateSuspiciousIPThrottlingSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSuspiciousIPThrottlingSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/branding/client.rb b/lib/auth0/branding/client.rb index 4fbe145a8..1032d0414 100644 --- a/lib/auth0/branding/client.rb +++ b/lib/auth0/branding/client.rb @@ -20,6 +20,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.get + # # @return [Auth0::Types::GetBrandingResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -35,7 +38,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBrandingResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBrandingResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -52,6 +55,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.update + # # @return [Auth0::Types::UpdateBrandingResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -69,7 +75,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateBrandingResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateBrandingResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/branding/phone/providers/client.rb b/lib/auth0/branding/phone/providers/client.rb index 147942bbe..01251c51d 100644 --- a/lib/auth0/branding/phone/providers/client.rb +++ b/lib/auth0/branding/phone/providers/client.rb @@ -25,6 +25,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [Boolean, nil] :disabled # + # @example + # client.branding.phone.providers.list(disabled: true) + # # @return [Auth0::Types::ListBrandingPhoneProvidersResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -45,7 +48,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListBrandingPhoneProvidersResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListBrandingPhoneProvidersResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -65,6 +68,14 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.phone.providers.create( + # name: "twilio", + # credentials: { + # auth_token: "auth_token" + # } + # ) + # # @return [Auth0::Types::CreateBrandingPhoneProviderResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -82,7 +93,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateBrandingPhoneProviderResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateBrandingPhoneProviderResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -102,6 +113,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.providers.get(id: "id") + # # @return [Auth0::Types::GetBrandingPhoneProviderResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -118,7 +132,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBrandingPhoneProviderResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBrandingPhoneProviderResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -136,6 +150,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.providers.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,6 +188,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.providers.update(id: "id") + # # @return [Auth0::Types::UpdateBrandingPhoneProviderResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -192,7 +212,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateBrandingPhoneProviderResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateBrandingPhoneProviderResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -208,6 +228,12 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.providers.test( + # id: "id", + # to: "to" + # ) + # # @return [Auth0::Types::CreatePhoneProviderSendTestResponseContent] def test(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -229,7 +255,7 @@ def test(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreatePhoneProviderSendTestResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreatePhoneProviderSendTestResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/branding/phone/templates/client.rb b/lib/auth0/branding/phone/templates/client.rb index b17e4cfff..13b143217 100644 --- a/lib/auth0/branding/phone/templates/client.rb +++ b/lib/auth0/branding/phone/templates/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [Boolean, nil] :disabled # + # @example + # client.branding.phone.templates.list(disabled: true) + # # @return [Auth0::Types::ListPhoneTemplatesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -41,7 +44,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListPhoneTemplatesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListPhoneTemplatesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -56,6 +59,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.phone.templates.create + # # @return [Auth0::Types::CreatePhoneTemplateResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -73,7 +79,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreatePhoneTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreatePhoneTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -89,6 +95,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.templates.get(id: "id") + # # @return [Auth0::Types::GetPhoneTemplateResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -105,7 +114,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetPhoneTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetPhoneTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -121,6 +130,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.templates.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -151,6 +163,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.templates.update(id: "id") + # # @return [Auth0::Types::UpdatePhoneTemplateResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -172,7 +187,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdatePhoneTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdatePhoneTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -188,14 +203,25 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.templates.reset( + # id: "id", + # request: { + # key: "value" + # } + # ) + # # @return [Auth0::Types::ResetPhoneTemplateResponseContent] def reset(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PATCH", path: "branding/phone/templates/#{URI.encode_uri_component(params[:id].to_s)}/reset", - body: params, + body: body_params, request_options: request_options ) begin @@ -205,7 +231,7 @@ def reset(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ResetPhoneTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ResetPhoneTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -221,6 +247,12 @@ def reset(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.branding.phone.templates.test( + # id: "id", + # to: "to" + # ) + # # @return [Auth0::Types::CreatePhoneTemplateTestNotificationResponseContent] def test(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -242,7 +274,7 @@ def test(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreatePhoneTemplateTestNotificationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreatePhoneTemplateTestNotificationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/branding/templates/client.rb b/lib/auth0/branding/templates/client.rb index f281a1b3c..6a3b25408 100644 --- a/lib/auth0/branding/templates/client.rb +++ b/lib/auth0/branding/templates/client.rb @@ -19,6 +19,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.templates.get_universal_login + # # @return [Auth0::Types::GetUniversalLoginTemplateResponseContent] def get_universal_login(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -34,7 +37,7 @@ def get_universal_login(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetUniversalLoginTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetUniversalLoginTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -76,6 +79,9 @@ def get_universal_login(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.templates.update_universal_login(request: "string") + # # @return [untyped] def update_universal_login(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -106,6 +112,9 @@ def update_universal_login(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.templates.delete_universal_login + # # @return [untyped] def delete_universal_login(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( diff --git a/lib/auth0/branding/themes/client.rb b/lib/auth0/branding/themes/client.rb index 9a8bdda7c..cb61402e9 100644 --- a/lib/auth0/branding/themes/client.rb +++ b/lib/auth0/branding/themes/client.rb @@ -21,6 +21,80 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.themes.create( + # borders: { + # button_border_radius: 1.1, + # button_border_weight: 1.1, + # buttons_style: "pill", + # input_border_radius: 1.1, + # input_border_weight: 1.1, + # inputs_style: "pill", + # show_widget_shadow: true, + # widget_border_weight: 1.1, + # widget_corner_radius: 1.1 + # }, + # colors: { + # body_text: "body_text", + # error: "error", + # header: "header", + # icons: "icons", + # input_background: "input_background", + # input_border: "input_border", + # input_filled_text: "input_filled_text", + # input_labels_placeholders: "input_labels_placeholders", + # links_focused_components: "links_focused_components", + # primary_button: "primary_button", + # primary_button_label: "primary_button_label", + # secondary_button_border: "secondary_button_border", + # secondary_button_label: "secondary_button_label", + # success: "success", + # widget_background: "widget_background", + # widget_border: "widget_border" + # }, + # fonts: { + # body_text: { + # bold: true, + # size: 1.1 + # }, + # buttons_text: { + # bold: true, + # size: 1.1 + # }, + # font_url: "font_url", + # input_labels: { + # bold: true, + # size: 1.1 + # }, + # links: { + # bold: true, + # size: 1.1 + # }, + # links_style: "normal", + # reference_text_size: 1.1, + # subtitle: { + # bold: true, + # size: 1.1 + # }, + # title: { + # bold: true, + # size: 1.1 + # } + # }, + # page_background: { + # background_color: "background_color", + # background_image_url: "background_image_url", + # page_layout: "center" + # }, + # widget: { + # header_text_alignment: "center", + # logo_height: 1.1, + # logo_position: "center", + # logo_url: "logo_url", + # social_buttons_layout: "bottom" + # } + # ) + # # @return [Auth0::Types::CreateBrandingThemeResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -38,7 +112,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateBrandingThemeResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateBrandingThemeResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -55,6 +129,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.branding.themes.get_default + # # @return [Auth0::Types::GetBrandingDefaultThemeResponseContent] def get_default(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -70,7 +147,7 @@ def get_default(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBrandingDefaultThemeResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBrandingDefaultThemeResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -88,6 +165,9 @@ def get_default(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :theme_id # + # @example + # client.branding.themes.get(theme_id: "themeId") + # # @return [Auth0::Types::GetBrandingThemeResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -104,7 +184,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetBrandingThemeResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetBrandingThemeResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -122,6 +202,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :theme_id # + # @example + # client.branding.themes.delete(theme_id: "themeId") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -154,6 +237,81 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :theme_id # + # @example + # client.branding.themes.update( + # theme_id: "themeId", + # borders: { + # button_border_radius: 1.1, + # button_border_weight: 1.1, + # buttons_style: "pill", + # input_border_radius: 1.1, + # input_border_weight: 1.1, + # inputs_style: "pill", + # show_widget_shadow: true, + # widget_border_weight: 1.1, + # widget_corner_radius: 1.1 + # }, + # colors: { + # body_text: "body_text", + # error: "error", + # header: "header", + # icons: "icons", + # input_background: "input_background", + # input_border: "input_border", + # input_filled_text: "input_filled_text", + # input_labels_placeholders: "input_labels_placeholders", + # links_focused_components: "links_focused_components", + # primary_button: "primary_button", + # primary_button_label: "primary_button_label", + # secondary_button_border: "secondary_button_border", + # secondary_button_label: "secondary_button_label", + # success: "success", + # widget_background: "widget_background", + # widget_border: "widget_border" + # }, + # fonts: { + # body_text: { + # bold: true, + # size: 1.1 + # }, + # buttons_text: { + # bold: true, + # size: 1.1 + # }, + # font_url: "font_url", + # input_labels: { + # bold: true, + # size: 1.1 + # }, + # links: { + # bold: true, + # size: 1.1 + # }, + # links_style: "normal", + # reference_text_size: 1.1, + # subtitle: { + # bold: true, + # size: 1.1 + # }, + # title: { + # bold: true, + # size: 1.1 + # } + # }, + # page_background: { + # background_color: "background_color", + # background_image_url: "background_image_url", + # page_layout: "center" + # }, + # widget: { + # header_text_alignment: "center", + # logo_height: 1.1, + # logo_position: "center", + # logo_url: "logo_url", + # social_buttons_layout: "bottom" + # } + # ) + # # @return [Auth0::Types::UpdateBrandingThemeResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -175,7 +333,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateBrandingThemeResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateBrandingThemeResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/client.rb b/lib/auth0/client.rb index 024873fd9..bf30f8628 100644 --- a/lib/auth0/client.rb +++ b/lib/auth0/client.rb @@ -103,6 +103,11 @@ def groups @groups ||= Auth0::Groups::Client.new(client: @raw_client) end + # @return [Auth0::Guardian::Client] + def guardian + @guardian ||= Auth0::Guardian::Client.new(client: @raw_client) + end + # @return [Auth0::Hooks::Client] def hooks @hooks ||= Auth0::Hooks::Client.new(client: @raw_client) @@ -128,11 +133,6 @@ def network_acls @network_acls ||= Auth0::NetworkACLs::Client.new(client: @raw_client) end - # @return [Auth0::OrganizationTemplates::Client] - def organization_templates - @organization_templates ||= Auth0::OrganizationTemplates::Client.new(client: @raw_client) - end - # @return [Auth0::Organizations::Client] def organizations @organizations ||= Auth0::Organizations::Client.new(client: @raw_client) @@ -233,9 +233,9 @@ def emails @emails ||= Auth0::Emails::Client.new(client: @raw_client) end - # @return [Auth0::Guardian::Client] - def guardian - @guardian ||= Auth0::Guardian::Client.new(client: @raw_client) + # @return [Auth0::Experimentation::Client] + def experimentation + @experimentation ||= Auth0::Experimentation::Client.new(client: @raw_client) end # @return [Auth0::Keys::Client] diff --git a/lib/auth0/client_grants/client.rb b/lib/auth0/client_grants/client.rb index ae5729ed5..7550c2fed 100644 --- a/lib/auth0/client_grants/client.rb +++ b/lib/auth0/client_grants/client.rb @@ -30,6 +30,18 @@ def initialize(client:) # @option params [Auth0::Types::ClientGrantSubjectTypeEnum, nil] :subject_type # @option params [Auth0::Types::ClientGrantDefaultForEnum, nil] :default_for # + # @example + # client.client_grants.list( + # include_totals: true, + # from: "from", + # take: 1, + # audience: "audience", + # client_id: "client_id", + # allow_any_organization: true, + # subject_type: "client", + # default_for: "third_party_clients" + # ) + # # @return [Auth0::Types::ListClientGrantPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +75,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListClientGrantPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientGrantPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -83,6 +95,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.client_grants.create(audience: "audience") + # # @return [Auth0::Types::CreateClientGrantResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -100,7 +115,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateClientGrantResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateClientGrantResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -120,6 +135,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.client_grants.get(id: "id") + # # @return [Auth0::Types::GetClientGrantResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -136,7 +154,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetClientGrantResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetClientGrantResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -156,6 +174,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.client_grants.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -188,6 +209,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.client_grants.update(id: "id") + # # @return [Auth0::Types::UpdateClientGrantResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -209,7 +233,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateClientGrantResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateClientGrantResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/client_grants/organizations/client.rb b/lib/auth0/client_grants/organizations/client.rb index 8b72c4cfe..fa361abca 100644 --- a/lib/auth0/client_grants/organizations/client.rb +++ b/lib/auth0/client_grants/organizations/client.rb @@ -23,6 +23,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.client_grants.organizations.list( + # id: "id", + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListClientGrantOrganizationsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +59,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListClientGrantOrganizationsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientGrantOrganizationsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/clients/client.rb b/lib/auth0/clients/client.rb index 4bfe6a05b..f804fab17 100644 --- a/lib/auth0/clients/client.rb +++ b/lib/auth0/clients/client.rb @@ -56,6 +56,20 @@ def initialize(client:) # @option params [String, nil] :external_client_id # @option params [String, nil] :q # + # @example + # client.clients.list( + # fields: "fields", + # include_fields: true, + # page: 1, + # per_page: 1, + # include_totals: true, + # is_global: true, + # is_first_party: true, + # app_type: "app_type", + # external_client_id: "external_client_id", + # q: "q" + # ) + # # @return [Auth0::Types::ListClientsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -92,7 +106,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListClientsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -128,6 +142,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.clients.create(name: "name") + # # @return [Auth0::Types::CreateClientResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -145,7 +162,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateClientResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateClientResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -166,6 +183,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.clients.preview_cimd_metadata(external_client_id: "external_client_id") + # # @return [Auth0::Types::PreviewCimdMetadataResponseContent] def preview_cimd_metadata(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -183,7 +203,7 @@ def preview_cimd_metadata(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::PreviewCimdMetadataResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::PreviewCimdMetadataResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -210,6 +230,9 @@ def preview_cimd_metadata(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.clients.register_cimd_client(external_client_id: "external_client_id") + # # @return [Auth0::Types::RegisterCimdClientResponseContent] def register_cimd_client(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -227,7 +250,7 @@ def register_cimd_client(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RegisterCimdClientResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RegisterCimdClientResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -273,6 +296,13 @@ def register_cimd_client(request_options: {}, **params) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.clients.get( + # id: "id", + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetClientResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -294,7 +324,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetClientResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetClientResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -312,6 +342,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.clients.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -359,6 +392,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.clients.update(id: "id") + # # @return [Auth0::Types::UpdateClientResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -380,7 +416,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateClientResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateClientResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -404,6 +440,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.clients.rotate_secret(id: "id") + # # @return [Auth0::Types::RotateClientSecretResponseContent] def rotate_secret(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -420,7 +459,7 @@ def rotate_secret(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RotateClientSecretResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RotateClientSecretResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/clients/connections/client.rb b/lib/auth0/clients/connections/client.rb index 6d28d7052..b4c3cb496 100644 --- a/lib/auth0/clients/connections/client.rb +++ b/lib/auth0/clients/connections/client.rb @@ -34,6 +34,16 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.clients.connections.get( + # id: "id", + # strategy: ["ad"], + # from: "from", + # take: 1, + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::ListClientConnectionsResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -64,7 +74,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListClientConnectionsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListClientConnectionsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/clients/credentials/client.rb b/lib/auth0/clients/credentials/client.rb index daec097e5..15d32d84a 100644 --- a/lib/auth0/clients/credentials/client.rb +++ b/lib/auth0/clients/credentials/client.rb @@ -26,6 +26,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :client_id # + # @example + # client.clients.credentials.list(client_id: "client_id") + # # @return [Array[Auth0::Types::ClientCredential]] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -41,10 +44,12 @@ def list(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::ClientCredential], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Create a client credential associated to your application. Credentials can be used to configure Private Key @@ -123,6 +128,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :client_id # + # @example + # client.clients.credentials.create( + # client_id: "client_id", + # credential_type: "public_key" + # ) + # # @return [Auth0::Types::PostClientCredentialResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -144,7 +155,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::PostClientCredentialResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::PostClientCredentialResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -167,6 +178,12 @@ def create(request_options: {}, **params) # @option params [String] :client_id # @option params [String] :credential_id # + # @example + # client.clients.credentials.get( + # client_id: "client_id", + # credential_id: "credential_id" + # ) + # # @return [Auth0::Types::GetClientCredentialResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -183,7 +200,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetClientCredentialResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetClientCredentialResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -204,6 +221,12 @@ def get(request_options: {}, **params) # @option params [String] :client_id # @option params [String] :credential_id # + # @example + # client.clients.credentials.delete( + # client_id: "client_id", + # credential_id: "credential_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -239,6 +262,12 @@ def delete(request_options: {}, **params) # @option params [String] :client_id # @option params [String] :credential_id # + # @example + # client.clients.credentials.update( + # client_id: "client_id", + # credential_id: "credential_id" + # ) + # # @return [Auth0::Types::PatchClientCredentialResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -260,7 +289,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::PatchClientCredentialResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::PatchClientCredentialResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/clients/types/create_client_request_content.rb b/lib/auth0/clients/types/create_client_request_content.rb index 3f26632a9..16897caa4 100644 --- a/lib/auth0/clients/types/create_client_request_content.rb +++ b/lib/auth0/clients/types/create_client_request_content.rb @@ -106,6 +106,8 @@ class CreateClientRequestContent < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::CreateIdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::CreateAnonymousSessions }, optional: true, nullable: false + field :third_party_security_mode, -> { Auth0::Types::ClientThirdPartySecurityModeEnum }, optional: true, nullable: false field :redirection_policy, -> { Auth0::Types::ClientRedirectionPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/clients/types/update_client_request_content.rb b/lib/auth0/clients/types/update_client_request_content.rb index 15d58ee68..a881d2dc3 100644 --- a/lib/auth0/clients/types/update_client_request_content.rb +++ b/lib/auth0/clients/types/update_client_request_content.rb @@ -66,6 +66,8 @@ class UpdateClientRequestContent < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::UpdateIdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::UpdateAnonymousSessions }, optional: true, nullable: false + field :form_template, -> { String }, optional: true, nullable: false field :addons, -> { Auth0::Types::ClientAddons }, optional: true, nullable: false diff --git a/lib/auth0/connection_profiles/client.rb b/lib/auth0/connection_profiles/client.rb index c0c9d457d..0ea42245f 100644 --- a/lib/auth0/connection_profiles/client.rb +++ b/lib/auth0/connection_profiles/client.rb @@ -22,6 +22,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.connection_profiles.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListConnectionProfilesPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -49,7 +55,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListConnectionProfilesPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListConnectionProfilesPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -68,6 +74,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.connection_profiles.create(name: "name") + # # @return [Auth0::Types::CreateConnectionProfileResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -85,7 +94,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateConnectionProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateConnectionProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -102,6 +111,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.connection_profiles.list_templates + # # @return [Auth0::Types::ListConnectionProfileTemplateResponseContent] def list_templates(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -117,7 +129,7 @@ def list_templates(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListConnectionProfileTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListConnectionProfileTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -135,6 +147,9 @@ def list_templates(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connection_profiles.get_template(id: "id") + # # @return [Auth0::Types::GetConnectionProfileTemplateResponseContent] def get_template(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -151,7 +166,7 @@ def get_template(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetConnectionProfileTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetConnectionProfileTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -169,6 +184,9 @@ def get_template(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connection_profiles.get(id: "id") + # # @return [Auth0::Types::GetConnectionProfileResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -185,7 +203,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetConnectionProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetConnectionProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -203,6 +221,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connection_profiles.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -235,6 +256,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connection_profiles.update(id: "id") + # # @return [Auth0::Types::UpdateConnectionProfileResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -256,7 +280,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateConnectionProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateConnectionProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/connections/client.rb b/lib/auth0/connections/client.rb index 9ff5b7f91..d3077a6d2 100644 --- a/lib/auth0/connections/client.rb +++ b/lib/auth0/connections/client.rb @@ -47,6 +47,17 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.connections.list( + # include_totals: true, + # from: "from", + # take: 1, + # strategy: ["ad"], + # name: "name", + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::ListConnectionsCheckpointPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -79,7 +90,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListConnectionsCheckpointPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListConnectionsCheckpointPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -102,6 +113,12 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.connections.create( + # name: "name", + # strategy: "ad" + # ) + # # @return [Auth0::Types::CreateConnectionResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -119,7 +136,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -140,6 +157,13 @@ def create(request_options: {}, **params) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.connections.get( + # id: "id", + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetConnectionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -161,7 +185,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -185,6 +209,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -222,6 +249,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.update(id: "id") + # # @return [Auth0::Types::UpdateConnectionResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -243,7 +273,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -262,6 +292,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.check_status(id: "id") + # # @return [untyped] def check_status(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/connections/clients/client.rb b/lib/auth0/connections/clients/client.rb index 1d1a3ca58..4dc342b11 100644 --- a/lib/auth0/connections/clients/client.rb +++ b/lib/auth0/connections/clients/client.rb @@ -29,6 +29,13 @@ def initialize(client:) # @option params [Integer, nil] :take # @option params [String, nil] :from # + # @example + # client.connections.clients.get( + # id: "id", + # take: 1, + # from: "from" + # ) + # # @return [Auth0::Types::GetConnectionEnabledClientsResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -56,7 +63,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetConnectionEnabledClientsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetConnectionEnabledClientsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -74,14 +81,26 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.clients.update( + # id: "id", + # request: [{ + # client_id: "client_id", + # status: true + # }] + # ) + # # @return [untyped] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PATCH", path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/clients", - body: params, + body: body_params, request_options: request_options ) begin diff --git a/lib/auth0/connections/directory_provisioning/client.rb b/lib/auth0/connections/directory_provisioning/client.rb index d785acb9a..50a2fefed 100644 --- a/lib/auth0/connections/directory_provisioning/client.rb +++ b/lib/auth0/connections/directory_provisioning/client.rb @@ -23,6 +23,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.connections.directory_provisioning.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListDirectoryProvisioningsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -50,7 +56,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListDirectoryProvisioningsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListDirectoryProvisioningsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -70,6 +76,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.get(id: "id") + # # @return [Auth0::Types::GetDirectoryProvisioningResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -86,7 +95,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetDirectoryProvisioningResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetDirectoryProvisioningResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -104,14 +113,23 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.create( + # id: "id", + # request: {} + # ) + # # @return [Auth0::Types::CreateDirectoryProvisioningResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/directory-provisioning", - body: params, + body: body_params, request_options: request_options ) begin @@ -121,7 +139,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateDirectoryProvisioningResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateDirectoryProvisioningResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -139,6 +157,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,14 +192,23 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.update( + # id: "id", + # request: {} + # ) + # # @return [Auth0::Types::UpdateDirectoryProvisioningResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PATCH", path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/directory-provisioning", - body: params, + body: body_params, request_options: request_options ) begin @@ -188,7 +218,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateDirectoryProvisioningResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateDirectoryProvisioningResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -206,6 +236,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.get_default_mapping(id: "id") + # # @return [Auth0::Types::GetDirectoryProvisioningDefaultMappingResponseContent] def get_default_mapping(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -222,7 +255,7 @@ def get_default_mapping(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetDirectoryProvisioningDefaultMappingResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetDirectoryProvisioningDefaultMappingResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -243,6 +276,14 @@ def get_default_mapping(request_options: {}, **params) # @option params [Integer, nil] :take # @option params [String, nil] :q # + # @example + # client.connections.directory_provisioning.list_synchronized_groups( + # id: "id", + # from: "from", + # take: 1, + # q: "q" + # ) + # # @return [Auth0::Types::ListSynchronizedGroupsResponseContent] def list_synchronized_groups(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -271,7 +312,7 @@ def list_synchronized_groups(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListSynchronizedGroupsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListSynchronizedGroupsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -291,6 +332,14 @@ def list_synchronized_groups(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.add_synchronized_group_selections( + # id: "id", + # groups: [{ + # id: "id" + # }] + # ) + # # @return [untyped] def add_synchronized_group_selections(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -328,6 +377,14 @@ def add_synchronized_group_selections(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.set( + # id: "id", + # groups: [{ + # id: "id" + # }] + # ) + # # @return [untyped] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -365,6 +422,14 @@ def set(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.delete_synchronized_group_selections( + # id: "id", + # groups: [{ + # id: "id" + # }] + # ) + # # @return [untyped] def delete_synchronized_group_selections(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/connections/directory_provisioning/synchronizations/client.rb b/lib/auth0/connections/directory_provisioning/synchronizations/client.rb index 1ff461f17..ab942c168 100644 --- a/lib/auth0/connections/directory_provisioning/synchronizations/client.rb +++ b/lib/auth0/connections/directory_provisioning/synchronizations/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.directory_provisioning.synchronizations.create(id: "id") + # # @return [Auth0::Types::CreateDirectorySynchronizationResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -39,7 +42,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateDirectorySynchronizationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateDirectorySynchronizationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/connections/keys/client.rb b/lib/auth0/connections/keys/client.rb index 2927abb56..98af2decd 100644 --- a/lib/auth0/connections/keys/client.rb +++ b/lib/auth0/connections/keys/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.keys.get(id: "id") + # # @return [Array[Auth0::Types::ConnectionKey]] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -37,10 +40,12 @@ def get(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::ConnectionKey], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create @@ -56,14 +61,23 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.keys.create( + # id: "id", + # request: {} + # ) + # # @return [Array[Auth0::Types::PostConnectionsKeysResponseContentItem]] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/keys", - body: params, + body: body_params, request_options: request_options ) begin @@ -73,7 +87,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::PostConnectionsKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::PostConnectionsKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -91,14 +105,23 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.keys.rotate( + # id: "id", + # request: {} + # ) + # # @return [Auth0::Types::RotateConnectionsKeysResponseContent] def rotate(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/keys/rotate", - body: params, + body: body_params, request_options: request_options ) begin @@ -108,7 +131,7 @@ def rotate(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RotateConnectionsKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RotateConnectionsKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/connections/scim_configuration/client.rb b/lib/auth0/connections/scim_configuration/client.rb index 8d6f407a0..63791ca1e 100644 --- a/lib/auth0/connections/scim_configuration/client.rb +++ b/lib/auth0/connections/scim_configuration/client.rb @@ -23,6 +23,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.connections.scim_configuration.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListSCIMConfigurationsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -50,7 +56,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListSCIMConfigurationsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListSCIMConfigurationsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -70,6 +76,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.get(id: "id") + # # @return [Auth0::Types::GetSCIMConfigurationResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -86,7 +95,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSCIMConfigurationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSCIMConfigurationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -104,14 +113,23 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.create( + # id: "id", + # request: {} + # ) + # # @return [Auth0::Types::CreateSCIMConfigurationResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/scim-configuration", - body: params, + body: body_params, request_options: request_options ) begin @@ -121,7 +139,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateSCIMConfigurationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateSCIMConfigurationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -139,6 +157,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,6 +192,13 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.update( + # id: "id", + # user_id_attribute: "user_id_attribute", + # mapping: [{}] + # ) + # # @return [Auth0::Types::UpdateSCIMConfigurationResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -192,7 +220,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateSCIMConfigurationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSCIMConfigurationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -210,6 +238,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.get_default_mapping(id: "id") + # # @return [Auth0::Types::GetSCIMConfigurationDefaultMappingResponseContent] def get_default_mapping(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -226,7 +257,7 @@ def get_default_mapping(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSCIMConfigurationDefaultMappingResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSCIMConfigurationDefaultMappingResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/connections/scim_configuration/tokens/client.rb b/lib/auth0/connections/scim_configuration/tokens/client.rb index 5f15a6083..8c14b4d4f 100644 --- a/lib/auth0/connections/scim_configuration/tokens/client.rb +++ b/lib/auth0/connections/scim_configuration/tokens/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.tokens.get(id: "id") + # # @return [Array[Auth0::Types::SCIMTokenItem]] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -39,7 +42,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSCIMTokensResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSCIMTokensResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -57,6 +60,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.connections.scim_configuration.tokens.create(id: "id") + # # @return [Auth0::Types::CreateSCIMTokenResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -78,7 +84,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateSCIMTokenResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateSCIMTokenResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -97,6 +103,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String] :token_id # + # @example + # client.connections.scim_configuration.tokens.delete( + # id: "id", + # token_id: "tokenId" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/connections/users/client.rb b/lib/auth0/connections/users/client.rb index 3d257c5f8..4084972aa 100644 --- a/lib/auth0/connections/users/client.rb +++ b/lib/auth0/connections/users/client.rb @@ -24,6 +24,12 @@ def initialize(client:) # @option params [String] :id # @option params [String] :email # + # @example + # client.connections.users.delete_by_email( + # id: "id", + # email: "email" + # ) + # # @return [untyped] def delete_by_email(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/custom_domains/client.rb b/lib/auth0/custom_domains/client.rb index a86e44f4e..0e4fc829f 100644 --- a/lib/auth0/custom_domains/client.rb +++ b/lib/auth0/custom_domains/client.rb @@ -24,6 +24,14 @@ def initialize(client:) # @option params [Boolean, nil] :include_fields # @option params [String, nil] :sort # + # @example + # client.custom_domains.list( + # q: "q", + # fields: "fields", + # include_fields: true, + # sort: "sort" + # ) + # # @return [Array[Auth0::Types::CustomDomain]] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -47,7 +55,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListCustomDomainsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListCustomDomainsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -76,6 +84,12 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.custom_domains.create( + # domain: "domain", + # type: "auth0_managed_certs" + # ) + # # @return [Auth0::Types::CreateCustomDomainResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -93,7 +107,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateCustomDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateCustomDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -110,6 +124,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.custom_domains.get_default + # # @return [Auth0::Types::GetDefaultDomainResponseContent] def get_default(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -125,7 +142,7 @@ def get_default(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetDefaultDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetDefaultDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -142,6 +159,9 @@ def get_default(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.custom_domains.set_default(domain: "domain") + # # @return [Auth0::Types::UpdateDefaultDomainResponseContent] def set_default(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -159,7 +179,7 @@ def set_default(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateDefaultDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateDefaultDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -177,6 +197,9 @@ def set_default(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.custom_domains.get(id: "id") + # # @return [Auth0::Types::GetCustomDomainResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -193,7 +216,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetCustomDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetCustomDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -211,6 +234,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.custom_domains.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -275,6 +301,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.custom_domains.update(id: "id") + # # @return [Auth0::Types::UpdateCustomDomainResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -296,7 +325,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateCustomDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateCustomDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -314,6 +343,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.custom_domains.test(id: "id") + # # @return [Auth0::Types::TestCustomDomainResponseContent] def test(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -330,7 +362,7 @@ def test(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::TestCustomDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::TestCustomDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -360,6 +392,9 @@ def test(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.custom_domains.verify(id: "id") + # # @return [Auth0::Types::VerifyCustomDomainResponseContent] def verify(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -376,7 +411,7 @@ def verify(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::VerifyCustomDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::VerifyCustomDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/device_credentials/client.rb b/lib/auth0/device_credentials/client.rb index 3690c0ff0..8599342f0 100644 --- a/lib/auth0/device_credentials/client.rb +++ b/lib/auth0/device_credentials/client.rb @@ -29,6 +29,18 @@ def initialize(client:) # @option params [String, nil] :client_id # @option params [Auth0::Types::DeviceCredentialTypeEnum, nil] :type # + # @example + # client.device_credentials.list( + # page: 1, + # per_page: 1, + # include_totals: true, + # fields: "fields", + # include_fields: true, + # user_id: "user_id", + # client_id: "client_id", + # type: "public_key" + # ) + # # @return [Auth0::Types::ListDeviceCredentialsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +75,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListDeviceCredentialsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListDeviceCredentialsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -86,6 +98,14 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.device_credentials.create_public_key( + # device_name: "device_name", + # type: "public_key", + # value: "value", + # device_id: "device_id" + # ) + # # @return [Auth0::Types::CreatePublicKeyDeviceCredentialResponseContent] def create_public_key(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -103,7 +123,7 @@ def create_public_key(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreatePublicKeyDeviceCredentialResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreatePublicKeyDeviceCredentialResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -121,6 +141,9 @@ def create_public_key(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.device_credentials.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/email_templates/client.rb b/lib/auth0/email_templates/client.rb index 5ca53dfa6..a6f00864c 100644 --- a/lib/auth0/email_templates/client.rb +++ b/lib/auth0/email_templates/client.rb @@ -20,6 +20,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.email_templates.create(template: "verify_email") + # # @return [Auth0::Types::CreateEmailTemplateResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -37,7 +40,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEmailTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEmailTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -58,6 +61,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::EmailTemplateNameEnum] :template_name # + # @example + # client.email_templates.get(template_name: "verify_email") + # # @return [Auth0::Types::GetEmailTemplateResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -74,7 +80,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetEmailTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetEmailTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -92,6 +98,12 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::EmailTemplateNameEnum] :template_name # + # @example + # client.email_templates.set( + # template_name: "verify_email", + # template: "verify_email" + # ) + # # @return [Auth0::Types::SetEmailTemplateResponseContent] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -113,7 +125,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetEmailTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetEmailTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -131,6 +143,9 @@ def set(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::EmailTemplateNameEnum] :template_name # + # @example + # client.email_templates.update(template_name: "verify_email") + # # @return [Auth0::Types::UpdateEmailTemplateResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -152,7 +167,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateEmailTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateEmailTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/emails/provider/client.rb b/lib/auth0/emails/provider/client.rb index 2b4cb7a27..72d1c5f00 100644 --- a/lib/auth0/emails/provider/client.rb +++ b/lib/auth0/emails/provider/client.rb @@ -25,6 +25,12 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.emails.provider.get( + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetEmailProviderResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -46,7 +52,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetEmailProviderResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetEmailProviderResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -87,6 +93,14 @@ def get(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.emails.provider.create( + # name: "mailgun", + # credentials: { + # api_key: "api_key" + # } + # ) + # # @return [Auth0::Types::CreateEmailProviderResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -104,7 +118,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEmailProviderResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEmailProviderResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -121,6 +135,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.emails.provider.delete + # # @return [untyped] def delete(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -176,6 +193,9 @@ def delete(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.emails.provider.update + # # @return [Auth0::Types::UpdateEmailProviderResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -193,7 +213,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateEmailProviderResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateEmailProviderResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/event_streams/client.rb b/lib/auth0/event_streams/client.rb index 78c96120a..363e43b5f 100644 --- a/lib/auth0/event_streams/client.rb +++ b/lib/auth0/event_streams/client.rb @@ -20,6 +20,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.event_streams.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListEventStreamsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -47,7 +53,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListEventStreamsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListEventStreamsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -64,6 +70,18 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.event_streams.create(destination: { + # type: "webhook", + # configuration: { + # webhook_endpoint: "webhook_endpoint", + # webhook_authorization: { + # method_: "basic", + # username: "username" + # } + # } + # }) + # # @return [Auth0::Types::CreateEventStreamResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -81,7 +99,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEventStreamResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEventStreamResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -97,6 +115,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.event_streams.get(id: "id") + # # @return [Auth0::Types::GetEventStreamResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -113,7 +134,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetEventStreamResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetEventStreamResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -129,6 +150,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.event_streams.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -159,6 +183,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.event_streams.update(id: "id") + # # @return [Auth0::Types::UpdateEventStreamResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -180,7 +207,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateEventStreamResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateEventStreamResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -196,6 +223,12 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.event_streams.test( + # id: "id", + # event_type: "connection.created" + # ) + # # @return [Auth0::Types::CreateEventStreamTestEventResponseContent] def test(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -217,7 +250,7 @@ def test(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEventStreamTestEventResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEventStreamTestEventResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/event_streams/deliveries/client.rb b/lib/auth0/event_streams/deliveries/client.rb index f1a1340c5..b3db27195 100644 --- a/lib/auth0/event_streams/deliveries/client.rb +++ b/lib/auth0/event_streams/deliveries/client.rb @@ -26,6 +26,17 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.event_streams.deliveries.list( + # id: "id", + # statuses: "statuses", + # event_types: "event_types", + # date_from: "date_from", + # date_to: "date_to", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListEventStreamDeliveriesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -57,7 +68,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListEventStreamDeliveriesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListEventStreamDeliveriesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -76,6 +87,12 @@ def list(request_options: {}, **params) # @option params [String] :id # @option params [String] :event_id # + # @example + # client.event_streams.deliveries.get_history( + # id: "id", + # event_id: "event_id" + # ) + # # @return [Auth0::Types::GetEventStreamDeliveryHistoryResponseContent] def get_history(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -92,7 +109,7 @@ def get_history(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetEventStreamDeliveryHistoryResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetEventStreamDeliveryHistoryResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/event_streams/redeliveries/client.rb b/lib/auth0/event_streams/redeliveries/client.rb index 7d8dbae33..c8a2d3557 100644 --- a/lib/auth0/event_streams/redeliveries/client.rb +++ b/lib/auth0/event_streams/redeliveries/client.rb @@ -20,6 +20,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.event_streams.redeliveries.create(id: "id") + # # @return [Auth0::Types::CreateEventStreamRedeliveryResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -41,7 +44,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEventStreamRedeliveryResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEventStreamRedeliveryResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -58,6 +61,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String] :event_id # + # @example + # client.event_streams.redeliveries.create_by_id( + # id: "id", + # event_id: "event_id" + # ) + # # @return [untyped] def create_by_id(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/events/client.rb b/lib/auth0/events/client.rb index ddab04032..b8d07266e 100644 --- a/lib/auth0/events/client.rb +++ b/lib/auth0/events/client.rb @@ -23,6 +23,13 @@ def initialize(client:) # @option params [String, nil] :from_timestamp # @option params [Auth0::Types::EventStreamSubscribeEventsEventTypeEnum, nil] :event_type # + # @example + # client.events.subscribe( + # from: "from", + # from_timestamp: "from_timestamp", + # event_type: ["connection.created"] + # ) + # # @return [untyped] def subscribe(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/experimentation/client.rb b/lib/auth0/experimentation/client.rb new file mode 100644 index 000000000..66cc42948 --- /dev/null +++ b/lib/auth0/experimentation/client.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Auth0 + module Experimentation + class Client + # @param client [Auth0::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # @return [Auth0::Experiments::Client] + def experiments + @experiments ||= Auth0::Experimentation::Experiments::Client.new(client: @client) + end + end + end +end diff --git a/lib/auth0/experimentation/experiments/client.rb b/lib/auth0/experimentation/experiments/client.rb new file mode 100644 index 000000000..b25c80210 --- /dev/null +++ b/lib/auth0/experimentation/experiments/client.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +module Auth0 + module Experimentation + module Experiments + class Client + # @param client [Auth0::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # Increments the current ramp index to the requested target level. Up-only: the target must be the immediate + # next level in the schedule. Idempotent: calling with the current level returns success without writing + # anything. + # + # @param request_options [Hash] + # @param params [Auth0::Experimentation::Experiments::Types::AdvanceRampRequestContent] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :id + # + # @example + # client.experimentation.experiments.advance_ramp( + # id: "id", + # target_level: 1 + # ) + # + # @return [Auth0::Types::AdvanceRampResponseContent] + def advance_ramp(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Experimentation::Experiments::Types::AdvanceRampRequestContent.new(params).to_h + non_body_param_names = %w[id] + body = request_data.except(*non_body_param_names) + + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "experimentation/experiments/#{URI.encode_uri_component(params[:id].to_s)}/advance-ramp", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::AdvanceRampResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + end + end +end diff --git a/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb b/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb new file mode 100644 index 000000000..42da12388 --- /dev/null +++ b/lib/auth0/experimentation/experiments/types/advance_ramp_request_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Experimentation + module Experiments + module Types + class AdvanceRampRequestContent < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :target_level, -> { Integer }, optional: false, nullable: false + end + end + end + end +end diff --git a/lib/auth0/flows/client.rb b/lib/auth0/flows/client.rb index 7227c9ead..8add7bbdc 100644 --- a/lib/auth0/flows/client.rb +++ b/lib/auth0/flows/client.rb @@ -23,6 +23,15 @@ def initialize(client:) # @option params [Auth0::Types::ListFlowsRequestParametersHydrateEnum, nil] :hydrate # @option params [Boolean, nil] :synchronous # + # @example + # client.flows.list( + # page: 1, + # per_page: 1, + # include_totals: true, + # hydrate: ["form_count"], + # synchronous: true + # ) + # # @return [Auth0::Types::ListFlowsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -54,7 +63,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListFlowsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFlowsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -71,6 +80,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.flows.create(name: "name") + # # @return [Auth0::Types::CreateFlowResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -88,7 +100,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateFlowResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateFlowResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -105,6 +117,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [Auth0::Types::GetFlowRequestParametersHydrateEnum, nil] :hydrate # + # @example + # client.flows.get( + # id: "id", + # hydrate: ["form_count"] + # ) + # # @return [Auth0::Types::GetFlowResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -125,7 +143,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetFlowResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetFlowResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -141,6 +159,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.flows.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,6 +192,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.flows.update(id: "id") + # # @return [Auth0::Types::UpdateFlowResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -192,7 +216,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateFlowResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateFlowResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/flows/executions/client.rb b/lib/auth0/flows/executions/client.rb index b03ea62ef..d3b88b61b 100644 --- a/lib/auth0/flows/executions/client.rb +++ b/lib/auth0/flows/executions/client.rb @@ -23,6 +23,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.flows.executions.list( + # flow_id: "flow_id", + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListFlowExecutionsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +59,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListFlowExecutionsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFlowExecutionsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -71,6 +79,13 @@ def list(request_options: {}, **params) # @option params [String] :execution_id # @option params [Auth0::Types::GetFlowExecutionRequestParametersHydrateEnum, nil] :hydrate # + # @example + # client.flows.executions.get( + # flow_id: "flow_id", + # execution_id: "execution_id", + # hydrate: ["debug"] + # ) + # # @return [Auth0::Types::GetFlowExecutionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -91,7 +106,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetFlowExecutionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetFlowExecutionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -108,6 +123,12 @@ def get(request_options: {}, **params) # @option params [String] :flow_id # @option params [String] :execution_id # + # @example + # client.flows.executions.delete( + # flow_id: "flow_id", + # execution_id: "execution_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/flows/vault/connections/client.rb b/lib/auth0/flows/vault/connections/client.rb index 40fc95ecc..237095d18 100644 --- a/lib/auth0/flows/vault/connections/client.rb +++ b/lib/auth0/flows/vault/connections/client.rb @@ -23,6 +23,13 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.flows.vault.connections.list( + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListFlowsVaultConnectionsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -52,7 +59,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListFlowsVaultConnectionsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFlowsVaultConnectionsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -69,6 +76,17 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.flows.vault.connections.create(request: { + # name: "name", + # app_id: "ACTIVECAMPAIGN", + # setup: { + # type: "API_KEY", + # api_key: "api_key", + # base_url: "base_url" + # } + # }) + # # @return [Auth0::Types::CreateFlowsVaultConnectionResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -86,7 +104,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateFlowsVaultConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateFlowsVaultConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -102,6 +120,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.flows.vault.connections.get(id: "id") + # # @return [Auth0::Types::GetFlowsVaultConnectionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -118,7 +139,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetFlowsVaultConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetFlowsVaultConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -134,6 +155,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.flows.vault.connections.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -164,6 +188,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.flows.vault.connections.update(id: "id") + # # @return [Auth0::Types::UpdateFlowsVaultConnectionResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -185,7 +212,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateFlowsVaultConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateFlowsVaultConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/forms/client.rb b/lib/auth0/forms/client.rb index 440327c73..34e103e4b 100644 --- a/lib/auth0/forms/client.rb +++ b/lib/auth0/forms/client.rb @@ -22,6 +22,14 @@ def initialize(client:) # @option params [Boolean, nil] :include_totals # @option params [Auth0::Types::FormsRequestParametersHydrateEnum, nil] :hydrate # + # @example + # client.forms.list( + # page: 1, + # per_page: 1, + # include_totals: true, + # hydrate: ["flow_count"] + # ) + # # @return [Auth0::Types::ListFormsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -52,7 +60,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListFormsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListFormsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -69,6 +77,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.forms.create(name: "name") + # # @return [Auth0::Types::CreateFormResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -86,7 +97,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateFormResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateFormResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -103,6 +114,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [Auth0::Types::FormsRequestParametersHydrateEnum, nil] :hydrate # + # @example + # client.forms.get( + # id: "id", + # hydrate: ["flow_count"] + # ) + # # @return [Auth0::Types::GetFormResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -123,7 +140,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetFormResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetFormResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -139,6 +156,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.forms.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -169,6 +189,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.forms.update(id: "id") + # # @return [Auth0::Types::UpdateFormResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -190,7 +213,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateFormResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateFormResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/groups/client.rb b/lib/auth0/groups/client.rb index a8b1f1fe2..aac6ce0f9 100644 --- a/lib/auth0/groups/client.rb +++ b/lib/auth0/groups/client.rb @@ -29,6 +29,19 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.groups.list( + # connection_id: "connection_id", + # name: "name", + # external_id: "external_id", + # search: "search", + # fields: "fields", + # include_fields: true, + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListGroupsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +76,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListGroupsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListGroupsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -83,6 +96,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.groups.get(id: "id") + # # @return [Auth0::Types::GetGroupResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -99,7 +115,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGroupResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGroupResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -117,6 +133,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.groups.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/groups/members/client.rb b/lib/auth0/groups/members/client.rb index 75f94580c..5a6abc597 100644 --- a/lib/auth0/groups/members/client.rb +++ b/lib/auth0/groups/members/client.rb @@ -26,6 +26,15 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.groups.members.get( + # id: "id", + # fields: "fields", + # include_fields: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::GetGroupMembersResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -55,7 +64,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetGroupMembersResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetGroupMembersResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/groups/roles/client.rb b/lib/auth0/groups/roles/client.rb index c0b23fc79..10d1794e5 100644 --- a/lib/auth0/groups/roles/client.rb +++ b/lib/auth0/groups/roles/client.rb @@ -24,6 +24,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.groups.roles.list( + # id: "id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListGroupRolesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +58,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListGroupRolesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListGroupRolesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -71,6 +78,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.groups.roles.create( + # id: "id", + # roles: ["roles"] + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -108,6 +121,12 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.groups.roles.delete( + # id: "id", + # roles: ["roles"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/guardian/client.rb b/lib/auth0/guardian/client.rb index b99a82c4c..c7cd25852 100644 --- a/lib/auth0/guardian/client.rb +++ b/lib/auth0/guardian/client.rb @@ -10,6 +10,83 @@ def initialize(client:) @client = client end + # TODO: Link this endpoint to relevant documentation when available. + # + # @param request_options [Hash] + # @param _params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.guardian.get + # + # @return [Auth0::Types::GetGuardianSettingsResponseContent] + def get(request_options: {}, **_params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "guardian/settings", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianSettingsResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Update a tenant's guardian settings such as Remember Me + # + # @param request_options [Hash] + # @param params [Auth0::Guardian::Types::SetGuardianSettingsRequestContent] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.guardian.set( + # display_remember_me_checkbox: true, + # remember_me_default_value: true, + # mfa_session_inactivity_timeout: 1, + # mfa_session_overall_timeout: 1 + # ) + # + # @return [Auth0::Types::SetGuardianSettingsResponseContent] + def set(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "PUT", + path: "guardian/settings", + body: Auth0::Guardian::Types::SetGuardianSettingsRequestContent.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianSettingsResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @return [Auth0::Enrollments::Client] def enrollments @enrollments ||= Auth0::Guardian::Enrollments::Client.new(client: @client) diff --git a/lib/auth0/guardian/enrollments/client.rb b/lib/auth0/guardian/enrollments/client.rb index ca51ae666..694c3524f 100644 --- a/lib/auth0/guardian/enrollments/client.rb +++ b/lib/auth0/guardian/enrollments/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.enrollments.create_ticket(user_id: "user_id") + # # @return [Auth0::Types::CreateGuardianEnrollmentTicketResponseContent] def create_ticket(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -41,7 +44,7 @@ def create_ticket(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateGuardianEnrollmentTicketResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateGuardianEnrollmentTicketResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -60,6 +63,9 @@ def create_ticket(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.guardian.enrollments.get(id: "id") + # # @return [Auth0::Types::GetGuardianEnrollmentResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -76,7 +82,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianEnrollmentResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianEnrollmentResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -96,6 +102,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.guardian.enrollments.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/guardian/factors/client.rb b/lib/auth0/guardian/factors/client.rb index cd9726b06..5f4ef7462 100644 --- a/lib/auth0/guardian/factors/client.rb +++ b/lib/auth0/guardian/factors/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.list + # # @return [Array[Auth0::Types::GuardianFactor]] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -37,10 +40,12 @@ def list(request_options: {}, **_params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::GuardianFactor], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. @@ -54,6 +59,12 @@ def list(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::GuardianFactorNameEnum] :name # + # @example + # client.guardian.factors.set( + # name: "push-notification", + # enabled: true + # ) + # # @return [Auth0::Types::SetGuardianFactorResponseContent] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -75,13 +86,18 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end end + # @return [Auth0::Email::Client] + def email + @email ||= Auth0::Guardian::Factors::Email::Client.new(client: @client) + end + # @return [Auth0::Phone::Client] def phone @phone ||= Auth0::Guardian::Factors::Phone::Client.new(client: @client) diff --git a/lib/auth0/guardian/factors/duo/settings/client.rb b/lib/auth0/guardian/factors/duo/settings/client.rb index 2aaed9a7d..39492bc51 100644 --- a/lib/auth0/guardian/factors/duo/settings/client.rb +++ b/lib/auth0/guardian/factors/duo/settings/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.duo.settings.get + # # @return [Auth0::Types::GetGuardianFactorDuoSettingsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -38,7 +41,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorDuoSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorDuoSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -55,6 +58,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.duo.settings.set + # # @return [Auth0::Types::SetGuardianFactorDuoSettingsResponseContent] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -72,7 +78,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorDuoSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorDuoSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -87,6 +93,9 @@ def set(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.duo.settings.update + # # @return [Auth0::Types::UpdateGuardianFactorDuoSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -104,7 +113,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateGuardianFactorDuoSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorDuoSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/guardian/factors/email/client.rb b/lib/auth0/guardian/factors/email/client.rb new file mode 100644 index 000000000..b1fe8b00f --- /dev/null +++ b/lib/auth0/guardian/factors/email/client.rb @@ -0,0 +1,93 @@ +# frozen_string_literal: true + +module Auth0 + module Guardian + module Factors + module Email + class Client + # @param client [Auth0::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # TODO: Link this endpoint to relevant documentation when available. + # + # @param request_options [Hash] + # @param _params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.guardian.factors.email.get + # + # @return [Auth0::Types::GetEmailFactorSettingsResponseContent] + def get(request_options: {}, **_params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "guardian/factors/email/settings", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::GetEmailFactorSettingsResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # TODO: Link this endpoint to relevant documentation when available. + # + # @param request_options [Hash] + # @param params [Auth0::Guardian::Factors::Email::Types::SetEmailFactorSettingsRequestContent] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.guardian.factors.email.set( + # otp_length: 1, + # otp_expiration_time: 1 + # ) + # + # @return [Auth0::Types::SetEmailFactorSettingsResponseContent] + def set(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "PUT", + path: "guardian/factors/email/settings", + body: Auth0::Guardian::Factors::Email::Types::SetEmailFactorSettingsRequestContent.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::SetEmailFactorSettingsResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + end + end + end +end diff --git a/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb b/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb new file mode 100644 index 000000000..4857d021c --- /dev/null +++ b/lib/auth0/guardian/factors/email/types/set_email_factor_settings_request_content.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Auth0 + module Guardian + module Factors + module Email + module Types + class SetEmailFactorSettingsRequestContent < Internal::Types::Model + field :otp_length, -> { Integer }, optional: false, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: false, nullable: false + end + end + end + end + end +end diff --git a/lib/auth0/guardian/factors/phone/client.rb b/lib/auth0/guardian/factors/phone/client.rb index 5ff2f8cd5..87e208b10 100644 --- a/lib/auth0/guardian/factors/phone/client.rb +++ b/lib/auth0/guardian/factors/phone/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.get_message_types + # # @return [Auth0::Types::GetGuardianFactorPhoneMessageTypesResponseContent] def get_message_types(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -39,7 +42,7 @@ def get_message_types(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorPhoneMessageTypesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorPhoneMessageTypesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -58,6 +61,9 @@ def get_message_types(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.set_message_types(message_types: ["sms"]) + # # @return [Auth0::Types::SetGuardianFactorPhoneMessageTypesResponseContent] def set_message_types(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -75,7 +81,7 @@ def set_message_types(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorPhoneMessageTypesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorPhoneMessageTypesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -95,6 +101,9 @@ def set_message_types(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.get_twilio_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderPhoneTwilioResponseContent] def get_twilio_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -110,7 +119,7 @@ def get_twilio_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderPhoneTwilioResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderPhoneTwilioResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -130,6 +139,9 @@ def get_twilio_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.set_twilio_provider + # # @return [Auth0::Types::SetGuardianFactorsProviderPhoneTwilioResponseContent] def set_twilio_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -147,7 +159,7 @@ def set_twilio_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPhoneTwilioResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPhoneTwilioResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -164,6 +176,9 @@ def set_twilio_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.get_selected_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderPhoneResponseContent] def get_selected_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -179,7 +194,7 @@ def get_selected_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderPhoneResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderPhoneResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -194,6 +209,9 @@ def get_selected_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.set_provider(provider: "auth0") + # # @return [Auth0::Types::SetGuardianFactorsProviderPhoneResponseContent] def set_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -211,7 +229,82 @@ def set_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPhoneResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPhoneResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # TODO: Link this endpoint to relevant documentation when available. + # + # @param request_options [Hash] + # @param _params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.guardian.factors.phone.get + # + # @return [Auth0::Types::GetPhoneFactorSettingsResponseContent] + def get(request_options: {}, **_params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "guardian/factors/phone/settings", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::GetPhoneFactorSettingsResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # TODO: Link this endpoint to relevant documentation when available. + # + # @param request_options [Hash] + # @param params [Auth0::Guardian::Factors::Phone::Types::SetPhoneFactorSettingsRequestContent] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @example + # client.guardian.factors.phone.set( + # otp_length: 1, + # otp_expiration_time: 1 + # ) + # + # @return [Auth0::Types::SetPhoneFactorSettingsResponseContent] + def set(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "PUT", + path: "guardian/factors/phone/settings", + body: Auth0::Guardian::Factors::Phone::Types::SetPhoneFactorSettingsRequestContent.new(params).to_h, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::SetPhoneFactorSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -229,6 +322,9 @@ def set_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.get_templates + # # @return [Auth0::Types::GetGuardianFactorPhoneTemplatesResponseContent] def get_templates(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -244,7 +340,7 @@ def get_templates(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorPhoneTemplatesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorPhoneTemplatesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -261,6 +357,12 @@ def get_templates(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.phone.set_templates( + # enrollment_message: "enrollment_message", + # verification_message: "verification_message" + # ) + # # @return [Auth0::Types::SetGuardianFactorPhoneTemplatesResponseContent] def set_templates(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -278,7 +380,7 @@ def set_templates(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorPhoneTemplatesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorPhoneTemplatesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb b/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb new file mode 100644 index 000000000..f6ce1444f --- /dev/null +++ b/lib/auth0/guardian/factors/phone/types/set_phone_factor_settings_request_content.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Auth0 + module Guardian + module Factors + module Phone + module Types + class SetPhoneFactorSettingsRequestContent < Internal::Types::Model + field :otp_length, -> { Integer }, optional: false, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: false, nullable: false + end + end + end + end + end +end diff --git a/lib/auth0/guardian/factors/push_notification/client.rb b/lib/auth0/guardian/factors/push_notification/client.rb index 72ef229f8..39ca2d783 100644 --- a/lib/auth0/guardian/factors/push_notification/client.rb +++ b/lib/auth0/guardian/factors/push_notification/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.get_apns_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderApnsResponseContent] def get_apns_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -38,7 +41,7 @@ def get_apns_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderApnsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderApnsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -56,6 +59,9 @@ def get_apns_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.set_apns_provider + # # @return [Auth0::Types::SetGuardianFactorsProviderPushNotificationApnsResponseContent] def set_apns_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -73,7 +79,7 @@ def set_apns_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -90,6 +96,9 @@ def set_apns_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.update_apns_provider + # # @return [Auth0::Types::UpdateGuardianFactorsProviderPushNotificationApnsResponseContent] def update_apns_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -107,7 +116,7 @@ def update_apns_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -125,6 +134,9 @@ def update_apns_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.set_fcm_provider + # # @return [Hash[String, Object]] def set_fcm_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -142,7 +154,7 @@ def set_fcm_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -159,6 +171,9 @@ def set_fcm_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.update_fcm_provider + # # @return [Hash[String, Object]] def update_fcm_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -176,7 +191,7 @@ def update_fcm_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -194,6 +209,9 @@ def update_fcm_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.set_fcmv1provider + # # @return [Hash[String, Object]] def set_fcmv1provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -211,7 +229,7 @@ def set_fcmv1provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -228,6 +246,9 @@ def set_fcmv1provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.update_fcmv1provider + # # @return [Hash[String, Object]] def update_fcmv1provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -245,7 +266,7 @@ def update_fcmv1provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -264,6 +285,9 @@ def update_fcmv1provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.get_sns_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderSnsResponseContent] def get_sns_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -279,7 +303,7 @@ def get_sns_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderSnsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderSnsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -298,6 +322,9 @@ def get_sns_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.set_sns_provider + # # @return [Auth0::Types::SetGuardianFactorsProviderPushNotificationSnsResponseContent] def set_sns_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -315,7 +342,7 @@ def set_sns_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -334,6 +361,9 @@ def set_sns_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.update_sns_provider + # # @return [Auth0::Types::UpdateGuardianFactorsProviderPushNotificationSnsResponseContent] def update_sns_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -351,7 +381,7 @@ def update_sns_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -370,6 +400,9 @@ def update_sns_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.get_selected_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderPushNotificationResponseContent] def get_selected_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -385,7 +418,7 @@ def get_selected_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderPushNotificationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderPushNotificationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -404,6 +437,9 @@ def get_selected_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.push_notification.set_provider(provider: "guardian") + # # @return [Auth0::Types::SetGuardianFactorsProviderPushNotificationResponseContent] def set_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -421,7 +457,7 @@ def set_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderPushNotificationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderPushNotificationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/guardian/factors/sms/client.rb b/lib/auth0/guardian/factors/sms/client.rb index 77d233d66..176d3992c 100644 --- a/lib/auth0/guardian/factors/sms/client.rb +++ b/lib/auth0/guardian/factors/sms/client.rb @@ -27,6 +27,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.sms.get_twilio_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderSmsTwilioResponseContent] def get_twilio_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -42,7 +45,7 @@ def get_twilio_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -63,6 +66,9 @@ def get_twilio_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.sms.set_twilio_provider + # # @return [Auth0::Types::SetGuardianFactorsProviderSmsTwilioResponseContent] def set_twilio_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -80,7 +86,7 @@ def set_twilio_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderSmsTwilioResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -102,6 +108,9 @@ def set_twilio_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.sms.get_selected_provider + # # @return [Auth0::Types::GetGuardianFactorsProviderSmsResponseContent] def get_selected_provider(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -117,7 +126,7 @@ def get_selected_provider(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetGuardianFactorsProviderSmsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorsProviderSmsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -139,6 +148,9 @@ def get_selected_provider(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.sms.set_provider(provider: "auth0") + # # @return [Auth0::Types::SetGuardianFactorsProviderSmsResponseContent] def set_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -156,7 +168,7 @@ def set_provider(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorsProviderSmsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorsProviderSmsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -178,6 +190,9 @@ def set_provider(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.sms.get_templates + # # @return [Auth0::Types::GetGuardianFactorSmsTemplatesResponseContent, nil] def get_templates(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -192,10 +207,12 @@ def get_templates(request_options: {}, **_params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Types::GetGuardianFactorSmsTemplatesResponseContent.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # This endpoint has been deprecated. To complete this action, use the Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.factors.sms.set_templates( + # enrollment_message: "enrollment_message", + # verification_message: "verification_message" + # ) + # # @return [Auth0::Types::SetGuardianFactorSmsTemplatesResponseContent] def set_templates(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -229,7 +252,7 @@ def set_templates(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianFactorSmsTemplatesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianFactorSmsTemplatesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/guardian/policies/client.rb b/lib/auth0/guardian/policies/client.rb index f2f9bc721..7ea105c37 100644 --- a/lib/auth0/guardian/policies/client.rb +++ b/lib/auth0/guardian/policies/client.rb @@ -31,6 +31,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.policies.list + # # @return [Array[Auth0::Types::MfaPolicyEnum]] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -46,7 +49,7 @@ def list(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListGuardianPoliciesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListGuardianPoliciesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -73,6 +76,9 @@ def list(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.guardian.policies.set(request: ["all-applications"]) + # # @return [Array[Auth0::Types::MfaPolicyEnum]] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -90,7 +96,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetGuardianPoliciesResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetGuardianPoliciesResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/guardian/types/set_guardian_settings_request_content.rb b/lib/auth0/guardian/types/set_guardian_settings_request_content.rb new file mode 100644 index 000000000..f939d2cb4 --- /dev/null +++ b/lib/auth0/guardian/types/set_guardian_settings_request_content.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Auth0 + module Guardian + module Types + class SetGuardianSettingsRequestContent < Internal::Types::Model + field :display_remember_me_checkbox, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :remember_me_default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :mfa_session_inactivity_timeout, -> { Integer }, optional: false, nullable: false + + field :mfa_session_overall_timeout, -> { Integer }, optional: false, nullable: false + end + end + end +end diff --git a/lib/auth0/hooks/client.rb b/lib/auth0/hooks/client.rb index bed74dccd..1684b0999 100644 --- a/lib/auth0/hooks/client.rb +++ b/lib/auth0/hooks/client.rb @@ -27,6 +27,16 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Auth0::Types::HookTriggerIDEnum, nil] :trigger_id # + # @example + # client.hooks.list( + # page: 1, + # per_page: 1, + # include_totals: true, + # enabled: true, + # fields: "fields", + # trigger_id: "credentials-exchange" + # ) + # # @return [Auth0::Types::ListHooksOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -59,7 +69,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListHooksOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListHooksOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -78,6 +88,13 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.hooks.create( + # name: "name", + # script: "script", + # trigger_id: "credentials-exchange" + # ) + # # @return [Auth0::Types::CreateHookResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -95,7 +112,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateHookResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateHookResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -114,6 +131,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String, nil] :fields # + # @example + # client.hooks.get( + # id: "id", + # fields: "fields" + # ) + # # @return [Auth0::Types::GetHookResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -134,7 +157,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetHookResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetHookResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -152,6 +175,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.hooks.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -184,6 +210,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.hooks.update(id: "id") + # # @return [Auth0::Types::UpdateHookResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -205,7 +234,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateHookResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateHookResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/hooks/secrets/client.rb b/lib/auth0/hooks/secrets/client.rb index fc6b88969..f25d7ce26 100644 --- a/lib/auth0/hooks/secrets/client.rb +++ b/lib/auth0/hooks/secrets/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.hooks.secrets.get(id: "id") + # # @return [Hash[String, String]] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -38,7 +41,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetHookSecretResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetHookSecretResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -57,14 +60,25 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.hooks.secrets.create( + # id: "id", + # request: { + # key: "value" + # } + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "POST", path: "hooks/#{URI.encode_uri_component(params[:id].to_s)}/secrets", - body: params, + body: body_params, request_options: request_options ) begin @@ -90,14 +104,23 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.hooks.secrets.delete( + # id: "id", + # request: ["string"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "DELETE", path: "hooks/#{URI.encode_uri_component(params[:id].to_s)}/secrets", - body: params, + body: body_params, request_options: request_options ) begin @@ -124,14 +147,25 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.hooks.secrets.update( + # id: "id", + # request: { + # key: "value" + # } + # ) + # # @return [untyped] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PATCH", path: "hooks/#{URI.encode_uri_component(params[:id].to_s)}/secrets", - body: params, + body: body_params, request_options: request_options ) begin diff --git a/lib/auth0/jobs/client.rb b/lib/auth0/jobs/client.rb index 9b13bb562..1deb85ea5 100644 --- a/lib/auth0/jobs/client.rb +++ b/lib/auth0/jobs/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.jobs.get(id: "id") + # # @return [Auth0::Types::GetJobResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -37,7 +40,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetJobResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetJobResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/jobs/errors/client.rb b/lib/auth0/jobs/errors/client.rb index 4130fb5d7..93c9dcd14 100644 --- a/lib/auth0/jobs/errors/client.rb +++ b/lib/auth0/jobs/errors/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.jobs.errors.get(id: "id") + # # @return [Auth0::Jobs::Errors::Types::ErrorsGetResponse, nil] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -37,10 +40,12 @@ def get(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : Auth0::Jobs::Errors::Types::ErrorsGetResponse.load(response.body)) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end end end diff --git a/lib/auth0/jobs/users_exports/client.rb b/lib/auth0/jobs/users_exports/client.rb index 08e4cb44d..667c269d1 100644 --- a/lib/auth0/jobs/users_exports/client.rb +++ b/lib/auth0/jobs/users_exports/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.jobs.users_exports.create + # # @return [Auth0::Types::CreateExportUsersResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -38,7 +41,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateExportUsersResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateExportUsersResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/jobs/users_imports/client.rb b/lib/auth0/jobs/users_imports/client.rb index bc7755df2..4ad7e4948 100644 --- a/lib/auth0/jobs/users_imports/client.rb +++ b/lib/auth0/jobs/users_imports/client.rb @@ -25,31 +25,39 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.jobs.users_imports.create + # # @return [Auth0::Types::CreateImportUsersResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) body = Internal::Multipart::FormData.new - body.add_part(params[:users].to_form_data_part(name: "users")) if params[:users] - if params[:connection_id] + if params[:users] + body.add_file( + name: "users", + file: params[:users] + ) + end + unless params[:connection_id].nil? body.add( name: "connection_id", value: params[:connection_id] ) end - if params[:upsert] + unless params[:upsert].nil? body.add( name: "upsert", value: params[:upsert] ) end - if params[:external_id] + unless params[:external_id].nil? body.add( name: "external_id", value: params[:external_id] ) end - if params[:send_completion_email] + unless params[:send_completion_email].nil? body.add( name: "send_completion_email", value: params[:send_completion_email] @@ -70,7 +78,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateImportUsersResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateImportUsersResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/jobs/verification_email/client.rb b/lib/auth0/jobs/verification_email/client.rb index 317e83bae..f02db8466 100644 --- a/lib/auth0/jobs/verification_email/client.rb +++ b/lib/auth0/jobs/verification_email/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.jobs.verification_email.create(user_id: "user_id") + # # @return [Auth0::Types::CreateVerificationEmailResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -41,7 +44,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateVerificationEmailResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateVerificationEmailResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/keys/custom_signing/client.rb b/lib/auth0/keys/custom_signing/client.rb index 8b2abbaa4..d94af9a5a 100644 --- a/lib/auth0/keys/custom_signing/client.rb +++ b/lib/auth0/keys/custom_signing/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.custom_signing.get + # # @return [Auth0::Types::GetCustomSigningKeysResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetCustomSigningKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetCustomSigningKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,11 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.custom_signing.set(keys: [{ + # kty: "EC" + # }]) + # # @return [Auth0::Types::SetCustomSigningKeysResponseContent] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +78,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetCustomSigningKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetCustomSigningKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -87,6 +95,9 @@ def set(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.custom_signing.delete + # # @return [untyped] def delete(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( diff --git a/lib/auth0/keys/encryption/client.rb b/lib/auth0/keys/encryption/client.rb index dd233eb12..7f0716069 100644 --- a/lib/auth0/keys/encryption/client.rb +++ b/lib/auth0/keys/encryption/client.rb @@ -24,6 +24,13 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.keys.encryption.list( + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListEncryptionKeyOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +60,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListEncryptionKeyOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListEncryptionKeyOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -72,6 +79,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.encryption.create(type: "customer-provided-root-key") + # # @return [Auth0::Types::CreateEncryptionKeyResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -89,7 +99,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEncryptionKeyResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEncryptionKeyResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -106,6 +116,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.encryption.rekey + # # @return [untyped] def rekey(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -137,6 +150,9 @@ def rekey(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :kid # + # @example + # client.keys.encryption.get(kid: "kid") + # # @return [Auth0::Types::GetEncryptionKeyResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -153,7 +169,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetEncryptionKeyResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetEncryptionKeyResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -171,6 +187,12 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :kid # + # @example + # client.keys.encryption.import( + # kid: "kid", + # wrapped_key: "wrapped_key" + # ) + # # @return [Auth0::Types::ImportEncryptionKeyResponseContent] def import(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -192,7 +214,7 @@ def import(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ImportEncryptionKeyResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ImportEncryptionKeyResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -210,6 +232,9 @@ def import(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :kid # + # @example + # client.keys.encryption.delete(kid: "kid") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -242,6 +267,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :kid # + # @example + # client.keys.encryption.create_public_wrapping_key(kid: "kid") + # # @return [Auth0::Types::CreateEncryptionKeyPublicWrappingResponseContent] def create_public_wrapping_key(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -258,7 +286,7 @@ def create_public_wrapping_key(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateEncryptionKeyPublicWrappingResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateEncryptionKeyPublicWrappingResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/keys/network_acls/client.rb b/lib/auth0/keys/network_acls/client.rb index 2fcd00760..f5e966763 100644 --- a/lib/auth0/keys/network_acls/client.rb +++ b/lib/auth0/keys/network_acls/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.network_acls.list + # # @return [Auth0::Types::GetAllKeysNetworkACLsResponseContent] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -37,7 +40,7 @@ def list(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetAllKeysNetworkACLsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetAllKeysNetworkACLsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -54,6 +57,13 @@ def list(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.network_acls.create( + # name: "name", + # alg: "hmac-sha256", + # value: "value" + # ) + # # @return [Auth0::Types::CreateKeysNetworkACLsResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -71,7 +81,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateKeysNetworkACLsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateKeysNetworkACLsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -89,6 +99,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.keys.network_acls.get(id: "id") + # # @return [Auth0::Types::NetworkACLKey] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -105,7 +118,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::NetworkACLKey.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::NetworkACLKey.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -123,6 +136,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.keys.network_acls.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/keys/signing/client.rb b/lib/auth0/keys/signing/client.rb index 3da55ae69..adf938312 100644 --- a/lib/auth0/keys/signing/client.rb +++ b/lib/auth0/keys/signing/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.signing.list + # # @return [Array[Auth0::Types::SigningKeys]] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -35,10 +38,12 @@ def list(request_options: {}, **_params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::SigningKeys], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Rotate the application signing key of your tenant. @@ -51,6 +56,9 @@ def list(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.keys.signing.rotate + # # @return [Auth0::Types::RotateSigningKeysResponseContent] def rotate(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -66,7 +74,7 @@ def rotate(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RotateSigningKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RotateSigningKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -84,6 +92,9 @@ def rotate(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :kid # + # @example + # client.keys.signing.get(kid: "kid") + # # @return [Auth0::Types::GetSigningKeysResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -100,7 +111,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSigningKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSigningKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -118,6 +129,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :kid # + # @example + # client.keys.signing.revoke(kid: "kid") + # # @return [Auth0::Types::RevokedSigningKeysResponseContent] def revoke(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -134,7 +148,7 @@ def revoke(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RevokedSigningKeysResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RevokedSigningKeysResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/log_streams/client.rb b/lib/auth0/log_streams/client.rb index 9566b16a0..3dd55e618 100644 --- a/lib/auth0/log_streams/client.rb +++ b/lib/auth0/log_streams/client.rb @@ -90,6 +90,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.log_streams.list + # # @return [Array[Auth0::Types::LogStreamResponseSchema]] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -104,10 +107,12 @@ def list(request_options: {}, **_params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::LogStreamResponseSchema], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Create a log stream. @@ -316,6 +321,14 @@ def list(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.log_streams.create( + # type: "http", + # sink: { + # http_endpoint: "httpEndpoint" + # } + # ) + # # @return [Auth0::Types::CreateLogStreamResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -333,7 +346,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateLogStreamResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateLogStreamResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -502,6 +515,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.log_streams.get(id: "id") + # # @return [Auth0::Types::GetLogStreamResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -518,7 +534,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetLogStreamResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetLogStreamResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -536,6 +552,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.log_streams.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -641,6 +660,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.log_streams.update(id: "id") + # # @return [Auth0::Types::UpdateLogStreamResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -662,7 +684,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateLogStreamResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateLogStreamResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/logs/client.rb b/lib/auth0/logs/client.rb index 36ea985c0..562d73fd9 100644 --- a/lib/auth0/logs/client.rb +++ b/lib/auth0/logs/client.rb @@ -64,6 +64,17 @@ def initialize(client:) # @option params [Boolean, nil] :include_totals # @option params [String, nil] :search # + # @example + # client.logs.list( + # page: 1, + # per_page: 1, + # sort: "sort", + # fields: "fields", + # include_fields: true, + # include_totals: true, + # search: "search" + # ) + # # @return [Auth0::Types::ListLogOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -97,7 +108,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListLogOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListLogOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -117,6 +128,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.logs.get(id: "id") + # # @return [Auth0::Types::GetLogResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -133,7 +147,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetLogResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetLogResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/network_acls/client.rb b/lib/auth0/network_acls/client.rb index fa91f43c0..f2edbfabf 100644 --- a/lib/auth0/network_acls/client.rb +++ b/lib/auth0/network_acls/client.rb @@ -23,6 +23,13 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.network_acls.list( + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListNetworkACLsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -52,7 +59,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListNetworkACLsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListNetworkACLsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -71,6 +78,16 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.network_acls.create( + # description: "description", + # active: true, + # rule: { + # action: {}, + # scope: "management" + # } + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -104,6 +121,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.network_acls.get(id: "id") + # # @return [Auth0::Types::GetNetworkACLsResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -120,7 +140,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetNetworkACLsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetNetworkACLsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -138,6 +158,17 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.network_acls.set( + # id: "id", + # description: "description", + # active: true, + # rule: { + # action: {}, + # scope: "management" + # } + # ) + # # @return [Auth0::Types::SetNetworkACLsResponseContent] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -159,7 +190,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetNetworkACLsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetNetworkACLsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -177,6 +208,9 @@ def set(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.network_acls.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -209,6 +243,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.network_acls.update(id: "id") + # # @return [Auth0::Types::UpdateNetworkACLResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -230,7 +267,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateNetworkACLResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateNetworkACLResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/organization_templates/client.rb b/lib/auth0/organization_templates/client.rb deleted file mode 100644 index 77948a516..000000000 --- a/lib/auth0/organization_templates/client.rb +++ /dev/null @@ -1,220 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module OrganizationTemplates - class Client - # @param client [Auth0::Internal::Http::RawClient] - # - # @return [void] - def initialize(client:) - @client = client - end - - # Retrieve a list of Organization Templates. This endpoint supports Checkpoint pagination. Results are returned in - # a stable order, sorted by their identifier (`id`) in ascending order. - # - # @param request_options [Hash] - # @param params [Hash] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # @option params [String, nil] :from - # @option params [Integer, nil] :take - # - # @return [Auth0::Types::ListOrganizationTemplatesPaginatedResponseContent] - def list(request_options: {}, **params) - params = Auth0::Internal::Types::Utils.normalize_keys(params) - query_params = {} - query_params["from"] = params[:from] if params.key?(:from) - query_params["take"] = params.fetch(:take, 5) - - Auth0::Internal::CursorItemIterator.new( - cursor_field: :next_, - item_field: :organization_templates, - initial_cursor: query_params["from"] - ) do |next_cursor| - query_params["from"] = next_cursor - request = Auth0::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "GET", - path: "organization-templates", - query: query_params, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Auth0::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationTemplatesPaginatedResponseContent.load(response.body) - [parsed_response, response] - else - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - end - - # Create an Organization Template. - # - # @param request_options [Hash] - # @param params [Auth0::OrganizationTemplates::Types::CreateOrganizationTemplateRequestContent] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # - # @return [Auth0::Types::OrganizationTemplate] - def create(request_options: {}, **params) - params = Auth0::Internal::Types::Utils.normalize_keys(params) - request = Auth0::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "POST", - path: "organization-templates", - body: Auth0::OrganizationTemplates::Types::CreateOrganizationTemplateRequestContent.new(params).to_h, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Auth0::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - Auth0::Types::OrganizationTemplate.load(response.body) - else - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - - # Retrieve details about a single Organization Template specified by ID. - # - # @param request_options [Hash] - # @param params [Hash] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :id - # - # @return [Auth0::Types::OrganizationTemplate] - def get(request_options: {}, **params) - params = Auth0::Internal::Types::Utils.normalize_keys(params) - request = Auth0::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "GET", - path: "organization-templates/#{URI.encode_uri_component(params[:id].to_s)}", - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Auth0::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - Auth0::Types::OrganizationTemplate.load(response.body) - else - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - - # Update the details of a specific Organization Template. - # - # @param request_options [Hash] - # @param params [Auth0::OrganizationTemplates::Types::UpdateOrganizationTemplateRequestContent] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :id - # - # @return [Auth0::Types::OrganizationTemplate] - def update(request_options: {}, **params) - params = Auth0::Internal::Types::Utils.normalize_keys(params) - request_data = Auth0::OrganizationTemplates::Types::UpdateOrganizationTemplateRequestContent.new(params).to_h - non_body_param_names = %w[id] - body = request_data.except(*non_body_param_names) - - request = Auth0::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "PATCH", - path: "organization-templates/#{URI.encode_uri_component(params[:id].to_s)}", - body: body, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Auth0::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - Auth0::Types::OrganizationTemplate.load(response.body) - else - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - - # Retrieve a list of organizations assigned to an Organization Template. This endpoint supports Checkpoint - # pagination. Results are returned in a stable order, sorted by their identifier (`id`) in ascending order. - # - # @param request_options [Hash] - # @param params [Hash] - # @option request_options [String] :base_url - # @option request_options [Hash{String => Object}] :additional_headers - # @option request_options [Hash{String => Object}] :additional_query_parameters - # @option request_options [Hash{String => Object}] :additional_body_parameters - # @option request_options [Integer] :timeout_in_seconds - # @option params [String] :id - # @option params [String, nil] :from - # @option params [Integer, nil] :take - # - # @return [Auth0::Types::ListTemplateOrganizationsPaginatedResponseContent] - def list_organizations(request_options: {}, **params) - params = Auth0::Internal::Types::Utils.normalize_keys(params) - query_params = {} - query_params["from"] = params[:from] if params.key?(:from) - query_params["take"] = params.fetch(:take, 5) - - Auth0::Internal::CursorItemIterator.new( - cursor_field: :next_, - item_field: :organizations, - initial_cursor: query_params["from"] - ) do |next_cursor| - query_params["from"] = next_cursor - request = Auth0::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "GET", - path: "organization-templates/#{URI.encode_uri_component(params[:id].to_s)}/organizations", - query: query_params, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Auth0::Errors::TimeoutError - end - code = response.code.to_i - if code.between?(200, 299) - parsed_response = Auth0::Types::ListTemplateOrganizationsPaginatedResponseContent.load(response.body) - [parsed_response, response] - else - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) - end - end - end - end - end -end diff --git a/lib/auth0/organization_templates/types/create_organization_template_request_content.rb b/lib/auth0/organization_templates/types/create_organization_template_request_content.rb deleted file mode 100644 index bcb82ec18..000000000 --- a/lib/auth0/organization_templates/types/create_organization_template_request_content.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module OrganizationTemplates - module Types - class CreateOrganizationTemplateRequestContent < Internal::Types::Model - field :name, -> { String }, optional: false, nullable: false - - field :is_default, -> { Internal::Types::Boolean }, optional: true, nullable: false - - field :organization_deletion_behavior, -> { Auth0::Types::OrganizationDeletionBehaviorEnum }, optional: false, nullable: false - - field :connection_deletion_behavior, -> { Auth0::Types::ConnectionDeletionBehaviorEnum }, optional: true, nullable: false - - field :enforce_permission_ceiling, -> { Internal::Types::Boolean }, optional: false, nullable: false - - field :enforce_self_assignment_restriction, -> { Internal::Types::Boolean }, optional: false, nullable: false - - field :connection_profile_id, -> { String }, optional: true, nullable: false - - field :user_attribute_profile_id, -> { String }, optional: true, nullable: false - - field :allowed_strategies, -> { Internal::Types::Array[Auth0::Types::OrganizationTemplateAllowedStrategyEnum] }, optional: true, nullable: false - - field :invitation_landing_client_id, -> { String }, optional: true, nullable: false - - field :admin_roles_assignment, -> { Internal::Types::Array[String] }, optional: true, nullable: false - - field :use_for_organization_discovery, -> { Auth0::Types::OrganizationTemplateUseForOrganizationDiscovery }, optional: true, nullable: false - - field :role_visibility_policy, -> { Auth0::Types::OrganizationTemplateRoleVisibilityPolicy }, optional: true, nullable: false - end - end - end -end diff --git a/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb b/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb deleted file mode 100644 index 9474d1116..000000000 --- a/lib/auth0/organization_templates/types/list_organization_templates_request_parameters.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module OrganizationTemplates - module Types - class ListOrganizationTemplatesRequestParameters < Internal::Types::Model - field :from, -> { String }, optional: true, nullable: false - - field :take, -> { Integer }, optional: true, nullable: false - end - end - end -end diff --git a/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb b/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb deleted file mode 100644 index 788e95654..000000000 --- a/lib/auth0/organization_templates/types/list_template_organizations_request_parameters.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module OrganizationTemplates - module Types - class ListTemplateOrganizationsRequestParameters < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false - - field :from, -> { String }, optional: true, nullable: false - - field :take, -> { Integer }, optional: true, nullable: false - end - end - end -end diff --git a/lib/auth0/organization_templates/types/update_organization_template_request_content.rb b/lib/auth0/organization_templates/types/update_organization_template_request_content.rb deleted file mode 100644 index 6d6dcd391..000000000 --- a/lib/auth0/organization_templates/types/update_organization_template_request_content.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module OrganizationTemplates - module Types - class UpdateOrganizationTemplateRequestContent < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false - - field :name, -> { String }, optional: true, nullable: false - - field :is_default, -> { Internal::Types::Boolean }, optional: true, nullable: false - - field :organization_deletion_behavior, -> { Auth0::Types::OrganizationDeletionBehaviorEnum }, optional: true, nullable: false - - field :connection_deletion_behavior, -> { Auth0::Types::ConnectionDeletionBehaviorEnum }, optional: true, nullable: false - - field :enforce_permission_ceiling, -> { Internal::Types::Boolean }, optional: true, nullable: false - - field :enforce_self_assignment_restriction, -> { Internal::Types::Boolean }, optional: true, nullable: false - - field :connection_profile_id, -> { String }, optional: true, nullable: false - - field :user_attribute_profile_id, -> { String }, optional: true, nullable: false - - field :allowed_strategies, -> { Internal::Types::Array[Auth0::Types::OrganizationTemplateAllowedStrategyEnum] }, optional: true, nullable: false - - field :invitation_landing_client_id, -> { String }, optional: true, nullable: false - - field :admin_roles_assignment, -> { Internal::Types::Array[String] }, optional: true, nullable: false - - field :use_for_organization_discovery, -> { Auth0::Types::OrganizationTemplateUseForOrganizationDiscovery }, optional: true, nullable: false - - field :role_visibility_policy, -> { Auth0::Types::OrganizationTemplateRoleVisibilityPolicy }, optional: true, nullable: false - end - end - end -end diff --git a/lib/auth0/organizations/client.rb b/lib/auth0/organizations/client.rb index d7efb69ed..00a8ddb87 100644 --- a/lib/auth0/organizations/client.rb +++ b/lib/auth0/organizations/client.rb @@ -44,6 +44,15 @@ def initialize(client:) # @option params [String, nil] :sort # @option params [String, nil] :include_client_association_for # + # @example + # client.organizations.list( + # include_totals: true, + # from: "from", + # take: 1, + # sort: "sort", + # include_client_association_for: "include_client_association_for" + # ) + # # @return [Auth0::Types::ListOrganizationsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -74,7 +83,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -95,6 +104,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.organizations.create(name: "name") + # # @return [Auth0::Types::CreateOrganizationResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -112,7 +124,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateOrganizationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -130,6 +142,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :name # + # @example + # client.organizations.get_by_name(name: "name") + # # @return [Auth0::Types::GetOrganizationByNameResponseContent] def get_by_name(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -146,13 +161,93 @@ def get_by_name(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationByNameResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationByNameResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end end + # Retrieve details of organizations matching a search criteria. It is possible to: + # + # - Specify a search criteria for organizations + # - Search via `name` + # - Search via `display_name` + # - Substring matching (`contains` and `ends-with`) requires at least 3 characters + # - Use wildcards + # + # The `q` query parameter can be used to get organizations that match the specified criteria on `name` OR + # `display_name`. + # + # This endpoint supports SCIM or Lucene filter syntax with low-latency, cursor-based pagination. Use the `parser` + # parameter to specify "scim" or "lucene" syntax (default: "lucene"). + # + # Results are eventually consistent and may not reflect recent updates immediately. + # + # **Sortable fields:** `name`, `display_name`, `created_at` (ascending only). Defaults to insertion order (oldest + # first). + # + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :q + # @option params [Auth0::Types::SearchParserEnum, nil] :parser + # @option params [Integer, nil] :take + # @option params [String, nil] :from + # @option params [Auth0::Types::OrganizationSortFieldEnum, nil] :sort + # + # @example + # client.organizations.search( + # q: "q", + # parser: "scim", + # take: 1, + # from: "from", + # sort: "name" + # ) + # + # @return [Auth0::Types::SearchOrganizationsPaginatedResponseContent] + def search(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + query_params = {} + query_params["q"] = params[:q] if params.key?(:q) + query_params["parser"] = params[:parser] if params.key?(:parser) + query_params["take"] = params.fetch(:take, 50) + query_params["from"] = params[:from] if params.key?(:from) + query_params["sort"] = params[:sort] if params.key?(:sort) + + Auth0::Internal::CursorItemIterator.new( + cursor_field: :next_, + item_field: :organizations, + initial_cursor: query_params["from"] + ) do |next_cursor| + query_params["from"] = next_cursor + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "organizations/search", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::SearchOrganizationsPaginatedResponseContent.load(response.body)) + [parsed_response, response] + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + # Retrieve details about a single Organization specified by ID. # # @param request_options [Hash] @@ -164,6 +259,9 @@ def get_by_name(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.get(id: "id") + # # @return [Auth0::Types::GetOrganizationResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -180,7 +278,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -201,6 +299,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -235,6 +336,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.update(id: "id") + # # @return [Auth0::Types::UpdateOrganizationResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -256,7 +360,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateOrganizationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/organizations/client_grants/client.rb b/lib/auth0/organizations/client_grants/client.rb index 6bd0715ec..ff2469139 100644 --- a/lib/auth0/organizations/client_grants/client.rb +++ b/lib/auth0/organizations/client_grants/client.rb @@ -26,6 +26,17 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.organizations.client_grants.list( + # id: "id", + # audience: "audience", + # client_id: "client_id", + # grant_ids: ["grant_ids"], + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListOrganizationClientGrantsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,7 +69,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationClientGrantsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationClientGrantsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -76,6 +87,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.client_grants.create( + # id: "id", + # grant_id: "grant_id" + # ) + # # @return [Auth0::Types::AssociateOrganizationClientGrantResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -97,7 +114,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::AssociateOrganizationClientGrantResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::AssociateOrganizationClientGrantResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -114,6 +131,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String] :grant_id # + # @example + # client.organizations.client_grants.delete( + # id: "id", + # grant_id: "grant_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/organizations/clients/client.rb b/lib/auth0/organizations/clients/client.rb index 1209803eb..04a1e7ac3 100644 --- a/lib/auth0/organizations/clients/client.rb +++ b/lib/auth0/organizations/clients/client.rb @@ -31,6 +31,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.organizations.clients.list( + # id: "id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListOrganizationClientsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,7 +65,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationClientsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationClientsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -78,6 +85,15 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.clients.create( + # id: "id", + # clients: [{ + # client_id: "client_id", + # use_for_member_access: true + # }] + # ) + # # @return [Array[Auth0::Types::OrganizationClient]] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -99,7 +115,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateOrganizationClientsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationClientsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -117,6 +133,12 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.clients.delete( + # id: "id", + # clients: ["clients"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -155,6 +177,12 @@ def delete(request_options: {}, **params) # @option params [String] :id # @option params [String] :client_id # + # @example + # client.organizations.clients.get( + # id: "id", + # client_id: "client_id" + # ) + # # @return [Auth0::Types::GetOrganizationClientResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,7 +199,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationClientResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationClientResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -190,6 +218,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :client_id # + # @example + # client.organizations.clients.update( + # id: "id", + # client_id: "client_id" + # ) + # # @return [Auth0::Types::UpdateOrganizationClientResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -211,7 +245,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateOrganizationClientResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationClientResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/organizations/connections/client.rb b/lib/auth0/organizations/connections/client.rb index 95ba79cf5..ca2a11396 100644 --- a/lib/auth0/organizations/connections/client.rb +++ b/lib/auth0/organizations/connections/client.rb @@ -24,6 +24,15 @@ def initialize(client:) # @option params [Boolean, nil] :include_totals # @option params [Boolean, nil] :is_enabled # + # @example + # client.organizations.connections.list( + # id: "id", + # page: 1, + # per_page: 1, + # include_totals: true, + # is_enabled: true + # ) + # # @return [Auth0::Types::ListOrganizationAllConnectionsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -54,7 +63,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationAllConnectionsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationAllConnectionsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -72,6 +81,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.connections.create( + # id: "id", + # connection_id: "connection_id" + # ) + # # @return [Auth0::Types::CreateOrganizationAllConnectionResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -93,7 +108,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateOrganizationAllConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationAllConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -110,6 +125,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String] :connection_id # + # @example + # client.organizations.connections.get( + # id: "id", + # connection_id: "connection_id" + # ) + # # @return [Auth0::Types::GetOrganizationAllConnectionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -126,7 +147,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationAllConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationAllConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -143,6 +164,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :connection_id # + # @example + # client.organizations.connections.delete( + # id: "id", + # connection_id: "connection_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -174,6 +201,12 @@ def delete(request_options: {}, **params) # @option params [String] :id # @option params [String] :connection_id # + # @example + # client.organizations.connections.update( + # id: "id", + # connection_id: "connection_id" + # ) + # # @return [Auth0::Types::UpdateOrganizationAllConnectionResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -195,7 +228,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateOrganizationAllConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationAllConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb b/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb index 12772f2bd..17f0e491b 100644 --- a/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb +++ b/lib/auth0/organizations/connections/types/create_organization_all_connection_request_parameters.rb @@ -17,6 +17,8 @@ class CreateOrganizationAllConnectionRequestParameters < Internal::Types::Model field :organization_access_level, -> { Auth0::Types::OrganizationAccessLevelEnum }, optional: true, nullable: false + field :organization_member_access_level, -> { Auth0::Types::OrganizationMemberAccessLevelEnum }, optional: true, nullable: false + field :is_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :connection_id, -> { String }, optional: false, nullable: false diff --git a/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb b/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb index a17d127ed..15b7035f7 100644 --- a/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb +++ b/lib/auth0/organizations/connections/types/update_organization_connection_request_parameters.rb @@ -19,6 +19,8 @@ class UpdateOrganizationConnectionRequestParameters < Internal::Types::Model field :organization_access_level, -> { Auth0::Types::OrganizationAccessLevelEnumWithNull }, optional: true, nullable: false + field :organization_member_access_level, -> { Auth0::Types::OrganizationMemberAccessLevelEnumWithNull }, optional: true, nullable: false + field :is_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false end end diff --git a/lib/auth0/organizations/discovery_domains/client.rb b/lib/auth0/organizations/discovery_domains/client.rb index e243939a6..a4eeb8f0b 100644 --- a/lib/auth0/organizations/discovery_domains/client.rb +++ b/lib/auth0/organizations/discovery_domains/client.rb @@ -26,6 +26,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.organizations.discovery_domains.list( + # id: "id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListOrganizationDiscoveryDomainsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +60,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationDiscoveryDomainsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationDiscoveryDomainsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -73,6 +80,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.discovery_domains.create( + # id: "id", + # domain: "domain" + # ) + # # @return [Auth0::Types::CreateOrganizationDiscoveryDomainResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -94,7 +107,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateOrganizationDiscoveryDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationDiscoveryDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -115,6 +128,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [String] :discovery_domain # + # @example + # client.organizations.discovery_domains.get_by_name( + # id: "id", + # discovery_domain: "discovery_domain" + # ) + # # @return [Auth0::Types::GetOrganizationDiscoveryDomainByNameResponseContent] def get_by_name(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -131,7 +150,7 @@ def get_by_name(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationDiscoveryDomainByNameResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationDiscoveryDomainByNameResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -152,6 +171,12 @@ def get_by_name(request_options: {}, **params) # @option params [String] :id # @option params [String] :discovery_domain_id # + # @example + # client.organizations.discovery_domains.get( + # id: "id", + # discovery_domain_id: "discovery_domain_id" + # ) + # # @return [Auth0::Types::GetOrganizationDiscoveryDomainResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -168,7 +193,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationDiscoveryDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationDiscoveryDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -187,6 +212,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :discovery_domain_id # + # @example + # client.organizations.discovery_domains.delete( + # id: "id", + # discovery_domain_id: "discovery_domain_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -222,6 +253,12 @@ def delete(request_options: {}, **params) # @option params [String] :id # @option params [String] :discovery_domain_id # + # @example + # client.organizations.discovery_domains.update( + # id: "id", + # discovery_domain_id: "discovery_domain_id" + # ) + # # @return [Auth0::Types::UpdateOrganizationDiscoveryDomainResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -243,7 +280,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateOrganizationDiscoveryDomainResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationDiscoveryDomainResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/organizations/enabled_connections/client.rb b/lib/auth0/organizations/enabled_connections/client.rb index 4dcdfc26b..31ad95528 100644 --- a/lib/auth0/organizations/enabled_connections/client.rb +++ b/lib/auth0/organizations/enabled_connections/client.rb @@ -27,6 +27,14 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.organizations.enabled_connections.list( + # id: "id", + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListOrganizationConnectionsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -56,7 +64,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationConnectionsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationConnectionsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -80,6 +88,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.enabled_connections.add( + # id: "id", + # connection_id: "connection_id" + # ) + # # @return [Auth0::Types::AddOrganizationConnectionResponseContent] def add(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -101,7 +115,7 @@ def add(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::AddOrganizationConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::AddOrganizationConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -122,6 +136,12 @@ def add(request_options: {}, **params) # @option params [String] :id # @option params [String] :connection_id # + # @example + # client.organizations.enabled_connections.get( + # id: "id", + # connection_id: "connectionId" + # ) + # # @return [Auth0::Types::GetOrganizationConnectionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -138,7 +158,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -160,6 +180,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :connection_id # + # @example + # client.organizations.enabled_connections.delete( + # id: "id", + # connection_id: "connectionId" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -193,6 +219,12 @@ def delete(request_options: {}, **params) # @option params [String] :id # @option params [String] :connection_id # + # @example + # client.organizations.enabled_connections.update( + # id: "id", + # connection_id: "connectionId" + # ) + # # @return [Auth0::Types::UpdateOrganizationConnectionResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -214,7 +246,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateOrganizationConnectionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateOrganizationConnectionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/organizations/groups/client.rb b/lib/auth0/organizations/groups/client.rb index 44e01f9aa..a660c8e1e 100644 --- a/lib/auth0/organizations/groups/client.rb +++ b/lib/auth0/organizations/groups/client.rb @@ -24,6 +24,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.organizations.groups.list( + # organization_id: "organization_id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListOrganizationGroupsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +58,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationGroupsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationGroupsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/organizations/groups/roles/client.rb b/lib/auth0/organizations/groups/roles/client.rb index 425800f30..d06eaa380 100644 --- a/lib/auth0/organizations/groups/roles/client.rb +++ b/lib/auth0/organizations/groups/roles/client.rb @@ -26,6 +26,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.organizations.groups.roles.list( + # organization_id: "organization_id", + # group_id: "group_id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListOrganizationGroupRolesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +61,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationGroupRolesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationGroupRolesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -74,6 +82,13 @@ def list(request_options: {}, **params) # @option params [String] :organization_id # @option params [String] :group_id # + # @example + # client.organizations.groups.roles.create( + # organization_id: "organization_id", + # group_id: "group_id", + # roles: ["roles"] + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -112,6 +127,13 @@ def create(request_options: {}, **params) # @option params [String] :organization_id # @option params [String] :group_id # + # @example + # client.organizations.groups.roles.delete( + # organization_id: "organization_id", + # group_id: "group_id", + # roles: ["roles"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/organizations/invitations/client.rb b/lib/auth0/organizations/invitations/client.rb index fa370ee0b..fe0c4c1f4 100644 --- a/lib/auth0/organizations/invitations/client.rb +++ b/lib/auth0/organizations/invitations/client.rb @@ -31,6 +31,17 @@ def initialize(client:) # @option params [Boolean, nil] :include_fields # @option params [String, nil] :sort # + # @example + # client.organizations.invitations.list( + # id: "id", + # page: 1, + # per_page: 1, + # include_totals: true, + # fields: "fields", + # include_fields: true, + # sort: "sort" + # ) + # # @return [Auth0::Types::ListOrganizationInvitationsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +74,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationInvitationsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationInvitationsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -86,6 +97,18 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.invitations.create( + # id: "id", + # inviter: { + # name: "name" + # }, + # invitee: { + # email: "email" + # }, + # client_id: "client_id" + # ) + # # @return [Auth0::Types::CreateOrganizationInvitationResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -107,7 +130,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateOrganizationInvitationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateOrganizationInvitationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -126,6 +149,14 @@ def create(request_options: {}, **params) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.organizations.invitations.get( + # id: "id", + # invitation_id: "invitation_id", + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetOrganizationInvitationResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -147,7 +178,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetOrganizationInvitationResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetOrganizationInvitationResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -164,6 +195,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :invitation_id # + # @example + # client.organizations.invitations.delete( + # id: "id", + # invitation_id: "invitation_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/organizations/members/client.rb b/lib/auth0/organizations/members/client.rb index ad1d09302..d264e8bc1 100644 --- a/lib/auth0/organizations/members/client.rb +++ b/lib/auth0/organizations/members/client.rb @@ -51,6 +51,16 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.organizations.members.list( + # id: "id", + # include_totals: true, + # from: "from", + # take: 1, + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::ListOrganizationMembersPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -81,7 +91,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationMembersPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationMembersPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -107,6 +117,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.members.create( + # id: "id", + # members: ["members"] + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -142,6 +158,12 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.members.delete( + # id: "id", + # members: ["members"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/organizations/members/effective_roles/client.rb b/lib/auth0/organizations/members/effective_roles/client.rb index f37cdd2d3..54de91b41 100644 --- a/lib/auth0/organizations/members/effective_roles/client.rb +++ b/lib/auth0/organizations/members/effective_roles/client.rb @@ -26,6 +26,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.organizations.members.effective_roles.list( + # id: "id", + # user_id: "user_id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListOrganizationMemberEffectiveRolesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +61,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationMemberEffectiveRolesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationMemberEffectiveRolesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb b/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb index 9fd2ad46c..30c9dbf85 100644 --- a/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb +++ b/lib/auth0/organizations/members/effective_roles/sources/groups/client.rb @@ -29,6 +29,15 @@ def initialize(client:) # @option params [Integer, nil] :take # @option params [String] :role_id # + # @example + # client.organizations.members.effective_roles.sources.groups.list( + # id: "id", + # user_id: "user_id", + # from: "from", + # take: 1, + # role_id: "role_id" + # ) + # # @return [Auth0::Types::ListOrganizationMemberRoleSourceGroupsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -57,7 +66,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationMemberRoleSourceGroupsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationMemberRoleSourceGroupsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/organizations/members/roles/client.rb b/lib/auth0/organizations/members/roles/client.rb index 567b421e8..a1ed28e6d 100644 --- a/lib/auth0/organizations/members/roles/client.rb +++ b/lib/auth0/organizations/members/roles/client.rb @@ -34,6 +34,15 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.organizations.members.roles.list( + # id: "id", + # user_id: "user_id", + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListOrganizationMemberRolesOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +72,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationMemberRolesOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationMemberRolesOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -89,6 +98,13 @@ def list(request_options: {}, **params) # @option params [String] :id # @option params [String] :user_id # + # @example + # client.organizations.members.roles.assign( + # id: "id", + # user_id: "user_id", + # roles: ["roles"] + # ) + # # @return [untyped] def assign(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -132,6 +148,13 @@ def assign(request_options: {}, **params) # @option params [String] :id # @option params [String] :user_id # + # @example + # client.organizations.members.roles.delete( + # id: "id", + # user_id: "user_id", + # roles: ["roles"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/organizations/organization_template/client.rb b/lib/auth0/organizations/organization_template/client.rb index fedf4be2d..e5fa1bdfd 100644 --- a/lib/auth0/organizations/organization_template/client.rb +++ b/lib/auth0/organizations/organization_template/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.organizations.organization_template.get(id: "id") + # # @return [Auth0::Types::OrganizationTemplate] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -39,7 +42,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::OrganizationTemplate.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::OrganizationTemplate.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -58,6 +61,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :template_id # + # @example + # client.organizations.organization_template.assign_organization_template( + # id: "id", + # template_id: "template_id" + # ) + # # @return [untyped] def assign_organization_template(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -91,6 +100,12 @@ def assign_organization_template(request_options: {}, **params) # @option params [String] :id # @option params [String] :template_id # + # @example + # client.organizations.organization_template.unassign_organization_template( + # id: "id", + # template_id: "template_id" + # ) + # # @return [untyped] def unassign_organization_template(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/organizations/roles/groups/client.rb b/lib/auth0/organizations/roles/groups/client.rb index 14dfc0a66..d6e5be175 100644 --- a/lib/auth0/organizations/roles/groups/client.rb +++ b/lib/auth0/organizations/roles/groups/client.rb @@ -26,6 +26,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.organizations.roles.groups.list( + # organization_id: "organization_id", + # role_id: "role_id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListOrganizationRoleGroupsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +61,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationRoleGroupsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationRoleGroupsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/organizations/roles/members/client.rb b/lib/auth0/organizations/roles/members/client.rb index 32a0a0070..848baccb2 100644 --- a/lib/auth0/organizations/roles/members/client.rb +++ b/lib/auth0/organizations/roles/members/client.rb @@ -34,6 +34,16 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.organizations.roles.members.list( + # id: "id", + # role_id: "role_id", + # from: "from", + # take: 1, + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::ListOrganizationRoleMembersResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +73,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListOrganizationRoleMembersResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListOrganizationRoleMembersResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/organizations/types/search_organizations_request_parameters.rb b/lib/auth0/organizations/types/search_organizations_request_parameters.rb new file mode 100644 index 000000000..1d738bead --- /dev/null +++ b/lib/auth0/organizations/types/search_organizations_request_parameters.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Types + class SearchOrganizationsRequestParameters < Internal::Types::Model + field :q, -> { String }, optional: true, nullable: false + + field :parser, -> { Auth0::Types::SearchParserEnum }, optional: true, nullable: false + + field :take, -> { Integer }, optional: true, nullable: false + + field :from, -> { String }, optional: true, nullable: false + + field :sort, -> { Auth0::Types::OrganizationSortFieldEnum }, optional: true, nullable: false + end + end + end +end diff --git a/lib/auth0/prompts/client.rb b/lib/auth0/prompts/client.rb index ea4837a0b..86aa61188 100644 --- a/lib/auth0/prompts/client.rb +++ b/lib/auth0/prompts/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.prompts.get_settings + # # @return [Auth0::Types::GetSettingsResponseContent] def get_settings(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -39,7 +42,7 @@ def get_settings(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -60,6 +63,9 @@ def get_settings(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.prompts.update_settings + # # @return [Auth0::Types::UpdateSettingsResponseContent] def update_settings(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -77,7 +83,7 @@ def update_settings(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/prompts/custom_text/client.rb b/lib/auth0/prompts/custom_text/client.rb index 235285370..3c36ffabb 100644 --- a/lib/auth0/prompts/custom_text/client.rb +++ b/lib/auth0/prompts/custom_text/client.rb @@ -23,6 +23,12 @@ def initialize(client:) # @option params [Auth0::Types::PromptGroupNameEnum] :prompt # @option params [Auth0::Types::PromptLanguageEnum] :language # + # @example + # client.prompts.custom_text.get( + # prompt: "login", + # language: "am" + # ) + # # @return [Hash[String, Object]] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -39,7 +45,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetCustomTextsByLanguageResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetCustomTextsByLanguageResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -58,14 +64,26 @@ def get(request_options: {}, **params) # @option params [Auth0::Types::PromptGroupNameEnum] :prompt # @option params [Auth0::Types::PromptLanguageEnum] :language # + # @example + # client.prompts.custom_text.set( + # prompt: "login", + # language: "am", + # request: { + # key: "value" + # } + # ) + # # @return [untyped] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[prompt language] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "prompts/#{URI.encode_uri_component(params[:prompt].to_s)}/custom-text/#{URI.encode_uri_component(params[:language].to_s)}", - body: params, + body: body_params, request_options: request_options ) begin diff --git a/lib/auth0/prompts/partials/client.rb b/lib/auth0/prompts/partials/client.rb index 0106660eb..2858b546b 100644 --- a/lib/auth0/prompts/partials/client.rb +++ b/lib/auth0/prompts/partials/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::PartialGroupsEnum] :prompt # + # @example + # client.prompts.partials.get(prompt: "login") + # # @return [Hash[String, Object]] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -38,7 +41,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetPartialsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetPartialsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -56,14 +59,25 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [Auth0::Types::PartialGroupsEnum] :prompt # + # @example + # client.prompts.partials.set( + # prompt: "login", + # request: { + # key: "value" + # } + # ) + # # @return [untyped] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[prompt] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "prompts/#{URI.encode_uri_component(params[:prompt].to_s)}/partials", - body: params, + body: body_params, request_options: request_options ) begin diff --git a/lib/auth0/prompts/rendering/client.rb b/lib/auth0/prompts/rendering/client.rb index 37f05b508..5b05ff614 100644 --- a/lib/auth0/prompts/rendering/client.rb +++ b/lib/auth0/prompts/rendering/client.rb @@ -29,6 +29,18 @@ def initialize(client:) # @option params [String, nil] :screen # @option params [Auth0::Types::AculRenderingModeEnum, nil] :rendering_mode # + # @example + # client.prompts.rendering.list( + # fields: "fields", + # include_fields: true, + # page: 1, + # per_page: 1, + # include_totals: true, + # prompt: "prompt", + # screen: "screen", + # rendering_mode: "advanced" + # ) + # # @return [Auth0::Types::ListAculsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -63,7 +75,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListAculsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListAculsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -84,6 +96,12 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.prompts.rendering.bulk_update(configs: [{ + # prompt: "login", + # screen: "login" + # }]) + # # @return [Auth0::Types::BulkUpdateAculResponseContent] def bulk_update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -101,7 +119,7 @@ def bulk_update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::BulkUpdateAculResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::BulkUpdateAculResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -120,6 +138,12 @@ def bulk_update(request_options: {}, **params) # @option params [Auth0::Types::PromptGroupNameEnum] :prompt # @option params [Auth0::Types::ScreenGroupNameEnum] :screen # + # @example + # client.prompts.rendering.get( + # prompt: "login", + # screen: "login" + # ) + # # @return [Auth0::Types::GetAculResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -136,7 +160,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetAculResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetAculResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -157,6 +181,12 @@ def get(request_options: {}, **params) # @option params [Auth0::Types::PromptGroupNameEnum] :prompt # @option params [Auth0::Types::ScreenGroupNameEnum] :screen # + # @example + # client.prompts.rendering.update( + # prompt: "login", + # screen: "login" + # ) + # # @return [Auth0::Types::UpdateAculResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -178,7 +208,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateAculResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateAculResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/rate_limit_policies/client.rb b/lib/auth0/rate_limit_policies/client.rb index 40c070c1e..765ac6bb7 100644 --- a/lib/auth0/rate_limit_policies/client.rb +++ b/lib/auth0/rate_limit_policies/client.rb @@ -23,6 +23,15 @@ def initialize(client:) # @option params [Integer, nil] :take # @option params [String, nil] :from # + # @example + # client.rate_limit_policies.list( + # resource: "oauth_authentication_api", + # consumer: "client", + # consumer_selector: "consumer_selector", + # take: 1, + # from: "from" + # ) + # # @return [Auth0::Types::ListRateLimitPoliciesPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +62,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRateLimitPoliciesPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRateLimitPoliciesPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -70,6 +79,16 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.rate_limit_policies.create( + # resource: "oauth_authentication_api", + # consumer: "client", + # consumer_selector: "consumer_selector", + # configuration: { + # action: "allow" + # } + # ) + # # @return [Auth0::Types::CreateRateLimitPolicyResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -87,7 +106,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateRateLimitPolicyResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateRateLimitPolicyResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -103,6 +122,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.rate_limit_policies.get(id: "id") + # # @return [Auth0::Types::GetRateLimitPolicyResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -119,7 +141,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetRateLimitPolicyResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetRateLimitPolicyResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -135,6 +157,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.rate_limit_policies.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -165,6 +190,14 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.rate_limit_policies.update( + # id: "id", + # configuration: { + # action: "allow" + # } + # ) + # # @return [Auth0::Types::UpdateRateLimitPolicyResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -186,7 +219,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateRateLimitPolicyResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateRateLimitPolicyResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/refresh_tokens/client.rb b/lib/auth0/refresh_tokens/client.rb index dc6e52aeb..f152b231c 100644 --- a/lib/auth0/refresh_tokens/client.rb +++ b/lib/auth0/refresh_tokens/client.rb @@ -27,6 +27,16 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.refresh_tokens.list( + # user_id: "user_id", + # client_id: "client_id", + # from: "from", + # take: 1, + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetRefreshTokensPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,7 +68,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetRefreshTokensPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetRefreshTokensPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -77,6 +87,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.refresh_tokens.revoke + # # @return [untyped] def revoke(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -110,6 +123,9 @@ def revoke(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.refresh_tokens.get(id: "id") + # # @return [Auth0::Types::GetRefreshTokenResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -126,7 +142,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetRefreshTokenResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetRefreshTokenResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -144,6 +160,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.refresh_tokens.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -176,6 +195,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.refresh_tokens.update(id: "id") + # # @return [Auth0::Types::UpdateRefreshTokenResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -197,7 +219,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateRefreshTokenResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateRefreshTokenResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/resource_servers/client.rb b/lib/auth0/resource_servers/client.rb index b42a5e25c..72bf91b40 100644 --- a/lib/auth0/resource_servers/client.rb +++ b/lib/auth0/resource_servers/client.rb @@ -25,6 +25,15 @@ def initialize(client:) # @option params [Boolean, nil] :include_totals # @option params [Boolean, nil] :include_fields # + # @example + # client.resource_servers.list( + # identifiers: ["identifiers"], + # page: 1, + # per_page: 1, + # include_totals: true, + # include_fields: true + # ) + # # @return [Auth0::Types::ListResourceServerOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -56,7 +65,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListResourceServerOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListResourceServerOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -76,6 +85,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.resource_servers.create(identifier: "identifier") + # # @return [Auth0::Types::CreateResourceServerResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -93,13 +105,87 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateResourceServerResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateResourceServerResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end end + # Search resource servers using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use + # the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an + # alternative to the standard GET /resource-servers endpoint with better performance for complex queries. + # Results may not reflect recent updates immediately. + # + # The `signing_secret` field is not supported by this endpoint. + # + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String, nil] :q + # @option params [Auth0::Types::SearchParserEnum, nil] :parser + # @option params [String, nil] :fields + # @option params [Boolean, nil] :include_fields + # @option params [Integer, nil] :take + # @option params [String, nil] :from + # @option params [Auth0::Types::ResourceServerSortFieldEnum, nil] :sort + # + # @example + # client.resource_servers.search( + # q: "q", + # parser: "scim", + # fields: "fields", + # include_fields: true, + # take: 1, + # from: "from", + # sort: "identifier" + # ) + # + # @return [Auth0::Types::SearchResourceServersResponseContent] + def search(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + query_params = {} + query_params["q"] = params[:q] if params.key?(:q) + query_params["parser"] = params[:parser] if params.key?(:parser) + query_params["fields"] = params[:fields] if params.key?(:fields) + query_params["include_fields"] = params[:include_fields] if params.key?(:include_fields) + query_params["take"] = params.fetch(:take, 50) + query_params["from"] = params[:from] if params.key?(:from) + query_params["sort"] = params[:sort] if params.key?(:sort) + + Auth0::Internal::CursorItemIterator.new( + cursor_field: :next_, + item_field: :resource_servers, + initial_cursor: query_params["from"] + ) do |next_cursor| + query_params["from"] = next_cursor + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "resource-servers/search", + query: query_params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Auth0::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::SearchResourceServersResponseContent.load(response.body)) + [parsed_response, response] + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + end + # Retrieve API details with the given ID. # # @param request_options [Hash] @@ -112,6 +198,12 @@ def create(request_options: {}, **params) # @option params [String] :id # @option params [Boolean, nil] :include_fields # + # @example + # client.resource_servers.get( + # id: "id", + # include_fields: true + # ) + # # @return [Auth0::Types::GetResourceServerResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -132,7 +224,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetResourceServerResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetResourceServerResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -151,6 +243,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.resource_servers.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -184,6 +279,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.resource_servers.update(id: "id") + # # @return [Auth0::Types::UpdateResourceServerResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -205,7 +303,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateResourceServerResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateResourceServerResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/resource_servers/types/create_resource_server_request_content.rb b/lib/auth0/resource_servers/types/create_resource_server_request_content.rb index b715a4a1d..ca5eb253f 100644 --- a/lib/auth0/resource_servers/types/create_resource_server_request_content.rb +++ b/lib/auth0/resource_servers/types/create_resource_server_request_content.rb @@ -22,12 +22,16 @@ class CreateResourceServerRequestContent < Internal::Types::Model field :token_lifetime, -> { Integer }, optional: true, nullable: false + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectSchemaEnum }, optional: true, nullable: false field :skip_consent_for_verifiable_first_party_clients, -> { Internal::Types::Boolean }, optional: true, nullable: false field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb b/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb new file mode 100644 index 000000000..211aa4465 --- /dev/null +++ b/lib/auth0/resource_servers/types/search_resource_servers_request_parameters.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module ResourceServers + module Types + class SearchResourceServersRequestParameters < Internal::Types::Model + field :q, -> { String }, optional: true, nullable: false + + field :parser, -> { Auth0::Types::SearchParserEnum }, optional: true, nullable: false + + field :fields, -> { String }, optional: true, nullable: false + + field :include_fields, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :take, -> { Integer }, optional: true, nullable: false + + field :from, -> { String }, optional: true, nullable: false + + field :sort, -> { Auth0::Types::ResourceServerSortFieldEnum }, optional: true, nullable: false + end + end + end +end diff --git a/lib/auth0/resource_servers/types/update_resource_server_request_content.rb b/lib/auth0/resource_servers/types/update_resource_server_request_content.rb index 9679c537f..ca5802a01 100644 --- a/lib/auth0/resource_servers/types/update_resource_server_request_content.rb +++ b/lib/auth0/resource_servers/types/update_resource_server_request_content.rb @@ -24,10 +24,14 @@ class UpdateResourceServerRequestContent < Internal::Types::Model field :token_lifetime, -> { Integer }, optional: true, nullable: false + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectSchemaEnum }, optional: true, nullable: false field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/risk_assessments/settings/client.rb b/lib/auth0/risk_assessments/settings/client.rb index 0159c59d4..b27265612 100644 --- a/lib/auth0/risk_assessments/settings/client.rb +++ b/lib/auth0/risk_assessments/settings/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.risk_assessments.settings.get + # # @return [Auth0::Types::GetRiskAssessmentsSettingsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,7 +39,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetRiskAssessmentsSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetRiskAssessmentsSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -53,6 +56,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.risk_assessments.settings.update(enabled: true) + # # @return [Auth0::Types::UpdateRiskAssessmentsSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -70,7 +76,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateRiskAssessmentsSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateRiskAssessmentsSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/risk_assessments/settings/new_device/client.rb b/lib/auth0/risk_assessments/settings/new_device/client.rb index fdd4e14fe..cf93d6af1 100644 --- a/lib/auth0/risk_assessments/settings/new_device/client.rb +++ b/lib/auth0/risk_assessments/settings/new_device/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.risk_assessments.settings.new_device.get + # # @return [Auth0::Types::GetRiskAssessmentsSettingsNewDeviceResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -37,7 +40,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetRiskAssessmentsSettingsNewDeviceResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetRiskAssessmentsSettingsNewDeviceResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -54,6 +57,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.risk_assessments.settings.new_device.update(remember_for: 1) + # # @return [Auth0::Types::UpdateRiskAssessmentsSettingsNewDeviceResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -71,7 +77,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateRiskAssessmentsSettingsNewDeviceResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateRiskAssessmentsSettingsNewDeviceResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/roles/client.rb b/lib/auth0/roles/client.rb index 3140a5910..7148fe2ee 100644 --- a/lib/auth0/roles/client.rb +++ b/lib/auth0/roles/client.rb @@ -29,6 +29,16 @@ def initialize(client:) # @option params [Auth0::Types::RoleTypeEnum, nil] :type # @option params [String, nil] :owner_id # + # @example + # client.roles.list( + # per_page: 1, + # page: 1, + # include_totals: true, + # name_filter: "name_filter", + # type: "tenant", + # owner_id: "owner_id" + # ) + # # @return [Auth0::Types::ListRolesOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -61,7 +71,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRolesOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRolesOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -83,6 +93,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.roles.create(name: "name") + # # @return [Auth0::Types::CreateRoleResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -100,7 +113,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateRoleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateRoleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -119,6 +132,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.get(id: "id") + # # @return [Auth0::Types::GetRoleResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -135,7 +151,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetRoleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetRoleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -154,6 +170,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -187,6 +206,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.update(id: "id") + # # @return [Auth0::Types::UpdateRoleResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -208,7 +230,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateRoleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateRoleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/roles/groups/client.rb b/lib/auth0/roles/groups/client.rb index b661dc330..a6d195978 100644 --- a/lib/auth0/roles/groups/client.rb +++ b/lib/auth0/roles/groups/client.rb @@ -24,6 +24,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.roles.groups.get( + # id: "id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListRoleGroupsResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +58,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRoleGroupsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRoleGroupsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -71,6 +78,12 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.groups.create( + # id: "id", + # groups: ["groups"] + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -108,6 +121,12 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.groups.delete( + # id: "id", + # groups: ["groups"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/roles/permissions/client.rb b/lib/auth0/roles/permissions/client.rb index 1b5bedb57..0550cfe1c 100644 --- a/lib/auth0/roles/permissions/client.rb +++ b/lib/auth0/roles/permissions/client.rb @@ -25,6 +25,14 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Boolean, nil] :include_totals # + # @example + # client.roles.permissions.list( + # id: "id", + # per_page: 1, + # page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListRolePermissionsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -54,7 +62,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRolePermissionsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRolePermissionsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -76,6 +84,15 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.permissions.add( + # id: "id", + # permissions: [{ + # resource_server_identifier: "resource_server_identifier", + # permission_name: "permission_name" + # }] + # ) + # # @return [untyped] def add(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -115,6 +132,15 @@ def add(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.permissions.delete( + # id: "id", + # permissions: [{ + # resource_server_identifier: "resource_server_identifier", + # permission_name: "permission_name" + # }] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/roles/users/client.rb b/lib/auth0/roles/users/client.rb index 93b42f6df..6e0fb5155 100644 --- a/lib/auth0/roles/users/client.rb +++ b/lib/auth0/roles/users/client.rb @@ -48,6 +48,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.roles.users.list( + # id: "id", + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListRoleUsersPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -76,7 +84,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRoleUsersPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRoleUsersPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -99,6 +107,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.roles.users.assign( + # id: "id", + # users: ["users"] + # ) + # # @return [untyped] def assign(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/rules/client.rb b/lib/auth0/rules/client.rb index 000591805..50c61a95e 100644 --- a/lib/auth0/rules/client.rb +++ b/lib/auth0/rules/client.rb @@ -27,6 +27,16 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.rules.list( + # page: 1, + # per_page: 1, + # include_totals: true, + # enabled: true, + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::ListRulesOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -59,7 +69,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRulesOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRulesOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -81,6 +91,12 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.rules.create( + # name: "name", + # script: "script" + # ) + # # @return [Auth0::Types::CreateRuleResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -98,7 +114,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateRuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateRuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -119,6 +135,13 @@ def create(request_options: {}, **params) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.rules.get( + # id: "id", + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetRuleResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -140,7 +163,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetRuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetRuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -158,6 +181,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.rules.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -190,6 +216,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.rules.update(id: "id") + # # @return [Auth0::Types::UpdateRuleResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -211,7 +240,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateRuleResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateRuleResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/rules_configs/client.rb b/lib/auth0/rules_configs/client.rb index 8ca956962..50daaa3eb 100644 --- a/lib/auth0/rules_configs/client.rb +++ b/lib/auth0/rules_configs/client.rb @@ -22,6 +22,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.rules_configs.list + # # @return [Array[Auth0::Types::RulesConfig]] def list(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -36,10 +39,12 @@ def list(request_options: {}, **_params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::RulesConfig], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Sets a rules config variable. @@ -53,6 +58,12 @@ def list(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :key # + # @example + # client.rules_configs.set( + # key: "key", + # value: "value" + # ) + # # @return [Auth0::Types::SetRulesConfigResponseContent] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -74,7 +85,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetRulesConfigResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetRulesConfigResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -92,6 +103,9 @@ def set(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :key # + # @example + # client.rules_configs.delete(key: "key") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/self_service_profiles/client.rb b/lib/auth0/self_service_profiles/client.rb index afc363e22..94c648ea8 100644 --- a/lib/auth0/self_service_profiles/client.rb +++ b/lib/auth0/self_service_profiles/client.rb @@ -23,6 +23,13 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.self_service_profiles.list( + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListSelfServiceProfilesPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -52,7 +59,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListSelfServiceProfilesPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListSelfServiceProfilesPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -71,6 +78,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.self_service_profiles.create(name: "name") + # # @return [Auth0::Types::CreateSelfServiceProfileResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -88,7 +98,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateSelfServiceProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateSelfServiceProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -106,6 +116,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.self_service_profiles.get(id: "id") + # # @return [Auth0::Types::GetSelfServiceProfileResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -122,7 +135,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSelfServiceProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSelfServiceProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -140,6 +153,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.self_service_profiles.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -172,6 +188,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.self_service_profiles.update(id: "id") + # # @return [Auth0::Types::UpdateSelfServiceProfileResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -193,7 +212,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateSelfServiceProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSelfServiceProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/self_service_profiles/custom_text/client.rb b/lib/auth0/self_service_profiles/custom_text/client.rb index fdade57a0..78b453e16 100644 --- a/lib/auth0/self_service_profiles/custom_text/client.rb +++ b/lib/auth0/self_service_profiles/custom_text/client.rb @@ -25,6 +25,13 @@ def initialize(client:) # @option params [Auth0::Types::SelfServiceProfileCustomTextLanguageEnum] :language # @option params [Auth0::Types::SelfServiceProfileCustomTextPageEnum] :page # + # @example + # client.self_service_profiles.custom_text.list( + # id: "id", + # language: "en", + # page: "get-started" + # ) + # # @return [Hash[String, String]] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -41,7 +48,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListSelfServiceProfileCustomTextResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListSelfServiceProfileCustomTextResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -62,14 +69,27 @@ def list(request_options: {}, **params) # @option params [Auth0::Types::SelfServiceProfileCustomTextLanguageEnum] :language # @option params [Auth0::Types::SelfServiceProfileCustomTextPageEnum] :page # + # @example + # client.self_service_profiles.custom_text.set( + # id: "id", + # language: "en", + # page: "get-started", + # request: { + # key: "value" + # } + # ) + # # @return [Hash[String, String]] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id language page] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "self-service-profiles/#{URI.encode_uri_component(params[:id].to_s)}/custom-text/#{URI.encode_uri_component(params[:language].to_s)}/#{URI.encode_uri_component(params[:page].to_s)}", - body: params, + body: body_params, request_options: request_options ) begin @@ -79,7 +99,7 @@ def set(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::SetSelfServiceProfileCustomTextResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::SetSelfServiceProfileCustomTextResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/self_service_profiles/sso_ticket/client.rb b/lib/auth0/self_service_profiles/sso_ticket/client.rb index cace1e50e..d13674925 100644 --- a/lib/auth0/self_service_profiles/sso_ticket/client.rb +++ b/lib/auth0/self_service_profiles/sso_ticket/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.self_service_profiles.sso_ticket.create(id: "id") + # # @return [Auth0::Types::CreateSelfServiceProfileSSOTicketResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -44,7 +47,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateSelfServiceProfileSSOTicketResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateSelfServiceProfileSSOTicketResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -70,6 +73,12 @@ def create(request_options: {}, **params) # @option params [String] :profile_id # @option params [String] :id # + # @example + # client.self_service_profiles.sso_ticket.revoke( + # profile_id: "profileId", + # id: "id" + # ) + # # @return [untyped] def revoke(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/sessions/client.rb b/lib/auth0/sessions/client.rb index 42cc1ad64..4b069ee34 100644 --- a/lib/auth0/sessions/client.rb +++ b/lib/auth0/sessions/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.sessions.get(id: "id") + # # @return [Auth0::Types::GetSessionResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -37,7 +40,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSessionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSessionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -55,6 +58,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.sessions.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -87,6 +93,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.sessions.update(id: "id") + # # @return [Auth0::Types::UpdateSessionResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -108,7 +117,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateSessionResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateSessionResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -126,6 +135,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.sessions.revoke(id: "id") + # # @return [untyped] def revoke(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/stats/client.rb b/lib/auth0/stats/client.rb index 0adaa97ea..6758909ca 100644 --- a/lib/auth0/stats/client.rb +++ b/lib/auth0/stats/client.rb @@ -20,6 +20,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.stats.get_active_users_count + # # @return [Integer] def get_active_users_count(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -35,7 +38,7 @@ def get_active_users_count(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetActiveUsersCountStatsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetActiveUsersCountStatsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -55,6 +58,12 @@ def get_active_users_count(request_options: {}, **_params) # @option params [String, nil] :from # @option params [String, nil] :to # + # @example + # client.stats.get_daily( + # from: "from", + # to: "to" + # ) + # # @return [Array[Auth0::Types::DailyStats]] def get_daily(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -75,10 +84,12 @@ def get_daily(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::DailyStats], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end end end diff --git a/lib/auth0/supplemental_signals/client.rb b/lib/auth0/supplemental_signals/client.rb index 2da8030ca..b75faabb4 100644 --- a/lib/auth0/supplemental_signals/client.rb +++ b/lib/auth0/supplemental_signals/client.rb @@ -20,6 +20,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.supplemental_signals.get + # # @return [Auth0::Types::GetSupplementalSignalsResponseContent] def get(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -35,7 +38,7 @@ def get(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetSupplementalSignalsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetSupplementalSignalsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -52,6 +55,9 @@ def get(request_options: {}, **_params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.supplemental_signals.patch(akamai_enabled: true) + # # @return [Auth0::Types::PatchSupplementalSignalsResponseContent] def patch(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -69,7 +75,7 @@ def patch(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::PatchSupplementalSignalsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::PatchSupplementalSignalsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/tenants/settings/client.rb b/lib/auth0/tenants/settings/client.rb index 273de0791..7f4f6e109 100644 --- a/lib/auth0/tenants/settings/client.rb +++ b/lib/auth0/tenants/settings/client.rb @@ -23,6 +23,12 @@ def initialize(client:) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.tenants.settings.get( + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetTenantSettingsResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -44,7 +50,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetTenantSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetTenantSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -61,6 +67,9 @@ def get(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.tenants.settings.update + # # @return [Auth0::Types::UpdateTenantSettingsResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -78,7 +87,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateTenantSettingsResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateTenantSettingsResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb b/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb index da241e0c7..da7127750 100644 --- a/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb +++ b/lib/auth0/tenants/settings/types/update_tenant_settings_request_content.rb @@ -55,6 +55,8 @@ class UpdateTenantSettingsRequestContent < Internal::Types::Model field :enabled_locales, -> { Internal::Types::Array[Auth0::Types::TenantSettingsSupportedLocalesEnum] }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :security_headers, -> { Auth0::Types::TenantSettingsNullableSecurityHeaders }, optional: true, nullable: false field :session_cookie, -> { Auth0::Types::SessionCookieSchema }, optional: true, nullable: false diff --git a/lib/auth0/tickets/client.rb b/lib/auth0/tickets/client.rb index cf23bb7a2..219c21417 100644 --- a/lib/auth0/tickets/client.rb +++ b/lib/auth0/tickets/client.rb @@ -21,6 +21,9 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.tickets.verify_email(user_id: "user_id") + # # @return [Auth0::Types::VerifyEmailTicketResponseContent] def verify_email(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -38,7 +41,7 @@ def verify_email(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::VerifyEmailTicketResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::VerifyEmailTicketResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -59,6 +62,9 @@ def verify_email(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.tickets.change_password + # # @return [Auth0::Types::ChangePasswordTicketResponseContent] def change_password(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -76,7 +82,7 @@ def change_password(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ChangePasswordTicketResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ChangePasswordTicketResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/token_exchange_profiles/client.rb b/lib/auth0/token_exchange_profiles/client.rb index d95fe3f1a..bee323fc2 100644 --- a/lib/auth0/token_exchange_profiles/client.rb +++ b/lib/auth0/token_exchange_profiles/client.rb @@ -35,6 +35,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.token_exchange_profiles.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListTokenExchangeProfileResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -62,7 +68,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListTokenExchangeProfileResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListTokenExchangeProfileResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -85,6 +91,14 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.token_exchange_profiles.create( + # name: "name", + # subject_token_type: "subject_token_type", + # action_id: "action_id", + # type: "custom_authentication" + # ) + # # @return [Auth0::Types::CreateTokenExchangeProfileResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -102,7 +116,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateTokenExchangeProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateTokenExchangeProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -124,6 +138,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.token_exchange_profiles.get(id: "id") + # # @return [Auth0::Types::GetTokenExchangeProfileResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -140,7 +157,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetTokenExchangeProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetTokenExchangeProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -162,6 +179,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.token_exchange_profiles.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -198,6 +218,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.token_exchange_profiles.update(id: "id") + # # @return [untyped] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/types/advance_ramp_response_content.rb b/lib/auth0/types/advance_ramp_response_content.rb new file mode 100644 index 000000000..3a6022dc5 --- /dev/null +++ b/lib/auth0/types/advance_ramp_response_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class AdvanceRampResponseContent < Internal::Types::Model + field :experiment_id, -> { String }, optional: false, nullable: false + + field :from_level, -> { Integer }, optional: false, nullable: false + + field :to_level, -> { Integer }, optional: false, nullable: false + + field :current_level, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/anonymous_sessions.rb b/lib/auth0/types/anonymous_sessions.rb new file mode 100644 index 000000000..4ba4ed06e --- /dev/null +++ b/lib/auth0/types/anonymous_sessions.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Anonymous sessions configuration for this client. + class AnonymousSessions < Internal::Types::Model + field :active, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/client.rb b/lib/auth0/types/client.rb index 321514201..3b98813e1 100644 --- a/lib/auth0/types/client.rb +++ b/lib/auth0/types/client.rb @@ -5,6 +5,10 @@ module Types class Client < Internal::Types::Model field :client_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: true, nullable: false + + field :updated_at, -> { String }, optional: true, nullable: false + field :tenant, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false @@ -117,6 +121,8 @@ class Client < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::IdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::AnonymousSessions }, optional: true, nullable: false + field :third_party_security_mode, -> { Auth0::Types::ClientThirdPartySecurityModeEnum }, optional: true, nullable: false field :redirection_policy, -> { Auth0::Types::ClientRedirectionPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/client_my_organization_patch_configuration.rb b/lib/auth0/types/client_my_organization_patch_configuration.rb index 060966fb8..fcfbbbadb 100644 --- a/lib/auth0/types/client_my_organization_patch_configuration.rb +++ b/lib/auth0/types/client_my_organization_patch_configuration.rb @@ -15,6 +15,10 @@ class ClientMyOrganizationPatchConfiguration < Internal::Types::Model field :connection_deletion_behavior, -> { Auth0::Types::ClientMyOrganizationDeletionBehaviorEnum }, optional: false, nullable: false field :invitation_landing_client_id, -> { String }, optional: true, nullable: false + + field :enforce_permission_ceiling, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :enforce_self_assignment_restriction, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/client_my_organization_post_configuration.rb b/lib/auth0/types/client_my_organization_post_configuration.rb index 7f5f69be1..5306826c6 100644 --- a/lib/auth0/types/client_my_organization_post_configuration.rb +++ b/lib/auth0/types/client_my_organization_post_configuration.rb @@ -15,6 +15,10 @@ class ClientMyOrganizationPostConfiguration < Internal::Types::Model field :connection_deletion_behavior, -> { Auth0::Types::ClientMyOrganizationDeletionBehaviorEnum }, optional: false, nullable: false field :invitation_landing_client_id, -> { String }, optional: true, nullable: false + + field :enforce_permission_ceiling, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :enforce_self_assignment_restriction, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/client_my_organization_response_configuration.rb b/lib/auth0/types/client_my_organization_response_configuration.rb index 4250392b2..597f61120 100644 --- a/lib/auth0/types/client_my_organization_response_configuration.rb +++ b/lib/auth0/types/client_my_organization_response_configuration.rb @@ -15,6 +15,10 @@ class ClientMyOrganizationResponseConfiguration < Internal::Types::Model field :connection_deletion_behavior, -> { Auth0::Types::ClientMyOrganizationDeletionBehaviorEnum }, optional: false, nullable: false field :invitation_landing_client_id, -> { String }, optional: true, nullable: false + + field :enforce_permission_ceiling, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :enforce_self_assignment_restriction, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/connection_identity_provider_enum.rb b/lib/auth0/types/connection_identity_provider_enum.rb index e8ac2eb37..8c0bbd2b5 100644 --- a/lib/auth0/types/connection_identity_provider_enum.rb +++ b/lib/auth0/types/connection_identity_provider_enum.rb @@ -61,23 +61,14 @@ module ConnectionIdentityProviderEnum YAHOO = "yahoo" YANDEX = "yandex" NOTION_MCP = "notion-mcp" - ASANA_MCP = "asana-mcp" - ATLASSIAN_MCP = "atlassian-mcp" + ASANA = "asana" + ATLASSIAN = "atlassian" CLOUDFLARE_MCP = "cloudflare-mcp" - DOCUSIGN_MCP = "docusign-mcp" - FIGMA_MCP = "figma-mcp" - GITLAB_MCP = "gitlab-mcp" - GUSTO_MCP = "gusto-mcp" - HEROKU_MCP = "heroku-mcp" + GITLAB = "gitlab" HUBSPOT_MCP = "hubspot-mcp" - INTERCOM_MCP = "intercom-mcp" LINEAR_MCP = "linear-mcp" - PAGERDUTY_MCP = "pagerduty-mcp" SENTRY_MCP = "sentry-mcp" - SLACK_MCP = "slack-mcp" - SUPABASE_MCP = "supabase-mcp" - VERCEL_MCP = "vercel-mcp" - XERO_MCP = "xero-mcp" + SLACK = "slack" end end end diff --git a/lib/auth0/types/connection_options_ad.rb b/lib/auth0/types/connection_options_ad.rb index f46ffb495..883c8ba0c 100644 --- a/lib/auth0/types/connection_options_ad.rb +++ b/lib/auth0/types/connection_options_ad.rb @@ -38,6 +38,8 @@ class ConnectionOptionsAd < Internal::Types::Model field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :upstream_params, -> { Internal::Types::Hash[String, Auth0::Types::ConnectionUpstreamAdditionalProperties] }, optional: true, nullable: false end end diff --git a/lib/auth0/types/connection_options_adfs.rb b/lib/auth0/types/connection_options_adfs.rb index d43f9b500..811f882da 100644 --- a/lib/auth0/types/connection_options_adfs.rb +++ b/lib/auth0/types/connection_options_adfs.rb @@ -28,6 +28,8 @@ class ConnectionOptionsAdfs < Internal::Types::Model field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :upstream_params, -> { Internal::Types::Hash[String, Auth0::Types::ConnectionUpstreamAdditionalProperties] }, optional: true, nullable: false field :user_id_attribute, -> { String }, optional: true, nullable: false diff --git a/lib/auth0/types/connection_options_azure_ad.rb b/lib/auth0/types/connection_options_azure_ad.rb index 78d9c8d76..aa2eef2d5 100644 --- a/lib/auth0/types/connection_options_azure_ad.rb +++ b/lib/auth0/types/connection_options_azure_ad.rb @@ -128,6 +128,8 @@ class ConnectionOptionsAzureAd < Internal::Types::Model field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :upstream_params, -> { Internal::Types::Hash[String, Auth0::Types::ConnectionUpstreamAdditionalProperties] }, optional: true, nullable: false field :use_wsfed, -> { Internal::Types::Boolean }, optional: true, nullable: false diff --git a/lib/auth0/types/connection_options_common_saml.rb b/lib/auth0/types/connection_options_common_saml.rb index c7170f887..aa877c21a 100644 --- a/lib/auth0/types/connection_options_common_saml.rb +++ b/lib/auth0/types/connection_options_common_saml.rb @@ -34,6 +34,8 @@ class ConnectionOptionsCommonSAML < Internal::Types::Model field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :upstream_params, -> { Internal::Types::Hash[String, Auth0::Types::ConnectionUpstreamAdditionalProperties] }, optional: true, nullable: false end end diff --git a/lib/auth0/types/connection_options_ping_federate.rb b/lib/auth0/types/connection_options_ping_federate.rb index 25f1852fc..94594ad8a 100644 --- a/lib/auth0/types/connection_options_ping_federate.rb +++ b/lib/auth0/types/connection_options_ping_federate.rb @@ -34,6 +34,8 @@ class ConnectionOptionsPingFederate < Internal::Types::Model field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :upstream_params, -> { Internal::Types::Hash[String, Auth0::Types::ConnectionUpstreamAdditionalProperties] }, optional: true, nullable: false field :non_persistent_attrs, -> { Internal::Types::Array[String] }, optional: true, nullable: false diff --git a/lib/auth0/types/connection_options_saml.rb b/lib/auth0/types/connection_options_saml.rb index c66584d9f..aa9fc82fb 100644 --- a/lib/auth0/types/connection_options_saml.rb +++ b/lib/auth0/types/connection_options_saml.rb @@ -34,6 +34,8 @@ class ConnectionOptionsSAML < Internal::Types::Model field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false + field :upstream_params, -> { Internal::Types::Hash[String, Auth0::Types::ConnectionUpstreamAdditionalProperties] }, optional: true, nullable: false field :non_persistent_attrs, -> { Internal::Types::Array[String] }, optional: true, nullable: false diff --git a/lib/auth0/types/connection_properties_options.rb b/lib/auth0/types/connection_properties_options.rb index 486bc53c0..ed5c22dee 100644 --- a/lib/auth0/types/connection_properties_options.rb +++ b/lib/auth0/types/connection_properties_options.rb @@ -87,6 +87,10 @@ class ConnectionPropertiesOptions < Internal::Types::Model field :discovery_url, -> { String }, optional: true, nullable: false field :oidc_metadata, -> { Auth0::Types::ConnectionsOidcMetadata }, optional: true, nullable: false + + field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/connection_strategy_enum.rb b/lib/auth0/types/connection_strategy_enum.rb index 3277fe674..8c3d5e577 100644 --- a/lib/auth0/types/connection_strategy_enum.rb +++ b/lib/auth0/types/connection_strategy_enum.rb @@ -61,23 +61,14 @@ module ConnectionStrategyEnum YAHOO = "yahoo" YANDEX = "yandex" NOTION_MCP = "notion-mcp" - ASANA_MCP = "asana-mcp" - ATLASSIAN_MCP = "atlassian-mcp" + ASANA = "asana" + ATLASSIAN = "atlassian" CLOUDFLARE_MCP = "cloudflare-mcp" - DOCUSIGN_MCP = "docusign-mcp" - FIGMA_MCP = "figma-mcp" - GITLAB_MCP = "gitlab-mcp" - GUSTO_MCP = "gusto-mcp" - HEROKU_MCP = "heroku-mcp" + GITLAB = "gitlab" HUBSPOT_MCP = "hubspot-mcp" - INTERCOM_MCP = "intercom-mcp" LINEAR_MCP = "linear-mcp" - PAGERDUTY_MCP = "pagerduty-mcp" SENTRY_MCP = "sentry-mcp" - SLACK_MCP = "slack-mcp" - SUPABASE_MCP = "supabase-mcp" - VERCEL_MCP = "vercel-mcp" - XERO_MCP = "xero-mcp" + SLACK = "slack" AUTH0ADLDAP = "auth0-adldap" end end diff --git a/lib/auth0/types/connection_thumbprints_sha384.rb b/lib/auth0/types/connection_thumbprints_sha384.rb new file mode 100644 index 000000000..1d8bd5f1e --- /dev/null +++ b/lib/auth0/types/connection_thumbprints_sha384.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ConnectionThumbprintsSha384 + # ConnectionThumbprintsSha384 is an alias for Array + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/auth0/types/connection_thumbprints_sha384ad.rb b/lib/auth0/types/connection_thumbprints_sha384ad.rb new file mode 100644 index 000000000..85a4d179e --- /dev/null +++ b/lib/auth0/types/connection_thumbprints_sha384ad.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ConnectionThumbprintsSha384Ad + # ConnectionThumbprintsSha384Ad is an alias for Array + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/auth0/types/connection_thumbprints_sha384saml.rb b/lib/auth0/types/connection_thumbprints_sha384saml.rb new file mode 100644 index 000000000..aca9d3984 --- /dev/null +++ b/lib/auth0/types/connection_thumbprints_sha384saml.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ConnectionThumbprintsSha384SAML + # ConnectionThumbprintsSha384SAML is an alias for Array + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/auth0/types/create_anonymous_sessions.rb b/lib/auth0/types/create_anonymous_sessions.rb new file mode 100644 index 000000000..cf12fb886 --- /dev/null +++ b/lib/auth0/types/create_anonymous_sessions.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Anonymous sessions configuration for this client. + class CreateAnonymousSessions < Internal::Types::Model + field :active, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/create_client_response_content.rb b/lib/auth0/types/create_client_response_content.rb index 10c12ec3d..21c3d2b4c 100644 --- a/lib/auth0/types/create_client_response_content.rb +++ b/lib/auth0/types/create_client_response_content.rb @@ -5,6 +5,10 @@ module Types class CreateClientResponseContent < Internal::Types::Model field :client_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: true, nullable: false + + field :updated_at, -> { String }, optional: true, nullable: false + field :tenant, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false @@ -117,6 +121,8 @@ class CreateClientResponseContent < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::IdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::AnonymousSessions }, optional: true, nullable: false + field :third_party_security_mode, -> { Auth0::Types::ClientThirdPartySecurityModeEnum }, optional: true, nullable: false field :redirection_policy, -> { Auth0::Types::ClientRedirectionPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/create_organization_all_connection_response_content.rb b/lib/auth0/types/create_organization_all_connection_response_content.rb index d856bc54e..7239fe4fb 100644 --- a/lib/auth0/types/create_organization_all_connection_response_content.rb +++ b/lib/auth0/types/create_organization_all_connection_response_content.rb @@ -13,6 +13,8 @@ class CreateOrganizationAllConnectionResponseContent < Internal::Types::Model field :organization_access_level, -> { Auth0::Types::OrganizationAccessLevelEnum }, optional: true, nullable: false + field :organization_member_access_level, -> { Auth0::Types::OrganizationMemberAccessLevelEnum }, optional: true, nullable: false + field :is_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :connection_id, -> { String }, optional: false, nullable: false diff --git a/lib/auth0/types/create_resource_server_response_content.rb b/lib/auth0/types/create_resource_server_response_content.rb index 7a95e3738..3dd0ca51f 100644 --- a/lib/auth0/types/create_resource_server_response_content.rb +++ b/lib/auth0/types/create_resource_server_response_content.rb @@ -31,8 +31,12 @@ class CreateResourceServerResponseContent < Internal::Types::Model field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectResponseEnum }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/get_client_response_content.rb b/lib/auth0/types/get_client_response_content.rb index 3568bb77e..5d8afc665 100644 --- a/lib/auth0/types/get_client_response_content.rb +++ b/lib/auth0/types/get_client_response_content.rb @@ -5,6 +5,10 @@ module Types class GetClientResponseContent < Internal::Types::Model field :client_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: true, nullable: false + + field :updated_at, -> { String }, optional: true, nullable: false + field :tenant, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false @@ -117,6 +121,8 @@ class GetClientResponseContent < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::IdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::AnonymousSessions }, optional: true, nullable: false + field :third_party_security_mode, -> { Auth0::Types::ClientThirdPartySecurityModeEnum }, optional: true, nullable: false field :redirection_policy, -> { Auth0::Types::ClientRedirectionPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/get_email_factor_settings_response_content.rb b/lib/auth0/types/get_email_factor_settings_response_content.rb new file mode 100644 index 000000000..db4bf6e38 --- /dev/null +++ b/lib/auth0/types/get_email_factor_settings_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class GetEmailFactorSettingsResponseContent < Internal::Types::Model + field :otp_length, -> { Integer }, optional: false, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/get_guardian_settings_response_content.rb b/lib/auth0/types/get_guardian_settings_response_content.rb new file mode 100644 index 000000000..0c31d369a --- /dev/null +++ b/lib/auth0/types/get_guardian_settings_response_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class GetGuardianSettingsResponseContent < Internal::Types::Model + field :display_remember_me_checkbox, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :remember_me_default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :mfa_session_inactivity_timeout, -> { Integer }, optional: false, nullable: false + + field :mfa_session_overall_timeout, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/get_organization_all_connection_response_content.rb b/lib/auth0/types/get_organization_all_connection_response_content.rb index 48d90511d..67c8472a9 100644 --- a/lib/auth0/types/get_organization_all_connection_response_content.rb +++ b/lib/auth0/types/get_organization_all_connection_response_content.rb @@ -13,6 +13,8 @@ class GetOrganizationAllConnectionResponseContent < Internal::Types::Model field :organization_access_level, -> { Auth0::Types::OrganizationAccessLevelEnum }, optional: true, nullable: false + field :organization_member_access_level, -> { Auth0::Types::OrganizationMemberAccessLevelEnum }, optional: true, nullable: false + field :is_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :connection_id, -> { String }, optional: false, nullable: false diff --git a/lib/auth0/types/get_phone_factor_settings_response_content.rb b/lib/auth0/types/get_phone_factor_settings_response_content.rb new file mode 100644 index 000000000..d844c7915 --- /dev/null +++ b/lib/auth0/types/get_phone_factor_settings_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class GetPhoneFactorSettingsResponseContent < Internal::Types::Model + field :otp_length, -> { Integer }, optional: false, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/get_resource_server_response_content.rb b/lib/auth0/types/get_resource_server_response_content.rb index 019e2c134..572e17e5a 100644 --- a/lib/auth0/types/get_resource_server_response_content.rb +++ b/lib/auth0/types/get_resource_server_response_content.rb @@ -31,8 +31,12 @@ class GetResourceServerResponseContent < Internal::Types::Model field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectResponseEnum }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/get_tenant_settings_response_content.rb b/lib/auth0/types/get_tenant_settings_response_content.rb index 5da17333a..4f009a1c9 100644 --- a/lib/auth0/types/get_tenant_settings_response_content.rb +++ b/lib/auth0/types/get_tenant_settings_response_content.rb @@ -47,6 +47,8 @@ class GetTenantSettingsResponseContent < Internal::Types::Model field :enabled_locales, -> { Internal::Types::Array[Auth0::Types::SupportedLocales] }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :security_headers, -> { Auth0::Types::TenantSettingsNullableSecurityHeaders }, optional: true, nullable: false field :session_cookie, -> { Auth0::Types::SessionCookieSchema }, optional: true, nullable: false diff --git a/lib/auth0/types/list_organization_templates_paginated_response_content.rb b/lib/auth0/types/list_organization_templates_paginated_response_content.rb deleted file mode 100644 index 9eb7526bc..000000000 --- a/lib/auth0/types/list_organization_templates_paginated_response_content.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module Types - class ListOrganizationTemplatesPaginatedResponseContent < Internal::Types::Model - field :next_, -> { String }, optional: true, nullable: false, api_name: "next" - - field :organization_templates, -> { Internal::Types::Array[Auth0::Types::OrganizationTemplate] }, optional: true, nullable: false - end - end -end diff --git a/lib/auth0/types/oauth_scope.rb b/lib/auth0/types/oauth_scope.rb index ba83e9a65..c4173d0e5 100644 --- a/lib/auth0/types/oauth_scope.rb +++ b/lib/auth0/types/oauth_scope.rb @@ -89,6 +89,7 @@ module OauthScope UPDATE_EVENT_STREAMS = "update:event_streams" DELETE_EVENT_STREAMS = "delete:event_streams" READ_EVENTS = "read:events" + UPDATE_EXPERIMENTATION = "update:experimentation" CREATE_FLOWS = "create:flows" READ_FLOWS = "read:flows" UPDATE_FLOWS = "update:flows" @@ -249,9 +250,7 @@ module OauthScope READ_ORGANIZATION_CLIENTS = "read:organization_clients" UPDATE_ORGANIZATION_CLIENTS = "update:organization_clients" DELETE_ORGANIZATION_CLIENTS = "delete:organization_clients" - CREATE_ORGANIZATION_TEMPLATES = "create:organization_templates" READ_ORGANIZATION_TEMPLATES = "read:organization_templates" - UPDATE_ORGANIZATION_TEMPLATES = "update:organization_templates" CREATE_NETWORK_ACL_KEYS = "create:network_acl_keys" READ_NETWORK_ACL_KEYS = "read:network_acl_keys" DELETE_NETWORK_ACL_KEYS = "delete:network_acl_keys" diff --git a/lib/auth0/types/organization_all_connection_post.rb b/lib/auth0/types/organization_all_connection_post.rb index f5aad5895..13497761a 100644 --- a/lib/auth0/types/organization_all_connection_post.rb +++ b/lib/auth0/types/organization_all_connection_post.rb @@ -13,6 +13,8 @@ class OrganizationAllConnectionPost < Internal::Types::Model field :organization_access_level, -> { Auth0::Types::OrganizationAccessLevelEnum }, optional: true, nullable: false + field :organization_member_access_level, -> { Auth0::Types::OrganizationMemberAccessLevelEnum }, optional: true, nullable: false + field :is_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :connection_id, -> { String }, optional: false, nullable: false diff --git a/lib/auth0/types/organization_member_access_level_enum.rb b/lib/auth0/types/organization_member_access_level_enum.rb new file mode 100644 index 000000000..b756a1122 --- /dev/null +++ b/lib/auth0/types/organization_member_access_level_enum.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module OrganizationMemberAccessLevelEnum + extend Auth0::Internal::Types::Enum + + NONE = "none" + READONLY = "readonly" + LIMITED = "limited" + FULL = "full" + end + end +end diff --git a/lib/auth0/types/organization_member_access_level_enum_with_null.rb b/lib/auth0/types/organization_member_access_level_enum_with_null.rb new file mode 100644 index 000000000..493cd6d44 --- /dev/null +++ b/lib/auth0/types/organization_member_access_level_enum_with_null.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module OrganizationMemberAccessLevelEnumWithNull + extend Auth0::Internal::Types::Enum + + NONE = "none" + READONLY = "readonly" + LIMITED = "limited" + FULL = "full" + end + end +end diff --git a/lib/auth0/types/organization_sort_field_enum.rb b/lib/auth0/types/organization_sort_field_enum.rb new file mode 100644 index 000000000..c6d989154 --- /dev/null +++ b/lib/auth0/types/organization_sort_field_enum.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module OrganizationSortFieldEnum + extend Auth0::Internal::Types::Enum + + NAME = "name" + DISPLAY_NAME = "display_name" + CREATED_AT = "created_at" + end + end +end diff --git a/lib/auth0/types/organization_template_assigned_organization.rb b/lib/auth0/types/organization_template_assigned_organization.rb deleted file mode 100644 index 19612b10b..000000000 --- a/lib/auth0/types/organization_template_assigned_organization.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -module Auth0 - module Types - # An organization assigned to the template. - class OrganizationTemplateAssignedOrganization < Internal::Types::Model - field :id, -> { String }, optional: false, nullable: false - end - end -end diff --git a/lib/auth0/types/resource_server.rb b/lib/auth0/types/resource_server.rb index 5e5b18251..981acc1e6 100644 --- a/lib/auth0/types/resource_server.rb +++ b/lib/auth0/types/resource_server.rb @@ -31,8 +31,12 @@ class ResourceServer < Internal::Types::Model field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectResponseEnum }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/resource_server_access_token.rb b/lib/auth0/types/resource_server_access_token.rb new file mode 100644 index 000000000..2f873d459 --- /dev/null +++ b/lib/auth0/types/resource_server_access_token.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Custom configuration for access tokens + class ResourceServerAccessToken < Internal::Types::Model + field :claims_mapping, -> { Auth0::Types::ResourceServerAccessTokenClaimsMapping }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/resource_server_access_token_claims_mapping.rb b/lib/auth0/types/resource_server_access_token_claims_mapping.rb new file mode 100644 index 000000000..142f3bdef --- /dev/null +++ b/lib/auth0/types/resource_server_access_token_claims_mapping.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Custom configuration for claims in access tokens + class ResourceServerAccessTokenClaimsMapping < Internal::Types::Model + field :custom_claims, -> { Internal::Types::Array[Auth0::Types::ResourceServerAccessTokenCustomClaimsMappingRule] }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb b/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb new file mode 100644 index 000000000..cd5020f07 --- /dev/null +++ b/lib/auth0/types/resource_server_access_token_custom_claims_mapping.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ResourceServerAccessTokenCustomClaimsMapping + # ResourceServerAccessTokenCustomClaimsMapping is an alias for Array + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb b/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb new file mode 100644 index 000000000..f5d0e45bc --- /dev/null +++ b/lib/auth0/types/resource_server_access_token_custom_claims_mapping_rule.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class ResourceServerAccessTokenCustomClaimsMappingRule < Internal::Types::Model + field :name, -> { String }, optional: false, nullable: false + + field :expression, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/resource_server_search_response.rb b/lib/auth0/types/resource_server_search_response.rb new file mode 100644 index 000000000..e1edf3e1e --- /dev/null +++ b/lib/auth0/types/resource_server_search_response.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class ResourceServerSearchResponse < Internal::Types::Model + field :id, -> { String }, optional: true, nullable: false + + field :name, -> { String }, optional: true, nullable: false + + field :is_system, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :identifier, -> { String }, optional: true, nullable: false + + field :scopes, -> { Internal::Types::Array[Auth0::Types::ResourceServerScope] }, optional: true, nullable: false + + field :signing_alg, -> { Auth0::Types::SigningAlgorithmEnum }, optional: true, nullable: false + + field :allow_offline_access, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :allow_online_access, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :allow_online_access_with_ephemeral_sessions, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :skip_consent_for_verifiable_first_party_clients, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :token_lifetime, -> { Integer }, optional: true, nullable: false + + field :token_lifetime_for_web, -> { Integer }, optional: true, nullable: false + + field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectResponseEnum }, optional: true, nullable: false + + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false + + field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false + + field :authorization_details, -> { Internal::Types::Array[Object] }, optional: true, nullable: false + + field :proof_of_possession, -> { Auth0::Types::ResourceServerProofOfPossession }, optional: true, nullable: false + + field :subject_type_authorization, -> { Auth0::Types::ResourceServerSubjectTypeAuthorization }, optional: true, nullable: false + + field :authorization_policy, -> { Auth0::Types::ResourceServerAuthorizationPolicy }, optional: true, nullable: false + + field :client_id, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/resource_server_sort_field_enum.rb b/lib/auth0/types/resource_server_sort_field_enum.rb new file mode 100644 index 000000000..9c10e08b9 --- /dev/null +++ b/lib/auth0/types/resource_server_sort_field_enum.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ResourceServerSortFieldEnum + extend Auth0::Internal::Types::Enum + + IDENTIFIER = "identifier" + NAME = "name" + UPDATED_AT = "updated_at" + end + end +end diff --git a/lib/auth0/types/resource_server_subject_type_authorization.rb b/lib/auth0/types/resource_server_subject_type_authorization.rb index 9d2210c36..7446f159a 100644 --- a/lib/auth0/types/resource_server_subject_type_authorization.rb +++ b/lib/auth0/types/resource_server_subject_type_authorization.rb @@ -7,6 +7,8 @@ class ResourceServerSubjectTypeAuthorization < Internal::Types::Model field :user, -> { Auth0::Types::ResourceServerSubjectTypeAuthorizationUser }, optional: true, nullable: false field :client, -> { Auth0::Types::ResourceServerSubjectTypeAuthorizationClient }, optional: true, nullable: false + + field :anonymous_user, -> { Auth0::Types::ResourceServerSubjectTypeAuthorizationAnonymousUser }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb b/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb new file mode 100644 index 000000000..3feeef83f --- /dev/null +++ b/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Access Permissions for anonymous user flows + class ResourceServerSubjectTypeAuthorizationAnonymousUser < Internal::Types::Model + field :policy, -> { Auth0::Types::ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb b/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb new file mode 100644 index 000000000..39015a2dc --- /dev/null +++ b/lib/auth0/types/resource_server_subject_type_authorization_anonymous_user_policy_enum.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ResourceServerSubjectTypeAuthorizationAnonymousUserPolicyEnum + extend Auth0::Internal::Types::Enum + + DENY_ALL = "deny_all" + REQUIRE_CLIENT_GRANT = "require_client_grant" + end + end +end diff --git a/lib/auth0/types/rotate_client_secret_response_content.rb b/lib/auth0/types/rotate_client_secret_response_content.rb index 6c806e9fa..1f6e78017 100644 --- a/lib/auth0/types/rotate_client_secret_response_content.rb +++ b/lib/auth0/types/rotate_client_secret_response_content.rb @@ -5,6 +5,10 @@ module Types class RotateClientSecretResponseContent < Internal::Types::Model field :client_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: true, nullable: false + + field :updated_at, -> { String }, optional: true, nullable: false + field :tenant, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false @@ -117,6 +121,8 @@ class RotateClientSecretResponseContent < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::IdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::AnonymousSessions }, optional: true, nullable: false + field :third_party_security_mode, -> { Auth0::Types::ClientThirdPartySecurityModeEnum }, optional: true, nullable: false field :redirection_policy, -> { Auth0::Types::ClientRedirectionPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/search_organization.rb b/lib/auth0/types/search_organization.rb new file mode 100644 index 000000000..aacc318db --- /dev/null +++ b/lib/auth0/types/search_organization.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class SearchOrganization < Internal::Types::Model + field :id, -> { String }, optional: true, nullable: false + + field :name, -> { String }, optional: true, nullable: false + + field :display_name, -> { String }, optional: true, nullable: false + + field :branding, -> { Auth0::Types::OrganizationBranding }, optional: true, nullable: false + + field :metadata, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false + + field :token_quota, -> { Auth0::Types::TokenQuota }, optional: true, nullable: false + + field :third_party_client_access, -> { Auth0::Types::OrganizationThirdPartyClientAccessEnum }, optional: true, nullable: false + + field :is_app_entitlement_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/list_template_organizations_paginated_response_content.rb b/lib/auth0/types/search_organizations_paginated_response_content.rb similarity index 57% rename from lib/auth0/types/list_template_organizations_paginated_response_content.rb rename to lib/auth0/types/search_organizations_paginated_response_content.rb index 596126dce..16d406681 100644 --- a/lib/auth0/types/list_template_organizations_paginated_response_content.rb +++ b/lib/auth0/types/search_organizations_paginated_response_content.rb @@ -2,10 +2,10 @@ module Auth0 module Types - class ListTemplateOrganizationsPaginatedResponseContent < Internal::Types::Model - field :next_, -> { String }, optional: true, nullable: false, api_name: "next" + class SearchOrganizationsPaginatedResponseContent < Internal::Types::Model + field :organizations, -> { Internal::Types::Array[Auth0::Types::SearchOrganization] }, optional: false, nullable: false - field :organizations, -> { Internal::Types::Array[Auth0::Types::OrganizationTemplateAssignedOrganization] }, optional: false, nullable: false + field :next_, -> { String }, optional: true, nullable: false, api_name: "next" end end end diff --git a/lib/auth0/types/search_parser_enum.rb b/lib/auth0/types/search_parser_enum.rb new file mode 100644 index 000000000..fc9b33995 --- /dev/null +++ b/lib/auth0/types/search_parser_enum.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module SearchParserEnum + extend Auth0::Internal::Types::Enum + + SCIM = "scim" + LUCENE = "lucene" + end + end +end diff --git a/lib/auth0/types/search_resource_servers_response_content.rb b/lib/auth0/types/search_resource_servers_response_content.rb new file mode 100644 index 000000000..ea47ea3d8 --- /dev/null +++ b/lib/auth0/types/search_resource_servers_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class SearchResourceServersResponseContent < Internal::Types::Model + field :resource_servers, -> { Internal::Types::Array[Auth0::Types::ResourceServerSearchResponse] }, optional: false, nullable: false + + field :next_, -> { String }, optional: true, nullable: false, api_name: "next" + end + end +end diff --git a/lib/auth0/types/set_email_factor_settings_response_content.rb b/lib/auth0/types/set_email_factor_settings_response_content.rb new file mode 100644 index 000000000..256ceadda --- /dev/null +++ b/lib/auth0/types/set_email_factor_settings_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class SetEmailFactorSettingsResponseContent < Internal::Types::Model + field :otp_length, -> { Integer }, optional: false, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/set_guardian_settings_response_content.rb b/lib/auth0/types/set_guardian_settings_response_content.rb new file mode 100644 index 000000000..866d74a9f --- /dev/null +++ b/lib/auth0/types/set_guardian_settings_response_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class SetGuardianSettingsResponseContent < Internal::Types::Model + field :display_remember_me_checkbox, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :remember_me_default_value, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :mfa_session_inactivity_timeout, -> { Integer }, optional: false, nullable: false + + field :mfa_session_overall_timeout, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/set_phone_factor_settings_response_content.rb b/lib/auth0/types/set_phone_factor_settings_response_content.rb new file mode 100644 index 000000000..adbb54956 --- /dev/null +++ b/lib/auth0/types/set_phone_factor_settings_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class SetPhoneFactorSettingsResponseContent < Internal::Types::Model + field :otp_length, -> { Integer }, optional: false, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/tenant_settings_sessions.rb b/lib/auth0/types/tenant_settings_sessions.rb index c72e718ef..cdd17d427 100644 --- a/lib/auth0/types/tenant_settings_sessions.rb +++ b/lib/auth0/types/tenant_settings_sessions.rb @@ -5,6 +5,8 @@ module Types # Sessions related settings for tenant class TenantSettingsSessions < Internal::Types::Model field :oidc_logout_prompt_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :anonymous, -> { Auth0::Types::TenantSettingsSessionsAnonymous }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/tenant_settings_sessions_anonymous.rb b/lib/auth0/types/tenant_settings_sessions_anonymous.rb new file mode 100644 index 000000000..caf70b108 --- /dev/null +++ b/lib/auth0/types/tenant_settings_sessions_anonymous.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Anonymous session settings for tenant. + class TenantSettingsSessionsAnonymous < Internal::Types::Model + field :lifetime_in_minutes, -> { Integer }, optional: true, nullable: false + + field :activate_cookie, -> { Internal::Types::Boolean }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/update_anonymous_sessions.rb b/lib/auth0/types/update_anonymous_sessions.rb new file mode 100644 index 000000000..1f9f5a0b5 --- /dev/null +++ b/lib/auth0/types/update_anonymous_sessions.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Anonymous sessions configuration for this client. + class UpdateAnonymousSessions < Internal::Types::Model + field :active, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/update_client_response_content.rb b/lib/auth0/types/update_client_response_content.rb index 57aa63960..677ec789c 100644 --- a/lib/auth0/types/update_client_response_content.rb +++ b/lib/auth0/types/update_client_response_content.rb @@ -5,6 +5,10 @@ module Types class UpdateClientResponseContent < Internal::Types::Model field :client_id, -> { String }, optional: true, nullable: false + field :created_at, -> { String }, optional: true, nullable: false + + field :updated_at, -> { String }, optional: true, nullable: false + field :tenant, -> { String }, optional: true, nullable: false field :name, -> { String }, optional: true, nullable: false @@ -117,6 +121,8 @@ class UpdateClientResponseContent < Internal::Types::Model field :identity_assertion_authorization_grant, -> { Auth0::Types::IdentityAssertionAuthorizationGrant }, optional: true, nullable: false + field :anonymous_sessions, -> { Auth0::Types::AnonymousSessions }, optional: true, nullable: false + field :third_party_security_mode, -> { Auth0::Types::ClientThirdPartySecurityModeEnum }, optional: true, nullable: false field :redirection_policy, -> { Auth0::Types::ClientRedirectionPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/update_connection_options.rb b/lib/auth0/types/update_connection_options.rb index 2fc1ae6c7..160bcc497 100644 --- a/lib/auth0/types/update_connection_options.rb +++ b/lib/auth0/types/update_connection_options.rb @@ -90,6 +90,10 @@ class UpdateConnectionOptions < Internal::Types::Model field :discovery_url, -> { String }, optional: true, nullable: false field :oidc_metadata, -> { Auth0::Types::ConnectionsOidcMetadata }, optional: true, nullable: false + + field :thumbprints, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :thumbprints_sha384, -> { Internal::Types::Array[String] }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/update_organization_all_connection_response_content.rb b/lib/auth0/types/update_organization_all_connection_response_content.rb index 6ab2aeda9..2f6b8b1de 100644 --- a/lib/auth0/types/update_organization_all_connection_response_content.rb +++ b/lib/auth0/types/update_organization_all_connection_response_content.rb @@ -13,6 +13,8 @@ class UpdateOrganizationAllConnectionResponseContent < Internal::Types::Model field :organization_access_level, -> { Auth0::Types::OrganizationAccessLevelEnum }, optional: true, nullable: false + field :organization_member_access_level, -> { Auth0::Types::OrganizationMemberAccessLevelEnum }, optional: true, nullable: false + field :is_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false field :connection_id, -> { String }, optional: false, nullable: false diff --git a/lib/auth0/types/update_resource_server_response_content.rb b/lib/auth0/types/update_resource_server_response_content.rb index 4f0d72fe3..8be63269d 100644 --- a/lib/auth0/types/update_resource_server_response_content.rb +++ b/lib/auth0/types/update_resource_server_response_content.rb @@ -31,8 +31,12 @@ class UpdateResourceServerResponseContent < Internal::Types::Model field :enforce_policies, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :token_lifetime_for_anonymous_access_tokens, -> { Integer }, optional: true, nullable: false + field :token_dialect, -> { Auth0::Types::ResourceServerTokenDialectResponseEnum }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :token_encryption, -> { Auth0::Types::ResourceServerTokenEncryption }, optional: true, nullable: false field :consent_policy, -> { Auth0::Types::ResourceServerConsentPolicyEnum }, optional: true, nullable: false diff --git a/lib/auth0/types/update_tenant_settings_response_content.rb b/lib/auth0/types/update_tenant_settings_response_content.rb index 9f0000a9c..ba297a7f0 100644 --- a/lib/auth0/types/update_tenant_settings_response_content.rb +++ b/lib/auth0/types/update_tenant_settings_response_content.rb @@ -47,6 +47,8 @@ class UpdateTenantSettingsResponseContent < Internal::Types::Model field :enabled_locales, -> { Internal::Types::Array[Auth0::Types::SupportedLocales] }, optional: true, nullable: false + field :access_token, -> { Auth0::Types::ResourceServerAccessToken }, optional: true, nullable: false + field :security_headers, -> { Auth0::Types::TenantSettingsNullableSecurityHeaders }, optional: true, nullable: false field :session_cookie, -> { Auth0::Types::SessionCookieSchema }, optional: true, nullable: false diff --git a/lib/auth0/user_attribute_profiles/client.rb b/lib/auth0/user_attribute_profiles/client.rb index 725272f59..45a543aa4 100644 --- a/lib/auth0/user_attribute_profiles/client.rb +++ b/lib/auth0/user_attribute_profiles/client.rb @@ -22,6 +22,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.user_attribute_profiles.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListUserAttributeProfilesPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -49,7 +55,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserAttributeProfilesPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserAttributeProfilesPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -68,6 +74,19 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.user_attribute_profiles.create( + # name: "name", + # user_attributes: { + # key: { + # description: "description", + # label: "label", + # profile_required: true, + # auth0mapping: "auth0_mapping" + # } + # } + # ) + # # @return [Auth0::Types::CreateUserAttributeProfileResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -85,7 +104,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateUserAttributeProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateUserAttributeProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -102,6 +121,9 @@ def create(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.user_attribute_profiles.list_templates + # # @return [Auth0::Types::ListUserAttributeProfileTemplateResponseContent] def list_templates(request_options: {}, **_params) request = Auth0::Internal::JSON::Request.new( @@ -117,7 +139,7 @@ def list_templates(request_options: {}, **_params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListUserAttributeProfileTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListUserAttributeProfileTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -135,6 +157,9 @@ def list_templates(request_options: {}, **_params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.user_attribute_profiles.get_template(id: "id") + # # @return [Auth0::Types::GetUserAttributeProfileTemplateResponseContent] def get_template(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -151,7 +176,7 @@ def get_template(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetUserAttributeProfileTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetUserAttributeProfileTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -169,6 +194,9 @@ def get_template(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.user_attribute_profiles.get(id: "id") + # # @return [Auth0::Types::GetUserAttributeProfileResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -185,7 +213,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetUserAttributeProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetUserAttributeProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -203,6 +231,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.user_attribute_profiles.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -235,6 +266,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.user_attribute_profiles.update(id: "id") + # # @return [Auth0::Types::UpdateUserAttributeProfileResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -256,7 +290,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateUserAttributeProfileResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateUserAttributeProfileResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/user_blocks/client.rb b/lib/auth0/user_blocks/client.rb index 5f3e111b6..03047f949 100644 --- a/lib/auth0/user_blocks/client.rb +++ b/lib/auth0/user_blocks/client.rb @@ -24,6 +24,12 @@ def initialize(client:) # @option params [String] :identifier # @option params [Boolean, nil] :consider_brute_force_enablement # + # @example + # client.user_blocks.list_by_identifier( + # identifier: "identifier", + # consider_brute_force_enablement: true + # ) + # # @return [Auth0::Types::ListUserBlocksByIdentifierResponseContent] def list_by_identifier(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -45,7 +51,7 @@ def list_by_identifier(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListUserBlocksByIdentifierResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListUserBlocksByIdentifierResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -67,6 +73,9 @@ def list_by_identifier(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :identifier # + # @example + # client.user_blocks.delete_by_identifier(identifier: "identifier") + # # @return [untyped] def delete_by_identifier(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -106,6 +115,12 @@ def delete_by_identifier(request_options: {}, **params) # @option params [String] :id # @option params [Boolean, nil] :consider_brute_force_enablement # + # @example + # client.user_blocks.list( + # id: "id", + # consider_brute_force_enablement: true + # ) + # # @return [Auth0::Types::ListUserBlocksResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -126,7 +141,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::ListUserBlocksResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::ListUserBlocksResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -148,6 +163,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.user_blocks.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/user_grants/client.rb b/lib/auth0/user_grants/client.rb index 7ad578921..1d35fc535 100644 --- a/lib/auth0/user_grants/client.rb +++ b/lib/auth0/user_grants/client.rb @@ -26,6 +26,16 @@ def initialize(client:) # @option params [String, nil] :client_id # @option params [String, nil] :audience # + # @example + # client.user_grants.list( + # per_page: 1, + # page: 1, + # include_totals: true, + # user_id: "user_id", + # client_id: "client_id", + # audience: "audience" + # ) + # # @return [Auth0::Types::ListUserGrantsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,7 +68,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserGrantsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserGrantsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -78,6 +88,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id # + # @example + # client.user_grants.delete_by_user_id(user_id: "user_id") + # # @return [untyped] def delete_by_user_id(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -114,6 +127,9 @@ def delete_by_user_id(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.user_grants.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/authentication_methods/client.rb b/lib/auth0/users/authentication_methods/client.rb index 40fe8fc6e..667aee656 100644 --- a/lib/auth0/users/authentication_methods/client.rb +++ b/lib/auth0/users/authentication_methods/client.rb @@ -25,6 +25,14 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.users.authentication_methods.list( + # id: "id", + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListUserAuthenticationMethodsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -54,7 +62,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserAuthenticationMethodsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserAuthenticationMethodsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -75,6 +83,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.authentication_methods.create( + # id: "id", + # type: "phone" + # ) + # # @return [Auth0::Types::CreateUserAuthenticationMethodResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -96,7 +110,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateUserAuthenticationMethodResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateUserAuthenticationMethodResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -119,14 +133,25 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.authentication_methods.set( + # id: "id", + # request: [{ + # type: "phone" + # }] + # ) + # # @return [Array[Auth0::Types::SetUserAuthenticationMethodResponseContent]] def set(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) + path_param_names = %i[id] + body_params = params.except(*path_param_names) + request = Auth0::Internal::JSON::Request.new( base_url: request_options[:base_url], method: "PUT", path: "users/#{URI.encode_uri_component(params[:id].to_s)}/authentication-methods", - body: params, + body: body_params, request_options: request_options ) begin @@ -135,10 +160,12 @@ def set(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::SetUserAuthenticationMethodResponseContent], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action @@ -153,6 +180,9 @@ def set(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.authentication_methods.delete_all(id: "id") + # # @return [untyped] def delete_all(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -184,6 +214,12 @@ def delete_all(request_options: {}, **params) # @option params [String] :id # @option params [String] :authentication_method_id # + # @example + # client.users.authentication_methods.get( + # id: "id", + # authentication_method_id: "authentication_method_id" + # ) + # # @return [Auth0::Types::GetUserAuthenticationMethodResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -200,7 +236,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetUserAuthenticationMethodResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetUserAuthenticationMethodResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -221,6 +257,12 @@ def get(request_options: {}, **params) # @option params [String] :id # @option params [String] :authentication_method_id # + # @example + # client.users.authentication_methods.delete( + # id: "id", + # authentication_method_id: "authentication_method_id" + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -256,6 +298,12 @@ def delete(request_options: {}, **params) # @option params [String] :id # @option params [String] :authentication_method_id # + # @example + # client.users.authentication_methods.update( + # id: "id", + # authentication_method_id: "authentication_method_id" + # ) + # # @return [Auth0::Types::UpdateUserAuthenticationMethodResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -277,7 +325,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateUserAuthenticationMethodResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateUserAuthenticationMethodResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/users/authenticators/client.rb b/lib/auth0/users/authenticators/client.rb index 2b3ebb47b..0f53f078a 100644 --- a/lib/auth0/users/authenticators/client.rb +++ b/lib/auth0/users/authenticators/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.authenticators.delete_all(id: "id") + # # @return [untyped] def delete_all(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/client.rb b/lib/auth0/users/client.rb index 56f3a9584..3afff4b67 100644 --- a/lib/auth0/users/client.rb +++ b/lib/auth0/users/client.rb @@ -51,6 +51,20 @@ def initialize(client:) # @option params [Auth0::Types::SearchEngineVersionsEnum, nil] :search_engine # @option params [Boolean, nil] :primary_order # + # @example + # client.users.list( + # page: 1, + # per_page: 1, + # include_totals: true, + # sort: "sort", + # connection: "connection", + # fields: "fields", + # include_fields: true, + # q: "q", + # search_engine: "v1", + # primary_order: true + # ) + # # @return [Auth0::Types::ListUsersOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -87,7 +101,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUsersOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUsersOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -110,6 +124,9 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.users.create(connection: "connection") + # # @return [Auth0::Types::CreateUserResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -127,7 +144,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateUserResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateUserResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -154,6 +171,13 @@ def create(request_options: {}, **params) # @option params [Boolean, nil] :include_fields # @option params [String] :email # + # @example + # client.users.list_users_by_email( + # fields: "fields", + # include_fields: true, + # email: "email" + # ) + # # @return [Array[Auth0::Types::UserResponseSchema]] def list_users_by_email(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -175,10 +199,12 @@ def list_users_by_email(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UserResponseSchema], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see @@ -196,6 +222,13 @@ def list_users_by_email(request_options: {}, **params) # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields # + # @example + # client.users.get( + # id: "id", + # fields: "fields", + # include_fields: true + # ) + # # @return [Auth0::Types::GetUserResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -217,7 +250,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetUserResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetUserResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -236,6 +269,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -364,6 +400,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.update(id: "id") + # # @return [Auth0::Types::UpdateUserResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -385,7 +424,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateUserResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateUserResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -406,6 +445,9 @@ def update(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.regenerate_recovery_code(id: "id") + # # @return [Auth0::Types::RegenerateUsersRecoveryCodeResponseContent] def regenerate_recovery_code(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -422,7 +464,7 @@ def regenerate_recovery_code(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::RegenerateUsersRecoveryCodeResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::RegenerateUsersRecoveryCodeResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -440,6 +482,9 @@ def regenerate_recovery_code(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.revoke_access(id: "id") + # # @return [untyped] def revoke_access(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/connected_accounts/client.rb b/lib/auth0/users/connected_accounts/client.rb index 2af49f74d..77eebd87b 100644 --- a/lib/auth0/users/connected_accounts/client.rb +++ b/lib/auth0/users/connected_accounts/client.rb @@ -24,6 +24,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.users.connected_accounts.list( + # id: "id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListUserConnectedAccountsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +58,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserConnectedAccountsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserConnectedAccountsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/effective_permissions/client.rb b/lib/auth0/users/effective_permissions/client.rb index 23173a116..3e95334e9 100644 --- a/lib/auth0/users/effective_permissions/client.rb +++ b/lib/auth0/users/effective_permissions/client.rb @@ -26,6 +26,14 @@ def initialize(client:) # @option params [Integer, nil] :take # @option params [String] :resource_server_identifier # + # @example + # client.users.effective_permissions.list( + # id: "id", + # from: "from", + # take: 1, + # resource_server_identifier: "resource_server_identifier" + # ) + # # @return [Auth0::Types::ListUserEffectivePermissionsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -54,7 +62,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserEffectivePermissionsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserEffectivePermissionsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/effective_permissions/sources/roles/client.rb b/lib/auth0/users/effective_permissions/sources/roles/client.rb index 0607cc3eb..eb39e640a 100644 --- a/lib/auth0/users/effective_permissions/sources/roles/client.rb +++ b/lib/auth0/users/effective_permissions/sources/roles/client.rb @@ -29,6 +29,15 @@ def initialize(client:) # @option params [String] :resource_server_identifier # @option params [String] :permission_name # + # @example + # client.users.effective_permissions.sources.roles.list( + # id: "id", + # from: "from", + # take: 1, + # resource_server_identifier: "resource_server_identifier", + # permission_name: "permission_name" + # ) + # # @return [Auth0::Types::ListUserEffectivePermissionRoleSourcesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -58,7 +67,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserEffectivePermissionRoleSourcesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserEffectivePermissionRoleSourcesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/effective_roles/client.rb b/lib/auth0/users/effective_roles/client.rb index fbcdaeb2d..f6a095e83 100644 --- a/lib/auth0/users/effective_roles/client.rb +++ b/lib/auth0/users/effective_roles/client.rb @@ -25,6 +25,13 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.users.effective_roles.list( + # id: "id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListUserEffectiveRolesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -52,7 +59,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserEffectiveRolesResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserEffectiveRolesResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/effective_roles/sources/groups/client.rb b/lib/auth0/users/effective_roles/sources/groups/client.rb index 6e6369c5a..04c521ee8 100644 --- a/lib/auth0/users/effective_roles/sources/groups/client.rb +++ b/lib/auth0/users/effective_roles/sources/groups/client.rb @@ -27,6 +27,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.users.effective_roles.sources.groups.list( + # id: "id", + # role_id: "role_id", + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListUserRoleSourceGroupsResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -55,7 +63,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserRoleSourceGroupsResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserRoleSourceGroupsResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/enrollments/client.rb b/lib/auth0/users/enrollments/client.rb index 752bdd6fa..849f6f649 100644 --- a/lib/auth0/users/enrollments/client.rb +++ b/lib/auth0/users/enrollments/client.rb @@ -24,6 +24,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.enrollments.get(id: "id") + # # @return [Array[Auth0::Types::UsersEnrollment]] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -39,10 +42,12 @@ def get(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UsersEnrollment], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end end end diff --git a/lib/auth0/users/groups/client.rb b/lib/auth0/users/groups/client.rb index 9302a5eb3..75e3b1657 100644 --- a/lib/auth0/users/groups/client.rb +++ b/lib/auth0/users/groups/client.rb @@ -27,6 +27,16 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.users.groups.get( + # id: "id", + # fields: "fields", + # include_fields: true, + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::GetUserGroupsPaginatedResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -57,7 +67,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::GetUserGroupsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::GetUserGroupsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/identities/client.rb b/lib/auth0/users/identities/client.rb index 349df52f8..cdb5d7329 100644 --- a/lib/auth0/users/identities/client.rb +++ b/lib/auth0/users/identities/client.rb @@ -55,6 +55,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.identities.link(id: "id") + # # @return [Array[Auth0::Types::UserIdentity]] def link(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -75,10 +78,12 @@ def link(request_options: {}, **params) raise Auth0::Errors::TimeoutError end code = response.code.to_i - return if code.between?(200, 299) - - error_class = Auth0::Errors::ResponseError.subclass_for_code(code) - raise error_class.new(response.body, code: code) + if code.between?(200, 299) + Auth0::Internal::Types::Utils.coerce(Internal::Types::Array[Auth0::Types::UserIdentity], (response.body.to_s.empty? ? nil : JSON.parse(response.body, symbolize_names: true))) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end end # Unlink a specific secondary account from a target user. This action requires the ID of both the target user @@ -99,6 +104,13 @@ def link(request_options: {}, **params) # @option params [Auth0::Types::UserIdentityProviderEnum] :provider # @option params [String] :user_id # + # @example + # client.users.identities.delete( + # id: "id", + # provider: "ad", + # user_id: "user_id" + # ) + # # @return [Array[Auth0::Types::DeleteUserIdentityResponseContentItem]] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -115,7 +127,7 @@ def delete(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::DeleteUserIdentityResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::DeleteUserIdentityResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/lib/auth0/users/logs/client.rb b/lib/auth0/users/logs/client.rb index 8f30ca04e..7cffe5280 100644 --- a/lib/auth0/users/logs/client.rb +++ b/lib/auth0/users/logs/client.rb @@ -36,6 +36,15 @@ def initialize(client:) # @option params [String, nil] :sort # @option params [Boolean, nil] :include_totals # + # @example + # client.users.logs.list( + # id: "id", + # page: 1, + # per_page: 1, + # sort: "sort", + # include_totals: true + # ) + # # @return [Auth0::Types::UserListLogOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -66,7 +75,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::UserListLogOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::UserListLogOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/multifactor/client.rb b/lib/auth0/users/multifactor/client.rb index 79587fc00..97ed242aa 100644 --- a/lib/auth0/users/multifactor/client.rb +++ b/lib/auth0/users/multifactor/client.rb @@ -23,6 +23,9 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.multifactor.invalidate_remember_browser(id: "id") + # # @return [untyped] def invalidate_remember_browser(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -57,6 +60,12 @@ def invalidate_remember_browser(request_options: {}, **params) # @option params [String] :id # @option params [Auth0::Types::UserMultifactorProviderEnum] :provider # + # @example + # client.users.multifactor.delete_provider( + # id: "id", + # provider: "duo" + # ) + # # @return [untyped] def delete_provider(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/organizations/client.rb b/lib/auth0/users/organizations/client.rb index 948c91fbc..ee15710c7 100644 --- a/lib/auth0/users/organizations/client.rb +++ b/lib/auth0/users/organizations/client.rb @@ -44,6 +44,14 @@ def initialize(client:) # @option params [Integer, nil] :per_page # @option params [Boolean, nil] :include_totals # + # @example + # client.users.organizations.list( + # id: "id", + # page: 1, + # per_page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListUserOrganizationsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -73,7 +81,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserOrganizationsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserOrganizationsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) diff --git a/lib/auth0/users/permissions/client.rb b/lib/auth0/users/permissions/client.rb index ac7872a28..3db3ba0fa 100644 --- a/lib/auth0/users/permissions/client.rb +++ b/lib/auth0/users/permissions/client.rb @@ -28,6 +28,14 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Boolean, nil] :include_totals # + # @example + # client.users.permissions.list( + # id: "id", + # per_page: 1, + # page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListUserPermissionsOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -57,7 +65,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserPermissionsOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserPermissionsOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -77,6 +85,15 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.permissions.create( + # id: "id", + # permissions: [{ + # resource_server_identifier: "resource_server_identifier", + # permission_name: "permission_name" + # }] + # ) + # # @return [untyped] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -114,6 +131,15 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.permissions.delete( + # id: "id", + # permissions: [{ + # resource_server_identifier: "resource_server_identifier", + # permission_name: "permission_name" + # }] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/refresh_token/client.rb b/lib/auth0/users/refresh_token/client.rb index f0cc97f5a..a14d1f8d5 100644 --- a/lib/auth0/users/refresh_token/client.rb +++ b/lib/auth0/users/refresh_token/client.rb @@ -25,6 +25,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.users.refresh_token.list( + # user_id: "user_id", + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListRefreshTokensPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +61,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListRefreshTokensPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListRefreshTokensPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -73,6 +81,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id # + # @example + # client.users.refresh_token.delete(user_id: "user_id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/risk_assessments/client.rb b/lib/auth0/users/risk_assessments/client.rb index 439d7f715..05ea445d4 100644 --- a/lib/auth0/users/risk_assessments/client.rb +++ b/lib/auth0/users/risk_assessments/client.rb @@ -22,6 +22,13 @@ def initialize(client:) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.risk_assessments.clear( + # id: "id", + # connection: "connection", + # assessors: ["new-device"] + # ) + # # @return [untyped] def clear(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/roles/client.rb b/lib/auth0/users/roles/client.rb index 1c430bf35..18db5e2a8 100644 --- a/lib/auth0/users/roles/client.rb +++ b/lib/auth0/users/roles/client.rb @@ -32,6 +32,14 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Boolean, nil] :include_totals # + # @example + # client.users.roles.list( + # id: "id", + # per_page: 1, + # page: 1, + # include_totals: true + # ) + # # @return [Auth0::Types::ListUserRolesOffsetPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -61,7 +69,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserRolesOffsetPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserRolesOffsetPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -87,6 +95,12 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.roles.assign( + # id: "id", + # roles: ["roles"] + # ) + # # @return [untyped] def assign(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -129,6 +143,12 @@ def assign(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.users.roles.delete( + # id: "id", + # roles: ["roles"] + # ) + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/users/sessions/client.rb b/lib/auth0/users/sessions/client.rb index 116b3fbbc..a919759df 100644 --- a/lib/auth0/users/sessions/client.rb +++ b/lib/auth0/users/sessions/client.rb @@ -25,6 +25,14 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.users.sessions.list( + # user_id: "user_id", + # include_totals: true, + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListUserSessionsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -53,7 +61,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListUserSessionsPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListUserSessionsPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -73,6 +81,9 @@ def list(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id # + # @example + # client.users.sessions.delete(user_id: "user_id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) diff --git a/lib/auth0/verifiable_credentials/verification/templates/client.rb b/lib/auth0/verifiable_credentials/verification/templates/client.rb index 41261ad14..58b040599 100644 --- a/lib/auth0/verifiable_credentials/verification/templates/client.rb +++ b/lib/auth0/verifiable_credentials/verification/templates/client.rb @@ -24,6 +24,12 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # + # @example + # client.verifiable_credentials.verification.templates.list( + # from: "from", + # take: 1 + # ) + # # @return [Auth0::Types::ListVerifiableCredentialTemplatesPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -51,7 +57,7 @@ def list(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - parsed_response = Auth0::Types::ListVerifiableCredentialTemplatesPaginatedResponseContent.load(response.body) + parsed_response = (response.body.to_s.empty? ? nil : Auth0::Types::ListVerifiableCredentialTemplatesPaginatedResponseContent.load(response.body)) [parsed_response, response] else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) @@ -70,6 +76,19 @@ def list(request_options: {}, **params) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # + # @example + # client.verifiable_credentials.verification.templates.create( + # name: "name", + # type: "type", + # dialect: "dialect", + # presentation: { + # org_iso1801351m_dl: { + # org_iso1801351: {} + # } + # }, + # well_known_trusted_issuers: "well_known_trusted_issuers" + # ) + # # @return [Auth0::Types::CreateVerifiableCredentialTemplateResponseContent] def create(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -87,7 +106,7 @@ def create(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::CreateVerifiableCredentialTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::CreateVerifiableCredentialTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -105,6 +124,9 @@ def create(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.verifiable_credentials.verification.templates.get(id: "id") + # # @return [Auth0::Types::GetVerifiableCredentialTemplateResponseContent] def get(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -121,7 +143,7 @@ def get(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::GetVerifiableCredentialTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::GetVerifiableCredentialTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) @@ -139,6 +161,9 @@ def get(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.verifiable_credentials.verification.templates.delete(id: "id") + # # @return [untyped] def delete(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -171,6 +196,9 @@ def delete(request_options: {}, **params) # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id # + # @example + # client.verifiable_credentials.verification.templates.update(id: "id") + # # @return [Auth0::Types::UpdateVerifiableCredentialTemplateResponseContent] def update(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) @@ -192,7 +220,7 @@ def update(request_options: {}, **params) end code = response.code.to_i if code.between?(200, 299) - Auth0::Types::UpdateVerifiableCredentialTemplateResponseContent.load(response.body) + (response.body.to_s.empty? ? nil : Auth0::Types::UpdateVerifiableCredentialTemplateResponseContent.load(response.body)) else error_class = Auth0::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) diff --git a/test/wire/experimentation_experiments_test.rb b/test/wire/experimentation_experiments_test.rb new file mode 100644 index 000000000..77fe5aefe --- /dev/null +++ b/test/wire/experimentation_experiments_test.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +require_relative "wiremock_test_case" + +class ExperimentationExperimentsWireTest < WireMockTestCase + def setup + super + + @client = Auth0::Management.new( + token: "", + base_url: WIREMOCK_BASE_URL + ) + end + + def test_experimentation_experiments_advance_ramp_with_wiremock + test_id = "experimentation.experiments.advance_ramp.0" + + @client.experimentation.experiments.advance_ramp( + id: "id", + target_level: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "experimentation.experiments.advance_ramp.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "POST", + url_path: "/experimentation/experiments/id/advance-ramp", + query_params: nil, + expected: 1 + ) + end +end diff --git a/test/wire/guardian_factors_email_test.rb b/test/wire/guardian_factors_email_test.rb new file mode 100644 index 000000000..9c253c796 --- /dev/null +++ b/test/wire/guardian_factors_email_test.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +require_relative "wiremock_test_case" + +class GuardianFactorsEmailWireTest < WireMockTestCase + def setup + super + + @client = Auth0::Management.new( + token: "", + base_url: WIREMOCK_BASE_URL + ) + end + + def test_guardian_factors_email_get_with_wiremock + test_id = "guardian.factors.email.get.0" + + @client.guardian.factors.email.get(request_options: { + additional_headers: { + "X-Test-Id" => "guardian.factors.email.get.0" + } + }) + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/guardian/factors/email/settings", + query_params: nil, + expected: 1 + ) + end + + def test_guardian_factors_email_set_with_wiremock + test_id = "guardian.factors.email.set.0" + + @client.guardian.factors.email.set( + otp_length: 1, + otp_expiration_time: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "guardian.factors.email.set.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "PUT", + url_path: "/guardian/factors/email/settings", + query_params: nil, + expected: 1 + ) + end +end diff --git a/test/wire/guardian_factors_phone_test.rb b/test/wire/guardian_factors_phone_test.rb index 77f990478..66b456e5b 100644 --- a/test/wire/guardian_factors_phone_test.rb +++ b/test/wire/guardian_factors_phone_test.rb @@ -126,6 +126,46 @@ def test_guardian_factors_phone_set_provider_with_wiremock ) end + def test_guardian_factors_phone_get_with_wiremock + test_id = "guardian.factors.phone.get.0" + + @client.guardian.factors.phone.get(request_options: { + additional_headers: { + "X-Test-Id" => "guardian.factors.phone.get.0" + } + }) + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/guardian/factors/phone/settings", + query_params: nil, + expected: 1 + ) + end + + def test_guardian_factors_phone_set_with_wiremock + test_id = "guardian.factors.phone.set.0" + + @client.guardian.factors.phone.set( + otp_length: 1, + otp_expiration_time: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "guardian.factors.phone.set.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "PUT", + url_path: "/guardian/factors/phone/settings", + query_params: nil, + expected: 1 + ) + end + def test_guardian_factors_phone_get_templates_with_wiremock test_id = "guardian.factors.phone.get_templates.0" diff --git a/test/wire/guardian_test.rb b/test/wire/guardian_test.rb new file mode 100644 index 000000000..bf6cbc0ab --- /dev/null +++ b/test/wire/guardian_test.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +require_relative "wiremock_test_case" + +class GuardianWireTest < WireMockTestCase + def setup + super + + @client = Auth0::Management.new( + token: "", + base_url: WIREMOCK_BASE_URL + ) + end + + def test_guardian_get_with_wiremock + test_id = "guardian.get.0" + + @client.guardian.get(request_options: { + additional_headers: { + "X-Test-Id" => "guardian.get.0" + } + }) + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/guardian/settings", + query_params: nil, + expected: 1 + ) + end + + def test_guardian_set_with_wiremock + test_id = "guardian.set.0" + + @client.guardian.set( + display_remember_me_checkbox: true, + remember_me_default_value: true, + mfa_session_inactivity_timeout: 1, + mfa_session_overall_timeout: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "guardian.set.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "PUT", + url_path: "/guardian/settings", + query_params: nil, + expected: 1 + ) + end +end diff --git a/test/wire/organization_templates_test.rb b/test/wire/organization_templates_test.rb deleted file mode 100644 index 0c23b7977..000000000 --- a/test/wire/organization_templates_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -require_relative "wiremock_test_case" - -class OrganizationTemplatesWireTest < WireMockTestCase - def setup - super - - @client = Auth0::Management.new( - token: "", - base_url: WIREMOCK_BASE_URL - ) - end - - def test_organization_templates_list_with_wiremock - test_id = "organization_templates.list.0" - - result = @client.organization_templates.list( - from: "from", - take: 1, - request_options: { - additional_headers: { - "X-Test-Id" => "organization_templates.list.0" - } - } - ) - result.pages.next_page - - verify_request_count( - test_id: test_id, - method: "GET", - url_path: "/organization-templates", - query_params: nil, - expected: 1 - ) - end - - def test_organization_templates_create_with_wiremock - test_id = "organization_templates.create.0" - - @client.organization_templates.create( - name: "name", - organization_deletion_behavior: "allow", - enforce_permission_ceiling: true, - enforce_self_assignment_restriction: true, - request_options: { - additional_headers: { - "X-Test-Id" => "organization_templates.create.0" - } - } - ) - - verify_request_count( - test_id: test_id, - method: "POST", - url_path: "/organization-templates", - query_params: nil, - expected: 1 - ) - end - - def test_organization_templates_get_with_wiremock - test_id = "organization_templates.get.0" - - @client.organization_templates.get( - id: "id", - request_options: { - additional_headers: { - "X-Test-Id" => "organization_templates.get.0" - } - } - ) - - verify_request_count( - test_id: test_id, - method: "GET", - url_path: "/organization-templates/id", - query_params: nil, - expected: 1 - ) - end - - def test_organization_templates_update_with_wiremock - test_id = "organization_templates.update.0" - - @client.organization_templates.update( - id: "id", - request_options: { - additional_headers: { - "X-Test-Id" => "organization_templates.update.0" - } - } - ) - - verify_request_count( - test_id: test_id, - method: "PATCH", - url_path: "/organization-templates/id", - query_params: nil, - expected: 1 - ) - end - - def test_organization_templates_list_organizations_with_wiremock - test_id = "organization_templates.list_organizations.0" - - result = @client.organization_templates.list_organizations( - id: "id", - from: "from", - take: 1, - request_options: { - additional_headers: { - "X-Test-Id" => "organization_templates.list_organizations.0" - } - } - ) - result.pages.next_page - - verify_request_count( - test_id: test_id, - method: "GET", - url_path: "/organization-templates/id/organizations", - query_params: nil, - expected: 1 - ) - end -end diff --git a/test/wire/organizations_test.rb b/test/wire/organizations_test.rb index d85f66d7c..d998ae8fb 100644 --- a/test/wire/organizations_test.rb +++ b/test/wire/organizations_test.rb @@ -80,6 +80,32 @@ def test_organizations_get_by_name_with_wiremock ) end + def test_organizations_search_with_wiremock + test_id = "organizations.search.0" + + result = @client.organizations.search( + q: "q", + parser: "scim", + take: 1, + from: "from", + sort: "name", + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.search.0" + } + } + ) + result.pages.next_page + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/organizations/search", + query_params: nil, + expected: 1 + ) + end + def test_organizations_get_with_wiremock test_id = "organizations.get.0" diff --git a/test/wire/resource_servers_test.rb b/test/wire/resource_servers_test.rb index 9fcc37187..f61fe209d 100644 --- a/test/wire/resource_servers_test.rb +++ b/test/wire/resource_servers_test.rb @@ -59,6 +59,34 @@ def test_resource_servers_create_with_wiremock ) end + def test_resource_servers_search_with_wiremock + test_id = "resource_servers.search.0" + + result = @client.resource_servers.search( + q: "q", + parser: "scim", + fields: "fields", + include_fields: true, + take: 1, + from: "from", + sort: "identifier", + request_options: { + additional_headers: { + "X-Test-Id" => "resource_servers.search.0" + } + } + ) + result.pages.next_page + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/resource-servers/search", + query_params: nil, + expected: 1 + ) + end + def test_resource_servers_get_with_wiremock test_id = "resource_servers.get.0" diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json index f4e74dd92..ac40146ab 100644 --- a/wiremock/wiremock-mappings.json +++ b/wiremock/wiremock-mappings.json @@ -753,7 +753,7 @@ }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"clients\": [\n {\n \"client_id\": \"client_id\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"grant_types\": [\n \"grant_types\"\n ],\n \"signing_keys\": [\n {}\n ],\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\"\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {}\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\"\n },\n \"my_organization_configuration\": {\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"connection_deletion_behavior\": \"allow\"\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"clients\": [\n {\n \"client_id\": \"client_id\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"grant_types\": [\n \"grant_types\"\n ],\n \"signing_keys\": [\n {}\n ],\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\"\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {}\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\"\n },\n \"my_organization_configuration\": {\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"connection_deletion_behavior\": \"allow\"\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"anonymous_sessions\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } @@ -785,7 +785,7 @@ }, "response": { "status": 201, - "body": "{\n \"client_id\": \"client_id\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\"\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", + "body": "{\n \"client_id\": \"client_id\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"anonymous_sessions\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", "headers": { "Content-Type": "application/json" } @@ -891,7 +891,7 @@ }, "response": { "status": 200, - "body": "{\n \"client_id\": \"client_id\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\"\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", + "body": "{\n \"client_id\": \"client_id\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"anonymous_sessions\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", "headers": { "Content-Type": "application/json" } @@ -963,7 +963,7 @@ }, "response": { "status": 200, - "body": "{\n \"client_id\": \"client_id\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\"\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", + "body": "{\n \"client_id\": \"client_id\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"anonymous_sessions\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", "headers": { "Content-Type": "application/json" } @@ -999,7 +999,7 @@ }, "response": { "status": 200, - "body": "{\n \"client_id\": \"client_id\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\"\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", + "body": "{\n \"client_id\": \"client_id\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"tenant\": \"tenant\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"global\": true,\n \"client_secret\": \"client_secret\",\n \"app_type\": \"native\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"oidc_conformant\": true,\n \"callbacks\": [\n \"callbacks\"\n ],\n \"allowed_origins\": [\n \"allowed_origins\"\n ],\n \"web_origins\": [\n \"web_origins\"\n ],\n \"client_aliases\": [\n \"client_aliases\"\n ],\n \"allowed_clients\": [\n \"allowed_clients\"\n ],\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_transfer\": {\n \"can_create_session_transfer_token\": true,\n \"enforce_cascade_revocation\": true,\n \"allowed_authentication_methods\": [\n \"cookie\"\n ],\n \"enforce_device_binding\": \"ip\",\n \"allow_refresh_token\": true,\n \"enforce_online_refresh_tokens\": true,\n \"delegation\": {\n \"allow_delegated_access\": true,\n \"enforce_device_binding\": \"ip\"\n }\n },\n \"oidc_logout\": {\n \"backchannel_logout_urls\": [\n \"backchannel_logout_urls\"\n ],\n \"backchannel_logout_initiators\": {\n \"mode\": \"custom\",\n \"selected_initiators\": [\n \"rp-logout\"\n ]\n },\n \"backchannel_logout_session_metadata\": {\n \"include\": true\n }\n },\n \"grant_types\": [\n \"grant_types\"\n ],\n \"jwt_configuration\": {\n \"lifetime_in_seconds\": 1,\n \"secret_encoded\": true,\n \"scopes\": {\n \"key\": \"value\"\n },\n \"alg\": \"HS256\"\n },\n \"signing_keys\": [\n {\n \"pkcs7\": \"pkcs7\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n }\n ],\n \"encryption_key\": {\n \"pub\": \"pub\",\n \"cert\": \"cert\",\n \"subject\": \"subject\"\n },\n \"sso\": true,\n \"sso_disabled\": true,\n \"cross_origin_authentication\": true,\n \"cross_origin_loc\": \"cross_origin_loc\",\n \"custom_login_page_on\": true,\n \"custom_login_page\": \"custom_login_page\",\n \"custom_login_page_preview\": \"custom_login_page_preview\",\n \"form_template\": \"form_template\",\n \"addons\": {\n \"aws\": {\n \"principal\": \"principal\",\n \"role\": \"role\",\n \"lifetime_in_seconds\": 1\n },\n \"azure_blob\": {\n \"accountName\": \"accountName\",\n \"storageAccessKey\": \"storageAccessKey\",\n \"containerName\": \"containerName\",\n \"blobName\": \"blobName\",\n \"expiration\": 1,\n \"signedIdentifier\": \"signedIdentifier\",\n \"blob_read\": true,\n \"blob_write\": true,\n \"blob_delete\": true,\n \"container_read\": true,\n \"container_write\": true,\n \"container_delete\": true,\n \"container_list\": true\n },\n \"azure_sb\": {\n \"namespace\": \"namespace\",\n \"sasKeyName\": \"sasKeyName\",\n \"sasKey\": \"sasKey\",\n \"entityPath\": \"entityPath\",\n \"expiration\": 1\n },\n \"rms\": {\n \"url\": \"url\"\n },\n \"mscrm\": {\n \"url\": \"url\"\n },\n \"slack\": {\n \"team\": \"team\"\n },\n \"sentry\": {\n \"org_slug\": \"org_slug\",\n \"base_url\": \"base_url\"\n },\n \"box\": {\n \"key\": \"value\"\n },\n \"cloudbees\": {\n \"key\": \"value\"\n },\n \"concur\": {\n \"key\": \"value\"\n },\n \"dropbox\": {\n \"key\": \"value\"\n },\n \"echosign\": {\n \"domain\": \"domain\"\n },\n \"egnyte\": {\n \"domain\": \"domain\"\n },\n \"firebase\": {\n \"secret\": \"secret\",\n \"private_key_id\": \"private_key_id\",\n \"private_key\": \"private_key\",\n \"client_email\": \"client_email\",\n \"lifetime_in_seconds\": 1\n },\n \"newrelic\": {\n \"account\": \"account\"\n },\n \"office365\": {\n \"domain\": \"domain\",\n \"connection\": \"connection\"\n },\n \"salesforce\": {\n \"entity_id\": \"entity_id\"\n },\n \"salesforce_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"salesforce_sandbox_api\": {\n \"clientid\": \"clientid\",\n \"principal\": \"principal\",\n \"communityName\": \"communityName\",\n \"community_url_section\": \"community_url_section\"\n },\n \"samlp\": {\n \"mappings\": {\n \"key\": \"value\"\n },\n \"audience\": \"audience\",\n \"recipient\": \"recipient\",\n \"createUpnClaim\": true,\n \"mapUnknownClaimsAsIs\": true,\n \"passthroughClaimsWithNoMapping\": true,\n \"mapIdentities\": true,\n \"signatureAlgorithm\": \"signatureAlgorithm\",\n \"digestAlgorithm\": \"digestAlgorithm\",\n \"issuer\": \"issuer\",\n \"destination\": \"destination\",\n \"lifetimeInSeconds\": 1,\n \"signResponse\": true,\n \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n \"nameIdentifierProbes\": [\n \"nameIdentifierProbes\"\n ],\n \"authnContextClassRef\": \"authnContextClassRef\"\n },\n \"layer\": {\n \"providerId\": \"providerId\",\n \"keyId\": \"keyId\",\n \"privateKey\": \"privateKey\",\n \"principal\": \"principal\",\n \"expiration\": 1\n },\n \"sap_api\": {\n \"clientid\": \"clientid\",\n \"usernameAttribute\": \"usernameAttribute\",\n \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n \"scope\": \"scope\",\n \"servicePassword\": \"servicePassword\",\n \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n },\n \"sharepoint\": {\n \"url\": \"url\",\n \"external_url\": [\n \"external_url\"\n ]\n },\n \"springcm\": {\n \"acsurl\": \"acsurl\"\n },\n \"wams\": {\n \"masterkey\": \"masterkey\"\n },\n \"wsfed\": {\n \"key\": \"value\"\n },\n \"zendesk\": {\n \"accountName\": \"accountName\"\n },\n \"zoom\": {\n \"account\": \"account\"\n },\n \"sso_integration\": {\n \"name\": \"name\",\n \"version\": \"version\"\n }\n },\n \"token_endpoint_auth_method\": \"none\",\n \"is_token_endpoint_ip_header_trusted\": true,\n \"client_metadata\": {\n \"key\": \"value\"\n },\n \"mobile\": {\n \"android\": {\n \"app_package_name\": \"app_package_name\",\n \"sha256_cert_fingerprints\": [\n \"sha256_cert_fingerprints\"\n ]\n },\n \"ios\": {\n \"team_id\": \"team_id\",\n \"app_bundle_identifier\": \"app_bundle_identifier\"\n }\n },\n \"initiate_login_uri\": \"initiate_login_uri\",\n \"native_social_login\": {\n \"apple\": {\n \"enabled\": true\n },\n \"facebook\": {\n \"enabled\": true\n },\n \"google\": {\n \"enabled\": true\n }\n },\n \"fedcm_login\": {\n \"google\": {\n \"is_enabled\": true\n }\n },\n \"refresh_token\": {\n \"rotation_type\": \"rotating\",\n \"expiration_type\": \"expiring\",\n \"leeway\": 1,\n \"token_lifetime\": 1,\n \"infinite_token_lifetime\": true,\n \"idle_token_lifetime\": 1,\n \"infinite_idle_token_lifetime\": true,\n \"policies\": [\n {\n \"audience\": \"audience\",\n \"scope\": [\n \"scope\"\n ]\n }\n ]\n },\n \"default_organization\": {\n \"organization_id\": \"organization_id\",\n \"flows\": [\n \"client_credentials\"\n ]\n },\n \"organization_usage\": \"deny\",\n \"organization_require_behavior\": \"no_prompt\",\n \"organization_discovery_methods\": [\n \"email\"\n ],\n \"client_authentication_methods\": {\n \"private_key_jwt\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"self_signed_tls_client_auth\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n }\n },\n \"require_pushed_authorization_requests\": true,\n \"require_proof_of_possession\": true,\n \"signed_request_object\": {\n \"required\": true,\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ]\n },\n \"token_vault_privileged_access\": {\n \"credentials\": [\n {\n \"id\": \"id\"\n }\n ],\n \"ip_allowlist\": [\n \"ip_allowlist\"\n ],\n \"grants\": [\n {\n \"connection\": \"connection\",\n \"scopes\": [\n \"scopes\"\n ]\n }\n ]\n },\n \"compliance_level\": \"none\",\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"token_exchange\": {\n \"allow_any_profile_of_type\": [\n \"custom_authentication\"\n ]\n },\n \"par_request_expiry\": 1,\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"express_configuration\": {\n \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"connection_profile_id\": \"connection_profile_id\",\n \"enable_client\": true,\n \"enable_organization\": true,\n \"linked_clients\": [\n {\n \"client_id\": \"client_id\"\n }\n ],\n \"okta_oin_client_id\": \"okta_oin_client_id\",\n \"admin_login_domain\": \"admin_login_domain\",\n \"oin_submission_id\": \"oin_submission_id\"\n },\n \"b2b_integration_configuration\": {\n \"sso_profiles\": [\n \"sso_profiles\"\n ],\n \"integration_type\": \"custom_auth_server\"\n },\n \"my_organization_configuration\": {\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"pingfederate\"\n ],\n \"third_party_client_access\": {\n \"default_value\": \"block\",\n \"allowed_values\": [\n \"allow\"\n ]\n },\n \"connection_deletion_behavior\": \"allow\",\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true\n },\n \"identity_assertion_authorization_grant\": {\n \"active\": true\n },\n \"anonymous_sessions\": {\n \"active\": true\n },\n \"third_party_security_mode\": \"strict\",\n \"redirection_policy\": \"allow_always\",\n \"resource_server_identifier\": \"resource_server_identifier\",\n \"async_approval_notification_channels\": [\n \"guardian-push\"\n ],\n \"external_metadata_type\": \"cimd\",\n \"external_metadata_created_by\": \"admin\",\n \"external_client_id\": \"external_client_id\",\n \"jwks_uri\": \"jwks_uri\"\n}", "headers": { "Content-Type": "application/json" } @@ -3007,6 +3007,69 @@ } } }, + { + "id": "030ba040-b4c7-4f3a-80f7-7fb0d0f518d4", + "name": "Get Guardian Settings - default", + "request": { + "urlPathTemplate": "/guardian/settings", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"display_remember_me_checkbox\": true,\n \"remember_me_default_value\": true,\n \"mfa_session_inactivity_timeout\": 1,\n \"mfa_session_overall_timeout\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "030ba040-b4c7-4f3a-80f7-7fb0d0f518d4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "907da77c-fa4a-45bc-ae41-5c52367c3a9b", + "name": "Set the Guardian Settings - default", + "request": { + "urlPathTemplate": "/guardian/settings", + "method": "PUT", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"display_remember_me_checkbox\": true,\n \"remember_me_default_value\": true,\n \"mfa_session_inactivity_timeout\": 1,\n \"mfa_session_overall_timeout\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "907da77c-fa4a-45bc-ae41-5c52367c3a9b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "8e59d144-ec26-4602-a30e-51471fa41a83", "name": "Get hooks - default", @@ -3720,10 +3783,10 @@ } }, { - "id": "8032ba05-4233-422f-87a0-dbe77dca80ed", - "name": "Get organization templates - default", + "id": "a4016e68-1c58-4a5c-b698-27ca350b937c", + "name": "Get organizations - default", "request": { - "urlPathTemplate": "/organization-templates", + "urlPathTemplate": "/organizations", "method": "GET", "headers": { "Authorization": { @@ -3731,22 +3794,31 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, "take": { "equalTo": "1" + }, + "sort": { + "equalTo": "sort" + }, + "include_client_association_for": { + "equalTo": "include_client_association_for" } } }, "response": { "status": 200, - "body": "{\n \"next\": \"next\",\n \"organization_templates\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_default\": true,\n \"organization_deletion_behavior\": \"allow\",\n \"connection_deletion_behavior\": \"allow\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true,\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"adfs\"\n ],\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"admin_roles_assignment\": [\n \"admin_roles_assignment\"\n ],\n \"use_for_organization_discovery\": {\n \"default_value\": true\n },\n \"role_visibility_policy\": {\n \"default_value\": \"write\"\n },\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n }\n ]\n}", + "body": "{\n \"next\": \"next\",\n \"organizations\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"token_quota\": {\n \"client_credentials\": {}\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true\n }\n ]\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "8032ba05-4233-422f-87a0-dbe77dca80ed", + "uuid": "a4016e68-1c58-4a5c-b698-27ca350b937c", "persistent": true, "priority": 3, "metadata": { @@ -3760,10 +3832,10 @@ "postServeActions": [] }, { - "id": "d0ef713b-3207-460d-8c96-60d152baf538", - "name": "Create an organization template - default", + "id": "61349de2-c20a-4002-822b-9ed84e87ca1f", + "name": "Create an Organization - default", "request": { - "urlPathTemplate": "/organization-templates", + "urlPathTemplate": "/organizations", "method": "POST", "headers": { "Authorization": { @@ -3773,12 +3845,12 @@ }, "response": { "status": 201, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_default\": true,\n \"organization_deletion_behavior\": \"allow\",\n \"connection_deletion_behavior\": \"allow\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true,\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"adfs\"\n ],\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"admin_roles_assignment\": [\n \"admin_roles_assignment\"\n ],\n \"use_for_organization_discovery\": {\n \"default_value\": true,\n \"allowed_values\": [\n true\n ]\n },\n \"role_visibility_policy\": {\n \"default_value\": \"write\",\n \"overrides\": [\n {\n \"role_id\": \"role_id\",\n \"access\": \"write\"\n }\n ]\n },\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"branding\": {\n \"logo_url\": \"logo_url\",\n \"colors\": {\n \"primary\": \"primary\",\n \"page_background\": \"page_background\"\n }\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true,\n \"client\": {\n \"use_for_member_access\": true\n },\n \"enabled_connections\": [\n {\n \"connection_id\": \"connection_id\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true\n }\n ]\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "d0ef713b-3207-460d-8c96-60d152baf538", + "uuid": "61349de2-c20a-4002-822b-9ed84e87ca1f", "persistent": true, "priority": 3, "metadata": { @@ -3791,10 +3863,10 @@ } }, { - "id": "96d95b7a-7269-4bdc-98df-28fb7c1d2c5a", - "name": "Get organization template - default", + "id": "dabd338a-8798-40ba-aaa0-8ce9b262b711", + "name": "Get organization by name - default", "request": { - "urlPathTemplate": "/organization-templates/{id}", + "urlPathTemplate": "/organizations/name/{name}", "method": "GET", "headers": { "Authorization": { @@ -3802,55 +3874,19 @@ } }, "pathParameters": { - "id": { - "equalTo": "id" - } - } - }, - "response": { - "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_default\": true,\n \"organization_deletion_behavior\": \"allow\",\n \"connection_deletion_behavior\": \"allow\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true,\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"adfs\"\n ],\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"admin_roles_assignment\": [\n \"admin_roles_assignment\"\n ],\n \"use_for_organization_discovery\": {\n \"default_value\": true,\n \"allowed_values\": [\n true\n ]\n },\n \"role_visibility_policy\": {\n \"default_value\": \"write\",\n \"overrides\": [\n {\n \"role_id\": \"role_id\",\n \"access\": \"write\"\n }\n ]\n },\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", - "headers": { - "Content-Type": "application/json" - } - }, - "uuid": "96d95b7a-7269-4bdc-98df-28fb7c1d2c5a", - "persistent": true, - "priority": 3, - "metadata": { - "mocklab": { - "created": { - "at": "2020-01-01T00:00:00.000Z", - "via": "SYSTEM" - } - } - } - }, - { - "id": "ef471896-6d56-4f21-99e3-8d4dcb359dde", - "name": "Modify an organization template - default", - "request": { - "urlPathTemplate": "/organization-templates/{id}", - "method": "PATCH", - "headers": { - "Authorization": { - "matches": "Bearer .+" - } - }, - "pathParameters": { - "id": { - "equalTo": "id" + "name": { + "equalTo": "name" } } }, "response": { "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_default\": true,\n \"organization_deletion_behavior\": \"allow\",\n \"connection_deletion_behavior\": \"allow\",\n \"enforce_permission_ceiling\": true,\n \"enforce_self_assignment_restriction\": true,\n \"connection_profile_id\": \"connection_profile_id\",\n \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n \"allowed_strategies\": [\n \"adfs\"\n ],\n \"invitation_landing_client_id\": \"invitation_landing_client_id\",\n \"admin_roles_assignment\": [\n \"admin_roles_assignment\"\n ],\n \"use_for_organization_discovery\": {\n \"default_value\": true,\n \"allowed_values\": [\n true\n ]\n },\n \"role_visibility_policy\": {\n \"default_value\": \"write\",\n \"overrides\": [\n {\n \"role_id\": \"role_id\",\n \"access\": \"write\"\n }\n ]\n },\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"branding\": {\n \"logo_url\": \"logo_url\",\n \"colors\": {\n \"primary\": \"primary\",\n \"page_background\": \"page_background\"\n }\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true,\n \"client\": {\n \"use_for_member_access\": true\n }\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "ef471896-6d56-4f21-99e3-8d4dcb359dde", + "uuid": "dabd338a-8798-40ba-aaa0-8ce9b262b711", "persistent": true, "priority": 3, "metadata": { @@ -3863,86 +3899,42 @@ } }, { - "id": "8efcf58a-7877-473d-89dd-b497be80ab92", - "name": "Get organizations assigned to a template - default", + "id": "649058a2-0c93-4131-92c0-7ce68e3716db", + "name": "Search organizations - default", "request": { - "urlPathTemplate": "/organization-templates/{id}/organizations", + "urlPathTemplate": "/organizations/search", "method": "GET", "headers": { "Authorization": { "matches": "Bearer .+" } }, - "pathParameters": { - "id": { - "equalTo": "id" - } - }, "queryParameters": { - "from": { - "equalTo": "from" + "q": { + "equalTo": "q" + }, + "parser": { + "equalTo": "scim" }, "take": { "equalTo": "1" - } - } - }, - "response": { - "status": 200, - "body": "{\n \"next\": \"next\",\n \"organizations\": [\n {\n \"id\": \"id\"\n }\n ]\n}", - "headers": { - "Content-Type": "application/json" - } - }, - "uuid": "8efcf58a-7877-473d-89dd-b497be80ab92", - "persistent": true, - "priority": 3, - "metadata": { - "mocklab": { - "created": { - "at": "2020-01-01T00:00:00.000Z", - "via": "SYSTEM" - } - } - } - }, - { - "id": "a4016e68-1c58-4a5c-b698-27ca350b937c", - "name": "Get organizations - default", - "request": { - "urlPathTemplate": "/organizations", - "method": "GET", - "headers": { - "Authorization": { - "matches": "Bearer .+" - } - }, - "queryParameters": { - "include_totals": { - "equalTo": "true" }, "from": { "equalTo": "from" }, - "take": { - "equalTo": "1" - }, "sort": { - "equalTo": "sort" - }, - "include_client_association_for": { - "equalTo": "include_client_association_for" + "equalTo": "name" } } }, "response": { "status": 200, - "body": "{\n \"next\": \"next\",\n \"organizations\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"token_quota\": {\n \"client_credentials\": {}\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true\n }\n ]\n}", + "body": "{\n \"organizations\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"token_quota\": {\n \"client_credentials\": {}\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true\n }\n ],\n \"next\": \"next\"\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "a4016e68-1c58-4a5c-b698-27ca350b937c", + "uuid": "649058a2-0c93-4131-92c0-7ce68e3716db", "persistent": true, "priority": 3, "metadata": { @@ -3955,73 +3947,6 @@ }, "postServeActions": [] }, - { - "id": "61349de2-c20a-4002-822b-9ed84e87ca1f", - "name": "Create an Organization - default", - "request": { - "urlPathTemplate": "/organizations", - "method": "POST", - "headers": { - "Authorization": { - "matches": "Bearer .+" - } - } - }, - "response": { - "status": 201, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"branding\": {\n \"logo_url\": \"logo_url\",\n \"colors\": {\n \"primary\": \"primary\",\n \"page_background\": \"page_background\"\n }\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true,\n \"client\": {\n \"use_for_member_access\": true\n },\n \"enabled_connections\": [\n {\n \"connection_id\": \"connection_id\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true\n }\n ]\n}", - "headers": { - "Content-Type": "application/json" - } - }, - "uuid": "61349de2-c20a-4002-822b-9ed84e87ca1f", - "persistent": true, - "priority": 3, - "metadata": { - "mocklab": { - "created": { - "at": "2020-01-01T00:00:00.000Z", - "via": "SYSTEM" - } - } - } - }, - { - "id": "dabd338a-8798-40ba-aaa0-8ce9b262b711", - "name": "Get organization by name - default", - "request": { - "urlPathTemplate": "/organizations/name/{name}", - "method": "GET", - "headers": { - "Authorization": { - "matches": "Bearer .+" - } - }, - "pathParameters": { - "name": { - "equalTo": "name" - } - } - }, - "response": { - "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"branding\": {\n \"logo_url\": \"logo_url\",\n \"colors\": {\n \"primary\": \"primary\",\n \"page_background\": \"page_background\"\n }\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1,\n \"per_hour\": 1\n }\n },\n \"third_party_client_access\": \"block\",\n \"is_app_entitlement_active\": true,\n \"client\": {\n \"use_for_member_access\": true\n }\n}", - "headers": { - "Content-Type": "application/json" - } - }, - "uuid": "dabd338a-8798-40ba-aaa0-8ce9b262b711", - "persistent": true, - "priority": 3, - "metadata": { - "mocklab": { - "created": { - "at": "2020-01-01T00:00:00.000Z", - "via": "SYSTEM" - } - } - } - }, { "id": "da7fe10b-f528-48cf-b4e0-8d769617a66c", "name": "Get organization - default", @@ -4607,7 +4532,7 @@ }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"resource_servers\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_dialect\": \"access_token\",\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"alg\": \"RSA-OAEP-256\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"resource_servers\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_lifetime_for_anonymous_access_tokens\": 1,\n \"token_dialect\": \"access_token\",\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"alg\": \"RSA-OAEP-256\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } @@ -4639,7 +4564,7 @@ }, "response": { "status": 201, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\",\n \"description\": \"description\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_dialect\": \"access_token\",\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"name\": \"name\",\n \"alg\": \"RSA-OAEP-256\",\n \"kid\": \"kid\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"authorization_details\": [\n {\n \"key\": \"value\"\n }\n ],\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true,\n \"required_for\": \"public_clients\"\n },\n \"subject_type_authorization\": {\n \"user\": {\n \"policy\": \"allow_all\"\n },\n \"client\": {\n \"policy\": \"deny_all\"\n }\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\",\n \"description\": \"description\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_lifetime_for_anonymous_access_tokens\": 1,\n \"token_dialect\": \"access_token\",\n \"access_token\": {\n \"claims_mapping\": {\n \"custom_claims\": [\n {\n \"name\": \"name\",\n \"expression\": \"expression\"\n }\n ]\n }\n },\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"name\": \"name\",\n \"alg\": \"RSA-OAEP-256\",\n \"kid\": \"kid\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"authorization_details\": [\n {\n \"key\": \"value\"\n }\n ],\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true,\n \"required_for\": \"public_clients\"\n },\n \"subject_type_authorization\": {\n \"user\": {\n \"policy\": \"allow_all\"\n },\n \"client\": {\n \"policy\": \"deny_all\"\n },\n \"anonymous_user\": {\n \"policy\": \"deny_all\"\n }\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n}", "headers": { "Content-Type": "application/json" } @@ -4656,6 +4581,61 @@ } } }, + { + "id": "d0cae775-80a1-4fdf-bda8-308cccbf3e2d", + "name": "Search resource servers - default", + "request": { + "urlPathTemplate": "/resource-servers/search", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "queryParameters": { + "q": { + "equalTo": "q" + }, + "parser": { + "equalTo": "scim" + }, + "fields": { + "equalTo": "fields" + }, + "include_fields": { + "equalTo": "true" + }, + "take": { + "equalTo": "1" + }, + "from": { + "equalTo": "from" + }, + "sort": { + "equalTo": "identifier" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"resource_servers\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_lifetime_for_anonymous_access_tokens\": 1,\n \"token_dialect\": \"access_token\",\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"alg\": \"RSA-OAEP-256\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n }\n ],\n \"next\": \"next\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d0cae775-80a1-4fdf-bda8-308cccbf3e2d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, { "id": "da399a32-c9a2-481c-9995-fc402c47f72a", "name": "Get a resource server - default", @@ -4680,7 +4660,7 @@ }, "response": { "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\",\n \"description\": \"description\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_dialect\": \"access_token\",\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"name\": \"name\",\n \"alg\": \"RSA-OAEP-256\",\n \"kid\": \"kid\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"authorization_details\": [\n {\n \"key\": \"value\"\n }\n ],\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true,\n \"required_for\": \"public_clients\"\n },\n \"subject_type_authorization\": {\n \"user\": {\n \"policy\": \"allow_all\"\n },\n \"client\": {\n \"policy\": \"deny_all\"\n }\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\",\n \"description\": \"description\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_lifetime_for_anonymous_access_tokens\": 1,\n \"token_dialect\": \"access_token\",\n \"access_token\": {\n \"claims_mapping\": {\n \"custom_claims\": [\n {\n \"name\": \"name\",\n \"expression\": \"expression\"\n }\n ]\n }\n },\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"name\": \"name\",\n \"alg\": \"RSA-OAEP-256\",\n \"kid\": \"kid\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"authorization_details\": [\n {\n \"key\": \"value\"\n }\n ],\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true,\n \"required_for\": \"public_clients\"\n },\n \"subject_type_authorization\": {\n \"user\": {\n \"policy\": \"allow_all\"\n },\n \"client\": {\n \"policy\": \"deny_all\"\n },\n \"anonymous_user\": {\n \"policy\": \"deny_all\"\n }\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n}", "headers": { "Content-Type": "application/json" } @@ -4752,7 +4732,7 @@ }, "response": { "status": 201, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\",\n \"description\": \"description\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_dialect\": \"access_token\",\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"name\": \"name\",\n \"alg\": \"RSA-OAEP-256\",\n \"kid\": \"kid\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"authorization_details\": [\n {\n \"key\": \"value\"\n }\n ],\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true,\n \"required_for\": \"public_clients\"\n },\n \"subject_type_authorization\": {\n \"user\": {\n \"policy\": \"allow_all\"\n },\n \"client\": {\n \"policy\": \"deny_all\"\n }\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"is_system\": true,\n \"identifier\": \"identifier\",\n \"scopes\": [\n {\n \"value\": \"value\",\n \"description\": \"description\"\n }\n ],\n \"signing_alg\": \"HS256\",\n \"signing_secret\": \"signing_secret\",\n \"allow_offline_access\": true,\n \"allow_online_access\": true,\n \"allow_online_access_with_ephemeral_sessions\": true,\n \"skip_consent_for_verifiable_first_party_clients\": true,\n \"token_lifetime\": 1,\n \"token_lifetime_for_web\": 1,\n \"enforce_policies\": true,\n \"token_lifetime_for_anonymous_access_tokens\": 1,\n \"token_dialect\": \"access_token\",\n \"access_token\": {\n \"claims_mapping\": {\n \"custom_claims\": [\n {\n \"name\": \"name\",\n \"expression\": \"expression\"\n }\n ]\n }\n },\n \"token_encryption\": {\n \"format\": \"compact-nested-jwe\",\n \"encryption_key\": {\n \"name\": \"name\",\n \"alg\": \"RSA-OAEP-256\",\n \"kid\": \"kid\",\n \"pem\": \"pem\"\n }\n },\n \"consent_policy\": \"transactional-authorization-with-mfa\",\n \"authorization_details\": [\n {\n \"key\": \"value\"\n }\n ],\n \"proof_of_possession\": {\n \"mechanism\": \"mtls\",\n \"required\": true,\n \"required_for\": \"public_clients\"\n },\n \"subject_type_authorization\": {\n \"user\": {\n \"policy\": \"allow_all\"\n },\n \"client\": {\n \"policy\": \"deny_all\"\n },\n \"anonymous_user\": {\n \"policy\": \"deny_all\"\n }\n },\n \"authorization_policy\": {\n \"policy_id\": \"policy_id\"\n },\n \"client_id\": \"client_id\"\n}", "headers": { "Content-Type": "application/json" } @@ -10081,6 +10061,42 @@ } } }, + { + "id": "82b4942b-e9d7-43ff-9167-27f89f0fb6e3", + "name": "Advance the rollout level of a ramp experiment. - default", + "request": { + "urlPathTemplate": "/experimentation/experiments/{id}/advance-ramp", + "method": "POST", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"experiment_id\": \"experiment_id\",\n \"from_level\": 1,\n \"to_level\": 1,\n \"current_level\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "82b4942b-e9d7-43ff-9167-27f89f0fb6e3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "62d121a4-93bc-4281-8659-06708ac8d781", "name": "Get flow executions - default", @@ -10797,6 +10813,69 @@ } } }, + { + "id": "42069ebb-c0f8-4cbd-9a08-c6006af4bdc2", + "name": "Get Email Factor Settings - default", + "request": { + "urlPathTemplate": "/guardian/factors/email/settings", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"otp_length\": 1,\n \"otp_expiration_time\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "42069ebb-c0f8-4cbd-9a08-c6006af4bdc2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "2e305645-5aea-4725-9542-96afbf858842", + "name": "Set the Email Factor Settings - default", + "request": { + "urlPathTemplate": "/guardian/factors/email/settings", + "method": "PUT", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"otp_length\": 1,\n \"otp_expiration_time\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2e305645-5aea-4725-9542-96afbf858842", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "ed435b3e-66b6-47b0-882f-08d926944cad", "name": "Get Enabled Phone Factors - default", @@ -10986,6 +11065,69 @@ } } }, + { + "id": "a1c996a2-8f68-4dd2-9497-e1fac204c099", + "name": "Get Phone Factor Settings - default", + "request": { + "urlPathTemplate": "/guardian/factors/phone/settings", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"otp_length\": 1,\n \"otp_expiration_time\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a1c996a2-8f68-4dd2-9497-e1fac204c099", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "d96e86d1-f45b-45a8-ac01-0c50ac8b829e", + "name": "Set the Phone Factor Settings - default", + "request": { + "urlPathTemplate": "/guardian/factors/phone/settings", + "method": "PUT", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"otp_length\": 1,\n \"otp_expiration_time\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d96e86d1-f45b-45a8-ac01-0c50ac8b829e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "0e83b2df-19bf-4909-b1c4-0522a7f929a3", "name": "Get Enrollment and Verification Phone Templates - default", @@ -12955,7 +13097,7 @@ }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"connections\": [\n {\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\"\n }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"connections\": [\n {\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"organization_member_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } @@ -12991,7 +13133,7 @@ }, "response": { "status": 201, - "body": "{\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\",\n \"connection\": {\n \"name\": \"name\",\n \"strategy\": \"strategy\"\n }\n}", + "body": "{\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"organization_member_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\",\n \"connection\": {\n \"name\": \"name\",\n \"strategy\": \"strategy\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -13030,7 +13172,7 @@ }, "response": { "status": 200, - "body": "{\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\",\n \"connection\": {\n \"name\": \"name\",\n \"strategy\": \"strategy\"\n }\n}", + "body": "{\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"organization_member_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\",\n \"connection\": {\n \"name\": \"name\",\n \"strategy\": \"strategy\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -13108,7 +13250,7 @@ }, "response": { "status": 200, - "body": "{\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\",\n \"connection\": {\n \"name\": \"name\",\n \"strategy\": \"strategy\"\n }\n}", + "body": "{\n \"organization_connection_name\": \"organization_connection_name\",\n \"assign_membership_on_login\": true,\n \"show_as_button\": true,\n \"is_signup_enabled\": true,\n \"organization_access_level\": \"none\",\n \"organization_member_access_level\": \"none\",\n \"is_enabled\": true,\n \"connection_id\": \"connection_id\",\n \"connection\": {\n \"name\": \"name\",\n \"strategy\": \"strategy\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -15414,7 +15556,7 @@ }, "response": { "status": 200, - "body": "{\n \"change_password\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"guardian_mfa_page\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"default_audience\": \"default_audience\",\n \"default_directory\": \"default_directory\",\n \"error_page\": {\n \"html\": \"html\",\n \"show_log_link\": true,\n \"url\": \"url\"\n },\n \"device_flow\": {\n \"charset\": \"base20\",\n \"mask\": \"mask\"\n },\n \"default_token_quota\": {\n \"clients\": {\n \"client_credentials\": {}\n },\n \"organizations\": {\n \"client_credentials\": {}\n }\n },\n \"flags\": {\n \"change_pwd_flow_v1\": true,\n \"enable_apis_section\": true,\n \"disable_impersonation\": true,\n \"enable_client_connections\": true,\n \"enable_pipeline2\": true,\n \"allow_legacy_delegation_grant_types\": true,\n \"allow_legacy_ro_grant_types\": true,\n \"allow_legacy_tokeninfo_endpoint\": true,\n \"enable_legacy_profile\": true,\n \"enable_idtoken_api2\": true,\n \"enable_public_signup_user_exists_error\": true,\n \"enable_sso\": true,\n \"allow_changing_enable_sso\": true,\n \"disable_clickjack_protection_headers\": true,\n \"no_disclose_enterprise_connections\": true,\n \"enforce_client_authentication_on_passwordless_start\": true,\n \"enable_adfs_waad_email_verification\": true,\n \"revoke_refresh_token_grant\": true,\n \"dashboard_log_streams_next\": true,\n \"dashboard_insights_view\": true,\n \"disable_fields_map_fix\": true,\n \"mfa_show_factor_list_on_enrollment\": true,\n \"remove_alg_from_jwks\": true,\n \"improved_signup_bot_detection_in_classic\": true,\n \"genai_trial\": true,\n \"local_resource_discovery\": true,\n \"enable_dynamic_client_registration\": true,\n \"disable_management_api_sms_obfuscation\": true,\n \"trust_azure_adfs_email_verified_connection_property\": true,\n \"custom_domains_provisioning\": true\n },\n \"friendly_name\": \"friendly_name\",\n \"picture_url\": \"picture_url\",\n \"support_email\": \"support_email\",\n \"support_url\": \"support_url\",\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_lifetime\": 1.1,\n \"idle_session_lifetime\": 1.1,\n \"ephemeral_session_lifetime\": 1.1,\n \"idle_ephemeral_session_lifetime\": 1.1,\n \"sandbox_version\": \"sandbox_version\",\n \"legacy_sandbox_version\": \"legacy_sandbox_version\",\n \"sandbox_versions_available\": [\n \"sandbox_versions_available\"\n ],\n \"default_redirection_uri\": \"default_redirection_uri\",\n \"enabled_locales\": [\n \"am\"\n ],\n \"security_headers\": {\n \"content_security_policy\": {\n \"enabled\": true,\n \"policies\": [\n {}\n ]\n },\n \"x_xss_protection\": {\n \"enabled\": true,\n \"mode\": \"block\",\n \"report_uri\": \"report_uri\"\n }\n },\n \"session_cookie\": {\n \"mode\": \"persistent\"\n },\n \"sessions\": {\n \"oidc_logout_prompt_enabled\": true\n },\n \"oidc_logout\": {\n \"rp_logout_end_session_endpoint_discovery\": true\n },\n \"allow_organization_name_in_authentication_api\": true,\n \"customize_mfa_in_postlogin_action\": true,\n \"acr_values_supported\": [\n \"acr_values_supported\"\n ],\n \"mtls\": {\n \"enable_endpoint_aliases\": true\n },\n \"pushed_authorization_requests_supported\": true,\n \"authorization_response_iss_parameter_supported\": true,\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"resource_parameter_profile\": \"audience\",\n \"client_id_metadata_document_supported\": true,\n \"phone_consolidated_experience\": true,\n \"enable_ai_guide\": true,\n \"include_session_metadata_in_tenant_logs\": true,\n \"dynamic_client_registration_security_mode\": \"strict\",\n \"country_codes\": {\n \"list\": [\n \"list\"\n ],\n \"mode\": \"allow\"\n }\n}", + "body": "{\n \"change_password\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"guardian_mfa_page\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"default_audience\": \"default_audience\",\n \"default_directory\": \"default_directory\",\n \"error_page\": {\n \"html\": \"html\",\n \"show_log_link\": true,\n \"url\": \"url\"\n },\n \"device_flow\": {\n \"charset\": \"base20\",\n \"mask\": \"mask\"\n },\n \"default_token_quota\": {\n \"clients\": {\n \"client_credentials\": {}\n },\n \"organizations\": {\n \"client_credentials\": {}\n }\n },\n \"flags\": {\n \"change_pwd_flow_v1\": true,\n \"enable_apis_section\": true,\n \"disable_impersonation\": true,\n \"enable_client_connections\": true,\n \"enable_pipeline2\": true,\n \"allow_legacy_delegation_grant_types\": true,\n \"allow_legacy_ro_grant_types\": true,\n \"allow_legacy_tokeninfo_endpoint\": true,\n \"enable_legacy_profile\": true,\n \"enable_idtoken_api2\": true,\n \"enable_public_signup_user_exists_error\": true,\n \"enable_sso\": true,\n \"allow_changing_enable_sso\": true,\n \"disable_clickjack_protection_headers\": true,\n \"no_disclose_enterprise_connections\": true,\n \"enforce_client_authentication_on_passwordless_start\": true,\n \"enable_adfs_waad_email_verification\": true,\n \"revoke_refresh_token_grant\": true,\n \"dashboard_log_streams_next\": true,\n \"dashboard_insights_view\": true,\n \"disable_fields_map_fix\": true,\n \"mfa_show_factor_list_on_enrollment\": true,\n \"remove_alg_from_jwks\": true,\n \"improved_signup_bot_detection_in_classic\": true,\n \"genai_trial\": true,\n \"local_resource_discovery\": true,\n \"enable_dynamic_client_registration\": true,\n \"disable_management_api_sms_obfuscation\": true,\n \"trust_azure_adfs_email_verified_connection_property\": true,\n \"custom_domains_provisioning\": true\n },\n \"friendly_name\": \"friendly_name\",\n \"picture_url\": \"picture_url\",\n \"support_email\": \"support_email\",\n \"support_url\": \"support_url\",\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_lifetime\": 1.1,\n \"idle_session_lifetime\": 1.1,\n \"ephemeral_session_lifetime\": 1.1,\n \"idle_ephemeral_session_lifetime\": 1.1,\n \"sandbox_version\": \"sandbox_version\",\n \"legacy_sandbox_version\": \"legacy_sandbox_version\",\n \"sandbox_versions_available\": [\n \"sandbox_versions_available\"\n ],\n \"default_redirection_uri\": \"default_redirection_uri\",\n \"enabled_locales\": [\n \"am\"\n ],\n \"access_token\": {\n \"claims_mapping\": {\n \"custom_claims\": [\n {\n \"name\": \"name\",\n \"expression\": \"expression\"\n }\n ]\n }\n },\n \"security_headers\": {\n \"content_security_policy\": {\n \"enabled\": true,\n \"policies\": [\n {}\n ]\n },\n \"x_xss_protection\": {\n \"enabled\": true,\n \"mode\": \"block\",\n \"report_uri\": \"report_uri\"\n }\n },\n \"session_cookie\": {\n \"mode\": \"persistent\"\n },\n \"sessions\": {\n \"oidc_logout_prompt_enabled\": true,\n \"anonymous\": {\n \"lifetime_in_minutes\": 1,\n \"activate_cookie\": true\n }\n },\n \"oidc_logout\": {\n \"rp_logout_end_session_endpoint_discovery\": true\n },\n \"allow_organization_name_in_authentication_api\": true,\n \"customize_mfa_in_postlogin_action\": true,\n \"acr_values_supported\": [\n \"acr_values_supported\"\n ],\n \"mtls\": {\n \"enable_endpoint_aliases\": true\n },\n \"pushed_authorization_requests_supported\": true,\n \"authorization_response_iss_parameter_supported\": true,\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"resource_parameter_profile\": \"audience\",\n \"client_id_metadata_document_supported\": true,\n \"phone_consolidated_experience\": true,\n \"enable_ai_guide\": true,\n \"include_session_metadata_in_tenant_logs\": true,\n \"dynamic_client_registration_security_mode\": \"strict\",\n \"country_codes\": {\n \"list\": [\n \"list\"\n ],\n \"mode\": \"allow\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -15446,7 +15588,7 @@ }, "response": { "status": 200, - "body": "{\n \"change_password\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"guardian_mfa_page\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"default_audience\": \"default_audience\",\n \"default_directory\": \"default_directory\",\n \"error_page\": {\n \"html\": \"html\",\n \"show_log_link\": true,\n \"url\": \"url\"\n },\n \"device_flow\": {\n \"charset\": \"base20\",\n \"mask\": \"mask\"\n },\n \"default_token_quota\": {\n \"clients\": {\n \"client_credentials\": {}\n },\n \"organizations\": {\n \"client_credentials\": {}\n }\n },\n \"flags\": {\n \"change_pwd_flow_v1\": true,\n \"enable_apis_section\": true,\n \"disable_impersonation\": true,\n \"enable_client_connections\": true,\n \"enable_pipeline2\": true,\n \"allow_legacy_delegation_grant_types\": true,\n \"allow_legacy_ro_grant_types\": true,\n \"allow_legacy_tokeninfo_endpoint\": true,\n \"enable_legacy_profile\": true,\n \"enable_idtoken_api2\": true,\n \"enable_public_signup_user_exists_error\": true,\n \"enable_sso\": true,\n \"allow_changing_enable_sso\": true,\n \"disable_clickjack_protection_headers\": true,\n \"no_disclose_enterprise_connections\": true,\n \"enforce_client_authentication_on_passwordless_start\": true,\n \"enable_adfs_waad_email_verification\": true,\n \"revoke_refresh_token_grant\": true,\n \"dashboard_log_streams_next\": true,\n \"dashboard_insights_view\": true,\n \"disable_fields_map_fix\": true,\n \"mfa_show_factor_list_on_enrollment\": true,\n \"remove_alg_from_jwks\": true,\n \"improved_signup_bot_detection_in_classic\": true,\n \"genai_trial\": true,\n \"local_resource_discovery\": true,\n \"enable_dynamic_client_registration\": true,\n \"disable_management_api_sms_obfuscation\": true,\n \"trust_azure_adfs_email_verified_connection_property\": true,\n \"custom_domains_provisioning\": true\n },\n \"friendly_name\": \"friendly_name\",\n \"picture_url\": \"picture_url\",\n \"support_email\": \"support_email\",\n \"support_url\": \"support_url\",\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_lifetime\": 1.1,\n \"idle_session_lifetime\": 1.1,\n \"ephemeral_session_lifetime\": 1.1,\n \"idle_ephemeral_session_lifetime\": 1.1,\n \"sandbox_version\": \"sandbox_version\",\n \"legacy_sandbox_version\": \"legacy_sandbox_version\",\n \"sandbox_versions_available\": [\n \"sandbox_versions_available\"\n ],\n \"default_redirection_uri\": \"default_redirection_uri\",\n \"enabled_locales\": [\n \"am\"\n ],\n \"security_headers\": {\n \"content_security_policy\": {\n \"enabled\": true,\n \"policies\": [\n {}\n ]\n },\n \"x_xss_protection\": {\n \"enabled\": true,\n \"mode\": \"block\",\n \"report_uri\": \"report_uri\"\n }\n },\n \"session_cookie\": {\n \"mode\": \"persistent\"\n },\n \"sessions\": {\n \"oidc_logout_prompt_enabled\": true\n },\n \"oidc_logout\": {\n \"rp_logout_end_session_endpoint_discovery\": true\n },\n \"allow_organization_name_in_authentication_api\": true,\n \"customize_mfa_in_postlogin_action\": true,\n \"acr_values_supported\": [\n \"acr_values_supported\"\n ],\n \"mtls\": {\n \"enable_endpoint_aliases\": true\n },\n \"pushed_authorization_requests_supported\": true,\n \"authorization_response_iss_parameter_supported\": true,\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"resource_parameter_profile\": \"audience\",\n \"client_id_metadata_document_supported\": true,\n \"phone_consolidated_experience\": true,\n \"enable_ai_guide\": true,\n \"include_session_metadata_in_tenant_logs\": true,\n \"dynamic_client_registration_security_mode\": \"strict\",\n \"country_codes\": {\n \"list\": [\n \"list\"\n ],\n \"mode\": \"allow\"\n }\n}", + "body": "{\n \"change_password\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"guardian_mfa_page\": {\n \"enabled\": true,\n \"html\": \"html\"\n },\n \"default_audience\": \"default_audience\",\n \"default_directory\": \"default_directory\",\n \"error_page\": {\n \"html\": \"html\",\n \"show_log_link\": true,\n \"url\": \"url\"\n },\n \"device_flow\": {\n \"charset\": \"base20\",\n \"mask\": \"mask\"\n },\n \"default_token_quota\": {\n \"clients\": {\n \"client_credentials\": {}\n },\n \"organizations\": {\n \"client_credentials\": {}\n }\n },\n \"flags\": {\n \"change_pwd_flow_v1\": true,\n \"enable_apis_section\": true,\n \"disable_impersonation\": true,\n \"enable_client_connections\": true,\n \"enable_pipeline2\": true,\n \"allow_legacy_delegation_grant_types\": true,\n \"allow_legacy_ro_grant_types\": true,\n \"allow_legacy_tokeninfo_endpoint\": true,\n \"enable_legacy_profile\": true,\n \"enable_idtoken_api2\": true,\n \"enable_public_signup_user_exists_error\": true,\n \"enable_sso\": true,\n \"allow_changing_enable_sso\": true,\n \"disable_clickjack_protection_headers\": true,\n \"no_disclose_enterprise_connections\": true,\n \"enforce_client_authentication_on_passwordless_start\": true,\n \"enable_adfs_waad_email_verification\": true,\n \"revoke_refresh_token_grant\": true,\n \"dashboard_log_streams_next\": true,\n \"dashboard_insights_view\": true,\n \"disable_fields_map_fix\": true,\n \"mfa_show_factor_list_on_enrollment\": true,\n \"remove_alg_from_jwks\": true,\n \"improved_signup_bot_detection_in_classic\": true,\n \"genai_trial\": true,\n \"local_resource_discovery\": true,\n \"enable_dynamic_client_registration\": true,\n \"disable_management_api_sms_obfuscation\": true,\n \"trust_azure_adfs_email_verified_connection_property\": true,\n \"custom_domains_provisioning\": true\n },\n \"friendly_name\": \"friendly_name\",\n \"picture_url\": \"picture_url\",\n \"support_email\": \"support_email\",\n \"support_url\": \"support_url\",\n \"allowed_logout_urls\": [\n \"allowed_logout_urls\"\n ],\n \"session_lifetime\": 1.1,\n \"idle_session_lifetime\": 1.1,\n \"ephemeral_session_lifetime\": 1.1,\n \"idle_ephemeral_session_lifetime\": 1.1,\n \"sandbox_version\": \"sandbox_version\",\n \"legacy_sandbox_version\": \"legacy_sandbox_version\",\n \"sandbox_versions_available\": [\n \"sandbox_versions_available\"\n ],\n \"default_redirection_uri\": \"default_redirection_uri\",\n \"enabled_locales\": [\n \"am\"\n ],\n \"access_token\": {\n \"claims_mapping\": {\n \"custom_claims\": [\n {\n \"name\": \"name\",\n \"expression\": \"expression\"\n }\n ]\n }\n },\n \"security_headers\": {\n \"content_security_policy\": {\n \"enabled\": true,\n \"policies\": [\n {}\n ]\n },\n \"x_xss_protection\": {\n \"enabled\": true,\n \"mode\": \"block\",\n \"report_uri\": \"report_uri\"\n }\n },\n \"session_cookie\": {\n \"mode\": \"persistent\"\n },\n \"sessions\": {\n \"oidc_logout_prompt_enabled\": true,\n \"anonymous\": {\n \"lifetime_in_minutes\": 1,\n \"activate_cookie\": true\n }\n },\n \"oidc_logout\": {\n \"rp_logout_end_session_endpoint_discovery\": true\n },\n \"allow_organization_name_in_authentication_api\": true,\n \"customize_mfa_in_postlogin_action\": true,\n \"acr_values_supported\": [\n \"acr_values_supported\"\n ],\n \"mtls\": {\n \"enable_endpoint_aliases\": true\n },\n \"pushed_authorization_requests_supported\": true,\n \"authorization_response_iss_parameter_supported\": true,\n \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n \"resource_parameter_profile\": \"audience\",\n \"client_id_metadata_document_supported\": true,\n \"phone_consolidated_experience\": true,\n \"enable_ai_guide\": true,\n \"include_session_metadata_in_tenant_logs\": true,\n \"dynamic_client_registration_security_mode\": \"strict\",\n \"country_codes\": {\n \"list\": [\n \"list\"\n ],\n \"mode\": \"allow\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -16963,6 +17105,6 @@ } ], "meta": { - "total": 453 + "total": 457 } } \ No newline at end of file