workos 10.5.0 → 10.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (623) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release-please.yml +3 -3
  3. data/.last-synced-sha +1 -1
  4. data/.oagen-manifest.json +415 -33
  5. data/.release-please-manifest.json +1 -1
  6. data/CHANGELOG.md +196 -0
  7. data/Gemfile.lock +2 -2
  8. data/README.md +2 -2
  9. data/lib/workos/agents/list_metadata.rb +22 -0
  10. data/lib/workos/api_keys/api_key_data_integration_vended_credential.rb +28 -0
  11. data/lib/workos/audit_logs.rb +2 -2
  12. data/lib/workos/authorization/patch_group_role_assignments.rb +22 -0
  13. data/lib/workos/authorization.rb +26 -0
  14. data/lib/workos/base_client.rb +3 -0
  15. data/lib/workos/client_api.rb +3 -3
  16. data/lib/workos/connect/connect_application.rb +3 -0
  17. data/lib/workos/connect/create_oauth_application.rb +3 -0
  18. data/lib/workos/connect/update_oauth_application.rb +5 -2
  19. data/lib/workos/connect.rb +6 -0
  20. data/lib/workos/directory_sync/directory_user_with_groups.rb +1 -1
  21. data/lib/workos/directory_sync.rb +160 -0
  22. data/lib/workos/events.rb +3 -11
  23. data/lib/workos/feature_flags/flag_created_data.rb +1 -46
  24. data/lib/workos/feature_flags/flag_deleted_data.rb +1 -1
  25. data/lib/workos/feature_flags/flag_rule.rb +49 -0
  26. data/lib/workos/feature_flags/flag_rule_updated_data.rb +1 -1
  27. data/lib/workos/feature_flags/flag_target.rb +52 -0
  28. data/lib/workos/feature_flags/flag_target_with_rule_id.rb +46 -0
  29. data/lib/workos/feature_flags/flag_target_with_value_type.rb +49 -0
  30. data/lib/workos/feature_flags/flag_updated_context_previous_attribute.rb +1 -12
  31. data/lib/workos/feature_flags/flag_updated_context_previous_attribute_data.rb +1 -28
  32. data/lib/workos/feature_flags/flag_updated_data.rb +1 -1
  33. data/lib/workos/groups/patch_group_memberships.rb +22 -0
  34. data/lib/workos/groups.rb +28 -0
  35. data/lib/workos/inflections.rb +30 -0
  36. data/lib/workos/organizations/it_contact_list_list_metadata.rb +22 -0
  37. data/lib/workos/organizations/organization_authentication_methods_required_oauth_error_body.rb +22 -0
  38. data/lib/workos/organizations/organization_connected_account_import_error_body.rb +22 -0
  39. data/lib/workos/organizations/organization_membership_not_found_oauth_error_body.rb +22 -0
  40. data/lib/workos/organizations/organization_not_found_oauth_error_body.rb +22 -0
  41. data/lib/workos/organizations/organization_selection_required_error_body.rb +22 -0
  42. data/lib/workos/organizations/organization_selection_required_error_body_with_organization.rb +7 -0
  43. data/lib/workos/organizations/organization_selection_required_error_body_with_organizations.rb +25 -0
  44. data/lib/workos/pipes/connected_account.rb +5 -2
  45. data/lib/workos/pipes/connected_account_input.rb +3 -0
  46. data/lib/workos/pipes/{connected_account_write_response_warning.rb → connected_account_warning.rb} +1 -1
  47. data/lib/workos/pipes/create_connected_account.rb +6 -0
  48. data/lib/workos/pipes/create_organization_connected_account.rb +6 -0
  49. data/lib/workos/pipes/data_integration_authorize_url_response.rb +9 -2
  50. data/lib/workos/pipes/data_integration_finish_connection_response.rb +18 -0
  51. data/lib/workos/pipes/data_integration_vended_credential.rb +5 -5
  52. data/lib/workos/pipes/data_integrations_finish_connection_request.rb +25 -0
  53. data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +14 -2
  54. data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +4 -1
  55. data/lib/workos/pipes/data_integrations_list_response_data_connected_account_warning.rb +7 -0
  56. data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +8 -2
  57. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +8 -2
  58. data/lib/workos/pipes/organization_connected_account.rb +3 -0
  59. data/lib/workos/pipes.rb +80 -27
  60. data/lib/workos/pipes_provider.rb +12 -0
  61. data/lib/workos/session.rb +12 -0
  62. data/lib/workos/shared/access_denied_oauth_error_body.rb +22 -0
  63. data/lib/workos/shared/account_selection_required_error_body.rb +7 -0
  64. data/lib/workos/shared/agent_registration_claim_completed_data.rb +3 -0
  65. data/lib/workos/shared/already_claimed_error_body.rb +22 -0
  66. data/lib/workos/shared/application_consent_required_error_body.rb +22 -0
  67. data/lib/workos/shared/auth_method_mismatch_error_body.rb +7 -0
  68. data/lib/workos/shared/authorization_pending_oauth_error_body.rb +22 -0
  69. data/lib/workos/shared/authorization_url_not_found_error_body.rb +22 -0
  70. data/lib/workos/shared/authorization_url_request_error_body.rb +22 -0
  71. data/lib/workos/shared/client_credentials_data_integration_vended_credential.rb +40 -0
  72. data/lib/workos/shared/code_challenge_not_found_error_body.rb +22 -0
  73. data/lib/workos/shared/connect_application_oauth.rb +3 -0
  74. data/lib/workos/shared/connected_account_limit_reached_error_body.rb +22 -0
  75. data/lib/workos/shared/daily_quota_exceeded_error_body.rb +22 -0
  76. data/lib/workos/shared/data_integration_access_token_response_with_access_token.rb +22 -0
  77. data/lib/workos/shared/data_integration_access_token_response_with_access_token_access_token.rb +7 -0
  78. data/lib/workos/shared/data_integration_access_token_response_with_error.rb +22 -0
  79. data/lib/workos/shared/data_integration_credentials_response_with_credential.rb +22 -0
  80. data/lib/workos/shared/data_integration_credentials_response_with_error.rb +22 -0
  81. data/lib/workos/shared/entity_not_found_error_body.rb +22 -0
  82. data/lib/workos/shared/error_body.rb +7 -0
  83. data/lib/workos/shared/error_body_with_code.rb +22 -0
  84. data/lib/workos/shared/error_body_with_code_errors.rb +25 -0
  85. data/lib/workos/shared/error_body_with_code_field_error.rb +22 -0
  86. data/lib/workos/shared/error_body_with_code_field_errors.rb +22 -0
  87. data/lib/workos/shared/error_body_with_code_instance_path_error.rb +18 -0
  88. data/lib/workos/shared/error_body_with_code_instance_path_errors.rb +25 -0
  89. data/lib/workos/shared/error_body_with_code_status_code.rb +25 -0
  90. data/lib/workos/shared/error_body_with_constraints_property_error.rb +22 -0
  91. data/lib/workos/shared/error_body_with_constraints_property_errors.rb +22 -0
  92. data/lib/workos/shared/error_body_with_error.rb +22 -0
  93. data/lib/workos/shared/error_body_with_error_message_list.rb +22 -0
  94. data/lib/workos/shared/error_body_with_message_or_message_list.rb +18 -0
  95. data/lib/workos/shared/expired_token_oauth_error_body.rb +22 -0
  96. data/lib/workos/shared/external_auth_session_already_completed_error_body.rb +22 -0
  97. data/lib/workos/shared/external_id_already_used_error_body.rb +22 -0
  98. data/lib/workos/shared/extra_attributes_required_oauth_error_body.rb +22 -0
  99. data/lib/workos/shared/feature_flags_flag_created.rb +34 -0
  100. data/lib/workos/shared/feature_flags_flag_created_context.rb +22 -0
  101. data/lib/workos/shared/feature_flags_flag_created_context_actor.rb +25 -0
  102. data/lib/workos/shared/feature_flags_flag_created_data.rb +52 -0
  103. data/lib/workos/shared/feature_flags_flag_created_data_owner.rb +7 -0
  104. data/lib/workos/shared/feature_flags_flag_deleted.rb +34 -0
  105. data/lib/workos/shared/feature_flags_flag_deleted_context.rb +22 -0
  106. data/lib/workos/shared/feature_flags_flag_deleted_context_actor.rb +25 -0
  107. data/lib/workos/shared/feature_flags_flag_deleted_data.rb +7 -0
  108. data/lib/workos/shared/feature_flags_flag_deleted_data_owner.rb +7 -0
  109. data/lib/workos/shared/feature_flags_flag_rule_created.rb +34 -0
  110. data/lib/workos/shared/feature_flags_flag_rule_created_context.rb +22 -0
  111. data/lib/workos/shared/feature_flags_flag_rule_created_context_actor.rb +25 -0
  112. data/lib/workos/shared/feature_flags_flag_rule_deleted.rb +34 -0
  113. data/lib/workos/shared/feature_flags_flag_rule_deleted_context.rb +22 -0
  114. data/lib/workos/shared/feature_flags_flag_rule_deleted_context_actor.rb +25 -0
  115. data/lib/workos/shared/feature_flags_flag_rule_updated.rb +34 -0
  116. data/lib/workos/shared/feature_flags_flag_rule_updated_context.rb +25 -0
  117. data/lib/workos/shared/feature_flags_flag_rule_updated_context_actor.rb +25 -0
  118. data/lib/workos/shared/feature_flags_flag_rule_updated_context_previous_attribute.rb +18 -0
  119. data/lib/workos/shared/feature_flags_flag_rule_updated_context_previous_attribute_data.rb +18 -0
  120. data/lib/workos/shared/feature_flags_flag_target_created.rb +34 -0
  121. data/lib/workos/shared/feature_flags_flag_target_created_context.rb +22 -0
  122. data/lib/workos/shared/feature_flags_flag_target_created_context_actor.rb +25 -0
  123. data/lib/workos/shared/feature_flags_flag_target_deleted.rb +34 -0
  124. data/lib/workos/shared/feature_flags_flag_target_deleted_context.rb +22 -0
  125. data/lib/workos/shared/feature_flags_flag_target_deleted_context_actor.rb +25 -0
  126. data/lib/workos/shared/feature_flags_flag_updated.rb +34 -0
  127. data/lib/workos/shared/feature_flags_flag_updated_context.rb +25 -0
  128. data/lib/workos/shared/feature_flags_flag_updated_context_actor.rb +25 -0
  129. data/lib/workos/shared/feature_flags_flag_updated_context_previous_attribute.rb +18 -0
  130. data/lib/workos/shared/feature_flags_flag_updated_context_previous_attribute_data.rb +34 -0
  131. data/lib/workos/shared/feature_flags_flag_updated_context_previous_attribute_data_owner.rb +7 -0
  132. data/lib/workos/shared/feature_flags_flag_updated_data.rb +7 -0
  133. data/lib/workos/shared/feature_flags_flag_updated_data_owner.rb +7 -0
  134. data/lib/workos/shared/idp_metadata_fetch_failed_error_body.rb +22 -0
  135. data/lib/workos/shared/invalid_client_oauth_error_body.rb +22 -0
  136. data/lib/workos/shared/invalid_connection_oauth_error_body.rb +22 -0
  137. data/lib/workos/shared/invalid_credentials_error_body.rb +22 -0
  138. data/lib/workos/shared/invalid_email_error_body.rb +22 -0
  139. data/lib/workos/shared/invalid_grant_oauth_error_body.rb +22 -0
  140. data/lib/workos/shared/invalid_idp_sso_url_error_body.rb +22 -0
  141. data/lib/workos/shared/invalid_link_authorization_code_oauth_error_body.rb +22 -0
  142. data/lib/workos/shared/invalid_locale_error_body.rb +22 -0
  143. data/lib/workos/shared/invalid_metadata_error_body.rb +22 -0
  144. data/lib/workos/shared/invalid_one_time_code_error_body.rb +22 -0
  145. data/lib/workos/shared/invalid_organization_id_error_body.rb +22 -0
  146. data/lib/workos/shared/invalid_password_hash_error_body.rb +22 -0
  147. data/lib/workos/shared/invalid_pending_authentication_token_error_body.rb +22 -0
  148. data/lib/workos/shared/invalid_profile_oauth_error_body.rb +22 -0
  149. data/lib/workos/shared/invalid_refresh_token_error_body.rb +22 -0
  150. data/lib/workos/shared/invalid_request_oauth_error_body.rb +22 -0
  151. data/lib/workos/shared/invalid_request_parameters_error_body.rb +22 -0
  152. data/lib/workos/shared/invalid_request_parameters_error_body_with_errors.rb +25 -0
  153. data/lib/workos/shared/invalid_role_error_body.rb +22 -0
  154. data/lib/workos/shared/invalid_url_error_body.rb +22 -0
  155. data/lib/workos/shared/mfa_challenge_error_body.rb +22 -0
  156. data/lib/workos/shared/mfa_enrollment_error_body.rb +22 -0
  157. data/lib/workos/shared/mfa_enrollment_oauth_error_body.rb +22 -0
  158. data/lib/workos/shared/multiple_roles_not_enabled_error_body.rb +22 -0
  159. data/lib/workos/shared/must_use_sso_for_selected_organization_message_error_body.rb +18 -0
  160. data/lib/workos/shared/oauth_data_integration_vended_credential.rb +40 -0
  161. data/lib/workos/shared/oauth_error_body.rb +22 -0
  162. data/lib/workos/shared/one_time_code_expired_error_body.rb +22 -0
  163. data/lib/workos/shared/one_time_code_previously_used_error_body.rb +22 -0
  164. data/lib/workos/shared/one_time_code_too_many_attempts_error_body.rb +22 -0
  165. data/lib/workos/shared/passkey_progressive_enrollment_error_body.rb +22 -0
  166. data/lib/workos/shared/phone_number_required_error_body.rb +22 -0
  167. data/lib/workos/shared/pkce_not_supported_oauth_error_body.rb +22 -0
  168. data/lib/workos/shared/policy_denied_error_body.rb +25 -0
  169. data/lib/workos/shared/radar_challenge_error_body.rb +22 -0
  170. data/lib/workos/shared/radar_sign_up_challenge_error_body.rb +22 -0
  171. data/lib/workos/shared/radar_sms_sign_in_challenge_error_body.rb +22 -0
  172. data/lib/workos/shared/rate_limit_exceeded_error_body_with_retry_after.rb +25 -0
  173. data/lib/workos/shared/sign_up_not_allowed_oauth_error_body.rb +22 -0
  174. data/lib/workos/shared/slow_down_oauth_error_body.rb +22 -0
  175. data/lib/workos/shared/sms_challenge_quota_reached_error_body.rb +22 -0
  176. data/lib/workos/shared/sms_challenge_rate_limited_error_body.rb +22 -0
  177. data/lib/workos/shared/sso_required_oauth_error_body_with_connection_ids_list_email.rb +31 -0
  178. data/lib/workos/shared/sub_resource_scoped_role_not_allowed_error_body_with_role_slug.rb +25 -0
  179. data/lib/workos/shared/token_too_big_oauth_error_body.rb +22 -0
  180. data/lib/workos/shared/too_many_failed_verification_attempts_error_body_with_retry_after.rb +25 -0
  181. data/lib/workos/shared/too_many_requests_oauth_error_body.rb +22 -0
  182. data/lib/workos/shared/unauthorized_client_oauth_error_body.rb +22 -0
  183. data/lib/workos/shared/unauthorized_error_body.rb +18 -0
  184. data/lib/workos/shared/update_audit_logs_retention_with_retention_period.rb +18 -0
  185. data/lib/workos/shared/update_audit_logs_retention_with_retention_period_in_days.rb +26 -0
  186. data/lib/workos/shared/update_user_organization_membership_with_role_slug.rb +18 -0
  187. data/lib/workos/shared/update_user_organization_membership_with_role_slugs.rb +18 -0
  188. data/lib/workos/shared/verification_id_required_error_body.rb +22 -0
  189. data/lib/workos/sso/connection_could_not_be_verified_error_body.rb +22 -0
  190. data/lib/workos/sso/connection_creation_conflict_error_body.rb +22 -0
  191. data/lib/workos/sso/connection_creation_not_found_error_body.rb +22 -0
  192. data/lib/workos/sso/connection_finish_error_body.rb +22 -0
  193. data/lib/workos/sso/connection_type_not_updatable_error_body.rb +22 -0
  194. data/lib/workos/sso.rb +6 -2
  195. data/lib/workos/types/authorization_url_not_found_error_body_code.rb +14 -0
  196. data/lib/workos/types/authorization_url_request_error_body_code.rb +14 -0
  197. data/lib/workos/types/connection_creation_conflict_error_body_code.rb +13 -0
  198. data/lib/workos/types/connection_creation_not_found_error_body_code.rb +13 -0
  199. data/lib/workos/types/connection_finish_error_body_code.rb +29 -0
  200. data/lib/workos/types/connections_state.rb +14 -0
  201. data/lib/workos/types/create_data_integration_ownership.rb +5 -1
  202. data/lib/workos/types/create_magic_code_and_return_locale.rb +101 -0
  203. data/lib/workos/types/{connected_account_write_response_auth_method.rb → create_password_reset_token_locale.rb} +1 -1
  204. data/lib/workos/types/create_user_invite_options_locale.rb +1 -93
  205. data/lib/workos/types/create_webhook_endpoint_events.rb +9 -1
  206. data/lib/workos/types/data_integration_access_token_response_with_error_error.rb +9 -0
  207. data/lib/workos/types/data_integration_credentials_response_with_error_error.rb +9 -0
  208. data/lib/workos/types/data_integration_ownership.rb +1 -1
  209. data/lib/workos/types/{connected_account_write_response_connection_role.rb → data_integration_vended_credential_auth_method.rb} +1 -1
  210. data/lib/workos/types/data_integrations_create_api_key_connection_request_connection_owner.rb +1 -1
  211. data/lib/workos/types/data_integrations_create_client_credentials_connection_request_connection_owner.rb +1 -1
  212. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_intent.rb +13 -0
  213. data/lib/workos/types/data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +1 -1
  214. data/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb +1 -1
  215. data/lib/workos/types/data_integrations_list_response_data_connection_owner.rb +1 -1
  216. data/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb +1 -1
  217. data/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb +1 -1
  218. data/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb +1 -1
  219. data/lib/workos/types/error_body_code.rb +182 -0
  220. data/lib/workos/types/feature_flags_flag_created_context_actor_source.rb +9 -0
  221. data/lib/workos/types/feature_flags_flag_deleted_context_actor_source.rb +9 -0
  222. data/lib/workos/types/feature_flags_flag_rule_created_context_actor_source.rb +9 -0
  223. data/lib/workos/types/feature_flags_flag_rule_deleted_context_actor_source.rb +9 -0
  224. data/lib/workos/types/feature_flags_flag_rule_updated_context_actor_source.rb +9 -0
  225. data/lib/workos/types/feature_flags_flag_target_created_context_actor_source.rb +9 -0
  226. data/lib/workos/types/feature_flags_flag_target_deleted_context_actor_source.rb +9 -0
  227. data/lib/workos/types/feature_flags_flag_updated_context_actor_source.rb +9 -0
  228. data/lib/workos/types/organization_connected_account_import_error_body_code.rb +14 -0
  229. data/lib/workos/types/pipes_ownership.rb +1 -1
  230. data/lib/workos/types/{connected_account_write_response_state.rb → pipes_provider_ownership.rb} +1 -1
  231. data/lib/workos/types/resend_user_invite_options_locale.rb +1 -1
  232. data/lib/workos/types/resource_export_completed_data_resource_type.rb +3 -1
  233. data/lib/workos/types/send_email_change_locale.rb +9 -0
  234. data/lib/workos/types/send_verification_email_locale.rb +9 -0
  235. data/lib/workos/types/update_audit_logs_retention_with_retention_period_retention_period.rb +9 -0
  236. data/lib/workos/types/user_connected_account_import_error_body_code.rb +15 -0
  237. data/lib/workos/types/widget_session_token_scopes.rb +3 -1
  238. data/lib/workos/user_management/action_denied_error_body.rb +22 -0
  239. data/lib/workos/user_management/authentication_email_verification_failed_data_error.rb +5 -2
  240. data/lib/workos/user_management/authentication_method_not_allowed_error_body.rb +22 -0
  241. data/lib/workos/user_management/authentication_method_not_allowed_oauth_error_body.rb +22 -0
  242. data/lib/workos/user_management/authentication_radar_risk_detected_data.rb +5 -2
  243. data/lib/workos/user_management/create_magic_code_and_return.rb +5 -2
  244. data/lib/workos/user_management/create_password_reset_token.rb +16 -1
  245. data/lib/workos/user_management/email_already_in_use_error_body.rb +22 -0
  246. data/lib/workos/user_management/email_already_verified_error_body.rb +22 -0
  247. data/lib/workos/user_management/email_change_not_allowed_error_body.rb +22 -0
  248. data/lib/workos/user_management/email_completion_required_error_body_with_email_completion_token.rb +25 -0
  249. data/lib/workos/user_management/email_domain_not_deliverable_error_body.rb +22 -0
  250. data/lib/workos/user_management/email_not_available_error_body.rb +22 -0
  251. data/lib/workos/user_management/email_password_auth_disabled_error_body.rb +22 -0
  252. data/lib/workos/user_management/email_verification_required_error_body.rb +22 -0
  253. data/lib/workos/user_management/invitation_cannot_be_used_for_email_oauth_error_body.rb +22 -0
  254. data/lib/workos/user_management/invitation_invalid_oauth_error_body.rb +22 -0
  255. data/lib/workos/user_management/password_and_password_hash_provided_error_body.rb +22 -0
  256. data/lib/workos/user_management/password_and_password_hash_type_provided_error_body.rb +22 -0
  257. data/lib/workos/user_management/password_salt_position_requires_password_hash_error_body.rb +22 -0
  258. data/lib/workos/user_management/password_strength_error_error_body_with_errors.rb +25 -0
  259. data/lib/workos/user_management/send_email_change.rb +6 -2
  260. data/lib/workos/user_management/send_verification_email.rb +18 -0
  261. data/lib/workos/user_management/user_connected_account_import_error_body.rb +22 -0
  262. data/lib/workos/user_management/user_consent_options_not_supported_error_body.rb +22 -0
  263. data/lib/workos/user_management/user_creation_error_error_body_with_errors.rb +25 -0
  264. data/lib/workos/user_management/user_mismatch_error_body.rb +22 -0
  265. data/lib/workos/user_management/waitlist_list_response.rb +25 -0
  266. data/lib/workos/user_management/waitlist_list_response_list_metadata.rb +7 -0
  267. data/lib/workos/user_management.rb +25 -10
  268. data/lib/workos/version.rb +1 -1
  269. data/rbi/workos/access_denied_oauth_error_body.rbi +30 -0
  270. data/rbi/workos/account_selection_required_error_body.rbi +9 -0
  271. data/rbi/workos/{connected_account_write_response_warning.rbi → action_denied_error_body.rbi} +1 -1
  272. data/rbi/workos/admin_portal.rbi +2 -2
  273. data/rbi/workos/agent_blueprint_invocable_by.rbi +1 -22
  274. data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +1 -22
  275. data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +1 -28
  276. data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +1 -28
  277. data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +1 -22
  278. data/rbi/workos/agent_registration_claim_completed_data.rbi +6 -0
  279. data/rbi/workos/agent_registration_expired_data.rbi +1 -16
  280. data/rbi/workos/agent_registration_refreshed_data.rbi +1 -16
  281. data/rbi/workos/agent_registration_revoked_data.rbi +1 -16
  282. data/rbi/workos/agents.rbi +20 -20
  283. data/rbi/workos/already_claimed_error_body.rbi +30 -0
  284. data/rbi/workos/api_key_data_integration_vended_credential.rbi +42 -0
  285. data/rbi/workos/api_key_owner.rbi +1 -22
  286. data/rbi/workos/api_key_revoked_data.rbi +1 -70
  287. data/rbi/workos/api_key_revoked_data_owner.rbi +1 -22
  288. data/rbi/workos/api_key_updated_data_owner.rbi +1 -22
  289. data/rbi/workos/api_keys.rbi +5 -5
  290. data/rbi/workos/application_consent_required_error_body.rbi +30 -0
  291. data/rbi/workos/audit_log_event_target.rbi +1 -34
  292. data/rbi/workos/audit_log_schema_actor_input.rbi +1 -16
  293. data/rbi/workos/audit_log_schema_target_input.rbi +1 -22
  294. data/rbi/workos/audit_logs.rbi +10 -10
  295. data/rbi/workos/auth_method_mismatch_error_body.rbi +9 -0
  296. data/rbi/workos/authentication_email_verification_failed_data_error.rbi +6 -0
  297. data/rbi/workos/authentication_factor_sms.rbi +1 -16
  298. data/rbi/workos/authentication_magic_auth_failed_data_error.rbi +1 -22
  299. data/rbi/workos/authentication_method_not_allowed_error_body.rbi +30 -0
  300. data/rbi/workos/authentication_method_not_allowed_oauth_error_body.rbi +30 -0
  301. data/rbi/workos/authentication_mfa_failed_data_error.rbi +1 -22
  302. data/rbi/workos/authentication_oauth_failed_data_error.rbi +1 -22
  303. data/rbi/workos/authentication_passkey_failed_data_error.rbi +1 -22
  304. data/rbi/workos/authentication_password_failed_data_error.rbi +1 -22
  305. data/rbi/workos/authentication_radar_risk_detected_data.rbi +6 -0
  306. data/rbi/workos/authentication_sso_failed_data_error.rbi +1 -22
  307. data/rbi/workos/authentication_sso_started_data_sso.rbi +1 -28
  308. data/rbi/workos/authentication_sso_succeeded_data_sso.rbi +1 -28
  309. data/rbi/workos/authentication_sso_timed_out_data_error.rbi +1 -22
  310. data/rbi/workos/authentication_sso_timed_out_data_sso.rbi +1 -28
  311. data/rbi/workos/authorization.rbi +57 -45
  312. data/rbi/workos/authorization_pending_oauth_error_body.rbi +30 -0
  313. data/rbi/workos/authorization_url_not_found_error_body.rbi +30 -0
  314. data/rbi/workos/authorization_url_request_error_body.rbi +30 -0
  315. data/rbi/workos/claim_view_response_organization.rbi +1 -22
  316. data/rbi/workos/client_api.rbi +1 -1
  317. data/rbi/workos/client_credentials_data_integration_vended_credential.rbi +66 -0
  318. data/rbi/workos/code_challenge_not_found_error_body.rbi +30 -0
  319. data/rbi/workos/confirm_email_change.rbi +1 -16
  320. data/rbi/workos/connect.rbi +12 -10
  321. data/rbi/workos/connect_application.rbi +42 -0
  322. data/rbi/workos/connect_application_oauth.rbi +6 -0
  323. data/rbi/workos/connect_application_redirect_uri.rbi +30 -0
  324. data/rbi/workos/connected_account.rbi +6 -0
  325. data/rbi/workos/connected_account_input.rbi +6 -0
  326. data/rbi/workos/connected_account_limit_reached_error_body.rbi +30 -0
  327. data/rbi/workos/connected_account_warning.rbi +30 -0
  328. data/rbi/workos/connection_could_not_be_verified_error_body.rbi +30 -0
  329. data/rbi/workos/connection_creation_conflict_error_body.rbi +30 -0
  330. data/rbi/workos/connection_creation_not_found_error_body.rbi +30 -0
  331. data/rbi/workos/connection_deactivated_data_domain.rbi +1 -28
  332. data/rbi/workos/connection_domain.rbi +1 -28
  333. data/rbi/workos/connection_finish_error_body.rbi +30 -0
  334. data/rbi/workos/connection_saml_certificate_renewed_data_connection.rbi +1 -22
  335. data/rbi/workos/connection_type_not_updatable_error_body.rbi +30 -0
  336. data/rbi/workos/create_connected_account.rbi +12 -0
  337. data/rbi/workos/create_group_role_assignment.rbi +1 -34
  338. data/rbi/workos/create_magic_code_and_return.rbi +6 -0
  339. data/rbi/workos/create_oauth_application.rbi +6 -0
  340. data/rbi/workos/create_organization_connected_account.rbi +12 -0
  341. data/rbi/workos/create_password_reset_token.rbi +6 -0
  342. data/rbi/workos/create_role.rbi +1 -34
  343. data/rbi/workos/daily_quota_exceeded_error_body.rbi +30 -0
  344. data/rbi/workos/data_integration_access_token_response_with_access_token.rbi +30 -0
  345. data/rbi/workos/data_integration_access_token_response_with_access_token_access_token.rbi +9 -0
  346. data/rbi/workos/data_integration_access_token_response_with_error.rbi +30 -0
  347. data/rbi/workos/data_integration_authorize_url_response.rbi +12 -0
  348. data/rbi/workos/data_integration_credentials_response_with_credential.rbi +30 -0
  349. data/rbi/workos/data_integration_credentials_response_with_error.rbi +30 -0
  350. data/rbi/workos/data_integration_finish_connection_response.rbi +24 -0
  351. data/rbi/workos/data_integration_vended_credential.rbi +6 -6
  352. data/rbi/workos/data_integrations_finish_connection_request.rbi +36 -0
  353. data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +24 -0
  354. data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +6 -0
  355. data/rbi/workos/data_integrations_list_response_data_connected_account_warning.rbi +9 -0
  356. data/rbi/workos/data_integrations_upsert_api_key_request.rbi +12 -0
  357. data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +12 -0
  358. data/rbi/workos/delete_group_role_assignments_by_criteria.rbi +1 -34
  359. data/rbi/workos/directory_sync.rbi +54 -8
  360. data/rbi/workos/directory_user_with_groups_email.rbi +1 -28
  361. data/rbi/workos/dsync_group_user_removed_data.rbi +1 -28
  362. data/rbi/workos/dsync_token_revoked_data.rbi +1 -46
  363. data/rbi/workos/dsync_user_updated_data_email.rbi +1 -28
  364. data/rbi/workos/email_already_in_use_error_body.rbi +30 -0
  365. data/rbi/workos/email_already_verified_error_body.rbi +30 -0
  366. data/rbi/workos/email_change_not_allowed_error_body.rbi +30 -0
  367. data/rbi/workos/email_completion_required_error_body_with_email_completion_token.rbi +36 -0
  368. data/rbi/workos/email_domain_not_deliverable_error_body.rbi +30 -0
  369. data/rbi/workos/email_not_available_error_body.rbi +30 -0
  370. data/rbi/workos/email_password_auth_disabled_error_body.rbi +30 -0
  371. data/rbi/workos/email_verification_required_error_body.rbi +30 -0
  372. data/rbi/workos/entity_not_found_error_body.rbi +30 -0
  373. data/rbi/workos/error_body.rbi +9 -0
  374. data/rbi/workos/error_body_with_code.rbi +30 -0
  375. data/rbi/workos/error_body_with_code_errors.rbi +36 -0
  376. data/rbi/workos/error_body_with_code_field_error.rbi +30 -0
  377. data/rbi/workos/error_body_with_code_field_errors.rbi +30 -0
  378. data/rbi/workos/error_body_with_code_instance_path_error.rbi +24 -0
  379. data/rbi/workos/error_body_with_code_instance_path_errors.rbi +36 -0
  380. data/rbi/workos/error_body_with_code_status_code.rbi +36 -0
  381. data/rbi/workos/error_body_with_constraints_property_error.rbi +30 -0
  382. data/rbi/workos/error_body_with_constraints_property_errors.rbi +30 -0
  383. data/rbi/workos/error_body_with_error.rbi +30 -0
  384. data/rbi/workos/error_body_with_error_message_list.rbi +30 -0
  385. data/rbi/workos/error_body_with_message_or_message_list.rbi +24 -0
  386. data/rbi/workos/events.rbi +1 -3
  387. data/rbi/workos/expired_token_oauth_error_body.rbi +30 -0
  388. data/rbi/workos/external_auth_session_already_completed_error_body.rbi +30 -0
  389. data/rbi/workos/external_id_already_used_error_body.rbi +30 -0
  390. data/rbi/workos/extra_attributes_required_oauth_error_body.rbi +30 -0
  391. data/rbi/workos/feature_flags.rbi +8 -8
  392. data/rbi/workos/feature_flags_flag_created.rbi +54 -0
  393. data/rbi/workos/feature_flags_flag_created_context.rbi +30 -0
  394. data/rbi/workos/feature_flags_flag_created_context_actor.rbi +36 -0
  395. data/rbi/workos/feature_flags_flag_created_data.rbi +90 -0
  396. data/rbi/workos/feature_flags_flag_created_data_owner.rbi +9 -0
  397. data/rbi/workos/feature_flags_flag_deleted.rbi +54 -0
  398. data/rbi/workos/feature_flags_flag_deleted_context.rbi +30 -0
  399. data/rbi/workos/feature_flags_flag_deleted_context_actor.rbi +36 -0
  400. data/rbi/workos/feature_flags_flag_deleted_data.rbi +9 -0
  401. data/rbi/workos/feature_flags_flag_deleted_data_owner.rbi +9 -0
  402. data/rbi/workos/feature_flags_flag_rule_created.rbi +54 -0
  403. data/rbi/workos/feature_flags_flag_rule_created_context.rbi +30 -0
  404. data/rbi/workos/feature_flags_flag_rule_created_context_actor.rbi +36 -0
  405. data/rbi/workos/feature_flags_flag_rule_deleted.rbi +54 -0
  406. data/rbi/workos/feature_flags_flag_rule_deleted_context.rbi +30 -0
  407. data/rbi/workos/feature_flags_flag_rule_deleted_context_actor.rbi +36 -0
  408. data/rbi/workos/feature_flags_flag_rule_updated.rbi +54 -0
  409. data/rbi/workos/feature_flags_flag_rule_updated_context.rbi +36 -0
  410. data/rbi/workos/feature_flags_flag_rule_updated_context_actor.rbi +36 -0
  411. data/rbi/workos/feature_flags_flag_rule_updated_context_previous_attribute.rbi +24 -0
  412. data/rbi/workos/feature_flags_flag_rule_updated_context_previous_attribute_data.rbi +24 -0
  413. data/rbi/workos/feature_flags_flag_target_created.rbi +54 -0
  414. data/rbi/workos/feature_flags_flag_target_created_context.rbi +30 -0
  415. data/rbi/workos/feature_flags_flag_target_created_context_actor.rbi +36 -0
  416. data/rbi/workos/feature_flags_flag_target_deleted.rbi +54 -0
  417. data/rbi/workos/feature_flags_flag_target_deleted_context.rbi +30 -0
  418. data/rbi/workos/feature_flags_flag_target_deleted_context_actor.rbi +36 -0
  419. data/rbi/workos/feature_flags_flag_updated.rbi +54 -0
  420. data/rbi/workos/feature_flags_flag_updated_context.rbi +36 -0
  421. data/rbi/workos/feature_flags_flag_updated_context_actor.rbi +36 -0
  422. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute.rbi +24 -0
  423. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute_data.rbi +54 -0
  424. data/rbi/workos/feature_flags_flag_updated_context_previous_attribute_data_owner.rbi +9 -0
  425. data/rbi/workos/feature_flags_flag_updated_data.rbi +9 -0
  426. data/rbi/workos/feature_flags_flag_updated_data_owner.rbi +9 -0
  427. data/rbi/workos/flag.rbi +1 -76
  428. data/rbi/workos/flag_created_data.rbi +1 -82
  429. data/rbi/workos/flag_created_data_owner.rbi +1 -28
  430. data/rbi/workos/flag_deleted_data.rbi +1 -82
  431. data/rbi/workos/flag_deleted_data_owner.rbi +1 -28
  432. data/rbi/workos/flag_owner.rbi +1 -28
  433. data/rbi/workos/flag_rule.rbi +84 -0
  434. data/rbi/workos/flag_rule_updated_context_configured_target_organization.rbi +1 -22
  435. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target.rbi +1 -22
  436. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rbi +1 -22
  437. data/rbi/workos/flag_rule_updated_context_previous_attribute_context_configured_target_user.rbi +1 -22
  438. data/rbi/workos/flag_rule_updated_data.rbi +1 -82
  439. data/rbi/workos/flag_rule_updated_data_owner.rbi +1 -28
  440. data/rbi/workos/flag_target.rbi +90 -0
  441. data/rbi/workos/flag_target_with_rule_id.rbi +78 -0
  442. data/rbi/workos/flag_target_with_value_type.rbi +84 -0
  443. data/rbi/workos/flag_updated_context_previous_attribute.rbi +1 -16
  444. data/rbi/workos/flag_updated_context_previous_attribute_data.rbi +1 -46
  445. data/rbi/workos/flag_updated_context_previous_attribute_data_owner.rbi +1 -28
  446. data/rbi/workos/flag_updated_data.rbi +1 -82
  447. data/rbi/workos/flag_updated_data_owner.rbi +1 -28
  448. data/rbi/workos/group_member_removed_data.rbi +1 -22
  449. data/rbi/workos/group_role_assignment_list.rbi +36 -0
  450. data/rbi/workos/groups.rbi +19 -8
  451. data/rbi/workos/idp_metadata_fetch_failed_error_body.rbi +30 -0
  452. data/rbi/workos/invalid_client_oauth_error_body.rbi +30 -0
  453. data/rbi/workos/invalid_connection_oauth_error_body.rbi +30 -0
  454. data/rbi/workos/invalid_credentials_error_body.rbi +30 -0
  455. data/rbi/workos/invalid_email_error_body.rbi +30 -0
  456. data/rbi/workos/invalid_grant_oauth_error_body.rbi +30 -0
  457. data/rbi/workos/invalid_idp_sso_url_error_body.rbi +30 -0
  458. data/rbi/workos/invalid_link_authorization_code_oauth_error_body.rbi +30 -0
  459. data/rbi/workos/invalid_locale_error_body.rbi +30 -0
  460. data/rbi/workos/invalid_metadata_error_body.rbi +30 -0
  461. data/rbi/workos/invalid_one_time_code_error_body.rbi +30 -0
  462. data/rbi/workos/invalid_organization_id_error_body.rbi +30 -0
  463. data/rbi/workos/invalid_password_hash_error_body.rbi +30 -0
  464. data/rbi/workos/invalid_pending_authentication_token_error_body.rbi +30 -0
  465. data/rbi/workos/invalid_profile_oauth_error_body.rbi +30 -0
  466. data/rbi/workos/invalid_refresh_token_error_body.rbi +30 -0
  467. data/rbi/workos/invalid_request_oauth_error_body.rbi +30 -0
  468. data/rbi/workos/invalid_request_parameters_error_body.rbi +30 -0
  469. data/rbi/workos/invalid_request_parameters_error_body_with_errors.rbi +36 -0
  470. data/rbi/workos/invalid_role_error_body.rbi +30 -0
  471. data/rbi/workos/invalid_url_error_body.rbi +30 -0
  472. data/rbi/workos/invitation_cannot_be_used_for_email_oauth_error_body.rbi +30 -0
  473. data/rbi/workos/invitation_invalid_oauth_error_body.rbi +30 -0
  474. data/rbi/workos/it_contact_list.rbi +36 -0
  475. data/rbi/workos/it_contact_list_list_metadata.rbi +30 -0
  476. data/rbi/workos/list_metadata.rbi +30 -0
  477. data/rbi/workos/mfa_challenge_error_body.rbi +30 -0
  478. data/rbi/workos/mfa_enrollment_error_body.rbi +30 -0
  479. data/rbi/workos/mfa_enrollment_oauth_error_body.rbi +30 -0
  480. data/rbi/workos/multi_factor_auth.rbi +7 -7
  481. data/rbi/workos/multiple_roles_not_enabled_error_body.rbi +30 -0
  482. data/rbi/workos/must_use_sso_for_selected_organization_message_error_body.rbi +24 -0
  483. data/rbi/workos/oauth_data_integration_vended_credential.rbi +66 -0
  484. data/rbi/workos/oauth_error_body.rbi +30 -0
  485. data/rbi/workos/one_time_code_expired_error_body.rbi +30 -0
  486. data/rbi/workos/one_time_code_previously_used_error_body.rbi +30 -0
  487. data/rbi/workos/one_time_code_too_many_attempts_error_body.rbi +30 -0
  488. data/rbi/workos/organization_api_key_owner.rbi +1 -22
  489. data/rbi/workos/organization_api_key_with_value_owner.rbi +1 -22
  490. data/rbi/workos/organization_authentication_methods_required_oauth_error_body.rbi +30 -0
  491. data/rbi/workos/organization_connected_account.rbi +6 -0
  492. data/rbi/workos/organization_connected_account_import_error_body.rbi +30 -0
  493. data/rbi/workos/organization_domains.rbi +4 -4
  494. data/rbi/workos/organization_membership_not_found_oauth_error_body.rbi +30 -0
  495. data/rbi/workos/organization_membership_service.rbi +8 -8
  496. data/rbi/workos/organization_not_found_oauth_error_body.rbi +30 -0
  497. data/rbi/workos/organization_role_deleted_data.rbi +1 -64
  498. data/rbi/workos/organization_role_updated_data.rbi +1 -64
  499. data/rbi/workos/organization_selection_required_error_body.rbi +30 -0
  500. data/rbi/workos/organization_selection_required_error_body_with_organization.rbi +9 -0
  501. data/rbi/workos/organization_selection_required_error_body_with_organizations.rbi +36 -0
  502. data/rbi/workos/organizations.rbi +13 -13
  503. data/rbi/workos/passkey_progressive_enrollment_error_body.rbi +30 -0
  504. data/rbi/workos/password_and_password_hash_provided_error_body.rbi +30 -0
  505. data/rbi/workos/password_and_password_hash_type_provided_error_body.rbi +30 -0
  506. data/rbi/workos/password_reset_succeeded_data.rbi +1 -46
  507. data/rbi/workos/password_salt_position_requires_password_hash_error_body.rbi +30 -0
  508. data/rbi/workos/password_strength_error_error_body_with_errors.rbi +36 -0
  509. data/rbi/workos/patch_connection_standard_attributes.rbi +1 -46
  510. data/rbi/workos/patch_group_memberships.rbi +30 -0
  511. data/rbi/workos/patch_group_role_assignments.rbi +30 -0
  512. data/rbi/workos/permission.rbi +1 -64
  513. data/rbi/workos/permission_created_data.rbi +1 -64
  514. data/rbi/workos/permission_deleted_data.rbi +1 -64
  515. data/rbi/workos/permission_updated_data.rbi +1 -64
  516. data/rbi/workos/phone_number_required_error_body.rbi +30 -0
  517. data/rbi/workos/pipes.rbi +57 -33
  518. data/rbi/workos/pipes_account_connection_connection_failed_data.rbi +1 -76
  519. data/rbi/workos/pipes_connected_account_connection_failed_data.rbi +1 -76
  520. data/rbi/workos/pipes_provider.rbi +4 -2
  521. data/rbi/workos/pkce_not_supported_oauth_error_body.rbi +30 -0
  522. data/rbi/workos/platform_teams.rbi +2 -2
  523. data/rbi/workos/policy_denied_error_body.rbi +36 -0
  524. data/rbi/workos/radar.rbi +4 -4
  525. data/rbi/workos/radar_challenge_error_body.rbi +30 -0
  526. data/rbi/workos/radar_sign_up_challenge_error_body.rbi +30 -0
  527. data/rbi/workos/radar_sms_sign_in_challenge_error_body.rbi +30 -0
  528. data/rbi/workos/radar_standalone_update_radar_list_request.rbi +1 -16
  529. data/rbi/workos/rate_limit_exceeded_error_body_with_retry_after.rbi +36 -0
  530. data/rbi/workos/remove_role.rbi +1 -34
  531. data/rbi/workos/replace_group_role_assignment_entry.rbi +1 -34
  532. data/rbi/workos/role_deleted_data.rbi +1 -46
  533. data/rbi/workos/role_updated_data.rbi +1 -46
  534. data/rbi/workos/send_email_change.rbi +6 -0
  535. data/rbi/workos/send_verification_email.rbi +24 -0
  536. data/rbi/workos/send_verification_email_response.rbi +1 -16
  537. data/rbi/workos/session_created_data_impersonator.rbi +1 -22
  538. data/rbi/workos/session_revoked_data_impersonator.rbi +1 -22
  539. data/rbi/workos/sign_up_not_allowed_oauth_error_body.rbi +30 -0
  540. data/rbi/workos/slim_role.rbi +1 -16
  541. data/rbi/workos/slow_down_oauth_error_body.rbi +30 -0
  542. data/rbi/workos/sms_challenge_quota_reached_error_body.rbi +30 -0
  543. data/rbi/workos/sms_challenge_rate_limited_error_body.rbi +30 -0
  544. data/rbi/workos/sso.rbi +19 -18
  545. data/rbi/workos/sso_required_oauth_error_body_with_connection_ids_list_email.rbi +48 -0
  546. data/rbi/workos/sso_token_response_oauth_token.rbi +1 -40
  547. data/rbi/workos/sub_resource_scoped_role_not_allowed_error_body_with_role_slug.rbi +36 -0
  548. data/rbi/workos/token_too_big_oauth_error_body.rbi +30 -0
  549. data/rbi/workos/too_many_failed_verification_attempts_error_body_with_retry_after.rbi +36 -0
  550. data/rbi/workos/too_many_requests_oauth_error_body.rbi +30 -0
  551. data/rbi/workos/unauthorized_client_oauth_error_body.rbi +30 -0
  552. data/rbi/workos/unauthorized_error_body.rbi +24 -0
  553. data/rbi/workos/update_audit_logs_retention_with_retention_period.rbi +24 -0
  554. data/rbi/workos/update_audit_logs_retention_with_retention_period_in_days.rbi +24 -0
  555. data/rbi/workos/update_group.rbi +1 -22
  556. data/rbi/workos/update_oauth_application.rbi +6 -0
  557. data/rbi/workos/update_organization_role.rbi +1 -22
  558. data/rbi/workos/update_role.rbi +1 -22
  559. data/rbi/workos/update_user_organization_membership_with_role_slug.rbi +24 -0
  560. data/rbi/workos/update_user_organization_membership_with_role_slugs.rbi +24 -0
  561. data/rbi/workos/user.rbi +1 -94
  562. data/rbi/workos/user_api_key_owner.rbi +1 -28
  563. data/rbi/workos/user_api_key_revoked_data_owner.rbi +1 -28
  564. data/rbi/workos/user_api_key_updated_data_owner.rbi +1 -28
  565. data/rbi/workos/user_api_key_with_value_owner.rbi +1 -28
  566. data/rbi/workos/user_connected_account_import_error_body.rbi +30 -0
  567. data/rbi/workos/user_consent_options_not_supported_error_body.rbi +30 -0
  568. data/rbi/workos/user_creation_error_error_body_with_errors.rbi +36 -0
  569. data/rbi/workos/user_management.rbi +77 -61
  570. data/rbi/workos/user_mismatch_error_body.rbi +30 -0
  571. data/rbi/workos/user_role_assignment_resource.rbi +1 -28
  572. data/rbi/workos/user_role_assignment_source_group.rbi +1 -22
  573. data/rbi/workos/user_sessions_impersonator.rbi +1 -22
  574. data/rbi/workos/vault.rbi +11 -11
  575. data/rbi/workos/verification_id_required_error_body.rbi +30 -0
  576. data/rbi/workos/verify_email_address.rbi +1 -16
  577. data/rbi/workos/verify_email_response.rbi +1 -16
  578. data/rbi/workos/version_list_response.rbi +30 -0
  579. data/rbi/workos/waitlist_list_response.rbi +36 -0
  580. data/rbi/workos/waitlist_list_response_list_metadata.rbi +9 -0
  581. data/rbi/workos/webhooks.rbi +4 -4
  582. data/rbi/workos/widget_session_token_response.rbi +1 -16
  583. data/rbi/workos/widgets.rbi +1 -1
  584. data/test/workos/test_agents_model_round_trip.rb +11 -0
  585. data/test/workos/test_api_keys_model_round_trip.rb +14 -0
  586. data/test/workos/test_authorization.rb +8 -0
  587. data/test/workos/test_authorization_model_round_trip.rb +23 -0
  588. data/test/workos/test_base_client.rb +4 -3
  589. data/test/workos/test_connect_model_round_trip.rb +3 -1
  590. data/test/workos/test_directory_sync.rb +32 -0
  591. data/test/workos/test_directory_sync_model_round_trip.rb +11 -11
  592. data/test/workos/test_feature_flags_model_round_trip.rb +107 -0
  593. data/test/workos/test_groups.rb +8 -0
  594. data/test/workos/test_groups_model_round_trip.rb +11 -0
  595. data/test/workos/test_organizations_model_round_trip.rb +111 -0
  596. data/test/workos/test_pipes.rb +8 -0
  597. data/test/workos/test_pipes_model_round_trip.rb +101 -201
  598. data/test/workos/test_session.rb +46 -1
  599. data/test/workos/test_shared_model_round_trip.rb +2046 -425
  600. data/test/workos/test_sso_model_round_trip.rb +60 -0
  601. data/test/workos/test_user_management_model_round_trip.rb +315 -12
  602. data/test/workos/test_vault_model_round_trip.rb +30 -0
  603. metadata +380 -26
  604. data/lib/workos/pipes/add_data_integrations_get_data_integration_authorize_url_request.rb +0 -37
  605. data/lib/workos/pipes/connected_account_write_response.rb +0 -73
  606. data/lib/workos/pipes/data_integrations_upsert_api_key_request_2.rb +0 -37
  607. data/lib/workos/pipes/data_integrations_upsert_client_credentials_request_2.rb +0 -43
  608. data/lib/workos/pipes/reauthorize_data_integrations_get_data_integration_authorize_url_request.rb +0 -40
  609. data/lib/workos/pipes/reauthorize_data_integrations_upsert_api_key_request.rb +0 -40
  610. data/lib/workos/pipes/reauthorize_data_integrations_upsert_client_credentials_request.rb +0 -46
  611. data/lib/workos/types/add_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +0 -13
  612. data/lib/workos/types/data_integrations_upsert_api_key_request_2_connection_owner.rb +0 -9
  613. data/lib/workos/types/data_integrations_upsert_client_credentials_request_2_connection_owner.rb +0 -9
  614. data/lib/workos/types/reauthorize_data_integrations_get_data_integration_authorize_url_request_connection_owner.rb +0 -9
  615. data/lib/workos/types/reauthorize_data_integrations_upsert_api_key_request_connection_owner.rb +0 -9
  616. data/lib/workos/types/reauthorize_data_integrations_upsert_client_credentials_request_connection_owner.rb +0 -9
  617. data/rbi/workos/add_data_integrations_get_data_integration_authorize_url_request.rbi +0 -60
  618. data/rbi/workos/connected_account_write_response.rbi +0 -132
  619. data/rbi/workos/data_integrations_upsert_api_key_request_2.rbi +0 -60
  620. data/rbi/workos/data_integrations_upsert_client_credentials_request_2.rbi +0 -72
  621. data/rbi/workos/reauthorize_data_integrations_get_data_integration_authorize_url_request.rbi +0 -66
  622. data/rbi/workos/reauthorize_data_integrations_upsert_api_key_request.rbi +0 -66
  623. data/rbi/workos/reauthorize_data_integrations_upsert_client_credentials_request.rbi +0 -78
