workos 8.0.1 → 9.0.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 (347) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/.github/workflows/docs.yml +1 -1
  4. data/.github/workflows/lint.yml +1 -1
  5. data/.github/workflows/release-please.yml +174 -3
  6. data/.github/workflows/release.yml +1 -1
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +129 -34
  9. data/.release-please-manifest.json +1 -1
  10. data/CHANGELOG.md +59 -0
  11. data/Gemfile.lock +4 -4
  12. data/lib/workos/api_keys/api_key.rb +3 -0
  13. data/lib/workos/api_keys/api_key_created.rb +5 -5
  14. data/lib/workos/api_keys/api_key_created_data.rb +3 -0
  15. data/lib/workos/api_keys/api_key_revoked.rb +5 -5
  16. data/lib/workos/api_keys/create_organization_api_key.rb +5 -2
  17. data/lib/workos/api_keys/organization_api_key.rb +3 -0
  18. data/lib/workos/api_keys/organization_api_key_with_value.rb +3 -0
  19. data/lib/workos/api_keys.rb +4 -1
  20. data/lib/workos/audit_logs/audit_log_action.rb +2 -7
  21. data/lib/workos/audit_logs/audit_log_export.rb +2 -7
  22. data/lib/workos/audit_logs/audit_log_schema.rb +11 -2
  23. data/lib/workos/audit_logs/{audit_log_schema_json_actor.rb → audit_log_schema_actor_input.rb} +1 -1
  24. data/lib/workos/audit_logs/audit_log_schema_input.rb +25 -0
  25. data/lib/workos/audit_logs/audit_log_schema_target.rb +16 -1
  26. data/lib/workos/{types/radar_type.rb → audit_logs/audit_log_schema_target_input.rb} +1 -3
  27. data/lib/workos/audit_logs.rb +16 -16
  28. data/lib/workos/authorization/permission_created.rb +5 -5
  29. data/lib/workos/authorization/permission_deleted.rb +5 -5
  30. data/lib/workos/authorization/permission_updated.rb +5 -5
  31. data/lib/workos/authorization/role_created.rb +5 -5
  32. data/lib/workos/authorization/role_deleted.rb +5 -5
  33. data/lib/workos/authorization/role_updated.rb +5 -5
  34. data/lib/workos/authorization.rb +28 -12
  35. data/lib/workos/client.rb +6 -6
  36. data/lib/workos/connect/connect_application.rb +12 -0
  37. data/lib/workos/{audit_logs/audit_log_schema_json_target.rb → connect/connect_application_redirect_uri.rb} +7 -7
  38. data/lib/workos/directory_sync/dsync_activated.rb +5 -5
  39. data/lib/workos/directory_sync/dsync_deactivated.rb +5 -5
  40. data/lib/workos/directory_sync/dsync_deleted.rb +5 -5
  41. data/lib/workos/directory_sync/dsync_group_created.rb +5 -5
  42. data/lib/workos/directory_sync/dsync_group_deleted.rb +5 -5
  43. data/lib/workos/directory_sync/dsync_group_updated.rb +5 -5
  44. data/lib/workos/directory_sync/dsync_group_user_added.rb +5 -5
  45. data/lib/workos/directory_sync/dsync_group_user_removed.rb +5 -5
  46. data/lib/workos/directory_sync/dsync_user_created.rb +5 -5
  47. data/lib/workos/directory_sync/dsync_user_deleted.rb +5 -5
  48. data/lib/workos/directory_sync/dsync_user_updated.rb +5 -5
  49. data/lib/workos/feature_flags/flag_created.rb +5 -5
  50. data/lib/workos/feature_flags/flag_deleted.rb +5 -5
  51. data/lib/workos/feature_flags/flag_rule_updated.rb +5 -5
  52. data/lib/workos/feature_flags/flag_rule_updated_context_configured_target_organization.rb +1 -16
  53. data/lib/workos/feature_flags/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rb +1 -1
  54. data/lib/workos/feature_flags/flag_updated.rb +5 -5
  55. data/lib/workos/inflections.rb +4 -1
  56. data/lib/workos/organization_domains/organization_domain_created.rb +5 -5
  57. data/lib/workos/organization_domains/organization_domain_deleted.rb +5 -5
  58. data/lib/workos/organization_domains/organization_domain_updated.rb +5 -5
  59. data/lib/workos/organization_domains/organization_domain_verification_failed.rb +5 -5
  60. data/lib/workos/organization_domains/organization_domain_verified.rb +5 -5
  61. data/lib/workos/organization_membership_service.rb +273 -0
  62. data/lib/workos/organizations/audit_logs_retention.rb +2 -7
  63. data/lib/workos/organizations/organization_created.rb +5 -5
  64. data/lib/workos/organizations/organization_deleted.rb +5 -5
  65. data/lib/workos/organizations/organization_membership_created.rb +5 -5
  66. data/lib/workos/organizations/organization_membership_deleted.rb +5 -5
  67. data/lib/workos/organizations/organization_membership_updated.rb +5 -5
  68. data/lib/workos/organizations/organization_role_created.rb +5 -5
  69. data/lib/workos/organizations/organization_role_deleted.rb +5 -5
  70. data/lib/workos/organizations/organization_role_updated.rb +5 -5
  71. data/lib/workos/organizations/organization_updated.rb +5 -5
  72. data/lib/workos/radar/radar_standalone_assess_request.rb +2 -8
  73. data/lib/workos/radar.rb +6 -12
  74. data/lib/workos/shared/connect_application_m2m.rb +46 -0
  75. data/lib/workos/shared/connect_application_oauth.rb +58 -0
  76. data/lib/workos/shared/connect_application_oauth_redirect_uris.rb +22 -0
  77. data/lib/workos/shared/error_response.rb +18 -0
  78. data/lib/workos/shared/group_created.rb +5 -5
  79. data/lib/workos/shared/group_deleted.rb +5 -5
  80. data/lib/workos/shared/group_member_added.rb +5 -5
  81. data/lib/workos/shared/group_member_removed.rb +5 -5
  82. data/lib/workos/shared/group_updated.rb +5 -5
  83. data/lib/workos/shared/pipe_connected_account.rb +46 -0
  84. data/lib/workos/{audit_logs/audit_log_export_json.rb → shared/pipes_connected_account_connected.rb} +10 -10
  85. data/lib/workos/shared/pipes_connected_account_disconnected.rb +34 -0
  86. data/lib/workos/shared/pipes_connected_account_reauthorization_needed.rb +34 -0
  87. data/lib/workos/shared/waitlist_user_approved.rb +5 -5
  88. data/lib/workos/shared/waitlist_user_created.rb +5 -5
  89. data/lib/workos/shared/waitlist_user_denied.rb +5 -5
  90. data/lib/workos/sso/connection_activated.rb +5 -5
  91. data/lib/workos/sso/connection_deactivated.rb +5 -5
  92. data/lib/workos/sso/connection_deleted.rb +5 -5
  93. data/lib/workos/sso/connection_saml_certificate_renewal_required.rb +5 -5
  94. data/lib/workos/sso/connection_saml_certificate_renewed.rb +5 -5
  95. data/lib/workos/types/create_webhook_endpoint_events.rb +4 -1
  96. data/lib/workos/types/pipe_connected_account_state.rb +13 -0
  97. data/lib/workos/types/{radar_action.rb → radar_list_action.rb} +1 -1
  98. data/lib/workos/types/radar_list_type.rb +18 -0
  99. data/lib/workos/types/radar_standalone_assess_request_action.rb +1 -7
  100. data/lib/workos/types/radar_standalone_response_blocklist_type.rb +1 -10
  101. data/lib/workos/types/radar_standalone_response_control.rb +1 -3
  102. data/lib/workos/types/user_management_authentication_screen_hint.rb +1 -5
  103. data/{rbi/workos/types/request_options.rbi → lib/workos/types/vault_order.rb} +4 -3
  104. data/lib/workos/types/webhook_endpoint_status.rb +1 -5
  105. data/lib/workos/user_management/action_authentication_denied.rb +6 -6
  106. data/lib/workos/user_management/action_user_registration_denied.rb +6 -6
  107. data/lib/workos/user_management/authentication_email_verification_failed.rb +5 -5
  108. data/lib/workos/user_management/authentication_email_verification_succeeded.rb +5 -5
  109. data/lib/workos/user_management/authentication_magic_auth_failed.rb +5 -5
  110. data/lib/workos/user_management/authentication_magic_auth_succeeded.rb +5 -5
  111. data/lib/workos/user_management/authentication_mfa_failed.rb +5 -5
  112. data/lib/workos/user_management/authentication_mfa_succeeded.rb +5 -5
  113. data/lib/workos/user_management/authentication_oauth_failed.rb +5 -5
  114. data/lib/workos/user_management/authentication_oauth_succeeded.rb +5 -5
  115. data/lib/workos/user_management/authentication_passkey_failed.rb +5 -5
  116. data/lib/workos/user_management/authentication_passkey_succeeded.rb +5 -5
  117. data/lib/workos/user_management/authentication_password_failed.rb +5 -5
  118. data/lib/workos/user_management/authentication_password_succeeded.rb +5 -5
  119. data/lib/workos/user_management/authentication_radar_risk_detected.rb +5 -5
  120. data/lib/workos/user_management/authentication_sso_failed.rb +5 -5
  121. data/lib/workos/user_management/authentication_sso_started.rb +5 -5
  122. data/lib/workos/user_management/authentication_sso_succeeded.rb +5 -5
  123. data/lib/workos/user_management/authentication_sso_timed_out.rb +5 -5
  124. data/lib/workos/user_management/create_user_api_key.rb +5 -2
  125. data/lib/workos/user_management/email_verification_created.rb +5 -5
  126. data/lib/workos/user_management/invitation_accepted.rb +5 -5
  127. data/lib/workos/user_management/invitation_created.rb +5 -5
  128. data/lib/workos/user_management/invitation_resent.rb +5 -5
  129. data/lib/workos/user_management/invitation_revoked.rb +5 -5
  130. data/lib/workos/user_management/magic_auth_created.rb +5 -5
  131. data/lib/workos/user_management/password_reset_created.rb +5 -5
  132. data/lib/workos/user_management/password_reset_succeeded.rb +5 -5
  133. data/lib/workos/user_management/session_created.rb +5 -5
  134. data/lib/workos/user_management/session_revoked.rb +5 -5
  135. data/lib/workos/user_management/user_api_key.rb +3 -0
  136. data/lib/workos/user_management/user_api_key_with_value.rb +3 -0
  137. data/lib/workos/user_management/user_created.rb +5 -5
  138. data/lib/workos/user_management/user_deleted.rb +5 -5
  139. data/lib/workos/user_management/user_updated.rb +5 -5
  140. data/lib/workos/user_management.rb +4 -214
  141. data/lib/workos/vault/actor.rb +22 -0
  142. data/lib/workos/vault/create_data_key_request.rb +18 -0
  143. data/lib/workos/vault/create_data_key_response.rb +28 -0
  144. data/lib/workos/vault/create_object_request.rb +25 -0
  145. data/lib/workos/vault/decrypt_request.rb +18 -0
  146. data/lib/workos/vault/decrypt_response.rb +22 -0
  147. data/lib/workos/vault/delete_object_response.rb +22 -0
  148. data/lib/workos/vault/object.rb +28 -0
  149. data/lib/workos/vault/object_metadata.rb +37 -0
  150. data/lib/workos/{audit_logs/audit_log_action_json.rb → vault/object_summary.rb} +4 -10
  151. data/lib/workos/vault/object_version.rb +31 -0
  152. data/lib/workos/vault/object_without_value.rb +25 -0
  153. data/lib/workos/vault/rekey_request.rb +22 -0
  154. data/lib/workos/vault/update_object_request.rb +22 -0
  155. data/lib/workos/vault/vault_byok_key_deleted.rb +5 -5
  156. data/lib/workos/vault/vault_byok_key_verification_completed.rb +5 -5
  157. data/lib/workos/vault/vault_data_created.rb +5 -5
  158. data/lib/workos/vault/vault_data_deleted.rb +5 -5
  159. data/lib/workos/vault/vault_data_read.rb +5 -5
  160. data/lib/workos/vault/vault_data_updated.rb +5 -5
  161. data/lib/workos/vault/vault_dek_decrypted.rb +5 -5
  162. data/lib/workos/vault/vault_dek_read.rb +5 -5
  163. data/lib/workos/vault/vault_kek_created.rb +5 -5
  164. data/lib/workos/vault/vault_metadata_read.rb +5 -5
  165. data/lib/workos/vault/vault_names_listed.rb +5 -5
  166. data/lib/workos/vault/version_list_response.rb +22 -0
  167. data/lib/workos/vault.rb +273 -139
  168. data/lib/workos/version.rb +1 -1
  169. data/lib/workos/webhooks/webhook_endpoint.rb +2 -7
  170. data/lib/workos/webhooks.rb +7 -8
  171. data/lib/workos.rb +1 -0
  172. data/rbi/workos/action_authentication_denied.rbi +10 -10
  173. data/rbi/workos/action_user_registration_denied.rbi +10 -10
  174. data/rbi/workos/actor.rbi +30 -0
  175. data/rbi/workos/api_key.rbi +6 -0
  176. data/rbi/workos/api_key_created.rbi +6 -6
  177. data/rbi/workos/api_key_created_data.rbi +6 -0
  178. data/rbi/workos/api_key_revoked.rbi +6 -6
  179. data/rbi/workos/api_key_revoked_data.rbi +6 -0
  180. data/rbi/workos/api_keys.rbi +2 -1
  181. data/rbi/workos/audit_log_action.rbi +1 -0
  182. data/rbi/workos/audit_log_export.rbi +1 -0
  183. data/rbi/workos/audit_log_schema.rbi +18 -0
  184. data/rbi/workos/{audit_log_schema_json_actor.rbi → audit_log_schema_actor_input.rbi} +1 -1
  185. data/rbi/workos/audit_log_schema_input.rbi +36 -0
  186. data/rbi/workos/{audit_log_schema_json_target.rbi → audit_log_schema_target_input.rbi} +1 -1
  187. data/rbi/workos/audit_logs.rbi +9 -9
  188. data/rbi/workos/audit_logs_retention.rbi +1 -0
  189. data/rbi/workos/authentication_email_verification_failed.rbi +6 -6
  190. data/rbi/workos/authentication_email_verification_succeeded.rbi +6 -6
  191. data/rbi/workos/authentication_magic_auth_failed.rbi +6 -6
  192. data/rbi/workos/authentication_magic_auth_succeeded.rbi +6 -6
  193. data/rbi/workos/authentication_mfa_failed.rbi +6 -6
  194. data/rbi/workos/authentication_mfa_succeeded.rbi +6 -6
  195. data/rbi/workos/authentication_oauth_failed.rbi +6 -6
  196. data/rbi/workos/authentication_oauth_succeeded.rbi +6 -6
  197. data/rbi/workos/authentication_passkey_failed.rbi +6 -6
  198. data/rbi/workos/authentication_passkey_succeeded.rbi +6 -6
  199. data/rbi/workos/authentication_password_failed.rbi +6 -6
  200. data/rbi/workos/authentication_password_succeeded.rbi +6 -6
  201. data/rbi/workos/authentication_radar_risk_detected.rbi +6 -6
  202. data/rbi/workos/authentication_sso_failed.rbi +6 -6
  203. data/rbi/workos/authentication_sso_started.rbi +6 -6
  204. data/rbi/workos/authentication_sso_succeeded.rbi +6 -6
  205. data/rbi/workos/authentication_sso_timed_out.rbi +6 -6
  206. data/rbi/workos/authorization.rbi +9 -5
  207. data/rbi/workos/client.rbi +6 -3
  208. data/rbi/workos/connect_application.rbi +0 -12
  209. data/rbi/workos/{webhook_endpoint_json.rbi → connect_application_m2m.rbi} +23 -11
  210. data/rbi/workos/connect_application_oauth.rbi +102 -0
  211. data/rbi/workos/connect_application_oauth_redirect_uris.rbi +30 -0
  212. data/rbi/workos/connection_activated.rbi +6 -6
  213. data/rbi/workos/connection_deactivated.rbi +6 -6
  214. data/rbi/workos/connection_deleted.rbi +6 -6
  215. data/rbi/workos/connection_saml_certificate_renewal_required.rbi +6 -6
  216. data/rbi/workos/connection_saml_certificate_renewed.rbi +6 -6
  217. data/rbi/workos/{audit_logs_retention_json.rbi → create_data_key_request.rbi} +5 -5
  218. data/rbi/workos/create_data_key_response.rbi +42 -0
  219. data/rbi/workos/create_object_request.rbi +36 -0
  220. data/rbi/workos/create_organization_api_key.rbi +6 -0
  221. data/rbi/workos/create_user_api_key.rbi +6 -0
  222. data/rbi/workos/decrypt_request.rbi +24 -0
  223. data/rbi/workos/decrypt_response.rbi +30 -0
  224. data/rbi/workos/delete_object_response.rbi +30 -0
  225. data/rbi/workos/dsync_activated.rbi +6 -6
  226. data/rbi/workos/dsync_deactivated.rbi +6 -6
  227. data/rbi/workos/dsync_deleted.rbi +6 -6
  228. data/rbi/workos/dsync_group_created.rbi +6 -6
  229. data/rbi/workos/dsync_group_deleted.rbi +6 -6
  230. data/rbi/workos/dsync_group_updated.rbi +6 -6
  231. data/rbi/workos/dsync_group_user_added.rbi +6 -6
  232. data/rbi/workos/dsync_group_user_removed.rbi +6 -6
  233. data/rbi/workos/dsync_user_created.rbi +6 -6
  234. data/rbi/workos/dsync_user_deleted.rbi +6 -6
  235. data/rbi/workos/dsync_user_updated.rbi +6 -6
  236. data/rbi/workos/email_verification_created.rbi +6 -6
  237. data/rbi/workos/error_response.rbi +24 -0
  238. data/rbi/workos/flag_created.rbi +6 -6
  239. data/rbi/workos/flag_deleted.rbi +6 -6
  240. data/rbi/workos/flag_rule_updated.rbi +6 -6
  241. data/rbi/workos/flag_updated.rbi +6 -6
  242. data/rbi/workos/group_created.rbi +6 -6
  243. data/rbi/workos/group_deleted.rbi +6 -6
  244. data/rbi/workos/group_member_added.rbi +6 -6
  245. data/rbi/workos/group_member_removed.rbi +6 -6
  246. data/rbi/workos/group_updated.rbi +6 -6
  247. data/rbi/workos/invitation_accepted.rbi +6 -6
  248. data/rbi/workos/invitation_created.rbi +6 -6
  249. data/rbi/workos/invitation_resent.rbi +6 -6
  250. data/rbi/workos/invitation_revoked.rbi +6 -6
  251. data/rbi/workos/magic_auth_created.rbi +6 -6
  252. data/rbi/workos/object.rbi +42 -0
  253. data/rbi/workos/object_metadata.rbi +60 -0
  254. data/rbi/workos/object_summary.rbi +36 -0
  255. data/rbi/workos/{audit_log_action_json.rbi → object_version.rbi} +17 -17
  256. data/rbi/workos/object_without_value.rbi +36 -0
  257. data/rbi/workos/organization_api_key.rbi +6 -0
  258. data/rbi/workos/organization_api_key_with_value.rbi +6 -0
  259. data/rbi/workos/organization_created.rbi +6 -6
  260. data/rbi/workos/organization_deleted.rbi +6 -6
  261. data/rbi/workos/organization_domain_created.rbi +6 -6
  262. data/rbi/workos/organization_domain_deleted.rbi +6 -6
  263. data/rbi/workos/organization_domain_updated.rbi +6 -6
  264. data/rbi/workos/organization_domain_verification_failed.rbi +6 -6
  265. data/rbi/workos/organization_domain_verified.rbi +6 -6
  266. data/rbi/workos/organization_membership_created.rbi +6 -6
  267. data/rbi/workos/organization_membership_deleted.rbi +6 -6
  268. data/rbi/workos/organization_membership_service.rbi +114 -0
  269. data/rbi/workos/organization_membership_updated.rbi +6 -6
  270. data/rbi/workos/organization_role_created.rbi +6 -6
  271. data/rbi/workos/organization_role_deleted.rbi +6 -6
  272. data/rbi/workos/organization_role_updated.rbi +6 -6
  273. data/rbi/workos/organization_updated.rbi +6 -6
  274. data/rbi/workos/password_reset_created.rbi +6 -6
  275. data/rbi/workos/password_reset_succeeded.rbi +6 -6
  276. data/rbi/workos/permission_created.rbi +6 -6
  277. data/rbi/workos/permission_deleted.rbi +6 -6
  278. data/rbi/workos/permission_updated.rbi +6 -6
  279. data/rbi/workos/pipe_connected_account.rbi +78 -0
  280. data/rbi/workos/{audit_log_export_json.rbi → pipes_connected_account_connected.rbi} +11 -11
  281. data/rbi/workos/pipes_connected_account_disconnected.rbi +54 -0
  282. data/rbi/workos/pipes_connected_account_reauthorization_needed.rbi +54 -0
  283. data/rbi/workos/radar.rbi +1 -3
  284. data/rbi/workos/radar_standalone_assess_request.rbi +0 -12
  285. data/rbi/workos/rekey_request.rbi +30 -0
  286. data/rbi/workos/role_created.rbi +6 -6
  287. data/rbi/workos/role_deleted.rbi +6 -6
  288. data/rbi/workos/role_updated.rbi +6 -6
  289. data/rbi/workos/session_created.rbi +6 -6
  290. data/rbi/workos/session_manager.rbi +1 -1
  291. data/rbi/workos/session_revoked.rbi +6 -6
  292. data/rbi/workos/update_object_request.rbi +30 -0
  293. data/rbi/workos/user_api_key.rbi +6 -0
  294. data/rbi/workos/user_api_key_with_value.rbi +6 -0
  295. data/rbi/workos/user_created.rbi +6 -6
  296. data/rbi/workos/user_deleted.rbi +6 -6
  297. data/rbi/workos/user_management.rbi +2 -90
  298. data/rbi/workos/user_updated.rbi +6 -6
  299. data/rbi/workos/vault.rbi +70 -95
  300. data/rbi/workos/vault_byok_key_deleted.rbi +6 -6
  301. data/rbi/workos/vault_byok_key_verification_completed.rbi +6 -6
  302. data/rbi/workos/vault_data_created.rbi +6 -6
  303. data/rbi/workos/vault_data_deleted.rbi +6 -6
  304. data/rbi/workos/vault_data_read.rbi +6 -6
  305. data/rbi/workos/vault_data_updated.rbi +6 -6
  306. data/rbi/workos/vault_dek_decrypted.rbi +6 -6
  307. data/rbi/workos/vault_dek_read.rbi +6 -6
  308. data/rbi/workos/vault_kek_created.rbi +6 -6
  309. data/rbi/workos/vault_metadata_read.rbi +6 -6
  310. data/rbi/workos/vault_names_listed.rbi +6 -6
  311. data/rbi/workos/waitlist_user_approved.rbi +6 -6
  312. data/rbi/workos/waitlist_user_created.rbi +6 -6
  313. data/rbi/workos/waitlist_user_denied.rbi +6 -6
  314. data/rbi/workos/webhook_endpoint.rbi +1 -0
  315. data/rbi/workos/webhooks.rbi +2 -2
  316. data/renovate.json +1 -1
  317. data/test/workos/test_model_round_trip.rb +577 -212
  318. data/test/workos/test_organization_membership_service.rb +107 -0
  319. data/test/workos/test_user_management.rb +0 -74
  320. data/test/workos/test_vault.rb +91 -87
  321. metadata +65 -41
  322. data/lib/workos/audit_logs/audit_log_schema_json.rb +0 -34
  323. data/lib/workos/organizations/audit_logs_retention_json.rb +0 -18
  324. data/lib/workos/types/audit_log_export_json_state.rb +0 -14
  325. data/lib/workos/types/webhook_endpoint_json_status.rb +0 -9
  326. data/lib/workos/user_management_organization_membership_groups.rb +0 -60
  327. data/lib/workos/webhooks/webhook_endpoint_json.rb +0 -40
  328. data/rbi/workos/actions.rbi +0 -48
  329. data/rbi/workos/audit_log_schema_json.rbi +0 -54
  330. data/rbi/workos/base_client.rbi +0 -132
  331. data/rbi/workos/configuration.rbi +0 -68
  332. data/rbi/workos/encryptors/aes_gcm.rbi +0 -19
  333. data/rbi/workos/errors.rbi +0 -43
  334. data/rbi/workos/hash_provider.rbi +0 -18
  335. data/rbi/workos/passwordless.rbi +0 -47
  336. data/rbi/workos/public_client.rbi +0 -12
  337. data/rbi/workos/session.rbi +0 -43
  338. data/rbi/workos/types/api_response.rbi +0 -29
  339. data/rbi/workos/types/base_model.rbi +0 -22
  340. data/rbi/workos/types/list_struct.rbi +0 -89
  341. data/rbi/workos/user_management_organization_membership_groups.rbi +0 -25
  342. data/rbi/workos/util.rbi +0 -12
  343. data/test/workos/test_user_management_organization_membership_groups.rb +0 -33
  344. /data/lib/workos/{user_management → organization_membership}/create_user_organization_membership.rb +0 -0
  345. /data/lib/workos/{user_management → organization_membership}/organization_membership.rb +0 -0
  346. /data/lib/workos/{user_management → organization_membership}/update_user_organization_membership.rb +0 -0
  347. /data/lib/workos/{user_management → organization_membership}/user_organization_membership.rb +0 -0
