@trustsig/types 1.1.6 → 1.2.0
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/dist/index.cjs +35 -0
- package/dist/index.d.cts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +10 -0
- package/package.json +5 -2
- package/src/index.ts +0 -22
- package/tsup.config.ts +0 -2
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
TrustSigEnv: () => TrustSigEnv
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
var TrustSigEnv = /* @__PURE__ */ ((TrustSigEnv2) => {
|
|
27
|
+
TrustSigEnv2["PROD"] = "PROD";
|
|
28
|
+
TrustSigEnv2["DEMO"] = "DEMO";
|
|
29
|
+
TrustSigEnv2["DEV"] = "DEV";
|
|
30
|
+
return TrustSigEnv2;
|
|
31
|
+
})(TrustSigEnv || {});
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
TrustSigEnv
|
|
35
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare enum TrustSigEnv {
|
|
2
|
+
PROD = "PROD",
|
|
3
|
+
DEMO = "DEMO",
|
|
4
|
+
DEV = "DEV"
|
|
5
|
+
}
|
|
6
|
+
interface TrustSigOptions {
|
|
7
|
+
secretKey: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
env?: TrustSigEnv;
|
|
10
|
+
}
|
|
11
|
+
interface BotAnalysisResponse {
|
|
12
|
+
is_bot: boolean;
|
|
13
|
+
score: number;
|
|
14
|
+
action: string;
|
|
15
|
+
request_id: string;
|
|
16
|
+
factors: string[];
|
|
17
|
+
evidence: Record<string, any>;
|
|
18
|
+
site_key: string;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface Window {
|
|
22
|
+
TrustSig: {
|
|
23
|
+
getResponse: () => Promise<string | null>;
|
|
24
|
+
setCustomData: (data: Record<string, any>) => void;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { type BotAnalysisResponse, TrustSigEnv, type TrustSigOptions };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare enum TrustSigEnv {
|
|
2
|
+
PROD = "PROD",
|
|
3
|
+
DEMO = "DEMO",
|
|
4
|
+
DEV = "DEV"
|
|
5
|
+
}
|
|
6
|
+
interface TrustSigOptions {
|
|
7
|
+
secretKey: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
env?: TrustSigEnv;
|
|
10
|
+
}
|
|
11
|
+
interface BotAnalysisResponse {
|
|
12
|
+
is_bot: boolean;
|
|
13
|
+
score: number;
|
|
14
|
+
action: string;
|
|
15
|
+
request_id: string;
|
|
16
|
+
factors: string[];
|
|
17
|
+
evidence: Record<string, any>;
|
|
18
|
+
site_key: string;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface Window {
|
|
22
|
+
TrustSig: {
|
|
23
|
+
getResponse: () => Promise<string | null>;
|
|
24
|
+
setCustomData: (data: Record<string, any>) => void;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { type BotAnalysisResponse, TrustSigEnv, type TrustSigOptions };
|
package/dist/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustsig/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
13
|
"types": "./dist/index.d.ts",
|
|
@@ -16,4 +19,4 @@
|
|
|
16
19
|
"scripts": {
|
|
17
20
|
"build": "tsup"
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|
package/src/index.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface TrustSigOptions {
|
|
2
|
-
secretKey: string;
|
|
3
|
-
endpoint?: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface BotAnalysisResponse {
|
|
7
|
-
is_bot: boolean;
|
|
8
|
-
score: number;
|
|
9
|
-
action: string;
|
|
10
|
-
request_id: string;
|
|
11
|
-
factors: string[];
|
|
12
|
-
evidence: Record<string, any>;
|
|
13
|
-
site_key: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare global {
|
|
17
|
-
interface Window {
|
|
18
|
-
TrustSig: {
|
|
19
|
-
getResponse: () => Promise<string | null>;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
package/tsup.config.ts
DELETED