Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

@supertokens-plugins/captcha-nodejs

Public root exports for @supertokens-plugins/captcha-nodejs 0.2.1.

Package version: 0.2.1

Generated from the packed release’s root declaration, dist/index.d.ts. Only exports reachable from that root are listed. See the immutable release source.

Public root exports

Export Kind
default Constant
init Constant
PLUGIN_ID Constant
SuperTokensPluginCaptchaConfig Type

default

Published from the emitted _default declaration.

Root export:

export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };

Resolved declaration:

import * as supertokens_node_types from 'supertokens-node/types';
declare const _default: {
    init: (config: SuperTokensPluginCaptchaConfig) => supertokens_node_types.SuperTokensPlugin;
};

init

Root export:

export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };

Resolved declaration:

import { SuperTokensPlugin } from 'supertokens-node/types';
declare const init: (config: SuperTokensPluginCaptchaConfig) => SuperTokensPlugin;

PLUGIN_ID

Root export:

export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };

Resolved declaration:

declare const PLUGIN_ID = "supertokens-plugin-captcha";

SuperTokensPluginCaptchaConfig

Root export:

export { PLUGIN_ID, type SuperTokensPluginCaptchaConfig, _default as default, init };

Resolved declaration:

type SuperTokensPluginCaptchaConfig = {
    type: "reCAPTCHAv3" | "reCAPTCHAv2" | "turnstile";
    captcha: {
        secretKey: string;
    };
    shouldValidate?: ShouldValidate;
};

Required signature types

These declarations are not additional package-root exports. They are included because the public signatures above depend on them.

ShouldValidate

import { APIInterface } from 'supertokens-node/recipe/emailpassword/types';
import { APIInterface as APIInterface$1 } from 'supertokens-node/recipe/passwordless/types';
interface ShouldValidate {
    (api: "signInPOST", input: Parameters<NonNullable<APIInterface["signInPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "signUpPOST", input: Parameters<NonNullable<APIInterface["signUpPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "passwordResetPOST", input: Parameters<NonNullable<APIInterface["passwordResetPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "generatePasswordResetTokenPOST", input: Parameters<NonNullable<APIInterface["generatePasswordResetTokenPOST"]>>[0]): boolean | Promise<boolean>;
    (api: "consumeCodePOST", input: Parameters<NonNullable<APIInterface$1["consumeCodePOST"]>>[0]): boolean | Promise<boolean>;
    (api: "createCodePOST", input: Parameters<NonNullable<APIInterface$1["createCodePOST"]>>[0]): boolean | Promise<boolean>;
    (api: "consumeCodePOST", input: Parameters<NonNullable<APIInterface$1["consumeCodePOST"]>>[0]): boolean | Promise<boolean>;
}

API reference

API schema and response details