@@ -229,35 +229,35 @@ class ModelRoundTripTest < Minitest::Test
229
229
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
230
230
  end
231
231
 
232
- def test_audit_log_schema_actor_round_trip
232
+ def test_audit_log_schema_actor_input_round_trip
233
233
  fixture = {
234
234
  "metadata" => {}
235
235
  }
236
- model = WorkOS::AuditLogSchemaActor.new(fixture.to_json)
236
+ model = WorkOS::AuditLogSchemaActorInput.new(fixture.to_json)
237
237
  json = model.to_h
238
238
  assert_kind_of Hash, json
239
239
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
240
240
  end
241
241
 
242
- def test_audit_log_schema_target_round_trip
242
+ def test_audit_log_schema_target_input_round_trip
243
243
  fixture = {
244
244
  "type" => "stub",
245
245
  "metadata" => {}
246
246
  }
247
- model = WorkOS::AuditLogSchemaTarget.new(fixture.to_json)
247
+ model = WorkOS::AuditLogSchemaTargetInput.new(fixture.to_json)
248
248
  json = model.to_h
249
249
  assert_kind_of Hash, json
250
250
  assert_equal fixture["type"], json[:type]
251
251
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
252
252
  end
253
253
 
254
- def test_audit_log_schema_round_trip
254
+ def test_audit_log_schema_input_round_trip
255
255
  fixture = {
256
256
  "actor" => {},
257
257
  "targets" => [],
258
258
  "metadata" => {}
259
259
  }
260
- model = WorkOS::AuditLogSchema.new(fixture.to_json)
260
+ model = WorkOS::AuditLogSchemaInput.new(fixture.to_json)
261
261
  json = model.to_h
262
262
  assert_kind_of Hash, json
263
263
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -520,7 +520,8 @@ class ModelRoundTripTest < Minitest::Test
520
520
  def test_create_organization_api_key_round_trip
521
521
  fixture = {
522
522
  "name" => "stub",
523
- "permissions" => []
523
+ "permissions" => [],
524
+ "expires_at" => "stub"
524
525
  }
525
526
  model = WorkOS::CreateOrganizationApiKey.new(fixture.to_json)
526
527
  json = model.to_h
@@ -713,7 +714,8 @@ class ModelRoundTripTest < Minitest::Test
713
714
  fixture = {
714
715
  "name" => "stub",
715
716
  "organization_id" => "stub",
716
- "permissions" => []
717
+ "permissions" => [],
718
+ "expires_at" => "stub"
717
719
  }
718
720
  model = WorkOS::CreateUserApiKey.new(fixture.to_json)
719
721
  json = model.to_h
@@ -883,6 +885,214 @@ class ModelRoundTripTest < Minitest::Test
883
885
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
884
886
  end
885
887
 
