workos 10.5.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 (623) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release-please.yml +3 -3
  3. data/.last-synced-sha +1 -1
  4. data/.oagen-manifest.json +415 -33
  5. data/.release-please-manifest.json +1 -1
  6. data/CHANGELOG.md +196 -0
  7. data/Gemfile.lock +2 -2
  8. data/README.md +2 -2
  9. data/lib/workos/agents/list_metadata.rb +22 -0
  10. data/lib/workos/api_keys/api_key_data_integration_vended_credential.rb +28 -0
  11. data/lib/workos/audit_logs.rb +2 -2
  12. data/lib/workos/authorization/patch_group_role_assignments.rb +22 -0
  13. data/lib/workos/authorization.rb +26 -0
  14. data/lib/workos/base_client.rb +3 -0
  15. data/lib/workos/client_api.rb +3 -3
  16. data/lib/workos/connect/connect_application.rb +3 -0
  17. data/lib/workos/connect/create_oauth_application.rb +3 -0
  18. data/lib/workos/connect/update_oauth_application.rb +5 -2
  19. data/lib/workos/connect.rb +6 -0
  20. data/lib/workos/directory_sync/directory_user_with_groups.rb +1 -1
  21. data/lib/workos/directory_sync.rb +160 -0
  22. data/lib/workos/events.rb +3 -11
  23. data/lib/workos/feature_flags/flag_created_data.rb +1 -46
  24. data/lib/workos/feature_flags/flag_deleted_data.rb +1 -1
  25. data/lib/workos/feature_flags/flag_rule.rb +49 -0
  26. data/lib/workos/feature_flags/flag_rule_updated_data.rb +1 -1
  27. data/lib/workos/feature_flags/flag_target.rb +52 -0
  28. data/lib/workos/feature_flags/flag_target_with_rule_id.rb +46 -0
  29. data/lib/workos/feature_flags/flag_target_with_value_type.rb +49 -0
  30. data/lib/workos/feature_flags/flag_updated_context_previous_attribute.rb +1 -12
  31. data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data.rb +1 -28
  32. data/lib/workos/feature_flags/flag_updated_data.rb +1 -1
  33. data/lib/workos/groups/patch_group_memberships.rb +22 -0
  34. data/lib/workos/groups.rb +28 -0
  35. data/lib/workos/inflections.rb +30 -0
  36. data/lib/workos/organizations/it_contact_list_list_metadata.rb +22 -0
  37. data/lib/workos/organizations/organization_authentication_methods_required_oauth_error_body.rb +22 -0
  38. data/lib/workos/organizations/organization_connected_account_import_error_body.rb +22 -0
  39. data/lib/workos/organizations/organization_membership_not_found_oauth_error_body.rb +22 -0
  40. data/lib/workos/organizations/organization_not_found_oauth_error_body.rb +22 -0
  41. data/lib/workos/organizations/organization_selection_required_error_body.rb +22 -0
  42. data/lib/workos/organizations/organization_selection_required_error_body_with_organization.rb +7 -0
  43. data/lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb +25 -0
  44. data/lib/workos/pipes/connected_account.rb +5 -2
  45. data/lib/workos/pipes/connected_account_input.rb +3 -0
  46. data/lib/workos/pipes/{connected_account_write_response_warning.rb → connected_account_warning.rb} +1 -1
  47. data/lib/workos/pipes/create_connected_account.rb +6 -0
  48. data/lib/workos/pipes/create_organization_connected_account.rb +6 -0
  49. data/lib/workos/pipes/data_integration_authorize_url_response.rb +9 -2
  50. data/lib/workos/pipes/data_integration_finish_connection_response.rb +18 -0
  51. data/lib/workos/pipes/data_integration_vended_credential.rb +5 -5
  52. data/lib/workos/pipes/data_integrations_finish_connection_request.rb +25 -0
  53. data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +14 -2
  54. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +4 -1
  55. data/lib/workos/pipes/data_integrations_list_response_data_connected_account_warning.rb +7 -0
  56. data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +8 -2
  57. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +8 -2
  58. data/lib/workos/pipes/organization_connected_account.rb +3 -0
  59. data/lib/workos/pipes.rb +80 -27
  60. data/lib/workos/pipes_provider.rb +12 -0
  61. data/lib/workos/session.rb +12 -0
  62. data/lib/workos/shared/access_denied_oauth_error_body.rb +22 -0
  63. data/lib/workos/shared/account_selection_required_error_body.rb +7 -0
  64. data/lib/workos/shared/agent_registration_claim_completed_data.rb +3 -0
  65. data/lib/workos/shared/already_claimed_error_body.rb +22 -0
  66. data/lib/workos/shared/application_consent_required_error_body.rb +22 -0
  67. data/lib/workos/shared/auth_method_mismatch_error_body.rb +7 -0
  68. data/lib/workos/shared/authorization_pending_oauth_error_body.rb +22 -0
  69. data/lib/workos/shared/authorization_url_not_found_error_body.rb +22 -0
  70. data/lib/workos/shared/authorization_url_request_error_body.rb +22 -0
  71. data/lib/workos/shared/client_credentials_data_integration_vended_credential.rb +40 -0
  72. data/lib/workos/shared/code_challenge_not_found_error_body.rb +22 -0
  73. data/lib/workos/shared/connect_application_oauth.rb +3 -0
  74. data/lib/workos/shared/connected_account_limit_reached_error_body.rb +22 -0
  75. data/lib/workos/shared/daily_quota_exceeded_error_body.rb +22 -0
  76. data/lib/workos/shared/data_integration_access_token_response_with_access_token.rb +22 -0
  77. data/lib/workos/shared/data_integration_access_token_response_with_access_token_access_token.rb +7 -0
  78. data/lib/workos/shared/data_integration_access_token_response_with_error.rb +22 -0
  79. data/lib/workos/shared/data_integration_credentials_response_with_credential.rb +22 -0
  80. data/lib/workos/shared/data_integration_credentials_response_with_error.rb +22 -0
  81. data/lib/workos/shared/entity_not_found_error_body.rb +22 -0
  82. data/lib/workos/shared/error_body.rb +7 -0
  83. data/lib/workos/shared/error_body_with_code.rb +22 -0
  84. data/lib/workos/shared/error_body_with_code_errors.rb +25 -0
  85. data/lib/workos/shared/error_body_with_code_field_error.rb +22 -0
  86. data/lib/workos/shared/error_body_with_code_field_errors.rb +22 -0
  87. data/lib/workos/shared/error_body_with_code_instance_path_error.rb +18 -0
  88. data/lib/workos/shared/error_body_with_code_instance_path_errors.rb +25 -0
  89. data/lib/workos/shared/error_body_with_code_status_code.rb +25 -0
  90. data/lib/workos/shared/error_body_with_constraints_property_error.rb +22 -0
  91. data/lib/workos/shared/error_body_with_constraints_property_errors.rb +22 -0
  92. data/lib/workos/shared/error_body_with_error.rb +22 -0
  93. data/lib/workos/shared/error_body_with_error_message_list.rb +22 -0
  94. data/lib/workos/shared/error_body_with_message_or_message_list.rb +18 -0
  95. data/lib/workos/shared/expired_token_oauth_error_body.rb +22 -0
  96. data/lib/workos/shared/external_auth_session_already_completed_error_body.rb +22 -0
  97. data/lib/workos/shared/external_id_already_used_error_body.rb +22 -0
  98. data/lib/workos/shared/extra_attributes_required_oauth_error_body.rb +22 -0
  99. data/lib/workos/shared/feature_flags_flag_created.rb +34 -0
  100. data/lib/workos/shared/feature_flags_flag_created_context.rb +22 -0
  101. data/lib/workos/shared/feature_flags_flag_created_context_actor.rb +25 -0
  102. data/lib/workos/shared/feature_flags_flag_created_data.rb +52 -0
  103. data/lib/workos/shared/feature_flags_flag_created_data_owner.rb +7 -0
  104. data/lib/workos/shared/feature_flags_flag_deleted.rb +34 -0
  105. data/lib/workos/shared/feature_flags_flag_deleted_context.rb +22 -0
  106. data/lib/workos/shared/feature_flags_flag_deleted_context_actor.rb +25 -0
  107. data/lib/workos/shared/feature_flags_flag_deleted_data.rb +7 -0
  108. data/lib/workos/shared/feature_flags_flag_deleted_data_owner.rb +7 -0
  109. data/lib/workos/shared/feature_flags_flag_rule_created.rb +34 -0
  110. data/lib/workos/shared/feature_flags_flag_rule_created_context.rb +22 -0
  111. data/lib/workos/shared/feature_flags_flag_rule_created_context_actor.rb +25 -0
  112. data/lib/workos/shared/feature_flags_flag_rule_deleted.rb +34 -0
  113. data/lib/workos/shared/feature_flags_flag_rule_deleted_context.rb +22 -0
  114. data/lib/workos/shared/feature_flags_flag_rule_deleted_context_actor.rb +25 -0
  115. data/lib/workos/shared/feature_flags_flag_rule_updated.rb +34 -0
  116. data/lib/workos/shared/feature_flags_flag_rule_updated_context.rb +25 -0
  117. data/lib/workos/shared/feature_flags_flag_rule_updated_context_actor.rb +25 -0
  118. data/lib/workos/shared/feature_flags_flag_rule_updated_context_previous_attribute.rb +18 -0
  119. data/lib/workos/shared/feature_flags_flag_rule_updated_context_previous_attribute_data.rb +18 -0
  120. data/lib/workos/shared/feature_flags_flag_target_created.rb +34 -0
  121. data/lib/workos/shared/feature_flags_flag_target_created_context.rb +22 -0
  122. data/lib/workos/shared/feature_flags_flag_target_created_context_actor.rb +25 -0
  123. data/lib/workos/shared/feature_flags_flag_target_deleted.rb +34 -0
  124. data/lib/workos/shared/feature_flags_flag_target_deleted_context.rb +22 -0
  125. data/lib/workos/shared/feature_flags_flag_target_deleted_context_actor.rb +25 -0
  126. data/lib/workos/shared/feature_flags_flag_updated.rb +34 -0
  127. data/lib/workos/shared/feature_flags_flag_updated_context.rb +25 -0
  128. data/lib/workos/shared/feature_flags_flag_updated_context_actor.rb +25 -0
  129. data/lib/workos/shared/feature_flags_flag_updated_context_previous_attribute.rb +18 -0
  130. data/lib/workos/shared/feature_flags_flag_updated_context_previous_attribute_data.rb +34 -0
  131. data/lib/workos/shared/feature_flags_flag_updated_context_previous_attribute_data_owner.rb +7 -0
  132. data/lib/workos/shared/feature_flags_flag_updated_data.rb +7 -0
  133. data/lib/workos/shared/feature_flags_flag_updated_data_owner.rb +7 -0
  134. data/lib/workos/shared/idp_metadata_fetch_failed_error_body.rb +22 -0
  135. data/lib/workos/shared/invalid_client_oauth_error_body.rb +22 -0
  136. data/lib/workos/shared/invalid_connection_oauth_error_body.rb +22 -0
  137. data/lib/workos/shared/invalid_credentials_error_body.rb +22 -0
  138. data/lib/workos/shared/invalid_email_error_body.rb +22 -0
  139. data/lib/workos/shared/invalid_grant_oauth_error_body.rb +22 -0
  140. data/lib/workos/shared/invalid_idp_sso_url_error_body.rb +22 -0
  141. data/lib/workos/shared/invalid_link_authorization_code_oauth_error_body.rb +22 -0
  142. data/lib/workos/shared/invalid_locale_error_body.rb +22 -0
  143. data/lib/workos/shared/invalid_metadata_error_body.rb +22 -0
  144. data/lib/workos/shared/invalid_one_time_code_error_body.rb +22 -0
  145. data/lib/workos/shared/invalid_organization_id_error_body.rb +22 -0
  146. data/lib/workos/shared/invalid_password_hash_error_body.rb +22 -0
  147. data/lib/workos/shared/invalid_pending_authentication_token_error_body.rb +22 -0
  148. data/lib/workos/shared/invalid_profile_oauth_error_body.rb +22 -0
  149. data/lib/workos/shared/invalid_refresh_token_error_body.rb +22 -0
  150. data/lib/workos/shared/invalid_request_oauth_error_body.rb +22 -0
  151. data/lib/workos/shared/invalid_request_parameters_error_body.rb +22 -0
  152. data/lib/workos/shared/invalid_request_parameters_error_body_with_errors.rb +25 -0
  153. data/lib/workos/shared/invalid_role_error_body.rb +22 -0
  154. data/lib/workos/shared/invalid_url_error_body.rb +22 -0
  155. data/lib/workos/shared/mfa_challenge_error_body.rb +22 -0
  156. data/lib/workos/shared/mfa_enrollment_error_body.rb +22 -0
  157. data/lib/workos/shared/mfa_enrollment_oauth_error_body.rb +22 -0
  158. data/lib/workos/shared/multiple_roles_not_enabled_error_body.rb +22 -0
  159. data/lib/workos/shared/must_use_sso_for_selected_organization_message_error_body.rb +18 -0
  160. data/lib/workos/shared/oauth_data_integration_vended_credential.rb +40 -0
  161. data/lib/workos/shared/oauth_error_body.rb +22 -0
  162. data/lib/workos/shared/one_time_code_expired_error_body.rb +22 -0
  163. data/lib/workos/shared/one_time_code_previously_used_error_body.rb +22 -0
  164. data/lib/workos/shared/one_time_code_too_many_attempts_error_body.rb +22 -0
  165. data/lib/workos/shared/passkey_progressive_enrollment_error_body.rb +22 -0
  166. data/lib/workos/shared/phone_number_required_error_body.rb +22 -0
  167. data/lib/workos/shared/pkce_not_supported_oauth_error_body.rb +22 -0
  168. data/lib/workos/shared/policy_denied_error_body.rb +25 -0
  169. data/lib/workos/shared/radar_challenge_error_body.rb +22 -0
  170. data/lib/workos/shared/radar_sign_up_challenge_error_body.rb +22 -0
  171. data/lib/workos/shared/radar_sms_sign_in_challenge_error_body.rb +22 -0
  172. data/lib/workos/shared/rate_limit_exceeded_error_body_with_retry_after.rb +25 -0
  173. data/lib/workos/shared/sign_up_not_allowed_oauth_error_body.rb +22 -0
  174. data/lib/workos/shared/slow_down_oauth_error_body.rb +22 -0
  175. data/lib/workos/shared/sms_challenge_quota_reached_error_body.rb +22 -0
  176. data/lib/workos/shared/sms_challenge_rate_limited_error_body.rb +22 -0
  177. data/lib/workos/shared/sso_required_oauth_error_body_with_connection_ids_list_email.rb +31 -0
  178. data/lib/workos/shared/sub_resource_scoped_role_not_allowed_error_body_with_role_slug.rb +25 -0
  179. data/lib/workos/shared/token_too_big_oauth_error_body.rb +22 -0
  180. data/lib/workos/shared/too_many_failed_verification_attempts_error_body_with_retry_after.rb +25 -0
  181. data/lib/workos/shared/too_many_requests_oauth_error_body.rb +22 -0
  182. data/lib/workos/shared/unauthorized_client_oauth_error_body.rb +22 -0
  183. data/lib/workos/shared/unauthorized_error_body.rb +18 -0
  184. data/lib/workos/shared/update_audit_logs_retention_with_retention_period.rb +18 -0
  185. data/lib/workos/shared/update_audit_logs_retention_with_retention_period_in_days.rb +26 -0
  186. data/lib/workos/shared/update_user_organization_membership_with_role_slug.rb +18 -0
  187. data/lib/workos/shared/update_user_organization_membership_with_role_slugs.rb +18 -0
  188. data/lib/workos/shared/verification_id_required_error_body.rb +22 -0
  189. data/lib/workos/sso/connection_could_not_be_verified_error_body.rb +22 -0
  190. data/lib/workos/sso/connection_creation_conflict_error_body.rb +22 -0
  191. data/lib/workos/sso/connection_creation_not_found_error_body.rb +22 -0
  192. data/lib/workos/sso/connection_finish_error_body.rb +22 -0
  193. data/lib/workos/sso/connection_type_not_updatable_error_body.rb +22 -0
  194. data/lib/workos/sso.rb +6 -2
  195. data/lib/workos/types/authorization_url_not_found_error_body_code.rb +14 -0
  196. data/lib/workos/types/authorization_url_request_error_body_code.rb +14 -0
  197. data/lib/workos/types/connection_creation_conflict_error_body_code.rb +13 -0
  198. data/lib/workos/types/connection_creation_not_found_error_body_code.rb +13 -0
  199. data/lib/workos/types/connection_finish_error_body_code.rb +29 -0
  200. data/lib/workos/types/connections_state.rb +14 -0
  201. data/lib/workos/types/create_data_integration_ownership.rb +5 -1
  202. data/lib/workos/types/create_magic_code_and_return_locale.rb +101 -0
  203. data/lib/workos/types/{connected_account_write_response_auth_method.rb → create_password_reset_token_locale.rb} +1 -1
  204. data/lib/workos/types/create_user_invite_options_locale.rb +1 -93
  205. data/lib/workos/types/create_webhook_endpoint_events.rb +9 -1
  206. data/lib/workos/types/data_integration_access_token_response_with_error_error.rb +9 -0
  207. data/lib/workos/types/data_integration_credentials_response_with_error_error.rb +9 -0
  208. data/lib/workos/types/data_integration_ownership.rb +1 -1
  209. data/lib/workos/types/{connected_account_write_response_connection_role.rb → data_integration_vended_credential_auth_method.rb} +1 -1
  210. data/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb +1 -1
  211. data/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb +1 -1
  212. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_intent.rb +13 -0
  213. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +1 -1
  214. data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +1 -1
  215. data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +1 -1
  216. data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +1 -1
  217. data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +1 -1
  218. data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +1 -1
  219. data/lib/workos/types/error_body_code.rb +182 -0
  220. data/lib/workos/types/feature_flags_flag_created_context_actor_source.rb +9 -0
  221. data/lib/workos/types/feature_flags_flag_deleted_context_actor_source.rb +9 -0
  222. data/lib/workos/types/feature_flags_flag_rule_created_context_actor_source.rb +9 -0
  223. data/lib/workos/types/feature_flags_flag_rule_deleted_context_actor_source.rb +9 -0
  224. data/lib/workos/types/feature_flags_flag_rule_updated_context_actor_source.rb +9 -0
  225. data/lib/workos/types/feature_flags_flag_target_created_context_actor_source.rb +9 -0
  226. data/lib/workos/types/feature_flags_flag_target_deleted_context_actor_source.rb +9 -0
  227. data/lib/workos/types/feature_flags_flag_updated_context_actor_source.rb +9 -0
  228. data/lib/workos/types/organization_connected_account_import_error_body_code.rb +14 -0
  229. data/lib/workos/types/pipes_ownership.rb +1 -1
  230. data/lib/workos/types/{connected_account_write_response_state.rb → pipes_provider_ownership.rb} +1 -1
  231. data/lib/workos/types/resend_user_invite_options_locale.rb +1 -1
  232. data/lib/workos/types/resource_export_completed_data_resource_type.rb +3 -1
  233. data/lib/workos/types/send_email_change_locale.rb +9 -0
  234. data/lib/workos/types/send_verification_email_locale.rb +9 -0
  235. data/lib/workos/types/update_audit_logs_retention_with_retention_period_retention_period.rb +9 -0
  236. data/lib/workos/types/user_connected_account_import_error_body_code.rb +15 -0
  237. data/lib/workos/types/widget_session_token_scopes.rb +3 -1
  238. data/lib/workos/user_management/action_denied_error_body.rb +22 -0
  239. data/lib/workos/user_management/authentication_email_verification_failed_data_error.rb +5 -2
  240. data/lib/workos/user_management/authentication_method_not_allowed_error_body.rb +22 -0
  241. data/lib/workos/user_management/authentication_method_not_allowed_oauth_error_body.rb +22 -0
  242. data/lib/workos/user_management/authentication_radar_risk_detected_data.rb +5 -2
  243. data/lib/workos/user_management/create_magic_code_and_return.rb +5 -2
  244. data/lib/workos/user_management/create_password_reset_token.rb +16 -1
  245. data/lib/workos/user_management/email_already_in_use_error_body.rb +22 -0
  246. data/lib/workos/user_management/email_already_verified_error_body.rb +22 -0
  247. data/lib/workos/user_management/email_change_not_allowed_error_body.rb +22 -0
  248. data/lib/workos/user_management/email_completion_required_error_body_with_email_completion_token.rb +25 -0
  249. data/lib/workos/user_management/email_domain_not_deliverable_error_body.rb +22 -0
  250. data/lib/workos/user_management/email_not_available_error_body.rb +22 -0
  251. data/lib/workos/user_management/email_password_auth_disabled_error_body.rb +22 -0
  252. data/lib/workos/user_management/email_verification_required_error_body.rb +22 -0
  253. data/lib/workos/user_management/invitation_cannot_be_used_for_email_oauth_error_body.rb +22 -0
  254. data/lib/workos/user_management/invitation_invalid_oauth_error_body.rb +22 -0
  255. data/lib/workos/user_management/password_and_password_hash_provided_error_body.rb +22 -0
  256. data/lib/workos/user_management/password_and_password_hash_type_provided_error_body.rb +22 -0
  257. data/lib/workos/user_management/password_salt_position_requires_password_hash_error_body.rb +22 -0
  258. data/lib/workos/user_management/password_strength_error_error_body_with_errors.rb +25 -0
  259. data/lib/workos/user_management/send_email_change.rb +6 -2
  260. data/lib/workos/user_management/send_verification_email.rb +18 -0
  261. data/lib/workos/user_management/user_connected_account_import_error_body.rb +22 -0
  262. data/lib/workos/user_management/user_consent_options_not_supported_error_body.rb +22 -0
  263. data/lib/workos/user_management/user_creation_error_error_body_with_errors.rb +25 -0
  264. data/lib/workos/user_management/user_mismatch_error_body.rb +22 -0
  265. data/lib/workos/user_management/waitlist_list_response.rb +25 -0
  266. data/lib/workos/user_management/waitlist_list_response_list_metadata.rb +7 -0
  267. data/lib/workos/user_management.rb +25 -10
  268. data/lib/workos/version.rb +1 -1
  269. data/rbi/workos/access_denied_oauth_error_body.rbi +30 -0
  270. data/rbi/workos/account_selection_required_error_body.rbi +9 -0
  271. data/rbi/workos/{connected_account_write_response_warning.rbi → action_denied_error_body.rbi} +1 -1
  272. data/rbi/workos/admin_portal.rbi +2 -2
  273. data/rbi/workos/agent_blueprint_invocable_by.rbi +1 -22
  274. data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +1 -22
  275. data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +1 -28
  276. data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +1 -28
  277. data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +1 -22
  278. data/rbi/workos/agent_registration_claim_completed_data.rbi +6 -0
  279. data/rbi/workos/agent_registration_expired_data.rbi +1 -16
  280. data/rbi/workos/agent_registration_refreshed_data.rbi +1 -16
  281. data/rbi/workos/agent_registration_revoked_data.rbi +1 -16
  282. data/rbi/workos/agents.rbi +20 -20
  283. data/rbi/workos/already_claimed_error_body.rbi +30 -0
  284. data/rbi/workos/api_key_data_integration_vended_credential.rbi +42 -0
  285. data/rbi/workos/api_key_owner.rbi +1 -22
  286. data/rbi/workos/api_key_revoked_data.rbi +1 -70
  287. data/rbi/workos/api_key_revoked_data_owner.rbi +1 -22
  288. data/rbi/workos/api_key_updated_data_owner.rbi +1 -22
  289. data/rbi/workos/api_keys.rbi +5 -5
  290. data/rbi/workos/application_consent_required_error_body.rbi +30 -0
  291. data/rbi/workos/audit_log_event_target.rbi +1 -34
  292. data/rbi/workos/audit_log_schema_actor_input.rbi +1 -16
  293. data/rbi/workos/audit_log_schema_target_input.rbi +1 -22
  294. data/rbi/workos/audit_logs.rbi +10 -10
  295. data/rbi/workos/auth_method_mismatch_error_body.rbi +9 -0
  296. data/rbi/workos/authentication_email_verification_failed_data_error.rbi +6 -0
  297. data/rbi/workos/authentication_factor_sms.rbi +1 -16
  298. data/rbi/workos/authentication_magic_auth_failed_data_error.rbi +1 -22
  299. data/rbi/workos/authentication_method_not_allowed_error_body.rbi +30 -0
  300. data/rbi/workos/authentication_method_not_allowed_oauth_error_body.rbi +30 -0
  301. data/rbi/workos/authentication_mfa_failed_data_error.rbi +1 -22
  302. data/rbi/workos/authentication_oauth_failed_data_error.rbi +1 -22
  303. data/rbi/workos/authentication_passkey_failed_data_error.rbi +1 -22
  304. data/rbi/workos/authentication_password_failed_data_error.rbi +1 -22
  305. data/rbi/workos/authentication_radar_risk_detected_data.rbi +6 -0
  306. data/rbi/workos/authentication_sso_failed_data_error.rbi +1 -22
  307. data/rbi/workos/authentication_sso_started_data_sso.rbi +1 -28
  308. data/rbi/workos/authentication_sso_succeeded_data_sso.rbi +1 -28
  309. data/rbi/workos/authentication_sso_timed_out_data_error.rbi +1 -22
  310. data/rbi/workos/authentication_sso_timed_out_data_sso.rbi +1 -28
  311. data/rbi/workos/authorization.rbi +57 -45
  312. data/rbi/workos/authorization_pending_oauth_error_body.rbi +30 -0
  313. data/rbi/workos/authorization_url_not_found_error_body.rbi +30 -0
  314. data/rbi/workos/authorization_url_request_error_body.rbi +30 -0
  315. data/rbi/workos/claim_view_response_organization.rbi +1 -22
  316. data/rbi/workos/client_api.rbi +1 -1
  317. data/rbi/workos/client_credentials_data_integration_vended_credential.rbi +66 -0
  318. data/rbi/workos/code_challenge_not_found_error_body.rbi +30 -0
  319. data/rbi/workos/confirm_email_change.rbi +1 -16
  320. data/rbi/workos/connect.rbi +12 -10
  321. data/rbi/workos/connect_application.rbi +42 -0
  322. data/rbi/workos/connect_application_oauth.rbi +6 -0
  323. data/rbi/workos/connect_application_redirect_uri.rbi +30 -0
  324. data/rbi/workos/connected_account.rbi +6 -0
  325. data/rbi/workos/connected_account_input.rbi +6 -0
  326. data/rbi/workos/connected_account_limit_reached_error_body.rbi +30 -0
  327. data/rbi/workos/connected_account_warning.rbi +30 -0
  328. data/rbi/workos/connection_could_not_be_verified_error_body.rbi +30 -0
  329. data/rbi/workos/connection_creation_conflict_error_body.rbi +30 -0
  330. data/rbi/workos/connection_creation_not_found_error_body.rbi +30 -0
  331. data/rbi/workos/connection_deactivated_data_domain.rbi +1 -28
  332. data/rbi/workos/connection_domain.rbi +1 -28
  333. data/rbi/workos/connection_finish_error_body.rbi +30 -0
  334. data/rbi/workos/connection_saml_certificate_renewed_data_connection.rbi +1 -22
  335. data/rbi/workos/connection_type_not_updatable_error_body.rbi +30 -0
  336. data/rbi/workos/create_connected_account.rbi +12 -0
  337. data/rbi/workos/create_group_role_assignment.rbi +1 -34
  338. data/rbi/workos/create_magic_code_and_return.rbi +6 -0
  339. data/rbi/workos/create_oauth_application.rbi +6 -0
  340. data/rbi/workos/create_organization_connected_account.rbi +12 -0
  341. data/rbi/workos/create_password_reset_token.rbi +6 -0
  342. data/rbi/workos/create_role.rbi +1 -34
  343. data/rbi/workos/daily_quota_exceeded_error_body.rbi +30 -0
  344. data/rbi/workos/data_integration_access_token_response_with_access_token.rbi +30 -0
  345. data/rbi/workos/data_integration_access_token_response_with_access_token_access_token.rbi +9 -0
  346. data/rbi/workos/data_integration_access_token_response_with_error.rbi +30 -0
  347. data/rbi/workos/data_integration_authorize_url_response.rbi +12 -0
  348. data/rbi/workos/data_integration_credentials_response_with_credential.rbi +30 -0
  349. data/rbi/workos/data_integration_credentials_response_with_error.rbi +30 -0
  350. data/rbi/workos/data_integration_finish_connection_response.rbi +24 -0
  351. data/rbi/workos/data_integration_vended_credential.rbi +6 -6
  352. data/rbi/workos/data_integrations_finish_connection_request.rbi +36 -0
  353. data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +24 -0
  354. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +6 -0
  355. data/rbi/workos/data_integrations_list_response_data_connected_account_warning.rbi +9 -0
  356. data/rbi/workos/data_integrations_upsert_api_key_request.rbi +12 -0
  357. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +12 -0
  358. data/rbi/workos/delete_group_role_assignments_by_criteria.rbi +1 -34
  359. data/rbi/workos/directory_sync.rbi +54 -8
  360. data/rbi/workos/directory_user_with_groups_email.rbi +1 -28
  361. data/rbi/workos/dsync_group_user_removed_data.rbi +1 -28
  362. data/rbi/workos/dsync_token_revoked_data.rbi +1 -46
  363. data/rbi/workos/dsync_user_updated_data_email.rbi +1 -28
  364. data/rbi/workos/email_already_in_use_error_body.rbi +30 -0
  365. data/rbi/workos/email_already_verified_error_body.rbi +30 -0
  366. data/rbi/workos/email_change_not_allowed_error_body.rbi +30 -0
  367. data/rbi/workos/email_completion_required_error_body_with_email_completion_token.rbi +36 -0
  368. data/rbi/workos/email_domain_not_deliverable_error_body.rbi +30 -0
  369. data/rbi/workos/email_not_available_error_body.rbi +30 -0
  370. data/rbi/workos/email_password_auth_disabled_error_body.rbi +30 -0
  371. data/rbi/workos/email_verification_required_error_body.rbi +30 -0
  372. data/rbi/workos/entity_not_found_error_body.rbi +30 -0
  373. data/rbi/workos/error_body.rbi +9 -0
  374. data/rbi/workos/error_body_with_code.rbi +30 -0
  375. data/rbi/workos/error_body_with_code_errors.rbi +36 -0
  376. data/rbi/workos/error_body_with_code_field_error.rbi +30 -0
  377. data/rbi/workos/error_body_with_code_field_errors.rbi +30 -0
  378. data/rbi/workos/error_body_with_code_instance_path_error.rbi +24 -0
  379. data/rbi/workos/error_body_with_code_instance_path_errors.rbi +36 -0
  380. data/rbi/workos/error_body_with_code_status_code.rbi +36 -0
  381. data/rbi/workos/error_body_with_constraints_property_error.rbi +30 -0
  382. data/rbi/workos/error_body_with_constraints_property_errors.rbi +30 -0
  383. data/rbi/workos/error_body_with_error.rbi +30 -0
  384. data/rbi/workos/error_body_with_error_message_list.rbi +30 -0
  385. data/rbi/workos/error_body_with_message_or_message_list.rbi +24 -0
  386. data/rbi/workos/events.rbi +1 -3
  387. data/rbi/workos/expired_token_oauth_error_body.rbi +30 -0
  388. data/rbi/workos/external_auth_session_already_completed_error_body.rbi +30 -0
  389. data/rbi/workos/external_id_already_used_error_body.rbi +30 -0
  390. data/rbi/workos/extra_attributes_required_oauth_error_body.rbi +30 -0
  391. data/rbi/workos/feature_flags.rbi +8 -8
  392. data/rbi/workos/feature_flags_flag_created.rbi +54 -0
  393. data/rbi/workos/feature_flags_flag_created_context.rbi +30 -0
  394. data/rbi/workos/feature_flags_flag_created_context_actor.rbi +36 -0
  395. data/rbi/workos/feature_flags_flag_created_data.rbi +90 -0
  396. data/rbi/workos/feature_flags_flag_created_data_owner.rbi +9 -0
  397. data/rbi/workos/feature_flags_flag_deleted.rbi +54 -0
  398. data/rbi/workos/feature_flags_flag_deleted_context.rbi +30 -0
  399. data/rbi/workos/feature_flags_flag_deleted_context_actor.rbi +36 -0
  400. data/rbi/workos/feature_flags_flag_deleted_data.rbi +9 -0
  401. data/rbi/workos/feature_flags_flag_deleted_data_owner.rbi +9 -0
  402. data/rbi/workos/feature_flags_flag_rule_created.rbi +54 -0
  403. data/rbi/workos/feature_flags_flag_rule_created_context.rbi +30 -0
  404. data/rbi/workos/feature_flags_flag_rule_created_context_actor.rbi +36 -0
  405. data/rbi/workos/feature_flags_flag_rule_deleted.rbi +54 -0
  406. data/rbi/workos/feature_flags_flag_rule_deleted_context.rbi +30 -0
  407. data/rbi/workos/feature_flags_flag_rule_deleted_context_actor.rbi +36 -0
  408. data/rbi/workos/feature_flags_flag_rule_updated.rbi +54 -0
  409. data/rbi/workos/feature_flags_flag_rule_updated_context.rbi +36 -0
  410. data/rbi/workos/feature_flags_flag_rule_updated_context_actor.rbi +36 -0
  411. data/rbi/workos/feature_flags_flag_rule_updated_context_previous_attribute.rbi +24 -0
  412. data/rbi/workos/feature_flags_flag_rule_updated_context_previous_attribute_data.rbi +24 -0
  413. data/rbi/workos/feature_flags_flag_target_created.rbi +54 -0
  414. data/rbi/workos/feature_flags_flag_target_created_context.rbi +30 -0
  415. data/rbi/workos/feature_flags_flag_target_created_context_actor.rbi +36 -0
  416. data/rbi/workos/feature_flags_flag_target_deleted.rbi +54 -0
  417. data/rbi/workos/feature_flags_flag_target_deleted_context.rbi +30 -0
  418. data/rbi/workos/feature_flags_flag_target_deleted_context_actor.rbi +36 -0
  419. data/rbi/workos/feature_flags_flag_updated.rbi +54 -0
  420. data/rbi/workos/feature_flags_flag_updated_context.rbi +36 -0
  421. data/rbi/workos/feature_flags_flag_updated_context_actor.rbi +36 -0
  422. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute.rbi +24 -0
  423. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute_data.rbi +54 -0
  424. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute_data_owner.rbi +9 -0
  425. data/rbi/workos/feature_flags_flag_updated_data.rbi +9 -0
  426. data/rbi/workos/feature_flags_flag_updated_data_owner.rbi +9 -0
  427. data/rbi/workos/flag.rbi +1 -76
  428. data/rbi/workos/flag_created_data.rbi +1 -82
  429. data/rbi/workos/flag_created_data_owner.rbi +1 -28
  430. data/rbi/workos/flag_deleted_data.rbi +1 -82
  431. data/rbi/workos/flag_deleted_data_owner.rbi +1 -28
  432. data/rbi/workos/flag_owner.rbi +1 -28
  433. data/rbi/workos/flag_rule.rbi +84 -0
  434. data/rbi/workos/flag_rule_updated_context_configured_target_organization.rbi +1 -22
  435. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target.rbi +1 -22
  436. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rbi +1 -22
  437. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target_user.rbi +1 -22
  438. data/rbi/workos/flag_rule_updated_data.rbi +1 -82
  439. data/rbi/workos/flag_rule_updated_data_owner.rbi +1 -28
  440. data/rbi/workos/flag_target.rbi +90 -0
  441. data/rbi/workos/flag_target_with_rule_id.rbi +78 -0
  442. data/rbi/workos/flag_target_with_value_type.rbi +84 -0
  443. data/rbi/workos/flag_updated_context_previous_attribute.rbi +1 -16
  444. data/rbi/workos/flag_updated_context_previous_attribute_data.rbi +1 -46
  445. data/rbi/workos/flag_updated_context_previous_attribute_data_owner.rbi +1 -28
  446. data/rbi/workos/flag_updated_data.rbi +1 -82
  447. data/rbi/workos/flag_updated_data_owner.rbi +1 -28
  448. data/rbi/workos/group_member_removed_data.rbi +1 -22
  449. data/rbi/workos/group_role_assignment_list.rbi +36 -0
  450. data/rbi/workos/groups.rbi +19 -8
  451. data/rbi/workos/idp_metadata_fetch_failed_error_body.rbi +30 -0
  452. data/rbi/workos/invalid_client_oauth_error_body.rbi +30 -0
  453. data/rbi/workos/invalid_connection_oauth_error_body.rbi +30 -0
  454. data/rbi/workos/invalid_credentials_error_body.rbi +30 -0
  455. data/rbi/workos/invalid_email_error_body.rbi +30 -0
  456. data/rbi/workos/invalid_grant_oauth_error_body.rbi +30 -0
  457. data/rbi/workos/invalid_idp_sso_url_error_body.rbi +30 -0
  458. data/rbi/workos/invalid_link_authorization_code_oauth_error_body.rbi +30 -0
  459. data/rbi/workos/invalid_locale_error_body.rbi +30 -0
  460. data/rbi/workos/invalid_metadata_error_body.rbi +30 -0
  461. data/rbi/workos/invalid_one_time_code_error_body.rbi +30 -0
  462. data/rbi/workos/invalid_organization_id_error_body.rbi +30 -0
  463. data/rbi/workos/invalid_password_hash_error_body.rbi +30 -0
  464. data/rbi/workos/invalid_pending_authentication_token_error_body.rbi +30 -0
  465. data/rbi/workos/invalid_profile_oauth_error_body.rbi +30 -0
  466. data/rbi/workos/invalid_refresh_token_error_body.rbi +30 -0
  467. data/rbi/workos/invalid_request_oauth_error_body.rbi +30 -0
  468. data/rbi/workos/invalid_request_parameters_error_body.rbi +30 -0
  469. data/rbi/workos/invalid_request_parameters_error_body_with_errors.rbi +36 -0
  470. data/rbi/workos/invalid_role_error_body.rbi +30 -0
  471. data/rbi/workos/invalid_url_error_body.rbi +30 -0
  472. data/rbi/workos/invitation_cannot_be_used_for_email_oauth_error_body.rbi +30 -0
  473. data/rbi/workos/invitation_invalid_oauth_error_body.rbi +30 -0
  474. data/rbi/workos/it_contact_list.rbi +36 -0
  475. data/rbi/workos/it_contact_list_list_metadata.rbi +30 -0
  476. data/rbi/workos/list_metadata.rbi +30 -0
  477. data/rbi/workos/mfa_challenge_error_body.rbi +30 -0
  478. data/rbi/workos/mfa_enrollment_error_body.rbi +30 -0
  479. data/rbi/workos/mfa_enrollment_oauth_error_body.rbi +30 -0
  480. data/rbi/workos/multi_factor_auth.rbi +7 -7
  481. data/rbi/workos/multiple_roles_not_enabled_error_body.rbi +30 -0
  482. data/rbi/workos/must_use_sso_for_selected_organization_message_error_body.rbi +24 -0
  483. data/rbi/workos/oauth_data_integration_vended_credential.rbi +66 -0
  484. data/rbi/workos/oauth_error_body.rbi +30 -0
  485. data/rbi/workos/one_time_code_expired_error_body.rbi +30 -0
  486. data/rbi/workos/one_time_code_previously_used_error_body.rbi +30 -0
  487. data/rbi/workos/one_time_code_too_many_attempts_error_body.rbi +30 -0
  488. data/rbi/workos/organization_api_key_owner.rbi +1 -22
  489. data/rbi/workos/organization_api_key_with_value_owner.rbi +1 -22
  490. data/rbi/workos/organization_authentication_methods_required_oauth_error_body.rbi +30 -0
  491. data/rbi/workos/organization_connected_account.rbi +6 -0
  492. data/rbi/workos/organization_connected_account_import_error_body.rbi +30 -0
  493. data/rbi/workos/organization_domains.rbi +4 -4
  494. data/rbi/workos/organization_membership_not_found_oauth_error_body.rbi +30 -0
  495. data/rbi/workos/organization_membership_service.rbi +8 -8
  496. data/rbi/workos/organization_not_found_oauth_error_body.rbi +30 -0
  497. data/rbi/workos/organization_role_deleted_data.rbi +1 -64
  498. data/rbi/workos/organization_role_updated_data.rbi +1 -64
  499. data/rbi/workos/organization_selection_required_error_body.rbi +30 -0
  500. data/rbi/workos/organization_selection_required_error_body_with_organization.rbi +9 -0
  501. data/rbi/workos/organization_selection_required_error_body_with_organizations.rbi +36 -0
  502. data/rbi/workos/organizations.rbi +13 -13
  503. data/rbi/workos/passkey_progressive_enrollment_error_body.rbi +30 -0
  504. data/rbi/workos/password_and_password_hash_provided_error_body.rbi +30 -0
  505. data/rbi/workos/password_and_password_hash_type_provided_error_body.rbi +30 -0
  506. data/rbi/workos/password_reset_succeeded_data.rbi +1 -46
  507. data/rbi/workos/password_salt_position_requires_password_hash_error_body.rbi +30 -0
  508. data/rbi/workos/password_strength_error_error_body_with_errors.rbi +36 -0
  509. data/rbi/workos/patch_connection_standard_attributes.rbi +1 -46
  510. data/rbi/workos/patch_group_memberships.rbi +30 -0
  511. data/rbi/workos/patch_group_role_assignments.rbi +30 -0
  512. data/rbi/workos/permission.rbi +1 -64
  513. data/rbi/workos/permission_created_data.rbi +1 -64
  514. data/rbi/workos/permission_deleted_data.rbi +1 -64
  515. data/rbi/workos/permission_updated_data.rbi +1 -64
  516. data/rbi/workos/phone_number_required_error_body.rbi +30 -0
  517. data/rbi/workos/pipes.rbi +57 -33
  518. data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +1 -76
  519. data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +1 -76
  520. data/rbi/workos/pipes_provider.rbi +4 -2
  521. data/rbi/workos/pkce_not_supported_oauth_error_body.rbi +30 -0
  522. data/rbi/workos/platform_teams.rbi +2 -2
  523. data/rbi/workos/policy_denied_error_body.rbi +36 -0
  524. data/rbi/workos/radar.rbi +4 -4
  525. data/rbi/workos/radar_challenge_error_body.rbi +30 -0
  526. data/rbi/workos/radar_sign_up_challenge_error_body.rbi +30 -0
  527. data/rbi/workos/radar_sms_sign_in_challenge_error_body.rbi +30 -0
  528. data/rbi/workos/radar_standalone_update_radar_list_request.rbi +1 -16
  529. data/rbi/workos/rate_limit_exceeded_error_body_with_retry_after.rbi +36 -0
  530. data/rbi/workos/remove_role.rbi +1 -34
  531. data/rbi/workos/replace_group_role_assignment_entry.rbi +1 -34
  532. data/rbi/workos/role_deleted_data.rbi +1 -46
  533. data/rbi/workos/role_updated_data.rbi +1 -46
  534. data/rbi/workos/send_email_change.rbi +6 -0
  535. data/rbi/workos/send_verification_email.rbi +24 -0
  536. data/rbi/workos/send_verification_email_response.rbi +1 -16
  537. data/rbi/workos/session_created_data_impersonator.rbi +1 -22
  538. data/rbi/workos/session_revoked_data_impersonator.rbi +1 -22
  539. data/rbi/workos/sign_up_not_allowed_oauth_error_body.rbi +30 -0
  540. data/rbi/workos/slim_role.rbi +1 -16
  541. data/rbi/workos/slow_down_oauth_error_body.rbi +30 -0
  542. data/rbi/workos/sms_challenge_quota_reached_error_body.rbi +30 -0
  543. data/rbi/workos/sms_challenge_rate_limited_error_body.rbi +30 -0
  544. data/rbi/workos/sso.rbi +19 -18
  545. data/rbi/workos/sso_required_oauth_error_body_with_connection_ids_list_email.rbi +48 -0
  546. data/rbi/workos/sso_token_response_oauth_token.rbi +1 -40
  547. data/rbi/workos/sub_resource_scoped_role_not_allowed_error_body_with_role_slug.rbi +36 -0
  548. data/rbi/workos/token_too_big_oauth_error_body.rbi +30 -0
  549. data/rbi/workos/too_many_failed_verification_attempts_error_body_with_retry_after.rbi +36 -0
  550. data/rbi/workos/too_many_requests_oauth_error_body.rbi +30 -0
  551. data/rbi/workos/unauthorized_client_oauth_error_body.rbi +30 -0
  552. data/rbi/workos/unauthorized_error_body.rbi +24 -0
  553. data/rbi/workos/update_audit_logs_retention_with_retention_period.rbi +24 -0
  554. data/rbi/workos/update_audit_logs_retention_with_retention_period_in_days.rbi +24 -0
  555. data/rbi/workos/update_group.rbi +1 -22
  556. data/rbi/workos/update_oauth_application.rbi +6 -0
  557. data/rbi/workos/update_organization_role.rbi +1 -22
  558. data/rbi/workos/update_role.rbi +1 -22
  559. data/rbi/workos/update_user_organization_membership_with_role_slug.rbi +24 -0
  560. data/rbi/workos/update_user_organization_membership_with_role_slugs.rbi +24 -0
  561. data/rbi/workos/user.rbi +1 -94
  562. data/rbi/workos/user_api_key_owner.rbi +1 -28
  563. data/rbi/workos/user_api_key_revoked_data_owner.rbi +1 -28
  564. data/rbi/workos/user_api_key_updated_data_owner.rbi +1 -28
  565. data/rbi/workos/user_api_key_with_value_owner.rbi +1 -28
  566. data/rbi/workos/user_connected_account_import_error_body.rbi +30 -0
  567. data/rbi/workos/user_consent_options_not_supported_error_body.rbi +30 -0
  568. data/rbi/workos/user_creation_error_error_body_with_errors.rbi +36 -0
  569. data/rbi/workos/user_management.rbi +77 -61
  570. data/rbi/workos/user_mismatch_error_body.rbi +30 -0
  571. data/rbi/workos/user_role_assignment_resource.rbi +1 -28
  572. data/rbi/workos/user_role_assignment_source_group.rbi +1 -22
  573. data/rbi/workos/user_sessions_impersonator.rbi +1 -22
  574. data/rbi/workos/vault.rbi +11 -11
  575. data/rbi/workos/verification_id_required_error_body.rbi +30 -0
  576. data/rbi/workos/verify_email_address.rbi +1 -16
  577. data/rbi/workos/verify_email_response.rbi +1 -16
  578. data/rbi/workos/version_list_response.rbi +30 -0
  579. data/rbi/workos/waitlist_list_response.rbi +36 -0
  580. data/rbi/workos/waitlist_list_response_list_metadata.rbi +9 -0
  581. data/rbi/workos/webhooks.rbi +4 -4
  582. data/rbi/workos/widget_session_token_response.rbi +1 -16
  583. data/rbi/workos/widgets.rbi +1 -1
  584. data/test/workos/test_agents_model_round_trip.rb +11 -0
  585. data/test/workos/test_api_keys_model_round_trip.rb +14 -0
  586. data/test/workos/test_authorization.rb +8 -0
  587. data/test/workos/test_authorization_model_round_trip.rb +23 -0
  588. data/test/workos/test_base_client.rb +4 -3
  589. data/test/workos/test_connect_model_round_trip.rb +3 -1
  590. data/test/workos/test_directory_sync.rb +32 -0
  591. data/test/workos/test_directory_sync_model_round_trip.rb +11 -11
  592. data/test/workos/test_feature_flags_model_round_trip.rb +107 -0
  593. data/test/workos/test_groups.rb +8 -0
  594. data/test/workos/test_groups_model_round_trip.rb +11 -0
  595. data/test/workos/test_organizations_model_round_trip.rb +111 -0
  596. data/test/workos/test_pipes.rb +8 -0
  597. data/test/workos/test_pipes_model_round_trip.rb +101 -201
  598. data/test/workos/test_session.rb +46 -1
  599. data/test/workos/test_shared_model_round_trip.rb +2046 -425
  600. data/test/workos/test_sso_model_round_trip.rb +60 -0
  601. data/test/workos/test_user_management_model_round_trip.rb +315 -12
  602. data/test/workos/test_vault_model_round_trip.rb +30 -0
  603. metadata +380 -26
  604. data/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb +0 -37
  605. data/lib/workos/pipes/connected_account_write_response.rb +0 -73
  606. data/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb +0 -37
  607. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb +0 -43
  608. data/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb +0 -40
  609. data/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb +0 -40
  610. data/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb +0 -46
  611. data/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +0 -13
  612. data/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb +0 -9
  613. data/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb +0 -9
  614. data/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +0 -9
  615. data/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb +0 -9
  616. data/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb +0 -9
  617. data/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi +0 -60
  618. data/rbi/workos/connected_account_write_response.rbi +0 -132
  619. data/rbi/workos/data_integrations_upsert_api_key_request_2.rbi +0 -60
  620. data/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi +0 -72
  621. data/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi +0 -66
  622. data/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi +0 -66
  623. data/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi +0 -78
