@trustsig/types 1.0.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/README.md +13 -0
- package/package.json +8 -0
- package/src/index.ts +22 -0
- package/tsup.config.ts +2 -0
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @trustsig/types
|
|
2
|
+
|
|
3
|
+
Shared TypeScript interfaces for the TrustSig SDK packages.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @trustsig/types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
This package is internally used by `@trustsig/client`, `@trustsig/server`, and `@trustsig/react`. You typically do not need to install this directly unless you are building custom tooling around the TrustSig ecosystem.
|
package/package.json
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
ADDED