workos 10.1.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.
- checksums.yaml +4 -4
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +12 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +56 -0
- data/Gemfile.lock +2 -2
- data/lib/workos/connect.rb +2 -2
- data/lib/workos/events.rb +2 -2
- data/lib/workos/groups.rb +6 -2
- data/lib/workos/pipes/connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
- data/lib/workos/pipes.rb +39 -2
- data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
- data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
- data/lib/workos/shared/waitlist_user.rb +3 -0
- data/lib/workos/types/authenticate_response_authentication_method.rb +3 -1
- data/lib/workos/types/connection_activated_data_connection_type.rb +3 -1
- data/lib/workos/types/connection_type.rb +3 -1
- data/lib/workos/types/connections_connection_type.rb +3 -1
- data/lib/workos/types/create_data_integration_auth_methods.rb +1 -5
- data/lib/workos/types/create_user_password_salt_position.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
- data/lib/workos/types/update_user_password_salt_position.rb +9 -0
- data/lib/workos/types/user_identities_get_item_provider.rb +3 -1
- data/lib/workos/user_management/create_user.rb +5 -2
- data/lib/workos/user_management/update_user.rb +5 -2
- data/lib/workos/user_management.rb +15 -7
- data/lib/workos/version.rb +1 -1
- data/rbi/workos/agent_registration_refreshed.rbi +54 -0
- data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
- data/rbi/workos/connected_account.rbi +18 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/custom_provider_definition.rbi +4 -4
- data/rbi/workos/data_integration.rbi +2 -2
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
- data/rbi/workos/events.rbi +2 -2
- data/rbi/workos/groups.rbi +2 -1
- data/rbi/workos/pipes.rbi +13 -0
- data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user_management.rbi +6 -2
- data/rbi/workos/waitlist_user.rbi +6 -0
- data/test/workos/test_events.rb +2 -2
- data/test/workos/test_pipes.rb +8 -0
- data/test/workos/test_pipes_model_round_trip.rb +24 -3
- data/test/workos/test_shared_model_round_trip.rb +91 -0
- data/test/workos/test_user_management.rb +6 -6
- data/test/workos/test_user_management_model_round_trip.rb +4 -4
- metadata +9 -1
|
@@ -16,6 +16,39 @@ class SharedModelRoundTripTest < Minitest::Test
|
|
|
16
16
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
def test_object_summary_round_trip
|
|
20
|
+
fixture = {
|
|
21
|
+
"id" => "stub",
|
|
22
|
+
"name" => "stub",
|
|
23
|
+
"updated_at" => nil
|
|
24
|
+
}
|
|
25
|
+
model = WorkOS::ObjectSummary.new(fixture.to_json)
|
|
26
|
+
json = model.to_h
|
|
27
|
+
assert_kind_of Hash, json
|
|
28
|
+
assert_equal fixture["id"], json[:id]
|
|
29
|
+
assert_equal fixture["name"], json[:name]
|
|
30
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def test_object_version_round_trip
|
|
34
|
+
fixture = {
|
|
35
|
+
"created_at" => "stub",
|
|
36
|
+
"current_version" => true,
|
|
37
|
+
"etag" => "stub",
|
|
38
|
+
"id" => "stub",
|
|
39
|
+
"size" => 1
|
|
40
|
+
}
|
|
41
|
+
model = WorkOS::ObjectVersion.new(fixture.to_json)
|
|
42
|
+
json = model.to_h
|
|
43
|
+
assert_kind_of Hash, json
|
|
44
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
45
|
+
assert_equal fixture["current_version"], json[:current_version]
|
|
46
|
+
assert_equal fixture["etag"], json[:etag]
|
|
47
|
+
assert_equal fixture["id"], json[:id]
|
|
48
|
+
assert_equal fixture["size"], json[:size]
|
|
49
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
50
|
+
end
|
|
51
|
+
|
|
19
52
|
def test_connect_application_oauth_round_trip
|
|
20
53
|
fixture = {
|
|
21
54
|
"object" => "connect_application",
|
|
@@ -148,6 +181,7 @@ class SharedModelRoundTripTest < Minitest::Test
|
|
|
148
181
|
"email" => "stub",
|
|
149
182
|
"state" => "stub",
|
|
150
183
|
"approved_at" => nil,
|
|
184
|
+
"waitlist_id" => nil,
|
|
151
185
|
"created_at" => "stub",
|
|
152
186
|
"updated_at" => "stub"
|
|
153
187
|
}
|
|
@@ -162,6 +196,24 @@ class SharedModelRoundTripTest < Minitest::Test
|
|
|
162
196
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
163
197
|
end
|
|
164
198
|
|
|
199
|
+
def test_event_schema_round_trip
|
|
200
|
+
fixture = {
|
|
201
|
+
"object" => "event",
|
|
202
|
+
"id" => "stub",
|
|
203
|
+
"event" => "stub",
|
|
204
|
+
"data" => {},
|
|
205
|
+
"created_at" => "stub",
|
|
206
|
+
"context" => {}
|
|
207
|
+
}
|
|
208
|
+
model = WorkOS::EventSchema.new(fixture.to_json)
|
|
209
|
+
json = model.to_h
|
|
210
|
+
assert_kind_of Hash, json
|
|
211
|
+
assert_equal fixture["id"], json[:id]
|
|
212
|
+
assert_equal fixture["event"], json[:event]
|
|
213
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
214
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
215
|
+
end
|
|
216
|
+
|
|
165
217
|
def test_agent_registration_claim_attempt_created_round_trip
|
|
166
218
|
fixture = {
|
|
167
219
|
"object" => "event",
|
|
@@ -456,6 +508,34 @@ class SharedModelRoundTripTest < Minitest::Test
|
|
|
456
508
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
457
509
|
end
|
|
458
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
|
+
|
|
459
539
|
def test_agent_registration_revoked_round_trip
|
|
460
540
|
fixture = {
|
|
461
541
|
"object" => "event",
|
|
@@ -787,6 +867,17 @@ class SharedModelRoundTripTest < Minitest::Test
|
|
|
787
867
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
788
868
|
end
|
|
789
869
|
|
|
870
|
+
def test_event_list_list_metadata_round_trip
|
|
871
|
+
fixture = {
|
|
872
|
+
"after" => nil
|
|
873
|
+
}
|
|
874
|
+
model = WorkOS::EventListListMetadata.new(fixture.to_json)
|
|
875
|
+
json = model.to_h
|
|
876
|
+
assert_kind_of Hash, json
|
|
877
|
+
assert_nil json[:after]
|
|
878
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
879
|
+
end
|
|
880
|
+
|
|
790
881
|
def test_event_context_google_analytics_session_round_trip
|
|
791
882
|
fixture = {
|
|
792
883
|
"containerId" => "stub",
|
|
@@ -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",
|
|
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",
|
|
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.
|
|
4
|
+
version: 10.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WorkOS
|
|
@@ -442,6 +442,7 @@ files:
|
|
|
442
442
|
- lib/workos/pipes/data_integrations_list_response_data.rb
|
|
443
443
|
- lib/workos/pipes/data_integrations_list_response_data_connected_account.rb
|
|
444
444
|
- lib/workos/pipes/data_integrations_upsert_api_key_request.rb
|
|
445
|
+
- lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb
|
|
445
446
|
- lib/workos/pipes/data_integrations_vend_credentials_request.rb
|
|
446
447
|
- lib/workos/pipes/update_custom_provider_definition.rb
|
|
447
448
|
- lib/workos/pipes/update_data_integration.rb
|
|
@@ -479,6 +480,8 @@ files:
|
|
|
479
480
|
- lib/workos/shared/agent_registration_expired_data.rb
|
|
480
481
|
- lib/workos/shared/agent_registration_organization_switched.rb
|
|
481
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
|
|
482
485
|
- lib/workos/shared/agent_registration_revoked.rb
|
|
483
486
|
- lib/workos/shared/agent_registration_revoked_data.rb
|
|
484
487
|
- lib/workos/shared/auth_method_mismatch_error.rb
|
|
@@ -574,6 +577,7 @@ files:
|
|
|
574
577
|
- lib/workos/types/create_data_integration_auth_methods.rb
|
|
575
578
|
- lib/workos/types/create_user_invite_options_locale.rb
|
|
576
579
|
- lib/workos/types/create_user_password_hash_type.rb
|
|
580
|
+
- lib/workos/types/create_user_password_salt_position.rb
|
|
577
581
|
- lib/workos/types/create_webhook_endpoint_events.rb
|
|
578
582
|
- lib/workos/types/custom_provider_definition_authenticate_via.rb
|
|
579
583
|
- lib/workos/types/data_integration_access_token_response_error.rb
|
|
@@ -655,6 +659,7 @@ files:
|
|
|
655
659
|
- lib/workos/types/sso_provider.rb
|
|
656
660
|
- lib/workos/types/update_custom_provider_definition_authenticate_via.rb
|
|
657
661
|
- lib/workos/types/update_user_password_hash_type.rb
|
|
662
|
+
- lib/workos/types/update_user_password_salt_position.rb
|
|
658
663
|
- lib/workos/types/update_webhook_endpoint_events.rb
|
|
659
664
|
- lib/workos/types/update_webhook_endpoint_status.rb
|
|
660
665
|
- lib/workos/types/user_identities_get_item_provider.rb
|
|
@@ -907,6 +912,8 @@ files:
|
|
|
907
912
|
- rbi/workos/agent_registration_expired_data.rbi
|
|
908
913
|
- rbi/workos/agent_registration_organization_switched.rbi
|
|
909
914
|
- rbi/workos/agent_registration_organization_switched_data.rbi
|
|
915
|
+
- rbi/workos/agent_registration_refreshed.rbi
|
|
916
|
+
- rbi/workos/agent_registration_refreshed_data.rbi
|
|
910
917
|
- rbi/workos/agent_registration_revoked.rbi
|
|
911
918
|
- rbi/workos/agent_registration_revoked_data.rbi
|
|
912
919
|
- rbi/workos/agents.rbi
|
|
@@ -1096,6 +1103,7 @@ files:
|
|
|
1096
1103
|
- rbi/workos/data_integrations_list_response_data.rbi
|
|
1097
1104
|
- rbi/workos/data_integrations_list_response_data_connected_account.rbi
|
|
1098
1105
|
- rbi/workos/data_integrations_upsert_api_key_request.rbi
|
|
1106
|
+
- rbi/workos/data_integrations_upsert_client_credentials_request.rbi
|
|
1099
1107
|
- rbi/workos/data_integrations_vend_credentials_request.rbi
|
|
1100
1108
|
- rbi/workos/decrypt_request.rbi
|
|
1101
1109
|
- rbi/workos/decrypt_response.rbi
|