@@ -5,233 +5,1753 @@
5
5
  require "test_helper"
6
6
 
7
7
  class SharedModelRoundTripTest < Minitest::Test
8
- def test_error_response_round_trip
8
+ def test_update_audit_logs_retention_with_retention_period_round_trip
9
+ fixture = {
10
+ "retention_period" => "stub"
11
+ }
12
+ model = WorkOS::UpdateAuditLogsRetentionWithRetentionPeriod.new(fixture.to_json)
13
+ json = model.to_h
14
+ assert_kind_of Hash, json
15
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
16
+ end
17
+
18
+ def test_update_audit_logs_retention_with_retention_period_in_days_round_trip
19
+ fixture = {
20
+ "retention_period_in_days" => 1
21
+ }
22
+ model = WorkOS::UpdateAuditLogsRetentionWithRetentionPeriodInDays.new(fixture.to_json)
23
+ json = model.to_h
24
+ assert_kind_of Hash, json
25
+ assert_equal fixture["retention_period_in_days"], json[:retention_period_in_days]
26
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
27
+ end
28
+
29
+ def test_update_user_organization_membership_with_role_slug_round_trip
30
+ fixture = {
31
+ "role_slug" => "stub"
32
+ }
33
+ model = WorkOS::UpdateUserOrganizationMembershipWithRoleSlug.new(fixture.to_json)
34
+ json = model.to_h
35
+ assert_kind_of Hash, json
36
+ assert_equal fixture["role_slug"], json[:role_slug]
37
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
38
+ end
39
+
40
+ def test_update_user_organization_membership_with_role_slugs_round_trip
41
+ fixture = {
42
+ "role_slugs" => []
43
+ }
44
+ model = WorkOS::UpdateUserOrganizationMembershipWithRoleSlugs.new(fixture.to_json)
45
+ json = model.to_h
46
+ assert_kind_of Hash, json
47
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
48
+ end
49
+
50
+ def test_error_body_with_code_round_trip
51
+ fixture = {
52
+ "code" => "stub",
53
+ "message" => "stub"
54
+ }
55
+ model = WorkOS::ErrorBodyWithCode.new(fixture.to_json)
56
+ json = model.to_h
57
+ assert_kind_of Hash, json
58
+ assert_equal fixture["code"], json[:code]
59
+ assert_equal fixture["message"], json[:message]
60
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
61
+ end
62
+
63
+ def test_error_body_with_error_round_trip
64
+ fixture = {
65
+ "error" => "stub",
66
+ "message" => "stub"
67
+ }
68
+ model = WorkOS::ErrorBodyWithError.new(fixture.to_json)
69
+ json = model.to_h
70
+ assert_kind_of Hash, json
71
+ assert_equal fixture["error"], json[:error]
72
+ assert_equal fixture["message"], json[:message]
73
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
74
+ end
75
+
76
+ def test_error_body_round_trip
77
+ fixture = {
78
+ "message" => "stub"
79
+ }
80
+ model = WorkOS::ErrorBody.new(fixture.to_json)
81
+ json = model.to_h
82
+ assert_kind_of Hash, json
83
+ assert_equal fixture["message"], json[:message]
84
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
85
+ end
86
+
87
+ def test_error_body_with_code_field_errors_round_trip
88
+ fixture = {
89
+ "message" => "stub",
90
+ "errors" => []
91
+ }
92
+ model = WorkOS::ErrorBodyWithCodeFieldErrors.new(fixture.to_json)
93
+ json = model.to_h
94
+ assert_kind_of Hash, json
95
+ assert_equal fixture["message"], json[:message]
96
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
97
+ end
98
+
99
+ def test_error_body_with_code_field_error_round_trip
100
+ fixture = {
101
+ "code" => "stub",
102
+ "field" => "stub"
103
+ }
104
+ model = WorkOS::ErrorBodyWithCodeFieldError.new(fixture.to_json)
105
+ json = model.to_h
106
+ assert_kind_of Hash, json
107
+ assert_equal fixture["code"], json[:code]
108
+ assert_equal fixture["field"], json[:field]
109
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
110
+ end
111
+
112
+ def test_error_body_with_code_instance_path_errors_round_trip
113
+ fixture = {
114
+ "errors" => [],
115
+ "message" => "stub",
116
+ "code" => "stub"
117
+ }
118
+ model = WorkOS::ErrorBodyWithCodeInstancePathErrors.new(fixture.to_json)
119
+ json = model.to_h
120
+ assert_kind_of Hash, json
121
+ assert_equal fixture["message"], json[:message]
122
+ assert_equal fixture["code"], json[:code]
123
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
124
+ end
125
+
126
+ def test_error_body_with_code_instance_path_error_round_trip
9
127
  fixture = {
128
+ "instancePath" => "stub"
129
+ }
130
+ model = WorkOS::ErrorBodyWithCodeInstancePathError.new(fixture.to_json)
131
+ json = model.to_h
132
+ assert_kind_of Hash, json
133
+ assert_equal fixture["instancePath"], json[:instancePath]
134
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
135
+ end
136
+
137
+ def test_error_body_with_error_message_list_round_trip
138
+ fixture = {
139
+ "message" => [],
10
140
  "error" => "stub"
11
141
  }
