Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"cliVersion": "5.20.1",
"generatorName": "fernapi/fern-ruby-sdk",
"generatorVersion": "1.1.13",
"generatorConfig": {
"clientModuleName": "Management",
"package-name": "auth0",
"useProvidedDefaults": true,
"enableWireTests": true,
"useDefaultRequestParameterValues": true
},
"originGitCommit": "219914accde9916f411f553a3e3eb35a8478eaaf",
"sdkVersion": "6.0.0"
}
360 changes: 360 additions & 0 deletions lib/auth0.rb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class UpdateBrandingRequestContent < Internal::Types::Model
field :colors, -> { Auth0::Types::UpdateBrandingColors }, optional: true, nullable: false
field :favicon_url, -> { String }, optional: true, nullable: false
field :logo_url, -> { String }, optional: true, nullable: false
field :identifiers, -> { Auth0::Types::UpdateBrandingIdentifiers }, optional: true, nullable: false
field :font, -> { Auth0::Types::UpdateBrandingFont }, optional: true, nullable: false
end
end
Expand Down
56 changes: 56 additions & 0 deletions lib/auth0/events/client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# frozen_string_literal: true

module Auth0
module Events
class Client
# @param client [Auth0::Internal::Http::RawClient]
#
# @return [void]
def initialize(client:)
@client = client
end

# Subscribe to events via Server-Sent Events (SSE)
#
# @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 [String, nil] :from_timestamp
# @option params [Auth0::Types::EventStreamSubscribeEventsEventTypeEnum, nil] :event_type
#
# @return [untyped]
def subscribe(request_options: {}, **params)
params = Auth0::Internal::Types::Utils.normalize_keys(params)
query_param_names = %i[from from_timestamp event_type]
query_params = {}
query_params["from"] = params[:from] if params.key?(:from)
query_params["from_timestamp"] = params[:from_timestamp] if params.key?(:from_timestamp)
query_params["event_type"] = params[:event_type] if params.key?(:event_type)
params.except(*query_param_names)

request = Auth0::Internal::JSON::Request.new(
base_url: request_options[:base_url],
method: "GET",
path: "events",
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
return if code.between?(200, 299)

error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
raise error_class.new(response.body, code: code)
end
end
end
end
13 changes: 13 additions & 0 deletions lib/auth0/events/types/subscribe_events_request_parameters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module Auth0
module Events
module Types
class SubscribeEventsRequestParameters < Internal::Types::Model
field :from, -> { String }, optional: true, nullable: false
field :from_timestamp, -> { String }, optional: true, nullable: false
field :event_type, -> { Auth0::Types::EventStreamSubscribeEventsEventTypeEnum }, optional: true, nullable: false
end
end
end
end
4 changes: 3 additions & 1 deletion lib/auth0/groups/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def initialize(client:)
# @option params [String, nil] :connection_id
# @option params [String, nil] :name
# @option params [String, nil] :external_id
# @option params [String, nil] :search
# @option params [String, nil] :fields
# @option params [Boolean, nil] :include_fields
# @option params [String, nil] :from
Expand All @@ -30,11 +31,12 @@ def initialize(client:)
# @return [Auth0::Types::ListGroupsPaginatedResponseContent]
def list(request_options: {}, **params)
params = Auth0::Internal::Types::Utils.normalize_keys(params)
query_param_names = %i[connection_id name external_id fields include_fields from take]
query_param_names = %i[connection_id name external_id search fields include_fields from take]
query_params = {}
query_params["connection_id"] = params[:connection_id] if params.key?(:connection_id)
query_params["name"] = params[:name] if params.key?(:name)
query_params["external_id"] = params[:external_id] if params.key?(:external_id)
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["from"] = params[:from] if params.key?(:from)
Expand Down
1 change: 1 addition & 0 deletions lib/auth0/groups/types/list_groups_request_parameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class ListGroupsRequestParameters < Internal::Types::Model
field :connection_id, -> { String }, optional: true, nullable: false
field :name, -> { String }, optional: true, nullable: false
field :external_id, -> { String }, optional: true, nullable: false
field :search, -> { String }, optional: true, nullable: false
field :fields, -> { String }, optional: true, nullable: false
field :include_fields, -> { Internal::Types::Boolean }, optional: true, nullable: false
field :from, -> { String }, optional: true, nullable: false
Expand Down
Loading
Loading