workos 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/CLAUDE.md +38 -0
  3. data/.last-synced-sha +1 -1
  4. data/.oagen-manifest.json +12 -0
  5. data/.release-please-manifest.json +1 -1
  6. data/AGENTS.md +1 -0
  7. data/CHANGELOG.md +87 -0
  8. data/Gemfile.lock +2 -2
  9. data/lib/workos/connect.rb +2 -2
  10. data/lib/workos/events.rb +2 -2
  11. data/lib/workos/groups.rb +6 -2
  12. data/lib/workos/pipes/connected_account.rb +9 -0
  13. data/lib/workos/pipes/create_data_integration.rb +3 -0
  14. data/lib/workos/pipes/data_integration.rb +3 -0
  15. data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +5 -2
  16. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
  17. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
  18. data/lib/workos/pipes.rb +45 -2
  19. data/lib/workos/pipes_provider/configure_data_integration_body.rb +5 -2
  20. data/lib/workos/pipes_provider/data_integration_configuration_response.rb +3 -0
  21. data/lib/workos/pipes_provider.rb +4 -1
  22. data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
  23. data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
  24. data/lib/workos/shared/waitlist_user.rb +3 -0
  25. data/lib/workos/sso/connection.rb +0 -3
  26. data/lib/workos/sso.rb +73 -26
  27. data/lib/workos/types/authenticate_response_authentication_method.rb +3 -1
  28. data/lib/workos/types/connected_account_auth_method.rb +2 -1
  29. data/lib/workos/types/connection_activated_data_connection_type.rb +3 -1
  30. data/lib/workos/types/connection_type.rb +3 -1
  31. data/lib/workos/types/connections_connection_type.rb +3 -1
  32. data/lib/workos/types/create_user_password_salt_position.rb +13 -0
  33. data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
  34. data/lib/workos/types/update_user_password_salt_position.rb +9 -0
  35. data/lib/workos/types/user_identities_get_item_provider.rb +3 -1
  36. data/lib/workos/user_management/create_user.rb +5 -2
  37. data/lib/workos/user_management/update_user.rb +5 -2
  38. data/lib/workos/user_management.rb +105 -51
  39. data/lib/workos/version.rb +1 -1
  40. data/rbi/workos/agent_registration_refreshed.rbi +54 -0
  41. data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
  42. data/rbi/workos/configure_data_integration_body.rbi +6 -0
  43. data/rbi/workos/connected_account.rbi +18 -0
  44. data/rbi/workos/connection.rbi +0 -6
  45. data/rbi/workos/create_data_integration.rbi +6 -0
  46. data/rbi/workos/create_user.rbi +6 -0
  47. data/rbi/workos/custom_provider_definition.rbi +4 -4
  48. data/rbi/workos/data_integration.rbi +8 -2
  49. data/rbi/workos/data_integration_configuration_response.rbi +6 -0
  50. data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
  51. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
  52. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
  53. data/rbi/workos/events.rbi +2 -2
  54. data/rbi/workos/groups.rbi +2 -1
  55. data/rbi/workos/pipes.rbi +17 -2
  56. data/rbi/workos/pipes_provider.rbi +2 -1
  57. data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
  58. data/rbi/workos/sso.rbi +26 -0
  59. data/rbi/workos/update_user.rbi +6 -0
  60. data/rbi/workos/user_management.rbi +36 -2
  61. data/rbi/workos/waitlist_user.rbi +6 -0
  62. data/test/workos/test_authkit_helpers.rb +22 -10
  63. data/test/workos/test_events.rb +2 -2
  64. data/test/workos/test_pipes.rb +8 -0
  65. data/test/workos/test_pipes_model_round_trip.rb +28 -4
  66. data/test/workos/test_pipes_provider_model_round_trip.rb +3 -1
  67. data/test/workos/test_shared_model_round_trip.rb +29 -0
  68. data/test/workos/test_sso_model_round_trip.rb +0 -1
  69. data/test/workos/test_user_management.rb +6 -6
  70. data/test/workos/test_user_management_model_round_trip.rb +4 -4
  71. metadata +11 -1
