@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 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
+ });
@@ -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 };
@@ -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
@@ -0,0 +1,10 @@
1
+ // src/index.ts
2
+ var TrustSigEnv = /* @__PURE__ */ ((TrustSigEnv2) => {
3
+ TrustSigEnv2["PROD"] = "PROD";
4
+ TrustSigEnv2["DEMO"] = "DEMO";
5
+ TrustSigEnv2["DEV"] = "DEV";
6
+ return TrustSigEnv2;
7
+ })(TrustSigEnv || {});
8
+ export {
9
+ TrustSigEnv
10
+ };
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@trustsig/types",
3
- "version": "1.1.6",
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
@@ -1,2 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
- export default defineConfig({ entry: ['src/index.ts'], format: ['cjs', 'esm'], dts: true, clean: true });