888
+ def test_actor_round_trip
889
+ fixture = {
890
+ "id" => "stub",
891
+ "name" => "stub"
892
+ }
893
+ model = WorkOS::Actor.new(fixture.to_json)
894
+ json = model.to_h
895
+ assert_kind_of Hash, json
896
+ assert_equal fixture["id"], json[:id]
897
+ assert_equal fixture["name"], json[:name]
898
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
899
+ end
900
+
901
+ def test_create_data_key_request_round_trip
902
+ fixture = {
903
+ "context" => {}
904
+ }
905
+ model = WorkOS::CreateDataKeyRequest.new(fixture.to_json)
906
+ json = model.to_h
907
+ assert_kind_of Hash, json
908
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
909
+ end
910
+
911
+ def test_create_data_key_response_round_trip
912
+ fixture = {
913
+ "context" => {},
914
+ "data_key" => "stub",
915
+ "encrypted_keys" => "stub",
916
+ "id" => "stub"
917
+ }
918
+ model = WorkOS::CreateDataKeyResponse.new(fixture.to_json)
919
+ json = model.to_h
920
+ assert_kind_of Hash, json
921
+ assert_equal fixture["data_key"], json[:data_key]
922
+ assert_equal fixture["encrypted_keys"], json[:encrypted_keys]
923
+ assert_equal fixture["id"], json[:id]
924
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
925
+ end
926
+
927
+ def test_create_object_request_round_trip
928
+ fixture = {
929
+ "key_context" => {},
930
+ "name" => "stub",
931
+ "value" => "stub"
932
+ }
933
+ model = WorkOS::CreateObjectRequest.new(fixture.to_json)
934
+ json = model.to_h
935
+ assert_kind_of Hash, json
936
+ assert_equal fixture["name"], json[:name]
937
+ assert_equal fixture["value"], json[:value]
938
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
939
+ end
940
+
941
+ def test_decrypt_request_round_trip
942
+ fixture = {
943
+ "keys" => "stub"
944
+ }
945
+ model = WorkOS::DecryptRequest.new(fixture.to_json)
946
+ json = model.to_h
947
+ assert_kind_of Hash, json
948
+ assert_equal fixture["keys"], json[:keys]
949
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
950
+ end
951
+
952
+ def test_decrypt_response_round_trip
953
+ fixture = {
954
+ "data_key" => "stub",
955
+ "id" => "stub"
956
+ }
957
+ model = WorkOS::DecryptResponse.new(fixture.to_json)
958
+ json = model.to_h
959
+ assert_kind_of Hash, json
960
+ assert_equal fixture["data_key"], json[:data_key]
961
+ assert_equal fixture["id"], json[:id]
962
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
963
+ end
964
+
965
+ def test_delete_object_response_round_trip
966
+ fixture = {
967
+ "name" => "stub",
968
+ "success" => true
969
+ }
970
+ model = WorkOS::DeleteObjectResponse.new(fixture.to_json)
971
+ json = model.to_h
972
+ assert_kind_of Hash, json
973
+ assert_equal fixture["name"], json[:name]
974
+ assert_equal fixture["success"], json[:success]
975
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
976
+ end
977
+
978
+ def test_error_response_round_trip
979
+ fixture = {
980
+ "error" => "stub"
981
+ }
982
+ model = WorkOS::ErrorResponse.new(fixture.to_json)
983
+ json = model.to_h
984
+ assert_kind_of Hash, json
985
+ assert_equal fixture["error"], json[:error]
986
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
987
+ end
988
+
989
+ def test_object_round_trip
990
+ fixture = {
991
+ "id" => "stub",
992
+ "metadata" => {},
993
+ "name" => "stub",
994
+ "value" => "stub"
995
+ }
996
+ model = WorkOS::ObjectModel.new(fixture.to_json)
997
+ json = model.to_h
998
+ assert_kind_of Hash, json
999
+ assert_equal fixture["id"], json[:id]
1000
+ assert_equal fixture["name"], json[:name]
1001
+ assert_equal fixture["value"], json[:value]
1002
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1003
+ end
1004
+
1005
+ def test_object_metadata_round_trip
1006
+ fixture = {
1007
+ "context" => {},
1008
+ "environment_id" => "stub",
1009
+ "id" => "stub",
1010
+ "key_id" => "stub",
1011
+ "updated_at" => "stub",
1012
+ "updated_by" => {},
1013
+ "version_id" => nil
1014
+ }
1015
+ model = WorkOS::ObjectMetadata.new(fixture.to_json)
1016
+ json = model.to_h
1017
+ assert_kind_of Hash, json
1018
+ assert_equal fixture["environment_id"], json[:environment_id]
1019
+ assert_equal fixture["id"], json[:id]
1020
+ assert_equal fixture["key_id"], json[:key_id]
1021
+ assert_equal fixture["updated_at"], json[:updated_at]
1022
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1023
+ end
1024
+
1025
+ def test_object_summary_round_trip
1026
+ fixture = {
1027
+ "id" => "stub",
1028
+ "name" => "stub",
1029
+ "updated_at" => nil
1030
+ }
1031
+ model = WorkOS::ObjectSummary.new(fixture.to_json)
1032
+ json = model.to_h
1033
+ assert_kind_of Hash, json
1034
+ assert_equal fixture["id"], json[:id]
1035
+ assert_equal fixture["name"], json[:name]
1036
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1037
+ end
1038
+
1039
+ def test_object_version_round_trip
1040
+ fixture = {
1041
+ "created_at" => "stub",
1042
+ "current_version" => true,
1043
+ "etag" => "stub",
1044
+ "id" => "stub",
1045
+ "size" => 1
1046
+ }
1047
+ model = WorkOS::ObjectVersion.new(fixture.to_json)
1048
+ json = model.to_h
1049
+ assert_kind_of Hash, json
1050
+ assert_equal fixture["created_at"], json[:created_at]
1051
+ assert_equal fixture["current_version"], json[:current_version]
1052
+ assert_equal fixture["etag"], json[:etag]
1053
+ assert_equal fixture["id"], json[:id]
1054
+ assert_equal fixture["size"], json[:size]
1055
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1056
+ end
1057
+
1058
+ def test_object_without_value_round_trip
1059
+ fixture = {
1060
+ "id" => "stub",
1061
+ "metadata" => {},
1062
+ "name" => "stub"
1063
+ }
1064
+ model = WorkOS::ObjectWithoutValue.new(fixture.to_json)
1065
+ json = model.to_h
1066
+ assert_kind_of Hash, json
1067
+ assert_equal fixture["id"], json[:id]
1068
+ assert_equal fixture["name"], json[:name]
1069
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1070
+ end
1071
+
1072
+ def test_rekey_request_round_trip
1073
+ fixture = {
1074
+ "context" => {},
1075
+ "encrypted_keys" => "stub"
1076
+ }
1077
+ model = WorkOS::RekeyRequest.new(fixture.to_json)
1078
+ json = model.to_h
1079
+ assert_kind_of Hash, json
1080
+ assert_equal fixture["encrypted_keys"], json[:encrypted_keys]
1081
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1082
+ end
1083
+
1084
+ def test_update_object_request_round_trip
1085
+ fixture = {
1086
+ "value" => "stub",
1087
+ "version_check" => nil
1088
+ }
1089
+ model = WorkOS::UpdateObjectRequest.new(fixture.to_json)
1090
+ json = model.to_h
1091
+ assert_kind_of Hash, json
1092
+ assert_equal fixture["value"], json[:value]
1093
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1094
+ end
1095
+
886
1096
  def test_external_auth_complete_response_round_trip
