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 @@
a10d9ecb766d2dd996aecb19aa9c801d78bb7c26
13aaa9a125fc87d1ed23acd5ef740382510296be
2 changes: 1 addition & 1 deletion .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-18T17:55:44.243Z",
"files": [
"lib/workos.rb",
"lib/workos/admin_portal.rb",
Expand Down
40 changes: 28 additions & 12 deletions lib/workos/authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ def list_effective_permissions_by_external_id(
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
# @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. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
# @param resource_id [String, nil] Filter assignments by the ID of the resource.
# @param resource_external_id [String, nil] Filter assignments by the external ID of the resource.
# @param resource_type_slug [String, nil] Filter assignments by the slug of the resource type.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::UserRoleAssignment>]
def list_role_assignments(
Expand All @@ -268,13 +271,19 @@ def list_role_assignments(
after: nil,
limit: 10,
order: "desc",
resource_id: nil,
resource_external_id: nil,
resource_type_slug: nil,
request_options: {}
)
params = {
"before" => before,
"after" => after,
"limit" => limit,
"order" => order
"order" => order,
"resource_id" => resource_id,
"resource_external_id" => resource_external_id,
"resource_type_slug" => resource_type_slug
}.compact
response = @client.request(
method: :get,
Expand All @@ -290,13 +299,16 @@ def list_role_assignments(
after: cursor,
limit: limit,
order: order,
resource_id: resource_id,
resource_external_id: resource_external_id,
resource_type_slug: resource_type_slug,
request_options: request_options
)
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::UserRoleAssignment,
filters: {organization_membership_id: organization_membership_id, before: before, limit: limit, order: order},
filters: {organization_membership_id: organization_membership_id, before: before, limit: limit, order: order, resource_id: resource_id, resource_external_id: resource_external_id, resource_type_slug: resource_type_slug},
fetch_next: fetch_next
)
end
Expand Down Expand Up @@ -756,6 +768,7 @@ def list_memberships_for_resource_by_external_id(
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
# @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. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
# @param role_slug [String, nil] Filter assignments by the slug of the role.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::UserRoleAssignment>]
def list_role_assignments_for_resource_by_external_id(
Expand All @@ -766,13 +779,15 @@ def list_role_assignments_for_resource_by_external_id(
after: nil,
limit: 10,
order: "desc",
role_slug: nil,
request_options: {}
)
params = {
"before" => before,
"after" => after,
"limit" => limit,
"order" => order
"order" => order,
"role_slug" => role_slug
}.compact
response = @client.request(
method: :get,
Expand All @@ -790,13 +805,14 @@ def list_role_assignments_for_resource_by_external_id(
after: cursor,
limit: limit,
order: order,
role_slug: role_slug,
request_options: request_options
)
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::UserRoleAssignment,
filters: {organization_id: organization_id, resource_type_slug: resource_type_slug, external_id: external_id, before: before, limit: limit, order: order},
filters: {organization_id: organization_id, resource_type_slug: resource_type_slug, external_id: external_id, before: before, limit: limit, order: order, role_slug: role_slug},
fetch_next: fetch_next
)
end
Expand All @@ -809,7 +825,6 @@ def list_role_assignments_for_resource_by_external_id(
# @param organization_id [String, nil] Filter resources by organization ID.
# @param resource_type_slug [String, nil] Filter resources by resource type slug.
# @param resource_external_id [String, nil] Filter resources by external ID.
# @param search [String, nil] Search resources by name.
# @param parent [WorkOS::Authorization::ParentById, WorkOS::Authorization::ParentByExternalId, nil] Identifies the parent.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::AuthorizationResource>]
Expand All @@ -821,7 +836,6 @@ def list_resources(
organization_id: nil,
resource_type_slug: nil,
resource_external_id: nil,
search: nil,
parent: nil,
request_options: {}
)
Expand All @@ -832,8 +846,7 @@ def list_resources(
"order" => order,
"organization_id" => organization_id,
"resource_type_slug" => resource_type_slug,
"resource_external_id" => resource_external_id,
"search" => search
"resource_external_id" => resource_external_id
}.compact
if parent
case parent
Expand Down Expand Up @@ -862,15 +875,14 @@ def list_resources(
organization_id: organization_id,
resource_type_slug: resource_type_slug,
resource_external_id: resource_external_id,
search: search,
parent: parent,
request_options: request_options
)
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::AuthorizationResource,
filters: {before: before, limit: limit, order: order, organization_id: organization_id, resource_type_slug: resource_type_slug, resource_external_id: resource_external_id, search: search, parent: parent},
filters: {before: before, limit: limit, order: order, organization_id: organization_id, resource_type_slug: resource_type_slug, resource_external_id: resource_external_id, parent: parent},
fetch_next: fetch_next
)
end
Expand Down Expand Up @@ -1067,6 +1079,7 @@ def list_memberships_for_resource(
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
# @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. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
# @param role_slug [String, nil] Filter assignments by the slug of the role.
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
# @return [WorkOS::Types::ListStruct<WorkOS::UserRoleAssignment>]
def list_role_assignments_for_resource(
Expand All @@ -1075,13 +1088,15 @@ def list_role_assignments_for_resource(
after: nil,
limit: 10,
order: "desc",
role_slug: nil,
request_options: {}
)
params = {
"before" => before,
"after" => after,
"limit" => limit,
"order" => order
"order" => order,
"role_slug" => role_slug
}.compact
response = @client.request(
method: :get,
Expand All @@ -1097,13 +1112,14 @@ def list_role_assignments_for_resource(
after: cursor,
limit: limit,
order: order,
role_slug: role_slug,
request_options: request_options
)
}
WorkOS::Types::ListStruct.from_response(
response,
model: WorkOS::UserRoleAssignment,
filters: {resource_id: resource_id, before: before, limit: limit, order: order},
filters: {resource_id: resource_id, before: before, limit: limit, order: order, role_slug: role_slug},
fetch_next: fetch_next
)
end
Expand Down
14 changes: 9 additions & 5 deletions rbi/workos/authorization.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,13 @@ module WorkOS
after: T.nilable(String),
limit: T.nilable(Integer),
order: T.nilable(String),
resource_id: T.nilable(String),
resource_external_id: T.nilable(String),
resource_type_slug: T.nilable(String),
request_options: T::Hash[Symbol, T.untyped]
).returns(WorkOS::Types::ListStruct)
end
def list_role_assignments(organization_membership_id:, before:, after:, limit:, order:, request_options:); end
def list_role_assignments(organization_membership_id:, before:, after:, limit:, order:, resource_id:, resource_external_id:, resource_type_slug:, request_options:); end

sig do
params(
Expand Down Expand Up @@ -322,10 +325,11 @@ module WorkOS
after: T.nilable(String),
limit: T.nilable(Integer),
order: T.nilable(String),
role_slug: T.nilable(String),
request_options: T::Hash[Symbol, T.untyped]
).returns(WorkOS::Types::ListStruct)
end
def list_role_assignments_for_resource_by_external_id(organization_id:, resource_type_slug:, external_id:, before:, after:, limit:, order:, request_options:); end
def list_role_assignments_for_resource_by_external_id(organization_id:, resource_type_slug:, external_id:, before:, after:, limit:, order:, role_slug:, request_options:); end

sig do
params(
Expand All @@ -336,12 +340,11 @@ module WorkOS
organization_id: T.nilable(String),
resource_type_slug: T.nilable(String),
resource_external_id: T.nilable(String),
search: T.nilable(String),
parent: T.nilable(T.any(WorkOS::Authorization::ParentById, WorkOS::Authorization::ParentByExternalId)),
request_options: T::Hash[Symbol, T.untyped]
).returns(WorkOS::Types::ListStruct)
end
def list_resources(before:, after:, limit:, order:, organization_id:, resource_type_slug:, resource_external_id:, search:, parent:, request_options:); end
def list_resources(before:, after:, limit:, order:, organization_id:, resource_type_slug:, resource_external_id:, parent:, request_options:); end

sig do
params(
Expand Down Expand Up @@ -405,10 +408,11 @@ module WorkOS
after: T.nilable(String),
limit: T.nilable(Integer),
order: T.nilable(String),
role_slug: T.nilable(String),
request_options: T::Hash[Symbol, T.untyped]
).returns(WorkOS::Types::ListStruct)
end
def list_role_assignments_for_resource(resource_id:, before:, after:, limit:, order:, request_options:); end
def list_role_assignments_for_resource(resource_id:, before:, after:, limit:, order:, role_slug:, request_options:); end

sig do
params(
Expand Down