data/lib/workos/pipes.rb CHANGED
@@ -108,6 +108,35 @@ module WorkOS
108
108
  result
109
109
  end
110
110
 
111
+ # Finish connection
112
+ # @param connect_code [String] The `connect_code` WorkOS added to `return_to` when the user finished authorizing. It can be used once and expires 90 seconds after the redirect.
113
+ # @param code_verifier [String] The code verifier `code_challenge` was derived from: 43 to 128 characters from `A-Z`, `a-z`, `0-9`, `-`, `.`, `_` and `~`. A wrong verifier uses up the `connect_code`, and the user has to connect again.
114
+ # @param state [String, nil] The `state` WorkOS added to `return_to` alongside `connect_code`. Optional; it is only used to correlate the request in logs.
115
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
116
+ # @return [WorkOS::DataIntegrationFinishConnectionResponse]
117
+ def finish_connection(
118
+ connect_code:,
119
+ code_verifier:,
120
+ state: nil,
121
+ request_options: {}
122
+ )
123
+ body = {
124
+ "connect_code" => connect_code,
125
+ "code_verifier" => code_verifier,
126
+ "state" => state
127
+ }.compact
128
+ response = @client.request(
129
+ method: :post,
130
+ path: "/data-integrations/finish",
131
+ auth: true,
132
+ body: body,
133
+ request_options: request_options
134
+ )
135
+ result = WorkOS::DataIntegrationFinishConnectionResponse.new(response.body)
136
+ 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"])
137
+ result
138
+ end
139
+
111
140
  # Get a data integration