12
- model = WorkOS::ErrorResponse.new(fixture.to_json)
142
+ model = WorkOS::ErrorBodyWithErrorMessageList.new(fixture.to_json)
143
+ json = model.to_h
144
+ assert_kind_of Hash, json
145
+ assert_equal fixture["error"], json[:error]
146
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
147
+ end
148
+
149
+ def test_too_many_failed_verification_attempts_error_body_with_retry_after_round_trip
150
+ fixture = {
151
+ "code" => "too_many_failed_verification_attempts",
152
+ "message" => "stub",
153
+ "retry_after" => 1
154
+ }
155
+ model = WorkOS::TooManyFailedVerificationAttemptsErrorBodyWithRetryAfter.new(fixture.to_json)
156
+ json = model.to_h
157
+ assert_kind_of Hash, json
158
+ assert_equal fixture["message"], json[:message]
159
+ assert_equal fixture["retry_after"], json[:retry_after]
160
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
161
+ end
162
+
163
+ def test_rate_limit_exceeded_error_body_with_retry_after_round_trip
164
+ fixture = {
165
+ "code" => "rate_limit_exceeded",
166
+ "message" => "stub",
167
+ "retry_after" => 1.0
168
+ }
169
+ model = WorkOS::RateLimitExceededErrorBodyWithRetryAfter.new(fixture.to_json)
170
+ json = model.to_h
171
+ assert_kind_of Hash, json
172
+ assert_equal fixture["message"], json[:message]
173
+ assert_equal fixture["retry_after"], json[:retry_after]
174
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
175
+ end
176
+
177
+ def test_error_body_with_constraints_property_errors_round_trip
178
+ fixture = {
179
+ "message" => "stub",
180
+ "errors" => []
181
+ }
182
+ model = WorkOS::ErrorBodyWithConstraintsPropertyErrors.new(fixture.to_json)
183
+ json = model.to_h
184
+ assert_kind_of Hash, json
185
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
186
+ end
187
+
188
+ def test_error_body_with_constraints_property_error_round_trip
189
+ fixture = {
190
+ "property" => "stub",
191
+ "constraints" => {}
192
+ }
193
+ model = WorkOS::ErrorBodyWithConstraintsPropertyError.new(fixture.to_json)
194
+ json = model.to_h
195
+ assert_kind_of Hash, json
196
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
197
+ end
198
+
199
+ def test_error_body_with_code_status_code_round_trip
200
+ fixture = {
201
+ "message" => "stub",
202
+ "code" => "stub",
203
+ "statusCode" => 1.0
204
+ }
205
+ model = WorkOS::ErrorBodyWithCodeStatusCode.new(fixture.to_json)
206
+ json = model.to_h
207
+ assert_kind_of Hash, json
208
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
209
+ end
210
+
211
+ def test_error_body_with_message_or_message_list_round_trip
212
+ fixture = {
213
+ "message" => "stub"
214
+ }
215
+ model = WorkOS::ErrorBodyWithMessageOrMessageList.new(fixture.to_json)
216
+ json = model.to_h
217
+ assert_kind_of Hash, json
218
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
219
+ end
220
+
221
+ def test_authorization_url_request_error_body_round_trip
222
+ fixture = {
223
+ "code" => "stub",
224
+ "message" => "stub"
225
+ }
226
+ model = WorkOS::AuthorizationUrlRequestErrorBody.new(fixture.to_json)
227
+ json = model.to_h
228
+ assert_kind_of Hash, json
229
+ assert_equal fixture["message"], json[:message]
230
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
231
+ end
232
+
233
+ def test_authorization_url_not_found_error_body_round_trip
234
+ fixture = {
235
+ "code" => "stub",
236
+ "message" => "stub"
237
+ }
238
+ model = WorkOS::AuthorizationUrlNotFoundErrorBody.new(fixture.to_json)
239
+ json = model.to_h
240
+ assert_kind_of Hash, json
241
+ assert_equal fixture["message"], json[:message]
242
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
243
+ end
244
+
245
+ def test_auth_method_mismatch_error_body_round_trip
246
+ fixture = {
247
+ "code" => "auth_method_mismatch",
248
+ "message" => "stub"
249
+ }
250
+ model = WorkOS::AuthMethodMismatchErrorBody.new(fixture.to_json)
251
+ json = model.to_h
252
+ assert_kind_of Hash, json
253
+ assert_equal fixture["message"], json[:message]
254
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
255
+ end
256
+
257
+ def test_account_selection_required_error_body_round_trip
258
+ fixture = {
259
+ "code" => "account_selection_required",
260
+ "message" => "stub"
261
+ }
262
+ model = WorkOS::AccountSelectionRequiredErrorBody.new(fixture.to_json)
263
+ json = model.to_h
264
+ assert_kind_of Hash, json
265
+ assert_equal fixture["message"], json[:message]
266
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
267
+ end
268
+
269
+ def test_error_body_with_code_errors_round_trip
270
+ fixture = {
271
+ "code" => "stub",
272
+ "message" => "stub",
273
+ "errors" => []
274
+ }
275
+ model = WorkOS::ErrorBodyWithCodeErrors.new(fixture.to_json)
276
+ json = model.to_h
277
+ assert_kind_of Hash, json
278
+ assert_equal fixture["message"], json[:message]
279
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
280
+ end
281
+
282
+ def test_oauth_error_body_round_trip
283
+ fixture = {
284
+ "error" => "stub",
285
+ "error_description" => "stub"
286
+ }
287
+ model = WorkOS::OAuthErrorBody.new(fixture.to_json)
288
+ json = model.to_h
289
+ assert_kind_of Hash, json
290
+ assert_equal fixture["error"], json[:error]
291
+ assert_equal fixture["error_description"], json[:error_description]
292
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
293
+ end
294
+
295
+ def test_policy_denied_error_body_round_trip
296
+ fixture = {
297
+ "code" => "policy_denied",
298
+ "message" => "stub",
299
+ "radar_detection_id" => "stub"
300
+ }
301
+ model = WorkOS::PolicyDeniedErrorBody.new(fixture.to_json)
302
+ json = model.to_h
303
+ assert_kind_of Hash, json
304
+ assert_equal fixture["message"], json[:message]
305
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
306
+ end
307
+
308
+ def test_sub_resource_scoped_role_not_allowed_error_body_with_role_slug_round_trip
309
+ fixture = {
310
+ "message" => "stub",
311
+ "code" => "sub_resource_scoped_role_not_allowed",
312
+ "role_slug" => "stub"
313
+ }
314
+ model = WorkOS::SubResourceScopedRoleNotAllowedErrorBodyWithRoleSlug.new(fixture.to_json)
315
+ json = model.to_h
316
+ assert_kind_of Hash, json
317
+ assert_equal fixture["message"], json[:message]
318
+ assert_equal fixture["role_slug"], json[:role_slug]
319
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
320
+ end
321
+
322
+ def test_unauthorized_error_body_round_trip
323
+ fixture = {
324
+ "error" => "Unauthorized"
325
+ }
326
+ model = WorkOS::UnauthorizedErrorBody.new(fixture.to_json)
327
+ json = model.to_h
328
+ assert_kind_of Hash, json
329
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
330
+ end
331
+
332
+ def test_external_auth_session_already_completed_error_body_round_trip
333
+ fixture = {
334
+ "code" => "external_auth_session_already_completed",
335
+ "message" => "stub"
336
+ }
337
+ model = WorkOS::ExternalAuthSessionAlreadyCompletedErrorBody.new(fixture.to_json)
338
+ json = model.to_h
339
+ assert_kind_of Hash, json
340
+ assert_equal fixture["message"], json[:message]
341
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
342
+ end
343
+
344
+ def test_invalid_email_error_body_round_trip
345
+ fixture = {
346
+ "code" => "invalid_email",
347
+ "message" => "stub"
348
+ }
349
+ model = WorkOS::InvalidEmailErrorBody.new(fixture.to_json)
350
+ json = model.to_h
351
+ assert_kind_of Hash, json
352
+ assert_equal fixture["message"], json[:message]
353
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
354
+ end
355
+
356
+ def test_already_claimed_error_body_round_trip
357
+ fixture = {
358
+ "code" => "already_claimed",
359
+ "message" => "stub"
360
+ }
361
+ model = WorkOS::AlreadyClaimedErrorBody.new(fixture.to_json)
362
+ json = model.to_h
363
+ assert_kind_of Hash, json
364
+ assert_equal fixture["message"], json[:message]
365
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
366
+ end
367
+
368
+ def test_sms_challenge_rate_limited_error_body_round_trip
369
+ fixture = {
370
+ "code" => "sms_challenge_rate_limited",
371
+ "message" => "stub"
372
+ }
373
+ model = WorkOS::SmsChallengeRateLimitedErrorBody.new(fixture.to_json)
374
+ json = model.to_h
375
+ assert_kind_of Hash, json
376
+ assert_equal fixture["message"], json[:message]
377
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
378
+ end
379
+
380
+ def test_sms_challenge_quota_reached_error_body_round_trip
381
+ fixture = {
382
+ "code" => "sms_challenge_quota_reached",
383
+ "message" => "stub"
384
+ }
385
+ model = WorkOS::SmsChallengeQuotaReachedErrorBody.new(fixture.to_json)
386
+ json = model.to_h
387
+ assert_kind_of Hash, json
388
+ assert_equal fixture["message"], json[:message]
389
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
390
+ end
391
+
392
+ def test_idp_metadata_fetch_failed_error_body_round_trip
393
+ fixture = {
394
+ "code" => "idp_metadata_fetch_failed",
395
+ "message" => "stub"
396
+ }
397
+ model = WorkOS::IdpMetadataFetchFailedErrorBody.new(fixture.to_json)
398
+ json = model.to_h
399
+ assert_kind_of Hash, json
400
+ assert_equal fixture["message"], json[:message]
401
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
402
+ end
403
+
404
+ def test_invalid_idp_sso_url_error_body_round_trip
405
+ fixture = {
406
+ "code" => "invalid_idp_sso_url",
407
+ "message" => "stub"
408
+ }
409
+ model = WorkOS::InvalidIdpSSOUrlErrorBody.new(fixture.to_json)
410
+ json = model.to_h
411
+ assert_kind_of Hash, json
412
+ assert_equal fixture["message"], json[:message]
413
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
414
+ end
415
+
416
+ def test_connected_account_limit_reached_error_body_round_trip
417
+ fixture = {
418
+ "code" => "connected_account_limit_reached",
419
+ "message" => "stub"
420
+ }
421
+ model = WorkOS::ConnectedAccountLimitReachedErrorBody.new(fixture.to_json)
422
+ json = model.to_h
423
+ assert_kind_of Hash, json
424
+ assert_equal fixture["message"], json[:message]
425
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
426
+ end
427
+
428
+ def test_entity_not_found_error_body_round_trip
429
+ fixture = {
430
+ "code" => "entity_not_found",
431
+ "message" => "stub"
432
+ }
433
+ model = WorkOS::EntityNotFoundErrorBody.new(fixture.to_json)
434
+ json = model.to_h
435
+ assert_kind_of Hash, json
436
+ assert_equal fixture["message"], json[:message]
437
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
438
+ end
439
+
440
+ def test_invalid_request_parameters_error_body_with_errors_round_trip
441
+ fixture = {
442
+ "code" => "invalid_request_parameters",
443
+ "message" => "stub",
444
+ "errors" => []
445
+ }
446
+ model = WorkOS::InvalidRequestParametersErrorBodyWithErrors.new(fixture.to_json)
447
+ json = model.to_h
448
+ assert_kind_of Hash, json
449
+ assert_equal fixture["message"], json[:message]
450
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
451
+ end
452
+
453
+ def test_invalid_refresh_token_error_body_round_trip
454
+ fixture = {
455
+ "code" => "invalid_refresh_token",
456
+ "message" => "stub"
457
+ }
458
+ model = WorkOS::InvalidRefreshTokenErrorBody.new(fixture.to_json)
459
+ json = model.to_h
460
+ assert_kind_of Hash, json
461
+ assert_equal fixture["message"], json[:message]
462
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
463
+ end
464
+
465
+ def test_sign_up_not_allowed_oauth_error_body_round_trip
466
+ fixture = {
467
+ "error" => "sign_up_not_allowed",
468
+ "error_description" => "stub"
469
+ }
470
+ model = WorkOS::SignUpNotAllowedOAuthErrorBody.new(fixture.to_json)
471
+ json = model.to_h
472
+ assert_kind_of Hash, json
473
+ assert_equal fixture["error_description"], json[:error_description]
474
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
475
+ end
476
+
477
+ def test_invalid_request_parameters_error_body_round_trip
478
+ fixture = {
479
+ "code" => "invalid_request_parameters",
480
+ "message" => "stub"
481
+ }
482
+ model = WorkOS::InvalidRequestParametersErrorBody.new(fixture.to_json)
483
+ json = model.to_h
484
+ assert_kind_of Hash, json
485
+ assert_equal fixture["message"], json[:message]
486
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
487
+ end
488
+
489
+ def test_invalid_role_error_body_round_trip
490
+ fixture = {
491
+ "code" => "invalid_role",
492
+ "message" => "stub"
493
+ }
494
+ model = WorkOS::InvalidRoleErrorBody.new(fixture.to_json)
495
+ json = model.to_h
496
+ assert_kind_of Hash, json
497
+ assert_equal fixture["message"], json[:message]
498
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
499
+ end
500
+
501
+ def test_multiple_roles_not_enabled_error_body_round_trip
502
+ fixture = {
503
+ "code" => "multiple_roles_not_enabled",
504
+ "message" => "stub"
505
+ }
506
+ model = WorkOS::MultipleRolesNotEnabledErrorBody.new(fixture.to_json)
507
+ json = model.to_h
508
+ assert_kind_of Hash, json
509
+ assert_equal fixture["message"], json[:message]
510
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
511
+ end
512
+
513
+ def test_invalid_password_hash_error_body_round_trip
514
+ fixture = {
515
+ "code" => "invalid_password_hash",
516
+ "message" => "stub"
517
+ }
518
+ model = WorkOS::InvalidPasswordHashErrorBody.new(fixture.to_json)
519
+ json = model.to_h
520
+ assert_kind_of Hash, json
521
+ assert_equal fixture["message"], json[:message]
522
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
523
+ end
524
+
525
+ def test_invalid_metadata_error_body_round_trip
526
+ fixture = {
527
+ "code" => "invalid_metadata",
528
+ "message" => "stub"
529
+ }
530
+ model = WorkOS::InvalidMetadataErrorBody.new(fixture.to_json)
531
+ json = model.to_h
532
+ assert_kind_of Hash, json
533
+ assert_equal fixture["message"], json[:message]
534
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
535
+ end
536
+
537
+ def test_external_id_already_used_error_body_round_trip
538
+ fixture = {
539
+ "code" => "external_id_already_used",
540
+ "message" => "stub"
541
+ }
542
+ model = WorkOS::ExternalIdAlreadyUsedErrorBody.new(fixture.to_json)
543
+ json = model.to_h
544
+ assert_kind_of Hash, json
545
+ assert_equal fixture["message"], json[:message]
546
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
547
+ end
548
+
549
+ def test_invalid_locale_error_body_round_trip
550
+ fixture = {
551
+ "code" => "invalid_locale",
552
+ "message" => "stub"
553
+ }
554
+ model = WorkOS::InvalidLocaleErrorBody.new(fixture.to_json)
555
+ json = model.to_h
556
+ assert_kind_of Hash, json
557
+ assert_equal fixture["message"], json[:message]
558
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
559
+ end
560
+
561
+ def test_invalid_organization_id_error_body_round_trip
562
+ fixture = {
563
+ "code" => "invalid_organization_id",
564
+ "message" => "stub"
565
+ }
566
+ model = WorkOS::InvalidOrganizationIdErrorBody.new(fixture.to_json)
567
+ json = model.to_h
568
+ assert_kind_of Hash, json
569
+ assert_equal fixture["message"], json[:message]
570
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
571
+ end
572
+
573
+ def test_code_challenge_not_found_error_body_round_trip
574
+ fixture = {
575
+ "code" => "code_challenge_not_found",
576
+ "message" => "stub"
577
+ }
578
+ model = WorkOS::CodeChallengeNotFoundErrorBody.new(fixture.to_json)
579
+ json = model.to_h
580
+ assert_kind_of Hash, json
581
+ assert_equal fixture["message"], json[:message]
582
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
583
+ end
584
+
585
+ def test_invalid_credentials_error_body_round_trip
586
+ fixture = {
587
+ "code" => "invalid_credentials",
588
+ "message" => "stub"
589
+ }
590
+ model = WorkOS::InvalidCredentialsErrorBody.new(fixture.to_json)
591
+ json = model.to_h
592
+ assert_kind_of Hash, json
593
+ assert_equal fixture["message"], json[:message]
594
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
595
+ end
596
+
597
+ def test_invalid_one_time_code_error_body_round_trip
598
+ fixture = {
599
+ "code" => "invalid_one_time_code",
600
+ "message" => "stub"
601
+ }
602
+ model = WorkOS::InvalidOneTimeCodeErrorBody.new(fixture.to_json)
603
+ json = model.to_h
604
+ assert_kind_of Hash, json
605
+ assert_equal fixture["message"], json[:message]
606
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
607
+ end
608
+
609
+ def test_one_time_code_previously_used_error_body_round_trip
610
+ fixture = {
611
+ "code" => "one_time_code_previously_used",
612
+ "message" => "stub"
613
+ }
614
+ model = WorkOS::OneTimeCodePreviouslyUsedErrorBody.new(fixture.to_json)
615
+ json = model.to_h
616
+ assert_kind_of Hash, json
617
+ assert_equal fixture["message"], json[:message]
618
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
619
+ end
620
+
621
+ def test_one_time_code_expired_error_body_round_trip
622
+ fixture = {
623
+ "code" => "one_time_code_expired",
624
+ "message" => "stub"
625
+ }
626
+ model = WorkOS::OneTimeCodeExpiredErrorBody.new(fixture.to_json)
627
+ json = model.to_h
628
+ assert_kind_of Hash, json
629
+ assert_equal fixture["message"], json[:message]
630
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
631
+ end
632
+
633
+ def test_one_time_code_too_many_attempts_error_body_round_trip
634
+ fixture = {
635
+ "code" => "one_time_code_too_many_attempts",
636
+ "message" => "stub"
637
+ }
638
+ model = WorkOS::OneTimeCodeTooManyAttemptsErrorBody.new(fixture.to_json)
639
+ json = model.to_h
640
+ assert_kind_of Hash, json
641
+ assert_equal fixture["message"], json[:message]
642
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
643
+ end
644
+
645
+ def test_invalid_pending_authentication_token_error_body_round_trip
646
+ fixture = {
647
+ "code" => "invalid_pending_authentication_token",
648
+ "message" => "stub"
649
+ }
650
+ model = WorkOS::InvalidPendingAuthenticationTokenErrorBody.new(fixture.to_json)
651
+ json = model.to_h
652
+ assert_kind_of Hash, json
653
+ assert_equal fixture["message"], json[:message]
654
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
655
+ end
656
+
657
+ def test_phone_number_required_error_body_round_trip
658
+ fixture = {
659
+ "code" => "phone_number_required",
660
+ "message" => "stub"
661
+ }
662
+ model = WorkOS::PhoneNumberRequiredErrorBody.new(fixture.to_json)
663
+ json = model.to_h
664
+ assert_kind_of Hash, json
665
+ assert_equal fixture["message"], json[:message]
666
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
667
+ end
668
+
669
+ def test_verification_id_required_error_body_round_trip
670
+ fixture = {
671
+ "code" => "verification_id_required",
672
+ "message" => "stub"
673
+ }
674
+ model = WorkOS::VerificationIdRequiredErrorBody.new(fixture.to_json)
675
+ json = model.to_h
676
+ assert_kind_of Hash, json
677
+ assert_equal fixture["message"], json[:message]
678
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
679
+ end
680
+
681
+ def test_invalid_client_oauth_error_body_round_trip
682
+ fixture = {
683
+ "error" => "invalid_client",
684
+ "error_description" => "stub"
685
+ }
686
+ model = WorkOS::InvalidClientOAuthErrorBody.new(fixture.to_json)
687
+ json = model.to_h
688
+ assert_kind_of Hash, json
689
+ assert_equal fixture["error_description"], json[:error_description]
690
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
691
+ end
692
+
693
+ def test_unauthorized_client_oauth_error_body_round_trip
694
+ fixture = {
695
+ "error" => "unauthorized_client",
696
+ "error_description" => "stub"
697
+ }
698
+ model = WorkOS::UnauthorizedClientOAuthErrorBody.new(fixture.to_json)
699
+ json = model.to_h
700
+ assert_kind_of Hash, json
701
+ assert_equal fixture["error_description"], json[:error_description]
702
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
703
+ end
704
+
705
+ def test_invalid_profile_oauth_error_body_round_trip
706
+ fixture = {
707
+ "error" => "invalid_profile",
708
+ "error_description" => "stub"
709
+ }
710
+ model = WorkOS::InvalidProfileOAuthErrorBody.new(fixture.to_json)
711
+ json = model.to_h
712
+ assert_kind_of Hash, json
713
+ assert_equal fixture["error_description"], json[:error_description]
714
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
715
+ end
716
+
717
+ def test_invalid_connection_oauth_error_body_round_trip
718
+ fixture = {
719
+ "error" => "invalid_connection",
720
+ "error_description" => "stub"
721
+ }
722
+ model = WorkOS::InvalidConnectionOAuthErrorBody.new(fixture.to_json)
723
+ json = model.to_h
724
+ assert_kind_of Hash, json
725
+ assert_equal fixture["error_description"], json[:error_description]
726
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
727
+ end
728
+
729
+ def test_invalid_link_authorization_code_oauth_error_body_round_trip
730
+ fixture = {
731
+ "error" => "invalid_link_authorization_code",
732
+ "error_description" => "stub"
733
+ }
734
+ model = WorkOS::InvalidLinkAuthorizationCodeOAuthErrorBody.new(fixture.to_json)
735
+ json = model.to_h
736
+ assert_kind_of Hash, json
737
+ assert_equal fixture["error_description"], json[:error_description]
738
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
739
+ end
740
+
741
+ def test_extra_attributes_required_oauth_error_body_round_trip
742
+ fixture = {
743
+ "error" => "extra_attributes_required",
744
+ "error_description" => "stub"
745
+ }
746
+ model = WorkOS::ExtraAttributesRequiredOAuthErrorBody.new(fixture.to_json)
747
+ json = model.to_h
748
+ assert_kind_of Hash, json
749
+ assert_equal fixture["error_description"], json[:error_description]
750
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
751
+ end
752
+
753
+ def test_pkce_not_supported_oauth_error_body_round_trip
754
+ fixture = {
755
+ "error" => "pkce_not_supported",
756
+ "error_description" => "stub"
757
+ }
758
+ model = WorkOS::PkceNotSupportedOAuthErrorBody.new(fixture.to_json)
759
+ json = model.to_h
760
+ assert_kind_of Hash, json
761
+ assert_equal fixture["error_description"], json[:error_description]
762
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
763
+ end
764
+
765
+ def test_expired_token_oauth_error_body_round_trip
766
+ fixture = {
767
+ "error" => "expired_token",
768
+ "error_description" => "stub"
769
+ }
770
+ model = WorkOS::ExpiredTokenOAuthErrorBody.new(fixture.to_json)
771
+ json = model.to_h
772
+ assert_kind_of Hash, json
773
+ assert_equal fixture["error_description"], json[:error_description]
774
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
775
+ end
776
+
777
+ def test_authorization_pending_oauth_error_body_round_trip
778
+ fixture = {
779
+ "error" => "authorization_pending",
780
+ "error_description" => "stub"
781
+ }
782
+ model = WorkOS::AuthorizationPendingOAuthErrorBody.new(fixture.to_json)
783
+ json = model.to_h
784
+ assert_kind_of Hash, json
785
+ assert_equal fixture["error_description"], json[:error_description]
786
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
787
+ end
788
+
789
+ def test_access_denied_oauth_error_body_round_trip
790
+ fixture = {
791
+ "error" => "access_denied",
792
+ "error_description" => "stub"
793
+ }
794
+ model = WorkOS::AccessDeniedOAuthErrorBody.new(fixture.to_json)
795
+ json = model.to_h
796
+ assert_kind_of Hash, json
797
+ assert_equal fixture["error_description"], json[:error_description]
798
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
799
+ end
800
+
801
+ def test_slow_down_oauth_error_body_round_trip
802
+ fixture = {
803
+ "error" => "slow_down",
804
+ "error_description" => "stub"
805
+ }
806
+ model = WorkOS::SlowDownOAuthErrorBody.new(fixture.to_json)
807
+ json = model.to_h
808
+ assert_kind_of Hash, json
809
+ assert_equal fixture["error_description"], json[:error_description]
810
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
811
+ end
812
+
813
+ def test_must_use_sso_for_selected_organization_message_error_body_round_trip
814
+ fixture = {
815
+ "message" => "Must use SSO for selected organization"
816
+ }
817
+ model = WorkOS::MustUseSSOForSelectedOrganizationMessageErrorBody.new(fixture.to_json)
818
+ json = model.to_h
819
+ assert_kind_of Hash, json
820
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
821
+ end
822
+
823
+ def test_invalid_grant_oauth_error_body_round_trip
824
+ fixture = {
825
+ "error" => "invalid_grant",
826
+ "error_description" => "stub"
827
+ }
828
+ model = WorkOS::InvalidGrantOAuthErrorBody.new(fixture.to_json)
829
+ json = model.to_h
830
+ assert_kind_of Hash, json
831
+ assert_equal fixture["error_description"], json[:error_description]
832
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
833
+ end
834
+
835
+ def test_invalid_request_oauth_error_body_round_trip
836
+ fixture = {
837
+ "error" => "invalid_request",
838
+ "error_description" => "stub"
839
+ }
840
+ model = WorkOS::InvalidRequestOAuthErrorBody.new(fixture.to_json)
841
+ json = model.to_h
842
+ assert_kind_of Hash, json
843
+ assert_equal fixture["error_description"], json[:error_description]
844
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
845
+ end
846
+
847
+ def test_mfa_enrollment_oauth_error_body_round_trip
848
+ fixture = {
849
+ "error" => "mfa_enrollment",
850
+ "error_description" => "stub"
851
+ }
852
+ model = WorkOS::MFAEnrollmentOAuthErrorBody.new(fixture.to_json)
853
+ json = model.to_h
854
+ assert_kind_of Hash, json
855
+ assert_equal fixture["error_description"], json[:error_description]
856
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
857
+ end
858
+
859
+ def test_token_too_big_oauth_error_body_round_trip
860
+ fixture = {
861
+ "error" => "token_too_big",
862
+ "error_description" => "stub"
863
+ }
864
+ model = WorkOS::TokenTooBigOAuthErrorBody.new(fixture.to_json)
865
+ json = model.to_h
866
+ assert_kind_of Hash, json
867
+ assert_equal fixture["error_description"], json[:error_description]
868
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
869
+ end
870
+
871
+ def test_mfa_enrollment_error_body_round_trip
872
+ fixture = {
873
+ "code" => "mfa_enrollment",
874
+ "message" => "stub"
875
+ }
876
+ model = WorkOS::MFAEnrollmentErrorBody.new(fixture.to_json)
877
+ json = model.to_h
878
+ assert_kind_of Hash, json
879
+ assert_equal fixture["message"], json[:message]
880
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
881
+ end
882
+
883
+ def test_mfa_challenge_error_body_round_trip
884
+ fixture = {
885
+ "code" => "mfa_challenge",
886
+ "message" => "stub"
887
+ }
888
+ model = WorkOS::MFAChallengeErrorBody.new(fixture.to_json)
889
+ json = model.to_h
890
+ assert_kind_of Hash, json
891
+ assert_equal fixture["message"], json[:message]
892
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
893
+ end
894
+
895
+ def test_passkey_progressive_enrollment_error_body_round_trip
896
+ fixture = {
897
+ "code" => "passkey_progressive_enrollment",
898
+ "message" => "stub"
899
+ }
900
+ model = WorkOS::PasskeyProgressiveEnrollmentErrorBody.new(fixture.to_json)
901
+ json = model.to_h
902
+ assert_kind_of Hash, json
903
+ assert_equal fixture["message"], json[:message]
904
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
905
+ end
906
+
907
+ def test_radar_challenge_error_body_round_trip
908
+ fixture = {
909
+ "code" => "radar_challenge",
910
+ "message" => "stub"
911
+ }
912
+ model = WorkOS::RadarChallengeErrorBody.new(fixture.to_json)
913
+ json = model.to_h
914
+ assert_kind_of Hash, json
915
+ assert_equal fixture["message"], json[:message]
916
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
917
+ end
918
+
919
+ def test_radar_sign_up_challenge_error_body_round_trip
920
+ fixture = {
921
+ "code" => "radar_sign_up_challenge",
922
+ "message" => "stub"
923
+ }
924
+ model = WorkOS::RadarSignUpChallengeErrorBody.new(fixture.to_json)
925
+ json = model.to_h
926
+ assert_kind_of Hash, json
927
+ assert_equal fixture["message"], json[:message]
928
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
929
+ end
930
+
931
+ def test_radar_sms_sign_in_challenge_error_body_round_trip
932
+ fixture = {
933
+ "code" => "radar_sms_sign_in_challenge",
934
+ "message" => "stub"
935
+ }
936
+ model = WorkOS::RadarSmsSignInChallengeErrorBody.new(fixture.to_json)
937
+ json = model.to_h
938
+ assert_kind_of Hash, json
939
+ assert_equal fixture["message"], json[:message]
940
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
941
+ end
942
+
943
+ def test_application_consent_required_error_body_round_trip
944
+ fixture = {
945
+ "code" => "application_consent_required",
946
+ "message" => "stub"
947
+ }
948
+ model = WorkOS::ApplicationConsentRequiredErrorBody.new(fixture.to_json)
949
+ json = model.to_h
950
+ assert_kind_of Hash, json
951
+ assert_equal fixture["message"], json[:message]
952
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
953
+ end
954
+
955
+ def test_daily_quota_exceeded_error_body_round_trip
956
+ fixture = {
957
+ "code" => "daily_quota_exceeded",
958
+ "message" => "stub"
959
+ }
960
+ model = WorkOS::DailyQuotaExceededErrorBody.new(fixture.to_json)
961
+ json = model.to_h
962
+ assert_kind_of Hash, json
963
+ assert_equal fixture["message"], json[:message]
964
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
965
+ end
966
+
967
+ def test_too_many_requests_oauth_error_body_round_trip
968
+ fixture = {
969
+ "error" => "too_many_requests",
970
+ "error_description" => "stub"
971
+ }
972
+ model = WorkOS::TooManyRequestsOAuthErrorBody.new(fixture.to_json)
973
+ json = model.to_h
974
+ assert_kind_of Hash, json
975
+ assert_equal fixture["error_description"], json[:error_description]
976
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
977
+ end
978
+
979
+ def test_invalid_url_error_body_round_trip
980
+ fixture = {
981
+ "code" => "invalid_url",
982
+ "message" => "stub"
983
+ }
984
+ model = WorkOS::InvalidUrlErrorBody.new(fixture.to_json)
985
+ json = model.to_h
986
+ assert_kind_of Hash, json
987
+ assert_equal fixture["message"], json[:message]
988
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
989
+ end
990
+
991
+ def test_error_response_round_trip
992
+ fixture = {
993
+ "error" => "stub"
994
+ }
995
+ model = WorkOS::ErrorResponse.new(fixture.to_json)
996
+ json = model.to_h
997
+ assert_kind_of Hash, json
998
+ assert_equal fixture["error"], json[:error]
999
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1000
+ end
1001
+
1002
+ def test_connect_application_oauth_round_trip
1003
+ fixture = {
1004
+ "object" => "connect_application",
1005
+ "id" => "stub",
1006
+ "client_id" => "stub",
1007
+ "description" => nil,
1008
+ "name" => "stub",
1009
+ "scopes" => [],
1010
+ "created_at" => "stub",
1011
+ "updated_at" => "stub",
1012
+ "application_type" => "oauth",
1013
+ "redirect_uris" => [],
1014
+ "cors_origins" => [],
1015
+ "uses_pkce" => true,
1016
+ "is_first_party" => true,
1017
+ "was_dynamically_registered" => true,
1018
+ "organization_id" => "stub"
1019
+ }
1020
+ model = WorkOS::ConnectApplicationOAuth.new(fixture.to_json)
1021
+ json = model.to_h
1022
+ assert_kind_of Hash, json
1023
+ assert_equal fixture["id"], json[:id]
1024
+ assert_equal fixture["client_id"], json[:client_id]
1025
+ assert_nil json[:description]
1026
+ assert_equal fixture["name"], json[:name]
1027
+ assert_equal fixture["created_at"], json[:created_at]
1028
+ assert_equal fixture["updated_at"], json[:updated_at]
1029
+ assert_equal fixture["uses_pkce"], json[:uses_pkce]
1030
+ assert_equal fixture["is_first_party"], json[:is_first_party]
1031
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1032
+ end
1033
+
1034
+ def test_connect_application_oauth_redirect_uris_round_trip
1035
+ fixture = {
1036
+ "uri" => "stub",
1037
+ "default" => true
1038
+ }
1039
+ model = WorkOS::ConnectApplicationOAuthRedirectUris.new(fixture.to_json)
1040
+ json = model.to_h
1041
+ assert_kind_of Hash, json
1042
+ assert_equal fixture["uri"], json[:uri]
1043
+ assert_equal fixture["default"], json[:default]
1044
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1045
+ end
1046
+
1047
+ def test_connect_application_m2m_round_trip
1048
+ fixture = {
1049
+ "object" => "connect_application",
1050
+ "id" => "stub",
1051
+ "client_id" => "stub",
1052
+ "description" => nil,
1053
+ "name" => "stub",
1054
+ "scopes" => [],
1055
+ "created_at" => "stub",
1056
+ "updated_at" => "stub",
1057
+ "application_type" => "m2m",
1058
+ "organization_id" => "stub"
1059
+ }
1060
+ model = WorkOS::ConnectApplicationM2M.new(fixture.to_json)
1061
+ json = model.to_h
1062
+ assert_kind_of Hash, json
1063
+ assert_equal fixture["id"], json[:id]
1064
+ assert_equal fixture["client_id"], json[:client_id]
1065
+ assert_nil json[:description]
1066
+ assert_equal fixture["name"], json[:name]
1067
+ assert_equal fixture["created_at"], json[:created_at]
1068
+ assert_equal fixture["updated_at"], json[:updated_at]
1069
+ assert_equal fixture["organization_id"], json[:organization_id]
1070
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1071
+ end
1072
+
1073
+ def test_event_context_actor_round_trip
1074
+ fixture = {
1075
+ "id" => "stub",
1076
+ "source" => "stub",
1077
+ "name" => nil
1078
+ }
1079
+ model = WorkOS::EventContextActor.new(fixture.to_json)
1080
+ json = model.to_h
1081
+ assert_kind_of Hash, json
1082
+ assert_equal fixture["id"], json[:id]
1083
+ assert_nil json[:name]
1084
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1085
+ end
1086
+
1087
+ def test_event_context_round_trip
1088
+ fixture = {
1089
+ "google_analytics_client_id" => "stub",
1090
+ "google_analytics_sessions" => [],
1091
+ "ajs_anonymous_id" => "stub",
1092
+ "client_id" => "stub",
1093
+ "actor" => {},
1094
+ "previous_attributes" => {}
1095
+ }
1096
+ model = WorkOS::EventContext.new(fixture.to_json)
1097
+ json = model.to_h
1098
+ assert_kind_of Hash, json
1099
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1100
+ end
1101
+
1102
+ def test_pipe_connected_account_round_trip
1103
+ fixture = {
1104
+ "object" => "connected_account",
1105
+ "id" => "stub",
1106
+ "connection_role" => "stub",
1107
+ "account_identifier" => nil,
1108
+ "account_display_name" => nil,
1109
+ "data_integration_id" => "stub",
1110
+ "provider_slug" => "stub",
1111
+ "user_id" => nil,
1112
+ "organization_id" => nil,
1113
+ "scopes" => [],
1114
+ "auth_method" => "stub",
1115
+ "api_key_last_4" => nil,
1116
+ "state" => "stub",
1117
+ "established_by_user_id" => nil,
1118
+ "state_reason" => nil,
1119
+ "created_at" => "stub",
1120
+ "updated_at" => "stub"
1121
+ }
1122
+ model = WorkOS::PipeConnectedAccount.new(fixture.to_json)
1123
+ json = model.to_h
1124
+ assert_kind_of Hash, json
1125
+ assert_equal fixture["id"], json[:id]
1126
+ assert_equal fixture["data_integration_id"], json[:data_integration_id]
1127
+ assert_equal fixture["provider_slug"], json[:provider_slug]
1128
+ assert_nil json[:user_id]
1129
+ assert_nil json[:organization_id]
1130
+ assert_equal fixture["created_at"], json[:created_at]
1131
+ assert_equal fixture["updated_at"], json[:updated_at]
1132
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1133
+ end
1134
+
1135
+ def test_waitlist_user_round_trip
1136
+ fixture = {
1137
+ "id" => "stub",
1138
+ "email" => "stub",
1139
+ "state" => "stub",
1140
+ "approved_at" => nil,
1141
+ "additional_fields" => {},
1142
+ "waitlist_id" => nil,
1143
+ "created_at" => "stub",
1144
+ "updated_at" => "stub",
1145
+ "object" => "waitlist_user"
1146
+ }
1147
+ model = WorkOS::WaitlistUser.new(fixture.to_json)
1148
+ json = model.to_h
1149
+ assert_kind_of Hash, json
1150
+ assert_equal fixture["id"], json[:id]
1151
+ assert_equal fixture["email"], json[:email]
1152
+ assert_nil json[:approved_at]
1153
+ assert_equal fixture["created_at"], json[:created_at]
1154
+ assert_equal fixture["updated_at"], json[:updated_at]
1155
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1156
+ end
1157
+
1158
+ def test_agent_blueprint_created_round_trip
1159
+ fixture = {
1160
+ "object" => "event",
1161
+ "id" => "stub",
1162
+ "event" => "agent.blueprint.created",
1163
+ "data" => {},
1164
+ "created_at" => "stub",
1165
+ "context" => {}
1166
+ }
1167
+ model = WorkOS::AgentBlueprintCreated.new(fixture.to_json)
1168
+ json = model.to_h
1169
+ assert_kind_of Hash, json
1170
+ assert_equal fixture["id"], json[:id]
1171
+ assert_equal fixture["created_at"], json[:created_at]
1172
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1173
+ end
1174
+
1175
+ def test_agent_blueprint_created_data_round_trip
1176
+ fixture = {
1177
+ "object" => "agent_blueprint",
1178
+ "id" => "stub",
1179
+ "name" => "stub",
1180
+ "description" => nil,
1181
+ "permissions" => [],
1182
+ "invocable_by" => {},
1183
+ "invocable_as" => {},
1184
+ "session_settings" => {},
1185
+ "created_at" => "stub",
1186
+ "updated_at" => "stub"
1187
+ }
1188
+ model = WorkOS::AgentBlueprintCreatedData.new(fixture.to_json)
1189
+ json = model.to_h
1190
+ assert_kind_of Hash, json
1191
+ assert_equal fixture["id"], json[:id]
1192
+ assert_equal fixture["name"], json[:name]
1193
+ assert_nil json[:description]
1194
+ assert_equal fixture["created_at"], json[:created_at]
1195
+ assert_equal fixture["updated_at"], json[:updated_at]
1196
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1197
+ end
1198
+
1199
+ def test_agent_blueprint_created_data_invocable_by_round_trip
1200
+ fixture = {
1201
+ "role_slugs" => [],
1202
+ "organization_ids" => []
1203
+ }
1204
+ model = WorkOS::AgentBlueprintCreatedDataInvocableBy.new(fixture.to_json)
1205
+ json = model.to_h
1206
+ assert_kind_of Hash, json
1207
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1208
+ end
1209
+
1210
+ def test_agent_blueprint_created_data_invocable_as_round_trip
1211
+ fixture = {
1212
+ "instance_types" => []
1213
+ }
1214
+ model = WorkOS::AgentBlueprintCreatedDataInvocableAs.new(fixture.to_json)
1215
+ json = model.to_h
1216
+ assert_kind_of Hash, json
1217
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1218
+ end
1219
+
1220
+ def test_agent_blueprint_created_data_session_setting_round_trip
1221
+ fixture = {
1222
+ "max_age_seconds" => 1.0,
1223
+ "access_token_ttl_seconds" => 1.0,
1224
+ "refresh_token_ttl_seconds" => 1.0
1225
+ }
1226
+ model = WorkOS::AgentBlueprintCreatedDataSessionSetting.new(fixture.to_json)
1227
+ json = model.to_h
1228
+ assert_kind_of Hash, json
1229
+ assert_equal fixture["max_age_seconds"], json[:max_age_seconds]
1230
+ assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds]
1231
+ assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds]
1232
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1233
+ end
1234
+
1235
+ def test_agent_blueprint_deleted_round_trip
1236
+ fixture = {
1237
+ "object" => "event",
1238
+ "id" => "stub",
1239
+ "event" => "agent.blueprint.deleted",
1240
+ "data" => {},
1241
+ "created_at" => "stub",
1242
+ "context" => {}
1243
+ }
1244
+ model = WorkOS::AgentBlueprintDeleted.new(fixture.to_json)
1245
+ json = model.to_h
1246
+ assert_kind_of Hash, json
1247
+ assert_equal fixture["id"], json[:id]
1248
+ assert_equal fixture["created_at"], json[:created_at]
1249
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1250
+ end
1251
+
1252
+ def test_agent_blueprint_deleted_data_round_trip
1253
+ fixture = {
1254
+ "object" => "agent_blueprint",
1255
+ "id" => "stub",
1256
+ "name" => "stub",
1257
+ "created_at" => "stub",
1258
+ "updated_at" => "stub"
1259
+ }
1260
+ model = WorkOS::AgentBlueprintDeletedData.new(fixture.to_json)
1261
+ json = model.to_h
1262
+ assert_kind_of Hash, json
1263
+ assert_equal fixture["id"], json[:id]
1264
+ assert_equal fixture["name"], json[:name]
1265
+ assert_equal fixture["created_at"], json[:created_at]
1266
+ assert_equal fixture["updated_at"], json[:updated_at]
1267
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1268
+ end
1269
+
1270
+ def test_agent_blueprint_updated_round_trip
1271
+ fixture = {
1272
+ "object" => "event",
1273
+ "id" => "stub",
1274
+ "event" => "agent.blueprint.updated",
1275
+ "data" => {},
1276
+ "created_at" => "stub",
1277
+ "context" => {}
1278
+ }
1279
+ model = WorkOS::AgentBlueprintUpdated.new(fixture.to_json)
1280
+ json = model.to_h
1281
+ assert_kind_of Hash, json
1282
+ assert_equal fixture["id"], json[:id]
1283
+ assert_equal fixture["created_at"], json[:created_at]
1284
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1285
+ end
1286
+
1287
+ def test_agent_blueprint_updated_data_round_trip
1288
+ fixture = {
1289
+ "object" => "agent_blueprint",
1290
+ "id" => "stub",
1291
+ "name" => "stub",
1292
+ "description" => nil,
1293
+ "permissions" => [],
1294
+ "invocable_by" => {},
1295
+ "invocable_as" => {},
1296
+ "session_settings" => {},
1297
+ "created_at" => "stub",
1298
+ "updated_at" => "stub"
1299
+ }
1300
+ model = WorkOS::AgentBlueprintUpdatedData.new(fixture.to_json)
1301
+ json = model.to_h
1302
+ assert_kind_of Hash, json
1303
+ assert_equal fixture["id"], json[:id]
1304
+ assert_equal fixture["name"], json[:name]
1305
+ assert_nil json[:description]
1306
+ assert_equal fixture["created_at"], json[:created_at]
1307
+ assert_equal fixture["updated_at"], json[:updated_at]
1308
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1309
+ end
1310
+
1311
+ def test_agent_blueprint_updated_data_invocable_by_round_trip
1312
+ fixture = {
1313
+ "role_slugs" => [],
1314
+ "organization_ids" => []
1315
+ }
1316
+ model = WorkOS::AgentBlueprintUpdatedDataInvocableBy.new(fixture.to_json)
1317
+ json = model.to_h
1318
+ assert_kind_of Hash, json
1319
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1320
+ end
1321
+
1322
+ def test_agent_blueprint_updated_data_invocable_as_round_trip
1323
+ fixture = {
1324
+ "instance_types" => []
1325
+ }
1326
+ model = WorkOS::AgentBlueprintUpdatedDataInvocableAs.new(fixture.to_json)
1327
+ json = model.to_h
1328
+ assert_kind_of Hash, json
1329
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1330
+ end
1331
+
1332
+ def test_agent_blueprint_updated_data_session_setting_round_trip
1333
+ fixture = {
1334
+ "max_age_seconds" => 1.0,
1335
+ "access_token_ttl_seconds" => 1.0,
1336
+ "refresh_token_ttl_seconds" => 1.0
1337
+ }
1338
+ model = WorkOS::AgentBlueprintUpdatedDataSessionSetting.new(fixture.to_json)
1339
+ json = model.to_h
1340
+ assert_kind_of Hash, json
1341
+ assert_equal fixture["max_age_seconds"], json[:max_age_seconds]
1342
+ assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds]
1343
+ assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds]
1344
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1345
+ end
1346
+
1347
+ def test_agent_instance_created_round_trip
1348
+ fixture = {
1349
+ "object" => "event",
1350
+ "id" => "stub",
1351
+ "event" => "agent.instance.created",
1352
+ "data" => {},
1353
+ "created_at" => "stub",
1354
+ "context" => {}
1355
+ }
1356
+ model = WorkOS::AgentInstanceCreated.new(fixture.to_json)
1357
+ json = model.to_h
1358
+ assert_kind_of Hash, json
1359
+ assert_equal fixture["id"], json[:id]
1360
+ assert_equal fixture["created_at"], json[:created_at]
1361
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1362
+ end
1363
+
1364
+ def test_agent_instance_created_data_round_trip
1365
+ fixture = {
1366
+ "object" => "agent_instance",
1367
+ "id" => "stub",
1368
+ "agent_blueprint_id" => "stub",
1369
+ "organization_id" => "stub",
1370
+ "organization_membership_id" => nil,
1371
+ "type" => "stub",
1372
+ "created_at" => "stub",
1373
+ "updated_at" => "stub"
1374
+ }
1375
+ model = WorkOS::AgentInstanceCreatedData.new(fixture.to_json)
1376
+ json = model.to_h
1377
+ assert_kind_of Hash, json
1378
+ assert_equal fixture["id"], json[:id]
1379
+ assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id]
1380
+ assert_equal fixture["organization_id"], json[:organization_id]
1381
+ assert_nil json[:organization_membership_id]
1382
+ assert_equal fixture["created_at"], json[:created_at]
1383
+ assert_equal fixture["updated_at"], json[:updated_at]
1384
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1385
+ end
1386
+
1387
+ def test_agent_instance_deleted_round_trip
1388
+ fixture = {
1389
+ "object" => "event",
1390
+ "id" => "stub",
1391
+ "event" => "agent.instance.deleted",
1392
+ "data" => {},
1393
+ "created_at" => "stub",
1394
+ "context" => {}
1395
+ }
1396
+ model = WorkOS::AgentInstanceDeleted.new(fixture.to_json)
1397
+ json = model.to_h
1398
+ assert_kind_of Hash, json
1399
+ assert_equal fixture["id"], json[:id]
1400
+ assert_equal fixture["created_at"], json[:created_at]
1401
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1402
+ end
1403
+
1404
+ def test_agent_instance_deleted_data_round_trip
1405
+ fixture = {
1406
+ "object" => "agent_instance",
1407
+ "id" => "stub",
1408
+ "agent_blueprint_id" => "stub",
1409
+ "organization_id" => "stub",
1410
+ "organization_membership_id" => nil,
1411
+ "type" => "stub",
1412
+ "created_at" => "stub",
1413
+ "updated_at" => "stub"
1414
+ }
1415
+ model = WorkOS::AgentInstanceDeletedData.new(fixture.to_json)
1416
+ json = model.to_h
1417
+ assert_kind_of Hash, json
1418
+ assert_equal fixture["id"], json[:id]
1419
+ assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id]
1420
+ assert_equal fixture["organization_id"], json[:organization_id]
1421
+ assert_nil json[:organization_membership_id]
1422
+ assert_equal fixture["created_at"], json[:created_at]
1423
+ assert_equal fixture["updated_at"], json[:updated_at]
1424
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1425
+ end
1426
+
1427
+ def test_agent_instance_session_created_round_trip
1428
+ fixture = {
1429
+ "object" => "event",
1430
+ "id" => "stub",
1431
+ "event" => "agent.instance.session.created",
1432
+ "data" => {},
1433
+ "created_at" => "stub",
1434
+ "context" => {}
1435
+ }
1436
+ model = WorkOS::AgentInstanceSessionCreated.new(fixture.to_json)
1437
+ json = model.to_h
1438
+ assert_kind_of Hash, json
1439
+ assert_equal fixture["id"], json[:id]
1440
+ assert_equal fixture["created_at"], json[:created_at]
1441
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1442
+ end
1443
+
1444
+ def test_agent_instance_session_created_data_round_trip
1445
+ fixture = {
1446
+ "object" => "agent_instance_session",
1447
+ "id" => "stub",
1448
+ "agent_instance_id" => "stub",
1449
+ "organization_id" => "stub",
1450
+ "expires_at" => "stub",
1451
+ "revoked_at" => nil,
1452
+ "created_at" => "stub",
1453
+ "updated_at" => "stub",
1454
+ "permission_slugs" => []
1455
+ }
1456
+ model = WorkOS::AgentInstanceSessionCreatedData.new(fixture.to_json)
1457
+ json = model.to_h
1458
+ assert_kind_of Hash, json
1459
+ assert_equal fixture["id"], json[:id]
1460
+ assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
1461
+ assert_equal fixture["organization_id"], json[:organization_id]
1462
+ assert_equal fixture["expires_at"], json[:expires_at]
1463
+ assert_nil json[:revoked_at]
1464
+ assert_equal fixture["created_at"], json[:created_at]
1465
+ assert_equal fixture["updated_at"], json[:updated_at]
1466
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1467
+ end
1468
+
1469
+ def test_agent_instance_session_revoked_round_trip
1470
+ fixture = {
1471
+ "object" => "event",
1472
+ "id" => "stub",
1473
+ "event" => "agent.instance.session.revoked",
1474
+ "data" => {},
1475
+ "created_at" => "stub",
1476
+ "context" => {}
1477
+ }
1478
+ model = WorkOS::AgentInstanceSessionRevoked.new(fixture.to_json)
1479
+ json = model.to_h
1480
+ assert_kind_of Hash, json
1481
+ assert_equal fixture["id"], json[:id]
1482
+ assert_equal fixture["created_at"], json[:created_at]
1483
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1484
+ end
1485
+
1486
+ def test_agent_instance_session_revoked_data_round_trip
1487
+ fixture = {
1488
+ "object" => "agent_instance_session",
1489
+ "id" => "stub",
1490
+ "agent_instance_id" => "stub",
1491
+ "organization_id" => "stub",
1492
+ "expires_at" => "stub",
1493
+ "revoked_at" => nil,
1494
+ "created_at" => "stub",
1495
+ "updated_at" => "stub"
1496
+ }
1497
+ model = WorkOS::AgentInstanceSessionRevokedData.new(fixture.to_json)
1498
+ json = model.to_h
1499
+ assert_kind_of Hash, json
1500
+ assert_equal fixture["id"], json[:id]
1501
+ assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
1502
+ assert_equal fixture["organization_id"], json[:organization_id]
1503
+ assert_equal fixture["expires_at"], json[:expires_at]
1504
+ assert_nil json[:revoked_at]
1505
+ assert_equal fixture["created_at"], json[:created_at]
1506
+ assert_equal fixture["updated_at"], json[:updated_at]
1507
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1508
+ end
1509
+
1510
+ def test_agent_registration_claim_attempt_created_round_trip
1511
+ fixture = {
1512
+ "object" => "event",
1513
+ "id" => "stub",
1514
+ "event" => "agent.registration.claim.attempt.created",
1515
+ "data" => {},
1516
+ "created_at" => "stub",
1517
+ "context" => {}
1518
+ }
1519
+ model = WorkOS::AgentRegistrationClaimAttemptCreated.new(fixture.to_json)
13
1520
  json = model.to_h
