sdk package
A library for integrating Friendly Captcha into your website. This SDK allows you to create captcha widgets, respond to their changes, and interact with them programmatically.
Classes
|
Class |
Description |
|---|---|
|
Main entry point for V2 of the Friendly Captcha SDK. This class keeps track of widgets and allows you to create widgets programmatically. Generally there should only be one instance of this SDK in your website. | |
|
This provides a handle for configuring and managing a Risk Intelligence request via an HTML element. This class is only instantiated by the SDK - do not create a handle yourself. | |
|
This provides an API stub that provides the end-user JS API for a widget. This class is only instantiated by the SDK - do not create a handle yourself. |
Interfaces
|
Interface |
Description |
|---|---|
|
Options when creating a widget programmatically. | |
|
A DOM event map for all events that can be dispatched by a widget. | |
|
Payload of the | |
|
Payload of the | |
|
Payload of the | |
|
Payload of the | |
|
Payload of the | |
|
Payload of the | |
|
Payload of the | |
|
Payload of the | |
|
Options when creating a new SDK instance. | |
|
Options for clearing cached Risk Intelligence tokens. | |
|
Error data returned by a failed Risk Intelligence request. | |
|
Data returned by the Risk Intelligence API request. | |
|
Options for configuring a Risk Intelligence request. | |
|
The options object you can pass to the |
Variables
|
Variable |
Description |
|---|---|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
Type Aliases
|
Type Alias |
Description |
|---|---|
|
Which API endpoint to use for the SDK. Typically Advanced usage: Fallback endpoints can be specified by appending them (comma-separated). The SDK first tries the first endpoint, and then goes through the fallback endpoints in a random order if the first one is not reachable. Note that the | |
|
Payloads of any of the events that can be dispatched by a widget. | |
|
Names of any of the events that can be dispatched by a widget. | |
|
Event that gets dispatched when a Risk Intelligence token has been successfully generated. | |
|
Event that gets dispatched when the Risk Intelligence request fails. | |
|
Event that gets dispatched when a Risk Intelligence token expires. | |
|
Event that gets dispatched when the widget is completed. This happens when the user's browser has succesfully passed the captcha challenge. | |
|
Event that gets dispatched when the widget enters a new state. | |
|
Event that gets dispatched when something goes wrong in the widget. | |
|
Event that gets dispatched when the widget expires. This happens when the user takes too long to submit the captcha after it is solved. | |
|
Event that gets dispatched when something goes wrong in the widget. | |
|
Error codes that can be returned by the Risk Intelligence request. See WidgetErrorCode for the list of possible error codes. | |
|
Response values used in the hidden input field when no valid solution is present, these tell you something about the state of the widget. | |
|
The start mode of the widget. * | |
|
Error codes that can be returned by the widget. * In all cases it's the best practice to enable the "submit" button when the widget errors, so that the user can still perform the action despite not having solved the captcha. | |
|
The mode of the widget. * | |
|
What caused the widget to reset. * | |
|
The state the widget is in. See the widget lifecycle docs for more information. |