workos 10.6.0 → 10.7.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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/.last-synced-sha +1 -1
  3. data/.oagen-manifest.json +30 -10
  4. data/.release-please-manifest.json +1 -1
  5. data/CHANGELOG.md +84 -0
  6. data/Gemfile.lock +2 -2
  7. data/lib/workos/audit_logs.rb +2 -2
  8. data/lib/workos/client_api.rb +3 -3
  9. data/lib/workos/directory_sync/directory_user_with_groups.rb +1 -1
  10. data/lib/workos/directory_sync.rb +160 -0
  11. data/lib/workos/inflections.rb +1 -1
  12. data/lib/workos/pipes/connected_account_input.rb +3 -0
  13. data/lib/workos/pipes/create_connected_account.rb +6 -0
  14. data/lib/workos/pipes/create_organization_connected_account.rb +6 -0
  15. data/lib/workos/pipes/organization_connected_account.rb +3 -0
  16. data/lib/workos/pipes.rb +18 -0
  17. data/lib/workos/pipes_provider.rb +12 -0
  18. data/lib/workos/session.rb +12 -0
  19. data/lib/workos/shared/agent_registration_claim_completed_data.rb +3 -0
  20. data/lib/workos/shared/error_body_with_code.rb +16 -1
  21. data/lib/workos/shared/policy_denied_error_body.rb +5 -2
  22. data/lib/workos/shared/{sso_required_oauth_error_body_with_connection_ids_list_email_pending_authentication_token.rb → sso_required_oauth_error_body_with_connection_ids_list_email.rb} +1 -1
  23. data/lib/workos/sso.rb +6 -2
  24. data/lib/workos/types/connections_state.rb +14 -0
  25. data/lib/workos/types/data_integration_vended_credential_auth_method.rb +9 -0
  26. data/lib/workos/types/error_body_code.rb +1 -2
  27. data/lib/workos/types/pipes_provider_ownership.rb +9 -0
  28. data/lib/workos/user_management/authentication_email_verification_failed_data_error.rb +5 -2
  29. data/lib/workos/user_management/authentication_radar_risk_detected_data.rb +5 -2
  30. data/lib/workos/version.rb +1 -1
  31. data/rbi/workos/account_selection_required_error_body.rbi +1 -22
  32. data/rbi/workos/agent_blueprint_invocable_by.rbi +1 -22
  33. data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +1 -22
  34. data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +1 -28
  35. data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +1 -28
  36. data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +1 -22
  37. data/rbi/workos/agent_registration_claim_completed_data.rbi +6 -0
  38. data/rbi/workos/agent_registration_expired_data.rbi +1 -16
  39. data/rbi/workos/agent_registration_refreshed_data.rbi +1 -16
  40. data/rbi/workos/agent_registration_revoked_data.rbi +1 -16
  41. data/rbi/workos/api_key_owner.rbi +1 -22
  42. data/rbi/workos/api_key_revoked_data.rbi +1 -70
  43. data/rbi/workos/api_key_revoked_data_owner.rbi +1 -22
  44. data/rbi/workos/api_key_updated_data_owner.rbi +1 -22
  45. data/rbi/workos/audit_log_event_target.rbi +1 -34
  46. data/rbi/workos/audit_log_schema_actor_input.rbi +1 -16
  47. data/rbi/workos/audit_log_schema_target_input.rbi +1 -22
  48. data/rbi/workos/auth_method_mismatch_error_body.rbi +1 -22
  49. data/rbi/workos/authentication_email_verification_failed_data_error.rbi +6 -0
  50. data/rbi/workos/authentication_factor_sms.rbi +1 -16
  51. data/rbi/workos/authentication_magic_auth_failed_data_error.rbi +1 -22
  52. data/rbi/workos/authentication_mfa_failed_data_error.rbi +1 -22
  53. data/rbi/workos/authentication_oauth_failed_data_error.rbi +1 -22
  54. data/rbi/workos/authentication_passkey_failed_data_error.rbi +1 -22
  55. data/rbi/workos/authentication_password_failed_data_error.rbi +1 -22
  56. data/rbi/workos/authentication_radar_risk_detected_data.rbi +6 -0
  57. data/rbi/workos/authentication_sso_failed_data_error.rbi +1 -22
  58. data/rbi/workos/authentication_sso_started_data_sso.rbi +1 -28
  59. data/rbi/workos/authentication_sso_succeeded_data_sso.rbi +1 -28
  60. data/rbi/workos/authentication_sso_timed_out_data_error.rbi +1 -22
  61. data/rbi/workos/authentication_sso_timed_out_data_sso.rbi +1 -28
  62. data/rbi/workos/authorization.rbi +4 -2
  63. data/rbi/workos/claim_view_response_organization.rbi +1 -22
  64. data/rbi/workos/confirm_email_change.rbi +1 -16
  65. data/rbi/workos/connect_application.rbi +42 -0
  66. data/rbi/workos/connect_application_redirect_uri.rbi +30 -0
  67. data/rbi/workos/connected_account_input.rbi +6 -0
  68. data/rbi/workos/connection_deactivated_data_domain.rbi +1 -28
  69. data/rbi/workos/connection_domain.rbi +1 -28
  70. data/rbi/workos/connection_saml_certificate_renewed_data_connection.rbi +1 -22
  71. data/rbi/workos/create_connected_account.rbi +12 -0
  72. data/rbi/workos/create_group_role_assignment.rbi +1 -34
  73. data/rbi/workos/create_organization_connected_account.rbi +12 -0
  74. data/rbi/workos/create_role.rbi +1 -34
  75. data/rbi/workos/data_integration_access_token_response_with_access_token_access_token.rbi +1 -40
  76. data/rbi/workos/data_integrations_list_response_data_connected_account_warning.rbi +1 -22
  77. data/rbi/workos/delete_group_role_assignments_by_criteria.rbi +1 -34
  78. data/rbi/workos/directory_sync.rbi +46 -0
  79. data/rbi/workos/directory_user_with_groups_email.rbi +1 -28
  80. data/rbi/workos/dsync_group_user_removed_data.rbi +1 -28
  81. data/rbi/workos/dsync_token_revoked_data.rbi +1 -46
  82. data/rbi/workos/dsync_user_updated_data_email.rbi +1 -28
  83. data/rbi/workos/error_body.rbi +1 -16
  84. data/rbi/workos/feature_flags_flag_created_data_owner.rbi +1 -28
  85. data/rbi/workos/feature_flags_flag_deleted_data.rbi +1 -82
  86. data/rbi/workos/feature_flags_flag_deleted_data_owner.rbi +1 -28
  87. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute_data_owner.rbi +1 -28
  88. data/rbi/workos/feature_flags_flag_updated_data.rbi +1 -82
  89. data/rbi/workos/feature_flags_flag_updated_data_owner.rbi +1 -28
  90. data/rbi/workos/flag.rbi +1 -76
  91. data/rbi/workos/flag_created_data.rbi +1 -82
  92. data/rbi/workos/flag_created_data_owner.rbi +1 -28
  93. data/rbi/workos/flag_deleted_data.rbi +1 -82
  94. data/rbi/workos/flag_deleted_data_owner.rbi +1 -28
  95. data/rbi/workos/flag_owner.rbi +1 -28
  96. data/rbi/workos/flag_rule_updated_context_configured_target_organization.rbi +1 -22
  97. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target.rbi +1 -22
  98. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rbi +1 -22
  99. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target_user.rbi +1 -22
  100. data/rbi/workos/flag_rule_updated_data.rbi +1 -82
  101. data/rbi/workos/flag_rule_updated_data_owner.rbi +1 -28
  102. data/rbi/workos/flag_updated_context_previous_attribute.rbi +1 -16
  103. data/rbi/workos/flag_updated_context_previous_attribute_data.rbi +1 -46
  104. data/rbi/workos/flag_updated_context_previous_attribute_data_owner.rbi +1 -28
  105. data/rbi/workos/flag_updated_data.rbi +1 -82
  106. data/rbi/workos/flag_updated_data_owner.rbi +1 -28
  107. data/rbi/workos/group_member_removed_data.rbi +1 -22
  108. data/rbi/workos/organization_api_key_owner.rbi +1 -22
  109. data/rbi/workos/organization_api_key_with_value_owner.rbi +1 -22
  110. data/rbi/workos/organization_connected_account.rbi +6 -0
  111. data/rbi/workos/organization_role_deleted_data.rbi +1 -64
  112. data/rbi/workos/organization_role_updated_data.rbi +1 -64
  113. data/rbi/workos/organization_selection_required_error_body_with_organization.rbi +1 -22
  114. data/rbi/workos/password_reset_succeeded_data.rbi +1 -46
  115. data/rbi/workos/patch_connection_standard_attributes.rbi +1 -46
  116. data/rbi/workos/permission.rbi +1 -64
  117. data/rbi/workos/permission_created_data.rbi +1 -64
  118. data/rbi/workos/permission_deleted_data.rbi +1 -64
  119. data/rbi/workos/permission_updated_data.rbi +1 -64
  120. data/rbi/workos/pipes.rbi +10 -4
  121. data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +1 -76
  122. data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +1 -76
  123. data/rbi/workos/pipes_provider.rbi +4 -2
  124. data/rbi/workos/policy_denied_error_body.rbi +6 -0
  125. data/rbi/workos/radar_standalone_update_radar_list_request.rbi +1 -16
  126. data/rbi/workos/remove_role.rbi +1 -34
  127. data/rbi/workos/replace_group_role_assignment_entry.rbi +1 -34
  128. data/rbi/workos/role_deleted_data.rbi +1 -46
  129. data/rbi/workos/role_updated_data.rbi +1 -46
  130. data/rbi/workos/send_verification_email_response.rbi +1 -16
  131. data/rbi/workos/session_created_data_impersonator.rbi +1 -22
  132. data/rbi/workos/session_revoked_data_impersonator.rbi +1 -22
  133. data/rbi/workos/slim_role.rbi +1 -16
  134. data/rbi/workos/sso.rbi +2 -1
  135. data/rbi/workos/{sso_required_oauth_error_body_with_connection_ids_list_email_pending_authentication_token.rbi → sso_required_oauth_error_body_with_connection_ids_list_email.rbi} +1 -1
  136. data/rbi/workos/sso_token_response_oauth_token.rbi +1 -40
  137. data/rbi/workos/update_group.rbi +1 -22
  138. data/rbi/workos/update_organization_role.rbi +1 -22
  139. data/rbi/workos/update_role.rbi +1 -22
  140. data/rbi/workos/user.rbi +1 -94
  141. data/rbi/workos/user_api_key_owner.rbi +1 -28
  142. data/rbi/workos/user_api_key_revoked_data_owner.rbi +1 -28
  143. data/rbi/workos/user_api_key_updated_data_owner.rbi +1 -28
  144. data/rbi/workos/user_api_key_with_value_owner.rbi +1 -28
  145. data/rbi/workos/user_role_assignment_resource.rbi +1 -28
  146. data/rbi/workos/user_role_assignment_source_group.rbi +1 -22
  147. data/rbi/workos/user_sessions_impersonator.rbi +1 -22
  148. data/rbi/workos/verify_email_address.rbi +1 -16
  149. data/rbi/workos/verify_email_response.rbi +1 -16
  150. data/rbi/workos/waitlist_list_response_list_metadata.rbi +1 -22
  151. data/rbi/workos/widget_session_token_response.rbi +1 -16
  152. data/test/workos/test_directory_sync.rb +32 -0
  153. data/test/workos/test_directory_sync_model_round_trip.rb +11 -11
  154. data/test/workos/test_pipes_model_round_trip.rb +7 -1
  155. data/test/workos/test_session.rb +46 -1
  156. data/test/workos/test_shared_model_round_trip.rb +71 -69
  157. data/test/workos/test_user_management_model_round_trip.rb +18 -9
  158. metadata +7 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f17c4812876f6943b76d80e3da843045c11e7ce67dd4396178dfc440196f7962