112
141
  # @param slug [String] The slug identifier of the data integration.
113
142
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -192,9 +221,9 @@ module WorkOS
192
221
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
193
222
  # @param connection_owner [WorkOS::Types::DataIntegrationsCreateApiKeyConnectionRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
194
223
  # @param secret [String] The API key secret to store for this integration.
195
- # @param connection_intent [String] Must be `add`: this endpoint only creates another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`.
224
+ # @param connection_intent [String] Must be `add`: this endpoint only creates another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard.
196
225
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
197
- # @return [WorkOS::ConnectedAccountWriteResponse]
226
+ # @return [WorkOS::ConnectedAccount]
198
227
  def create_data_integration_api_key(
199
228
  slug:,
200
229
  user_id:,
@@ -222,7 +251,7 @@ module WorkOS
222
251
  body: body,
223
252
  request_options: request_options
224
253
  )
225
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
254
+ result = WorkOS::ConnectedAccount.new(response.body)
226
255
  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"])
227
256
  result
228
257
  end
@@ -235,10 +264,10 @@ module WorkOS
235
264
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
236
265
  # @param connection_owner [WorkOS::Types::DataIntegrationsUpsertApiKeyRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
237
266
  # @param secret [String] The API key secret to store for this integration.
238
- # @param connection_intent [String, nil] Reauthorize exactly the connection named by `connected_account_id`.
239
- # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`.
267
+ # @param connection_intent [String, nil] Send `reauthorize` with `connected_account_id` to reauthorize one exact connection. Omit it to use the compatibility connection; creating another connection lives on the POST route.
268
+ # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`; it may also be sent on its own to reauthorize that connection.
240
269
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
241
- # @return [WorkOS::ConnectedAccountWriteResponse]
270
+ # @return [WorkOS::ConnectedAccount]
242
271
  def update_data_integration_api_key(
243
272
  slug:,
244
273
  user_id:,
@@ -268,7 +297,7 @@ module WorkOS
268
297
  body: body,
269
298
  request_options: request_options
270
299
  )
