workos 8.0.1 → 9.1.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 (389) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -2
  3. data/.github/workflows/docs.yml +2 -2
  4. data/.github/workflows/lint.yml +2 -2
  5. data/.github/workflows/release-please.yml +199 -4
  6. data/.github/workflows/release.yml +2 -2
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +154 -43
  9. data/.release-please-manifest.json +1 -1
  10. data/.ruby-version +1 -1
  11. data/CHANGELOG.md +92 -0
  12. data/Gemfile.lock +6 -6
  13. data/lib/workos/api_keys/api_key.rb +3 -0
  14. data/lib/workos/api_keys/api_key_created.rb +5 -5
  15. data/lib/workos/api_keys/api_key_created_data.rb +3 -0
  16. data/lib/workos/api_keys/api_key_revoked.rb +5 -5
  17. data/lib/workos/{audit_logs/audit_log_export_json.rb → api_keys/api_key_updated.rb} +10 -10
  18. data/lib/workos/api_keys/api_key_updated_data.rb +49 -0
  19. data/lib/workos/{directory_sync/dsync_deactivated_data_domain.rb → api_keys/api_key_updated_data_owner.rb} +1 -1
  20. data/lib/workos/api_keys/api_key_updated_data_previous_attribute.rb +18 -0
  21. data/lib/workos/api_keys/create_organization_api_key.rb +5 -2
  22. data/lib/workos/api_keys/expire_api_key.rb +18 -0
  23. data/lib/workos/api_keys/organization_api_key.rb +3 -0
  24. data/lib/workos/api_keys/organization_api_key_with_value.rb +3 -0
  25. data/lib/workos/api_keys.rb +29 -1
  26. data/lib/workos/audit_logs/audit_log_action.rb +2 -7
  27. data/lib/workos/audit_logs/audit_log_export.rb +2 -7
  28. data/lib/workos/audit_logs/audit_log_schema.rb +11 -2
  29. data/lib/workos/{types/radar_type.rb → audit_logs/audit_log_schema_actor_input.rb} +1 -3
  30. data/lib/workos/audit_logs/audit_log_schema_input.rb +25 -0
  31. data/lib/workos/audit_logs/audit_log_schema_target.rb +16 -1
  32. data/lib/workos/audit_logs/audit_log_schema_target_input.rb +7 -0
  33. data/lib/workos/audit_logs.rb +16 -16
  34. data/lib/workos/authorization/permission_created.rb +5 -5
  35. data/lib/workos/authorization/permission_deleted.rb +5 -5
  36. data/lib/workos/authorization/permission_updated.rb +5 -5
  37. data/lib/workos/authorization/role_created.rb +5 -5
  38. data/lib/workos/authorization/role_deleted.rb +5 -5
  39. data/lib/workos/authorization/role_updated.rb +5 -5
  40. data/lib/workos/authorization.rb +38 -22
  41. data/lib/workos/base_client.rb +19 -2
  42. data/lib/workos/client.rb +6 -6
  43. data/lib/workos/connect/connect_application.rb +12 -0
  44. data/lib/workos/{audit_logs/audit_log_schema_json_target.rb → connect/connect_application_redirect_uri.rb} +7 -7
  45. data/lib/workos/connect/user_object.rb +3 -0
  46. data/lib/workos/connect.rb +1 -1
  47. data/lib/workos/directory_sync/dsync_activated.rb +5 -5
  48. data/lib/workos/directory_sync/dsync_deleted.rb +5 -5
  49. data/lib/workos/directory_sync/dsync_group_created.rb +5 -5
  50. data/lib/workos/directory_sync/dsync_group_deleted.rb +5 -5
  51. data/lib/workos/directory_sync/dsync_group_updated.rb +5 -5
  52. data/lib/workos/directory_sync/dsync_group_user_added.rb +5 -5
  53. data/lib/workos/directory_sync/dsync_group_user_removed.rb +5 -5
  54. data/lib/workos/directory_sync/dsync_token_created.rb +34 -0
  55. data/lib/workos/directory_sync/dsync_token_created_data.rb +34 -0
  56. data/lib/workos/directory_sync/dsync_token_revoked.rb +34 -0
  57. data/lib/workos/{audit_logs/audit_log_schema_json_actor.rb → directory_sync/dsync_token_revoked_data.rb} +1 -1
  58. data/lib/workos/directory_sync/dsync_user_created.rb +5 -5
  59. data/lib/workos/directory_sync/dsync_user_deleted.rb +5 -5
  60. data/lib/workos/directory_sync/dsync_user_updated.rb +5 -5
  61. data/lib/workos/directory_sync.rb +2 -2
  62. data/lib/workos/events.rb +1 -1
  63. data/lib/workos/feature_flags/flag_created.rb +5 -5
  64. data/lib/workos/feature_flags/flag_deleted.rb +5 -5
  65. data/lib/workos/feature_flags/flag_rule_updated.rb +5 -5
  66. data/lib/workos/feature_flags/flag_rule_updated_context_configured_target_organization.rb +1 -16
  67. data/lib/workos/feature_flags/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rb +1 -1
  68. data/lib/workos/feature_flags/flag_updated.rb +5 -5
  69. data/lib/workos/groups.rb +2 -2
  70. data/lib/workos/inflections.rb +3 -1
  71. data/lib/workos/organization_domains/organization_domain_created.rb +5 -5
  72. data/lib/workos/organization_domains/organization_domain_deleted.rb +5 -5
  73. data/lib/workos/organization_domains/organization_domain_updated.rb +5 -5
  74. data/lib/workos/organization_domains/organization_domain_verification_failed.rb +5 -5
  75. data/lib/workos/organization_domains/organization_domain_verified.rb +5 -5
  76. data/lib/workos/organization_membership_service.rb +273 -0
  77. data/lib/workos/organizations/audit_logs_retention.rb +2 -7
  78. data/lib/workos/organizations/organization_created.rb +5 -5
  79. data/lib/workos/organizations/organization_deleted.rb +5 -5
  80. data/lib/workos/organizations/organization_membership_created.rb +5 -5
  81. data/lib/workos/organizations/organization_membership_deleted.rb +5 -5
  82. data/lib/workos/organizations/organization_membership_updated.rb +5 -5
  83. data/lib/workos/organizations/organization_role_created.rb +5 -5
  84. data/lib/workos/organizations/organization_role_deleted.rb +5 -5
  85. data/lib/workos/organizations/organization_role_updated.rb +5 -5
  86. data/lib/workos/organizations/organization_updated.rb +5 -5
  87. data/lib/workos/organizations.rb +1 -1
  88. data/lib/workos/radar/radar_standalone_assess_request.rb +2 -8
  89. data/lib/workos/radar.rb +6 -12
  90. data/lib/workos/shared/connect_application_m2m.rb +46 -0
  91. data/lib/workos/shared/connect_application_oauth.rb +58 -0
  92. data/lib/workos/shared/connect_application_oauth_redirect_uris.rb +22 -0
  93. data/lib/workos/shared/error_response.rb +18 -0
  94. data/lib/workos/shared/group_created.rb +5 -5
  95. data/lib/workos/shared/group_deleted.rb +5 -5
  96. data/lib/workos/shared/group_member_added.rb +5 -5
  97. data/lib/workos/shared/group_member_removed.rb +5 -5
  98. data/lib/workos/shared/group_updated.rb +5 -5
  99. data/lib/workos/{directory_sync/dsync_deactivated_data.rb → shared/pipe_connected_account.rb} +15 -15
  100. data/lib/workos/{directory_sync/dsync_deactivated.rb → shared/pipes_connected_account_connected.rb} +7 -7
  101. data/lib/workos/shared/pipes_connected_account_disconnected.rb +34 -0
  102. data/lib/workos/shared/pipes_connected_account_reauthorization_needed.rb +34 -0
  103. data/lib/workos/shared/waitlist_user_approved.rb +5 -5
  104. data/lib/workos/shared/waitlist_user_created.rb +5 -5
  105. data/lib/workos/shared/waitlist_user_denied.rb +5 -5
  106. data/lib/workos/sso/connection_activated.rb +5 -5
  107. data/lib/workos/sso/connection_deactivated.rb +5 -5
  108. data/lib/workos/sso/connection_deleted.rb +5 -5
  109. data/lib/workos/sso/connection_saml_certificate_renewal_required.rb +5 -5
  110. data/lib/workos/sso/connection_saml_certificate_renewed.rb +5 -5
  111. data/lib/workos/types/audit_log_configuration_log_stream_type.rb +2 -1
  112. data/lib/workos/types/create_webhook_endpoint_events.rb +5 -1
  113. data/lib/workos/types/pipe_connected_account_state.rb +13 -0
  114. data/lib/workos/types/{radar_action.rb → radar_list_action.rb} +1 -1
  115. data/lib/workos/types/radar_list_type.rb +18 -0
  116. data/lib/workos/types/radar_standalone_assess_request_action.rb +1 -7
  117. data/lib/workos/types/radar_standalone_response_blocklist_type.rb +1 -10
  118. data/lib/workos/types/radar_standalone_response_control.rb +1 -4
  119. data/lib/workos/types/user_management_authentication_screen_hint.rb +1 -5
  120. data/{rbi/workos/types/request_options.rbi → lib/workos/types/vault_order.rb} +4 -3
  121. data/lib/workos/types/webhook_endpoint_status.rb +1 -5
  122. data/lib/workos/user_management/action_authentication_denied.rb +6 -6
  123. data/lib/workos/user_management/action_user_registration_denied.rb +6 -6
  124. data/lib/workos/user_management/authentication_email_verification_failed.rb +5 -5
  125. data/lib/workos/user_management/authentication_email_verification_succeeded.rb +5 -5
  126. data/lib/workos/user_management/authentication_magic_auth_failed.rb +5 -5
  127. data/lib/workos/user_management/authentication_magic_auth_succeeded.rb +5 -5
  128. data/lib/workos/user_management/authentication_mfa_failed.rb +5 -5
  129. data/lib/workos/user_management/authentication_mfa_succeeded.rb +5 -5
  130. data/lib/workos/user_management/authentication_oauth_failed.rb +5 -5
  131. data/lib/workos/user_management/authentication_oauth_succeeded.rb +5 -5
  132. data/lib/workos/user_management/authentication_passkey_failed.rb +5 -5
  133. data/lib/workos/user_management/authentication_passkey_succeeded.rb +5 -5
  134. data/lib/workos/user_management/authentication_password_failed.rb +5 -5
  135. data/lib/workos/user_management/authentication_password_succeeded.rb +5 -5
  136. data/lib/workos/user_management/authentication_radar_risk_detected.rb +5 -5
  137. data/lib/workos/user_management/authentication_sso_failed.rb +5 -5
  138. data/lib/workos/user_management/authentication_sso_started.rb +5 -5
  139. data/lib/workos/user_management/authentication_sso_succeeded.rb +5 -5
  140. data/lib/workos/user_management/authentication_sso_timed_out.rb +5 -5
  141. data/lib/workos/user_management/create_user.rb +3 -0
  142. data/lib/workos/user_management/create_user_api_key.rb +5 -2
  143. data/lib/workos/user_management/email_change_confirmation_user.rb +3 -0
  144. data/lib/workos/user_management/email_verification_created.rb +5 -5
  145. data/lib/workos/user_management/invitation_accepted.rb +5 -5
  146. data/lib/workos/user_management/invitation_created.rb +5 -5
  147. data/lib/workos/user_management/invitation_resent.rb +5 -5
  148. data/lib/workos/user_management/invitation_revoked.rb +5 -5
  149. data/lib/workos/user_management/magic_auth_created.rb +5 -5
  150. data/lib/workos/user_management/password_reset_created.rb +5 -5
  151. data/lib/workos/user_management/password_reset_succeeded.rb +5 -5
  152. data/lib/workos/user_management/revoke_session.rb +2 -6
  153. data/lib/workos/user_management/session_created.rb +5 -5
  154. data/lib/workos/user_management/session_revoked.rb +5 -5
  155. data/lib/workos/user_management/update_user.rb +3 -0
  156. data/lib/workos/user_management/user_api_key.rb +3 -0
  157. data/lib/workos/user_management/user_api_key_updated_data_owner.rb +7 -0
  158. data/lib/workos/user_management/user_api_key_with_value.rb +3 -0
  159. data/lib/workos/user_management/user_created.rb +5 -5
  160. data/lib/workos/user_management/user_deleted.rb +5 -5
  161. data/lib/workos/user_management/user_updated.rb +5 -5
  162. data/lib/workos/user_management.rb +16 -223
  163. data/lib/workos/vault/actor.rb +22 -0
  164. data/lib/workos/vault/create_data_key_request.rb +18 -0
  165. data/lib/workos/vault/create_data_key_response.rb +28 -0
  166. data/lib/workos/vault/create_object_request.rb +25 -0
  167. data/lib/workos/vault/decrypt_request.rb +18 -0
  168. data/lib/workos/vault/decrypt_response.rb +22 -0
  169. data/lib/workos/vault/delete_object_response.rb +22 -0
  170. data/lib/workos/vault/object_metadata.rb +37 -0
  171. data/lib/workos/{audit_logs/audit_log_action_json.rb → vault/object_summary.rb} +4 -10
  172. data/lib/workos/vault/object_version.rb +31 -0
  173. data/lib/workos/vault/object_without_value.rb +25 -0
  174. data/lib/workos/vault/rekey_request.rb +22 -0
  175. data/lib/workos/vault/update_object_request.rb +22 -0
  176. data/lib/workos/vault/vault_byok_key_deleted.rb +5 -5
  177. data/lib/workos/vault/vault_byok_key_verification_completed.rb +5 -5
  178. data/lib/workos/vault/vault_data_created.rb +5 -5
  179. data/lib/workos/vault/vault_data_deleted.rb +5 -5
  180. data/lib/workos/vault/vault_data_read.rb +5 -5
  181. data/lib/workos/vault/vault_data_updated.rb +5 -5
  182. data/lib/workos/vault/vault_dek_decrypted.rb +5 -5
  183. data/lib/workos/vault/vault_dek_read.rb +5 -5
  184. data/lib/workos/vault/vault_kek_created.rb +5 -5
  185. data/lib/workos/vault/vault_metadata_read.rb +5 -5
  186. data/lib/workos/vault/vault_names_listed.rb +5 -5
  187. data/lib/workos/vault/vault_object.rb +28 -0
  188. data/lib/workos/vault/version_list_response.rb +22 -0
  189. data/lib/workos/vault.rb +273 -139
  190. data/lib/workos/version.rb +1 -1
  191. data/lib/workos/webhooks/webhook_endpoint.rb +2 -7
  192. data/lib/workos/webhooks.rb +8 -9
  193. data/lib/workos.rb +1 -0
  194. data/rbi/workos/action_authentication_denied.rbi +10 -10
  195. data/rbi/workos/action_user_registration_denied.rbi +10 -10
  196. data/rbi/workos/actor.rbi +30 -0
  197. data/rbi/workos/api_key.rbi +6 -0
  198. data/rbi/workos/api_key_created.rbi +6 -6
  199. data/rbi/workos/api_key_created_data.rbi +6 -0
  200. data/rbi/workos/api_key_revoked.rbi +6 -6
  201. data/rbi/workos/api_key_revoked_data.rbi +6 -0
  202. data/rbi/workos/{dsync_deactivated.rbi → api_key_updated.rbi} +9 -9
  203. data/rbi/workos/api_key_updated_data.rbi +84 -0
  204. data/rbi/workos/api_key_updated_data_owner.rbi +30 -0
  205. data/rbi/workos/{audit_logs_retention_json.rbi → api_key_updated_data_previous_attribute.rbi} +5 -5
  206. data/rbi/workos/api_keys.rbi +11 -1
  207. data/rbi/workos/audit_log_action.rbi +1 -0
  208. data/rbi/workos/audit_log_export.rbi +1 -0
  209. data/rbi/workos/audit_log_schema.rbi +18 -0
  210. data/rbi/workos/{audit_log_schema_json_actor.rbi → audit_log_schema_actor_input.rbi} +1 -1
  211. data/rbi/workos/audit_log_schema_input.rbi +36 -0
  212. data/rbi/workos/{audit_log_schema_json_target.rbi → audit_log_schema_target_input.rbi} +1 -1
  213. data/rbi/workos/audit_logs.rbi +9 -9
  214. data/rbi/workos/audit_logs_retention.rbi +1 -0
  215. data/rbi/workos/authentication_email_verification_failed.rbi +6 -6
  216. data/rbi/workos/authentication_email_verification_succeeded.rbi +6 -6
  217. data/rbi/workos/authentication_magic_auth_failed.rbi +6 -6
  218. data/rbi/workos/authentication_magic_auth_succeeded.rbi +6 -6
  219. data/rbi/workos/authentication_mfa_failed.rbi +6 -6
  220. data/rbi/workos/authentication_mfa_succeeded.rbi +6 -6
  221. data/rbi/workos/authentication_oauth_failed.rbi +6 -6
  222. data/rbi/workos/authentication_oauth_succeeded.rbi +6 -6
  223. data/rbi/workos/authentication_passkey_failed.rbi +6 -6
  224. data/rbi/workos/authentication_passkey_succeeded.rbi +6 -6
  225. data/rbi/workos/authentication_password_failed.rbi +6 -6
  226. data/rbi/workos/authentication_password_succeeded.rbi +6 -6
  227. data/rbi/workos/authentication_radar_risk_detected.rbi +6 -6
  228. data/rbi/workos/authentication_sso_failed.rbi +6 -6
  229. data/rbi/workos/authentication_sso_started.rbi +6 -6
  230. data/rbi/workos/authentication_sso_succeeded.rbi +6 -6
  231. data/rbi/workos/authentication_sso_timed_out.rbi +6 -6
  232. data/rbi/workos/authorization.rbi +9 -5
  233. data/rbi/workos/client.rbi +6 -3
  234. data/rbi/workos/connect_application.rbi +0 -12
  235. data/rbi/workos/{dsync_deactivated_data.rbi → connect_application_m2m.rbi} +19 -19
  236. data/rbi/workos/connect_application_oauth.rbi +102 -0
  237. data/rbi/workos/connect_application_oauth_redirect_uris.rbi +30 -0
  238. data/rbi/workos/connection_activated.rbi +6 -6
  239. data/rbi/workos/connection_deactivated.rbi +6 -6
  240. data/rbi/workos/connection_deleted.rbi +6 -6
  241. data/rbi/workos/connection_saml_certificate_renewal_required.rbi +6 -6
  242. data/rbi/workos/connection_saml_certificate_renewed.rbi +6 -6
  243. data/rbi/workos/create_data_key_request.rbi +24 -0
  244. data/rbi/workos/create_data_key_response.rbi +42 -0
  245. data/rbi/workos/create_object_request.rbi +36 -0
  246. data/rbi/workos/create_organization_api_key.rbi +6 -0
  247. data/rbi/workos/create_user.rbi +6 -0
  248. data/rbi/workos/create_user_api_key.rbi +6 -0
  249. data/rbi/workos/decrypt_request.rbi +24 -0
  250. data/rbi/workos/decrypt_response.rbi +30 -0
  251. data/rbi/workos/delete_object_response.rbi +30 -0
  252. data/rbi/workos/dsync_activated.rbi +6 -6
  253. data/rbi/workos/dsync_deleted.rbi +6 -6
  254. data/rbi/workos/dsync_group_created.rbi +6 -6
  255. data/rbi/workos/dsync_group_deleted.rbi +6 -6
  256. data/rbi/workos/dsync_group_updated.rbi +6 -6
  257. data/rbi/workos/dsync_group_user_added.rbi +6 -6
  258. data/rbi/workos/dsync_group_user_removed.rbi +6 -6
  259. data/rbi/workos/dsync_token_created.rbi +54 -0
  260. data/rbi/workos/{audit_log_export_json.rbi → dsync_token_created_data.rbi} +9 -9
  261. data/rbi/workos/dsync_token_revoked.rbi +54 -0
  262. data/rbi/workos/{audit_log_action_json.rbi → dsync_token_revoked_data.rbi} +17 -11
  263. data/rbi/workos/dsync_user_created.rbi +6 -6
  264. data/rbi/workos/dsync_user_deleted.rbi +6 -6
  265. data/rbi/workos/dsync_user_updated.rbi +6 -6
  266. data/rbi/workos/email_change_confirmation_user.rbi +6 -0
  267. data/rbi/workos/email_verification_created.rbi +6 -6
  268. data/rbi/workos/error_response.rbi +24 -0
  269. data/rbi/workos/expire_api_key.rbi +24 -0
  270. data/rbi/workos/flag_created.rbi +6 -6
  271. data/rbi/workos/flag_deleted.rbi +6 -6
  272. data/rbi/workos/flag_rule_updated.rbi +6 -6
  273. data/rbi/workos/flag_updated.rbi +6 -6
  274. data/rbi/workos/group_created.rbi +6 -6
  275. data/rbi/workos/group_deleted.rbi +6 -6
  276. data/rbi/workos/group_member_added.rbi +6 -6
  277. data/rbi/workos/group_member_removed.rbi +6 -6
  278. data/rbi/workos/group_updated.rbi +6 -6
  279. data/rbi/workos/invitation_accepted.rbi +6 -6
  280. data/rbi/workos/invitation_created.rbi +6 -6
  281. data/rbi/workos/invitation_resent.rbi +6 -6
  282. data/rbi/workos/invitation_revoked.rbi +6 -6
  283. data/rbi/workos/magic_auth_created.rbi +6 -6
  284. data/rbi/workos/object_metadata.rbi +60 -0
  285. data/rbi/workos/object_summary.rbi +36 -0
  286. data/rbi/workos/object_version.rbi +48 -0
  287. data/rbi/workos/object_without_value.rbi +36 -0
  288. data/rbi/workos/organization_api_key.rbi +6 -0
  289. data/rbi/workos/organization_api_key_with_value.rbi +6 -0
  290. data/rbi/workos/organization_created.rbi +6 -6
  291. data/rbi/workos/organization_deleted.rbi +6 -6
  292. data/rbi/workos/organization_domain_created.rbi +6 -6
  293. data/rbi/workos/organization_domain_deleted.rbi +6 -6
  294. data/rbi/workos/organization_domain_updated.rbi +6 -6
  295. data/rbi/workos/organization_domain_verification_failed.rbi +6 -6
  296. data/rbi/workos/organization_domain_verified.rbi +6 -6
  297. data/rbi/workos/organization_membership_created.rbi +6 -6
  298. data/rbi/workos/organization_membership_deleted.rbi +6 -6
  299. data/rbi/workos/organization_membership_service.rbi +114 -0
  300. data/rbi/workos/organization_membership_updated.rbi +6 -6
  301. data/rbi/workos/organization_role_created.rbi +6 -6
  302. data/rbi/workos/organization_role_deleted.rbi +6 -6
  303. data/rbi/workos/organization_role_updated.rbi +6 -6
  304. data/rbi/workos/organization_updated.rbi +6 -6
  305. data/rbi/workos/password_reset_created.rbi +6 -6
  306. data/rbi/workos/password_reset_succeeded.rbi +6 -6
  307. data/rbi/workos/permission_created.rbi +6 -6
  308. data/rbi/workos/permission_deleted.rbi +6 -6
  309. data/rbi/workos/permission_updated.rbi +6 -6
  310. data/rbi/workos/{webhook_endpoint_json.rbi → pipe_connected_account.rbi} +23 -11
  311. data/rbi/workos/pipes_connected_account_connected.rbi +54 -0
  312. data/rbi/workos/pipes_connected_account_disconnected.rbi +54 -0
  313. data/rbi/workos/pipes_connected_account_reauthorization_needed.rbi +54 -0
  314. data/rbi/workos/radar.rbi +1 -3
  315. data/rbi/workos/radar_standalone_assess_request.rbi +0 -12
  316. data/rbi/workos/rekey_request.rbi +30 -0
  317. data/rbi/workos/revoke_session.rbi +0 -6
  318. data/rbi/workos/role_created.rbi +6 -6
  319. data/rbi/workos/role_deleted.rbi +6 -6
  320. data/rbi/workos/role_updated.rbi +6 -6
  321. data/rbi/workos/session_created.rbi +6 -6
  322. data/rbi/workos/session_manager.rbi +1 -1
  323. data/rbi/workos/session_revoked.rbi +6 -6
  324. data/rbi/workos/update_object_request.rbi +30 -0
  325. data/rbi/workos/update_user.rbi +6 -0
  326. data/rbi/workos/user.rbi +6 -0
  327. data/rbi/workos/user_api_key.rbi +6 -0
  328. data/rbi/workos/{dsync_deactivated_data_domain.rbi → user_api_key_updated_data_owner.rbi} +5 -5
  329. data/rbi/workos/user_api_key_with_value.rbi +6 -0
  330. data/rbi/workos/user_created.rbi +6 -6
  331. data/rbi/workos/user_deleted.rbi +6 -6
  332. data/rbi/workos/user_management.rbi +7 -94
  333. data/rbi/workos/user_object.rbi +6 -0
  334. data/rbi/workos/user_updated.rbi +6 -6
  335. data/rbi/workos/vault.rbi +70 -95
  336. data/rbi/workos/vault_byok_key_deleted.rbi +6 -6
  337. data/rbi/workos/vault_byok_key_verification_completed.rbi +6 -6
  338. data/rbi/workos/vault_data_created.rbi +6 -6
  339. data/rbi/workos/vault_data_deleted.rbi +6 -6
  340. data/rbi/workos/vault_data_read.rbi +6 -6
  341. data/rbi/workos/vault_data_updated.rbi +6 -6
  342. data/rbi/workos/vault_dek_decrypted.rbi +6 -6
  343. data/rbi/workos/vault_dek_read.rbi +6 -6
  344. data/rbi/workos/vault_kek_created.rbi +6 -6
  345. data/rbi/workos/vault_metadata_read.rbi +6 -6
  346. data/rbi/workos/vault_names_listed.rbi +6 -6
  347. data/rbi/workos/vault_object.rbi +42 -0
  348. data/rbi/workos/waitlist_user_approved.rbi +6 -6
  349. data/rbi/workos/waitlist_user_created.rbi +6 -6
  350. data/rbi/workos/waitlist_user_denied.rbi +6 -6
  351. data/rbi/workos/webhook_endpoint.rbi +1 -0
  352. data/rbi/workos/webhooks.rbi +2 -2
  353. data/renovate.json +1 -61
  354. data/test/workos/test_api_keys.rb +9 -1
  355. data/test/workos/test_base_client.rb +64 -0
  356. data/test/workos/test_model_round_trip.rb +740 -261
  357. data/test/workos/test_organization_membership_service.rb +107 -0
  358. data/test/workos/test_user_management.rb +0 -74
  359. data/test/workos/test_vault.rb +91 -88
  360. metadata +87 -54
  361. data/lib/workos/audit_logs/audit_log_schema_json.rb +0 -34
  362. data/lib/workos/organizations/audit_logs_retention_json.rb +0 -18
  363. data/lib/workos/types/audit_log_export_json_state.rb +0 -14
  364. data/lib/workos/types/dsync_deactivated_data_state.rb +0 -9
  365. data/lib/workos/types/dsync_deactivated_data_type.rb +0 -9
  366. data/lib/workos/types/webhook_endpoint_json_status.rb +0 -9
  367. data/lib/workos/user_management_organization_membership_groups.rb +0 -60
  368. data/lib/workos/webhooks/webhook_endpoint_json.rb +0 -40
  369. data/rbi/workos/actions.rbi +0 -48
  370. data/rbi/workos/audit_log_schema_json.rbi +0 -54
  371. data/rbi/workos/base_client.rbi +0 -132
  372. data/rbi/workos/configuration.rbi +0 -68
  373. data/rbi/workos/encryptors/aes_gcm.rbi +0 -19
  374. data/rbi/workos/errors.rbi +0 -43
  375. data/rbi/workos/hash_provider.rbi +0 -18
  376. data/rbi/workos/passwordless.rbi +0 -47
  377. data/rbi/workos/public_client.rbi +0 -12
  378. data/rbi/workos/session.rbi +0 -43
  379. data/rbi/workos/types/api_response.rbi +0 -29
  380. data/rbi/workos/types/base_model.rbi +0 -22
  381. data/rbi/workos/types/list_struct.rbi +0 -89
  382. data/rbi/workos/user_management_organization_membership_groups.rbi +0 -25
  383. data/rbi/workos/util.rbi +0 -12
  384. data/test/workos/test_user_management_organization_membership_groups.rb +0 -33
  385. /data/lib/workos/{authorization → groups}/user_organization_membership_base_list_data.rb +0 -0
  386. /data/lib/workos/{user_management → organization_membership}/create_user_organization_membership.rb +0 -0
  387. /data/lib/workos/{user_management → organization_membership}/organization_membership.rb +0 -0
  388. /data/lib/workos/{user_management → organization_membership}/update_user_organization_membership.rb +0 -0
  389. /data/lib/workos/{user_management → organization_membership}/user_organization_membership.rb +0 -0
