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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
* [#488](https://github.com/workos/workos-ruby/pull/488) Update generated SDK code

**⚠️ Breaking**
* **authorization:** Remove search parameter from listResources
* Removed `search` optional query parameter from `listResources` operation
* This is a breaking change for callers relying on resource search functionality

**Features**
* **authorization:** Add resource filtering to listRoleAssignments
* Added `resource_id`, `resource_external_id`, and `resource_type_slug` optional query parameters to `listRoleAssignments`
* Added `role_slug` optional query parameter to `listRoleAssignmentsForResource` and `listRoleAssignmentsForResourceByExternalId`
* **organization_membership:** Create new organization_membership service
* Moved organization membership operations from `user_management` service to new dedicated `organization_membership` service
* Includes 8 endpoints: `list_organization_memberships`, `create_organization_membership`, `get_organization_membership`, `update_organization_membership`, `delete_organization_membership`, `deactivate_organization_membership`, `reactivate_organization_membership`, and `list_organization_membership_groups`
* Updated client to expose `organization_membership` service accessor instead of `user_management_organization_membership_groups`
* **audit_logs:** Rename audit log model types
* Renamed `AuditLogActionJson` to `AuditLogAction`
* Renamed `AuditLogExportJson` to `AuditLogExport`
* Renamed `AuditLogsRetentionJson` to `AuditLogsRetention`
* Updated all service methods and type references accordingly
* **webhooks:** Rename webhook endpoint model type
* Renamed `WebhookEndpointJson` to `WebhookEndpoint`
* Updated all service methods and type references accordingly
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a10d9ecb766d2dd996aecb19aa9c801d78bb7c26
13aaa9a125fc87d1ed23acd5ef740382510296be
55 changes: 27 additions & 28 deletions .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "ruby",
"generatedAt": "2026-05-06T22:30:35.198Z",
"generatedAt": "2026-05-20T19:49:55.825Z",
"files": [
"lib/workos.rb",
"lib/workos/admin_portal.rb",
Expand All @@ -27,17 +27,17 @@
"lib/workos/api_keys/organization_api_key_with_value_owner.rb",
"lib/workos/api_keys/validate_api_key.rb",
"lib/workos/audit_logs.rb",
"lib/workos/audit_logs/audit_log_action_json.rb",
"lib/workos/audit_logs/audit_log_action.rb",
"lib/workos/audit_logs/audit_log_event.rb",
"lib/workos/audit_logs/audit_log_event_actor.rb",
"lib/workos/audit_logs/audit_log_event_context.rb",
"lib/workos/audit_logs/audit_log_event_create_response.rb",
"lib/workos/audit_logs/audit_log_event_ingestion.rb",
"lib/workos/audit_logs/audit_log_event_target.rb",
"lib/workos/audit_logs/audit_log_export.rb",
"lib/workos/audit_logs/audit_log_export_creation.rb",
"lib/workos/audit_logs/audit_log_export_json.rb",
"lib/workos/audit_logs/audit_log_schema.rb",
"lib/workos/audit_logs/audit_log_schema_actor.rb",
"lib/workos/audit_logs/audit_log_schema_dto.rb",
"lib/workos/audit_logs/audit_log_schema_json.rb",
"lib/workos/audit_logs/audit_log_schema_json_actor.rb",
"lib/workos/audit_logs/audit_log_schema_json_target.rb",
Expand Down Expand Up @@ -197,10 +197,15 @@
"lib/workos/organization_domains/organization_domain_verification_failed_data_organization_domain.rb",
"lib/workos/organization_domains/organization_domain_verified.rb",
"lib/workos/organization_domains/organization_domain_verified_data.rb",
"lib/workos/organization_membership.rb",
"lib/workos/organization_membership/create_user_organization_membership.rb",
"lib/workos/organization_membership/organization_membership.rb",
"lib/workos/organization_membership/update_user_organization_membership.rb",
"lib/workos/organization_membership/user_organization_membership.rb",
"lib/workos/organizations.rb",
"lib/workos/organizations/audit_log_configuration.rb",
"lib/workos/organizations/audit_log_configuration_log_stream.rb",
"lib/workos/organizations/audit_logs_retention_json.rb",
"lib/workos/organizations/audit_logs_retention.rb",
"lib/workos/organizations/organization.rb",
"lib/workos/organizations/organization_created.rb",
"lib/workos/organizations/organization_created_data.rb",
Expand Down Expand Up @@ -288,7 +293,7 @@
"lib/workos/types/audit_log_configuration_log_stream_state.rb",
"lib/workos/types/audit_log_configuration_log_stream_type.rb",
"lib/workos/types/audit_log_configuration_state.rb",
"lib/workos/types/audit_log_export_json_state.rb",
"lib/workos/types/audit_log_export_state.rb",
"lib/workos/types/authenticate_response_authentication_method.rb",
"lib/workos/types/authentication_factor_enrolled_type.rb",
"lib/workos/types/authentication_factor_type.rb",
Expand Down Expand Up @@ -405,7 +410,7 @@
"lib/workos/types/vault_metadata_read_data_actor_source.rb",
"lib/workos/types/vault_names_listed_data_actor_source.rb",
"lib/workos/types/waitlist_user_state.rb",
"lib/workos/types/webhook_endpoint_json_status.rb",
"lib/workos/types/webhook_endpoint_status.rb",
"lib/workos/types/widget_session_token_scopes.rb",
"lib/workos/user_management.rb",
"lib/workos/user_management/action_authentication_denied.rb",
Expand Down Expand Up @@ -473,7 +478,6 @@
"lib/workos/user_management/create_user.rb",
"lib/workos/user_management/create_user_api_key.rb",
"lib/workos/user_management/create_user_invite_options.rb",
"lib/workos/user_management/create_user_organization_membership.rb",
"lib/workos/user_management/device_authorization_response.rb",
"lib/workos/user_management/device_code_session_authenticate_request.rb",
"lib/workos/user_management/email_change.rb",
Expand All @@ -500,7 +504,6 @@
"lib/workos/user_management/magic_auth_created.rb",
"lib/workos/user_management/magic_auth_created_data.rb",
"lib/workos/user_management/mfa_totp_session_authenticate_request.rb",
"lib/workos/user_management/organization_membership.rb",
"lib/workos/user_management/organization_selection_session_authenticate_request.rb",
"lib/workos/user_management/password_reset.rb",
"lib/workos/user_management/password_reset_created.rb",
Expand All @@ -524,7 +527,6 @@
"lib/workos/user_management/sso_device_authorization_request.rb",
"lib/workos/user_management/update_jwt_template.rb",
"lib/workos/user_management/update_user.rb",
"lib/workos/user_management/update_user_organization_membership.rb",
"lib/workos/user_management/user.rb",
"lib/workos/user_management/user_api_key.rb",
"lib/workos/user_management/user_api_key_created_data_owner.rb",
Expand All @@ -536,13 +538,11 @@
"lib/workos/user_management/user_deleted.rb",
"lib/workos/user_management/user_identities_get_item.rb",
"lib/workos/user_management/user_invite.rb",
"lib/workos/user_management/user_organization_membership.rb",
"lib/workos/user_management/user_sessions_impersonator.rb",
"lib/workos/user_management/user_sessions_list_item.rb",
"lib/workos/user_management/user_updated.rb",
"lib/workos/user_management/verify_email_address.rb",
"lib/workos/user_management/verify_email_response.rb",
"lib/workos/user_management_organization_membership_groups.rb",
"lib/workos/vault/vault_byok_key_deleted.rb",
"lib/workos/vault/vault_byok_key_deleted_data.rb",
"lib/workos/vault/vault_byok_key_verification_completed.rb",
Expand All @@ -568,7 +568,7 @@
"lib/workos/webhooks.rb",
"lib/workos/webhooks/create_webhook_endpoint.rb",
"lib/workos/webhooks/update_webhook_endpoint.rb",
"lib/workos/webhooks/webhook_endpoint_json.rb",
"lib/workos/webhooks/webhook_endpoint.rb",
"lib/workos/widgets.rb",
"lib/workos/widgets/widget_session_token.rb",
"lib/workos/widgets/widget_session_token_response.rb",
Expand All @@ -590,7 +590,7 @@
"rbi/workos/api_keys.rbi",
"rbi/workos/application_credentials_list_item.rbi",
"rbi/workos/assign_role.rbi",
"rbi/workos/audit_log_action_json.rbi",
"rbi/workos/audit_log_action.rbi",
"rbi/workos/audit_log_configuration.rbi",
"rbi/workos/audit_log_configuration_log_stream.rbi",
"rbi/workos/audit_log_event.rbi",
Expand All @@ -599,16 +599,16 @@
"rbi/workos/audit_log_event_create_response.rbi",
"rbi/workos/audit_log_event_ingestion.rbi",
"rbi/workos/audit_log_event_target.rbi",
"rbi/workos/audit_log_export.rbi",
"rbi/workos/audit_log_export_creation.rbi",
"rbi/workos/audit_log_export_json.rbi",
"rbi/workos/audit_log_schema.rbi",
"rbi/workos/audit_log_schema_actor.rbi",
"rbi/workos/audit_log_schema_dto.rbi",
"rbi/workos/audit_log_schema_json.rbi",
"rbi/workos/audit_log_schema_json_actor.rbi",
"rbi/workos/audit_log_schema_json_target.rbi",
"rbi/workos/audit_log_schema_target.rbi",
"rbi/workos/audit_logs.rbi",
"rbi/workos/audit_logs_retention_json.rbi",
"rbi/workos/audit_logs_retention.rbi",
"rbi/workos/authenticate_response.rbi",
"rbi/workos/authenticate_response_impersonator.rbi",
"rbi/workos/authenticate_response_oauth_token.rbi",
Expand Down Expand Up @@ -974,7 +974,6 @@
"rbi/workos/user_invite.rbi",
"rbi/workos/user_management.rbi",
"rbi/workos/user_management_login_request.rbi",
"rbi/workos/user_management_organization_membership_groups.rbi",
"rbi/workos/user_object.rbi",
"rbi/workos/user_organization_membership.rbi",
"rbi/workos/user_organization_membership_base_list_data.rbi",
Expand Down Expand Up @@ -1012,7 +1011,7 @@
"rbi/workos/waitlist_user_approved.rbi",
"rbi/workos/waitlist_user_created.rbi",
"rbi/workos/waitlist_user_denied.rbi",
"rbi/workos/webhook_endpoint_json.rbi",
"rbi/workos/webhook_endpoint.rbi",
"rbi/workos/webhooks.rbi",
"rbi/workos/widget_session_token.rbi",
"rbi/workos/widget_session_token_response.rbi",
Expand All @@ -1029,12 +1028,12 @@
"test/workos/test_model_round_trip.rb",
"test/workos/test_multi_factor_auth.rb",
"test/workos/test_organization_domains.rb",
"test/workos/test_organization_membership.rb",
"test/workos/test_organizations.rb",
"test/workos/test_pipes.rb",
"test/workos/test_radar.rb",
"test/workos/test_sso.rb",
"test/workos/test_user_management.rb",
"test/workos/test_user_management_organization_membership_groups.rb",
"test/workos/test_webhooks.rb",
"test/workos/test_widgets.rb"
],
Expand Down Expand Up @@ -1641,35 +1640,35 @@
},
"GET /user_management/organization_memberships": {
"sdkMethod": "list_organization_memberships",
"service": "user_management"
"service": "organization_membership"
},
"POST /user_management/organization_memberships": {
"sdkMethod": "create_organization_membership",
"service": "user_management"
"service": "organization_membership"
},
"GET /user_management/organization_memberships/{id}": {
"sdkMethod": "get_organization_membership",
"service": "user_management"
"service": "organization_membership"
},
"PUT /user_management/organization_memberships/{id}": {
"sdkMethod": "update_organization_membership",
"service": "user_management"
"service": "organization_membership"
},
"DELETE /user_management/organization_memberships/{id}": {
"sdkMethod": "delete_organization_membership",
"service": "user_management"
"service": "organization_membership"
},
"PUT /user_management/organization_memberships/{id}/deactivate": {
"sdkMethod": "deactivate_organization_membership",
"service": "user_management"
"service": "organization_membership"
},
"PUT /user_management/organization_memberships/{id}/reactivate": {
"sdkMethod": "reactivate_organization_membership",
"service": "user_management"
"service": "organization_membership"
},
"GET /user_management/organization_memberships/{omId}/groups": {
"sdkMethod": "list_organization_membership_groups",
"service": "user_management_organization_membership_groups"
"service": "organization_membership"
},
"POST /user_management/redirect_uris": {
"sdkMethod": "create_redirect_uri",
Expand Down
1 change: 1 addition & 0 deletions lib/workos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module WorkOS
loader.collapse("#{__dir__}/workos/groups")
loader.collapse("#{__dir__}/workos/multi_factor_auth")
loader.collapse("#{__dir__}/workos/organization_domains")
loader.collapse("#{__dir__}/workos/organization_membership")
loader.collapse("#{__dir__}/workos/organizations")
loader.collapse("#{__dir__}/workos/pipes")
loader.collapse("#{__dir__}/workos/radar")
Expand Down
20 changes: 10 additions & 10 deletions lib/workos/audit_logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(client)
# Get Retention
# @param id [String] Unique identifier of the Organization.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::AuditLogsRetentionJson]
# @return [WorkOS::AuditLogsRetention]
def get_organization_audit_logs_retention(
id:,
request_options: {}
Expand All @@ -24,7 +24,7 @@ def get_organization_audit_logs_retention(
auth: true,
request_options: request_options
)
result = WorkOS::AuditLogsRetentionJson.new(response.body)
result = WorkOS::AuditLogsRetention.new(response.body)
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
result
end
Expand All @@ -33,7 +33,7 @@ def get_organization_audit_logs_retention(
# @param id [String] Unique identifier of the Organization.
# @param retention_period_in_days [Integer] The number of days Audit Log events will be retained. Valid values are `30` and `365`.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::AuditLogsRetentionJson]
# @return [WorkOS::AuditLogsRetention]
def update_organization_audit_logs_retention(
id:,
retention_period_in_days:,
Expand All @@ -49,7 +49,7 @@ def update_organization_audit_logs_retention(
body: body,
request_options: request_options
)
result = WorkOS::AuditLogsRetentionJson.new(response.body)
result = WorkOS::AuditLogsRetention.new(response.body)
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
result
end
Expand All @@ -60,7 +60,7 @@ def update_organization_audit_logs_retention(
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::AuditLogActionJson>]
# @return [WorkOS::Types::ListStruct<WorkOS::AuditLogAction>]
def list_actions(
before: nil,
after: nil,
Expand Down Expand Up @@ -92,7 +92,7 @@ def list_actions(
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::AuditLogActionJson,
model: WorkOS::AuditLogAction,
filters: {before: before, limit: limit, order: order},
fetch_next: fetch_next
)
Expand Down Expand Up @@ -212,7 +212,7 @@ def create_event(
# @param actor_ids [Array<String>, nil] List of actor IDs to filter against.
# @param targets [Array<String>, nil] List of target types to filter against.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::AuditLogExportJson]
# @return [WorkOS::AuditLogExport]
def create_export(
organization_id:,
range_start:,
Expand Down Expand Up @@ -241,15 +241,15 @@ def create_export(
body: body,
request_options: request_options
)
result = WorkOS::AuditLogExportJson.new(response.body)
result = WorkOS::AuditLogExport.new(response.body)
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
result
end

# Get Export
# @param audit_log_export_id [String] The unique ID of the Audit Log Export.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::AuditLogExportJson]
# @return [WorkOS::AuditLogExport]
def get_export(
audit_log_export_id:,
request_options: {}
Expand All @@ -260,7 +260,7 @@ def get_export(
auth: true,
request_options: request_options
)
result = WorkOS::AuditLogExportJson.new(response.body)
result = WorkOS::AuditLogExport.new(response.body)
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
result
end
Expand Down
11 changes: 3 additions & 8 deletions lib/workos/audit_logs/audit_log_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

# This file is auto-generated by oagen. Do not edit.

require "json"

module WorkOS
class AuditLogAction
include HashProvider

class AuditLogAction < WorkOS::Types::BaseModel
HASH_ATTRS = {
object: :object,
name: :name,
Expand All @@ -24,11 +20,10 @@ class AuditLogAction
:updated_at

def initialize(json)
hash = json.is_a?(Hash) ? json : JSON.parse(json, symbolize_names: true)
hash = hash.transform_keys(&:to_sym) if hash.keys.first.is_a?(String)
hash = self.class.normalize(json)
@object = hash[:object]
@name = hash[:name]
@schema = hash[:schema] ? WorkOS::AuditLogSchema.new(hash[:schema]) : nil
@schema = hash[:schema] ? WorkOS::AuditLogSchemaJson.new(hash[:schema]) : nil
@created_at = hash[:created_at]
@updated_at = hash[:updated_at]
end
Expand Down
Loading
Loading