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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
require "json"
|
|
6
|
+
require "uri"
|
|
6
7
|
|
|
7
8
|
module WorkOS
|
|
8
9
|
class UserManagement
|
|
@@ -18,7 +19,13 @@ module WorkOS
|
|
|
18
19
|
# @return [String]
|
|
19
20
|
# @!attribute [r] password_hash_type
|
|
20
21
|
# @return [WorkOS::Types::CreateUserPasswordHashType]
|
|
21
|
-
|
|
22
|
+
# @!attribute [r] password_salt_position
|
|
23
|
+
# @return [WorkOS::Types::CreateUserPasswordSaltPosition, nil]
|
|
24
|
+
PasswordHashed = Data.define(:password_hash, :password_hash_type, :password_salt_position) do
|
|
25
|
+
def initialize(password_hash:, password_hash_type:, password_salt_position: nil)
|
|
26
|
+
super
|
|
27
|
+
end
|
|
28
|
+
end
|
|
22
29
|
|
|
23
30
|
def initialize(client)
|
|
24
31
|
@client = client
|
|
@@ -61,9 +68,10 @@ module WorkOS
|
|
|
61
68
|
# @param organization_id [String, nil] The ID of the organization to scope the session to.
|
|
62
69
|
# @param pending_authentication_token [String, nil] The pending authentication token from a previous authentication attempt.
|
|
63
70
|
# @param authentication_challenge_id [String, nil] The ID of the MFA authentication challenge.
|
|
71
|
+
# @param email_completion_token [String, nil] The token from the `email_completion_required` response.
|
|
64
72
|
# @param radar_challenge_id [String, nil] The ID of the Radar email challenge being verified.
|
|
65
|
-
# @param verification_id [String, nil] The ID of the Radar SMS verification being confirmed.
|
|
66
|
-
# @param phone_number [String, nil] The phone number the Radar SMS challenge was sent to.
|
|
73
|
+
# @param verification_id [String, nil] The ID of the Radar SMS verification being confirmed. Required for sign-up challenges; omitted for sign-in challenges, where the verification is resolved server-side.
|
|
74
|
+
# @param phone_number [String, nil] The phone number the Radar SMS challenge was sent to. Required for sign-up challenges; omitted for sign-in challenges, where the phone number on file is resolved server-side.
|
|
67
75
|
# @param device_code [String, nil] The device verification code.
|
|
68
76
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
69
77
|
# @return [WorkOS::AuthenticateResponse]
|
|
@@ -85,6 +93,7 @@ module WorkOS
|
|
|
85
93
|
organization_id: nil,
|
|
86
94
|
pending_authentication_token: nil,
|
|
87
95
|
authentication_challenge_id: nil,
|
|
96
|
+
email_completion_token: nil,
|
|
88
97
|
radar_challenge_id: nil,
|
|
89
98
|
verification_id: nil,
|
|
90
99
|
phone_number: nil,
|
|
@@ -109,6 +118,7 @@ module WorkOS
|
|
|
109
118
|
"organization_id" => organization_id,
|
|
110
119
|
"pending_authentication_token" => pending_authentication_token,
|
|
111
120
|
"authentication_challenge_id" => authentication_challenge_id,
|
|
121
|
+
"email_completion_token" => email_completion_token,
|
|
112
122
|
"radar_challenge_id" => radar_challenge_id,
|
|
113
123
|
"verification_id" => verification_id,
|
|
114
124
|
"phone_number" => phone_number,
|
|
@@ -475,8 +485,8 @@ module WorkOS
|
|
|
475
485
|
|
|
476
486
|
# Authenticate with radar sms challenge.
|
|
477
487
|
# @param code [String]
|
|
478
|
-
# @param verification_id [String]
|
|
479
|
-
# @param phone_number [String]
|
|
488
|
+
# @param verification_id [String, nil]
|
|
489
|
+
# @param phone_number [String, nil]
|
|
480
490
|
# @param pending_authentication_token [String]
|
|
481
491
|
# @param ip_address [String, nil]
|
|
482
492
|
# @param device_id [String, nil]
|
|
@@ -485,9 +495,9 @@ module WorkOS
|
|
|
485
495
|
# @return [WorkOS::AuthenticateResponse]
|
|
486
496
|
def authenticate_with_radar_sms_challenge(
|
|
487
497
|
code:,
|
|
488
|
-
verification_id:,
|
|
489
|
-
phone_number:,
|
|
490
498
|
pending_authentication_token:,
|
|
499
|
+
verification_id: nil,
|
|
500
|
+
phone_number: nil,
|
|
491
501
|
ip_address: nil,
|
|
492
502
|
device_id: nil,
|
|
493
503
|
user_agent: nil,
|
|
@@ -515,6 +525,70 @@ module WorkOS
|
|
|
515
525
|
WorkOS::AuthenticateResponse.new(response.body)
|
|
516
526
|
end
|
|
517
527
|
|
|
528
|
+
# Get an authorization URL
|
|
529
|
+
# Builds the URL client-side; no HTTP request is made.
|
|
530
|
+
# @param code_challenge_method [String, nil] The only valid PKCE code challenge method is `"S256"`. Required when specifying a `code_challenge`.
|
|
531
|
+
# @param code_challenge [String, nil] Code challenge derived from the code verifier used for the PKCE flow.
|
|
532
|
+
# @param domain_hint [String, nil] A domain hint for SSO connection lookup.
|
|
533
|
+
# @param connection_id [String, nil] The ID of an SSO connection to use for authentication.
|
|
534
|
+
# @param provider_query_params [Hash{String => String}, nil] Key/value pairs of query parameters to pass to the OAuth provider.
|
|
535
|
+
# @param provider_scopes [Array<String>, nil] Additional OAuth scopes to request from the identity provider.
|
|
536
|
+
# @param invitation_token [String, nil] A token representing a user invitation to redeem during authentication.
|
|
537
|
+
# @param max_age [Integer, nil] Maximum allowable elapsed time, in seconds, since the user last actively authenticated. If the last authentication is older than this value, the user is prompted to re-authenticate; a value of `0` forces re-authentication. Only supported when the provider is `authkit`.
|
|
538
|
+
# @param screen_hint [WorkOS::Types::UserManagementAuthenticationScreenHint, nil] Used to specify which screen to display when the provider is `authkit`.
|
|
539
|
+
# @param login_hint [String, nil] A hint to the authorization server about the login identifier the user might use.
|
|
540
|
+
# @param provider [WorkOS::Types::UserManagementAuthenticationProvider, nil] The OAuth provider to authenticate with (e.g., GoogleOAuth, MicrosoftOAuth, GitHubOAuth).
|
|
541
|
+
# @param prompt [String, nil] Controls the authentication flow behavior for the user.
|
|
542
|
+
# @param state [String, nil] An opaque value used to maintain state between the request and the callback.
|
|
543
|
+
# @param organization_id [String, nil] The ID of the organization to authenticate the user against.
|
|
544
|
+
# @param redirect_uri [String] The callback URI where the authorization code will be sent after authentication.
|
|
545
|
+
# @param client_id [String, nil] The unique identifier of the WorkOS environment client. Defaults to the client's configured client_id.
|
|
546
|
+
# @return [String]
|
|
547
|
+
def get_authorization_url(
|
|
548
|
+
redirect_uri:,
|
|
549
|
+
code_challenge_method: nil,
|
|
550
|
+
code_challenge: nil,
|
|
551
|
+
domain_hint: nil,
|
|
552
|
+
connection_id: nil,
|
|
553
|
+
provider_query_params: nil,
|
|
554
|
+
provider_scopes: nil,
|
|
555
|
+
invitation_token: nil,
|
|
556
|
+
max_age: nil,
|
|
557
|
+
screen_hint: nil,
|
|
558
|
+
login_hint: nil,
|
|
559
|
+
provider: nil,
|
|
560
|
+
prompt: nil,
|
|
561
|
+
state: nil,
|
|
562
|
+
organization_id: nil,
|
|
563
|
+
client_id: nil
|
|
564
|
+
)
|
|
565
|
+
params = {
|
|
566
|
+
"code_challenge_method" => code_challenge_method,
|
|
567
|
+
"code_challenge" => code_challenge,
|
|
568
|
+
"domain_hint" => domain_hint,
|
|
569
|
+
"connection_id" => connection_id,
|
|
570
|
+
"provider_query_params" => provider_query_params,
|
|
571
|
+
"provider_scopes" => provider_scopes,
|
|
572
|
+
"invitation_token" => invitation_token,
|
|
573
|
+
"max_age" => max_age,
|
|
574
|
+
"screen_hint" => screen_hint,
|
|
575
|
+
"login_hint" => login_hint,
|
|
576
|
+
"provider" => provider,
|
|
577
|
+
"prompt" => prompt,
|
|
578
|
+
"state" => state,
|
|
579
|
+
"organization_id" => organization_id,
|
|
580
|
+
"redirect_uri" => redirect_uri,
|
|
581
|
+
"client_id" => client_id
|
|
582
|
+
}.compact
|
|
583
|
+
params["provider_query_params"] = JSON.generate(provider_query_params) unless provider_query_params.nil?
|
|
584
|
+
params["provider_scopes"] = provider_scopes.join(",") unless provider_scopes.nil?
|
|
585
|
+
params["response_type"] = "code"
|
|
586
|
+
params["client_id"] = @client.client_id if !params.key?("client_id") && !@client.client_id.nil?
|
|
587
|
+
uri = URI.join(@client.base_url, "/user_management/authorize")
|
|
588
|
+
uri.query = URI.encode_www_form(params) unless params.empty?
|
|
589
|
+
uri.to_s
|
|
590
|
+
end
|
|
591
|
+
|
|
518
592
|
# Get device authorization URL
|
|
519
593
|
# @param client_id [String] The WorkOS client ID for your application.
|
|
520
594
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -573,6 +647,43 @@ module WorkOS
|
|
|
573
647
|
result
|
|
574
648
|
end
|
|
575
649
|
|
|
650
|
+
# Get Radar Challenge details
|
|
651
|
+
# @param id [String] The unique ID of the Radar Challenge.
|
|
652
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
653
|
+
# @return [WorkOS::RadarChallenge]
|
|
654
|
+
def get_radar_challenge(
|
|
655
|
+
id:,
|
|
656
|
+
request_options: {}
|
|
657
|
+
)
|
|
658
|
+
response = @client.request(
|
|
659
|
+
method: :get,
|
|
660
|
+
path: "/user_management/radar_challenges/#{WorkOS::Util.encode_path(id)}",
|
|
661
|
+
auth: true,
|
|
662
|
+
request_options: request_options
|
|
663
|
+
)
|
|
664
|
+
result = WorkOS::RadarChallenge.new(response.body)
|
|
665
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
666
|
+
result
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
# Logout
|
|
670
|
+
# Builds the URL client-side; no HTTP request is made.
|
|
671
|
+
# @param session_id [String] The ID of the session. This can be extracted from the `sid` claim of the access token.
|
|
672
|
+
# @param return_to [String, nil] The URL to redirect the user to after logout.
|
|
673
|
+
# @return [String]
|
|
674
|
+
def get_logout_url(
|
|
675
|
+
session_id:,
|
|
676
|
+
return_to: nil
|
|
677
|
+
)
|
|
678
|
+
params = {
|
|
679
|
+
"session_id" => session_id,
|
|
680
|
+
"return_to" => return_to
|
|
681
|
+
}.compact
|
|
682
|
+
uri = URI.join(@client.base_url, "/user_management/sessions/logout")
|
|
683
|
+
uri.query = URI.encode_www_form(params) unless params.empty?
|
|
684
|
+
uri.to_s
|
|
685
|
+
end
|
|
686
|
+
|
|
576
687
|
# Revoke Session
|
|
577
688
|
# @param session_id [String] The ID of the session to revoke. This can be extracted from the `sid` claim of the access token.
|
|
578
689
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -820,30 +931,30 @@ module WorkOS
|
|
|
820
931
|
# @return [WorkOS::UserCreateResponse]
|
|
821
932
|
def create_user(
|
|
822
933
|
email:,
|
|
823
|
-
first_name:
|
|
824
|
-
last_name:
|
|
825
|
-
name:
|
|
826
|
-
email_verified:
|
|
827
|
-
metadata:
|
|
828
|
-
external_id:
|
|
829
|
-
ip_address:
|
|
830
|
-
user_agent:
|
|
934
|
+
first_name: WorkOS::OMIT,
|
|
935
|
+
last_name: WorkOS::OMIT,
|
|
936
|
+
name: WorkOS::OMIT,
|
|
937
|
+
email_verified: WorkOS::OMIT,
|
|
938
|
+
metadata: WorkOS::OMIT,
|
|
939
|
+
external_id: WorkOS::OMIT,
|
|
940
|
+
ip_address: WorkOS::OMIT,
|
|
941
|
+
user_agent: WorkOS::OMIT,
|
|
831
942
|
signals_id: nil,
|
|
832
943
|
password: nil,
|
|
833
944
|
request_options: {}
|
|
834
945
|
)
|
|
835
946
|
body = {
|
|
836
947
|
"email" => email,
|
|
837
|
-
"first_name" => first_name,
|
|
838
|
-
"last_name" => last_name,
|
|
839
|
-
"name" => name,
|
|
840
|
-
"email_verified" => email_verified,
|
|
841
|
-
"metadata" => metadata,
|
|
842
|
-
"external_id" => external_id,
|
|
843
|
-
"ip_address" => ip_address,
|
|
844
|
-
"user_agent" => user_agent,
|
|
845
948
|
"signals_id" => signals_id
|
|
846
949
|
}.compact
|
|
950
|
+
body["first_name"] = first_name unless first_name.equal?(WorkOS::OMIT)
|
|
951
|
+
body["last_name"] = last_name unless last_name.equal?(WorkOS::OMIT)
|
|
952
|
+
body["name"] = name unless name.equal?(WorkOS::OMIT)
|
|
953
|
+
body["email_verified"] = email_verified unless email_verified.equal?(WorkOS::OMIT)
|
|
954
|
+
body["metadata"] = metadata unless metadata.equal?(WorkOS::OMIT)
|
|
955
|
+
body["external_id"] = external_id unless external_id.equal?(WorkOS::OMIT)
|
|
956
|
+
body["ip_address"] = ip_address unless ip_address.equal?(WorkOS::OMIT)
|
|
957
|
+
body["user_agent"] = user_agent unless user_agent.equal?(WorkOS::OMIT)
|
|
847
958
|
if password
|
|
848
959
|
case password
|
|
849
960
|
when WorkOS::UserManagement::PasswordPlaintext
|
|
@@ -851,6 +962,7 @@ module WorkOS
|
|
|
851
962
|
when WorkOS::UserManagement::PasswordHashed
|
|
852
963
|
body["password_hash"] = password.password_hash
|
|
853
964
|
body["password_hash_type"] = password.password_hash_type
|
|
965
|
+
body["password_salt_position"] = password.password_salt_position unless password.password_salt_position.nil?
|
|
854
966
|
else
|
|
855
967
|
raise ArgumentError, "expected password to be one of: WorkOS::UserManagement::PasswordPlaintext, WorkOS::UserManagement::PasswordHashed, got #{password.class}"
|
|
856
968
|
end
|
|
@@ -925,9 +1037,9 @@ module WorkOS
|
|
|
925
1037
|
last_name: nil,
|
|
926
1038
|
name: nil,
|
|
927
1039
|
email_verified: nil,
|
|
928
|
-
metadata:
|
|
929
|
-
external_id:
|
|
930
|
-
locale:
|
|
1040
|
+
metadata: WorkOS::OMIT,
|
|
1041
|
+
external_id: WorkOS::OMIT,
|
|
1042
|
+
locale: WorkOS::OMIT,
|
|
931
1043
|
password: nil,
|
|
932
1044
|
request_options: {}
|
|
933
1045
|
)
|
|
@@ -936,11 +1048,11 @@ module WorkOS
|
|
|
936
1048
|
"first_name" => first_name,
|
|
937
1049
|
"last_name" => last_name,
|
|
938
1050
|
"name" => name,
|
|
939
|
-
"email_verified" => email_verified
|
|
940
|
-
"metadata" => metadata,
|
|
941
|
-
"external_id" => external_id,
|
|
942
|
-
"locale" => locale
|
|
1051
|
+
"email_verified" => email_verified
|
|
943
1052
|
}.compact
|
|
1053
|
+
body["metadata"] = metadata unless metadata.equal?(WorkOS::OMIT)
|
|
1054
|
+
body["external_id"] = external_id unless external_id.equal?(WorkOS::OMIT)
|
|
1055
|
+
body["locale"] = locale unless locale.equal?(WorkOS::OMIT)
|
|
944
1056
|
if password
|
|
945
1057
|
case password
|
|
946
1058
|
when WorkOS::UserManagement::PasswordPlaintext
|
|
@@ -948,6 +1060,7 @@ module WorkOS
|
|
|
948
1060
|
when WorkOS::UserManagement::PasswordHashed
|
|
949
1061
|
body["password_hash"] = password.password_hash
|
|
950
1062
|
body["password_hash_type"] = password.password_hash_type
|
|
1063
|
+
body["password_salt_position"] = password.password_salt_position unless password.password_salt_position.nil?
|
|
951
1064
|
else
|
|
952
1065
|
raise ArgumentError, "expected password to be one of: WorkOS::UserManagement::PasswordPlaintext, WorkOS::UserManagement::PasswordHashed, got #{password.class}"
|
|
953
1066
|
end
|
|
@@ -1493,6 +1606,23 @@ module WorkOS
|
|
|
1493
1606
|
result
|
|
1494
1607
|
end
|
|
1495
1608
|
|
|
1609
|
+
# Delete a redirect URI
|
|
1610
|
+
# @param id [String] The ID of the redirect URI to delete.
|
|
1611
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1612
|
+
# @return [void]
|
|
1613
|
+
def delete_redirect_uris(
|
|
1614
|
+
id:,
|
|
1615
|
+
request_options: {}
|
|
1616
|
+
)
|
|
1617
|
+
@client.request(
|
|
1618
|
+
method: :delete,
|
|
1619
|
+
path: "/user_management/redirect_uris/#{WorkOS::Util.encode_path(id)}",
|
|
1620
|
+
auth: true,
|
|
1621
|
+
request_options: request_options
|
|
1622
|
+
)
|
|
1623
|
+
nil
|
|
1624
|
+
end
|
|
1625
|
+
|
|
1496
1626
|
# List authorized applications
|
|
1497
1627
|
# @param user_id [String] The ID of the user.
|
|
1498
1628
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
@@ -1559,6 +1689,179 @@ module WorkOS
|
|
|
1559
1689
|
nil
|
|
1560
1690
|
end
|
|
1561
1691
|
|
|
1692
|
+
# Delete a waitlist entry
|
|
1693
|
+
# @param id [String] The unique ID of the waitlist entry.
|
|
1694
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1695
|
+
# @return [void]
|
|
1696
|
+
def delete_waitlist_entry(
|
|
1697
|
+
id:,
|
|
1698
|
+
request_options: {}
|
|
1699
|
+
)
|
|
1700
|
+
@client.request(
|
|
1701
|
+
method: :delete,
|
|
1702
|
+
path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}",
|
|
1703
|
+
auth: true,
|
|
1704
|
+
request_options: request_options
|
|
1705
|
+
)
|
|
1706
|
+
nil
|
|
1707
|
+
end
|
|
1708
|
+
|
|
1709
|
+
# Approve a waitlist entry
|
|
1710
|
+
# @param id [String] The unique ID of the waitlist entry.
|
|
1711
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1712
|
+
# @return [WorkOS::WaitlistEntry]
|
|
1713
|
+
def create_waitlist_entry_approve(
|
|
1714
|
+
id:,
|
|
1715
|
+
request_options: {}
|
|
1716
|
+
)
|
|
1717
|
+
response = @client.request(
|
|
1718
|
+
method: :post,
|
|
1719
|
+
path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}/approve",
|
|
1720
|
+
auth: true,
|
|
1721
|
+
request_options: request_options
|
|
1722
|
+
)
|
|
1723
|
+
result = WorkOS::WaitlistEntry.new(response.body)
|
|
1724
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
1725
|
+
result
|
|
1726
|
+
end
|
|
1727
|
+
|
|
1728
|
+
# Deny a waitlist entry
|
|
1729
|
+
# @param id [String] The unique ID of the waitlist entry.
|
|
1730
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1731
|
+
# @return [WorkOS::WaitlistEntry]
|
|
1732
|
+
def create_waitlist_entry_deny(
|
|
1733
|
+
id:,
|
|
1734
|
+
request_options: {}
|
|
1735
|
+
)
|
|
1736
|
+
response = @client.request(
|
|
1737
|
+
method: :post,
|
|
1738
|
+
path: "/user_management/waitlist_entries/#{WorkOS::Util.encode_path(id)}/deny",
|
|
1739
|
+
auth: true,
|
|
1740
|
+
request_options: request_options
|
|
1741
|
+
)
|
|
1742
|
+
result = WorkOS::WaitlistEntry.new(response.body)
|
|
1743
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
1744
|
+
result
|
|
1745
|
+
end
|
|
1746
|
+
|
|
1747
|
+
# List waitlists
|
|
1748
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1749
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::Waitlist>]
|
|
1750
|
+
def list_waitlists(request_options: {})
|
|
1751
|
+
response = @client.request(
|
|
1752
|
+
method: :get,
|
|
1753
|
+
path: "/user_management/waitlists",
|
|
1754
|
+
auth: true,
|
|
1755
|
+
request_options: request_options
|
|
1756
|
+
)
|
|
1757
|
+
WorkOS::Types::ListStruct.from_response(response, model: WorkOS::Waitlist)
|
|
1758
|
+
end
|
|
1759
|
+
|
|
1760
|
+
# Get a waitlist
|
|
1761
|
+
# @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. The default waitlist is created when its first entry is added, so read requests for `default` return a `404` until then.
|
|
1762
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1763
|
+
# @return [WorkOS::Waitlist]
|
|
1764
|
+
def get_waitlist(
|
|
1765
|
+
id:,
|
|
1766
|
+
request_options: {}
|
|
1767
|
+
)
|
|
1768
|
+
response = @client.request(
|
|
1769
|
+
method: :get,
|
|
1770
|
+
path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}",
|
|
1771
|
+
auth: true,
|
|
1772
|
+
request_options: request_options
|
|
1773
|
+
)
|
|
1774
|
+
result = WorkOS::Waitlist.new(response.body)
|
|
1775
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
1776
|
+
result
|
|
1777
|
+
end
|
|
1778
|
+
|
|
1779
|
+
# List waitlist entries
|
|
1780
|
+
# @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. The default waitlist is created when its first entry is added, so read requests for `default` return a `404` until then.
|
|
1781
|
+
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
1782
|
+
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
1783
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
1784
|
+
# @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
|
|
1785
|
+
# @param state [WorkOS::Types::UserManagementWaitlistsState, nil] Filter waitlist entries by their state.
|
|
1786
|
+
# @param email [String, nil] Filter waitlist entries by their exact email address.
|
|
1787
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1788
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::WaitlistEntry>]
|
|
1789
|
+
def list_waitlist_entries(
|
|
1790
|
+
id:,
|
|
1791
|
+
before: nil,
|
|
1792
|
+
after: nil,
|
|
1793
|
+
limit: 10,
|
|
1794
|
+
order: "desc",
|
|
1795
|
+
state: nil,
|
|
1796
|
+
email: nil,
|
|
1797
|
+
request_options: {}
|
|
1798
|
+
)
|
|
1799
|
+
params = {
|
|
1800
|
+
"before" => before,
|
|
1801
|
+
"after" => after,
|
|
1802
|
+
"limit" => limit,
|
|
1803
|
+
"order" => order,
|
|
1804
|
+
"state" => state,
|
|
1805
|
+
"email" => email
|
|
1806
|
+
}.compact
|
|
1807
|
+
response = @client.request(
|
|
1808
|
+
method: :get,
|
|
1809
|
+
path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}/entries",
|
|
1810
|
+
auth: true,
|
|
1811
|
+
params: params,
|
|
1812
|
+
request_options: request_options
|
|
1813
|
+
)
|
|
1814
|
+
fetch_next = ->(cursor) {
|
|
1815
|
+
list_waitlist_entries(
|
|
1816
|
+
id: id,
|
|
1817
|
+
before: before,
|
|
1818
|
+
after: cursor,
|
|
1819
|
+
limit: limit,
|
|
1820
|
+
order: order,
|
|
1821
|
+
state: state,
|
|
1822
|
+
email: email,
|
|
1823
|
+
request_options: request_options
|
|
1824
|
+
)
|
|
1825
|
+
}
|
|
1826
|
+
WorkOS::Types::ListStruct.from_response(
|
|
1827
|
+
response,
|
|
1828
|
+
model: WorkOS::WaitlistEntry,
|
|
1829
|
+
filters: {id: id, before: before, limit: limit, order: order, state: state, email: email},
|
|
1830
|
+
fetch_next: fetch_next
|
|
1831
|
+
)
|
|
1832
|
+
end
|
|
1833
|
+
|
|
1834
|
+
# Create a waitlist entry
|
|
1835
|
+
# @param id [String] The unique ID of the waitlist, or the literal `default` for the environment's default waitlist. Use `default` when adding the first entry — the default waitlist is created automatically.
|
|
1836
|
+
# @param email [String] The email address of the user joining the waitlist.
|
|
1837
|
+
# @param additional_fields [Hash{String => String}, nil] Object containing additional key/value pairs collected with the waitlist entry. Supports up to 50 string pairs, with keys up to 40 characters and values up to 600 characters. Values are user-provided — treat them as untrusted input when rendering or exporting.
|
|
1838
|
+
# @param send_confirmation_email [Boolean, nil] Whether to send the waitlist confirmation email to the user. Defaults to `false`. No email is sent when the waitlist confirmation email is disabled in the environment, even if `send_confirmation_email` is `true`.
|
|
1839
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
1840
|
+
# @return [WorkOS::WaitlistEntry]
|
|
1841
|
+
def create_waitlist_entry(
|
|
1842
|
+
id:,
|
|
1843
|
+
email:,
|
|
1844
|
+
additional_fields: nil,
|
|
1845
|
+
send_confirmation_email: nil,
|
|
1846
|
+
request_options: {}
|
|
1847
|
+
)
|
|
1848
|
+
body = {
|
|
1849
|
+
"email" => email,
|
|
1850
|
+
"additional_fields" => additional_fields,
|
|
1851
|
+
"send_confirmation_email" => send_confirmation_email
|
|
1852
|
+
}.compact
|
|
1853
|
+
response = @client.request(
|
|
1854
|
+
method: :post,
|
|
1855
|
+
path: "/user_management/waitlists/#{WorkOS::Util.encode_path(id)}/entries",
|
|
1856
|
+
auth: true,
|
|
1857
|
+
body: body,
|
|
1858
|
+
request_options: request_options
|
|
1859
|
+
)
|
|
1860
|
+
result = WorkOS::WaitlistEntry.new(response.body)
|
|
1861
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
1862
|
+
result
|
|
1863
|
+
end
|
|
1864
|
+
|
|
1562
1865
|
# List API keys for a user
|
|
1563
1866
|
# @param user_id [String] Unique identifier of the user.
|
|
1564
1867
|
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
|
|
@@ -1654,32 +1957,10 @@ module WorkOS
|
|
|
1654
1957
|
URI.join(base, "/sso/jwks/#{WorkOS::Util.encode_path(cid)}").to_s
|
|
1655
1958
|
end
|
|
1656
1959
|
|
|
1657
|
-
# H09
|
|
1658
|
-
#
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
state: nil, screen_hint: nil, code_challenge: nil,
|
|
1662
|
-
code_challenge_method: nil, prompt: nil, **)
|
|
1663
|
-
cid = client_id || @client.client_id
|
|
1664
|
-
raise ArgumentError, "client_id is required (set on Client or pass explicitly)" if cid.nil? || cid.empty?
|
|
1665
|
-
raise ArgumentError, "provider, connection_id, or organization_id required" if provider.nil? && connection_id.nil? && organization_id.nil?
|
|
1666
|
-
params = {
|
|
1667
|
-
"client_id" => cid,
|
|
1668
|
-
"redirect_uri" => redirect_uri,
|
|
1669
|
-
"response_type" => "code",
|
|
1670
|
-
"provider" => provider,
|
|
1671
|
-
"connection_id" => connection_id,
|
|
1672
|
-
"organization_id" => organization_id,
|
|
1673
|
-
"domain_hint" => domain_hint,
|
|
1674
|
-
"login_hint" => login_hint,
|
|
1675
|
-
"state" => state,
|
|
1676
|
-
"screen_hint" => screen_hint,
|
|
1677
|
-
"code_challenge" => code_challenge,
|
|
1678
|
-
"code_challenge_method" => code_challenge_method,
|
|
1679
|
-
"prompt" => prompt
|
|
1680
|
-
}.compact
|
|
1681
|
-
build_url("/user_management/authorize", params)
|
|
1682
|
-
end
|
|
1960
|
+
# H09 (authkit_authorization_url) is provided by the generated
|
|
1961
|
+
# `get_authorization_url` url-builder method, which accepts an optional
|
|
1962
|
+
# per-call `client_id` override falling back to the client's configured
|
|
1963
|
+
# value; no hand-maintained override is needed here.
|
|
1683
1964
|
|
|
1684
1965
|
# H10 — AuthKit authorization URL with auto-generated PKCE + state.
|
|
1685
1966
|
# Returns [url, code_verifier, state].
|
|
@@ -1737,24 +2018,9 @@ module WorkOS
|
|
|
1737
2018
|
# `authenticate_with_device_code` method (wraps /user_management/authenticate);
|
|
1738
2019
|
# no hand-maintained override is needed here.
|
|
1739
2020
|
|
|
1740
|
-
#
|
|
1741
|
-
#
|
|
1742
|
-
#
|
|
1743
|
-
# @return [String]
|
|
1744
|
-
def get_logout_url(session_id:, return_to: nil)
|
|
1745
|
-
params = {"session_id" => session_id}
|
|
1746
|
-
params["return_to"] = return_to if return_to
|
|
1747
|
-
build_url("/user_management/sessions/logout", params)
|
|
1748
|
-
end
|
|
1749
|
-
|
|
1750
|
-
private
|
|
1751
|
-
|
|
1752
|
-
def build_url(path, params)
|
|
1753
|
-
base = @client.base_url
|
|
1754
|
-
uri = URI.join(base, path)
|
|
1755
|
-
uri.query = URI.encode_www_form(params)
|
|
1756
|
-
uri.to_s
|
|
1757
|
-
end
|
|
2021
|
+
# The AuthKit logout redirect URL is provided by the generated
|
|
2022
|
+
# `get_logout_url` url-builder method; no hand-maintained override is
|
|
2023
|
+
# needed here.
|
|
1758
2024
|
# @oagen-ignore-end
|
|
1759
2025
|
end
|
|
1760
2026
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class VaultKekDeleted < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
event: :event,
|
|
11
|
+
data: :data,
|
|
12
|
+
created_at: :created_at,
|
|
13
|
+
context: :context
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:object,
|
|
18
|
+
:id,
|
|
19
|
+
:event,
|
|
20
|
+
:data,
|
|
21
|
+
:created_at,
|
|
22
|
+
:context
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@object = hash[:object]
|
|
27
|
+
@id = hash[:id]
|
|
28
|
+
@event = hash[:event]
|
|
29
|
+
@data = hash[:data] ? WorkOS::VaultKekDeletedData.new(hash[:data]) : nil
|
|
30
|
+
@created_at = hash[:created_at]
|
|
31
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class VaultKekDeletedData < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
actor_id: :actor_id,
|
|
9
|
+
actor_source: :actor_source,
|
|
10
|
+
actor_name: :actor_name,
|
|
11
|
+
key_name: :key_name,
|
|
12
|
+
key_id: :key_id
|
|
13
|
+
}.freeze
|
|
14
|
+
|
|
15
|
+
attr_accessor \
|
|
16
|
+
:actor_id,
|
|
17
|
+
:actor_source,
|
|
18
|
+
:actor_name,
|
|
19
|
+
:key_name,
|
|
20
|
+
:key_id
|
|
21
|
+
|
|
22
|
+
def initialize(json)
|
|
23
|
+
hash = self.class.normalize(json)
|
|
24
|
+
@actor_id = hash[:actor_id]
|
|
25
|
+
@actor_source = hash[:actor_source]
|
|
26
|
+
@actor_name = hash[:actor_name]
|
|
27
|
+
@key_name = hash[:key_name]
|
|
28
|
+
@key_id = hash[:key_id]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
data/lib/workos/vault.rb
CHANGED
|
@@ -213,13 +213,13 @@ module WorkOS
|
|
|
213
213
|
def update_kv(
|
|
214
214
|
id:,
|
|
215
215
|
value:,
|
|
216
|
-
version_check:
|
|
216
|
+
version_check: WorkOS::OMIT,
|
|
217
217
|
request_options: {}
|
|
218
218
|
)
|
|
219
219
|
body = {
|
|
220
|
-
"value" => value
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
"value" => value
|
|
221
|
+
}
|
|
222
|
+
body["version_check"] = version_check unless version_check.equal?(WorkOS::OMIT)
|
|
223
223
|
response = @client.request(
|
|
224
224
|
method: :put,
|
|
225
225
|
path: "/vault/v1/kv/#{WorkOS::Util.encode_path(id)}",
|
data/lib/workos/version.rb
CHANGED
data/lib/workos/widgets.rb
CHANGED
|
@@ -11,13 +11,13 @@ module WorkOS
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
# Generate a widget token
|
|
14
|
-
# @param organization_id [String] The ID of the organization to scope the widget session to.
|
|
14
|
+
# @param organization_id [String, nil] The ID of the organization to scope the widget session to. Required when scopes are provided. Optional when issuing a token for user-only widgets (e.g. `UserProfile`, `UserSecurity`) that do not require organization context.
|
|
15
15
|
# @param user_id [String, nil] The ID of the user to issue the widget session token for.
|
|
16
16
|
# @param scopes [Array<WorkOS::Types::WidgetSessionTokenScopes>, nil] The scopes to grant the widget session.
|
|
17
17
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
18
18
|
# @return [WorkOS::WidgetSessionTokenResponse]
|
|
19
19
|
def create_token(
|
|
20
|
-
organization_id
|
|
20
|
+
organization_id: nil,
|
|
21
21
|
user_id: nil,
|
|
22
22
|
scopes: nil,
|
|
23
23
|
request_options: {}
|