From 78608392208cb73351354cda5678daee232159d8 Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Tue, 28 Apr 2020 14:29:33 +0900 Subject: Add support for hCaptcha --- src/@types/hcaptcha.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/@types/hcaptcha.d.ts (limited to 'src/@types') diff --git a/src/@types/hcaptcha.d.ts b/src/@types/hcaptcha.d.ts new file mode 100644 index 0000000000..ef3d44256c --- /dev/null +++ b/src/@types/hcaptcha.d.ts @@ -0,0 +1,9 @@ +declare module 'hcaptcha' { + export function verify(secret: string, token: string): Promise<{ + success: boolean; + challenge_ts: string; + hostname: string; + credit?: boolean; + 'error-codes'?: unknown[]; + }>; +} -- cgit v1.2.3-freya From f57888eb4baeaa254d06e0169db2934fcef93122 Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Sat, 2 May 2020 10:50:29 +0900 Subject: Update src/@types/hcaptcha.d.ts --- src/@types/hcaptcha.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/@types') diff --git a/src/@types/hcaptcha.d.ts b/src/@types/hcaptcha.d.ts index ef3d44256c..694c8388a9 100644 --- a/src/@types/hcaptcha.d.ts +++ b/src/@types/hcaptcha.d.ts @@ -1,9 +1,11 @@ declare module 'hcaptcha' { - export function verify(secret: string, token: string): Promise<{ + interface IVerifyResponse { success: boolean; challenge_ts: string; hostname: string; credit?: boolean; 'error-codes'?: unknown[]; - }>; + } + + export function verify(secret: string, token: string): Promise; } -- cgit v1.2.3-freya From a3ff1bfda74a3f7b8fdffd90c64530fb28cf1f8f Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Sat, 2 May 2020 10:51:12 +0900 Subject: Update hcaptcha.d.ts --- src/@types/hcaptcha.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/@types') diff --git a/src/@types/hcaptcha.d.ts b/src/@types/hcaptcha.d.ts index 694c8388a9..afed587560 100644 --- a/src/@types/hcaptcha.d.ts +++ b/src/@types/hcaptcha.d.ts @@ -1,11 +1,11 @@ declare module 'hcaptcha' { - interface IVerifyResponse { + interface IVerifyResponse { success: boolean; challenge_ts: string; hostname: string; credit?: boolean; 'error-codes'?: unknown[]; - } + } export function verify(secret: string, token: string): Promise; } -- cgit v1.2.3-freya