diff --git a/.fern/metadata.json b/.fern/metadata.json index e47aa846..6ebf68e8 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -10,7 +10,7 @@ "offsetSemantics": "page-index", "useDefaultRequestParameterValues": true }, - "originGitCommit": "e2027b1584b1668f39ed802f114e54458b09bb57", + "originGitCommit": "8857b12c5a5345e87088f8d57ba9cffdb82ed9fe", "originGitCommitIsDirty": false, "invokedBy": "ci", "ciProvider": "github", diff --git a/.fern/replay.lock b/.fern/replay.lock index 045308f5..1e75c65a 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -24,5 +24,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-ruby-sdk: 1.17.8 -current_generation: d8a88028849ce519e8fdc20765c78e367f372110 + - commit_sha: ff82f16a518e8ee51b23570ed1a303f3c070ff02 + tree_hash: 6b4ba82c8dbe3556b6c8e7dd4f7c4d32671aa12a + timestamp: 2026-08-04T06:22:44.311Z + cli_version: unknown + generator_versions: + fernapi/fern-ruby-sdk: 1.17.8 +current_generation: ff82f16a518e8ee51b23570ed1a303f3c070ff02 patches: [] diff --git a/lib/auth0.rb b/lib/auth0.rb index 0c8386c5..f928617b 100644 --- a/lib/auth0.rb +++ b/lib/auth0.rb @@ -64,10 +64,10 @@ require_relative "auth0/types/get_job_generic_error_response_content" require_relative "auth0/jobs/errors/types/errors_get_response" require_relative "auth0/types/oauth_scope" -require_relative "auth0/types/not_found_error_body_error" -require_relative "auth0/types/not_found_error_body" require_relative "auth0/types/too_many_requests_error_body_error" require_relative "auth0/types/too_many_requests_error_body" +require_relative "auth0/types/not_found_error_body_error" +require_relative "auth0/types/not_found_error_body" require_relative "auth0/types/action_binding_type_enum" require_relative "auth0/types/action_trigger_type_enum" require_relative "auth0/types/action_trigger_compatible_trigger" @@ -131,6 +131,8 @@ 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/agent_metadata" +require_relative "auth0/types/agent_response_content" require_relative "auth0/types/anomaly_ip_format" require_relative "auth0/types/app_metadata" require_relative "auth0/types/assessors_type_enum" @@ -343,6 +345,8 @@ require_relative "auth0/types/client_token_endpoint_auth_method_or_null_enum" require_relative "auth0/types/client_token_exchange_configuration_or_null" require_relative "auth0/types/client_token_vault_privileged_access_with_public_key" +require_relative "auth0/types/conflict_schema_error" +require_relative "auth0/types/conflict_schema" require_relative "auth0/types/connected_account_access_type_enum" require_relative "auth0/types/connected_account" require_relative "auth0/types/connection_https_url_with_http_fallback255" @@ -1064,6 +1068,7 @@ require_relative "auth0/types/event_stream_event_bridge_response_content" require_relative "auth0/types/event_stream_webhook_response_content" require_relative "auth0/types/create_event_stream_response_content" +require_relative "auth0/types/event_stream_cloud_event_data" require_relative "auth0/types/event_stream_cloud_event" require_relative "auth0/types/event_stream_delivery_attempt" require_relative "auth0/types/event_stream_delivery_event_type_enum" @@ -1745,6 +1750,11 @@ require_relative "auth0/types/create_log_stream_response_content" require_relative "auth0/types/organization_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" +require_relative "auth0/types/organization_client_metadata" +require_relative "auth0/types/organization_client" +require_relative "auth0/types/create_organization_clients_response_content" require_relative "auth0/types/organization_discovery_domain_status" require_relative "auth0/types/create_organization_discovery_domain_response_content" require_relative "auth0/types/organization_invitation_invitee" @@ -1753,6 +1763,7 @@ require_relative "auth0/types/create_organization_invitation_response_content" require_relative "auth0/types/organization_branding_colors" require_relative "auth0/types/organization_branding" +require_relative "auth0/types/organization_client_association" require_relative "auth0/types/organization_enabled_connection" require_relative "auth0/types/organization_metadata" require_relative "auth0/types/organization_third_party_client_access_enum" @@ -1791,6 +1802,7 @@ require_relative "auth0/types/resource_server_token_encryption_key" require_relative "auth0/types/resource_server_token_encryption" require_relative "auth0/types/create_resource_server_response_content" +require_relative "auth0/types/role_type_enum" require_relative "auth0/types/create_role_response_content" require_relative "auth0/types/create_rule_response_content" require_relative "auth0/types/scim_mapping_item" @@ -2697,6 +2709,7 @@ require_relative "auth0/types/get_network_acls_response_content" require_relative "auth0/types/get_organization_all_connection_response_content" require_relative "auth0/types/get_organization_by_name_response_content" +require_relative "auth0/types/get_organization_client_response_content" require_relative "auth0/types/get_organization_connection_response_content" require_relative "auth0/types/get_organization_discovery_domain_by_name_response_content" require_relative "auth0/types/get_organization_discovery_domain_response_content" @@ -2784,6 +2797,7 @@ require_relative "auth0/types/get_verifiable_credential_template_response_content" require_relative "auth0/types/guardian_enrollment_factor_enum" require_relative "auth0/types/guardian_factor_name_enum" +require_relative "auth0/types/guardian_factor_settings" require_relative "auth0/types/guardian_factor" require_relative "auth0/types/hook" require_relative "auth0/types/hook_trigger_id_enum" @@ -2796,6 +2810,7 @@ require_relative "auth0/types/list_actions_paginated_response_content" require_relative "auth0/types/list_aculs_response_content_item" require_relative "auth0/types/list_aculs_offset_paginated_response_content" +require_relative "auth0/types/list_agents_response_content" require_relative "auth0/types/phone_provider_schema_masked" require_relative "auth0/types/list_branding_phone_providers_response_content" require_relative "auth0/types/list_client_connections_response_content" @@ -2810,6 +2825,7 @@ require_relative "auth0/types/list_device_credentials_offset_paginated_response_content" require_relative "auth0/types/list_directory_provisionings_response_content" require_relative "auth0/types/list_encryption_key_offset_paginated_response_content" +require_relative "auth0/types/list_event_stream_deliveries_response_content" require_relative "auth0/types/list_event_streams_response_content" require_relative "auth0/types/list_flow_executions_paginated_response_content" require_relative "auth0/types/list_flows_offset_paginated_response_content" @@ -2830,6 +2846,7 @@ require_relative "auth0/types/list_organization_all_connections_offset_paginated_response_content" require_relative "auth0/types/organization_client_grant" require_relative "auth0/types/list_organization_client_grants_offset_paginated_response_content" +require_relative "auth0/types/list_organization_clients_response_content" require_relative "auth0/types/organization_connection" require_relative "auth0/types/list_organization_connections_offset_paginated_response_content" require_relative "auth0/types/organization_discovery_domain" @@ -2846,6 +2863,8 @@ require_relative "auth0/types/organization_member_role" require_relative "auth0/types/organization_member" require_relative "auth0/types/list_organization_members_paginated_response_content" +require_relative "auth0/types/role_group" +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/list_organizations_paginated_response_content" @@ -2913,6 +2932,8 @@ require_relative "auth0/types/native_social_login_facebook_patch" require_relative "auth0/types/native_social_login_google_patch" require_relative "auth0/types/native_social_login_patch" +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/partial_groups_enum" require_relative "auth0/types/partial_phone_template_content" @@ -2997,6 +3018,7 @@ require_relative "auth0/types/set_user_authentication_methods_request_content" require_relative "auth0/types/sets_custom_texts_by_language_request_content" require_relative "auth0/types/signing_keys" +require_relative "auth0/types/synchronized_group_selection_id" require_relative "auth0/types/tenant_settings_country_codes_mode" require_relative "auth0/types/tenant_settings_country_codes" require_relative "auth0/types/tenant_settings_supported_locales_enum" @@ -3111,6 +3133,7 @@ require_relative "auth0/types/update_log_stream_response_content" require_relative "auth0/types/update_network_acl_response_content" require_relative "auth0/types/update_organization_all_connection_response_content" +require_relative "auth0/types/update_organization_client_response_content" require_relative "auth0/types/update_organization_connection_response_content" require_relative "auth0/types/update_organization_discovery_domain_response_content" require_relative "auth0/types/update_organization_response_content" @@ -3151,6 +3174,10 @@ require_relative "auth0/actions/types/delete_action_request_parameters" require_relative "auth0/actions/types/update_action_request_content" require_relative "auth0/actions/types/test_action_request_content" +require_relative "auth0/agents/client" +require_relative "auth0/agents/types/list_agents_request_parameters" +require_relative "auth0/agents/types/create_agent_request_content" +require_relative "auth0/agents/types/patch_agent_request_parameters" require_relative "auth0/branding/client" require_relative "auth0/branding/types/update_branding_request_content" require_relative "auth0/client_grants/client" @@ -3338,7 +3365,9 @@ require_relative "auth0/connections/directory_provisioning/client" require_relative "auth0/connections/directory_provisioning/types/list_directory_provisionings_request_parameters" require_relative "auth0/connections/directory_provisioning/types/list_synchronized_groups_request_parameters" +require_relative "auth0/connections/directory_provisioning/types/add_synchronized_groups_request_content" require_relative "auth0/connections/directory_provisioning/types/replace_synchronized_groups_request_content" +require_relative "auth0/connections/directory_provisioning/types/delete_synchronized_groups_request_content" require_relative "auth0/connections/scim_configuration/client" require_relative "auth0/connections/scim_configuration/types/list_scim_configurations_request_parameters" require_relative "auth0/connections/scim_configuration/types/update_scim_configuration_request_content" @@ -3420,6 +3449,11 @@ require_relative "auth0/organizations/client_grants/client" require_relative "auth0/organizations/client_grants/types/list_organization_client_grants_request_parameters" require_relative "auth0/organizations/client_grants/types/associate_organization_client_grant_request_content" +require_relative "auth0/organizations/clients/client" +require_relative "auth0/organizations/clients/types/list_organization_clients_request_parameters" +require_relative "auth0/organizations/clients/types/create_organization_clients_request_content" +require_relative "auth0/organizations/clients/types/delete_organization_clients_request_content" +require_relative "auth0/organizations/clients/types/update_organization_client_request_content" require_relative "auth0/organizations/connections/client" require_relative "auth0/organizations/connections/types/list_organization_all_connections_request_parameters" require_relative "auth0/organizations/connections/types/create_organization_all_connection_request_parameters" @@ -3458,6 +3492,8 @@ require_relative "auth0/organizations/roles/client" require_relative "auth0/organizations/roles/members/client" require_relative "auth0/organizations/roles/members/types/list_organization_role_members_request_parameters" +require_relative "auth0/organizations/roles/groups/client" +require_relative "auth0/organizations/roles/groups/types/list_organization_role_groups_request_parameters" require_relative "auth0/prompts/rendering/client" require_relative "auth0/prompts/rendering/types/list_aculs_request_parameters" require_relative "auth0/prompts/rendering/types/bulk_update_acul_request_content" diff --git a/lib/auth0/agents/client.rb b/lib/auth0/agents/client.rb new file mode 100644 index 00000000..4f66ed67 --- /dev/null +++ b/lib/auth0/agents/client.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +module Auth0 + module Agents + class Client + # @param client [Auth0::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # Get agents + # + # @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::ListAgentsResponseContent] + 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, 50) + + Auth0::Internal::CursorItemIterator.new( + cursor_field: :next_, + item_field: :agents, + 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: "agents", + 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::ListAgentsResponseContent.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 agent + # + # @param request_options [Hash] + # @param params [Auth0::Agents::Types::CreateAgentRequestContent] + # @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::AgentResponseContent] + 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: "agents", + body: Auth0::Agents::Types::CreateAgentRequestContent.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::AgentResponseContent.load(response.body) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Get an agent + # + # @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::AgentResponseContent] + def read(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: "agents/#{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::AgentResponseContent.load(response.body) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Delete an agent + # + # @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 [untyped] + def delete(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "DELETE", + path: "agents/#{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 + return if code.between?(200, 299) + + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + + # Update an agent + # + # @param request_options [Hash] + # @param params [Auth0::Agents::Types::PatchAgentRequestParameters] + # @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::AgentResponseContent] + def update(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Agents::Types::PatchAgentRequestParameters.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: "agents/#{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::AgentResponseContent.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 diff --git a/lib/auth0/agents/types/create_agent_request_content.rb b/lib/auth0/agents/types/create_agent_request_content.rb new file mode 100644 index 00000000..ee0f162d --- /dev/null +++ b/lib/auth0/agents/types/create_agent_request_content.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Auth0 + module Agents + module Types + class CreateAgentRequestContent < Internal::Types::Model + field :name, -> { String }, optional: false, nullable: false + + field :client_id, -> { String }, optional: true, nullable: false + + field :external_agent_id, -> { String }, optional: true, nullable: false + + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + end + end + end +end diff --git a/lib/auth0/agents/types/list_agents_request_parameters.rb b/lib/auth0/agents/types/list_agents_request_parameters.rb new file mode 100644 index 00000000..ba108dbc --- /dev/null +++ b/lib/auth0/agents/types/list_agents_request_parameters.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Agents + module Types + class ListAgentsRequestParameters < 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/agents/types/patch_agent_request_parameters.rb b/lib/auth0/agents/types/patch_agent_request_parameters.rb new file mode 100644 index 00000000..92b84171 --- /dev/null +++ b/lib/auth0/agents/types/patch_agent_request_parameters.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Agents + module Types + class PatchAgentRequestParameters < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: true, nullable: false + + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false + end + end + end +end diff --git a/lib/auth0/client.rb b/lib/auth0/client.rb index 9f2df028..b8b69901 100644 --- a/lib/auth0/client.rb +++ b/lib/auth0/client.rb @@ -4,23 +4,24 @@ module Auth0 class Management # @param token [String] # @param base_url [String, nil] - # @param timeout [Float, nil] Request timeout in seconds. - # @param max_retries [Integer, nil] Maximum number of request retries. - # @param headers [Hash, nil] Additional headers to include in requests. + # @param tenant_domain [String, nil] + # @param max_retries [Integer] # # @return [void] - def initialize(token:, base_url: nil, timeout: nil, max_retries: nil, headers: nil) - raw_client_opts = { + def initialize(token:, base_url: nil, tenant_domain: nil, max_retries: 2) + if base_url.nil? && (!tenant_domain.nil?) + tenant_domain_value = tenant_domain.nil? ? "{TENANT}.auth0.com" : tenant_domain + base_url = "https://#{tenant_domain_value}/api/v2" + end + + @raw_client = Auth0::Internal::Http::RawClient.new( base_url: base_url || Auth0::Environment::DEFAULT, headers: { "X-Fern-Language" => "Ruby", Authorization: "Bearer #{token}" - }.merge(headers || {}) - } - raw_client_opts[:timeout] = timeout if timeout - raw_client_opts[:max_retries] = max_retries if max_retries - - @raw_client = Auth0::Internal::Http::RawClient.new(**raw_client_opts) + }, + max_retries: max_retries + ) end # @return [Auth0::Actions::Client] @@ -28,6 +29,11 @@ def actions @actions ||= Auth0::Actions::Client.new(client: @raw_client) end + # @return [Auth0::Agents::Client] + def agents + @agents ||= Auth0::Agents::Client.new(client: @raw_client) + end + # @return [Auth0::Branding::Client] def branding @branding ||= Auth0::Branding::Client.new(client: @raw_client) @@ -249,5 +255,3 @@ def verifiable_credentials end end end - -require_relative "auth_client" diff --git a/lib/auth0/client_grants/client.rb b/lib/auth0/client_grants/client.rb index 3d65815a..ae5729ed 100644 --- a/lib/auth0/client_grants/client.rb +++ b/lib/auth0/client_grants/client.rb @@ -21,6 +21,7 @@ def initialize(client:) # @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 [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @option params [String, nil] :audience @@ -33,6 +34,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) query_params["audience"] = params[:audience] if params.key?(:audience) diff --git a/lib/auth0/client_grants/organizations/client.rb b/lib/auth0/client_grants/organizations/client.rb index 8a088646..8b72c4cf 100644 --- a/lib/auth0/client_grants/organizations/client.rb +++ b/lib/auth0/client_grants/organizations/client.rb @@ -19,6 +19,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -26,6 +27,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/client_grants/organizations/types/list_client_grant_organizations_request_parameters.rb b/lib/auth0/client_grants/organizations/types/list_client_grant_organizations_request_parameters.rb index 045cdf70..c86a8f95 100644 --- a/lib/auth0/client_grants/organizations/types/list_client_grant_organizations_request_parameters.rb +++ b/lib/auth0/client_grants/organizations/types/list_client_grant_organizations_request_parameters.rb @@ -7,6 +7,8 @@ module Types class ListClientGrantOrganizationsRequestParameters < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/client_grants/types/list_client_grants_request_parameters.rb b/lib/auth0/client_grants/types/list_client_grants_request_parameters.rb index 52f38ead..0125bfdf 100644 --- a/lib/auth0/client_grants/types/list_client_grants_request_parameters.rb +++ b/lib/auth0/client_grants/types/list_client_grants_request_parameters.rb @@ -4,6 +4,8 @@ module Auth0 module ClientGrants module Types class ListClientGrantsRequestParameters < Internal::Types::Model + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/connections/client.rb b/lib/auth0/connections/client.rb index 476162d2..bb669ddc 100644 --- a/lib/auth0/connections/client.rb +++ b/lib/auth0/connections/client.rb @@ -39,6 +39,7 @@ def initialize(client:) # @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 [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @option params [Auth0::Types::ConnectionStrategyEnum, nil] :strategy @@ -50,6 +51,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) query_params["strategy"] = params[:strategy] if params.key?(:strategy) diff --git a/lib/auth0/connections/directory_provisioning/client.rb b/lib/auth0/connections/directory_provisioning/client.rb index 98dcbe22..d785acb9 100644 --- a/lib/auth0/connections/directory_provisioning/client.rb +++ b/lib/auth0/connections/directory_provisioning/client.rb @@ -241,6 +241,7 @@ def get_default_mapping(request_options: {}, **params) # @option params [String] :id # @option params [String, nil] :from # @option params [Integer, nil] :take + # @option params [String, nil] :q # # @return [Auth0::Types::ListSynchronizedGroupsResponseContent] def list_synchronized_groups(request_options: {}, **params) @@ -248,6 +249,7 @@ def list_synchronized_groups(request_options: {}, **params) query_params = {} query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) + query_params["q"] = params[:q] if params.key?(:q) Auth0::Internal::CursorItemIterator.new( cursor_field: :next_, @@ -278,6 +280,43 @@ def list_synchronized_groups(request_options: {}, **params) end end + # Add synchronized group selections to a directory provisioning configuration. + # + # @param request_options [Hash] + # @param params [Auth0::Connections::DirectoryProvisioning::Types::AddSynchronizedGroupsRequestContent] + # @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 [untyped] + def add_synchronized_group_selections(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Connections::DirectoryProvisioning::Types::AddSynchronizedGroupsRequestContent.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: "connections/#{URI.encode_uri_component(params[:id].to_s)}/directory-provisioning/synchronized-groups", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + 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) + end + # Create or replace the selected groups for a connection directory provisioning configuration. # # @param request_options [Hash] @@ -315,6 +354,43 @@ def set(request_options: {}, **params) raise error_class.new(response.body, code: code) end + # Delete synchronized group selections for a directory provisioning configuration + # + # @param request_options [Hash] + # @param params [Auth0::Connections::DirectoryProvisioning::Types::DeleteSynchronizedGroupsRequestContent] + # @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 [untyped] + def delete_synchronized_group_selections(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Connections::DirectoryProvisioning::Types::DeleteSynchronizedGroupsRequestContent.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: "DELETE", + path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/directory-provisioning/synchronized-groups", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + 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) + end + # @return [Auth0::Synchronizations::Client] def synchronizations @synchronizations ||= Auth0::Connections::DirectoryProvisioning::Synchronizations::Client.new(client: @client) diff --git a/lib/auth0/connections/directory_provisioning/types/add_synchronized_groups_request_content.rb b/lib/auth0/connections/directory_provisioning/types/add_synchronized_groups_request_content.rb new file mode 100644 index 00000000..89c6d874 --- /dev/null +++ b/lib/auth0/connections/directory_provisioning/types/add_synchronized_groups_request_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Connections + module DirectoryProvisioning + module Types + class AddSynchronizedGroupsRequestContent < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :groups, -> { Internal::Types::Array[Auth0::Types::SynchronizedGroupPayload] }, optional: false, nullable: false + end + end + end + end +end diff --git a/lib/auth0/connections/directory_provisioning/types/delete_synchronized_groups_request_content.rb b/lib/auth0/connections/directory_provisioning/types/delete_synchronized_groups_request_content.rb new file mode 100644 index 00000000..99020177 --- /dev/null +++ b/lib/auth0/connections/directory_provisioning/types/delete_synchronized_groups_request_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Connections + module DirectoryProvisioning + module Types + class DeleteSynchronizedGroupsRequestContent < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :groups, -> { Internal::Types::Array[Auth0::Types::SynchronizedGroupSelectionID] }, optional: false, nullable: false + end + end + end + end +end diff --git a/lib/auth0/connections/directory_provisioning/types/list_synchronized_groups_request_parameters.rb b/lib/auth0/connections/directory_provisioning/types/list_synchronized_groups_request_parameters.rb index 7ac63fcb..27c4a144 100644 --- a/lib/auth0/connections/directory_provisioning/types/list_synchronized_groups_request_parameters.rb +++ b/lib/auth0/connections/directory_provisioning/types/list_synchronized_groups_request_parameters.rb @@ -10,6 +10,8 @@ class ListSynchronizedGroupsRequestParameters < Internal::Types::Model field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false + + field :q, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/connections/types/list_connections_query_parameters.rb b/lib/auth0/connections/types/list_connections_query_parameters.rb index d4ef0cd8..90443587 100644 --- a/lib/auth0/connections/types/list_connections_query_parameters.rb +++ b/lib/auth0/connections/types/list_connections_query_parameters.rb @@ -4,6 +4,8 @@ module Auth0 module Connections module Types class ListConnectionsQueryParameters < Internal::Types::Model + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/event_streams/deliveries/client.rb b/lib/auth0/event_streams/deliveries/client.rb index 3cfbfdb2..f1a1340c 100644 --- a/lib/auth0/event_streams/deliveries/client.rb +++ b/lib/auth0/event_streams/deliveries/client.rb @@ -26,7 +26,7 @@ def initialize(client:) # @option params [String, nil] :from # @option params [Integer, nil] :take # - # @return [Array[Auth0::Types::EventStreamDelivery]] + # @return [Auth0::Types::ListEventStreamDeliveriesResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} @@ -37,23 +37,33 @@ def list(request_options: {}, **params) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) - request = Auth0::Internal::JSON::Request.new( - base_url: request_options[:base_url], - method: "GET", - path: "event-streams/#{URI.encode_uri_component(params[:id].to_s)}/deliveries", - query: query_params, - request_options: request_options - ) - begin - response = @client.send(request) - rescue Net::HTTPRequestTimeout - raise Auth0::Errors::TimeoutError + Auth0::Internal::CursorItemIterator.new( + cursor_field: :next_, + item_field: :deliveries, + 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: "event-streams/#{URI.encode_uri_component(params[:id].to_s)}/deliveries", + 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::ListEventStreamDeliveriesResponseContent.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 - 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) end # @param request_options [Hash] diff --git a/lib/auth0/flows/executions/client.rb b/lib/auth0/flows/executions/client.rb index 6a255e5d..b03ea62e 100644 --- a/lib/auth0/flows/executions/client.rb +++ b/lib/auth0/flows/executions/client.rb @@ -19,6 +19,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String] :flow_id + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -26,6 +27,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/flows/executions/types/list_flow_executions_request_parameters.rb b/lib/auth0/flows/executions/types/list_flow_executions_request_parameters.rb index 8e7b7778..525e3326 100644 --- a/lib/auth0/flows/executions/types/list_flow_executions_request_parameters.rb +++ b/lib/auth0/flows/executions/types/list_flow_executions_request_parameters.rb @@ -7,6 +7,8 @@ module Types class ListFlowExecutionsRequestParameters < Internal::Types::Model field :flow_id, -> { String }, optional: false, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/groups/client.rb b/lib/auth0/groups/client.rb index 0860ff2d..a8b1f1fe 100644 --- a/lib/auth0/groups/client.rb +++ b/lib/auth0/groups/client.rb @@ -25,6 +25,7 @@ def initialize(client:) # @option params [String, nil] :search # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -38,6 +39,7 @@ def list(request_options: {}, **params) query_params["search"] = params[:search] if params.key?(:search) query_params["fields"] = params[:fields] if params.key?(:fields) query_params["include_fields"] = params[:include_fields] if params.key?(:include_fields) + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/groups/types/list_groups_request_parameters.rb b/lib/auth0/groups/types/list_groups_request_parameters.rb index 72a1e476..7117b795 100644 --- a/lib/auth0/groups/types/list_groups_request_parameters.rb +++ b/lib/auth0/groups/types/list_groups_request_parameters.rb @@ -16,6 +16,8 @@ class ListGroupsRequestParameters < Internal::Types::Model field :include_fields, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/organizations/client.rb b/lib/auth0/organizations/client.rb index e7ebbb7f..3b4e9fe6 100644 --- a/lib/auth0/organizations/client.rb +++ b/lib/auth0/organizations/client.rb @@ -38,17 +38,21 @@ def initialize(client:) # @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 [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @option params [String, nil] :sort + # @option params [String, nil] :include_client_association_for # # @return [Auth0::Types::ListOrganizationsPaginatedResponseContent] def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) query_params["sort"] = params[:sort] if params.key?(:sort) + query_params["include_client_association_for"] = params[:include_client_association_for] if params.key?(:include_client_association_for) Auth0::Internal::CursorItemIterator.new( cursor_field: :next_, @@ -264,6 +268,11 @@ def client_grants @client_grants ||= Auth0::Organizations::ClientGrants::Client.new(client: @client) end + # @return [Auth0::Clients::Client] + def clients + @clients ||= Auth0::Organizations::Clients::Client.new(client: @client) + end + # @return [Auth0::Connections::Client] def connections @connections ||= Auth0::Organizations::Connections::Client.new(client: @client) diff --git a/lib/auth0/organizations/clients/client.rb b/lib/auth0/organizations/clients/client.rb new file mode 100644 index 00000000..1209803e --- /dev/null +++ b/lib/auth0/organizations/clients/client.rb @@ -0,0 +1,223 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Clients + class Client + # @param client [Auth0::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # List all clients associated with an organization, using checkpoint pagination. + # + # + # @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::ListOrganizationClientsResponseContent] + 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, 50) + + Auth0::Internal::CursorItemIterator.new( + cursor_field: :next_, + item_field: :clients, + 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/#{URI.encode_uri_component(params[:id].to_s)}/clients", + 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::ListOrganizationClientsResponseContent.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 + + # Associate one or more clients with an organization. + # + # @param request_options [Hash] + # @param params [Auth0::Organizations::Clients::Types::CreateOrganizationClientsRequestContent] + # @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 [Array[Auth0::Types::OrganizationClient]] + def create(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Organizations::Clients::Types::CreateOrganizationClientsRequestContent.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: "organizations/#{URI.encode_uri_component(params[:id].to_s)}/clients", + 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::CreateOrganizationClientsResponseContent.load(response.body) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Remove one or more client associations from an organization. + # + # @param request_options [Hash] + # @param params [Auth0::Organizations::Clients::Types::DeleteOrganizationClientsRequestContent] + # @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 [untyped] + def delete(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Organizations::Clients::Types::DeleteOrganizationClientsRequestContent.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: "DELETE", + path: "organizations/#{URI.encode_uri_component(params[:id].to_s)}/clients", + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + 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) + end + + # Get a specific client association for an organization. + # + # @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] :client_id + # + # @return [Auth0::Types::GetOrganizationClientResponseContent] + 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: "organizations/#{URI.encode_uri_component(params[:id].to_s)}/clients/#{URI.encode_uri_component(params[:client_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::GetOrganizationClientResponseContent.load(response.body) + else + error_class = Auth0::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Update an organization client association. + # + # @param request_options [Hash] + # @param params [Auth0::Organizations::Clients::Types::UpdateOrganizationClientRequestContent] + # @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] :client_id + # + # @return [Auth0::Types::UpdateOrganizationClientResponseContent] + def update(request_options: {}, **params) + params = Auth0::Internal::Types::Utils.normalize_keys(params) + request_data = Auth0::Organizations::Clients::Types::UpdateOrganizationClientRequestContent.new(params).to_h + non_body_param_names = %w[id client_id] + body = request_data.except(*non_body_param_names) + + request = Auth0::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "PATCH", + path: "organizations/#{URI.encode_uri_component(params[:id].to_s)}/clients/#{URI.encode_uri_component(params[:client_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::UpdateOrganizationClientResponseContent.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/organizations/clients/types/create_organization_clients_request_content.rb b/lib/auth0/organizations/clients/types/create_organization_clients_request_content.rb new file mode 100644 index 00000000..29b4738d --- /dev/null +++ b/lib/auth0/organizations/clients/types/create_organization_clients_request_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Clients + module Types + class CreateOrganizationClientsRequestContent < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :clients, -> { Internal::Types::Array[Auth0::Types::CreateOrganizationClientRequestItem] }, optional: false, nullable: false + end + end + end + end +end diff --git a/lib/auth0/organizations/clients/types/delete_organization_clients_request_content.rb b/lib/auth0/organizations/clients/types/delete_organization_clients_request_content.rb new file mode 100644 index 00000000..52fbf1e9 --- /dev/null +++ b/lib/auth0/organizations/clients/types/delete_organization_clients_request_content.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Clients + module Types + class DeleteOrganizationClientsRequestContent < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :clients, -> { Internal::Types::Array[String] }, optional: false, nullable: false + end + end + end + end +end diff --git a/lib/auth0/organizations/clients/types/list_organization_clients_request_parameters.rb b/lib/auth0/organizations/clients/types/list_organization_clients_request_parameters.rb new file mode 100644 index 00000000..fbb16407 --- /dev/null +++ b/lib/auth0/organizations/clients/types/list_organization_clients_request_parameters.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Clients + module Types + class ListOrganizationClientsRequestParameters < 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 +end diff --git a/lib/auth0/organizations/clients/types/update_organization_client_request_content.rb b/lib/auth0/organizations/clients/types/update_organization_client_request_content.rb new file mode 100644 index 00000000..a3bd0949 --- /dev/null +++ b/lib/auth0/organizations/clients/types/update_organization_client_request_content.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Clients + module Types + class UpdateOrganizationClientRequestContent < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :client_id, -> { String }, optional: false, nullable: false + + field :use_for_member_access, -> { Internal::Types::Boolean }, optional: true, nullable: false + end + end + end + end +end diff --git a/lib/auth0/organizations/members/client.rb b/lib/auth0/organizations/members/client.rb index c0535088..ad1d0930 100644 --- a/lib/auth0/organizations/members/client.rb +++ b/lib/auth0/organizations/members/client.rb @@ -18,7 +18,9 @@ def initialize(client:) # - Use the `fields` parameter to optionally define the specific member details retrieved. If `fields` is left # blank, all fields (except roles) are returned. # - Member roles are not sent by default. Use `fields=roles` to retrieve the roles assigned to each listed - # member. To use this parameter, you must include the `read:organization_member_roles` scope in the token. + # member. To use this parameter, you must include the `read:organization_member_roles` scope in the token. Only + # directly assigned roles are returned. To also include group-based role assignments, use `GET + # /api/v2/organizations/{id}/members/{user_id}/effective-roles`. # # This endpoint supports two types of pagination: # @@ -43,6 +45,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @option params [String, nil] :fields @@ -52,6 +55,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) query_params["fields"] = params[:fields] if params.key?(:fields) diff --git a/lib/auth0/organizations/members/roles/client.rb b/lib/auth0/organizations/members/roles/client.rb index e48f7e01..567b421e 100644 --- a/lib/auth0/organizations/members/roles/client.rb +++ b/lib/auth0/organizations/members/roles/client.rb @@ -18,6 +18,9 @@ def initialize(client:) # only returns the roles associated with the specified Organization; any roles assigned to the user within # other Organizations are not included. # + # **Note**: Returns only direct role assignments for this member. To also include group-based role + # assignments, use `GET /api/v2/organizations/{id}/members/{user_id}/effective-roles`. + # # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/auth0/organizations/members/types/list_organization_members_request_parameters.rb b/lib/auth0/organizations/members/types/list_organization_members_request_parameters.rb index df97e1d2..e063dbf0 100644 --- a/lib/auth0/organizations/members/types/list_organization_members_request_parameters.rb +++ b/lib/auth0/organizations/members/types/list_organization_members_request_parameters.rb @@ -7,6 +7,8 @@ module Types class ListOrganizationMembersRequestParameters < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/organizations/roles/client.rb b/lib/auth0/organizations/roles/client.rb index cab4e581..9c6d7e61 100644 --- a/lib/auth0/organizations/roles/client.rb +++ b/lib/auth0/organizations/roles/client.rb @@ -15,6 +15,11 @@ def initialize(client:) def members @members ||= Auth0::Organizations::Roles::Members::Client.new(client: @client) end + + # @return [Auth0::Groups::Client] + def groups + @groups ||= Auth0::Organizations::Roles::Groups::Client.new(client: @client) + end end end end diff --git a/lib/auth0/organizations/roles/groups/client.rb b/lib/auth0/organizations/roles/groups/client.rb new file mode 100644 index 00000000..14dfc0a6 --- /dev/null +++ b/lib/auth0/organizations/roles/groups/client.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Roles + module Groups + class Client + # @param client [Auth0::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # Retrieve the list of groups assigned to a role in the context of an organization. + # + # @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] :organization_id + # @option params [String] :role_id + # @option params [String, nil] :from + # @option params [Integer, nil] :take + # + # @return [Auth0::Types::ListOrganizationRoleGroupsResponseContent] + 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, 50) + + Auth0::Internal::CursorItemIterator.new( + cursor_field: :next_, + item_field: :groups, + 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/#{URI.encode_uri_component(params[:organization_id].to_s)}/roles/#{URI.encode_uri_component(params[:role_id].to_s)}/groups", + 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::ListOrganizationRoleGroupsResponseContent.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 + end +end diff --git a/lib/auth0/organizations/roles/groups/types/list_organization_role_groups_request_parameters.rb b/lib/auth0/organizations/roles/groups/types/list_organization_role_groups_request_parameters.rb new file mode 100644 index 00000000..fa9494ee --- /dev/null +++ b/lib/auth0/organizations/roles/groups/types/list_organization_role_groups_request_parameters.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Auth0 + module Organizations + module Roles + module Groups + module Types + class ListOrganizationRoleGroupsRequestParameters < Internal::Types::Model + field :organization_id, -> { String }, optional: false, nullable: false + + field :role_id, -> { String }, optional: false, nullable: false + + field :from, -> { String }, optional: true, nullable: false + + field :take, -> { Integer }, optional: true, nullable: false + end + end + end + end + end +end diff --git a/lib/auth0/organizations/roles/members/client.rb b/lib/auth0/organizations/roles/members/client.rb index dbde918e..32a0a007 100644 --- a/lib/auth0/organizations/roles/members/client.rb +++ b/lib/auth0/organizations/roles/members/client.rb @@ -13,6 +13,12 @@ def initialize(client:) end # List the organization members assigned a specific role within the context of an organization. + # # # @param request_options [Hash] # @param params [Hash] diff --git a/lib/auth0/organizations/types/create_organization_request_content.rb b/lib/auth0/organizations/types/create_organization_request_content.rb index 4c8b0b9d..6bc9aa13 100644 --- a/lib/auth0/organizations/types/create_organization_request_content.rb +++ b/lib/auth0/organizations/types/create_organization_request_content.rb @@ -17,6 +17,8 @@ class CreateOrganizationRequestContent < Internal::Types::Model field :token_quota, -> { Auth0::Types::CreateTokenQuota }, 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/organizations/types/list_organizations_request_parameters.rb b/lib/auth0/organizations/types/list_organizations_request_parameters.rb index 8dccfe2f..9197896e 100644 --- a/lib/auth0/organizations/types/list_organizations_request_parameters.rb +++ b/lib/auth0/organizations/types/list_organizations_request_parameters.rb @@ -4,11 +4,15 @@ module Auth0 module Organizations module Types class ListOrganizationsRequestParameters < Internal::Types::Model + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false field :sort, -> { String }, optional: true, nullable: false + + field :include_client_association_for, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/organizations/types/update_organization_request_content.rb b/lib/auth0/organizations/types/update_organization_request_content.rb index ff839b05..cbfa1c80 100644 --- a/lib/auth0/organizations/types/update_organization_request_content.rb +++ b/lib/auth0/organizations/types/update_organization_request_content.rb @@ -17,6 +17,8 @@ class UpdateOrganizationRequestContent < Internal::Types::Model field :token_quota, -> { Auth0::Types::UpdateTokenQuota }, 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/roles/client.rb b/lib/auth0/roles/client.rb index ca204291..3140a591 100644 --- a/lib/auth0/roles/client.rb +++ b/lib/auth0/roles/client.rb @@ -26,6 +26,8 @@ def initialize(client:) # @option params [Integer, nil] :page # @option params [Boolean, nil] :include_totals # @option params [String, nil] :name_filter + # @option params [Auth0::Types::RoleTypeEnum, nil] :type + # @option params [String, nil] :owner_id # # @return [Auth0::Types::ListRolesOffsetPaginatedResponseContent] def list(request_options: {}, **params) @@ -35,6 +37,8 @@ def list(request_options: {}, **params) query_params["page"] = params.fetch(:page, 0) query_params["include_totals"] = params.fetch(:include_totals, true) query_params["name_filter"] = params[:name_filter] if params.key?(:name_filter) + query_params["type"] = params[:type] if params.key?(:type) + query_params["owner_id"] = params[:owner_id] if params.key?(:owner_id) Auth0::Internal::OffsetItemIterator.new( initial_page: query_params["page"], diff --git a/lib/auth0/roles/types/create_role_request_content.rb b/lib/auth0/roles/types/create_role_request_content.rb index 7e72154c..16d0895d 100644 --- a/lib/auth0/roles/types/create_role_request_content.rb +++ b/lib/auth0/roles/types/create_role_request_content.rb @@ -7,6 +7,10 @@ class CreateRoleRequestContent < Internal::Types::Model field :name, -> { String }, optional: false, nullable: false field :description, -> { String }, optional: true, nullable: false + + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/roles/types/list_roles_request_parameters.rb b/lib/auth0/roles/types/list_roles_request_parameters.rb index e225b3e7..24208c2d 100644 --- a/lib/auth0/roles/types/list_roles_request_parameters.rb +++ b/lib/auth0/roles/types/list_roles_request_parameters.rb @@ -11,6 +11,10 @@ class ListRolesRequestParameters < Internal::Types::Model field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false field :name_filter, -> { String }, optional: true, nullable: false + + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/roles/users/client.rb b/lib/auth0/roles/users/client.rb index 11628408..93b42f6d 100644 --- a/lib/auth0/roles/users/client.rb +++ b/lib/auth0/roles/users/client.rb @@ -15,6 +15,9 @@ def initialize(client:) # Assigned to # Roles](https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles). # + # **Note**: Returns only users with direct role assignments. For groups assigned to this role, use `GET + # /api/v2/roles/{id}/groups`. + # # This endpoint supports two types of pagination: # # - Offset pagination @@ -41,6 +44,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String] :id + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -48,6 +52,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/roles/users/types/list_role_users_request_parameters.rb b/lib/auth0/roles/users/types/list_role_users_request_parameters.rb index 07fbd82d..3ce8bbf4 100644 --- a/lib/auth0/roles/users/types/list_role_users_request_parameters.rb +++ b/lib/auth0/roles/users/types/list_role_users_request_parameters.rb @@ -7,6 +7,8 @@ module Types class ListRoleUsersRequestParameters < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/types/acul_context_enum.rb b/lib/auth0/types/acul_context_enum.rb index 90183410..464318ac 100644 --- a/lib/auth0/types/acul_context_enum.rb +++ b/lib/auth0/types/acul_context_enum.rb @@ -7,6 +7,7 @@ module AculContextEnum BRANDING_SETTINGS = "branding.settings" BRANDING_THEMES_DEFAULT = "branding.themes.default" + COUNTRY_CODES = "country_codes" CLIENT_LOGO_URI = "client.logo_uri" CLIENT_DESCRIPTION = "client.description" ORGANIZATION_DISPLAY_NAME = "organization.display_name" diff --git a/lib/auth0/types/agent_metadata.rb b/lib/auth0/types/agent_metadata.rb new file mode 100644 index 00000000..49acf806 --- /dev/null +++ b/lib/auth0/types/agent_metadata.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module AgentMetadata + # AgentMetadata is an alias for Hash + + # @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/agent_response_content.rb b/lib/auth0/types/agent_response_content.rb new file mode 100644 index 00000000..bf90bfd1 --- /dev/null +++ b/lib/auth0/types/agent_response_content.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class AgentResponseContent < Internal::Types::Model + field :agent_id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :created_at, -> { String }, optional: false, nullable: false + + field :updated_at, -> { String }, optional: false, nullable: false + + field :external_agent_id, -> { String }, optional: true, nullable: false + + field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/conflict_schema.rb b/lib/auth0/types/conflict_schema.rb new file mode 100644 index 00000000..7ea94b9b --- /dev/null +++ b/lib/auth0/types/conflict_schema.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Conflict + class ConflictSchema < Internal::Types::Model + field :message, -> { String }, optional: false, nullable: false + + field :status_code, -> { String }, optional: false, nullable: false, api_name: "statusCode" + + field :error, -> { Auth0::Types::ConflictSchemaError }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/conflict_schema_error.rb b/lib/auth0/types/conflict_schema_error.rb new file mode 100644 index 00000000..2376e460 --- /dev/null +++ b/lib/auth0/types/conflict_schema_error.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module ConflictSchemaError + extend Auth0::Internal::Types::Enum + + CONFLICT = "Conflict" + end + end +end diff --git a/lib/auth0/types/connection_connected_accounts_purpose.rb b/lib/auth0/types/connection_connected_accounts_purpose.rb index 3792ad2d..61dd1a70 100644 --- a/lib/auth0/types/connection_connected_accounts_purpose.rb +++ b/lib/auth0/types/connection_connected_accounts_purpose.rb @@ -7,6 +7,8 @@ class ConnectionConnectedAccountsPurpose < Internal::Types::Model field :active, -> { Internal::Types::Boolean }, optional: false, nullable: false field :cross_app_access, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :allow_missing_user_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/connection_connected_accounts_purpose_xaa.rb b/lib/auth0/types/connection_connected_accounts_purpose_xaa.rb index 108c498f..5fb372cc 100644 --- a/lib/auth0/types/connection_connected_accounts_purpose_xaa.rb +++ b/lib/auth0/types/connection_connected_accounts_purpose_xaa.rb @@ -7,6 +7,8 @@ class ConnectionConnectedAccountsPurposeXaa < Internal::Types::Model field :cross_app_access, -> { Internal::Types::Boolean }, optional: true, nullable: false field :active, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :allow_missing_user_id, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/create_organization_client_request_item.rb b/lib/auth0/types/create_organization_client_request_item.rb new file mode 100644 index 00000000..f3c5f9ee --- /dev/null +++ b/lib/auth0/types/create_organization_client_request_item.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class CreateOrganizationClientRequestItem < Internal::Types::Model + field :client_id, -> { String }, optional: false, nullable: false + + field :use_for_member_access, -> { Internal::Types::Boolean }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/create_organization_clients_response_content.rb b/lib/auth0/types/create_organization_clients_response_content.rb new file mode 100644 index 00000000..96bfd732 --- /dev/null +++ b/lib/auth0/types/create_organization_clients_response_content.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module CreateOrganizationClientsResponseContent + # CreateOrganizationClientsResponseContent 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_organization_response_content.rb b/lib/auth0/types/create_organization_response_content.rb index a9b187a5..6afbfed3 100644 --- a/lib/auth0/types/create_organization_response_content.rb +++ b/lib/auth0/types/create_organization_response_content.rb @@ -17,6 +17,10 @@ class CreateOrganizationResponseContent < Internal::Types::Model field :third_party_client_access, -> { Auth0::Types::OrganizationThirdPartyClientAccessEnum }, optional: true, nullable: false + field :is_app_entitlement_active, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :client, -> { Auth0::Types::OrganizationClientAssociation }, optional: true, nullable: false + field :enabled_connections, -> { Internal::Types::Array[Auth0::Types::OrganizationEnabledConnection] }, optional: true, nullable: false end end diff --git a/lib/auth0/types/create_role_response_content.rb b/lib/auth0/types/create_role_response_content.rb index 5f8b81dd..81082163 100644 --- a/lib/auth0/types/create_role_response_content.rb +++ b/lib/auth0/types/create_role_response_content.rb @@ -8,6 +8,10 @@ class CreateRoleResponseContent < Internal::Types::Model field :name, -> { String }, optional: true, nullable: false field :description, -> { String }, optional: true, nullable: false + + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/event_stream_cloud_event.rb b/lib/auth0/types/event_stream_cloud_event.rb index b80a7610..890cf702 100644 --- a/lib/auth0/types/event_stream_cloud_event.rb +++ b/lib/auth0/types/event_stream_cloud_event.rb @@ -14,7 +14,7 @@ class EventStreamCloudEvent < Internal::Types::Model field :time, -> { String }, optional: true, nullable: false - field :data, -> { String }, optional: true, nullable: false + field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/event_stream_cloud_event_data.rb b/lib/auth0/types/event_stream_cloud_event_data.rb new file mode 100644 index 00000000..46c8bf95 --- /dev/null +++ b/lib/auth0/types/event_stream_cloud_event_data.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module EventStreamCloudEventData + # EventStreamCloudEventData is an alias for Hash + + # @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/event_stream_delivery_attempt.rb b/lib/auth0/types/event_stream_delivery_attempt.rb index 029fe9df..74789ef6 100644 --- a/lib/auth0/types/event_stream_delivery_attempt.rb +++ b/lib/auth0/types/event_stream_delivery_attempt.rb @@ -8,6 +8,8 @@ class EventStreamDeliveryAttempt < Internal::Types::Model field :timestamp, -> { String }, optional: false, nullable: false field :error_message, -> { String }, optional: true, nullable: false + + field :duration, -> { Integer }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/get_organization_by_name_response_content.rb b/lib/auth0/types/get_organization_by_name_response_content.rb index 0aba2085..1c0a8615 100644 --- a/lib/auth0/types/get_organization_by_name_response_content.rb +++ b/lib/auth0/types/get_organization_by_name_response_content.rb @@ -16,6 +16,10 @@ class GetOrganizationByNameResponseContent < Internal::Types::Model 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 + + field :client, -> { Auth0::Types::OrganizationClientAssociation }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/get_organization_client_response_content.rb b/lib/auth0/types/get_organization_client_response_content.rb new file mode 100644 index 00000000..6387f702 --- /dev/null +++ b/lib/auth0/types/get_organization_client_response_content.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class GetOrganizationClientResponseContent < Internal::Types::Model + field :client_id, -> { String }, optional: false, nullable: false + + field :use_for_member_access, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :client, -> { Auth0::Types::OrganizationClientMetadata }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/get_organization_response_content.rb b/lib/auth0/types/get_organization_response_content.rb index a9930b84..13355bdd 100644 --- a/lib/auth0/types/get_organization_response_content.rb +++ b/lib/auth0/types/get_organization_response_content.rb @@ -16,6 +16,10 @@ class GetOrganizationResponseContent < Internal::Types::Model 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 + + field :client, -> { Auth0::Types::OrganizationClientAssociation }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/get_role_response_content.rb b/lib/auth0/types/get_role_response_content.rb index 041d5b89..2c0d59ac 100644 --- a/lib/auth0/types/get_role_response_content.rb +++ b/lib/auth0/types/get_role_response_content.rb @@ -8,6 +8,10 @@ class GetRoleResponseContent < Internal::Types::Model field :name, -> { String }, optional: true, nullable: false field :description, -> { String }, optional: true, nullable: false + + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/guardian_factor.rb b/lib/auth0/types/guardian_factor.rb index d7831b18..d1917ebf 100644 --- a/lib/auth0/types/guardian_factor.rb +++ b/lib/auth0/types/guardian_factor.rb @@ -8,6 +8,8 @@ class GuardianFactor < Internal::Types::Model field :trial_expired, -> { Internal::Types::Boolean }, optional: true, nullable: false field :name, -> { Auth0::Types::GuardianFactorNameEnum }, optional: true, nullable: false + + field :settings, -> { Auth0::Types::GuardianFactorSettings }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/guardian_factor_settings.rb b/lib/auth0/types/guardian_factor_settings.rb new file mode 100644 index 00000000..80048b69 --- /dev/null +++ b/lib/auth0/types/guardian_factor_settings.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Factor-specific settings. Only returned when include_settings=true. + class GuardianFactorSettings < Internal::Types::Model + field :otp_length, -> { Integer }, optional: true, nullable: false + + field :otp_expiration_time, -> { Integer }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/list_agents_response_content.rb b/lib/auth0/types/list_agents_response_content.rb new file mode 100644 index 00000000..92434e08 --- /dev/null +++ b/lib/auth0/types/list_agents_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class ListAgentsResponseContent < Internal::Types::Model + field :agents, -> { Internal::Types::Array[Auth0::Types::AgentResponseContent] }, optional: false, nullable: false + + field :next_, -> { String }, optional: true, nullable: false, api_name: "next" + end + end +end diff --git a/lib/auth0/types/list_event_stream_deliveries_response_content.rb b/lib/auth0/types/list_event_stream_deliveries_response_content.rb new file mode 100644 index 00000000..86f32137 --- /dev/null +++ b/lib/auth0/types/list_event_stream_deliveries_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class ListEventStreamDeliveriesResponseContent < Internal::Types::Model + field :deliveries, -> { Internal::Types::Array[Auth0::Types::EventStreamDelivery] }, optional: false, nullable: false + + field :next_, -> { String }, optional: true, nullable: false, api_name: "next" + end + end +end diff --git a/lib/auth0/types/list_organization_clients_response_content.rb b/lib/auth0/types/list_organization_clients_response_content.rb new file mode 100644 index 00000000..ca9ffa3f --- /dev/null +++ b/lib/auth0/types/list_organization_clients_response_content.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class ListOrganizationClientsResponseContent < Internal::Types::Model + field :clients, -> { Internal::Types::Array[Auth0::Types::OrganizationClient] }, optional: false, nullable: false + + field :next_, -> { String }, optional: true, nullable: false, api_name: "next" + end + end +end diff --git a/lib/auth0/types/list_organization_role_groups_response_content.rb b/lib/auth0/types/list_organization_role_groups_response_content.rb new file mode 100644 index 00000000..8b67ee02 --- /dev/null +++ b/lib/auth0/types/list_organization_role_groups_response_content.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Checkpoint paginated list of groups assigned to a role within an organization. + class ListOrganizationRoleGroupsResponseContent < Internal::Types::Model + field :groups, -> { Internal::Types::Array[Auth0::Types::RoleGroup] }, optional: false, nullable: false + + field :next_, -> { String }, optional: true, nullable: false, api_name: "next" + end + end +end diff --git a/lib/auth0/types/not_found_schema.rb b/lib/auth0/types/not_found_schema.rb new file mode 100644 index 00000000..9f7a320c --- /dev/null +++ b/lib/auth0/types/not_found_schema.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Not Found + class NotFoundSchema < Internal::Types::Model + field :message, -> { String }, optional: false, nullable: false + + field :status_code, -> { String }, optional: false, nullable: false, api_name: "statusCode" + + field :error, -> { Auth0::Types::NotFoundSchemaError }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/not_found_schema_error.rb b/lib/auth0/types/not_found_schema_error.rb new file mode 100644 index 00000000..f84fecbc --- /dev/null +++ b/lib/auth0/types/not_found_schema_error.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module NotFoundSchemaError + extend Auth0::Internal::Types::Enum + + NOT_FOUND = "Not Found" + end + end +end diff --git a/lib/auth0/types/oauth_scope.rb b/lib/auth0/types/oauth_scope.rb index 4d278341..24c0490c 100644 --- a/lib/auth0/types/oauth_scope.rb +++ b/lib/auth0/types/oauth_scope.rb @@ -9,6 +9,10 @@ module OauthScope READ_ACTIONS = "read:actions" UPDATE_ACTIONS = "update:actions" DELETE_ACTIONS = "delete:actions" + CREATE_AGENTS = "create:agents" + READ_AGENTS = "read:agents" + UPDATE_AGENTS = "update:agents" + DELETE_AGENTS = "delete:agents" READ_ANOMALY_BLOCKS = "read:anomaly_blocks" DELETE_ANOMALY_BLOCKS = "delete:anomaly_blocks" READ_ATTACK_PROTECTION = "read:attack_protection" @@ -241,6 +245,10 @@ module OauthScope READ_VDCS_TEMPLATES = "read:vdcs_templates" UPDATE_VDCS_TEMPLATES = "update:vdcs_templates" DELETE_VDCS_TEMPLATES = "delete:vdcs_templates" + CREATE_ORGANIZATION_CLIENTS = "create:organization_clients" + READ_ORGANIZATION_CLIENTS = "read:organization_clients" + UPDATE_ORGANIZATION_CLIENTS = "update:organization_clients" + DELETE_ORGANIZATION_CLIENTS = "delete:organization_clients" end end end diff --git a/lib/auth0/types/organization.rb b/lib/auth0/types/organization.rb index 61d4f634..5f6f6d66 100644 --- a/lib/auth0/types/organization.rb +++ b/lib/auth0/types/organization.rb @@ -16,6 +16,10 @@ class Organization < Internal::Types::Model 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 + + field :client, -> { Auth0::Types::OrganizationClientAssociation }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/organization_client.rb b/lib/auth0/types/organization_client.rb new file mode 100644 index 00000000..3e25c1ce --- /dev/null +++ b/lib/auth0/types/organization_client.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class OrganizationClient < Internal::Types::Model + field :client_id, -> { String }, optional: false, nullable: false + + field :use_for_member_access, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :client, -> { Auth0::Types::OrganizationClientMetadata }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/organization_client_association.rb b/lib/auth0/types/organization_client_association.rb new file mode 100644 index 00000000..19ea00d4 --- /dev/null +++ b/lib/auth0/types/organization_client_association.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # The organization's association with the client passed in the include_client_association_for query + # parameter. + class OrganizationClientAssociation < Internal::Types::Model + field :use_for_member_access, -> { Internal::Types::Boolean }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/organization_client_metadata.rb b/lib/auth0/types/organization_client_metadata.rb new file mode 100644 index 00000000..0533fbe2 --- /dev/null +++ b/lib/auth0/types/organization_client_metadata.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # Metadata about the associated client. + class OrganizationClientMetadata < Internal::Types::Model + field :name, -> { String }, optional: true, nullable: false + + field :app_type, -> { String }, optional: true, nullable: false + + field :logo_uri, -> { String }, optional: true, nullable: false + + field :is_first_party, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :grant_types, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :organization_usage, -> { Auth0::Types::OrganizationClientMetadataOrganizationUsageEnum }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/organization_client_metadata_organization_usage_enum.rb b/lib/auth0/types/organization_client_metadata_organization_usage_enum.rb new file mode 100644 index 00000000..0f860b46 --- /dev/null +++ b/lib/auth0/types/organization_client_metadata_organization_usage_enum.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module OrganizationClientMetadataOrganizationUsageEnum + extend Auth0::Internal::Types::Enum + + DENY = "deny" + ALLOW = "allow" + REQUIRE = "require" + end + end +end diff --git a/lib/auth0/types/role.rb b/lib/auth0/types/role.rb index 552bcbb0..211162b3 100644 --- a/lib/auth0/types/role.rb +++ b/lib/auth0/types/role.rb @@ -8,6 +8,10 @@ class Role < Internal::Types::Model field :name, -> { String }, optional: true, nullable: false field :description, -> { String }, optional: true, nullable: false + + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/role_group.rb b/lib/auth0/types/role_group.rb new file mode 100644 index 00000000..b72f5cc4 --- /dev/null +++ b/lib/auth0/types/role_group.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Auth0 + module Types + # A group assigned to a role in the context of an organization. + class RoleGroup < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: false, nullable: false + + field :external_id, -> { String }, optional: true, nullable: false + + field :connection_id, -> { String }, optional: true, nullable: false + + field :organization_id, -> { String }, optional: true, nullable: false + + field :tenant_name, -> { String }, optional: true, nullable: false + + field :description, -> { String }, optional: true, nullable: false + + field :created_at, -> { String }, optional: true, nullable: false + + field :updated_at, -> { String }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/role_type_enum.rb b/lib/auth0/types/role_type_enum.rb new file mode 100644 index 00000000..688de69c --- /dev/null +++ b/lib/auth0/types/role_type_enum.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Auth0 + module Types + module RoleTypeEnum + extend Auth0::Internal::Types::Enum + + TENANT = "tenant" + ORGANIZATION = "organization" + end + end +end diff --git a/lib/auth0/types/self_service_profile_sso_ticket_google_workspace_config.rb b/lib/auth0/types/self_service_profile_sso_ticket_google_workspace_config.rb index 4abe29a8..ca07f267 100644 --- a/lib/auth0/types/self_service_profile_sso_ticket_google_workspace_config.rb +++ b/lib/auth0/types/self_service_profile_sso_ticket_google_workspace_config.rb @@ -5,6 +5,8 @@ module Types # Configuration for Google Workspace Directory Sync during the self-service flow. class SelfServiceProfileSSOTicketGoogleWorkspaceConfig < Internal::Types::Model field :sync_users, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :sync_groups, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/synchronized_group_payload.rb b/lib/auth0/types/synchronized_group_payload.rb index 75fc0335..44d49173 100644 --- a/lib/auth0/types/synchronized_group_payload.rb +++ b/lib/auth0/types/synchronized_group_payload.rb @@ -4,6 +4,12 @@ module Auth0 module Types class SynchronizedGroupPayload < Internal::Types::Model field :id, -> { String }, optional: false, nullable: false + + field :name, -> { String }, optional: true, nullable: false + + field :email, -> { String }, optional: true, nullable: false + + field :direct_members_count, -> { Integer }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/synchronized_group_selection_id.rb b/lib/auth0/types/synchronized_group_selection_id.rb new file mode 100644 index 00000000..1c57f4f6 --- /dev/null +++ b/lib/auth0/types/synchronized_group_selection_id.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class SynchronizedGroupSelectionID < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + end + end +end diff --git a/lib/auth0/types/update_organization_client_response_content.rb b/lib/auth0/types/update_organization_client_response_content.rb new file mode 100644 index 00000000..dd8ace88 --- /dev/null +++ b/lib/auth0/types/update_organization_client_response_content.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Auth0 + module Types + class UpdateOrganizationClientResponseContent < Internal::Types::Model + field :client_id, -> { String }, optional: false, nullable: false + + field :use_for_member_access, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :client, -> { Auth0::Types::OrganizationClientMetadata }, optional: true, nullable: false + end + end +end diff --git a/lib/auth0/types/update_organization_response_content.rb b/lib/auth0/types/update_organization_response_content.rb index d4791ee2..921e9c48 100644 --- a/lib/auth0/types/update_organization_response_content.rb +++ b/lib/auth0/types/update_organization_response_content.rb @@ -16,6 +16,10 @@ class UpdateOrganizationResponseContent < Internal::Types::Model 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 + + field :client, -> { Auth0::Types::OrganizationClientAssociation }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/update_role_response_content.rb b/lib/auth0/types/update_role_response_content.rb index 6d552386..9e33ac9a 100644 --- a/lib/auth0/types/update_role_response_content.rb +++ b/lib/auth0/types/update_role_response_content.rb @@ -8,6 +8,10 @@ class UpdateRoleResponseContent < Internal::Types::Model field :name, -> { String }, optional: true, nullable: false field :description, -> { String }, optional: true, nullable: false + + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false end end end diff --git a/lib/auth0/types/user_effective_permission_role_source_response_content.rb b/lib/auth0/types/user_effective_permission_role_source_response_content.rb index 7a78d47a..ba791030 100644 --- a/lib/auth0/types/user_effective_permission_role_source_response_content.rb +++ b/lib/auth0/types/user_effective_permission_role_source_response_content.rb @@ -9,6 +9,10 @@ class UserEffectivePermissionRoleSourceResponseContent < Internal::Types::Model field :description, -> { String }, optional: true, nullable: false + field :type, -> { Auth0::Types::RoleTypeEnum }, optional: true, nullable: false + + field :owner_id, -> { String }, optional: true, nullable: false + field :sources, -> { Internal::Types::Array[Auth0::Types::UserEffectivePermissionRoleSourceEnum] }, optional: true, nullable: false end end diff --git a/lib/auth0/users/groups/client.rb b/lib/auth0/users/groups/client.rb index 7eac1aea..9302a5eb 100644 --- a/lib/auth0/users/groups/client.rb +++ b/lib/auth0/users/groups/client.rb @@ -23,6 +23,7 @@ def initialize(client:) # @option params [String] :id # @option params [String, nil] :fields # @option params [Boolean, nil] :include_fields + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -32,6 +33,7 @@ def get(request_options: {}, **params) query_params = {} query_params["fields"] = params[:fields] if params.key?(:fields) query_params["include_fields"] = params[:include_fields] if params.key?(:include_fields) + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/users/groups/types/get_user_groups_request_parameters.rb b/lib/auth0/users/groups/types/get_user_groups_request_parameters.rb index f60d898b..7078cc49 100644 --- a/lib/auth0/users/groups/types/get_user_groups_request_parameters.rb +++ b/lib/auth0/users/groups/types/get_user_groups_request_parameters.rb @@ -11,6 +11,8 @@ class GetUserGroupsRequestParameters < Internal::Types::Model field :include_fields, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/users/permissions/client.rb b/lib/auth0/users/permissions/client.rb index 06d7564b..ac7872a2 100644 --- a/lib/auth0/users/permissions/client.rb +++ b/lib/auth0/users/permissions/client.rb @@ -13,6 +13,9 @@ def initialize(client:) # Retrieve all permissions associated with the user. # + # **Note**: Returns only permissions from direct assignments and directly assigned roles. For permissions a user + # has via group-based role assignments, use `GET /api/v2/users/{id}/effective-permissions`. + # # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/auth0/users/refresh_token/client.rb b/lib/auth0/users/refresh_token/client.rb index 9a98017d..f0cc97f5 100644 --- a/lib/auth0/users/refresh_token/client.rb +++ b/lib/auth0/users/refresh_token/client.rb @@ -21,6 +21,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -28,6 +29,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/users/refresh_token/types/list_refresh_tokens_request_parameters.rb b/lib/auth0/users/refresh_token/types/list_refresh_tokens_request_parameters.rb index 7359713b..0cb6021c 100644 --- a/lib/auth0/users/refresh_token/types/list_refresh_tokens_request_parameters.rb +++ b/lib/auth0/users/refresh_token/types/list_refresh_tokens_request_parameters.rb @@ -7,6 +7,8 @@ module Types class ListRefreshTokensRequestParameters < Internal::Types::Model field :user_id, -> { String }, optional: false, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/lib/auth0/users/roles/client.rb b/lib/auth0/users/roles/client.rb index c948a452..1c430bf3 100644 --- a/lib/auth0/users/roles/client.rb +++ b/lib/auth0/users/roles/client.rb @@ -17,6 +17,9 @@ def initialize(client:) # Organization-specific roles, use the following endpoint: [Get user roles assigned to an Organization # member](https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles). # + # **Note**: Returns only direct role assignments. To also include group-based role assignments, use `GET + # /api/v2/users/{id}/effective-roles`. + # # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/auth0/users/sessions/client.rb b/lib/auth0/users/sessions/client.rb index af970624..116b3fbb 100644 --- a/lib/auth0/users/sessions/client.rb +++ b/lib/auth0/users/sessions/client.rb @@ -21,6 +21,7 @@ def initialize(client:) # @option request_options [Hash{String => Object}] :additional_body_parameters # @option request_options [Integer] :timeout_in_seconds # @option params [String] :user_id + # @option params [Boolean, nil] :include_totals # @option params [String, nil] :from # @option params [Integer, nil] :take # @@ -28,6 +29,7 @@ def initialize(client:) def list(request_options: {}, **params) params = Auth0::Internal::Types::Utils.normalize_keys(params) query_params = {} + query_params["include_totals"] = params.fetch(:include_totals, true) query_params["from"] = params[:from] if params.key?(:from) query_params["take"] = params.fetch(:take, 50) diff --git a/lib/auth0/users/sessions/types/list_user_sessions_request_parameters.rb b/lib/auth0/users/sessions/types/list_user_sessions_request_parameters.rb index e7a53b92..dc6802b4 100644 --- a/lib/auth0/users/sessions/types/list_user_sessions_request_parameters.rb +++ b/lib/auth0/users/sessions/types/list_user_sessions_request_parameters.rb @@ -7,6 +7,8 @@ module Types class ListUserSessionsRequestParameters < Internal::Types::Model field :user_id, -> { String }, optional: false, nullable: false + field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false + field :from, -> { String }, optional: true, nullable: false field :take, -> { Integer }, optional: true, nullable: false diff --git a/test/wire/agents_test.rb b/test/wire/agents_test.rb new file mode 100644 index 00000000..1a992d36 --- /dev/null +++ b/test/wire/agents_test.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +require_relative "wiremock_test_case" + +class AgentsWireTest < WireMockTestCase + def setup + super + + @client = Auth0::Management.new( + token: "", + base_url: WIREMOCK_BASE_URL + ) + end + + def test_agents_list_with_wiremock + test_id = "agents.list.0" + + result = @client.agents.list( + from: "from", + take: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "agents.list.0" + } + } + ) + result.pages.next_page + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/agents", + query_params: nil, + expected: 1 + ) + end + + def test_agents_create_with_wiremock + test_id = "agents.create.0" + + @client.agents.create( + name: "name", + request_options: { + additional_headers: { + "X-Test-Id" => "agents.create.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "POST", + url_path: "/agents", + query_params: nil, + expected: 1 + ) + end + + def test_agents_read_with_wiremock + test_id = "agents.read.0" + + @client.agents.read( + id: "id", + request_options: { + additional_headers: { + "X-Test-Id" => "agents.read.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/agents/id", + query_params: nil, + expected: 1 + ) + end + + def test_agents_delete_with_wiremock + test_id = "agents.delete.0" + + @client.agents.delete( + id: "id", + request_options: { + additional_headers: { + "X-Test-Id" => "agents.delete.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "DELETE", + url_path: "/agents/id", + query_params: nil, + expected: 1 + ) + end + + def test_agents_update_with_wiremock + test_id = "agents.update.0" + + @client.agents.update( + id: "id", + request_options: { + additional_headers: { + "X-Test-Id" => "agents.update.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "PATCH", + url_path: "/agents/id", + query_params: nil, + expected: 1 + ) + end +end diff --git a/test/wire/client_grants_organizations_test.rb b/test/wire/client_grants_organizations_test.rb index c7962834..664c5ae4 100644 --- a/test/wire/client_grants_organizations_test.rb +++ b/test/wire/client_grants_organizations_test.rb @@ -17,6 +17,7 @@ def test_client_grants_organizations_list_with_wiremock result = @client.client_grants.organizations.list( id: "id", + include_totals: true, from: "from", take: 1, request_options: { diff --git a/test/wire/client_grants_test.rb b/test/wire/client_grants_test.rb index c8e73732..20775559 100644 --- a/test/wire/client_grants_test.rb +++ b/test/wire/client_grants_test.rb @@ -16,6 +16,7 @@ def test_client_grants_list_with_wiremock test_id = "client_grants.list.0" result = @client.client_grants.list( + include_totals: true, from: "from", take: 1, audience: "audience", diff --git a/test/wire/connections_directory_provisioning_test.rb b/test/wire/connections_directory_provisioning_test.rb index bbc9ce4f..5dcf74f9 100644 --- a/test/wire/connections_directory_provisioning_test.rb +++ b/test/wire/connections_directory_provisioning_test.rb @@ -149,6 +149,7 @@ def test_connections_directory_provisioning_list_synchronized_groups_with_wiremo id: "id", from: "from", take: 1, + q: "q", request_options: { additional_headers: { "X-Test-Id" => "connections.directory_provisioning.list_synchronized_groups.0" @@ -166,6 +167,30 @@ def test_connections_directory_provisioning_list_synchronized_groups_with_wiremo ) end + def test_connections_directory_provisioning_add_synchronized_group_selections_with_wiremock + test_id = "connections.directory_provisioning.add_synchronized_group_selections.0" + + @client.connections.directory_provisioning.add_synchronized_group_selections( + id: "id", + groups: [{ + id: "id" + }], + request_options: { + additional_headers: { + "X-Test-Id" => "connections.directory_provisioning.add_synchronized_group_selections.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "POST", + url_path: "/connections/id/directory-provisioning/synchronized-groups", + query_params: nil, + expected: 1 + ) + end + def test_connections_directory_provisioning_set_with_wiremock test_id = "connections.directory_provisioning.set.0" @@ -189,4 +214,28 @@ def test_connections_directory_provisioning_set_with_wiremock expected: 1 ) end + + def test_connections_directory_provisioning_delete_synchronized_group_selections_with_wiremock + test_id = "connections.directory_provisioning.delete_synchronized_group_selections.0" + + @client.connections.directory_provisioning.delete_synchronized_group_selections( + id: "id", + groups: [{ + id: "id" + }], + request_options: { + additional_headers: { + "X-Test-Id" => "connections.directory_provisioning.delete_synchronized_group_selections.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "DELETE", + url_path: "/connections/id/directory-provisioning/synchronized-groups", + query_params: nil, + expected: 1 + ) + end end diff --git a/test/wire/connections_test.rb b/test/wire/connections_test.rb index 940923e5..90d949ff 100644 --- a/test/wire/connections_test.rb +++ b/test/wire/connections_test.rb @@ -16,6 +16,7 @@ def test_connections_list_with_wiremock test_id = "connections.list.0" result = @client.connections.list( + include_totals: true, from: "from", take: 1, strategy: ["ad"], diff --git a/test/wire/event_streams_deliveries_test.rb b/test/wire/event_streams_deliveries_test.rb index 80b77b3d..bb86bf70 100644 --- a/test/wire/event_streams_deliveries_test.rb +++ b/test/wire/event_streams_deliveries_test.rb @@ -15,7 +15,7 @@ def setup def test_event_streams_deliveries_list_with_wiremock test_id = "event_streams.deliveries.list.0" - @client.event_streams.deliveries.list( + result = @client.event_streams.deliveries.list( id: "id", statuses: "statuses", event_types: "event_types", @@ -29,6 +29,7 @@ def test_event_streams_deliveries_list_with_wiremock } } ) + result.pages.next_page verify_request_count( test_id: test_id, diff --git a/test/wire/flows_executions_test.rb b/test/wire/flows_executions_test.rb index 9b683c5d..cb83cc4c 100644 --- a/test/wire/flows_executions_test.rb +++ b/test/wire/flows_executions_test.rb @@ -17,6 +17,7 @@ def test_flows_executions_list_with_wiremock result = @client.flows.executions.list( flow_id: "flow_id", + include_totals: true, from: "from", take: 1, request_options: { diff --git a/test/wire/groups_test.rb b/test/wire/groups_test.rb index 905907eb..e24a119e 100644 --- a/test/wire/groups_test.rb +++ b/test/wire/groups_test.rb @@ -22,6 +22,7 @@ def test_groups_list_with_wiremock search: "search", fields: "fields", include_fields: true, + include_totals: true, from: "from", take: 1, request_options: { diff --git a/test/wire/organizations_clients_test.rb b/test/wire/organizations_clients_test.rb new file mode 100644 index 00000000..fefc5339 --- /dev/null +++ b/test/wire/organizations_clients_test.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +require_relative "wiremock_test_case" + +class OrganizationsClientsWireTest < WireMockTestCase + def setup + super + + @client = Auth0::Management.new( + token: "", + base_url: WIREMOCK_BASE_URL + ) + end + + def test_organizations_clients_list_with_wiremock + test_id = "organizations.clients.list.0" + + result = @client.organizations.clients.list( + id: "id", + from: "from", + take: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.clients.list.0" + } + } + ) + result.pages.next_page + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/organizations/id/clients", + query_params: nil, + expected: 1 + ) + end + + def test_organizations_clients_create_with_wiremock + test_id = "organizations.clients.create.0" + + @client.organizations.clients.create( + id: "id", + clients: [{ + client_id: "client_id", + use_for_member_access: true + }], + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.clients.create.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "POST", + url_path: "/organizations/id/clients", + query_params: nil, + expected: 1 + ) + end + + def test_organizations_clients_delete_with_wiremock + test_id = "organizations.clients.delete.0" + + @client.organizations.clients.delete( + id: "id", + clients: ["clients"], + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.clients.delete.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "DELETE", + url_path: "/organizations/id/clients", + query_params: nil, + expected: 1 + ) + end + + def test_organizations_clients_get_with_wiremock + test_id = "organizations.clients.get.0" + + @client.organizations.clients.get( + id: "id", + client_id: "client_id", + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.clients.get.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/organizations/id/clients/client_id", + query_params: nil, + expected: 1 + ) + end + + def test_organizations_clients_update_with_wiremock + test_id = "organizations.clients.update.0" + + @client.organizations.clients.update( + id: "id", + client_id: "client_id", + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.clients.update.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "PATCH", + url_path: "/organizations/id/clients/client_id", + query_params: nil, + expected: 1 + ) + end +end diff --git a/test/wire/organizations_members_test.rb b/test/wire/organizations_members_test.rb index 374ccacf..d3ae290c 100644 --- a/test/wire/organizations_members_test.rb +++ b/test/wire/organizations_members_test.rb @@ -17,6 +17,7 @@ def test_organizations_members_list_with_wiremock result = @client.organizations.members.list( id: "id", + include_totals: true, from: "from", take: 1, fields: "fields", diff --git a/test/wire/organizations_roles_groups_test.rb b/test/wire/organizations_roles_groups_test.rb new file mode 100644 index 00000000..1293a0a3 --- /dev/null +++ b/test/wire/organizations_roles_groups_test.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require_relative "wiremock_test_case" + +class OrganizationsRolesGroupsWireTest < WireMockTestCase + def setup + super + + @client = Auth0::Management.new( + token: "", + base_url: WIREMOCK_BASE_URL + ) + end + + def test_organizations_roles_groups_list_with_wiremock + test_id = "organizations.roles.groups.list.0" + + result = @client.organizations.roles.groups.list( + organization_id: "organization_id", + role_id: "role_id", + from: "from", + take: 1, + request_options: { + additional_headers: { + "X-Test-Id" => "organizations.roles.groups.list.0" + } + } + ) + result.pages.next_page + + verify_request_count( + test_id: test_id, + method: "GET", + url_path: "/organizations/organization_id/roles/role_id/groups", + query_params: nil, + expected: 1 + ) + end +end diff --git a/test/wire/organizations_test.rb b/test/wire/organizations_test.rb index 7ffa5446..d85f66d7 100644 --- a/test/wire/organizations_test.rb +++ b/test/wire/organizations_test.rb @@ -16,9 +16,11 @@ def test_organizations_list_with_wiremock test_id = "organizations.list.0" result = @client.organizations.list( + include_totals: true, from: "from", take: 1, sort: "sort", + include_client_association_for: "include_client_association_for", request_options: { additional_headers: { "X-Test-Id" => "organizations.list.0" diff --git a/test/wire/roles_test.rb b/test/wire/roles_test.rb index b6948671..eda1bd88 100644 --- a/test/wire/roles_test.rb +++ b/test/wire/roles_test.rb @@ -20,6 +20,8 @@ def test_roles_list_with_wiremock page: 1, include_totals: true, name_filter: "name_filter", + type: "tenant", + owner_id: "owner_id", request_options: { additional_headers: { "X-Test-Id" => "roles.list.0" diff --git a/test/wire/roles_users_test.rb b/test/wire/roles_users_test.rb index 37f6c8e6..dd2e10da 100644 --- a/test/wire/roles_users_test.rb +++ b/test/wire/roles_users_test.rb @@ -17,6 +17,7 @@ def test_roles_users_list_with_wiremock result = @client.roles.users.list( id: "id", + include_totals: true, from: "from", take: 1, request_options: { diff --git a/test/wire/users_groups_test.rb b/test/wire/users_groups_test.rb index 6c4c1d39..3c817c81 100644 --- a/test/wire/users_groups_test.rb +++ b/test/wire/users_groups_test.rb @@ -19,6 +19,7 @@ def test_users_groups_get_with_wiremock id: "id", fields: "fields", include_fields: true, + include_totals: true, from: "from", take: 1, request_options: { diff --git a/test/wire/users_refresh_token_test.rb b/test/wire/users_refresh_token_test.rb index cf3b6952..a220c48d 100644 --- a/test/wire/users_refresh_token_test.rb +++ b/test/wire/users_refresh_token_test.rb @@ -17,6 +17,7 @@ def test_users_refresh_token_list_with_wiremock result = @client.users.refresh_token.list( user_id: "user_id", + include_totals: true, from: "from", take: 1, request_options: { diff --git a/test/wire/users_sessions_test.rb b/test/wire/users_sessions_test.rb index 17abe6b7..8993b78b 100644 --- a/test/wire/users_sessions_test.rb +++ b/test/wire/users_sessions_test.rb @@ -17,6 +17,7 @@ def test_users_sessions_list_with_wiremock result = @client.users.sessions.list( user_id: "user_id", + include_totals: true, from: "from", take: 1, request_options: { diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json index e339c10b..9e0abf7f 100644 --- a/wiremock/wiremock-mappings.json +++ b/wiremock/wiremock-mappings.json @@ -268,6 +268,185 @@ } } }, + { + "id": "e57d3d93-924c-454b-894e-3e0deab81c8a", + "name": "Get agents - default", + "request": { + "urlPathTemplate": "/agents", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "queryParameters": { + "from": { + "equalTo": "from" + }, + "take": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"agents\": [\n {\n \"agent_id\": \"agent_id\",\n \"name\": \"name\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"external_agent_id\": \"external_agent_id\",\n \"metadata\": {\n \"key\": \"value\"\n }\n }\n ],\n \"next\": \"next\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e57d3d93-924c-454b-894e-3e0deab81c8a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "95ffdeb2-8e4d-45a8-b3e6-dfee451101bc", + "name": "Create an agent - default", + "request": { + "urlPathTemplate": "/agents", + "method": "POST", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"agent_id\": \"agent_id\",\n \"name\": \"name\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"external_agent_id\": \"external_agent_id\",\n \"metadata\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "95ffdeb2-8e4d-45a8-b3e6-dfee451101bc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e6eacf15-64ae-4475-9825-02e2304fc092", + "name": "Get an agent - default", + "request": { + "urlPathTemplate": "/agents/{id}", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"agent_id\": \"agent_id\",\n \"name\": \"name\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"external_agent_id\": \"external_agent_id\",\n \"metadata\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e6eacf15-64ae-4475-9825-02e2304fc092", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7077fe4c-7880-4955-9e36-8e52330fb15a", + "name": "Delete an agent - default", + "request": { + "urlPathTemplate": "/agents/{id}", + "method": "DELETE", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7077fe4c-7880-4955-9e36-8e52330fb15a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b357e80d-57fc-4f4a-becb-184125842929", + "name": "Update an agent - default", + "request": { + "urlPathTemplate": "/agents/{id}", + "method": "PATCH", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"agent_id\": \"agent_id\",\n \"name\": \"name\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\",\n \"external_agent_id\": \"external_agent_id\",\n \"metadata\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b357e80d-57fc-4f4a-becb-184125842929", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "0f76d290-6b70-4f62-abc8-3760917fe787", "name": "Get branding settings - default", @@ -343,6 +522,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -1093,6 +1275,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -1151,7 +1336,7 @@ }, "response": { "status": 201, - "body": "{\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"options\": {\n \"key\": \"value\"\n },\n \"id\": \"id\",\n \"strategy\": \"strategy\",\n \"realms\": [\n \"realms\"\n ],\n \"enabled_clients\": [\n \"enabled_clients\"\n ],\n \"is_domain_connection\": true,\n \"show_as_button\": true,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"authentication\": {\n \"active\": true\n },\n \"connected_accounts\": {\n \"active\": true,\n \"cross_app_access\": true\n },\n \"cross_app_access_requesting_app\": {\n \"active\": true\n },\n \"cross_app_access_resource_app\": {\n \"status\": \"enabled\"\n }\n}", + "body": "{\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"options\": {\n \"key\": \"value\"\n },\n \"id\": \"id\",\n \"strategy\": \"strategy\",\n \"realms\": [\n \"realms\"\n ],\n \"enabled_clients\": [\n \"enabled_clients\"\n ],\n \"is_domain_connection\": true,\n \"show_as_button\": true,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"authentication\": {\n \"active\": true\n },\n \"connected_accounts\": {\n \"active\": true,\n \"cross_app_access\": true,\n \"allow_missing_user_id\": true\n },\n \"cross_app_access_requesting_app\": {\n \"active\": true\n },\n \"cross_app_access_resource_app\": {\n \"status\": \"enabled\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -1195,7 +1380,7 @@ }, "response": { "status": 200, - "body": "{\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"options\": {\n \"key\": \"value\"\n },\n \"id\": \"id\",\n \"strategy\": \"strategy\",\n \"realms\": [\n \"realms\"\n ],\n \"enabled_clients\": [\n \"enabled_clients\"\n ],\n \"is_domain_connection\": true,\n \"show_as_button\": true,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"authentication\": {\n \"active\": true\n },\n \"connected_accounts\": {\n \"active\": true,\n \"cross_app_access\": true\n },\n \"cross_app_access_requesting_app\": {\n \"active\": true\n },\n \"cross_app_access_resource_app\": {\n \"status\": \"enabled\"\n }\n}", + "body": "{\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"options\": {\n \"key\": \"value\"\n },\n \"id\": \"id\",\n \"strategy\": \"strategy\",\n \"realms\": [\n \"realms\"\n ],\n \"enabled_clients\": [\n \"enabled_clients\"\n ],\n \"is_domain_connection\": true,\n \"show_as_button\": true,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"authentication\": {\n \"active\": true\n },\n \"connected_accounts\": {\n \"active\": true,\n \"cross_app_access\": true,\n \"allow_missing_user_id\": true\n },\n \"cross_app_access_requesting_app\": {\n \"active\": true\n },\n \"cross_app_access_resource_app\": {\n \"status\": \"enabled\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -1267,7 +1452,7 @@ }, "response": { "status": 200, - "body": "{\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"options\": {\n \"key\": \"value\"\n },\n \"id\": \"id\",\n \"strategy\": \"strategy\",\n \"realms\": [\n \"realms\"\n ],\n \"enabled_clients\": [\n \"enabled_clients\"\n ],\n \"is_domain_connection\": true,\n \"show_as_button\": true,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"authentication\": {\n \"active\": true\n },\n \"connected_accounts\": {\n \"active\": true,\n \"cross_app_access\": true\n },\n \"cross_app_access_requesting_app\": {\n \"active\": true\n },\n \"cross_app_access_resource_app\": {\n \"status\": \"enabled\"\n }\n}", + "body": "{\n \"name\": \"name\",\n \"display_name\": \"display_name\",\n \"options\": {\n \"key\": \"value\"\n },\n \"id\": \"id\",\n \"strategy\": \"strategy\",\n \"realms\": [\n \"realms\"\n ],\n \"enabled_clients\": [\n \"enabled_clients\"\n ],\n \"is_domain_connection\": true,\n \"show_as_button\": true,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"authentication\": {\n \"active\": true\n },\n \"connected_accounts\": {\n \"active\": true,\n \"cross_app_access\": true,\n \"allow_missing_user_id\": true\n },\n \"cross_app_access_requesting_app\": {\n \"active\": true\n },\n \"cross_app_access_resource_app\": {\n \"status\": \"enabled\"\n }\n}", "headers": { "Content-Type": "application/json" } @@ -2102,7 +2287,7 @@ }, "response": { "status": 202, - "body": "{\n \"id\": \"id\",\n \"event_stream_id\": \"event_stream_id\",\n \"status\": \"failed\",\n \"event_type\": \"connection.created\",\n \"attempts\": [\n {\n \"status\": \"failed\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"error_message\": \"error_message\"\n }\n ],\n \"event\": {\n \"id\": \"id\",\n \"source\": \"source\",\n \"specversion\": \"specversion\",\n \"type\": \"type\",\n \"time\": \"2024-01-15T09:30:00Z\",\n \"data\": \"data\"\n }\n}", + "body": "{\n \"id\": \"id\",\n \"event_stream_id\": \"event_stream_id\",\n \"status\": \"failed\",\n \"event_type\": \"connection.created\",\n \"attempts\": [\n {\n \"status\": \"failed\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"error_message\": \"error_message\",\n \"duration\": 1.1\n }\n ],\n \"event\": {\n \"id\": \"id\",\n \"source\": \"source\",\n \"specversion\": \"specversion\",\n \"type\": \"type\",\n \"time\": \"2024-01-15T09:30:00Z\",\n \"data\": {\n \"key\": \"value\"\n }\n }\n}", "headers": { "Content-Type": "application/json" } @@ -2719,6 +2904,9 @@ "include_fields": { "equalTo": "true" }, + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -3543,6 +3731,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -3551,12 +3742,15 @@ }, "sort": { "equalTo": "sort" + }, + "include_client_association_for": { + "equalTo": "include_client_association_for" } } }, "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 }\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" } @@ -3588,7 +3782,7 @@ }, "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 \"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}", + "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" } @@ -3624,7 +3818,7 @@ }, "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}", + "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" } @@ -3660,7 +3854,7 @@ }, "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}", + "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" } @@ -3732,7 +3926,7 @@ }, "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}", + "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" } @@ -4411,12 +4605,18 @@ }, "name_filter": { "equalTo": "name_filter" + }, + "type": { + "equalTo": "tenant" + }, + "owner_id": { + "equalTo": "owner_id" } } }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } @@ -4448,7 +4648,7 @@ }, "response": { "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n}", "headers": { "Content-Type": "application/json" } @@ -4484,7 +4684,7 @@ }, "response": { "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n}", "headers": { "Content-Type": "application/json" } @@ -4556,7 +4756,7 @@ }, "response": { "status": 200, - "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n}", + "body": "{\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n}", "headers": { "Content-Type": "application/json" } @@ -8144,6 +8344,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -8154,7 +8357,7 @@ }, "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 }\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" } @@ -8659,12 +8862,15 @@ }, "take": { "equalTo": "1" + }, + "q": { + "equalTo": "q" } } }, "response": { "status": 200, - "body": "{\n \"groups\": [\n {\n \"id\": \"id\"\n }\n ],\n \"next\": \"next\"\n}", + "body": "{\n \"groups\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"email\": \"email\",\n \"direct_members_count\": 1\n }\n ],\n \"next\": \"next\"\n}", "headers": { "Content-Type": "application/json" } @@ -8681,6 +8887,42 @@ } } }, + { + "id": "5bbdfb31-4781-467f-8fba-9b4896124cb2", + "name": "Add synchronized group selections to a directory provisioning configuration - default", + "request": { + "urlPathTemplate": "/connections/{id}/directory-provisioning/synchronized-groups", + "method": "POST", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5bbdfb31-4781-467f-8fba-9b4896124cb2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "3862e103-ed23-45b1-9543-8c83720a6c9c", "name": "Create or replace synchronized group selections for a directory provisioning configuration - default", @@ -8717,6 +8959,42 @@ } } }, + { + "id": "e0e41a59-3e51-4a64-b4c9-8bfae41b828f", + "name": "Delete synchronized group selections for a directory provisioning configuration - default", + "request": { + "urlPathTemplate": "/connections/{id}/directory-provisioning/synchronized-groups", + "method": "DELETE", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e0e41a59-3e51-4a64-b4c9-8bfae41b828f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "9821e94c-1529-464c-911e-9b351dbc15bd", "name": "Get a list of SCIM configurations - default", @@ -9485,7 +9763,7 @@ }, "response": { "status": 200, - "body": "[\n {\n \"id\": \"id\",\n \"event_stream_id\": \"event_stream_id\",\n \"status\": \"failed\",\n \"event_type\": \"connection.created\",\n \"attempts\": [\n {\n \"status\": \"failed\",\n \"timestamp\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"event\": {\n \"id\": \"id\",\n \"source\": \"source\",\n \"specversion\": \"specversion\",\n \"type\": \"type\",\n \"time\": \"2024-01-15T09:30:00Z\",\n \"data\": \"data\"\n }\n }\n]", + "body": "{\n \"deliveries\": [\n {\n \"id\": \"id\",\n \"event_stream_id\": \"event_stream_id\",\n \"status\": \"failed\",\n \"event_type\": \"connection.created\",\n \"attempts\": [\n {\n \"status\": \"failed\",\n \"timestamp\": \"2024-01-15T09:30:00Z\"\n }\n ]\n }\n ],\n \"next\": \"next\"\n}", "headers": { "Content-Type": "application/json" } @@ -9524,7 +9802,7 @@ }, "response": { "status": 200, - "body": "{\n \"id\": \"id\",\n \"event_stream_id\": \"event_stream_id\",\n \"status\": \"failed\",\n \"event_type\": \"connection.created\",\n \"attempts\": [\n {\n \"status\": \"failed\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"error_message\": \"error_message\"\n }\n ],\n \"event\": {\n \"id\": \"id\",\n \"source\": \"source\",\n \"specversion\": \"specversion\",\n \"type\": \"type\",\n \"time\": \"2024-01-15T09:30:00Z\",\n \"data\": \"data\"\n }\n}", + "body": "{\n \"id\": \"id\",\n \"event_stream_id\": \"event_stream_id\",\n \"status\": \"failed\",\n \"event_type\": \"connection.created\",\n \"attempts\": [\n {\n \"status\": \"failed\",\n \"timestamp\": \"2024-01-15T09:30:00Z\",\n \"error_message\": \"error_message\",\n \"duration\": 1.1\n }\n ],\n \"event\": {\n \"id\": \"id\",\n \"source\": \"source\",\n \"specversion\": \"specversion\",\n \"type\": \"type\",\n \"time\": \"2024-01-15T09:30:00Z\",\n \"data\": {\n \"key\": \"value\"\n }\n }\n}", "headers": { "Content-Type": "application/json" } @@ -9633,6 +9911,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -10006,7 +10287,7 @@ }, "response": { "status": 200, - "body": "{\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n }\n ],\n \"next\": \"next\"\n}", + "body": "{\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n }\n ],\n \"next\": \"next\"\n}", "headers": { "Content-Type": "application/json" } @@ -10212,7 +10493,7 @@ }, "response": { "status": 200, - "body": "[\n {\n \"enabled\": true,\n \"trial_expired\": true,\n \"name\": \"push-notification\"\n }\n]", + "body": "[\n {\n \"enabled\": true,\n \"trial_expired\": true,\n \"name\": \"push-notification\",\n \"settings\": {\n \"otp_length\": 1,\n \"otp_expiration_time\": 1\n }\n }\n]", "headers": { "Content-Type": "application/json" } @@ -12125,6 +12406,200 @@ } } }, + { + "id": "a3c9ba95-a693-4d69-a1b3-1aa9120eb072", + "name": "List organization client associations - default", + "request": { + "urlPathTemplate": "/organizations/{id}/clients", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + }, + "queryParameters": { + "from": { + "equalTo": "from" + }, + "take": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"clients\": [\n {\n \"client_id\": \"client_id\",\n \"use_for_member_access\": true,\n \"client\": {}\n }\n ],\n \"next\": \"next\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a3c9ba95-a693-4d69-a1b3-1aa9120eb072", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2fa25415-ea73-486d-a4db-dc430b35eb0b", + "name": "Associate clients with an organization - default", + "request": { + "urlPathTemplate": "/organizations/{id}/clients", + "method": "POST", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 201, + "body": "[\n {\n \"client_id\": \"client_id\",\n \"use_for_member_access\": true,\n \"client\": {\n \"name\": \"name\",\n \"app_type\": \"app_type\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"grant_types\": [\n \"grant_types\"\n ],\n \"organization_usage\": \"deny\"\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2fa25415-ea73-486d-a4db-dc430b35eb0b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "20855d1e-636b-4663-bac9-875b3eb0d7b3", + "name": "Remove client associations from an organization - default", + "request": { + "urlPathTemplate": "/organizations/{id}/clients", + "method": "DELETE", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "20855d1e-636b-4663-bac9-875b3eb0d7b3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "87f91e02-b7a6-470d-9913-43e936377815", + "name": "Get an organization client association - default", + "request": { + "urlPathTemplate": "/organizations/{id}/clients/{client_id}", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + }, + "client_id": { + "equalTo": "client_id" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"client_id\": \"client_id\",\n \"use_for_member_access\": true,\n \"client\": {\n \"name\": \"name\",\n \"app_type\": \"app_type\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"grant_types\": [\n \"grant_types\"\n ],\n \"organization_usage\": \"deny\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "87f91e02-b7a6-470d-9913-43e936377815", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "da35509c-6faa-46b7-b7d9-809febc746b9", + "name": "Update an organization client association - default", + "request": { + "urlPathTemplate": "/organizations/{id}/clients/{client_id}", + "method": "PATCH", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "id": { + "equalTo": "id" + }, + "client_id": { + "equalTo": "client_id" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"client_id\": \"client_id\",\n \"use_for_member_access\": true,\n \"client\": {\n \"name\": \"name\",\n \"app_type\": \"app_type\",\n \"logo_uri\": \"logo_uri\",\n \"is_first_party\": true,\n \"grant_types\": [\n \"grant_types\"\n ],\n \"organization_usage\": \"deny\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "da35509c-6faa-46b7-b7d9-809febc746b9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "4c65b7b7-43a0-4437-b96f-7f47fdad6550", "name": "Get connections associated with an organization - default", @@ -12176,8 +12651,8 @@ } }, { - "id": "de944d33-99f5-481d-9810-4aa2473950cc", - "name": "Adds a connection to an organization - default", + "id": "1d212ed4-03d7-4aac-a774-8ae99461b148", + "name": "Add a connection to an organization - default", "request": { "urlPathTemplate": "/organizations/{id}/connections", "method": "POST", @@ -12199,7 +12674,7 @@ "Content-Type": "application/json" } }, - "uuid": "de944d33-99f5-481d-9810-4aa2473950cc", + "uuid": "1d212ed4-03d7-4aac-a774-8ae99461b148", "persistent": true, "priority": 3, "metadata": { @@ -12959,6 +13434,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -13065,8 +13543,8 @@ } }, { - "id": "c4da691c-ffe9-48de-9227-f8ce48855cda", - "name": "Lists the groups that are assigned to the organization. - default", + "id": "6d9e3ba1-00dd-4040-89c3-a856e4b77da2", + "name": "List the groups that are assigned to the organization. - default", "request": { "urlPathTemplate": "/organizations/{organization_id}/groups", "method": "GET", @@ -13096,7 +13574,7 @@ "Content-Type": "application/json" } }, - "uuid": "c4da691c-ffe9-48de-9227-f8ce48855cda", + "uuid": "6d9e3ba1-00dd-4040-89c3-a856e4b77da2", "persistent": true, "priority": 3, "metadata": { @@ -13109,8 +13587,8 @@ } }, { - "id": "25999a58-81d7-488c-9a80-5967b5f1e6ae", - "name": "Lists the roles assigned to a group in the context of an organization. - default", + "id": "709cfc79-902f-4c6b-9c1d-8f115c63e170", + "name": "List the roles assigned to a group in the context of an organization. - default", "request": { "urlPathTemplate": "/organizations/{organization_id}/groups/{group_id}/roles", "method": "GET", @@ -13138,12 +13616,12 @@ }, "response": { "status": 200, - "body": "{\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n }\n ],\n \"next\": \"next\"\n}", + "body": "{\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n }\n ],\n \"next\": \"next\"\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "25999a58-81d7-488c-9a80-5967b5f1e6ae", + "uuid": "709cfc79-902f-4c6b-9c1d-8f115c63e170", "persistent": true, "priority": 3, "metadata": { @@ -13156,8 +13634,8 @@ } }, { - "id": "5f66622b-f0dc-4cab-8cb9-c5dd4f868ef6", - "name": "Assigns roles to a group in an organization context. - default", + "id": "51f1e8f1-c3f9-4662-b84c-98d35f72e50c", + "name": "Assign roles to a group in an organization context. - default", "request": { "urlPathTemplate": "/organizations/{organization_id}/groups/{group_id}/roles", "method": "POST", @@ -13182,7 +13660,7 @@ "Content-Type": "application/json" } }, - "uuid": "5f66622b-f0dc-4cab-8cb9-c5dd4f868ef6", + "uuid": "51f1e8f1-c3f9-4662-b84c-98d35f72e50c", "persistent": true, "priority": 3, "metadata": { @@ -13195,8 +13673,8 @@ } }, { - "id": "f3a06a3e-a047-4c64-ad21-52cf3943c125", - "name": "Removes roles assigned to a group in an organization context. - default", + "id": "41aa31c6-ab88-4d21-a15f-f2238b94e356", + "name": "Remove roles assigned to a group in an organization context. - default", "request": { "urlPathTemplate": "/organizations/{organization_id}/groups/{group_id}/roles", "method": "DELETE", @@ -13221,7 +13699,7 @@ "Content-Type": "application/json" } }, - "uuid": "f3a06a3e-a047-4c64-ad21-52cf3943c125", + "uuid": "41aa31c6-ab88-4d21-a15f-f2238b94e356", "persistent": true, "priority": 3, "metadata": { @@ -13313,7 +13791,7 @@ }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } @@ -13459,8 +13937,8 @@ } }, { - "id": "ffccd1de-fe6a-40b4-830b-54a8b73f173c", - "name": "Get the members assigned to an organization role - default", + "id": "b184f317-24f3-4e73-9e7b-c6e7decd08e0", + "name": "List the members assigned to a role in the context of an organization - default", "request": { "urlPathTemplate": "/organizations/{id}/roles/{role_id}/members", "method": "GET", @@ -13499,7 +13977,54 @@ "Content-Type": "application/json" } }, - "uuid": "ffccd1de-fe6a-40b4-830b-54a8b73f173c", + "uuid": "b184f317-24f3-4e73-9e7b-c6e7decd08e0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c6a72036-f7db-4e59-a8cf-684c7aa65301", + "name": "List the groups assigned to a role in the context of an organization - default", + "request": { + "urlPathTemplate": "/organizations/{organization_id}/roles/{role_id}/groups", + "method": "GET", + "headers": { + "Authorization": { + "matches": "Bearer .+" + } + }, + "pathParameters": { + "organization_id": { + "equalTo": "organization_id" + }, + "role_id": { + "equalTo": "role_id" + } + }, + "queryParameters": { + "from": { + "equalTo": "from" + }, + "take": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"groups\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"external_id\": \"external_id\",\n \"connection_id\": \"connection_id\",\n \"organization_id\": \"organization_id\",\n \"tenant_name\": \"tenant_name\",\n \"description\": \"description\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n }\n ],\n \"next\": \"next\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c6a72036-f7db-4e59-a8cf-684c7aa65301", "persistent": true, "priority": 3, "metadata": { @@ -14206,6 +14731,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -14852,8 +15380,8 @@ } }, { - "id": "275c2e74-3552-46aa-bd98-e7945f609962", - "name": "Lists the permissions assigned to a user directly or through roles or groups. - default", + "id": "7536c164-3568-4198-bcd2-c4f13e028cf6", + "name": "List the permissions assigned to a user directly or through roles or groups. - default", "request": { "urlPathTemplate": "/users/{id}/effective-permissions", "method": "GET", @@ -14886,7 +15414,7 @@ "Content-Type": "application/json" } }, - "uuid": "275c2e74-3552-46aa-bd98-e7945f609962", + "uuid": "7536c164-3568-4198-bcd2-c4f13e028cf6", "persistent": true, "priority": 3, "metadata": { @@ -14899,8 +15427,8 @@ } }, { - "id": "0a1118c7-87a0-4e15-a026-c26ae69fc942", - "name": "Lists the roles for a user with sources: directly assigned or through group membership. - default", + "id": "ca15acda-19bd-4ac9-8810-10a77a44c083", + "name": "List the roles for a user with sources: directly assigned or through group membership. - default", "request": { "urlPathTemplate": "/users/{id}/effective-roles", "method": "GET", @@ -14930,7 +15458,7 @@ "Content-Type": "application/json" } }, - "uuid": "0a1118c7-87a0-4e15-a026-c26ae69fc942", + "uuid": "ca15acda-19bd-4ac9-8810-10a77a44c083", "persistent": true, "priority": 3, "metadata": { @@ -15001,6 +15529,9 @@ "include_fields": { "equalTo": "true" }, + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -15261,7 +15792,7 @@ }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\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 }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\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" } @@ -15463,7 +15994,7 @@ }, "response": { "status": 200, - "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\"\n }\n ]\n}", + "body": "{\n \"start\": 1.1,\n \"limit\": 1.1,\n \"total\": 1.1,\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } @@ -15517,8 +16048,8 @@ } }, { - "id": "c727015f-123f-4f98-9b24-25828361a4ab", - "name": "Removes roles from a user - default", + "id": "45b3a04d-67d0-4781-84c6-686818e8cc76", + "name": "Remove roles from a user - default", "request": { "urlPathTemplate": "/users/{id}/roles", "method": "DELETE", @@ -15540,7 +16071,7 @@ "Content-Type": "application/json" } }, - "uuid": "c727015f-123f-4f98-9b24-25828361a4ab", + "uuid": "45b3a04d-67d0-4781-84c6-686818e8cc76", "persistent": true, "priority": 3, "metadata": { @@ -15569,6 +16100,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -15649,6 +16183,9 @@ } }, "queryParameters": { + "include_totals": { + "equalTo": "true" + }, "from": { "equalTo": "from" }, @@ -15713,8 +16250,8 @@ } }, { - "id": "bb869da8-6539-45f5-82b2-96dba9672d2b", - "name": "Lists the roles which grant the user a given permission (whether directly or through groups). - default", + "id": "4e6af123-91a7-4267-8471-a054fc227366", + "name": "List the roles which grant the user a given permission (whether directly or through groups). - default", "request": { "urlPathTemplate": "/users/{id}/effective-permissions/sources/effective-roles", "method": "GET", @@ -15745,12 +16282,12 @@ }, "response": { "status": 200, - "body": "{\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"sources\": [\n \"direct\"\n ]\n }\n ],\n \"next\": \"next\"\n}", + "body": "{\n \"roles\": [\n {\n \"id\": \"id\",\n \"name\": \"name\",\n \"description\": \"description\",\n \"type\": \"tenant\",\n \"owner_id\": \"owner_id\",\n \"sources\": [\n \"direct\"\n ]\n }\n ],\n \"next\": \"next\"\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "bb869da8-6539-45f5-82b2-96dba9672d2b", + "uuid": "4e6af123-91a7-4267-8471-a054fc227366", "persistent": true, "priority": 3, "metadata": { @@ -15990,6 +16527,6 @@ } ], "meta": { - "total": 428 + "total": 441 } } \ No newline at end of file