@@ -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
+ AuditLogSchemaTargetInput = AuditLogSchemaTarget
7
+ end
@@ -13,7 +13,7 @@ module WorkOS
13
13
  # Get Retention
14
14
  # @param id [String] Unique identifier of the Organization.
15
15
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
16
- # @return [WorkOS::AuditLogsRetentionJson]
16
+ # @return [WorkOS::AuditLogsRetention]
17
17
  def get_organization_audit_logs_retention(
18
18
  id:,
19
19
  request_options: {}
@@ -24,7 +24,7 @@ module WorkOS
24
24
  auth: true,
25
25
  request_options: request_options
26
26
  )
27
- result = WorkOS::AuditLogsRetentionJson.new(response.body)
27
+ result = WorkOS::AuditLogsRetention.new(response.body)
28
28
  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"])
29
29
  result
30
30
  end
@@ -33,7 +33,7 @@ module WorkOS
33
33
  # @param id [String] Unique identifier of the Organization.
34
34
  # @param retention_period_in_days [Integer] The number of days Audit Log events will be retained. Valid values are `30` and `365`.
35
35
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
36
- # @return [WorkOS::AuditLogsRetentionJson]
36
+ # @return [WorkOS::AuditLogsRetention]
37
37
  def update_organization_audit_logs_retention(
38
38
  id:,
39
39
  retention_period_in_days:,
@@ -49,7 +49,7 @@ module WorkOS
49
49
  body: body,
50
50
  request_options: request_options
51
51
  )