4
- data.tar.gz: '094164cdff65b7430d1b32cea60dcf0dd9c5aa81b71ac57db31ac1b4b398ef41'
3
+ metadata.gz: 3ef3b50a14588855e5ffa76b0cb85022e35850ba068480bf5f071adbe0279b50
4
+ data.tar.gz: f4986e664dacc237306f00de3b1a9b78631a86ef501e70424ef4f4a522ed7e3e
5
5
  SHA512:
6
- metadata.gz: f7f05112f588a86690b1a90af07ced3862330946bfa87f25361779c809df4e6beeb64fd16fe1deaa1ddc994f7f268e69aa27b47367c50d9a53be8e4a01c83c12
7
- data.tar.gz: 4e0db4d1d926b2d12f5973a26db1761b6149dd517f33705fefd694c1cfff0c044864567f78009470d1b85b31d2bfca40194e280abcf085f341ee7534ff91c207
6
+ metadata.gz: ddf120500aa34e6b6401b77fe922ae5409d1f7f6e13ea45518e1944b42d886050ecba223d8e569d6d07ada5ce9ee365937dd3aa3d3469ade4d1ae691dc55b7c0
7
+ data.tar.gz: '0994bd1df581531beae0ad67f3704b4edb5f56f64edd7f357563a4c6d308e87b235a693807c153d77e74c418a012b85678e780ceb3f3cf0a7e5a3c1278e025fc'
data/.last-synced-sha CHANGED
@@ -1 +1 @@
1
- 2029e6d3b84733c408b209a314e20fd748e3d970
1
+ d23707bf603250a73e6433561428e58fc2be036b
data/.oagen-manifest.json CHANGED
@@ -544,7 +544,7 @@
544
544
  "lib/workos/shared/slow_down_oauth_error_body.rb",