data/rbi/workos/sso.rbi CHANGED
@@ -40,6 +40,32 @@ module WorkOS
40
40
  end
41
41
  def delete_connection(id:, request_options:); end
42
42
 
43
+ sig do
44
+ params(
45
+ redirect_uri: String,
46
+ provider_scopes: T.nilable(T::Array[String]),
47
+ provider_query_params: T.nilable(T::Hash[String, String]),
48
+ client_id: T.nilable(String),
49
+ domain: T.nilable(String),
50
+ provider: T.nilable(String),
51
+ state: T.nilable(String),
52
+ connection: T.nilable(String),
53
+ organization: T.nilable(String),
54
+ domain_hint: T.nilable(String),
55
+ login_hint: T.nilable(String),
56
+ nonce: T.nilable(String),
57
+ prompt: T.nilable(String)
58
+ ).returns(String)
59
+ end
60
+ def get_authorization_url(redirect_uri:, provider_scopes:, provider_query_params:, client_id:, domain:, provider:, state:, connection:, organization:, domain_hint:, login_hint:, nonce:, prompt:); end
61
+
62
+ sig do
63
+ params(
64
+ token: String
65
+ ).returns(String)
66
+ end
67
+ def get_logout_url(token:); end
68
+
43
69
  sig do
44
70
  params(
45
71
  profile_id: String,
@@ -75,6 +75,12 @@ module WorkOS
75
75
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
76
76
  def password_hash_type=(value); end
77
77
 
78
+ sig { returns(T.nilable(String)) }
79
+ def password_salt_position; end
80
+
81
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
82
+ def password_salt_position=(value); end
83
+
78
84
  sig { returns(T::Hash[Symbol, T.untyped]) }
79
85
  def to_h; end
80
86
 
@@ -25,13 +25,17 @@ module WorkOS
25
25
  sig { returns(String) }
26
26
  def password_hash_type; end
27
27
 
28
+ sig { returns(T.nilable(String)) }
29
+ def password_salt_position; end
30
+
28
31
  sig do
29
32
  params(
30
33
  password_hash: String,
31
- password_hash_type: String
34
+ password_hash_type: String,
35
+ password_salt_position: T.nilable(String)
32
36
  ).returns(WorkOS::UserManagement::PasswordHashed)
33
37
  end
34
- def self.new(password_hash:, password_hash_type:); end
38
+ def self.new(password_hash:, password_hash_type:, password_salt_position:); end
35
39
  end
36
40
 
37
41
  sig { params(client: WorkOS::BaseClient).void }
@@ -62,6 +66,28 @@ module WorkOS
62
66
  end
63
67
  def create_authenticate(client_id:, grant_type:, code:, client_secret:, code_verifier:, invitation_token:, ip_address:, device_id:, user_agent:, signals_id:, request_options:); end
64
68
 
69
+ sig do
70
+ params(
71
+ redirect_uri: String,
72
+ code_challenge_method: T.nilable(String),
73
+ code_challenge: T.nilable(String),
74
+ domain_hint: T.nilable(String),
75
+ connection_id: T.nilable(String),
76
+ provider_query_params: T.nilable(T::Hash[String, String]),
77
+ provider_scopes: T.nilable(T::Array[String]),
78
+ invitation_token: T.nilable(String),
79
+ max_age: T.nilable(Integer),
80
+ screen_hint: T.nilable(String),
81
+ login_hint: T.nilable(String),
82
+ provider: T.nilable(String),
83
+ prompt: T.nilable(String),
84
+ state: T.nilable(String),
85
+ organization_id: T.nilable(String),
86
+ client_id: T.nilable(String)
87
+ ).returns(String)
88
+ end
89
+ def get_authorization_url(redirect_uri:, code_challenge_method:, code_challenge:, domain_hint:, connection_id:, provider_query_params:, provider_scopes:, invitation_token:, max_age:, screen_hint:, login_hint:, provider:, prompt:, state:, organization_id:, client_id:); end
90
+
65
91
  sig do
66
92
  params(
67
93
  client_id: String,
@@ -90,6 +116,14 @@ module WorkOS
90
116
  end
91
117
  def get_radar_challenge(id:, request_options:); end
92
118
 
119
+ sig do
120
+ params(
121
+ session_id: String,
122
+ return_to: T.nilable(String)
123
+ ).returns(String)
124
+ end
125
+ def get_logout_url(session_id:, return_to:); end
126
+
93
127
  sig do
94
128
  params(
95
129
  session_id: String,
@@ -39,6 +39,12 @@ module WorkOS
39
39
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
40
40
  def approved_at=(value); end
41
41
 
42
+ sig { returns(T.nilable(String)) }
43
+ def waitlist_id; end
44
+
45
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
46
+ def waitlist_id=(value); end
47
+
42
48
  sig { returns(String) }
43
49
  def created_at; end
44
50
 
@@ -26,19 +26,21 @@ class AuthKitHelpersTest < Minitest::Test
26
26
  assert_equal "/user_management/authorize", parsed.path
27
27
  end
28
28
 
29
- def test_get_authorization_url_requires_client_id
29
+ def test_get_authorization_url_omits_client_id_when_unconfigured
30
30
  client = WorkOS::Client.new(api_key: "k", client_id: nil)
31
- err = assert_raises(ArgumentError) do
32
- client.user_management.get_authorization_url(redirect_uri: "x", provider: "GoogleOAuth")
33
- end
34
- assert_match(/client_id is required/, err.message)
31
+ url = client.user_management.get_authorization_url(redirect_uri: "x", provider: "GoogleOAuth")
32
+ params = URI.decode_www_form(URI.parse(url).query).to_h
33
+ refute params.key?("client_id")
35
34
  end
36
35
 
37
- def test_get_authorization_url_requires_provider_or_connection_or_org
38
- err = assert_raises(ArgumentError) do
39
- @um.get_authorization_url(redirect_uri: "x")
40
- end
41
- assert_match(/provider, connection_id, or organization_id required/, err.message)
36
+ def test_get_authorization_url_explicit_client_id_overrides_configured
37
+ url = @um.get_authorization_url(
38
+ redirect_uri: "https://app.example.com/cb",
39
+ provider: "GoogleOAuth",
40
+ client_id: "client_override"
41
+ )
42
+ params = URI.decode_www_form(URI.parse(url).query).to_h
43
+ assert_equal "client_override", params["client_id"]
42
44
  end
43
45
 
44
46
  # H10
@@ -57,6 +59,16 @@ class AuthKitHelpersTest < Minitest::Test
57
59
  assert_equal expected_challenge, params["code_challenge"]
58
60
  end
59
61
 
62
+ def test_get_authorization_url_with_pkce_forwards_client_id_override
63
+ url, _verifier, _state = @um.get_authorization_url_with_pkce(
64
+ redirect_uri: "https://app.example.com/cb",
65
+ provider: "GoogleOAuth",
66
+ client_id: "client_override"
67
+ )
68
+ params = URI.decode_www_form(URI.parse(url).query).to_h
69
+ assert_equal "client_override", params["client_id"]
70
+ end
71
+
60
72
  # H11
61
73
  def test_authenticate_with_code_pkce_posts_correct_body
62
74
  stub = stub_request(:post, "https://api.workos.com/user_management/authenticate")
@@ -14,13 +14,13 @@ class EventsTest < Minitest::Test
14
14
  def test_list_events_returns_expected_result
15
15
  stub_request(:get, %r{\Ahttps://api\.workos\.com/events(\?|\z)})
16
16
  .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
17
- result = @client.events.list_events
17
+ result = @client.events.list_events(events: ["stub"])
18
18
  assert_kind_of WorkOS::Types::ListStruct, result
19
19
  end
20
20
 
21
21
  # Parameterized authentication error tests (one per endpoint).
22
22
  [
23
- {name: :list_events, verb: :get, url: %r{\Ahttps://api\.workos\.com/events(\?|\z)}}
23
+ {name: :list_events, verb: :get, url: %r{\Ahttps://api\.workos\.com/events(\?|\z)}, args: {events: ["stub"]}}
24
24
  ].each do |spec|
25
25
  define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do
26
26
  stub_request(spec[:verb], spec[:url])
@@ -60,6 +60,13 @@ class PipesTest < Minitest::Test
60
60
  refute_nil result
61
61
  end
62
62
 
63
+ def test_update_data_integration_client_credentials_returns_expected_result
64
+ stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)})
65
+ .to_return(body: "{}", status: 200)
66
+ result = @client.pipes.update_data_integration_client_credentials(slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub")
67
+ refute_nil result
68
+ end
69
+
63
70
  def test_create_data_integration_credential_returns_expected_result
64
71
  stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)})
65
72
  .to_return(body: "{}", status: 200)
@@ -118,6 +125,7 @@ class PipesTest < Minitest::Test
118
125
  {name: :delete_data_integration, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}},
119
126
  {name: :update_data_integration_api_key, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}, args: {slug: "stub", user_id: "stub", secret: "stub"}},
120
127
  {name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
128
+ {name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}},
121
129
  {name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
122
130
  {name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}},
123
131
  {name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
@@ -49,8 +49,6 @@ class PipesModelRoundTripTest < Minitest::Test
49
49
  json = model.to_h
50
50
  assert_kind_of Hash, json
51
51
  assert_equal fixture["name"], json[:name]
52
- assert_equal fixture["authorization_url"], json[:authorization_url]
53
- assert_equal fixture["token_url"], json[:token_url]
54
52
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
55
53
  end
56
54
 
@@ -61,6 +59,7 @@ class PipesModelRoundTripTest < Minitest::Test
61
59
  "enabled" => true,
62
60
  "scopes" => nil,
63
61
  "auth_methods" => [],
62
+ "config" => {},
64
63
  "credentials" => {},
65
64
  "api_key" => {},
66
65
  "custom_provider" => {}
@@ -133,8 +132,9 @@ class PipesModelRoundTripTest < Minitest::Test
133
132
  "scopes" => nil,
134
133
  "redirect_uri" => "stub",
135
134
  "auth_methods" => [],
136
- "credentials" => {},
135
+ "credentials" => nil,
137
136
  "installation" => nil,
137
+ "config" => {},
138
138
  "custom_provider" => nil,
139
139
  "created_at" => "stub",
140
140
  "updated_at" => "stub"
@@ -197,6 +197,9 @@ class PipesModelRoundTripTest < Minitest::Test
197
197
  "scopes" => [],
198
198
  "auth_method" => "stub",
199
199
  "api_key_last_4" => nil,
200
+ "client_id" => nil,
201
+ "client_secret_last_4" => nil,
202
+ "config" => {},
200
203
  "state" => "stub",
201
204
  "created_at" => "stub",
202
205
  "updated_at" => "stub"
@@ -364,7 +367,8 @@ class PipesModelRoundTripTest < Minitest::Test
364
367
  fixture = {
365
368
  "user_id" => "stub",
366
369
  "organization_id" => "stub",
367
- "return_to" => "stub"
370
+ "return_to" => "stub",
371
+ "config" => {}
368
372
  }
369
373
  model = WorkOS::DataIntegrationsGetDataIntegrationAuthorizeUrlRequest.new(fixture.to_json)
370
374
  json = model.to_h
@@ -373,6 +377,23 @@ class PipesModelRoundTripTest < Minitest::Test
373
377
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
374
378
  end
375
379
 
380
+ def test_data_integrations_upsert_client_credentials_request_round_trip
381
+ fixture = {
382
+ "user_id" => "stub",
383
+ "organization_id" => "stub",
384
+ "client_id" => "stub",
385
+ "client_secret" => "stub",
386
+ "config" => {}
387
+ }
388
+ model = WorkOS::DataIntegrationsUpsertClientCredentialsRequest.new(fixture.to_json)
389
+ json = model.to_h
390
+ assert_kind_of Hash, json
391
+ assert_equal fixture["user_id"], json[:user_id]
392
+ assert_equal fixture["client_id"], json[:client_id]
393
+ assert_equal fixture["client_secret"], json[:client_secret]
394
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
395
+ end
396
+
376
397
  def test_data_integrations_vend_credentials_request_round_trip
377
398
  fixture = {
378
399
  "user_id" => "stub",
@@ -406,6 +427,9 @@ class PipesModelRoundTripTest < Minitest::Test
406
427
  "scopes" => [],
407
428
  "auth_method" => "stub",
408
429
  "api_key_last_4" => nil,
430
+ "client_id" => nil,
431
+ "client_secret_last_4" => nil,
432
+ "config" => {},
409
433
  "state" => "stub",
410
434
  "created_at" => "stub",
411
435
  "updated_at" => "stub",
@@ -32,6 +32,7 @@ class PipesProviderModelRoundTripTest < Minitest::Test
32
32
  "name" => "stub",
33
33
  "enabled" => true,
34
34
  "scopes" => nil,
35
+ "config" => {},
35
36
  "created_at" => "stub",
36
37
  "updated_at" => "stub",
37
38
  "credentials" => {}
@@ -65,7 +66,8 @@ class PipesProviderModelRoundTripTest < Minitest::Test
65
66
  "enabled" => true,
66
67
  "scopes" => nil,
67
68
  "client_id" => "stub",
68
- "client_secret" => "stub"
69
+ "client_secret" => "stub",
70
+ "config" => {}
69
71
  }
70
72
  model = WorkOS::ConfigureDataIntegrationBody.new(fixture.to_json)
71
73
  json = model.to_h
@@ -181,6 +181,7 @@ class SharedModelRoundTripTest < Minitest::Test
181
181
  "email" => "stub",
182
182
  "state" => "stub",
183
183
  "approved_at" => nil,
184
+ "waitlist_id" => nil,
184
185
  "created_at" => "stub",
185
186
  "updated_at" => "stub"
186
187
  }
@@ -507,6 +508,34 @@ class SharedModelRoundTripTest < Minitest::Test
507
508
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
508
509
  end
509
510
 
511
+ def test_agent_registration_refreshed_round_trip
512
+ fixture = {
513
+ "object" => "event",
514
+ "id" => "stub",
515
+ "event" => "agent.registration.refreshed",
516
+ "data" => {},
517
+ "created_at" => "stub",
518
+ "context" => {}
519
+ }
520
+ model = WorkOS::AgentRegistrationRefreshed.new(fixture.to_json)
521
+ json = model.to_h
522
+ assert_kind_of Hash, json
523
+ assert_equal fixture["id"], json[:id]
524
+ assert_equal fixture["created_at"], json[:created_at]
525
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
526
+ end
527
+
528
+ def test_agent_registration_refreshed_data_round_trip
529
+ fixture = {
530
+ "agent_registration_id" => "stub"
531
+ }
532
+ model = WorkOS::AgentRegistrationRefreshedData.new(fixture.to_json)
533
+ json = model.to_h
534
+ assert_kind_of Hash, json
535
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
536
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
537
+ end
538
+
510
539
  def test_agent_registration_revoked_round_trip
511
540
  fixture = {
512
541
  "object" => "event",
@@ -31,7 +31,6 @@ class SsoModelRoundTripTest < Minitest::Test
31
31
  "state" => "stub",
32
32
  "status" => "stub",
33
33
  "domains" => [],
34
- "callback_endpoint" => "stub",
35
34
  "created_at" => "stub",
36
35
  "updated_at" => "stub"
37
36
  }
@@ -163,7 +163,7 @@ class UserManagementTest < Minitest::Test
163
163
  def test_authenticate_with_radar_sms_challenge_returns_expected_result
164
164
  stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/authenticate(\?|\z)})