887
1097
  fixture = {
888
1098
  "redirect_uri" => "stub"
@@ -902,6 +1112,7 @@ class ModelRoundTripTest < Minitest::Test
902
1112
  "name" => "stub",
903
1113
  "obfuscated_value" => "stub",
904
1114
  "last_used_at" => nil,
1115
+ "expires_at" => nil,
905
1116
  "permissions" => [],
906
1117
  "created_at" => "stub",
907
1118
  "updated_at" => "stub"
@@ -913,6 +1124,7 @@ class ModelRoundTripTest < Minitest::Test
913
1124
  assert_equal fixture["name"], json[:name]
914
1125
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
915
1126
  assert_nil json[:last_used_at]
1127
+ assert_nil json[:expires_at]
916
1128
  assert_equal fixture["created_at"], json[:created_at]
917
1129
  assert_equal fixture["updated_at"], json[:updated_at]
918
1130
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -929,6 +1141,73 @@ class ModelRoundTripTest < Minitest::Test
929
1141
  end
930
1142
 
931
1143
  def test_connect_application_round_trip
1144
+ fixture = {
1145
+ "object" => "connect_application",
1146
+ "id" => "stub",
1147
+ "client_id" => "stub",
1148
+ "description" => nil,
1149
+ "name" => "stub",
1150
+ "scopes" => [],
1151
+ "created_at" => "stub",
1152
+ "updated_at" => "stub"
1153
+ }
1154
+ model = WorkOS::ConnectApplication.new(fixture.to_json)
1155
+ json = model.to_h
1156
+ assert_kind_of Hash, json
1157
+ assert_equal fixture["id"], json[:id]
1158
+ assert_equal fixture["client_id"], json[:client_id]
1159
+ assert_nil json[:description]
1160
+ assert_equal fixture["name"], json[:name]
1161
+ assert_equal fixture["created_at"], json[:created_at]
1162
+ assert_equal fixture["updated_at"], json[:updated_at]
1163
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1164
+ end
1165
+
1166
+ def test_connect_application_oauth_round_trip
1167
+ fixture = {
1168
+ "object" => "connect_application",
1169
+ "id" => "stub",
1170
+ "client_id" => "stub",
1171
+ "description" => nil,
1172
+ "name" => "stub",
1173
+ "scopes" => [],
1174
+ "created_at" => "stub",
1175
+ "updated_at" => "stub",
1176
+ "application_type" => "oauth",
1177
+ "redirect_uris" => [],
1178
+ "uses_pkce" => true,
1179
+ "is_first_party" => true,
1180
+ "was_dynamically_registered" => true,
1181
+ "organization_id" => "stub"
1182
+ }
1183
+ model = WorkOS::ConnectApplicationOAuth.new(fixture.to_json)
1184
+ json = model.to_h
1185
+ assert_kind_of Hash, json
1186
+ assert_equal fixture["id"], json[:id]
1187
+ assert_equal fixture["client_id"], json[:client_id]
1188
+ assert_nil json[:description]
1189
+ assert_equal fixture["name"], json[:name]
1190
+ assert_equal fixture["created_at"], json[:created_at]
1191
+ assert_equal fixture["updated_at"], json[:updated_at]
1192
+ assert_equal fixture["uses_pkce"], json[:uses_pkce]
1193
+ assert_equal fixture["is_first_party"], json[:is_first_party]
1194
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1195
+ end
1196
+
1197
+ def test_connect_application_oauth_redirect_uris_round_trip
1198
+ fixture = {
1199
+ "uri" => "stub",
1200
+ "default" => true
1201
+ }
1202
+ model = WorkOS::ConnectApplicationOAuthRedirectUris.new(fixture.to_json)
1203
+ json = model.to_h
1204
+ assert_kind_of Hash, json
1205
+ assert_equal fixture["uri"], json[:uri]
1206
+ assert_equal fixture["default"], json[:default]
1207
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1208
+ end
1209
+
1210
+ def test_connect_application_m2m_round_trip
932
1211
  fixture = {
933
1212
  "object" => "connect_application",
934
1213
  "id" => "stub",
@@ -941,7 +1220,7 @@ class ModelRoundTripTest < Minitest::Test
941
1220
  "application_type" => "m2m",
942
1221
  "organization_id" => "stub"
943
1222
  }
944
- model = WorkOS::ConnectApplication.new(fixture.to_json)
1223
+ model = WorkOS::ConnectApplicationM2M.new(fixture.to_json)
945
1224
  json = model.to_h
946
1225
  assert_kind_of Hash, json
947
1226
  assert_equal fixture["id"], json[:id]
@@ -950,6 +1229,7 @@ class ModelRoundTripTest < Minitest::Test
950
1229
  assert_equal fixture["name"], json[:name]
951
1230
  assert_equal fixture["created_at"], json[:created_at]
952
1231
  assert_equal fixture["updated_at"], json[:updated_at]
1232
+ assert_equal fixture["organization_id"], json[:organization_id]
953
1233
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
954
1234
  end
955
1235
 
@@ -986,7 +1266,7 @@ class ModelRoundTripTest < Minitest::Test
986
1266
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
987
1267
  end
988
1268
 
989
- def test_audit_log_export_json_round_trip
1269
+ def test_audit_log_export_round_trip
990
1270
  fixture = {
991
1271
  "object" => "audit_log_export",
992
1272
  "id" => "stub",
@@ -995,7 +1275,7 @@ class ModelRoundTripTest < Minitest::Test
995
1275
  "created_at" => "stub",
996
1276
  "updated_at" => "stub"
997
1277
  }
998
- model = WorkOS::AuditLogExportJson.new(fixture.to_json)
1278
+ model = WorkOS::AuditLogExport.new(fixture.to_json)
999
1279
  json = model.to_h
1000
1280
  assert_kind_of Hash, json
1001
1281
  assert_equal fixture["id"], json[:id]
@@ -1004,18 +1284,18 @@ class ModelRoundTripTest < Minitest::Test
1004
1284
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1005
1285
  end
1006
1286
 
1007
- def test_audit_logs_retention_json_round_trip
1287
+ def test_audit_logs_retention_round_trip
1008
1288
  fixture = {
1009
1289
  "retention_period_in_days" => nil
1010
1290
  }
1011
- model = WorkOS::AuditLogsRetentionJson.new(fixture.to_json)
1291
+ model = WorkOS::AuditLogsRetention.new(fixture.to_json)
1012
1292
  json = model.to_h
1013
1293
  assert_kind_of Hash, json
1014
1294
  assert_nil json[:retention_period_in_days]
1015
1295
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1016
1296
  end
1017
1297
 
1018
- def test_audit_log_schema_json_round_trip
1298
+ def test_audit_log_schema_round_trip
1019
1299
  fixture = {
1020
1300
  "object" => "audit_log_schema",
1021
1301
  "version" => 1,
@@ -1024,7 +1304,7 @@ class ModelRoundTripTest < Minitest::Test
1024
1304
  "metadata" => {},
1025
1305
  "created_at" => "stub"
1026
1306
  }
1027
- model = WorkOS::AuditLogSchemaJson.new(fixture.to_json)
1307
+ model = WorkOS::AuditLogSchema.new(fixture.to_json)
1028
1308
  json = model.to_h
1029
1309
  assert_kind_of Hash, json
1030
1310
  assert_equal fixture["version"], json[:version]
@@ -1032,7 +1312,7 @@ class ModelRoundTripTest < Minitest::Test
1032
1312
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1033
1313
  end
1034
1314
 
1035
- def test_audit_log_action_json_round_trip
1315
+ def test_audit_log_action_round_trip
1036
1316
  fixture = {
1037
1317
  "object" => "audit_log_action",
1038
1318
  "name" => "stub",
@@ -1040,7 +1320,7 @@ class ModelRoundTripTest < Minitest::Test
1040
1320
  "created_at" => "stub",
1041
1321
  "updated_at" => "stub"
1042
1322
  }
1043
- model = WorkOS::AuditLogActionJson.new(fixture.to_json)
1323
+ model = WorkOS::AuditLogAction.new(fixture.to_json)
1044
1324
  json = model.to_h
1045
1325
  assert_kind_of Hash, json
1046
1326
  assert_equal fixture["name"], json[:name]
@@ -1501,6 +1781,32 @@ class ModelRoundTripTest < Minitest::Test
1501
1781
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1502
1782
  end
1503
1783
 
1784
+ def test_pipe_connected_account_round_trip
1785
+ fixture = {
1786
+ "object" => "connected_account",
1787
+ "id" => "stub",
1788
+ "data_integration_id" => "stub",
1789
+ "provider_slug" => "stub",
1790
+ "user_id" => nil,
1791
+ "organization_id" => nil,
1792
+ "scopes" => [],
1793
+ "state" => "stub",
1794
+ "created_at" => "stub",
1795
+ "updated_at" => "stub"
1796
+ }
1797
+ model = WorkOS::PipeConnectedAccount.new(fixture.to_json)
1798
+ json = model.to_h
1799
+ assert_kind_of Hash, json
1800
+ assert_equal fixture["id"], json[:id]
1801
+ assert_equal fixture["data_integration_id"], json[:data_integration_id]
1802
+ assert_equal fixture["provider_slug"], json[:provider_slug]
1803
+ assert_nil json[:user_id]
1804
+ assert_nil json[:organization_id]
1805
+ assert_equal fixture["created_at"], json[:created_at]
1806
+ assert_equal fixture["updated_at"], json[:updated_at]
1807
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1808
+ end
1809
+
1504
1810
  def test_waitlist_user_round_trip
1505
1811
  fixture = {
1506
1812
  "object" => "waitlist_user",
@@ -1542,12 +1848,12 @@ class ModelRoundTripTest < Minitest::Test
1542
1848
 
1543
1849
  def test_action_authentication_denied_round_trip
1544
1850
  fixture = {
1851
+ "object" => "event",
1545
1852
  "id" => "stub",
1546
1853
  "event" => "action.authentication.denied",
1547
1854
  "data" => {},
1548
- "context" => {},
1549
1855
  "created_at" => "stub",
1550
- "object" => "event"
1856
+ "context" => {}
1551
1857
  }
1552
1858
  model = WorkOS::ActionAuthenticationDenied.new(fixture.to_json)
1553
1859
  json = model.to_h
@@ -1584,12 +1890,12 @@ class ModelRoundTripTest < Minitest::Test
1584
1890
 
1585
1891
  def test_action_user_registration_denied_round_trip
1586
1892
  fixture = {
1893
+ "object" => "event",
1587
1894
  "id" => "stub",
1588
1895
  "event" => "action.user_registration.denied",
1589
1896
  "data" => {},
1590
- "context" => {},
1591
1897
  "created_at" => "stub",
1592
- "object" => "event"
1898
+ "context" => {}
1593
1899
  }
1594
1900
  model = WorkOS::ActionUserRegistrationDenied.new(fixture.to_json)
1595
1901
  json = model.to_h
@@ -1624,12 +1930,12 @@ class ModelRoundTripTest < Minitest::Test
1624
1930
 
1625
1931
  def test_api_key_created_round_trip
1626
1932
  fixture = {
1933
+ "object" => "event",
1627
1934
  "id" => "stub",
1628
1935
  "event" => "api_key.created",
1629
1936
  "data" => {},
1630
1937
  "created_at" => "stub",
1631
- "context" => {},
1632
- "object" => "event"
1938
+ "context" => {}
1633
1939
  }
1634
1940
  model = WorkOS::ApiKeyCreated.new(fixture.to_json)
1635
1941
  json = model.to_h
@@ -1647,6 +1953,7 @@ class ModelRoundTripTest < Minitest::Test
1647
1953
  "name" => "stub",
1648
1954
  "obfuscated_value" => "stub",
1649
1955
  "last_used_at" => nil,
1956
+ "expires_at" => nil,
1650
1957
  "permissions" => [],
1651
1958
  "created_at" => "stub",
1652
1959
  "updated_at" => "stub"
@@ -1691,12 +1998,12 @@ class ModelRoundTripTest < Minitest::Test
1691
1998
 
1692
1999
  def test_api_key_revoked_round_trip
1693
2000
  fixture = {
2001
+ "object" => "event",
1694
2002
  "id" => "stub",
1695
2003
  "event" => "api_key.revoked",
1696
2004
  "data" => {},
1697
2005
  "created_at" => "stub",
1698
- "context" => {},
1699
- "object" => "event"
2006
+ "context" => {}
1700
2007
  }
1701
2008
  model = WorkOS::ApiKeyRevoked.new(fixture.to_json)
1702
2009
  json = model.to_h
@@ -1714,6 +2021,7 @@ class ModelRoundTripTest < Minitest::Test
1714
2021
  "name" => "stub",
1715
2022
  "obfuscated_value" => "stub",
1716
2023
  "last_used_at" => nil,
2024
+ "expires_at" => nil,
1717
2025
  "permissions" => [],
1718
2026
  "created_at" => "stub",
1719
2027
  "updated_at" => "stub"
@@ -1758,12 +2066,12 @@ class ModelRoundTripTest < Minitest::Test
1758
2066
 
1759
2067
  def test_authentication_email_verification_failed_round_trip
1760
2068
  fixture = {
2069
+ "object" => "event",
1761
2070
  "id" => "stub",
1762
2071
  "event" => "authentication.email_verification_failed",
1763
2072
  "data" => {},
1764
2073
  "created_at" => "stub",
1765
- "context" => {},
1766
- "object" => "event"
2074
+ "context" => {}
1767
2075
  }
1768
2076
  model = WorkOS::AuthenticationEmailVerificationFailed.new(fixture.to_json)
1769
2077
  json = model.to_h
@@ -1808,12 +2116,12 @@ class ModelRoundTripTest < Minitest::Test
1808
2116
 
1809
2117
  def test_authentication_email_verification_succeeded_round_trip
1810
2118
  fixture = {
2119
+ "object" => "event",
1811
2120
  "id" => "stub",
1812
2121
  "event" => "authentication.email_verification_succeeded",
1813
2122
  "data" => {},
1814
2123
  "created_at" => "stub",
1815
- "context" => {},
1816
- "object" => "event"
2124
+ "context" => {}
1817
2125
  }
1818
2126
  model = WorkOS::AuthenticationEmailVerificationSucceeded.new(fixture.to_json)
1819
2127
  json = model.to_h
@@ -1844,12 +2152,12 @@ class ModelRoundTripTest < Minitest::Test
1844
2152
 
1845
2153
  def test_authentication_magic_auth_failed_round_trip
1846
2154
  fixture = {
2155
+ "object" => "event",
1847
2156
  "id" => "stub",
1848
2157
  "event" => "authentication.magic_auth_failed",
1849
2158
  "data" => {},
1850
2159
  "created_at" => "stub",
1851
- "context" => {},
1852
- "object" => "event"
2160
+ "context" => {}
1853
2161
  }
1854
2162
  model = WorkOS::AuthenticationMagicAuthFailed.new(fixture.to_json)
1855
2163
  json = model.to_h
@@ -1894,12 +2202,12 @@ class ModelRoundTripTest < Minitest::Test
1894
2202
 
1895
2203
  def test_authentication_magic_auth_succeeded_round_trip
1896
2204
  fixture = {
2205
+ "object" => "event",
1897
2206
  "id" => "stub",
1898
2207
  "event" => "authentication.magic_auth_succeeded",
1899
2208
  "data" => {},
1900
2209
  "created_at" => "stub",
1901
- "context" => {},
1902
- "object" => "event"
2210
+ "context" => {}
1903
2211
  }
1904
2212
  model = WorkOS::AuthenticationMagicAuthSucceeded.new(fixture.to_json)
1905
2213
  json = model.to_h
@@ -1930,12 +2238,12 @@ class ModelRoundTripTest < Minitest::Test
1930
2238
 
1931
2239
  def test_authentication_mfa_failed_round_trip
1932
2240
  fixture = {
2241
+ "object" => "event",
1933
2242
  "id" => "stub",
1934
2243
  "event" => "authentication.mfa_failed",
1935
2244
  "data" => {},
1936
2245
  "created_at" => "stub",
1937
- "context" => {},
1938
- "object" => "event"
2246
+ "context" => {}
1939
2247
  }
1940
2248
  model = WorkOS::AuthenticationMFAFailed.new(fixture.to_json)
1941
2249
  json = model.to_h
@@ -1980,12 +2288,12 @@ class ModelRoundTripTest < Minitest::Test
1980
2288
 
1981
2289
  def test_authentication_mfa_succeeded_round_trip
1982
2290
  fixture = {
2291
+ "object" => "event",
1983
2292
  "id" => "stub",
1984
2293
  "event" => "authentication.mfa_succeeded",
1985
2294
  "data" => {},
1986
2295
  "created_at" => "stub",
1987
- "context" => {},
1988
- "object" => "event"
2296
+ "context" => {}
1989
2297
  }
1990
2298
  model = WorkOS::AuthenticationMFASucceeded.new(fixture.to_json)
1991
2299
  json = model.to_h
@@ -2016,12 +2324,12 @@ class ModelRoundTripTest < Minitest::Test
2016
2324
 
2017
2325
  def test_authentication_oauth_failed_round_trip
2018
2326
  fixture = {
2327
+ "object" => "event",
2019
2328
  "id" => "stub",
2020
2329
  "event" => "authentication.oauth_failed",
2021
2330
  "data" => {},
2022
2331
  "created_at" => "stub",
2023
- "context" => {},
2024
- "object" => "event"
2332
+ "context" => {}
2025
2333
  }
2026
2334
  model = WorkOS::AuthenticationOAuthFailed.new(fixture.to_json)
2027
2335
  json = model.to_h
@@ -2066,12 +2374,12 @@ class ModelRoundTripTest < Minitest::Test
2066
2374
 
2067
2375
  def test_authentication_oauth_succeeded_round_trip
2068
2376
  fixture = {
2377
+ "object" => "event",
2069
2378
  "id" => "stub",
2070
2379
  "event" => "authentication.oauth_succeeded",
2071
2380
  "data" => {},
2072
2381
  "created_at" => "stub",
2073
- "context" => {},
2074
- "object" => "event"
2382
+ "context" => {}
2075
2383
  }
2076
2384
  model = WorkOS::AuthenticationOAuthSucceeded.new(fixture.to_json)
2077
2385
  json = model.to_h
@@ -2102,12 +2410,12 @@ class ModelRoundTripTest < Minitest::Test
2102
2410
 
2103
2411
  def test_authentication_passkey_failed_round_trip
2104
2412
  fixture = {
2413
+ "object" => "event",
2105
2414
  "id" => "stub",
2106
2415
  "event" => "authentication.passkey_failed",
2107
2416
  "data" => {},
2108
2417
  "created_at" => "stub",
2109
- "context" => {},
2110
- "object" => "event"
2418
+ "context" => {}
2111
2419
  }
2112
2420
  model = WorkOS::AuthenticationPasskeyFailed.new(fixture.to_json)
2113
2421
  json = model.to_h
@@ -2152,12 +2460,12 @@ class ModelRoundTripTest < Minitest::Test
2152
2460
 
2153
2461
  def test_authentication_passkey_succeeded_round_trip
2154
2462
  fixture = {
2463
+ "object" => "event",
2155
2464
  "id" => "stub",
2156
2465
  "event" => "authentication.passkey_succeeded",
2157
2466
  "data" => {},
2158
2467
  "created_at" => "stub",
2159
- "context" => {},
2160
- "object" => "event"
2468
+ "context" => {}
2161
2469
  }
2162
2470
  model = WorkOS::AuthenticationPasskeySucceeded.new(fixture.to_json)
2163
2471
  json = model.to_h
@@ -2188,12 +2496,12 @@ class ModelRoundTripTest < Minitest::Test
2188
2496
 
2189
2497
  def test_authentication_password_failed_round_trip
2190
2498
  fixture = {
2499
+ "object" => "event",
2191
2500
  "id" => "stub",
2192
2501
  "event" => "authentication.password_failed",
2193
2502
  "data" => {},
2194
2503
  "created_at" => "stub",
2195
- "context" => {},
2196
- "object" => "event"
2504
+ "context" => {}
2197
2505
  }
2198
2506
  model = WorkOS::AuthenticationPasswordFailed.new(fixture.to_json)
2199
2507
  json = model.to_h
@@ -2238,12 +2546,12 @@ class ModelRoundTripTest < Minitest::Test
2238
2546
 
2239
2547
  def test_authentication_password_succeeded_round_trip
2240
2548
  fixture = {
2549
+ "object" => "event",
2241
2550
  "id" => "stub",
2242
2551
  "event" => "authentication.password_succeeded",
2243
2552
  "data" => {},
2244
2553
  "created_at" => "stub",
2245
- "context" => {},
2246
- "object" => "event"
2554
+ "context" => {}
2247
2555
  }
2248
2556
  model = WorkOS::AuthenticationPasswordSucceeded.new(fixture.to_json)
2249
2557
  json = model.to_h
@@ -2274,12 +2582,12 @@ class ModelRoundTripTest < Minitest::Test
2274
2582
 
2275
2583
  def test_authentication_radar_risk_detected_round_trip
2276
2584
  fixture = {
2585
+ "object" => "event",
2277
2586
  "id" => "stub",
2278
2587
  "event" => "authentication.radar_risk_detected",
2279
2588
  "data" => {},
2280
2589
  "created_at" => "stub",
2281
- "context" => {},
2282
- "object" => "event"
2590
+ "context" => {}
2283
2591
  }
2284
2592
  model = WorkOS::AuthenticationRadarRiskDetected.new(fixture.to_json)
2285
2593
  json = model.to_h
@@ -2315,12 +2623,12 @@ class ModelRoundTripTest < Minitest::Test
2315
2623
 
2316
2624
  def test_authentication_sso_failed_round_trip
2317
2625
  fixture = {
2626
+ "object" => "event",
2318
2627
  "id" => "stub",
2319
2628
  "event" => "authentication.sso_failed",
2320
2629
  "data" => {},
2321
2630
  "created_at" => "stub",
2322
- "context" => {},
2323
- "object" => "event"
2631
+ "context" => {}
2324
2632
  }
2325
2633
  model = WorkOS::AuthenticationSSOFailed.new(fixture.to_json)
2326
2634
  json = model.to_h
@@ -2381,12 +2689,12 @@ class ModelRoundTripTest < Minitest::Test
2381
2689
 
2382
2690
  def test_authentication_sso_started_round_trip
2383
2691
  fixture = {
2692
+ "object" => "event",
2384
2693
  "id" => "stub",
2385
2694
  "event" => "authentication.sso_started",
2386
2695
  "data" => {},
2387
2696
  "created_at" => "stub",
2388
- "context" => {},
2389
- "object" => "event"
2697
+ "context" => {}
2390
2698
  }
2391
2699
  model = WorkOS::AuthenticationSSOStarted.new(fixture.to_json)
2392
2700
  json = model.to_h
@@ -2433,12 +2741,12 @@ class ModelRoundTripTest < Minitest::Test
2433
2741
 
2434
2742
  def test_authentication_sso_succeeded_round_trip
2435
2743
  fixture = {
2744
+ "object" => "event",
2436
2745
  "id" => "stub",
2437
2746
  "event" => "authentication.sso_succeeded",
2438
2747
  "data" => {},
2439
2748
  "created_at" => "stub",
2440
- "context" => {},
2441
- "object" => "event"
2749
+ "context" => {}
2442
2750
  }
2443
2751
  model = WorkOS::AuthenticationSSOSucceeded.new(fixture.to_json)
2444
2752
  json = model.to_h
@@ -2485,12 +2793,12 @@ class ModelRoundTripTest < Minitest::Test
2485
2793
 
2486
2794
  def test_authentication_sso_timed_out_round_trip
2487
2795
  fixture = {
2796
+ "object" => "event",
2488
2797
  "id" => "stub",
2489
2798
  "event" => "authentication.sso_timed_out",
2490
2799
  "data" => {},
2491
2800
  "created_at" => "stub",
2492
- "context" => {},
2493
- "object" => "event"
2801
+ "context" => {}
2494
2802
  }
2495
2803
  model = WorkOS::AuthenticationSSOTimedOut.new(fixture.to_json)
2496
2804
  json = model.to_h
@@ -2551,12 +2859,12 @@ class ModelRoundTripTest < Minitest::Test
2551
2859
 
2552
2860
  def test_connection_activated_round_trip
2553
2861
  fixture = {
2862
+ "object" => "event",
2554
2863
  "id" => "stub",
2555
2864
  "event" => "connection.activated",
2556
2865
  "data" => {},
2557
2866
  "created_at" => "stub",
2558
- "context" => {},
2559
- "object" => "event"
2867
+ "context" => {}
2560
2868
  }
2561
2869
  model = WorkOS::ConnectionActivated.new(fixture.to_json)
2562
2870
  json = model.to_h
@@ -2607,12 +2915,12 @@ class ModelRoundTripTest < Minitest::Test
2607
2915
 
2608
2916
  def test_connection_deactivated_round_trip
2609
2917
  fixture = {
2918
+ "object" => "event",
2610
2919
  "id" => "stub",
2611
2920
  "event" => "connection.deactivated",
2612
2921
  "data" => {},
2613
2922
  "created_at" => "stub",
2614
- "context" => {},
2615
- "object" => "event"
2923
+ "context" => {}
2616
2924
  }
2617
2925
  model = WorkOS::ConnectionDeactivated.new(fixture.to_json)
2618
2926
  json = model.to_h
@@ -2663,12 +2971,12 @@ class ModelRoundTripTest < Minitest::Test
2663
2971
 
2664
2972
  def test_connection_deleted_round_trip
2665
2973
  fixture = {
2974
+ "object" => "event",
2666
2975
  "id" => "stub",
2667
2976
  "event" => "connection.deleted",
2668
2977
  "data" => {},
2669
2978
  "created_at" => "stub",
2670
- "context" => {},
2671
- "object" => "event"
2979
+ "context" => {}
2672
2980
  }
2673
2981
  model = WorkOS::ConnectionDeleted.new(fixture.to_json)
2674
2982
  json = model.to_h
@@ -2701,12 +3009,12 @@ class ModelRoundTripTest < Minitest::Test
2701
3009
 
2702
3010
  def test_connection_saml_certificate_renewal_required_round_trip
2703
3011
  fixture = {
3012
+ "object" => "event",
2704
3013
  "id" => "stub",
2705
3014
  "event" => "connection.saml_certificate_renewal_required",
2706
3015
  "data" => {},
2707
3016
  "created_at" => "stub",
2708
- "context" => {},
2709
- "object" => "event"
3017
+ "context" => {}
2710
3018
  }
2711
3019
  model = WorkOS::ConnectionSAMLCertificateRenewalRequired.new(fixture.to_json)
2712
3020
  json = model.to_h
@@ -2757,12 +3065,12 @@ class ModelRoundTripTest < Minitest::Test
2757
3065
 
2758
3066
  def test_connection_saml_certificate_renewed_round_trip
2759
3067
  fixture = {
3068
+ "object" => "event",
2760
3069
  "id" => "stub",
2761
3070
  "event" => "connection.saml_certificate_renewed",
2762
3071
  "data" => {},
2763
3072
  "created_at" => "stub",
2764
- "context" => {},
2765
- "object" => "event"
3073
+ "context" => {}
2766
3074
  }
2767
3075
  model = WorkOS::ConnectionSAMLCertificateRenewed.new(fixture.to_json)
2768
3076
  json = model.to_h
@@ -2811,12 +3119,12 @@ class ModelRoundTripTest < Minitest::Test
2811
3119
 
2812
3120
  def test_dsync_activated_round_trip
2813
3121
  fixture = {
3122
+ "object" => "event",
2814
3123
  "id" => "stub",
2815
3124
  "event" => "dsync.activated",
2816
3125
  "data" => {},
2817
3126
  "created_at" => "stub",
2818
- "context" => {},
2819
- "object" => "event"
3127
+ "context" => {}
2820
3128
  }
2821
3129
  model = WorkOS::DsyncActivated.new(fixture.to_json)
2822
3130
  json = model.to_h
@@ -2866,12 +3174,12 @@ class ModelRoundTripTest < Minitest::Test
2866
3174
 
2867
3175
  def test_dsync_deactivated_round_trip
2868
3176
  fixture = {
3177
+ "object" => "event",
2869
3178
  "id" => "stub",
2870
3179
  "event" => "dsync.deactivated",
2871
3180
  "data" => {},
2872
3181
  "created_at" => "stub",
2873
- "context" => {},
2874
- "object" => "event"
3182
+ "context" => {}
2875
3183
  }
2876
3184
  model = WorkOS::DsyncDeactivated.new(fixture.to_json)
2877
3185
  json = model.to_h
@@ -2921,12 +3229,12 @@ class ModelRoundTripTest < Minitest::Test
2921
3229
 
2922
3230
  def test_dsync_deleted_round_trip
2923
3231
  fixture = {
3232
+ "object" => "event",
2924
3233
  "id" => "stub",
2925
3234
  "event" => "dsync.deleted",
2926
3235
  "data" => {},
2927
3236
  "created_at" => "stub",
2928
- "context" => {},
2929
- "object" => "event"
3237
+ "context" => {}
2930
3238
  }
2931
3239
  model = WorkOS::DsyncDeleted.new(fixture.to_json)
2932
3240
  json = model.to_h
@@ -2959,12 +3267,12 @@ class ModelRoundTripTest < Minitest::Test
2959
3267
 
2960
3268
  def test_dsync_group_created_round_trip
2961
3269
  fixture = {
3270
+ "object" => "event",
2962
3271
  "id" => "stub",
2963
3272
  "event" => "dsync.group.created",
2964
3273
  "data" => {},
2965
3274
  "created_at" => "stub",
2966
- "context" => {},
2967
- "object" => "event"
3275
+ "context" => {}
2968
3276
  }
2969
3277
  model = WorkOS::DsyncGroupCreated.new(fixture.to_json)
2970
3278
  json = model.to_h
@@ -2976,12 +3284,12 @@ class ModelRoundTripTest < Minitest::Test
2976
3284
 
2977
3285
  def test_dsync_group_deleted_round_trip
2978
3286
  fixture = {
3287
+ "object" => "event",
2979
3288
  "id" => "stub",
2980
3289
  "event" => "dsync.group.deleted",
2981
3290
  "data" => {},
2982
3291
  "created_at" => "stub",
2983
- "context" => {},
2984
- "object" => "event"
3292
+ "context" => {}
2985
3293
  }
2986
3294
  model = WorkOS::DsyncGroupDeleted.new(fixture.to_json)
2987
3295
  json = model.to_h
@@ -2993,12 +3301,12 @@ class ModelRoundTripTest < Minitest::Test
2993
3301
 
2994
3302
  def test_dsync_group_updated_round_trip
2995
3303
  fixture = {
3304
+ "object" => "event",
2996
3305
  "id" => "stub",
2997
3306
  "event" => "dsync.group.updated",
2998
3307
  "data" => {},
2999
3308
  "created_at" => "stub",
3000
- "context" => {},
3001
- "object" => "event"
3309
+ "context" => {}
3002
3310
  }
3003
3311
  model = WorkOS::DsyncGroupUpdated.new(fixture.to_json)
3004
3312
  json = model.to_h
@@ -3036,12 +3344,12 @@ class ModelRoundTripTest < Minitest::Test
3036
3344
 
3037
3345
  def test_dsync_group_user_added_round_trip
3038
3346
  fixture = {
3347
+ "object" => "event",
3039
3348
  "id" => "stub",
3040
3349
  "event" => "dsync.group.user_added",
3041
3350
  "data" => {},
3042
3351
  "created_at" => "stub",
3043
- "context" => {},
3044
- "object" => "event"
3352
+ "context" => {}
3045
3353
  }
3046
3354
  model = WorkOS::DsyncGroupUserAdded.new(fixture.to_json)
3047
3355
  json = model.to_h
@@ -3066,12 +3374,12 @@ class ModelRoundTripTest < Minitest::Test
3066
3374
 
3067
3375
  def test_dsync_user_created_round_trip
3068
3376
  fixture = {
3377
+ "object" => "event",
3069
3378
  "id" => "stub",
3070
3379
  "event" => "dsync.user.created",
3071
3380
  "data" => {},
3072
3381
  "created_at" => "stub",
3073
- "context" => {},
3074
- "object" => "event"
3382
+ "context" => {}
3075
3383
  }
3076
3384
  model = WorkOS::DsyncUserCreated.new(fixture.to_json)
3077
3385
  json = model.to_h
@@ -3083,12 +3391,12 @@ class ModelRoundTripTest < Minitest::Test
3083
3391
 
3084
3392
  def test_dsync_user_deleted_round_trip
3085
3393
  fixture = {
3394
+ "object" => "event",
3086
3395
  "id" => "stub",
3087
3396
  "event" => "dsync.user.deleted",
3088
3397
  "data" => {},
3089
3398
  "created_at" => "stub",
3090
- "context" => {},
3091
- "object" => "event"
3399
+ "context" => {}
3092
3400
  }
3093
3401
  model = WorkOS::DsyncUserDeleted.new(fixture.to_json)
3094
3402
  json = model.to_h
@@ -3100,12 +3408,12 @@ class ModelRoundTripTest < Minitest::Test
3100
3408
 
3101
3409
  def test_dsync_group_user_removed_round_trip
3102
3410
  fixture = {
3411
+ "object" => "event",
3103
3412
  "id" => "stub",
3104
3413
  "event" => "dsync.group.user_removed",
3105
3414
  "data" => {},
3106
3415
  "created_at" => "stub",
3107
- "context" => {},
3108
- "object" => "event"
3416
+ "context" => {}
3109
3417
  }
3110
3418
  model = WorkOS::DsyncGroupUserRemoved.new(fixture.to_json)
3111
3419
  json = model.to_h
@@ -3130,12 +3438,12 @@ class ModelRoundTripTest < Minitest::Test
3130
3438
 
3131
3439
  def test_dsync_user_updated_round_trip
3132
3440
  fixture = {
3441
+ "object" => "event",
3133
3442
  "id" => "stub",
3134
3443
  "event" => "dsync.user.updated",
3135
3444
  "data" => {},
3136
3445
  "created_at" => "stub",
3137
- "context" => {},
3138
- "object" => "event"
3446
+ "context" => {}
3139
3447
  }
3140
3448
  model = WorkOS::DsyncUserUpdated.new(fixture.to_json)
3141
3449
  json = model.to_h
@@ -3195,12 +3503,12 @@ class ModelRoundTripTest < Minitest::Test
3195
3503
 
3196
3504
  def test_email_verification_created_round_trip
3197
3505
  fixture = {
3506
+ "object" => "event",
3198
3507
  "id" => "stub",
3199
3508
  "event" => "email_verification.created",
3200
3509
  "data" => {},
3201
3510
  "created_at" => "stub",
3202
- "context" => {},
3203
- "object" => "event"
3511
+ "context" => {}
3204
3512
  }
3205
3513
  model = WorkOS::EmailVerificationCreated.new(fixture.to_json)
3206
3514
  json = model.to_h
@@ -3234,12 +3542,12 @@ class ModelRoundTripTest < Minitest::Test
3234
3542
 
3235
3543
  def test_flag_created_round_trip
3236
3544
  fixture = {
3545
+ "object" => "event",
3237
3546
  "id" => "stub",
3238
3547
  "event" => "flag.created",
3239
3548
  "data" => {},
3240
3549
  "created_at" => "stub",
3241
- "context" => {},
3242
- "object" => "event"
3550
+ "context" => {}
3243
3551
  }
3244
3552
  model = WorkOS::FlagCreated.new(fixture.to_json)
3245
3553
  json = model.to_h
@@ -3322,12 +3630,12 @@ class ModelRoundTripTest < Minitest::Test
3322
3630
 
3323
3631
  def test_flag_deleted_round_trip
3324
3632
  fixture = {
3633
+ "object" => "event",
3325
3634
  "id" => "stub",
3326
3635
  "event" => "flag.deleted",
3327
3636
  "data" => {},
3328
3637
  "created_at" => "stub",
3329
- "context" => {},
3330
- "object" => "event"
3638
+ "context" => {}
3331
3639
  }
3332
3640
  model = WorkOS::FlagDeleted.new(fixture.to_json)
3333
3641
  json = model.to_h
@@ -3410,12 +3718,12 @@ class ModelRoundTripTest < Minitest::Test
3410
3718
 
3411
3719
  def test_flag_rule_updated_round_trip
3412
3720
  fixture = {
3721
+ "object" => "event",
3413
3722
  "id" => "stub",
3414
3723
  "event" => "flag.rule_updated",
3415
3724
  "data" => {},
3416
3725
  "created_at" => "stub",
3417
- "context" => {},
3418
- "object" => "event"
3726
+ "context" => {}
3419
3727
  }
3420
3728
  model = WorkOS::FlagRuleUpdated.new(fixture.to_json)
3421
3729
  json = model.to_h
@@ -3608,12 +3916,12 @@ class ModelRoundTripTest < Minitest::Test
3608
3916
 
3609
3917
  def test_flag_updated_round_trip
3610
3918
  fixture = {
3919
+ "object" => "event",
3611
3920
  "id" => "stub",
3612
3921
  "event" => "flag.updated",
3613
3922
  "data" => {},
3614
3923
  "created_at" => "stub",
3615
- "context" => {},
3616
- "object" => "event"
3924
+ "context" => {}
3617
3925
  }
3618
3926
  model = WorkOS::FlagUpdated.new(fixture.to_json)
3619
3927
  json = model.to_h
@@ -3721,12 +4029,12 @@ class ModelRoundTripTest < Minitest::Test
3721
4029
 
3722
4030
  def test_group_created_round_trip
3723
4031
  fixture = {
4032
+ "object" => "event",
3724
4033
  "id" => "stub",
3725
4034
  "event" => "group.created",
3726
4035
  "data" => {},
3727
4036
  "created_at" => "stub",
3728
- "context" => {},
3729
- "object" => "event"
4037
+ "context" => {}
3730
4038
  }
3731
4039
  model = WorkOS::GroupCreated.new(fixture.to_json)
3732
4040
  json = model.to_h
@@ -3738,12 +4046,12 @@ class ModelRoundTripTest < Minitest::Test
3738
4046
 
3739
4047
  def test_group_deleted_round_trip
3740
4048
  fixture = {
4049
+ "object" => "event",
3741
4050
  "id" => "stub",
3742
4051
  "event" => "group.deleted",
3743
4052
  "data" => {},
3744
4053
  "created_at" => "stub",
3745
- "context" => {},
3746
- "object" => "event"
4054
+ "context" => {}
3747
4055
  }
3748
4056
  model = WorkOS::GroupDeleted.new(fixture.to_json)
3749
4057
  json = model.to_h
@@ -3755,12 +4063,12 @@ class ModelRoundTripTest < Minitest::Test
3755
4063
 
3756
4064
  def test_group_member_added_round_trip
3757
4065
  fixture = {
4066
+ "object" => "event",
3758
4067
  "id" => "stub",
3759
4068
  "event" => "group.member_added",
3760
4069
  "data" => {},
3761
4070
  "created_at" => "stub",
3762
- "context" => {},
3763
- "object" => "event"
4071
+ "context" => {}
3764
4072
  }
3765
4073
  model = WorkOS::GroupMemberAdded.new(fixture.to_json)
3766
4074
  json = model.to_h
@@ -3785,12 +4093,12 @@ class ModelRoundTripTest < Minitest::Test
3785
4093
 
3786
4094
  def test_group_member_removed_round_trip
3787
4095
  fixture = {
4096
+ "object" => "event",
3788
4097
  "id" => "stub",
3789
4098
  "event" => "group.member_removed",
3790
4099
  "data" => {},
3791
4100
  "created_at" => "stub",
3792
- "context" => {},
3793
- "object" => "event"
4101
+ "context" => {}
3794
4102
  }
3795
4103
  model = WorkOS::GroupMemberRemoved.new(fixture.to_json)
3796
4104
  json = model.to_h
@@ -3815,12 +4123,12 @@ class ModelRoundTripTest < Minitest::Test
3815
4123
 
3816
4124
  def test_group_updated_round_trip
3817
4125
  fixture = {
4126
+ "object" => "event",
3818
4127
  "id" => "stub",
3819
4128
  "event" => "group.updated",
3820
4129
  "data" => {},
3821
4130
  "created_at" => "stub",
3822
- "context" => {},
3823
- "object" => "event"
4131
+ "context" => {}
3824
4132
  }
3825
4133
  model = WorkOS::GroupUpdated.new(fixture.to_json)
3826
4134
  json = model.to_h
@@ -3832,12 +4140,12 @@ class ModelRoundTripTest < Minitest::Test
3832
4140
 
3833
4141
  def test_invitation_accepted_round_trip
3834
4142
  fixture = {
4143
+ "object" => "event",
3835
4144
  "id" => "stub",
3836
4145
  "event" => "invitation.accepted",
3837
4146
  "data" => {},
3838
4147
  "created_at" => "stub",
3839
- "context" => {},
3840
- "object" => "event"
4148
+ "context" => {}
3841
4149
  }
3842
4150
  model = WorkOS::InvitationAccepted.new(fixture.to_json)
3843
4151
  json = model.to_h
@@ -3882,12 +4190,12 @@ class ModelRoundTripTest < Minitest::Test
3882
4190
 
3883
4191
  def test_invitation_created_round_trip
3884
4192
  fixture = {
4193
+ "object" => "event",
3885
4194
  "id" => "stub",
3886
4195
  "event" => "invitation.created",
3887
4196
  "data" => {},
3888
4197
  "created_at" => "stub",
3889
- "context" => {},
3890
- "object" => "event"
4198
+ "context" => {}
3891
4199
  }
3892
4200
  model = WorkOS::InvitationCreated.new(fixture.to_json)
3893
4201
  json = model.to_h
@@ -3932,12 +4240,12 @@ class ModelRoundTripTest < Minitest::Test
3932
4240
 
3933
4241
  def test_invitation_resent_round_trip
3934
4242
  fixture = {
4243
+ "object" => "event",
3935
4244
  "id" => "stub",
3936
4245
  "event" => "invitation.resent",
3937
4246
  "data" => {},
3938
4247
  "created_at" => "stub",
3939
- "context" => {},
3940
- "object" => "event"
4248
+ "context" => {}
3941
4249
  }
3942
4250
  model = WorkOS::InvitationResent.new(fixture.to_json)
3943
4251
  json = model.to_h
@@ -3982,12 +4290,12 @@ class ModelRoundTripTest < Minitest::Test
3982
4290
 
3983
4291
  def test_invitation_revoked_round_trip
3984
4292
  fixture = {
4293
+ "object" => "event",
3985
4294
  "id" => "stub",
3986
4295
  "event" => "invitation.revoked",
3987
4296
  "data" => {},
3988
4297
  "created_at" => "stub",
3989
- "context" => {},
3990
- "object" => "event"
4298
+ "context" => {}
3991
4299
  }
3992
4300
  model = WorkOS::InvitationRevoked.new(fixture.to_json)
3993
4301
  json = model.to_h
@@ -4032,12 +4340,12 @@ class ModelRoundTripTest < Minitest::Test
4032
4340
 
4033
4341
  def test_magic_auth_created_round_trip
4034
4342
  fixture = {
4343
+ "object" => "event",
4035
4344
  "id" => "stub",
4036
4345
  "event" => "magic_auth.created",
4037
4346
  "data" => {},
4038
4347
  "created_at" => "stub",
4039
- "context" => {},
4040
- "object" => "event"
4348
+ "context" => {}
4041
4349
  }
4042
4350
  model = WorkOS::MagicAuthCreated.new(fixture.to_json)
4043
4351
  json = model.to_h
@@ -4071,12 +4379,12 @@ class ModelRoundTripTest < Minitest::Test
4071
4379
 
4072
4380
  def test_organization_created_round_trip
4073
4381
  fixture = {
4382
+ "object" => "event",
4074
4383
  "id" => "stub",
4075
4384
  "event" => "organization.created",
4076
4385
  "data" => {},
4077
4386
  "created_at" => "stub",
4078
- "context" => {},
4079
- "object" => "event"
4387
+ "context" => {}
4080
4388
  }
4081
4389
  model = WorkOS::OrganizationCreated.new(fixture.to_json)
4082
4390
  json = model.to_h
@@ -4135,12 +4443,12 @@ class ModelRoundTripTest < Minitest::Test
4135
4443
 
4136
4444
  def test_organization_deleted_round_trip
4137
4445
  fixture = {
4446
+ "object" => "event",
4138
4447
  "id" => "stub",
4139
4448
  "event" => "organization.deleted",
4140
4449
  "data" => {},
4141
4450
  "created_at" => "stub",
4142
- "context" => {},
4143
- "object" => "event"
4451
+ "context" => {}
4144
4452
  }
4145
4453
  model = WorkOS::OrganizationDeleted.new(fixture.to_json)
4146
4454
  json = model.to_h
@@ -4199,12 +4507,12 @@ class ModelRoundTripTest < Minitest::Test
4199
4507
 
4200
4508
  def test_organization_domain_created_round_trip
4201
4509
  fixture = {
4510
+ "object" => "event",
4202
4511
  "id" => "stub",
4203
4512
  "event" => "organization_domain.created",
4204
4513
  "data" => {},
4205
4514
  "created_at" => "stub",
4206
- "context" => {},
4207
- "object" => "event"
4515
+ "context" => {}
4208
4516
  }
4209
4517
  model = WorkOS::OrganizationDomainCreated.new(fixture.to_json)
4210
4518
  json = model.to_h
@@ -4240,12 +4548,12 @@ class ModelRoundTripTest < Minitest::Test
4240
4548
 
4241
4549
  def test_organization_domain_deleted_round_trip
4242
4550
  fixture = {
4551
+ "object" => "event",
4243
4552
  "id" => "stub",
4244
4553
  "event" => "organization_domain.deleted",
4245
4554
  "data" => {},
4246
4555
  "created_at" => "stub",
4247
- "context" => {},
4248
- "object" => "event"
4556
+ "context" => {}
4249
4557
  }
4250
4558
  model = WorkOS::OrganizationDomainDeleted.new(fixture.to_json)
4251
4559
  json = model.to_h
@@ -4281,12 +4589,12 @@ class ModelRoundTripTest < Minitest::Test
4281
4589
 
4282
4590
  def test_organization_domain_updated_round_trip
4283
4591
  fixture = {
4592
+ "object" => "event",
4284
4593
  "id" => "stub",
4285
4594
  "event" => "organization_domain.updated",
4286
4595
  "data" => {},
4287
4596
  "created_at" => "stub",
4288
- "context" => {},
4289
- "object" => "event"
4597
+ "context" => {}
4290
4598
  }
4291
4599
  model = WorkOS::OrganizationDomainUpdated.new(fixture.to_json)
4292
4600
  json = model.to_h
@@ -4322,12 +4630,12 @@ class ModelRoundTripTest < Minitest::Test
4322
4630
 
4323
4631
  def test_organization_domain_verification_failed_round_trip
4324
4632
  fixture = {
4633
+ "object" => "event",
4325
4634
  "id" => "stub",
4326
4635
  "event" => "organization_domain.verification_failed",
4327
4636
  "data" => {},
4328
4637
  "created_at" => "stub",
4329
- "context" => {},
4330
- "object" => "event"
4638
+ "context" => {}
4331
4639
  }
4332
4640
  model = WorkOS::OrganizationDomainVerificationFailed.new(fixture.to_json)
4333
4641
  json = model.to_h
@@ -4374,12 +4682,12 @@ class ModelRoundTripTest < Minitest::Test
4374
4682
 
4375
4683
  def test_organization_domain_verified_round_trip
4376
4684
  fixture = {
4685
+ "object" => "event",
4377
4686
  "id" => "stub",
4378
4687
  "event" => "organization_domain.verified",
4379
4688
  "data" => {},
4380
4689
  "created_at" => "stub",
4381
- "context" => {},
4382
- "object" => "event"
4690
+ "context" => {}
4383
4691
  }
4384
4692
  model = WorkOS::OrganizationDomainVerified.new(fixture.to_json)
4385
4693
  json = model.to_h
@@ -4415,12 +4723,12 @@ class ModelRoundTripTest < Minitest::Test
4415
4723
 
4416
4724
  def test_organization_membership_created_round_trip
4417
4725
  fixture = {
4726
+ "object" => "event",
4418
4727
  "id" => "stub",
4419
4728
  "event" => "organization_membership.created",
4420
4729
  "data" => {},
4421
4730
  "created_at" => "stub",
4422
- "context" => {},
4423
- "object" => "event"
4731
+ "context" => {}
4424
4732
  }
4425
4733
  model = WorkOS::OrganizationMembershipCreated.new(fixture.to_json)
4426
4734
  json = model.to_h
@@ -4458,12 +4766,12 @@ class ModelRoundTripTest < Minitest::Test
4458
4766
 
4459
4767
  def test_organization_membership_deleted_round_trip
4460
4768
  fixture = {
4769
+ "object" => "event",
4461
4770
  "id" => "stub",
4462
4771
  "event" => "organization_membership.deleted",
4463
4772
  "data" => {},
4464
4773
  "created_at" => "stub",
4465
- "context" => {},
4466
- "object" => "event"
4774
+ "context" => {}
4467
4775
  }
4468
4776
  model = WorkOS::OrganizationMembershipDeleted.new(fixture.to_json)
4469
4777
  json = model.to_h
@@ -4501,12 +4809,12 @@ class ModelRoundTripTest < Minitest::Test
4501
4809
 
4502
4810
  def test_organization_membership_updated_round_trip
4503
4811
  fixture = {
4812
+ "object" => "event",
4504
4813
  "id" => "stub",
4505
4814
  "event" => "organization_membership.updated",
4506
4815
  "data" => {},
4507
4816
  "created_at" => "stub",
4508
- "context" => {},
4509
- "object" => "event"
4817
+ "context" => {}
4510
4818
  }
4511
4819
  model = WorkOS::OrganizationMembershipUpdated.new(fixture.to_json)
4512
4820
  json = model.to_h
@@ -4544,12 +4852,12 @@ class ModelRoundTripTest < Minitest::Test
4544
4852
 
4545
4853
  def test_organization_role_created_round_trip
4546
4854
  fixture = {
4855
+ "object" => "event",
4547
4856
  "id" => "stub",
4548
4857
  "event" => "organization_role.created",
4549
4858
  "data" => {},
4550
4859
  "created_at" => "stub",
4551
- "context" => {},
4552
- "object" => "event"
4860
+ "context" => {}
4553
4861
  }
4554
4862
  model = WorkOS::OrganizationRoleCreated.new(fixture.to_json)
4555
4863
  json = model.to_h
@@ -4586,12 +4894,12 @@ class ModelRoundTripTest < Minitest::Test
4586
4894
 
4587
4895
  def test_organization_role_deleted_round_trip
4588
4896
  fixture = {
4897
+ "object" => "event",
4589
4898
  "id" => "stub",
4590
4899
  "event" => "organization_role.deleted",
4591
4900
  "data" => {},
4592
4901
  "created_at" => "stub",
4593
- "context" => {},
4594
- "object" => "event"
4902
+ "context" => {}
4595
4903
  }
4596
4904
  model = WorkOS::OrganizationRoleDeleted.new(fixture.to_json)
4597
4905
  json = model.to_h
@@ -4628,12 +4936,12 @@ class ModelRoundTripTest < Minitest::Test
4628
4936
 
4629
4937
  def test_organization_role_updated_round_trip
4630
4938
  fixture = {
4939
+ "object" => "event",
4631
4940
  "id" => "stub",
4632
4941
  "event" => "organization_role.updated",
4633
4942
  "data" => {},
4634
4943
  "created_at" => "stub",
4635
- "context" => {},
4636
- "object" => "event"
4944
+ "context" => {}
4637
4945
  }
4638
4946
  model = WorkOS::OrganizationRoleUpdated.new(fixture.to_json)
4639
4947
  json = model.to_h
@@ -4670,12 +4978,12 @@ class ModelRoundTripTest < Minitest::Test
4670
4978
 
4671
4979
  def test_organization_updated_round_trip
4672
4980
  fixture = {
4981
+ "object" => "event",
4673
4982
  "id" => "stub",
4674
4983
  "event" => "organization.updated",
4675
4984
  "data" => {},
4676
4985
  "created_at" => "stub",
4677
- "context" => {},
4678
- "object" => "event"
4986
+ "context" => {}
4679
4987
  }
4680
4988
  model = WorkOS::OrganizationUpdated.new(fixture.to_json)
4681
4989
  json = model.to_h
@@ -4734,12 +5042,12 @@ class ModelRoundTripTest < Minitest::Test
4734
5042
 
4735
5043
  def test_password_reset_created_round_trip
4736
5044
  fixture = {
5045
+ "object" => "event",
4737
5046
  "id" => "stub",
4738
5047
  "event" => "password_reset.created",
4739
5048
  "data" => {},
4740
5049
  "created_at" => "stub",
4741
- "context" => {},
4742
- "object" => "event"
5050
+ "context" => {}
4743
5051
  }
4744
5052
  model = WorkOS::PasswordResetCreated.new(fixture.to_json)
4745
5053
  json = model.to_h
@@ -4771,12 +5079,12 @@ class ModelRoundTripTest < Minitest::Test
4771
5079
 
4772
5080
  def test_password_reset_succeeded_round_trip
4773
5081
  fixture = {
5082
+ "object" => "event",
4774
5083
  "id" => "stub",
4775
5084
  "event" => "password_reset.succeeded",
4776
5085
  "data" => {},
4777
5086
  "created_at" => "stub",
4778
- "context" => {},
4779
- "object" => "event"
5087
+ "context" => {}
4780
5088
  }
4781
5089
  model = WorkOS::PasswordResetSucceeded.new(fixture.to_json)
4782
5090
  json = model.to_h
@@ -4808,12 +5116,12 @@ class ModelRoundTripTest < Minitest::Test
4808
5116
 
4809
5117
  def test_permission_created_round_trip
4810
5118
  fixture = {
5119
+ "object" => "event",
4811
5120
  "id" => "stub",
4812
5121
  "event" => "permission.created",
4813
5122
  "data" => {},
4814
5123
  "created_at" => "stub",
4815
- "context" => {},
4816
- "object" => "event"
5124
+ "context" => {}
4817
5125
  }
4818
5126
  model = WorkOS::PermissionCreated.new(fixture.to_json)
4819
5127
  json = model.to_h
@@ -4849,12 +5157,12 @@ class ModelRoundTripTest < Minitest::Test
4849
5157
 
4850
5158
  def test_permission_deleted_round_trip
4851
5159
  fixture = {
5160
+ "object" => "event",
4852
5161
  "id" => "stub",
4853
5162
  "event" => "permission.deleted",
4854
5163
  "data" => {},
4855
5164
  "created_at" => "stub",
4856
- "context" => {},
4857
- "object" => "event"
5165
+ "context" => {}
4858
5166
  }
4859
5167
  model = WorkOS::PermissionDeleted.new(fixture.to_json)
4860
5168
  json = model.to_h
@@ -4890,12 +5198,12 @@ class ModelRoundTripTest < Minitest::Test
4890
5198
 
4891
5199
  def test_permission_updated_round_trip
4892
5200
  fixture = {
5201
+ "object" => "event",
4893
5202
  "id" => "stub",
4894
5203
  "event" => "permission.updated",
4895
5204
  "data" => {},
4896
5205
  "created_at" => "stub",
4897
- "context" => {},
4898
- "object" => "event"
5206
+ "context" => {}
4899
5207
  }
4900
5208
  model = WorkOS::PermissionUpdated.new(fixture.to_json)
4901
5209
  json = model.to_h
@@ -4929,14 +5237,65 @@ class ModelRoundTripTest < Minitest::Test
4929
5237
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
4930
5238
  end
4931
5239
 
5240
+ def test_pipes_connected_account_connected_round_trip
5241
+ fixture = {
5242
+ "object" => "event",
5243
+ "id" => "stub",
5244
+ "event" => "pipes.connected_account.connected",
5245
+ "data" => {},
5246
+ "created_at" => "stub",
5247
+ "context" => {}
5248
+ }
5249
+ model = WorkOS::PipesConnectedAccountConnected.new(fixture.to_json)
5250
+ json = model.to_h
5251
+ assert_kind_of Hash, json
5252
+ assert_equal fixture["id"], json[:id]
5253
+ assert_equal fixture["created_at"], json[:created_at]
5254
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
5255
+ end
5256
+
5257
+ def test_pipes_connected_account_disconnected_round_trip
5258
+ fixture = {
5259
+ "object" => "event",
5260
+ "id" => "stub",
5261
+ "event" => "pipes.connected_account.disconnected",
5262
+ "data" => {},
5263
+ "created_at" => "stub",
5264
+ "context" => {}
5265
+ }
5266
+ model = WorkOS::PipesConnectedAccountDisconnected.new(fixture.to_json)
5267
+ json = model.to_h
5268
+ assert_kind_of Hash, json
5269
+ assert_equal fixture["id"], json[:id]
5270
+ assert_equal fixture["created_at"], json[:created_at]
5271
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
5272
+ end
5273
+
5274
+ def test_pipes_connected_account_reauthorization_needed_round_trip
5275
+ fixture = {
5276
+ "object" => "event",
5277
+ "id" => "stub",
5278
+ "event" => "pipes.connected_account.reauthorization_needed",
5279
+ "data" => {},
5280
+ "created_at" => "stub",
5281
+ "context" => {}
5282
+ }
5283
+ model = WorkOS::PipesConnectedAccountReauthorizationNeeded.new(fixture.to_json)
5284
+ json = model.to_h
5285
+ assert_kind_of Hash, json
5286
+ assert_equal fixture["id"], json[:id]
5287
+ assert_equal fixture["created_at"], json[:created_at]
5288
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
5289
+ end
5290
+
4932
5291
  def test_role_created_round_trip
4933
5292
  fixture = {
5293
+ "object" => "event",
4934
5294
  "id" => "stub",
4935
5295
  "event" => "role.created",
4936
5296
  "data" => {},
4937
5297
  "created_at" => "stub",
4938
- "context" => {},
4939
- "object" => "event"
5298
+ "context" => {}
4940
5299
  }
4941
5300
  model = WorkOS::RoleCreated.new(fixture.to_json)
4942
5301
  json = model.to_h
@@ -4967,12 +5326,12 @@ class ModelRoundTripTest < Minitest::Test
4967
5326
 
4968
5327
  def test_role_deleted_round_trip
4969
5328
  fixture = {
5329
+ "object" => "event",
4970
5330
  "id" => "stub",
4971
5331
  "event" => "role.deleted",
4972
5332
  "data" => {},
4973
5333
  "created_at" => "stub",
4974
- "context" => {},
4975
- "object" => "event"
5334
+ "context" => {}
4976
5335
  }
4977
5336
  model = WorkOS::RoleDeleted.new(fixture.to_json)
4978
5337
  json = model.to_h
@@ -5003,12 +5362,12 @@ class ModelRoundTripTest < Minitest::Test
5003
5362
 
5004
5363
  def test_role_updated_round_trip
5005
5364
  fixture = {
5365
+ "object" => "event",
5006
5366
  "id" => "stub",
5007
5367
  "event" => "role.updated",
5008
5368
  "data" => {},
5009
5369
  "created_at" => "stub",
5010
- "context" => {},
5011
- "object" => "event"
5370
+ "context" => {}
5012
5371
  }
5013
5372
  model = WorkOS::RoleUpdated.new(fixture.to_json)
5014
5373
  json = model.to_h
@@ -5039,12 +5398,12 @@ class ModelRoundTripTest < Minitest::Test
5039
5398
 
5040
5399
  def test_session_created_round_trip
5041
5400
  fixture = {
5401
+ "object" => "event",
5042
5402
  "id" => "stub",
5043
5403
  "event" => "session.created",
5044
5404
  "data" => {},
5045
5405
  "created_at" => "stub",
5046
- "context" => {},
5047
- "object" => "event"
5406
+ "context" => {}
5048
5407
  }
5049
5408
  model = WorkOS::SessionCreated.new(fixture.to_json)
5050
5409
  json = model.to_h
@@ -5099,12 +5458,12 @@ class ModelRoundTripTest < Minitest::Test
5099
5458
 
5100
5459
  def test_session_revoked_round_trip
5101
5460
  fixture = {
5461
+ "object" => "event",
5102
5462
  "id" => "stub",
5103
5463
  "event" => "session.revoked",
5104
5464
  "data" => {},
5105
5465
  "created_at" => "stub",
5106
- "context" => {},
5107
- "object" => "event"
5466
+ "context" => {}
5108
5467
  }
5109
5468
  model = WorkOS::SessionRevoked.new(fixture.to_json)
5110
5469
  json = model.to_h
@@ -5159,12 +5518,12 @@ class ModelRoundTripTest < Minitest::Test
5159
5518
 
5160
5519
  def test_user_created_round_trip
5161
5520
  fixture = {
5521
+ "object" => "event",
5162
5522
  "id" => "stub",
5163
5523
  "event" => "user.created",
5164
5524
  "data" => {},
5165
5525
  "created_at" => "stub",
5166
- "context" => {},
5167
- "object" => "event"
5526
+ "context" => {}
5168
5527
  }
5169
5528
  model = WorkOS::UserCreated.new(fixture.to_json)
5170
5529
  json = model.to_h
@@ -5176,12 +5535,12 @@ class ModelRoundTripTest < Minitest::Test
5176
5535
 
5177
5536
  def test_user_deleted_round_trip
5178
5537
  fixture = {
5538
+ "object" => "event",
5179
5539
  "id" => "stub",
5180
5540
  "event" => "user.deleted",
5181
5541
  "data" => {},
5182
5542
  "created_at" => "stub",
5183
- "context" => {},
5184
- "object" => "event"
5543
+ "context" => {}
5185
5544
  }
5186
5545
  model = WorkOS::UserDeleted.new(fixture.to_json)
5187
5546
  json = model.to_h
@@ -5193,12 +5552,12 @@ class ModelRoundTripTest < Minitest::Test
5193
5552
 
5194
5553
  def test_user_updated_round_trip
5195
5554
  fixture = {
5555
+ "object" => "event",
5196
5556
  "id" => "stub",
5197
5557
  "event" => "user.updated",
5198
5558
  "data" => {},
5199
5559
  "created_at" => "stub",
5200
- "context" => {},
5201
- "object" => "event"
5560
+ "context" => {}
5202
5561
  }
5203
5562
  model = WorkOS::UserUpdated.new(fixture.to_json)
5204
5563
  json = model.to_h
@@ -5210,12 +5569,12 @@ class ModelRoundTripTest < Minitest::Test
5210
5569
 
5211
5570
  def test_vault_byok_key_deleted_round_trip
5212
5571
  fixture = {
5572
+ "object" => "event",
5213
5573
  "id" => "stub",
5214
5574
  "event" => "vault.byok_key.deleted",
5215
5575
  "data" => {},
5216
5576
  "created_at" => "stub",
5217
- "context" => {},
5218
- "object" => "event"
5577
+ "context" => {}
5219
5578
  }
5220
5579
  model = WorkOS::VaultByokKeyDeleted.new(fixture.to_json)
5221
5580
  json = model.to_h
@@ -5239,12 +5598,12 @@ class ModelRoundTripTest < Minitest::Test
5239
5598
 
5240
5599
  def test_vault_byok_key_verification_completed_round_trip
5241
5600
  fixture = {
5601
+ "object" => "event",
5242
5602
  "id" => "stub",
5243
5603
  "event" => "vault.byok_key.verification_completed",
5244
5604
  "data" => {},
5245
5605
  "created_at" => "stub",
5246
- "context" => {},
5247
- "object" => "event"
5606
+ "context" => {}
5248
5607
  }
5249
5608
  model = WorkOS::VaultByokKeyVerificationCompleted.new(fixture.to_json)
5250
5609
  json = model.to_h
@@ -5270,12 +5629,12 @@ class ModelRoundTripTest < Minitest::Test
5270
5629
 
5271
5630
  def test_vault_data_created_round_trip
5272
5631
  fixture = {
5632
+ "object" => "event",
5273
5633
  "id" => "stub",
5274
5634
  "event" => "vault.data.created",
5275
5635
  "data" => {},
5276
5636
  "created_at" => "stub",
5277
- "context" => {},
5278
- "object" => "event"
5637
+ "context" => {}
5279
5638
  }
5280
5639
  model = WorkOS::VaultDataCreated.new(fixture.to_json)
5281
5640
  json = model.to_h
@@ -5306,12 +5665,12 @@ class ModelRoundTripTest < Minitest::Test
5306
5665
 
5307
5666
  def test_vault_data_deleted_round_trip
5308
5667
  fixture = {
5668
+ "object" => "event",
5309
5669
  "id" => "stub",
5310
5670
  "event" => "vault.data.deleted",
5311
5671
  "data" => {},
5312
5672
  "created_at" => "stub",
5313
- "context" => {},
5314
- "object" => "event"
5673
+ "context" => {}
5315
5674
  }
5316
5675
  model = WorkOS::VaultDataDeleted.new(fixture.to_json)
5317
5676
  json = model.to_h
@@ -5339,12 +5698,12 @@ class ModelRoundTripTest < Minitest::Test
5339
5698
 
5340
5699
  def test_vault_data_read_round_trip
5341
5700
  fixture = {
5701
+ "object" => "event",
5342
5702
  "id" => "stub",
5343
5703
  "event" => "vault.data.read",
5344
5704
  "data" => {},
5345
5705
  "created_at" => "stub",
5346
- "context" => {},
5347
- "object" => "event"
5706
+ "context" => {}
5348
5707
  }
5349
5708
  model = WorkOS::VaultDataRead.new(fixture.to_json)
5350
5709
  json = model.to_h
@@ -5374,12 +5733,12 @@ class ModelRoundTripTest < Minitest::Test
5374
5733
 
5375
5734
  def test_vault_data_updated_round_trip
5376
5735
  fixture = {
5736
+ "object" => "event",
5377
5737
  "id" => "stub",
5378
5738
  "event" => "vault.data.updated",
5379
5739
  "data" => {},
5380
5740
  "created_at" => "stub",
5381
- "context" => {},
5382
- "object" => "event"
5741
+ "context" => {}
5383
5742
  }
5384
5743
  model = WorkOS::VaultDataUpdated.new(fixture.to_json)
5385
5744
  json = model.to_h
@@ -5410,12 +5769,12 @@ class ModelRoundTripTest < Minitest::Test
5410
5769
 
5411
5770
  def test_vault_dek_decrypted_round_trip
5412
5771
  fixture = {
5772
+ "object" => "event",
5413
5773
  "id" => "stub",
5414
5774
  "event" => "vault.dek.decrypted",
5415
5775
  "data" => {},
5416
5776
  "created_at" => "stub",
5417
- "context" => {},
5418
- "object" => "event"
5777
+ "context" => {}
5419
5778
  }
5420
5779
  model = WorkOS::VaultDekDecrypted.new(fixture.to_json)
5421
5780
  json = model.to_h
@@ -5443,12 +5802,12 @@ class ModelRoundTripTest < Minitest::Test
5443
5802
 
5444
5803
  def test_vault_dek_read_round_trip
5445
5804
  fixture = {
5805
+ "object" => "event",
5446
5806
  "id" => "stub",
5447
5807
  "event" => "vault.dek.read",
5448
5808
  "data" => {},
5449
5809
  "created_at" => "stub",
5450
- "context" => {},
5451
- "object" => "event"
5810
+ "context" => {}
5452
5811
  }
5453
5812
  model = WorkOS::VaultDekRead.new(fixture.to_json)
5454
5813
  json = model.to_h
@@ -5476,12 +5835,12 @@ class ModelRoundTripTest < Minitest::Test
5476
5835
 
5477
5836
  def test_vault_kek_created_round_trip
5478
5837
  fixture = {
5838
+ "object" => "event",
5479
5839
  "id" => "stub",
5480
5840
  "event" => "vault.kek.created",
5481
5841
  "data" => {},
5482
5842
  "created_at" => "stub",
5483
- "context" => {},
5484
- "object" => "event"
5843
+ "context" => {}
5485
5844
  }
5486
5845
  model = WorkOS::VaultKekCreated.new(fixture.to_json)
5487
5846
  json = model.to_h
@@ -5511,12 +5870,12 @@ class ModelRoundTripTest < Minitest::Test
5511
5870
 
5512
5871
  def test_vault_metadata_read_round_trip
5513
5872
  fixture = {
5873
+ "object" => "event",
5514
5874
  "id" => "stub",
5515
5875
  "event" => "vault.metadata.read",
5516
5876
  "data" => {},
5517
5877
  "created_at" => "stub",
5518
- "context" => {},
5519
- "object" => "event"
5878
+ "context" => {}
5520
5879
  }
5521
5880
  model = WorkOS::VaultMetadataRead.new(fixture.to_json)
5522
5881
  json = model.to_h
@@ -5544,12 +5903,12 @@ class ModelRoundTripTest < Minitest::Test
5544
5903
 
5545
5904
  def test_vault_names_listed_round_trip
5546
5905
  fixture = {
5906
+ "object" => "event",
5547
5907
  "id" => "stub",
5548
5908
  "event" => "vault.names.listed",
5549
5909
  "data" => {},
5550
5910
  "created_at" => "stub",
5551
- "context" => {},
5552
- "object" => "event"
5911
+ "context" => {}
5553
5912
  }
5554
5913
  model = WorkOS::VaultNamesListed.new(fixture.to_json)
5555
5914
  json = model.to_h
@@ -5575,12 +5934,12 @@ class ModelRoundTripTest < Minitest::Test
5575
5934
 
5576
5935
  def test_waitlist_user_approved_round_trip
5577
5936
  fixture = {
5937
+ "object" => "event",
5578
5938
  "id" => "stub",
5579
5939
  "event" => "waitlist_user.approved",
5580
5940
  "data" => {},
5581
5941
  "created_at" => "stub",
5582
- "context" => {},
5583
- "object" => "event"
5942
+ "context" => {}
5584
5943
  }
5585
5944
  model = WorkOS::WaitlistUserApproved.new(fixture.to_json)
5586
5945
  json = model.to_h
@@ -5592,12 +5951,12 @@ class ModelRoundTripTest < Minitest::Test
5592
5951
 
5593
5952
  def test_waitlist_user_created_round_trip
5594
5953
  fixture = {
5954
+ "object" => "event",
5595
5955
  "id" => "stub",
5596
5956
  "event" => "waitlist_user.created",
5597
5957
  "data" => {},
5598
5958
  "created_at" => "stub",
5599
- "context" => {},
5600
- "object" => "event"
5959
+ "context" => {}
5601
5960
  }
5602
5961
  model = WorkOS::WaitlistUserCreated.new(fixture.to_json)
5603
5962
  json = model.to_h
@@ -5609,12 +5968,12 @@ class ModelRoundTripTest < Minitest::Test
5609
5968
 
5610
5969
  def test_waitlist_user_denied_round_trip
5611
5970
  fixture = {
5971
+ "object" => "event",
5612
5972
  "id" => "stub",
5613
5973
  "event" => "waitlist_user.denied",
5614
5974
  "data" => {},
5615
5975
  "created_at" => "stub",
5616
- "context" => {},
5617
- "object" => "event"
5976
+ "context" => {}
5618
5977
  }
5619
5978
  model = WorkOS::WaitlistUserDenied.new(fixture.to_json)
5620
5979
  json = model.to_h
@@ -5684,6 +6043,7 @@ class ModelRoundTripTest < Minitest::Test
5684
6043
  "name" => "stub",
5685
6044
  "obfuscated_value" => "stub",
5686
6045
  "last_used_at" => nil,
6046
+ "expires_at" => nil,
5687
6047
  "permissions" => [],
5688
6048
  "created_at" => "stub",
5689
6049
  "updated_at" => "stub"
@@ -5695,6 +6055,7 @@ class ModelRoundTripTest < Minitest::Test
5695
6055
  assert_equal fixture["name"], json[:name]
5696
6056
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
5697
6057
  assert_nil json[:last_used_at]
6058
+ assert_nil json[:expires_at]
5698
6059
  assert_equal fixture["created_at"], json[:created_at]
5699
6060
  assert_equal fixture["updated_at"], json[:updated_at]
5700
6061
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -5708,6 +6069,7 @@ class ModelRoundTripTest < Minitest::Test
5708
6069
  "name" => "stub",
5709
6070
  "obfuscated_value" => "stub",
5710
6071
  "last_used_at" => nil,
6072
+ "expires_at" => nil,
5711
6073
  "permissions" => [],
5712
6074
  "created_at" => "stub",
5713
6075
  "updated_at" => "stub",
@@ -5720,6 +6082,7 @@ class ModelRoundTripTest < Minitest::Test
5720
6082
  assert_equal fixture["name"], json[:name]
5721
6083
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
5722
6084
  assert_nil json[:last_used_at]
6085
+ assert_nil json[:expires_at]
5723
6086
  assert_equal fixture["created_at"], json[:created_at]
5724
6087
  assert_equal fixture["updated_at"], json[:updated_at]
5725
6088
  assert_equal fixture["value"], json[:value]
@@ -5986,6 +6349,7 @@ class ModelRoundTripTest < Minitest::Test
5986
6349
  "name" => "stub",
5987
6350
  "obfuscated_value" => "stub",
5988
6351
  "last_used_at" => nil,
6352
+ "expires_at" => nil,
5989
6353
  "permissions" => [],
5990
6354
  "created_at" => "stub",
5991
6355
  "updated_at" => "stub"
@@ -5997,6 +6361,7 @@ class ModelRoundTripTest < Minitest::Test
5997
6361
  assert_equal fixture["name"], json[:name]
5998
6362
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
5999
6363
  assert_nil json[:last_used_at]
6364
+ assert_nil json[:expires_at]
6000
6365
  assert_equal fixture["created_at"], json[:created_at]
6001
6366
  assert_equal fixture["updated_at"], json[:updated_at]
6002
6367
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -6010,6 +6375,7 @@ class ModelRoundTripTest < Minitest::Test
6010
6375
  "name" => "stub",
6011
6376
  "obfuscated_value" => "stub",
6012
6377
  "last_used_at" => nil,
6378
+ "expires_at" => nil,
6013
6379
  "permissions" => [],
6014
6380
  "created_at" => "stub",
6015
6381
  "updated_at" => "stub",
@@ -6022,6 +6388,7 @@ class ModelRoundTripTest < Minitest::Test
6022
6388
  assert_equal fixture["name"], json[:name]
6023
6389
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
6024
6390
  assert_nil json[:last_used_at]
6391
+ assert_nil json[:expires_at]
6025
6392
  assert_equal fixture["created_at"], json[:created_at]
6026
6393
  assert_equal fixture["updated_at"], json[:updated_at]
6027
6394
  assert_equal fixture["value"], json[:value]
@@ -6161,7 +6528,7 @@ class ModelRoundTripTest < Minitest::Test
6161
6528
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
6162
6529
  end
6163
6530
 
6164
- def test_webhook_endpoint_json_round_trip
6531
+ def test_webhook_endpoint_round_trip
6165
6532
  fixture = {
6166
6533
  "object" => "webhook_endpoint",
6167
6534
  "id" => "stub",
@@ -6172,7 +6539,7 @@ class ModelRoundTripTest < Minitest::Test
6172
6539
  "created_at" => "stub",
6173
6540
  "updated_at" => "stub"
6174
6541
  }
6175
- model = WorkOS::WebhookEndpointJson.new(fixture.to_json)
6542
+ model = WorkOS::WebhookEndpoint.new(fixture.to_json)
6176
6543
  json = model.to_h
6177
6544
  assert_kind_of Hash, json
6178
6545
  assert_equal fixture["id"], json[:id]
@@ -6695,22 +7062,22 @@ class ModelRoundTripTest < Minitest::Test
6695
7062
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
6696
7063
  end
6697
7064
 
6698
- def test_audit_log_schema_json_actor_round_trip
7065
+ def test_audit_log_schema_actor_round_trip
6699
7066
  fixture = {
6700
7067
  "metadata" => {}
6701
7068
  }
6702
- model = WorkOS::AuditLogSchemaJsonActor.new(fixture.to_json)
7069
+ model = WorkOS::AuditLogSchemaActor.new(fixture.to_json)
6703
7070
  json = model.to_h
6704
7071
  assert_kind_of Hash, json
6705
7072
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
6706
7073
  end
6707
7074
 
6708
- def test_audit_log_schema_json_target_round_trip
7075
+ def test_audit_log_schema_target_round_trip
6709
7076
  fixture = {
6710
7077
  "type" => "stub",
6711
7078
  "metadata" => {}
6712
7079
  }
6713
- model = WorkOS::AuditLogSchemaJsonTarget.new(fixture.to_json)
7080
+ model = WorkOS::AuditLogSchemaTarget.new(fixture.to_json)
6714
7081
  json = model.to_h
6715
7082
  assert_kind_of Hash, json
6716
7083
  assert_equal fixture["type"], json[:type]
@@ -6900,9 +7267,7 @@ class ModelRoundTripTest < Minitest::Test
6900
7267
  "user_agent" => "stub",
6901
7268
  "email" => "stub",
6902
7269
  "auth_method" => "stub",
6903
- "action" => "stub",
6904
- "device_fingerprint" => "stub",
6905
- "bot_score" => "stub"
7270
+ "action" => "stub"
6906
7271
  }
6907
7272
  model = WorkOS::RadarStandaloneAssessRequest.new(fixture.to_json)
6908
7273
  json = model.to_h