greip.js 2.4.4 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +12 -0
- package/lib/types.d.ts +19 -0
- package/lib/util.d.ts +8 -0
- package/package.json +3 -3
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Options } from './types';
|
|
2
|
+
export declare const GeoIP: (options: Options) => Promise<unknown>;
|
|
3
|
+
export declare const Lookup: (options: Options) => Promise<unknown>;
|
|
4
|
+
export declare const Threats: (options: Options) => Promise<unknown>;
|
|
5
|
+
export declare const BulkLookup: (options: Options) => Promise<unknown>;
|
|
6
|
+
export declare const Country: (options: Options) => Promise<unknown>;
|
|
7
|
+
export declare const BadWord: (options: Options) => Promise<unknown>;
|
|
8
|
+
export declare const ASN: (options: Options) => Promise<unknown>;
|
|
9
|
+
export declare const EmailValidation: (options: Options) => Promise<unknown>;
|
|
10
|
+
export declare const PaymentFraud: (options: Options) => Promise<unknown>;
|
|
11
|
+
export declare const PhoneValidation: (options: Options) => Promise<unknown>;
|
|
12
|
+
export declare const IBANValidation: (options: Options) => Promise<unknown>;
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Options {
|
|
2
|
+
ips?: string[];
|
|
3
|
+
ip?: string;
|
|
4
|
+
source?: string;
|
|
5
|
+
key?: string;
|
|
6
|
+
params?: string[];
|
|
7
|
+
format?: string;
|
|
8
|
+
lang?: string;
|
|
9
|
+
mode?: string;
|
|
10
|
+
countryCode?: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
asn?: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
phone?: string;
|
|
15
|
+
iban?: string;
|
|
16
|
+
data?: {
|
|
17
|
+
[key: string]: string | number | string[] | object | boolean;
|
|
18
|
+
};
|
|
19
|
+
}
|
package/lib/util.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const baseURL = "https://greipapi.com/";
|
|
2
|
+
export declare const availableGeoIPParams: string[];
|
|
3
|
+
export declare const availableLanguages: string[];
|
|
4
|
+
export declare const availableFormats: string[];
|
|
5
|
+
export declare const availableCountryParams: string[];
|
|
6
|
+
export declare const serialize: (obj: any) => string;
|
|
7
|
+
export declare const makeHttpRquest: (endpoint: string, options: any, callback: (data: object) => void) => void;
|
|
8
|
+
export declare const makePostRquest: (endpoint: string, options: any, callback: (data: object) => void) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "greip.js",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.6",
|
|
4
4
|
"description": "The official Javascript library of Greip.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Greip",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://greip.io"
|
|
9
9
|
},
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
|
-
"main": "lib/index.
|
|
11
|
+
"main": "lib/index.js",
|
|
12
12
|
"types": "lib/index.d.ts",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"ip",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"test": "jest --config jestconfig.json",
|
|
38
|
-
"build": "tsc
|
|
38
|
+
"build": "tsc && webpack",
|
|
39
39
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
40
40
|
"lint": "tslint -p tsconfig.json",
|
|
41
41
|
"prepare": "npm run build",
|