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>
            );
        generateRecoverAccountTokenPOST:
            | undefined
            | (
                (
                    input: {
                        email: string;
                        options: APIOptions;
                        tenantId: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { status: "OK" }
                    | GeneralErrorResponse
                    | GenerateRecoverAccountTokenPOSTErrorResponse,
                >
            );
        listCredentialsGET:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        session: SessionContainer;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | {
                        credentials: {
                            createdAt: number;
                            recipeUserId: string;
                            relyingPartyId: string;
                            webauthnCredentialId: string;
                        }[];
                        status: "OK";
                    }
                    | GeneralErrorResponse,
                >
            );
        recoverAccountPOST: | undefined
        | (
            (
                input: {
                    credential: RegistrationPayload;
                    options: APIOptions;
                    tenantId: string;
                    token: string;
                    userContext: UserContext;
                    webauthnGeneratedOptionsId: string;
                },
            ) => Promise<
                | { email: string; status: "OK"; user: User }
                | GeneralErrorResponse
                | RecoverAccountPOSTErrorResponse,
            >
        );
        registerCredentialPOST:
            | undefined
            | (
                (
                    input: {
                        credential: RegistrationPayload;
                        options: APIOptions;
                        recipeUserId: string;
                        session: SessionContainer;
                        tenantId: string;
                        userContext: UserContext;
                        webauthnGeneratedOptionsId: string;
                    },
                ) => Promise<
                    | { status: "OK" }
                    | GeneralErrorResponse
                    | RegisterCredentialPOSTErrorResponse,
                >
            );
        registerOptionsPOST:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        tenantId: string;
                        userContext: UserContext;
                    } & (
                        | { displayName?: string; email: string }
                        | { recoverAccountToken: string }
                    ),
                ) => Promise<
                    | {
                        attestation: "none"
                        | "indirect"
                        | "direct"
                        | "enterprise";
                        authenticatorSelection: {
                            requireResidentKey: boolean;
                            residentKey: ResidentKey;
                            userVerification: UserVerification;
                        };
                        challenge: string;
                        createdAt: number;
                        excludeCredentials: {
                            id: string;
                            transports: (...)[];
                            type: "public-key";
                        }[];
                        expiresAt: number;
                        pubKeyCredParams: { alg: number; type: string }[];
                        rp: { id: string; name: string };
                        status: "OK";
                        timeout: number;
                        user: { displayName: string; id: string; name: string };
                        webauthnGeneratedOptionsId: string;
                    }
                    | GeneralErrorResponse
                    | RegisterOptionsPOSTErrorResponse,
                >
            );
        removeCredentialPOST: | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    session: SessionContainer;
                    userContext: UserContext;
                    webauthnCredentialId: string;
                },
            ) => Promise<
                | { status: "OK" }
                | GeneralErrorResponse
                | RemoveCredentialPOSTErrorResponse,
            >
        );
        signInOptionsPOST:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        tenantId: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | {
                        challenge: string;
                        createdAt: number;
                        expiresAt: number;
                        rpId: string;
                        status: "OK";
                        timeout: number;
                        userVerification: UserVerification;
                        webauthnGeneratedOptionsId: string;
                    }
                    | GeneralErrorResponse
                    | SignInOptionsPOSTErrorResponse,
                >
            );
        signInPOST: | undefined
        | (
            (
                input: {
                    credential: AuthenticationPayload;
                    options: APIOptions;
                    session: SessionContainer | undefined;
                    shouldTryLinkingWithSessionUser: boolean | undefined;
                    tenantId: string;
                    userContext: UserContext;
                    webauthnGeneratedOptionsId: string;
                },
            ) => Promise<
                | { session: SessionContainer; status: "OK"; user: User }
                | GeneralErrorResponse
                | SignInPOSTErrorResponse,
            >
        );
        signUpPOST:
            | undefined
            | (
                (
                    input: {
                        credential: RegistrationPayload;
                        options: APIOptions;
                        session: SessionContainer | undefined;
                        shouldTryLinkingWithSessionUser: boolean | undefined;
                        tenantId: string;
                        userContext: UserContext;
                        webauthnGeneratedOptionsId: string;
                    },
                ) => Promise<
                    | { session: SessionContainer; status: "OK"; user: User }
                    | GeneralErrorResponse
                    | SignUpPOSTErrorResponse,
                >
            );
    }
    Index

    Properties

    emailExistsGET:
        | undefined
        | (
            (
                input: {
                    email: string;
                    options: APIOptions;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>
        )
    generateRecoverAccountTokenPOST:
        | undefined
        | (
            (
                input: {
                    email: string;
                    options: APIOptions;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<
                | { status: "OK" }
                | GeneralErrorResponse
                | GenerateRecoverAccountTokenPOSTErrorResponse,
            >
        )
    listCredentialsGET:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    session: SessionContainer;
                    userContext: UserContext;
                },
            ) => Promise<
                | {
                    credentials: {
                        createdAt: number;
                        recipeUserId: string;
                        relyingPartyId: string;
                        webauthnCredentialId: string;
                    }[];
                    status: "OK";
                }
                | GeneralErrorResponse,
            >
        )
    recoverAccountPOST:
        | undefined
        | (
            (
                input: {
                    credential: RegistrationPayload;
                    options: APIOptions;
                    tenantId: string;
                    token: string;
                    userContext: UserContext;
                    webauthnGeneratedOptionsId: string;
                },
            ) => Promise<
                | { email: string; status: "OK"; user: User }
                | GeneralErrorResponse
                | RecoverAccountPOSTErrorResponse,
            >
        )
    registerCredentialPOST:
        | undefined
        | (
            (
                input: {
                    credential: RegistrationPayload;
                    options: APIOptions;
                    recipeUserId: string;
                    session: SessionContainer;
                    tenantId: string;
                    userContext: UserContext;
                    webauthnGeneratedOptionsId: string;
                },
            ) => Promise<
                | { status: "OK" }
                | GeneralErrorResponse
                | RegisterCredentialPOSTErrorResponse,
            >
        )
    registerOptionsPOST:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    tenantId: string;
                    userContext: UserContext;
                } & (
                    | { displayName?: string; email: string }
                    | { recoverAccountToken: string }
                ),
            ) => Promise<
                | {
                    attestation: "none"
                    | "indirect"
                    | "direct"
                    | "enterprise";
                    authenticatorSelection: {
                        requireResidentKey: boolean;
                        residentKey: ResidentKey;
                        userVerification: UserVerification;
                    };
                    challenge: string;
                    createdAt: number;
                    excludeCredentials: {
                        id: string;
                        transports: (...)[];
                        type: "public-key";
                    }[];
                    expiresAt: number;
                    pubKeyCredParams: { alg: number; type: string }[];
                    rp: { id: string; name: string };
                    status: "OK";
                    timeout: number;
                    user: { displayName: string; id: string; name: string };
                    webauthnGeneratedOptionsId: string;
                }
                | GeneralErrorResponse
                | RegisterOptionsPOSTErrorResponse,
            >
        )
    removeCredentialPOST:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    session: SessionContainer;
                    userContext: UserContext;
                    webauthnCredentialId: string;
                },
            ) => Promise<
                | { status: "OK" }
                | GeneralErrorResponse
                | RemoveCredentialPOSTErrorResponse,
            >
        )
    signInOptionsPOST:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    tenantId: string;
                    userContext: UserContext;
                },
            ) => Promise<
                | {
                    challenge: string;
                    createdAt: number;
                    expiresAt: number;
                    rpId: string;
                    status: "OK";
                    timeout: number;
                    userVerification: UserVerification;
                    webauthnGeneratedOptionsId: string;
                }
                | GeneralErrorResponse
                | SignInOptionsPOSTErrorResponse,
            >
        )
    signInPOST:
        | undefined
        | (
            (
                input: {
                    credential: AuthenticationPayload;
                    options: APIOptions;
                    session: SessionContainer | undefined;
                    shouldTryLinkingWithSessionUser: boolean | undefined;
                    tenantId: string;
                    userContext: UserContext;
                    webauthnGeneratedOptionsId: string;
                },
            ) => Promise<
                | { session: SessionContainer; status: "OK"; user: User }
                | GeneralErrorResponse
                | SignInPOSTErrorResponse,
            >
        )
    signUpPOST:
        | undefined
        | (
            (
                input: {
                    credential: RegistrationPayload;
                    options: APIOptions;
                    session: SessionContainer | undefined;
                    shouldTryLinkingWithSessionUser: boolean | undefined;
                    tenantId: string;
                    userContext: UserContext;
                    webauthnGeneratedOptionsId: string;
                },
            ) => Promise<
                | { session: SessionContainer; status: "OK"; user: User }
                | GeneralErrorResponse
                | SignUpPOSTErrorResponse,
            >
        )