@prosopo/types-database 5.3.4 → 5.4.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/types-database@5.3.4 build:cjs
2
+ > @prosopo/types-database@5.4.1 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -38,15 +38,14 @@ Bundle build started
38
38
  ✓ 10 modules transformed.
39
39
  rendering chunks...
40
40
  computing gzip size...
41
- dist/cjs/types/mongo.cjs 0.00 kB │ gzip: 0.02 kB
42
- dist/cjs/types/userAgent.cjs 0.00 kB │ gzip: 0.02 kB
43
- dist/cjs/types/bannedDomain.cjs 0.23 kB │ gzip: 0.16 kB
44
- dist/cjs/types/spamEmailDomain.cjs 0.25 kB │ gzip: 0.17 kB
45
- dist/cjs/types/captcha.cjs 0.99 kB │ gzip: 0.27 kB
46
- dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
47
- dist/cjs/types/index.cjs 2.42 kB │ gzip: 0.48 kB
48
- dist/cjs/index.cjs 2.52 kB │ gzip: 0.53 kB
49
- dist/cjs/types/client.cjs 7.36 kB │ gzip: 1.65 kB
50
- dist/cjs/types/provider.cjs 28.61 kB │ gzip: 4.50 kB
41
+ dist/cjs/types/mongo.cjs 0.00 kB │ gzip: 0.02 kB
42
+ dist/cjs/types/userAgent.cjs 0.00 kB │ gzip: 0.02 kB
43
+ dist/cjs/types/bannedDomain.cjs 0.23 kB │ gzip: 0.16 kB
44
+ dist/cjs/types/spamEmailDomain.cjs 0.25 kB │ gzip: 0.17 kB
45
+ dist/cjs/types/captcha.cjs 0.99 kB │ gzip: 0.27 kB
46
+ dist/cjs/types/index.cjs 2.50 kB │ gzip: 0.49 kB
47
+ dist/cjs/index.cjs 2.60 kB │ gzip: 0.54 kB
48
+ dist/cjs/types/client.cjs 7.86 kB │ gzip: 1.65 kB
49
+ dist/cjs/types/provider.cjs 28.98 kB │ gzip: 4.55 kB
51
50
 
52
- ✓ built in 41ms
51
+ ✓ built in 52ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/types-database@5.3.4 build:tsc
2
+ > @prosopo/types-database@5.4.1 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:56:29 PM - Projects in this build:
5
+ 1:15:26 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -16,29 +16,29 @@
16
16
  * ../user-access-policy/tsconfig.json
17
17
  * tsconfig.json
18
18
 
19
- 1:56:29 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
19
+ 1:15:26 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
20
20
 
21
- 1:56:29 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
21
+ 1:15:26 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
22
22
 
23
- 1:56:29 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
23
+ 1:15:26 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
24
24
 
25
- 1:56:29 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
25
+ 1:15:26 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
26
26
 
27
- 1:56:29 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'
27
+ 1:15:26 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'
28
28
 
29
- 1:56:29 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/index.ts' is older than output '../types/tsconfig.tsbuildinfo'
29
+ 1:15:26 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
30
30
 
31
- 1:56:29 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
31
+ 1:15:26 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
32
32
 
33
- 1:56:29 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'
33
+ 1:15:26 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
34
34
 
35
- 1:56:29 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'
35
+ 1:15:26 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'
36
36
 
37
- 1:56:29 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
37
+ 1:15:26 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
38
38
 
39
- 1:56:29 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/rule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
39
+ 1:15:26 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'
40
40
 
41
- 1:56:29 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
41
+ 1:15:26 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
42
42
 
43
- 1:56:29 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
43
+ 1:15:26 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
44
44
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/types-database@5.3.4 build
2
+ > @prosopo/types-database@5.4.1 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/types-database@5.3.4 build:cross-env
6
+ > @prosopo/types-database@5.4.1 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -48,9 +48,9 @@ dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
48
48
  dist/types/bannedDomain.js 0.22 kB │ gzip: 0.17 kB
49
49
  dist/types/spamEmailDomain.js 0.23 kB │ gzip: 0.17 kB
