supertokens-node
    Preparing search index...

    Type Alias APIInterface

    type APIInterface = {
        emailExistsGET:
            | undefined
            | (
                (
                    input: {
                        email: string;
                        options: APIOptions;
                        tenantId: string;
                        userContext: UserContext;
                    },
                ) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>
            );
        generatePasswordResetTokenPOST:
            | undefined
            | (
                (
                    input: {
                        formFields: { id: string; value: unknown }[];
                        options: APIOptions;
                        tenantId: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { status: "OK" }
                    | { reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" }
                    | GeneralErrorResponse,
                >
            );
        passwordResetPOST:
            | undefined
            | (
                (
                    input: {
                        formFields: { id: string; value: unknown }[];
                        options: APIOptions;
                        tenantId: string;
                        token: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { email: string; status: "OK"; user: User }
                    | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }
                    | { failureReason: string; status: "PASSWORD_POLICY_VIOLATED_ERROR" }
                    | GeneralErrorResponse,
                >
            );
        signInPOST:
            | undefined
            | (
                (
                    input: {
                        formFields: { id: string; value: unknown }[];
                        options: APIOptions;
                        session: SessionContainer | undefined;
                        shouldTryLinkingWithSessionUser: boolean | undefined;
                        tenantId: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { session: SessionContainer; status: "OK"; user: User }
                    | { reason: string; status: "SIGN_IN_NOT_ALLOWED" }
                    | { status: "WRONG_CREDENTIALS_ERROR" }
                    | GeneralErrorResponse,
                >
            );
        signUpPOST:
            | undefined
            | (
                (
                    input: {
                        formFields: { id: string; value: unknown }[];
                        options: APIOptions;
                        session: SessionContainer | undefined;
                        shouldTryLinkingWithSessionUser: boolean | undefined;
                        tenantId: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { session: SessionContainer; status: "OK"; user: User }
                    | { reason: string; status: "SIGN_UP_NOT_ALLOWED" }
                    | { status: "EMAIL_ALREADY_EXISTS_ERROR" }
                    | GeneralErrorResponse,
                >
            );
    }
    Index

    Properties

    emailExistsGET:
        | undefined
        | (
            (
                input: {
                    email: string;
                    options: APIOptions;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>
        )
    generatePasswordResetTokenPOST:
        | undefined
        | (
            (
                input: {
                    formFields: { id: string; value: unknown }[];
                    options: APIOptions;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<
                | { status: "OK" }
                | { reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" }
                | GeneralErrorResponse,
            >
        )
    passwordResetPOST:
        | undefined
        | (
            (
                input: {
                    formFields: { id: string; value: unknown }[];
                    options: APIOptions;
                    tenantId: string;
                    token: string;
                    userContext: UserContext;
                },
            ) => Promise<
                | { email: string; status: "OK"; user: User }
                | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }
                | { failureReason: string; status: "PASSWORD_POLICY_VIOLATED_ERROR" }
                | GeneralErrorResponse,
            >
        )
    signInPOST:
        | undefined
        | (
            (
                input: {
                    formFields: { id: string; value: unknown }[];
                    options: APIOptions;
                    session: SessionContainer | undefined;
                    shouldTryLinkingWithSessionUser: boolean | undefined;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<
                | { session: SessionContainer; status: "OK"; user: User }
                | { reason: string; status: "SIGN_IN_NOT_ALLOWED" }
                | { status: "WRONG_CREDENTIALS_ERROR" }
                | GeneralErrorResponse,
            >
        )
    signUpPOST:
        | undefined
        | (
            (
                input: {
                    formFields: { id: string; value: unknown }[];
                    options: APIOptions;
                    session: SessionContainer | undefined;
                    shouldTryLinkingWithSessionUser: boolean | undefined;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<
                | { session: SessionContainer; status: "OK"; user: User }
                | { reason: string; status: "SIGN_UP_NOT_ALLOWED" }
                | { status: "EMAIL_ALREADY_EXISTS_ERROR" }
                | GeneralErrorResponse,
            >
        )