@prosopo/types-database 4.0.5 → 4.1.5

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 (40) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +45 -0
  2. package/.turbo/turbo-build$colon$tsc.log +41 -0
  3. package/.turbo/turbo-build.log +49 -0
  4. package/CHANGELOG.md +85 -0
  5. package/dist/cjs/index.cjs +1 -1
  6. package/dist/cjs/types/client.cjs +13 -1
  7. package/dist/cjs/types/index.cjs +1 -1
  8. package/dist/cjs/types/provider.cjs +36 -11
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +2 -2
  12. package/dist/index.js.map +1 -0
  13. package/dist/provider/pendingCaptchaRequest.d.ts +14 -0
  14. package/dist/provider/pendingCaptchaRequest.d.ts.map +1 -0
  15. package/dist/provider/pendingCaptchaRequest.js +2 -0
  16. package/dist/provider/pendingCaptchaRequest.js.map +1 -0
  17. package/dist/types/captcha.d.ts +18 -0
  18. package/dist/types/captcha.d.ts.map +1 -0
  19. package/dist/types/captcha.js.map +1 -0
  20. package/dist/types/client.d.ts +271 -0
  21. package/dist/types/client.d.ts.map +1 -0
  22. package/dist/types/client.js +15 -3
  23. package/dist/types/client.js.map +1 -0
  24. package/dist/types/index.d.ts +6 -0
  25. package/dist/types/index.d.ts.map +1 -0
  26. package/dist/types/index.js +2 -2
  27. package/dist/types/index.js.map +1 -0
  28. package/dist/types/mongo.d.ts +13 -0
  29. package/dist/types/mongo.d.ts.map +1 -0
  30. package/dist/types/mongo.js.map +1 -0
  31. package/dist/types/provider.d.ts +702 -0
  32. package/dist/types/provider.d.ts.map +1 -0
  33. package/dist/types/provider.js +37 -12
  34. package/dist/types/provider.js.map +1 -0
  35. package/dist/types/userAgent.d.ts +31 -0
  36. package/dist/types/userAgent.d.ts.map +1 -0
  37. package/dist/types/userAgent.js.map +1 -0
  38. package/package.json +8 -7
  39. package/vite.cjs.config.ts +1 -1
  40. package/vite.esm.config.ts +1 -1
