package com.ss.android.ugc.aweme.account.login.twostep;

import X.0Gp;
import X.2Pr;
import X.2kH;
import X.47k;
import X.7he;
import X.8qk;
import X.Crj;
import X.FY6;
import X.FYA;
import X.FYC;
import X.FrV;
import X.IUu;
import X.JMA;
import X.M12;
import X.PUu;
import X.S29;
import X.S4W;
import com.bytedance.covode.number.Covode;
import com.bytedance.keva.Keva;

public final class TwoStepAuthApi {
    public static String LIZ;
    public static final TwoStepAuthApi LIZIZ = new TwoStepAuthApi();
    public static final Crj LIZJ = 7he.LIZ(S29.LIZ);

    public interface Api {
        static {
            Covode.recordClassIndex(51222);
        }

        @8qk
        @IUu(LIZ = "/passport/safe/two_step_verification/add_auth_device/")
        0Gp<2Pr> addAuthDevice(@PUu(LIZ = "verify_ticket") String str);

        @8qk
        @IUu(LIZ = "/passport/safe/two_step_verification/add_verification/")
        0Gp<47k> addVerification(@PUu(LIZ = "verify_ticket") String str, @PUu(LIZ = "verify_way") String str2, @PUu(LIZ = "is_default") int i);

        @JMA(LIZ = "/passport/safe/two_step_verification/get_auth_device_list/")
        0Gp<FY6> getAuthDeviceList();

        @JMA(LIZ = "/passport/auth/available_ways/")
        0Gp<FrV> getAvailableWays();

        @JMA(LIZ = "/passport/safe/api/user/unusual_info_preview/")
        0Gp<2kH> getUnusualInfo();

        @JMA(LIZ = "/passport/safe/two_step_verification/get_verification_list/")
        0Gp<47k> getVerification();

        @8qk
        @IUu(LIZ = "/passport/safe/two_step_verification/remove_all/")
        0Gp<47k> removeAllVerification(@PUu(LIZ = "verify_ticket") String str);

        @8qk
        @IUu(LIZ = "/passport/safe/two_step_verification/remove_auth_device/")
        0Gp<FY6> removeAuthDevice(@PUu(LIZ = "del_did") String str);

        @8qk
        @IUu(LIZ = "/passport/safe/two_step_verification/remove_verification/")
        0Gp<47k> removeVerification(@PUu(LIZ = "verify_ticket") String str, @PUu(LIZ = "verify_way") String str2);

        @8qk
        @IUu(LIZ = "/passport/email/send_code/")
        0Gp<FYA> sendEmailCode(@PUu(LIZ = "verify_ticket") String str, @PUu(LIZ = "type") Integer num);

        @8qk
        @IUu(LIZ = "/passport/mobile/send_code/v1/")
        0Gp<FYC> sendSmsCode(@PUu(LIZ = "verify_ticket") String str, @PUu(LIZ = "is6Digits") Integer num, @PUu(LIZ = "type") Integer num2);

        @8qk
        @IUu(LIZ = "/passport/email/check_code/")
        0Gp<S4W> verifyEmailCode(@PUu(LIZ = "mix_mode") Integer num, @PUu(LIZ = "email") String str, @PUu(LIZ = "code") String str2, @PUu(LIZ = "type") int i, @PUu(LIZ = "verify_ticket") String str3);

        @8qk
        @IUu(LIZ = "/passport/account/verify/")
        0Gp<S4W> verifyPassword(@PUu(LIZ = "username") String str, @PUu(LIZ = "mobile") String str2, @PUu(LIZ = "email") String str3, @PUu(LIZ = "password") String str4, @PUu(LIZ = "mix_mode") int i, @PUu(LIZ = "verify_ticket") String str5);

        @8qk
        @IUu(LIZ = "/passport/mobile/check_code/")
        0Gp<S4W> verifySmsCode(@PUu(LIZ = "mix_mode") Integer num, @PUu(LIZ = "mobile") String str, @PUu(LIZ = "code") String str2, @PUu(LIZ = "type") int i, @PUu(LIZ = "verify_ticket") String str3);

        @8qk
        @IUu(LIZ = "/passport/auth/verify/")
        0Gp<S4W> verifyThirdParty(@PUu(LIZ = "access_token") String str, @PUu(LIZ = "access_token_secret") String str2, @PUu(LIZ = "code") String str3, @PUu(LIZ = "expires_in") Integer num, @PUu(LIZ = "openid") Integer num2, @PUu(LIZ = "platform") String str4, @PUu(LIZ = "platform_app_id") Integer num3, @PUu(LIZ = "mid") Integer num4, @PUu(LIZ = "verify_ticket") String str5);
    }

    public final Api LIZ() {
        return (Api) LIZJ.getValue();
    }

    public final 0Gp<FY6> LIZIZ() {
        return LIZ().getAuthDeviceList();
    }

    public final boolean LIZJ() {
        return Keva.getRepo("two_step_verification").getBoolean("ask_next_time", true);
    }

    static {
        Covode.recordClassIndex(51221);
    }

    public final 0Gp<47k> LIZ(String str) {
        M12.LIZ(str);
        return LIZ().removeAllVerification(str);
    }

    public final 0Gp<47k> LIZ(String str, String str2) {
        M12.LIZ(str, str2);
        return LIZ().removeVerification(str, str2);
    }

    public final 0Gp<47k> LIZ(String str, String str2, int i) {
        M12.LIZ(str, str2);
        return LIZ().addVerification(str, str2, i);
    }
}
