workos 9.5.1 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/CLAUDE.md +38 -0
- data/.github/workflows/block-generated-edits.yml +13 -0
- data/.github/workflows/ci.yml +2 -2
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +11 -6
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +502 -57
- data/.release-please-manifest.json +1 -1
- data/AGENTS.md +1 -0
- data/CHANGELOG.md +330 -2
- data/Gemfile.lock +2 -2
- data/README.md +15 -14
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request.rb +28 -0
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request_user.rb +22 -0
- data/lib/workos/agents/agent_admin_validate_credential_request.rb +25 -0
- data/lib/workos/agents/agent_blueprint.rb +43 -0
- data/lib/workos/agents/agent_blueprint_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprint_session_setting.rb +25 -0
- data/lib/workos/agents/agent_blueprints_create_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb +22 -0
- data/lib/workos/agents/agent_blueprints_create_request_session_setting.rb +7 -0
- data/lib/workos/agents/agent_blueprints_token_mint_token_request.rb +34 -0
- data/lib/workos/agents/agent_blueprints_token_validate_token_request.rb +18 -0
- data/lib/workos/agents/agent_blueprints_update_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprints_update_request_session_setting.rb +25 -0
- data/lib/workos/agents/agent_credential_validation.rb +25 -0
- data/lib/workos/{organization_domains/organization_domain_stand_alone.rb → agents/agent_instance.rb} +10 -16
- data/lib/workos/agents/agent_instance_session.rb +40 -0
- data/lib/workos/agents/agent_registration.rb +40 -0
- data/lib/workos/agents/agent_registration_agent_identity.rb +28 -0
- data/lib/workos/agents/agent_registration_claim.rb +31 -0
- data/lib/workos/agents/agent_registration_claim_claim_completion.rb +31 -0
- data/lib/workos/agents/agent_token.rb +40 -0
- data/lib/workos/agents/agent_token_validation.rb +40 -0
- data/lib/workos/agents/claim_view_response.rb +28 -0
- data/lib/workos/agents/claim_view_response_organization.rb +7 -0
- data/lib/workos/agents.rb +488 -0
- data/lib/workos/api_keys/api_key_validation_response.rb +6 -2
- data/lib/workos/api_keys/validate_api_key.rb +1 -12
- data/lib/workos/api_keys.rb +3 -4
- data/lib/workos/audit_logs.rb +23 -5
- data/lib/workos/authorization/permission_created_data.rb +1 -34
- data/lib/workos/authorization/permission_deleted_data.rb +1 -1
- data/lib/workos/authorization/permission_updated_data.rb +1 -1
- data/lib/workos/authorization.rb +27 -27
- data/lib/workos/base_client.rb +4 -4
- data/lib/workos/client.rb +8 -0
- data/lib/workos/connect.rb +25 -21
- data/lib/workos/directory_sync.rb +10 -2
- data/lib/workos/events.rb +2 -2
- data/lib/workos/groups.rb +13 -9
- data/lib/workos/inflections.rb +15 -1
- data/lib/workos/organization_domains.rb +4 -4
- data/lib/workos/{sso/connection_option.rb → organizations/create_it_contact.rb} +4 -4
- data/lib/workos/organizations/invite_it_contact.rb +18 -0
- data/lib/workos/organizations/it_contact.rb +31 -0
- data/lib/workos/organizations/it_contact_list.rb +25 -0
- data/lib/workos/organizations/organization_authorized_connect_application_list_data.rb +34 -0
- data/lib/workos/organizations/organization_input.rb +10 -1
- data/lib/workos/organizations/update_audit_logs_retention.rb +13 -1
- data/lib/workos/organizations.rb +167 -11
- data/lib/workos/pipes/api_key_installation.rb +25 -0
- data/lib/workos/pipes/connected_account.rb +9 -0
- data/lib/workos/pipes/{connected_account_dto.rb → connected_account_input.rb} +1 -1
- data/lib/workos/pipes/create_data_integration.rb +10 -1
- data/lib/workos/pipes/data_integration.rb +9 -0
- data/lib/workos/pipes/{data_integration_credentials_dto.rb → data_integration_credentials_input.rb} +1 -1
- data/lib/workos/pipes/data_integration_installation.rb +28 -0
- data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +5 -2
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +1 -19
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
- data/lib/workos/pipes/update_data_integration.rb +4 -1
- data/lib/workos/pipes.rb +69 -17
- data/lib/workos/pipes_provider/configure_data_integration_body.rb +5 -2
- data/lib/workos/pipes_provider/data_integration_configuration_response.rb +3 -0
- data/lib/workos/pipes_provider.rb +6 -3
- data/lib/workos/platform_teams/create_team.rb +22 -0
- data/lib/workos/platform_teams/team.rb +37 -0
- data/lib/workos/platform_teams.rb +58 -0
- data/lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb +25 -0
- data/lib/workos/shared/agent_blueprint_created.rb +34 -0
- data/lib/workos/shared/agent_blueprint_created_data.rb +43 -0
- data/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb +22 -0
- data/lib/workos/shared/agent_blueprint_created_data_session_setting.rb +25 -0
- data/lib/workos/shared/agent_blueprint_deleted.rb +34 -0
- data/lib/workos/shared/agent_blueprint_deleted_data.rb +31 -0
- data/lib/workos/shared/agent_blueprint_updated.rb +34 -0
- data/lib/workos/shared/agent_blueprint_updated_data.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb +7 -0
- data/lib/workos/shared/agent_instance_created.rb +34 -0
- data/lib/workos/shared/agent_instance_created_data.rb +40 -0
- data/lib/workos/shared/agent_instance_deleted.rb +34 -0
- data/lib/workos/shared/agent_instance_deleted_data.rb +40 -0
- data/lib/workos/shared/agent_instance_session_created.rb +34 -0
- data/lib/workos/shared/agent_instance_session_created_data.rb +43 -0
- data/lib/workos/shared/agent_instance_session_revoked.rb +34 -0
- data/lib/workos/shared/agent_instance_session_revoked_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_completed_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed_data_claimed_by.rb +22 -0
- data/lib/workos/shared/agent_registration_created.rb +34 -0
- data/lib/workos/shared/agent_registration_created_data.rb +43 -0
- data/lib/workos/shared/agent_registration_created_data_agent_identity.rb +25 -0
- data/lib/workos/shared/agent_registration_credential_issued.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data_detail.rb +22 -0
- data/lib/workos/shared/agent_registration_deleted.rb +34 -0
- data/lib/workos/shared/agent_registration_deleted_data.rb +18 -0
- data/lib/workos/shared/agent_registration_expired.rb +34 -0
- data/lib/workos/shared/agent_registration_expired_data.rb +7 -0
- data/lib/workos/shared/agent_registration_organization_switched.rb +34 -0
- data/lib/workos/shared/agent_registration_organization_switched_data.rb +25 -0
- data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
- data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
- data/lib/workos/shared/agent_registration_revoked.rb +34 -0
- data/lib/workos/shared/agent_registration_revoked_data.rb +7 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +46 -0
- data/lib/workos/shared/radar_challenge_created.rb +34 -0
- data/lib/workos/shared/radar_challenge_created_data.rb +28 -0
- data/lib/workos/shared/resource_export_completed.rb +34 -0
- data/lib/workos/shared/resource_export_completed_data.rb +22 -0
- data/lib/workos/shared/resource_export_created.rb +34 -0
- data/lib/workos/shared/resource_export_created_data.rb +22 -0
- data/lib/workos/shared/resource_export_downloaded.rb +34 -0
- data/lib/workos/shared/resource_export_downloaded_data.rb +22 -0
- data/lib/workos/shared/resource_export_failed.rb +34 -0
- data/lib/workos/shared/resource_export_failed_data.rb +22 -0
- data/lib/workos/shared/waitlist_user.rb +11 -5
- data/lib/workos/sso/connection.rb +0 -3
- data/lib/workos/sso/create_connection.rb +37 -0
- data/lib/workos/sso/create_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/create_connection_key_pair.rb +22 -0
- data/lib/workos/sso/create_connection_oidc_options.rb +43 -0
- data/lib/workos/sso/create_connection_saml_options.rb +40 -0
- data/lib/workos/sso/create_connection_standard_attributes.rb +34 -0
- data/lib/workos/{admin_portal/domain_verification_intent_options.rb → sso/create_saml_idp_signing_certificate.rb} +4 -4
- data/lib/workos/sso/patch_connection.rb +34 -0
- data/lib/workos/sso/patch_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/patch_connection_oidc_options.rb +40 -0
- data/lib/workos/sso/patch_connection_saml_options.rb +31 -0
- data/lib/workos/sso/patch_connection_standard_attributes.rb +7 -0
- data/lib/workos/sso/saml_idp_signing_certificate.rb +34 -0
- data/lib/workos/sso/saml_idp_signing_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_encryption_certificate.rb +34 -0
- data/lib/workos/sso/saml_sp_encryption_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_signing_certificate.rb +34 -0
- data/lib/workos/sso/token_query.rb +11 -2
- data/lib/workos/sso.rb +378 -30
- data/lib/workos/types/agent_admin_validate_credential_request_type.rb +13 -0
- data/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb +15 -0
- data/lib/workos/types/agent_instance_created_data_type.rb +13 -0
- data/lib/workos/types/{data_integration_credentials_type.rb → agent_instance_deleted_data_type.rb} +1 -1
- data/lib/workos/types/agent_instance_session_status.rb +14 -0
- data/lib/workos/types/{organization_domain_stand_alone_state.rb → agent_instance_type.rb} +1 -1
- data/lib/workos/types/agent_registration_created_data_kind.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_method.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_status.rb +15 -0
- data/lib/workos/types/{organization_domain_stand_alone_verification_strategy.rb → agent_registration_kind.rb} +1 -1
- data/lib/workos/types/agent_registration_status.rb +9 -0
- data/lib/workos/types/applications_registration_types.rb +13 -0
- data/lib/workos/types/authenticate_response_authentication_method.rb +1 -2
- data/lib/workos/types/claim_view_response_status.rb +9 -0
- data/lib/workos/types/connected_account_auth_method.rb +2 -1
- data/lib/workos/types/connected_account_input_state.rb +13 -0
- data/lib/workos/types/connected_account_state.rb +2 -1
- data/lib/workos/types/connection_activated_data_connection_type.rb +1 -2
- data/lib/workos/types/connection_type.rb +1 -2
- data/lib/workos/types/connections_connection_type.rb +1 -2
- data/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb +24 -0
- data/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb +14 -0
- data/lib/workos/types/create_data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/create_user_password_hash_type.rb +2 -1
- data/lib/workos/types/create_user_password_salt_position.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +13 -1
- data/lib/workos/types/data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/data_integration_credentials_input_type.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_state.rb +1 -6
- data/lib/workos/types/invite_it_contact_intents.rb +16 -0
- data/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb +9 -0
- data/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb +9 -0
- data/lib/workos/types/pipe_connected_account_state.rb +1 -5
- data/lib/workos/types/resource_export_completed_data_resource_type.rb +16 -0
- data/lib/workos/types/resource_export_created_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_downloaded_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_failed_data_resource_type.rb +9 -0
- data/lib/workos/types/session_created_data_status.rb +1 -6
- data/lib/workos/types/session_revoked_data_status.rb +1 -1
- data/lib/workos/types/sso_grant_type.rb +13 -0
- data/lib/workos/types/team_production_state.rb +15 -0
- data/lib/workos/types/token_query_grant_type.rb +9 -0
- data/lib/workos/types/update_audit_logs_retention_retention_period.rb +32 -0
- data/lib/workos/types/update_user_password_salt_position.rb +9 -0
- data/lib/workos/types/user_identities_get_item_provider.rb +1 -2
- data/lib/workos/types/user_management_waitlists_state.rb +14 -0
- data/lib/workos/types/user_sessions_status.rb +1 -1
- data/lib/workos/types/vault_kek_deleted_data_actor_source.rb +9 -0
- data/lib/workos/types/waitlist_entry_state.rb +9 -0
- data/lib/workos/types/waitlist_user_state.rb +1 -6
- data/lib/workos/user_management/authentication_oauth_failed_data.rb +5 -2
- data/lib/workos/user_management/authentication_oauth_succeeded_data.rb +5 -2
- data/lib/workos/user_management/authentication_reauthentication_succeeded.rb +34 -0
- data/lib/workos/user_management/authentication_reauthentication_succeeded_data.rb +34 -0
- data/lib/workos/user_management/create_password_reset_token.rb +1 -12
- data/lib/workos/user_management/create_user.rb +5 -2
- data/lib/workos/user_management/create_waitlist_entry.rb +25 -0
- data/lib/workos/user_management/email_completion_session_authenticate_request.rb +43 -0
- data/lib/workos/user_management/radar_challenge.rb +43 -0
- data/lib/workos/user_management/update_user.rb +5 -2
- data/lib/workos/user_management/waitlist.rb +28 -0
- data/lib/workos/user_management/waitlist_entry.rb +43 -0
- data/lib/workos/user_management.rb +340 -74
- data/lib/workos/vault/vault_kek_deleted.rb +34 -0
- data/lib/workos/vault/vault_kek_deleted_data.rb +31 -0
- data/lib/workos/vault.rb +4 -4
- data/lib/workos/version.rb +1 -1
- data/lib/workos/widgets.rb +2 -2
- data/lib/workos.rb +12 -0
- data/rbi/workos/access_token_agent_registration_credential_issued_data_detail.rbi +36 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request.rbi +42 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request_user.rbi +30 -0
- data/rbi/workos/agent_admin_validate_credential_request.rbi +36 -0
- data/rbi/workos/agent_blueprint.rbi +72 -0
- data/rbi/workos/agent_blueprint_created.rbi +54 -0
- data/rbi/workos/agent_blueprint_created_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_created_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_created_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_deleted.rbi +54 -0
- data/rbi/workos/agent_blueprint_deleted_data.rbi +48 -0
- data/rbi/workos/agent_blueprint_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_updated.rbi +54 -0
- data/rbi/workos/agent_blueprint_updated_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_create_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_create_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_token_mint_token_request.rbi +54 -0
- data/rbi/workos/{domain_verification_intent_options.rbi → agent_blueprints_token_validate_token_request.rbi} +5 -5
- data/rbi/workos/agent_blueprints_update_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_update_request_session_setting.rbi +36 -0
- data/rbi/workos/{sso_intent_options.rbi → agent_credential_validation.rbi} +11 -5
- data/rbi/workos/agent_instance.rbi +66 -0
- data/rbi/workos/agent_instance_created.rbi +54 -0
- data/rbi/workos/agent_instance_created_data.rbi +66 -0
- data/rbi/workos/agent_instance_deleted.rbi +54 -0
- data/rbi/workos/agent_instance_deleted_data.rbi +66 -0
- data/rbi/workos/agent_instance_session.rbi +66 -0
- data/rbi/workos/agent_instance_session_created.rbi +54 -0
- data/rbi/workos/agent_instance_session_created_data.rbi +72 -0
- data/rbi/workos/agent_instance_session_revoked.rbi +54 -0
- data/rbi/workos/agent_instance_session_revoked_data.rbi +66 -0
- data/rbi/workos/agent_registration.rbi +66 -0
- data/rbi/workos/agent_registration_agent_identity.rbi +42 -0
- data/rbi/workos/agent_registration_claim.rbi +48 -0
- data/rbi/workos/agent_registration_claim_attempt_created.rbi +54 -0
- data/rbi/workos/agent_registration_claim_attempt_created_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_claim_completion.rbi +48 -0
- data/rbi/workos/agent_registration_claim_completed.rbi +54 -0
- data/rbi/workos/agent_registration_claim_completed_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_completed_data_claimed_by.rbi +30 -0
- data/rbi/workos/agent_registration_created.rbi +54 -0
- data/rbi/workos/agent_registration_created_data.rbi +72 -0
- data/rbi/workos/agent_registration_created_data_agent_identity.rbi +36 -0
- data/rbi/workos/agent_registration_credential_issued.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data_detail.rbi +30 -0
- data/rbi/workos/agent_registration_deleted.rbi +54 -0
- data/rbi/workos/{connection_option.rbi → agent_registration_deleted_data.rbi} +5 -5
- data/rbi/workos/agent_registration_expired.rbi +54 -0
- data/rbi/workos/agent_registration_expired_data.rbi +24 -0
- data/rbi/workos/agent_registration_organization_switched.rbi +54 -0
- data/rbi/workos/agent_registration_organization_switched_data.rbi +36 -0
- data/rbi/workos/agent_registration_refreshed.rbi +54 -0
- data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
- data/rbi/workos/agent_registration_revoked.rbi +54 -0
- data/rbi/workos/agent_registration_revoked_data.rbi +24 -0
- data/rbi/workos/agent_token.rbi +66 -0
- data/rbi/workos/agent_token_validation.rbi +66 -0
- data/rbi/workos/agents.rbi +175 -0
- data/rbi/workos/api_key_installation.rbi +36 -0
- data/rbi/workos/api_key_validation_response.rbi +6 -0
- data/rbi/workos/audit_logs.rbi +26 -2
- data/rbi/workos/authentication_oauth_failed_data.rbi +6 -0
- data/rbi/workos/authentication_oauth_succeeded_data.rbi +6 -0
- data/rbi/workos/authentication_reauthentication_succeeded.rbi +54 -0
- data/rbi/workos/authentication_reauthentication_succeeded_data.rbi +54 -0
- data/rbi/workos/claim_view_response.rbi +42 -0
- data/rbi/workos/claim_view_response_organization.rbi +30 -0
- data/rbi/workos/client.rbi +6 -0
- data/rbi/workos/configure_data_integration_body.rbi +6 -0
- data/rbi/workos/connect.rbi +2 -1
- data/rbi/workos/connected_account.rbi +18 -0
- data/rbi/workos/{connected_account_dto.rbi → connected_account_input.rbi} +1 -1
- data/rbi/workos/connection.rbi +0 -6
- data/rbi/workos/create_connection.rbi +60 -0
- data/rbi/workos/create_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/create_connection_key_pair.rbi +30 -0
- data/rbi/workos/create_connection_oidc_options.rbi +72 -0
- data/rbi/workos/create_connection_saml_options.rbi +66 -0
- data/rbi/workos/create_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/create_data_integration.rbi +20 -2
- data/rbi/workos/create_it_contact.rbi +24 -0
- data/rbi/workos/create_saml_idp_signing_certificate.rbi +24 -0
- data/rbi/workos/create_team.rbi +30 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/create_waitlist_entry.rbi +36 -0
- data/rbi/workos/custom_provider_definition.rbi +4 -4
- data/rbi/workos/data_integration.rbi +20 -2
- data/rbi/workos/data_integration_configuration_response.rbi +6 -0
- data/rbi/workos/{data_integration_credentials_dto.rbi → data_integration_credentials_input.rbi} +1 -1
- data/rbi/workos/data_integration_installation.rbi +42 -0
- data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
- data/rbi/workos/directory_sync.rbi +3 -1
- data/rbi/workos/email_completion_session_authenticate_request.rbi +72 -0
- data/rbi/workos/events.rbi +2 -2
- data/rbi/workos/groups.rbi +2 -1
- data/rbi/workos/invite_it_contact.rbi +24 -0
- data/rbi/workos/it_contact.rbi +48 -0
- data/rbi/workos/organization_authorized_connect_application_list_data.rbi +54 -0
- data/rbi/workos/organization_domains.rbi +2 -2
- data/rbi/workos/organizations.rbi +57 -0
- data/rbi/workos/patch_connection.rbi +54 -0
- data/rbi/workos/patch_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/patch_connection_oidc_options.rbi +66 -0
- data/rbi/workos/patch_connection_saml_options.rbi +48 -0
- data/rbi/workos/patch_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/permission_created_data.rbi +6 -0
- data/rbi/workos/permission_deleted_data.rbi +6 -0
- data/rbi/workos/permission_updated_data.rbi +6 -0
- data/rbi/workos/pipes.rbi +23 -5
- data/rbi/workos/pipes_connected_account_connection_failed.rbi +54 -0
- data/rbi/workos/{organization_domain_stand_alone.rbi → pipes_connected_account_connection_failed_data.rbi} +23 -23
- data/rbi/workos/pipes_provider.rbi +2 -1
- data/rbi/workos/platform_teams.rbi +30 -0
- data/rbi/workos/radar_challenge.rbi +72 -0
- data/rbi/workos/radar_challenge_created.rbi +54 -0
- data/rbi/workos/radar_challenge_created_data.rbi +42 -0
- data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
- data/rbi/workos/resource_export_completed.rbi +54 -0
- data/rbi/workos/resource_export_completed_data.rbi +30 -0
- data/rbi/workos/resource_export_created.rbi +54 -0
- data/rbi/workos/resource_export_created_data.rbi +30 -0
- data/rbi/workos/resource_export_downloaded.rbi +54 -0
- data/rbi/workos/resource_export_downloaded_data.rbi +30 -0
- data/rbi/workos/resource_export_failed.rbi +54 -0
- data/rbi/workos/resource_export_failed_data.rbi +30 -0
- data/rbi/workos/saml_idp_signing_certificate.rbi +54 -0
- data/rbi/workos/saml_idp_signing_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_encryption_certificate.rbi +54 -0
- data/rbi/workos/saml_sp_encryption_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_signing_certificate.rbi +54 -0
- data/rbi/workos/sso.rbi +181 -2
- data/rbi/workos/team.rbi +60 -0
- data/rbi/workos/token_query.rbi +20 -2
- data/rbi/workos/update_audit_logs_retention.rbi +8 -2
- data/rbi/workos/update_data_integration.rbi +8 -2
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user_management.rbi +116 -2
- data/rbi/workos/vault_kek_deleted.rbi +54 -0
- data/rbi/workos/vault_kek_deleted_data.rbi +48 -0
- data/rbi/workos/waitlist.rbi +42 -0
- data/rbi/workos/waitlist_entry.rbi +72 -0
- data/rbi/workos/waitlist_user.rbi +18 -6
- data/rbi/workos/widget_session_token.rbi +2 -2
- data/rbi/workos/widgets.rbi +1 -1
- data/test/workos/test_agents.rb +153 -0
- data/test/workos/test_agents_model_round_trip.rb +410 -0
- data/test/workos/test_api_keys_model_round_trip.rb +307 -0
- data/test/workos/test_audit_logs.rb +11 -2
- data/test/workos/test_authkit_helpers.rb +22 -10
- data/test/workos/test_authorization.rb +6 -6
- data/test/workos/test_authorization_model_round_trip.rb +237 -0
- data/test/workos/test_base_client.rb +27 -0
- data/test/workos/test_client_api_model_round_trip.rb +31 -0
- data/test/workos/test_connect_model_round_trip.rb +175 -0
- data/test/workos/test_directory_sync_model_round_trip.rb +579 -0
- data/test/workos/test_events.rb +2 -2
- data/test/workos/test_feature_flags_model_round_trip.rb +580 -0
- data/test/workos/test_groups_model_round_trip.rb +56 -0
- data/test/workos/test_multi_factor_auth_model_round_trip.rb +192 -0
- data/test/workos/test_organization_domains_model_round_trip.rb +260 -0
- data/test/workos/test_organization_membership_model_round_trip.rb +89 -0
- data/test/workos/test_organizations.rb +49 -1
- data/test/workos/test_organizations_model_round_trip.rb +642 -1
- data/test/workos/test_pipes.rb +8 -0
- data/test/workos/test_pipes_model_round_trip.rb +68 -8
- data/test/workos/test_pipes_provider_model_round_trip.rb +77 -0
- data/test/workos/test_platform_teams.rb +41 -0
- data/test/workos/test_platform_teams_model_round_trip.rb +41 -0
- data/test/workos/test_shared_model_round_trip.rb +1263 -0
- data/test/workos/test_sso.rb +108 -2
- data/test/workos/test_sso_model_round_trip.rb +681 -0
- data/test/workos/test_user_management.rb +78 -6
- data/test/workos/test_user_management_model_round_trip.rb +1604 -27
- data/test/workos/test_vault_model_round_trip.rb +571 -0
- data/test/workos/test_widgets.rb +2 -2
- data/test/workos/test_widgets_model_round_trip.rb +30 -0
- metadata +287 -19
- data/lib/workos/admin_portal/intent_options.rb +0 -22
- data/lib/workos/admin_portal/sso_intent_options.rb +0 -22
- data/rbi/workos/intent_options.rbi +0 -30
- data/test/workos/test_model_round_trip.rb +0 -6
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "test_helper"
|
|
6
|
+
|
|
7
|
+
class AgentsModelRoundTripTest < Minitest::Test
|
|
8
|
+
def test_agent_registration_round_trip
|
|
9
|
+
fixture = {
|
|
10
|
+
"id" => "stub",
|
|
11
|
+
"agent_identity" => {},
|
|
12
|
+
"organization_id" => "stub",
|
|
13
|
+
"status" => "stub",
|
|
14
|
+
"kind" => "stub",
|
|
15
|
+
"claim" => nil,
|
|
16
|
+
"created_at" => "stub",
|
|
17
|
+
"updated_at" => "stub"
|
|
18
|
+
}
|
|
19
|
+
model = WorkOS::AgentRegistration.new(fixture.to_json)
|
|
20
|
+
json = model.to_h
|
|
21
|
+
assert_kind_of Hash, json
|
|
22
|
+
assert_equal fixture["id"], json[:id]
|
|
23
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
24
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
25
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
26
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_agent_credential_validation_round_trip
|
|
30
|
+
fixture = {
|
|
31
|
+
"valid" => true,
|
|
32
|
+
"registration_id" => nil,
|
|
33
|
+
"expires_at" => nil
|
|
34
|
+
}
|
|
35
|
+
model = WorkOS::AgentCredentialValidation.new(fixture.to_json)
|
|
36
|
+
json = model.to_h
|
|
37
|
+
assert_kind_of Hash, json
|
|
38
|
+
assert_equal fixture["valid"], json[:valid]
|
|
39
|
+
assert_nil json[:registration_id]
|
|
40
|
+
assert_nil json[:expires_at]
|
|
41
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def test_claim_view_response_round_trip
|
|
45
|
+
fixture = {
|
|
46
|
+
"id" => "stub",
|
|
47
|
+
"status" => "stub",
|
|
48
|
+
"user_code" => "stub",
|
|
49
|
+
"organizations" => []
|
|
50
|
+
}
|
|
51
|
+
model = WorkOS::ClaimViewResponse.new(fixture.to_json)
|
|
52
|
+
json = model.to_h
|
|
53
|
+
assert_kind_of Hash, json
|
|
54
|
+
assert_equal fixture["id"], json[:id]
|
|
55
|
+
assert_equal fixture["user_code"], json[:user_code]
|
|
56
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def test_agent_blueprint_round_trip
|
|
60
|
+
fixture = {
|
|
61
|
+
"object" => "agent_blueprint",
|
|
62
|
+
"id" => "stub",
|
|
63
|
+
"name" => "stub",
|
|
64
|
+
"description" => nil,
|
|
65
|
+
"permissions" => [],
|
|
66
|
+
"invocable_by" => {},
|
|
67
|
+
"session_settings" => {},
|
|
68
|
+
"created_at" => "stub",
|
|
69
|
+
"updated_at" => "stub"
|
|
70
|
+
}
|
|
71
|
+
model = WorkOS::AgentBlueprint.new(fixture.to_json)
|
|
72
|
+
json = model.to_h
|
|
73
|
+
assert_kind_of Hash, json
|
|
74
|
+
assert_equal fixture["id"], json[:id]
|
|
75
|
+
assert_equal fixture["name"], json[:name]
|
|
76
|
+
assert_nil json[:description]
|
|
77
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
78
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
79
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def test_agent_instance_round_trip
|
|
83
|
+
fixture = {
|
|
84
|
+
"object" => "agent_instance",
|
|
85
|
+
"id" => "stub",
|
|
86
|
+
"agent_blueprint_id" => "stub",
|
|
87
|
+
"organization_id" => "stub",
|
|
88
|
+
"organization_membership_id" => nil,
|
|
89
|
+
"type" => "stub",
|
|
90
|
+
"created_at" => "stub",
|
|
91
|
+
"updated_at" => "stub"
|
|
92
|
+
}
|
|
93
|
+
model = WorkOS::AgentInstance.new(fixture.to_json)
|
|
94
|
+
json = model.to_h
|
|
95
|
+
assert_kind_of Hash, json
|
|
96
|
+
assert_equal fixture["id"], json[:id]
|
|
97
|
+
assert_equal fixture["agent_blueprint_id"], json[:agent_blueprint_id]
|
|
98
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
99
|
+
assert_nil json[:organization_membership_id]
|
|
100
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
101
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
102
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def test_agent_token_round_trip
|
|
106
|
+
fixture = {
|
|
107
|
+
"access_token" => "stub",
|
|
108
|
+
"token_type" => "Bearer",
|
|
109
|
+
"expires_in" => 1,
|
|
110
|
+
"refresh_token" => "stub",
|
|
111
|
+
"agent_instance_id" => "stub",
|
|
112
|
+
"new_instance" => true,
|
|
113
|
+
"agent_instance_session_id" => "stub",
|
|
114
|
+
"permissions" => []
|
|
115
|
+
}
|
|
116
|
+
model = WorkOS::AgentToken.new(fixture.to_json)
|
|
117
|
+
json = model.to_h
|
|
118
|
+
assert_kind_of Hash, json
|
|
119
|
+
assert_equal fixture["access_token"], json[:access_token]
|
|
120
|
+
assert_equal fixture["expires_in"], json[:expires_in]
|
|
121
|
+
assert_equal fixture["refresh_token"], json[:refresh_token]
|
|
122
|
+
assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
|
|
123
|
+
assert_equal fixture["new_instance"], json[:new_instance]
|
|
124
|
+
assert_equal fixture["agent_instance_session_id"], json[:agent_instance_session_id]
|
|
125
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def test_agent_token_validation_round_trip
|
|
129
|
+
fixture = {
|
|
130
|
+
"valid" => true,
|
|
131
|
+
"agent_instance_id" => "stub",
|
|
132
|
+
"agent_instance_session_id" => "stub",
|
|
133
|
+
"organization_id" => "stub",
|
|
134
|
+
"permissions" => [],
|
|
135
|
+
"intent" => nil,
|
|
136
|
+
"acting_user_id" => nil,
|
|
137
|
+
"session_expires_at" => "stub"
|
|
138
|
+
}
|
|
139
|
+
model = WorkOS::AgentTokenValidation.new(fixture.to_json)
|
|
140
|
+
json = model.to_h
|
|
141
|
+
assert_kind_of Hash, json
|
|
142
|
+
assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
|
|
143
|
+
assert_equal fixture["agent_instance_session_id"], json[:agent_instance_session_id]
|
|
144
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
145
|
+
assert_nil json[:intent]
|
|
146
|
+
assert_nil json[:acting_user_id]
|
|
147
|
+
assert_equal fixture["session_expires_at"], json[:session_expires_at]
|
|
148
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def test_agent_instance_session_round_trip
|
|
152
|
+
fixture = {
|
|
153
|
+
"object" => "agent_instance_session",
|
|
154
|
+
"id" => "stub",
|
|
155
|
+
"agent_instance_id" => "stub",
|
|
156
|
+
"status" => "stub",
|
|
157
|
+
"expires_at" => "stub",
|
|
158
|
+
"revoked_at" => nil,
|
|
159
|
+
"created_at" => "stub",
|
|
160
|
+
"updated_at" => "stub"
|
|
161
|
+
}
|
|
162
|
+
model = WorkOS::AgentInstanceSession.new(fixture.to_json)
|
|
163
|
+
json = model.to_h
|
|
164
|
+
assert_kind_of Hash, json
|
|
165
|
+
assert_equal fixture["id"], json[:id]
|
|
166
|
+
assert_equal fixture["agent_instance_id"], json[:agent_instance_id]
|
|
167
|
+
assert_equal fixture["expires_at"], json[:expires_at]
|
|
168
|
+
assert_nil json[:revoked_at]
|
|
169
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
170
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
171
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
def test_agent_blueprint_invocable_by_round_trip
|
|
175
|
+
fixture = {
|
|
176
|
+
"role_slugs" => [],
|
|
177
|
+
"organization_ids" => []
|
|
178
|
+
}
|
|
179
|
+
model = WorkOS::AgentBlueprintInvocableBy.new(fixture.to_json)
|
|
180
|
+
json = model.to_h
|
|
181
|
+
assert_kind_of Hash, json
|
|
182
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def test_agent_blueprint_session_setting_round_trip
|
|
186
|
+
fixture = {
|
|
187
|
+
"max_age_seconds" => 1,
|
|
188
|
+
"access_token_ttl_seconds" => 1,
|
|
189
|
+
"refresh_token_ttl_seconds" => 1
|
|
190
|
+
}
|
|
191
|
+
model = WorkOS::AgentBlueprintSessionSetting.new(fixture.to_json)
|
|
192
|
+
json = model.to_h
|
|
193
|
+
assert_kind_of Hash, json
|
|
194
|
+
assert_equal fixture["max_age_seconds"], json[:max_age_seconds]
|
|
195
|
+
assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds]
|
|
196
|
+
assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds]
|
|
197
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def test_claim_view_response_organization_round_trip
|
|
201
|
+
fixture = {
|
|
202
|
+
"id" => "stub",
|
|
203
|
+
"name" => "stub"
|
|
204
|
+
}
|
|
205
|
+
model = WorkOS::ClaimViewResponseOrganization.new(fixture.to_json)
|
|
206
|
+
json = model.to_h
|
|
207
|
+
assert_kind_of Hash, json
|
|
208
|
+
assert_equal fixture["id"], json[:id]
|
|
209
|
+
assert_equal fixture["name"], json[:name]
|
|
210
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
def test_agent_registration_agent_identity_round_trip
|
|
214
|
+
fixture = {
|
|
215
|
+
"id" => "stub",
|
|
216
|
+
"userland_user_id" => nil,
|
|
217
|
+
"created_at" => "stub",
|
|
218
|
+
"updated_at" => "stub"
|
|
219
|
+
}
|
|
220
|
+
model = WorkOS::AgentRegistrationAgentIdentity.new(fixture.to_json)
|
|
221
|
+
json = model.to_h
|
|
222
|
+
assert_kind_of Hash, json
|
|
223
|
+
assert_equal fixture["id"], json[:id]
|
|
224
|
+
assert_nil json[:userland_user_id]
|
|
225
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
226
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
227
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
def test_agent_registration_claim_round_trip
|
|
231
|
+
fixture = {
|
|
232
|
+
"id" => "stub",
|
|
233
|
+
"claim_completion" => nil,
|
|
234
|
+
"created_at" => "stub",
|
|
235
|
+
"updated_at" => "stub",
|
|
236
|
+
"expires_at" => "stub"
|
|
237
|
+
}
|
|
238
|
+
model = WorkOS::AgentRegistrationClaim.new(fixture.to_json)
|
|
239
|
+
json = model.to_h
|
|
240
|
+
assert_kind_of Hash, json
|
|
241
|
+
assert_equal fixture["id"], json[:id]
|
|
242
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
243
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
244
|
+
assert_equal fixture["expires_at"], json[:expires_at]
|
|
245
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
def test_agent_blueprints_create_request_round_trip
|
|
249
|
+
fixture = {
|
|
250
|
+
"name" => "stub",
|
|
251
|
+
"description" => "stub",
|
|
252
|
+
"permissions" => [],
|
|
253
|
+
"invocable_by" => {},
|
|
254
|
+
"session_settings" => {}
|
|
255
|
+
}
|
|
256
|
+
model = WorkOS::AgentBlueprintsCreateRequest.new(fixture.to_json)
|
|
257
|
+
json = model.to_h
|
|
258
|
+
assert_kind_of Hash, json
|
|
259
|
+
assert_equal fixture["name"], json[:name]
|
|
260
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
def test_agent_blueprints_create_request_invocable_by_round_trip
|
|
264
|
+
fixture = {
|
|
265
|
+
"role_slugs" => [],
|
|
266
|
+
"organization_ids" => []
|
|
267
|
+
}
|
|
268
|
+
model = WorkOS::AgentBlueprintsCreateRequestInvocableBy.new(fixture.to_json)
|
|
269
|
+
json = model.to_h
|
|
270
|
+
assert_kind_of Hash, json
|
|
271
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
def test_agent_blueprints_create_request_session_setting_round_trip
|
|
275
|
+
fixture = {
|
|
276
|
+
"max_age_seconds" => 1,
|
|
277
|
+
"access_token_ttl_seconds" => 1,
|
|
278
|
+
"refresh_token_ttl_seconds" => 1
|
|
279
|
+
}
|
|
280
|
+
model = WorkOS::AgentBlueprintsCreateRequestSessionSetting.new(fixture.to_json)
|
|
281
|
+
json = model.to_h
|
|
282
|
+
assert_kind_of Hash, json
|
|
283
|
+
assert_equal fixture["max_age_seconds"], json[:max_age_seconds]
|
|
284
|
+
assert_equal fixture["access_token_ttl_seconds"], json[:access_token_ttl_seconds]
|
|
285
|
+
assert_equal fixture["refresh_token_ttl_seconds"], json[:refresh_token_ttl_seconds]
|
|
286
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
def test_agent_blueprints_update_request_round_trip
|
|
290
|
+
fixture = {
|
|
291
|
+
"name" => "stub",
|
|
292
|
+
"description" => nil,
|
|
293
|
+
"permissions" => [],
|
|
294
|
+
"invocable_by" => {},
|
|
295
|
+
"session_settings" => {}
|
|
296
|
+
}
|
|
297
|
+
model = WorkOS::AgentBlueprintsUpdateRequest.new(fixture.to_json)
|
|
298
|
+
json = model.to_h
|
|
299
|
+
assert_kind_of Hash, json
|
|
300
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
def test_agent_blueprints_update_request_invocable_by_round_trip
|
|
304
|
+
fixture = {
|
|
305
|
+
"role_slugs" => [],
|
|
306
|
+
"organization_ids" => []
|
|
307
|
+
}
|
|
308
|
+
model = WorkOS::AgentBlueprintsUpdateRequestInvocableBy.new(fixture.to_json)
|
|
309
|
+
json = model.to_h
|
|
310
|
+
assert_kind_of Hash, json
|
|
311
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
def test_agent_blueprints_update_request_session_setting_round_trip
|
|
315
|
+
fixture = {
|
|
316
|
+
"max_age_seconds" => 1,
|
|
317
|
+
"access_token_ttl_seconds" => 1,
|
|
318
|
+
"refresh_token_ttl_seconds" => 1
|
|
319
|
+
}
|
|
320
|
+
model = WorkOS::AgentBlueprintsUpdateRequestSessionSetting.new(fixture.to_json)
|
|
321
|
+
json = model.to_h
|
|
322
|
+
assert_kind_of Hash, json
|
|
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_agent_blueprints_token_mint_token_request_round_trip
|
|
327
|
+
fixture = {
|
|
328
|
+
"type" => "stub",
|
|
329
|
+
"user_access_token" => "stub",
|
|
330
|
+
"intent" => "stub",
|
|
331
|
+
"organization_id" => "stub",
|
|
332
|
+
"agent_access_token" => "stub",
|
|
333
|
+
"refresh_token" => "stub"
|
|
334
|
+
}
|
|
335
|
+
model = WorkOS::AgentBlueprintsTokenMintTokenRequest.new(fixture.to_json)
|
|
336
|
+
json = model.to_h
|
|
337
|
+
assert_kind_of Hash, json
|
|
338
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
def test_agent_blueprints_token_validate_token_request_round_trip
|
|
342
|
+
fixture = {
|
|
343
|
+
"agent_access_token" => "stub"
|
|
344
|
+
}
|
|
345
|
+
model = WorkOS::AgentBlueprintsTokenValidateTokenRequest.new(fixture.to_json)
|
|
346
|
+
json = model.to_h
|
|
347
|
+
assert_kind_of Hash, json
|
|
348
|
+
assert_equal fixture["agent_access_token"], json[:agent_access_token]
|
|
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_agent_admin_link_claim_attempt_to_external_user_request_round_trip
|
|
353
|
+
fixture = {
|
|
354
|
+
"type" => "link_external_user",
|
|
355
|
+
"claim_attempt_token" => "stub",
|
|
356
|
+
"user" => {},
|
|
357
|
+
"organization_id" => "stub"
|
|
358
|
+
}
|
|
359
|
+
model = WorkOS::AgentAdminLinkClaimAttemptToExternalUserRequest.new(fixture.to_json)
|
|
360
|
+
json = model.to_h
|
|
361
|
+
assert_kind_of Hash, json
|
|
362
|
+
assert_equal fixture["claim_attempt_token"], json[:claim_attempt_token]
|
|
363
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
def test_agent_admin_link_claim_attempt_to_external_user_request_user_round_trip
|
|
367
|
+
fixture = {
|
|
368
|
+
"email" => "stub",
|
|
369
|
+
"external_id" => "stub"
|
|
370
|
+
}
|
|
371
|
+
model = WorkOS::AgentAdminLinkClaimAttemptToExternalUserRequestUser.new(fixture.to_json)
|
|
372
|
+
json = model.to_h
|
|
373
|
+
assert_kind_of Hash, json
|
|
374
|
+
assert_equal fixture["email"], json[:email]
|
|
375
|
+
assert_equal fixture["external_id"], json[:external_id]
|
|
376
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
def test_agent_admin_validate_credential_request_round_trip
|
|
380
|
+
fixture = {
|
|
381
|
+
"type" => "stub",
|
|
382
|
+
"credential" => "stub",
|
|
383
|
+
"audience" => "stub"
|
|
384
|
+
}
|
|
385
|
+
model = WorkOS::AgentAdminValidateCredentialRequest.new(fixture.to_json)
|
|
386
|
+
json = model.to_h
|
|
387
|
+
assert_kind_of Hash, json
|
|
388
|
+
assert_equal fixture["credential"], json[:credential]
|
|
389
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
def test_agent_registration_claim_claim_completion_round_trip
|
|
393
|
+
fixture = {
|
|
394
|
+
"id" => "stub",
|
|
395
|
+
"created_at" => "stub",
|
|
396
|
+
"updated_at" => "stub",
|
|
397
|
+
"expires_at" => "stub",
|
|
398
|
+
"claimed_at" => "stub"
|
|
399
|
+
}
|
|
400
|
+
model = WorkOS::AgentRegistrationClaimClaimCompletion.new(fixture.to_json)
|
|
401
|
+
json = model.to_h
|
|
402
|
+
assert_kind_of Hash, json
|
|
403
|
+
assert_equal fixture["id"], json[:id]
|
|
404
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
405
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
406
|
+
assert_equal fixture["expires_at"], json[:expires_at]
|
|
407
|
+
assert_equal fixture["claimed_at"], json[:claimed_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
|
+
end
|