workos 8.0.1 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -2
  3. data/.github/workflows/docs.yml +2 -2
  4. data/.github/workflows/lint.yml +2 -2
  5. data/.github/workflows/release-please.yml +199 -4
  6. data/.github/workflows/release.yml +2 -2
  7. data/.last-synced-sha +1 -1
  8. data/.oagen-manifest.json +154 -43
  9. data/.release-please-manifest.json +1 -1
  10. data/.ruby-version +1 -1
  11. data/CHANGELOG.md +92 -0
  12. data/Gemfile.lock +6 -6
  13. data/lib/workos/api_keys/api_key.rb +3 -0
  14. data/lib/workos/api_keys/api_key_created.rb +5 -5
  15. data/lib/workos/api_keys/api_key_created_data.rb +3 -0
  16. data/lib/workos/api_keys/api_key_revoked.rb +5 -5
  17. data/lib/workos/{audit_logs/audit_log_export_json.rb → api_keys/api_key_updated.rb} +10 -10
  18. data/lib/workos/api_keys/api_key_updated_data.rb +49 -0
  19. data/lib/workos/{directory_sync/dsync_deactivated_data_domain.rb → api_keys/api_key_updated_data_owner.rb} +1 -1
  20. data/lib/workos/api_keys/api_key_updated_data_previous_attribute.rb +18 -0
  21. data/lib/workos/api_keys/create_organization_api_key.rb +5 -2
  22. data/lib/workos/api_keys/expire_api_key.rb +18 -0
  23. data/lib/workos/api_keys/organization_api_key.rb +3 -0
  24. data/lib/workos/api_keys/organization_api_key_with_value.rb +3 -0
  25. data/lib/workos/api_keys.rb +29 -1
  26. data/lib/workos/audit_logs/audit_log_action.rb +2 -7
  27. data/lib/workos/audit_logs/audit_log_export.rb +2 -7
  28. data/lib/workos/audit_logs/audit_log_schema.rb +11 -2
  29. data/lib/workos/{types/radar_type.rb → audit_logs/audit_log_schema_actor_input.rb} +1 -3
  30. data/lib/workos/audit_logs/audit_log_schema_input.rb +25 -0
  31. data/lib/workos/audit_logs/audit_log_schema_target.rb +16 -1
  32. data/lib/workos/audit_logs/audit_log_schema_target_input.rb +7 -0
  33. data/lib/workos/audit_logs.rb +16 -16
  34. data/lib/workos/authorization/permission_created.rb +5 -5
  35. data/lib/workos/authorization/permission_deleted.rb +5 -5
  36. data/lib/workos/authorization/permission_updated.rb +5 -5
  37. data/lib/workos/authorization/role_created.rb +5 -5
  38. data/lib/workos/authorization/role_deleted.rb +5 -5
  39. data/lib/workos/authorization/role_updated.rb +5 -5
  40. data/lib/workos/authorization.rb +38 -22
  41. data/lib/workos/base_client.rb +19 -2
  42. data/lib/workos/client.rb +6 -6
  43. data/lib/workos/connect/connect_application.rb +12 -0
  44. data/lib/workos/{audit_logs/audit_log_schema_json_target.rb → connect/connect_application_redirect_uri.rb} +7 -7
  45. data/lib/workos/connect/user_object.rb +3 -0
  46. data/lib/workos/connect.rb +1 -1
  47. data/lib/workos/directory_sync/dsync_activated.rb +5 -5
  48. data/lib/workos/directory_sync/dsync_deleted.rb +5 -5
  49. data/lib/workos/directory_sync/dsync_group_created.rb +5 -5
  50. data/lib/workos/directory_sync/dsync_group_deleted.rb +5 -5
  51. data/lib/workos/directory_sync/dsync_group_updated.rb +5 -5
  52. data/lib/workos/directory_sync/dsync_group_user_added.rb +5 -5
  53. data/lib/workos/directory_sync/dsync_group_user_removed.rb +5 -5
  54. data/lib/workos/directory_sync/dsync_token_created.rb +34 -0
  55. data/lib/workos/directory_sync/dsync_token_created_data.rb +34 -0
  56. data/lib/workos/directory_sync/dsync_token_revoked.rb +34 -0
  57. data/lib/workos/{audit_logs/audit_log_schema_json_actor.rb → directory_sync/dsync_token_revoked_data.rb} +1 -1
  58. data/lib/workos/directory_sync/dsync_user_created.rb +5 -5
  59. data/lib/workos/directory_sync/dsync_user_deleted.rb +5 -5
  60. data/lib/workos/directory_sync/dsync_user_updated.rb +5 -5
  61. data/lib/workos/directory_sync.rb +2 -2
  62. data/lib/workos/events.rb +1 -1
  63. data/lib/workos/feature_flags/flag_created.rb +5 -5
  64. data/lib/workos/feature_flags/flag_deleted.rb +5 -5
  65. data/lib/workos/feature_flags/flag_rule_updated.rb +5 -5
  66. data/lib/workos/feature_flags/flag_rule_updated_context_configured_target_organization.rb +1 -16
  67. data/lib/workos/feature_flags/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rb +1 -1
  68. data/lib/workos/feature_flags/flag_updated.rb +5 -5
  69. data/lib/workos/groups.rb +2 -2
  70. data/lib/workos/inflections.rb +3 -1
  71. data/lib/workos/organization_domains/organization_domain_created.rb +5 -5
  72. data/lib/workos/organization_domains/organization_domain_deleted.rb +5 -5
  73. data/lib/workos/organization_domains/organization_domain_updated.rb +5 -5
  74. data/lib/workos/organization_domains/organization_domain_verification_failed.rb +5 -5
  75. data/lib/workos/organization_domains/organization_domain_verified.rb +5 -5
  76. data/lib/workos/organization_membership_service.rb +273 -0
  77. data/lib/workos/organizations/audit_logs_retention.rb +2 -7
  78. data/lib/workos/organizations/organization_created.rb +5 -5
  79. data/lib/workos/organizations/organization_deleted.rb +5 -5
  80. data/lib/workos/organizations/organization_membership_created.rb +5 -5
  81. data/lib/workos/organizations/organization_membership_deleted.rb +5 -5
  82. data/lib/workos/organizations/organization_membership_updated.rb +5 -5
  83. data/lib/workos/organizations/organization_role_created.rb +5 -5
  84. data/lib/workos/organizations/organization_role_deleted.rb +5 -5
  85. data/lib/workos/organizations/organization_role_updated.rb +5 -5
  86. data/lib/workos/organizations/organization_updated.rb +5 -5
  87. data/lib/workos/organizations.rb +1 -1
  88. data/lib/workos/radar/radar_standalone_assess_request.rb +2 -8
  89. data/lib/workos/radar.rb +6 -12
  90. data/lib/workos/shared/connect_application_m2m.rb +46 -0
  91. data/lib/workos/shared/connect_application_oauth.rb +58 -0
  92. data/lib/workos/shared/connect_application_oauth_redirect_uris.rb +22 -0
  93. data/lib/workos/shared/error_response.rb +18 -0
  94. data/lib/workos/shared/group_created.rb +5 -5
  95. data/lib/workos/shared/group_deleted.rb +5 -5
  96. data/lib/workos/shared/group_member_added.rb +5 -5
  97. data/lib/workos/shared/group_member_removed.rb +5 -5
  98. data/lib/workos/shared/group_updated.rb +5 -5
  99. data/lib/workos/{directory_sync/dsync_deactivated_data.rb → shared/pipe_connected_account.rb} +15 -15
  100. data/lib/workos/{directory_sync/dsync_deactivated.rb → shared/pipes_connected_account_connected.rb} +7 -7
  101. data/lib/workos/shared/pipes_connected_account_disconnected.rb +34 -0
  102. data/lib/workos/shared/pipes_connected_account_reauthorization_needed.rb +34 -0
  103. data/lib/workos/shared/waitlist_user_approved.rb +5 -5
  104. data/lib/workos/shared/waitlist_user_created.rb +5 -5
  105. data/lib/workos/shared/waitlist_user_denied.rb +5 -5
  106. data/lib/workos/sso/connection_activated.rb +5 -5
  107. data/lib/workos/sso/connection_deactivated.rb +5 -5
  108. data/lib/workos/sso/connection_deleted.rb +5 -5
  109. data/lib/workos/sso/connection_saml_certificate_renewal_required.rb +5 -5
  110. data/lib/workos/sso/connection_saml_certificate_renewed.rb +5 -5
  111. data/lib/workos/types/audit_log_configuration_log_stream_type.rb +2 -1
  112. data/lib/workos/types/create_webhook_endpoint_events.rb +5 -1
  113. data/lib/workos/types/pipe_connected_account_state.rb +13 -0
  114. data/lib/workos/types/{radar_action.rb → radar_list_action.rb} +1 -1
  115. data/lib/workos/types/radar_list_type.rb +18 -0
  116. data/lib/workos/types/radar_standalone_assess_request_action.rb +1 -7
  117. data/lib/workos/types/radar_standalone_response_blocklist_type.rb +1 -10
  118. data/lib/workos/types/radar_standalone_response_control.rb +1 -4
  119. data/lib/workos/types/user_management_authentication_screen_hint.rb +1 -5
  120. data/{rbi/workos/types/request_options.rbi → lib/workos/types/vault_order.rb} +4 -3
  121. data/lib/workos/types/webhook_endpoint_status.rb +1 -5
  122. data/lib/workos/user_management/action_authentication_denied.rb +6 -6
  123. data/lib/workos/user_management/action_user_registration_denied.rb +6 -6
  124. data/lib/workos/user_management/authentication_email_verification_failed.rb +5 -5
  125. data/lib/workos/user_management/authentication_email_verification_succeeded.rb +5 -5
  126. data/lib/workos/user_management/authentication_magic_auth_failed.rb +5 -5
  127. data/lib/workos/user_management/authentication_magic_auth_succeeded.rb +5 -5
  128. data/lib/workos/user_management/authentication_mfa_failed.rb +5 -5
  129. data/lib/workos/user_management/authentication_mfa_succeeded.rb +5 -5
  130. data/lib/workos/user_management/authentication_oauth_failed.rb +5 -5
  131. data/lib/workos/user_management/authentication_oauth_succeeded.rb +5 -5
  132. data/lib/workos/user_management/authentication_passkey_failed.rb +5 -5
  133. data/lib/workos/user_management/authentication_passkey_succeeded.rb +5 -5
  134. data/lib/workos/user_management/authentication_password_failed.rb +5 -5
  135. data/lib/workos/user_management/authentication_password_succeeded.rb +5 -5
  136. data/lib/workos/user_management/authentication_radar_risk_detected.rb +5 -5
  137. data/lib/workos/user_management/authentication_sso_failed.rb +5 -5
  138. data/lib/workos/user_management/authentication_sso_started.rb +5 -5
  139. data/lib/workos/user_management/authentication_sso_succeeded.rb +5 -5
  140. data/lib/workos/user_management/authentication_sso_timed_out.rb +5 -5
  141. data/lib/workos/user_management/create_user.rb +3 -0
  142. data/lib/workos/user_management/create_user_api_key.rb +5 -2
  143. data/lib/workos/user_management/email_change_confirmation_user.rb +3 -0
  144. data/lib/workos/user_management/email_verification_created.rb +5 -5
  145. data/lib/workos/user_management/invitation_accepted.rb +5 -5
  146. data/lib/workos/user_management/invitation_created.rb +5 -5
  147. data/lib/workos/user_management/invitation_resent.rb +5 -5
  148. data/lib/workos/user_management/invitation_revoked.rb +5 -5
  149. data/lib/workos/user_management/magic_auth_created.rb +5 -5
  150. data/lib/workos/user_management/password_reset_created.rb +5 -5
  151. data/lib/workos/user_management/password_reset_succeeded.rb +5 -5
  152. data/lib/workos/user_management/revoke_session.rb +2 -6
  153. data/lib/workos/user_management/session_created.rb +5 -5
  154. data/lib/workos/user_management/session_revoked.rb +5 -5
  155. data/lib/workos/user_management/update_user.rb +3 -0
  156. data/lib/workos/user_management/user_api_key.rb +3 -0
  157. data/lib/workos/user_management/user_api_key_updated_data_owner.rb +7 -0
  158. data/lib/workos/user_management/user_api_key_with_value.rb +3 -0
  159. data/lib/workos/user_management/user_created.rb +5 -5
  160. data/lib/workos/user_management/user_deleted.rb +5 -5
  161. data/lib/workos/user_management/user_updated.rb +5 -5
  162. data/lib/workos/user_management.rb +16 -223
  163. data/lib/workos/vault/actor.rb +22 -0
  164. data/lib/workos/vault/create_data_key_request.rb +18 -0
  165. data/lib/workos/vault/create_data_key_response.rb +28 -0
  166. data/lib/workos/vault/create_object_request.rb +25 -0
  167. data/lib/workos/vault/decrypt_request.rb +18 -0
  168. data/lib/workos/vault/decrypt_response.rb +22 -0
  169. data/lib/workos/vault/delete_object_response.rb +22 -0
  170. data/lib/workos/vault/object_metadata.rb +37 -0
  171. data/lib/workos/{audit_logs/audit_log_action_json.rb → vault/object_summary.rb} +4 -10
  172. data/lib/workos/vault/object_version.rb +31 -0
  173. data/lib/workos/vault/object_without_value.rb +25 -0
  174. data/lib/workos/vault/rekey_request.rb +22 -0
  175. data/lib/workos/vault/update_object_request.rb +22 -0
  176. data/lib/workos/vault/vault_byok_key_deleted.rb +5 -5
  177. data/lib/workos/vault/vault_byok_key_verification_completed.rb +5 -5
  178. data/lib/workos/vault/vault_data_created.rb +5 -5
  179. data/lib/workos/vault/vault_data_deleted.rb +5 -5
  180. data/lib/workos/vault/vault_data_read.rb +5 -5
  181. data/lib/workos/vault/vault_data_updated.rb +5 -5
  182. data/lib/workos/vault/vault_dek_decrypted.rb +5 -5
  183. data/lib/workos/vault/vault_dek_read.rb +5 -5
  184. data/lib/workos/vault/vault_kek_created.rb +5 -5
  185. data/lib/workos/vault/vault_metadata_read.rb +5 -5
  186. data/lib/workos/vault/vault_names_listed.rb +5 -5
  187. data/lib/workos/vault/vault_object.rb +28 -0
  188. data/lib/workos/vault/version_list_response.rb +22 -0
  189. data/lib/workos/vault.rb +273 -139
  190. data/lib/workos/version.rb +1 -1
  191. data/lib/workos/webhooks/webhook_endpoint.rb +2 -7
  192. data/lib/workos/webhooks.rb +8 -9
  193. data/lib/workos.rb +1 -0
  194. data/rbi/workos/action_authentication_denied.rbi +10 -10
  195. data/rbi/workos/action_user_registration_denied.rbi +10 -10
  196. data/rbi/workos/actor.rbi +30 -0
  197. data/rbi/workos/api_key.rbi +6 -0
  198. data/rbi/workos/api_key_created.rbi +6 -6
  199. data/rbi/workos/api_key_created_data.rbi +6 -0
  200. data/rbi/workos/api_key_revoked.rbi +6 -6
  201. data/rbi/workos/api_key_revoked_data.rbi +6 -0
  202. data/rbi/workos/{dsync_deactivated.rbi → api_key_updated.rbi} +9 -9
  203. data/rbi/workos/api_key_updated_data.rbi +84 -0
  204. data/rbi/workos/api_key_updated_data_owner.rbi +30 -0
  205. data/rbi/workos/{audit_logs_retention_json.rbi → api_key_updated_data_previous_attribute.rbi} +5 -5
  206. data/rbi/workos/api_keys.rbi +11 -1
  207. data/rbi/workos/audit_log_action.rbi +1 -0
  208. data/rbi/workos/audit_log_export.rbi +1 -0
  209. data/rbi/workos/audit_log_schema.rbi +18 -0
  210. data/rbi/workos/{audit_log_schema_json_actor.rbi → audit_log_schema_actor_input.rbi} +1 -1
  211. data/rbi/workos/audit_log_schema_input.rbi +36 -0
  212. data/rbi/workos/{audit_log_schema_json_target.rbi → audit_log_schema_target_input.rbi} +1 -1
  213. data/rbi/workos/audit_logs.rbi +9 -9
  214. data/rbi/workos/audit_logs_retention.rbi +1 -0
  215. data/rbi/workos/authentication_email_verification_failed.rbi +6 -6
  216. data/rbi/workos/authentication_email_verification_succeeded.rbi +6 -6
  217. data/rbi/workos/authentication_magic_auth_failed.rbi +6 -6
  218. data/rbi/workos/authentication_magic_auth_succeeded.rbi +6 -6
  219. data/rbi/workos/authentication_mfa_failed.rbi +6 -6
  220. data/rbi/workos/authentication_mfa_succeeded.rbi +6 -6
  221. data/rbi/workos/authentication_oauth_failed.rbi +6 -6
  222. data/rbi/workos/authentication_oauth_succeeded.rbi +6 -6
  223. data/rbi/workos/authentication_passkey_failed.rbi +6 -6
  224. data/rbi/workos/authentication_passkey_succeeded.rbi +6 -6
  225. data/rbi/workos/authentication_password_failed.rbi +6 -6
  226. data/rbi/workos/authentication_password_succeeded.rbi +6 -6
  227. data/rbi/workos/authentication_radar_risk_detected.rbi +6 -6
  228. data/rbi/workos/authentication_sso_failed.rbi +6 -6
  229. data/rbi/workos/authentication_sso_started.rbi +6 -6
  230. data/rbi/workos/authentication_sso_succeeded.rbi +6 -6
  231. data/rbi/workos/authentication_sso_timed_out.rbi +6 -6
  232. data/rbi/workos/authorization.rbi +9 -5
  233. data/rbi/workos/client.rbi +6 -3
  234. data/rbi/workos/connect_application.rbi +0 -12
  235. data/rbi/workos/{dsync_deactivated_data.rbi → connect_application_m2m.rbi} +19 -19
  236. data/rbi/workos/connect_application_oauth.rbi +102 -0
  237. data/rbi/workos/connect_application_oauth_redirect_uris.rbi +30 -0
  238. data/rbi/workos/connection_activated.rbi +6 -6
  239. data/rbi/workos/connection_deactivated.rbi +6 -6
  240. data/rbi/workos/connection_deleted.rbi +6 -6
  241. data/rbi/workos/connection_saml_certificate_renewal_required.rbi +6 -6
  242. data/rbi/workos/connection_saml_certificate_renewed.rbi +6 -6
  243. data/rbi/workos/create_data_key_request.rbi +24 -0
  244. data/rbi/workos/create_data_key_response.rbi +42 -0
  245. data/rbi/workos/create_object_request.rbi +36 -0
  246. data/rbi/workos/create_organization_api_key.rbi +6 -0
  247. data/rbi/workos/create_user.rbi +6 -0
  248. data/rbi/workos/create_user_api_key.rbi +6 -0
  249. data/rbi/workos/decrypt_request.rbi +24 -0
  250. data/rbi/workos/decrypt_response.rbi +30 -0
  251. data/rbi/workos/delete_object_response.rbi +30 -0
  252. data/rbi/workos/dsync_activated.rbi +6 -6
  253. data/rbi/workos/dsync_deleted.rbi +6 -6
  254. data/rbi/workos/dsync_group_created.rbi +6 -6
  255. data/rbi/workos/dsync_group_deleted.rbi +6 -6
  256. data/rbi/workos/dsync_group_updated.rbi +6 -6
  257. data/rbi/workos/dsync_group_user_added.rbi +6 -6
  258. data/rbi/workos/dsync_group_user_removed.rbi +6 -6
  259. data/rbi/workos/dsync_token_created.rbi +54 -0
  260. data/rbi/workos/{audit_log_export_json.rbi → dsync_token_created_data.rbi} +9 -9
  261. data/rbi/workos/dsync_token_revoked.rbi +54 -0
  262. data/rbi/workos/{audit_log_action_json.rbi → dsync_token_revoked_data.rbi} +17 -11
  263. data/rbi/workos/dsync_user_created.rbi +6 -6
  264. data/rbi/workos/dsync_user_deleted.rbi +6 -6
  265. data/rbi/workos/dsync_user_updated.rbi +6 -6
  266. data/rbi/workos/email_change_confirmation_user.rbi +6 -0
  267. data/rbi/workos/email_verification_created.rbi +6 -6
  268. data/rbi/workos/error_response.rbi +24 -0
  269. data/rbi/workos/expire_api_key.rbi +24 -0
  270. data/rbi/workos/flag_created.rbi +6 -6
  271. data/rbi/workos/flag_deleted.rbi +6 -6
  272. data/rbi/workos/flag_rule_updated.rbi +6 -6
  273. data/rbi/workos/flag_updated.rbi +6 -6
  274. data/rbi/workos/group_created.rbi +6 -6
  275. data/rbi/workos/group_deleted.rbi +6 -6
  276. data/rbi/workos/group_member_added.rbi +6 -6
  277. data/rbi/workos/group_member_removed.rbi +6 -6
  278. data/rbi/workos/group_updated.rbi +6 -6
  279. data/rbi/workos/invitation_accepted.rbi +6 -6
  280. data/rbi/workos/invitation_created.rbi +6 -6
  281. data/rbi/workos/invitation_resent.rbi +6 -6
  282. data/rbi/workos/invitation_revoked.rbi +6 -6
  283. data/rbi/workos/magic_auth_created.rbi +6 -6
  284. data/rbi/workos/object_metadata.rbi +60 -0
  285. data/rbi/workos/object_summary.rbi +36 -0
  286. data/rbi/workos/object_version.rbi +48 -0
  287. data/rbi/workos/object_without_value.rbi +36 -0
  288. data/rbi/workos/organization_api_key.rbi +6 -0
  289. data/rbi/workos/organization_api_key_with_value.rbi +6 -0
  290. data/rbi/workos/organization_created.rbi +6 -6
  291. data/rbi/workos/organization_deleted.rbi +6 -6
  292. data/rbi/workos/organization_domain_created.rbi +6 -6
  293. data/rbi/workos/organization_domain_deleted.rbi +6 -6
  294. data/rbi/workos/organization_domain_updated.rbi +6 -6
  295. data/rbi/workos/organization_domain_verification_failed.rbi +6 -6
  296. data/rbi/workos/organization_domain_verified.rbi +6 -6
  297. data/rbi/workos/organization_membership_created.rbi +6 -6
  298. data/rbi/workos/organization_membership_deleted.rbi +6 -6
  299. data/rbi/workos/organization_membership_service.rbi +114 -0
  300. data/rbi/workos/organization_membership_updated.rbi +6 -6
  301. data/rbi/workos/organization_role_created.rbi +6 -6
  302. data/rbi/workos/organization_role_deleted.rbi +6 -6
  303. data/rbi/workos/organization_role_updated.rbi +6 -6
  304. data/rbi/workos/organization_updated.rbi +6 -6
  305. data/rbi/workos/password_reset_created.rbi +6 -6
  306. data/rbi/workos/password_reset_succeeded.rbi +6 -6
  307. data/rbi/workos/permission_created.rbi +6 -6
  308. data/rbi/workos/permission_deleted.rbi +6 -6
  309. data/rbi/workos/permission_updated.rbi +6 -6
  310. data/rbi/workos/{webhook_endpoint_json.rbi → pipe_connected_account.rbi} +23 -11
  311. data/rbi/workos/pipes_connected_account_connected.rbi +54 -0
  312. data/rbi/workos/pipes_connected_account_disconnected.rbi +54 -0
  313. data/rbi/workos/pipes_connected_account_reauthorization_needed.rbi +54 -0
  314. data/rbi/workos/radar.rbi +1 -3
  315. data/rbi/workos/radar_standalone_assess_request.rbi +0 -12
  316. data/rbi/workos/rekey_request.rbi +30 -0
  317. data/rbi/workos/revoke_session.rbi +0 -6
  318. data/rbi/workos/role_created.rbi +6 -6
  319. data/rbi/workos/role_deleted.rbi +6 -6
  320. data/rbi/workos/role_updated.rbi +6 -6
  321. data/rbi/workos/session_created.rbi +6 -6
  322. data/rbi/workos/session_manager.rbi +1 -1
  323. data/rbi/workos/session_revoked.rbi +6 -6
  324. data/rbi/workos/update_object_request.rbi +30 -0
  325. data/rbi/workos/update_user.rbi +6 -0
  326. data/rbi/workos/user.rbi +6 -0
  327. data/rbi/workos/user_api_key.rbi +6 -0
  328. data/rbi/workos/{dsync_deactivated_data_domain.rbi → user_api_key_updated_data_owner.rbi} +5 -5
  329. data/rbi/workos/user_api_key_with_value.rbi +6 -0
  330. data/rbi/workos/user_created.rbi +6 -6
  331. data/rbi/workos/user_deleted.rbi +6 -6
  332. data/rbi/workos/user_management.rbi +7 -94
  333. data/rbi/workos/user_object.rbi +6 -0
  334. data/rbi/workos/user_updated.rbi +6 -6
  335. data/rbi/workos/vault.rbi +70 -95
  336. data/rbi/workos/vault_byok_key_deleted.rbi +6 -6
  337. data/rbi/workos/vault_byok_key_verification_completed.rbi +6 -6
  338. data/rbi/workos/vault_data_created.rbi +6 -6
  339. data/rbi/workos/vault_data_deleted.rbi +6 -6
  340. data/rbi/workos/vault_data_read.rbi +6 -6
  341. data/rbi/workos/vault_data_updated.rbi +6 -6
  342. data/rbi/workos/vault_dek_decrypted.rbi +6 -6
  343. data/rbi/workos/vault_dek_read.rbi +6 -6
  344. data/rbi/workos/vault_kek_created.rbi +6 -6
  345. data/rbi/workos/vault_metadata_read.rbi +6 -6
  346. data/rbi/workos/vault_names_listed.rbi +6 -6
  347. data/rbi/workos/vault_object.rbi +42 -0
  348. data/rbi/workos/waitlist_user_approved.rbi +6 -6
  349. data/rbi/workos/waitlist_user_created.rbi +6 -6
  350. data/rbi/workos/waitlist_user_denied.rbi +6 -6
  351. data/rbi/workos/webhook_endpoint.rbi +1 -0
  352. data/rbi/workos/webhooks.rbi +2 -2
  353. data/renovate.json +1 -61
  354. data/test/workos/test_api_keys.rb +9 -1
  355. data/test/workos/test_base_client.rb +64 -0
  356. data/test/workos/test_model_round_trip.rb +740 -261
  357. data/test/workos/test_organization_membership_service.rb +107 -0
  358. data/test/workos/test_user_management.rb +0 -74
  359. data/test/workos/test_vault.rb +91 -88
  360. metadata +87 -54
  361. data/lib/workos/audit_logs/audit_log_schema_json.rb +0 -34
  362. data/lib/workos/organizations/audit_logs_retention_json.rb +0 -18
  363. data/lib/workos/types/audit_log_export_json_state.rb +0 -14
  364. data/lib/workos/types/dsync_deactivated_data_state.rb +0 -9
  365. data/lib/workos/types/dsync_deactivated_data_type.rb +0 -9
  366. data/lib/workos/types/webhook_endpoint_json_status.rb +0 -9
  367. data/lib/workos/user_management_organization_membership_groups.rb +0 -60
  368. data/lib/workos/webhooks/webhook_endpoint_json.rb +0 -40
  369. data/rbi/workos/actions.rbi +0 -48
  370. data/rbi/workos/audit_log_schema_json.rbi +0 -54
  371. data/rbi/workos/base_client.rbi +0 -132
  372. data/rbi/workos/configuration.rbi +0 -68
  373. data/rbi/workos/encryptors/aes_gcm.rbi +0 -19
  374. data/rbi/workos/errors.rbi +0 -43
  375. data/rbi/workos/hash_provider.rbi +0 -18
  376. data/rbi/workos/passwordless.rbi +0 -47
  377. data/rbi/workos/public_client.rbi +0 -12
  378. data/rbi/workos/session.rbi +0 -43
  379. data/rbi/workos/types/api_response.rbi +0 -29
  380. data/rbi/workos/types/base_model.rbi +0 -22
  381. data/rbi/workos/types/list_struct.rbi +0 -89
  382. data/rbi/workos/user_management_organization_membership_groups.rbi +0 -25
  383. data/rbi/workos/util.rbi +0 -12
  384. data/test/workos/test_user_management_organization_membership_groups.rb +0 -33
  385. /data/lib/workos/{authorization → groups}/user_organization_membership_base_list_data.rb +0 -0
  386. /data/lib/workos/{user_management → organization_membership}/create_user_organization_membership.rb +0 -0
  387. /data/lib/workos/{user_management → organization_membership}/organization_membership.rb +0 -0
  388. /data/lib/workos/{user_management → organization_membership}/update_user_organization_membership.rb +0 -0
  389. /data/lib/workos/{user_management → organization_membership}/user_organization_membership.rb +0 -0