52
- result = WorkOS::AuditLogsRetentionJson.new(response.body)
52
+ result = WorkOS::AuditLogsRetention.new(response.body)
53
53
  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"])
54
54
  result
55
55
  end
@@ -60,7 +60,7 @@ module WorkOS
60
60
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
61
61
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
62
62
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
63
- # @return [WorkOS::Types::ListStruct<WorkOS::AuditLogActionJson>]
63
+ # @return [WorkOS::Types::ListStruct<WorkOS::AuditLogAction>]
64
64
  def list_actions(
65
65
  before: nil,
66
66
  after: nil,
@@ -92,7 +92,7 @@ module WorkOS
92
92
  }
93
93
  WorkOS::Types::ListStruct.from_response(
94
94
  response,
95
- model: WorkOS::AuditLogActionJson,
95
+ model: WorkOS::AuditLogAction,
96
96
  filters: {before: before, limit: limit, order: order},
97
97
  fetch_next: fetch_next
98
98
  )
@@ -105,7 +105,7 @@ module WorkOS
105
105
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
106
106
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time.
107
107
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
108
- # @return [WorkOS::Types::ListStruct<WorkOS::AuditLogSchemaJson>]
108
+ # @return [WorkOS::Types::ListStruct<WorkOS::AuditLogSchema>]
109
109
  def list_action_schemas(
110
110
  action_name:,
111
111
  before: nil,
@@ -139,7 +139,7 @@ module WorkOS
139
139
  }