271
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
300
+ result = WorkOS::ConnectedAccount.new(response.body)
272
301
  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
302
  result
274
303
  end
@@ -279,10 +308,12 @@ module WorkOS
279
308
  # @param user_id [String] The ID of the user to authorize. When `connection_owner` is `organization`, this is the user authorizing on behalf of the organization; they must be an active member of the organization and do not become the owner of the resulting connected account.
280
309
  # @param organization_id [String, nil] An organization ID to scope the authorization to a specific organization. Required when `connection_owner` is `organization`.
281
310
  # @param connection_owner [WorkOS::Types::DataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwner, nil] Who will own the connected account. `user` (the default) connects the user's own account. `organization` connects the organization's shared account and requires `organization_id`.
282
- # @param return_to [String, nil] The URL to redirect the user to after authorization.
311
+ # @param return_to [String, nil] The URL to redirect the user to after authorization. Required with `code_challenge`, and must then exactly match a redirect URI registered on one of the environment's applications. Loopback URLs match on any port; wildcard redirect URIs are not honored, and a `return_to` with a query string or fragment never matches.
312
+ # @param code_challenge [String, nil] A PKCE-style code challenge: the base64url-encoded SHA-256 of a `code_verifier` your app keeps. When set, the connection isn't saved when the user finishes authorizing. Instead, the user is redirected to `return_to` with a `connect_code` and `state`, and your app must call [Finish connection](https://workos.com/docs/reference/pipes/connected-account/finish-connection) with the `connect_code` and `code_verifier` within 90 seconds to save it.
313
+ # @param code_challenge_method [String, nil] The method used to derive `code_challenge`. Only `S256` is supported, and it is the default. Requires `code_challenge`.
283
314
  # @param config [Hash{String => String}, nil] Connect-time config values for the provider-declared `installation`-scope fields (e.g. a Zendesk `subdomain`), keyed by the config field. Only fields the provider declares may be supplied, and required fields must be provided unless already pinned on the integration.