545
545
  "lib/workos/shared/sms_challenge_quota_reached_error_body.rb",
546
546
  "lib/workos/shared/sms_challenge_rate_limited_error_body.rb",
547
- "lib/workos/shared/sso_required_oauth_error_body_with_connection_ids_list_email_pending_authentication_token.rb",
547
+ "lib/workos/shared/sso_required_oauth_error_body_with_connection_ids_list_email.rb",
548
548
  "lib/workos/shared/sub_resource_scoped_role_not_allowed_error_body_with_role_slug.rb",
549
549
  "lib/workos/shared/token_too_big_oauth_error_body.rb",
550
550
  "lib/workos/shared/too_many_failed_verification_attempts_error_body_with_retry_after.rb",
@@ -659,6 +659,7 @@
659
659
  "lib/workos/types/connection_status.rb",
660
660
  "lib/workos/types/connection_type.rb",
661
661
  "lib/workos/types/connections_connection_type.rb",
662
+ "lib/workos/types/connections_state.rb",
662
663
  "lib/workos/types/create_connected_account_state.rb",
663
664
  "lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb",
664
665
  "lib/workos/types/create_connection_oidc_options_token_authentication_method.rb",
@@ -684,6 +685,7 @@
684
685
  "lib/workos/types/data_integration_installation_connection_role.rb",
685
686
  "lib/workos/types/data_integration_ownership.rb",
686
687
  "lib/workos/types/data_integration_state.rb",
688
+ "lib/workos/types/data_integration_vended_credential_auth_method.rb",
687
689
  "lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb",
688
690
  "lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb",
689
691
  "lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_intent.rb",
@@ -763,6 +765,7 @@
763
765
  "lib/workos/types/pipe_connected_account_connection_role.rb",
764
766
  "lib/workos/types/pipe_connected_account_state.rb",
765
767
  "lib/workos/types/pipes_ownership.rb",
768
+ "lib/workos/types/pipes_provider_ownership.rb",
766
769
  "lib/workos/types/profile_connection_type.rb",