165
165
  .to_return(body: "{}", status: 200)
166
- result = @client.user_management.authenticate_with_radar_sms_challenge(code: "stub", verification_id: "stub", phone_number: "stub", pending_authentication_token: "stub")
166
+ result = @client.user_management.authenticate_with_radar_sms_challenge(code: "stub", pending_authentication_token: "stub")
167
167
  refute_nil result
168
168
  end
169
169
 
@@ -171,7 +171,7 @@ class UserManagementTest < Minitest::Test
171
171
  stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/authenticate(\?|\z)})
172
172
  .to_return(body: '{"message": "Unauthorized"}', status: 401)
173
173
  assert_raises(WorkOS::AuthenticationError) do
174
- @client.user_management.authenticate_with_radar_sms_challenge(code: "stub", verification_id: "stub", phone_number: "stub", pending_authentication_token: "stub")
174
+ @client.user_management.authenticate_with_radar_sms_challenge(code: "stub", pending_authentication_token: "stub")
175
175
  end
176
176
  end
177
177
 
@@ -262,9 +262,9 @@ class UserManagementTest < Minitest::Test
262
262
 
263
263
  def test_create_user_with_password_hashed_returns_expected_result
264
264
  stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/users(\?|\z)})
265
- .with(body: hash_including("email" => "stub", "password_hash" => "stub", "password_hash_type" => "stub"))
265
+ .with(body: hash_including("email" => "stub", "password_hash" => "stub", "password_hash_type" => "stub", "password_salt_position" => "stub"))
266
266
  .to_return(body: "{}", status: 200)
