@prosopo/types 3.8.0 → 4.3.1

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 (105) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +19 -14
  2. package/.turbo/turbo-build$colon$tsc.log +8 -8
  3. package/.turbo/turbo-build.log +49 -44
  4. package/.turbo/turbo-typecheck.log +1 -1
  5. package/CHANGELOG.md +520 -0
  6. package/dist/api/api.d.ts +23 -5
  7. package/dist/api/api.d.ts.map +1 -1
  8. package/dist/api/ipapi.d.ts +2 -1
  9. package/dist/api/ipapi.d.ts.map +1 -1
  10. package/dist/api/params.d.ts +24 -1
  11. package/dist/api/params.d.ts.map +1 -1
  12. package/dist/api/params.js +23 -0
  13. package/dist/api/params.js.map +1 -1
  14. package/dist/cjs/api/params.cjs +23 -0
  15. package/dist/cjs/client/captchaType/captchaType.cjs +16 -0
  16. package/dist/cjs/client/index.cjs +17 -0
  17. package/dist/cjs/client/settings.cjs +83 -1
  18. package/dist/cjs/client/testSiteKeys.cjs +22 -0
  19. package/dist/cjs/config/config.cjs +25 -18
  20. package/dist/cjs/config/index.cjs +6 -2
  21. package/dist/cjs/config/mode.cjs +15 -0
  22. package/dist/cjs/config/timeouts.cjs +6 -0
  23. package/dist/cjs/decisionMachine/index.cjs +85 -0
  24. package/dist/cjs/index.cjs +81 -2
  25. package/dist/cjs/provider/api.cjs +261 -9
  26. package/dist/cjs/provider/database.cjs +254 -0
  27. package/dist/cjs/provider/index.cjs +43 -0
  28. package/dist/cjs/provider/reasons.cjs +45 -0
  29. package/dist/cjs/provider/scheduler.cjs +1 -0
  30. package/dist/client/captchaType/captchaType.d.ts +4 -2
  31. package/dist/client/captchaType/captchaType.d.ts.map +1 -1
  32. package/dist/client/captchaType/captchaType.js +17 -1
  33. package/dist/client/captchaType/captchaType.js.map +1 -1
  34. package/dist/client/index.d.ts +1 -0
  35. package/dist/client/index.d.ts.map +1 -1
  36. package/dist/client/index.js +20 -3
  37. package/dist/client/index.js.map +1 -1
  38. package/dist/client/settings.d.ts +276 -0
  39. package/dist/client/settings.d.ts.map +1 -1
  40. package/dist/client/settings.js +84 -2
  41. package/dist/client/settings.js.map +1 -1
  42. package/dist/client/testSiteKeys.d.ts +8 -0
  43. package/dist/client/testSiteKeys.d.ts.map +1 -0
  44. package/dist/client/testSiteKeys.js +22 -0
  45. package/dist/client/testSiteKeys.js.map +1 -0
  46. package/dist/config/config.d.ts +371 -27
  47. package/dist/config/config.d.ts.map +1 -1
  48. package/dist/config/config.js +25 -18
  49. package/dist/config/config.js.map +1 -1
  50. package/dist/config/index.d.ts +1 -0
  51. package/dist/config/index.d.ts.map +1 -1
  52. package/dist/config/index.js +6 -2
  53. package/dist/config/index.js.map +1 -1
  54. package/dist/config/mode.d.ts +8 -0
  55. package/dist/config/mode.d.ts.map +1 -0
  56. package/dist/config/mode.js +15 -0
  57. package/dist/config/mode.js.map +1 -0
  58. package/dist/config/timeouts.d.ts +3 -0
  59. package/dist/config/timeouts.d.ts.map +1 -1
  60. package/dist/config/timeouts.js +7 -1
  61. package/dist/config/timeouts.js.map +1 -1
  62. package/dist/datasets/captcha.d.ts +2 -2
  63. package/dist/datasets/captcha.d.ts.map +1 -1
  64. package/dist/datasets/captcha.js.map +1 -1
  65. package/dist/decisionMachine/index.d.ts +174 -0
  66. package/dist/decisionMachine/index.d.ts.map +1 -0
  67. package/dist/decisionMachine/index.js +85 -0
  68. package/dist/decisionMachine/index.js.map +1 -0
  69. package/dist/index.d.ts +1 -0
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +85 -6
  72. package/dist/index.js.map +1 -1
  73. package/dist/procaptcha/api.d.ts +3 -2
  74. package/dist/procaptcha/api.d.ts.map +1 -1
  75. package/dist/procaptcha/behavioral.d.ts +13 -1
  76. package/dist/procaptcha/behavioral.d.ts.map +1 -1
  77. package/dist/procaptcha/props.d.ts +5 -0
  78. package/dist/procaptcha/props.d.ts.map +1 -1
  79. package/dist/procaptcha-bundle/index.d.ts +0 -3
  80. package/dist/procaptcha-bundle/index.d.ts.map +1 -1
  81. package/dist/procaptcha-frictionless/props.d.ts +1 -0
  82. package/dist/procaptcha-frictionless/props.d.ts.map +1 -1
  83. package/dist/provider/api.d.ts +1662 -122
  84. package/dist/provider/api.d.ts.map +1 -1
  85. package/dist/provider/api.js +261 -9
  86. package/dist/provider/api.js.map +1 -1
  87. package/dist/provider/database.d.ts +1385 -0
  88. package/dist/provider/database.d.ts.map +1 -0
  89. package/dist/provider/database.js +254 -0
  90. package/dist/provider/database.js.map +1 -0
  91. package/dist/provider/detection.d.ts +22 -0
  92. package/dist/provider/detection.d.ts.map +1 -1
  93. package/dist/provider/index.d.ts +2 -0
  94. package/dist/provider/index.d.ts.map +1 -1
  95. package/dist/provider/index.js +44 -1
  96. package/dist/provider/index.js.map +1 -1
  97. package/dist/provider/reasons.d.ts +40 -0
  98. package/dist/provider/reasons.d.ts.map +1 -0
  99. package/dist/provider/reasons.js +45 -0
  100. package/dist/provider/reasons.js.map +1 -0
  101. package/dist/provider/scheduler.d.ts +2 -1
  102. package/dist/provider/scheduler.d.ts.map +1 -1
  103. package/dist/provider/scheduler.js +1 -0
  104. package/dist/provider/scheduler.js.map +1 -1
  105. package/package.json +6 -5
