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
|
@@ -7,12 +7,77 @@ require "test_helper"
|
|
|
7
7
|
class OrganizationsModelRoundTripTest < Minitest::Test
|
|
8
8
|
def test_update_audit_logs_retention_round_trip
|
|
9
9
|
fixture = {
|
|
10
|
+
"retention_period" => "stub",
|
|
10
11
|
"retention_period_in_days" => 1
|
|
11
12
|
}
|
|
12
13
|
model = WorkOS::UpdateAuditLogsRetention.new(fixture.to_json)
|
|
13
14
|
json = model.to_h
|
|
14
15
|
assert_kind_of Hash, json
|
|
15
|
-
|
|
16
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def test_create_it_contact_round_trip
|
|
20
|
+
fixture = {
|
|
21
|
+
"email" => "stub"
|
|
22
|
+
}
|
|
23
|
+
model = WorkOS::CreateItContact.new(fixture.to_json)
|
|
24
|
+
json = model.to_h
|
|
25
|
+
assert_kind_of Hash, json
|
|
26
|
+
assert_equal fixture["email"], json[:email]
|
|
27
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def test_invite_it_contact_round_trip
|
|
31
|
+
fixture = {
|
|
32
|
+
"intents" => []
|
|
33
|
+
}
|
|
34
|
+
model = WorkOS::InviteItContact.new(fixture.to_json)
|
|
35
|
+
json = model.to_h
|
|
36
|
+
assert_kind_of Hash, json
|
|
37
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def test_organization_domain_data_round_trip
|
|
41
|
+
fixture = {
|
|
42
|
+
"domain" => "stub",
|
|
43
|
+
"state" => "stub"
|
|
44
|
+
}
|
|
45
|
+
model = WorkOS::OrganizationDomainData.new(fixture.to_json)
|
|
46
|
+
json = model.to_h
|
|
47
|
+
assert_kind_of Hash, json
|
|
48
|
+
assert_equal fixture["domain"], json[:domain]
|
|
49
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def test_organization_input_round_trip
|
|
53
|
+
fixture = {
|
|
54
|
+
"name" => "stub",
|
|
55
|
+
"allow_profiles_outside_organization" => true,
|
|
56
|
+
"domains" => [],
|
|
57
|
+
"domain_data" => [],
|
|
58
|
+
"metadata" => nil,
|
|
59
|
+
"external_id" => nil
|
|
60
|
+
}
|
|
61
|
+
model = WorkOS::OrganizationInput.new(fixture.to_json)
|
|
62
|
+
json = model.to_h
|
|
63
|
+
assert_kind_of Hash, json
|
|
64
|
+
assert_equal fixture["name"], json[:name]
|
|
65
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_update_organization_round_trip
|
|
69
|
+
fixture = {
|
|
70
|
+
"name" => "stub",
|
|
71
|
+
"allow_profiles_outside_organization" => true,
|
|
72
|
+
"domains" => [],
|
|
73
|
+
"domain_data" => [],
|
|
74
|
+
"stripe_customer_id" => "stub",
|
|
75
|
+
"metadata" => nil,
|
|
76
|
+
"external_id" => nil
|
|
77
|
+
}
|
|
78
|
+
model = WorkOS::UpdateOrganization.new(fixture.to_json)
|
|
79
|
+
json = model.to_h
|
|
80
|
+
assert_kind_of Hash, json
|
|
16
81
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
17
82
|
end
|
|
18
83
|
|
|
@@ -26,4 +91,580 @@ class OrganizationsModelRoundTripTest < Minitest::Test
|
|
|
26
91
|
assert_nil json[:retention_period_in_days]
|
|
27
92
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
28
93
|
end
|
|
94
|
+
|
|
95
|
+
def test_organization_created_round_trip
|
|
96
|
+
fixture = {
|
|
97
|
+
"object" => "event",
|
|
98
|
+
"id" => "stub",
|
|
99
|
+
"event" => "organization.created",
|
|
100
|
+
"data" => {},
|
|
101
|
+
"created_at" => "stub",
|
|
102
|
+
"context" => {}
|
|
103
|
+
}
|
|
104
|
+
model = WorkOS::OrganizationCreated.new(fixture.to_json)
|
|
105
|
+
json = model.to_h
|
|
106
|
+
assert_kind_of Hash, json
|
|
107
|
+
assert_equal fixture["id"], json[:id]
|
|
108
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
109
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def test_organization_created_data_round_trip
|
|
113
|
+
fixture = {
|
|
114
|
+
"object" => "organization",
|
|
115
|
+
"id" => "stub",
|
|
116
|
+
"name" => "stub",
|
|
117
|
+
"domains" => [],
|
|
118
|
+
"metadata" => {},
|
|
119
|
+
"external_id" => nil,
|
|
120
|
+
"stripe_customer_id" => "stub",
|
|
121
|
+
"created_at" => "stub",
|
|
122
|
+
"updated_at" => "stub"
|
|
123
|
+
}
|
|
124
|
+
model = WorkOS::OrganizationCreatedData.new(fixture.to_json)
|
|
125
|
+
json = model.to_h
|
|
126
|
+
assert_kind_of Hash, json
|
|
127
|
+
assert_equal fixture["id"], json[:id]
|
|
128
|
+
assert_equal fixture["name"], json[:name]
|
|
129
|
+
assert_nil json[:external_id]
|
|
130
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
131
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
132
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def test_organization_created_data_domain_round_trip
|
|
136
|
+
fixture = {
|
|
137
|
+
"object" => "organization_domain",
|
|
138
|
+
"id" => "stub",
|
|
139
|
+
"organization_id" => "stub",
|
|
140
|
+
"domain" => "stub",
|
|
141
|
+
"state" => "stub",
|
|
142
|
+
"verification_prefix" => "stub",
|
|
143
|
+
"verification_token" => "stub",
|
|
144
|
+
"verification_strategy" => "stub",
|
|
145
|
+
"created_at" => "stub",
|
|
146
|
+
"updated_at" => "stub"
|
|
147
|
+
}
|
|
148
|
+
model = WorkOS::OrganizationCreatedDataDomain.new(fixture.to_json)
|
|
149
|
+
json = model.to_h
|
|
150
|
+
assert_kind_of Hash, json
|
|
151
|
+
assert_equal fixture["id"], json[:id]
|
|
152
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
153
|
+
assert_equal fixture["domain"], json[:domain]
|
|
154
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
155
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
156
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def test_organization_deleted_round_trip
|
|
160
|
+
fixture = {
|
|
161
|
+
"object" => "event",
|
|
162
|
+
"id" => "stub",
|
|
163
|
+
"event" => "organization.deleted",
|
|
164
|
+
"data" => {},
|
|
165
|
+
"created_at" => "stub",
|
|
166
|
+
"context" => {}
|
|
167
|
+
}
|
|
168
|
+
model = WorkOS::OrganizationDeleted.new(fixture.to_json)
|
|
169
|
+
json = model.to_h
|
|
170
|
+
assert_kind_of Hash, json
|
|
171
|
+
assert_equal fixture["id"], json[:id]
|
|
172
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
173
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def test_organization_deleted_data_round_trip
|
|
177
|
+
fixture = {
|
|
178
|
+
"object" => "organization",
|
|
179
|
+
"id" => "stub",
|
|
180
|
+
"name" => "stub",
|
|
181
|
+
"domains" => [],
|
|
182
|
+
"metadata" => {},
|
|
183
|
+
"external_id" => nil,
|
|
184
|
+
"stripe_customer_id" => "stub",
|
|
185
|
+
"created_at" => "stub",
|
|
186
|
+
"updated_at" => "stub"
|
|
187
|
+
}
|
|
188
|
+
model = WorkOS::OrganizationDeletedData.new(fixture.to_json)
|
|
189
|
+
json = model.to_h
|
|
190
|
+
assert_kind_of Hash, json
|
|
191
|
+
assert_equal fixture["id"], json[:id]
|
|
192
|
+
assert_equal fixture["name"], json[:name]
|
|
193
|
+
assert_nil json[:external_id]
|
|
194
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
195
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
196
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def test_organization_deleted_data_domain_round_trip
|
|
200
|
+
fixture = {
|
|
201
|
+
"object" => "organization_domain",
|
|
202
|
+
"id" => "stub",
|
|
203
|
+
"organization_id" => "stub",
|
|
204
|
+
"domain" => "stub",
|
|
205
|
+
"state" => "stub",
|
|
206
|
+
"verification_prefix" => "stub",
|
|
207
|
+
"verification_token" => "stub",
|
|
208
|
+
"verification_strategy" => "stub",
|
|
209
|
+
"created_at" => "stub",
|
|
210
|
+
"updated_at" => "stub"
|
|
211
|
+
}
|
|
212
|
+
model = WorkOS::OrganizationDeletedDataDomain.new(fixture.to_json)
|
|
213
|
+
json = model.to_h
|
|
214
|
+
assert_kind_of Hash, json
|
|
215
|
+
assert_equal fixture["id"], json[:id]
|
|
216
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
217
|
+
assert_equal fixture["domain"], json[:domain]
|
|
218
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
219
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
220
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def test_organization_membership_created_round_trip
|
|
224
|
+
fixture = {
|
|
225
|
+
"object" => "event",
|
|
226
|
+
"id" => "stub",
|
|
227
|
+
"event" => "organization_membership.created",
|
|
228
|
+
"data" => {},
|
|
229
|
+
"created_at" => "stub",
|
|
230
|
+
"context" => {}
|
|
231
|
+
}
|
|
232
|
+
model = WorkOS::OrganizationMembershipCreated.new(fixture.to_json)
|
|
233
|
+
json = model.to_h
|
|
234
|
+
assert_kind_of Hash, json
|
|
235
|
+
assert_equal fixture["id"], json[:id]
|
|
236
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
237
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
def test_organization_membership_created_data_round_trip
|
|
241
|
+
fixture = {
|
|
242
|
+
"object" => "organization_membership",
|
|
243
|
+
"id" => "stub",
|
|
244
|
+
"user_id" => "stub",
|
|
245
|
+
"organization_id" => "stub",
|
|
246
|
+
"status" => "stub",
|
|
247
|
+
"role" => {},
|
|
248
|
+
"roles" => [],
|
|
249
|
+
"custom_attributes" => {},
|
|
250
|
+
"directory_managed" => true,
|
|
251
|
+
"created_at" => "stub",
|
|
252
|
+
"updated_at" => "stub"
|
|
253
|
+
}
|
|
254
|
+
model = WorkOS::OrganizationMembershipCreatedData.new(fixture.to_json)
|
|
255
|
+
json = model.to_h
|
|
256
|
+
assert_kind_of Hash, json
|
|
257
|
+
assert_equal fixture["id"], json[:id]
|
|
258
|
+
assert_equal fixture["user_id"], json[:user_id]
|
|
259
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
260
|
+
assert_equal fixture["directory_managed"], json[:directory_managed]
|
|
261
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
262
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
263
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
def test_organization_membership_deleted_round_trip
|
|
267
|
+
fixture = {
|
|
268
|
+
"object" => "event",
|
|
269
|
+
"id" => "stub",
|
|
270
|
+
"event" => "organization_membership.deleted",
|
|
271
|
+
"data" => {},
|
|
272
|
+
"created_at" => "stub",
|
|
273
|
+
"context" => {}
|
|
274
|
+
}
|
|
275
|
+
model = WorkOS::OrganizationMembershipDeleted.new(fixture.to_json)
|
|
276
|
+
json = model.to_h
|
|
277
|
+
assert_kind_of Hash, json
|
|
278
|
+
assert_equal fixture["id"], json[:id]
|
|
279
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
280
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
def test_organization_membership_deleted_data_round_trip
|
|
284
|
+
fixture = {
|
|
285
|
+
"object" => "organization_membership",
|
|
286
|
+
"id" => "stub",
|
|
287
|
+
"user_id" => "stub",
|
|
288
|
+
"organization_id" => "stub",
|
|
289
|
+
"status" => "stub",
|
|
290
|
+
"role" => {},
|
|
291
|
+
"roles" => [],
|
|
292
|
+
"custom_attributes" => {},
|
|
293
|
+
"directory_managed" => true,
|
|
294
|
+
"created_at" => "stub",
|
|
295
|
+
"updated_at" => "stub"
|
|
296
|
+
}
|
|
297
|
+
model = WorkOS::OrganizationMembershipDeletedData.new(fixture.to_json)
|
|
298
|
+
json = model.to_h
|
|
299
|
+
assert_kind_of Hash, json
|
|
300
|
+
assert_equal fixture["id"], json[:id]
|
|
301
|
+
assert_equal fixture["user_id"], json[:user_id]
|
|
302
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
303
|
+
assert_equal fixture["directory_managed"], json[:directory_managed]
|
|
304
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
305
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
306
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
def test_organization_membership_updated_round_trip
|
|
310
|
+
fixture = {
|
|
311
|
+
"object" => "event",
|
|
312
|
+
"id" => "stub",
|
|
313
|
+
"event" => "organization_membership.updated",
|
|
314
|
+
"data" => {},
|
|
315
|
+
"created_at" => "stub",
|
|
316
|
+
"context" => {}
|
|
317
|
+
}
|
|
318
|
+
model = WorkOS::OrganizationMembershipUpdated.new(fixture.to_json)
|
|
319
|
+
json = model.to_h
|
|
320
|
+
assert_kind_of Hash, json
|
|
321
|
+
assert_equal fixture["id"], json[:id]
|
|
322
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
323
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
def test_organization_membership_updated_data_round_trip
|
|
327
|
+
fixture = {
|
|
328
|
+
"object" => "organization_membership",
|
|
329
|
+
"id" => "stub",
|
|
330
|
+
"user_id" => "stub",
|
|
331
|
+
"organization_id" => "stub",
|
|
332
|
+
"status" => "stub",
|
|
333
|
+
"role" => {},
|
|
334
|
+
"roles" => [],
|
|
335
|
+
"custom_attributes" => {},
|
|
336
|
+
"directory_managed" => true,
|
|
337
|
+
"created_at" => "stub",
|
|
338
|
+
"updated_at" => "stub"
|
|
339
|
+
}
|
|
340
|
+
model = WorkOS::OrganizationMembershipUpdatedData.new(fixture.to_json)
|
|
341
|
+
json = model.to_h
|
|
342
|
+
assert_kind_of Hash, json
|
|
343
|
+
assert_equal fixture["id"], json[:id]
|
|
344
|
+
assert_equal fixture["user_id"], json[:user_id]
|
|
345
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
346
|
+
assert_equal fixture["directory_managed"], json[:directory_managed]
|
|
347
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
348
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
349
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
def test_organization_role_created_round_trip
|
|
353
|
+
fixture = {
|
|
354
|
+
"object" => "event",
|
|
355
|
+
"id" => "stub",
|
|
356
|
+
"event" => "organization_role.created",
|
|
357
|
+
"data" => {},
|
|
358
|
+
"created_at" => "stub",
|
|
359
|
+
"context" => {}
|
|
360
|
+
}
|
|
361
|
+
model = WorkOS::OrganizationRoleCreated.new(fixture.to_json)
|
|
362
|
+
json = model.to_h
|
|
363
|
+
assert_kind_of Hash, json
|
|
364
|
+
assert_equal fixture["id"], json[:id]
|
|
365
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
366
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
def test_organization_role_created_data_round_trip
|
|
370
|
+
fixture = {
|
|
371
|
+
"object" => "organization_role",
|
|
372
|
+
"organization_id" => "stub",
|
|
373
|
+
"slug" => "stub",
|
|
374
|
+
"name" => "stub",
|
|
375
|
+
"description" => nil,
|
|
376
|
+
"resource_type_slug" => "stub",
|
|
377
|
+
"permissions" => [],
|
|
378
|
+
"created_at" => "stub",
|
|
379
|
+
"updated_at" => "stub"
|
|
380
|
+
}
|
|
381
|
+
model = WorkOS::OrganizationRoleCreatedData.new(fixture.to_json)
|
|
382
|
+
json = model.to_h
|
|
383
|
+
assert_kind_of Hash, json
|
|
384
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
385
|
+
assert_equal fixture["slug"], json[:slug]
|
|
386
|
+
assert_equal fixture["name"], json[:name]
|
|
387
|
+
assert_nil json[:description]
|
|
388
|
+
assert_equal fixture["resource_type_slug"], json[:resource_type_slug]
|
|
389
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
390
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
391
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
def test_organization_role_deleted_round_trip
|
|
395
|
+
fixture = {
|
|
396
|
+
"object" => "event",
|
|
397
|
+
"id" => "stub",
|
|
398
|
+
"event" => "organization_role.deleted",
|
|
399
|
+
"data" => {},
|
|
400
|
+
"created_at" => "stub",
|
|
401
|
+
"context" => {}
|
|
402
|
+
}
|
|
403
|
+
model = WorkOS::OrganizationRoleDeleted.new(fixture.to_json)
|
|
404
|
+
json = model.to_h
|
|
405
|
+
assert_kind_of Hash, json
|
|
406
|
+
assert_equal fixture["id"], json[:id]
|
|
407
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
408
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
def test_organization_role_deleted_data_round_trip
|
|
412
|
+
fixture = {
|
|
413
|
+
"object" => "organization_role",
|
|
414
|
+
"organization_id" => "stub",
|
|
415
|
+
"slug" => "stub",
|
|
416
|
+
"name" => "stub",
|
|
417
|
+
"description" => nil,
|
|
418
|
+
"resource_type_slug" => "stub",
|
|
419
|
+
"permissions" => [],
|
|
420
|
+
"created_at" => "stub",
|
|
421
|
+
"updated_at" => "stub"
|
|
422
|
+
}
|
|
423
|
+
model = WorkOS::OrganizationRoleDeletedData.new(fixture.to_json)
|
|
424
|
+
json = model.to_h
|
|
425
|
+
assert_kind_of Hash, json
|
|
426
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
427
|
+
assert_equal fixture["slug"], json[:slug]
|
|
428
|
+
assert_equal fixture["name"], json[:name]
|
|
429
|
+
assert_nil json[:description]
|
|
430
|
+
assert_equal fixture["resource_type_slug"], json[:resource_type_slug]
|
|
431
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
432
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
433
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
def test_organization_role_updated_round_trip
|
|
437
|
+
fixture = {
|
|
438
|
+
"object" => "event",
|
|
439
|
+
"id" => "stub",
|
|
440
|
+
"event" => "organization_role.updated",
|
|
441
|
+
"data" => {},
|
|
442
|
+
"created_at" => "stub",
|
|
443
|
+
"context" => {}
|
|
444
|
+
}
|
|
445
|
+
model = WorkOS::OrganizationRoleUpdated.new(fixture.to_json)
|
|
446
|
+
json = model.to_h
|
|
447
|
+
assert_kind_of Hash, json
|
|
448
|
+
assert_equal fixture["id"], json[:id]
|
|
449
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
450
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
def test_organization_role_updated_data_round_trip
|
|
454
|
+
fixture = {
|
|
455
|
+
"object" => "organization_role",
|
|
456
|
+
"organization_id" => "stub",
|
|
457
|
+
"slug" => "stub",
|
|
458
|
+
"name" => "stub",
|
|
459
|
+
"description" => nil,
|
|
460
|
+
"resource_type_slug" => "stub",
|
|
461
|
+
"permissions" => [],
|
|
462
|
+
"created_at" => "stub",
|
|
463
|
+
"updated_at" => "stub"
|
|
464
|
+
}
|
|
465
|
+
model = WorkOS::OrganizationRoleUpdatedData.new(fixture.to_json)
|
|
466
|
+
json = model.to_h
|
|
467
|
+
assert_kind_of Hash, json
|
|
468
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
469
|
+
assert_equal fixture["slug"], json[:slug]
|
|
470
|
+
assert_equal fixture["name"], json[:name]
|
|
471
|
+
assert_nil json[:description]
|
|
472
|
+
assert_equal fixture["resource_type_slug"], json[:resource_type_slug]
|
|
473
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
474
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
475
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
def test_organization_updated_round_trip
|
|
479
|
+
fixture = {
|
|
480
|
+
"object" => "event",
|
|
481
|
+
"id" => "stub",
|
|
482
|
+
"event" => "organization.updated",
|
|
483
|
+
"data" => {},
|
|
484
|
+
"created_at" => "stub",
|
|
485
|
+
"context" => {}
|
|
486
|
+
}
|
|
487
|
+
model = WorkOS::OrganizationUpdated.new(fixture.to_json)
|
|
488
|
+
json = model.to_h
|
|
489
|
+
assert_kind_of Hash, json
|
|
490
|
+
assert_equal fixture["id"], json[:id]
|
|
491
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
492
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
def test_organization_updated_data_round_trip
|
|
496
|
+
fixture = {
|
|
497
|
+
"object" => "organization",
|
|
498
|
+
"id" => "stub",
|
|
499
|
+
"name" => "stub",
|
|
500
|
+
"domains" => [],
|
|
501
|
+
"metadata" => {},
|
|
502
|
+
"external_id" => nil,
|
|
503
|
+
"stripe_customer_id" => "stub",
|
|
504
|
+
"created_at" => "stub",
|
|
505
|
+
"updated_at" => "stub"
|
|
506
|
+
}
|
|
507
|
+
model = WorkOS::OrganizationUpdatedData.new(fixture.to_json)
|
|
508
|
+
json = model.to_h
|
|
509
|
+
assert_kind_of Hash, json
|
|
510
|
+
assert_equal fixture["id"], json[:id]
|
|
511
|
+
assert_equal fixture["name"], json[:name]
|
|
512
|
+
assert_nil json[:external_id]
|
|
513
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
514
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
515
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
def test_organization_updated_data_domain_round_trip
|
|
519
|
+
fixture = {
|
|
520
|
+
"object" => "organization_domain",
|
|
521
|
+
"id" => "stub",
|
|
522
|
+
"organization_id" => "stub",
|
|
523
|
+
"domain" => "stub",
|
|
524
|
+
"state" => "stub",
|
|
525
|
+
"verification_prefix" => "stub",
|
|
526
|
+
"verification_token" => "stub",
|
|
527
|
+
"verification_strategy" => "stub",
|
|
528
|
+
"created_at" => "stub",
|
|
529
|
+
"updated_at" => "stub"
|
|
530
|
+
}
|
|
531
|
+
model = WorkOS::OrganizationUpdatedDataDomain.new(fixture.to_json)
|
|
532
|
+
json = model.to_h
|
|
533
|
+
assert_kind_of Hash, json
|
|
534
|
+
assert_equal fixture["id"], json[:id]
|
|
535
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
536
|
+
assert_equal fixture["domain"], json[:domain]
|
|
537
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
538
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
539
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
def test_organization_api_key_round_trip
|
|
543
|
+
fixture = {
|
|
544
|
+
"object" => "api_key",
|
|
545
|
+
"id" => "stub",
|
|
546
|
+
"owner" => {},
|
|
547
|
+
"name" => "stub",
|
|
548
|
+
"obfuscated_value" => "stub",
|
|
549
|
+
"last_used_at" => nil,
|
|
550
|
+
"expires_at" => nil,
|
|
551
|
+
"permissions" => [],
|
|
552
|
+
"created_at" => "stub",
|
|
553
|
+
"updated_at" => "stub"
|
|
554
|
+
}
|
|
555
|
+
model = WorkOS::OrganizationApiKey.new(fixture.to_json)
|
|
556
|
+
json = model.to_h
|
|
557
|
+
assert_kind_of Hash, json
|
|
558
|
+
assert_equal fixture["id"], json[:id]
|
|
559
|
+
assert_equal fixture["name"], json[:name]
|
|
560
|
+
assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
|
|
561
|
+
assert_nil json[:last_used_at]
|
|
562
|
+
assert_nil json[:expires_at]
|
|
563
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
564
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
565
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
def test_it_contact_round_trip
|
|
569
|
+
fixture = {
|
|
570
|
+
"object" => "it_contact",
|
|
571
|
+
"id" => "stub",
|
|
572
|
+
"email" => "stub",
|
|
573
|
+
"created_at" => "stub",
|
|
574
|
+
"updated_at" => "stub"
|
|
575
|
+
}
|
|
576
|
+
model = WorkOS::ItContact.new(fixture.to_json)
|
|
577
|
+
json = model.to_h
|
|
578
|
+
assert_kind_of Hash, json
|
|
579
|
+
assert_equal fixture["id"], json[:id]
|
|
580
|
+
assert_equal fixture["email"], json[:email]
|
|
581
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
582
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
583
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
def test_organization_round_trip
|
|
587
|
+
fixture = {
|
|
588
|
+
"object" => "organization",
|
|
589
|
+
"id" => "stub",
|
|
590
|
+
"name" => "stub",
|
|
591
|
+
"domains" => [],
|
|
592
|
+
"metadata" => {},
|
|
593
|
+
"external_id" => nil,
|
|
594
|
+
"stripe_customer_id" => "stub",
|
|
595
|
+
"created_at" => "stub",
|
|
596
|
+
"updated_at" => "stub",
|
|
597
|
+
"allow_profiles_outside_organization" => true
|
|
598
|
+
}
|
|
599
|
+
model = WorkOS::Organization.new(fixture.to_json)
|
|
600
|
+
json = model.to_h
|
|
601
|
+
assert_kind_of Hash, json
|
|
602
|
+
assert_equal fixture["id"], json[:id]
|
|
603
|
+
assert_equal fixture["name"], json[:name]
|
|
604
|
+
assert_nil json[:external_id]
|
|
605
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
606
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
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_audit_log_configuration_round_trip
|
|
611
|
+
fixture = {
|
|
612
|
+
"organization_id" => "stub",
|
|
613
|
+
"retention_period_in_days" => 1,
|
|
614
|
+
"state" => "stub",
|
|
615
|
+
"log_stream" => {}
|
|
616
|
+
}
|
|
617
|
+
model = WorkOS::AuditLogConfiguration.new(fixture.to_json)
|
|
618
|
+
json = model.to_h
|
|
619
|
+
assert_kind_of Hash, json
|
|
620
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
621
|
+
assert_equal fixture["retention_period_in_days"], json[:retention_period_in_days]
|
|
622
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
623
|
+
end
|
|
624
|
+
|
|
625
|
+
def test_audit_log_configuration_log_stream_round_trip
|
|
626
|
+
fixture = {
|
|
627
|
+
"id" => "stub",
|
|
628
|
+
"type" => "stub",
|
|
629
|
+
"state" => "stub",
|
|
630
|
+
"last_synced_at" => nil,
|
|
631
|
+
"created_at" => "stub"
|
|
632
|
+
}
|
|
633
|
+
model = WorkOS::AuditLogConfigurationLogStream.new(fixture.to_json)
|
|
634
|
+
json = model.to_h
|
|
635
|
+
assert_kind_of Hash, json
|
|
636
|
+
assert_equal fixture["id"], json[:id]
|
|
637
|
+
assert_nil json[:last_synced_at]
|
|
638
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
639
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
def test_organization_api_key_owner_round_trip
|
|
643
|
+
fixture = {
|
|
644
|
+
"type" => "organization",
|
|
645
|
+
"id" => "stub"
|
|
646
|
+
}
|
|
647
|
+
model = WorkOS::OrganizationApiKeyOwner.new(fixture.to_json)
|
|
648
|
+
json = model.to_h
|
|
649
|
+
assert_kind_of Hash, json
|
|
650
|
+
assert_equal fixture["id"], json[:id]
|
|
651
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
def test_organization_authorized_connect_application_list_data_round_trip
|
|
655
|
+
fixture = {
|
|
656
|
+
"object" => "authorized_connect_application",
|
|
657
|
+
"id" => "stub",
|
|
658
|
+
"granted_scopes" => [],
|
|
659
|
+
"oauth_resource" => "stub",
|
|
660
|
+
"application" => {},
|
|
661
|
+
"user_id" => "stub"
|
|
662
|
+
}
|
|
663
|
+
model = WorkOS::OrganizationAuthorizedConnectApplicationListData.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["user_id"], json[:user_id]
|
|
668
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
669
|
+
end
|
|
29
670
|
end
|
data/test/workos/test_pipes.rb
CHANGED
|
@@ -60,6 +60,13 @@ class PipesTest < Minitest::Test
|
|
|
60
60
|
refute_nil result
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
def test_update_data_integration_client_credentials_returns_expected_result
|
|
64
|
+
stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)})
|
|
65
|
+
.to_return(body: "{}", status: 200)
|
|
66
|
+
result = @client.pipes.update_data_integration_client_credentials(slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub")
|
|
67
|
+
refute_nil result
|
|
68
|
+
end
|
|
69
|
+
|
|
63
70
|
def test_create_data_integration_credential_returns_expected_result
|
|
64
71
|
stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)})
|
|
65
72
|
.to_return(body: "{}", status: 200)
|
|
@@ -118,6 +125,7 @@ class PipesTest < Minitest::Test
|
|
|
118
125
|
{name: :delete_data_integration, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub(\?|\z)}, args: {slug: "stub"}},
|
|
119
126
|
{name: :update_data_integration_api_key, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/api-key(\?|\z)}, args: {slug: "stub", user_id: "stub", secret: "stub"}},
|
|
120
127
|
{name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
|
|
128
|
+
{name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}},
|
|
121
129
|
{name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
|
|
122
130
|
{name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}},
|
|
123
131
|
{name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
|