267
- result = @client.user_management.create_user(email: "stub", password: WorkOS::UserManagement::PasswordHashed.new(password_hash: "stub", password_hash_type: "stub"))
267
+ result = @client.user_management.create_user(email: "stub", password: WorkOS::UserManagement::PasswordHashed.new(password_hash: "stub", password_hash_type: "stub", password_salt_position: "stub"))
268
268
  refute_nil result
269
269
  end
270
270
 
@@ -292,9 +292,9 @@ class UserManagementTest < Minitest::Test
292
292
 
293
293
  def test_update_user_with_password_hashed_returns_expected_result
294
294
  stub_request(:put, %r{\Ahttps://api\.workos\.com/user_management/users/stub(\?|\z)})
295
- .with(body: hash_including("password_hash" => "stub", "password_hash_type" => "stub"))
295
+ .with(body: hash_including("password_hash" => "stub", "password_hash_type" => "stub", "password_salt_position" => "stub"))
296
296
  .to_return(body: "{}", status: 200)
297
- result = @client.user_management.update_user(id: "stub", password: WorkOS::UserManagement::PasswordHashed.new(password_hash: "stub", password_hash_type: "stub"))
297
+ result = @client.user_management.update_user(id: "stub", password: WorkOS::UserManagement::PasswordHashed.new(password_hash: "stub", password_hash_type: "stub", password_salt_position: "stub"))
298
298
  refute_nil result
299
299
  end
300
300
 
@@ -126,7 +126,8 @@ class UserManagementModelRoundTripTest < Minitest::Test
126
126
  "signals_id" => "stub",
127
127
  "password" => nil,
128
128
  "password_hash" => "stub",
129
- "password_hash_type" => "stub"
129
+ "password_hash_type" => "stub",
130
+ "password_salt_position" => "stub"
130
131
  }
131
132
  model = WorkOS::CreateUser.new(fixture.to_json)
132
133
  json = model.to_h
@@ -147,7 +148,8 @@ class UserManagementModelRoundTripTest < Minitest::Test
147
148
  "locale" => nil,
148
149
  "password" => "stub",
149
150
  "password_hash" => "stub",
150
- "password_hash_type" => "stub"
151
+ "password_hash_type" => "stub",
152
+ "password_salt_position" => "stub"
151
153
  }