@@ -11,6 +11,7 @@ class ModelRoundTripTest < Minitest::Test
11
11
  "email" => "stub",
12
12
  "first_name" => "stub",
13
13
  "last_name" => "stub",
14
+ "name" => "stub",
14
15
  "metadata" => {}
15
16
  }
16
17
  model = WorkOS::UserObject.new(fixture.to_json)
@@ -60,6 +61,16 @@ class ModelRoundTripTest < Minitest::Test
60
61
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
61
62
  end
62
63
 
64
+ def test_expire_api_key_round_trip
65
+ fixture = {
66
+ "expires_at" => nil
67
+ }
68
+ model = WorkOS::ExpireApiKey.new(fixture.to_json)
69
+ json = model.to_h
70
+ assert_kind_of Hash, json
71
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
72
+ end
73
+
63
74
  def test_redirect_uri_input_round_trip
64
75
  fixture = {
65
76
  "uri" => "stub",
@@ -229,35 +240,35 @@ class ModelRoundTripTest < Minitest::Test
229
240
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
230
241
  end
231
242
 
232
- def test_audit_log_schema_actor_round_trip
243
+ def test_audit_log_schema_actor_input_round_trip
233
244
  fixture = {
234
245
  "metadata" => {}
235
246
  }
236
- model = WorkOS::AuditLogSchemaActor.new(fixture.to_json)
247
+ model = WorkOS::AuditLogSchemaActorInput.new(fixture.to_json)
237
248
  json = model.to_h
238
249
  assert_kind_of Hash, json
239
250
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
240
251
  end
241
252
 
242
- def test_audit_log_schema_target_round_trip
253
+ def test_audit_log_schema_target_input_round_trip
243
254
  fixture = {
244
255
  "type" => "stub",
245
256
  "metadata" => {}
246
257
  }
247
- model = WorkOS::AuditLogSchemaTarget.new(fixture.to_json)
258
+ model = WorkOS::AuditLogSchemaTargetInput.new(fixture.to_json)
248
259
  json = model.to_h
249
260
  assert_kind_of Hash, json
250
261
  assert_equal fixture["type"], json[:type]
251
262
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
252
263
  end
253
264
 
254
- def test_audit_log_schema_round_trip
265
+ def test_audit_log_schema_input_round_trip
255
266
  fixture = {
256
267
  "actor" => {},
257
268
  "targets" => [],
258
269
  "metadata" => {}
259
270
  }
260
- model = WorkOS::AuditLogSchema.new(fixture.to_json)
271
+ model = WorkOS::AuditLogSchemaInput.new(fixture.to_json)
261
272
  json = model.to_h
262
273
  assert_kind_of Hash, json
263
274
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -520,7 +531,8 @@ class ModelRoundTripTest < Minitest::Test
520
531
  def test_create_organization_api_key_round_trip
521
532
  fixture = {
522
533
  "name" => "stub",
523
- "permissions" => []
534
+ "permissions" => [],
535
+ "expires_at" => "stub"
524
536
  }
525
537
  model = WorkOS::CreateOrganizationApiKey.new(fixture.to_json)
526
538
  json = model.to_h
@@ -713,7 +725,8 @@ class ModelRoundTripTest < Minitest::Test
713
725
  fixture = {
714
726
  "name" => "stub",
715
727
  "organization_id" => "stub",
716
- "permissions" => []
728
+ "permissions" => [],
729
+ "expires_at" => "stub"
717
730
  }
718
731
  model = WorkOS::CreateUserApiKey.new(fixture.to_json)
719
732
  json = model.to_h
@@ -728,6 +741,7 @@ class ModelRoundTripTest < Minitest::Test
728
741
  "email" => "stub",
729
742
  "first_name" => nil,
730
743
  "last_name" => nil,
744
+ "name" => nil,
731
745
  "email_verified" => nil,
732
746
  "metadata" => nil,
733
747
  "external_id" => nil,
@@ -747,6 +761,7 @@ class ModelRoundTripTest < Minitest::Test
747
761
  "email" => "stub",
748
762
  "first_name" => "stub",
749
763
  "last_name" => "stub",
764
+ "name" => "stub",
750
765
  "email_verified" => true,
751
766
  "metadata" => nil,
752
767
  "external_id" => nil,
@@ -820,8 +835,7 @@ class ModelRoundTripTest < Minitest::Test
820
835
 
821
836
  def test_revoke_session_round_trip
822
837
  fixture = {
823
- "session_id" => "stub",
824
- "return_to" => "stub"
838
+ "session_id" => "stub"
825
839
  }
826
840
  model = WorkOS::RevokeSession.new(fixture.to_json)
827
841
  json = model.to_h
@@ -883,6 +897,214 @@ class ModelRoundTripTest < Minitest::Test
883
897
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
884
898
  end
885
899
 
900
+ def test_actor_round_trip
901
+ fixture = {
902
+ "id" => "stub",
903
+ "name" => "stub"
904
+ }
905
+ model = WorkOS::Actor.new(fixture.to_json)
906
+ json = model.to_h
907
+ assert_kind_of Hash, json
908
+ assert_equal fixture["id"], json[:id]
909
+ assert_equal fixture["name"], json[:name]
910
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
911
+ end
912
+
913
+ def test_create_data_key_request_round_trip
914
+ fixture = {
915
+ "context" => {}
916
+ }
917
+ model = WorkOS::CreateDataKeyRequest.new(fixture.to_json)
918
+ json = model.to_h
919
+ assert_kind_of Hash, json
920
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
921
+ end
922
+
923
+ def test_create_data_key_response_round_trip
924
+ fixture = {
925
+ "context" => {},
926
+ "data_key" => "stub",
927
+ "encrypted_keys" => "stub",
928
+ "id" => "stub"
929
+ }
930
+ model = WorkOS::CreateDataKeyResponse.new(fixture.to_json)
931
+ json = model.to_h
932
+ assert_kind_of Hash, json
933
+ assert_equal fixture["data_key"], json[:data_key]
934
+ assert_equal fixture["encrypted_keys"], json[:encrypted_keys]
935
+ assert_equal fixture["id"], json[:id]
936
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
937
+ end
938
+
939
+ def test_create_object_request_round_trip
940
+ fixture = {
941
+ "key_context" => {},
942
+ "name" => "stub",
943
+ "value" => "stub"
944
+ }
945
+ model = WorkOS::CreateObjectRequest.new(fixture.to_json)
946
+ json = model.to_h
947
+ assert_kind_of Hash, json
948
+ assert_equal fixture["name"], json[:name]
949
+ assert_equal fixture["value"], json[:value]
950
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
951
+ end
952
+
953
+ def test_decrypt_request_round_trip
954
+ fixture = {
955
+ "keys" => "stub"
956
+ }
957
+ model = WorkOS::DecryptRequest.new(fixture.to_json)
958
+ json = model.to_h
959
+ assert_kind_of Hash, json
960
+ assert_equal fixture["keys"], json[:keys]
961
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
962
+ end
963
+
964
+ def test_decrypt_response_round_trip
965
+ fixture = {
966
+ "data_key" => "stub",
967
+ "id" => "stub"
968
+ }
969
+ model = WorkOS::DecryptResponse.new(fixture.to_json)
970
+ json = model.to_h
971
+ assert_kind_of Hash, json
972
+ assert_equal fixture["data_key"], json[:data_key]
973
+ assert_equal fixture["id"], json[:id]
974
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
975
+ end
976
+
977
+ def test_delete_object_response_round_trip
978
+ fixture = {
979
+ "name" => "stub",
980
+ "success" => true
981
+ }
982
+ model = WorkOS::DeleteObjectResponse.new(fixture.to_json)
983
+ json = model.to_h
984
+ assert_kind_of Hash, json
985
+ assert_equal fixture["name"], json[:name]
986
+ assert_equal fixture["success"], json[:success]
987
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
988
+ end
989
+
990
+ def test_error_response_round_trip
991
+ fixture = {
992
+ "error" => "stub"
993
+ }
994
+ model = WorkOS::ErrorResponse.new(fixture.to_json)
995
+ json = model.to_h
996
+ assert_kind_of Hash, json
997
+ assert_equal fixture["error"], json[:error]
998
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
999
+ end
1000
+
1001
+ def test_vault_object_round_trip
1002
+ fixture = {
1003
+ "id" => "stub",
1004
+ "metadata" => {},
1005
+ "name" => "stub",
1006
+ "value" => "stub"
1007
+ }
1008
+ model = WorkOS::VaultObject.new(fixture.to_json)
1009
+ json = model.to_h
1010
+ assert_kind_of Hash, json
1011
+ assert_equal fixture["id"], json[:id]
1012
+ assert_equal fixture["name"], json[:name]
1013
+ assert_equal fixture["value"], json[:value]
1014
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1015
+ end
1016
+
1017
+ def test_object_metadata_round_trip
1018
+ fixture = {
1019
+ "context" => {},
1020
+ "environment_id" => "stub",
1021
+ "id" => "stub",
1022
+ "key_id" => "stub",
1023
+ "updated_at" => "stub",
1024
+ "updated_by" => {},
1025
+ "version_id" => nil
1026
+ }
1027
+ model = WorkOS::ObjectMetadata.new(fixture.to_json)
1028
+ json = model.to_h
1029
+ assert_kind_of Hash, json
1030
+ assert_equal fixture["environment_id"], json[:environment_id]
1031
+ assert_equal fixture["id"], json[:id]
1032
+ assert_equal fixture["key_id"], json[:key_id]
1033
+ assert_equal fixture["updated_at"], json[:updated_at]
1034
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1035
+ end
1036
+
1037
+ def test_object_summary_round_trip
1038
+ fixture = {
1039
+ "id" => "stub",
1040
+ "name" => "stub",
1041
+ "updated_at" => nil
1042
+ }
1043
+ model = WorkOS::ObjectSummary.new(fixture.to_json)
1044
+ json = model.to_h
1045
+ assert_kind_of Hash, json
1046
+ assert_equal fixture["id"], json[:id]
1047
+ assert_equal fixture["name"], json[:name]
1048
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1049
+ end
1050
+
1051
+ def test_object_version_round_trip
1052
+ fixture = {
1053
+ "created_at" => "stub",
1054
+ "current_version" => true,
1055
+ "etag" => "stub",
1056
+ "id" => "stub",
1057
+ "size" => 1
1058
+ }
1059
+ model = WorkOS::ObjectVersion.new(fixture.to_json)
1060
+ json = model.to_h
1061
+ assert_kind_of Hash, json
1062
+ assert_equal fixture["created_at"], json[:created_at]
1063
+ assert_equal fixture["current_version"], json[:current_version]
1064
+ assert_equal fixture["etag"], json[:etag]
1065
+ assert_equal fixture["id"], json[:id]
1066
+ assert_equal fixture["size"], json[:size]
1067
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1068
+ end
1069
+
1070
+ def test_object_without_value_round_trip
1071
+ fixture = {
1072
+ "id" => "stub",
1073
+ "metadata" => {},
1074
+ "name" => "stub"
1075
+ }
1076
+ model = WorkOS::ObjectWithoutValue.new(fixture.to_json)
1077
+ json = model.to_h
1078
+ assert_kind_of Hash, json
1079
+ assert_equal fixture["id"], json[:id]
1080
+ assert_equal fixture["name"], json[:name]
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_rekey_request_round_trip
1085
+ fixture = {
1086
+ "context" => {},
1087
+ "encrypted_keys" => "stub"
1088
+ }
1089
+ model = WorkOS::RekeyRequest.new(fixture.to_json)
1090
+ json = model.to_h
1091
+ assert_kind_of Hash, json
1092
+ assert_equal fixture["encrypted_keys"], json[:encrypted_keys]
1093
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1094
+ end
1095
+
1096
+ def test_update_object_request_round_trip
1097
+ fixture = {
1098
+ "value" => "stub",
1099
+ "version_check" => nil
1100
+ }
1101
+ model = WorkOS::UpdateObjectRequest.new(fixture.to_json)
1102
+ json = model.to_h
1103
+ assert_kind_of Hash, json
1104
+ assert_equal fixture["value"], json[:value]
1105
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1106
+ end
1107
+
886
1108
  def test_external_auth_complete_response_round_trip
887
1109
  fixture = {
888
1110
  "redirect_uri" => "stub"
@@ -902,6 +1124,7 @@ class ModelRoundTripTest < Minitest::Test
902
1124
  "name" => "stub",
903
1125
  "obfuscated_value" => "stub",
904
1126
  "last_used_at" => nil,
1127
+ "expires_at" => nil,
905
1128
  "permissions" => [],
906
1129
  "created_at" => "stub",
907
1130
  "updated_at" => "stub"
@@ -913,6 +1136,7 @@ class ModelRoundTripTest < Minitest::Test
913
1136
  assert_equal fixture["name"], json[:name]
914
1137
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
915
1138
  assert_nil json[:last_used_at]
1139
+ assert_nil json[:expires_at]
916
1140
  assert_equal fixture["created_at"], json[:created_at]
917
1141
  assert_equal fixture["updated_at"], json[:updated_at]
918
1142
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -929,6 +1153,73 @@ class ModelRoundTripTest < Minitest::Test
929
1153
  end
930
1154
 
931
1155
  def test_connect_application_round_trip
1156
+ fixture = {
1157
+ "object" => "connect_application",
1158
+ "id" => "stub",
1159
+ "client_id" => "stub",
1160
+ "description" => nil,
1161
+ "name" => "stub",
1162
+ "scopes" => [],
1163
+ "created_at" => "stub",
1164
+ "updated_at" => "stub"
1165
+ }
1166
+ model = WorkOS::ConnectApplication.new(fixture.to_json)
1167
+ json = model.to_h
1168
+ assert_kind_of Hash, json
1169
+ assert_equal fixture["id"], json[:id]
1170
+ assert_equal fixture["client_id"], json[:client_id]
1171
+ assert_nil json[:description]
1172
+ assert_equal fixture["name"], json[:name]
1173
+ assert_equal fixture["created_at"], json[:created_at]
1174
+ assert_equal fixture["updated_at"], json[:updated_at]
1175
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1176
+ end
1177
+
1178
+ def test_connect_application_oauth_round_trip
1179
+ fixture = {
1180
+ "object" => "connect_application",
1181
+ "id" => "stub",
1182
+ "client_id" => "stub",
1183
+ "description" => nil,
1184
+ "name" => "stub",
1185
+ "scopes" => [],
1186
+ "created_at" => "stub",
1187
+ "updated_at" => "stub",
1188
+ "application_type" => "oauth",
1189
+ "redirect_uris" => [],
1190
+ "uses_pkce" => true,
1191
+ "is_first_party" => true,
1192
+ "was_dynamically_registered" => true,
1193
+ "organization_id" => "stub"
1194
+ }
1195
+ model = WorkOS::ConnectApplicationOAuth.new(fixture.to_json)
1196
+ json = model.to_h
1197
+ assert_kind_of Hash, json
1198
+ assert_equal fixture["id"], json[:id]
1199
+ assert_equal fixture["client_id"], json[:client_id]
1200
+ assert_nil json[:description]
1201
+ assert_equal fixture["name"], json[:name]
1202
+ assert_equal fixture["created_at"], json[:created_at]
1203
+ assert_equal fixture["updated_at"], json[:updated_at]
1204
+ assert_equal fixture["uses_pkce"], json[:uses_pkce]
1205
+ assert_equal fixture["is_first_party"], json[:is_first_party]
1206
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1207
+ end
1208
+
1209
+ def test_connect_application_oauth_redirect_uris_round_trip
1210
+ fixture = {
1211
+ "uri" => "stub",
1212
+ "default" => true
1213
+ }
1214
+ model = WorkOS::ConnectApplicationOAuthRedirectUris.new(fixture.to_json)
1215
+ json = model.to_h
1216
+ assert_kind_of Hash, json
1217
+ assert_equal fixture["uri"], json[:uri]
1218
+ assert_equal fixture["default"], json[:default]
1219
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1220
+ end
1221
+
1222
+ def test_connect_application_m2m_round_trip
932
1223
  fixture = {
933
1224
  "object" => "connect_application",
934
1225
  "id" => "stub",
@@ -941,7 +1232,7 @@ class ModelRoundTripTest < Minitest::Test
941
1232
  "application_type" => "m2m",
942
1233
  "organization_id" => "stub"
943
1234
  }
944
- model = WorkOS::ConnectApplication.new(fixture.to_json)
1235
+ model = WorkOS::ConnectApplicationM2M.new(fixture.to_json)
945
1236
  json = model.to_h
946
1237
  assert_kind_of Hash, json
947
1238
  assert_equal fixture["id"], json[:id]
@@ -950,6 +1241,7 @@ class ModelRoundTripTest < Minitest::Test
950
1241
  assert_equal fixture["name"], json[:name]
951
1242
  assert_equal fixture["created_at"], json[:created_at]
952
1243
  assert_equal fixture["updated_at"], json[:updated_at]
1244
+ assert_equal fixture["organization_id"], json[:organization_id]
953
1245
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
954
1246
  end
955
1247
 
@@ -986,7 +1278,7 @@ class ModelRoundTripTest < Minitest::Test
986
1278
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
987
1279
  end
988
1280
 
989
- def test_audit_log_export_json_round_trip
1281
+ def test_audit_log_export_round_trip
990
1282
  fixture = {
991
1283
  "object" => "audit_log_export",
992
1284
  "id" => "stub",
@@ -995,7 +1287,7 @@ class ModelRoundTripTest < Minitest::Test
995
1287
  "created_at" => "stub",
996
1288
  "updated_at" => "stub"
997
1289
  }
998
- model = WorkOS::AuditLogExportJson.new(fixture.to_json)
1290
+ model = WorkOS::AuditLogExport.new(fixture.to_json)
999
1291
  json = model.to_h
1000
1292
  assert_kind_of Hash, json
1001
1293
  assert_equal fixture["id"], json[:id]
@@ -1004,18 +1296,18 @@ class ModelRoundTripTest < Minitest::Test
1004
1296
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1005
1297
  end
1006
1298
 
1007
- def test_audit_logs_retention_json_round_trip
1299
+ def test_audit_logs_retention_round_trip
1008
1300
  fixture = {
1009
1301
  "retention_period_in_days" => nil
1010
1302
  }
1011
- model = WorkOS::AuditLogsRetentionJson.new(fixture.to_json)
1303
+ model = WorkOS::AuditLogsRetention.new(fixture.to_json)
1012
1304
  json = model.to_h
1013
1305
  assert_kind_of Hash, json
1014
1306
  assert_nil json[:retention_period_in_days]
1015
1307
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1016
1308
  end
1017
1309
 
1018
- def test_audit_log_schema_json_round_trip
1310
+ def test_audit_log_schema_round_trip
1019
1311
  fixture = {
1020
1312
  "object" => "audit_log_schema",
1021
1313
  "version" => 1,
@@ -1024,7 +1316,7 @@ class ModelRoundTripTest < Minitest::Test
1024
1316
  "metadata" => {},
1025
1317
  "created_at" => "stub"
1026
1318
  }
1027
- model = WorkOS::AuditLogSchemaJson.new(fixture.to_json)
1319
+ model = WorkOS::AuditLogSchema.new(fixture.to_json)
1028
1320
  json = model.to_h
1029
1321
  assert_kind_of Hash, json
1030
1322
  assert_equal fixture["version"], json[:version]
@@ -1032,7 +1324,7 @@ class ModelRoundTripTest < Minitest::Test
1032
1324
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1033
1325
  end
1034
1326
 
1035
- def test_audit_log_action_json_round_trip
1327
+ def test_audit_log_action_round_trip
1036
1328
  fixture = {
1037
1329
  "object" => "audit_log_action",
1038
1330
  "name" => "stub",
@@ -1040,7 +1332,7 @@ class ModelRoundTripTest < Minitest::Test
1040
1332
  "created_at" => "stub",
1041
1333
  "updated_at" => "stub"
1042
1334
  }
1043
- model = WorkOS::AuditLogActionJson.new(fixture.to_json)
1335
+ model = WorkOS::AuditLogAction.new(fixture.to_json)
1044
1336
  json = model.to_h
1045
1337
  assert_kind_of Hash, json
1046
1338
  assert_equal fixture["name"], json[:name]
@@ -1260,6 +1552,7 @@ class ModelRoundTripTest < Minitest::Test
1260
1552
  "id" => "stub",
1261
1553
  "first_name" => nil,
1262
1554
  "last_name" => nil,
1555
+ "name" => nil,
1263
1556
  "profile_picture_url" => nil,
1264
1557
  "email" => "stub",
1265
1558
  "email_verified" => true,
@@ -1501,6 +1794,32 @@ class ModelRoundTripTest < Minitest::Test
1501
1794
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1502
1795
  end
1503
1796
 
1797
+ def test_pipe_connected_account_round_trip
1798
+ fixture = {
1799
+ "object" => "connected_account",
1800
+ "id" => "stub",
1801
+ "data_integration_id" => "stub",
1802
+ "provider_slug" => "stub",
1803
+ "user_id" => nil,
1804
+ "organization_id" => nil,
1805
+ "scopes" => [],
1806
+ "state" => "stub",
1807
+ "created_at" => "stub",
1808
+ "updated_at" => "stub"
1809
+ }
1810
+ model = WorkOS::PipeConnectedAccount.new(fixture.to_json)
1811
+ json = model.to_h
1812
+ assert_kind_of Hash, json
1813
+ assert_equal fixture["id"], json[:id]
1814
+ assert_equal fixture["data_integration_id"], json[:data_integration_id]
1815
+ assert_equal fixture["provider_slug"], json[:provider_slug]
1816
+ assert_nil json[:user_id]
1817
+ assert_nil json[:organization_id]
1818
+ assert_equal fixture["created_at"], json[:created_at]
1819
+ assert_equal fixture["updated_at"], json[:updated_at]
1820
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1821
+ end
1822
+
1504
1823
  def test_waitlist_user_round_trip
1505
1824
  fixture = {
1506
1825
  "object" => "waitlist_user",
@@ -1542,12 +1861,12 @@ class ModelRoundTripTest < Minitest::Test
1542
1861
 
1543
1862
  def test_action_authentication_denied_round_trip
1544
1863
  fixture = {
1864
+ "object" => "event",
1545
1865
  "id" => "stub",
1546
1866
  "event" => "action.authentication.denied",
1547
1867
  "data" => {},
1548
- "context" => {},
1549
1868
  "created_at" => "stub",
1550
- "object" => "event"
1869
+ "context" => {}
1551
1870
  }
1552
1871
  model = WorkOS::ActionAuthenticationDenied.new(fixture.to_json)
1553
1872
  json = model.to_h
@@ -1584,12 +1903,12 @@ class ModelRoundTripTest < Minitest::Test
1584
1903
 
1585
1904
  def test_action_user_registration_denied_round_trip
1586
1905
  fixture = {
1906
+ "object" => "event",
1587
1907
  "id" => "stub",
1588
1908
  "event" => "action.user_registration.denied",
1589
1909
  "data" => {},
1590
- "context" => {},
1591
1910
  "created_at" => "stub",
1592
- "object" => "event"
1911
+ "context" => {}
1593
1912
  }
1594
1913
  model = WorkOS::ActionUserRegistrationDenied.new(fixture.to_json)
1595
1914
  json = model.to_h
@@ -1624,12 +1943,12 @@ class ModelRoundTripTest < Minitest::Test
1624
1943
 
1625
1944
  def test_api_key_created_round_trip
1626
1945
  fixture = {
1946
+ "object" => "event",
1627
1947
  "id" => "stub",
1628
1948
  "event" => "api_key.created",
1629
1949
  "data" => {},
1630
1950
  "created_at" => "stub",
1631
- "context" => {},
1632
- "object" => "event"
1951
+ "context" => {}
1633
1952
  }
1634
1953
  model = WorkOS::ApiKeyCreated.new(fixture.to_json)
1635
1954
  json = model.to_h
@@ -1647,6 +1966,7 @@ class ModelRoundTripTest < Minitest::Test
1647
1966
  "name" => "stub",
1648
1967
  "obfuscated_value" => "stub",
1649
1968
  "last_used_at" => nil,
1969
+ "expires_at" => nil,
1650
1970
  "permissions" => [],
1651
1971
  "created_at" => "stub",
1652
1972
  "updated_at" => "stub"
@@ -1658,6 +1978,7 @@ class ModelRoundTripTest < Minitest::Test
1658
1978
  assert_equal fixture["name"], json[:name]
1659
1979
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
1660
1980
  assert_nil json[:last_used_at]
1981
+ assert_nil json[:expires_at]
1661
1982
  assert_equal fixture["created_at"], json[:created_at]
1662
1983
  assert_equal fixture["updated_at"], json[:updated_at]
1663
1984
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -1691,12 +2012,12 @@ class ModelRoundTripTest < Minitest::Test
1691
2012
 
1692
2013
  def test_api_key_revoked_round_trip
1693
2014
  fixture = {
2015
+ "object" => "event",
1694
2016
  "id" => "stub",
1695
2017
  "event" => "api_key.revoked",
1696
2018
  "data" => {},
1697
2019
  "created_at" => "stub",
1698
- "context" => {},
1699
- "object" => "event"
2020
+ "context" => {}
1700
2021
  }
1701
2022
  model = WorkOS::ApiKeyRevoked.new(fixture.to_json)
1702
2023
  json = model.to_h
@@ -1714,6 +2035,7 @@ class ModelRoundTripTest < Minitest::Test
1714
2035
  "name" => "stub",
1715
2036
  "obfuscated_value" => "stub",
1716
2037
  "last_used_at" => nil,
2038
+ "expires_at" => nil,
1717
2039
  "permissions" => [],
1718
2040
  "created_at" => "stub",
1719
2041
  "updated_at" => "stub"
@@ -1725,6 +2047,7 @@ class ModelRoundTripTest < Minitest::Test
1725
2047
  assert_equal fixture["name"], json[:name]
1726
2048
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
1727
2049
  assert_nil json[:last_used_at]
2050
+ assert_nil json[:expires_at]
1728
2051
  assert_equal fixture["created_at"], json[:created_at]
1729
2052
  assert_equal fixture["updated_at"], json[:updated_at]
1730
2053
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -1756,14 +2079,95 @@ class ModelRoundTripTest < Minitest::Test
1756
2079
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1757
2080
  end
1758
2081
 
2082
+ def test_api_key_updated_round_trip
2083
+ fixture = {
2084
+ "object" => "event",
2085
+ "id" => "stub",
2086
+ "event" => "api_key.updated",
2087
+ "data" => {},
2088
+ "created_at" => "stub",
2089
+ "context" => {}
2090
+ }
2091
+ model = WorkOS::ApiKeyUpdated.new(fixture.to_json)
2092
+ json = model.to_h
2093
+ assert_kind_of Hash, json
2094
+ assert_equal fixture["id"], json[:id]
2095
+ assert_equal fixture["created_at"], json[:created_at]
2096
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2097
+ end
2098
+
2099
+ def test_api_key_updated_data_round_trip
2100
+ fixture = {
2101
+ "object" => "api_key",
2102
+ "id" => "stub",
2103
+ "owner" => {},
2104
+ "name" => "stub",
2105
+ "obfuscated_value" => "stub",
2106
+ "last_used_at" => nil,
2107
+ "expires_at" => nil,
2108
+ "permissions" => [],
2109
+ "created_at" => "stub",
2110
+ "updated_at" => "stub",
2111
+ "previous_attributes" => {}
2112
+ }
2113
+ model = WorkOS::ApiKeyUpdatedData.new(fixture.to_json)
2114
+ json = model.to_h
2115
+ assert_kind_of Hash, json
2116
+ assert_equal fixture["id"], json[:id]
2117
+ assert_equal fixture["name"], json[:name]
2118
+ assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
2119
+ assert_nil json[:last_used_at]
2120
+ assert_nil json[:expires_at]
2121
+ assert_equal fixture["created_at"], json[:created_at]
2122
+ assert_equal fixture["updated_at"], json[:updated_at]
2123
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2124
+ end
2125
+
2126
+ def test_api_key_updated_data_owner_round_trip
2127
+ fixture = {
2128
+ "type" => "organization",
2129
+ "id" => "stub"
2130
+ }
2131
+ model = WorkOS::ApiKeyUpdatedDataOwner.new(fixture.to_json)
2132
+ json = model.to_h
2133
+ assert_kind_of Hash, json
2134
+ assert_equal fixture["id"], json[:id]
2135
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2136
+ end
2137
+
2138
+ def test_user_api_key_updated_data_owner_round_trip
2139
+ fixture = {
2140
+ "type" => "user",
2141
+ "id" => "stub",
2142
+ "organization_id" => "stub"
2143
+ }
2144
+ model = WorkOS::UserApiKeyUpdatedDataOwner.new(fixture.to_json)
2145
+ json = model.to_h
2146
+ assert_kind_of Hash, json
2147
+ assert_equal fixture["id"], json[:id]
2148
+ assert_equal fixture["organization_id"], json[:organization_id]
2149
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2150
+ end
2151
+
2152
+ def test_api_key_updated_data_previous_attribute_round_trip
2153
+ fixture = {
2154
+ "expires_at" => nil
2155
+ }
2156
+ model = WorkOS::ApiKeyUpdatedDataPreviousAttribute.new(fixture.to_json)
2157
+ json = model.to_h
2158
+ assert_kind_of Hash, json
2159
+ assert_nil json[:expires_at]
2160
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2161
+ end
2162
+
1759
2163
  def test_authentication_email_verification_failed_round_trip
1760
2164
  fixture = {
2165
+ "object" => "event",
1761
2166
  "id" => "stub",
1762
2167
  "event" => "authentication.email_verification_failed",
1763
2168
  "data" => {},
1764
2169
  "created_at" => "stub",
1765
- "context" => {},
1766
- "object" => "event"
2170
+ "context" => {}
1767
2171
  }
1768
2172
  model = WorkOS::AuthenticationEmailVerificationFailed.new(fixture.to_json)
1769
2173
  json = model.to_h
@@ -1808,12 +2212,12 @@ class ModelRoundTripTest < Minitest::Test
1808
2212
 
1809
2213
  def test_authentication_email_verification_succeeded_round_trip
1810
2214
  fixture = {
2215
+ "object" => "event",
1811
2216
  "id" => "stub",
1812
2217
  "event" => "authentication.email_verification_succeeded",
1813
2218
  "data" => {},
1814
2219
  "created_at" => "stub",
1815
- "context" => {},
1816
- "object" => "event"
2220
+ "context" => {}
1817
2221
  }
1818
2222
  model = WorkOS::AuthenticationEmailVerificationSucceeded.new(fixture.to_json)
1819
2223
  json = model.to_h
@@ -1844,12 +2248,12 @@ class ModelRoundTripTest < Minitest::Test
1844
2248
 
1845
2249
  def test_authentication_magic_auth_failed_round_trip
1846
2250
  fixture = {
2251
+ "object" => "event",
1847
2252
  "id" => "stub",
1848
2253
  "event" => "authentication.magic_auth_failed",
1849
2254
  "data" => {},
1850
2255
  "created_at" => "stub",
1851
- "context" => {},
1852
- "object" => "event"
2256
+ "context" => {}
1853
2257
  }
1854
2258
  model = WorkOS::AuthenticationMagicAuthFailed.new(fixture.to_json)
1855
2259
  json = model.to_h
@@ -1894,12 +2298,12 @@ class ModelRoundTripTest < Minitest::Test
1894
2298
 
1895
2299
  def test_authentication_magic_auth_succeeded_round_trip
1896
2300
  fixture = {
2301
+ "object" => "event",
1897
2302
  "id" => "stub",
1898
2303
  "event" => "authentication.magic_auth_succeeded",
1899
2304
  "data" => {},
1900
2305
  "created_at" => "stub",
1901
- "context" => {},
1902
- "object" => "event"
2306
+ "context" => {}
1903
2307
  }
1904
2308
  model = WorkOS::AuthenticationMagicAuthSucceeded.new(fixture.to_json)
1905
2309
  json = model.to_h
@@ -1930,12 +2334,12 @@ class ModelRoundTripTest < Minitest::Test
1930
2334
 
1931
2335
  def test_authentication_mfa_failed_round_trip
1932
2336
  fixture = {
2337
+ "object" => "event",
1933
2338
  "id" => "stub",
1934
2339
  "event" => "authentication.mfa_failed",
1935
2340
  "data" => {},
1936
2341
  "created_at" => "stub",
1937
- "context" => {},
1938
- "object" => "event"
2342
+ "context" => {}
1939
2343
  }
1940
2344
  model = WorkOS::AuthenticationMFAFailed.new(fixture.to_json)
1941
2345
  json = model.to_h
@@ -1980,12 +2384,12 @@ class ModelRoundTripTest < Minitest::Test
1980
2384
 
1981
2385
  def test_authentication_mfa_succeeded_round_trip
1982
2386
  fixture = {
2387
+ "object" => "event",
1983
2388
  "id" => "stub",
1984
2389
  "event" => "authentication.mfa_succeeded",
1985
2390
  "data" => {},
1986
2391
  "created_at" => "stub",
1987
- "context" => {},
1988
- "object" => "event"
2392
+ "context" => {}
1989
2393
  }
1990
2394
  model = WorkOS::AuthenticationMFASucceeded.new(fixture.to_json)
1991
2395
  json = model.to_h
@@ -2016,12 +2420,12 @@ class ModelRoundTripTest < Minitest::Test
2016
2420
 
2017
2421
  def test_authentication_oauth_failed_round_trip
2018
2422
  fixture = {
2423
+ "object" => "event",
2019
2424
  "id" => "stub",
2020
2425
  "event" => "authentication.oauth_failed",
2021
2426
  "data" => {},
2022
2427
  "created_at" => "stub",
2023
- "context" => {},
2024
- "object" => "event"
2428
+ "context" => {}
2025
2429
  }
2026
2430
  model = WorkOS::AuthenticationOAuthFailed.new(fixture.to_json)
2027
2431
  json = model.to_h
@@ -2066,12 +2470,12 @@ class ModelRoundTripTest < Minitest::Test
2066
2470
 
2067
2471
  def test_authentication_oauth_succeeded_round_trip
2068
2472
  fixture = {
2473
+ "object" => "event",
2069
2474
  "id" => "stub",
2070
2475
  "event" => "authentication.oauth_succeeded",
2071
2476
  "data" => {},
2072
2477
  "created_at" => "stub",
2073
- "context" => {},
2074
- "object" => "event"
2478
+ "context" => {}
2075
2479
  }
2076
2480
  model = WorkOS::AuthenticationOAuthSucceeded.new(fixture.to_json)
2077
2481
  json = model.to_h
@@ -2102,12 +2506,12 @@ class ModelRoundTripTest < Minitest::Test
2102
2506
 
2103
2507
  def test_authentication_passkey_failed_round_trip
2104
2508
  fixture = {
2509
+ "object" => "event",
2105
2510
  "id" => "stub",
2106
2511
  "event" => "authentication.passkey_failed",
2107
2512
  "data" => {},
2108
2513
  "created_at" => "stub",
2109
- "context" => {},
2110
- "object" => "event"
2514
+ "context" => {}
2111
2515
  }
2112
2516
  model = WorkOS::AuthenticationPasskeyFailed.new(fixture.to_json)
2113
2517
  json = model.to_h
@@ -2152,12 +2556,12 @@ class ModelRoundTripTest < Minitest::Test
2152
2556
 
2153
2557
  def test_authentication_passkey_succeeded_round_trip
2154
2558
  fixture = {
2559
+ "object" => "event",
2155
2560
  "id" => "stub",
2156
2561
  "event" => "authentication.passkey_succeeded",
2157
2562
  "data" => {},
2158
2563
  "created_at" => "stub",
2159
- "context" => {},
2160
- "object" => "event"
2564
+ "context" => {}
2161
2565
  }
2162
2566
  model = WorkOS::AuthenticationPasskeySucceeded.new(fixture.to_json)
2163
2567
  json = model.to_h
@@ -2188,12 +2592,12 @@ class ModelRoundTripTest < Minitest::Test
2188
2592
 
2189
2593
  def test_authentication_password_failed_round_trip
2190
2594
  fixture = {
2595
+ "object" => "event",
2191
2596
  "id" => "stub",
2192
2597
  "event" => "authentication.password_failed",
2193
2598
  "data" => {},
2194
2599
  "created_at" => "stub",
2195
- "context" => {},
2196
- "object" => "event"
2600
+ "context" => {}
2197
2601
  }
2198
2602
  model = WorkOS::AuthenticationPasswordFailed.new(fixture.to_json)
2199
2603
  json = model.to_h
@@ -2238,12 +2642,12 @@ class ModelRoundTripTest < Minitest::Test
2238
2642
 
2239
2643
  def test_authentication_password_succeeded_round_trip
2240
2644
  fixture = {
2645
+ "object" => "event",
2241
2646
  "id" => "stub",
2242
2647
  "event" => "authentication.password_succeeded",
2243
2648
  "data" => {},
2244
2649
  "created_at" => "stub",
2245
- "context" => {},
2246
- "object" => "event"
2650
+ "context" => {}
2247
2651
  }
2248
2652
  model = WorkOS::AuthenticationPasswordSucceeded.new(fixture.to_json)
2249
2653
  json = model.to_h
@@ -2274,12 +2678,12 @@ class ModelRoundTripTest < Minitest::Test
2274
2678
 
2275
2679
  def test_authentication_radar_risk_detected_round_trip
2276
2680
  fixture = {
2681
+ "object" => "event",
2277
2682
  "id" => "stub",
2278
2683
  "event" => "authentication.radar_risk_detected",
2279
2684
  "data" => {},
2280
2685
  "created_at" => "stub",
2281
- "context" => {},
2282
- "object" => "event"
2686
+ "context" => {}
2283
2687
  }
2284
2688
  model = WorkOS::AuthenticationRadarRiskDetected.new(fixture.to_json)
2285
2689
  json = model.to_h
@@ -2315,12 +2719,12 @@ class ModelRoundTripTest < Minitest::Test
2315
2719
 
2316
2720
  def test_authentication_sso_failed_round_trip
2317
2721
  fixture = {
2722
+ "object" => "event",
2318
2723
  "id" => "stub",
2319
2724
  "event" => "authentication.sso_failed",
2320
2725
  "data" => {},
2321
2726
  "created_at" => "stub",
2322
- "context" => {},
2323
- "object" => "event"
2727
+ "context" => {}
2324
2728
  }
2325
2729
  model = WorkOS::AuthenticationSSOFailed.new(fixture.to_json)
2326
2730
  json = model.to_h
@@ -2381,12 +2785,12 @@ class ModelRoundTripTest < Minitest::Test
2381
2785
 
2382
2786
  def test_authentication_sso_started_round_trip
2383
2787
  fixture = {
2788
+ "object" => "event",
2384
2789
  "id" => "stub",
2385
2790
  "event" => "authentication.sso_started",
2386
2791
  "data" => {},
2387
2792
  "created_at" => "stub",
2388
- "context" => {},
2389
- "object" => "event"
2793
+ "context" => {}
2390
2794
  }
2391
2795
  model = WorkOS::AuthenticationSSOStarted.new(fixture.to_json)
2392
2796
  json = model.to_h
@@ -2433,12 +2837,12 @@ class ModelRoundTripTest < Minitest::Test
2433
2837
 
2434
2838
  def test_authentication_sso_succeeded_round_trip
2435
2839
  fixture = {
2840
+ "object" => "event",
2436
2841
  "id" => "stub",
2437
2842
  "event" => "authentication.sso_succeeded",
2438
2843
  "data" => {},
2439
2844
  "created_at" => "stub",
2440
- "context" => {},
2441
- "object" => "event"
2845
+ "context" => {}
2442
2846
  }
2443
2847
  model = WorkOS::AuthenticationSSOSucceeded.new(fixture.to_json)
2444
2848
  json = model.to_h
@@ -2485,12 +2889,12 @@ class ModelRoundTripTest < Minitest::Test
2485
2889
 
2486
2890
  def test_authentication_sso_timed_out_round_trip
2487
2891
  fixture = {
2892
+ "object" => "event",
2488
2893
  "id" => "stub",
2489
2894
  "event" => "authentication.sso_timed_out",
2490
2895
  "data" => {},
2491
2896
  "created_at" => "stub",
2492
- "context" => {},
2493
- "object" => "event"
2897
+ "context" => {}
2494
2898
  }
2495
2899
  model = WorkOS::AuthenticationSSOTimedOut.new(fixture.to_json)
2496
2900
  json = model.to_h
@@ -2551,12 +2955,12 @@ class ModelRoundTripTest < Minitest::Test
2551
2955
 
2552
2956
  def test_connection_activated_round_trip
2553
2957
  fixture = {
2958
+ "object" => "event",
2554
2959
  "id" => "stub",
2555
2960
  "event" => "connection.activated",
2556
2961
  "data" => {},
2557
2962
  "created_at" => "stub",
2558
- "context" => {},
2559
- "object" => "event"
2963
+ "context" => {}
2560
2964
  }
2561
2965
  model = WorkOS::ConnectionActivated.new(fixture.to_json)
2562
2966
  json = model.to_h
@@ -2607,12 +3011,12 @@ class ModelRoundTripTest < Minitest::Test
2607
3011
 
2608
3012
  def test_connection_deactivated_round_trip
2609
3013
  fixture = {
3014
+ "object" => "event",
2610
3015
  "id" => "stub",
2611
3016
  "event" => "connection.deactivated",
2612
3017
  "data" => {},
2613
3018
  "created_at" => "stub",
2614
- "context" => {},
2615
- "object" => "event"
3019
+ "context" => {}
2616
3020
  }
2617
3021
  model = WorkOS::ConnectionDeactivated.new(fixture.to_json)
2618
3022
  json = model.to_h
@@ -2663,12 +3067,12 @@ class ModelRoundTripTest < Minitest::Test
2663
3067
 
2664
3068
  def test_connection_deleted_round_trip
2665
3069
  fixture = {
3070
+ "object" => "event",
2666
3071
  "id" => "stub",
2667
3072
  "event" => "connection.deleted",
2668
3073
  "data" => {},
2669
3074
  "created_at" => "stub",
2670
- "context" => {},
2671
- "object" => "event"
3075
+ "context" => {}
2672
3076
  }
2673
3077
  model = WorkOS::ConnectionDeleted.new(fixture.to_json)
2674
3078
  json = model.to_h
@@ -2701,12 +3105,12 @@ class ModelRoundTripTest < Minitest::Test
2701
3105
 
2702
3106
  def test_connection_saml_certificate_renewal_required_round_trip
2703
3107
  fixture = {
3108
+ "object" => "event",
2704
3109
  "id" => "stub",
2705
3110
  "event" => "connection.saml_certificate_renewal_required",
2706
3111
  "data" => {},
2707
3112
  "created_at" => "stub",
2708
- "context" => {},
2709
- "object" => "event"
3113
+ "context" => {}
2710
3114
  }
2711
3115
  model = WorkOS::ConnectionSAMLCertificateRenewalRequired.new(fixture.to_json)
2712
3116
  json = model.to_h
@@ -2757,12 +3161,12 @@ class ModelRoundTripTest < Minitest::Test
2757
3161
 
2758
3162
  def test_connection_saml_certificate_renewed_round_trip
2759
3163
  fixture = {
3164
+ "object" => "event",
2760
3165
  "id" => "stub",
2761
3166
  "event" => "connection.saml_certificate_renewed",
2762
3167
  "data" => {},
2763
3168
  "created_at" => "stub",
2764
- "context" => {},
2765
- "object" => "event"
3169
+ "context" => {}
2766
3170
  }
2767
3171
  model = WorkOS::ConnectionSAMLCertificateRenewed.new(fixture.to_json)
2768
3172
  json = model.to_h
@@ -2811,12 +3215,12 @@ class ModelRoundTripTest < Minitest::Test
2811
3215
 
2812
3216
  def test_dsync_activated_round_trip
2813
3217
  fixture = {
3218
+ "object" => "event",
2814
3219
  "id" => "stub",
2815
3220
  "event" => "dsync.activated",
2816
3221
  "data" => {},
2817
3222
  "created_at" => "stub",
2818
- "context" => {},
2819
- "object" => "event"
3223
+ "context" => {}
2820
3224
  }
2821
3225
  model = WorkOS::DsyncActivated.new(fixture.to_json)
2822
3226
  json = model.to_h
@@ -2864,16 +3268,16 @@ class ModelRoundTripTest < Minitest::Test
2864
3268
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2865
3269
  end
2866
3270
 
2867
- def test_dsync_deactivated_round_trip
3271
+ def test_dsync_deleted_round_trip
2868
3272
  fixture = {
3273
+ "object" => "event",
2869
3274
  "id" => "stub",
2870
- "event" => "dsync.deactivated",
3275
+ "event" => "dsync.deleted",
2871
3276
  "data" => {},
2872
3277
  "created_at" => "stub",
2873
- "context" => {},
2874
- "object" => "event"
3278
+ "context" => {}
2875
3279
  }
2876
- model = WorkOS::DsyncDeactivated.new(fixture.to_json)
3280
+ model = WorkOS::DsyncDeleted.new(fixture.to_json)
2877
3281
  json = model.to_h
2878
3282
  assert_kind_of Hash, json
2879
3283
  assert_equal fixture["id"], json[:id]
@@ -2881,7 +3285,7 @@ class ModelRoundTripTest < Minitest::Test
2881
3285
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2882
3286
  end
2883
3287
 
2884
- def test_dsync_deactivated_data_round_trip
3288
+ def test_dsync_deleted_data_round_trip
2885
3289
  fixture = {
2886
3290
  "object" => "directory",
2887
3291
  "id" => "stub",
@@ -2890,45 +3294,45 @@ class ModelRoundTripTest < Minitest::Test
2890
3294
  "state" => "stub",
2891
3295
  "name" => "stub",
2892
3296
  "created_at" => "stub",
2893
- "updated_at" => "stub",
2894
- "external_key" => "stub",
2895
- "domains" => []
3297
+ "updated_at" => "stub"
2896
3298
  }
2897
- model = WorkOS::DsyncDeactivatedData.new(fixture.to_json)
3299
+ model = WorkOS::DsyncDeletedData.new(fixture.to_json)
2898
3300
  json = model.to_h
2899
3301
  assert_kind_of Hash, json
2900
3302
  assert_equal fixture["id"], json[:id]
2901
3303
  assert_equal fixture["name"], json[:name]
2902
3304
  assert_equal fixture["created_at"], json[:created_at]
2903
3305
  assert_equal fixture["updated_at"], json[:updated_at]
2904
- assert_equal fixture["external_key"], json[:external_key]
2905
3306
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2906
3307
  end
2907
3308
 
2908
- def test_dsync_deactivated_data_domain_round_trip
3309
+ def test_dsync_group_created_round_trip
2909
3310
  fixture = {
2910
- "object" => "organization_domain",
3311
+ "object" => "event",
2911
3312
  "id" => "stub",
2912
- "domain" => "stub"
3313
+ "event" => "dsync.group.created",
3314
+ "data" => {},
3315
+ "created_at" => "stub",
3316
+ "context" => {}
2913
3317
  }
2914
- model = WorkOS::DsyncDeactivatedDataDomain.new(fixture.to_json)
3318
+ model = WorkOS::DsyncGroupCreated.new(fixture.to_json)
2915
3319
  json = model.to_h
2916
3320
  assert_kind_of Hash, json
2917
3321
  assert_equal fixture["id"], json[:id]
2918
- assert_equal fixture["domain"], json[:domain]
3322
+ assert_equal fixture["created_at"], json[:created_at]
2919
3323
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2920
3324
  end
2921
3325
 
2922
- def test_dsync_deleted_round_trip
3326
+ def test_dsync_group_deleted_round_trip
2923
3327
  fixture = {
3328
+ "object" => "event",
2924
3329
  "id" => "stub",
2925
- "event" => "dsync.deleted",
3330
+ "event" => "dsync.group.deleted",
2926
3331
  "data" => {},
2927
3332
  "created_at" => "stub",
2928
- "context" => {},
2929
- "object" => "event"
3333
+ "context" => {}
2930
3334
  }
2931
- model = WorkOS::DsyncDeleted.new(fixture.to_json)
3335
+ model = WorkOS::DsyncGroupDeleted.new(fixture.to_json)
2932
3336
  json = model.to_h
2933
3337
  assert_kind_of Hash, json
2934
3338
  assert_equal fixture["id"], json[:id]
@@ -2936,37 +3340,59 @@ class ModelRoundTripTest < Minitest::Test
2936
3340
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2937
3341
  end
2938
3342
 
2939
- def test_dsync_deleted_data_round_trip
3343
+ def test_dsync_group_updated_round_trip
2940
3344
  fixture = {
2941
- "object" => "directory",
3345
+ "object" => "event",
2942
3346
  "id" => "stub",
3347
+ "event" => "dsync.group.updated",
3348
+ "data" => {},
3349
+ "created_at" => "stub",
3350
+ "context" => {}
3351
+ }
3352
+ model = WorkOS::DsyncGroupUpdated.new(fixture.to_json)
3353
+ json = model.to_h
3354
+ assert_kind_of Hash, json
3355
+ assert_equal fixture["id"], json[:id]
3356
+ assert_equal fixture["created_at"], json[:created_at]
3357
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3358
+ end
3359
+
3360
+ def test_dsync_group_updated_data_round_trip
3361
+ fixture = {
3362
+ "object" => "directory_group",
3363
+ "id" => "stub",
3364
+ "idp_id" => "stub",
3365
+ "directory_id" => "stub",
2943
3366
  "organization_id" => "stub",
2944
- "type" => "stub",
2945
- "state" => "stub",
2946
3367
  "name" => "stub",
3368
+ "raw_attributes" => {},
2947
3369
  "created_at" => "stub",
2948
- "updated_at" => "stub"
3370
+ "updated_at" => "stub",
3371
+ "previous_attributes" => {}
2949
3372
  }
2950
- model = WorkOS::DsyncDeletedData.new(fixture.to_json)
3373
+ model = WorkOS::DsyncGroupUpdatedData.new(fixture.to_json)
2951
3374
  json = model.to_h
2952
3375
  assert_kind_of Hash, json
2953
3376
  assert_equal fixture["id"], json[:id]
3377
+ assert_equal fixture["idp_id"], json[:idp_id]
3378
+ assert_equal fixture["directory_id"], json[:directory_id]
3379
+ assert_equal fixture["organization_id"], json[:organization_id]
2954
3380
  assert_equal fixture["name"], json[:name]
2955
3381
  assert_equal fixture["created_at"], json[:created_at]
2956
3382
  assert_equal fixture["updated_at"], json[:updated_at]
2957
3383
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2958
3384
  end
2959
3385
 
2960
- def test_dsync_group_created_round_trip
3386
+ def test_dsync_token_created_round_trip
2961
3387
  fixture = {
3388
+ "object" => "event",
2962
3389
  "id" => "stub",
2963
- "event" => "dsync.group.created",
3390
+ "event" => "dsync.token.created",
2964
3391
  "data" => {},
2965
3392
  "created_at" => "stub",
2966
- "context" => {},
2967
- "object" => "event"
3393
+ "context" => {}
2968
3394
  }
2969
- model = WorkOS::DsyncGroupCreated.new(fixture.to_json)
3395
+ model = WorkOS::DsyncTokenCreated.new(fixture.to_json)
2970
3396
  json = model.to_h
2971
3397
  assert_kind_of Hash, json
2972
3398
  assert_equal fixture["id"], json[:id]
@@ -2974,33 +3400,35 @@ class ModelRoundTripTest < Minitest::Test
2974
3400
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2975
3401
  end
2976
3402
 
2977
- def test_dsync_group_deleted_round_trip
3403
+ def test_dsync_token_created_data_round_trip
2978
3404
  fixture = {
3405
+ "object" => "directory_token",
2979
3406
  "id" => "stub",
2980
- "event" => "dsync.group.deleted",
2981
- "data" => {},
2982
- "created_at" => "stub",
2983
- "context" => {},
2984
- "object" => "event"
3407
+ "directory_id" => "stub",
3408
+ "organization_id" => "stub",
3409
+ "token_suffix" => "stub",
3410
+ "created_at" => "stub"
2985
3411
  }
2986
- model = WorkOS::DsyncGroupDeleted.new(fixture.to_json)
3412
+ model = WorkOS::DsyncTokenCreatedData.new(fixture.to_json)
2987
3413
  json = model.to_h
2988
3414
  assert_kind_of Hash, json
2989
3415
  assert_equal fixture["id"], json[:id]
3416
+ assert_equal fixture["directory_id"], json[:directory_id]
3417
+ assert_equal fixture["token_suffix"], json[:token_suffix]
2990
3418
  assert_equal fixture["created_at"], json[:created_at]
2991
3419
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2992
3420
  end
2993
3421
 
2994
- def test_dsync_group_updated_round_trip
3422
+ def test_dsync_token_revoked_round_trip
2995
3423
  fixture = {
3424
+ "object" => "event",
2996
3425
  "id" => "stub",
2997
- "event" => "dsync.group.updated",
3426
+ "event" => "dsync.token.revoked",
2998
3427
  "data" => {},
2999
3428
  "created_at" => "stub",
3000
- "context" => {},
3001
- "object" => "event"
3429
+ "context" => {}
3002
3430
  }
3003
- model = WorkOS::DsyncGroupUpdated.new(fixture.to_json)
3431
+ model = WorkOS::DsyncTokenRevoked.new(fixture.to_json)
3004
3432
  json = model.to_h
3005
3433
  assert_kind_of Hash, json
3006
3434
  assert_equal fixture["id"], json[:id]
@@ -3008,40 +3436,33 @@ class ModelRoundTripTest < Minitest::Test
3008
3436
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3009
3437
  end
3010
3438
 
3011
- def test_dsync_group_updated_data_round_trip
3439
+ def test_dsync_token_revoked_data_round_trip
3012
3440
  fixture = {
3013
- "object" => "directory_group",
3441
+ "object" => "directory_token",
3014
3442
  "id" => "stub",
3015
- "idp_id" => "stub",
3016
3443
  "directory_id" => "stub",
3017
3444
  "organization_id" => "stub",
3018
- "name" => "stub",
3019
- "raw_attributes" => {},
3020
- "created_at" => "stub",
3021
- "updated_at" => "stub",
3022
- "previous_attributes" => {}
3445
+ "token_suffix" => "stub",
3446
+ "created_at" => "stub"
3023
3447
  }
3024
- model = WorkOS::DsyncGroupUpdatedData.new(fixture.to_json)
3448
+ model = WorkOS::DsyncTokenRevokedData.new(fixture.to_json)
3025
3449
  json = model.to_h
3026
3450
  assert_kind_of Hash, json
3027
3451
  assert_equal fixture["id"], json[:id]
3028
- assert_equal fixture["idp_id"], json[:idp_id]
3029
3452
  assert_equal fixture["directory_id"], json[:directory_id]
3030
- assert_equal fixture["organization_id"], json[:organization_id]
3031
- assert_equal fixture["name"], json[:name]
3453
+ assert_equal fixture["token_suffix"], json[:token_suffix]
3032
3454
  assert_equal fixture["created_at"], json[:created_at]
3033
- assert_equal fixture["updated_at"], json[:updated_at]
3034
3455
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3035
3456
  end
3036
3457
 
3037
3458
  def test_dsync_group_user_added_round_trip
3038
3459
  fixture = {
3460
+ "object" => "event",
3039
3461
  "id" => "stub",
3040
3462
  "event" => "dsync.group.user_added",
3041
3463
  "data" => {},
3042
3464
  "created_at" => "stub",
3043
- "context" => {},
3044
- "object" => "event"
3465
+ "context" => {}
3045
3466
  }
3046
3467
  model = WorkOS::DsyncGroupUserAdded.new(fixture.to_json)
3047
3468
  json = model.to_h
@@ -3066,12 +3487,12 @@ class ModelRoundTripTest < Minitest::Test
3066
3487
 
3067
3488
  def test_dsync_user_created_round_trip
3068
3489
  fixture = {
3490
+ "object" => "event",
3069
3491
  "id" => "stub",
3070
3492
  "event" => "dsync.user.created",
3071
3493
  "data" => {},
3072
3494
  "created_at" => "stub",
3073
- "context" => {},
3074
- "object" => "event"
3495
+ "context" => {}
3075
3496
  }
3076
3497
  model = WorkOS::DsyncUserCreated.new(fixture.to_json)
3077
3498
  json = model.to_h
@@ -3083,12 +3504,12 @@ class ModelRoundTripTest < Minitest::Test
3083
3504
 
3084
3505
  def test_dsync_user_deleted_round_trip
3085
3506
  fixture = {
3507
+ "object" => "event",
3086
3508
  "id" => "stub",
3087
3509
  "event" => "dsync.user.deleted",
3088
3510
  "data" => {},
3089
3511
  "created_at" => "stub",
3090
- "context" => {},
3091
- "object" => "event"
3512
+ "context" => {}
3092
3513
  }
3093
3514
  model = WorkOS::DsyncUserDeleted.new(fixture.to_json)
3094
3515
  json = model.to_h
@@ -3100,12 +3521,12 @@ class ModelRoundTripTest < Minitest::Test
3100
3521
 
3101
3522
  def test_dsync_group_user_removed_round_trip
3102
3523
  fixture = {
3524
+ "object" => "event",
3103
3525
  "id" => "stub",
3104
3526
  "event" => "dsync.group.user_removed",
3105
3527
  "data" => {},
3106
3528
  "created_at" => "stub",
3107
- "context" => {},
3108
- "object" => "event"
3529
+ "context" => {}
3109
3530
  }
3110
3531
  model = WorkOS::DsyncGroupUserRemoved.new(fixture.to_json)
3111
3532
  json = model.to_h
@@ -3130,12 +3551,12 @@ class ModelRoundTripTest < Minitest::Test
3130
3551
 
3131
3552
  def test_dsync_user_updated_round_trip
3132
3553
  fixture = {
3554
+ "object" => "event",
3133
3555
  "id" => "stub",
3134
3556
  "event" => "dsync.user.updated",
3135
3557
  "data" => {},
3136
3558
  "created_at" => "stub",
3137
- "context" => {},
3138
- "object" => "event"
3559
+ "context" => {}
3139
3560
  }
3140
3561
  model = WorkOS::DsyncUserUpdated.new(fixture.to_json)
3141
3562
  json = model.to_h
@@ -3195,12 +3616,12 @@ class ModelRoundTripTest < Minitest::Test
3195
3616
 
3196
3617
  def test_email_verification_created_round_trip
3197
3618
  fixture = {
3619
+ "object" => "event",
3198
3620
  "id" => "stub",
3199
3621
  "event" => "email_verification.created",
3200
3622
  "data" => {},
3201
3623
  "created_at" => "stub",
3202
- "context" => {},
3203
- "object" => "event"
3624
+ "context" => {}
3204
3625
  }
3205
3626
  model = WorkOS::EmailVerificationCreated.new(fixture.to_json)
3206
3627
  json = model.to_h
@@ -3234,12 +3655,12 @@ class ModelRoundTripTest < Minitest::Test
3234
3655
 
3235
3656
  def test_flag_created_round_trip
3236
3657
  fixture = {
3658
+ "object" => "event",
3237
3659
  "id" => "stub",
3238
3660
  "event" => "flag.created",
3239
3661
  "data" => {},
3240
3662
  "created_at" => "stub",
3241
- "context" => {},
3242
- "object" => "event"
3663
+ "context" => {}
3243
3664
  }
3244
3665
  model = WorkOS::FlagCreated.new(fixture.to_json)
3245
3666
  json = model.to_h
@@ -3322,12 +3743,12 @@ class ModelRoundTripTest < Minitest::Test
3322
3743
 
3323
3744
  def test_flag_deleted_round_trip
3324
3745
  fixture = {
3746
+ "object" => "event",
3325
3747
  "id" => "stub",
3326
3748
  "event" => "flag.deleted",
3327
3749
  "data" => {},
3328
3750
  "created_at" => "stub",
3329
- "context" => {},
3330
- "object" => "event"
3751
+ "context" => {}
3331
3752
  }
3332
3753
  model = WorkOS::FlagDeleted.new(fixture.to_json)
3333
3754
  json = model.to_h
@@ -3410,12 +3831,12 @@ class ModelRoundTripTest < Minitest::Test
3410
3831
 
3411
3832
  def test_flag_rule_updated_round_trip
3412
3833
  fixture = {
3834
+ "object" => "event",
3413
3835
  "id" => "stub",
3414
3836
  "event" => "flag.rule_updated",
3415
3837
  "data" => {},
3416
3838
  "created_at" => "stub",
3417
- "context" => {},
3418
- "object" => "event"
3839
+ "context" => {}
3419
3840
  }
3420
3841
  model = WorkOS::FlagRuleUpdated.new(fixture.to_json)
3421
3842
  json = model.to_h
@@ -3608,12 +4029,12 @@ class ModelRoundTripTest < Minitest::Test
3608
4029
 
3609
4030
  def test_flag_updated_round_trip
3610
4031
  fixture = {
4032
+ "object" => "event",
3611
4033
  "id" => "stub",
3612
4034
  "event" => "flag.updated",
3613
4035
  "data" => {},
3614
4036
  "created_at" => "stub",
3615
- "context" => {},
3616
- "object" => "event"
4037
+ "context" => {}
3617
4038
  }
3618
4039
  model = WorkOS::FlagUpdated.new(fixture.to_json)
3619
4040
  json = model.to_h
@@ -3721,12 +4142,12 @@ class ModelRoundTripTest < Minitest::Test
3721
4142
 
3722
4143
  def test_group_created_round_trip
3723
4144
  fixture = {
4145
+ "object" => "event",
3724
4146
  "id" => "stub",
3725
4147
  "event" => "group.created",
3726
4148
  "data" => {},
3727
4149
  "created_at" => "stub",
3728
- "context" => {},
3729
- "object" => "event"
4150
+ "context" => {}
3730
4151
  }
3731
4152
  model = WorkOS::GroupCreated.new(fixture.to_json)
3732
4153
  json = model.to_h
@@ -3738,12 +4159,12 @@ class ModelRoundTripTest < Minitest::Test
3738
4159
 
3739
4160
  def test_group_deleted_round_trip
3740
4161
  fixture = {
4162
+ "object" => "event",
3741
4163
  "id" => "stub",
3742
4164
  "event" => "group.deleted",
3743
4165
  "data" => {},
3744
4166
  "created_at" => "stub",
3745
- "context" => {},
3746
- "object" => "event"
4167
+ "context" => {}
3747
4168
  }
3748
4169
  model = WorkOS::GroupDeleted.new(fixture.to_json)
3749
4170
  json = model.to_h
@@ -3755,12 +4176,12 @@ class ModelRoundTripTest < Minitest::Test
3755
4176
 
3756
4177
  def test_group_member_added_round_trip
3757
4178
  fixture = {
4179
+ "object" => "event",
3758
4180
  "id" => "stub",
3759
4181
  "event" => "group.member_added",
3760
4182
  "data" => {},
3761
4183
  "created_at" => "stub",
3762
- "context" => {},
3763
- "object" => "event"
4184
+ "context" => {}
3764
4185
  }
3765
4186
  model = WorkOS::GroupMemberAdded.new(fixture.to_json)
3766
4187
  json = model.to_h
@@ -3785,12 +4206,12 @@ class ModelRoundTripTest < Minitest::Test
3785
4206
 
3786
4207
  def test_group_member_removed_round_trip
3787
4208
  fixture = {
4209
+ "object" => "event",
3788
4210
  "id" => "stub",
3789
4211
  "event" => "group.member_removed",
3790
4212
  "data" => {},
3791
4213
  "created_at" => "stub",
3792
- "context" => {},
3793
- "object" => "event"
4214
+ "context" => {}
3794
4215
  }
3795
4216
  model = WorkOS::GroupMemberRemoved.new(fixture.to_json)
3796
4217
  json = model.to_h
@@ -3815,12 +4236,12 @@ class ModelRoundTripTest < Minitest::Test
3815
4236
 
3816
4237
  def test_group_updated_round_trip
3817
4238
  fixture = {
4239
+ "object" => "event",
3818
4240
  "id" => "stub",
3819
4241
  "event" => "group.updated",
3820
4242
  "data" => {},
3821
4243
  "created_at" => "stub",
3822
- "context" => {},
3823
- "object" => "event"
4244
+ "context" => {}
3824
4245
  }
3825
4246
  model = WorkOS::GroupUpdated.new(fixture.to_json)
3826
4247
  json = model.to_h
@@ -3832,12 +4253,12 @@ class ModelRoundTripTest < Minitest::Test
3832
4253
 
3833
4254
  def test_invitation_accepted_round_trip
3834
4255
  fixture = {
4256
+ "object" => "event",
3835
4257
  "id" => "stub",
3836
4258
  "event" => "invitation.accepted",
3837
4259
  "data" => {},
3838
4260
  "created_at" => "stub",
3839
- "context" => {},
3840
- "object" => "event"
4261
+ "context" => {}
3841
4262
  }
3842
4263
  model = WorkOS::InvitationAccepted.new(fixture.to_json)
3843
4264
  json = model.to_h
@@ -3882,12 +4303,12 @@ class ModelRoundTripTest < Minitest::Test
3882
4303
 
3883
4304
  def test_invitation_created_round_trip
3884
4305
  fixture = {
4306
+ "object" => "event",
3885
4307
  "id" => "stub",
3886
4308
  "event" => "invitation.created",
3887
4309
  "data" => {},
3888
4310
  "created_at" => "stub",
3889
- "context" => {},
3890
- "object" => "event"
4311
+ "context" => {}
3891
4312
  }
3892
4313
  model = WorkOS::InvitationCreated.new(fixture.to_json)
3893
4314
  json = model.to_h
@@ -3932,12 +4353,12 @@ class ModelRoundTripTest < Minitest::Test
3932
4353
 
3933
4354
  def test_invitation_resent_round_trip
3934
4355
  fixture = {
4356
+ "object" => "event",
3935
4357
  "id" => "stub",
3936
4358
  "event" => "invitation.resent",
3937
4359
  "data" => {},
3938
4360
  "created_at" => "stub",
3939
- "context" => {},
3940
- "object" => "event"
4361
+ "context" => {}
3941
4362
  }
3942
4363
  model = WorkOS::InvitationResent.new(fixture.to_json)
3943
4364
  json = model.to_h
@@ -3982,12 +4403,12 @@ class ModelRoundTripTest < Minitest::Test
3982
4403
 
3983
4404
  def test_invitation_revoked_round_trip
3984
4405
  fixture = {
4406
+ "object" => "event",
3985
4407
  "id" => "stub",
3986
4408
  "event" => "invitation.revoked",
3987
4409
  "data" => {},
3988
4410
  "created_at" => "stub",
3989
- "context" => {},
3990
- "object" => "event"
4411
+ "context" => {}
3991
4412
  }
3992
4413
  model = WorkOS::InvitationRevoked.new(fixture.to_json)
3993
4414
  json = model.to_h
@@ -4032,12 +4453,12 @@ class ModelRoundTripTest < Minitest::Test
4032
4453
 
4033
4454
  def test_magic_auth_created_round_trip
4034
4455
  fixture = {
4456
+ "object" => "event",
4035
4457
  "id" => "stub",
4036
4458
  "event" => "magic_auth.created",
4037
4459
  "data" => {},
4038
4460
  "created_at" => "stub",
4039
- "context" => {},
4040
- "object" => "event"
4461
+ "context" => {}
4041
4462
  }
4042
4463
  model = WorkOS::MagicAuthCreated.new(fixture.to_json)
4043
4464
  json = model.to_h
@@ -4071,12 +4492,12 @@ class ModelRoundTripTest < Minitest::Test
4071
4492
 
4072
4493
  def test_organization_created_round_trip
4073
4494
  fixture = {
4495
+ "object" => "event",
4074
4496
  "id" => "stub",
4075
4497
  "event" => "organization.created",
4076
4498
  "data" => {},
4077
4499
  "created_at" => "stub",
4078
- "context" => {},
4079
- "object" => "event"
4500
+ "context" => {}
4080
4501
  }
4081
4502
  model = WorkOS::OrganizationCreated.new(fixture.to_json)
4082
4503
  json = model.to_h
@@ -4135,12 +4556,12 @@ class ModelRoundTripTest < Minitest::Test
4135
4556
 
4136
4557
  def test_organization_deleted_round_trip
4137
4558
  fixture = {
4559
+ "object" => "event",
4138
4560
  "id" => "stub",
4139
4561
  "event" => "organization.deleted",
4140
4562
  "data" => {},
4141
4563
  "created_at" => "stub",
4142
- "context" => {},
4143
- "object" => "event"
4564
+ "context" => {}
4144
4565
  }
4145
4566
  model = WorkOS::OrganizationDeleted.new(fixture.to_json)
4146
4567
  json = model.to_h
@@ -4199,12 +4620,12 @@ class ModelRoundTripTest < Minitest::Test
4199
4620
 
4200
4621
  def test_organization_domain_created_round_trip
4201
4622
  fixture = {
4623
+ "object" => "event",
4202
4624
  "id" => "stub",
4203
4625
  "event" => "organization_domain.created",
4204
4626
  "data" => {},
4205
4627
  "created_at" => "stub",
4206
- "context" => {},
4207
- "object" => "event"
4628
+ "context" => {}
4208
4629
  }
4209
4630
  model = WorkOS::OrganizationDomainCreated.new(fixture.to_json)
4210
4631
  json = model.to_h
@@ -4240,12 +4661,12 @@ class ModelRoundTripTest < Minitest::Test
4240
4661
 
4241
4662
  def test_organization_domain_deleted_round_trip
4242
4663
  fixture = {
4664
+ "object" => "event",
4243
4665
  "id" => "stub",
4244
4666
  "event" => "organization_domain.deleted",
4245
4667
  "data" => {},
4246
4668
  "created_at" => "stub",
4247
- "context" => {},
4248
- "object" => "event"
4669
+ "context" => {}
4249
4670
  }
4250
4671
  model = WorkOS::OrganizationDomainDeleted.new(fixture.to_json)
4251
4672
  json = model.to_h
@@ -4281,12 +4702,12 @@ class ModelRoundTripTest < Minitest::Test
4281
4702
 
4282
4703
  def test_organization_domain_updated_round_trip
4283
4704
  fixture = {
4705
+ "object" => "event",
4284
4706
  "id" => "stub",
4285
4707
  "event" => "organization_domain.updated",
4286
4708
  "data" => {},
4287
4709
  "created_at" => "stub",
4288
- "context" => {},
4289
- "object" => "event"
4710
+ "context" => {}
4290
4711
  }
4291
4712
  model = WorkOS::OrganizationDomainUpdated.new(fixture.to_json)
4292
4713
  json = model.to_h
@@ -4322,12 +4743,12 @@ class ModelRoundTripTest < Minitest::Test
4322
4743
 
4323
4744
  def test_organization_domain_verification_failed_round_trip
4324
4745
  fixture = {
4746
+ "object" => "event",
4325
4747
  "id" => "stub",
4326
4748
  "event" => "organization_domain.verification_failed",
4327
4749
  "data" => {},
4328
4750
  "created_at" => "stub",
4329
- "context" => {},
4330
- "object" => "event"
4751
+ "context" => {}
4331
4752
  }
4332
4753
  model = WorkOS::OrganizationDomainVerificationFailed.new(fixture.to_json)
4333
4754
  json = model.to_h
@@ -4374,12 +4795,12 @@ class ModelRoundTripTest < Minitest::Test
4374
4795
 
4375
4796
  def test_organization_domain_verified_round_trip
4376
4797
  fixture = {
4798
+ "object" => "event",
4377
4799
  "id" => "stub",
4378
4800
  "event" => "organization_domain.verified",
4379
4801
  "data" => {},
4380
4802
  "created_at" => "stub",
4381
- "context" => {},
4382
- "object" => "event"
4803
+ "context" => {}
4383
4804
  }
4384
4805
  model = WorkOS::OrganizationDomainVerified.new(fixture.to_json)
4385
4806
  json = model.to_h
@@ -4415,12 +4836,12 @@ class ModelRoundTripTest < Minitest::Test
4415
4836
 
4416
4837
  def test_organization_membership_created_round_trip
4417
4838
  fixture = {
4839
+ "object" => "event",
4418
4840
  "id" => "stub",
4419
4841
  "event" => "organization_membership.created",
4420
4842
  "data" => {},
4421
4843
  "created_at" => "stub",
4422
- "context" => {},
4423
- "object" => "event"
4844
+ "context" => {}
4424
4845
  }
4425
4846
  model = WorkOS::OrganizationMembershipCreated.new(fixture.to_json)
4426
4847
  json = model.to_h
@@ -4458,12 +4879,12 @@ class ModelRoundTripTest < Minitest::Test
4458
4879
 
4459
4880
  def test_organization_membership_deleted_round_trip
4460
4881
  fixture = {
4882
+ "object" => "event",
4461
4883
  "id" => "stub",
4462
4884
  "event" => "organization_membership.deleted",
4463
4885
  "data" => {},
4464
4886
  "created_at" => "stub",
4465
- "context" => {},
4466
- "object" => "event"
4887
+ "context" => {}
4467
4888
  }
4468
4889
  model = WorkOS::OrganizationMembershipDeleted.new(fixture.to_json)
4469
4890
  json = model.to_h
@@ -4501,12 +4922,12 @@ class ModelRoundTripTest < Minitest::Test
4501
4922
 
4502
4923
  def test_organization_membership_updated_round_trip
4503
4924
  fixture = {
4925
+ "object" => "event",
4504
4926
  "id" => "stub",
4505
4927
  "event" => "organization_membership.updated",
4506
4928
  "data" => {},
4507
4929
  "created_at" => "stub",
4508
- "context" => {},
4509
- "object" => "event"
4930
+ "context" => {}
4510
4931
  }
4511
4932
  model = WorkOS::OrganizationMembershipUpdated.new(fixture.to_json)
4512
4933
  json = model.to_h
@@ -4544,12 +4965,12 @@ class ModelRoundTripTest < Minitest::Test
4544
4965
 
4545
4966
  def test_organization_role_created_round_trip
4546
4967
  fixture = {
4968
+ "object" => "event",
4547
4969
  "id" => "stub",
4548
4970
  "event" => "organization_role.created",
4549
4971
  "data" => {},
4550
4972
  "created_at" => "stub",
4551
- "context" => {},
4552
- "object" => "event"
4973
+ "context" => {}
4553
4974
  }
4554
4975
  model = WorkOS::OrganizationRoleCreated.new(fixture.to_json)
4555
4976
  json = model.to_h
@@ -4586,12 +5007,12 @@ class ModelRoundTripTest < Minitest::Test
4586
5007
 
4587
5008
  def test_organization_role_deleted_round_trip
4588
5009
  fixture = {
5010
+ "object" => "event",
4589
5011
  "id" => "stub",
4590
5012
  "event" => "organization_role.deleted",
4591
5013
  "data" => {},
4592
5014
  "created_at" => "stub",
4593
- "context" => {},
4594
- "object" => "event"
5015
+ "context" => {}
4595
5016
  }
4596
5017
  model = WorkOS::OrganizationRoleDeleted.new(fixture.to_json)
4597
5018
  json = model.to_h
@@ -4628,12 +5049,12 @@ class ModelRoundTripTest < Minitest::Test
4628
5049
 
4629
5050
  def test_organization_role_updated_round_trip
4630
5051
  fixture = {
5052
+ "object" => "event",
4631
5053
  "id" => "stub",
4632
5054
  "event" => "organization_role.updated",
4633
5055
  "data" => {},
4634
5056
  "created_at" => "stub",
4635
- "context" => {},
4636
- "object" => "event"
5057
+ "context" => {}
4637
5058
  }
4638
5059
  model = WorkOS::OrganizationRoleUpdated.new(fixture.to_json)
4639
5060
  json = model.to_h
@@ -4670,12 +5091,12 @@ class ModelRoundTripTest < Minitest::Test
4670
5091
 
4671
5092
  def test_organization_updated_round_trip
4672
5093
  fixture = {
5094
+ "object" => "event",
4673
5095
  "id" => "stub",
4674
5096
  "event" => "organization.updated",
4675
5097
  "data" => {},
4676
5098
  "created_at" => "stub",
4677
- "context" => {},
4678
- "object" => "event"
5099
+ "context" => {}
4679
5100
  }
4680
5101
  model = WorkOS::OrganizationUpdated.new(fixture.to_json)
4681
5102
  json = model.to_h
@@ -4734,12 +5155,12 @@ class ModelRoundTripTest < Minitest::Test
4734
5155
 
4735
5156
  def test_password_reset_created_round_trip
4736
5157
  fixture = {
5158
+ "object" => "event",
4737
5159
  "id" => "stub",
4738
5160
  "event" => "password_reset.created",
4739
5161
  "data" => {},
4740
5162
  "created_at" => "stub",
4741
- "context" => {},
4742
- "object" => "event"
5163
+ "context" => {}
4743
5164
  }
4744
5165
  model = WorkOS::PasswordResetCreated.new(fixture.to_json)
4745
5166
  json = model.to_h
@@ -4771,12 +5192,12 @@ class ModelRoundTripTest < Minitest::Test
4771
5192
 
4772
5193
  def test_password_reset_succeeded_round_trip
4773
5194
  fixture = {
5195
+ "object" => "event",
4774
5196
  "id" => "stub",
4775
5197
  "event" => "password_reset.succeeded",
4776
5198
  "data" => {},
4777
5199
  "created_at" => "stub",
4778
- "context" => {},
4779
- "object" => "event"
5200
+ "context" => {}
4780
5201
  }
4781
5202
  model = WorkOS::PasswordResetSucceeded.new(fixture.to_json)
4782
5203
  json = model.to_h
@@ -4808,12 +5229,12 @@ class ModelRoundTripTest < Minitest::Test
4808
5229
 
4809
5230
  def test_permission_created_round_trip
4810
5231
  fixture = {
5232
+ "object" => "event",
4811
5233
  "id" => "stub",
4812
5234
  "event" => "permission.created",
4813
5235
  "data" => {},
4814
5236
  "created_at" => "stub",
4815
- "context" => {},
4816
- "object" => "event"
5237
+ "context" => {}
4817
5238
  }
4818
5239
  model = WorkOS::PermissionCreated.new(fixture.to_json)
4819
5240
  json = model.to_h
@@ -4849,12 +5270,12 @@ class ModelRoundTripTest < Minitest::Test
4849
5270
 
4850
5271
  def test_permission_deleted_round_trip
4851
5272
  fixture = {
5273
+ "object" => "event",
4852
5274
  "id" => "stub",
4853
5275
  "event" => "permission.deleted",
4854
5276
  "data" => {},
4855
5277
  "created_at" => "stub",
4856
- "context" => {},
4857
- "object" => "event"
5278
+ "context" => {}
4858
5279
  }
4859
5280
  model = WorkOS::PermissionDeleted.new(fixture.to_json)
4860
5281
  json = model.to_h
@@ -4890,12 +5311,12 @@ class ModelRoundTripTest < Minitest::Test
4890
5311
 
4891
5312
  def test_permission_updated_round_trip
4892
5313
  fixture = {
5314
+ "object" => "event",
4893
5315
  "id" => "stub",
4894
5316
  "event" => "permission.updated",
4895
5317
  "data" => {},
4896
5318
  "created_at" => "stub",
4897
- "context" => {},
4898
- "object" => "event"
5319
+ "context" => {}
4899
5320
  }
4900
5321
  model = WorkOS::PermissionUpdated.new(fixture.to_json)
4901
5322
  json = model.to_h
@@ -4929,14 +5350,65 @@ class ModelRoundTripTest < Minitest::Test
4929
5350
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
4930
5351
  end
4931
5352
 
5353
+ def test_pipes_connected_account_connected_round_trip
5354
+ fixture = {
5355
+ "object" => "event",
5356
+ "id" => "stub",
5357
+ "event" => "pipes.connected_account.connected",
5358
+ "data" => {},
5359
+ "created_at" => "stub",
5360
+ "context" => {}
5361
+ }
5362
+ model = WorkOS::PipesConnectedAccountConnected.new(fixture.to_json)
5363
+ json = model.to_h
5364
+ assert_kind_of Hash, json
5365
+ assert_equal fixture["id"], json[:id]
5366
+ assert_equal fixture["created_at"], json[:created_at]
5367
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
5368
+ end
5369
+
5370
+ def test_pipes_connected_account_disconnected_round_trip
5371
+ fixture = {
5372
+ "object" => "event",
5373
+ "id" => "stub",
5374
+ "event" => "pipes.connected_account.disconnected",
5375
+ "data" => {},
5376
+ "created_at" => "stub",
5377
+ "context" => {}
5378
+ }
5379
+ model = WorkOS::PipesConnectedAccountDisconnected.new(fixture.to_json)
5380
+ json = model.to_h
5381
+ assert_kind_of Hash, json
5382
+ assert_equal fixture["id"], json[:id]
5383
+ assert_equal fixture["created_at"], json[:created_at]
5384
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
5385
+ end
5386
+
5387
+ def test_pipes_connected_account_reauthorization_needed_round_trip
5388
+ fixture = {
5389
+ "object" => "event",
5390
+ "id" => "stub",
5391
+ "event" => "pipes.connected_account.reauthorization_needed",
5392
+ "data" => {},
5393
+ "created_at" => "stub",
5394
+ "context" => {}
5395
+ }
5396
+ model = WorkOS::PipesConnectedAccountReauthorizationNeeded.new(fixture.to_json)
5397
+ json = model.to_h
5398
+ assert_kind_of Hash, json
5399
+ assert_equal fixture["id"], json[:id]
5400
+ assert_equal fixture["created_at"], json[:created_at]
5401
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
5402
+ end
5403
+
4932
5404
  def test_role_created_round_trip
4933
5405
  fixture = {
5406
+ "object" => "event",
4934
5407
  "id" => "stub",
4935
5408
  "event" => "role.created",
4936
5409
  "data" => {},
4937
5410
  "created_at" => "stub",
4938
- "context" => {},
4939
- "object" => "event"
5411
+ "context" => {}
4940
5412
  }
4941
5413
  model = WorkOS::RoleCreated.new(fixture.to_json)
4942
5414
  json = model.to_h
@@ -4967,12 +5439,12 @@ class ModelRoundTripTest < Minitest::Test
4967
5439
 
4968
5440
  def test_role_deleted_round_trip
4969
5441
  fixture = {
5442
+ "object" => "event",
4970
5443
  "id" => "stub",
4971
5444
  "event" => "role.deleted",
4972
5445
  "data" => {},
4973
5446
  "created_at" => "stub",
4974
- "context" => {},
4975
- "object" => "event"
5447
+ "context" => {}
4976
5448
  }
4977
5449
  model = WorkOS::RoleDeleted.new(fixture.to_json)
4978
5450
  json = model.to_h
@@ -5003,12 +5475,12 @@ class ModelRoundTripTest < Minitest::Test
5003
5475
 
5004
5476
  def test_role_updated_round_trip
5005
5477
  fixture = {
5478
+ "object" => "event",
5006
5479
  "id" => "stub",
5007
5480
  "event" => "role.updated",
5008
5481
  "data" => {},
5009
5482
  "created_at" => "stub",
5010
- "context" => {},
5011
- "object" => "event"
5483
+ "context" => {}
5012
5484
  }
5013
5485
  model = WorkOS::RoleUpdated.new(fixture.to_json)
5014
5486
  json = model.to_h
@@ -5039,12 +5511,12 @@ class ModelRoundTripTest < Minitest::Test
5039
5511
 
5040
5512
  def test_session_created_round_trip
5041
5513
  fixture = {
5514
+ "object" => "event",
5042
5515
  "id" => "stub",
5043
5516
  "event" => "session.created",
5044
5517
  "data" => {},
5045
5518
  "created_at" => "stub",
5046
- "context" => {},
5047
- "object" => "event"
5519
+ "context" => {}
5048
5520
  }
5049
5521
  model = WorkOS::SessionCreated.new(fixture.to_json)
5050
5522
  json = model.to_h
@@ -5099,12 +5571,12 @@ class ModelRoundTripTest < Minitest::Test
5099
5571
 
5100
5572
  def test_session_revoked_round_trip
5101
5573
  fixture = {
5574
+ "object" => "event",
5102
5575
  "id" => "stub",
5103
5576
  "event" => "session.revoked",
5104
5577
  "data" => {},
5105
5578
  "created_at" => "stub",
5106
- "context" => {},
5107
- "object" => "event"
5579
+ "context" => {}
5108
5580
  }
5109
5581
  model = WorkOS::SessionRevoked.new(fixture.to_json)
5110
5582
  json = model.to_h
@@ -5159,12 +5631,12 @@ class ModelRoundTripTest < Minitest::Test
5159
5631
 
5160
5632
  def test_user_created_round_trip
5161
5633
  fixture = {
5634
+ "object" => "event",
5162
5635
  "id" => "stub",
5163
5636
  "event" => "user.created",
5164
5637
  "data" => {},
5165
5638
  "created_at" => "stub",
5166
- "context" => {},
5167
- "object" => "event"
5639
+ "context" => {}
5168
5640
  }
5169
5641
  model = WorkOS::UserCreated.new(fixture.to_json)
5170
5642
  json = model.to_h
@@ -5176,12 +5648,12 @@ class ModelRoundTripTest < Minitest::Test
5176
5648
 
5177
5649
  def test_user_deleted_round_trip
5178
5650
  fixture = {
5651
+ "object" => "event",
5179
5652
  "id" => "stub",
5180
5653
  "event" => "user.deleted",
5181
5654
  "data" => {},
5182
5655
  "created_at" => "stub",
5183
- "context" => {},
5184
- "object" => "event"
5656
+ "context" => {}
5185
5657
  }
5186
5658
  model = WorkOS::UserDeleted.new(fixture.to_json)
5187
5659
  json = model.to_h
@@ -5193,12 +5665,12 @@ class ModelRoundTripTest < Minitest::Test
5193
5665
 
5194
5666
  def test_user_updated_round_trip
5195
5667
  fixture = {
5668
+ "object" => "event",
5196
5669
  "id" => "stub",
5197
5670
  "event" => "user.updated",
5198
5671
  "data" => {},
5199
5672
  "created_at" => "stub",
5200
- "context" => {},
5201
- "object" => "event"
5673
+ "context" => {}
5202
5674
  }
5203
5675
  model = WorkOS::UserUpdated.new(fixture.to_json)
5204
5676
  json = model.to_h
@@ -5210,12 +5682,12 @@ class ModelRoundTripTest < Minitest::Test
5210
5682
 
5211
5683
  def test_vault_byok_key_deleted_round_trip
5212
5684
  fixture = {
5685
+ "object" => "event",
5213
5686
  "id" => "stub",
5214
5687
  "event" => "vault.byok_key.deleted",
5215
5688
  "data" => {},
5216
5689
  "created_at" => "stub",
5217
- "context" => {},
5218
- "object" => "event"
5690
+ "context" => {}
5219
5691
  }
5220
5692
  model = WorkOS::VaultByokKeyDeleted.new(fixture.to_json)
5221
5693
  json = model.to_h
@@ -5239,12 +5711,12 @@ class ModelRoundTripTest < Minitest::Test
5239
5711
 
5240
5712
  def test_vault_byok_key_verification_completed_round_trip
5241
5713
  fixture = {
5714
+ "object" => "event",
5242
5715
  "id" => "stub",
5243
5716
  "event" => "vault.byok_key.verification_completed",
5244
5717
  "data" => {},
5245
5718
  "created_at" => "stub",
5246
- "context" => {},
5247
- "object" => "event"
5719
+ "context" => {}
5248
5720
  }
5249
5721
  model = WorkOS::VaultByokKeyVerificationCompleted.new(fixture.to_json)
5250
5722
  json = model.to_h
@@ -5270,12 +5742,12 @@ class ModelRoundTripTest < Minitest::Test
5270
5742
 
5271
5743
  def test_vault_data_created_round_trip
5272
5744
  fixture = {
5745
+ "object" => "event",
5273
5746
  "id" => "stub",
5274
5747
  "event" => "vault.data.created",
5275
5748
  "data" => {},
5276
5749
  "created_at" => "stub",
5277
- "context" => {},
5278
- "object" => "event"
5750
+ "context" => {}
5279
5751
  }
5280
5752
  model = WorkOS::VaultDataCreated.new(fixture.to_json)
5281
5753
  json = model.to_h
@@ -5306,12 +5778,12 @@ class ModelRoundTripTest < Minitest::Test
5306
5778
 
5307
5779
  def test_vault_data_deleted_round_trip
5308
5780
  fixture = {
5781
+ "object" => "event",
5309
5782
  "id" => "stub",
5310
5783
  "event" => "vault.data.deleted",
5311
5784
  "data" => {},
5312
5785
  "created_at" => "stub",
5313
- "context" => {},
5314
- "object" => "event"
5786
+ "context" => {}
5315
5787
  }
5316
5788
  model = WorkOS::VaultDataDeleted.new(fixture.to_json)
5317
5789
  json = model.to_h
@@ -5339,12 +5811,12 @@ class ModelRoundTripTest < Minitest::Test
5339
5811
 
5340
5812
  def test_vault_data_read_round_trip
5341
5813
  fixture = {
5814
+ "object" => "event",
5342
5815
  "id" => "stub",
5343
5816
  "event" => "vault.data.read",
5344
5817
  "data" => {},
5345
5818
  "created_at" => "stub",
5346
- "context" => {},
5347
- "object" => "event"
5819
+ "context" => {}
5348
5820
  }
5349
5821
  model = WorkOS::VaultDataRead.new(fixture.to_json)
5350
5822
  json = model.to_h
@@ -5374,12 +5846,12 @@ class ModelRoundTripTest < Minitest::Test
5374
5846
 
5375
5847
  def test_vault_data_updated_round_trip
5376
5848
  fixture = {
5849
+ "object" => "event",
5377
5850
  "id" => "stub",
5378
5851
  "event" => "vault.data.updated",
5379
5852
  "data" => {},
5380
5853
  "created_at" => "stub",
5381
- "context" => {},
5382
- "object" => "event"
5854
+ "context" => {}
5383
5855
  }
5384
5856
  model = WorkOS::VaultDataUpdated.new(fixture.to_json)
5385
5857
  json = model.to_h
@@ -5410,12 +5882,12 @@ class ModelRoundTripTest < Minitest::Test
5410
5882
 
5411
5883
  def test_vault_dek_decrypted_round_trip
5412
5884
  fixture = {
5885
+ "object" => "event",
5413
5886
  "id" => "stub",
5414
5887
  "event" => "vault.dek.decrypted",
5415
5888
  "data" => {},
5416
5889
  "created_at" => "stub",
5417
- "context" => {},
5418
- "object" => "event"
5890
+ "context" => {}
5419
5891
  }
5420
5892
  model = WorkOS::VaultDekDecrypted.new(fixture.to_json)
5421
5893
  json = model.to_h
@@ -5443,12 +5915,12 @@ class ModelRoundTripTest < Minitest::Test
5443
5915
 
5444
5916
  def test_vault_dek_read_round_trip
5445
5917
  fixture = {
5918
+ "object" => "event",
5446
5919
  "id" => "stub",
5447
5920
  "event" => "vault.dek.read",
5448
5921
  "data" => {},
5449
5922
  "created_at" => "stub",
5450
- "context" => {},
5451
- "object" => "event"
5923
+ "context" => {}
5452
5924
  }
5453
5925
  model = WorkOS::VaultDekRead.new(fixture.to_json)
5454
5926
  json = model.to_h
@@ -5476,12 +5948,12 @@ class ModelRoundTripTest < Minitest::Test
5476
5948
 
5477
5949
  def test_vault_kek_created_round_trip
5478
5950
  fixture = {
5951
+ "object" => "event",
5479
5952
  "id" => "stub",
5480
5953
  "event" => "vault.kek.created",
5481
5954
  "data" => {},
5482
5955
  "created_at" => "stub",
5483
- "context" => {},
5484
- "object" => "event"
5956
+ "context" => {}
5485
5957
  }
5486
5958
  model = WorkOS::VaultKekCreated.new(fixture.to_json)
5487
5959
  json = model.to_h
@@ -5511,12 +5983,12 @@ class ModelRoundTripTest < Minitest::Test
5511
5983
 
5512
5984
  def test_vault_metadata_read_round_trip
5513
5985
  fixture = {
5986
+ "object" => "event",
5514
5987
  "id" => "stub",
5515
5988
  "event" => "vault.metadata.read",
5516
5989
  "data" => {},
5517
5990
  "created_at" => "stub",
5518
- "context" => {},
5519
- "object" => "event"
5991
+ "context" => {}
5520
5992
  }
5521
5993
  model = WorkOS::VaultMetadataRead.new(fixture.to_json)
5522
5994
  json = model.to_h
@@ -5544,12 +6016,12 @@ class ModelRoundTripTest < Minitest::Test
5544
6016
 
5545
6017
  def test_vault_names_listed_round_trip
5546
6018
  fixture = {
6019
+ "object" => "event",
5547
6020
  "id" => "stub",
5548
6021
  "event" => "vault.names.listed",
5549
6022
  "data" => {},
5550
6023
  "created_at" => "stub",
5551
- "context" => {},
5552
- "object" => "event"
6024
+ "context" => {}
5553
6025
  }
5554
6026
  model = WorkOS::VaultNamesListed.new(fixture.to_json)
5555
6027
  json = model.to_h
@@ -5575,12 +6047,12 @@ class ModelRoundTripTest < Minitest::Test
5575
6047
 
5576
6048
  def test_waitlist_user_approved_round_trip
5577
6049
  fixture = {
6050
+ "object" => "event",
5578
6051
  "id" => "stub",
5579
6052
  "event" => "waitlist_user.approved",
5580
6053
  "data" => {},
5581
6054
  "created_at" => "stub",
5582
- "context" => {},
5583
- "object" => "event"
6055
+ "context" => {}
5584
6056
  }
5585
6057
  model = WorkOS::WaitlistUserApproved.new(fixture.to_json)
5586
6058
  json = model.to_h
@@ -5592,12 +6064,12 @@ class ModelRoundTripTest < Minitest::Test
5592
6064
 
5593
6065
  def test_waitlist_user_created_round_trip
5594
6066
  fixture = {
6067
+ "object" => "event",
5595
6068
  "id" => "stub",
5596
6069
  "event" => "waitlist_user.created",
5597
6070
  "data" => {},
5598
6071
  "created_at" => "stub",
5599
- "context" => {},
5600
- "object" => "event"
6072
+ "context" => {}
5601
6073
  }
5602
6074
  model = WorkOS::WaitlistUserCreated.new(fixture.to_json)
5603
6075
  json = model.to_h
@@ -5609,12 +6081,12 @@ class ModelRoundTripTest < Minitest::Test
5609
6081
 
5610
6082
  def test_waitlist_user_denied_round_trip
5611
6083
  fixture = {
6084
+ "object" => "event",
5612
6085
  "id" => "stub",
5613
6086
  "event" => "waitlist_user.denied",
5614
6087
  "data" => {},
5615
6088
  "created_at" => "stub",
5616
- "context" => {},
5617
- "object" => "event"
6089
+ "context" => {}
5618
6090
  }
5619
6091
  model = WorkOS::WaitlistUserDenied.new(fixture.to_json)
5620
6092
  json = model.to_h
@@ -5684,6 +6156,7 @@ class ModelRoundTripTest < Minitest::Test
5684
6156
  "name" => "stub",
5685
6157
  "obfuscated_value" => "stub",
5686
6158
  "last_used_at" => nil,
6159
+ "expires_at" => nil,
5687
6160
  "permissions" => [],
5688
6161
  "created_at" => "stub",
5689
6162
  "updated_at" => "stub"
@@ -5695,6 +6168,7 @@ class ModelRoundTripTest < Minitest::Test
5695
6168
  assert_equal fixture["name"], json[:name]
5696
6169
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
5697
6170
  assert_nil json[:last_used_at]
6171
+ assert_nil json[:expires_at]
5698
6172
  assert_equal fixture["created_at"], json[:created_at]
5699
6173
  assert_equal fixture["updated_at"], json[:updated_at]
5700
6174
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -5708,6 +6182,7 @@ class ModelRoundTripTest < Minitest::Test
5708
6182
  "name" => "stub",
5709
6183
  "obfuscated_value" => "stub",
5710
6184
  "last_used_at" => nil,
6185
+ "expires_at" => nil,
5711
6186
  "permissions" => [],
5712
6187
  "created_at" => "stub",
5713
6188
  "updated_at" => "stub",
@@ -5720,6 +6195,7 @@ class ModelRoundTripTest < Minitest::Test
5720
6195
  assert_equal fixture["name"], json[:name]
5721
6196
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
5722
6197
  assert_nil json[:last_used_at]
6198
+ assert_nil json[:expires_at]
5723
6199
  assert_equal fixture["created_at"], json[:created_at]
5724
6200
  assert_equal fixture["updated_at"], json[:updated_at]
5725
6201
  assert_equal fixture["value"], json[:value]
@@ -5986,6 +6462,7 @@ class ModelRoundTripTest < Minitest::Test
5986
6462
  "name" => "stub",
5987
6463
  "obfuscated_value" => "stub",
5988
6464
  "last_used_at" => nil,
6465
+ "expires_at" => nil,
5989
6466
  "permissions" => [],
5990
6467
  "created_at" => "stub",
5991
6468
  "updated_at" => "stub"
@@ -5997,6 +6474,7 @@ class ModelRoundTripTest < Minitest::Test
5997
6474
  assert_equal fixture["name"], json[:name]
5998
6475
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
5999
6476
  assert_nil json[:last_used_at]
6477
+ assert_nil json[:expires_at]
6000
6478
  assert_equal fixture["created_at"], json[:created_at]
6001
6479
  assert_equal fixture["updated_at"], json[:updated_at]
6002
6480
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -6010,6 +6488,7 @@ class ModelRoundTripTest < Minitest::Test
6010
6488
  "name" => "stub",
6011
6489
  "obfuscated_value" => "stub",
6012
6490
  "last_used_at" => nil,
6491
+ "expires_at" => nil,
6013
6492
  "permissions" => [],
6014
6493
  "created_at" => "stub",
6015
6494
  "updated_at" => "stub",
@@ -6022,6 +6501,7 @@ class ModelRoundTripTest < Minitest::Test
6022
6501
  assert_equal fixture["name"], json[:name]
6023
6502
  assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
6024
6503
  assert_nil json[:last_used_at]
6504
+ assert_nil json[:expires_at]
6025
6505
  assert_equal fixture["created_at"], json[:created_at]
6026
6506
  assert_equal fixture["updated_at"], json[:updated_at]
6027
6507
  assert_equal fixture["value"], json[:value]
@@ -6161,7 +6641,7 @@ class ModelRoundTripTest < Minitest::Test
6161
6641
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
6162
6642
  end
6163
6643
 
6164
- def test_webhook_endpoint_json_round_trip
6644
+ def test_webhook_endpoint_round_trip
6165
6645
  fixture = {
6166
6646
  "object" => "webhook_endpoint",
6167
6647
  "id" => "stub",
@@ -6172,7 +6652,7 @@ class ModelRoundTripTest < Minitest::Test
6172
6652
  "created_at" => "stub",
6173
6653
  "updated_at" => "stub"
6174
6654
  }
6175
- model = WorkOS::WebhookEndpointJson.new(fixture.to_json)
6655
+ model = WorkOS::WebhookEndpoint.new(fixture.to_json)
6176
6656
  json = model.to_h
6177
6657
  assert_kind_of Hash, json
6178
6658
  assert_equal fixture["id"], json[:id]
@@ -6695,22 +7175,22 @@ class ModelRoundTripTest < Minitest::Test
6695
7175
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
6696
7176
  end
6697
7177
 
6698
- def test_audit_log_schema_json_actor_round_trip
7178
+ def test_audit_log_schema_actor_round_trip
6699
7179
  fixture = {
6700
7180
  "metadata" => {}
6701
7181
  }
6702
- model = WorkOS::AuditLogSchemaJsonActor.new(fixture.to_json)
7182
+ model = WorkOS::AuditLogSchemaActor.new(fixture.to_json)
6703
7183
  json = model.to_h
6704
7184
  assert_kind_of Hash, json
6705
7185
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
6706
7186
  end
6707
7187
 
6708
- def test_audit_log_schema_json_target_round_trip
7188
+ def test_audit_log_schema_target_round_trip
6709
7189
  fixture = {
6710
7190
  "type" => "stub",
6711
7191
  "metadata" => {}
6712
7192
  }
6713
- model = WorkOS::AuditLogSchemaJsonTarget.new(fixture.to_json)
7193
+ model = WorkOS::AuditLogSchemaTarget.new(fixture.to_json)
6714
7194
  json = model.to_h
6715
7195
  assert_kind_of Hash, json
6716
7196
  assert_equal fixture["type"], json[:type]
@@ -6900,9 +7380,7 @@ class ModelRoundTripTest < Minitest::Test
6900
7380
  "user_agent" => "stub",
6901
7381
  "email" => "stub",
6902
7382
  "auth_method" => "stub",
6903
- "action" => "stub",
6904
- "device_fingerprint" => "stub",
6905
- "bot_score" => "stub"
7383
+ "action" => "stub"
6906
7384
  }
6907
7385
  model = WorkOS::RadarStandaloneAssessRequest.new(fixture.to_json)
6908
7386
  json = model.to_h
@@ -7216,6 +7694,7 @@ class ModelRoundTripTest < Minitest::Test
7216
7694
  "id" => "stub",
7217
7695
  "first_name" => nil,
7218
7696
  "last_name" => nil,
7697
+ "name" => nil,
7219
7698
  "profile_picture_url" => nil,
7220
7699
  "email" => "stub",
7221
7700
  "email_verified" => true,