14
1521
  assert_kind_of Hash, json
15
- assert_equal fixture["error"], json[:error]
1522
+ assert_equal fixture["id"], json[:id]
1523
+ assert_equal fixture["created_at"], json[:created_at]
16
1524
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
17
1525
  end
18
1526
 
19
- def test_object_summary_round_trip
1527
+ def test_agent_registration_claim_attempt_created_data_round_trip
20
1528
  fixture = {
1529
+ "object" => "agent_registration_claim_attempt",
21
1530
  "id" => "stub",
22
- "name" => "stub",
23
- "updated_at" => nil
1531
+ "agent_registration_id" => "stub",
1532
+ "agent_registration_claim_id" => "stub",
1533
+ "login_hint" => "stub",
1534
+ "expires_at" => "stub",
1535
+ "created_at" => "stub",
1536
+ "updated_at" => "stub"
24
1537
  }
25
- model = WorkOS::ObjectSummary.new(fixture.to_json)
1538
+ model = WorkOS::AgentRegistrationClaimAttemptCreatedData.new(fixture.to_json)
26
1539
  json = model.to_h
27
1540
  assert_kind_of Hash, json
28
1541
  assert_equal fixture["id"], json[:id]
29
- assert_equal fixture["name"], json[:name]
1542
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
1543
+ assert_equal fixture["agent_registration_claim_id"], json[:agent_registration_claim_id]
1544
+ assert_equal fixture["login_hint"], json[:login_hint]
1545
+ assert_equal fixture["expires_at"], json[:expires_at]
1546
+ assert_equal fixture["created_at"], json[:created_at]
1547
+ assert_equal fixture["updated_at"], json[:updated_at]
30
1548
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
31
1549
  end