152
154
  model = WorkOS::UpdateUser.new(fixture.to_json)
153
155
  json = model.to_h
@@ -2356,8 +2358,6 @@ class UserManagementModelRoundTripTest < Minitest::Test
2356
2358
  assert_equal fixture["client_id"], json[:client_id]
2357
2359
  assert_equal fixture["client_secret"], json[:client_secret]
2358
2360
  assert_equal fixture["code"], json[:code]
2359
- assert_equal fixture["verification_id"], json[:verification_id]
2360
- assert_equal fixture["phone_number"], json[:phone_number]
2361
2361
  assert_equal fixture["pending_authentication_token"], json[:pending_authentication_token]
2362
2362
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2363
2363
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 10.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
@@ -128,6 +128,7 @@ executables: []
128
128
  extensions: []
129
129
  extra_rdoc_files: []
130
130
  files:
131
+ - ".claude/CLAUDE.md"
131
132
  - ".github/CODEOWNERS"
132
133
  - ".github/pull_request_template.md"
133
134
  - ".github/workflows/block-generated-edits.yml"
@@ -144,6 +145,7 @@ files:
144
145
  - ".ruby-version"
145
146
  - ".standard.yml"
146
147
  - ".yardopts"
148
+ - AGENTS.md
147
149
  - CHANGELOG.md
