@prosopo/types 3.6.4 → 4.3.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.
Files changed (145) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +48 -42
  2. package/.turbo/turbo-build$colon$tsc.log +23 -0
  3. package/.turbo/turbo-build.log +53 -43
  4. package/.turbo/turbo-typecheck.log +1 -1
  5. package/CHANGELOG.md +566 -0
  6. package/dist/api/api.d.ts +26 -8
  7. package/dist/api/api.d.ts.map +1 -1
  8. package/dist/api/api.js.map +1 -0
  9. package/dist/api/index.js.map +1 -0
  10. package/dist/api/ipapi.d.ts +2 -1
  11. package/dist/api/ipapi.d.ts.map +1 -1
  12. package/dist/api/ipapi.js.map +1 -0
  13. package/dist/api/params.d.ts +26 -1
  14. package/dist/api/params.d.ts.map +1 -1
  15. package/dist/api/params.js +25 -0
  16. package/dist/api/params.js.map +1 -0
  17. package/dist/cjs/api/params.cjs +25 -0
  18. package/dist/cjs/client/captchaType/captchaType.cjs +16 -1
  19. package/dist/cjs/client/index.cjs +17 -0
  20. package/dist/cjs/client/settings.cjs +88 -6
  21. package/dist/cjs/client/testSiteKeys.cjs +22 -0
  22. package/dist/cjs/config/config.cjs +25 -19
  23. package/dist/cjs/config/index.cjs +6 -2
  24. package/dist/cjs/config/mode.cjs +15 -0
  25. package/dist/cjs/config/timeouts.cjs +6 -0
  26. package/dist/cjs/decisionMachine/index.cjs +85 -0
  27. package/dist/cjs/index.cjs +81 -2
  28. package/dist/cjs/procaptcha/behavioral.cjs +1 -0
  29. package/dist/cjs/procaptcha/index.cjs +1 -0
  30. package/dist/cjs/provider/api.cjs +263 -9
  31. package/dist/cjs/provider/database.cjs +253 -0
  32. package/dist/cjs/provider/index.cjs +43 -0
  33. package/dist/cjs/provider/reasons.cjs +45 -0
  34. package/dist/cjs/provider/scheduler.cjs +1 -0
  35. package/dist/client/captchaType/captchaType.d.ts +3 -2
  36. package/dist/client/captchaType/captchaType.d.ts.map +1 -1
  37. package/dist/client/captchaType/captchaType.js +17 -2
  38. package/dist/client/captchaType/captchaType.js.map +1 -0
  39. package/dist/client/captchaType/captchaTypeSpec.js.map +1 -0
  40. package/dist/client/index.d.ts +1 -0
  41. package/dist/client/index.d.ts.map +1 -1
  42. package/dist/client/index.js +20 -3
  43. package/dist/client/index.js.map +1 -0
  44. package/dist/client/settings.d.ts +278 -2
  45. package/dist/client/settings.d.ts.map +1 -1
  46. package/dist/client/settings.js +89 -7
  47. package/dist/client/settings.js.map +1 -0
  48. package/dist/client/testSiteKeys.d.ts +8 -0
  49. package/dist/client/testSiteKeys.d.ts.map +1 -0
  50. package/dist/client/testSiteKeys.js +22 -0
  51. package/dist/client/testSiteKeys.js.map +1 -0
  52. package/dist/client/user.js.map +1 -0
  53. package/dist/config/config.d.ts +371 -30
  54. package/dist/config/config.d.ts.map +1 -1
  55. package/dist/config/config.js +25 -19
  56. package/dist/config/config.js.map +1 -0
  57. package/dist/config/enumMap.js +6 -0
  58. package/dist/config/enumMap.js.map +1 -0
  59. package/dist/config/frictionless.js.map +1 -0
  60. package/dist/config/index.d.ts +1 -0
  61. package/dist/config/index.d.ts.map +1 -1
  62. package/dist/config/index.js +6 -2
  63. package/dist/config/index.js.map +1 -0
  64. package/dist/config/mode.d.ts +8 -0
  65. package/dist/config/mode.d.ts.map +1 -0
  66. package/dist/config/mode.js +15 -0
  67. package/dist/config/mode.js.map +1 -0
  68. package/dist/config/network.js.map +1 -0
  69. package/dist/config/timeouts.d.ts +3 -0
  70. package/dist/config/timeouts.d.ts.map +1 -1
  71. package/dist/config/timeouts.js +7 -1
  72. package/dist/config/timeouts.js.map +1 -0
  73. package/dist/datasets/assets.js.map +1 -0
  74. package/dist/datasets/captcha.d.ts +2 -2
  75. package/dist/datasets/captcha.d.ts.map +1 -1
  76. package/dist/datasets/captcha.js.map +1 -0
  77. package/dist/datasets/dataset.js.map +1 -0
  78. package/dist/datasets/index.js.map +1 -0
  79. package/dist/datasets/merkle.js.map +1 -0
  80. package/dist/decisionMachine/index.d.ts +174 -0
  81. package/dist/decisionMachine/index.d.ts.map +1 -0
  82. package/dist/decisionMachine/index.js +85 -0
  83. package/dist/decisionMachine/index.js.map +1 -0
  84. package/dist/index.d.ts +1 -0
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +85 -6
  87. package/dist/index.js.map +1 -0
  88. package/dist/keyring/index.js.map +1 -0
  89. package/dist/keyring/keyring/types.d.ts +8 -1
  90. package/dist/keyring/keyring/types.d.ts.map +1 -1
  91. package/dist/keyring/keyring/types.js.map +1 -0
  92. package/dist/keyring/pair/types.js.map +1 -0
  93. package/dist/procaptcha/api.d.ts +3 -2
  94. package/dist/procaptcha/api.d.ts.map +1 -1
  95. package/dist/procaptcha/api.js.map +1 -0
  96. package/dist/procaptcha/behavioral.d.ts +49 -0
  97. package/dist/procaptcha/behavioral.d.ts.map +1 -0
  98. package/dist/procaptcha/behavioral.js +1 -0
  99. package/dist/procaptcha/behavioral.js.map +1 -0
  100. package/dist/procaptcha/client.js.map +1 -0
  101. package/dist/procaptcha/collector.js.map +1 -0
  102. package/dist/procaptcha/index.d.ts +1 -0
  103. package/dist/procaptcha/index.d.ts.map +1 -1
  104. package/dist/procaptcha/index.js +1 -0
  105. package/dist/procaptcha/index.js.map +1 -0
  106. package/dist/procaptcha/manager.js.map +1 -0
  107. package/dist/procaptcha/props.d.ts +27 -0
  108. package/dist/procaptcha/props.d.ts.map +1 -1
  109. package/dist/procaptcha/props.js.map +1 -0
  110. package/dist/procaptcha/token.js.map +1 -0
  111. package/dist/procaptcha/utils.js.map +1 -0
  112. package/dist/procaptcha-bundle/index.d.ts +0 -3
  113. package/dist/procaptcha-bundle/index.d.ts.map +1 -1
  114. package/dist/procaptcha-bundle/index.js.map +1 -0
  115. package/dist/procaptcha-frictionless/index.js.map +1 -0
  116. package/dist/procaptcha-frictionless/props.d.ts +23 -0
  117. package/dist/procaptcha-frictionless/props.d.ts.map +1 -1
  118. package/dist/procaptcha-frictionless/props.js.map +1 -0
  119. package/dist/provider/accounts.js.map +1 -0
  120. package/dist/provider/api.d.ts +1663 -116
  121. package/dist/provider/api.d.ts.map +1 -1
  122. package/dist/provider/api.js +263 -9
  123. package/dist/provider/api.js.map +1 -0
  124. package/dist/provider/database.d.ts +1376 -0
  125. package/dist/provider/database.d.ts.map +1 -0
  126. package/dist/provider/database.js +253 -0
  127. package/dist/provider/database.js.map +1 -0
  128. package/dist/provider/detection.d.ts +21 -0
  129. package/dist/provider/detection.d.ts.map +1 -1
  130. package/dist/provider/detection.js.map +1 -0
  131. package/dist/provider/index.d.ts +2 -0
  132. package/dist/provider/index.d.ts.map +1 -1
  133. package/dist/provider/index.js +44 -1
  134. package/dist/provider/index.js.map +1 -0
  135. package/dist/provider/reasons.d.ts +40 -0
  136. package/dist/provider/reasons.d.ts.map +1 -0
  137. package/dist/provider/reasons.js +45 -0
  138. package/dist/provider/reasons.js.map +1 -0
  139. package/dist/provider/scheduler.d.ts +2 -1
  140. package/dist/provider/scheduler.d.ts.map +1 -1
  141. package/dist/provider/scheduler.js +1 -0
  142. package/dist/provider/scheduler.js.map +1 -0
  143. package/package.json +9 -7
  144. package/vite.cjs.config.ts +1 -1
  145. package/vite.esm.config.ts +1 -1