32
1550
 
33
- def test_object_version_round_trip
1551
+ def test_agent_registration_claim_completed_round_trip
34
1552
  fixture = {
35
- "created_at" => "stub",
36
- "current_version" => true,
37
- "etag" => "stub",
1553
+ "object" => "event",
38
1554
  "id" => "stub",
39
- "size" => 1
1555
+ "event" => "agent.registration.claim.completed",
1556
+ "data" => {},
1557
+ "created_at" => "stub",
1558
+ "context" => {}
40
1559
  }
41
- model = WorkOS::ObjectVersion.new(fixture.to_json)
1560
+ model = WorkOS::AgentRegistrationClaimCompleted.new(fixture.to_json)
42
1561
  json = model.to_h
43
1562
  assert_kind_of Hash, json
44
- assert_equal fixture["created_at"], json[:created_at]
45
- assert_equal fixture["current_version"], json[:current_version]
46
- assert_equal fixture["etag"], json[:etag]
47
1563
  assert_equal fixture["id"], json[:id]
48
- assert_equal fixture["size"], json[:size]
1564
+ assert_equal fixture["created_at"], json[:created_at]
49
1565
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
50
1566
  end
51
1567
 
52
- def test_connect_application_oauth_round_trip
1568
+ def test_agent_registration_claim_completed_data_round_trip
53
1569
  fixture = {
54
- "object" => "connect_application",
1570
+ "object" => "agent_registration_claim",
55
1571
  "id" => "stub",
56
- "client_id" => "stub",
57
- "description" => nil,
58
- "name" => "stub",
59
- "scopes" => [],
1572
+ "agent_registration_id" => "stub",
1573
+ "organization_id" => "stub",
1574
+ "completed_by_attempt_id" => "stub",
1575
+ "claimed_by" => {},
1576
+ "completed_at" => "stub",
60
1577
  "created_at" => "stub",
61
- "updated_at" => "stub",
62
- "application_type" => "oauth",
63
- "redirect_uris" => [],
64
- "uses_pkce" => true,
65
- "is_first_party" => true,
66
- "was_dynamically_registered" => true,
67
- "organization_id" => "stub"
1578
+ "updated_at" => "stub"
68
1579
  }