767
770
  "lib/workos/types/radar_list_action.rb",
768
771
  "lib/workos/types/radar_list_type.rb",
@@ -1254,6 +1257,7 @@
1254
1257
  "rbi/workos/connect_application_m2m.rbi",
1255
1258
  "rbi/workos/connect_application_oauth.rbi",
1256
1259
  "rbi/workos/connect_application_oauth_redirect_uris.rbi",
1260
+ "rbi/workos/connect_application_redirect_uri.rbi",
1257
1261
  "rbi/workos/connected_account.rbi",
1258
1262
  "rbi/workos/connected_account_input.rbi",
1259
1263
  "rbi/workos/connected_account_limit_reached_error_body.rbi",
@@ -1758,7 +1762,7 @@
1758
1762
  "rbi/workos/sso_device_authorization_request.rbi",
1759
1763
  "rbi/workos/sso_logout_authorize_request.rbi",
1760
1764
  "rbi/workos/sso_logout_authorize_response.rbi",
1761
- "rbi/workos/sso_required_oauth_error_body_with_connection_ids_list_email_pending_authentication_token.rbi",
1765
+ "rbi/workos/sso_required_oauth_error_body_with_connection_ids_list_email.rbi",
1762
1766
  "rbi/workos/sso_token_response.rbi",
1763
1767
  "rbi/workos/sso_token_response_oauth_token.rbi",
1764
1768
  "rbi/workos/sub_resource_scoped_role_not_allowed_error_body_with_role_slug.rbi",
@@ -2372,20 +2376,20 @@
2372
2376
  "sdkMethod": "create_directory_sync",
2373
2377
  "service": "directory_sync"
2374
2378
  },
