80f9e01
use export::rest::NoData;
use models::users::user::{Audience, ProfileVisibility};
use models::users::user_access_keys::AccessKeyScope;
use models::users::user_email_verification_codes::EmailVerificationPurpose;
use models::users::user_notifications::NotificationType;
use models::users::user_reports::ReportStatus;
use models::users::user_ssh_keys::SshKeyType;
use utoipa::OpenApi;
use crate::handlers;
use crate::handlers::accept_agreement::AcceptAgreementCmd;
use crate::handlers::confirm_email_change::ConfirmEmailChangeCmd;
use crate::handlers::me::MeResp;
use crate::handlers::pow_challenge::PowChallengeResp;
use crate::handlers::request_deletion::RequestDeletionCmd;
use crate::handlers::unread_notifications_count::UnreadCountResp;
use crate::services::access_keys::{
AccessKeyDto, CreateAccessKeyCmd, CreateAccessKeyResp, UpdateAccessKeyCmd,
};
use crate::services::agreements::AcceptAgreementResp;
use crate::services::deletion::DeletionDto;
use crate::services::devices::{DeviceDto, UpdateDeviceCmd};
use crate::services::email::{
EmailChangeTicketDto, ReclaimCmd, ReclaimResp, RequestEmailChangeCmd, ResendCodeCmd,
ResendCodeResp, VerifyEmailCmd, VerifyEmailResp,
};
use crate::services::jwt::{JwtRequestQuery, JwtRequestResp};
use crate::services::login::{LoginCmd, LoginResp, TwoFactorLoginCmd};
use crate::services::logout::LogoutResp;
use crate::services::notifications::NotificationDto;
use crate::services::password::{
ChangePasswordCmd, ForgotPasswordCmd, ForgotPasswordResp, ResetPasswordCmd,
};
use crate::services::preferences::{UpdatePreferencesCmd, UserPreferencesDto};
use crate::services::profile::{ProfileDto, UpdateProfileCmd, UserMeDto};
use crate::services::register::{RegisterCmd, RegisterResp};
use crate::services::reports::{CreateReportCmd, ReportDto};
use crate::services::ssh_keys::{AddSshKeyCmd, SshKeyDto};
use crate::services::two_factor::{
RecoveryCodesResp, RegenerateRecoveryCodesCmd, TotpCodeCmd, TotpEnableCmd, TotpSetupResp,
TotpStatusResp,
};
use crate::share::types::{AgreementDoc, UserPublic};
#[derive(OpenApi)]
#[openapi(
info(title = "gitdata auth api", version = "1.0"),
paths(
handlers::accept_agreement::accept_agreement,
handlers::add_ssh_key::add_ssh_key,
handlers::cancel_deletion::cancel_deletion,
handlers::cancel_email_change::cancel_email_change,
handlers::change_password::change_password,
handlers::confirm_email_change::confirm_email_change,
handlers::create_access_key::create_access_key,
handlers::create_report::create_report,
handlers::delete_access_key::delete_access_key,
handlers::update_access_key::update_access_key,
handlers::rotate_access_key::rotate_access_key,
handlers::devices::list_devices,
handlers::devices::update_device,
handlers::devices::delete_device,
handlers::delete_notification::delete_notification,
handlers::delete_ssh_key::delete_ssh_key,
handlers::deletion_status::deletion_status,
handlers::forgot_password::forgot_password,
handlers::get_preferences::get_preferences,
handlers::get_user::get_user,
handlers::users::list_users_batch,
handlers::users::get_user_by_username,
handlers::users::update_username,
handlers::list_access_keys::list_access_keys,
handlers::list_agreements::list_agreements,
handlers::list_notifications::list_notifications,
handlers::list_ssh_keys::list_ssh_keys,
handlers::login::login,
handlers::login_2fa::login_2fa,
handlers::jwt_request::jwt_request,
handlers::logout::logout,
handlers::mark_notifications_read::mark_notifications_read,
handlers::me::me,
handlers::pow_challenge::pow_challenge,
handlers::reclaim::reclaim,
handlers::recovery_codes::recovery_codes,
handlers::regenerate_recovery_codes::regenerate_recovery_codes,
handlers::register::register,
handlers::request_deletion::request_deletion,
handlers::request_email_change::request_email_change,
handlers::resend_code::resend_code,
handlers::reset_password::reset_password,
handlers::totp_disable::totp_disable,
handlers::totp_enable::totp_enable,
handlers::totp_setup::totp_setup,
handlers::totp_status::totp_status,
handlers::unread_notifications_count::unread_notifications_count,
handlers::update_preferences::update_preferences,
handlers::update_profile::update_profile,
handlers::verify_email::verify_email,
),
components(schemas(
export::pagination::PageQuery,
export::pagination::Page<crate::services::notifications::NotificationDto>,
handlers::mark_notifications_read::MarkNotificationsReadCmd,
handlers::mark_notifications_read::MarkedCountResp,
NoData,
UserPublic,
AgreementDoc,
RegisterCmd,
RegisterResp,
LoginCmd,
LoginResp,
TwoFactorLoginCmd,
LogoutResp,
JwtRequestQuery,
JwtRequestResp,
VerifyEmailCmd,
VerifyEmailResp,
ResendCodeCmd,
ResendCodeResp,
ReclaimCmd,
ReclaimResp,
EmailChangeTicketDto,
RequestEmailChangeCmd,
ConfirmEmailChangeCmd,
ForgotPasswordCmd,
ForgotPasswordResp,
ResetPasswordCmd,
ChangePasswordCmd,
TotpStatusResp,
TotpSetupResp,
TotpCodeCmd,
TotpEnableCmd,
RegenerateRecoveryCodesCmd,
RecoveryCodesResp,
CreateAccessKeyCmd,
AccessKeyDto,
CreateAccessKeyResp,
UpdateAccessKeyCmd,
DeviceDto,
UpdateDeviceCmd,
SshKeyDto,
AddSshKeyCmd,
UserMeDto,
ProfileDto,
UpdateProfileCmd,
UserPreferencesDto,
UpdatePreferencesCmd,
AcceptAgreementCmd,
AcceptAgreementResp,
MeResp,
PowChallengeResp,
NotificationDto,
CreateReportCmd,
ReportDto,
UnreadCountResp,
DeletionDto,
RequestDeletionCmd,
ProfileVisibility,
Audience,
AccessKeyScope,
SshKeyType,
NotificationType,
ReportStatus,
EmailVerificationPurpose,
))
)]
pub struct AuthApiDoc;