@@ -0,0 +1,1385 @@
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
+ shadowDomPenalty: import("zod").ZodOptional<import("zod").ZodBoolean>;
369
+ }, "strip", import("zod").ZodTypeAny, {
370
+ baseScore: number;
371
+ lScore?: number | undefined;
372
+ timeout?: number | undefined;
373
+ accessPolicy?: number | undefined;
374
+ unverifiedHost?: number | undefined;
375
+ webView?: number | undefined;
376
+ triggeredDetectors?: number[] | undefined;
377
+ shadowDomPenalty?: boolean | undefined;
378
+ }, {
379
+ baseScore: number;
380
+ lScore?: number | undefined;
381
+ timeout?: number | undefined;
382
+ accessPolicy?: number | undefined;
383
+ unverifiedHost?: number | undefined;
384
+ webView?: number | undefined;
385
+ triggeredDetectors?: number[] | undefined;
386
+ shadowDomPenalty?: boolean | undefined;
387
+ }>;
388
+ export declare const SimdReadingsSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
389
+ supported: import("zod").ZodLiteral<false>;
390
+ reason: import("zod").ZodString;
391
+ }, "strip", import("zod").ZodTypeAny, {
392
+ reason: string;
393
+ supported: false;
394
+ }, {
395
+ reason: string;
396
+ supported: false;
397
+ }>, import("zod").ZodObject<{
398
+ supported: import("zod").ZodLiteral<true>;
399
+ schema: import("zod").ZodNumber;
400
+ timerResolutionMs: import("zod").ZodNumber;
401
+ runsPerOp: import("zod").ZodNumber;
402
+ durationMs: import("zod").ZodNumber;
403
+ ops: import("zod").ZodArray<import("zod").ZodObject<{
404
+ name: import("zod").ZodString;
405
+ category: import("zod").ZodNativeEnum<{
406
+ readonly FP: "FP";
407
+ readonly INT: "INT";
408
+ readonly BIT: "BIT";
409
+ readonly PERM: "PERM";
410
+ }>;
411
+ bestNs: import("zod").ZodNumber;
412
+ medianNs: import("zod").ZodNumber;
413
+ iters: import("zod").ZodNumber;
414
+ resultLane: import("zod").ZodNumber;
415
+ }, "strip", import("zod").ZodTypeAny, {
416
+ name: string;
417
+ category: "FP" | "INT" | "BIT" | "PERM";
418
+ bestNs: number;
419
+ medianNs: number;
420
+ iters: number;
421
+ resultLane: number;
422
+ }, {
423
+ name: string;
424
+ category: "FP" | "INT" | "BIT" | "PERM";
425
+ bestNs: number;
426
+ medianNs: number;
427
+ iters: number;
428
+ resultLane: number;
429
+ }>, "many">;
430
+ }, "strip", import("zod").ZodTypeAny, {
431
+ supported: true;
432
+ schema: number;
433
+ timerResolutionMs: number;
434
+ runsPerOp: number;
435
+ durationMs: number;
436
+ ops: {
437
+ name: string;
438
+ category: "FP" | "INT" | "BIT" | "PERM";
439
+ bestNs: number;
440
+ medianNs: number;
441
+ iters: number;
442
+ resultLane: number;
443
+ }[];
444
+ }, {
445
+ supported: true;
446
+ schema: number;
447
+ timerResolutionMs: number;
448
+ runsPerOp: number;
449
+ durationMs: number;
450
+ ops: {
451
+ name: string;
452
+ category: "FP" | "INT" | "BIT" | "PERM";
453
+ bestNs: number;
454
+ medianNs: number;
455
+ iters: number;
456
+ resultLane: number;
457
+ }[];
458
+ }>]>;
459
+ export declare enum SimdReadingsStage {
460
+ frictionless = "frictionless",
461
+ challenge = "challenge",
462
+ submit = "submit"
463
+ }
464
+ export declare const SimdReadingsStageSchema: import("zod").ZodNativeEnum<typeof SimdReadingsStage>;
465
+ export interface ScoreComponents {
466
+ baseScore: number;
467
+ lScore?: number;
468
+ timeout?: number;
469
+ accessPolicy?: number;
470
+ unverifiedHost?: number;
471
+ webView?: number;
472
+ triggeredDetectors?: number[];
473
+ shadowDomPenalty?: boolean;
474
+ }
475
+ export declare const SessionSchema: import("zod").ZodObject<{
476
+ sessionId: import("zod").ZodString;
477
+ createdAt: import("zod").ZodDate;
478
+ token: import("zod").ZodString;
479
+ score: import("zod").ZodNumber;
480
+ threshold: import("zod").ZodNumber;
481
+ scoreComponents: import("zod").ZodObject<{
482
+ baseScore: import("zod").ZodNumber;
483
+ lScore: import("zod").ZodOptional<import("zod").ZodNumber>;
484
+ timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
485
+ accessPolicy: import("zod").ZodOptional<import("zod").ZodNumber>;
486
+ unverifiedHost: import("zod").ZodOptional<import("zod").ZodNumber>;
487
+ webView: import("zod").ZodOptional<import("zod").ZodNumber>;
488
+ triggeredDetectors: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
489
+ shadowDomPenalty: import("zod").ZodOptional<import("zod").ZodBoolean>;
490
+ }, "strip", import("zod").ZodTypeAny, {
491
+ baseScore: number;
492
+ lScore?: number | undefined;
493
+ timeout?: number | undefined;
494
+ accessPolicy?: number | undefined;
495
+ unverifiedHost?: number | undefined;
496
+ webView?: number | undefined;
497
+ triggeredDetectors?: number[] | undefined;
498
+ shadowDomPenalty?: boolean | undefined;
499
+ }, {
500
+ baseScore: number;
501
+ lScore?: number | undefined;
502
+ timeout?: number | undefined;
503
+ accessPolicy?: number | undefined;
504
+ unverifiedHost?: number | undefined;
505
+ webView?: number | undefined;
506
+ triggeredDetectors?: number[] | undefined;
507
+ shadowDomPenalty?: boolean | undefined;
508
+ }>;
509
+ providerSelectEntropy: import("zod").ZodNumber;
510
+ ipAddress: import("zod").ZodObject<{
511
+ lower: import("zod").ZodBigInt;
512
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
513
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
514
+ }, "strip", import("zod").ZodTypeAny, {
515
+ type: IpAddressType;
516
+ lower: bigint;
517
+ upper?: bigint | undefined;
518
+ }, {
519
+ type: IpAddressType;
520
+ lower: bigint;
521
+ upper?: bigint | undefined;
522
+ }>;
523
+ captchaType: import("zod").ZodNativeEnum<typeof CaptchaType>;
524
+ mode: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof ModeEnum>>;
525
+ solvedImagesCount: import("zod").ZodOptional<import("zod").ZodNumber>;
526
+ powDifficulty: import("zod").ZodOptional<import("zod").ZodNumber>;
527
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
528
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
529
+ pendingStage: import("zod").ZodOptional<import("zod").ZodBoolean>;
530
+ deleted: import("zod").ZodOptional<import("zod").ZodBoolean>;
531
+ userSitekeyIpHash: import("zod").ZodOptional<import("zod").ZodString>;
532
+ webView: import("zod").ZodBoolean;
533
+ iFrame: import("zod").ZodBoolean;
534
+ decryptedHeadHash: import("zod").ZodString;
535
+ siteKey: import("zod").ZodOptional<import("zod").ZodString>;
536
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, FrictionlessReason | undefined, string | undefined>;
537
+ blocked: import("zod").ZodOptional<import("zod").ZodBoolean>;
538
+ ipInfo: import("zod").ZodOptional<import("zod").ZodAny>;
539
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
540
+ result: import("zod").ZodOptional<import("zod").ZodObject<{
541
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
542
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
543
+ error: import("zod").ZodOptional<import("zod").ZodString>;
544
+ }, "strip", import("zod").ZodTypeAny, {
545
+ status: CaptchaStatus;
546
+ error?: string | undefined;
547
+ reason?: ResultReason | undefined;
548
+ }, {
549
+ status: CaptchaStatus;
550
+ error?: string | undefined;
551
+ reason?: string | undefined;
552
+ }>>;
553
+ userSubmitted: import("zod").ZodOptional<import("zod").ZodBoolean>;
554
+ serverChecked: import("zod").ZodOptional<import("zod").ZodBoolean>;
555
+ simdReadings: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{
556
+ supported: import("zod").ZodLiteral<false>;
557
+ reason: import("zod").ZodString;
558
+ }, "strip", import("zod").ZodTypeAny, {
559
+ reason: string;
560
+ supported: false;
561
+ }, {
562
+ reason: string;
563
+ supported: false;
564
+ }>, import("zod").ZodObject<{
565
+ supported: import("zod").ZodLiteral<true>;
566
+ schema: import("zod").ZodNumber;
567
+ timerResolutionMs: import("zod").ZodNumber;
568
+ runsPerOp: import("zod").ZodNumber;
569
+ durationMs: import("zod").ZodNumber;
570
+ ops: import("zod").ZodArray<import("zod").ZodObject<{
571
+ name: import("zod").ZodString;
572
+ category: import("zod").ZodNativeEnum<{
573
+ readonly FP: "FP";
574
+ readonly INT: "INT";
575
+ readonly BIT: "BIT";
576
+ readonly PERM: "PERM";
577
+ }>;
578
+ bestNs: import("zod").ZodNumber;
579
+ medianNs: import("zod").ZodNumber;
580
+ iters: import("zod").ZodNumber;
581
+ resultLane: import("zod").ZodNumber;
582
+ }, "strip", import("zod").ZodTypeAny, {
583
+ name: string;
584
+ category: "FP" | "INT" | "BIT" | "PERM";
585
+ bestNs: number;
586
+ medianNs: number;
587
+ iters: number;
588
+ resultLane: number;
589
+ }, {
590
+ name: string;
591
+ category: "FP" | "INT" | "BIT" | "PERM";
592
+ bestNs: number;
593
+ medianNs: number;
594
+ iters: number;
595
+ resultLane: number;
596
+ }>, "many">;
597
+ }, "strip", import("zod").ZodTypeAny, {
598
+ supported: true;
599
+ schema: number;
600
+ timerResolutionMs: number;
601
+ runsPerOp: number;
602
+ durationMs: number;
603
+ ops: {
604
+ name: string;
605
+ category: "FP" | "INT" | "BIT" | "PERM";
606
+ bestNs: number;
607
+ medianNs: number;
608
+ iters: number;
609
+ resultLane: number;
610
+ }[];
611
+ }, {
612
+ supported: true;
613
+ schema: number;
614
+ timerResolutionMs: number;
615
+ runsPerOp: number;
616
+ durationMs: number;
617
+ ops: {
618
+ name: string;
619
+ category: "FP" | "INT" | "BIT" | "PERM";
620
+ bestNs: number;
621
+ medianNs: number;
622
+ iters: number;
623
+ resultLane: number;
624
+ }[];
625
+ }>]>>;
626
+ simdReadingsStage: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof SimdReadingsStage>>;
627
+ dnsEvent: import("zod").ZodOptional<import("zod").ZodObject<{
628
+ resolverIp: import("zod").ZodOptional<import("zod").ZodString>;
629
+ peerIp: import("zod").ZodOptional<import("zod").ZodString>;
630
+ pathValid: import("zod").ZodOptional<import("zod").ZodBoolean>;
631
+ receivedAt: import("zod").ZodDate;
632
+ }, "strip", import("zod").ZodTypeAny, {
633
+ receivedAt: Date;
634
+ resolverIp?: string | undefined;
635
+ peerIp?: string | undefined;
636
+ pathValid?: boolean | undefined;
637
+ }, {
638
+ receivedAt: Date;
639
+ resolverIp?: string | undefined;
640
+ peerIp?: string | undefined;
641
+ pathValid?: boolean | undefined;
642
+ }>>;
643
+ }, "strip", import("zod").ZodTypeAny, {
644
+ threshold: number;
645
+ captchaType: CaptchaType;
646
+ token: string;
647
+ sessionId: string;
648
+ score: number;
649
+ createdAt: Date;
650
+ ipAddress: {
651
+ type: IpAddressType;
652
+ lower: bigint;
653
+ upper?: bigint | undefined;
654
+ };
655
+ headers: {} & {
656
+ [k: string]: string;
657
+ };
658
+ webView: boolean;
659
+ scoreComponents: {
660
+ baseScore: number;
661
+ lScore?: number | undefined;
662
+ timeout?: number | undefined;
663
+ accessPolicy?: number | undefined;
664
+ unverifiedHost?: number | undefined;
665
+ webView?: number | undefined;
666
+ triggeredDetectors?: number[] | undefined;
667
+ shadowDomPenalty?: boolean | undefined;
668
+ };
669
+ providerSelectEntropy: number;
670
+ iFrame: boolean;
671
+ decryptedHeadHash: string;
672
+ powDifficulty?: number | undefined;
673
+ userSubmitted?: boolean | undefined;
674
+ serverChecked?: boolean | undefined;
675
+ siteKey?: string | undefined;
676
+ simdReadings?: {
677
+ reason: string;
678
+ supported: false;
679
+ } | {
680
+ supported: true;
681
+ schema: number;
682
+ timerResolutionMs: number;
683
+ runsPerOp: number;
684
+ durationMs: number;
685
+ ops: {
686
+ name: string;
687
+ category: "FP" | "INT" | "BIT" | "PERM";
688
+ bestNs: number;
689
+ medianNs: number;
690
+ iters: number;
691
+ resultLane: number;
692
+ }[];
693
+ } | undefined;
694
+ mode?: ModeEnum | undefined;
695
+ reason?: FrictionlessReason | undefined;
696
+ solvedImagesCount?: number | undefined;
697
+ result?: {
698
+ status: CaptchaStatus;
699
+ error?: string | undefined;
700
+ reason?: ResultReason | undefined;
701
+ } | undefined;
702
+ storedAtTimestamp?: Date | undefined;
703
+ lastUpdatedTimestamp?: Date | undefined;
704
+ pendingStage?: boolean | undefined;
705
+ ipInfo?: any;
706
+ deleted?: boolean | undefined;
707
+ userSitekeyIpHash?: string | undefined;
708
+ blocked?: boolean | undefined;
709
+ simdReadingsStage?: SimdReadingsStage | undefined;
710
+ dnsEvent?: {
711
+ receivedAt: Date;
712
+ resolverIp?: string | undefined;
713
+ peerIp?: string | undefined;
714
+ pathValid?: boolean | undefined;
715
+ } | undefined;
716
+ }, {
717
+ threshold: number;
718
+ captchaType: CaptchaType;
719
+ token: string;
720
+ sessionId: string;
721
+ score: number;
722
+ createdAt: Date;
723
+ ipAddress: {
724
+ type: IpAddressType;
725
+ lower: bigint;
726
+ upper?: bigint | undefined;
727
+ };
728
+ headers: {} & {
729
+ [k: string]: string;
730
+ };
731
+ webView: boolean;
732
+ scoreComponents: {
733
+ baseScore: number;
734
+ lScore?: number | undefined;
735
+ timeout?: number | undefined;
736
+ accessPolicy?: number | undefined;
737
+ unverifiedHost?: number | undefined;
738
+ webView?: number | undefined;
739
+ triggeredDetectors?: number[] | undefined;
740
+ shadowDomPenalty?: boolean | undefined;
741
+ };
742
+ providerSelectEntropy: number;
743
+ iFrame: boolean;
744
+ decryptedHeadHash: string;
745
+ powDifficulty?: number | undefined;
746
+ userSubmitted?: boolean | undefined;
747
+ serverChecked?: boolean | undefined;
748
+ siteKey?: string | undefined;
749
+ simdReadings?: {
750
+ reason: string;
751
+ supported: false;
752
+ } | {
753
+ supported: true;
754
+ schema: number;
755
+ timerResolutionMs: number;
756
+ runsPerOp: number;
757
+ durationMs: number;
758
+ ops: {
759
+ name: string;
760
+ category: "FP" | "INT" | "BIT" | "PERM";
761
+ bestNs: number;
762
+ medianNs: number;
763
+ iters: number;
764
+ resultLane: number;
765
+ }[];
766
+ } | undefined;
767
+ mode?: ModeEnum | undefined;
768
+ reason?: string | undefined;
769
+ solvedImagesCount?: number | undefined;
770
+ result?: {
771
+ status: CaptchaStatus;
772
+ error?: string | undefined;
773
+ reason?: string | undefined;
774
+ } | undefined;
775
+ storedAtTimestamp?: Date | undefined;
776
+ lastUpdatedTimestamp?: Date | undefined;
777
+ pendingStage?: boolean | undefined;
778
+ ipInfo?: any;
779
+ deleted?: boolean | undefined;
780
+ userSitekeyIpHash?: string | undefined;
781
+ blocked?: boolean | undefined;
782
+ simdReadingsStage?: SimdReadingsStage | undefined;
783
+ dnsEvent?: {
784
+ receivedAt: Date;
785
+ resolverIp?: string | undefined;
786
+ peerIp?: string | undefined;
787
+ pathValid?: boolean | undefined;
788
+ } | undefined;
789
+ }>;
790
+ export type Session = {
791
+ sessionId: string;
792
+ createdAt: Date;
793
+ token: string;
794
+ score: number;
795
+ threshold: number;
796
+ scoreComponents: ScoreComponents;
797
+ providerSelectEntropy: number;
798
+ ipAddress: CompositeIpAddress;
799
+ captchaType: CaptchaType;
800
+ mode?: ModeEnum;
801
+ solvedImagesCount?: number;
802
+ powDifficulty?: number;
803
+ storedAtTimestamp?: Date;
804
+ lastUpdatedTimestamp?: Date;
805
+ pendingStage?: boolean;
806
+ deleted?: boolean;
807
+ userSitekeyIpHash?: string;
808
+ webView: boolean;
809
+ iFrame: boolean;
810
+ decryptedHeadHash: string;
811
+ siteKey?: string;
812
+ reason?: FrictionlessReason;
813
+ blocked?: boolean;
814
+ ipInfo?: IPInfoResponse;
815
+ headers?: RequestHeaders;
816
+ result?: {
817
+ status: CaptchaStatus;
818
+ reason?: ResultReason;
819
+ error?: string;
820
+ };
821
+ userSubmitted?: boolean;
822
+ serverChecked?: boolean;
823
+ simdReadings?: SimdReadings;
824
+ simdReadingsStage?: SimdReadingsStage;
825
+ dnsEvent?: {
826
+ resolverIp?: string;
827
+ peerIp?: string;
828
+ pathValid?: boolean;
829
+ receivedAt: Date;
830
+ };
831
+ };
832
+ export declare const PoWCaptchaStoredSchema: import("zod").ZodObject<{
833
+ challenge: ZodType<`${number}___${string}___${string}`, ZodTypeDef, `${number}___${string}___${string}`>;
834
+ difficulty: import("zod").ZodNumber;
835
+ providerSignature: import("zod").ZodString;
836
+ userSignature: import("zod").ZodOptional<import("zod").ZodString>;
837
+ score: import("zod").ZodOptional<import("zod").ZodNumber>;
838
+ userAccount: import("zod").ZodString;
839
+ dappAccount: import("zod").ZodString;
840
+ result: import("zod").ZodObject<{
841
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
842
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
843
+ error: import("zod").ZodOptional<import("zod").ZodString>;
844
+ }, "strip", import("zod").ZodTypeAny, {
845
+ status: CaptchaStatus;
846
+ error?: string | undefined;
847
+ reason?: ResultReason | undefined;
848
+ }, {
849
+ status: CaptchaStatus;
850
+ error?: string | undefined;
851
+ reason?: string | undefined;
852
+ }>;
853
+ requestedAtTimestamp: import("zod").ZodDate;
854
+ ipAddress: import("zod").ZodObject<{
855
+ lower: import("zod").ZodBigInt;
856
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
857
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
858
+ }, "strip", import("zod").ZodTypeAny, {
859
+ type: IpAddressType;
860
+ lower: bigint;
861
+ upper?: bigint | undefined;
862
+ }, {
863
+ type: IpAddressType;
864
+ lower: bigint;
865
+ upper?: bigint | undefined;
866
+ }>;
867
+ providedIp: import("zod").ZodOptional<import("zod").ZodObject<{
868
+ lower: import("zod").ZodBigInt;
869
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
870
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
871
+ }, "strip", import("zod").ZodTypeAny, {
872
+ type: IpAddressType;
873
+ lower: bigint;
874
+ upper?: bigint | undefined;
875
+ }, {
876
+ type: IpAddressType;
877
+ lower: bigint;
878
+ upper?: bigint | undefined;
879
+ }>>;
880
+ metadata: import("zod").ZodOptional<import("zod").ZodObject<{
881
+ email: import("zod").ZodOptional<import("zod").ZodString>;
882
+ }, "strip", import("zod").ZodTypeAny, {
883
+ email?: string | undefined;
884
+ }, {
885
+ email?: string | undefined;
886
+ }>>;
887
+ clientMetaData: import("zod").ZodOptional<import("zod").ZodObject<{
888
+ hp: import("zod").ZodOptional<import("zod").ZodString>;
889
+ }, "strip", import("zod").ZodTypeAny, {
890
+ hp?: string | undefined;
891
+ }, {
892
+ hp?: string | undefined;
893
+ }>>;
894
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
895
+ ja4: import("zod").ZodString;
896
+ userSubmitted: import("zod").ZodBoolean;
897
+ serverChecked: import("zod").ZodBoolean;
898
+ ipInfo: import("zod").ZodOptional<import("zod").ZodAny>;
899
+ parsedUserAgentInfo: import("zod").ZodOptional<import("zod").ZodAny>;
900
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
901
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
902
+ sessionId: import("zod").ZodOptional<import("zod").ZodString>;
903
+ coords: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodTuple<[import("zod").ZodNumber, import("zod").ZodNumber], null>, "many">, "many">>;
904
+ 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">>;
905
+ 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">>;
906
+ 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">>;
907
+ deviceCapability: import("zod").ZodOptional<import("zod").ZodString>;
908
+ behavioralDataPacked: import("zod").ZodOptional<import("zod").ZodObject<{
909
+ c1: import("zod").ZodArray<import("zod").ZodAny, "many">;
910
+ c2: import("zod").ZodArray<import("zod").ZodAny, "many">;
911
+ c3: import("zod").ZodArray<import("zod").ZodAny, "many">;
912
+ d: import("zod").ZodString;
913
+ }, "strip", import("zod").ZodTypeAny, {
914
+ c1: any[];
915
+ c2: any[];
916
+ c3: any[];
917
+ d: string;
918
+ }, {
919
+ c1: any[];
920
+ c2: any[];
921
+ c3: any[];
922
+ d: string;
923
+ }>>;
924
+ label: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaLabel>>;
925
+ labelReason: import("zod").ZodOptional<import("zod").ZodString>;
926
+ labelledBy: import("zod").ZodOptional<import("zod").ZodString>;
927
+ labelledAt: import("zod").ZodOptional<import("zod").ZodDate>;
928
+ }, "strip", import("zod").ZodTypeAny, {
929
+ userSubmitted: boolean;
930
+ serverChecked: boolean;
931
+ challenge: `${number}___${string}___${string}`;
932
+ difficulty: number;
933
+ userAccount: string;
934
+ dappAccount: string;
935
+ result: {
936
+ status: CaptchaStatus;
937
+ error?: string | undefined;
938
+ reason?: ResultReason | undefined;
939
+ };
940
+ ipAddress: {
941
+ type: IpAddressType;
942
+ lower: bigint;
943
+ upper?: bigint | undefined;
944
+ };
945
+ headers: {} & {
946
+ [k: string]: string;
947
+ };
948
+ ja4: string;
949
+ requestedAtTimestamp: Date;
950
+ providerSignature: string;
951
+ label?: CaptchaLabel | undefined;
952
+ sessionId?: string | undefined;
953
+ score?: number | undefined;
954
+ clientMetaData?: {
955
+ hp?: string | undefined;
956
+ } | undefined;
957
+ userSignature?: string | undefined;
958
+ providedIp?: {
959
+ type: IpAddressType;
960
+ lower: bigint;
961
+ upper?: bigint | undefined;
962
+ } | undefined;
963
+ metadata?: {
964
+ email?: string | undefined;
965
+ } | undefined;
966
+ storedAtTimestamp?: Date | undefined;
967
+ lastUpdatedTimestamp?: Date | undefined;
968
+ coords?: [number, number][][] | undefined;
969
+ deviceCapability?: string | undefined;
970
+ behavioralDataPacked?: {
971
+ c1: any[];
972
+ c2: any[];
973
+ c3: any[];
974
+ d: string;
975
+ } | undefined;
976
+ labelReason?: string | undefined;
977
+ labelledBy?: string | undefined;
978
+ labelledAt?: Date | undefined;
979
+ ipInfo?: any;
980
+ parsedUserAgentInfo?: any;
981
+ mouseEvents?: import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">[] | undefined;
982
+ touchEvents?: import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">[] | undefined;
983
+ clickEvents?: import("zod").objectOutputType<{}, import("zod").ZodAny, "strip">[] | undefined;
984
+ }, {
985
+ userSubmitted: boolean;
986
+ serverChecked: boolean;
987
+ challenge: `${number}___${string}___${string}`;
988
+ difficulty: number;
989
+ userAccount: string;
990
+ dappAccount: string;
991
+ result: {
992
+ status: CaptchaStatus;
993
+ error?: string | undefined;
994
+ reason?: string | undefined;
995
+ };
996
+ ipAddress: {
997
+ type: IpAddressType;
998
+ lower: bigint;
999
+ upper?: bigint | undefined;
1000
+ };
1001
+ headers: {} & {
1002
+ [k: string]: string;
1003
+ };
1004
+ ja4: string;
1005
+ requestedAtTimestamp: Date;
1006
+ providerSignature: string;
1007
+ label?: CaptchaLabel | undefined;
1008
+ sessionId?: string | undefined;
1009
+ score?: number | undefined;
1010
+ clientMetaData?: {
1011
+ hp?: string | undefined;
1012
+ } | undefined;
1013
+ userSignature?: string | undefined;
1014
+ providedIp?: {
1015
+ type: IpAddressType;
1016
+ lower: bigint;
1017
+ upper?: bigint | undefined;
1018
+ } | undefined;
1019
+ metadata?: {
1020
+ email?: string | undefined;
1021
+ } | undefined;
1022
+ storedAtTimestamp?: Date | undefined;
1023
+ lastUpdatedTimestamp?: Date | undefined;
1024
+ coords?: [number, number][][] | undefined;
1025
+ deviceCapability?: string | undefined;
1026
+ behavioralDataPacked?: {
1027
+ c1: any[];
1028
+ c2: any[];
1029
+ c3: any[];
1030
+ d: string;
1031
+ } | undefined;
1032
+ labelReason?: string | undefined;
1033
+ labelledBy?: string | undefined;
1034
+ labelledAt?: Date | undefined;
1035
+ ipInfo?: any;
1036
+ parsedUserAgentInfo?: any;
1037
+ mouseEvents?: import("zod").objectInputType<{}, import("zod").ZodAny, "strip">[] | undefined;
1038
+ touchEvents?: import("zod").objectInputType<{}, import("zod").ZodAny, "strip">[] | undefined;
1039
+ clickEvents?: import("zod").objectInputType<{}, import("zod").ZodAny, "strip">[] | undefined;
1040
+ }>;
1041
+ export type PendingImageCaptchaRequest = {
1042
+ dappAccount: string;
1043
+ pending: boolean;
1044
+ salt: string;
1045
+ requestHash: string;
1046
+ deadlineTimestamp: Date;
1047
+ requestedAtTimestamp: Date;
1048
+ ipAddress: CompositeIpAddress;
1049
+ sessionId?: string;
1050
+ threshold: number;
1051
+ };
1052
+ export interface PoWCaptchaStored extends Omit<PoWCaptchaUser, "requestedAtTimestamp">, StoredCaptcha {
1053
+ }
1054
+ export interface PuzzleCaptchaStored extends StoredCaptcha {
1055
+ challenge: PoWChallengeId;
1056
+ targetX: number;
1057
+ targetY: number;
1058
+ originX: number;
1059
+ originY: number;
1060
+ tolerance: number;
1061
+ providerSignature: string;
1062
+ userSignature?: string;
1063
+ userAccount: string;
1064
+ dappAccount: string;
1065
+ puzzleEvents?: PuzzleEvent[];
1066
+ }
1067
+ export interface SolutionRecord extends CaptchaSolution {
1068
+ datasetId: string;
1069
+ datasetContentId: string;
1070
+ }
1071
+ export declare const UserSolutionSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1072
+ captchaId: import("zod").ZodString;
1073
+ captchaContentId: import("zod").ZodString;
1074
+ solution: import("zod").ZodArray<import("zod").ZodString, "many">;
1075
+ salt: import("zod").ZodString;
1076
+ }, {
1077
+ processed: import("zod").ZodBoolean;
1078
+ checked: import("zod").ZodBoolean;
1079
+ commitmentId: import("zod").ZodString;
1080
+ createdAt: import("zod").ZodDate;
1081
+ }>, "strip", import("zod").ZodTypeAny, {
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
+ captchaId: string;
1092
+ captchaContentId: string;
1093
+ salt: string;
1094
+ solution: string[];
1095
+ commitmentId: string;
1096
+ createdAt: Date;
1097
+ processed: boolean;
1098
+ checked: boolean;
1099
+ }>;
1100
+ export type UserSolution = zInfer<typeof UserSolutionSchema>;
1101
+ export declare const UserCommitmentWithSolutionsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1102
+ userAccount: import("zod").ZodString;
1103
+ dappAccount: import("zod").ZodString;
1104
+ datasetId: import("zod").ZodString;
1105
+ providerAccount: import("zod").ZodString;
1106
+ id: import("zod").ZodString;
1107
+ result: import("zod").ZodObject<{
1108
+ status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
1109
+ reason: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, ResultReason | undefined, string | undefined>;
1110
+ error: import("zod").ZodOptional<import("zod").ZodString>;
1111
+ }, "strip", import("zod").ZodTypeAny, {
1112
+ status: CaptchaStatus;
1113
+ error?: string | undefined;
1114
+ reason?: ResultReason | undefined;
1115
+ }, {
1116
+ status: CaptchaStatus;
1117
+ error?: string | undefined;
1118
+ reason?: string | undefined;
1119
+ }>;
1120
+ userSignature: import("zod").ZodString;
1121
+ ipAddress: import("zod").ZodObject<{
1122
+ lower: import("zod").ZodBigInt;
1123
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
1124
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
1125
+ }, "strip", import("zod").ZodTypeAny, {
1126
+ type: IpAddressType;
1127
+ lower: bigint;
1128
+ upper?: bigint | undefined;
1129
+ }, {
1130
+ type: IpAddressType;
1131
+ lower: bigint;
1132
+ upper?: bigint | undefined;
1133
+ }>;
1134
+ providedIp: import("zod").ZodOptional<import("zod").ZodObject<{
1135
+ lower: import("zod").ZodBigInt;
1136
+ upper: import("zod").ZodOptional<import("zod").ZodBigInt>;
1137
+ type: import("zod").ZodNativeEnum<typeof IpAddressType>;
1138
+ }, "strip", import("zod").ZodTypeAny, {
1139
+ type: IpAddressType;
1140
+ lower: bigint;
1141
+ upper?: bigint | undefined;
1142
+ }, {
1143
+ type: IpAddressType;
1144
+ lower: bigint;
1145
+ upper?: bigint | undefined;
1146
+ }>>;
1147
+ metadata: import("zod").ZodOptional<import("zod").ZodObject<{
1148
+ email: import("zod").ZodOptional<import("zod").ZodString>;
1149
+ }, "strip", import("zod").ZodTypeAny, {
1150
+ email?: string | undefined;
1151
+ }, {
1152
+ email?: string | undefined;
1153
+ }>>;
1154
+ clientMetaData: import("zod").ZodOptional<import("zod").ZodObject<{
1155
+ hp: import("zod").ZodOptional<import("zod").ZodString>;
1156
+ }, "strip", import("zod").ZodTypeAny, {
1157
+ hp?: string | undefined;
1158
+ }, {
1159
+ hp?: string | undefined;
1160
+ }>>;
1161
+ headers: import("zod").ZodObject<{}, "strip", import("zod").ZodString, import("zod").objectOutputType<{}, import("zod").ZodString, "strip">, import("zod").objectInputType<{}, import("zod").ZodString, "strip">>;
1162
+ ja4: import("zod").ZodString;
1163
+ userSubmitted: import("zod").ZodBoolean;
1164
+ serverChecked: import("zod").ZodBoolean;
1165
+ storedAtTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
1166
+ requestedAtTimestamp: import("zod").ZodDate;
1167
+ lastUpdatedTimestamp: import("zod").ZodOptional<import("zod").ZodDate>;
1168
+ pendingStage: import("zod").ZodOptional<import("zod").ZodBoolean>;
1169
+ sessionId: import("zod").ZodOptional<import("zod").ZodString>;
1170
+ coords: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodTuple<[import("zod").ZodNumber, import("zod").ZodNumber], null>, "many">, "many">>;
1171
+ pending: import("zod").ZodBoolean;
1172
+ salt: import("zod").ZodString;
1173
+ requestHash: import("zod").ZodString;
1174
+ deadlineTimestamp: import("zod").ZodDate;
1175
+ threshold: import("zod").ZodNumber;
1176
+ deviceCapability: import("zod").ZodOptional<import("zod").ZodString>;
1177
+ behavioralDataPacked: import("zod").ZodOptional<import("zod").ZodObject<{
1178
+ c1: import("zod").ZodArray<import("zod").ZodAny, "many">;
1179
+ c2: import("zod").ZodArray<import("zod").ZodAny, "many">;
1180
+ c3: import("zod").ZodArray<import("zod").ZodAny, "many">;
1181
+ d: import("zod").ZodString;
1182
+ }, "strip", import("zod").ZodTypeAny, {
1183
+ c1: any[];
1184
+ c2: any[];
1185
+ c3: any[];
1186
+ d: string;
1187
+ }, {
1188
+ c1: any[];
1189
+ c2: any[];
1190
+ c3: any[];
1191
+ d: string;
1192
+ }>>;
1193
+ label: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaLabel>>;
1194
+ labelReason: import("zod").ZodOptional<import("zod").ZodString>;
1195
+ labelledBy: import("zod").ZodOptional<import("zod").ZodString>;
1196
+ labelledAt: import("zod").ZodOptional<import("zod").ZodDate>;
1197
+ }, {
1198
+ captchas: import("zod").ZodArray<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
1199
+ captchaId: import("zod").ZodString;
1200
+ captchaContentId: import("zod").ZodString;
1201
+ solution: import("zod").ZodArray<import("zod").ZodString, "many">;
1202
+ salt: import("zod").ZodString;
1203
+ }, {
1204
+ processed: import("zod").ZodBoolean;
1205
+ checked: import("zod").ZodBoolean;
1206
+ commitmentId: import("zod").ZodString;
1207
+ createdAt: import("zod").ZodDate;
1208
+ }>, "strip", import("zod").ZodTypeAny, {
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
+ }, {
1218
+ captchaId: string;
1219
+ captchaContentId: string;
1220
+ salt: string;
1221
+ solution: string[];
1222
+ commitmentId: string;
1223
+ createdAt: Date;
1224
+ processed: boolean;
1225
+ checked: boolean;
1226
+ }>, "many">;
1227
+ }>, "strip", import("zod").ZodTypeAny, {
1228
+ threshold: number;
1229
+ salt: string;
1230
+ captchas: {
1231
+ captchaId: string;
1232
+ captchaContentId: string;
1233
+ salt: string;
1234
+ solution: string[];
1235
+ commitmentId: string;
1236
+ createdAt: Date;
1237
+ processed: boolean;
1238
+ checked: boolean;
1239
+ }[];
1240
+ userSubmitted: boolean;
1241
+ serverChecked: boolean;
1242
+ datasetId: string;
1243
+ requestHash: string;
1244
+ userAccount: string;
1245
+ pending: boolean;
1246
+ dappAccount: string;
1247
+ providerAccount: string;
1248
+ id: string;
1249
+ result: {
1250
+ status: CaptchaStatus;
1251
+ error?: string | undefined;
1252
+ reason?: ResultReason | undefined;
1253
+ };
1254
+ userSignature: string;
1255
+ ipAddress: {
1256
+ type: IpAddressType;
1257
+ lower: bigint;
1258
+ upper?: bigint | undefined;
1259
+ };
1260
+ headers: {} & {
1261
+ [k: string]: string;
1262
+ };
1263
+ ja4: string;
1264
+ requestedAtTimestamp: Date;
1265
+ deadlineTimestamp: Date;
1266
+ label?: CaptchaLabel | undefined;
1267
+ sessionId?: string | undefined;
1268
+ clientMetaData?: {
1269
+ hp?: string | undefined;
1270
+ } | undefined;
1271
+ providedIp?: {
1272
+ type: IpAddressType;
1273
+ lower: bigint;
1274
+ upper?: bigint | undefined;
1275
+ } | undefined;
1276
+ metadata?: {
1277
+ email?: string | undefined;
1278
+ } | undefined;
1279
+ storedAtTimestamp?: Date | undefined;
1280
+ lastUpdatedTimestamp?: Date | undefined;
1281
+ pendingStage?: boolean | undefined;
1282
+ coords?: [number, number][][] | undefined;
1283
+ deviceCapability?: string | undefined;
1284
+ behavioralDataPacked?: {
1285
+ c1: any[];
1286
+ c2: any[];
1287
+ c3: any[];
1288
+ d: string;
1289
+ } | undefined;
1290
+ labelReason?: string | undefined;
1291
+ labelledBy?: string | undefined;
1292
+ labelledAt?: Date | undefined;
1293
+ }, {
1294
+ threshold: number;
1295
+ salt: string;
1296
+ captchas: {
1297
+ captchaId: string;
1298
+ captchaContentId: string;
1299
+ salt: string;
1300
+ solution: string[];
1301
+ commitmentId: string;
1302
+ createdAt: Date;
1303
+ processed: boolean;
1304
+ checked: boolean;
1305
+ }[];
1306
+ userSubmitted: boolean;
1307
+ serverChecked: boolean;
1308
+ datasetId: string;
1309
+ requestHash: string;
1310
+ userAccount: string;
1311
+ pending: boolean;
1312
+ dappAccount: string;
1313
+ providerAccount: string;
1314
+ id: string;
1315
+ result: {
1316
+ status: CaptchaStatus;
1317
+ error?: string | undefined;
1318
+ reason?: string | undefined;
1319
+ };
1320
+ userSignature: string;
1321
+ ipAddress: {
1322
+ type: IpAddressType;
1323
+ lower: bigint;
1324
+ upper?: bigint | undefined;
1325
+ };
1326
+ headers: {} & {
1327
+ [k: string]: string;
1328
+ };
1329
+ ja4: string;
1330
+ requestedAtTimestamp: Date;
1331
+ deadlineTimestamp: Date;
1332
+ label?: CaptchaLabel | undefined;
1333
+ sessionId?: string | undefined;
1334
+ clientMetaData?: {
1335
+ hp?: string | undefined;
1336
+ } | undefined;
1337
+ providedIp?: {
1338
+ type: IpAddressType;
1339
+ lower: bigint;
1340
+ upper?: bigint | undefined;
1341
+ } | undefined;
1342
+ metadata?: {
1343
+ email?: string | undefined;
1344
+ } | undefined;
1345
+ storedAtTimestamp?: Date | undefined;
1346
+ lastUpdatedTimestamp?: Date | undefined;
1347
+ pendingStage?: boolean | undefined;
1348
+ coords?: [number, number][][] | undefined;
1349
+ deviceCapability?: string | undefined;
1350
+ behavioralDataPacked?: {
1351
+ c1: any[];
1352
+ c2: any[];
1353
+ c3: any[];
1354
+ d: string;
1355
+ } | undefined;
1356
+ labelReason?: string | undefined;
1357
+ labelledBy?: string | undefined;
1358
+ labelledAt?: Date | undefined;
1359
+ }>;
1360
+ export type UserCommitmentWithSolutions = zInfer<typeof UserCommitmentWithSolutionsSchema>;
1361
+ export type DetectorKey = {
1362
+ detectorKey: string;
1363
+ createdAt: Date;
1364
+ expiresAt?: Date;
1365
+ };
1366
+ export type DecisionMachineArtifact = {
1367
+ scope: DecisionMachineScope;
1368
+ dappAccount?: string;
1369
+ runtime: DecisionMachineRuntime;
1370
+ language?: DecisionMachineLanguage;
1371
+ source: string;
1372
+ name?: string;
1373
+ version?: string;
1374
+ captchaType?: CaptchaType.pow | CaptchaType.image | CaptchaType.puzzle;
1375
+ createdAt: Date;
1376
+ updatedAt: Date;
1377
+ };
1378
+ export type ClientContextEntropy = {
1379
+ account: string;
1380
+ contextType: ContextType;
1381
+ entropy: string;
1382
+ createdAt: Date;
1383
+ updatedAt: Date;
1384
+ };
1385
+ //# sourceMappingURL=database.d.ts.map