140
140
  WorkOS::Types::ListStruct.from_response(
141
141
  response,
142
- model: WorkOS::AuditLogSchemaJson,
142
+ model: WorkOS::AuditLogSchema,
143
143
  filters: {action_name: action_name, before: before, limit: limit, order: order},
144
144
  fetch_next: fetch_next
145
145
  )
@@ -147,11 +147,11 @@ module WorkOS
147
147
 
148
148
  # Create Schema
149
149
  # @param action_name [String] The name of the Audit Log action.
150
- # @param actor [WorkOS::AuditLogSchemaActor, nil] The metadata schema for the actor.
151
- # @param targets [Array<WorkOS::AuditLogSchemaTarget>] The list of targets for the schema.
150
+ # @param actor [WorkOS::AuditLogSchemaActorInput, nil] The metadata schema for the actor.
151
+ # @param targets [Array<WorkOS::AuditLogSchemaTargetInput>] The list of targets for the schema.
152
152
  # @param metadata [Hash{String => Object}, nil] Optional JSON schema for event metadata.
153
153
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
154
- # @return [WorkOS::AuditLogSchemaJson]
154
+ # @return [WorkOS::AuditLogSchema]
155
155
  def create_schema(
156
156
  action_name:,
157
157
  targets:,
@@ -171,7 +171,7 @@ module WorkOS
171
171
  body: body,
172
172
  request_options: request_options
173
173
  )