284
- # @param connection_intent [String, nil] Create another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`. Omit `connection_intent` to use the compatibility connection, or send `reauthorize` with `connected_account_id` to reauthorize one exact connection.
285
- # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`.
315
+ # @param connection_intent [WorkOS::Types::DataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionIntent, nil] Which connection the request targets. Omit it to use the compatibility connection. Send `add` to create another connection: the first connection for an owner shape fills the compatibility slot, and later connections are standard. Send `reauthorize` with `connected_account_id` to reauthorize one exact connection.
316
+ # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize` and not accepted otherwise.
286
317
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
287
318
  # @return [WorkOS::DataIntegrationAuthorizeUrlResponse]
288
319
  def authorize_data_integration(
@@ -292,6 +323,8 @@ module WorkOS
292
323
  organization_id: nil,
293
324
  connection_owner: nil,
294
325
  return_to: nil,
326
+ code_challenge: nil,
327
+ code_challenge_method: nil,
295
328
  config: nil,
296
329
  connection_intent: nil,
297
330
  connected_account_id: nil,
@@ -302,6 +335,8 @@ module WorkOS
302
335
  "organization_id" => organization_id,
303
336
  "connection_owner" => connection_owner,
304
337
  "return_to" => return_to,
338
+ "code_challenge" => code_challenge,
339
+ "code_challenge_method" => code_challenge_method,
305
340
  "config" => config,
306
341
  "connection_intent" => connection_intent,
307
342
  "connected_account_id" => connected_account_id
@@ -329,9 +364,9 @@ module WorkOS
329
364
  # @param client_id [String] The OAuth client ID to store for this integration.
330
365
  # @param client_secret [String] The OAuth client secret to store for this integration.
331
366
  # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
332
- # @param connection_intent [String] Must be `add`: this endpoint only creates another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration and otherwise returns 404 `multiple_connections_unavailable`.
367
+ # @param connection_intent [String] Must be `add`: this endpoint only creates another connection. The first connection for an owner shape fills the compatibility slot; later connections are standard.
333
368
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
334
- # @return [WorkOS::ConnectedAccountWriteResponse]
369
+ # @return [WorkOS::ConnectedAccount]
335
370
  def create_data_integration_client_credential(
336
371
  slug:,
337
372
  user_id:,
@@ -363,7 +398,7 @@ module WorkOS
363
398
  body: body,
364
399
  request_options: request_options
365
400
  )
366
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
401
+ result = WorkOS::ConnectedAccount.new(response.body)
367
402
  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"])
368
403
  result
369
404
  end
@@ -378,10 +413,10 @@ module WorkOS
378
413
  # @param client_id [String] The OAuth client ID to store for this integration.
379
414
  # @param client_secret [String] The OAuth client secret to store for this integration.
380
415
  # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
381
- # @param connection_intent [String, nil] Reauthorize exactly the connection named by `connected_account_id`.
382
- # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`.
416
+ # @param connection_intent [String, nil] Send `reauthorize` with `connected_account_id` to reauthorize one exact connection. Omit it to use the compatibility connection; creating another connection lives on the POST route.
417
+ # @param connected_account_id [String, nil] The exact connected account to reauthorize. Required with `connection_intent: reauthorize`; it may also be sent on its own to reauthorize that connection.
383
418
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
384
- # @return [WorkOS::ConnectedAccountWriteResponse]
419
+ # @return [WorkOS::ConnectedAccount]
385
420
  def update_data_integration_client_credentials(
386
421
  slug:,
387
422
  user_id:,
@@ -415,7 +450,7 @@ module WorkOS
415
450
  body: body,
416
451
  request_options: request_options
417
452
  )
418
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
453
+ result = WorkOS::ConnectedAccount.new(response.body)
419
454
  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"])
420
455
  result
421
456
  end
@@ -605,36 +640,42 @@ module WorkOS
605
640
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
606
641
  # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier.
607
642
  # @param account_identifier [String, nil] A developer-attested account identifier; null clears it.
643
+ # @param config [Hash{String => String}, nil] Installation-scoped provider configuration for this connection, such as Salesforce salesforce_host. Imports apply supplied values over installation-scoped integration pins and inherit other config from the credential source. Credential-bearing imports must satisfy required configuration even when config is omitted or {}. On update, a supplied object replaces installation-scoped values; omitted config preserves the stored snapshot. Stored integration-scoped values remain bound to the OAuth client and cannot be overridden or replaced with current integration pins. Replacements must satisfy required configuration; {} and empty-string values clear installation-scoped values only when the result is valid. Provider defaults count toward completeness but are resolved at read time, not stored. Only tokenless needs_reauthorization placeholders may remain incomplete; attaching their first tokens validates configuration even when config is omitted. Unrelated updates do not revalidate unchanged configuration. Clearing salesforce_host falls back to login.salesforce.com, which may not work for sandbox or My Domain-only connections.
608
644
  # @param access_token [String, nil] The OAuth access token for the connected account.
609
645
  # @param refresh_token [String, nil] The OAuth refresh token for the connected account.
610
646
  # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
611
647
  # @param scopes [Array<String>, nil] The OAuth scopes granted for this connection.
612
648
  # @param state [WorkOS::Types::CreateOrganizationConnectedAccountState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
613
649
  # @param user_id [String] The [User](https://workos.com/docs/reference/authkit/user) identifier of the organization member on whose behalf the connected account is being imported or updated. The user must be an active member of the organization.
614
- # @param connection_intent [String, nil] Set to `add` to create another connected account. Omit this field for permanent compatibility behavior. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration, which creates the compatibility connection, and otherwise returns 404 `multiple_connections_unavailable`.
650
+ # @param metadata [Hash{String => Object}, nil] Provider token-response metadata to preserve during import, such as Salesforce instance_url. Only allowlisted, non-sensitive scalar fields from this provider are accepted, including nested fields. Provider refresh responses can update these values. Not accepted on update.
651
+ # @param connection_intent [String, nil] Set to `add` to create another connected account. Omit this field for permanent compatibility behavior.
615
652
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
616
- # @return [WorkOS::ConnectedAccountWriteResponse]
653
+ # @return [WorkOS::ConnectedAccount]
617
654
  def create_organization_connected_account(
618
655
  organization_id:,
619
656
  slug:,
620
657
  user_id:,
621
658
  account_display_name: WorkOS::OMIT,
622
659
  account_identifier: WorkOS::OMIT,
660
+ config: nil,
623
661
  access_token: nil,
624
662
  refresh_token: nil,
625
663
  expires_at: nil,
626
664
  scopes: nil,
627
665
  state: nil,
666
+ metadata: nil,
628
667
  connection_intent: nil,
629
668
  request_options: {}
630
669
  )
631
670
  body = {
671
+ "config" => config,
632
672
  "access_token" => access_token,
633
673
  "refresh_token" => refresh_token,
634
674
  "expires_at" => expires_at,
635
675
  "scopes" => scopes,
636
676
  "state" => state,
637
677
  "user_id" => user_id,
678
+ "metadata" => metadata,
638
679
  "connection_intent" => connection_intent
639
680
  }.compact
640
681
  body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT)
