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,488 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "json"
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class Agents
|
|
9
|
+
def initialize(client)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# List agent blueprints
|
|
14
|
+
# @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"`.
|
|
15
|
+
# @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"`.
|
|
16
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
17
|
+
# @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).
|
|
18
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
19
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::AgentBlueprint>]
|
|
20
|
+
def list_blueprints(
|
|
21
|
+
before: nil,
|
|
22
|
+
after: nil,
|
|
23
|
+
limit: 10,
|
|
24
|
+
order: "desc",
|
|
25
|
+
request_options: {}
|
|
26
|
+
)
|
|
27
|
+
params = {
|
|
28
|
+
"before" => before,
|
|
29
|
+
"after" => after,
|
|
30
|
+
"limit" => limit,
|
|
31
|
+
"order" => order
|
|
32
|
+
}.compact
|
|
33
|
+
response = @client.request(
|
|
34
|
+
method: :get,
|
|
35
|
+
path: "/agents/blueprints",
|
|
36
|
+
auth: true,
|
|
37
|
+
params: params,
|
|
38
|
+
request_options: request_options
|
|
39
|
+
)
|
|
40
|
+
fetch_next = ->(cursor) {
|
|
41
|
+
list_blueprints(
|
|
42
|
+
before: before,
|
|
43
|
+
after: cursor,
|
|
44
|
+
limit: limit,
|
|
45
|
+
order: order,
|
|
46
|
+
request_options: request_options
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
WorkOS::Types::ListStruct.from_response(
|
|
50
|
+
response,
|
|
51
|
+
model: WorkOS::AgentBlueprint,
|
|
52
|
+
filters: {before: before, limit: limit, order: order},
|
|
53
|
+
fetch_next: fetch_next
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Create an agent blueprint
|
|
58
|
+
# @param name [String] Human-readable name of the agent blueprint.
|
|
59
|
+
# @param description [String, nil] Human-readable description of the agent blueprint.
|
|
60
|
+
# @param permissions [Array<String>, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment.
|
|
61
|
+
# @param invocable_by [WorkOS::AgentBlueprintsCreateRequestInvocableBy, nil] Who may mint sessions from this blueprint.
|
|
62
|
+
# @param session_settings [WorkOS::AgentBlueprintsCreateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint.
|
|
63
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
64
|
+
# @return [WorkOS::AgentBlueprint]
|
|
65
|
+
def create_blueprint(
|
|
66
|
+
name:,
|
|
67
|
+
description: nil,
|
|
68
|
+
permissions: nil,
|
|
69
|
+
invocable_by: nil,
|
|
70
|
+
session_settings: nil,
|
|
71
|
+
request_options: {}
|
|
72
|
+
)
|
|
73
|
+
body = {
|
|
74
|
+
"name" => name,
|
|
75
|
+
"description" => description,
|
|
76
|
+
"permissions" => permissions,
|
|
77
|
+
"invocable_by" => invocable_by,
|
|
78
|
+
"session_settings" => session_settings
|
|
79
|
+
}.compact
|
|
80
|
+
response = @client.request(
|
|
81
|
+
method: :post,
|
|
82
|
+
path: "/agents/blueprints",
|
|
83
|
+
auth: true,
|
|
84
|
+
body: body,
|
|
85
|
+
request_options: request_options
|
|
86
|
+
)
|
|
87
|
+
result = WorkOS::AgentBlueprint.new(response.body)
|
|
88
|
+
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"])
|
|
89
|
+
result
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Get an agent blueprint
|
|
93
|
+
# @param agent_blueprint_id [String] The unique ID of the agent blueprint.
|
|
94
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
95
|
+
# @return [WorkOS::AgentBlueprint]
|
|
96
|
+
def get_blueprint(
|
|
97
|
+
agent_blueprint_id:,
|
|
98
|
+
request_options: {}
|
|
99
|
+
)
|
|
100
|
+
response = @client.request(
|
|
101
|
+
method: :get,
|
|
102
|
+
path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}",
|
|
103
|
+
auth: true,
|
|
104
|
+
request_options: request_options
|
|
105
|
+
)
|
|
106
|
+
result = WorkOS::AgentBlueprint.new(response.body)
|
|
107
|
+
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"])
|
|
108
|
+
result
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Update an agent blueprint
|
|
112
|
+
# @param agent_blueprint_id [String] The unique ID of the agent blueprint.
|
|
113
|
+
# @param name [String, nil] Human-readable name of the agent blueprint.
|
|
114
|
+
# @param description [String, nil] Human-readable description of the agent blueprint. Pass `null` to clear it.
|
|
115
|
+
# @param permissions [Array<String>, nil] Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment.
|
|
116
|
+
# @param invocable_by [WorkOS::AgentBlueprintsUpdateRequestInvocableBy, nil] Who may mint sessions from this blueprint. Omitted lists are left unchanged.
|
|
117
|
+
# @param session_settings [WorkOS::AgentBlueprintsUpdateRequestSessionSetting, nil] Token and session lifetimes for sessions minted from this blueprint. Omitted fields are left unchanged.
|
|
118
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
119
|
+
# @return [WorkOS::AgentBlueprint]
|
|
120
|
+
def update_blueprint(
|
|
121
|
+
agent_blueprint_id:,
|
|
122
|
+
name: nil,
|
|
123
|
+
description: WorkOS::OMIT,
|
|
124
|
+
permissions: nil,
|
|
125
|
+
invocable_by: nil,
|
|
126
|
+
session_settings: nil,
|
|
127
|
+
request_options: {}
|
|
128
|
+
)
|
|
129
|
+
body = {
|
|
130
|
+
"name" => name,
|
|
131
|
+
"permissions" => permissions,
|
|
132
|
+
"invocable_by" => invocable_by,
|
|
133
|
+
"session_settings" => session_settings
|
|
134
|
+
}.compact
|
|
135
|
+
body["description"] = description unless description.equal?(WorkOS::OMIT)
|
|
136
|
+
response = @client.request(
|
|
137
|
+
method: :patch,
|
|
138
|
+
path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}",
|
|
139
|
+
auth: true,
|
|
140
|
+
body: body,
|
|
141
|
+
request_options: request_options
|
|
142
|
+
)
|
|
143
|
+
result = WorkOS::AgentBlueprint.new(response.body)
|
|
144
|
+
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"])
|
|
145
|
+
result
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Delete an agent blueprint
|
|
149
|
+
# @param agent_blueprint_id [String] The unique ID of the agent blueprint.
|
|
150
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
151
|
+
# @return [void]
|
|
152
|
+
def delete_blueprint(
|
|
153
|
+
agent_blueprint_id:,
|
|
154
|
+
request_options: {}
|
|
155
|
+
)
|
|
156
|
+
@client.request(
|
|
157
|
+
method: :delete,
|
|
158
|
+
path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}",
|
|
159
|
+
auth: true,
|
|
160
|
+
request_options: request_options
|
|
161
|
+
)
|
|
162
|
+
nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Mint an agent token
|
|
166
|
+
# @param agent_blueprint_id [String] The unique ID of the agent blueprint.
|
|
167
|
+
# @param type [WorkOS::Types::AgentBlueprintsTokenMintTokenRequestType] How the session is minted: `user_delegated`, `autonomous`, `agent_delegated`, or `refresh`.
|
|
168
|
+
# @param user_access_token [String, nil] The access token of the user delegating to the agent. The token identifies the user and organization; effective permissions are resolved server-side.
|
|
169
|
+
# @param intent [String, nil] Optional caller-supplied context, echoed as an object with a `text` field in the `intent` claim of the minted access token.
|
|
170
|
+
# @param organization_id [String, nil] The organization the agent acts within when operating as itself.
|
|
171
|
+
# @param agent_access_token [String, nil] The agent's own access token to exchange for a new session on the same instance. The token must have been minted from this blueprint; permissions are re-derived from current authority.
|
|
172
|
+
# @param refresh_token [String, nil] The refresh token issued with a previous agent access token. Refresh tokens are single-use: each refresh rotates it.
|
|
173
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
174
|
+
# @return [WorkOS::AgentToken]
|
|
175
|
+
def create_blueprint_token(
|
|
176
|
+
agent_blueprint_id:,
|
|
177
|
+
type:,
|
|
178
|
+
user_access_token: nil,
|
|
179
|
+
intent: nil,
|
|
180
|
+
organization_id: nil,
|
|
181
|
+
agent_access_token: nil,
|
|
182
|
+
refresh_token: nil,
|
|
183
|
+
request_options: {}
|
|
184
|
+
)
|
|
185
|
+
body = {
|
|
186
|
+
"type" => type,
|
|
187
|
+
"user_access_token" => user_access_token,
|
|
188
|
+
"intent" => intent,
|
|
189
|
+
"organization_id" => organization_id,
|
|
190
|
+
"agent_access_token" => agent_access_token,
|
|
191
|
+
"refresh_token" => refresh_token
|
|
192
|
+
}.compact
|
|
193
|
+
response = @client.request(
|
|
194
|
+
method: :post,
|
|
195
|
+
path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}/tokens",
|
|
196
|
+
auth: true,
|
|
197
|
+
body: body,
|
|
198
|
+
request_options: request_options
|
|
199
|
+
)
|
|
200
|
+
result = WorkOS::AgentToken.new(response.body)
|
|
201
|
+
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"])
|
|
202
|
+
result
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Validate an agent token
|
|
206
|
+
# @param agent_blueprint_id [String] The unique ID of the agent blueprint.
|
|
207
|
+
# @param agent_access_token [String] The agent access token (a JWT) to validate.
|
|
208
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
209
|
+
# @return [WorkOS::AgentTokenValidation]
|
|
210
|
+
def validate_blueprint_token(
|
|
211
|
+
agent_blueprint_id:,
|
|
212
|
+
agent_access_token:,
|
|
213
|
+
request_options: {}
|
|
214
|
+
)
|
|
215
|
+
body = {
|
|
216
|
+
"agent_access_token" => agent_access_token
|
|
217
|
+
}
|
|
218
|
+
response = @client.request(
|
|
219
|
+
method: :post,
|
|
220
|
+
path: "/agents/blueprints/#{WorkOS::Util.encode_path(agent_blueprint_id)}/tokens/validate",
|
|
221
|
+
auth: true,
|
|
222
|
+
body: body,
|
|
223
|
+
request_options: request_options
|
|
224
|
+
)
|
|
225
|
+
result = WorkOS::AgentTokenValidation.new(response.body)
|
|
226
|
+
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"])
|
|
227
|
+
result
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Link a claim attempt to an external user
|
|
231
|
+
# @param type [String] The operation to perform on the claim attempt. Currently only `link_external_user` is supported.
|
|
232
|
+
# @param claim_attempt_token [String] The token identifying the claim attempt.
|
|
233
|
+
# @param user [WorkOS::AgentAdminLinkClaimAttemptToExternalUserRequestUser] The user to attach to the claim attempt, identified by email and external ID.
|
|
234
|
+
# @param organization_id [String, nil] The organization to place the agent in. Required when the user belongs to more than one organization.
|
|
235
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
236
|
+
# @return [WorkOS::ClaimViewResponse]
|
|
237
|
+
def update_attempts(
|
|
238
|
+
type:,
|
|
239
|
+
claim_attempt_token:,
|
|
240
|
+
user:,
|
|
241
|
+
organization_id: nil,
|
|
242
|
+
request_options: {}
|
|
243
|
+
)
|
|
244
|
+
body = {
|
|
245
|
+
"type" => type,
|
|
246
|
+
"claim_attempt_token" => claim_attempt_token,
|
|
247
|
+
"user" => user,
|
|
248
|
+
"organization_id" => organization_id
|
|
249
|
+
}.compact
|
|
250
|
+
response = @client.request(
|
|
251
|
+
method: :patch,
|
|
252
|
+
path: "/agents/claims/attempts",
|
|
253
|
+
auth: true,
|
|
254
|
+
body: body,
|
|
255
|
+
request_options: request_options
|
|
256
|
+
)
|
|
257
|
+
result = WorkOS::ClaimViewResponse.new(response.body)
|
|
258
|
+
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"])
|
|
259
|
+
result
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Validate an agent credential
|
|
263
|
+
# @param type [WorkOS::Types::AgentAdminValidateCredentialRequestType] The kind of credential being validated — an agent API key or an agent access token.
|
|
264
|
+
# @param credential [String] The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
|
|
265
|
+
# @param audience [String, nil] When provided, the access token's `aud` claim is verified against this value. Tokens issued for a different resource are rejected.
|
|
266
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
267
|
+
# @return [WorkOS::AgentCredentialValidation]
|
|
268
|
+
def create_validate(
|
|
269
|
+
type:,
|
|
270
|
+
credential:,
|
|
271
|
+
audience: nil,
|
|
272
|
+
request_options: {}
|
|
273
|
+
)
|
|
274
|
+
body = {
|
|
275
|
+
"type" => type,
|
|
276
|
+
"credential" => credential,
|
|
277
|
+
"audience" => audience
|
|
278
|
+
}.compact
|
|
279
|
+
response = @client.request(
|
|
280
|
+
method: :post,
|
|
281
|
+
path: "/agents/credentials/validate",
|
|
282
|
+
auth: true,
|
|
283
|
+
body: body,
|
|
284
|
+
request_options: request_options
|
|
285
|
+
)
|
|
286
|
+
result = WorkOS::AgentCredentialValidation.new(response.body)
|
|
287
|
+
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"])
|
|
288
|
+
result
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Get an agent registration
|
|
292
|
+
# @param id [String] The unique ID of the agent registration.
|
|
293
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
294
|
+
# @return [WorkOS::AgentRegistration]
|
|
295
|
+
def get_registration(
|
|
296
|
+
id:,
|
|
297
|
+
request_options: {}
|
|
298
|
+
)
|
|
299
|
+
response = @client.request(
|
|
300
|
+
method: :get,
|
|
301
|
+
path: "/agents/registrations/#{WorkOS::Util.encode_path(id)}",
|
|
302
|
+
auth: true,
|
|
303
|
+
request_options: request_options
|
|
304
|
+
)
|
|
305
|
+
result = WorkOS::AgentRegistration.new(response.body)
|
|
306
|
+
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"])
|
|
307
|
+
result
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# List agent instances
|
|
311
|
+
# @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"`.
|
|
312
|
+
# @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"`.
|
|
313
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
314
|
+
# @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).
|
|
315
|
+
# @param organization_id [String, nil] Only return instances acting within this organization.
|
|
316
|
+
# @param agent_blueprint_id [String, nil] Only return instances minted from this blueprint.
|
|
317
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
318
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::AgentInstance>]
|
|
319
|
+
def list_instances(
|
|
320
|
+
before: nil,
|
|
321
|
+
after: nil,
|
|
322
|
+
limit: 10,
|
|
323
|
+
order: "desc",
|
|
324
|
+
organization_id: nil,
|
|
325
|
+
agent_blueprint_id: nil,
|
|
326
|
+
request_options: {}
|
|
327
|
+
)
|
|
328
|
+
params = {
|
|
329
|
+
"before" => before,
|
|
330
|
+
"after" => after,
|
|
331
|
+
"limit" => limit,
|
|
332
|
+
"order" => order,
|
|
333
|
+
"organization_id" => organization_id,
|
|
334
|
+
"agent_blueprint_id" => agent_blueprint_id
|
|
335
|
+
}.compact
|
|
336
|
+
response = @client.request(
|
|
337
|
+
method: :get,
|
|
338
|
+
path: "/agents/instances",
|
|
339
|
+
auth: true,
|
|
340
|
+
params: params,
|
|
341
|
+
request_options: request_options
|
|
342
|
+
)
|
|
343
|
+
fetch_next = ->(cursor) {
|
|
344
|
+
list_instances(
|
|
345
|
+
before: before,
|
|
346
|
+
after: cursor,
|
|
347
|
+
limit: limit,
|
|
348
|
+
order: order,
|
|
349
|
+
organization_id: organization_id,
|
|
350
|
+
agent_blueprint_id: agent_blueprint_id,
|
|
351
|
+
request_options: request_options
|
|
352
|
+
)
|
|
353
|
+
}
|
|
354
|
+
WorkOS::Types::ListStruct.from_response(
|
|
355
|
+
response,
|
|
356
|
+
model: WorkOS::AgentInstance,
|
|
357
|
+
filters: {before: before, limit: limit, order: order, organization_id: organization_id, agent_blueprint_id: agent_blueprint_id},
|
|
358
|
+
fetch_next: fetch_next
|
|
359
|
+
)
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Get an agent instance
|
|
363
|
+
# @param agent_instance_id [String] The unique ID of the agent instance.
|
|
364
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
365
|
+
# @return [WorkOS::AgentInstance]
|
|
366
|
+
def get_instance(
|
|
367
|
+
agent_instance_id:,
|
|
368
|
+
request_options: {}
|
|
369
|
+
)
|
|
370
|
+
response = @client.request(
|
|
371
|
+
method: :get,
|
|
372
|
+
path: "/agents/instances/#{WorkOS::Util.encode_path(agent_instance_id)}",
|
|
373
|
+
auth: true,
|
|
374
|
+
request_options: request_options
|
|
375
|
+
)
|
|
376
|
+
result = WorkOS::AgentInstance.new(response.body)
|
|
377
|
+
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"])
|
|
378
|
+
result
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Delete an agent instance
|
|
382
|
+
# @param agent_instance_id [String] The unique ID of the agent instance.
|
|
383
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
384
|
+
# @return [void]
|
|
385
|
+
def delete_instance(
|
|
386
|
+
agent_instance_id:,
|
|
387
|
+
request_options: {}
|
|
388
|
+
)
|
|
389
|
+
@client.request(
|
|
390
|
+
method: :delete,
|
|
391
|
+
path: "/agents/instances/#{WorkOS::Util.encode_path(agent_instance_id)}",
|
|
392
|
+
auth: true,
|
|
393
|
+
request_options: request_options
|
|
394
|
+
)
|
|
395
|
+
nil
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# List agent instance sessions
|
|
399
|
+
# @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"`.
|
|
400
|
+
# @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"`.
|
|
401
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
402
|
+
# @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).
|
|
403
|
+
# @param agent_blueprint_id [String, nil] Only return sessions of instances minted from this blueprint.
|
|
404
|
+
# @param agent_instance_id [String, nil] Only return sessions belonging to this agent instance.
|
|
405
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
406
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::AgentInstanceSession>]
|
|
407
|
+
def list_sessions(
|
|
408
|
+
before: nil,
|
|
409
|
+
after: nil,
|
|
410
|
+
limit: 10,
|
|
411
|
+
order: "desc",
|
|
412
|
+
agent_blueprint_id: nil,
|
|
413
|
+
agent_instance_id: nil,
|
|
414
|
+
request_options: {}
|
|
415
|
+
)
|
|
416
|
+
params = {
|
|
417
|
+
"before" => before,
|
|
418
|
+
"after" => after,
|
|
419
|
+
"limit" => limit,
|
|
420
|
+
"order" => order,
|
|
421
|
+
"agent_blueprint_id" => agent_blueprint_id,
|
|
422
|
+
"agent_instance_id" => agent_instance_id
|
|
423
|
+
}.compact
|
|
424
|
+
response = @client.request(
|
|
425
|
+
method: :get,
|
|
426
|
+
path: "/agents/sessions",
|
|
427
|
+
auth: true,
|
|
428
|
+
params: params,
|
|
429
|
+
request_options: request_options
|
|
430
|
+
)
|
|
431
|
+
fetch_next = ->(cursor) {
|
|
432
|
+
list_sessions(
|
|
433
|
+
before: before,
|
|
434
|
+
after: cursor,
|
|
435
|
+
limit: limit,
|
|
436
|
+
order: order,
|
|
437
|
+
agent_blueprint_id: agent_blueprint_id,
|
|
438
|
+
agent_instance_id: agent_instance_id,
|
|
439
|
+
request_options: request_options
|
|
440
|
+
)
|
|
441
|
+
}
|
|
442
|
+
WorkOS::Types::ListStruct.from_response(
|
|
443
|
+
response,
|
|
444
|
+
model: WorkOS::AgentInstanceSession,
|
|
445
|
+
filters: {before: before, limit: limit, order: order, agent_blueprint_id: agent_blueprint_id, agent_instance_id: agent_instance_id},
|
|
446
|
+
fetch_next: fetch_next
|
|
447
|
+
)
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Get an agent instance session
|
|
451
|
+
# @param agent_instance_session_id [String] The unique ID of the agent instance session.
|
|
452
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
453
|
+
# @return [WorkOS::AgentInstanceSession]
|
|
454
|
+
def get_session(
|
|
455
|
+
agent_instance_session_id:,
|
|
456
|
+
request_options: {}
|
|
457
|
+
)
|
|
458
|
+
response = @client.request(
|
|
459
|
+
method: :get,
|
|
460
|
+
path: "/agents/sessions/#{WorkOS::Util.encode_path(agent_instance_session_id)}",
|
|
461
|
+
auth: true,
|
|
462
|
+
request_options: request_options
|
|
463
|
+
)
|
|
464
|
+
result = WorkOS::AgentInstanceSession.new(response.body)
|
|
465
|
+
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"])
|
|
466
|
+
result
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# Revoke an agent instance session
|
|
470
|
+
# @param agent_instance_session_id [String] The unique ID of the agent instance session.
|
|
471
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
472
|
+
# @return [WorkOS::AgentInstanceSession]
|
|
473
|
+
def revoke_session(
|
|
474
|
+
agent_instance_session_id:,
|
|
475
|
+
request_options: {}
|
|
476
|
+
)
|
|
477
|
+
response = @client.request(
|
|
478
|
+
method: :post,
|
|
479
|
+
path: "/agents/sessions/#{WorkOS::Util.encode_path(agent_instance_session_id)}/revoke",
|
|
480
|
+
auth: true,
|
|
481
|
+
request_options: request_options
|
|
482
|
+
)
|
|
483
|
+
result = WorkOS::AgentInstanceSession.new(response.body)
|
|
484
|
+
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"])
|
|
485
|
+
result
|
|
486
|
+
end
|
|
487
|
+
end
|
|
488
|
+
end
|
|
@@ -5,14 +5,18 @@
|
|
|
5
5
|
module WorkOS
|
|
6
6
|
class ApiKeyValidationResponse < WorkOS::Types::BaseModel
|
|
7
7
|
HASH_ATTRS = {
|
|
8
|
-
api_key: :api_key
|
|
8
|
+
api_key: :api_key,
|
|
9
|
+
agent_registration_id: :agent_registration_id
|
|
9
10
|
}.freeze
|
|
10
11
|
|
|
11
|
-
attr_accessor
|
|
12
|
+
attr_accessor \
|
|
13
|
+
:api_key,
|
|
14
|
+
:agent_registration_id
|
|
12
15
|
|
|
13
16
|
def initialize(json)
|
|
14
17
|
hash = self.class.normalize(json)
|
|
15
18
|
@api_key = hash[:api_key] ? WorkOS::ApiKey.new(hash[:api_key]) : nil
|
|
19
|
+
@agent_registration_id = hash[:agent_registration_id]
|
|
16
20
|
end
|
|
17
21
|
end
|
|
18
22
|
end
|
|
@@ -3,16 +3,5 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
|
|
7
|
-
HASH_ATTRS = {
|
|
8
|
-
value: :value
|
|
9
|
-
}.freeze
|
|
10
|
-
|
|
11
|
-
attr_accessor :value
|
|
12
|
-
|
|
13
|
-
def initialize(json)
|
|
14
|
-
hash = self.class.normalize(json)
|
|
15
|
-
@value = hash[:value]
|
|
16
|
-
end
|
|
17
|
-
end
|
|
6
|
+
ValidateApiKey = CreateSAMLIdpSigningCertificate
|
|
18
7
|
end
|
data/lib/workos/api_keys.rb
CHANGED
|
@@ -135,12 +135,11 @@ module WorkOS
|
|
|
135
135
|
# @return [WorkOS::ApiKey]
|
|
136
136
|
def create_api_key_expire(
|
|
137
137
|
id:,
|
|
138
|
-
expires_at:
|
|
138
|
+
expires_at: WorkOS::OMIT,
|
|
139
139
|
request_options: {}
|
|
140
140
|
)
|
|
141
|
-
body = {
|
|
142
|
-
|
|
143
|
-
}.compact
|
|
141
|
+
body = {}
|
|
142
|
+
body["expires_at"] = expires_at unless expires_at.equal?(WorkOS::OMIT)
|
|
144
143
|
response = @client.request(
|
|
145
144
|
method: :post,
|
|
146
145
|
path: "/api_keys/#{WorkOS::Util.encode_path(id)}/expire",
|
data/lib/workos/audit_logs.rb
CHANGED
|
@@ -6,6 +6,18 @@ require "json"
|
|
|
6
6
|
|
|
7
7
|
module WorkOS
|
|
8
8
|
class AuditLogs
|
|
9
|
+
# Identifies the retention (period variant).
|
|
10
|
+
#
|
|
11
|
+
# @!attribute [r] retention_period
|
|
12
|
+
# @return [WorkOS::Types::UpdateAuditLogsRetentionRetentionPeriod]
|
|
13
|
+
RetentionPeriod = Data.define(:retention_period)
|
|
14
|
+
|
|
15
|
+
# Identifies the retention (period in days variant).
|
|
16
|
+
#
|
|
17
|
+
# @!attribute [r] retention_period_in_days
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
RetentionPeriodInDays = Data.define(:retention_period_in_days)
|
|
20
|
+
|
|
9
21
|
def initialize(client)
|
|
10
22
|
@client = client
|
|
11
23
|
end
|
|
@@ -31,17 +43,23 @@ module WorkOS
|
|
|
31
43
|
|
|
32
44
|
# Set Retention
|
|
33
45
|
# @param id [String] Unique identifier of the Organization.
|
|
34
|
-
# @param
|
|
46
|
+
# @param retention [WorkOS::AuditLogs::RetentionPeriod, WorkOS::AuditLogs::RetentionPeriodInDays] Identifies the retention.
|
|
35
47
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
36
48
|
# @return [WorkOS::AuditLogsRetention]
|
|
37
49
|
def update_organization_audit_logs_retention(
|
|
38
50
|
id:,
|
|
39
|
-
|
|
51
|
+
retention:,
|
|
40
52
|
request_options: {}
|
|
41
53
|
)
|
|
42
|
-
body = {
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
body = {}
|
|
55
|
+
case retention
|
|
56
|
+
when WorkOS::AuditLogs::RetentionPeriod
|
|
57
|
+
body["retention_period"] = retention.retention_period
|
|
58
|
+
when WorkOS::AuditLogs::RetentionPeriodInDays
|
|
59
|
+
body["retention_period_in_days"] = retention.retention_period_in_days
|
|
60
|
+
else
|
|
61
|
+
raise ArgumentError, "expected retention to be one of: WorkOS::AuditLogs::RetentionPeriod, WorkOS::AuditLogs::RetentionPeriodInDays, got #{retention.class}"
|
|
62
|
+
end
|
|
45
63
|
response = @client.request(
|
|
46
64
|
method: :put,
|
|
47
65
|
path: "/organizations/#{WorkOS::Util.encode_path(id)}/audit_logs_retention",
|
|
@@ -3,38 +3,5 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
module WorkOS
|
|
6
|
-
|
|
7
|
-
HASH_ATTRS = {
|
|
8
|
-
object: :object,
|
|
9
|
-
id: :id,
|
|
10
|
-
slug: :slug,
|
|
11
|
-
name: :name,
|
|
12
|
-
description: :description,
|
|
13
|
-
system: :system,
|
|
14
|
-
created_at: :created_at,
|
|
15
|
-
updated_at: :updated_at
|
|
16
|
-
}.freeze
|
|
17
|
-
|
|
18
|
-
attr_accessor \
|
|
19
|
-
:object,
|
|
20
|
-
:id,
|
|
21
|
-
:slug,
|
|
22
|
-
:name,
|
|
23
|
-
:description,
|
|
24
|
-
:system,
|
|
25
|
-
:created_at,
|
|
26
|
-
:updated_at
|
|
27
|
-
|
|
28
|
-
def initialize(json)
|
|
29
|
-
hash = self.class.normalize(json)
|
|
30
|
-
@object = hash[:object]
|
|
31
|
-
@id = hash[:id]
|
|
32
|
-
@slug = hash[:slug]
|
|
33
|
-
@name = hash[:name]
|
|
34
|
-
@description = hash[:description]
|
|
35
|
-
@system = hash[:system]
|
|
36
|
-
@created_at = hash[:created_at]
|
|
37
|
-
@updated_at = hash[:updated_at]
|
|
38
|
-
end
|
|
39
|
-
end
|
|
6
|
+
PermissionCreatedData = AuthorizationPermission
|
|
40
7
|
end
|