174
- result = WorkOS::AuditLogSchemaJson.new(response.body)
174
+ result = WorkOS::AuditLogSchema.new(response.body)
175
175
  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"])
176
176
  result
177
177
  end
@@ -212,7 +212,7 @@ module WorkOS
212
212
  # @param actor_ids [Array<String>, nil] List of actor IDs to filter against.
213
213
  # @param targets [Array<String>, nil] List of target types to filter against.
214
214
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
215
- # @return [WorkOS::AuditLogExportJson]
215
+ # @return [WorkOS::AuditLogExport]
216
216
  def create_export(
217
217
  organization_id:,
218
218
  range_start:,
@@ -241,7 +241,7 @@ module WorkOS
241
241
  body: body,
242
242
  request_options: request_options
243
243
  )
244
- result = WorkOS::AuditLogExportJson.new(response.body)
244
+ result = WorkOS::AuditLogExport.new(response.body)
245
245
  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"])
246
246
  result
247
247
  end
@@ -249,7 +249,7 @@ module WorkOS
249
249
  # Get Export
250
250
  # @param audit_log_export_id [String] The unique ID of the Audit Log Export.
251
251
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
252
- # @return [WorkOS::AuditLogExportJson]
252
+ # @return [WorkOS::AuditLogExport]
253
253
  def get_export(
254
254
  audit_log_export_id:,
255
255
  request_options: {}
@@ -260,7 +260,7 @@ module WorkOS
260
260
  auth: true,
261
261
  request_options: request_options
262
262
  )