@@ -0,0 +1,45 @@
1
+
2
+ > @prosopo/types-database@4.1.5 build:cjs
3
+ > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
+
5
+ ViteCommonJSConfig: .
6
+ {
7
+ tsConfigPaths: [
8
+ '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
9
+ '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
10
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
11
+ '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
12
+ '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
13
+ '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json',
14
+ '/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json',
15
+ '/home/runner/work/captcha/captcha/packages/redis-client/tsconfig.json',
16
+ '/home/runner/work/captcha/captcha/packages/api/tsconfig.json'
17
+ ]
18
+ }
19
+ {
20
+ externals: [
21
+ '@prosopo/common',
22
+ '@prosopo/locale',
23
+ '@prosopo/types',
24
+ '@prosopo/util',
25
+ '@prosopo/util-crypto',
26
+ '@prosopo/user-access-policy',
27
+ '@prosopo/api-route',
28
+ '@prosopo/redis-client',
29
+ '@prosopo/api'
30
+ ]
31
+ }
32
+ vite v6.4.1 building SSR bundle for production...
33
+ Bundle build started
34
+ transforming...
35
+ Build end
36
+ ✓ 7 modules transformed.
37
+ rendering chunks...
38
+ dist/cjs/types/mongo.cjs  0.01 kB
39
+ dist/cjs/types/userAgent.cjs  0.01 kB
40
+ dist/cjs/types/captcha.cjs  0.77 kB
41
+ dist/cjs/index.cjs  2.10 kB
42
+ dist/cjs/types/index.cjs  2.10 kB
43
+ dist/cjs/types/client.cjs  4.01 kB
44
+ dist/cjs/types/provider.cjs 14.70 kB
45
+ ✓ built in 255ms
@@ -0,0 +1,41 @@
1
+
2
+ > @prosopo/types-database@4.1.5 build:tsc
3
+ > tsc --build --verbose
4
+
5
+ 4:57:18 PM - Projects in this build:
6
+ * ../../dev/config/tsconfig.json
7
+ * ../locale/tsconfig.json
8
+ * ../util/tsconfig.json
9
+ * ../util-crypto/tsconfig.json
10
+ * ../types/tsconfig.json
11
+ * ../common/tsconfig.json
12
+ * ../api-route/tsconfig.json
13
+ * ../redis-client/tsconfig.json
14
+ * ../api/tsconfig.json
15
+ * ../user-access-policy/tsconfig.json
16
+ * tsconfig.json
17
+
18
+ 4:57:18 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/dependencies.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
19
+
20
+ 4:57:18 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
21
+
22
+ 4:57:18 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/verifyRecency.ts' is older than output '../util/tsconfig.tsbuildinfo'
23
+
24
+ 4:57:18 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
25
+
26
+ 4:57:18 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
27
+
28
+ 4:57:18 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/logger.ts' is older than output '../common/tsconfig.tsbuildinfo'
29
+
30
+ 4:57:18 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
31
+
32
+ 4:57:18 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
33
+
34
+ 4:57:18 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
35
+
36
+ 4:57:18 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
37
+
38
+ 4:57:18 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
39
+
40
+ 4:57:18 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
41
+
@@ -0,0 +1,49 @@
1
+
2
+ > @prosopo/types-database@4.1.5 build
3
+ > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
+
5
+
6
+ > @prosopo/types-database@4.1.5 build:cross-env
7
+ > vite build --config vite.esm.config.ts --mode production
8
+
9
+ ViteEsmConfig: .
10
+ {
11
+ tsConfigPaths: [
12
+ '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
13
+ '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
14
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
15
+ '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
16
+ '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
17
+ '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json',
18
+ '/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json',
19
+ '/home/runner/work/captcha/captcha/packages/redis-client/tsconfig.json',
20
+ '/home/runner/work/captcha/captcha/packages/api/tsconfig.json'
21
+ ]
22
+ }
23
+ {
24
+ externals: [
25
+ '@prosopo/common',
26
+ '@prosopo/locale',
27
+ '@prosopo/types',
28
+ '@prosopo/util',
29
+ '@prosopo/util-crypto',
30
+ '@prosopo/user-access-policy',
31
+ '@prosopo/api-route',
32
+ '@prosopo/redis-client',
33
+ '@prosopo/api'
34
+ ]
35
+ }
36
+ vite v6.4.1 building SSR bundle for production...
37
+ Bundle build started
38
+ transforming...
39
+ Build end
40
+ ✓ 7 modules transformed.
41
+ rendering chunks...
42
+ dist/types/mongo.js  0.00 kB
43
+ dist/types/userAgent.js  0.00 kB
44
+ dist/types/captcha.js  0.60 kB
45
+ dist/index.js  1.55 kB
46
+ dist/types/index.js  1.55 kB
47
+ dist/types/client.js  3.87 kB
48
+ dist/types/provider.js 13.74 kB
49
+ ✓ built in 262ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,90 @@
1
1
  # @prosopo/types-database
2
2
 
