supertokens-node
    Preparing search index...

    Type Alias APIInterface

    type APIInterface = {
        authGET:
            | undefined
            | (
                (
                    input: {
                        cookie: string | undefined;
                        options: APIOptions;
                        params: any;
                        session: SessionContainer | undefined;
                        shouldTryRefresh: boolean;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { cookies?: string[]; redirectTo: string }
                    | ErrorOAuth2
                    | GeneralErrorResponse,
                >
            );
        endSessionGET:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        params: Record<string, string>;
                        session?: SessionContainer;
                        shouldTryRefresh: boolean;
                        userContext: UserContext;
                    },
                ) => Promise<{ redirectTo: string } | ErrorOAuth2 | GeneralErrorResponse>
            );
        endSessionPOST:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        params: Record<string, string>;
                        session?: SessionContainer;
                        shouldTryRefresh: boolean;
                        userContext: UserContext;
                    },
                ) => Promise<{ redirectTo: string } | ErrorOAuth2 | GeneralErrorResponse>
            );
        introspectTokenPOST:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        scopes?: string[];
                        token: string;
                        userContext: UserContext;
                    },
                ) => Promise<
                    InstrospectTokenResponse
                    | GeneralErrorResponse
                    | ErrorOAuth2,
                >
            );
        loginGET:
            | undefined
            | (
                (
                    input: {
                        loginChallenge: string;
                        options: APIOptions;
                        session?: SessionContainer;
                        shouldTryRefresh: boolean;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { cookies?: string[]; frontendRedirectTo: string }
                    | ErrorOAuth2
                    | GeneralErrorResponse,
                >
            );
        loginInfoGET:
            | undefined
            | (
                (
                    input: {
                        loginChallenge: string;
                        options: APIOptions;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { info: LoginInfo; status: "OK" }
                    | ErrorOAuth2
                    | GeneralErrorResponse,
                >
            );
        logoutPOST:
            | undefined
            | (
                (
                    input: {
                        logoutChallenge: string;
                        options: APIOptions;
                        session?: SessionContainer;
                        userContext: UserContext;
                    },
                ) => Promise<
                    | { frontendRedirectTo: string; status: "OK" }
                    | ErrorOAuth2
                    | GeneralErrorResponse,
                >
            );
        revokeTokenPOST:
            | undefined
            | (
                (
                    input: {
                        options: APIOptions;
                        token: string;
                        userContext: UserContext;
                    } & (
                        | { authorizationHeader: string }
                        | { clientId: string; clientSecret?: string }
                    ),
                ) => Promise<{ status: "OK" } | ErrorOAuth2>
            );
        tokenPOST:
            | undefined
            | (
                (
                    input: {
                        authorizationHeader?: string;
                        body: any;
                        options: APIOptions;
                        userContext: UserContext;
                    },
                ) => Promise<TokenInfo | ErrorOAuth2 | GeneralErrorResponse>
            );
        userInfoGET:
            | undefined
            | (
                (
                    input: {
                        accessTokenPayload: JSONObject;
                        options: APIOptions;
                        scopes: string[];
                        tenantId: string;
                        user: User;
                        userContext: UserContext;
                    },
                ) => Promise<JSONObject | GeneralErrorResponse>
            );
    }
    Index

    Properties

    authGET:
        | undefined
        | (
            (
                input: {
                    cookie: string | undefined;
                    options: APIOptions;
                    params: any;
                    session: SessionContainer | undefined;
                    shouldTryRefresh: boolean;
                    userContext: UserContext;
                },
            ) => Promise<
                | { cookies?: string[]; redirectTo: string }
                | ErrorOAuth2
                | GeneralErrorResponse,
            >
        )
    endSessionGET:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    params: Record<string, string>;
                    session?: SessionContainer;
                    shouldTryRefresh: boolean;
                    userContext: UserContext;
                },
            ) => Promise<{ redirectTo: string } | ErrorOAuth2 | GeneralErrorResponse>
        )
    endSessionPOST:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    params: Record<string, string>;
                    session?: SessionContainer;
                    shouldTryRefresh: boolean;
                    userContext: UserContext;
                },
            ) => Promise<{ redirectTo: string } | ErrorOAuth2 | GeneralErrorResponse>
        )
    introspectTokenPOST:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    scopes?: string[];
                    token: string;
                    userContext: UserContext;
                },
            ) => Promise<
                InstrospectTokenResponse
                | GeneralErrorResponse
                | ErrorOAuth2,
            >
        )
    loginGET:
        | undefined
        | (
            (
                input: {
                    loginChallenge: string;
                    options: APIOptions;
                    session?: SessionContainer;
                    shouldTryRefresh: boolean;
                    userContext: UserContext;
                },
            ) => Promise<
                | { cookies?: string[]; frontendRedirectTo: string }
                | ErrorOAuth2
                | GeneralErrorResponse,
            >
        )
    loginInfoGET:
        | undefined
        | (
            (
                input: {
                    loginChallenge: string;
                    options: APIOptions;
                    userContext: UserContext;
                },
            ) => Promise<
                { info: LoginInfo; status: "OK" }
                | ErrorOAuth2
                | GeneralErrorResponse,
            >
        )
    logoutPOST:
        | undefined
        | (
            (
                input: {
                    logoutChallenge: string;
                    options: APIOptions;
                    session?: SessionContainer;
                    userContext: UserContext;
                },
            ) => Promise<
                | { frontendRedirectTo: string; status: "OK" }
                | ErrorOAuth2
                | GeneralErrorResponse,
            >
        )
    revokeTokenPOST:
        | undefined
        | (
            (
                input: {
                    options: APIOptions;
                    token: string;
                    userContext: UserContext;
                } & (
                    | { authorizationHeader: string }
                    | { clientId: string; clientSecret?: string }
                ),
            ) => Promise<{ status: "OK" } | ErrorOAuth2>
        )
    tokenPOST:
        | undefined
        | (
            (
                input: {
                    authorizationHeader?: string;
                    body: any;
                    options: APIOptions;
                    userContext: UserContext;
                },
            ) => Promise<TokenInfo | ErrorOAuth2 | GeneralErrorResponse>
        )
    userInfoGET:
        | undefined
        | (
            (
                input: {
                    accessTokenPayload: JSONObject;
                    options: APIOptions;
                    scopes: string[];
                    tenantId: string;
                    user: User;
                    userContext: UserContext;
                },
            ) => Promise<JSONObject | GeneralErrorResponse>
        )