50
50
  dist/types/captcha.js 0.82 kB │ gzip: 0.25 kB
51
- dist/types/index.js 1.60 kB │ gzip: 0.38 kB
52
- dist/index.js 1.67 kB │ gzip: 0.40 kB
53
- dist/types/client.js 7.12 kB │ gzip: 1.64 kB
54
- dist/types/provider.js 27.47 kB │ gzip: 4.47 kB
51
+ dist/types/index.js 1.65 kB │ gzip: 0.39 kB
52
+ dist/index.js 1.72 kB │ gzip: 0.42 kB
53
+ dist/types/client.js 7.66 kB │ gzip: 1.68 kB
54
+ dist/types/provider.js 27.83 kB │ gzip: 4.52 kB
55
55
 
56
- ✓ built in 284ms
56
+ ✓ built in 85ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,92 @@
1
1
  # @prosopo/types-database
2
2
 
3
+ ## 5.4.1
4
+ ### Patch Changes
5
+
6
+ - b6918c0: fix: declare the puzzle render settings on the mongoose user-settings schema
7
+
8
+ `UserSettingsSchema` never declared the `puzzle` block that
9
+ `ClientSettingsSchema` has carried since the puzzle render tunables shipped.
10
+ Mongoose is strict by default, so every site-wide override — decoy count,
11
+ decoy edge/body shading, hole darken, decoy hole darken, piece scale — round
12
+ tripped through zod, reached the database and was silently dropped on write.
13
+ The same omission on `TrafficCategoryPolicySchema` did the same to the
14
+ per-category puzzle overrides a traffic-filter challenge can carry.
15
+
16
+ Identical failure mode to `frictionlessTypes`, which carries the comment
17
+ explaining it. Bounds mirror the zod field schemas, and the block has no
18
+ default so an unconfigured site stays free of an empty subdocument rather
19
+ than gaining one on every save.
20
+ - Updated dependencies [6f57ee9]
21
+ - Updated dependencies [6f57ee9]
22
+ - Updated dependencies [e22d5fb]
23
+ - Updated dependencies [d288371]
24
+ - @prosopo/user-access-policy@3.13.0
25
+ - @prosopo/types@5.7.0
26
+ - @prosopo/common@3.1.54
27
+ - @prosopo/logger@2.0.9
28
+
29
+ ## 5.4.0
30
+ ### Minor Changes
31
+
32
+ - 8a670d3: Remove the provider-side context validation path.
33
+
34
+ The provider read a per-context baseline out of `clientcontextentropies` on the frictionless path and compared a session's head hash against it. The task that wrote that collection was removed from the provider on 2026-08-21, so the read has returned `undefined` ever since and the branch has been dead in every deployment since then. Computing and applying the baseline now happens off-provider.
35
+
36
+ Removed: `contextAwareValidation.ts`, the decision-machine branch that used it, `getClientContextEntropy` on the provider and its database method, the `clientContextEntropy` table registration, the unused `getRoundsFromSimScore` helper, and the `contextAwareEnabled` parameter threaded into image verification — which logged and then did nothing, its return commented out.
37
+
38
+ Also removes the per-site `settings.contextAware` block that configured it, along with `ContextAwareSchema`, `IContextAware`, `IContexts`, `ContextConfigSchema`, `contextAwareThresholdDefault` and `expandContexts`, the legacy `default`/`webview` context keys and their helpers, and `FrictionlessReason.CONTEXT_AWARE_VALIDATION_FAILED`. The site-key registration CLI no longer writes a `contextAware` default into new sites.
39
+
40
+ `ContextType`, `contextTypeFromSession` and `deviceContextTypes` stay — the off-provider work keys on them. `ClientContextEntropyRecord` and its schema stay for the same reason; only the provider's use of them goes.
41
+
42
+ No behaviour change: every path removed here was already inert.
43
+
44
+ ### Patch Changes
45
+
46
+ - 89dd38a: chore(deps): batch the outstanding dependabot bumps into one upgrade
47
+
48
+ Rolls up dependabot PRs #3112, #3127-#3134 and #3159. Majors: `mongoose`
49
+ 8 -> 9, `bson` 6 -> 7, `@noble/curves` 1 -> 2, `@polkadot/util-crypto`
50
+ 13 -> 14, `@typegoose/auto-increment` 4 -> 5, `@babel/preset-env` 7 -> 8,
51
+ `@types/jsdom` 21 -> 30, `@types/bcrypt` 5 -> 6, `@actions/github` 6 -> 9,
52
+ `testcontainers` 11 -> 12. The rest are minor/patch.
53
+
54
+ Code changes the majors forced:
55
+ - `@noble/curves` v2 requires `.js` specifiers and renamed the point API,
56
+ so `secp256k1.ProjectivePoint.fromHex(...).toRawBytes()` becomes
57
+ `secp256k1.Point.fromBytes(...).toBytes()`, `RistrettoPoint` becomes
58
+ `ristretto255.Point`, and `abstract/utils` moves to `utils.js`.
59
+ - mongoose 9 drops `RootFilterQuery` (now `QueryFilter`), no longer sets
60
+ `background: true` on schema indexes by default, and no longer declares
61
+ `id` on `Document`, which un-hid a mismatch between
62
+ `updateDappUserCommitment`'s `Hash` parameter and the `string` `id` it
63
+ filters on.
64
+ - mongoose 9 rejects an aggregation-pipeline update (an array) unless the
65
+ call passes `updatePipeline: true`, so the six pipeline writes in
66
+ `ProviderDatabase` now opt in explicitly.
67
+ - mongoose 9's `castUpdate` throws on a `$setOnInsert` key inside `$set`.
68
+ `storeUserImageCaptchaSolution` passed its record straight in as the
69
+ update, and mongoose's `moveImmutableProperties` mutates that object on
70
+ an upsert -- adding the very `$setOnInsert` key the record then carried
71
+ into `CentralDbStreamer.streamImageRecord`. Image records stopped
72
+ reaching the central DB (the streamer is fire-and-forget, so it only
73
+ logged) and signup verification returned 500. The update is now an
74
+ explicit `$set` over a shallow copy.
75
+ - `@prosopo/database` moves from mongodb 6.20 to 7.5 to match the driver
76
+ mongoose 9 pulls, so bson 7 is the only copy resolvable in the package.
77
+ - `vitest`/`@vitest/coverage-v8` go to 4.1.11 alongside dependabot's
78
+ `@vitest/spy` bump; leaving them at 4.1.10 installed a second copy of
79
+ `@vitest/spy` and broke type inference in the provider test utils.
80
+ - Updated dependencies [7fd6eb2]
81
+ - Updated dependencies [89dd38a]
82
+ - Updated dependencies [80f73c1]
83
+ - Updated dependencies [8a670d3]
84
+ - @prosopo/user-access-policy@3.12.33
85
+ - @prosopo/common@3.1.53
86
+ - @prosopo/locale@3.4.1
87
+ - @prosopo/logger@2.0.8
88
+ - @prosopo/types@5.6.0
89
+
3
90
  ## 5.3.4