263
- result = WorkOS::AuditLogExportJson.new(response.body)
263
+ result = WorkOS::AuditLogExport.new(response.body)
264
264
  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"])
265
265
  result
266
266
  end
@@ -5,30 +5,30 @@
5
5
  module WorkOS
6
6
  class PermissionCreated < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ object: :object,
8
9
  id: :id,
9
10
  event: :event,
10
11
  data: :data,
11
12
  created_at: :created_at,
12
- context: :context,
13
- object: :object
13
+ context: :context
14
14
  }.freeze
15
15
 
16
16
  attr_accessor \
17
+ :object,
17
18
  :id,
18
19
  :event,
19
20
  :data,
20
21
  :created_at,
21
- :context,
22
- :object
22
+ :context
23
23
 
24
24
  def initialize(json)
25
25
  hash = self.class.normalize(json)
26
+ @object = hash[:object]
26
27
  @id = hash[:id]
27
28
  @event = hash[:event]
28
29
  @data = hash[:data] ? WorkOS::PermissionCreatedData.new(hash[:data]) : nil
29
30
  @created_at = hash[:created_at]
30
31
  @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
31
- @object = hash[:object]
32
32
  end
33
33
  end
34
34
  end
@@ -5,30 +5,30 @@
5
5
  module WorkOS
6
6
  class PermissionDeleted < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ object: :object,
8
9
  id: :id,
9
10
  event: :event,
10
11
  data: :data,
11
12
  created_at: :created_at,
12
- context: :context,
13
- object: :object
13
+ context: :context
14
14
  }.freeze
15
15
 
16
16
  attr_accessor \
17
+ :object,
17
18
  :id,
18
19
  :event,
19
20
  :data,
20
21
  :created_at,
21
- :context,
22
- :object
22
+ :context
23
23
 
24
24
  def initialize(json)
25
25
  hash = self.class.normalize(json)
26
+ @object = hash[:object]
26
27
  @id = hash[:id]
27
28
  @event = hash[:event]
28
29
  @data = hash[:data] ? WorkOS::PermissionDeletedData.new(hash[:data]) : nil
29
30
  @created_at = hash[:created_at]
30
31
  @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
31
- @object = hash[:object]
32
32
  end
33
33
  end
34
34
  end
@@ -5,30 +5,30 @@
5
5
  module WorkOS
6
6
  class PermissionUpdated < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ object: :object,
8
9
  id: :id,
9
10
  event: :event,
10
11
  data: :data,
11
12
  created_at: :created_at,
12
- context: :context,
13
- object: :object
13
+ context: :context
14
14
  }.freeze
15
15
 
16
16
  attr_accessor \
17
+ :object,
17
18
  :id,
18
19
  :event,
19
20
  :data,
20
21
  :created_at,
21
- :context,
22
- :object
22
+ :context
23
23
 
24
24
  def initialize(json)
25
25
  hash = self.class.normalize(json)
26
+ @object = hash[:object]
26
27
  @id = hash[:id]
27
28
  @event = hash[:event]
28
29
  @data = hash[:data] ? WorkOS::PermissionUpdatedData.new(hash[:data]) : nil
29
30
  @created_at = hash[:created_at]
30
31
  @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
31
- @object = hash[:object]
32
32
  end
33
33
  end
34
34
  end
@@ -5,30 +5,30 @@
5
5
  module WorkOS
6
6
  class RoleCreated < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ object: :object,
8
9
  id: :id,
9
10
  event: :event,
10
11
  data: :data,
11
12
  created_at: :created_at,
12
- context: :context,
13
- object: :object
13
+ context: :context
14
14
  }.freeze
15
15
 
16
16
  attr_accessor \
17
+ :object,
17
18
  :id,
18
19
  :event,
19
20
  :data,
20
21
  :created_at,
21
- :context,
22
- :object
22
+ :context
23
23
 
24
24
  def initialize(json)
25
25
  hash = self.class.normalize(json)
26
+ @object = hash[:object]
26
27
  @id = hash[:id]
27
28
  @event = hash[:event]
28
29
  @data = hash[:data] ? WorkOS::RoleCreatedData.new(hash[:data]) : nil
29
30
  @created_at = hash[:created_at]
30
31
  @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
31
- @object = hash[:object]
32
32
  end
33
33
  end
34
34
  end
@@ -5,30 +5,30 @@
5
5
  module WorkOS
6
6
  class RoleDeleted < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ object: :object,
8
9
  id: :id,
9
10
  event: :event,
10
11
  data: :data,
11
12
  created_at: :created_at,
12
- context: :context,
13
- object: :object
13
+ context: :context
14
14
  }.freeze
15
15
 
16
16
  attr_accessor \
17
+ :object,
17
18
  :id,
18
19
  :event,
19
20
  :data,
20
21
  :created_at,
21
- :context,
22
- :object
22
+ :context
23
23
 
24
24
  def initialize(json)
25
25
  hash = self.class.normalize(json)
26
+ @object = hash[:object]
26
27
  @id = hash[:id]
27
28
  @event = hash[:event]
28
29
  @data = hash[:data] ? WorkOS::RoleDeletedData.new(hash[:data]) : nil
29
30
  @created_at = hash[:created_at]
30
31
  @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
31
- @object = hash[:object]
32
32
  end
33
33
  end
34
34
  end
@@ -5,30 +5,30 @@
5
5
  module WorkOS
6
6
  class RoleUpdated < WorkOS::Types::BaseModel
7
7
  HASH_ATTRS = {
8
+ object: :object,
8
9
  id: :id,
9
10
  event: :event,
10
11
  data: :data,
11
12
  created_at: :created_at,
12
- context: :context,
13
- object: :object
13
+ context: :context
14
14
  }.freeze
15
15
 
16
16
  attr_accessor \
17
+ :object,
17
18
  :id,
18
19
  :event,
19
20
  :data,
20
21
  :created_at,
21
- :context,
22
- :object
22
+ :context
23
23
 
24
24
  def initialize(json)
25
25
  hash = self.class.normalize(json)
26
+ @object = hash[:object]
26
27
  @id = hash[:id]
27
28
  @event = hash[:event]