69
- model = WorkOS::ConnectApplicationOAuth.new(fixture.to_json)
1580
+ model = WorkOS::AgentRegistrationClaimCompletedData.new(fixture.to_json)
70
1581
  json = model.to_h
71
1582
  assert_kind_of Hash, json
72
1583
  assert_equal fixture["id"], json[:id]
73
- assert_equal fixture["client_id"], json[:client_id]
74
- assert_nil json[:description]
75
- assert_equal fixture["name"], json[:name]
1584
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
1585
+ assert_equal fixture["completed_by_attempt_id"], json[:completed_by_attempt_id]
1586
+ assert_equal fixture["completed_at"], json[:completed_at]
76
1587
  assert_equal fixture["created_at"], json[:created_at]
77
1588
  assert_equal fixture["updated_at"], json[:updated_at]
78
- assert_equal fixture["uses_pkce"], json[:uses_pkce]
79
- assert_equal fixture["is_first_party"], json[:is_first_party]
80
1589
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
81
1590
  end
82
1591
 
83
- def test_connect_application_oauth_redirect_uris_round_trip
1592
+ def test_agent_registration_claim_completed_data_claimed_by_round_trip
84
1593
  fixture = {
85
- "uri" => "stub",
86
- "default" => true
1594
+ "user_id" => "stub",
1595
+ "organization_id" => "stub"
87
1596
  }
88
- model = WorkOS::ConnectApplicationOAuthRedirectUris.new(fixture.to_json)
1597
+ model = WorkOS::AgentRegistrationClaimCompletedDataClaimedBy.new(fixture.to_json)
89
1598
  json = model.to_h
90
1599
  assert_kind_of Hash, json
91
- assert_equal fixture["uri"], json[:uri]
92
- assert_equal fixture["default"], json[:default]
1600
+ assert_equal fixture["user_id"], json[:user_id]
93
1601
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
94
1602
  end
95
1603
 
96
- def test_connect_application_m2m_round_trip
1604
+ def test_agent_registration_created_round_trip
97
1605
  fixture = {
98
- "object" => "connect_application",
1606
+ "object" => "event",
99
1607
  "id" => "stub",
100
- "client_id" => "stub",
101
- "description" => nil,
102
- "name" => "stub",
103
- "scopes" => [],
1608
+ "event" => "agent.registration.created",
1609
+ "data" => {},
104
1610
  "created_at" => "stub",
105
- "updated_at" => "stub",
106
- "application_type" => "m2m",
107
- "organization_id" => "stub"
1611
+ "context" => {}
108
1612
  }
109
- model = WorkOS::ConnectApplicationM2M.new(fixture.to_json)
1613
+ model = WorkOS::AgentRegistrationCreated.new(fixture.to_json)
110
1614
  json = model.to_h
111
1615
  assert_kind_of Hash, json
112
1616
  assert_equal fixture["id"], json[:id]
113
- assert_equal fixture["client_id"], json[:client_id]
114
- assert_nil json[:description]
115
- assert_equal fixture["name"], json[:name]
116
1617
  assert_equal fixture["created_at"], json[:created_at]
117
- assert_equal fixture["updated_at"], json[:updated_at]
118
- assert_equal fixture["organization_id"], json[:organization_id]
119
1618
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
120
1619
  end
121
1620
 
122
- def test_event_context_actor_round_trip
1621
+ def test_agent_registration_created_data_round_trip
123
1622
  fixture = {
1623
+ "object" => "agent_registration",
124
1624
  "id" => "stub",
125
- "source" => "stub",
126
- "name" => nil
1625
+ "agent_identity" => {},
1626
+ "organization_id" => "stub",
1627
+ "status" => "stub",
1628
+ "kind" => "stub",
1629
+ "method" => "stub",
1630
+ "created_at" => "stub",
1631
+ "updated_at" => "stub"
127
1632
  }
128
- model = WorkOS::EventContextActor.new(fixture.to_json)
1633
+ model = WorkOS::AgentRegistrationCreatedData.new(fixture.to_json)
129
1634
  json = model.to_h
130
1635
  assert_kind_of Hash, json
131
1636
  assert_equal fixture["id"], json[:id]
132
- assert_nil json[:name]
1637
+ assert_equal fixture["organization_id"], json[:organization_id]
1638
+ assert_equal fixture["created_at"], json[:created_at]
1639
+ assert_equal fixture["updated_at"], json[:updated_at]
133
1640
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
134
1641
  end
135
1642
 
136
- def test_event_context_round_trip
1643
+ def test_agent_registration_created_data_agent_identity_round_trip
137
1644
  fixture = {
138
- "google_analytics_client_id" => "stub",
139
- "google_analytics_sessions" => [],
140
- "ajs_anonymous_id" => "stub",
141
- "client_id" => "stub",
142
- "actor" => {},
143
- "previous_attributes" => {}
1645
+ "object" => "agent_identity",
1646
+ "id" => "stub",
1647
+ "userland_user_id" => "stub"
144
1648
  }
145
- model = WorkOS::EventContext.new(fixture.to_json)
1649
+ model = WorkOS::AgentRegistrationCreatedDataAgentIdentity.new(fixture.to_json)
146
1650
  json = model.to_h
147
1651
  assert_kind_of Hash, json
1652
+ assert_equal fixture["id"], json[:id]
148
1653
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
149
1654
  end
150
1655
 
151
- def test_pipe_connected_account_round_trip
1656
+ def test_agent_registration_credential_issued_round_trip
152
1657
  fixture = {
153
- "object" => "connected_account",
1658
+ "object" => "event",
154
1659
  "id" => "stub",
155
- "connection_role" => "stub",
156
- "account_identifier" => nil,
157
- "account_display_name" => nil,
158
- "data_integration_id" => "stub",
159
- "provider_slug" => "stub",
160
- "user_id" => nil,
161
- "organization_id" => nil,
162
- "scopes" => [],
163
- "auth_method" => "stub",
164
- "api_key_last_4" => nil,
165
- "state" => "stub",
166
- "established_by_user_id" => nil,
167
- "state_reason" => nil,
1660
+ "event" => "agent.registration.credential.issued",
1661
+ "data" => {},
168
1662
  "created_at" => "stub",
169
- "updated_at" => "stub"
1663
+ "context" => {}
170
1664
  }
171
- model = WorkOS::PipeConnectedAccount.new(fixture.to_json)
1665
+ model = WorkOS::AgentRegistrationCredentialIssued.new(fixture.to_json)
172
1666
  json = model.to_h
173
1667
  assert_kind_of Hash, json
174
1668
  assert_equal fixture["id"], json[:id]
175
- assert_equal fixture["data_integration_id"], json[:data_integration_id]
176
- assert_equal fixture["provider_slug"], json[:provider_slug]
177
- assert_nil json[:user_id]
178
- assert_nil json[:organization_id]
179
1669
  assert_equal fixture["created_at"], json[:created_at]
180
- assert_equal fixture["updated_at"], json[:updated_at]
181
1670
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
182
1671
  end
183
1672
 
184
- def test_waitlist_user_round_trip
1673
+ def test_agent_registration_credential_issued_data_round_trip
185
1674
  fixture = {
1675
+ "object" => "agent_registration_credential",
186
1676
  "id" => "stub",
187
- "email" => "stub",
188
- "state" => "stub",
189
- "approved_at" => nil,
190
- "additional_fields" => {},
191
- "waitlist_id" => nil,
1677
+ "agent_registration_id" => "stub",
1678
+ "detail" => {},
192
1679
  "created_at" => "stub",
193
- "updated_at" => "stub",
194
- "object" => "waitlist_user"
1680
+ "updated_at" => "stub"
195
1681
  }
196
- model = WorkOS::WaitlistUser.new(fixture.to_json)
1682
+ model = WorkOS::AgentRegistrationCredentialIssuedData.new(fixture.to_json)
197
1683
  json = model.to_h
198
1684
  assert_kind_of Hash, json
199
1685
  assert_equal fixture["id"], json[:id]
200
- assert_equal fixture["email"], json[:email]
201
- assert_nil json[:approved_at]
1686
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
202
1687
  assert_equal fixture["created_at"], json[:created_at]
203
1688
  assert_equal fixture["updated_at"], json[:updated_at]
204
1689
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
205
1690
  end
206
1691
 
207
- def test_event_schema_round_trip
1692
+ def test_agent_registration_credential_issued_data_detail_round_trip
1693
+ fixture = {
1694
+ "kind" => "api_key",
1695
+ "api_key_id" => "stub"
1696
+ }
1697
+ model = WorkOS::AgentRegistrationCredentialIssuedDataDetail.new(fixture.to_json)
1698
+ json = model.to_h
1699
+ assert_kind_of Hash, json
1700
+ assert_equal fixture["api_key_id"], json[:api_key_id]
1701
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1702
+ end
1703
+
1704
+ def test_access_token_agent_registration_credential_issued_data_detail_round_trip
1705
+ fixture = {
1706
+ "kind" => "access_token",
1707
+ "jti" => "stub",
1708
+ "expires_at" => "stub"
1709
+ }
1710
+ model = WorkOS::AccessTokenAgentRegistrationCredentialIssuedDataDetail.new(fixture.to_json)
1711
+ json = model.to_h
1712
+ assert_kind_of Hash, json
1713
+ assert_equal fixture["jti"], json[:jti]
1714
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1715
+ end
1716
+
1717
+ def test_agent_registration_deleted_round_trip
208
1718
  fixture = {
209
1719
  "object" => "event",
210
1720
  "id" => "stub",
211
- "event" => "stub",
1721
+ "event" => "agent.registration.deleted",
212
1722
  "data" => {},
213
1723
  "created_at" => "stub",
214
1724
  "context" => {}
215
1725
  }
216
- model = WorkOS::EventSchema.new(fixture.to_json)
1726
+ model = WorkOS::AgentRegistrationDeleted.new(fixture.to_json)
217
1727
  json = model.to_h
218
1728
  assert_kind_of Hash, json
219
1729
  assert_equal fixture["id"], json[:id]
220
- assert_equal fixture["event"], json[:event]
221
1730
  assert_equal fixture["created_at"], json[:created_at]
222
1731
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
223
1732
  end
224
1733
 
225
- def test_agent_blueprint_created_round_trip
1734
+ def test_agent_registration_deleted_data_round_trip
1735
+ fixture = {
1736
+ "agent_registration_id" => "stub"
1737
+ }
1738
+ model = WorkOS::AgentRegistrationDeletedData.new(fixture.to_json)
1739
+ json = model.to_h
1740
+ assert_kind_of Hash, json
1741
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
1742
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1743
+ end
1744
+
1745
+ def test_agent_registration_expired_round_trip
226
1746
  fixture = {
227
1747
  "object" => "event",
228
1748
  "id" => "stub",
229
- "event" => "agent.blueprint.created",
1749
+ "event" => "agent.registration.expired",
230
1750
  "data" => {},
231
1751
  "created_at" => "stub",
232
1752
  "context" => {}
233
1753
  }
234
- model = WorkOS::AgentBlueprintCreated.new(fixture.to_json)
1754
+ model = WorkOS::AgentRegistrationExpired.new(fixture.to_json)
235
1755
  json = model.to_h
236
1756
  assert_kind_of Hash, json
237
1757
  assert_equal fixture["id"], json[:id]
@@ -239,76 +1759,87 @@ class SharedModelRoundTripTest < Minitest::Test
239
1759
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
240
1760
  end
241
1761
 
242
- def test_agent_blueprint_created_data_round_trip
1762
+ def test_agent_registration_expired_data_round_trip
243
1763
  fixture = {
244
- "object" => "agent_blueprint",
1764
+ "agent_registration_id" => "stub"
1765
+ }
1766
+ model = WorkOS::AgentRegistrationExpiredData.new(fixture.to_json)
1767
+ json = model.to_h
1768
+ assert_kind_of Hash, json
1769
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
1770
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1771
+ end
1772
+
1773
+ def test_agent_registration_organization_switched_round_trip
1774
+ fixture = {
1775
+ "object" => "event",
245
1776
  "id" => "stub",
246
- "name" => "stub",
247
- "description" => nil,
248
- "permissions" => [],
249
- "invocable_by" => {},
250
- "invocable_as" => {},
251
- "session_settings" => {},
1777
+ "event" => "agent.registration.organization.switched",
1778
+ "data" => {},
252
1779
  "created_at" => "stub",
253
- "updated_at" => "stub"
1780
+ "context" => {}
254
1781
  }
255
- model = WorkOS::AgentBlueprintCreatedData.new(fixture.to_json)
1782
+ model = WorkOS::AgentRegistrationOrganizationSwitched.new(fixture.to_json)
256
1783
  json = model.to_h
257
1784
  assert_kind_of Hash, json
258
1785
  assert_equal fixture["id"], json[:id]
259
- assert_equal fixture["name"], json[:name]
260
- assert_nil json[:description]
261
1786
  assert_equal fixture["created_at"], json[:created_at]
262
- assert_equal fixture["updated_at"], json[:updated_at]
263
1787
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
264
1788
  end
265
1789
 
266
- def test_agent_blueprint_created_data_invocable_by_round_trip
1790
+ def test_agent_registration_organization_switched_data_round_trip
267
1791
  fixture = {
268
- "role_slugs" => [],
269
- "organization_ids" => []
1792
+ "agent_registration_id" => "stub",
1793
+ "from_organization_id" => "stub",
1794
+ "to_organization_id" => "stub"
270
1795
  }
271
- model = WorkOS::AgentBlueprintCreatedDataInvocableBy.new(fixture.to_json)
1796
+ model = WorkOS::AgentRegistrationOrganizationSwitchedData.new(fixture.to_json)
272
1797
  json = model.to_h
273
1798
  assert_kind_of Hash, json
1799
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
1800
+ assert_equal fixture["from_organization_id"], json[:from_organization_id]
1801
+ assert_equal fixture["to_organization_id"], json[:to_organization_id]
274
1802
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
275
1803
  end
276
1804
 
277
- def test_agent_blueprint_created_data_invocable_as_round_trip
1805
+ def test_agent_registration_refreshed_round_trip
278
1806
  fixture = {
279
- "instance_types" => []
1807
+ "object" => "event",
1808
+ "id" => "stub",
1809
+ "event" => "agent.registration.refreshed",
1810
+ "data" => {},
1811
+ "created_at" => "stub",
1812
+ "context" => {}
280
1813
  }
281
- model = WorkOS::AgentBlueprintCreatedDataInvocableAs.new(fixture.to_json)
1814
+ model = WorkOS::AgentRegistrationRefreshed.new(fixture.to_json)
282
1815
  json = model.to_h
283
1816
  assert_kind_of Hash, json
1817
+ assert_equal fixture["id"], json[:id]
1818
+ assert_equal fixture["created_at"], json[:created_at]
284
1819
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
285
1820
  end
286
1821
 
287
- def test_agent_blueprint_created_data_session_setting_round_trip
1822
+ def test_agent_registration_refreshed_data_round_trip
288
1823
  fixture = {
289
- "max_age_seconds" => 1.0,
290
- "access_token_ttl_seconds" => 1.0,
291
- "refresh_token_ttl_seconds" => 1.0
1824
+ "agent_registration_id" => "stub"
292
1825
  }
293
- model = WorkOS::AgentBlueprintCreatedDataSessionSetting.new(fixture.to_json)
1826
+ model = WorkOS::AgentRegistrationRefreshedData.new(fixture.to_json)
294
1827
  json = model.to_h
295
1828
  assert_kind_of Hash, json
296
- assert_equal fixture["max_age_seconds"], json[:max_age_seconds]
297
- assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds]
298
- assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds]
1829
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
299
1830
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
300
1831
  end
301
1832
 
302
- def test_agent_blueprint_deleted_round_trip
1833
+ def test_agent_registration_revoked_round_trip
303
1834
  fixture = {
304
1835
  "object" => "event",
305
1836
  "id" => "stub",
306
- "event" => "agent.blueprint.deleted",
1837
+ "event" => "agent.registration.revoked",
307
1838
  "data" => {},
308
1839
  "created_at" => "stub",
309
1840
  "context" => {}
310
1841
  }
311
- model = WorkOS::AgentBlueprintDeleted.new(fixture.to_json)
1842
+ model = WorkOS::AgentRegistrationRevoked.new(fixture.to_json)
312
1843
  json = model.to_h
313
1844
  assert_kind_of Hash, json
314
1845
  assert_equal fixture["id"], json[:id]
@@ -316,34 +1847,27 @@ class SharedModelRoundTripTest < Minitest::Test
316
1847
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
317
1848
  end
318
1849
 
319
- def test_agent_blueprint_deleted_data_round_trip
1850
+ def test_agent_registration_revoked_data_round_trip
320
1851
  fixture = {
321
- "object" => "agent_blueprint",
322
- "id" => "stub",
323
- "name" => "stub",
324
- "created_at" => "stub",
325
- "updated_at" => "stub"
1852
+ "agent_registration_id" => "stub"
326
1853
  }
327
- model = WorkOS::AgentBlueprintDeletedData.new(fixture.to_json)
1854
+ model = WorkOS::AgentRegistrationRevokedData.new(fixture.to_json)
328
1855
  json = model.to_h
329
1856
  assert_kind_of Hash, json
