workos 8.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.github/workflows/docs.yml +5 -2
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/release-please.yml +176 -5
- data/.github/workflows/release.yml +1 -1
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +129 -34
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +66 -0
- data/Gemfile.lock +4 -4
- data/README.md +19 -0
- data/docs/V7_MIGRATION_GUIDE.md +21 -0
- data/lib/workos/actions.rb +1 -1
- data/lib/workos/api_keys/api_key.rb +3 -0
- data/lib/workos/api_keys/api_key_created.rb +5 -5
- data/lib/workos/api_keys/api_key_created_data.rb +3 -0
- data/lib/workos/api_keys/api_key_revoked.rb +5 -5
- data/lib/workos/api_keys/create_organization_api_key.rb +5 -2
- data/lib/workos/api_keys/organization_api_key.rb +3 -0
- data/lib/workos/api_keys/organization_api_key_with_value.rb +3 -0
- data/lib/workos/api_keys.rb +4 -1
- data/lib/workos/audit_logs/audit_log_action.rb +2 -7
- data/lib/workos/audit_logs/audit_log_export.rb +2 -7
- data/lib/workos/audit_logs/audit_log_schema.rb +11 -2
- data/lib/workos/audit_logs/{audit_log_schema_json_actor.rb → audit_log_schema_actor_input.rb} +1 -1
- data/lib/workos/audit_logs/audit_log_schema_input.rb +25 -0
- data/lib/workos/audit_logs/audit_log_schema_target.rb +16 -1
- data/lib/workos/{types/radar_type.rb → audit_logs/audit_log_schema_target_input.rb} +1 -3
- data/lib/workos/audit_logs.rb +16 -16
- data/lib/workos/authorization/permission_created.rb +5 -5
- data/lib/workos/authorization/permission_deleted.rb +5 -5
- data/lib/workos/authorization/permission_updated.rb +5 -5
- data/lib/workos/authorization/role_created.rb +5 -5
- data/lib/workos/authorization/role_deleted.rb +5 -5
- data/lib/workos/authorization/role_updated.rb +5 -5
- data/lib/workos/authorization.rb +28 -12
- data/lib/workos/base_client.rb +71 -5
- data/lib/workos/client.rb +6 -6
- data/lib/workos/connect/connect_application.rb +12 -0
- data/lib/workos/{audit_logs/audit_log_schema_json_target.rb → connect/connect_application_redirect_uri.rb} +7 -7
- data/lib/workos/directory_sync/dsync_activated.rb +5 -5
- data/lib/workos/directory_sync/dsync_deactivated.rb +5 -5
- data/lib/workos/directory_sync/dsync_deleted.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_created.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_deleted.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_updated.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_user_added.rb +5 -5
- data/lib/workos/directory_sync/dsync_group_user_removed.rb +5 -5
- data/lib/workos/directory_sync/dsync_user_created.rb +5 -5
- data/lib/workos/directory_sync/dsync_user_deleted.rb +5 -5
- data/lib/workos/directory_sync/dsync_user_updated.rb +5 -5
- data/lib/workos/encryptors/aes_gcm.rb +19 -5
- data/lib/workos/feature_flags/flag_created.rb +5 -5
- data/lib/workos/feature_flags/flag_deleted.rb +5 -5
- data/lib/workos/feature_flags/flag_rule_updated.rb +5 -5
- data/lib/workos/feature_flags/flag_rule_updated_context_configured_target_organization.rb +1 -16
- data/lib/workos/feature_flags/flag_rule_updated_context_previous_attribute_context_configured_target_organization.rb +1 -1
- data/lib/workos/feature_flags/flag_updated.rb +5 -5
- data/lib/workos/inflections.rb +4 -1
- data/lib/workos/organization_domains/organization_domain_created.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_deleted.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_updated.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_verification_failed.rb +5 -5
- data/lib/workos/organization_domains/organization_domain_verified.rb +5 -5
- data/lib/workos/organization_membership_service.rb +273 -0
- data/lib/workos/organizations/audit_logs_retention.rb +2 -7
- data/lib/workos/organizations/organization_created.rb +5 -5
- data/lib/workos/organizations/organization_deleted.rb +5 -5
- data/lib/workos/organizations/organization_membership_created.rb +5 -5
- data/lib/workos/organizations/organization_membership_deleted.rb +5 -5
- data/lib/workos/organizations/organization_membership_updated.rb +5 -5
- data/lib/workos/organizations/organization_role_created.rb +5 -5
- data/lib/workos/organizations/organization_role_deleted.rb +5 -5
- data/lib/workos/organizations/organization_role_updated.rb +5 -5
- data/lib/workos/organizations/organization_updated.rb +5 -5
- data/lib/workos/radar/radar_standalone_assess_request.rb +2 -8
- data/lib/workos/radar.rb +6 -12
- data/lib/workos/session.rb +28 -7
- data/lib/workos/session_manager.rb +24 -1
- data/lib/workos/shared/connect_application_m2m.rb +46 -0
- data/lib/workos/shared/connect_application_oauth.rb +58 -0
- data/lib/workos/shared/connect_application_oauth_redirect_uris.rb +22 -0
- data/lib/workos/shared/error_response.rb +18 -0
- data/lib/workos/shared/group_created.rb +5 -5
- data/lib/workos/shared/group_deleted.rb +5 -5
- data/lib/workos/shared/group_member_added.rb +5 -5
- data/lib/workos/shared/group_member_removed.rb +5 -5
- data/lib/workos/shared/group_updated.rb +5 -5
- data/lib/workos/shared/pipe_connected_account.rb +46 -0
- data/lib/workos/{audit_logs/audit_log_export_json.rb → shared/pipes_connected_account_connected.rb} +10 -10
- data/lib/workos/shared/pipes_connected_account_disconnected.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_reauthorization_needed.rb +34 -0
- data/lib/workos/shared/waitlist_user_approved.rb +5 -5
- data/lib/workos/shared/waitlist_user_created.rb +5 -5
- data/lib/workos/shared/waitlist_user_denied.rb +5 -5
- data/lib/workos/sso/connection_activated.rb +5 -5
- data/lib/workos/sso/connection_deactivated.rb +5 -5
- data/lib/workos/sso/connection_deleted.rb +5 -5
- data/lib/workos/sso/connection_saml_certificate_renewal_required.rb +5 -5
- data/lib/workos/sso/connection_saml_certificate_renewed.rb +5 -5
- data/lib/workos/types/create_webhook_endpoint_events.rb +4 -1
- data/lib/workos/types/pipe_connected_account_state.rb +13 -0
- data/lib/workos/types/{radar_action.rb → radar_list_action.rb} +1 -1
- data/lib/workos/types/radar_list_type.rb +18 -0
- data/lib/workos/types/radar_standalone_assess_request_action.rb +1 -7
- data/lib/workos/types/radar_standalone_response_blocklist_type.rb +1 -10
- data/lib/workos/types/radar_standalone_response_control.rb +1 -3
- data/lib/workos/types/user_management_authentication_screen_hint.rb +1 -5
- data/{rbi/workos/types/request_options.rbi → lib/workos/types/vault_order.rb} +4 -3
- data/lib/workos/types/webhook_endpoint_status.rb +1 -5
- data/lib/workos/user_management/action_authentication_denied.rb +6 -6
- data/lib/workos/user_management/action_user_registration_denied.rb +6 -6
- data/lib/workos/user_management/authentication_email_verification_failed.rb +5 -5
- data/lib/workos/user_management/authentication_email_verification_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_magic_auth_failed.rb +5 -5
- data/lib/workos/user_management/authentication_magic_auth_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_mfa_failed.rb +5 -5
- data/lib/workos/user_management/authentication_mfa_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_oauth_failed.rb +5 -5
- data/lib/workos/user_management/authentication_oauth_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_passkey_failed.rb +5 -5
- data/lib/workos/user_management/authentication_passkey_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_password_failed.rb +5 -5
- data/lib/workos/user_management/authentication_password_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_radar_risk_detected.rb +5 -5
- data/lib/workos/user_management/authentication_sso_failed.rb +5 -5
- data/lib/workos/user_management/authentication_sso_started.rb +5 -5
- data/lib/workos/user_management/authentication_sso_succeeded.rb +5 -5
- data/lib/workos/user_management/authentication_sso_timed_out.rb +5 -5
- data/lib/workos/user_management/create_user_api_key.rb +5 -2
- data/lib/workos/user_management/email_verification_created.rb +5 -5
- data/lib/workos/user_management/invitation_accepted.rb +5 -5
- data/lib/workos/user_management/invitation_created.rb +5 -5
- data/lib/workos/user_management/invitation_resent.rb +5 -5
- data/lib/workos/user_management/invitation_revoked.rb +5 -5
- data/lib/workos/user_management/magic_auth_created.rb +5 -5
- data/lib/workos/user_management/password_reset_created.rb +5 -5
- data/lib/workos/user_management/password_reset_succeeded.rb +5 -5
- data/lib/workos/user_management/session_created.rb +5 -5
- data/lib/workos/user_management/session_revoked.rb +5 -5
- data/lib/workos/user_management/user_api_key.rb +3 -0
- data/lib/workos/user_management/user_api_key_with_value.rb +3 -0
- data/lib/workos/user_management/user_created.rb +5 -5
- data/lib/workos/user_management/user_deleted.rb +5 -5
- data/lib/workos/user_management/user_updated.rb +5 -5
- data/lib/workos/user_management.rb +11 -214
- data/lib/workos/vault/actor.rb +22 -0
- data/lib/workos/vault/create_data_key_request.rb +18 -0
- data/lib/workos/vault/create_data_key_response.rb +28 -0
- data/lib/workos/vault/create_object_request.rb +25 -0
- data/lib/workos/vault/decrypt_request.rb +18 -0
- data/lib/workos/vault/decrypt_response.rb +22 -0
- data/lib/workos/vault/delete_object_response.rb +22 -0
- data/lib/workos/vault/object.rb +28 -0
- data/lib/workos/vault/object_metadata.rb +37 -0
- data/lib/workos/{audit_logs/audit_log_action_json.rb → vault/object_summary.rb} +4 -10
- data/lib/workos/vault/object_version.rb +31 -0
- data/lib/workos/vault/object_without_value.rb +25 -0
- data/lib/workos/vault/rekey_request.rb +22 -0
- data/lib/workos/vault/update_object_request.rb +22 -0
- data/lib/workos/vault/vault_byok_key_deleted.rb +5 -5
- data/lib/workos/vault/vault_byok_key_verification_completed.rb +5 -5
- data/lib/workos/vault/vault_data_created.rb +5 -5
- data/lib/workos/vault/vault_data_deleted.rb +5 -5
- data/lib/workos/vault/vault_data_read.rb +5 -5
- data/lib/workos/vault/vault_data_updated.rb +5 -5
- data/lib/workos/vault/vault_dek_decrypted.rb +5 -5
- data/lib/workos/vault/vault_dek_read.rb +5 -5
- data/lib/workos/vault/vault_kek_created.rb +5 -5
- data/lib/workos/vault/vault_metadata_read.rb +5 -5
- data/lib/workos/vault/vault_names_listed.rb +5 -5
- data/lib/workos/vault/version_list_response.rb +22 -0
- data/lib/workos/vault.rb +273 -139
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhooks/webhook_endpoint.rb +2 -7
- data/lib/workos/webhooks.rb +8 -9
- data/lib/workos.rb +1 -0
- data/rbi/workos/action_authentication_denied.rbi +10 -10
- data/rbi/workos/action_user_registration_denied.rbi +10 -10
- data/rbi/workos/actor.rbi +30 -0
- data/rbi/workos/api_key.rbi +6 -0
- data/rbi/workos/api_key_created.rbi +6 -6
- data/rbi/workos/api_key_created_data.rbi +6 -0
- data/rbi/workos/api_key_revoked.rbi +6 -6
- data/rbi/workos/api_key_revoked_data.rbi +6 -0
- data/rbi/workos/api_keys.rbi +2 -1
- data/rbi/workos/audit_log_action.rbi +1 -0
- data/rbi/workos/audit_log_export.rbi +1 -0
- data/rbi/workos/audit_log_schema.rbi +18 -0
- data/rbi/workos/{audit_log_schema_json_actor.rbi → audit_log_schema_actor_input.rbi} +1 -1
- data/rbi/workos/audit_log_schema_input.rbi +36 -0
- data/rbi/workos/{audit_log_schema_json_target.rbi → audit_log_schema_target_input.rbi} +1 -1
- data/rbi/workos/audit_logs.rbi +9 -9
- data/rbi/workos/audit_logs_retention.rbi +1 -0
- data/rbi/workos/authentication_email_verification_failed.rbi +6 -6
- data/rbi/workos/authentication_email_verification_succeeded.rbi +6 -6
- data/rbi/workos/authentication_magic_auth_failed.rbi +6 -6
- data/rbi/workos/authentication_magic_auth_succeeded.rbi +6 -6
- data/rbi/workos/authentication_mfa_failed.rbi +6 -6
- data/rbi/workos/authentication_mfa_succeeded.rbi +6 -6
- data/rbi/workos/authentication_oauth_failed.rbi +6 -6
- data/rbi/workos/authentication_oauth_succeeded.rbi +6 -6
- data/rbi/workos/authentication_passkey_failed.rbi +6 -6
- data/rbi/workos/authentication_passkey_succeeded.rbi +6 -6
- data/rbi/workos/authentication_password_failed.rbi +6 -6
- data/rbi/workos/authentication_password_succeeded.rbi +6 -6
- data/rbi/workos/authentication_radar_risk_detected.rbi +6 -6
- data/rbi/workos/authentication_sso_failed.rbi +6 -6
- data/rbi/workos/authentication_sso_started.rbi +6 -6
- data/rbi/workos/authentication_sso_succeeded.rbi +6 -6
- data/rbi/workos/authentication_sso_timed_out.rbi +6 -6
- data/rbi/workos/authorization.rbi +9 -5
- data/rbi/workos/client.rbi +6 -3
- data/rbi/workos/connect_application.rbi +0 -12
- data/rbi/workos/{webhook_endpoint_json.rbi → connect_application_m2m.rbi} +23 -11
- data/rbi/workos/connect_application_oauth.rbi +102 -0
- data/rbi/workos/connect_application_oauth_redirect_uris.rbi +30 -0
- data/rbi/workos/connection_activated.rbi +6 -6
- data/rbi/workos/connection_deactivated.rbi +6 -6
- data/rbi/workos/connection_deleted.rbi +6 -6
- data/rbi/workos/connection_saml_certificate_renewal_required.rbi +6 -6
- data/rbi/workos/connection_saml_certificate_renewed.rbi +6 -6
- data/rbi/workos/{audit_logs_retention_json.rbi → create_data_key_request.rbi} +5 -5
- data/rbi/workos/create_data_key_response.rbi +42 -0
- data/rbi/workos/create_object_request.rbi +36 -0
- data/rbi/workos/create_organization_api_key.rbi +6 -0
- data/rbi/workos/create_user_api_key.rbi +6 -0
- data/rbi/workos/decrypt_request.rbi +24 -0
- data/rbi/workos/decrypt_response.rbi +30 -0
- data/rbi/workos/delete_object_response.rbi +30 -0
- data/rbi/workos/dsync_activated.rbi +6 -6
- data/rbi/workos/dsync_deactivated.rbi +6 -6
- data/rbi/workos/dsync_deleted.rbi +6 -6
- data/rbi/workos/dsync_group_created.rbi +6 -6
- data/rbi/workos/dsync_group_deleted.rbi +6 -6
- data/rbi/workos/dsync_group_updated.rbi +6 -6
- data/rbi/workos/dsync_group_user_added.rbi +6 -6
- data/rbi/workos/dsync_group_user_removed.rbi +6 -6
- data/rbi/workos/dsync_user_created.rbi +6 -6
- data/rbi/workos/dsync_user_deleted.rbi +6 -6
- data/rbi/workos/dsync_user_updated.rbi +6 -6
- data/rbi/workos/email_verification_created.rbi +6 -6
- data/rbi/workos/error_response.rbi +24 -0
- data/rbi/workos/flag_created.rbi +6 -6
- data/rbi/workos/flag_deleted.rbi +6 -6
- data/rbi/workos/flag_rule_updated.rbi +6 -6
- data/rbi/workos/flag_updated.rbi +6 -6
- data/rbi/workos/group_created.rbi +6 -6
- data/rbi/workos/group_deleted.rbi +6 -6
- data/rbi/workos/group_member_added.rbi +6 -6
- data/rbi/workos/group_member_removed.rbi +6 -6
- data/rbi/workos/group_updated.rbi +6 -6
- data/rbi/workos/invitation_accepted.rbi +6 -6
- data/rbi/workos/invitation_created.rbi +6 -6
- data/rbi/workos/invitation_resent.rbi +6 -6
- data/rbi/workos/invitation_revoked.rbi +6 -6
- data/rbi/workos/magic_auth_created.rbi +6 -6
- data/rbi/workos/object.rbi +42 -0
- data/rbi/workos/object_metadata.rbi +60 -0
- data/rbi/workos/object_summary.rbi +36 -0
- data/rbi/workos/{audit_log_action_json.rbi → object_version.rbi} +17 -17
- data/rbi/workos/object_without_value.rbi +36 -0
- data/rbi/workos/organization_api_key.rbi +6 -0
- data/rbi/workos/organization_api_key_with_value.rbi +6 -0
- data/rbi/workos/organization_created.rbi +6 -6
- data/rbi/workos/organization_deleted.rbi +6 -6
- data/rbi/workos/organization_domain_created.rbi +6 -6
- data/rbi/workos/organization_domain_deleted.rbi +6 -6
- data/rbi/workos/organization_domain_updated.rbi +6 -6
- data/rbi/workos/organization_domain_verification_failed.rbi +6 -6
- data/rbi/workos/organization_domain_verified.rbi +6 -6
- data/rbi/workos/organization_membership_created.rbi +6 -6
- data/rbi/workos/organization_membership_deleted.rbi +6 -6
- data/rbi/workos/organization_membership_service.rbi +114 -0
- data/rbi/workos/organization_membership_updated.rbi +6 -6
- data/rbi/workos/organization_role_created.rbi +6 -6
- data/rbi/workos/organization_role_deleted.rbi +6 -6
- data/rbi/workos/organization_role_updated.rbi +6 -6
- data/rbi/workos/organization_updated.rbi +6 -6
- data/rbi/workos/password_reset_created.rbi +6 -6
- data/rbi/workos/password_reset_succeeded.rbi +6 -6
- data/rbi/workos/permission_created.rbi +6 -6
- data/rbi/workos/permission_deleted.rbi +6 -6
- data/rbi/workos/permission_updated.rbi +6 -6
- data/rbi/workos/pipe_connected_account.rbi +78 -0
- data/rbi/workos/{audit_log_export_json.rbi → pipes_connected_account_connected.rbi} +11 -11
- data/rbi/workos/pipes_connected_account_disconnected.rbi +54 -0
- data/rbi/workos/pipes_connected_account_reauthorization_needed.rbi +54 -0
- data/rbi/workos/radar.rbi +1 -3
- data/rbi/workos/radar_standalone_assess_request.rbi +0 -12
- data/rbi/workos/rekey_request.rbi +30 -0
- data/rbi/workos/role_created.rbi +6 -6
- data/rbi/workos/role_deleted.rbi +6 -6
- data/rbi/workos/role_updated.rbi +6 -6
- data/rbi/workos/session_created.rbi +6 -6
- data/rbi/workos/session_manager.rbi +1 -1
- data/rbi/workos/session_revoked.rbi +6 -6
- data/rbi/workos/update_object_request.rbi +30 -0
- data/rbi/workos/user_api_key.rbi +6 -0
- data/rbi/workos/user_api_key_with_value.rbi +6 -0
- data/rbi/workos/user_created.rbi +6 -6
- data/rbi/workos/user_deleted.rbi +6 -6
- data/rbi/workos/user_management.rbi +2 -90
- data/rbi/workos/user_updated.rbi +6 -6
- data/rbi/workos/vault.rbi +70 -95
- data/rbi/workos/vault_byok_key_deleted.rbi +6 -6
- data/rbi/workos/vault_byok_key_verification_completed.rbi +6 -6
- data/rbi/workos/vault_data_created.rbi +6 -6
- data/rbi/workos/vault_data_deleted.rbi +6 -6
- data/rbi/workos/vault_data_read.rbi +6 -6
- data/rbi/workos/vault_data_updated.rbi +6 -6
- data/rbi/workos/vault_dek_decrypted.rbi +6 -6
- data/rbi/workos/vault_dek_read.rbi +6 -6
- data/rbi/workos/vault_kek_created.rbi +6 -6
- data/rbi/workos/vault_metadata_read.rbi +6 -6
- data/rbi/workos/vault_names_listed.rbi +6 -6
- data/rbi/workos/waitlist_user_approved.rbi +6 -6
- data/rbi/workos/waitlist_user_created.rbi +6 -6
- data/rbi/workos/waitlist_user_denied.rbi +6 -6
- data/rbi/workos/webhook_endpoint.rbi +1 -0
- data/rbi/workos/webhooks.rbi +2 -2
- data/renovate.json +1 -1
- data/test/workos/test_actions.rb +9 -0
- data/test/workos/test_base_client.rb +44 -0
- data/test/workos/test_encryptors_aes_gcm.rb +16 -1
- data/test/workos/test_model_round_trip.rb +577 -212
- data/test/workos/test_organization_membership_service.rb +107 -0
- data/test/workos/test_session.rb +43 -4
- data/test/workos/test_user_management.rb +0 -74
- data/test/workos/test_vault.rb +91 -87
- data/test/workos/test_webhook_verify.rb +11 -0
- metadata +65 -41
- data/lib/workos/audit_logs/audit_log_schema_json.rb +0 -34
- data/lib/workos/organizations/audit_logs_retention_json.rb +0 -18
- data/lib/workos/types/audit_log_export_json_state.rb +0 -14
- data/lib/workos/types/webhook_endpoint_json_status.rb +0 -9
- data/lib/workos/user_management_organization_membership_groups.rb +0 -60
- data/lib/workos/webhooks/webhook_endpoint_json.rb +0 -40
- data/rbi/workos/actions.rbi +0 -48
- data/rbi/workos/audit_log_schema_json.rbi +0 -54
- data/rbi/workos/base_client.rbi +0 -132
- data/rbi/workos/configuration.rbi +0 -68
- data/rbi/workos/encryptors/aes_gcm.rbi +0 -19
- data/rbi/workos/errors.rbi +0 -43
- data/rbi/workos/hash_provider.rbi +0 -18
- data/rbi/workos/passwordless.rbi +0 -47
- data/rbi/workos/public_client.rbi +0 -12
- data/rbi/workos/session.rbi +0 -43
- data/rbi/workos/types/api_response.rbi +0 -29
- data/rbi/workos/types/base_model.rbi +0 -22
- data/rbi/workos/types/list_struct.rbi +0 -89
- data/rbi/workos/user_management_organization_membership_groups.rbi +0 -25
- data/rbi/workos/util.rbi +0 -12
- data/test/workos/test_user_management_organization_membership_groups.rb +0 -33
- /data/lib/workos/{user_management → organization_membership}/create_user_organization_membership.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/organization_membership.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/update_user_organization_membership.rb +0 -0
- /data/lib/workos/{user_management → organization_membership}/user_organization_membership.rb +0 -0
data/lib/workos/radar.rb
CHANGED
|
@@ -16,8 +16,6 @@ module WorkOS
|
|
|
16
16
|
# @param email [String] The email address of the user making the request.
|
|
17
17
|
# @param auth_method [WorkOS::Types::RadarStandaloneAssessRequestAuthMethod] The authentication method being used.
|
|
18
18
|
# @param action [WorkOS::Types::RadarStandaloneAssessRequestAction] The action being performed.
|
|
19
|
-
# @param device_fingerprint [String, nil] An optional device fingerprint for the request.
|
|
20
|
-
# @param bot_score [String, nil] An optional bot detection score for the request.
|
|
21
19
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
22
20
|
# @return [WorkOS::RadarStandaloneResponse]
|
|
23
21
|
def create_attempt(
|
|
@@ -26,8 +24,6 @@ module WorkOS
|
|
|
26
24
|
email:,
|
|
27
25
|
auth_method:,
|
|
28
26
|
action:,
|
|
29
|
-
device_fingerprint: nil,
|
|
30
|
-
bot_score: nil,
|
|
31
27
|
request_options: {}
|
|
32
28
|
)
|
|
33
29
|
body = {
|
|
@@ -35,10 +31,8 @@ module WorkOS
|
|
|
35
31
|
"user_agent" => user_agent,
|
|
36
32
|
"email" => email,
|
|
37
33
|
"auth_method" => auth_method,
|
|
38
|
-
"action" => action
|
|
39
|
-
|
|
40
|
-
"bot_score" => bot_score
|
|
41
|
-
}.compact
|
|
34
|
+
"action" => action
|
|
35
|
+
}
|
|
42
36
|
response = @client.request(
|
|
43
37
|
method: :post,
|
|
44
38
|
path: "/radar/attempts",
|
|
@@ -78,8 +72,8 @@ module WorkOS
|
|
|
78
72
|
end
|
|
79
73
|
|
|
80
74
|
# Add an entry to a Radar list
|
|
81
|
-
# @param type [WorkOS::Types::
|
|
82
|
-
# @param action [WorkOS::Types::
|
|
75
|
+
# @param type [WorkOS::Types::RadarListType] The type of the Radar list (e.g. ip_address, domain, email).
|
|
76
|
+
# @param action [WorkOS::Types::RadarListAction] The list action indicating whether to add the entry to the allow or block list.
|
|
83
77
|
# @param entry [String] The value to add to the list. Must match the format of the list type (e.g. a valid IP address for `ip_address`, a valid email for `email`).
|
|
84
78
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
85
79
|
# @return [WorkOS::RadarListEntryAlreadyPresentResponse]
|
|
@@ -105,8 +99,8 @@ module WorkOS
|
|
|
105
99
|
end
|
|
106
100
|
|
|
107
101
|
# Remove an entry from a Radar list
|
|
108
|
-
# @param type [WorkOS::Types::
|
|
109
|
-
# @param action [WorkOS::Types::
|
|
102
|
+
# @param type [WorkOS::Types::RadarListType] The type of the Radar list (e.g. ip_address, domain, email).
|
|
103
|
+
# @param action [WorkOS::Types::RadarListAction] The list action indicating whether to remove the entry from the allow or block list.
|
|
110
104
|
# @param entry [String] The value to remove from the list. Must match an existing entry.
|
|
111
105
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
112
106
|
# @return [void]
|
data/lib/workos/session.rb
CHANGED
|
@@ -21,8 +21,16 @@ module WorkOS
|
|
|
21
21
|
# @example Build a logout URL
|
|
22
22
|
# url = session.get_logout_url(return_to: "https://app.example.com")
|
|
23
23
|
class Session
|
|
24
|
+
# Minimum cookie_password byte length. AES-256-GCM derives a 32-byte
|
|
25
|
+
# key from the password via SHA-256; a passphrase shorter than the
|
|
26
|
+
# output it derives to provides less than the full keyspace and makes
|
|
27
|
+
# offline brute-force feasible. Require callers to supply at least 32
|
|
28
|
+
# bytes of high-entropy secret. See README + V7_MIGRATION_GUIDE.md.
|
|
29
|
+
MIN_COOKIE_PASSWORD_BYTES = 32
|
|
30
|
+
|
|
24
31
|
def initialize(manager, seal_data:, cookie_password:)
|
|
25
32
|
raise ArgumentError, "cookie_password is required" if cookie_password.nil? || cookie_password.empty?
|
|
33
|
+
raise ArgumentError, "cookie_password must be at least #{MIN_COOKIE_PASSWORD_BYTES} bytes" if cookie_password.bytesize < MIN_COOKIE_PASSWORD_BYTES
|
|
26
34
|
@manager = manager
|
|
27
35
|
@client = manager.client
|
|
28
36
|
@seal_data = seal_data
|
|
@@ -57,7 +65,7 @@ module WorkOS
|
|
|
57
65
|
return SessionManager::AuthError.new(authenticated: false, reason: SessionManager::INVALID_JWT)
|
|
58
66
|
end
|
|
59
67
|
|
|
60
|
-
is_expired = decoded["exp"]
|
|
68
|
+
is_expired = decoded["exp"].nil? || decoded["exp"] < Time.now.to_i
|
|
61
69
|
|
|
62
70
|
SessionManager::AuthSuccess.new(
|
|
63
71
|
authenticated: !is_expired,
|
|
@@ -77,6 +85,11 @@ module WorkOS
|
|
|
77
85
|
|
|
78
86
|
def refresh(organization_id: nil, cookie_password: nil)
|
|
79
87
|
effective_password = cookie_password || @cookie_password
|
|
88
|
+
# Validate up front so a caller-supplied short password raises ArgumentError
|
|
89
|
+
# (matching Session#initialize) instead of being swallowed by the
|
|
90
|
+
# unseal_data rescue and surfacing as INVALID_SESSION_COOKIE.
|
|
91
|
+
raise ArgumentError, "cookie_password is required" if effective_password.nil? || effective_password.empty?
|
|
92
|
+
raise ArgumentError, "cookie_password must be at least #{MIN_COOKIE_PASSWORD_BYTES} bytes" if effective_password.bytesize < MIN_COOKIE_PASSWORD_BYTES
|
|
80
93
|
|
|
81
94
|
session = begin
|
|
82
95
|
@manager.unseal_data(@seal_data, effective_password)
|
|
@@ -105,17 +118,20 @@ module WorkOS
|
|
|
105
118
|
impersonator: auth_response["impersonator"]
|
|
106
119
|
)
|
|
107
120
|
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
# Persist the new seal/password BEFORE decoding the JWT, so a transient
|
|
122
|
+
# JWKS fetch error (or any decode failure on the freshly-minted token)
|
|
123
|
+
# leaves the Session with a usable sealed cookie that the caller can
|
|
124
|
+
# re-#authenticate against, rather than half-updated state.
|
|
112
125
|
@seal_data = sealed
|
|
113
126
|
@cookie_password = effective_password
|
|
127
|
+
|
|
128
|
+
decoded = @manager.decode_jwt(auth_response["access_token"])
|
|
129
|
+
|
|
114
130
|
SessionManager::RefreshSuccess.new(
|
|
115
131
|
authenticated: true,
|
|
116
132
|
sealed_session: sealed,
|
|
117
133
|
session_id: decoded["sid"],
|
|
118
|
-
organization_id: decoded["org_id"],
|
|
134
|
+
organization_id: auth_response["organization_id"] || decoded["org_id"],
|
|
119
135
|
role: decoded["role"],
|
|
120
136
|
roles: decoded["roles"],
|
|
121
137
|
permissions: decoded["permissions"],
|
|
@@ -127,7 +143,12 @@ module WorkOS
|
|
|
127
143
|
rescue WorkOS::AuthenticationError, WorkOS::InvalidRequestError => e
|
|
128
144
|
SessionManager::RefreshError.new(authenticated: false, reason: e.message)
|
|
129
145
|
rescue JWT::DecodeError => e
|
|
130
|
-
|
|
146
|
+
# The refresh token was already rotated server-side before decode failed,
|
|
147
|
+
# so @seal_data holds the freshly-minted cookie. Surface it on the error
|
|
148
|
+
# struct so the caller can write the rotated cookie back to the browser
|
|
149
|
+
# and recover on a subsequent #authenticate, rather than re-sending the
|
|
150
|
+
# now-revoked refresh token.
|
|
151
|
+
SessionManager::RefreshError.new(authenticated: false, reason: e.message, sealed_session: @seal_data)
|
|
131
152
|
end
|
|
132
153
|
|
|
133
154
|
# Build the WorkOS session-logout URL for the currently authenticated session.
|
|
@@ -107,7 +107,7 @@ module WorkOS
|
|
|
107
107
|
:roles, :permissions, :entitlements, :user, :impersonator, :feature_flags,
|
|
108
108
|
keyword_init: true
|
|
109
109
|
)
|
|
110
|
-
RefreshError = Struct.new(:authenticated, :reason, keyword_init: true)
|
|
110
|
+
RefreshError = Struct.new(:authenticated, :reason, :sealed_session, keyword_init: true)
|
|
111
111
|
|
|
112
112
|
# Failure reason constants
|
|
113
113
|
NO_SESSION_COOKIE_PROVIDED = "no_session_cookie_provided"
|
|
@@ -150,12 +150,14 @@ module WorkOS
|
|
|
150
150
|
# H06 — Raw seal: encrypt arbitrary data with a key string.
|
|
151
151
|
# Delegates to the configured encryptor (default: AES-256-GCM).
|
|
152
152
|
def seal_data(data, key)
|
|
153
|
+
validate_cookie_password!(key)
|
|
153
154
|
@encryptor.seal(data, key)
|
|
154
155
|
end
|
|
155
156
|
|
|
156
157
|
# H06 — Raw unseal: returns parsed JSON (Hash) or raw string if not JSON.
|
|
157
158
|
# Delegates to the configured encryptor (default: AES-256-GCM).
|
|
158
159
|
def unseal_data(sealed, key)
|
|
160
|
+
validate_cookie_password!(key)
|
|
159
161
|
@encryptor.unseal(sealed, key)
|
|
160
162
|
end
|
|
161
163
|
|
|
@@ -164,11 +166,20 @@ module WorkOS
|
|
|
164
166
|
payload = {"access_token" => access_token, "refresh_token" => refresh_token}
|
|
165
167
|
payload["user"] = user if user
|
|
166
168
|
payload["impersonator"] = impersonator if impersonator
|
|
169
|
+
# Delegates to seal_data, which calls validate_cookie_password!; no need
|
|
170
|
+
# to validate here too.
|
|
167
171
|
seal_data(payload, cookie_password)
|
|
168
172
|
end
|
|
169
173
|
|
|
170
174
|
# Verify an access-token JWT against the WorkOS JWKS for this client.
|
|
171
175
|
# Used by Session#authenticate; exposed publicly for advanced cases.
|
|
176
|
+
#
|
|
177
|
+
# NOTE on iss/aud/required_claims: this method intentionally does not
|
|
178
|
+
# enforce iss, aud, or required_claims. workos-node's `jose` call and
|
|
179
|
+
# workos-php's `isset($exp) && $exp < time()` accept exp-less tokens, and
|
|
180
|
+
# cross-SDK parity is required for the planned coordinated hardening of
|
|
181
|
+
# these claims. See commit 9ce069f for the rationale behind dropping the
|
|
182
|
+
# required_claims: ['exp'] tightening that was considered here.
|
|
172
183
|
def decode_jwt(access_token, verify_expiration: true)
|
|
173
184
|
jwks = fetch_jwks
|
|
174
185
|
JWT.decode(
|
|
@@ -182,6 +193,18 @@ module WorkOS
|
|
|
182
193
|
).first
|
|
183
194
|
end
|
|
184
195
|
|
|
196
|
+
private
|
|
197
|
+
|
|
198
|
+
# Validate a cookie_password is non-empty and at least the minimum
|
|
199
|
+
# byte length required by Session::MIN_COOKIE_PASSWORD_BYTES (32).
|
|
200
|
+
# Defense-in-depth — Session#initialize enforces the same invariant
|
|
201
|
+
# on the load path; this guards the inline #seal_data / #unseal_data
|
|
202
|
+
# entry points.
|
|
203
|
+
def validate_cookie_password!(key)
|
|
204
|
+
raise ArgumentError, "cookie_password is required" if key.nil? || key.empty?
|
|
205
|
+
raise ArgumentError, "cookie_password must be at least #{Session::MIN_COOKIE_PASSWORD_BYTES} bytes" if key.bytesize < Session::MIN_COOKIE_PASSWORD_BYTES
|
|
206
|
+
end
|
|
207
|
+
|
|
185
208
|
# Cached JWKS fetch (5-minute TTL, thread-safe).
|
|
186
209
|
def fetch_jwks(now: Time.now)
|
|
187
210
|
@jwks_mutex.synchronize do
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ConnectApplicationM2M < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
client_id: :client_id,
|
|
11
|
+
description: :description,
|
|
12
|
+
name: :name,
|
|
13
|
+
scopes: :scopes,
|
|
14
|
+
created_at: :created_at,
|
|
15
|
+
updated_at: :updated_at,
|
|
16
|
+
application_type: :application_type,
|
|
17
|
+
organization_id: :organization_id
|
|
18
|
+
}.freeze
|
|
19
|
+
|
|
20
|
+
attr_accessor \
|
|
21
|
+
:object,
|
|
22
|
+
:id,
|
|
23
|
+
:client_id,
|
|
24
|
+
:description,
|
|
25
|
+
:name,
|
|
26
|
+
:scopes,
|
|
27
|
+
:created_at,
|
|
28
|
+
:updated_at,
|
|
29
|
+
:application_type,
|
|
30
|
+
:organization_id
|
|
31
|
+
|
|
32
|
+
def initialize(json)
|
|
33
|
+
hash = self.class.normalize(json)
|
|
34
|
+
@object = hash[:object]
|
|
35
|
+
@id = hash[:id]
|
|
36
|
+
@client_id = hash[:client_id]
|
|
37
|
+
@description = hash[:description]
|
|
38
|
+
@name = hash[:name]
|
|
39
|
+
@scopes = hash[:scopes] || []
|
|
40
|
+
@created_at = hash[:created_at]
|
|
41
|
+
@updated_at = hash[:updated_at]
|
|
42
|
+
@application_type = hash[:application_type]
|
|
43
|
+
@organization_id = hash[:organization_id]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ConnectApplicationOAuth < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
client_id: :client_id,
|
|
11
|
+
description: :description,
|
|
12
|
+
name: :name,
|
|
13
|
+
scopes: :scopes,
|
|
14
|
+
created_at: :created_at,
|
|
15
|
+
updated_at: :updated_at,
|
|
16
|
+
application_type: :application_type,
|
|
17
|
+
redirect_uris: :redirect_uris,
|
|
18
|
+
uses_pkce: :uses_pkce,
|
|
19
|
+
is_first_party: :is_first_party,
|
|
20
|
+
was_dynamically_registered: :was_dynamically_registered,
|
|
21
|
+
organization_id: :organization_id
|
|
22
|
+
}.freeze
|
|
23
|
+
|
|
24
|
+
attr_accessor \
|
|
25
|
+
:object,
|
|
26
|
+
:id,
|
|
27
|
+
:client_id,
|
|
28
|
+
:description,
|
|
29
|
+
:name,
|
|
30
|
+
:scopes,
|
|
31
|
+
:created_at,
|
|
32
|
+
:updated_at,
|
|
33
|
+
:application_type,
|
|
34
|
+
:redirect_uris,
|
|
35
|
+
:uses_pkce,
|
|
36
|
+
:is_first_party,
|
|
37
|
+
:was_dynamically_registered,
|
|
38
|
+
:organization_id
|
|
39
|
+
|
|
40
|
+
def initialize(json)
|
|
41
|
+
hash = self.class.normalize(json)
|
|
42
|
+
@object = hash[:object]
|
|
43
|
+
@id = hash[:id]
|
|
44
|
+
@client_id = hash[:client_id]
|
|
45
|
+
@description = hash[:description]
|
|
46
|
+
@name = hash[:name]
|
|
47
|
+
@scopes = hash[:scopes] || []
|
|
48
|
+
@created_at = hash[:created_at]
|
|
49
|
+
@updated_at = hash[:updated_at]
|
|
50
|
+
@application_type = hash[:application_type]
|
|
51
|
+
@redirect_uris = (hash[:redirect_uris] || []).map { |item| item ? WorkOS::ConnectApplicationOAuthRedirectUris.new(item) : nil }
|
|
52
|
+
@uses_pkce = hash[:uses_pkce]
|
|
53
|
+
@is_first_party = hash[:is_first_party]
|
|
54
|
+
@was_dynamically_registered = hash[:was_dynamically_registered]
|
|
55
|
+
@organization_id = hash[:organization_id]
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ConnectApplicationOAuthRedirectUris < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
uri: :uri,
|
|
9
|
+
default: :default
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:uri,
|
|
14
|
+
:default
|
|
15
|
+
|
|
16
|
+
def initialize(json)
|
|
17
|
+
hash = self.class.normalize(json)
|
|
18
|
+
@uri = hash[:uri]
|
|
19
|
+
@default = hash[:default]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class ErrorResponse < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
error: :error
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
attr_accessor :error
|
|
12
|
+
|
|
13
|
+
def initialize(json)
|
|
14
|
+
hash = self.class.normalize(json)
|
|
15
|
+
@error = hash[:error]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class GroupCreated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::Group.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class GroupDeleted < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::Group.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class GroupMemberAdded < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::GroupMemberAddedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class GroupMemberRemoved < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::GroupMemberRemovedData.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class GroupUpdated < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
8
9
|
id: :id,
|
|
9
10
|
event: :event,
|
|
10
11
|
data: :data,
|
|
11
12
|
created_at: :created_at,
|
|
12
|
-
context: :context
|
|
13
|
-
object: :object
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
|
+
:object,
|
|
17
18
|
:id,
|
|
18
19
|
:event,
|
|
19
20
|
:data,
|
|
20
21
|
:created_at,
|
|
21
|
-
:context
|
|
22
|
-
:object
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
26
27
|
@id = hash[:id]
|
|
27
28
|
@event = hash[:event]
|
|
28
29
|
@data = hash[:data] ? WorkOS::Group.new(hash[:data]) : nil
|
|
29
30
|
@created_at = hash[:created_at]
|
|
30
31
|
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
-
@object = hash[:object]
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class PipeConnectedAccount < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
data_integration_id: :data_integration_id,
|
|
11
|
+
provider_slug: :provider_slug,
|
|
12
|
+
user_id: :user_id,
|
|
13
|
+
organization_id: :organization_id,
|
|
14
|
+
scopes: :scopes,
|
|
15
|
+
state: :state,
|
|
16
|
+
created_at: :created_at,
|
|
17
|
+
updated_at: :updated_at
|
|
18
|
+
}.freeze
|
|
19
|
+
|
|
20
|
+
attr_accessor \
|
|
21
|
+
:object,
|
|
22
|
+
:id,
|
|
23
|
+
:data_integration_id,
|
|
24
|
+
:provider_slug,
|
|
25
|
+
:user_id,
|
|
26
|
+
:organization_id,
|
|
27
|
+
:scopes,
|
|
28
|
+
:state,
|
|
29
|
+
:created_at,
|
|
30
|
+
:updated_at
|
|
31
|
+
|
|
32
|
+
def initialize(json)
|
|
33
|
+
hash = self.class.normalize(json)
|
|
34
|
+
@object = hash[:object]
|
|
35
|
+
@id = hash[:id]
|
|
36
|
+
@data_integration_id = hash[:data_integration_id]
|
|
37
|
+
@provider_slug = hash[:provider_slug]
|
|
38
|
+
@user_id = hash[:user_id]
|
|
39
|
+
@organization_id = hash[:organization_id]
|
|
40
|
+
@scopes = hash[:scopes] || []
|
|
41
|
+
@state = hash[:state]
|
|
42
|
+
@created_at = hash[:created_at]
|
|
43
|
+
@updated_at = hash[:updated_at]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
data/lib/workos/{audit_logs/audit_log_export_json.rb → shared/pipes_connected_account_connected.rb}
RENAMED
|
@@ -3,32 +3,32 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
class
|
|
6
|
+
class PipesConnectedAccountConnected < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
8
|
object: :object,
|
|
9
9
|
id: :id,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
12
|
created_at: :created_at,
|
|
13
|
-
|
|
13
|
+
context: :context
|
|
14
14
|
}.freeze
|
|
15
15
|
|
|
16
16
|
attr_accessor \
|
|
17
17
|
:object,
|
|
18
18
|
:id,
|
|
19
|
-
:
|
|
20
|
-
:
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
21
|
:created_at,
|
|
22
|
-
:
|
|
22
|
+
:context
|
|
23
23
|
|
|
24
24
|
def initialize(json)
|
|
25
25
|
hash = self.class.normalize(json)
|
|
26
26
|
@object = hash[:object]
|
|
27
27
|
@id = hash[:id]
|
|
28
|
-
@
|
|
29
|
-
@
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::PipeConnectedAccount.new(hash[:data]) : nil
|
|
30
30
|
@created_at = hash[:created_at]
|
|
31
|
-
@
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class PipesConnectedAccountDisconnected < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::PipeConnectedAccount.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class PipesConnectedAccountReauthorizationNeeded < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::PipeConnectedAccount.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|