-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathHcaptcha.d.ts
95 lines (93 loc) · 2.85 KB
/
Hcaptcha.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import React from "react"
import { StyleProp, ViewStyle } from "react-native";
import { WebViewMessageEvent } from "react-native-webview";
type HcaptchaProps = {
/**
* The callback function that runs after receiving a response, error, or when user cancels.
*/
onMessage?: (event: WebViewMessageEvent) => void;
/**
* The size of the checkbox.
*/
size: 'invisible' | 'normal' | 'compact';
/**
* The hCaptcha siteKey
*/
siteKey: string;
/**
* The webview style
*/
style?: StyleProp<ViewStyle>
/**
* The url domain defined on your hCaptcha. You generally will not need to change this.
*/
url?: string;
/**
* Default language for hCaptcha; overrides phone defaults.
* A complete list of supported languages and their codes can be found [here](https://docs.hcaptcha.com/languages/)
*/
languageCode?: string;
/**
* Whether to show a loading indicator while the hCaptcha web content loads
*/
showLoading?: boolean;
/**
* Allow user to cancel hcaptcha during loading by touch loader overlay
*/
closableLoading?: boolean;
/**
* Color of the ActivityIndicator
*/
loadingIndicatorColor?: string;
/**
* The background color code that will be applied to the main HTML element
*/
backgroundColor?: string;
/**
* The theme can be 'light', 'dark', 'contrast' or a custom theme object (see Enterprise docs)
*/
theme?: 'light' | 'dark' | 'contrast' | Object;
/**
* Hcaptcha execution options (see Enterprise docs)
*/
rqdata?: string;
/**
* Enable / Disable sentry error reporting.
*/
sentry?: boolean;
/**
* The url of api.js
* Default: https://js.hcaptcha.com/1/api.js (Override only if using first-party hosting feature.)
*/
jsSrc?: string;
/**
* Point hCaptcha JS Ajax Requests to alternative API Endpoint.
* Default: https://api.hcaptcha.com (Override only if using first-party hosting feature.)
*/
endpoint?: string;
/**
* Point hCaptcha Bug Reporting Request to alternative API Endpoint.
* Default: https://accounts.hcaptcha.com (Override only if using first-party hosting feature.)
*/
reportapi?: string;
/**
* Points loaded hCaptcha assets to a user defined asset location, used for proxies.
* Default: https://newassets.hcaptcha.com (Override only if using first-party hosting feature.)
*/
assethost?: string;
/**
* Points loaded hCaptcha challenge images to a user defined image location, used for proxies.
* Default: https://imgs.hcaptcha.com (Override only if using first-party hosting feature.)
*/
imghost?: string;
/**
* hCaptcha SDK host identifier. null value means that it will be generated by SDK
*/
host?: string;
/**
* The orientation of the challenge.
* Default: portrait
*/
orientation?: 'portrait' | 'landscape';
}
export default class Hcaptcha extends React.Component<HcaptchaProps> {}