330
- assert_equal fixture["id"], json[:id]
331
- assert_equal fixture["name"], json[:name]
332
- assert_equal fixture["created_at"], json[:created_at]
333
- assert_equal fixture["updated_at"], json[:updated_at]
1857
+ assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
334
1858
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
335
1859
  end
336
1860
 
337
- def test_agent_blueprint_updated_round_trip
1861
+ def test_feature_flags_flag_created_round_trip
338
1862
  fixture = {
339
1863
  "object" => "event",
340
1864
  "id" => "stub",
341
- "event" => "agent.blueprint.updated",
1865
+ "event" => "feature_flags.flag.created",
342
1866
  "data" => {},
343
1867
  "created_at" => "stub",
344
1868
  "context" => {}
345
1869
  }
346
- model = WorkOS::AgentBlueprintUpdated.new(fixture.to_json)
1870
+ model = WorkOS::FeatureFlagsFlagCreated.new(fixture.to_json)
347
1871
  json = model.to_h
348
1872
  assert_kind_of Hash, json
349
1873
  assert_equal fixture["id"], json[:id]
@@ -351,76 +1875,87 @@ class SharedModelRoundTripTest < Minitest::Test
351
1875
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
352
1876
  end
353
1877
 
354
- def test_agent_blueprint_updated_data_round_trip
1878
+ def test_feature_flags_flag_created_data_round_trip
355
1879
  fixture = {
356
- "object" => "agent_blueprint",
1880
+ "object" => "feature_flag",
357
1881
  "id" => "stub",
1882
+ "environment_id" => "stub",
1883
+ "slug" => "stub",
358
1884
  "name" => "stub",
359
1885
  "description" => nil,
360
- "permissions" => [],
361
- "invocable_by" => {},
362
- "invocable_as" => {},
363
- "session_settings" => {},
1886
+ "owner" => nil,
1887
+ "tags" => [],
1888
+ "enabled" => true,
1889
+ "default_value" => true,
364
1890
  "created_at" => "stub",
365
1891
  "updated_at" => "stub"
366
1892
  }
367
- model = WorkOS::AgentBlueprintUpdatedData.new(fixture.to_json)
1893
+ model = WorkOS::FeatureFlagsFlagCreatedData.new(fixture.to_json)
368
1894
  json = model.to_h
369
1895
  assert_kind_of Hash, json
370
1896
  assert_equal fixture["id"], json[:id]
1897
+ assert_equal fixture["environment_id"], json[:environment_id]
1898
+ assert_equal fixture["slug"], json[:slug]
371
1899
  assert_equal fixture["name"], json[:name]
372
1900
  assert_nil json[:description]
1901
+ assert_equal fixture["enabled"], json[:enabled]
1902
+ assert_equal fixture["default_value"], json[:default_value]
373
1903
  assert_equal fixture["created_at"], json[:created_at]
374
1904
  assert_equal fixture["updated_at"], json[:updated_at]
375
1905
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
376
1906
  end
377
1907
 
378
- def test_agent_blueprint_updated_data_invocable_by_round_trip
1908
+ def test_feature_flags_flag_created_data_owner_round_trip
379
1909
  fixture = {
380
- "role_slugs" => [],
381
- "organization_ids" => []
1910
+ "email" => "stub",
1911
+ "first_name" => nil,
1912
+ "last_name" => nil
382
1913
  }
383
- model = WorkOS::AgentBlueprintUpdatedDataInvocableBy.new(fixture.to_json)
1914
+ model = WorkOS::FeatureFlagsFlagCreatedDataOwner.new(fixture.to_json)
384
1915
  json = model.to_h
385
1916
  assert_kind_of Hash, json
1917
+ assert_equal fixture["email"], json[:email]
1918
+ assert_nil json[:first_name]
1919
+ assert_nil json[:last_name]
386
1920
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
387
1921
  end
388
1922
 
389
- def test_agent_blueprint_updated_data_invocable_as_round_trip
1923
+ def test_feature_flags_flag_created_context_round_trip
390
1924
  fixture = {
391
- "instance_types" => []
1925
+ "client_id" => "stub",
1926
+ "actor" => {}
392
1927
  }
393
- model = WorkOS::AgentBlueprintUpdatedDataInvocableAs.new(fixture.to_json)
1928
+ model = WorkOS::FeatureFlagsFlagCreatedContext.new(fixture.to_json)
394
1929
  json = model.to_h
395
1930
  assert_kind_of Hash, json
1931
+ assert_equal fixture["client_id"], json[:client_id]
396
1932
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
397
1933
  end
398
1934
 
399
- def test_agent_blueprint_updated_data_session_setting_round_trip
1935
+ def test_feature_flags_flag_created_context_actor_round_trip
400
1936
  fixture = {
401
- "max_age_seconds" => 1.0,
402
- "access_token_ttl_seconds" => 1.0,
403
- "refresh_token_ttl_seconds" => 1.0
1937
+ "id" => "stub",
1938
+ "source" => "stub",
1939
+ "name" => nil
404
1940
  }
405
- model = WorkOS::AgentBlueprintUpdatedDataSessionSetting.new(fixture.to_json)
1941
+ model = WorkOS::FeatureFlagsFlagCreatedContextActor.new(fixture.to_json)
406
1942
  json = model.to_h
407
1943
  assert_kind_of Hash, json
408
- assert_equal fixture["max_age_seconds"], json[:max_age_seconds]
409
- assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds]
410
- assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds]
1944
+ assert_equal fixture["id"], json[:id]
1945
+ assert_nil json[:name]
411
1946
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
412
1947
  end
413
1948
 
414
- def test_agent_instance_created_round_trip
1949
+ def test_feature_flags_flag_deleted_round_trip
415
1950
  fixture = {
416
1951
  "object" => "event",
417
1952
  "id" => "stub",
418
- "event" => "agent.instance.created",
1953
+ "event" => "feature_flags.flag.deleted",
419
1954
  "data" => {},
420
1955
  "created_at" => "stub",
421
1956
  "context" => {}
422
1957
  }
423
- model = WorkOS::AgentInstanceCreated.new(fixture.to_json)
1958
+ model = WorkOS::FeatureFlagsFlagDeleted.new(fixture.to_json)
424
1959
  json = model.to_h
425
1960
  assert_kind_of Hash, json
426
1961
  assert_equal fixture["id"], json[:id]
@@ -428,162 +1963,130 @@ class SharedModelRoundTripTest < Minitest::Test
428
1963
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
429
1964
  end
430
1965
 
431
- def test_agent_instance_created_data_round_trip
1966
+ def test_feature_flags_flag_deleted_data_round_trip
432
1967
  fixture = {
433
- "object" => "agent_instance",
1968
+ "object" => "feature_flag",
434
1969
  "id" => "stub",
435
- "agent_blueprint_id" => "stub",
436
- "organization_id" => "stub",
437
- "organization_membership_id" => nil,
438
- "type" => "stub",
1970
+ "environment_id" => "stub",
1971
+ "slug" => "stub",
1972
+ "name" => "stub",
1973
+ "description" => nil,
1974
+ "owner" => nil,
1975
+ "tags" => [],
1976
+ "enabled" => true,
1977
+ "default_value" => true,
439
1978
  "created_at" => "stub",
440
1979
  "updated_at" => "stub"
441
1980
  }
442
- model = WorkOS::AgentInstanceCreatedData.new(fixture.to_json)
1981
+ model = WorkOS::FeatureFlagsFlagDeletedData.new(fixture.to_json)
443
1982
  json = model.to_h
444
1983
  assert_kind_of Hash, json
445
1984
  assert_equal fixture["id"], json[:id]
446
- assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id]
447
- assert_equal fixture["organization_id"], json[:organization_id]
448
- assert_nil json[:organization_membership_id]
1985
+ assert_equal fixture["environment_id"], json[:environment_id]
1986
+ assert_equal fixture["slug"], json[:slug]
1987
+ assert_equal fixture["name"], json[:name]
1988
+ assert_nil json[:description]
1989
+ assert_equal fixture["enabled"], json[:enabled]
1990
+ assert_equal fixture["default_value"], json[:default_value]
449
1991
  assert_equal fixture["created_at"], json[:created_at]
450
1992
  assert_equal fixture["updated_at"], json[:updated_at]
451
1993
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
452
1994
  end
453
1995
 
454
- def test_agent_instance_deleted_round_trip
1996
+ def test_feature_flags_flag_deleted_data_owner_round_trip
455
1997
  fixture = {
456
- "object" => "event",
457
- "id" => "stub",
458
- "event" => "agent.instance.deleted",
459
- "data" => {},
460
- "created_at" => "stub",
461
- "context" => {}
1998
+ "email" => "stub",
1999
+ "first_name" => nil,
2000
+ "last_name" => nil
462
2001
  }
463
- model = WorkOS::AgentInstanceDeleted.new(fixture.to_json)
2002
+ model = WorkOS::FeatureFlagsFlagDeletedDataOwner.new(fixture.to_json)
464
2003
  json = model.to_h
465
2004
  assert_kind_of Hash, json
466
- assert_equal fixture["id"], json[:id]
467
- assert_equal fixture["created_at"], json[:created_at]
2005
+ assert_equal fixture["email"], json[:email]
2006
+ assert_nil json[:first_name]
2007
+ assert_nil json[:last_name]
468
2008
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
469
2009
  end
470
2010
 
471
- def test_agent_instance_deleted_data_round_trip
2011
+ def test_feature_flags_flag_deleted_context_round_trip
472
2012
  fixture = {
473
- "object" => "agent_instance",
474
- "id" => "stub",
475
- "agent_blueprint_id" => "stub",
476
- "organization_id" => "stub",
477
- "organization_membership_id" => nil,
478
- "type" => "stub",
479
- "created_at" => "stub",
480
- "updated_at" => "stub"
2013
+ "client_id" => "stub",
2014
+ "actor" => {}
481
2015
  }
482
- model = WorkOS::AgentInstanceDeletedData.new(fixture.to_json)
2016
+ model = WorkOS::FeatureFlagsFlagDeletedContext.new(fixture.to_json)
483
2017
  json = model.to_h
484
2018
  assert_kind_of Hash, json
485
- assert_equal fixture["id"], json[:id]
486
- assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id]
487
- assert_equal fixture["organization_id"], json[:organization_id]
488
- assert_nil json[:organization_membership_id]
489
- assert_equal fixture["created_at"], json[:created_at]
490
- assert_equal fixture["updated_at"], json[:updated_at]
2019
+ assert_equal fixture["client_id"], json[:client_id]
491
2020
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
492
2021
  end
493
2022
 
494
- def test_agent_instance_session_created_round_trip
2023
+ def test_feature_flags_flag_deleted_context_actor_round_trip
495
2024
  fixture = {
496
- "object" => "event",
497
2025
  "id" => "stub",
498
- "event" => "agent.instance.session.created",
499
- "data" => {},
500
- "created_at" => "stub",
501
- "context" => {}
2026
+ "source" => "stub",
2027
+ "name" => nil
502
2028
  }
503
- model = WorkOS::AgentInstanceSessionCreated.new(fixture.to_json)
2029
+ model = WorkOS::FeatureFlagsFlagDeletedContextActor.new(fixture.to_json)
504
2030
  json = model.to_h
505
2031
  assert_kind_of Hash, json
506
2032
  assert_equal fixture["id"], json[:id]
507
- assert_equal fixture["created_at"], json[:created_at]
2033
+ assert_nil json[:name]
508
2034
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
509
2035
  end
510
2036
 
511
- def test_agent_instance_session_created_data_round_trip
2037
+ def test_feature_flags_flag_rule_created_round_trip
512
2038
  fixture = {
513
- "object" => "agent_instance_session",
2039
+ "object" => "event",
514
2040
  "id" => "stub",
515
- "agent_instance_id" => "stub",
516
- "organization_id" => "stub",
517
- "expires_at" => "stub",
518
- "revoked_at" => nil,
2041
+ "event" => "feature_flags.flag_rule.created",
2042
+ "data" => {},
519
2043
  "created_at" => "stub",
520
- "updated_at" => "stub",
521
- "permission_slugs" => []
2044
+ "context" => {}
522
2045
  }
523
- model = WorkOS::AgentInstanceSessionCreatedData.new(fixture.to_json)
2046
+ model = WorkOS::FeatureFlagsFlagRuleCreated.new(fixture.to_json)
524
2047
  json = model.to_h
525
2048
  assert_kind_of Hash, json
526
2049
  assert_equal fixture["id"], json[:id]
527
- assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
528
- assert_equal fixture["organization_id"], json[:organization_id]
529
- assert_equal fixture["expires_at"], json[:expires_at]
530
- assert_nil json[:revoked_at]
531
2050
  assert_equal fixture["created_at"], json[:created_at]
532
- assert_equal fixture["updated_at"], json[:updated_at]
533
2051
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
534
2052
  end
535
2053
 
536
- def test_agent_instance_session_revoked_round_trip
2054
+ def test_feature_flags_flag_rule_created_context_round_trip
537
2055
  fixture = {
538
- "object" => "event",
539
- "id" => "stub",
540
- "event" => "agent.instance.session.revoked",
541
- "data" => {},
542
- "created_at" => "stub",
543
- "context" => {}
2056
+ "client_id" => "stub",
2057
+ "actor" => {}
544
2058
  }
545
- model = WorkOS::AgentInstanceSessionRevoked.new(fixture.to_json)
2059
+ model = WorkOS::FeatureFlagsFlagRuleCreatedContext.new(fixture.to_json)
546
2060
  json = model.to_h
547
2061
  assert_kind_of Hash, json
548
- assert_equal fixture["id"], json[:id]
549
- assert_equal fixture["created_at"], json[:created_at]
2062
+ assert_equal fixture["client_id"], json[:client_id]
550
2063
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
551
2064
  end
552
2065
 
553
- def test_agent_instance_session_revoked_data_round_trip
2066
+ def test_feature_flags_flag_rule_created_context_actor_round_trip
554
2067
  fixture = {
555
- "object" => "agent_instance_session",
556
2068
  "id" => "stub",
557
- "agent_instance_id" => "stub",
558
- "organization_id" => "stub",
559
- "expires_at" => "stub",
560
- "revoked_at" => nil,
561
- "created_at" => "stub",
562
- "updated_at" => "stub"
2069
+ "source" => "stub",
2070
+ "name" => nil
563
2071
  }
564
- model = WorkOS::AgentInstanceSessionRevokedData.new(fixture.to_json)
2072
+ model = WorkOS::FeatureFlagsFlagRuleCreatedContextActor.new(fixture.to_json)
565
2073
  json = model.to_h
566
2074
  assert_kind_of Hash, json
567
2075
  assert_equal fixture["id"], json[:id]
568
- assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
569
- assert_equal fixture["organization_id"], json[:organization_id]
570
- assert_equal fixture["expires_at"], json[:expires_at]
571
- assert_nil json[:revoked_at]
572
- assert_equal fixture["created_at"], json[:created_at]
573
- assert_equal fixture["updated_at"], json[:updated_at]
2076
+ assert_nil json[:name]
574
2077
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
575
2078
  end
576
2079
 
577
- def test_agent_registration_claim_attempt_created_round_trip
2080
+ def test_feature_flags_flag_rule_deleted_round_trip
578
2081
  fixture = {
579
2082
  "object" => "event",
580
2083
  "id" => "stub",
581
- "event" => "agent.registration.claim.attempt.created",
2084
+ "event" => "feature_flags.flag_rule.deleted",
582
2085
  "data" => {},
583
2086
  "created_at" => "stub",
584
2087
  "context" => {}
585
2088
  }
586
- model = WorkOS::AgentRegistrationClaimAttemptCreated.new(fixture.to_json)
2089
+ model = WorkOS::FeatureFlagsFlagRuleDeleted.new(fixture.to_json)
587
2090
  json = model.to_h
588
2091
  assert_kind_of Hash, json
589
2092
  assert_equal fixture["id"], json[:id]
@@ -591,144 +2094,106 @@ class SharedModelRoundTripTest < Minitest::Test
591
2094
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
592
2095
  end
593
2096
 
594
- def test_agent_registration_claim_attempt_created_data_round_trip
2097
+ def test_feature_flags_flag_rule_deleted_context_round_trip
595
2098
  fixture = {
596
- "object" => "agent_registration_claim_attempt",
597
- "id" => "stub",
598
- "agent_registration_id" => "stub",
599
- "agent_registration_claim_id" => "stub",
600
- "login_hint" => "stub",
601
- "expires_at" => "stub",
602
- "created_at" => "stub",
603
- "updated_at" => "stub"
2099
+ "client_id" => "stub",
2100
+ "actor" => {}
604
2101
  }
605
- model = WorkOS::AgentRegistrationClaimAttemptCreatedData.new(fixture.to_json)
2102
+ model = WorkOS::FeatureFlagsFlagRuleDeletedContext.new(fixture.to_json)
606
2103
  json = model.to_h
607
2104
  assert_kind_of Hash, json
608
- assert_equal fixture["id"], json[:id]
609
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
610
- assert_equal fixture["agent_registration_claim_id"], json[:agent_registration_claim_id]
611
- assert_equal fixture["login_hint"], json[:login_hint]
612
- assert_equal fixture["expires_at"], json[:expires_at]
613
- assert_equal fixture["created_at"], json[:created_at]
614
- assert_equal fixture["updated_at"], json[:updated_at]
2105
+ assert_equal fixture["client_id"], json[:client_id]
615
2106
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
616
2107
  end
617
2108
 
618
- def test_agent_registration_claim_completed_round_trip
2109
+ def test_feature_flags_flag_rule_deleted_context_actor_round_trip
619
2110
  fixture = {
620
- "object" => "event",
621
2111
  "id" => "stub",
622
- "event" => "agent.registration.claim.completed",
623
- "data" => {},
624
- "created_at" => "stub",
625
- "context" => {}
2112
+ "source" => "stub",
2113
+ "name" => nil
626
2114
  }
627
- model = WorkOS::AgentRegistrationClaimCompleted.new(fixture.to_json)
2115
+ model = WorkOS::FeatureFlagsFlagRuleDeletedContextActor.new(fixture.to_json)
628
2116
  json = model.to_h
629
2117
  assert_kind_of Hash, json
630
2118
  assert_equal fixture["id"], json[:id]
631
- assert_equal fixture["created_at"], json[:created_at]
2119
+ assert_nil json[:name]
632
2120
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
633
2121
  end
634
2122
 
635
- def test_agent_registration_claim_completed_data_round_trip
2123
+ def test_feature_flags_flag_rule_updated_round_trip
636
2124
  fixture = {
637
- "object" => "agent_registration_claim",
2125
+ "object" => "event",
638
2126
  "id" => "stub",
639
- "agent_registration_id" => "stub",
640
- "completed_by_attempt_id" => "stub",
641
- "claimed_by" => {},
642
- "completed_at" => "stub",
2127
+ "event" => "feature_flags.flag_rule.updated",
2128
+ "data" => {},
643
2129
  "created_at" => "stub",
644
- "updated_at" => "stub"
2130
+ "context" => {}
645
2131
  }
646
- model = WorkOS::AgentRegistrationClaimCompletedData.new(fixture.to_json)
2132
+ model = WorkOS::FeatureFlagsFlagRuleUpdated.new(fixture.to_json)
647
2133
  json = model.to_h
648
2134
  assert_kind_of Hash, json
649
2135
  assert_equal fixture["id"], json[:id]
650
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
651
- assert_equal fixture["completed_by_attempt_id"], json[:completed_by_attempt_id]
652
- assert_equal fixture["completed_at"], json[:completed_at]
653
2136
  assert_equal fixture["created_at"], json[:created_at]
654
- assert_equal fixture["updated_at"], json[:updated_at]
655
2137
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
656
2138
  end
657
2139
 
658
- def test_agent_registration_claim_completed_data_claimed_by_round_trip
2140
+ def test_feature_flags_flag_rule_updated_context_round_trip
659
2141
  fixture = {
660
- "user_id" => "stub",
661
- "organization_id" => "stub"
2142
+ "client_id" => "stub",
2143
+ "actor" => {},
2144
+ "previous_attributes" => {}
662
2145
  }
663
- model = WorkOS::AgentRegistrationClaimCompletedDataClaimedBy.new(fixture.to_json)
2146
+ model = WorkOS::FeatureFlagsFlagRuleUpdatedContext.new(fixture.to_json)
664
2147
  json = model.to_h
665
2148
  assert_kind_of Hash, json
666
- assert_equal fixture["user_id"], json[:user_id]
2149
+ assert_equal fixture["client_id"], json[:client_id]
667
2150
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
668
2151
  end
669
2152
 
670
- def test_agent_registration_created_round_trip
2153
+ def test_feature_flags_flag_rule_updated_context_actor_round_trip
671
2154
  fixture = {
672
- "object" => "event",
673
2155
  "id" => "stub",
674
- "event" => "agent.registration.created",
675
- "data" => {},
676
- "created_at" => "stub",
677
- "context" => {}
2156
+ "source" => "stub",
2157
+ "name" => nil
678
2158
  }
679
- model = WorkOS::AgentRegistrationCreated.new(fixture.to_json)
2159
+ model = WorkOS::FeatureFlagsFlagRuleUpdatedContextActor.new(fixture.to_json)
680
2160
  json = model.to_h
681
2161
  assert_kind_of Hash, json
682
2162
  assert_equal fixture["id"], json[:id]
683
- assert_equal fixture["created_at"], json[:created_at]
2163
+ assert_nil json[:name]
684
2164
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
685
2165
  end
686
2166
 
687
- def test_agent_registration_created_data_round_trip
2167
+ def test_feature_flags_flag_rule_updated_context_previous_attribute_round_trip
688
2168
  fixture = {
689
- "object" => "agent_registration",
690
- "id" => "stub",
691
- "agent_identity" => {},
692
- "organization_id" => "stub",
693
- "status" => "stub",
694
- "kind" => "stub",
695
- "method" => "stub",
696
- "created_at" => "stub",
697
- "updated_at" => "stub"
2169
+ "data" => {}
698
2170
  }
