4.1.3 • Published 2 years ago

@types/geetest v4.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/geetest

Summary

This package contains type definitions for geetest (https://github.com/GeeTeam/gt-node-sdk#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geetest.

index.d.ts

// Type definitions for geetest 4.1
// Project: https://github.com/GeeTeam/gt-node-sdk#readme
// Definitions by: York Yao <https://github.com/plantain-00>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

interface Options {
    geetest_id: string;
    geetest_key: string;
    protocol?: string | undefined;
    api_server?: string | undefined;
}

type Success = 0 | 1;

interface Data {
    geetest_id: string;
    gt: string;
    challenge: string;
    success: Success;
    new_captcha: string;
}

interface Result {
    challenge: string;
    validate: string;
    seccode: string;
}

declare class Geetest {
    constructor(options: Options);
    register(callback: (error: Error, data: Data) => void): void;
    register(): Promise<Data>;
    validate(result: Result, callback: (error: Error, success: Success) => void): void;
    validate(result: Result): Promise<Success>;
}

export = Geetest;

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:02:01 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by York Yao.

4.1.3

2 years ago

4.1.2

2 years ago

4.1.1

4 years ago

4.1.0

7 years ago