148
150
  - Gemfile
149
151
  - Gemfile.lock
@@ -440,6 +442,7 @@ files:
440
442
  - lib/workos/pipes/data_integrations_list_response_data.rb
441
443
  - lib/workos/pipes/data_integrations_list_response_data_connected_account.rb
442
444
  - lib/workos/pipes/data_integrations_upsert_api_key_request.rb
445
+ - lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb
443
446
  - lib/workos/pipes/data_integrations_vend_credentials_request.rb
444
447
  - lib/workos/pipes/update_custom_provider_definition.rb
445
448
  - lib/workos/pipes/update_data_integration.rb
@@ -477,6 +480,8 @@ files:
477
480
  - lib/workos/shared/agent_registration_expired_data.rb
478
481
  - lib/workos/shared/agent_registration_organization_switched.rb
479
482
  - lib/workos/shared/agent_registration_organization_switched_data.rb
483
+ - lib/workos/shared/agent_registration_refreshed.rb
484
+ - lib/workos/shared/agent_registration_refreshed_data.rb
480
485
  - lib/workos/shared/agent_registration_revoked.rb
481
486
  - lib/workos/shared/agent_registration_revoked_data.rb
482
487
  - lib/workos/shared/auth_method_mismatch_error.rb
@@ -572,6 +577,7 @@ files:
572
577
  - lib/workos/types/create_data_integration_auth_methods.rb