4
91
  ### Patch Changes
5
92
 
@@ -16,6 +16,7 @@ exports.DecisionMachineArtifactRecordSchema = require_provider.DecisionMachineAr
16
16
  exports.IPValidationRulesSchema = require_client.IPValidationRulesSchema;
17
17
  exports.PoWCaptchaRecordSchema = require_provider.PoWCaptchaRecordSchema;
18
18
  exports.PuzzleCaptchaRecordSchema = require_provider.PuzzleCaptchaRecordSchema;
19
+ exports.PuzzleRenderSettingsSchema = require_client.PuzzleRenderSettingsSchema;
19
20
  exports.SESSION_PROJECTION = require_provider.SESSION_PROJECTION;
20
21
  exports.ScheduledTaskRecordSchema = require_provider.ScheduledTaskRecordSchema;
21
22
  exports.ScheduledTaskSchema = require_provider.ScheduledTaskSchema;
@@ -1,7 +1,5 @@
1
- const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
1
  let _prosopo_types = require("@prosopo/types");
3
2
  let mongoose = require("mongoose");
4
- mongoose = require_runtime.__toESM(mongoose, 1);
5
3
  //#region src/types/client.ts
6
4
  var IPValidationRulesSchema = new mongoose.Schema({
7
5
  enabled: {
@@ -72,6 +70,55 @@ var IPValidationRulesSchema = new mongoose.Schema({
72
70
  default: void 0
73
71
  }
74
72
  });
73
+ var PuzzleRenderSettingsSchema = new mongoose.Schema({
74
+ decoyCount: {
75
+ type: Number,
76
+ min: 0,
77
+ max: 200,
78
+ required: false
79
+ },
80
+ decoyEdgeDarkness: {
81
+ type: Number,
82
+ min: 0,
83
+ max: 40,
84
+ required: false
85
+ },
86
+ decoyBodyBrightness: {
87
+ type: Number,
88
+ min: -20,
89
+ max: 20,
90
+ required: false
91
+ },
92
+ decoyHoleDarken: {
93
+ type: Number,
94
+ min: 0,
95
+ max: 1,
96
+ required: false
97
+ },
98
+ holeDarken: {
99
+ type: Number,
100
+ min: 0,
101
+ max: 1,
102
+ required: false
103
+ },
104
+ pieceScale: {
105
+ type: new mongoose.Schema({
106
+ min: {
107
+ type: Number,
108
+ min: .05,
109
+ max: .95,
110
+ required: false
111
+ },
112
+ max: {
113
+ type: Number,
114
+ min: .05,
115
+ max: .95,
116
+ required: false
117
+ }
118
+ }, { _id: false }),
119
+ required: false
120
+ }
121
+ }, { _id: false });
75
122
  var TrafficCategoryPolicySchema = new mongoose.Schema({
76
123
  action: {
77
124
  type: String,
@@ -94,6 +141,10 @@ var TrafficCategoryPolicySchema = new mongoose.Schema({
94
141
  puzzleTolerance: {
95
142
  type: Number,
96
143
  required: false
144
+ },
145
+ puzzle: {
146
+ type: PuzzleRenderSettingsSchema,
147
+ required: false
97
148
  }
98
149
  }, { _id: false });
99
150
  var UserSettingsSchema = new mongoose.Schema({
@@ -149,6 +200,10 @@ var UserSettingsSchema = new mongoose.Schema({
149
200
  type: Number,
150
201
  required: false
151
202
  },
203
+ puzzle: {
204
+ type: PuzzleRenderSettingsSchema,
205
+ required: false
206
+ },
152
207
  ipValidationRules: IPValidationRulesSchema,
153
208
  domains: {
154
209
  type: [String],
@@ -158,19 +213,6 @@ var UserSettingsSchema = new mongoose.Schema({
158
213
  type: Boolean,
159
214
  default: false
160
215
  },
161
- contextAware: {
162
- enabled: {
163
- type: Boolean,
164
- default: false
165
- },
166
- contexts: {
167
- type: mongoose.default.Schema.Types.Mixed,
168
- default: Object.fromEntries(_prosopo_types.deviceContextTypes.map((type) => [type, {
169
- type,
170
- threshold: _prosopo_types.contextAwareThresholdDefault
171
- }]))
172
- }
173
- },
174
216
  spamEmailDomainCheckEnabled: {
175
217
  type: Boolean,
176
218
  default: false,
@@ -342,6 +384,7 @@ var TableNames = /* @__PURE__ */ function(TableNames) {
342
384
  //#endregion
343
385
  exports.AccountSchema = AccountSchema;
344
386
  exports.IPValidationRulesSchema = IPValidationRulesSchema;
387
+ exports.PuzzleRenderSettingsSchema = PuzzleRenderSettingsSchema;
345
388
  exports.TableNames = TableNames;
346
389
  exports.TrafficCategoryPolicySchema = TrafficCategoryPolicySchema;
347
390
  exports.UserDataSchema = UserDataSchema;
@@ -15,6 +15,7 @@ exports.DecisionMachineArtifactRecordSchema = require_provider.DecisionMachineAr
15
15
  exports.IPValidationRulesSchema = require_client.IPValidationRulesSchema;
16
16
  exports.PoWCaptchaRecordSchema = require_provider.PoWCaptchaRecordSchema;
17
17
  exports.PuzzleCaptchaRecordSchema = require_provider.PuzzleCaptchaRecordSchema;
18
+ exports.PuzzleRenderSettingsSchema = require_client.PuzzleRenderSettingsSchema;
18
19
  exports.SESSION_PROJECTION = require_provider.SESSION_PROJECTION;
19
20
  exports.ScheduledTaskRecordSchema = require_provider.ScheduledTaskRecordSchema;
20
21
  exports.ScheduledTaskSchema = require_provider.ScheduledTaskSchema;
@@ -1399,6 +1399,31 @@ var ClientContextEntropyRecordSchema = new mongoose.Schema({
1399
1399
  entropy: {
1400
1400
  type: String,
1401
1401
  required: true
1402
+ },
1403
+ totalSessions: {
1404
+ type: Number,
1405
+ required: false
1406
+ },
1407
+ distinctHashes: {
1408
+ type: Number,
1409
+ required: false
1410
+ },
1411
+ urls: {
1412
+ type: [new mongoose.Schema({
1413
+ url: {
1414
+ type: String,
1415
+ required: true
1416
+ },
1417
+ sessions: {
1418
+ type: Number,
1419
+ required: true
1420
+ },
1421
+ entropy: {
1422
+ type: String,
1423
+ required: true
1424
+ }
1425
+ }, { _id: false })],
1426
+ required: false
1402
1427
  }
1403
1428
  }, { timestamps: {
1404
1429
  createdAt: true,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./_virtual/_rolldown/runtime.js";
2
- import { AccountSchema, IPValidationRulesSchema, TableNames, TrafficCategoryPolicySchema, UserDataSchema, UserSettingsSchema } from "./types/client.js";
2
+ import { AccountSchema, IPValidationRulesSchema, PuzzleRenderSettingsSchema, TableNames, TrafficCategoryPolicySchema, UserDataSchema, UserSettingsSchema } from "./types/client.js";
3
3
  import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientMetaDataRecordSchemaObj, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, SESSION_PROJECTION, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserSolutionRecordSchema } from "./types/provider.js";
4
4
  import { StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema } from "./types/captcha.js";
5
5
  import { SpamEmailDomainRecordSchema } from "./types/spamEmailDomain.js";
6
6
  import { BannedDomainRecordSchema } from "./types/bannedDomain.js";
7
- export { AccountSchema, BannedDomainRecordSchema, CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientMetaDataRecordSchemaObj, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, IPValidationRulesSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, SESSION_PROJECTION, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, SpamEmailDomainRecordSchema, StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema, TableNames, TrafficCategoryPolicySchema, UserCommitmentRecordSchema, UserDataSchema, UserSettingsSchema, UserSolutionRecordSchema };
7
+ export { AccountSchema, BannedDomainRecordSchema, CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientMetaDataRecordSchemaObj, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, IPValidationRulesSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, PuzzleRenderSettingsSchema, SESSION_PROJECTION, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, SpamEmailDomainRecordSchema, StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema, TableNames, TrafficCategoryPolicySchema, UserCommitmentRecordSchema, UserDataSchema, UserSettingsSchema, UserSolutionRecordSchema };
@@ -3,13 +3,32 @@ export type BannedDomain = {
3
3
  domain: string;
4
4
  };
5
5
  export type BannedDomainRecord = mongoose.Document & BannedDomain;
6
- export declare const BannedDomainRecordSchema: mongoose.Schema<BannedDomainRecord, mongoose.Model<BannedDomainRecord, any, any, any, mongoose.Document<unknown, any, BannedDomainRecord, any, {}> & mongoose.Document<mongoose.Types.ObjectId, any, any, Record<string, any>, {}> & BannedDomain & Required<{
6
+ export declare const BannedDomainRecordSchema: mongoose.Schema<BannedDomainRecord, mongoose.Model<BannedDomainRecord, any, any, any, any, any, BannedDomainRecord>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, BannedDomainRecord, mongoose.Document<unknown, {}, BannedDomainRecord, {
7
+ id: string;
8
+ }, mongoose.DefaultSchemaOptions> & Omit<mongoose.Document<mongoose.Types.ObjectId, any, any, Record<string, any>, {}> & BannedDomain & Required<{
7
9
  _id: mongoose.Types.ObjectId;
8
10
  }> & {
9
11
  __v: number;
10
- }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, BannedDomainRecord, mongoose.Document<unknown, {}, mongoose.FlatRecord<BannedDomainRecord>, {}, mongoose.DefaultSchemaOptions> & mongoose.FlatRecord<BannedDomainRecord> & Required<{
11
- _id: mongoose.Types.ObjectId;
12
- }> & {
13
- __v: number;
14
- }>;
12
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
13
+ id: string;
14
+ }>, {
15
+ _id?: mongoose.SchemaDefinitionProperty<mongoose.Types.ObjectId, BannedDomainRecord, mongoose.Document<unknown, {}, BannedDomainRecord, {
16
+ id: string;
17
+ }, mongoose.DefaultSchemaOptions> & Omit<mongoose.Document<mongoose.Types.ObjectId, any, any, Record<string, any>, {}> & BannedDomain & Required<{
18
+ _id: mongoose.Types.ObjectId;
19
+ }> & {
20
+ __v: number;
21
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
22
+ id: string;
23
+ }>> | undefined;
24
+ domain?: mongoose.SchemaDefinitionProperty<string, BannedDomainRecord, mongoose.Document<unknown, {}, BannedDomainRecord, {
25
+ id: string;
26
+ }, mongoose.DefaultSchemaOptions> & Omit<mongoose.Document<mongoose.Types.ObjectId, any, any, Record<string, any>, {}> & BannedDomain & Required<{
27
+ _id: mongoose.Types.ObjectId;
28
+ }> & {
29
+ __v: number;
30
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
31
+ id: string;
32
+ }>> | undefined;
33
+ }, BannedDomainRecord>;
15
34
  //# sourceMappingURL=bannedDomain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bannedDomain.d.ts","sourceRoot":"","sources":["../../src/types/bannedDomain.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,MAAM,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,QAAQ,GAAG,YAAY,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;EAKnC,CAAC"}
1
+ {"version":3,"file":"bannedDomain.d.ts","sourceRoot":"","sources":["../../src/types/bannedDomain.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,MAAM,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,QAAQ,GAAG,YAAY,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAKnC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { PoWCaptcha, UserCommitment } from "@prosopo/types";
2
- import { type RootFilterQuery, Schema } from "mongoose";
2
+ import { type QueryFilter, Schema } from "mongoose";
3
3
  import type { IDatabase } from "./mongo.js";
4
4
  import { type PoWCaptchaRecord, type PuzzleCaptchaRecord, type SessionRecord, type UserCommitmentRecord } from "./provider.js";
5
5
  export type StoredSession = SessionRecord;
@@ -9,7 +9,7 @@ export declare const StoredPoWCaptchaRecordSchema: Schema;
9
9
  export declare const StoredPuzzleCaptchaRecordSchema: Schema;
10
10
  export interface ICaptchaDatabase extends IDatabase {
11
11
  saveCaptchas(sessionEvents: StoredSession[], imageCaptchaEvents: UserCommitmentRecord[], powCaptchaEvents: PoWCaptchaRecord[], puzzleCaptchaEvents?: PuzzleCaptchaRecord[]): Promise<void>;
12
- getCaptchas(filter: RootFilterQuery<CaptchaProperties>, limit: number): Promise<{
12
+ getCaptchas(filter: QueryFilter<CaptchaProperties>, limit: number): Promise<{
13
13
  userCommitmentRecords: UserCommitmentRecord[];
14
14
  powCaptchaRecords: PoWCaptchaRecord[];
15
15
  puzzleCaptchaRecords: PuzzleCaptchaRecord[];
@@ -1 +1 @@
1
- {"version":3,"file":"captcha.d.ts","sourceRoot":"","sources":["../../src/types/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,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