@@ -646,7 +687,7 @@ module WorkOS
646
687
  body: body,
647
688
  request_options: request_options
648
689
  )
649
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
690
+ result = WorkOS::ConnectedAccount.new(response.body)
650
691
  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"])
651
692
  result
652
693
  end
@@ -656,6 +697,7 @@ module WorkOS
656
697
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
657
698
  # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier.
658
699
  # @param account_identifier [String, nil] A developer-attested account identifier; null clears it.
700
+ # @param config [Hash{String => String}, nil] Installation-scoped provider configuration for this connection, such as Salesforce salesforce_host. Imports apply supplied values over installation-scoped integration pins and inherit other config from the credential source. Credential-bearing imports must satisfy required configuration even when config is omitted or {}. On update, a supplied object replaces installation-scoped values; omitted config preserves the stored snapshot. Stored integration-scoped values remain bound to the OAuth client and cannot be overridden or replaced with current integration pins. Replacements must satisfy required configuration; {} and empty-string values clear installation-scoped values only when the result is valid. Provider defaults count toward completeness but are resolved at read time, not stored. Only tokenless needs_reauthorization placeholders may remain incomplete; attaching their first tokens validates configuration even when config is omitted. Unrelated updates do not revalidate unchanged configuration. Clearing salesforce_host falls back to login.salesforce.com, which may not work for sandbox or My Domain-only connections.
659
701
  # @param access_token [String, nil] The OAuth access token for the connected account.