@@ -0,0 +1,1376 @@
1
+ import { type ZodType, type ZodTypeDef, type infer as zInfer } from "zod";
2
+ import type { IPInfoResponse } from "../api/ipapi.js";
3
+ import { CaptchaType } from "../client/index.js";
4
+ import type { ContextType } from "../client/settings.js";
5
+ import { ModeEnum } from "../config/mode.js";
6
+ import { type CaptchaSolution, CaptchaStatus, type PoWCaptchaUser, type PoWChallengeId } from "../datasets/index.js";
7
+ import type { DecisionMachineLanguage, DecisionMachineRuntime, DecisionMachineScope } from "../decisionMachine/index.js";
8
+ import type { PuzzleEvent, RequestHeaders } from "./api.js";
9
+ import type { SimdReadings } from "./detection.js";
10
+ import type { FrictionlessReason, ResultReason } from "./reasons.js";
11
+ export interface BrowserInfo {
12
+ name: string;
13
+ version?: string;
14
+ major?: string;
15
+ type?: string;
16
+ }
17
+ export interface CPUInfo {
18
+ architecture?: string;
19
+ }
20
+ export interface DeviceInfo {
21
+ vendor?: string;
22
+ model?: string;
23
+ type?: string;
24
+ }
25
+ export interface EngineInfo {
26
+ name?: string;
27
+ version?: string;
28
+ }
29
+ export interface OSInfo {
30
+ name: string;
31
+ version?: string;
32
+ }
33
+ export interface UserAgentInfo {
34
+ ua: string;
35
+ browser: BrowserInfo;
36
+ cpu: CPUInfo;
37
+ device: DeviceInfo;
38
+ engine: EngineInfo;
39
+ os: OSInfo;
40
+ }
41
+ export declare enum IpAddressType {
42
+ v4 = "v4",
43
+ v6 = "v6"
44
+ }
45
+ export interface CompositeIpAddress {
46
+ lower: number | bigint;
47
+ upper?: number | bigint;
48
+ type: IpAddressType;
49
+ }
50
+ export declare const CompositeIpAddressSchema: import("zod").ZodObject<{
51
+ lower: import("zod").ZodBigInt;
52
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
53
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
54
+ }, "strip", import("zod").ZodTypeAny, {
55
+ type: IpAddressType;
56
+ lower: bigint;
57
+ upper?: bigint | undefined;
58
+ }, {
59
+ type: IpAddressType;
60
+ lower: bigint;
61
+ upper?: bigint | undefined;
62
+ }>;
63
+ export type MongooseCompositeIpAddress = {
64
+ lower: {
65
+ $numberDecimal: string;
66
+ };
67
+ upper?: {
68
+ $numberDecimal: string;
69
+ };
70
+ type: IpAddressType;
71
+ };
72
+ export declare const parseMongooseCompositeIpAddress: (ip: MongooseCompositeIpAddress) => CompositeIpAddress;
73
+ export interface BehavioralDataPacked {
74
+ c1: unknown[];
75
+ c2: unknown[];
76
+ c3: unknown[];
77
+ d: string;
78
+ }
79
+ export interface StoredCaptchaMetadata {
80
+ email?: string;
81
+ }
82
+ export interface ClientMetaData {
83
+ hp?: string;
84
+ }
85
+ export declare enum CaptchaLabel {
86
+ human = "human",
87
+ bot = "bot",
88
+ suspicious = "suspicious",
89
+ unknown = "unknown"
90
+ }
91
+ export declare const CaptchaLabelSchema: import("zod").ZodNativeEnum<typeof CaptchaLabel>;
92
+ export interface StoredCaptcha {
93
+ result: {
94
+ status: CaptchaStatus;
95
+ reason?: ResultReason;
96
+ error?: string;
97
+ };
98
+ requestedAtTimestamp: Date;
99
+ ipAddress: CompositeIpAddress;
100
+ providedIp?: CompositeIpAddress;
101
+ metadata?: StoredCaptchaMetadata;
102
+ clientMetaData?: ClientMetaData;
103
+ headers: RequestHeaders;
104
+ ja4: string;
105
+ userSubmitted: boolean;
106
+ serverChecked: boolean;
107
+ ipInfo?: IPInfoResponse;
108
+ parsedUserAgentInfo?: UserAgentInfo;
109
+ storedAtTimestamp?: Date;
110
+ lastUpdatedTimestamp?: Date;
111
+ pendingStage?: boolean;
112
+ sessionId?: string;
113
+ coords?: [number, number][][];
114
+ mouseEvents?: Array<Record<string, unknown>>;
115
+ touchEvents?: Array<Record<string, unknown>>;
116
+ clickEvents?: Array<Record<string, unknown>>;
117
+ deviceCapability?: string;
118
+ behavioralDataPacked?: BehavioralDataPacked;
119
+ label?: CaptchaLabel;
120
+ labelReason?: string;
121
+ labelledBy?: string;
122
+ labelledAt?: Date;
123
+ }
124
+ export interface UserCommitment extends StoredCaptcha {
125
+ userAccount: string;
126
+ dappAccount: string;
127
+ datasetId: string;
128
+ providerAccount: string;
129
+ id: string;
130
+ pending: boolean;
131
+ userSignature: string;
132
+ salt: string;
133
+ requestHash: string;
134
+ threshold: number;
135
+ deadlineTimestamp: Date;
136
+ }
137
+ export declare const StoredCaptchaMetadataSchema: import("zod").ZodObject<{
138
+ email: import("zod").ZodOptional<import("zod").ZodString>;
139
+ }, "strip", import("zod").ZodTypeAny, {
140
+ email?: string | undefined;
141
+ }, {
142
+ email?: string | undefined;
143
+ }>;
144
+ export declare const ClientMetaDataDbSchema: import("zod").ZodObject<{
145
+ hp: import("zod").ZodOptional<import("zod").ZodString>;
146
+ }, "strip", import("zod").ZodTypeAny, {
147
+ hp?: string | undefined;
148
+ }, {
149
+ hp?: string | undefined;
150
+ }>;
151
+ export declare const UserCommitmentSchema: import("zod").ZodObject<{
152
+ userAccount: import("zod").ZodString;
153
+ dappAccount: import("zod").ZodString;
154
+ datasetId: import("zod").ZodString;
155
+ providerAccount: import("zod").ZodString;
156
+ id: import("zod").ZodString;
157
+ result: import("zod").ZodObject<{
158
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
159
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
160
+ error: import("zod").ZodOptional<import("zod").ZodString>;
161
+ }, "strip", import("zod").ZodTypeAny, {
162
+ status: CaptchaStatus;
163
+ error?: string | undefined;
164
+ reason?: ResultReason | undefined;
165
+ }, {
166
+ status: CaptchaStatus;
167
+ error?: string | undefined;
168
+ reason?: string | undefined;
169
+ }>;
170
+ userSignature: import("zod").ZodString;
171
+ ipAddress: import("zod").ZodObject<{
172
+ lower: import("zod").ZodBigInt;
173
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
174
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
175
+ }, "strip", import("zod").ZodTypeAny, {
176
+ type: IpAddressType;
177
+ lower: bigint;
178
+ upper?: bigint | undefined;
179
+ }, {
180
+ type: IpAddressType;
181
+ lower: bigint;
182
+ upper?: bigint | undefined;
183
+ }>;
184
+ providedIp: import("zod").ZodOptional<import("zod").ZodObject<{
185
+ lower: import("zod").ZodBigInt;
186
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
187
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
188
+ }, "strip", import("zod").ZodTypeAny, {
189
+ type: IpAddressType;
190
+ lower: bigint;
191
+ upper?: bigint | undefined;
192
+ }, {
193
+ type: IpAddressType;
194
+ lower: bigint;
195
+ upper?: bigint | undefined;
196
+ }>>;
197
+ metadata: import("zod").ZodOptional<import("zod").ZodObject<{
198
+ email: import("zod").ZodOptional<import("zod").ZodString>;
199
+ }, "strip", import("zod").ZodTypeAny, {
200
+ email?: string | undefined;
201
+ }, {
202
+ email?: string | undefined;
203
+ }>>;
204
+ clientMetaData: import("zod").ZodOptional<import("zod").ZodObject<{
205
+ hp: import("zod").ZodOptional<import("zod").ZodString>;
206
+ }, "strip", import("zod").ZodTypeAny, {
207
+ hp?: string | undefined;
208
+ }, {
209
+ hp?: string | undefined;
210
+ }>>;
211
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
212
+ ja4: import("zod").ZodString;
213
+ userSubmitted: import("zod").ZodBoolean;
214
+ serverChecked: import("zod").ZodBoolean;
215
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
216
+ requestedAtTimestamp: import("zod").ZodDate;
217
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
218
+ pendingStage: import("zod").ZodOptional<import("zod").ZodBoolean>;
219
+ sessionId: import("zod").ZodOptional<import("zod").ZodString>;
220
+ coords: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodTuple<[import("zod").ZodNumber, import("zod").ZodNumber], null>, "many">, "many">>;
221
+ pending: import("zod").ZodBoolean;
222
+ salt: import("zod").ZodString;
223
+ requestHash: import("zod").ZodString;
224
+ deadlineTimestamp: import("zod").ZodDate;
225
+ threshold: import("zod").ZodNumber;
226
+ deviceCapability: import("zod").ZodOptional<import("zod").ZodString>;
227
+ behavioralDataPacked: import("zod").ZodOptional<import("zod").ZodObject<{
228
+ c1: import("zod").ZodArray<import("zod").ZodAny, "many">;
229
+ c2: import("zod").ZodArray<import("zod").ZodAny, "many">;
230
+ c3: import("zod").ZodArray<import("zod").ZodAny, "many">;
231
+ d: import("zod").ZodString;
232
+ }, "strip", import("zod").ZodTypeAny, {
233
+ c1: any[];
234
+ c2: any[];
235
+ c3: any[];
236
+ d: string;
237
+ }, {
238
+ c1: any[];
239
+ c2: any[];
240
+ c3: any[];
241
+ d: string;
242
+ }>>;
243
+ label: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaLabel>>;
244
+ labelReason: import("zod").ZodOptional<import("zod").ZodString>;
245
+ labelledBy: import("zod").ZodOptional<import("zod").ZodString>;
246
+ labelledAt: import("zod").ZodOptional<import("zod").ZodDate>;
247
+ }, "strip", import("zod").ZodTypeAny, {
248
+ threshold: number;
249
+ salt: string;
250
+ userSubmitted: boolean;
251
+ serverChecked: boolean;
252
+ datasetId: string;
253
+ requestHash: string;
254
+ userAccount: string;
255
+ pending: boolean;
256
+ dappAccount: string;
257
+ providerAccount: string;
258
+ id: string;
259
+ result: {
260
+ status: CaptchaStatus;
261
+ error?: string | undefined;
262
+ reason?: ResultReason | undefined;
263
+ };
264
+ userSignature: string;
265
+ ipAddress: {
266
+ type: IpAddressType;
267
+ lower: bigint;
268
+ upper?: bigint | undefined;
269
+ };
270
+ headers: {} & {
271
+ [k: string]: string;
272
+ };
273
+ ja4: string;
274
+ requestedAtTimestamp: Date;
275
+ deadlineTimestamp: Date;
276
+ label?: CaptchaLabel | undefined;
277
+ sessionId?: string | undefined;
278
+ clientMetaData?: {
279
+ hp?: string | undefined;
280
+ } | undefined;
281
+ providedIp?: {
282
+ type: IpAddressType;
283
+ lower: bigint;
284
+ upper?: bigint | undefined;
285
+ } | undefined;
286
+ metadata?: {
287
+ email?: string | undefined;
288
+ } | undefined;
289
+ storedAtTimestamp?: Date | undefined;
290
+ lastUpdatedTimestamp?: Date | undefined;
291
+ pendingStage?: boolean | undefined;
292
+ coords?: [number, number][][] | undefined;
293
+ deviceCapability?: string | undefined;
294
+ behavioralDataPacked?: {
295
+ c1: any[];
296
+ c2: any[];
297
+ c3: any[];
298
+ d: string;
299
+ } | undefined;
300
+ labelReason?: string | undefined;
301
+ labelledBy?: string | undefined;
302
+ labelledAt?: Date | undefined;
303
+ }, {
304
+ threshold: number;
305
+ salt: string;
306
+ userSubmitted: boolean;
307
+ serverChecked: boolean;
308
+ datasetId: string;
309
+ requestHash: string;
310
+ userAccount: string;
311
+ pending: boolean;
312
+ dappAccount: string;
313
+ providerAccount: string;
314
+ id: string;
315
+ result: {
316
+ status: CaptchaStatus;
317
+ error?: string | undefined;
318
+ reason?: string | undefined;
319
+ };
320
+ userSignature: string;
321
+ ipAddress: {
322
+ type: IpAddressType;
323
+ lower: bigint;
324
+ upper?: bigint | undefined;
325
+ };
326
+ headers: {} & {
327
+ [k: string]: string;
328
+ };
329
+ ja4: string;
330
+ requestedAtTimestamp: Date;
331
+ deadlineTimestamp: Date;
332
+ label?: CaptchaLabel | undefined;
333
+ sessionId?: string | undefined;
334
+ clientMetaData?: {
335
+ hp?: string | undefined;
336
+ } | undefined;
337
+ providedIp?: {
338
+ type: IpAddressType;
339
+ lower: bigint;
340
+ upper?: bigint | undefined;
341
+ } | undefined;
342
+ metadata?: {
343
+ email?: string | undefined;
344
+ } | undefined;
345
+ storedAtTimestamp?: Date | undefined;
346
+ lastUpdatedTimestamp?: Date | undefined;
347
+ pendingStage?: boolean | undefined;
348
+ coords?: [number, number][][] | undefined;
349
+ deviceCapability?: string | undefined;
350
+ behavioralDataPacked?: {
351
+ c1: any[];
352
+ c2: any[];
353
+ c3: any[];
354
+ d: string;
355
+ } | undefined;
356
+ labelReason?: string | undefined;
357
+ labelledBy?: string | undefined;
358
+ labelledAt?: Date | undefined;
359
+ }>;
360
+ export declare const ScoreComponentsSchema: import("zod").ZodObject<{
361
+ baseScore: import("zod").ZodNumber;
362
+ lScore: import("zod").ZodOptional<import("zod").ZodNumber>;
363
+ timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
364
+ accessPolicy: import("zod").ZodOptional<import("zod").ZodNumber>;
365
+ unverifiedHost: import("zod").ZodOptional<import("zod").ZodNumber>;
366
+ webView: import("zod").ZodOptional<import("zod").ZodNumber>;
367
+ triggeredDetectors: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
368
+ }, "strip", import("zod").ZodTypeAny, {
369
+ baseScore: number;
370
+ lScore?: number | undefined;
371
+ timeout?: number | undefined;
372
+ accessPolicy?: number | undefined;
373
+ unverifiedHost?: number | undefined;
374
+ webView?: number | undefined;
375
+ triggeredDetectors?: number[] | undefined;
376
+ }, {
377
+ baseScore: number;
378
+ lScore?: number | undefined;
379
+ timeout?: number | undefined;
380
+ accessPolicy?: number | undefined;
381
+ unverifiedHost?: number | undefined;
382
+ webView?: number | undefined;
383
+ triggeredDetectors?: number[] | undefined;
384
+ }>;
385
+ export declare const SimdReadingsSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
386
+ supported: import("zod").ZodLiteral<false>;
387
+ reason: import("zod").ZodString;
388
+ }, "strip", import("zod").ZodTypeAny, {
389
+ reason: string;
390
+ supported: false;
391
+ }, {
392
+ reason: string;
393
+ supported: false;
394
+ }>, import("zod").ZodObject<{
395
+ supported: import("zod").ZodLiteral<true>;
396
+ schema: import("zod").ZodNumber;
397
+ timerResolutionMs: import("zod").ZodNumber;
398
+ runsPerOp: import("zod").ZodNumber;
399
+ durationMs: import("zod").ZodNumber;
400
+ ops: import("zod").ZodArray<import("zod").ZodObject<{
401
+ name: import("zod").ZodString;
402
+ category: import("zod").ZodNativeEnum<{
403
+ readonly FP: "FP";
404
+ readonly INT: "INT";
405
+ readonly BIT: "BIT";
406
+ readonly PERM: "PERM";
407
+ }>;
408
+ bestNs: import("zod").ZodNumber;
409
+ medianNs: import("zod").ZodNumber;
410
+ iters: import("zod").ZodNumber;
411
+ resultLane: import("zod").ZodNumber;
412
+ }, "strip", import("zod").ZodTypeAny, {
413
+ name: string;
414
+ category: "FP" | "INT" | "BIT" | "PERM";
415
+ bestNs: number;
416
+ medianNs: number;
417
+ iters: number;
418
+ resultLane: number;
419
+ }, {
420
+ name: string;
421
+ category: "FP" | "INT" | "BIT" | "PERM";
422
+ bestNs: number;
423
+ medianNs: number;
424
+ iters: number;
425
+ resultLane: number;
426
+ }>, "many">;
427
+ }, "strip", import("zod").ZodTypeAny, {
428
+ supported: true;
429
+ schema: number;
430
+ timerResolutionMs: number;
431
+ runsPerOp: number;
432
+ durationMs: number;
433
+ ops: {
434
+ name: string;
435
+ category: "FP" | "INT" | "BIT" | "PERM";
436
+ bestNs: number;
437
+ medianNs: number;
438
+ iters: number;
439
+ resultLane: number;
440
+ }[];
441
+ }, {
442
+ supported: true;
443
+ schema: number;
444
+ timerResolutionMs: number;
445
+ runsPerOp: number;
446
+ durationMs: number;
447
+ ops: {
448
+ name: string;
449
+ category: "FP" | "INT" | "BIT" | "PERM";
450
+ bestNs: number;
451
+ medianNs: number;
452
+ iters: number;
453
+ resultLane: number;
454
+ }[];
455
+ }>]>;
456
+ export declare enum SimdReadingsStage {
457
+ frictionless = "frictionless",
458
+ challenge = "challenge",
459
+ submit = "submit"
460
+ }
461
+ export declare const SimdReadingsStageSchema: import("zod").ZodNativeEnum<typeof SimdReadingsStage>;
462
+ export interface ScoreComponents {
463
+ baseScore: number;
464
+ lScore?: number;
465
+ timeout?: number;
466
+ accessPolicy?: number;
467
+ unverifiedHost?: number;
468
+ webView?: number;
469
+ triggeredDetectors?: number[];
470
+ }
471
+ export declare const SessionSchema: import("zod").ZodObject<{
472
+ sessionId: import("zod").ZodString;
473
+ createdAt: import("zod").ZodDate;
474
+ token: import("zod").ZodString;
475
+ score: import("zod").ZodNumber;
476
+ threshold: import("zod").ZodNumber;
477
+ scoreComponents: import("zod").ZodObject<{
478
+ baseScore: import("zod").ZodNumber;
479
+ lScore: import("zod").ZodOptional<import("zod").ZodNumber>;
480
+ timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
481
+ accessPolicy: import("zod").ZodOptional<import("zod").ZodNumber>;
482
+ unverifiedHost: import("zod").ZodOptional<import("zod").ZodNumber>;
483
+ webView: import("zod").ZodOptional<import("zod").ZodNumber>;
484
+ triggeredDetectors: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
485
+ }, "strip", import("zod").ZodTypeAny, {
486
+ baseScore: number;
487
+ lScore?: number | undefined;
488
+ timeout?: number | undefined;
489
+ accessPolicy?: number | undefined;
490
+ unverifiedHost?: number | undefined;
491
+ webView?: number | undefined;
492
+ triggeredDetectors?: number[] | undefined;
493
+ }, {
494
+ baseScore: number;
495
+ lScore?: number | undefined;
496
+ timeout?: number | undefined;
497
+ accessPolicy?: number | undefined;
498
+ unverifiedHost?: number | undefined;
499
+ webView?: number | undefined;
500
+ triggeredDetectors?: number[] | undefined;
501
+ }>;
502
+ providerSelectEntropy: import("zod").ZodNumber;
503
+ ipAddress: import("zod").ZodObject<{
504
+ lower: import("zod").ZodBigInt;
505
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
506
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
507
+ }, "strip", import("zod").ZodTypeAny, {
508
+ type: IpAddressType;
509
+ lower: bigint;
510
+ upper?: bigint | undefined;
511
+ }, {
512
+ type: IpAddressType;
513
+ lower: bigint;
514
+ upper?: bigint | undefined;
515
+ }>;
516
+ captchaType: import("zod").ZodNativeEnum<typeof CaptchaType>;
517
+ mode: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof ModeEnum>>;
518
+ solvedImagesCount: import("zod").ZodOptional<import("zod").ZodNumber>;
519
+ powDifficulty: import("zod").ZodOptional<import("zod").ZodNumber>;
520
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
521
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
522
+ pendingStage: import("zod").ZodOptional<import("zod").ZodBoolean>;
523
+ deleted: import("zod").ZodOptional<import("zod").ZodBoolean>;
524
+ userSitekeyIpHash: import("zod").ZodOptional<import("zod").ZodString>;
525
+ webView: import("zod").ZodBoolean;
526
+ iFrame: import("zod").ZodBoolean;
527
+ decryptedHeadHash: import("zod").ZodString;
528
+ siteKey: import("zod").ZodOptional<import("zod").ZodString>;
529
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, FrictionlessReason | undefined, string | undefined>;
530
+ blocked: import("zod").ZodOptional<import("zod").ZodBoolean>;
531
+ ipInfo: import("zod").ZodOptional<import("zod").ZodAny>;
532
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
533
+ result: import("zod").ZodOptional<import("zod").ZodObject<{
534
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
535
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
536
+ error: import("zod").ZodOptional<import("zod").ZodString>;
537
+ }, "strip", import("zod").ZodTypeAny, {
538
+ status: CaptchaStatus;
539
+ error?: string | undefined;
540
+ reason?: ResultReason | undefined;
541
+ }, {
542
+ status: CaptchaStatus;
543
+ error?: string | undefined;
544
+ reason?: string | undefined;
545
+ }>>;
546
+ userSubmitted: import("zod").ZodOptional<import("zod").ZodBoolean>;
547
+ serverChecked: import("zod").ZodOptional<import("zod").ZodBoolean>;
548
+ simdReadings: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
549
+ supported: import("zod").ZodLiteral<false>;
550
+ reason: import("zod").ZodString;
551
+ }, "strip", import("zod").ZodTypeAny, {
552
+ reason: string;
553
+ supported: false;
554
+ }, {
555
+ reason: string;
556
+ supported: false;
557
+ }>, import("zod").ZodObject<{
558
+ supported: import("zod").ZodLiteral<true>;
559
+ schema: import("zod").ZodNumber;
560
+ timerResolutionMs: import("zod").ZodNumber;
561
+ runsPerOp: import("zod").ZodNumber;
562
+ durationMs: import("zod").ZodNumber;
563
+ ops: import("zod").ZodArray<import("zod").ZodObject<{
564
+ name: import("zod").ZodString;
565
+ category: import("zod").ZodNativeEnum<{
566
+ readonly FP: "FP";
567
+ readonly INT: "INT";
568
+ readonly BIT: "BIT";
569
+ readonly PERM: "PERM";
570
+ }>;
571
+ bestNs: import("zod").ZodNumber;
572
+ medianNs: import("zod").ZodNumber;
573
+ iters: import("zod").ZodNumber;
574
+ resultLane: import("zod").ZodNumber;
575
+ }, "strip", import("zod").ZodTypeAny, {
576
+ name: string;
577
+ category: "FP" | "INT" | "BIT" | "PERM";
578
+ bestNs: number;
579
+ medianNs: number;
580
+ iters: number;
581
+ resultLane: number;
582
+ }, {
583
+ name: string;
584
+ category: "FP" | "INT" | "BIT" | "PERM";
585
+ bestNs: number;
586
+ medianNs: number;
587
+ iters: number;
588
+ resultLane: number;
589
+ }>, "many">;
590
+ }, "strip", import("zod").ZodTypeAny, {
591
+ supported: true;
592
+ schema: number;
593
+ timerResolutionMs: number;
594
+ runsPerOp: number;
595
+ durationMs: number;
596
+ ops: {
597
+ name: string;
598
+ category: "FP" | "INT" | "BIT" | "PERM";
599
+ bestNs: number;
600
+ medianNs: number;
601
+ iters: number;
602
+ resultLane: number;
603
+ }[];
604
+ }, {
605
+ supported: true;
606
+ schema: number;
607
+ timerResolutionMs: number;
608
+ runsPerOp: number;
609
+ durationMs: number;
610
+ ops: {
611
+ name: string;
612
+ category: "FP" | "INT" | "BIT" | "PERM";
613
+ bestNs: number;
614
+ medianNs: number;
615
+ iters: number;
616
+ resultLane: number;
617
+ }[];
618
+ }>]>>;
619
+ simdReadingsStage: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof SimdReadingsStage>>;
620
+ dnsEvent: import("zod").ZodOptional<import("zod").ZodObject<{
621
+ resolverIp: import("zod").ZodOptional<import("zod").ZodString>;
622
+ peerIp: import("zod").ZodOptional<import("zod").ZodString>;
623
+ pathValid: import("zod").ZodOptional<import("zod").ZodBoolean>;
624
+ receivedAt: import("zod").ZodDate;
625
+ }, "strip", import("zod").ZodTypeAny, {
626
+ receivedAt: Date;
627
+ resolverIp?: string | undefined;
628
+ peerIp?: string | undefined;
629
+ pathValid?: boolean | undefined;
630
+ }, {
631
+ receivedAt: Date;
632
+ resolverIp?: string | undefined;
633
+ peerIp?: string | undefined;
634
+ pathValid?: boolean | undefined;
635
+ }>>;
636
+ }, "strip", import("zod").ZodTypeAny, {
637
+ threshold: number;
638
+ captchaType: CaptchaType;
639
+ token: string;
640
+ sessionId: string;
641
+ score: number;
642
+ createdAt: Date;
643
+ ipAddress: {
644
+ type: IpAddressType;
645
+ lower: bigint;
646
+ upper?: bigint | undefined;
647
+ };
648
+ headers: {} & {
649
+ [k: string]: string;
650
+ };
651
+ webView: boolean;
652
+ scoreComponents: {
653
+ baseScore: number;
654
+ lScore?: number | undefined;
655
+ timeout?: number | undefined;
656
+ accessPolicy?: number | undefined;
657
+ unverifiedHost?: number | undefined;
658
+ webView?: number | undefined;
659
+ triggeredDetectors?: number[] | undefined;
660
+ };
661
+ providerSelectEntropy: number;
662
+ iFrame: boolean;
663
+ decryptedHeadHash: string;
664
+ powDifficulty?: number | undefined;
665
+ userSubmitted?: boolean | undefined;
666
+ serverChecked?: boolean | undefined;
667
+ siteKey?: string | undefined;
668
+ simdReadings?: {
669
+ reason: string;
670
+ supported: false;
671
+ } | {
672
+ supported: true;
673
+ schema: number;
674
+ timerResolutionMs: number;
675
+ runsPerOp: number;
676
+ durationMs: number;
677
+ ops: {
678
+ name: string;
679
+ category: "FP" | "INT" | "BIT" | "PERM";
680
+ bestNs: number;
681
+ medianNs: number;
682
+ iters: number;
683
+ resultLane: number;
684
+ }[];
685
+ } | undefined;
686
+ mode?: ModeEnum | undefined;
687
+ reason?: FrictionlessReason | undefined;
688
+ solvedImagesCount?: number | undefined;
689
+ result?: {
690
+ status: CaptchaStatus;
691
+ error?: string | undefined;
692
+ reason?: ResultReason | undefined;
693
+ } | undefined;
694
+ storedAtTimestamp?: Date | undefined;
695
+ lastUpdatedTimestamp?: Date | undefined;
696
+ pendingStage?: boolean | undefined;
697
+ ipInfo?: any;
698
+ deleted?: boolean | undefined;
699
+ userSitekeyIpHash?: string | undefined;
700
+ blocked?: boolean | undefined;
701
+ simdReadingsStage?: SimdReadingsStage | undefined;
702
+ dnsEvent?: {
703
+ receivedAt: Date;
704
+ resolverIp?: string | undefined;
705
+ peerIp?: string | undefined;
706
+ pathValid?: boolean | undefined;
707
+ } | undefined;
708
+ }, {
709
+ threshold: number;
710
+ captchaType: CaptchaType;
711
+ token: string;
712
+ sessionId: string;
713
+ score: number;
714
+ createdAt: Date;
715
+ ipAddress: {
716
+ type: IpAddressType;
717
+ lower: bigint;
718
+ upper?: bigint | undefined;
719
+ };
720
+ headers: {} & {
721
+ [k: string]: string;
722
+ };
723
+ webView: boolean;
724
+ scoreComponents: {
725
+ baseScore: number;
726
+ lScore?: number | undefined;
727
+ timeout?: number | undefined;
728
+ accessPolicy?: number | undefined;
729
+ unverifiedHost?: number | undefined;
730
+ webView?: number | undefined;
731
+ triggeredDetectors?: number[] | undefined;
732
+ };
733
+ providerSelectEntropy: number;
734
+ iFrame: boolean;
735
+ decryptedHeadHash: string;
736
+ powDifficulty?: number | undefined;
737
+ userSubmitted?: boolean | undefined;
738
+ serverChecked?: boolean | undefined;
739
+ siteKey?: string | undefined;
740
+ simdReadings?: {
741
+ reason: string;
742
+ supported: false;
743
+ } | {
744
+ supported: true;
745
+ schema: number;
746
+ timerResolutionMs: number;
747
+ runsPerOp: number;
748
+ durationMs: number;
749
+ ops: {
750
+ name: string;
751
+ category: "FP" | "INT" | "BIT" | "PERM";
752
+ bestNs: number;
753
+ medianNs: number;
754
+ iters: number;
755
+ resultLane: number;
756
+ }[];
757
+ } | undefined;
758
+ mode?: ModeEnum | undefined;
759
+ reason?: string | undefined;
760
+ solvedImagesCount?: number | undefined;
761
+ result?: {
762
+ status: CaptchaStatus;
763
+ error?: string | undefined;
764
+ reason?: string | undefined;
765
+ } | undefined;
766
+ storedAtTimestamp?: Date | undefined;
767
+ lastUpdatedTimestamp?: Date | undefined;
768
+ pendingStage?: boolean | undefined;
769
+ ipInfo?: any;
770
+ deleted?: boolean | undefined;
771
+ userSitekeyIpHash?: string | undefined;
772
+ blocked?: boolean | undefined;
773
+ simdReadingsStage?: SimdReadingsStage | undefined;
774
+ dnsEvent?: {
775
+ receivedAt: Date;
776
+ resolverIp?: string | undefined;
777
+ peerIp?: string | undefined;
778
+ pathValid?: boolean | undefined;
779
+ } | undefined;
780
+ }>;
781
+ export type Session = {
782
+ sessionId: string;
783
+ createdAt: Date;
784
+ token: string;
785
+ score: number;
786
+ threshold: number;
787
+ scoreComponents: ScoreComponents;
788
+ providerSelectEntropy: number;
789
+ ipAddress: CompositeIpAddress;
790
+ captchaType: CaptchaType;
791
+ mode?: ModeEnum;
792
+ solvedImagesCount?: number;
793
+ powDifficulty?: number;
794
+ storedAtTimestamp?: Date;
795
+ lastUpdatedTimestamp?: Date;
796
+ pendingStage?: boolean;
797
+ deleted?: boolean;
798
+ userSitekeyIpHash?: string;
799
+ webView: boolean;
800
+ iFrame: boolean;
801
+ decryptedHeadHash: string;
802
+ siteKey?: string;
803
+ reason?: FrictionlessReason;
804
+ blocked?: boolean;
805
+ ipInfo?: IPInfoResponse;
806
+ headers?: RequestHeaders;
807
+ result?: {
808
+ status: CaptchaStatus;
809
+ reason?: ResultReason;
810
+ error?: string;
811
+ };
812
+ userSubmitted?: boolean;
813
+ serverChecked?: boolean;
814
+ simdReadings?: SimdReadings;
815
+ simdReadingsStage?: SimdReadingsStage;
816
+ dnsEvent?: {
817
+ resolverIp?: string;
818
+ peerIp?: string;
819
+ pathValid?: boolean;
820
+ receivedAt: Date;
821
+ };
822
+ };
823
+ export declare const PoWCaptchaStoredSchema: import("zod").ZodObject<{
824
+ challenge: ZodType<`${number}___${string}___${string}`, ZodTypeDef, `${number}___${string}___${string}`>;
825
+ difficulty: import("zod").ZodNumber;
826
+ providerSignature: import("zod").ZodString;
827
+ userSignature: import("zod").ZodOptional<import("zod").ZodString>;
828
+ score: import("zod").ZodOptional<import("zod").ZodNumber>;
829
+ userAccount: import("zod").ZodString;
830
+ dappAccount: import("zod").ZodString;
831
+ result: import("zod").ZodObject<{
832
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
833
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
834
+ error: import("zod").ZodOptional<import("zod").ZodString>;
835
+ }, "strip", import("zod").ZodTypeAny, {
836
+ status: CaptchaStatus;
837
+ error?: string | undefined;
838
+ reason?: ResultReason | undefined;
839
+ }, {
840
+ status: CaptchaStatus;
841
+ error?: string | undefined;
842
+ reason?: string | undefined;
843
+ }>;
844
+ requestedAtTimestamp: import("zod").ZodDate;
845
+ ipAddress: import("zod").ZodObject<{
846
+ lower: import("zod").ZodBigInt;
847
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
848
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
849
+ }, "strip", import("zod").ZodTypeAny, {
850
+ type: IpAddressType;
851
+ lower: bigint;
852
+ upper?: bigint | undefined;
853
+ }, {
854
+ type: IpAddressType;
855
+ lower: bigint;
856
+ upper?: bigint | undefined;
857
+ }>;
858
+ providedIp: import("zod").ZodOptional<import("zod").ZodObject<{
859
+ lower: import("zod").ZodBigInt;
860
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
861
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
862
+ }, "strip", import("zod").ZodTypeAny, {
863
+ type: IpAddressType;
864
+ lower: bigint;
865
+ upper?: bigint | undefined;
866
+ }, {
867
+ type: IpAddressType;
868
+ lower: bigint;
869
+ upper?: bigint | undefined;
870
+ }>>;
871
+ metadata: import("zod").ZodOptional<import("zod").ZodObject<{
872
+ email: import("zod").ZodOptional<import("zod").ZodString>;
873
+ }, "strip", import("zod").ZodTypeAny, {
874
+ email?: string | undefined;
875
+ }, {
876
+ email?: string | undefined;
877
+ }>>;
878
+ clientMetaData: import("zod").ZodOptional<import("zod").ZodObject<{
879
+ hp: import("zod").ZodOptional<import("zod").ZodString>;
880
+ }, "strip", import("zod").ZodTypeAny, {
881
+ hp?: string | undefined;
882
+ }, {
883
+ hp?: string | undefined;
884
+ }>>;
885
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
886
+ ja4: import("zod").ZodString;
887
+ userSubmitted: import("zod").ZodBoolean;
888
+ serverChecked: import("zod").ZodBoolean;
889
+ ipInfo: import("zod").ZodOptional<import("zod").ZodAny>;
890
+ parsedUserAgentInfo: import("zod").ZodOptional<import("zod").ZodAny>;
891
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
892
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
893
+ sessionId: import("zod").ZodOptional<import("zod").ZodString>;
894
+ coords: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodTuple<[import("zod").ZodNumber, import("zod").ZodNumber], null>, "many">, "many">>;
895
+ mouseEvents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{}, "strip", import("zod").ZodAny, import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">, import("zod").objectInputType<{}, import("zod").ZodAny, "strip">>, "many">>;
896
+ touchEvents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{}, "strip", import("zod").ZodAny, import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">, import("zod").objectInputType<{}, import("zod").ZodAny, "strip">>, "many">>;
897
+ clickEvents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{}, "strip", import("zod").ZodAny, import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">, import("zod").objectInputType<{}, import("zod").ZodAny, "strip">>, "many">>;
898
+ deviceCapability: import("zod").ZodOptional<import("zod").ZodString>;
899
+ behavioralDataPacked: import("zod").ZodOptional<import("zod").ZodObject<{
900
+ c1: import("zod").ZodArray<import("zod").ZodAny, "many">;
901
+ c2: import("zod").ZodArray<import("zod").ZodAny, "many">;
902
+ c3: import("zod").ZodArray<import("zod").ZodAny, "many">;
903
+ d: import("zod").ZodString;
904
+ }, "strip", import("zod").ZodTypeAny, {
905
+ c1: any[];
906
+ c2: any[];
907
+ c3: any[];
908
+ d: string;
909
+ }, {
910
+ c1: any[];
911
+ c2: any[];
912
+ c3: any[];
913
+ d: string;
914
+ }>>;
915
+ label: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaLabel>>;
916
+ labelReason: import("zod").ZodOptional<import("zod").ZodString>;
917
+ labelledBy: import("zod").ZodOptional<import("zod").ZodString>;
918
+ labelledAt: import("zod").ZodOptional<import("zod").ZodDate>;
919
+ }, "strip", import("zod").ZodTypeAny, {
920
+ userSubmitted: boolean;
921
+ serverChecked: boolean;
922
+ challenge: `${number}___${string}___${string}`;
923
+ difficulty: number;
924
+ userAccount: string;
925
+ dappAccount: string;
926
+ result: {
927
+ status: CaptchaStatus;
928
+ error?: string | undefined;
929
+ reason?: ResultReason | undefined;
930
+ };
931
+ ipAddress: {
932
+ type: IpAddressType;
933
+ lower: bigint;
934
+ upper?: bigint | undefined;
935
+ };
936
+ headers: {} & {
937
+ [k: string]: string;
938
+ };
939
+ ja4: string;
940
+ requestedAtTimestamp: Date;
941
+ providerSignature: string;
942
+ label?: CaptchaLabel | undefined;
943
+ sessionId?: string | undefined;
944
+ score?: number | undefined;
945
+ clientMetaData?: {
946
+ hp?: string | undefined;
947
+ } | undefined;
948
+ userSignature?: string | undefined;
949
+ providedIp?: {
950
+ type: IpAddressType;
951
+ lower: bigint;
952
+ upper?: bigint | undefined;
953
+ } | undefined;
954
+ metadata?: {
955
+ email?: string | undefined;
956
+ } | undefined;
957
+ storedAtTimestamp?: Date | undefined;
958
+ lastUpdatedTimestamp?: Date | undefined;
959
+ coords?: [number, number][][] | undefined;
960
+ deviceCapability?: string | undefined;
961
+ behavioralDataPacked?: {
962
+ c1: any[];
963
+ c2: any[];
964
+ c3: any[];
965
+ d: string;
966
+ } | undefined;
967
+ labelReason?: string | undefined;
968
+ labelledBy?: string | undefined;
969
+ labelledAt?: Date | undefined;
970
+ ipInfo?: any;
971
+ parsedUserAgentInfo?: any;
972
+ mouseEvents?: import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">[] | undefined;
973
+ touchEvents?: import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">[] | undefined;
974
+ clickEvents?: import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">[] | undefined;
975
+ }, {
976
+ userSubmitted: boolean;
977
+ serverChecked: boolean;
978
+ challenge: `${number}___${string}___${string}`;
979
+ difficulty: number;
980
+ userAccount: string;
981
+ dappAccount: string;
982
+ result: {
983
+ status: CaptchaStatus;
984
+ error?: string | undefined;
985
+ reason?: string | undefined;
986
+ };
987
+ ipAddress: {
988
+ type: IpAddressType;
989
+ lower: bigint;
990
+ upper?: bigint | undefined;
991
+ };
992
+ headers: {} & {
993
+ [k: string]: string;
994
+ };
995
+ ja4: string;
996
+ requestedAtTimestamp: Date;
997
+ providerSignature: string;
998
+ label?: CaptchaLabel | undefined;
999
+ sessionId?: string | undefined;
1000
+ score?: number | undefined;
1001
+ clientMetaData?: {
1002
+ hp?: string | undefined;
1003
+ } | undefined;
1004
+ userSignature?: string | undefined;
1005
+ providedIp?: {
1006
+ type: IpAddressType;
1007
+ lower: bigint;
1008
+ upper?: bigint | undefined;
1009
+ } | undefined;
1010
+ metadata?: {
1011
+ email?: string | undefined;
1012
+ } | undefined;
1013
+ storedAtTimestamp?: Date | undefined;
1014
+ lastUpdatedTimestamp?: Date | undefined;
1015
+ coords?: [number, number][][] | undefined;
1016
+ deviceCapability?: string | undefined;
1017
+ behavioralDataPacked?: {
1018
+ c1: any[];
1019
+ c2: any[];
1020
+ c3: any[];
1021
+ d: string;
1022
+ } | undefined;
1023
+ labelReason?: string | undefined;
1024
+ labelledBy?: string | undefined;
1025
+ labelledAt?: Date | undefined;
1026
+ ipInfo?: any;
1027
+ parsedUserAgentInfo?: any;
1028
+ mouseEvents?: import("zod").objectInputType<{}, import("zod").ZodAny, "strip">[] | undefined;
1029
+ touchEvents?: import("zod").objectInputType<{}, import("zod").ZodAny, "strip">[] | undefined;
1030
+ clickEvents?: import("zod").objectInputType<{}, import("zod").ZodAny, "strip">[] | undefined;
1031
+ }>;
1032
+ export type PendingImageCaptchaRequest = {
1033
+ dappAccount: string;
1034
+ pending: boolean;
1035
+ salt: string;
1036
+ requestHash: string;
1037
+ deadlineTimestamp: Date;
1038
+ requestedAtTimestamp: Date;
1039
+ ipAddress: CompositeIpAddress;
1040
+ sessionId?: string;
1041
+ threshold: number;
1042
+ };
1043
+ export interface PoWCaptchaStored extends Omit<PoWCaptchaUser, "requestedAtTimestamp">, StoredCaptcha {
1044
+ }
1045
+ export interface PuzzleCaptchaStored extends StoredCaptcha {
1046
+ challenge: PoWChallengeId;
1047
+ targetX: number;
1048
+ targetY: number;
1049
+ originX: number;
1050
+ originY: number;
1051
+ tolerance: number;
1052
+ providerSignature: string;
1053
+ userSignature?: string;
1054
+ userAccount: string;
1055
+ dappAccount: string;
1056
+ puzzleEvents?: PuzzleEvent[];
1057
+ }
1058
+ export interface SolutionRecord extends CaptchaSolution {
1059
+ datasetId: string;
1060
+ datasetContentId: string;
1061
+ }
1062
+ export declare const UserSolutionSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1063
+ captchaId: import("zod").ZodString;
1064
+ captchaContentId: import("zod").ZodString;
1065
+ solution: import("zod").ZodArray<import("zod").ZodString, "many">;
1066
+ salt: import("zod").ZodString;
1067
+ }, {
1068
+ processed: import("zod").ZodBoolean;
1069
+ checked: import("zod").ZodBoolean;
1070
+ commitmentId: import("zod").ZodString;
1071
+ createdAt: import("zod").ZodDate;
1072
+ }>, "strip", import("zod").ZodTypeAny, {
1073
+ captchaId: string;
1074
+ captchaContentId: string;
1075
+ salt: string;
1076
+ solution: string[];
1077
+ commitmentId: string;
1078
+ createdAt: Date;
1079
+ processed: boolean;
1080
+ checked: boolean;
1081
+ }, {
1082
+ captchaId: string;
1083
+ captchaContentId: string;
1084
+ salt: string;
1085
+ solution: string[];
1086
+ commitmentId: string;
1087
+ createdAt: Date;
1088
+ processed: boolean;
1089
+ checked: boolean;
1090
+ }>;
1091
+ export type UserSolution = zInfer<typeof UserSolutionSchema>;
1092
+ export declare const UserCommitmentWithSolutionsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1093
+ userAccount: import("zod").ZodString;
1094
+ dappAccount: import("zod").ZodString;
1095
+ datasetId: import("zod").ZodString;
1096
+ providerAccount: import("zod").ZodString;
1097
+ id: import("zod").ZodString;
1098
+ result: import("zod").ZodObject<{
1099
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
1100
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
1101
+ error: import("zod").ZodOptional<import("zod").ZodString>;
1102
+ }, "strip", import("zod").ZodTypeAny, {
1103
+ status: CaptchaStatus;
1104
+ error?: string | undefined;
1105
+ reason?: ResultReason | undefined;
1106
+ }, {
1107
+ status: CaptchaStatus;
1108
+ error?: string | undefined;
1109
+ reason?: string | undefined;
1110
+ }>;
1111
+ userSignature: import("zod").ZodString;
1112
+ ipAddress: import("zod").ZodObject<{
1113
+ lower: import("zod").ZodBigInt;
1114
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
1115
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
1116
+ }, "strip", import("zod").ZodTypeAny, {
1117
+ type: IpAddressType;
1118
+ lower: bigint;
1119
+ upper?: bigint | undefined;
1120
+ }, {
1121
+ type: IpAddressType;
1122
+ lower: bigint;
1123
+ upper?: bigint | undefined;
1124
+ }>;
1125
+ providedIp: import("zod").ZodOptional<import("zod").ZodObject<{
1126
+ lower: import("zod").ZodBigInt;
1127
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
1128
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
1129
+ }, "strip", import("zod").ZodTypeAny, {
1130
+ type: IpAddressType;
1131
+ lower: bigint;
1132
+ upper?: bigint | undefined;
1133
+ }, {
1134
+ type: IpAddressType;
1135
+ lower: bigint;
1136
+ upper?: bigint | undefined;
1137
+ }>>;
1138
+ metadata: import("zod").ZodOptional<import("zod").ZodObject<{
1139
+ email: import("zod").ZodOptional<import("zod").ZodString>;
1140
+ }, "strip", import("zod").ZodTypeAny, {
1141
+ email?: string | undefined;
1142
+ }, {
1143
+ email?: string | undefined;
1144
+ }>>;
1145
+ clientMetaData: import("zod").ZodOptional<import("zod").ZodObject<{
1146
+ hp: import("zod").ZodOptional<import("zod").ZodString>;
1147
+ }, "strip", import("zod").ZodTypeAny, {
1148
+ hp?: string | undefined;
1149
+ }, {
1150
+ hp?: string | undefined;
1151
+ }>>;
1152
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
1153
+ ja4: import("zod").ZodString;
1154
+ userSubmitted: import("zod").ZodBoolean;
1155
+ serverChecked: import("zod").ZodBoolean;
1156
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
1157
+ requestedAtTimestamp: import("zod").ZodDate;
1158
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
1159
+ pendingStage: import("zod").ZodOptional<import("zod").ZodBoolean>;
1160
+ sessionId: import("zod").ZodOptional<import("zod").ZodString>;
1161
+ coords: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodTuple<[import("zod").ZodNumber, import("zod").ZodNumber], null>, "many">, "many">>;
1162
+ pending: import("zod").ZodBoolean;
1163
+ salt: import("zod").ZodString;
1164
+ requestHash: import("zod").ZodString;
1165
+ deadlineTimestamp: import("zod").ZodDate;
1166
+ threshold: import("zod").ZodNumber;
1167
+ deviceCapability: import("zod").ZodOptional<import("zod").ZodString>;
1168
+ behavioralDataPacked: import("zod").ZodOptional<import("zod").ZodObject<{
1169
+ c1: import("zod").ZodArray<import("zod").ZodAny, "many">;
1170
+ c2: import("zod").ZodArray<import("zod").ZodAny, "many">;
1171
+ c3: import("zod").ZodArray<import("zod").ZodAny, "many">;
1172
+ d: import("zod").ZodString;
1173
+ }, "strip", import("zod").ZodTypeAny, {
1174
+ c1: any[];
1175
+ c2: any[];
1176
+ c3: any[];
1177
+ d: string;
1178
+ }, {
1179
+ c1: any[];
1180
+ c2: any[];
1181
+ c3: any[];
1182
+ d: string;
1183
+ }>>;
1184
+ label: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaLabel>>;
1185
+ labelReason: import("zod").ZodOptional<import("zod").ZodString>;
1186
+ labelledBy: import("zod").ZodOptional<import("zod").ZodString>;
1187
+ labelledAt: import("zod").ZodOptional<import("zod").ZodDate>;
1188
+ }, {
1189
+ captchas: import("zod").ZodArray<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1190
+ captchaId: import("zod").ZodString;
1191
+ captchaContentId: import("zod").ZodString;
1192
+ solution: import("zod").ZodArray<import("zod").ZodString, "many">;
1193
+ salt: import("zod").ZodString;
1194
+ }, {
1195
+ processed: import("zod").ZodBoolean;
1196
+ checked: import("zod").ZodBoolean;
1197
+ commitmentId: import("zod").ZodString;
1198
+ createdAt: import("zod").ZodDate;
1199
+ }>, "strip", import("zod").ZodTypeAny, {
1200
+ captchaId: string;
1201
+ captchaContentId: string;
1202
+ salt: string;
1203
+ solution: string[];
1204
+ commitmentId: string;
1205
+ createdAt: Date;
1206
+ processed: boolean;
1207
+ checked: boolean;
1208
+ }, {
1209
+ captchaId: string;
1210
+ captchaContentId: string;
1211
+ salt: string;
1212
+ solution: string[];
1213
+ commitmentId: string;
1214
+ createdAt: Date;
1215
+ processed: boolean;
1216
+ checked: boolean;
1217
+ }>, "many">;
1218
+ }>, "strip", import("zod").ZodTypeAny, {
1219
+ threshold: number;
1220
+ salt: string;
1221
+ captchas: {
1222
+ captchaId: string;
1223
+ captchaContentId: string;
1224
+ salt: string;
1225
+ solution: string[];
1226
+ commitmentId: string;
1227
+ createdAt: Date;
1228
+ processed: boolean;
1229
+ checked: boolean;
1230
+ }[];
1231
+ userSubmitted: boolean;
1232
+ serverChecked: boolean;
1233
+ datasetId: string;
1234
+ requestHash: string;
1235
+ userAccount: string;
1236
+ pending: boolean;
1237
+ dappAccount: string;
1238
+ providerAccount: string;
1239
+ id: string;
1240
+ result: {
1241
+ status: CaptchaStatus;
1242
+ error?: string | undefined;
1243
+ reason?: ResultReason | undefined;
1244
+ };
1245
+ userSignature: string;
1246
+ ipAddress: {
1247
+ type: IpAddressType;
1248
+ lower: bigint;
1249
+ upper?: bigint | undefined;
1250
+ };
1251
+ headers: {} & {
1252
+ [k: string]: string;
1253
+ };
1254
+ ja4: string;
1255
+ requestedAtTimestamp: Date;
1256
+ deadlineTimestamp: Date;
1257
+ label?: CaptchaLabel | undefined;
1258
+ sessionId?: string | undefined;
1259
+ clientMetaData?: {
1260
+ hp?: string | undefined;
1261
+ } | undefined;
1262
+ providedIp?: {
1263
+ type: IpAddressType;
1264
+ lower: bigint;
1265
+ upper?: bigint | undefined;
1266
+ } | undefined;
1267
+ metadata?: {
1268
+ email?: string | undefined;
1269
+ } | undefined;
1270
+ storedAtTimestamp?: Date | undefined;
1271
+ lastUpdatedTimestamp?: Date | undefined;
1272
+ pendingStage?: boolean | undefined;
1273
+ coords?: [number, number][][] | undefined;
1274
+ deviceCapability?: string | undefined;
1275
+ behavioralDataPacked?: {
1276
+ c1: any[];
1277
+ c2: any[];
1278
+ c3: any[];
1279
+ d: string;
1280
+ } | undefined;
1281
+ labelReason?: string | undefined;
1282
+ labelledBy?: string | undefined;
1283
+ labelledAt?: Date | undefined;
1284
+ }, {
1285
+ threshold: number;
1286
+ salt: string;
1287
+ captchas: {
1288
+ captchaId: string;
1289
+ captchaContentId: string;
1290
+ salt: string;
1291
+ solution: string[];
1292
+ commitmentId: string;
1293
+ createdAt: Date;
1294
+ processed: boolean;
1295
+ checked: boolean;
1296
+ }[];
1297
+ userSubmitted: boolean;
1298
+ serverChecked: boolean;
1299
+ datasetId: string;
1300
+ requestHash: string;
1301
+ userAccount: string;
1302
+ pending: boolean;
1303
+ dappAccount: string;
1304
+ providerAccount: string;
1305
+ id: string;
1306
+ result: {
1307
+ status: CaptchaStatus;
1308
+ error?: string | undefined;
1309
+ reason?: string | undefined;
1310
+ };
1311
+ userSignature: string;
1312
+ ipAddress: {
1313
+ type: IpAddressType;
1314
+ lower: bigint;
1315
+ upper?: bigint | undefined;
1316
+ };
1317
+ headers: {} & {
1318
+ [k: string]: string;
1319
+ };
1320
+ ja4: string;
1321
+ requestedAtTimestamp: Date;
1322
+ deadlineTimestamp: Date;
1323
+ label?: CaptchaLabel | undefined;
1324
+ sessionId?: string | undefined;
1325
+ clientMetaData?: {
1326
+ hp?: string | undefined;
1327
+ } | undefined;
1328
+ providedIp?: {
1329
+ type: IpAddressType;
1330
+ lower: bigint;
1331
+ upper?: bigint | undefined;
1332
+ } | undefined;
1333
+ metadata?: {
1334
+ email?: string | undefined;
1335
+ } | undefined;
1336
+ storedAtTimestamp?: Date | undefined;
1337
+ lastUpdatedTimestamp?: Date | undefined;
1338
+ pendingStage?: boolean | undefined;
1339
+ coords?: [number, number][][] | undefined;
1340
+ deviceCapability?: string | undefined;
1341
+ behavioralDataPacked?: {
1342
+ c1: any[];
1343
+ c2: any[];
1344
+ c3: any[];
1345
+ d: string;
1346
+ } | undefined;
1347
+ labelReason?: string | undefined;
1348
+ labelledBy?: string | undefined;
1349
+ labelledAt?: Date | undefined;
1350
+ }>;
1351
+ export type UserCommitmentWithSolutions = zInfer<typeof UserCommitmentWithSolutionsSchema>;
1352
+ export type DetectorKey = {
1353
+ detectorKey: string;
1354
+ createdAt: Date;
1355
+ expiresAt?: Date;
1356
+ };
1357
+ export type DecisionMachineArtifact = {
1358
+ scope: DecisionMachineScope;
1359
+ dappAccount?: string;
1360
+ runtime: DecisionMachineRuntime;
1361
+ language?: DecisionMachineLanguage;
1362
+ source: string;
1363
+ name?: string;
1364
+ version?: string;
1365
+ captchaType?: CaptchaType.pow | CaptchaType.image | CaptchaType.puzzle;
1366
+ createdAt: Date;
1367
+ updatedAt: Date;
1368
+ };
1369
+ export type ClientContextEntropy = {
1370
+ account: string;
1371
+ contextType: ContextType;
1372
+ entropy: string;
1373
+ createdAt: Date;
1374
+ updatedAt: Date;
1375
+ };
1376
+ //# sourceMappingURL=database.d.ts.map