workos 9.5.1 → 10.3.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/.claude/CLAUDE.md +38 -0
- data/.github/workflows/block-generated-edits.yml +13 -0
- data/.github/workflows/ci.yml +2 -2
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +11 -6
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +502 -57
- data/.release-please-manifest.json +1 -1
- data/AGENTS.md +1 -0
- data/CHANGELOG.md +330 -2
- data/Gemfile.lock +2 -2
- data/README.md +15 -14
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request.rb +28 -0
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request_user.rb +22 -0
- data/lib/workos/agents/agent_admin_validate_credential_request.rb +25 -0
- data/lib/workos/agents/agent_blueprint.rb +43 -0
- data/lib/workos/agents/agent_blueprint_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprint_session_setting.rb +25 -0
- data/lib/workos/agents/agent_blueprints_create_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb +22 -0
- data/lib/workos/agents/agent_blueprints_create_request_session_setting.rb +7 -0
- data/lib/workos/agents/agent_blueprints_token_mint_token_request.rb +34 -0
- data/lib/workos/agents/agent_blueprints_token_validate_token_request.rb +18 -0
- data/lib/workos/agents/agent_blueprints_update_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprints_update_request_session_setting.rb +25 -0
- data/lib/workos/agents/agent_credential_validation.rb +25 -0
- data/lib/workos/{organization_domains/organization_domain_stand_alone.rb → agents/agent_instance.rb} +10 -16
- data/lib/workos/agents/agent_instance_session.rb +40 -0
- data/lib/workos/agents/agent_registration.rb +40 -0
- data/lib/workos/agents/agent_registration_agent_identity.rb +28 -0
- data/lib/workos/agents/agent_registration_claim.rb +31 -0
- data/lib/workos/agents/agent_registration_claim_claim_completion.rb +31 -0
- data/lib/workos/agents/agent_token.rb +40 -0
- data/lib/workos/agents/agent_token_validation.rb +40 -0
- data/lib/workos/agents/claim_view_response.rb +28 -0
- data/lib/workos/agents/claim_view_response_organization.rb +7 -0
- data/lib/workos/agents.rb +488 -0
- data/lib/workos/api_keys/api_key_validation_response.rb +6 -2
- data/lib/workos/api_keys/validate_api_key.rb +1 -12
- data/lib/workos/api_keys.rb +3 -4
- data/lib/workos/audit_logs.rb +23 -5
- data/lib/workos/authorization/permission_created_data.rb +1 -34
- data/lib/workos/authorization/permission_deleted_data.rb +1 -1
- data/lib/workos/authorization/permission_updated_data.rb +1 -1
- data/lib/workos/authorization.rb +27 -27
- data/lib/workos/base_client.rb +4 -4
- data/lib/workos/client.rb +8 -0
- data/lib/workos/connect.rb +25 -21
- data/lib/workos/directory_sync.rb +10 -2
- data/lib/workos/events.rb +2 -2
- data/lib/workos/groups.rb +13 -9
- data/lib/workos/inflections.rb +15 -1
- data/lib/workos/organization_domains.rb +4 -4
- data/lib/workos/{sso/connection_option.rb → organizations/create_it_contact.rb} +4 -4
- data/lib/workos/organizations/invite_it_contact.rb +18 -0
- data/lib/workos/organizations/it_contact.rb +31 -0
- data/lib/workos/organizations/it_contact_list.rb +25 -0
- data/lib/workos/organizations/organization_authorized_connect_application_list_data.rb +34 -0
- data/lib/workos/organizations/organization_input.rb +10 -1
- data/lib/workos/organizations/update_audit_logs_retention.rb +13 -1
- data/lib/workos/organizations.rb +167 -11
- data/lib/workos/pipes/api_key_installation.rb +25 -0
- data/lib/workos/pipes/connected_account.rb +9 -0
- data/lib/workos/pipes/{connected_account_dto.rb → connected_account_input.rb} +1 -1
- data/lib/workos/pipes/create_data_integration.rb +10 -1
- data/lib/workos/pipes/data_integration.rb +9 -0
- data/lib/workos/pipes/{data_integration_credentials_dto.rb → data_integration_credentials_input.rb} +1 -1
- data/lib/workos/pipes/data_integration_installation.rb +28 -0
- data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +5 -2
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +1 -19
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
- data/lib/workos/pipes/update_data_integration.rb +4 -1
- data/lib/workos/pipes.rb +69 -17
- data/lib/workos/pipes_provider/configure_data_integration_body.rb +5 -2
- data/lib/workos/pipes_provider/data_integration_configuration_response.rb +3 -0
- data/lib/workos/pipes_provider.rb +6 -3
- data/lib/workos/platform_teams/create_team.rb +22 -0
- data/lib/workos/platform_teams/team.rb +37 -0
- data/lib/workos/platform_teams.rb +58 -0
- data/lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb +25 -0
- data/lib/workos/shared/agent_blueprint_created.rb +34 -0
- data/lib/workos/shared/agent_blueprint_created_data.rb +43 -0
- data/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb +22 -0
- data/lib/workos/shared/agent_blueprint_created_data_session_setting.rb +25 -0
- data/lib/workos/shared/agent_blueprint_deleted.rb +34 -0
- data/lib/workos/shared/agent_blueprint_deleted_data.rb +31 -0
- data/lib/workos/shared/agent_blueprint_updated.rb +34 -0
- data/lib/workos/shared/agent_blueprint_updated_data.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb +7 -0
- data/lib/workos/shared/agent_instance_created.rb +34 -0
- data/lib/workos/shared/agent_instance_created_data.rb +40 -0
- data/lib/workos/shared/agent_instance_deleted.rb +34 -0
- data/lib/workos/shared/agent_instance_deleted_data.rb +40 -0
- data/lib/workos/shared/agent_instance_session_created.rb +34 -0
- data/lib/workos/shared/agent_instance_session_created_data.rb +43 -0
- data/lib/workos/shared/agent_instance_session_revoked.rb +34 -0
- data/lib/workos/shared/agent_instance_session_revoked_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_completed_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed_data_claimed_by.rb +22 -0
- data/lib/workos/shared/agent_registration_created.rb +34 -0
- data/lib/workos/shared/agent_registration_created_data.rb +43 -0
- data/lib/workos/shared/agent_registration_created_data_agent_identity.rb +25 -0
- data/lib/workos/shared/agent_registration_credential_issued.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data_detail.rb +22 -0
- data/lib/workos/shared/agent_registration_deleted.rb +34 -0
- data/lib/workos/shared/agent_registration_deleted_data.rb +18 -0
- data/lib/workos/shared/agent_registration_expired.rb +34 -0
- data/lib/workos/shared/agent_registration_expired_data.rb +7 -0
- data/lib/workos/shared/agent_registration_organization_switched.rb +34 -0
- data/lib/workos/shared/agent_registration_organization_switched_data.rb +25 -0
- data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
- data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
- data/lib/workos/shared/agent_registration_revoked.rb +34 -0
- data/lib/workos/shared/agent_registration_revoked_data.rb +7 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +46 -0
- data/lib/workos/shared/radar_challenge_created.rb +34 -0
- data/lib/workos/shared/radar_challenge_created_data.rb +28 -0
- data/lib/workos/shared/resource_export_completed.rb +34 -0
- data/lib/workos/shared/resource_export_completed_data.rb +22 -0
- data/lib/workos/shared/resource_export_created.rb +34 -0
- data/lib/workos/shared/resource_export_created_data.rb +22 -0
- data/lib/workos/shared/resource_export_downloaded.rb +34 -0
- data/lib/workos/shared/resource_export_downloaded_data.rb +22 -0
- data/lib/workos/shared/resource_export_failed.rb +34 -0
- data/lib/workos/shared/resource_export_failed_data.rb +22 -0
- data/lib/workos/shared/waitlist_user.rb +11 -5
- data/lib/workos/sso/connection.rb +0 -3
- data/lib/workos/sso/create_connection.rb +37 -0
- data/lib/workos/sso/create_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/create_connection_key_pair.rb +22 -0
- data/lib/workos/sso/create_connection_oidc_options.rb +43 -0
- data/lib/workos/sso/create_connection_saml_options.rb +40 -0
- data/lib/workos/sso/create_connection_standard_attributes.rb +34 -0
- data/lib/workos/{admin_portal/domain_verification_intent_options.rb → sso/create_saml_idp_signing_certificate.rb} +4 -4
- data/lib/workos/sso/patch_connection.rb +34 -0
- data/lib/workos/sso/patch_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/patch_connection_oidc_options.rb +40 -0
- data/lib/workos/sso/patch_connection_saml_options.rb +31 -0
- data/lib/workos/sso/patch_connection_standard_attributes.rb +7 -0
- data/lib/workos/sso/saml_idp_signing_certificate.rb +34 -0
- data/lib/workos/sso/saml_idp_signing_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_encryption_certificate.rb +34 -0
- data/lib/workos/sso/saml_sp_encryption_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_signing_certificate.rb +34 -0
- data/lib/workos/sso/token_query.rb +11 -2
- data/lib/workos/sso.rb +378 -30
- data/lib/workos/types/agent_admin_validate_credential_request_type.rb +13 -0
- data/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb +15 -0
- data/lib/workos/types/agent_instance_created_data_type.rb +13 -0
- data/lib/workos/types/{data_integration_credentials_type.rb → agent_instance_deleted_data_type.rb} +1 -1
- data/lib/workos/types/agent_instance_session_status.rb +14 -0
- data/lib/workos/types/{organization_domain_stand_alone_state.rb → agent_instance_type.rb} +1 -1
- data/lib/workos/types/agent_registration_created_data_kind.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_method.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_status.rb +15 -0
- data/lib/workos/types/{organization_domain_stand_alone_verification_strategy.rb → agent_registration_kind.rb} +1 -1
- data/lib/workos/types/agent_registration_status.rb +9 -0
- data/lib/workos/types/applications_registration_types.rb +13 -0
- data/lib/workos/types/authenticate_response_authentication_method.rb +1 -2
- data/lib/workos/types/claim_view_response_status.rb +9 -0
- data/lib/workos/types/connected_account_auth_method.rb +2 -1
- data/lib/workos/types/connected_account_input_state.rb +13 -0
- data/lib/workos/types/connected_account_state.rb +2 -1
- data/lib/workos/types/connection_activated_data_connection_type.rb +1 -2
- data/lib/workos/types/connection_type.rb +1 -2
- data/lib/workos/types/connections_connection_type.rb +1 -2
- data/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb +24 -0
- data/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb +14 -0
- data/lib/workos/types/create_data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/create_user_password_hash_type.rb +2 -1
- data/lib/workos/types/create_user_password_salt_position.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +13 -1
- data/lib/workos/types/data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/data_integration_credentials_input_type.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_state.rb +1 -6
- data/lib/workos/types/invite_it_contact_intents.rb +16 -0
- data/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb +9 -0
- data/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb +9 -0
- data/lib/workos/types/pipe_connected_account_state.rb +1 -5
- data/lib/workos/types/resource_export_completed_data_resource_type.rb +16 -0
- data/lib/workos/types/resource_export_created_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_downloaded_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_failed_data_resource_type.rb +9 -0
- data/lib/workos/types/session_created_data_status.rb +1 -6
- data/lib/workos/types/session_revoked_data_status.rb +1 -1
- data/lib/workos/types/sso_grant_type.rb +13 -0
- data/lib/workos/types/team_production_state.rb +15 -0
- data/lib/workos/types/token_query_grant_type.rb +9 -0
- data/lib/workos/types/update_audit_logs_retention_retention_period.rb +32 -0
- data/lib/workos/types/update_user_password_salt_position.rb +9 -0
- data/lib/workos/types/user_identities_get_item_provider.rb +1 -2
- data/lib/workos/types/user_management_waitlists_state.rb +14 -0
- data/lib/workos/types/user_sessions_status.rb +1 -1
- data/lib/workos/types/vault_kek_deleted_data_actor_source.rb +9 -0
- data/lib/workos/types/waitlist_entry_state.rb +9 -0
- data/lib/workos/types/waitlist_user_state.rb +1 -6
- data/lib/workos/user_management/authentication_oauth_failed_data.rb +5 -2
- data/lib/workos/user_management/authentication_oauth_succeeded_data.rb +5 -2
- data/lib/workos/user_management/authentication_reauthentication_succeeded.rb +34 -0
- data/lib/workos/user_management/authentication_reauthentication_succeeded_data.rb +34 -0
- data/lib/workos/user_management/create_password_reset_token.rb +1 -12
- data/lib/workos/user_management/create_user.rb +5 -2
- data/lib/workos/user_management/create_waitlist_entry.rb +25 -0
- data/lib/workos/user_management/email_completion_session_authenticate_request.rb +43 -0
- data/lib/workos/user_management/radar_challenge.rb +43 -0
- data/lib/workos/user_management/update_user.rb +5 -2
- data/lib/workos/user_management/waitlist.rb +28 -0
- data/lib/workos/user_management/waitlist_entry.rb +43 -0
- data/lib/workos/user_management.rb +340 -74
- data/lib/workos/vault/vault_kek_deleted.rb +34 -0
- data/lib/workos/vault/vault_kek_deleted_data.rb +31 -0
- data/lib/workos/vault.rb +4 -4
- data/lib/workos/version.rb +1 -1
- data/lib/workos/widgets.rb +2 -2
- data/lib/workos.rb +12 -0
- data/rbi/workos/access_token_agent_registration_credential_issued_data_detail.rbi +36 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request.rbi +42 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request_user.rbi +30 -0
- data/rbi/workos/agent_admin_validate_credential_request.rbi +36 -0
- data/rbi/workos/agent_blueprint.rbi +72 -0
- data/rbi/workos/agent_blueprint_created.rbi +54 -0
- data/rbi/workos/agent_blueprint_created_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_created_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_created_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_deleted.rbi +54 -0
- data/rbi/workos/agent_blueprint_deleted_data.rbi +48 -0
- data/rbi/workos/agent_blueprint_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_updated.rbi +54 -0
- data/rbi/workos/agent_blueprint_updated_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_create_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_create_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_token_mint_token_request.rbi +54 -0
- data/rbi/workos/{domain_verification_intent_options.rbi → agent_blueprints_token_validate_token_request.rbi} +5 -5
- data/rbi/workos/agent_blueprints_update_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_update_request_session_setting.rbi +36 -0
- data/rbi/workos/{sso_intent_options.rbi → agent_credential_validation.rbi} +11 -5
- data/rbi/workos/agent_instance.rbi +66 -0
- data/rbi/workos/agent_instance_created.rbi +54 -0
- data/rbi/workos/agent_instance_created_data.rbi +66 -0
- data/rbi/workos/agent_instance_deleted.rbi +54 -0
- data/rbi/workos/agent_instance_deleted_data.rbi +66 -0
- data/rbi/workos/agent_instance_session.rbi +66 -0
- data/rbi/workos/agent_instance_session_created.rbi +54 -0
- data/rbi/workos/agent_instance_session_created_data.rbi +72 -0
- data/rbi/workos/agent_instance_session_revoked.rbi +54 -0
- data/rbi/workos/agent_instance_session_revoked_data.rbi +66 -0
- data/rbi/workos/agent_registration.rbi +66 -0
- data/rbi/workos/agent_registration_agent_identity.rbi +42 -0
- data/rbi/workos/agent_registration_claim.rbi +48 -0
- data/rbi/workos/agent_registration_claim_attempt_created.rbi +54 -0
- data/rbi/workos/agent_registration_claim_attempt_created_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_claim_completion.rbi +48 -0
- data/rbi/workos/agent_registration_claim_completed.rbi +54 -0
- data/rbi/workos/agent_registration_claim_completed_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_completed_data_claimed_by.rbi +30 -0
- data/rbi/workos/agent_registration_created.rbi +54 -0
- data/rbi/workos/agent_registration_created_data.rbi +72 -0
- data/rbi/workos/agent_registration_created_data_agent_identity.rbi +36 -0
- data/rbi/workos/agent_registration_credential_issued.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data_detail.rbi +30 -0
- data/rbi/workos/agent_registration_deleted.rbi +54 -0
- data/rbi/workos/{connection_option.rbi → agent_registration_deleted_data.rbi} +5 -5
- data/rbi/workos/agent_registration_expired.rbi +54 -0
- data/rbi/workos/agent_registration_expired_data.rbi +24 -0
- data/rbi/workos/agent_registration_organization_switched.rbi +54 -0
- data/rbi/workos/agent_registration_organization_switched_data.rbi +36 -0
- data/rbi/workos/agent_registration_refreshed.rbi +54 -0
- data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
- data/rbi/workos/agent_registration_revoked.rbi +54 -0
- data/rbi/workos/agent_registration_revoked_data.rbi +24 -0
- data/rbi/workos/agent_token.rbi +66 -0
- data/rbi/workos/agent_token_validation.rbi +66 -0
- data/rbi/workos/agents.rbi +175 -0
- data/rbi/workos/api_key_installation.rbi +36 -0
- data/rbi/workos/api_key_validation_response.rbi +6 -0
- data/rbi/workos/audit_logs.rbi +26 -2
- data/rbi/workos/authentication_oauth_failed_data.rbi +6 -0
- data/rbi/workos/authentication_oauth_succeeded_data.rbi +6 -0
- data/rbi/workos/authentication_reauthentication_succeeded.rbi +54 -0
- data/rbi/workos/authentication_reauthentication_succeeded_data.rbi +54 -0
- data/rbi/workos/claim_view_response.rbi +42 -0
- data/rbi/workos/claim_view_response_organization.rbi +30 -0
- data/rbi/workos/client.rbi +6 -0
- data/rbi/workos/configure_data_integration_body.rbi +6 -0
- data/rbi/workos/connect.rbi +2 -1
- data/rbi/workos/connected_account.rbi +18 -0
- data/rbi/workos/{connected_account_dto.rbi → connected_account_input.rbi} +1 -1
- data/rbi/workos/connection.rbi +0 -6
- data/rbi/workos/create_connection.rbi +60 -0
- data/rbi/workos/create_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/create_connection_key_pair.rbi +30 -0
- data/rbi/workos/create_connection_oidc_options.rbi +72 -0
- data/rbi/workos/create_connection_saml_options.rbi +66 -0
- data/rbi/workos/create_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/create_data_integration.rbi +20 -2
- data/rbi/workos/create_it_contact.rbi +24 -0
- data/rbi/workos/create_saml_idp_signing_certificate.rbi +24 -0
- data/rbi/workos/create_team.rbi +30 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/create_waitlist_entry.rbi +36 -0
- data/rbi/workos/custom_provider_definition.rbi +4 -4
- data/rbi/workos/data_integration.rbi +20 -2
- data/rbi/workos/data_integration_configuration_response.rbi +6 -0
- data/rbi/workos/{data_integration_credentials_dto.rbi → data_integration_credentials_input.rbi} +1 -1
- data/rbi/workos/data_integration_installation.rbi +42 -0
- data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
- data/rbi/workos/directory_sync.rbi +3 -1
- data/rbi/workos/email_completion_session_authenticate_request.rbi +72 -0
- data/rbi/workos/events.rbi +2 -2
- data/rbi/workos/groups.rbi +2 -1
- data/rbi/workos/invite_it_contact.rbi +24 -0
- data/rbi/workos/it_contact.rbi +48 -0
- data/rbi/workos/organization_authorized_connect_application_list_data.rbi +54 -0
- data/rbi/workos/organization_domains.rbi +2 -2
- data/rbi/workos/organizations.rbi +57 -0
- data/rbi/workos/patch_connection.rbi +54 -0
- data/rbi/workos/patch_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/patch_connection_oidc_options.rbi +66 -0
- data/rbi/workos/patch_connection_saml_options.rbi +48 -0
- data/rbi/workos/patch_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/permission_created_data.rbi +6 -0
- data/rbi/workos/permission_deleted_data.rbi +6 -0
- data/rbi/workos/permission_updated_data.rbi +6 -0
- data/rbi/workos/pipes.rbi +23 -5
- data/rbi/workos/pipes_connected_account_connection_failed.rbi +54 -0
- data/rbi/workos/{organization_domain_stand_alone.rbi → pipes_connected_account_connection_failed_data.rbi} +23 -23
- data/rbi/workos/pipes_provider.rbi +2 -1
- data/rbi/workos/platform_teams.rbi +30 -0
- data/rbi/workos/radar_challenge.rbi +72 -0
- data/rbi/workos/radar_challenge_created.rbi +54 -0
- data/rbi/workos/radar_challenge_created_data.rbi +42 -0
- data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
- data/rbi/workos/resource_export_completed.rbi +54 -0
- data/rbi/workos/resource_export_completed_data.rbi +30 -0
- data/rbi/workos/resource_export_created.rbi +54 -0
- data/rbi/workos/resource_export_created_data.rbi +30 -0
- data/rbi/workos/resource_export_downloaded.rbi +54 -0
- data/rbi/workos/resource_export_downloaded_data.rbi +30 -0
- data/rbi/workos/resource_export_failed.rbi +54 -0
- data/rbi/workos/resource_export_failed_data.rbi +30 -0
- data/rbi/workos/saml_idp_signing_certificate.rbi +54 -0
- data/rbi/workos/saml_idp_signing_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_encryption_certificate.rbi +54 -0
- data/rbi/workos/saml_sp_encryption_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_signing_certificate.rbi +54 -0
- data/rbi/workos/sso.rbi +181 -2
- data/rbi/workos/team.rbi +60 -0
- data/rbi/workos/token_query.rbi +20 -2
- data/rbi/workos/update_audit_logs_retention.rbi +8 -2
- data/rbi/workos/update_data_integration.rbi +8 -2
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user_management.rbi +116 -2
- data/rbi/workos/vault_kek_deleted.rbi +54 -0
- data/rbi/workos/vault_kek_deleted_data.rbi +48 -0
- data/rbi/workos/waitlist.rbi +42 -0
- data/rbi/workos/waitlist_entry.rbi +72 -0
- data/rbi/workos/waitlist_user.rbi +18 -6
- data/rbi/workos/widget_session_token.rbi +2 -2
- data/rbi/workos/widgets.rbi +1 -1
- data/test/workos/test_agents.rb +153 -0
- data/test/workos/test_agents_model_round_trip.rb +410 -0
- data/test/workos/test_api_keys_model_round_trip.rb +307 -0
- data/test/workos/test_audit_logs.rb +11 -2
- data/test/workos/test_authkit_helpers.rb +22 -10
- data/test/workos/test_authorization.rb +6 -6
- data/test/workos/test_authorization_model_round_trip.rb +237 -0
- data/test/workos/test_base_client.rb +27 -0
- data/test/workos/test_client_api_model_round_trip.rb +31 -0
- data/test/workos/test_connect_model_round_trip.rb +175 -0
- data/test/workos/test_directory_sync_model_round_trip.rb +579 -0
- data/test/workos/test_events.rb +2 -2
- data/test/workos/test_feature_flags_model_round_trip.rb +580 -0
- data/test/workos/test_groups_model_round_trip.rb +56 -0
- data/test/workos/test_multi_factor_auth_model_round_trip.rb +192 -0
- data/test/workos/test_organization_domains_model_round_trip.rb +260 -0
- data/test/workos/test_organization_membership_model_round_trip.rb +89 -0
- data/test/workos/test_organizations.rb +49 -1
- data/test/workos/test_organizations_model_round_trip.rb +642 -1
- data/test/workos/test_pipes.rb +8 -0
- data/test/workos/test_pipes_model_round_trip.rb +68 -8
- data/test/workos/test_pipes_provider_model_round_trip.rb +77 -0
- data/test/workos/test_platform_teams.rb +41 -0
- data/test/workos/test_platform_teams_model_round_trip.rb +41 -0
- data/test/workos/test_shared_model_round_trip.rb +1263 -0
- data/test/workos/test_sso.rb +108 -2
- data/test/workos/test_sso_model_round_trip.rb +681 -0
- data/test/workos/test_user_management.rb +78 -6
- data/test/workos/test_user_management_model_round_trip.rb +1604 -27
- data/test/workos/test_vault_model_round_trip.rb +571 -0
- data/test/workos/test_widgets.rb +2 -2
- data/test/workos/test_widgets_model_round_trip.rb +30 -0
- metadata +287 -19
- data/lib/workos/admin_portal/intent_options.rb +0 -22
- data/lib/workos/admin_portal/sso_intent_options.rb +0 -22
- data/rbi/workos/intent_options.rbi +0 -30
- data/test/workos/test_model_round_trip.rb +0 -6
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "test_helper"
|
|
6
|
+
|
|
7
|
+
class SsoModelRoundTripTest < Minitest::Test
|
|
8
|
+
def test_create_connection_key_pair_round_trip
|
|
9
|
+
fixture = {
|
|
10
|
+
"key" => "stub",
|
|
11
|
+
"cert" => "stub"
|
|
12
|
+
}
|
|
13
|
+
model = WorkOS::CreateConnectionKeyPair.new(fixture.to_json)
|
|
14
|
+
json = model.to_h
|
|
15
|
+
assert_kind_of Hash, json
|
|
16
|
+
assert_equal fixture["key"], json[:key]
|
|
17
|
+
assert_equal fixture["cert"], json[:cert]
|
|
18
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def test_create_connection_saml_options_round_trip
|
|
22
|
+
fixture = {
|
|
23
|
+
"idp_metadata_url" => "stub",
|
|
24
|
+
"acs_url" => "stub",
|
|
25
|
+
"sp_entity_id" => "stub",
|
|
26
|
+
"idp_entity_id" => "stub",
|
|
27
|
+
"idp_sso_url" => "stub",
|
|
28
|
+
"idp_signing_certs" => [],
|
|
29
|
+
"sp_signing_key_pair" => {},
|
|
30
|
+
"sp_encryption_key_pairs" => []
|
|
31
|
+
}
|
|
32
|
+
model = WorkOS::CreateConnectionSAMLOptions.new(fixture.to_json)
|
|
33
|
+
json = model.to_h
|
|
34
|
+
assert_kind_of Hash, json
|
|
35
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def test_create_connection_oidc_options_round_trip
|
|
39
|
+
fixture = {
|
|
40
|
+
"discovery_endpoint" => "stub",
|
|
41
|
+
"client_id" => "stub",
|
|
42
|
+
"client_secret" => "stub",
|
|
43
|
+
"redirect_uri" => "stub",
|
|
44
|
+
"pkce" => true,
|
|
45
|
+
"token_authentication_method" => "stub",
|
|
46
|
+
"jwt_signing_key_pair" => {},
|
|
47
|
+
"id_token_signature_algorithm" => "stub",
|
|
48
|
+
"fetch_user_info" => true
|
|
49
|
+
}
|
|
50
|
+
model = WorkOS::CreateConnectionOIDCOptions.new(fixture.to_json)
|
|
51
|
+
json = model.to_h
|
|
52
|
+
assert_kind_of Hash, json
|
|
53
|
+
assert_equal fixture["discovery_endpoint"], json[:discovery_endpoint]
|
|
54
|
+
assert_equal fixture["client_id"], json[:client_id]
|
|
55
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def test_create_connection_standard_attributes_round_trip
|
|
59
|
+
fixture = {
|
|
60
|
+
"idp_id" => "stub",
|
|
61
|
+
"email" => "stub",
|
|
62
|
+
"first_name" => "stub",
|
|
63
|
+
"last_name" => "stub",
|
|
64
|
+
"groups" => nil,
|
|
65
|
+
"name" => nil
|
|
66
|
+
}
|
|
67
|
+
model = WorkOS::CreateConnectionStandardAttributes.new(fixture.to_json)
|
|
68
|
+
json = model.to_h
|
|
69
|
+
assert_kind_of Hash, json
|
|
70
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def test_create_connection_attribute_maps_round_trip
|
|
74
|
+
fixture = {
|
|
75
|
+
"standard_attributes" => {},
|
|
76
|
+
"custom_attributes" => {}
|
|
77
|
+
}
|
|
78
|
+
model = WorkOS::CreateConnectionAttributeMaps.new(fixture.to_json)
|
|
79
|
+
json = model.to_h
|
|
80
|
+
assert_kind_of Hash, json
|
|
81
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def test_create_connection_round_trip
|
|
85
|
+
fixture = {
|
|
86
|
+
"organization_id" => "stub",
|
|
87
|
+
"name" => "stub",
|
|
88
|
+
"external_id" => "stub",
|
|
89
|
+
"connection_type" => "stub",
|
|
90
|
+
"attribute_maps" => {},
|
|
91
|
+
"saml_options" => {},
|
|
92
|
+
"oidc_options" => {}
|
|
93
|
+
}
|
|
94
|
+
model = WorkOS::CreateConnection.new(fixture.to_json)
|
|
95
|
+
json = model.to_h
|
|
96
|
+
assert_kind_of Hash, json
|
|
97
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
98
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def test_patch_connection_saml_options_round_trip
|
|
102
|
+
fixture = {
|
|
103
|
+
"idp_metadata_url" => nil,
|
|
104
|
+
"acs_url" => nil,
|
|
105
|
+
"sp_entity_id" => nil,
|
|
106
|
+
"idp_entity_id" => "stub",
|
|
107
|
+
"idp_sso_url" => "stub"
|
|
108
|
+
}
|
|
109
|
+
model = WorkOS::PatchConnectionSAMLOptions.new(fixture.to_json)
|
|
110
|
+
json = model.to_h
|
|
111
|
+
assert_kind_of Hash, json
|
|
112
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def test_patch_connection_oidc_options_round_trip
|
|
116
|
+
fixture = {
|
|
117
|
+
"discovery_endpoint" => "stub",
|
|
118
|
+
"client_id" => "stub",
|
|
119
|
+
"client_secret" => "stub",
|
|
120
|
+
"redirect_uri" => nil,
|
|
121
|
+
"pkce" => true,
|
|
122
|
+
"token_authentication_method" => "stub",
|
|
123
|
+
"id_token_signature_algorithm" => "stub",
|
|
124
|
+
"fetch_user_info" => true
|
|
125
|
+
}
|
|
126
|
+
model = WorkOS::PatchConnectionOIDCOptions.new(fixture.to_json)
|
|
127
|
+
json = model.to_h
|
|
128
|
+
assert_kind_of Hash, json
|
|
129
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def test_patch_connection_standard_attributes_round_trip
|
|
133
|
+
fixture = {
|
|
134
|
+
"idp_id" => "stub",
|
|
135
|
+
"email" => "stub",
|
|
136
|
+
"first_name" => "stub",
|
|
137
|
+
"last_name" => "stub",
|
|
138
|
+
"groups" => nil,
|
|
139
|
+
"name" => nil
|
|
140
|
+
}
|
|
141
|
+
model = WorkOS::PatchConnectionStandardAttributes.new(fixture.to_json)
|
|
142
|
+
json = model.to_h
|
|
143
|
+
assert_kind_of Hash, json
|
|
144
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def test_patch_connection_attribute_maps_round_trip
|
|
148
|
+
fixture = {
|
|
149
|
+
"standard_attributes" => {},
|
|
150
|
+
"custom_attributes" => {}
|
|
151
|
+
}
|
|
152
|
+
model = WorkOS::PatchConnectionAttributeMaps.new(fixture.to_json)
|
|
153
|
+
json = model.to_h
|
|
154
|
+
assert_kind_of Hash, json
|
|
155
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def test_patch_connection_round_trip
|
|
159
|
+
fixture = {
|
|
160
|
+
"name" => "stub",
|
|
161
|
+
"external_id" => nil,
|
|
162
|
+
"connection_type" => "stub",
|
|
163
|
+
"attribute_maps" => {},
|
|
164
|
+
"saml_options" => {},
|
|
165
|
+
"oidc_options" => {}
|
|
166
|
+
}
|
|
167
|
+
model = WorkOS::PatchConnection.new(fixture.to_json)
|
|
168
|
+
json = model.to_h
|
|
169
|
+
assert_kind_of Hash, json
|
|
170
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def test_create_saml_idp_signing_certificate_round_trip
|
|
174
|
+
fixture = {
|
|
175
|
+
"value" => "stub"
|
|
176
|
+
}
|
|
177
|
+
model = WorkOS::CreateSAMLIdpSigningCertificate.new(fixture.to_json)
|
|
178
|
+
json = model.to_h
|
|
179
|
+
assert_kind_of Hash, json
|
|
180
|
+
assert_equal fixture["value"], json[:value]
|
|
181
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def test_token_query_round_trip
|
|
185
|
+
fixture = {
|
|
186
|
+
"client_id" => "stub",
|
|
187
|
+
"client_secret" => "stub",
|
|
188
|
+
"code" => "stub",
|
|
189
|
+
"grant_type" => "stub",
|
|
190
|
+
"subject_token" => "stub",
|
|
191
|
+
"subject_token_type" => "urn:ietf:params:oauth:token-type:id_token",
|
|
192
|
+
"organization_id" => "stub"
|
|
193
|
+
}
|
|
194
|
+
model = WorkOS::TokenQuery.new(fixture.to_json)
|
|
195
|
+
json = model.to_h
|
|
196
|
+
assert_kind_of Hash, json
|
|
197
|
+
assert_equal fixture["client_id"], json[:client_id]
|
|
198
|
+
assert_equal fixture["client_secret"], json[:client_secret]
|
|
199
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def test_connection_round_trip
|
|
203
|
+
fixture = {
|
|
204
|
+
"object" => "connection",
|
|
205
|
+
"id" => "stub",
|
|
206
|
+
"organization_id" => "stub",
|
|
207
|
+
"connection_type" => "stub",
|
|
208
|
+
"name" => "stub",
|
|
209
|
+
"state" => "stub",
|
|
210
|
+
"status" => "stub",
|
|
211
|
+
"domains" => [],
|
|
212
|
+
"created_at" => "stub",
|
|
213
|
+
"updated_at" => "stub"
|
|
214
|
+
}
|
|
215
|
+
model = WorkOS::Connection.new(fixture.to_json)
|
|
216
|
+
json = model.to_h
|
|
217
|
+
assert_kind_of Hash, json
|
|
218
|
+
assert_equal fixture["id"], json[:id]
|
|
219
|
+
assert_equal fixture["name"], json[:name]
|
|
220
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
221
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
222
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
def test_connection_activated_round_trip
|
|
226
|
+
fixture = {
|
|
227
|
+
"object" => "event",
|
|
228
|
+
"id" => "stub",
|
|
229
|
+
"event" => "connection.activated",
|
|
230
|
+
"data" => {},
|
|
231
|
+
"created_at" => "stub",
|
|
232
|
+
"context" => {}
|
|
233
|
+
}
|
|
234
|
+
model = WorkOS::ConnectionActivated.new(fixture.to_json)
|
|
235
|
+
json = model.to_h
|
|
236
|
+
assert_kind_of Hash, json
|
|
237
|
+
assert_equal fixture["id"], json[:id]
|
|
238
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
239
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
def test_connection_activated_data_round_trip
|
|
243
|
+
fixture = {
|
|
244
|
+
"object" => "connection",
|
|
245
|
+
"id" => "stub",
|
|
246
|
+
"state" => "stub",
|
|
247
|
+
"name" => "stub",
|
|
248
|
+
"connection_type" => "stub",
|
|
249
|
+
"organization_id" => "stub",
|
|
250
|
+
"created_at" => "stub",
|
|
251
|
+
"updated_at" => "stub",
|
|
252
|
+
"external_key" => "stub",
|
|
253
|
+
"status" => "stub",
|
|
254
|
+
"domains" => []
|
|
255
|
+
}
|
|
256
|
+
model = WorkOS::ConnectionActivatedData.new(fixture.to_json)
|
|
257
|
+
json = model.to_h
|
|
258
|
+
assert_kind_of Hash, json
|
|
259
|
+
assert_equal fixture["id"], json[:id]
|
|
260
|
+
assert_equal fixture["name"], json[:name]
|
|
261
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
262
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
263
|
+
assert_equal fixture["external_key"], json[:external_key]
|
|
264
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
def test_connection_activated_data_domain_round_trip
|
|
268
|
+
fixture = {
|
|
269
|
+
"object" => "connection_domain",
|
|
270
|
+
"id" => "stub",
|
|
271
|
+
"domain" => "stub"
|
|
272
|
+
}
|
|
273
|
+
model = WorkOS::ConnectionActivatedDataDomain.new(fixture.to_json)
|
|
274
|
+
json = model.to_h
|
|
275
|
+
assert_kind_of Hash, json
|
|
276
|
+
assert_equal fixture["id"], json[:id]
|
|
277
|
+
assert_equal fixture["domain"], json[:domain]
|
|
278
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
def test_connection_deactivated_round_trip
|
|
282
|
+
fixture = {
|
|
283
|
+
"object" => "event",
|
|
284
|
+
"id" => "stub",
|
|
285
|
+
"event" => "connection.deactivated",
|
|
286
|
+
"data" => {},
|
|
287
|
+
"created_at" => "stub",
|
|
288
|
+
"context" => {}
|
|
289
|
+
}
|
|
290
|
+
model = WorkOS::ConnectionDeactivated.new(fixture.to_json)
|
|
291
|
+
json = model.to_h
|
|
292
|
+
assert_kind_of Hash, json
|
|
293
|
+
assert_equal fixture["id"], json[:id]
|
|
294
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
295
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
def test_connection_deactivated_data_round_trip
|
|
299
|
+
fixture = {
|
|
300
|
+
"object" => "connection",
|
|
301
|
+
"id" => "stub",
|
|
302
|
+
"state" => "stub",
|
|
303
|
+
"name" => "stub",
|
|
304
|
+
"connection_type" => "stub",
|
|
305
|
+
"organization_id" => "stub",
|
|
306
|
+
"created_at" => "stub",
|
|
307
|
+
"updated_at" => "stub",
|
|
308
|
+
"external_key" => "stub",
|
|
309
|
+
"status" => "stub",
|
|
310
|
+
"domains" => []
|
|
311
|
+
}
|
|
312
|
+
model = WorkOS::ConnectionDeactivatedData.new(fixture.to_json)
|
|
313
|
+
json = model.to_h
|
|
314
|
+
assert_kind_of Hash, json
|
|
315
|
+
assert_equal fixture["id"], json[:id]
|
|
316
|
+
assert_equal fixture["name"], json[:name]
|
|
317
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
318
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
319
|
+
assert_equal fixture["external_key"], json[:external_key]
|
|
320
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
def test_connection_deactivated_data_domain_round_trip
|
|
324
|
+
fixture = {
|
|
325
|
+
"object" => "connection_domain",
|
|
326
|
+
"id" => "stub",
|
|
327
|
+
"domain" => "stub"
|
|
328
|
+
}
|
|
329
|
+
model = WorkOS::ConnectionDeactivatedDataDomain.new(fixture.to_json)
|
|
330
|
+
json = model.to_h
|
|
331
|
+
assert_kind_of Hash, json
|
|
332
|
+
assert_equal fixture["id"], json[:id]
|
|
333
|
+
assert_equal fixture["domain"], json[:domain]
|
|
334
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
def test_connection_deleted_round_trip
|
|
338
|
+
fixture = {
|
|
339
|
+
"object" => "event",
|
|
340
|
+
"id" => "stub",
|
|
341
|
+
"event" => "connection.deleted",
|
|
342
|
+
"data" => {},
|
|
343
|
+
"created_at" => "stub",
|
|
344
|
+
"context" => {}
|
|
345
|
+
}
|
|
346
|
+
model = WorkOS::ConnectionDeleted.new(fixture.to_json)
|
|
347
|
+
json = model.to_h
|
|
348
|
+
assert_kind_of Hash, json
|
|
349
|
+
assert_equal fixture["id"], json[:id]
|
|
350
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
351
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
def test_connection_deleted_data_round_trip
|
|
355
|
+
fixture = {
|
|
356
|
+
"object" => "connection",
|
|
357
|
+
"id" => "stub",
|
|
358
|
+
"state" => "stub",
|
|
359
|
+
"name" => "stub",
|
|
360
|
+
"connection_type" => "stub",
|
|
361
|
+
"organization_id" => "stub",
|
|
362
|
+
"created_at" => "stub",
|
|
363
|
+
"updated_at" => "stub"
|
|
364
|
+
}
|
|
365
|
+
model = WorkOS::ConnectionDeletedData.new(fixture.to_json)
|
|
366
|
+
json = model.to_h
|
|
367
|
+
assert_kind_of Hash, json
|
|
368
|
+
assert_equal fixture["id"], json[:id]
|
|
369
|
+
assert_equal fixture["name"], json[:name]
|
|
370
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
371
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
372
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
def test_connection_saml_certificate_renewal_required_round_trip
|
|
376
|
+
fixture = {
|
|
377
|
+
"object" => "event",
|
|
378
|
+
"id" => "stub",
|
|
379
|
+
"event" => "connection.saml_certificate_renewal_required",
|
|
380
|
+
"data" => {},
|
|
381
|
+
"created_at" => "stub",
|
|
382
|
+
"context" => {}
|
|
383
|
+
}
|
|
384
|
+
model = WorkOS::ConnectionSAMLCertificateRenewalRequired.new(fixture.to_json)
|
|
385
|
+
json = model.to_h
|
|
386
|
+
assert_kind_of Hash, json
|
|
387
|
+
assert_equal fixture["id"], json[:id]
|
|
388
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
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_connection_saml_certificate_renewal_required_data_round_trip
|
|
393
|
+
fixture = {
|
|
394
|
+
"connection" => {},
|
|
395
|
+
"certificate" => {},
|
|
396
|
+
"days_until_expiry" => 1
|
|
397
|
+
}
|
|
398
|
+
model = WorkOS::ConnectionSAMLCertificateRenewalRequiredData.new(fixture.to_json)
|
|
399
|
+
json = model.to_h
|
|
400
|
+
assert_kind_of Hash, json
|
|
401
|
+
assert_equal fixture["days_until_expiry"], json[:days_until_expiry]
|
|
402
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
def test_connection_saml_certificate_renewal_required_data_connection_round_trip
|
|
406
|
+
fixture = {
|
|
407
|
+
"id" => "stub",
|
|
408
|
+
"organization_id" => "stub"
|
|
409
|
+
}
|
|
410
|
+
model = WorkOS::ConnectionSAMLCertificateRenewalRequiredDataConnection.new(fixture.to_json)
|
|
411
|
+
json = model.to_h
|
|
412
|
+
assert_kind_of Hash, json
|
|
413
|
+
assert_equal fixture["id"], json[:id]
|
|
414
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
def test_connection_saml_certificate_renewal_required_data_certificate_round_trip
|
|
418
|
+
fixture = {
|
|
419
|
+
"certificate_type" => "stub",
|
|
420
|
+
"expiry_date" => "stub",
|
|
421
|
+
"is_expired" => true
|
|
422
|
+
}
|
|
423
|
+
model = WorkOS::ConnectionSAMLCertificateRenewalRequiredDataCertificate.new(fixture.to_json)
|
|
424
|
+
json = model.to_h
|
|
425
|
+
assert_kind_of Hash, json
|
|
426
|
+
assert_equal fixture["expiry_date"], json[:expiry_date]
|
|
427
|
+
assert_equal fixture["is_expired"], json[:is_expired]
|
|
428
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
def test_connection_saml_certificate_renewed_round_trip
|
|
432
|
+
fixture = {
|
|
433
|
+
"object" => "event",
|
|
434
|
+
"id" => "stub",
|
|
435
|
+
"event" => "connection.saml_certificate_renewed",
|
|
436
|
+
"data" => {},
|
|
437
|
+
"created_at" => "stub",
|
|
438
|
+
"context" => {}
|
|
439
|
+
}
|
|
440
|
+
model = WorkOS::ConnectionSAMLCertificateRenewed.new(fixture.to_json)
|
|
441
|
+
json = model.to_h
|
|
442
|
+
assert_kind_of Hash, json
|
|
443
|
+
assert_equal fixture["id"], json[:id]
|
|
444
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
445
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
def test_connection_saml_certificate_renewed_data_round_trip
|
|
449
|
+
fixture = {
|
|
450
|
+
"connection" => {},
|
|
451
|
+
"certificate" => {},
|
|
452
|
+
"renewed_at" => "stub"
|
|
453
|
+
}
|
|
454
|
+
model = WorkOS::ConnectionSAMLCertificateRenewedData.new(fixture.to_json)
|
|
455
|
+
json = model.to_h
|
|
456
|
+
assert_kind_of Hash, json
|
|
457
|
+
assert_equal fixture["renewed_at"], json[:renewed_at]
|
|
458
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
def test_connection_saml_certificate_renewed_data_connection_round_trip
|
|
462
|
+
fixture = {
|
|
463
|
+
"id" => "stub",
|
|
464
|
+
"organization_id" => "stub"
|
|
465
|
+
}
|
|
466
|
+
model = WorkOS::ConnectionSAMLCertificateRenewedDataConnection.new(fixture.to_json)
|
|
467
|
+
json = model.to_h
|
|
468
|
+
assert_kind_of Hash, json
|
|
469
|
+
assert_equal fixture["id"], json[:id]
|
|
470
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
def test_connection_saml_certificate_renewed_data_certificate_round_trip
|
|
474
|
+
fixture = {
|
|
475
|
+
"certificate_type" => "stub",
|
|
476
|
+
"expiry_date" => "stub"
|
|
477
|
+
}
|
|
478
|
+
model = WorkOS::ConnectionSAMLCertificateRenewedDataCertificate.new(fixture.to_json)
|
|
479
|
+
json = model.to_h
|
|
480
|
+
assert_kind_of Hash, json
|
|
481
|
+
assert_equal fixture["expiry_date"], json[:expiry_date]
|
|
482
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
def test_saml_idp_signing_certificate_round_trip
|
|
486
|
+
fixture = {
|
|
487
|
+
"object" => "saml_idp_signing_certificate",
|
|
488
|
+
"id" => "stub",
|
|
489
|
+
"value" => "stub",
|
|
490
|
+
"not_before" => nil,
|
|
491
|
+
"not_after" => nil,
|
|
492
|
+
"created_at" => "stub"
|
|
493
|
+
}
|
|
494
|
+
model = WorkOS::SAMLIdpSigningCertificate.new(fixture.to_json)
|
|
495
|
+
json = model.to_h
|
|
496
|
+
assert_kind_of Hash, json
|
|
497
|
+
assert_equal fixture["id"], json[:id]
|
|
498
|
+
assert_equal fixture["value"], json[:value]
|
|
499
|
+
assert_nil json[:not_before]
|
|
500
|
+
assert_nil json[:not_after]
|
|
501
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
502
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
def test_saml_idp_signing_certificate_list_round_trip
|
|
506
|
+
fixture = {
|
|
507
|
+
"object" => "list",
|
|
508
|
+
"data" => []
|
|
509
|
+
}
|
|
510
|
+
model = WorkOS::SAMLIdpSigningCertificateList.new(fixture.to_json)
|
|
511
|
+
json = model.to_h
|
|
512
|
+
assert_kind_of Hash, json
|
|
513
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
def test_saml_sp_encryption_certificate_round_trip
|
|
517
|
+
fixture = {
|
|
518
|
+
"object" => "saml_sp_encryption_certificate",
|
|
519
|
+
"id" => "stub",
|
|
520
|
+
"value" => "stub",
|
|
521
|
+
"not_before" => nil,
|
|
522
|
+
"not_after" => nil,
|
|
523
|
+
"created_at" => "stub"
|
|
524
|
+
}
|
|
525
|
+
model = WorkOS::SAMLSpEncryptionCertificate.new(fixture.to_json)
|
|
526
|
+
json = model.to_h
|
|
527
|
+
assert_kind_of Hash, json
|
|
528
|
+
assert_equal fixture["id"], json[:id]
|
|
529
|
+
assert_equal fixture["value"], json[:value]
|
|
530
|
+
assert_nil json[:not_before]
|
|
531
|
+
assert_nil json[:not_after]
|
|
532
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
533
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
def test_saml_sp_encryption_certificate_list_round_trip
|
|
537
|
+
fixture = {
|
|
538
|
+
"object" => "list",
|
|
539
|
+
"data" => []
|
|
540
|
+
}
|
|
541
|
+
model = WorkOS::SAMLSpEncryptionCertificateList.new(fixture.to_json)
|
|
542
|
+
json = model.to_h
|
|
543
|
+
assert_kind_of Hash, json
|
|
544
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
def test_saml_sp_signing_certificate_round_trip
|
|
548
|
+
fixture = {
|
|
549
|
+
"object" => "saml_sp_signing_certificate",
|
|
550
|
+
"id" => "stub",
|
|
551
|
+
"value" => "stub",
|
|
552
|
+
"not_before" => nil,
|
|
553
|
+
"not_after" => nil,
|
|
554
|
+
"created_at" => "stub"
|
|
555
|
+
}
|
|
556
|
+
model = WorkOS::SAMLSpSigningCertificate.new(fixture.to_json)
|
|
557
|
+
json = model.to_h
|
|
558
|
+
assert_kind_of Hash, json
|
|
559
|
+
assert_equal fixture["id"], json[:id]
|
|
560
|
+
assert_equal fixture["value"], json[:value]
|
|
561
|
+
assert_nil json[:not_before]
|
|
562
|
+
assert_nil json[:not_after]
|
|
563
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
564
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
def test_sso_authorize_url_response_round_trip
|
|
568
|
+
fixture = {
|
|
569
|
+
"url" => "stub"
|
|
570
|
+
}
|
|
571
|
+
model = WorkOS::SSOAuthorizeUrlResponse.new(fixture.to_json)
|
|
572
|
+
json = model.to_h
|
|
573
|
+
assert_kind_of Hash, json
|
|
574
|
+
assert_equal fixture["url"], json[:url]
|
|
575
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
def test_profile_round_trip
|
|
579
|
+
fixture = {
|
|
580
|
+
"object" => "profile",
|
|
581
|
+
"id" => "stub",
|
|
582
|
+
"organization_id" => nil,
|
|
583
|
+
"connection_id" => "stub",
|
|
584
|
+
"connection_type" => "stub",
|
|
585
|
+
"idp_id" => "stub",
|
|
586
|
+
"email" => "stub",
|
|
587
|
+
"first_name" => nil,
|
|
588
|
+
"last_name" => nil,
|
|
589
|
+
"name" => nil,
|
|
590
|
+
"role" => nil,
|
|
591
|
+
"roles" => nil,
|
|
592
|
+
"groups" => [],
|
|
593
|
+
"custom_attributes" => {},
|
|
594
|
+
"raw_attributes" => {}
|
|
595
|
+
}
|
|
596
|
+
model = WorkOS::Profile.new(fixture.to_json)
|
|
597
|
+
json = model.to_h
|
|
598
|
+
assert_kind_of Hash, json
|
|
599
|
+
assert_equal fixture["id"], json[:id]
|
|
600
|
+
assert_nil json[:organization_id]
|
|
601
|
+
assert_equal fixture["connection_id"], json[:connection_id]
|
|
602
|
+
assert_equal fixture["idp_id"], json[:idp_id]
|
|
603
|
+
assert_equal fixture["email"], json[:email]
|
|
604
|
+
assert_nil json[:first_name]
|
|
605
|
+
assert_nil json[:last_name]
|
|
606
|
+
assert_nil json[:name]
|
|
607
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
def test_sso_token_response_round_trip
|
|
611
|
+
fixture = {
|
|
612
|
+
"token_type" => "Bearer",
|
|
613
|
+
"access_token" => "stub",
|
|
614
|
+
"expires_in" => 1,
|
|
615
|
+
"profile" => {},
|
|
616
|
+
"oauth_tokens" => {}
|
|
617
|
+
}
|
|
618
|
+
model = WorkOS::SSOTokenResponse.new(fixture.to_json)
|
|
619
|
+
json = model.to_h
|
|
620
|
+
assert_kind_of Hash, json
|
|
621
|
+
assert_equal fixture["access_token"], json[:access_token]
|
|
622
|
+
assert_equal fixture["expires_in"], json[:expires_in]
|
|
623
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
def test_sso_logout_authorize_response_round_trip
|
|
627
|
+
fixture = {
|
|
628
|
+
"logout_url" => "stub",
|
|
629
|
+
"logout_token" => "stub"
|
|
630
|
+
}
|
|
631
|
+
model = WorkOS::SSOLogoutAuthorizeResponse.new(fixture.to_json)
|
|
632
|
+
json = model.to_h
|
|
633
|
+
assert_kind_of Hash, json
|
|
634
|
+
assert_equal fixture["logout_url"], json[:logout_url]
|
|
635
|
+
assert_equal fixture["logout_token"], json[:logout_token]
|
|
636
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
def test_sso_token_response_oauth_token_round_trip
|
|
640
|
+
fixture = {
|
|
641
|
+
"provider" => "stub",
|
|
642
|
+
"refresh_token" => "stub",
|
|
643
|
+
"access_token" => "stub",
|
|
644
|
+
"expires_at" => 1,
|
|
645
|
+
"scopes" => []
|
|
646
|
+
}
|
|
647
|
+
model = WorkOS::SSOTokenResponseOAuthToken.new(fixture.to_json)
|
|
648
|
+
json = model.to_h
|
|
649
|
+
assert_kind_of Hash, json
|
|
650
|
+
assert_equal fixture["provider"], json[:provider]
|
|
651
|
+
assert_equal fixture["refresh_token"], json[:refresh_token]
|
|
652
|
+
assert_equal fixture["access_token"], json[:access_token]
|
|
653
|
+
assert_equal fixture["expires_at"], json[:expires_at]
|
|
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_connection_domain_round_trip
|
|
658
|
+
fixture = {
|
|
659
|
+
"id" => "stub",
|
|
660
|
+
"object" => "connection_domain",
|
|
661
|
+
"domain" => "stub"
|
|
662
|
+
}
|
|
663
|
+
model = WorkOS::ConnectionDomain.new(fixture.to_json)
|
|
664
|
+
json = model.to_h
|
|
665
|
+
assert_kind_of Hash, json
|
|
666
|
+
assert_equal fixture["id"], json[:id]
|
|
667
|
+
assert_equal fixture["domain"], json[:domain]
|
|
668
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
def test_sso_logout_authorize_request_round_trip
|
|
672
|
+
fixture = {
|
|
673
|
+
"profile_id" => "stub"
|
|
674
|
+
}
|
|
675
|
+
model = WorkOS::SSOLogoutAuthorizeRequest.new(fixture.to_json)
|
|
676
|
+
json = model.to_h
|
|
677
|
+
assert_kind_of Hash, json
|
|
678
|
+
assert_equal fixture["profile_id"], json[:profile_id]
|
|
679
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
680
|
+
end
|
|
681
|
+
end
|