2375
- "GET /directory_groups": {
2376
- "sdkMethod": "list_groups",
2379
+ "GET /directories/{directoryId}/groups": {
2380
+ "sdkMethod": "list_directory_groups",
2377
2381
  "service": "directory_sync"
2378
2382
  },
2379
- "GET /directory_groups/{id}": {
2380
- "sdkMethod": "get_group",
2383
+ "GET /directories/{directoryId}/groups/{groupId}": {
2384
+ "sdkMethod": "get_directory_group",
2381
2385
  "service": "directory_sync"
2382
2386
  },
2383
- "GET /directory_users": {
2384
- "sdkMethod": "list_users",
2387
+ "GET /directories/{directoryId}/users": {
2388
+ "sdkMethod": "list_directory_users",
2385
2389
  "service": "directory_sync"
2386
2390
  },
2387
- "GET /directory_users/{id}": {
2388
- "sdkMethod": "get_user",
2391
+ "GET /directories/{directoryId}/users/{userId}": {
2392
+ "sdkMethod": "get_directory_user",
2389
2393
  "service": "directory_sync"
2390
2394
  },
2391
2395
  "GET /events": {
@@ -3039,6 +3043,22 @@
3039
3043
  "GET /audit_logs/exports/{auditLogExportId}": {
3040
3044
  "sdkMethod": "get_export",
3041
3045
  "service": "audit_logs"
3046
+ },
3047
+ "GET /directory_groups": {
3048
+ "sdkMethod": "list_groups",
3049
+ "service": "directory_sync"
3050
+ },
3051
+ "GET /directory_groups/{id}": {
3052
+ "sdkMethod": "get_group",
3053
+ "service": "directory_sync"
3054
+ },
3055
+ "GET /directory_users": {
3056
+ "sdkMethod": "list_users",
3057
+ "service": "directory_sync"
3058
+ },
3059
+ "GET /directory_users/{id}": {
3060
+ "sdkMethod": "get_user",
3061
+ "service": "directory_sync"
3042
3062
  }
3043
3063
  }
3044
3064
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "10.6.0"
2
+ ".": "10.7.0"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # Changelog
2
2
 
3
+ ## [10.7.0](https://github.com/workos/workos-ruby/compare/v10.6.0...v10.7.0) (2026-11-13)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **session:** Reject non-user access tokens in session cookies ([#573](https://github.com/workos/workos-ruby/issues/573)) ([94be822](https://github.com/workos/workos-ruby/commit/94be82279e19a25d7e0fe4f1a6ce0aaad5c9dfaf))
8
+
9
+ * [#576](https://github.com/workos/workos-ruby/pull/576) feat(generated): regenerate from spec (1 change)
10
+
11
+ **⚠️ Breaking**
12
+ * **[directory_sync](https://workos.com/docs/reference/directory-sync)**:
13
+ * Added parameter `Directories.find.directoryId`
14
+ * Added parameter `Directories.find.groupId`
15
+ * Removed parameter `Directories.find.id`
16
+ * Changed path for endpoint `GET /directories/{directoryId}/groups/{groupId}`
17
+ * Changed server default for parameter `DirectoryGroups.list`
18
+ * Changed server default for parameter `DirectoryGroups.find`
19
+ * Changed server default for parameter `DirectoryUsers.list`
20
+ * Changed server default for parameter `DirectoryUsers.find`
21
+
22
+ **Features**
23
+ * **[directory_sync](https://workos.com/docs/reference/directory-sync)**:
24
+ * Added endpoint `GET /directories/{id}`
25
+ * Added endpoint `GET /directories/{directoryId}/groups`
26
+ * Added endpoint `GET /directories/{directoryId}/users`
27
+ * Added endpoint `GET /directories/{directoryId}/users/{userId}`
28
+ * **[multi_factor_auth](https://workos.com/docs/reference/authkit/mfa)**:
29
+ * Added model `TooManyFailedVerificationAttemptsErrorBodyWithRetryAfter`
30
+ * Changed errors for endpoint `POST /auth/challenges/{id}/verify`
31
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
32
+ * Added `config` to `CreateOrganizationConnectedAccount`
33
+ * Added `metadata` to `CreateOrganizationConnectedAccount`
34
+ * Added `config` to `OrganizationConnectedAccount`
35
+ * Added `config` to `CreateConnectedAccount`
36
+ * Added `metadata` to `CreateConnectedAccount`
37
+ * Added `config` to `ConnectedAccountInput`
38
+ * Added `too_many_failed_verification_attempts` to `ErrorBodyCode`
39
+ * Added `ip_address_required` to `ErrorBodyCode`
40
+ * Added enum `PipesProviderOwnership`
41
+ * Added parameter `PipesProvider.listForOrganization.ownership`
42
+ * Changed errors for endpoint `GET /organizations/{organizationId}/data_integration_configurations`
43
+ * Added parameter `PipesProvider.configure.ownership`
44
+ * **[user_management](https://workos.com/docs/reference/authkit/user)**:
45
+ * Added `radar_detection_id` to `PolicyDeniedErrorBody`
46
+ * **[webhooks](https://workos.com/docs/reference/webhooks)**:
47
+ * Added `feature_flags.flag.created` to `CreateWebhookEndpointEvents`
48
+ * Added `feature_flags.flag.updated` to `CreateWebhookEndpointEvents`
49
+ * Added `feature_flags.flag.deleted` to `CreateWebhookEndpointEvents`
50
+ * Added `feature_flags.flag_rule.created` to `CreateWebhookEndpointEvents`
51
+ * Added `feature_flags.flag_rule.updated` to `CreateWebhookEndpointEvents`
52
+ * Added `feature_flags.flag_target.created` to `CreateWebhookEndpointEvents`
53
+ * Added `feature_flags.flag_rule.deleted` to `CreateWebhookEndpointEvents`
54
+ * Added `feature_flags.flag_target.deleted` to `CreateWebhookEndpointEvents`
55
+ * Added `feature_flags.flag.created` to `UpdateWebhookEndpointEvents`
56
+ * Added `feature_flags.flag.updated` to `UpdateWebhookEndpointEvents`
57
+ * Added `feature_flags.flag.deleted` to `UpdateWebhookEndpointEvents`
58
+ * Added `feature_flags.flag_rule.created` to `UpdateWebhookEndpointEvents`
59
+ * Added `feature_flags.flag_rule.updated` to `UpdateWebhookEndpointEvents`
60
+ * Added `feature_flags.flag_target.created` to `UpdateWebhookEndpointEvents`
61
+ * Added `feature_flags.flag_rule.deleted` to `UpdateWebhookEndpointEvents`
62
+ * Added `feature_flags.flag_target.deleted` to `UpdateWebhookEndpointEvents`
63
+
64
+ **Fixes**
65
+ * **[directory_sync](https://workos.com/docs/reference/directory-sync)**:
66
+ * Changed response of `Directories.find` from `Directory` to `DirectoryGroup`
67
+ * Updated endpoint `GET /directory_groups`
68
+ * Updated endpoint `GET /directory_groups/{id}`
69
+ * Updated endpoint `GET /directory_users`
70
+ * Updated endpoint `GET /directory_users/{id}`
71
+ * **[events](https://workos.com/docs/reference/events)**:
72
+ * Updated model `EventSchema`
73
+ * **[pipes](https://workos.com/docs/reference/pipes)**:
74
+ * Removed `policy_denied` from `ErrorBodyCode`
75
+ * **[user_management](https://workos.com/docs/reference/authkit/user)**:
76
+ * Changed errors for endpoint `POST /user_management/users`
77
+ * Changed errors for endpoint `POST /user_management/magic_auth`
78
+ * Changed errors for endpoint `POST /user_management/authenticate`
79
+
80
+ * [#577](https://github.com/workos/workos-ruby/pull/577) feat(generated): regenerate from spec (1 change)
81
+
82
+ **Features**
83
+ * **[sso](https://workos.com/docs/reference/sso)**:
84
+ * Added enum `ConnectionsState`
85
+ * Added parameter `Connections.list.state`
86
+
3
87
  ## [10.6.0](https://github.com/workos/workos-ruby/compare/v10.5.0...v10.6.0) (2026-11-04)
4
88
 
5
89
  ### Bug Fixes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (10.6.0)
4
+ workos (10.7.0)
5
5
  jwt (~> 3.1)
6
6
  logger (~> 1.7)
7
7
  zeitwerk (~> 2.6)
@@ -153,7 +153,7 @@ CHECKSUMS
153
153
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
154
154
  webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
155
155
  webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
156
- workos (10.6.0)
156
+ workos (10.7.0)
157
157
  yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51
158
158
  yard-markdown (0.9.1) sha256=51adf55a814172f70ed81fbd1af4dc42c0e1a698915f7da33eff5a3bb527062d
159
159
  zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
@@ -222,8 +222,8 @@ module WorkOS
222
222
 
223
223
  # Create Export
224
224
  # @param organization_id [String] The unique ID of the Organization.
225
- # @param range_start [String] ISO-8601 value for start of the export range.
226
- # @param range_end [String] ISO-8601 value for end of the export range.
225
+ # @param range_start [String] ISO-8601 value for start of the export range. The range must span no more than 31 days.
226
+ # @param range_end [String] ISO-8601 value for end of the export range. Must be no more than 31 days after the start.
227
227
  # @param actions [Array<String>, nil] List of actions to filter against.
228
228
  # @param actors [Array<String>, nil] (deprecated) Deprecated. Use `actor_names` instead.
229
229
  # @param actor_names [Array<String>, nil] List of actor names to filter against.
@@ -10,9 +10,9 @@ module WorkOS
10
10
  @client = client
11
11
  end
12
12
 
13
- # Generate a Client API token
14
- # @param organization_id [String] The ID of the organization to scope the Client API token to.
15
- # @param user_id [String] The ID of the user to issue the Client API token for.
13
+ # Generate a Widgets API token
14
+ # @param organization_id [String] The ID of the organization to scope the Widgets API token to.
15
+ # @param user_id [String] The ID of the user to issue the Widgets API token for.
16
16
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
17
17
  # @return [WorkOS::ClientApiTokenResponse]
18
18
  def create_token(
@@ -36,7 +36,7 @@ module WorkOS
36
36
  # @!attribute raw_attributes
37
37
  # @deprecated The raw attributes received from the directory provider.
38
38
  # @!attribute groups
39
- # @deprecated The directory groups the user belongs to. Deprecated: starting May 1, 2026, this field returns an empty array by default for newly created teams. Existing teams currently depending on this field should migrate to the new access pattern for better throughput performance — the field is unbounded by user, so users with many group memberships produce large, slow response payloads. Use the List Directory Groups endpoint with a `user` filter to fetch a user's group memberships.
39
+ # @deprecated The directory groups the user belongs to. Deprecated: use `GET /directories/{directoryId}/groups?user={userId}` instead.
40
40
 
41
41
  attr_accessor \
42
42
  :object,
@@ -121,7 +121,160 @@ module WorkOS
121
121
  result
122
122
  end
123
123
 
124
+ # List Groups for a Directory
125
+ # @param directory_id [String] Unique identifier of the Directory.
126
+ # @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"`.
127
+ # @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"`.
128
+ # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
129
+ # @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).
130
+ # @param user [String, nil] Filter Directory Groups to those this Directory User belongs to.
131
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
132
+ # @return [WorkOS::Types::ListStruct<WorkOS::DirectoryGroup>]
133
+ def list_directory_groups(
134
+ directory_id:,
135
+ before: nil,
136
+ after: nil,
137
+ limit: 10,
138
+ order: "desc",
139
+ user: nil,
140
+ request_options: {}
141
+ )
142
+ params = {
143
+ "before" => before,
144
+ "after" => after,
145
+ "limit" => limit,
146
+ "order" => order,
147
+ "user" => user
148
+ }.compact
149
+ response = @client.request(
150
+ method: :get,
151
+ path: "/directories/#{WorkOS::Util.encode_path(directory_id)}/groups",
152
+ auth: true,
153
+ params: params,
154
+ request_options: request_options
155
+ )
156
+ fetch_next = ->(cursor) {
157
+ list_directory_groups(
158
+ directory_id: directory_id,
159
+ before: before,
160
+ after: cursor,
161
+ limit: limit,
162
+ order: order,
163
+ user: user,
164
+ request_options: request_options
165
+ )
166
+ }
167
+ WorkOS::Types::ListStruct.from_response(
168
+ response,
169
+ model: WorkOS::DirectoryGroup,
170
+ filters: {directory_id: directory_id, before: before, limit: limit, order: order, user: user},
171
+ fetch_next: fetch_next
172
+ )
173
+ end
174
+
175
+ # Get a Group for a Directory
176
+ # @param directory_id [String] Unique identifier of the Directory.
177
+ # @param group_id [String] Unique identifier for the Directory Group.
178
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
179
+ # @return [WorkOS::DirectoryGroup]
180
+ def get_directory_group(
181
+ directory_id:,
182
+ group_id:,
183
+ request_options: {}
184
+ )
185
+ response = @client.request(
186
+ method: :get,
187
+ path: "/directories/#{WorkOS::Util.encode_path(directory_id)}/groups/#{WorkOS::Util.encode_path(group_id)}",
188
+ auth: true,
189
+ request_options: request_options
190
+ )
191
+ result = WorkOS::DirectoryGroup.new(response.body)
192
+ 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"])
193
+ result
194
+ end
195
+
196
+ # List Users for a Directory
197
+ # @param directory_id [String] Unique identifier of the Directory.
198
+ # @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"`.
199
+ # @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"`.
200
+ # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
201
+ # @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).
202
+ # @param group [String, nil] Filter Directory Users to the members of this Directory Group.
203
+ # @param idp_id [String, nil] Filter Directory Users by the identity provider's unique identifier (`idp_id`).
204
+ # @param email [String, nil] Filter Directory Users by their primary email address.
205
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
206
+ # @return [WorkOS::Types::ListStruct<WorkOS::DirectoryUser>]
207
+ def list_directory_users(
208
+ directory_id:,
209
+ before: nil,
210
+ after: nil,
211
+ limit: 10,
212
+ order: "desc",
213
+ group: nil,
214
+ idp_id: nil,
215
+ email: nil,
216
+ request_options: {}
217
+ )
218
+ params = {
219
+ "before" => before,
220
+ "after" => after,
221
+ "limit" => limit,
222
+ "order" => order,
223
+ "group" => group,
224
+ "idp_id" => idp_id,
225
+ "email" => email
226
+ }.compact
227
+ response = @client.request(
228
+ method: :get,
229
+ path: "/directories/#{WorkOS::Util.encode_path(directory_id)}/users",
230
+ auth: true,
231
+ params: params,
232
+ request_options: request_options
233
+ )
234
+ fetch_next = ->(cursor) {
235
+ list_directory_users(
236
+ directory_id: directory_id,
237
+ before: before,
238
+ after: cursor,
239
+ limit: limit,
240
+ order: order,
241
+ group: group,
242
+ idp_id: idp_id,
243
+ email: email,
244
+ request_options: request_options
245
+ )
246
+ }
247
+ WorkOS::Types::ListStruct.from_response(
248
+ response,
249
+ model: WorkOS::DirectoryUser,
250
+ filters: {directory_id: directory_id, before: before, limit: limit, order: order, group: group, idp_id: idp_id, email: email},
251
+ fetch_next: fetch_next
252
+ )
253
+ end
254
+
255
+ # Get a User for a Directory
256
+ # @param directory_id [String] Unique identifier of the Directory.
257
+ # @param user_id [String] Unique identifier for the Directory User.
258
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
259
+ # @return [WorkOS::DirectoryUser]
260
+ def get_directory_user(
261
+ directory_id:,
262
+ user_id:,
263
+ request_options: {}
264
+ )
265
+ response = @client.request(
266
+ method: :get,
267
+ path: "/directories/#{WorkOS::Util.encode_path(directory_id)}/users/#{WorkOS::Util.encode_path(user_id)}",
268
+ auth: true,
269
+ request_options: request_options
270
+ )
271
+ result = WorkOS::DirectoryUser.new(response.body)
272
+ 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"])
273
+ result
274
+ end
275
+
124
276
  # List Directory Groups
277
+ # @deprecated
125
278
  # @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"`.
126
279
  # @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"`.
127
280
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
@@ -139,6 +292,7 @@ module WorkOS
139
292
  user: nil,
140
293
  request_options: {}
141
294
  )
295
+ warn "[DEPRECATION] `list_groups` is deprecated.", uplevel: 1
142
296
  params = {
143
297
  "before" => before,
144
298
  "after" => after,
@@ -174,6 +328,7 @@ module WorkOS
174
328
  end
175
329
 
176
330
  # Get a Directory Group
331
+ # @deprecated
177
332
  # @param id [String] Unique identifier for the Directory Group.
178
333
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
179
334
  # @return [WorkOS::DirectoryGroup]
@@ -181,6 +336,7 @@ module WorkOS
181
336
  id:,
182
337
  request_options: {}
183
338
  )
339
+ warn "[DEPRECATION] `get_group` is deprecated.", uplevel: 1
184
340
  response = @client.request(
185
341
  method: :get,
186
342
  path: "/directory_groups/#{WorkOS::Util.encode_path(id)}",
@@ -193,6 +349,7 @@ module WorkOS
193
349
  end
194
350
 
195
351
  # List Directory Users
352
+ # @deprecated
196
353
  # @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"`.
197
354
  # @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"`.
198
355
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
@@ -214,6 +371,7 @@ module WorkOS
214
371
  email: nil,
215
372
  request_options: {}
216
373
  )
374
+ warn "[DEPRECATION] `list_users` is deprecated.", uplevel: 1
217
375
  params = {
218
376
  "before" => before,
219
377
  "after" => after,
@@ -253,6 +411,7 @@ module WorkOS
253
411
  end
254
412
 
255
413
  # Get a Directory User
414
+ # @deprecated
256
415
  # @param id [String] Unique identifier for the Directory User.
257
416
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
258
417
  # @return [WorkOS::DirectoryUserWithGroups]
@@ -260,6 +419,7 @@ module WorkOS
260
419
  id:,
261
420
  request_options: {}
262
421
  )
422
+ warn "[DEPRECATION] `get_user` is deprecated.", uplevel: 1
263
423
  response = @client.request(
264
424
  method: :get,
265
425
  path: "/directory_users/#{WorkOS::Util.encode_path(id)}",
@@ -100,7 +100,7 @@ WORKOS_INFLECTIONS = {
100
100
  "sso_logout_authorize_request" => "SSOLogoutAuthorizeRequest",
101
101
  "sso_logout_authorize_response" => "SSOLogoutAuthorizeResponse",
102
102
  "sso_provider" => "SSOProvider",
103
- "sso_required_oauth_error_body_with_connection_ids_list_email_pending_authentication_token" => "SSORequiredOAuthErrorBodyWithConnectionIdsListEmailPendingAuthenticationToken",
103
+ "sso_required_oauth_error_body_with_connection_ids_list_email" => "SSORequiredOAuthErrorBodyWithConnectionIdsListEmail",
104
104
  "sso_token_response" => "SSOTokenResponse",
105
105
  "sso_token_response_oauth_token" => "SSOTokenResponseOAuthToken",
106
106
  "token_too_big_oauth_error_body" => "TokenTooBigOAuthErrorBody",
@@ -7,6 +7,7 @@ module WorkOS
7
7
  HASH_ATTRS = {
8
8
  account_display_name: :account_display_name,
9
9
  account_identifier: :account_identifier,
10
+ config: :config,
10
11
  access_token: :access_token,
11
12
  refresh_token: :refresh_token,
12
13
  expires_at: :expires_at,
@@ -17,6 +18,7 @@ module WorkOS
17
18
  attr_accessor \
18
19
  :account_display_name,
19
20
  :account_identifier,
21
+ :config,
20
22
  :access_token,
21
23
  :refresh_token,
22
24
  :expires_at,
@@ -27,6 +29,7 @@ module WorkOS
27
29
  hash = self.class.normalize(json)
28
30
  @account_display_name = hash[:account_display_name]
29
31
  @account_identifier = hash[:account_identifier]
32
+ @config = hash[:config] || {}
30
33
  @access_token = hash[:access_token]
31
34
  @refresh_token = hash[:refresh_token]
32
35
  @expires_at = hash[:expires_at]
@@ -7,33 +7,39 @@ module WorkOS
7
7
  HASH_ATTRS = {
8
8
  account_display_name: :account_display_name,
9
9
  account_identifier: :account_identifier,
10
+ config: :config,
10
11
  access_token: :access_token,
11
12
  refresh_token: :refresh_token,
12
13
  expires_at: :expires_at,
13
14
  scopes: :scopes,
14
15
  state: :state,
16
+ metadata: :metadata,
15
17
  connection_intent: :connection_intent
16
18
  }.freeze
17
19
 
18
20
  attr_accessor \
19
21
  :account_display_name,
20
22
  :account_identifier,
23
+ :config,
21
24
  :access_token,
22
25
  :refresh_token,
23
26
  :expires_at,
24
27
  :scopes,
25
28
  :state,
29
+ :metadata,
26
30
  :connection_intent
27
31
 
28
32
  def initialize(json)
29
33
  hash = self.class.normalize(json)
30
34
  @account_display_name = hash[:account_display_name]
31
35
  @account_identifier = hash[:account_identifier]
36
+ @config = hash[:config] || {}
32
37
  @access_token = hash[:access_token]
33
38
  @refresh_token = hash[:refresh_token]
34
39
  @expires_at = hash[:expires_at]
35
40
  @scopes = hash[:scopes] || []
36
41
  @state = hash[:state]
42
+ @metadata = hash[:metadata] || {}
37
43
  @connection_intent = hash[:connection_intent]
38
44
  end
39
45
  end
@@ -7,36 +7,42 @@ module WorkOS
7
7
  HASH_ATTRS = {
8
8
  account_display_name: :account_display_name,
9
9
  account_identifier: :account_identifier,
10
+ config: :config,
10
11
  access_token: :access_token,
11
12
  refresh_token: :refresh_token,
12
13
  expires_at: :expires_at,
13
14
  scopes: :scopes,
14
15
  state: :state,
15
16
  user_id: :user_id,
17
+ metadata: :metadata,
16
18
  connection_intent: :connection_intent
17
19
  }.freeze
18
20
 
19
21
  attr_accessor \
20
22
  :account_display_name,
21
23
  :account_identifier,
24
+ :config,
22
25
  :access_token,
23
26
  :refresh_token,
24
27
  :expires_at,
25
28
  :scopes,
26
29
  :state,
27
30
  :user_id,
31
+ :metadata,
28
32
  :connection_intent
29
33
 
30
34
  def initialize(json)
31
35
  hash = self.class.normalize(json)
32
36
  @account_display_name = hash[:account_display_name]
33
37
  @account_identifier = hash[:account_identifier]
38
+ @config = hash[:config] || {}
34
39
  @access_token = hash[:access_token]
35
40
  @refresh_token = hash[:refresh_token]
36
41
  @expires_at = hash[:expires_at]
37
42
  @scopes = hash[:scopes] || []
38
43
  @state = hash[:state]
39
44
  @user_id = hash[:user_id]
45
+ @metadata = hash[:metadata] || {}
40
46
  @connection_intent = hash[:connection_intent]
41
47
  end
42
48
  end
@@ -7,6 +7,7 @@ module WorkOS
7
7
  HASH_ATTRS = {
8
8
  account_display_name: :account_display_name,
9
9
  account_identifier: :account_identifier,
10
+ config: :config,
10
11
  access_token: :access_token,
11
12
  refresh_token: :refresh_token,
12
13
  expires_at: :expires_at,
@@ -18,6 +19,7 @@ module WorkOS
18
19
  attr_accessor \
19
20
  :account_display_name,
20
21
  :account_identifier,
22
+ :config,
21
23
  :access_token,
22
24
  :refresh_token,
23
25
  :expires_at,
@@ -29,6 +31,7 @@ module WorkOS
29
31
  hash = self.class.normalize(json)
30
32
  @account_display_name = hash[:account_display_name]
31
33
  @account_identifier = hash[:account_identifier]
34
+ @config = hash[:config] || {}
32
35
  @access_token = hash[:access_token]
33
36
  @refresh_token = hash[:refresh_token]
34
37
  @expires_at = hash[:expires_at]