3
+ ## 4.1.5
4
+ ### Patch Changes
5
+
6
+ - 3acc333: Update pow record at verify
7
+ - 3acc333: Fix type
8
+ - 0a38892: feat/cross-os-testing
9
+ - a8faa9a: bump license year
10
+ - 7543d17: mouse movements bot stopping
11
+ - fe9fe22: adding api returns
12
+ - 3acc333: Release 3.3.0
13
+ - Updated dependencies [3acc333]
14
+ - Updated dependencies [0a38892]
15
+ - Updated dependencies [1ee3d80]
16
+ - Updated dependencies [a8faa9a]
17
+ - Updated dependencies [17854a7]
18
+ - Updated dependencies [7543d17]
19
+ - Updated dependencies [fe9fe22]
20
+ - Updated dependencies [3acc333]
21
+ - @prosopo/types@3.8.0
22
+ - @prosopo/user-access-policy@3.6.0
23
+ - @prosopo/common@3.1.28
24
+ - @prosopo/locale@3.1.28
25
+
26
+ ## 4.1.4
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [378a896]
30
+ - Updated dependencies [90fddd8]
31
+ - @prosopo/user-access-policy@3.5.37
32
+
33
+ ## 4.1.3
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [7c475dc]
37
+ - @prosopo/user-access-policy@3.5.36
38
+
39
+ ## 4.1.2
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [141e462]
43
+ - @prosopo/types@3.7.2
44
+ - @prosopo/user-access-policy@3.5.35
45
+
46
+ ## 4.1.1
47
+ ### Patch Changes
48
+
49
+ - 345b25b: pow coord
50
+ - Updated dependencies [345b25b]
51
+ - @prosopo/types@3.7.1
52
+ - @prosopo/user-access-policy@3.5.34
53
+
54
+ ## 4.1.0
55
+ ### Minor Changes
56
+
57
+ - ce70a2b: Add context-aware entropy calculation for WebView and default contexts
58
+
59
+ - Added ContextType enum to distinguish between WebView and default browser contexts
60
+ - Implemented context-specific entropy calculation and storage
61
+ - Created clientContextEntropy collection with automatic timestamp management
62
+ - Removed legacy clientEntropy table in favor of context-specific approach
63
+ - Added helper functions for context determination and threshold retrieval
64
+ - Included comprehensive unit tests for context validation logic
65
+
66
+ ### Patch Changes
67
+
68
+ - c2b940f: Properly save context type settings
69
+ - Updated dependencies [ce70a2b]
70
+ - Updated dependencies [c2b940f]
71
+ - Updated dependencies [f6b5094]
72
+ - Updated dependencies [e01227b]
73
+ - @prosopo/types@3.7.0
74
+ - @prosopo/locale@3.1.27
75
+ - @prosopo/common@3.1.27
76
+ - @prosopo/user-access-policy@3.5.33
77
+
78
+ ## 4.0.6
79
+ ### Patch Changes
80
+
81
+ - 7d5eb3f: bump
82
+ - Updated dependencies [7d5eb3f]
83
+ - @prosopo/common@3.1.26
84
+ - @prosopo/locale@3.1.26
85
+ - @prosopo/types@3.6.4
86
+ - @prosopo/user-access-policy@3.5.32
87
+
3
88
  ## 4.0.5
4
89
  ### Patch Changes
5
90
 
@@ -5,7 +5,7 @@ const provider = require("./types/provider.cjs");
5
5
  const client = require("./types/client.cjs");
6
6
  const captcha = require("./types/captcha.cjs");
7
7
  exports.CaptchaRecordSchema = provider.CaptchaRecordSchema;
8
- exports.ClientEntropyRecordSchema = provider.ClientEntropyRecordSchema;
8
+ exports.ClientContextEntropyRecordSchema = provider.ClientContextEntropyRecordSchema;
9
9
  exports.ClientRecordSchema = provider.ClientRecordSchema;
10
10
  exports.CompositeIpAddressRecordSchemaObj = provider.CompositeIpAddressRecordSchemaObj;
11
11
  exports.CompositeIpAddressSchema = provider.CompositeIpAddressSchema;