573
578
  - lib/workos/types/create_user_invite_options_locale.rb
574
579
  - lib/workos/types/create_user_password_hash_type.rb
580
+ - lib/workos/types/create_user_password_salt_position.rb
575
581
  - lib/workos/types/create_webhook_endpoint_events.rb
576
582
  - lib/workos/types/custom_provider_definition_authenticate_via.rb
577
583
  - lib/workos/types/data_integration_access_token_response_error.rb
@@ -653,6 +659,7 @@ files:
653
659
  - lib/workos/types/sso_provider.rb
654
660
  - lib/workos/types/update_custom_provider_definition_authenticate_via.rb
655
661
  - lib/workos/types/update_user_password_hash_type.rb
662
+ - lib/workos/types/update_user_password_salt_position.rb
656
663
  - lib/workos/types/update_webhook_endpoint_events.rb
657
664
  - lib/workos/types/update_webhook_endpoint_status.rb
658
665
  - lib/workos/types/user_identities_get_item_provider.rb
@@ -905,6 +912,8 @@ files:
905
912
  - rbi/workos/agent_registration_expired_data.rbi
906
913
  - rbi/workos/agent_registration_organization_switched.rbi
907
914
  - rbi/workos/agent_registration_organization_switched_data.rbi
915
+ - rbi/workos/agent_registration_refreshed.rbi
916
+ - rbi/workos/agent_registration_refreshed_data.rbi
908
917
  - rbi/workos/agent_registration_revoked.rbi
909
918
  - rbi/workos/agent_registration_revoked_data.rbi
910
919
  - rbi/workos/agents.rbi
@@ -1094,6 +1103,7 @@ files:
1094
1103
  - rbi/workos/data_integrations_list_response_data.rbi
1095
1104
  - rbi/workos/data_integrations_list_response_data_connected_account.rbi
1096
1105
  - rbi/workos/data_integrations_upsert_api_key_request.rbi
1106
+ - rbi/workos/data_integrations_upsert_client_credentials_request.rbi
1097
1107
  - rbi/workos/data_integrations_vend_credentials_request.rbi
1098
1108
  - rbi/workos/decrypt_request.rbi
1099
1109
  - rbi/workos/decrypt_response.rbi