660
702
  # @param refresh_token [String, nil] The OAuth refresh token for the connected account.
661
703
  # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
@@ -666,13 +708,14 @@ module WorkOS
666
708
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
667
709
  # @param connection_intent [String, nil] Set to `reauthorize` with `connected_account_id` to update one exact connection. The intent may be omitted when supplying an ID. Omit both for permanent compatibility behavior.
668
710
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
669
- # @return [WorkOS::ConnectedAccountWriteResponse]
711
+ # @return [WorkOS::ConnectedAccount]
670
712
  def update_organization_connected_account(
671
713
  organization_id:,
672
714
  slug:,
673
715
  user_id:,
674
716
  account_display_name: WorkOS::OMIT,
675
717
  account_identifier: WorkOS::OMIT,
718
+ config: nil,
676
719
  access_token: nil,
677
720
  refresh_token: nil,
678
721
  expires_at: nil,
@@ -689,6 +732,7 @@ module WorkOS
689
732
  "connection_intent" => connection_intent
690
733
  }.compact
691
734
  body = {
735
+ "config" => config,
692
736
  "access_token" => access_token,
693
737
  "refresh_token" => refresh_token,
694
738
  "expires_at" => expires_at,
@@ -706,7 +750,7 @@ module WorkOS
706
750
  body: body,
707
751
  request_options: request_options
708
752
  )
709
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
753
+ result = WorkOS::ConnectedAccount.new(response.body)
710
754
  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"])
711
755
  result
712
756
  end
@@ -802,25 +846,29 @@ module WorkOS
802
846
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
803
847
  # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier.
804
848
  # @param account_identifier [String, nil] A developer-attested account identifier; null clears it.
849
+ # @param config [Hash{String => String}, nil] Installation-scoped provider configuration for this connection, such as Salesforce salesforce_host. Imports apply supplied values over installation-scoped integration pins and inherit other config from the credential source. Credential-bearing imports must satisfy required configuration even when config is omitted or {}. On update, a supplied object replaces installation-scoped values; omitted config preserves the stored snapshot. Stored integration-scoped values remain bound to the OAuth client and cannot be overridden or replaced with current integration pins. Replacements must satisfy required configuration; {} and empty-string values clear installation-scoped values only when the result is valid. Provider defaults count toward completeness but are resolved at read time, not stored. Only tokenless needs_reauthorization placeholders may remain incomplete; attaching their first tokens validates configuration even when config is omitted. Unrelated updates do not revalidate unchanged configuration. Clearing salesforce_host falls back to login.salesforce.com, which may not work for sandbox or My Domain-only connections.
805
850
  # @param access_token [String, nil] The OAuth access token for the connected account.
806
851
  # @param refresh_token [String, nil] The OAuth refresh token for the connected account.
807
852
  # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
808
853
  # @param scopes [Array<String>, nil] The OAuth scopes granted for this connection.
809
854
  # @param state [WorkOS::Types::CreateConnectedAccountState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
810
- # @param connection_intent [String, nil] Set to `add` to create another connected account. Omit this field for permanent compatibility behavior. Creating an additional connection is not yet available: until it is, `add` succeeds only when the owner has no connection for this integration, which creates the compatibility connection, and otherwise returns 404 `multiple_connections_unavailable`.
855
+ # @param metadata [Hash{String => Object}, nil] Provider token-response metadata to preserve during import, such as Salesforce instance_url. Only allowlisted, non-sensitive scalar fields from this provider are accepted, including nested fields. Provider refresh responses can update these values. Not accepted on update.
856
+ # @param connection_intent [String, nil] Set to `add` to create another connected account. Omit this field for permanent compatibility behavior.
811
857
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
812
858
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
813
- # @return [WorkOS::ConnectedAccountWriteResponse]
859
+ # @return [WorkOS::ConnectedAccount]
814
860
  def create_user_connected_account(
815
861
  user_id:,
816
862
  slug:,
817
863
  account_display_name: WorkOS::OMIT,
818
864
  account_identifier: WorkOS::OMIT,
865
+ config: nil,
819
866
  access_token: nil,
820
867
  refresh_token: nil,
821
868
  expires_at: nil,
822
869
  scopes: nil,
823
870
  state: nil,
871
+ metadata: nil,
824
872
  connection_intent: nil,
825
873
  organization_id: nil,
826
874
  request_options: {}
@@ -829,11 +877,13 @@ module WorkOS
829
877
  "organization_id" => organization_id
830
878
  }.compact
831
879
  body = {
880
+ "config" => config,
832
881
  "access_token" => access_token,
833
882
  "refresh_token" => refresh_token,
834
883
  "expires_at" => expires_at,
835
884
  "scopes" => scopes,
836
885
  "state" => state,
886
+ "metadata" => metadata,
837
887
  "connection_intent" => connection_intent
838
888
  }.compact