@@ -73,7 +73,19 @@ const UserSettingsSchema = new mongoose.Schema({
73
73
  },
74
74
  contextAware: {
75
75
  enabled: { type: Boolean, default: false },
76
- threshold: { type: Number, default: types.contextAwareThresholdDefault }
76
+ contexts: {
77
+ type: mongoose.Schema.Types.Mixed,
78
+ default: {
79
+ [types.ContextType.Default]: {
80
+ type: types.ContextType.Default,
81
+ threshold: types.contextAwareThresholdDefault
82
+ },
83
+ [types.ContextType.Webview]: {
84
+ type: types.ContextType.Webview,
85
+ threshold: types.contextAwareThresholdDefault
86
+ }
87
+ }
88
+ }
77
89
  }
78
90
  });
79
91
  const UserDataSchema = new mongoose.Schema({
@@ -6,7 +6,7 @@ const client = require("./client.cjs");
6
6
  const captcha = require("./captcha.cjs");
7
7
  require("./userAgent.cjs");
8
8
  exports.CaptchaRecordSchema = provider.CaptchaRecordSchema;
9
- exports.ClientEntropyRecordSchema = provider.ClientEntropyRecordSchema;
9
+ exports.ClientContextEntropyRecordSchema = provider.ClientContextEntropyRecordSchema;
10
10
  exports.ClientRecordSchema = provider.ClientRecordSchema;
11
11
  exports.CompositeIpAddressRecordSchemaObj = provider.CompositeIpAddressRecordSchemaObj;
12
12
  exports.CompositeIpAddressSchema = provider.CompositeIpAddressSchema;
@@ -135,13 +135,29 @@ const PoWCaptchaRecordSchema = new mongoose.Schema({
135
135
  type: String,
136
136
  required: false
137
137
  },
138
- coords: { type: [[[Number]]], required: false }
138
+ coords: { type: [[[Number]]], required: false },
139
+ // Legacy fields - kept for backward compatibility with existing data
140
+ mouseEvents: { type: [Object], required: false },
141
+ touchEvents: { type: [Object], required: false },
142
+ clickEvents: { type: [Object], required: false },
143
+ // Current behavioral data storage format (packed)
144
+ deviceCapability: { type: String, required: false },
145
+ behavioralDataPacked: {
146
+ type: {
147
+ c1: { type: [mongoose.Schema.Types.Mixed], required: true },
148
+ c2: { type: [mongoose.Schema.Types.Mixed], required: true },
149
+ c3: { type: [mongoose.Schema.Types.Mixed], required: true },
150
+ d: { type: String, required: true }
151
+ },
152
+ required: false
153
+ }
139
154
  });
140
155
  PoWCaptchaRecordSchema.index({ challenge: 1 });
141
- PoWCaptchaRecordSchema.index({ storedAtTimestamp: 1, lastUpdatedTimestamp: 1 });
156
+ PoWCaptchaRecordSchema.index({ lastUpdatedTimestamp: 1 });
142
157
  PoWCaptchaRecordSchema.index({ dappAccount: 1, requestedAtTimestamp: 1 });
143
158
  PoWCaptchaRecordSchema.index({ "ipAddress.lower": 1 });
144
159
  PoWCaptchaRecordSchema.index({ "ipAddress.upper": 1 });
160
+ PoWCaptchaRecordSchema.index({ "result.reason": 1 });
145
161
  const UserCommitmentRecordSchema = new mongoose.Schema({
146
162
  userAccount: { type: String, required: true },
147
163
  dappAccount: { type: String, required: true },
@@ -181,12 +197,12 @@ const UserCommitmentRecordSchema = new mongoose.Schema({
181
197
  });
182
198
  UserCommitmentRecordSchema.index({ id: -1 });
183
199
  UserCommitmentRecordSchema.index({
184
- storedAtTimestamp: 1,
185
200
  lastUpdatedTimestamp: 1
186
201
  });
187
202
  UserCommitmentRecordSchema.index({ userAccount: 1, dappAccount: 1 });
188
203
  UserCommitmentRecordSchema.index({ "ipAddress.lower": 1 });
189
204
  UserCommitmentRecordSchema.index({ "ipAddress.upper": 1 });
205
+ UserCommitmentRecordSchema.index({ "result.reason": 1 });
190
206
  const DatasetRecordSchema = new mongoose.Schema({
191
207
  contentTree: { type: [[String]], required: true },
192
208
  datasetContentId: { type: String, required: true },
@@ -314,15 +330,24 @@ const DetectorRecordSchema = new mongoose.Schema({
314
330
  });
315
331
  DetectorRecordSchema.index({ createdAt: 1 }, { unique: true });
316
332
  DetectorRecordSchema.index({ expiresAt: 1 }, { expireAfterSeconds: 0 });
317
- const ClientEntropyRecordSchema = new mongoose.Schema({
318
- account: { type: String, required: true, unique: true },
319
- entropy: { type: String, required: true },
320
- createdAt: { type: Date, required: true },
321
- updatedAt: { type: Date, required: true }
322
- });
323
- ClientEntropyRecordSchema.index({ account: 1 }, { unique: true });
333
+ const ClientContextEntropyRecordSchema = new mongoose.Schema(
334
+ {
335
+ account: { type: String, required: true },
336
+ contextType: {
337
+ type: String,
338
+ enum: Object.values(types.ContextType),
339
+ required: true
340
+ },
341
+ entropy: { type: String, required: true }
342
+ },
343
+ { timestamps: { createdAt: true, updatedAt: true } }
344
+ );
345
+ ClientContextEntropyRecordSchema.index(
346
+ { account: 1, contextType: 1 },
347
+ { unique: true }
348
+ );
324
349
  exports.CaptchaRecordSchema = CaptchaRecordSchema;
325
- exports.ClientEntropyRecordSchema = ClientEntropyRecordSchema;
350
+ exports.ClientContextEntropyRecordSchema = ClientContextEntropyRecordSchema;
326
351
  exports.ClientRecordSchema = ClientRecordSchema;
327
352
  exports.CompositeIpAddressRecordSchemaObj = CompositeIpAddressRecordSchemaObj;
328
353
  exports.CompositeIpAddressSchema = CompositeIpAddressSchema;
@@ -0,0 +1,3 @@
1
+ export * from "./types/index.js";
2
+ export type { PendingCaptchaRequest } from "./provider/pendingCaptchaRequest.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import "./types/index.js";
2
- import { CaptchaRecordSchema, ClientEntropyRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, CompositeIpAddressSchema, DatasetRecordSchema, DetectorRecordSchema, IpAddressType, PendingRecordSchema, PoWCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserCommitmentSchema, UserCommitmentWithSolutionsSchema, UserSolutionRecordSchema, UserSolutionSchema, parseMongooseCompositeIpAddress } from "./types/provider.js";
2
+ import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, CompositeIpAddressSchema, DatasetRecordSchema, DetectorRecordSchema, IpAddressType, PendingRecordSchema, PoWCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserCommitmentSchema, UserCommitmentWithSolutionsSchema, UserSolutionRecordSchema, UserSolutionSchema, parseMongooseCompositeIpAddress } from "./types/provider.js";
3
3
  import { AccountSchema, IPValidationRulesSchema, TableNames, UserDataSchema, UserSettingsSchema } from "./types/client.js";
4
4
  import { StoredPoWCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema } from "./types/captcha.js";
5
5
  export {
6
6
  AccountSchema,
7
7
  CaptchaRecordSchema,
8
- ClientEntropyRecordSchema,
8
+ ClientContextEntropyRecordSchema,
9
9
  ClientRecordSchema,
10
10
  CompositeIpAddressRecordSchemaObj,
11
11
  CompositeIpAddressSchema,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ApiParams } from "@prosopo/types";
2
+ import type { CompositeIpAddress } from "../types/index.js";
3
+ export interface PendingCaptchaRequest {
4
+ accountId: string;
5
+ pending: boolean;
6
+ salt: string;
7
+ [ApiParams.requestHash]: string;
8
+ deadlineTimestamp: number;
9
+ requestedAtTimestamp: Date;
10
+ ipAddress: CompositeIpAddress;
11
+ sessionId?: string;
12
+ threshold: number;
13
+ }
14
+ //# sourceMappingURL=pendingCaptchaRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingCaptchaRequest.d.ts","sourceRoot":"","sources":["../../src/provider/pendingCaptchaRequest.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,IAAI,CAAC;IAC3B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ import { ApiParams } from "@prosopo/types";
2
+ //# sourceMappingURL=pendingCaptchaRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingCaptchaRequest.js","sourceRoot":"","sources":["../../src/provider/pendingCaptchaRequest.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { PoWCaptcha } from "@prosopo/types";
2
+ import { type RootFilterQuery, Schema } from "mongoose";
3
+ import type { IDatabase } from "./mongo.js";
4
+ import { type PoWCaptchaRecord, type SessionRecord, type UserCommitment, type UserCommitmentRecord } from "./provider.js";
5
+ export type StoredSession = SessionRecord;
6
+ export declare const StoredSessionRecordSchema: Schema;
7
+ export declare const StoredUserCommitmentRecordSchema: Schema;
8
+ export declare const StoredPoWCaptchaRecordSchema: Schema;
9
+ export interface ICaptchaDatabase extends IDatabase {
10
+ saveCaptchas(sessionEvents: StoredSession[], imageCaptchaEvents: UserCommitmentRecord[], powCaptchaEvents: PoWCaptchaRecord[]): Promise<void>;
11
+ getCaptchas(filter: RootFilterQuery<CaptchaProperties>, limit: number): Promise<{
12
+ userCommitmentRecords: UserCommitmentRecord[];
13
+ powCaptchaRecords: PoWCaptchaRecord[];
14
+ }>;
15
+ }
16
+ export interface CaptchaProperties extends Partial<UserCommitment & PoWCaptcha> {
17
+ }
18
+ //# sourceMappingURL=captcha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"captcha.d.ts","sourceRoot":"","sources":["../../src/types/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,aAAa,EAElB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAEzB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAE1C,eAAO,MAAM,yBAAyB,EAAE,MAA4B,CAAC;AAErE,eAAO,MAAM,gCAAgC,EAAE,MAE7C,CAAC;AAGH,eAAO,MAAM,4BAA4B,EAAE,MAEzC,CAAC;AAGH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IAClD,YAAY,CACX,aAAa,EAAE,aAAa,EAAE,EAC9B,kBAAkB,EAAE,oBAAoB,EAAE,EAC1C,gBAAgB,EAAE,gBAAgB,EAAE,GAClC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,WAAW,CACV,MAAM,EAAE,eAAe,CAAC,iBAAiB,CAAC,EAC1C,KAAK,EAAE,MAAM,GACX,OAAO,CAAC;QACV,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;QAC9C,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;KACtC,CAAC,CAAC;CACH;AAED,MAAM,WAAW,iBAChB,SAAQ,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC;CAAG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../src/types/captcha.ts"],"names":[],"mappings":"AAeA,OAAO,EAAwB,MAAM,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,EAEN,sBAAsB,EAEtB,mBAAmB,EAGnB,0BAA0B,GAC1B,MAAM,eAAe,CAAC;AAKvB,MAAM,CAAC,MAAM,yBAAyB,GAAW,mBAAmB,CAAC;AAErE,MAAM,CAAC,MAAM,gCAAgC,GAAW,IAAI,MAAM,CAAC;IAClE,GAAG,0BAA0B,CAAC,GAAG;CACjC,CAAC,CAAC;AACH,gCAAgC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,4BAA4B,GAAW,IAAI,MAAM,CAAC;IAC9D,GAAG,sBAAsB,CAAC,GAAG;CAC7B,CAAC,CAAC;AACH,4BAA4B,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC"}