28
29
  @data = hash[:data] ? WorkOS::RoleUpdatedData.new(hash[:data]) : nil
29
30
  @created_at = hash[:created_at]
30
31
  @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
31
- @object = hash[:object]
32
32
  end
33
33
  end
34
34
  end
@@ -93,7 +93,7 @@ module WorkOS
93
93
  # @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"`.
94
94
  # @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"`.
95
95
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
96
- # @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). Defaults to descending.
96
+ # @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).
97
97
  # @param permission_slug [String] The permission slug to filter by. Only child resources where the organization membership has this permission are returned.
98
98
  # @param parent_resource [WorkOS::Authorization::ParentResourceById, WorkOS::Authorization::ParentResourceByExternalId] Identifies the parent resource.
99
99
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -157,7 +157,7 @@ module WorkOS
157
157
  # @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"`.
158
158
  # @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"`.
159
159
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
160
- # @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). Defaults to descending.
160
+ # @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).
161
161
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
162
162
  # @return [WorkOS::Types::ListStruct<WorkOS::AuthorizationPermission>]
163
163
  def list_effective_permissions(
@@ -208,7 +208,7 @@ module WorkOS
208
208
  # @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"`.
209
209
  # @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"`.
210
210
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
211
- # @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). Defaults to descending.
211
+ # @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).
212
212
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
213
213
  # @return [WorkOS::Types::ListStruct<WorkOS::AuthorizationPermission>]
214
214
  def list_effective_permissions_by_external_id(
@@ -259,7 +259,10 @@ module WorkOS
259
259
  # @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"`.
260
260
  # @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"`.
261
261
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
262
- # @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). Defaults to descending.
262
+ # @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).
263
+ # @param resource_id [String, nil] Filter assignments by the ID of the resource.
264
+ # @param resource_external_id [String, nil] Filter assignments by the external ID of the resource.
265
+ # @param resource_type_slug [String, nil] Filter assignments by the slug of the resource type.
263
266
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
264
267
  # @return [WorkOS::Types::ListStruct<WorkOS::UserRoleAssignment>]
265
268
  def list_role_assignments(
@@ -268,13 +271,19 @@ module WorkOS
268
271
  after: nil,
269
272
  limit: 10,
270
273
  order: "desc",
274
+ resource_id: nil,
275
+ resource_external_id: nil,
276
+ resource_type_slug: nil,
271
277
  request_options: {}
272
278
  )
273
279
  params = {
274
280
  "before" => before,
275
281
  "after" => after,
276
282
  "limit" => limit,
277
- "order" => order
283
+ "order" => order,
284
+ "resource_id" => resource_id,
285
+ "resource_external_id" => resource_external_id,
286
+ "resource_type_slug" => resource_type_slug
278
287
  }.compact
279
288
  response = @client.request(
280
289
  method: :get,
@@ -290,13 +299,16 @@ module WorkOS
290
299
  after: cursor,
291
300
  limit: limit,
292
301
  order: order,
302
+ resource_id: resource_id,
303
+ resource_external_id: resource_external_id,
304
+ resource_type_slug: resource_type_slug,
293
305
  request_options: request_options
294
306
  )
295
307
  }
296
308
  WorkOS::Types::ListStruct.from_response(
297
309
  response,
298
310
  model: WorkOS::UserRoleAssignment,
299
- filters: {organization_membership_id: organization_membership_id, before: before, limit: limit, order: order},
311
+ filters: {organization_membership_id: organization_membership_id, before: before, limit: limit, order: order, resource_id: resource_id, resource_external_id: resource_external_id, resource_type_slug: resource_type_slug},
300
312
  fetch_next: fetch_next
301
313
  )
302
314
  end
@@ -694,7 +706,7 @@ module WorkOS
694
706
  # @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"`.
695
707
  # @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"`.
696
708
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
697
- # @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). Defaults to descending.
709
+ # @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).
698
710
  # @param permission_slug [String] The permission slug to filter by. Only users with this permission on the resource are returned.
699
711
  # @param assignment [WorkOS::Types::AuthorizationAssignment, nil] Filter by assignment type. Use "direct" for direct assignments only, or "indirect" to include inherited assignments.
700
712
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -755,7 +767,8 @@ module WorkOS
755
767
  # @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"`.
756
768
  # @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"`.
757
769
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
758
- # @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). Defaults to descending.
770
+ # @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).
771
+ # @param role_slug [String, nil] Filter assignments by the slug of the role.
759
772
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
760
773
  # @return [WorkOS::Types::ListStruct<WorkOS::UserRoleAssignment>]
761
774
  def list_role_assignments_for_resource_by_external_id(
@@ -766,13 +779,15 @@ module WorkOS
766
779
  after: nil,
767
780
  limit: 10,
768
781
  order: "desc",
782
+ role_slug: nil,
769
783
  request_options: {}
770
784
  )
771
785
  params = {
772
786
  "before" => before,
773
787
  "after" => after,
774
788
  "limit" => limit,
775
- "order" => order
789
+ "order" => order,
790
+ "role_slug" => role_slug
776
791
  }.compact
777
792
  response = @client.request(
778
793
  method: :get,
@@ -790,13 +805,14 @@ module WorkOS
790
805
  after: cursor,
791
806
  limit: limit,
792
807
  order: order,
808
+ role_slug: role_slug,
793
809
  request_options: request_options
794
810
  )
795
811
  }
796
812
  WorkOS::Types::ListStruct.from_response(
797
813
  response,
798
814
  model: WorkOS::UserRoleAssignment,
799
- filters: {organization_id: organization_id, resource_type_slug: resource_type_slug, external_id: external_id, before: before, limit: limit, order: order},
815
+ filters: {organization_id: organization_id, resource_type_slug: resource_type_slug, external_id: external_id, before: before, limit: limit, order: order, role_slug: role_slug},
800
816
  fetch_next: fetch_next
801
817
  )
802
818
  end
@@ -805,11 +821,10 @@ module WorkOS
805
821
  # @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"`.
806
822
  # @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"`.
807
823
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
808
- # @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). Defaults to descending.
824
+ # @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).
809
825
  # @param organization_id [String, nil] Filter resources by organization ID.
810
826
  # @param resource_type_slug [String, nil] Filter resources by resource type slug.
811
827
  # @param resource_external_id [String, nil] Filter resources by external ID.
812
- # @param search [String, nil] Search resources by name.
813
828
  # @param parent [WorkOS::Authorization::ParentById, WorkOS::Authorization::ParentByExternalId, nil] Identifies the parent.
814
829
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
815
830
  # @return [WorkOS::Types::ListStruct<WorkOS::AuthorizationResource>]
@@ -821,7 +836,6 @@ module WorkOS
821
836
  organization_id: nil,
822
837
  resource_type_slug: nil,
823
838
  resource_external_id: nil,
824
- search: nil,
825
839
  parent: nil,
826
840
  request_options: {}
827
841
  )