839
889
  body["account_display_name"] = account_display_name unless account_display_name.equal?(WorkOS::OMIT)
@@ -846,7 +896,7 @@ module WorkOS
846
896
  body: body,
847
897
  request_options: request_options
848
898
  )
849
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
899
+ result = WorkOS::ConnectedAccount.new(response.body)
850
900
  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"])
851
901
  result
852
902
  end
@@ -856,6 +906,7 @@ module WorkOS
856
906
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
857
907
  # @param account_display_name [String, nil] A mutable, non-unique connection label; null clears it. Not an account identifier.
858
908
  # @param account_identifier [String, nil] A developer-attested account identifier; null clears it.
909
+ # @param config [Hash{String => String}, nil] Installation-scoped provider configuration for this connection, such as Salesforce salesforce_host. Imports apply supplied values over installation-scoped integration pins and inherit other config from the credential source. Credential-bearing imports must satisfy required configuration even when config is omitted or {}. On update, a supplied object replaces installation-scoped values; omitted config preserves the stored snapshot. Stored integration-scoped values remain bound to the OAuth client and cannot be overridden or replaced with current integration pins. Replacements must satisfy required configuration; {} and empty-string values clear installation-scoped values only when the result is valid. Provider defaults count toward completeness but are resolved at read time, not stored. Only tokenless needs_reauthorization placeholders may remain incomplete; attaching their first tokens validates configuration even when config is omitted. Unrelated updates do not revalidate unchanged configuration. Clearing salesforce_host falls back to login.salesforce.com, which may not work for sandbox or My Domain-only connections.
859
910
  # @param access_token [String, nil] The OAuth access token for the connected account.
860
911
  # @param refresh_token [String, nil] The OAuth refresh token for the connected account.
861
912
  # @param expires_at [String, nil] The ISO-8601 timestamp when the access token expires. Required when `access_token` is provided for tokens that expire.
@@ -866,12 +917,13 @@ module WorkOS
866
917
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
867
918
  # @param connection_intent [String, nil] Set to `reauthorize` with `connected_account_id` to update one exact connection. The intent may be omitted when supplying an ID. Omit both for permanent compatibility behavior.
868
919
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
869
- # @return [WorkOS::ConnectedAccountWriteResponse]
920
+ # @return [WorkOS::ConnectedAccount]
870
921
  def update_user_connected_account(
871
922
  user_id:,
872
923
  slug:,
873
924
  account_display_name: WorkOS::OMIT,
874
925
  account_identifier: WorkOS::OMIT,
926
+ config: nil,
875
927
  access_token: nil,
876
928
  refresh_token: nil,
877
929
  expires_at: nil,
@@ -890,6 +942,7 @@ module WorkOS
890
942
  "connection_intent" => connection_intent
891
943
  }.compact
892
944
  body = {
945
+ "config" => config,
893
946
  "access_token" => access_token,
894
947
  "refresh_token" => refresh_token,
895
948
  "expires_at" => expires_at,
@@ -906,7 +959,7 @@ module WorkOS
906
959
  body: body,
907
960
  request_options: request_options
908
961
  )
909
- result = WorkOS::ConnectedAccountWriteResponse.new(response.body)
962
+ result = WorkOS::ConnectedAccount.new(response.body)
910
963
  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"])
911
964
  result
912
965
  end
@@ -12,16 +12,22 @@ module WorkOS
12
12
 
13
13
  # List providers for an organization
14
14
  # @param organization_id [String] An [Organization](https://workos.com/docs/reference/organization) identifier to list provider configurations for.
15
+ # @param ownership [WorkOS::Types::PipesProviderOwnership, nil] Select the provider configuration for `user` connections or `organization` shared connections. Defaults to `user`; never falls back to the other ownership.
15
16
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
16
17
  # @return [WorkOS::DataIntegrationConfigurationListResponse]
17
18
  def list_organization_data_integration_configurations(
18
19
  organization_id:,
20
+ ownership: "user",
19
21
  request_options: {}
20
22
  )
23
+ params = {
24
+ "ownership" => ownership
25
+ }.compact
21
26
  response = @client.request(
22
27
  method: :get,
23
28
  path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/data_integration_configurations",
24
29
  auth: true,
30
+ params: params,
25
31
  request_options: request_options
26
32
  )
27
33
  result = WorkOS::DataIntegrationConfigurationListResponse.new(response.body)
@@ -37,6 +43,7 @@ module WorkOS
37
43
  # @param client_id [String, nil] The OAuth client ID of the organization's own application. Must be provided together with `client_secret`, and only for providers whose credentials are supplied by the organization.
38
44
  # @param client_secret [String, nil] The OAuth client secret of the organization's own application. Must be provided together with `client_id`.
39
45
  # @param config [Hash{String => String}, nil] Provider-specific config values to set for the organization, keyed by config field. Only fields the provider declares are accepted, and each value must match that field's pattern. Accepted only for providers whose credentials are organization-managed; for shared or custom credential providers, config belongs on the integration itself (via the data-integrations API) and supplying it here is rejected.
46
+ # @param ownership [WorkOS::Types::PipesProviderOwnership, nil] Select the provider configuration for `user` connections or `organization` shared connections. Defaults to `user`; never falls back to the other ownership.
40
47
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
41
48
  # @return [WorkOS::DataIntegrationConfigurationResponse]
42
49
  def update_organization_data_integration_configuration(
@@ -47,8 +54,12 @@ module WorkOS
47
54
  client_id: nil,
48
55
  client_secret: nil,
49
56
  config: nil,
57
+ ownership: "user",
50
58
  request_options: {}
51
59
  )
60
+ params = {
61
+ "ownership" => ownership
62
+ }.compact
52
63
  body = {
53
64
  "enabled" => enabled,
54
65
  "client_id" => client_id,
@@ -60,6 +71,7 @@ module WorkOS
60
71
  method: :put,
61
72
  path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/data_integration_configurations/#{WorkOS::Util.encode_path(slug)}",
62
73
  auth: true,
74
+ params: params,
63
75
  body: body,
64
76
  request_options: request_options
65
77
  )
@@ -64,6 +64,7 @@ module WorkOS
64
64
  rescue JWT::DecodeError
65
65
  return SessionManager::AuthError.new(authenticated: false, reason: SessionManager::INVALID_JWT)
66
66
  end
67
+ return SessionManager::AuthError.new(authenticated: false, reason: SessionManager::INVALID_JWT) unless user_access_token?(decoded)
67
68
 
68
69
  is_expired = decoded["exp"].nil? || decoded["exp"] < Time.now.to_i
69
70
 
@@ -163,5 +164,16 @@ module WorkOS
163
164
  uri.query = URI.encode_www_form(params)
164
165
  uri.to_s
165
166
  end
167
+
168
+ private
169
+
170
+ # Other token types signed by the same environment key (agent and widget
171
+ # tokens) must not authenticate a session cookie.
172
+ def user_access_token?(claims)
173
+ claims["sid"].is_a?(String) &&
174
+ claims["auth_time"].is_a?(Numeric) &&
175
+ [nil, "user"].include?(claims["sub_profile"]) &&
176
+ claims["sub_type"].nil?
177
+ end
166
178
  end
167
179
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AccessDeniedOAuthErrorBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ error: :error,
9
+ error_description: :error_description
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :error,
14
+ :error_description
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @error = hash[:error]
19
+ @error_description = hash[:error_description]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ AccountSelectionRequiredErrorBody = AccountSelectionRequiredError
7
+ end
@@ -8,6 +8,7 @@ module WorkOS
8
8
  object: :object,
9
9
  id: :id,
10
10
  agent_registration_id: :agent_registration_id,
11
+ organization_id: :organization_id,
11
12
  completed_by_attempt_id: :completed_by_attempt_id,
12
13
  claimed_by: :claimed_by,
13
14
  completed_at: :completed_at,
@@ -19,6 +20,7 @@ module WorkOS
19
20
  :object,
20
21
  :id,
21
22
  :agent_registration_id,
23
+ :organization_id,
22
24
  :completed_by_attempt_id,
23
25
  :claimed_by,
24
26
  :completed_at,
@@ -30,6 +32,7 @@ module WorkOS
30
32
  @object = hash[:object]
31
33
  @id = hash[:id]
32
34
  @agent_registration_id = hash[:agent_registration_id]
35
+ @organization_id = hash[:organization_id]
33
36
  @completed_by_attempt_id = hash[:completed_by_attempt_id]
34
37
  @claimed_by = hash[:claimed_by] ? WorkOS::AgentRegistrationClaimCompletedDataClaimedBy.new(hash[:claimed_by]) : nil
35
38
  @completed_at = hash[:completed_at]
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AlreadyClaimedErrorBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ code: :code,
9
+ message: :message
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :code,
14
+ :message
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @code = hash[:code]
19
+ @message = hash[:message]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class ApplicationConsentRequiredErrorBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ code: :code,
9
+ message: :message
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :code,
14
+ :message
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @code = hash[:code]
19
+ @message = hash[:message]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ AuthMethodMismatchErrorBody = AuthMethodMismatchError
7
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AuthorizationPendingOAuthErrorBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ error: :error,
9
+ error_description: :error_description
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :error,
14
+ :error_description
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @error = hash[:error]
19
+ @error_description = hash[:error_description]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AuthorizationUrlNotFoundErrorBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ code: :code,
9
+ message: :message
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :code,
14
+ :message
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @code = hash[:code]
19
+ @message = hash[:message]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AuthorizationUrlRequestErrorBody < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ code: :code,
9
+ message: :message
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :code,
14
+ :message
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @code = hash[:code]
19
+ @message = hash[:message]
20
+ end
21
+ end
22
+ end