From 4d430b462f5db0af4b8b154ef653342c474984fc Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:17 +0000 Subject: [PATCH 1/5] feat(user_management)!: SDK surface change: Symbol "CreatePasswordResetToken" was removed --- .../types/user_management_waitlists_state.rb | 14 ++ lib/workos/user_management.rb | 176 ++++++++++++++++++ .../create_password_reset_token.rb | 13 +- .../user_management/create_waitlist_entry.rb | 25 +++ lib/workos/user_management/waitlist.rb | 28 +++ lib/workos/user_management/waitlist_entry.rb | 43 +++++ rbi/workos/user_management.rbi | 64 +++++++ test/workos/test_user_management.rb | 56 ++++++ .../test_user_management_model_round_trip.rb | 74 ++++++++ 9 files changed, 481 insertions(+), 12 deletions(-) create mode 100644 lib/workos/types/user_management_waitlists_state.rb create mode 100644 lib/workos/user_management/create_waitlist_entry.rb create mode 100644 lib/workos/user_management/waitlist.rb create mode 100644 lib/workos/user_management/waitlist_entry.rb diff --git a/lib/workos/types/user_management_waitlists_state.rb b/lib/workos/types/user_management_waitlists_state.rb new file mode 100644 index 00000000..55aafd09 --- /dev/null +++ b/lib/workos/types/user_management_waitlists_state.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + class UserManagementWaitlistsState + PENDING = "pending" + APPROVED = "approved" + DENIED = "denied" + ALL = [PENDING, APPROVED, DENIED].freeze + end + end +end diff --git a/lib/workos/user_management.rb b/lib/workos/user_management.rb index 7d6d542f..8e2ef087 100644 --- a/lib/workos/user_management.rb +++ b/lib/workos/user_management.rb @@ -68,6 +68,7 @@ def get_jwks( # @param organization_id [String, nil] The ID of the organization to scope the session to. # @param pending_authentication_token [String, nil] The pending authentication token from a previous authentication attempt. # @param authentication_challenge_id [String, nil] The ID of the MFA authentication challenge. + # @param email_completion_token [String, nil] The token from the `email_completion_required` response. # @param radar_challenge_id [String, nil] The ID of the Radar email challenge being verified. # @param verification_id [String, nil] The ID of the Radar SMS verification being confirmed. Required for sign-up challenges; omitted for sign-in challenges, where the verification is resolved server-side. # @param phone_number [String, nil] The phone number the Radar SMS challenge was sent to. Required for sign-up challenges; omitted for sign-in challenges, where the phone number on file is resolved server-side. @@ -92,6 +93,7 @@ def create_authenticate( organization_id: nil, pending_authentication_token: nil, authentication_challenge_id: nil, + email_completion_token: nil, radar_challenge_id: nil, verification_id: nil, phone_number: nil, @@ -116,6 +118,7 @@ def create_authenticate( "organization_id" => organization_id, "pending_authentication_token" => pending_authentication_token, "authentication_challenge_id" => authentication_challenge_id, + "email_completion_token" => email_completion_token, "radar_challenge_id" => radar_challenge_id, "verification_id" => verification_id, "phone_number" => phone_number, @@ -1686,6 +1689,179 @@ def delete_user_authorized_application( nil end + # Delete a waitlist entry + # @param id [String] The unique ID of the waitlist entry. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [void] + def delete_waitlist_entry( + id:, + request_options: {} + ) + @client.request( + method: :delete, + path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}", + auth: true, + request_options: request_options + ) + nil + end + + # Approve a waitlist entry + # @param id [String] The unique ID of the waitlist entry. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::WaitlistEntry] + def create_waitlist_entry_approve( + id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}/approve", + auth: true, + request_options: request_options + ) + result = WorkOS::WaitlistEntry.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 + + # Deny a waitlist entry + # @param id [String] The unique ID of the waitlist entry. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::WaitlistEntry] + def create_waitlist_entry_deny( + id:, + request_options: {} + ) + response = @client.request( + method: :post, + path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}/deny", + auth: true, + request_options: request_options + ) + result = WorkOS::WaitlistEntry.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 + + # List waitlists + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_waitlists(request_options: {}) + response = @client.request( + method: :get, + path: "/user_management/waitlists", + auth: true, + request_options: request_options + ) + WorkOS::Types::ListStruct.from_response(response, model: WorkOS::Waitlist) + end + + # Get a waitlist + # @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. The default waitlist is created when its first entry is added, so read requests for `default` return a `404` until then. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Waitlist] + def get_waitlist( + id:, + request_options: {} + ) + response = @client.request( + method: :get, + path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}", + auth: true, + request_options: request_options + ) + result = WorkOS::Waitlist.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 + + # List waitlist entries + # @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. The default waitlist is created when its first entry is added, so read requests for `default` return a `404` until then. + # @param before [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 `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. + # @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). + # @param state [WorkOS::Types::UserManagementWaitlistsState, nil] Filter waitlist entries by their state. + # @param email [String, nil] Filter waitlist entries by their exact email address. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::Types::ListStruct] + def list_waitlist_entries( + id:, + before: nil, + after: nil, + limit: 10, + order: "desc", + state: nil, + email: nil, + request_options: {} + ) + params = { + "before" => before, + "after" => after, + "limit" => limit, + "order" => order, + "state" => state, + "email" => email + }.compact + response = @client.request( + method: :get, + path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}/entries", + auth: true, + params: params, + request_options: request_options + ) + fetch_next = ->(cursor) { + list_waitlist_entries( + id: id, + before: before, + after: cursor, + limit: limit, + order: order, + state: state, + email: email, + request_options: request_options + ) + } + WorkOS::Types::ListStruct.from_response( + response, + model: WorkOS::WaitlistEntry, + filters: {id: id, before: before, limit: limit, order: order, state: state, email: email}, + fetch_next: fetch_next + ) + end + + # Create a waitlist entry + # @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. Use `default` when adding the first entry — the default waitlist is created automatically. + # @param email [String] The email address of the user joining the waitlist. + # @param additional_fields [Hash{String => String}, nil] Object containing additional key/value pairs collected with the waitlist entry. Supports up to 50 string pairs, with keys up to 40 characters and values up to 600 characters. Values are user-provided — treat them as untrusted input when rendering or exporting. + # @param send_confirmation_email [Boolean, nil] Whether to send the waitlist confirmation email to the user. Defaults to `false`. No email is sent when the waitlist confirmation email is disabled in the environment, even if `send_confirmation_email` is `true`. + # @param request_options [Hash] (see WorkOS::Types::RequestOptions) + # @return [WorkOS::WaitlistEntry] + def create_waitlist_entry( + id:, + email:, + additional_fields: nil, + send_confirmation_email: nil, + request_options: {} + ) + body = { + "email" => email, + "additional_fields" => additional_fields, + "send_confirmation_email" => send_confirmation_email + }.compact + response = @client.request( + method: :post, + path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}/entries", + auth: true, + body: body, + request_options: request_options + ) + result = WorkOS::WaitlistEntry.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 + # List API keys for a user # @param user_id [String] Unique identifier of the user. # @param before [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. diff --git a/lib/workos/user_management/create_password_reset_token.rb b/lib/workos/user_management/create_password_reset_token.rb index df036baa..239c6997 100644 --- a/lib/workos/user_management/create_password_reset_token.rb +++ b/lib/workos/user_management/create_password_reset_token.rb @@ -3,16 +3,5 @@ # This file is auto-generated by oagen. Do not edit. module WorkOS - class CreatePasswordResetToken < WorkOS::Types::BaseModel - HASH_ATTRS = { - email: :email - }.freeze - - attr_accessor :email - - def initialize(json) - hash = self.class.normalize(json) - @email = hash[:email] - end - end + CreatePasswordResetToken = CreateItContact end diff --git a/lib/workos/user_management/create_waitlist_entry.rb b/lib/workos/user_management/create_waitlist_entry.rb new file mode 100644 index 00000000..11656eb2 --- /dev/null +++ b/lib/workos/user_management/create_waitlist_entry.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class CreateWaitlistEntry < WorkOS::Types::BaseModel + HASH_ATTRS = { + email: :email, + additional_fields: :additional_fields, + send_confirmation_email: :send_confirmation_email + }.freeze + + attr_accessor \ + :email, + :additional_fields, + :send_confirmation_email + + def initialize(json) + hash = self.class.normalize(json) + @email = hash[:email] + @additional_fields = hash[:additional_fields] || {} + @send_confirmation_email = hash[:send_confirmation_email] + end + end +end diff --git a/lib/workos/user_management/waitlist.rb b/lib/workos/user_management/waitlist.rb new file mode 100644 index 00000000..adafecdc --- /dev/null +++ b/lib/workos/user_management/waitlist.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class Waitlist < WorkOS::Types::BaseModel + HASH_ATTRS = { + object: :object, + id: :id, + created_at: :created_at, + updated_at: :updated_at + }.freeze + + attr_accessor \ + :object, + :id, + :created_at, + :updated_at + + def initialize(json) + hash = self.class.normalize(json) + @object = hash[:object] + @id = hash[:id] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + end + end +end diff --git a/lib/workos/user_management/waitlist_entry.rb b/lib/workos/user_management/waitlist_entry.rb new file mode 100644 index 00000000..6bafdb60 --- /dev/null +++ b/lib/workos/user_management/waitlist_entry.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class WaitlistEntry < WorkOS::Types::BaseModel + HASH_ATTRS = { + id: :id, + email: :email, + state: :state, + approved_at: :approved_at, + additional_fields: :additional_fields, + waitlist_id: :waitlist_id, + created_at: :created_at, + updated_at: :updated_at, + object: :object + }.freeze + + attr_accessor \ + :id, + :email, + :state, + :approved_at, + :additional_fields, + :waitlist_id, + :created_at, + :updated_at, + :object + + def initialize(json) + hash = self.class.normalize(json) + @id = hash[:id] + @email = hash[:email] + @state = hash[:state] + @approved_at = hash[:approved_at] + @additional_fields = hash[:additional_fields] || {} + @waitlist_id = hash[:waitlist_id] + @created_at = hash[:created_at] + @updated_at = hash[:updated_at] + @object = hash[:object] + end + end +end diff --git a/rbi/workos/user_management.rbi b/rbi/workos/user_management.rbi index 11d570ce..8f89f9ea 100644 --- a/rbi/workos/user_management.rbi +++ b/rbi/workos/user_management.rbi @@ -463,6 +463,70 @@ module WorkOS end def delete_user_authorized_application(application_id:, user_id:, request_options:); end + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(NilClass) + end + def delete_waitlist_entry(id:, request_options:); end + + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::WaitlistEntry) + end + def create_waitlist_entry_approve(id:, request_options:); end + + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::WaitlistEntry) + end + def create_waitlist_entry_deny(id:, request_options:); end + + sig do + params( + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::Waitlist]) + end + def list_waitlists(request_options:); end + + sig do + params( + id: String, + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::Waitlist) + end + def get_waitlist(id:, request_options:); end + + sig do + params( + id: String, + before: T.nilable(String), + after: T.nilable(String), + limit: T.nilable(Integer), + order: T.nilable(String), + state: T.nilable(String), + email: T.nilable(String), + request_options: T::Hash[Symbol, T.untyped] + ).returns(T::Array[WorkOS::WaitlistEntry]) + end + def list_waitlist_entries(id:, before:, after:, limit:, order:, state:, email:, request_options:); end + + sig do + params( + id: String, + email: String, + additional_fields: T.nilable(T::Hash[String, String]), + send_confirmation_email: T.nilable(T::Boolean), + request_options: T::Hash[Symbol, T.untyped] + ).returns(WorkOS::WaitlistEntry) + end + def create_waitlist_entry(id:, email:, additional_fields:, send_confirmation_email:, request_options:); end + sig do params( user_id: String, diff --git a/test/workos/test_user_management.rb b/test/workos/test_user_management.rb index 1cbfc2d2..294090cf 100644 --- a/test/workos/test_user_management.rb +++ b/test/workos/test_user_management.rb @@ -459,6 +459,55 @@ def test_delete_user_authorized_application_returns_expected_result assert_nil result end + def test_delete_waitlist_entry_returns_expected_result + stub_request(:delete, %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.delete_waitlist_entry(id: "stub") + assert_nil result + end + + def test_create_waitlist_entry_approve_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/approve(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.create_waitlist_entry_approve(id: "stub") + refute_nil result + end + + def test_create_waitlist_entry_deny_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/deny(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.create_waitlist_entry_deny(id: "stub") + refute_nil result + end + + def test_list_waitlists_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/waitlists(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.user_management.list_waitlists + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_get_waitlist_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.get_waitlist(id: "stub") + refute_nil result + end + + def test_list_waitlist_entries_returns_expected_result + stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}) + .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) + result = @client.user_management.list_waitlist_entries(id: "stub") + assert_kind_of WorkOS::Types::ListStruct, result + end + + def test_create_waitlist_entry_returns_expected_result + stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}) + .to_return(body: "{}", status: 200) + result = @client.user_management.create_waitlist_entry(id: "stub", email: "stub") + refute_nil result + end + def test_list_user_api_keys_returns_expected_result stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/users/stub/api_keys(\?|\z)}) .to_return(body: '{"data": [], "list_metadata": {}}', status: 200) @@ -515,6 +564,13 @@ def test_create_user_api_key_returns_expected_result {name: :delete_redirect_uris, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/redirect_uris/stub(\?|\z)}, args: {id: "stub"}}, {name: :list_user_authorized_applications, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/authorized_applications(\?|\z)}, args: {user_id: "stub"}}, {name: :delete_user_authorized_application, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/authorized_applications/stub(\?|\z)}, args: {application_id: "stub", user_id: "stub"}}, + {name: :delete_waitlist_entry, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub(\?|\z)}, args: {id: "stub"}}, + {name: :create_waitlist_entry_approve, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/approve(\?|\z)}, args: {id: "stub"}}, + {name: :create_waitlist_entry_deny, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/waitlist_entries/stub/deny(\?|\z)}, args: {id: "stub"}}, + {name: :list_waitlists, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists(\?|\z)}}, + {name: :get_waitlist, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub(\?|\z)}, args: {id: "stub"}}, + {name: :list_waitlist_entries, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}, args: {id: "stub"}}, + {name: :create_waitlist_entry, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/waitlists/stub/entries(\?|\z)}, args: {id: "stub", email: "stub"}}, {name: :list_user_api_keys, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/api_keys(\?|\z)}, args: {user_id: "stub"}}, {name: :create_user_api_key, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/api_keys(\?|\z)}, args: {user_id: "stub", name: "stub", organization_id: "stub"}} ].each do |spec| diff --git a/test/workos/test_user_management_model_round_trip.rb b/test/workos/test_user_management_model_round_trip.rb index b89facad..c0b399b5 100644 --- a/test/workos/test_user_management_model_round_trip.rb +++ b/test/workos/test_user_management_model_round_trip.rb @@ -225,6 +225,19 @@ def test_revoke_session_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_create_waitlist_entry_round_trip + fixture = { + "email" => "stub", + "additional_fields" => {}, + "send_confirmation_email" => true + } + model = WorkOS::CreateWaitlistEntry.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["email"], json[:email] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_user_round_trip fixture = { "object" => "user", @@ -2058,6 +2071,45 @@ def test_device_authorization_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_waitlist_round_trip + fixture = { + "object" => "waitlist", + "id" => "stub", + "created_at" => "stub", + "updated_at" => "stub" + } + model = WorkOS::Waitlist.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_waitlist_entry_round_trip + fixture = { + "id" => "stub", + "email" => "stub", + "state" => "stub", + "approved_at" => nil, + "additional_fields" => {}, + "waitlist_id" => nil, + "created_at" => "stub", + "updated_at" => "stub", + "object" => "waitlist_entry" + } + model = WorkOS::WaitlistEntry.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["email"], json[:email] + assert_nil json[:approved_at] + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["updated_at"], json[:updated_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_jwks_response_round_trip fixture = { "keys" => [] @@ -2295,6 +2347,28 @@ def test_mfa_totp_session_authenticate_request_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + def test_email_completion_session_authenticate_request_round_trip + fixture = { + "client_id" => "stub", + "client_secret" => "stub", + "grant_type" => "urn:workos:oauth:grant-type:email-completion", + "email_completion_token" => "stub", + "email" => "stub", + "ip_address" => "stub", + "device_id" => "stub", + "user_agent" => "stub", + "signals_id" => "stub" + } + model = WorkOS::EmailCompletionSessionAuthenticateRequest.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["client_id"], json[:client_id] + assert_equal fixture["client_secret"], json[:client_secret] + assert_equal fixture["email_completion_token"], json[:email_completion_token] + assert_equal fixture["email"], json[:email] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + def test_organization_selection_session_authenticate_request_round_trip fixture = { "client_id" => "stub", From 1e9b383fd566220820fb0e8b9ec581b1053e6fa9 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:17 +0000 Subject: [PATCH 2/5] feat(user_management): Add model `EmailCompletionSessionAuthenticateRequest` --- ...completion_session_authenticate_request.rb | 43 +++++++++++ ...ompletion_session_authenticate_request.rbi | 72 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 lib/workos/user_management/email_completion_session_authenticate_request.rb create mode 100644 rbi/workos/email_completion_session_authenticate_request.rbi diff --git a/lib/workos/user_management/email_completion_session_authenticate_request.rb b/lib/workos/user_management/email_completion_session_authenticate_request.rb new file mode 100644 index 00000000..5b89aeae --- /dev/null +++ b/lib/workos/user_management/email_completion_session_authenticate_request.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + class EmailCompletionSessionAuthenticateRequest < WorkOS::Types::BaseModel + HASH_ATTRS = { + client_id: :client_id, + client_secret: :client_secret, + grant_type: :grant_type, + email_completion_token: :email_completion_token, + email: :email, + ip_address: :ip_address, + device_id: :device_id, + user_agent: :user_agent, + signals_id: :signals_id + }.freeze + + attr_accessor \ + :client_id, + :client_secret, + :grant_type, + :email_completion_token, + :email, + :ip_address, + :device_id, + :user_agent, + :signals_id + + def initialize(json) + hash = self.class.normalize(json) + @client_id = hash[:client_id] + @client_secret = hash[:client_secret] + @grant_type = hash[:grant_type] + @email_completion_token = hash[:email_completion_token] + @email = hash[:email] + @ip_address = hash[:ip_address] + @device_id = hash[:device_id] + @user_agent = hash[:user_agent] + @signals_id = hash[:signals_id] + end + end +end diff --git a/rbi/workos/email_completion_session_authenticate_request.rbi b/rbi/workos/email_completion_session_authenticate_request.rbi new file mode 100644 index 00000000..e33faad9 --- /dev/null +++ b/rbi/workos/email_completion_session_authenticate_request.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class EmailCompletionSessionAuthenticateRequest + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def client_id; end + + sig { params(value: String).returns(String) } + def client_id=(value); end + + sig { returns(String) } + def client_secret; end + + sig { params(value: String).returns(String) } + def client_secret=(value); end + + sig { returns(String) } + def grant_type; end + + sig { params(value: String).returns(String) } + def grant_type=(value); end + + sig { returns(String) } + def email_completion_token; end + + sig { params(value: String).returns(String) } + def email_completion_token=(value); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(T.nilable(String)) } + def ip_address; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def ip_address=(value); end + + sig { returns(T.nilable(String)) } + def device_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def device_id=(value); end + + sig { returns(T.nilable(String)) } + def user_agent; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def user_agent=(value); end + + sig { returns(T.nilable(String)) } + def signals_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def signals_id=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end From 5014a87fe6c4933f2344f1f7ade4d25beba393eb Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:17 +0000 Subject: [PATCH 3/5] fix(user_management): Update user management API surface --- .../types/authenticate_response_authentication_method.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/workos/types/authenticate_response_authentication_method.rb b/lib/workos/types/authenticate_response_authentication_method.rb index 2d515ab4..d3da165a 100644 --- a/lib/workos/types/authenticate_response_authentication_method.rb +++ b/lib/workos/types/authenticate_response_authentication_method.rb @@ -11,13 +11,10 @@ class AuthenticateResponseAuthenticationMethod APPLE_OAUTH = "AppleOAuth" BITBUCKET_OAUTH = "BitbucketOAuth" CROSS_APP_AUTH = "CrossAppAuth" - DISCORD_OAUTH = "DiscordOAuth" EXTERNAL_AUTH = "ExternalAuth" GIT_HUB_OAUTH = "GitHubOAuth" GIT_LAB_OAUTH = "GitLabOAuth" GOOGLE_OAUTH = "GoogleOAuth" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" LINKED_IN_OAUTH = "LinkedInOAuth" MICROSOFT_OAUTH = "MicrosoftOAuth" @@ -29,7 +26,7 @@ class AuthenticateResponseAuthenticationMethod MAGIC_AUTH = "MagicAuth" IMPERSONATION = "Impersonation" MIGRATED_SESSION = "MigratedSession" - ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, DISCORD_OAUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze + ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze end end end From 7a558a0a948833aafefb7f81bc28bd2200950b23 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:17 +0000 Subject: [PATCH 4/5] chore(generated): regenerate shared files for UserManagement --- .last-synced-sha | 2 +- .oagen-manifest.json | 150 ++++++++++++++++++ lib/workos/inflections.rb | 15 ++ .../user_identities_get_item_provider.rb | 5 +- lib/workos/types/user_sessions_status.rb | 2 +- lib/workos/types/waitlist_entry_state.rb | 9 ++ rbi/workos/create_waitlist_entry.rbi | 36 +++++ rbi/workos/waitlist.rbi | 42 +++++ rbi/workos/waitlist_entry.rbi | 72 +++++++++ test/workos/test_shared_model_round_trip.rb | 124 +++++++-------- 10 files changed, 389 insertions(+), 68 deletions(-) create mode 100644 lib/workos/types/waitlist_entry_state.rb create mode 100644 rbi/workos/create_waitlist_entry.rbi create mode 100644 rbi/workos/waitlist.rbi create mode 100644 rbi/workos/waitlist_entry.rbi diff --git a/.last-synced-sha b/.last-synced-sha index 066427ca..0f267924 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -a07d8e7988d035c2d727787f18f64d71b4b89a84 +d61348070f219d16b6285f205986c2d332bf6e9c diff --git a/.oagen-manifest.json b/.oagen-manifest.json index e3b41401..f36c2509 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -496,6 +496,7 @@ "lib/workos/types/user_management_authentication_provider.rb", "lib/workos/types/user_management_authentication_screen_hint.rb", "lib/workos/types/user_management_organization_membership_statuses.rb", + "lib/workos/types/user_management_waitlists_state.rb", "lib/workos/types/user_organization_membership_base_list_data_status.rb", "lib/workos/types/user_organization_membership_status.rb", "lib/workos/types/user_role_assignment_source_type.rb", @@ -513,6 +514,7 @@ "lib/workos/types/vault_metadata_read_data_actor_source.rb", "lib/workos/types/vault_names_listed_data_actor_source.rb", "lib/workos/types/vault_order.rb", + "lib/workos/types/waitlist_entry_state.rb", "lib/workos/types/waitlist_user_state.rb", "lib/workos/types/webhook_endpoint_status.rb", "lib/workos/types/widget_session_token_scopes.rb", @@ -584,11 +586,13 @@ "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_waitlist_entry.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", "lib/workos/user_management/email_change_confirmation.rb", "lib/workos/user_management/email_change_confirmation_user.rb", + "lib/workos/user_management/email_completion_session_authenticate_request.rb", "lib/workos/user_management/email_verification.rb", "lib/workos/user_management/email_verification_code_session_authenticate_request.rb", "lib/workos/user_management/email_verification_created.rb", @@ -657,6 +661,8 @@ "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/waitlist.rb", + "lib/workos/user_management/waitlist_entry.rb", "lib/workos/vault.rb", "lib/workos/vault/actor.rb", "lib/workos/vault/create_data_key_request.rb", @@ -907,6 +913,7 @@ "rbi/workos/create_user_api_key.rbi", "rbi/workos/create_user_invite_options.rbi", "rbi/workos/create_user_organization_membership.rbi", + "rbi/workos/create_waitlist_entry.rbi", "rbi/workos/create_webhook_endpoint.rbi", "rbi/workos/custom_provider_definition.rbi", "rbi/workos/data_integration.rbi", @@ -970,6 +977,7 @@ "rbi/workos/email_change.rbi", "rbi/workos/email_change_confirmation.rbi", "rbi/workos/email_change_confirmation_user.rbi", + "rbi/workos/email_completion_session_authenticate_request.rbi", "rbi/workos/email_verification.rbi", "rbi/workos/email_verification_code_session_authenticate_request.rbi", "rbi/workos/email_verification_created.rbi", @@ -1246,6 +1254,8 @@ "rbi/workos/vault_object.rbi", "rbi/workos/verify_email_address.rbi", "rbi/workos/verify_email_response.rbi", + "rbi/workos/waitlist.rbi", + "rbi/workos/waitlist_entry.rbi", "rbi/workos/waitlist_user.rbi", "rbi/workos/waitlist_user_approved.rbi", "rbi/workos/waitlist_user_created.rbi", @@ -2198,6 +2208,146 @@ "PUT /data-integrations/{slug}/client-credentials": { "sdkMethod": "update_data_integration_client_credentials", "service": "pipes" + }, + "GET /agents/blueprints": { + "sdkMethod": "list_blueprints", + "service": "agents" + }, + "POST /agents/blueprints": { + "sdkMethod": "create_blueprint", + "service": "agents" + }, + "GET /agents/blueprints/{agent_blueprint_id}": { + "sdkMethod": "get_blueprint", + "service": "agents" + }, + "PATCH /agents/blueprints/{agent_blueprint_id}": { + "sdkMethod": "update_blueprint", + "service": "agents" + }, + "DELETE /agents/blueprints/{agent_blueprint_id}": { + "sdkMethod": "delete_blueprint", + "service": "agents" + }, + "POST /agents/blueprints/{agent_blueprint_id}/tokens": { + "sdkMethod": "create_blueprint_token", + "service": "agents" + }, + "GET /agents/instances": { + "sdkMethod": "list_instances", + "service": "agents" + }, + "GET /agents/instances/{agent_instance_id}": { + "sdkMethod": "get_instance", + "service": "agents" + }, + "DELETE /agents/instances/{agent_instance_id}": { + "sdkMethod": "delete_instance", + "service": "agents" + }, + "GET /agents/sessions": { + "sdkMethod": "list_sessions", + "service": "agents" + }, + "GET /agents/sessions/{agent_instance_session_id}": { + "sdkMethod": "get_session", + "service": "agents" + }, + "POST /agents/sessions/{agent_instance_session_id}/revoke": { + "sdkMethod": "revoke_session", + "service": "agents" + }, + "POST /connections": { + "sdkMethod": "create_connection", + "service": "sso" + }, + "GET /connections/{connectionId}/saml_idp_signing_certs": { + "sdkMethod": "list_connection_saml_idp_signing_certs", + "service": "sso" + }, + "POST /connections/{connectionId}/saml_idp_signing_certs": { + "sdkMethod": "create_connection_saml_idp_signing_cert", + "service": "sso" + }, + "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": { + "sdkMethod": "delete_connection_saml_idp_signing_cert", + "service": "sso" + }, + "GET /connections/{connectionId}/saml_sp_encryption_certs": { + "sdkMethod": "list_connection_saml_sp_encryption_certs", + "service": "sso" + }, + "POST /connections/{connectionId}/saml_sp_encryption_certs": { + "sdkMethod": "create_connection_saml_sp_encryption_cert", + "service": "sso" + }, + "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": { + "sdkMethod": "delete_connection_saml_sp_encryption_cert", + "service": "sso" + }, + "GET /connections/{connectionId}/saml_sp_signing_cert": { + "sdkMethod": "list_connection_saml_sp_signing_cert", + "service": "sso" + }, + "POST /connections/{connectionId}/saml_sp_signing_cert": { + "sdkMethod": "create_connection_saml_sp_signing_cert", + "service": "sso" + }, + "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": { + "sdkMethod": "delete_connection_saml_sp_signing_cert", + "service": "sso" + }, + "PATCH /connections/{id}": { + "sdkMethod": "update_connection", + "service": "sso" + }, + "GET /organizations/{organization_id}/it_contacts": { + "sdkMethod": "list_it_contacts", + "service": "organizations" + }, + "POST /organizations/{organization_id}/it_contacts": { + "sdkMethod": "create_it_contact", + "service": "organizations" + }, + "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": { + "sdkMethod": "delete_it_contact", + "service": "organizations" + }, + "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": { + "sdkMethod": "invite_it_contact", + "service": "organizations" + }, + "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": { + "sdkMethod": "revoke_it_contact", + "service": "organizations" + }, + "DELETE /user_management/waitlist_entries/{id}": { + "sdkMethod": "delete_waitlist_entry", + "service": "user_management" + }, + "POST /user_management/waitlist_entries/{id}/approve": { + "sdkMethod": "create_waitlist_entry_approve", + "service": "user_management" + }, + "POST /user_management/waitlist_entries/{id}/deny": { + "sdkMethod": "create_waitlist_entry_deny", + "service": "user_management" + }, + "GET /user_management/waitlists": { + "sdkMethod": "list_waitlists", + "service": "user_management" + }, + "GET /user_management/waitlists/{id}": { + "sdkMethod": "get_waitlist", + "service": "user_management" + }, + "GET /user_management/waitlists/{id}/entries": { + "sdkMethod": "list_waitlist_entries", + "service": "user_management" + }, + "POST /user_management/waitlists/{id}/entries": { + "sdkMethod": "create_waitlist_entry", + "service": "user_management" } } } diff --git a/lib/workos/inflections.rb b/lib/workos/inflections.rb index f2763661..c170c5be 100644 --- a/lib/workos/inflections.rb +++ b/lib/workos/inflections.rb @@ -45,15 +45,30 @@ "connection_saml_certificate_renewed_data_certificate_certificate_type" => "ConnectionSAMLCertificateRenewedDataCertificateCertificateType", "connection_saml_certificate_renewed_data_connection" => "ConnectionSAMLCertificateRenewedDataConnection", "cors_origin_response" => "CORSOriginResponse", + "create_connection_oidc_options" => "CreateConnectionOIDCOptions", + "create_connection_oidc_options_id_token_signature_algorithm" => "CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm", + "create_connection_oidc_options_token_authentication_method" => "CreateConnectionOIDCOptionsTokenAuthenticationMethod", + "create_connection_saml_options" => "CreateConnectionSAMLOptions", "create_cors_origin" => "CreateCORSOrigin", "create_m2m_application" => "CreateM2MApplication", "create_oauth_application" => "CreateOAuthApplication", + "create_saml_idp_signing_certificate" => "CreateSAMLIdpSigningCertificate", "jwt_template_response" => "JWTTemplateResponse", "mfa_totp_session_authenticate_request" => "MFATotpSessionAuthenticateRequest", + "patch_connection_oidc_options" => "PatchConnectionOIDCOptions", + "patch_connection_oidc_options_id_token_signature_algorithm" => "PatchConnectionOIDCOptionsIdTokenSignatureAlgorithm", + "patch_connection_oidc_options_token_authentication_method" => "PatchConnectionOIDCOptionsTokenAuthenticationMethod", + "patch_connection_saml_options" => "PatchConnectionSAMLOptions", "pkce" => "PKCE", + "saml_idp_signing_certificate" => "SAMLIdpSigningCertificate", + "saml_idp_signing_certificate_list" => "SAMLIdpSigningCertificateList", + "saml_sp_encryption_certificate" => "SAMLSpEncryptionCertificate", + "saml_sp_encryption_certificate_list" => "SAMLSpEncryptionCertificateList", + "saml_sp_signing_certificate" => "SAMLSpSigningCertificate", "sso" => "SSO", "sso_authorize_url_response" => "SSOAuthorizeUrlResponse", "sso_device_authorization_request" => "SSODeviceAuthorizationRequest", + "sso_grant_type" => "SSOGrantType", "sso_logout_authorize_request" => "SSOLogoutAuthorizeRequest", "sso_logout_authorize_response" => "SSOLogoutAuthorizeResponse", "sso_provider" => "SSOProvider", diff --git a/lib/workos/types/user_identities_get_item_provider.rb b/lib/workos/types/user_identities_get_item_provider.rb index bdac2e79..88c3dc96 100644 --- a/lib/workos/types/user_identities_get_item_provider.rb +++ b/lib/workos/types/user_identities_get_item_provider.rb @@ -7,12 +7,9 @@ module Types class UserIdentitiesGetItemProvider APPLE_OAUTH = "AppleOAuth" BITBUCKET_OAUTH = "BitbucketOAuth" - DISCORD_OAUTH = "DiscordOAuth" GITHUB_OAUTH = "GithubOAuth" GIT_LAB_OAUTH = "GitLabOAuth" GOOGLE_OAUTH = "GoogleOAuth" - GROK_OAUTH = "GrokOAuth" - XO_AUTH = "XOAuth" INTUIT_OAUTH = "IntuitOAuth" LINKED_IN_OAUTH = "LinkedInOAuth" MICROSOFT_OAUTH = "MicrosoftOAuth" @@ -21,7 +18,7 @@ class UserIdentitiesGetItemProvider VERCEL_MARKETPLACE_OAUTH = "VercelMarketplaceOAuth" VERCEL_OAUTH = "VercelOAuth" XERO_OAUTH = "XeroOAuth" - ALL = [APPLE_OAUTH, BITBUCKET_OAUTH, DISCORD_OAUTH, GITHUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, GROK_OAUTH, XO_AUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH].freeze + ALL = [APPLE_OAUTH, BITBUCKET_OAUTH, GITHUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH].freeze end end end diff --git a/lib/workos/types/user_sessions_status.rb b/lib/workos/types/user_sessions_status.rb index 0d7e0642..5ec0a9a4 100644 --- a/lib/workos/types/user_sessions_status.rb +++ b/lib/workos/types/user_sessions_status.rb @@ -4,6 +4,6 @@ module WorkOS module Types - UserSessionsStatus = SessionCreatedDataStatus + UserSessionsStatus = AgentInstanceSessionStatus end end diff --git a/lib/workos/types/waitlist_entry_state.rb b/lib/workos/types/waitlist_entry_state.rb new file mode 100644 index 00000000..c012dcb3 --- /dev/null +++ b/lib/workos/types/waitlist_entry_state.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +module WorkOS + module Types + WaitlistEntryState = UserManagementWaitlistsState + end +end diff --git a/rbi/workos/create_waitlist_entry.rbi b/rbi/workos/create_waitlist_entry.rbi new file mode 100644 index 00000000..94c266ec --- /dev/null +++ b/rbi/workos/create_waitlist_entry.rbi @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class CreateWaitlistEntry + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def additional_fields; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def additional_fields=(value); end + + sig { returns(T.nilable(T::Boolean)) } + def send_confirmation_email; end + + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def send_confirmation_email=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/waitlist.rbi b/rbi/workos/waitlist.rbi new file mode 100644 index 00000000..e64d84f3 --- /dev/null +++ b/rbi/workos/waitlist.rbi @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class Waitlist + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/rbi/workos/waitlist_entry.rbi b/rbi/workos/waitlist_entry.rbi new file mode 100644 index 00000000..bda7db0e --- /dev/null +++ b/rbi/workos/waitlist_entry.rbi @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# This file is auto-generated by oagen. Do not edit. + +# typed: strong + +module WorkOS + class WaitlistEntry + sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void } + def initialize(json); end + + sig { returns(String) } + def id; end + + sig { params(value: String).returns(String) } + def id=(value); end + + sig { returns(String) } + def email; end + + sig { params(value: String).returns(String) } + def email=(value); end + + sig { returns(String) } + def state; end + + sig { params(value: String).returns(String) } + def state=(value); end + + sig { returns(T.nilable(String)) } + def approved_at; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def approved_at=(value); end + + sig { returns(T.nilable(T::Hash[String, String])) } + def additional_fields; end + + sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + def additional_fields=(value); end + + sig { returns(T.nilable(String)) } + def waitlist_id; end + + sig { params(value: T.nilable(String)).returns(T.nilable(String)) } + def waitlist_id=(value); end + + sig { returns(String) } + def created_at; end + + sig { params(value: String).returns(String) } + def created_at=(value); end + + sig { returns(String) } + def updated_at; end + + sig { params(value: String).returns(String) } + def updated_at=(value); end + + sig { returns(String) } + def object; end + + sig { params(value: String).returns(String) } + def object=(value); end + + sig { returns(T::Hash[Symbol, T.untyped]) } + def to_h; end + + sig { params(args: T.untyped).returns(String) } + def to_json(*args); end + end +end diff --git a/test/workos/test_shared_model_round_trip.rb b/test/workos/test_shared_model_round_trip.rb index 13cef9f2..b711b399 100644 --- a/test/workos/test_shared_model_round_trip.rb +++ b/test/workos/test_shared_model_round_trip.rb @@ -16,39 +16,6 @@ def test_error_response_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_object_summary_round_trip - fixture = { - "id" => "stub", - "name" => "stub", - "updated_at" => nil - } - model = WorkOS::ObjectSummary.new(fixture.to_json) - json = model.to_h - assert_kind_of Hash, json - assert_equal fixture["id"], json[:id] - assert_equal fixture["name"], json[:name] - fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } - end - - def test_object_version_round_trip - fixture = { - "created_at" => "stub", - "current_version" => true, - "etag" => "stub", - "id" => "stub", - "size" => 1 - } - model = WorkOS::ObjectVersion.new(fixture.to_json) - json = model.to_h - assert_kind_of Hash, json - assert_equal fixture["created_at"], json[:created_at] - assert_equal fixture["current_version"], json[:current_version] - assert_equal fixture["etag"], json[:etag] - assert_equal fixture["id"], json[:id] - assert_equal fixture["size"], json[:size] - fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } - end - def test_connect_application_oauth_round_trip fixture = { "object" => "connect_application", @@ -196,24 +163,6 @@ def test_waitlist_user_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_event_schema_round_trip - fixture = { - "object" => "event", - "id" => "stub", - "event" => "stub", - "data" => {}, - "created_at" => "stub", - "context" => {} - } - model = WorkOS::EventSchema.new(fixture.to_json) - json = model.to_h - assert_kind_of Hash, json - assert_equal fixture["id"], json[:id] - assert_equal fixture["event"], json[:event] - assert_equal fixture["created_at"], json[:created_at] - fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } - end - def test_agent_registration_claim_attempt_created_round_trip fixture = { "object" => "event", @@ -867,17 +816,6 @@ def test_auth_method_mismatch_error_round_trip fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end - def test_event_list_list_metadata_round_trip - fixture = { - "after" => nil - } - model = WorkOS::EventListListMetadata.new(fixture.to_json) - json = model.to_h - assert_kind_of Hash, json - assert_nil json[:after] - fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } - end - def test_event_context_google_analytics_session_round_trip fixture = { "containerId" => "stub", @@ -905,4 +843,66 @@ def test_authorized_connect_application_list_data_round_trip assert_equal fixture["id"], json[:id] fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } end + + def test_object_summary_round_trip + fixture = { + "id" => "stub", + "name" => "stub", + "updated_at" => nil + } + model = WorkOS::ObjectSummary.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["name"], json[:name] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_object_version_round_trip + fixture = { + "created_at" => "stub", + "current_version" => true, + "etag" => "stub", + "id" => "stub", + "size" => 1 + } + model = WorkOS::ObjectVersion.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["created_at"], json[:created_at] + assert_equal fixture["current_version"], json[:current_version] + assert_equal fixture["etag"], json[:etag] + assert_equal fixture["id"], json[:id] + assert_equal fixture["size"], json[:size] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_event_schema_round_trip + fixture = { + "object" => "event", + "id" => "stub", + "event" => "stub", + "data" => {}, + "created_at" => "stub", + "context" => {} + } + model = WorkOS::EventSchema.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_equal fixture["id"], json[:id] + assert_equal fixture["event"], json[:event] + assert_equal fixture["created_at"], json[:created_at] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end + + def test_event_list_list_metadata_round_trip + fixture = { + "after" => nil + } + model = WorkOS::EventListListMetadata.new(fixture.to_json) + json = model.to_h + assert_kind_of Hash, json + assert_nil json[:after] + fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" } + end end From ab8420df58dcfcc219008cda4646b3e7062316b9 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:10:25 +0000 Subject: [PATCH 5/5] chore(generated): add release notes fragment --- ...67627615ba0a9db28194f68afd773d08ce9cbe7.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .changelog-pending/2026-09-01T16-10-25-667627615ba0a9db28194f68afd773d08ce9cbe7.md diff --git a/.changelog-pending/2026-09-01T16-10-25-667627615ba0a9db28194f68afd773d08ce9cbe7.md b/.changelog-pending/2026-09-01T16-10-25-667627615ba0a9db28194f68afd773d08ce9cbe7.md new file mode 100644 index 00000000..576d53a9 --- /dev/null +++ b/.changelog-pending/2026-09-01T16-10-25-667627615ba0a9db28194f68afd773d08ce9cbe7.md @@ -0,0 +1,23 @@ +* [#545](https://github.com/workos/workos-ruby/pull/545) feat(generated)!: regenerate from spec (3 changes) + + **Features** + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Added model `EmailCompletionSessionAuthenticateRequest` + * Added model `CreateWaitlistEntry` + * Added model `Waitlist` + * Added model `WaitlistEntry` + * Added enum `WaitlistEntryState` + * Added enum `UserManagementWaitlistsState` + * Added service `UserManagementWaitlists` + + **Fixes** + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Changed request body for `UserManagementAuthentication.authenticate` + * Changed errors for endpoint `POST /user_management/authenticate` + * Removed `DiscordOAuth` from `AuthenticateResponseAuthenticationMethod` + * Removed `GrokOAuth` from `AuthenticateResponseAuthenticationMethod` + * Removed `XOAuth` from `AuthenticateResponseAuthenticationMethod` + * Removed `DiscordOAuth` from `UserIdentitiesGetItemProvider` + * Removed `GrokOAuth` from `UserIdentitiesGetItemProvider` + * Removed `XOAuth` from `UserIdentitiesGetItemProvider` + * Changed errors for endpoint `DELETE /user_management/users/{id}`