@@ -832,8 +846,7 @@ module WorkOS
832
846
  "order" => order,
833
847
  "organization_id" => organization_id,
834
848
  "resource_type_slug" => resource_type_slug,
835
- "resource_external_id" => resource_external_id,
836
- "search" => search
849
+ "resource_external_id" => resource_external_id
837
850
  }.compact
838
851
  if parent
839
852
  case parent
@@ -862,7 +875,6 @@ module WorkOS
862
875
  organization_id: organization_id,
863
876
  resource_type_slug: resource_type_slug,
864
877
  resource_external_id: resource_external_id,
865
- search: search,
866
878
  parent: parent,
867
879
  request_options: request_options
868
880
  )
@@ -870,7 +882,7 @@ module WorkOS
870
882
  WorkOS::Types::ListStruct.from_response(
871
883
  response,
872
884
  model: WorkOS::AuthorizationResource,
873
- filters: {before: before, limit: limit, order: order, organization_id: organization_id, resource_type_slug: resource_type_slug, resource_external_id: resource_external_id, search: search, parent: parent},
885
+ filters: {before: before, limit: limit, order: order, organization_id: organization_id, resource_type_slug: resource_type_slug, resource_external_id: resource_external_id, parent: parent},
874
886
  fetch_next: fetch_next
875
887
  )
876
888
  end
@@ -1011,7 +1023,7 @@ module WorkOS
1011
1023
  # @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"`.
1012
1024
  # @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"`.
1013
1025
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
1014
- # @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). Defaults to descending.
1026
+ # @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).
1015
1027
  # @param permission_slug [String] The permission slug to filter by. Only users with this permission on the resource are returned.
1016
1028
  # @param assignment [WorkOS::Types::AuthorizationAssignment, nil] Filter by assignment type. Use `direct` for direct assignments only, or `indirect` to include inherited assignments.
1017
1029
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
@@ -1066,7 +1078,8 @@ module WorkOS
1066
1078
  # @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"`.
1067
1079
  # @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"`.
1068
1080
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
1069
- # @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). Defaults to descending.
1081
+ # @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).
1082
+ # @param role_slug [String, nil] Filter assignments by the slug of the role.
1070
1083
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
1071
1084
  # @return [WorkOS::Types::ListStruct<WorkOS::UserRoleAssignment>]
1072
1085
  def list_role_assignments_for_resource(
@@ -1075,13 +1088,15 @@ module WorkOS
1075
1088
  after: nil,
1076
1089
  limit: 10,
1077
1090
  order: "desc",
1091
+ role_slug: nil,
1078
1092
  request_options: {}
1079
1093
  )
1080
1094
  params = {
1081
1095
  "before" => before,
1082
1096
  "after" => after,
1083
1097
  "limit" => limit,
1084
- "order" => order
1098
+ "order" => order,
1099
+ "role_slug" => role_slug
1085
1100
  }.compact
1086
1101
  response = @client.request(
1087
1102
  method: :get,
@@ -1097,13 +1112,14 @@ module WorkOS
1097
1112
  after: cursor,
1098
1113
  limit: limit,
1099
1114
  order: order,
1115
+ role_slug: role_slug,
1100
1116
  request_options: request_options
1101
1117
  )
1102
1118
  }
1103
1119
  WorkOS::Types::ListStruct.from_response(
1104
1120
  response,
1105
1121
  model: WorkOS::UserRoleAssignment,
1106
- filters: {resource_id: resource_id, before: before, limit: limit, order: order},
1122
+ filters: {resource_id: resource_id, before: before, limit: limit, order: order, role_slug: role_slug},
1107
1123
  fetch_next: fetch_next
1108
1124
  )
1109
1125
  end
@@ -1256,7 +1272,7 @@ module WorkOS
1256
1272
  # @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"`.
1257
1273
  # @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"`.
1258
1274
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
1259
- # @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). Defaults to descending.
1275
+ # @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).
1260
1276
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
1261
1277
  # @return [WorkOS::Types::ListStruct<WorkOS::AuthorizationPermission>]
1262
1278
  def list_permissions(
@@ -166,7 +166,7 @@ module WorkOS
166
166
  end
167
167
 
168
168
  # Close all persistent connections cached by this client on the current
169
- # fiber/thread.
169
+ # thread.
170
170
  #
171
171
  # Call this before forking (e.g. in a Puma `on_worker_boot` block) to
172
172
  # avoid sharing `Net::HTTP` sockets across processes.
@@ -302,8 +302,25 @@ module WorkOS
302
302
  "#{uri.scheme}:#{uri.host}:#{uri.port}:#{timeout}"
303
303
  end
304
304
 
305
+ # Per-fiber connection cache (non-inherited).
306
+ #
307
+ # Uses Thread.current[] (Ruby fiber-local storage) rather than
308
+ # Fiber[] (inheritable fiber storage). Fiber[] is inherited *by
309
+ # reference* by every child fiber and every child thread, so a live
310
+ # Net::HTTP socket cached in a parent fiber would be shared across
311
+ # worker threads spawned afterward (e.g. Solid Queue, Puma). Net::HTTP
312
+ # sockets are not thread-safe; concurrent use corrupts the stream and
313
+ # surfaces as FrozenError on the SSLContext, Errno::EBADF, "stream
314
+ # closed in another thread" (IOError), and Net::HTTPBadResponse.
315
+ # Thread.current[] is not inherited across threads, so each thread
316
+ # gets its own isolated cache.
317
+ #
318
+ # Note: Thread.current[] is fiber-local in Ruby — each Fiber within a
319
+ # thread has its own slot. In fiber-based servers (Async, Falcon) this
320
+ # means one connection cache per fiber rather than per OS thread, which
321
+ # is the desired behavior: each concurrent request gets its own sockets.
305
322
  def thread_connections
306
- Fiber[:workos_connections] ||= {}
323
+ Thread.current[:workos_connections] ||= {}
307
324
  end
308
325
 
309
326
  def build_request(klass, path, auth:, request_options:)
data/lib/workos/client.rb CHANGED
@@ -64,8 +64,12 @@ module WorkOS
64
64
  @user_management ||= WorkOS::UserManagement.new(self)
65
65
  end
66
66
 
67
- def user_management_organization_membership_groups
68
- @user_management_organization_membership_groups ||= WorkOS::UserManagementOrganizationMembershipGroups.new(self)
67
+ def organization_membership
68
+ @organization_membership ||= WorkOS::OrganizationMembershipService.new(self)
69
+ end
70
+
71
+ def vault
72
+ @vault ||= WorkOS::Vault.new(self)
69
73
  end
70
74
 
71
75
  def webhooks
@@ -86,10 +90,6 @@ module WorkOS
86
90
  @passwordless ||= WorkOS::Passwordless.new(self)
87
91
  end
88
92
 
89
- def vault
90
- @vault ||= WorkOS::Vault.new(self)
91
- end
92
-
93
93
  def actions
94
94
  @actions ||= WorkOS::Actions
95
95
  end