@kya-os/agentshield-nextjs 0.2.4 → 0.2.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.
@@ -12,27 +12,18 @@ export function detect_agent(metadata: JsRequestMetadata): JsDetectionResult;
12
12
  * Get the version of the AgentShield library
13
13
  */
14
14
  export function version(): string;
15
- /**
16
- * Get the version of the AgentShield library
17
- */
18
- export function get_version(): string;
19
- /**
20
- * Get build information
21
- */
22
- export function get_build_info(): string;
23
15
  /**
24
16
  * JavaScript-compatible detection result
25
17
  */
26
18
  export class JsDetectionResult {
27
19
  private constructor();
28
20
  free(): void;
29
- [Symbol.dispose](): void;
30
21
  /**
31
22
  * Whether the request was identified as coming from an agent
32
23
  */
33
24
  is_agent: boolean;
34
25
  /**
35
- * Confidence score (0-100 scale)
26
+ * Confidence score (0.0 to 1.0)
36
27
  */
37
28
  confidence: number;
38
29
  /**
@@ -57,11 +48,10 @@ export class JsDetectionResult {
57
48
  */
58
49
  export class JsRequestMetadata {
59
50
  free(): void;
60
- [Symbol.dispose](): void;
61
51
  /**
62
52
  * Constructor for JsRequestMetadata
63
53
  */
64
- constructor(user_agent: string | null | undefined, ip_address: string | null | undefined, headers: string, timestamp: string, url?: string | null, method?: string | null, client_fingerprint?: string | null);
54
+ constructor(user_agent: string | null | undefined, ip_address: string | null | undefined, headers: string, timestamp: string);
65
55
  /**
66
56
  * Get the user agent
67
57
  */
@@ -78,18 +68,6 @@ export class JsRequestMetadata {
78
68
  * Get the timestamp
79
69
  */
80
70
  readonly timestamp: string;
81
- /**
82
- * Get the URL
83
- */
84
- readonly url: string | undefined;
85
- /**
86
- * Get the method
87
- */
88
- readonly method: string | undefined;
89
- /**
90
- * Get the client fingerprint
91
- */
92
- readonly client_fingerprint: string | undefined;
93
71
  }
94
72
 
95
73
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -106,22 +84,17 @@ export interface InitOutput {
106
84
  readonly jsdetectionresult_risk_level: (a: number, b: number) => void;
107
85
  readonly jsdetectionresult_timestamp: (a: number, b: number) => void;
108
86
  readonly __wbg_jsrequestmetadata_free: (a: number, b: number) => void;
109
- readonly jsrequestmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => number;
87
+ readonly jsrequestmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
110
88
  readonly jsrequestmetadata_user_agent: (a: number, b: number) => void;
111
89
  readonly jsrequestmetadata_ip_address: (a: number, b: number) => void;
112
90
  readonly jsrequestmetadata_headers: (a: number, b: number) => void;
113
91
  readonly jsrequestmetadata_timestamp: (a: number, b: number) => void;
114
- readonly jsrequestmetadata_url: (a: number, b: number) => void;
115
- readonly jsrequestmetadata_method: (a: number, b: number) => void;
116
- readonly jsrequestmetadata_client_fingerprint: (a: number, b: number) => void;
117
92
  readonly init: () => void;
118
93
  readonly detect_agent: (a: number, b: number) => void;
119
- readonly get_version: (a: number) => void;
120
- readonly get_build_info: (a: number) => void;
121
94
  readonly version: (a: number) => void;
122
- readonly __wbindgen_export: (a: number, b: number, c: number) => void;
123
- readonly __wbindgen_export2: (a: number, b: number) => number;
124
- readonly __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
95
+ readonly __wbindgen_export_0: (a: number, b: number, c: number) => void;
96
+ readonly __wbindgen_export_1: (a: number, b: number) => number;
97
+ readonly __wbindgen_export_2: (a: number, b: number, c: number, d: number) => number;
125
98
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
126
99
  readonly __wbindgen_start: () => void;
127
100
  }