699
- model = WorkOS::AgentRegistrationCreatedData.new(fixture.to_json)
2171
+ model = WorkOS::FeatureFlagsFlagRuleUpdatedContextPreviousAttribute.new(fixture.to_json)
700
2172
  json = model.to_h
701
2173
  assert_kind_of Hash, json
702
- assert_equal fixture["id"], json[:id]
703
- assert_equal fixture["organization_id"], json[:organization_id]
704
- assert_equal fixture["created_at"], json[:created_at]
705
- assert_equal fixture["updated_at"], json[:updated_at]
706
2174
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
707
2175
  end
708
2176
 
709
- def test_agent_registration_created_data_agent_identity_round_trip
2177
+ def test_feature_flags_flag_rule_updated_context_previous_attribute_data_round_trip
710
2178
  fixture = {
711
- "object" => "agent_identity",
712
- "id" => "stub",
713
- "userland_user_id" => "stub"
2179
+ "value" => true
714
2180
  }
715
- model = WorkOS::AgentRegistrationCreatedDataAgentIdentity.new(fixture.to_json)
2181
+ model = WorkOS::FeatureFlagsFlagRuleUpdatedContextPreviousAttributeData.new(fixture.to_json)
716
2182
  json = model.to_h
717
2183
  assert_kind_of Hash, json
718
- assert_equal fixture["id"], json[:id]
719
2184
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
720
2185
  end
721
2186
 
722
- def test_agent_registration_credential_issued_round_trip
2187
+ def test_feature_flags_flag_updated_round_trip
723
2188
  fixture = {
724
2189
  "object" => "event",
725
2190
  "id" => "stub",
726
- "event" => "agent.registration.credential.issued",
2191
+ "event" => "feature_flags.flag.updated",
727
2192
  "data" => {},
728
2193
  "created_at" => "stub",
729
2194
  "context" => {}
730
2195
  }
731
- model = WorkOS::AgentRegistrationCredentialIssued.new(fixture.to_json)
2196
+ model = WorkOS::FeatureFlagsFlagUpdated.new(fixture.to_json)
732
2197
  json = model.to_h
733
2198
  assert_kind_of Hash, json
734
2199
  assert_equal fixture["id"], json[:id]
@@ -736,116 +2201,128 @@ class SharedModelRoundTripTest < Minitest::Test
736
2201
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
737
2202
  end
738
2203
 
739
- def test_agent_registration_credential_issued_data_round_trip
2204
+ def test_feature_flags_flag_updated_data_round_trip
740
2205
  fixture = {
741
- "object" => "agent_registration_credential",
2206
+ "object" => "feature_flag",
742
2207
  "id" => "stub",
743
- "agent_registration_id" => "stub",
744
- "detail" => {},
2208
+ "environment_id" => "stub",
2209
+ "slug" => "stub",
2210
+ "name" => "stub",
2211
+ "description" => nil,
2212
+ "owner" => nil,
2213
+ "tags" => [],
2214
+ "enabled" => true,
2215
+ "default_value" => true,
745
2216
  "created_at" => "stub",
746
2217
  "updated_at" => "stub"
747
2218
  }
748
- model = WorkOS::AgentRegistrationCredentialIssuedData.new(fixture.to_json)
2219
+ model = WorkOS::FeatureFlagsFlagUpdatedData.new(fixture.to_json)
749
2220
  json = model.to_h
750
2221
  assert_kind_of Hash, json
751
2222
  assert_equal fixture["id"], json[:id]
752
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
2223
+ assert_equal fixture["environment_id"], json[:environment_id]
2224
+ assert_equal fixture["slug"], json[:slug]
2225
+ assert_equal fixture["name"], json[:name]
2226
+ assert_nil json[:description]
2227
+ assert_equal fixture["enabled"], json[:enabled]
2228
+ assert_equal fixture["default_value"], json[:default_value]
753
2229
  assert_equal fixture["created_at"], json[:created_at]
754
2230
  assert_equal fixture["updated_at"], json[:updated_at]
755
2231
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
756
2232
  end
757
2233
 
758
- def test_agent_registration_credential_issued_data_detail_round_trip
2234
+ def test_feature_flags_flag_updated_data_owner_round_trip
759
2235
  fixture = {
760
- "kind" => "api_key",
761
- "api_key_id" => "stub"
2236
+ "email" => "stub",
2237
+ "first_name" => nil,
2238
+ "last_name" => nil
762
2239
  }
763
- model = WorkOS::AgentRegistrationCredentialIssuedDataDetail.new(fixture.to_json)
2240
+ model = WorkOS::FeatureFlagsFlagUpdatedDataOwner.new(fixture.to_json)
764
2241
  json = model.to_h
765
2242
  assert_kind_of Hash, json
766
- assert_equal fixture["api_key_id"], json[:api_key_id]
2243
+ assert_equal fixture["email"], json[:email]
2244
+ assert_nil json[:first_name]
2245
+ assert_nil json[:last_name]
767
2246
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
768
2247
  end
769
2248
 
770
- def test_access_token_agent_registration_credential_issued_data_detail_round_trip
2249
+ def test_feature_flags_flag_updated_context_round_trip
771
2250
  fixture = {
772
- "kind" => "access_token",
773
- "jti" => "stub",
774
- "expires_at" => "stub"
2251
+ "client_id" => "stub",
2252
+ "actor" => {},
2253
+ "previous_attributes" => {}
775
2254
  }
776
- model = WorkOS::AccessTokenAgentRegistrationCredentialIssuedDataDetail.new(fixture.to_json)
2255
+ model = WorkOS::FeatureFlagsFlagUpdatedContext.new(fixture.to_json)
777
2256
  json = model.to_h
778
2257
  assert_kind_of Hash, json
779
- assert_equal fixture["jti"], json[:jti]
2258
+ assert_equal fixture["client_id"], json[:client_id]
780
2259
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
781
2260
  end
782
2261
 
783
- def test_agent_registration_deleted_round_trip
2262
+ def test_feature_flags_flag_updated_context_actor_round_trip
784
2263
  fixture = {
785
- "object" => "event",
786
2264
  "id" => "stub",
787
- "event" => "agent.registration.deleted",
788
- "data" => {},
789
- "created_at" => "stub",
790
- "context" => {}
2265
+ "source" => "stub",
2266
+ "name" => nil
791
2267
  }
792
- model = WorkOS::AgentRegistrationDeleted.new(fixture.to_json)
2268
+ model = WorkOS::FeatureFlagsFlagUpdatedContextActor.new(fixture.to_json)
793
2269
  json = model.to_h
794
2270
  assert_kind_of Hash, json
795
2271
  assert_equal fixture["id"], json[:id]
796
- assert_equal fixture["created_at"], json[:created_at]
2272
+ assert_nil json[:name]
797
2273
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
798
2274
  end
799
2275
 
800
- def test_agent_registration_deleted_data_round_trip
2276
+ def test_feature_flags_flag_updated_context_previous_attribute_round_trip
801
2277
  fixture = {
802
- "agent_registration_id" => "stub"
2278
+ "data" => {}
803
2279
  }
804
- model = WorkOS::AgentRegistrationDeletedData.new(fixture.to_json)
2280
+ model = WorkOS::FeatureFlagsFlagUpdatedContextPreviousAttribute.new(fixture.to_json)
805
2281
  json = model.to_h
806
2282
  assert_kind_of Hash, json
807
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
808
2283
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
809
2284
  end
810
2285
 
811
- def test_agent_registration_expired_round_trip
2286
+ def test_feature_flags_flag_updated_context_previous_attribute_data_round_trip
812
2287
  fixture = {
813
- "object" => "event",
814
- "id" => "stub",
815
- "event" => "agent.registration.expired",
816
- "data" => {},
817
- "created_at" => "stub",
818
- "context" => {}
2288
+ "name" => "stub",
2289
+ "description" => nil,
2290
+ "tags" => [],
2291
+ "owner" => nil,
2292
+ "enabled" => true,
2293
+ "default_value" => true
819
2294
  }
820
- model = WorkOS::AgentRegistrationExpired.new(fixture.to_json)
2295
+ model = WorkOS::FeatureFlagsFlagUpdatedContextPreviousAttributeData.new(fixture.to_json)
821
2296
  json = model.to_h
822
2297
  assert_kind_of Hash, json
823
- assert_equal fixture["id"], json[:id]
824
- assert_equal fixture["created_at"], json[:created_at]
825
2298
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
826
2299
  end
827
2300
 
828
- def test_agent_registration_expired_data_round_trip
2301
+ def test_feature_flags_flag_updated_context_previous_attribute_data_owner_round_trip
829
2302
  fixture = {
830
- "agent_registration_id" => "stub"
2303
+ "email" => "stub",
2304
+ "first_name" => nil,
2305
+ "last_name" => nil
831
2306
  }
832
- model = WorkOS::AgentRegistrationExpiredData.new(fixture.to_json)
2307
+ model = WorkOS::FeatureFlagsFlagUpdatedContextPreviousAttributeDataOwner.new(fixture.to_json)
833
2308
  json = model.to_h
834
2309
  assert_kind_of Hash, json
835
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
2310
+ assert_equal fixture["email"], json[:email]
2311
+ assert_nil json[:first_name]
2312
+ assert_nil json[:last_name]
836
2313
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
837
2314
  end
838
2315
 
839
- def test_agent_registration_organization_switched_round_trip
2316
+ def test_feature_flags_flag_target_created_round_trip
840
2317
  fixture = {
841
2318
  "object" => "event",
842
2319
  "id" => "stub",
843
- "event" => "agent.registration.organization.switched",
2320
+ "event" => "feature_flags.flag_target.created",
844
2321
  "data" => {},
845
2322
  "created_at" => "stub",
846
2323
  "context" => {}
847
2324
  }
848
- model = WorkOS::AgentRegistrationOrganizationSwitched.new(fixture.to_json)
2325
+ model = WorkOS::FeatureFlagsFlagTargetCreated.new(fixture.to_json)
849
2326
  json = model.to_h
850
2327
  assert_kind_of Hash, json
851
2328
  assert_equal fixture["id"], json[:id]
@@ -853,59 +2330,42 @@ class SharedModelRoundTripTest < Minitest::Test
853
2330
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
854
2331
  end
855
2332
 
856
- def test_agent_registration_organization_switched_data_round_trip
2333
+ def test_feature_flags_flag_target_created_context_round_trip
857
2334
  fixture = {
858
- "agent_registration_id" => "stub",
859
- "from_organization_id" => "stub",
860
- "to_organization_id" => "stub"
2335
+ "client_id" => "stub",
2336
+ "actor" => {}
861
2337
  }
862
- model = WorkOS::AgentRegistrationOrganizationSwitchedData.new(fixture.to_json)
2338
+ model = WorkOS::FeatureFlagsFlagTargetCreatedContext.new(fixture.to_json)
863
2339
  json = model.to_h
864
2340
  assert_kind_of Hash, json
865
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
866
- assert_equal fixture["from_organization_id"], json[:from_organization_id]
867
- assert_equal fixture["to_organization_id"], json[:to_organization_id]
2341
+ assert_equal fixture["client_id"], json[:client_id]
868
2342
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
869
2343
  end
870
2344
 
871
- def test_agent_registration_refreshed_round_trip
2345
+ def test_feature_flags_flag_target_created_context_actor_round_trip
872
2346
  fixture = {
873
- "object" => "event",
874
2347
  "id" => "stub",
875
- "event" => "agent.registration.refreshed",
876
- "data" => {},
877
- "created_at" => "stub",
878
- "context" => {}
2348
+ "source" => "stub",
2349
+ "name" => nil
879
2350
  }
880
- model = WorkOS::AgentRegistrationRefreshed.new(fixture.to_json)
2351
+ model = WorkOS::FeatureFlagsFlagTargetCreatedContextActor.new(fixture.to_json)
881
2352
  json = model.to_h
882
2353
  assert_kind_of Hash, json
883
2354
  assert_equal fixture["id"], json[:id]
884
- assert_equal fixture["created_at"], json[:created_at]
885
- fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
886
- end
887
-
888
- def test_agent_registration_refreshed_data_round_trip
889
- fixture = {
890
- "agent_registration_id" => "stub"
891
- }
892
- model = WorkOS::AgentRegistrationRefreshedData.new(fixture.to_json)
893
- json = model.to_h
894
- assert_kind_of Hash, json
895
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
2355
+ assert_nil json[:name]
896
2356
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
897
2357
  end
898
2358
 
899
- def test_agent_registration_revoked_round_trip
2359
+ def test_feature_flags_flag_target_deleted_round_trip
900
2360
  fixture = {
901
2361
  "object" => "event",
902
2362
  "id" => "stub",
903
- "event" => "agent.registration.revoked",
2363
+ "event" => "feature_flags.flag_target.deleted",
904
2364
  "data" => {},
905
2365
  "created_at" => "stub",
906
2366
  "context" => {}
907
2367
  }
908
- model = WorkOS::AgentRegistrationRevoked.new(fixture.to_json)
2368
+ model = WorkOS::FeatureFlagsFlagTargetDeleted.new(fixture.to_json)
909
2369
  json = model.to_h
910
2370
  assert_kind_of Hash, json
911
2371
  assert_equal fixture["id"], json[:id]
@@ -913,14 +2373,29 @@ class SharedModelRoundTripTest < Minitest::Test
913
2373
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
914
2374
  end
915
2375
 
916
- def test_agent_registration_revoked_data_round_trip
2376
+ def test_feature_flags_flag_target_deleted_context_round_trip
917
2377
  fixture = {
918
- "agent_registration_id" => "stub"
2378
+ "client_id" => "stub",
2379
+ "actor" => {}
919
2380
  }
920
- model = WorkOS::AgentRegistrationRevokedData.new(fixture.to_json)
2381
+ model = WorkOS::FeatureFlagsFlagTargetDeletedContext.new(fixture.to_json)
921
2382
  json = model.to_h
922
2383
  assert_kind_of Hash, json
923
- assert_equal fixture["agent_registration_id"], json[:agent_registration_id]
2384
+ assert_equal fixture["client_id"], json[:client_id]
2385
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2386
+ end
2387
+
2388
+ def test_feature_flags_flag_target_deleted_context_actor_round_trip
2389
+ fixture = {
2390
+ "id" => "stub",
2391
+ "source" => "stub",
2392
+ "name" => nil
2393
+ }
2394
+ model = WorkOS::FeatureFlagsFlagTargetDeletedContextActor.new(fixture.to_json)
2395
+ json = model.to_h
2396
+ assert_kind_of Hash, json
2397
+ assert_equal fixture["id"], json[:id]
2398
+ assert_nil json[:name]
924
2399
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
925
2400
  end
926
2401
 
@@ -1487,6 +2962,44 @@ class SharedModelRoundTripTest < Minitest::Test
1487
2962
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1488
2963
  end
1489
2964
 
2965
+ def test_data_integration_access_token_response_with_access_token_round_trip
2966
+ fixture = {
2967
+ "active" => true,
2968
+ "access_token" => {}
2969
+ }
2970
+ model = WorkOS::DataIntegrationAccessTokenResponseWithAccessToken.new(fixture.to_json)
2971
+ json = model.to_h
2972
+ assert_kind_of Hash, json
2973
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2974
+ end
2975
+
2976
+ def test_data_integration_access_token_response_with_access_token_access_token_round_trip
2977
+ fixture = {
2978
+ "object" => "access_token",
2979
+ "access_token" => "stub",
2980
+ "expires_at" => nil,
2981
+ "scopes" => [],
2982
+ "missing_scopes" => []
2983
+ }
2984
+ model = WorkOS::DataIntegrationAccessTokenResponseWithAccessTokenAccessToken.new(fixture.to_json)
2985
+ json = model.to_h
2986
+ assert_kind_of Hash, json
2987
+ assert_equal fixture["access_token"], json[:access_token]
2988
+ assert_nil json[:expires_at]
2989
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
2990
+ end
2991
+
2992
+ def test_data_integration_access_token_response_with_error_round_trip
2993
+ fixture = {
2994
+ "active" => false,
2995
+ "error" => "stub"
2996
+ }
2997
+ model = WorkOS::DataIntegrationAccessTokenResponseWithError.new(fixture.to_json)
2998
+ json = model.to_h
2999
+ assert_kind_of Hash, json
3000
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3001
+ end
3002
+
1490
3003
  def test_account_selection_required_error_round_trip
1491
3004
  fixture = {
1492
3005
  "code" => "account_selection_required",
@@ -1499,14 +3012,63 @@ class SharedModelRoundTripTest < Minitest::Test
1499
3012
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1500
3013
  end
1501
3014
 
1502
- def test_event_list_list_metadata_round_trip
3015
+ def test_oauth_data_integration_vended_credential_round_trip
1503
3016
  fixture = {
1504
- "after" => nil
3017
+ "object" => "credential",
3018
+ "auth_method" => "oauth",
3019
+ "value" => "stub",
3020
+ "expires_at" => nil,
3021
+ "scopes" => [],
3022
+ "missing_scopes" => [],
3023
+ "metadata" => {},
3024
+ "config" => {}
1505
3025
  }
1506
- model = WorkOS::EventListListMetadata.new(fixture.to_json)
3026
+ model = WorkOS::OAuthDataIntegrationVendedCredential.new(fixture.to_json)
3027
+ json = model.to_h
3028
+ assert_kind_of Hash, json
3029
+ assert_equal fixture["value"], json[:value]
3030
+ assert_nil json[:expires_at]
3031
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3032
+ end
3033
+
3034
+ def test_client_credentials_data_integration_vended_credential_round_trip
3035
+ fixture = {
3036
+ "object" => "credential",
3037
+ "auth_method" => "client_credentials",
3038
+ "value" => "stub",
3039
+ "expires_at" => nil,
3040
+ "scopes" => [],
3041
+ "missing_scopes" => [],
3042
+ "metadata" => {},
3043
+ "config" => {}
3044
+ }
3045
+ model = WorkOS::ClientCredentialsDataIntegrationVendedCredential.new(fixture.to_json)
3046
+ json = model.to_h
3047
+ assert_kind_of Hash, json
3048
+ assert_equal fixture["value"], json[:value]
3049
+ assert_nil json[:expires_at]
3050
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3051
+ end
3052
+
3053
+ def test_data_integration_credentials_response_with_credential_round_trip
3054
+ fixture = {
3055
+ "active" => true,
3056
+ "credential" => {}
3057
+ }
3058
+ model = WorkOS::DataIntegrationCredentialsResponseWithCredential.new(fixture.to_json)
3059
+ json = model.to_h
3060
+ assert_kind_of Hash, json
3061
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3062
+ end
3063
+
3064
+ def test_data_integration_credentials_response_with_error_round_trip
3065
+ fixture = {
3066
+ "active" => false,
3067
+ "error" => "stub"
3068
+ }
3069
+ model = WorkOS::DataIntegrationCredentialsResponseWithError.new(fixture.to_json)
1507
3070
  json = model.to_h
1508
3071
  assert_kind_of Hash, json
1509
- assert_nil json[:after]
1510
3072
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1511
3073
  end
1512
3074
 
@@ -1523,6 +3085,65 @@ class SharedModelRoundTripTest < Minitest::Test
1523
3085
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1524
3086
  end
1525
3087
 
3088
+ def test_sso_required_oauth_error_body_with_connection_ids_list_email_round_trip
3089
+ fixture = {
3090
+ "error" => "sso_required",
3091
+ "error_description" => "stub",
3092
+ "connection_ids" => [],
3093
+ "email" => "stub",
3094
+ "pending_authentication_token" => "stub"
3095
+ }
3096
+ model = WorkOS::SSORequiredOAuthErrorBodyWithConnectionIdsListEmail.new(fixture.to_json)
3097
+ json = model.to_h
3098
+ assert_kind_of Hash, json
3099
+ assert_equal fixture["error_description"], json[:error_description]
3100
+ assert_equal fixture["email"], json[:email]
3101
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3102
+ end
3103
+
3104
+ def test_object_summary_round_trip
3105
+ fixture = {
3106
+ "id" => "stub",
3107
+ "name" => "stub",
3108
+ "updated_at" => nil
3109
+ }
3110
+ model = WorkOS::ObjectSummary.new(fixture.to_json)
3111
+ json = model.to_h
3112
+ assert_kind_of Hash, json
3113
+ assert_equal fixture["id"], json[:id]
3114
+ assert_equal fixture["name"], json[:name]
3115
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3116
+ end
3117
+
3118
+ def test_event_schema_round_trip
3119
+ fixture = {
3120
+ "object" => "event",
3121
+ "id" => "stub",
3122
+ "event" => "stub",
3123
+ "data" => {},
3124
+ "created_at" => "stub",
3125
+ "context" => {}
3126
+ }
3127
+ model = WorkOS::EventSchema.new(fixture.to_json)
3128
+ json = model.to_h
3129
+ assert_kind_of Hash, json
3130
+ assert_equal fixture["id"], json[:id]
3131
+ assert_equal fixture["event"], json[:event]
3132
+ assert_equal fixture["created_at"], json[:created_at]
3133
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3134
+ end
3135
+
3136
+ def test_event_list_list_metadata_round_trip
3137
+ fixture = {
3138
+ "after" => nil
3139
+ }
3140
+ model = WorkOS::EventListListMetadata.new(fixture.to_json)
3141
+ json = model.to_h
3142
+ assert_kind_of Hash, json
3143
+ assert_nil json[:after]
3144
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
3145
+ end
3146
+
1526
3147
  def test_authorized_connect_application_list_data_round_trip
1527
3148
  fixture = {
1528
3149
  "object" => "authorized_connect_application",