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
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
92db0495807c86fbbc4d45bd266a6c1f5bcbb59c
f908f520f9fcd63dfd42ed35b7f141a65b61609b
19 changes: 17 additions & 2 deletions .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "ruby",
"generatedAt": "2026-04-30T17:41:02.756Z",
"generatedAt": "2026-04-30T20:02:45.528Z",
"files": [
"lib/workos.rb",
"lib/workos/admin_portal.rb",
Expand All @@ -20,6 +20,8 @@
"lib/workos/api_keys/api_key_revoked_data.rb",
"lib/workos/api_keys/api_key_revoked_data_owner.rb",
"lib/workos/api_keys/api_key_validation_response.rb",
"lib/workos/api_keys/api_key_validation_response_api_key.rb",
"lib/workos/api_keys/api_key_validation_response_api_key_owner.rb",
"lib/workos/api_keys/api_key_with_value.rb",
"lib/workos/api_keys/api_key_with_value_owner.rb",
"lib/workos/api_keys/create_organization_api_key.rb",
Expand Down Expand Up @@ -75,7 +77,7 @@
"lib/workos/authorization/update_authorization_resource.rb",
"lib/workos/authorization/update_organization_role.rb",
"lib/workos/authorization/update_role.rb",
"lib/workos/authorization/user_organization_membership_base_list_data.rb",
"lib/workos/authorization/user_organization_membership_base_with_user.rb",
"lib/workos/client.rb",
"lib/workos/connect.rb",
"lib/workos/connect/application_credentials_list_item.rb",
Expand Down Expand Up @@ -116,6 +118,10 @@
"lib/workos/directory_sync/dsync_group_user_added_data.rb",
"lib/workos/directory_sync/dsync_group_user_removed.rb",
"lib/workos/directory_sync/dsync_group_user_removed_data.rb",
"lib/workos/directory_sync/dsync_token_created.rb",
"lib/workos/directory_sync/dsync_token_created_data.rb",
"lib/workos/directory_sync/dsync_token_deleted.rb",
"lib/workos/directory_sync/dsync_token_deleted_data.rb",
"lib/workos/directory_sync/dsync_user_created.rb",
"lib/workos/directory_sync/dsync_user_deleted.rb",
"lib/workos/directory_sync/dsync_user_updated.rb",
Expand Down Expand Up @@ -165,6 +171,7 @@
"lib/workos/groups/create_group_membership.rb",
"lib/workos/groups/group.rb",
"lib/workos/groups/update_group.rb",
"lib/workos/groups/user_organization_membership_base_list_data.rb",
"lib/workos/inflections.rb",
"lib/workos/multi_factor_auth.rb",
"lib/workos/multi_factor_auth/authentication_challenge.rb",
Expand Down Expand Up @@ -409,6 +416,7 @@
"lib/workos/types/user_management_users_feature_flags_order.rb",
"lib/workos/types/user_management_users_order.rb",
"lib/workos/types/user_organization_membership_base_list_data_status.rb",
"lib/workos/types/user_organization_membership_base_with_user_status.rb",
"lib/workos/types/user_organization_membership_status.rb",
"lib/workos/types/user_sessions_auth_method.rb",
"lib/workos/types/user_sessions_status.rb",
Expand Down Expand Up @@ -597,6 +605,8 @@
"rbi/workos/api_key_revoked_data.rbi",
"rbi/workos/api_key_revoked_data_owner.rbi",
"rbi/workos/api_key_validation_response.rbi",
"rbi/workos/api_key_validation_response_api_key.rbi",
"rbi/workos/api_key_validation_response_api_key_owner.rbi",
"rbi/workos/api_key_with_value.rbi",
"rbi/workos/api_key_with_value_owner.rbi",
"rbi/workos/api_keys.rbi",
Expand Down Expand Up @@ -769,6 +779,10 @@
"rbi/workos/dsync_group_user_added_data.rbi",
"rbi/workos/dsync_group_user_removed.rbi",
"rbi/workos/dsync_group_user_removed_data.rbi",
"rbi/workos/dsync_token_created.rbi",
"rbi/workos/dsync_token_created_data.rbi",
"rbi/workos/dsync_token_deleted.rbi",
"rbi/workos/dsync_token_deleted_data.rbi",
"rbi/workos/dsync_user_created.rbi",
"rbi/workos/dsync_user_deleted.rbi",
"rbi/workos/dsync_user_updated.rbi",
Expand Down Expand Up @@ -981,6 +995,7 @@
"rbi/workos/user_object.rbi",
"rbi/workos/user_organization_membership.rbi",
"rbi/workos/user_organization_membership_base_list_data.rbi",
"rbi/workos/user_organization_membership_base_with_user.rbi",
"rbi/workos/user_sessions_impersonator.rbi",
"rbi/workos/user_sessions_list_item.rbi",
"rbi/workos/user_updated.rbi",
Expand Down
2 changes: 1 addition & 1 deletion lib/workos/api_keys/api_key_created_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def initialize(json)
hash = self.class.normalize(json)
@object = hash[:object]
@id = hash[:id]
@owner = hash[:owner] ? WorkOS::ApiKeyCreatedDataOwner.new(hash[:owner]) : nil
@owner = hash[:owner]
@name = hash[:name]
@obfuscated_value = hash[:obfuscated_value]
@last_used_at = hash[:last_used_at]
Expand Down
2 changes: 1 addition & 1 deletion lib/workos/api_keys/api_key_validation_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ApiKeyValidationResponse < WorkOS::Types::BaseModel

def initialize(json)
hash = self.class.normalize(json)
@api_key = hash[:api_key] ? WorkOS::ApiKey.new(hash[:api_key]) : nil
@api_key = hash[:api_key] ? WorkOS::ApiKeyValidationResponseApiKey.new(hash[:api_key]) : nil
end
end
end
7 changes: 7 additions & 0 deletions lib/workos/api_keys/api_key_validation_response_api_key.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

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

module WorkOS
ApiKeyValidationResponseApiKey = ApiKey
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

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

module WorkOS
ApiKeyValidationResponseApiKeyOwner = ApiKeyCreatedDataOwner
end
8 changes: 4 additions & 4 deletions lib/workos/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def delete_resource_by_external_id(
# @param permission_slug [String] The permission slug to filter by. Only users with this permission on the resource are returned.
# @param assignment [WorkOS::Types::AuthorizationAssignment, nil] Filter by assignment type. Use "direct" for direct assignments only, or "indirect" to include inherited assignments.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembershipBaseListData>]
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembershipBaseWithUser>]
def list_memberships_for_resource_by_external_id(
organization_id:,
resource_type_slug:,
Expand Down Expand Up @@ -742,7 +742,7 @@ def list_memberships_for_resource_by_external_id(
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::UserOrganizationMembershipBaseListData,
model: WorkOS::UserOrganizationMembershipBaseWithUser,
filters: {organization_id: organization_id, resource_type_slug: resource_type_slug, external_id: external_id, before: before, limit: limit, order: order, permission_slug: permission_slug, assignment: assignment},
fetch_next: fetch_next
)
Expand Down Expand Up @@ -962,7 +962,7 @@ def delete_resource(
# @param permission_slug [String] The permission slug to filter by. Only users with this permission on the resource are returned.
# @param assignment [WorkOS::Types::AuthorizationAssignment, nil] Filter by assignment type. Use `direct` for direct assignments only, or `indirect` to include inherited assignments.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembershipBaseListData>]
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembershipBaseWithUser>]
def list_memberships_for_resource(
resource_id:,
permission_slug:,
Expand Down Expand Up @@ -1002,7 +1002,7 @@ def list_memberships_for_resource(
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::UserOrganizationMembershipBaseListData,
model: WorkOS::UserOrganizationMembershipBaseWithUser,
filters: {resource_id: resource_id, before: before, limit: limit, order: order, permission_slug: permission_slug, assignment: assignment},
fetch_next: fetch_next
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# frozen_string_literal: true

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

module WorkOS
class UserOrganizationMembershipBaseWithUser < WorkOS::Types::BaseModel
HASH_ATTRS = {
object: :object,
id: :id,
user_id: :user_id,
organization_id: :organization_id,
status: :status,
directory_managed: :directory_managed,
organization_name: :organization_name,
custom_attributes: :custom_attributes,
created_at: :created_at,
updated_at: :updated_at,
user: :user
}.freeze

attr_accessor \
:object,
:id,
:user_id,
:organization_id,
:status,
:directory_managed,
:organization_name,
:custom_attributes,
:created_at,
:updated_at,
:user

def initialize(json)
hash = self.class.normalize(json)
@object = hash[:object]
@id = hash[:id]
@user_id = hash[:user_id]
@organization_id = hash[:organization_id]
@status = hash[:status]
@directory_managed = hash[:directory_managed]
@organization_name = hash[:organization_name]
@custom_attributes = hash[:custom_attributes] || {}
@created_at = hash[:created_at]
@updated_at = hash[:updated_at]
@user = hash[:user] ? WorkOS::User.new(hash[:user]) : nil
end
end
end
3 changes: 3 additions & 0 deletions lib/workos/directory_sync/directory_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class DirectoryUser < WorkOS::Types::BaseModel
email: :email,
first_name: :first_name,
last_name: :last_name,
name: :name,
emails: :emails,
job_title: :job_title,
username: :username,
Expand Down Expand Up @@ -43,6 +44,7 @@ class DirectoryUser < WorkOS::Types::BaseModel
:email,
:first_name,
:last_name,
:name,
:state,
:custom_attributes,
:role,
Expand Down Expand Up @@ -88,6 +90,7 @@ def initialize(json)
@email = hash[:email]
@first_name = hash[:first_name]
@last_name = hash[:last_name]
@name = hash[:name]
@emails = (hash[:emails] || []).map { |item| item ? WorkOS::DirectoryUserEmail.new(item) : nil }
@job_title = hash[:job_title]
@username = hash[:username]
Expand Down
5 changes: 4 additions & 1 deletion lib/workos/directory_sync/directory_user_with_groups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class DirectoryUserWithGroups < WorkOS::Types::BaseModel
email: :email,
first_name: :first_name,
last_name: :last_name,
name: :name,
emails: :emails,
job_title: :job_title,
username: :username,
Expand All @@ -35,7 +36,7 @@ class DirectoryUserWithGroups < WorkOS::Types::BaseModel
# @!attribute raw_attributes
# @deprecated The raw attributes received from the directory provider.
# @!attribute groups
# @deprecated The directory groups the user belongs to. Use the List Directory Groups endpoint with a user filter instead.
# @deprecated The directory groups the user belongs to. Deprecated: starting May 1, 2026, this field returns an empty array by default for newly created teams. Existing teams currently depending on this field should migrate to the new access pattern for better throughput performance — the field is unbounded by user, so users with many group memberships produce large, slow response payloads. Use the List Directory Groups endpoint with a `user` filter to fetch a user's group memberships.

attr_accessor \
:object,
Expand All @@ -46,6 +47,7 @@ class DirectoryUserWithGroups < WorkOS::Types::BaseModel
:email,
:first_name,
:last_name,
:name,
:state,
:custom_attributes,
:role,
Expand Down Expand Up @@ -98,6 +100,7 @@ def initialize(json)
@email = hash[:email]
@first_name = hash[:first_name]
@last_name = hash[:last_name]
@name = hash[:name]
@emails = (hash[:emails] || []).map { |item| item ? WorkOS::DirectoryUserWithGroupsEmail.new(item) : nil }
@job_title = hash[:job_title]
@username = hash[:username]
Expand Down
34 changes: 34 additions & 0 deletions lib/workos/directory_sync/dsync_token_created.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

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

module WorkOS
class DsyncTokenCreated < WorkOS::Types::BaseModel
HASH_ATTRS = {
id: :id,
event: :event,
data: :data,
created_at: :created_at,
context: :context,
object: :object
}.freeze

attr_accessor \
:id,
:event,
:data,
:created_at,
:context,
:object

def initialize(json)
hash = self.class.normalize(json)
@id = hash[:id]
@event = hash[:event]
@data = hash[:data] ? WorkOS::DsyncTokenCreatedData.new(hash[:data]) : nil
@created_at = hash[:created_at]
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
@object = hash[:object]
end
end
end
37 changes: 37 additions & 0 deletions lib/workos/directory_sync/dsync_token_created_data.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: true

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

module WorkOS
class DsyncTokenCreatedData < WorkOS::Types::BaseModel
HASH_ATTRS = {
object: :object,
id: :id,
directory_id: :directory_id,
organization_id: :organization_id,
token_suffix: :token_suffix,
created_at: :created_at,
expires_at: :expires_at
}.freeze

attr_accessor \
:object,
:id,
:directory_id,
:organization_id,
:token_suffix,
:created_at,
:expires_at

def initialize(json)
hash = self.class.normalize(json)
@object = hash[:object]
@id = hash[:id]
@directory_id = hash[:directory_id]
@organization_id = hash[:organization_id]
@token_suffix = hash[:token_suffix]
@created_at = hash[:created_at]
@expires_at = hash[:expires_at]
end
end
end
34 changes: 34 additions & 0 deletions lib/workos/directory_sync/dsync_token_deleted.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

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

module WorkOS
class DsyncTokenDeleted < WorkOS::Types::BaseModel
HASH_ATTRS = {
id: :id,
event: :event,
data: :data,
created_at: :created_at,
context: :context,
object: :object
}.freeze

attr_accessor \
:id,
:event,
:data,
:created_at,
:context,
:object

def initialize(json)
hash = self.class.normalize(json)
@id = hash[:id]
@event = hash[:event]
@data = hash[:data] ? WorkOS::DsyncTokenDeletedData.new(hash[:data]) : nil
@created_at = hash[:created_at]
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
@object = hash[:object]
end
end
end
7 changes: 7 additions & 0 deletions lib/workos/directory_sync/dsync_token_deleted_data.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

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

module WorkOS
DsyncTokenDeletedData = DsyncTokenCreatedData
end
Loading