@prosopo/types-database 5.16.2 → 5.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +4 -4
- package/.turbo/turbo-build$colon$esm.log +5 -5
- package/.turbo/turbo-build$colon$tsc.log +14 -14
- package/CHANGELOG.md +40 -0
- package/dist/cjs/types/captcha.cjs +10 -0
- package/dist/cjs/types/client.cjs +23 -0
- package/dist/cjs/types/provider.cjs +8 -0
- package/dist/esm/types/captcha.js +10 -0
- package/dist/esm/types/client.js +24 -1
- package/dist/esm/types/provider.js +8 -0
- package/dist/tsc/types/captcha.d.ts.map +1 -1
- package/dist/tsc/types/captcha.js +7 -0
- package/dist/tsc/types/captcha.js.map +1 -1
- package/dist/tsc/types/client.d.ts +20 -0
- package/dist/tsc/types/client.d.ts.map +1 -1
- package/dist/tsc/types/client.js +15 -1
- package/dist/tsc/types/client.js.map +1 -1
- package/dist/tsc/types/provider.d.ts +31 -8
- package/dist/tsc/types/provider.d.ts.map +1 -1
- package/dist/tsc/types/provider.js +2 -0
- package/dist/tsc/types/provider.js.map +1 -1
- package/dist/tsc/types/schemas.test.js +21 -2
- package/dist/tsc/types/schemas.test.js.map +1 -1
- package/dist/types/types/captcha.d.ts.map +1 -1
- package/dist/types/types/client.d.ts +20 -0
- package/dist/types/types/client.d.ts.map +1 -1
- package/dist/types/types/provider.d.ts +31 -8
- package/dist/types/types/provider.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -39,10 +39,10 @@ dist/cjs/types/mongo.cjs 0.00 kB │ gzip: 0.02 kB
|
|
|
39
39
|
dist/cjs/types/userAgent.cjs 0.00 kB │ gzip: 0.02 kB
|
|
40
40
|
dist/cjs/types/bannedDomain.cjs 0.23 kB │ gzip: 0.16 kB
|
|
41
41
|
dist/cjs/types/spamEmailDomain.cjs 0.25 kB │ gzip: 0.17 kB
|
|
42
|
-
dist/cjs/types/captcha.cjs 1.
|
|
42
|
+
dist/cjs/types/captcha.cjs 1.88 kB │ gzip: 0.40 kB
|
|
43
43
|
dist/cjs/types/index.cjs 2.92 kB │ gzip: 0.53 kB
|
|
44
44
|
dist/cjs/index.cjs 3.03 kB │ gzip: 0.59 kB
|
|
45
|
-
dist/cjs/types/client.cjs
|
|
46
|
-
dist/cjs/types/provider.cjs 34.
|
|
45
|
+
dist/cjs/types/client.cjs 11.42 kB │ gzip: 2.17 kB
|
|
46
|
+
dist/cjs/types/provider.cjs 34.21 kB │ gzip: 5.45 kB
|
|
47
47
|
|
|
48
|
-
[32m✓ built in
|
|
48
|
+
[32m✓ built in 49ms[39m
|
|
@@ -14,7 +14,6 @@ ViteEsmConfig: .
|
|
|
14
14
|
'/home/runner/work/captcha/captcha/packages/api/tsconfig.json'
|
|
15
15
|
]
|
|
16
16
|
}
|
|
17
|
-
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
18
17
|
{
|
|
19
18
|
externals: [
|
|
20
19
|
'@prosopo/common',
|
|
@@ -29,6 +28,7 @@ ViteEsmConfig: .
|
|
|
29
28
|
'@prosopo/api'
|
|
30
29
|
]
|
|
31
30
|
}
|
|
31
|
+
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
32
32
|
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
33
33
|
Bundle build started
|
|
34
34
|
[2K
|
|
@@ -40,10 +40,10 @@ dist/esm/types/userAgent.js 0.01 kB │ gzip: 0.03 kB
|
|
|
40
40
|
dist/esm/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
41
41
|
dist/esm/types/bannedDomain.js 0.22 kB │ gzip: 0.17 kB
|
|
42
42
|
dist/esm/types/spamEmailDomain.js 0.23 kB │ gzip: 0.17 kB
|
|
43
|
-
dist/esm/types/captcha.js 1.
|
|
43
|
+
dist/esm/types/captcha.js 1.63 kB │ gzip: 0.39 kB
|
|
44
44
|
dist/esm/types/index.js 1.95 kB │ gzip: 0.42 kB
|
|
45
45
|
dist/esm/index.js 2.03 kB │ gzip: 0.45 kB
|
|
46
|
-
dist/esm/types/client.js
|
|
47
|
-
dist/esm/types/provider.js 32.
|
|
46
|
+
dist/esm/types/client.js 11.21 kB │ gzip: 2.21 kB
|
|
47
|
+
dist/esm/types/provider.js 32.83 kB │ gzip: 5.43 kB
|
|
48
48
|
|
|
49
|
-
[32m✓ built in
|
|
49
|
+
[32m✓ built in 92ms[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
|
|
2
|
+
11:51:20 AM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* ../util/tsconfig.json
|
|
5
5
|
* ../locale/tsconfig.json
|
|
@@ -13,29 +13,29 @@ $ tsc --build --verbose
|
|
|
13
13
|
* ../user-access-policy/tsconfig.json
|
|
14
14
|
* tsconfig.json
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
11:51:20 AM - 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/dist/tsc/tsconfig.tsbuildinfo'
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
11:51:20 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/dist/tsc/tsconfig.tsbuildinfo'
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
11:51:20 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/dist/tsc/tsconfig.tsbuildinfo'
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
11:51:20 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/dist/tsc/tsconfig.tsbuildinfo'
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
11:51:20 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/dist/tsc/tsconfig.tsbuildinfo'
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
11:51:20 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/dist/tsc/tsconfig.tsbuildinfo'
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
11:51:20 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/dist/tsc/tsconfig.tsbuildinfo'
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
11:51:20 AM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/dist/tsc/tsconfig.tsbuildinfo'
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
11:51:20 AM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/dist/tsc/tsconfig.tsbuildinfo'
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
11:51:20 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/dist/tsc/tsconfig.tsbuildinfo'
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
11:51:21 AM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/dist/tsc/tsconfig.tsbuildinfo'
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
11:51:21 AM - Project 'tsconfig.json' is out of date because output file 'dist/tsc/tsconfig.tsbuildinfo' does not exist
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
11:51:21 AM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
|
|
41
41
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @prosopo/types-database
|
|
2
2
|
|
|
3
|
+
## 5.18.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
- d9520ea: The traffic filter's `abuser` category, its exceptions, the DNS-path signal and the IP validation rules now use the IP lookup's reputation score.
|
|
7
|
+
|
|
8
|
+
- The IP lookup carries `reputationScore` and `reputationBand`. An address without a score never meets a threshold.
|
|
9
|
+
- New settings: `trafficFilter.reputationScoreThreshold`, exception `minReputationScore`, and `ipValidationRules.reputationScoreThreshold`.
|
|
10
|
+
- `abuserScoreThreshold`, `minAbuserScore` and `ipValidationRules.abuseScoreThreshold` are deprecated. Stored records still parse, and an exception that has only `minAbuserScore` keeps its current behaviour until it is updated.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- a85559d: Records copied to the central captcha store no longer carry the provider's `storedAtTimestamp`. The central store's `storedAtTimestamp` TTL index is now one year; provider stores keep four weeks.
|
|
15
|
+
- Updated dependencies [d9520ea]
|
|
16
|
+
- Updated dependencies [1ba238e]
|
|
17
|
+
- @prosopo/types@5.26.0
|
|
18
|
+
- @prosopo/user-access-policy@3.15.18
|
|
19
|
+
- @prosopo/common@3.3.2
|
|
20
|
+
- @prosopo/locale@3.14.1
|
|
21
|
+
- @prosopo/logger@2.1.9
|
|
22
|
+
|
|
23
|
+
## 5.17.0
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- 007f43c: A puzzle served after a wrong answer is now judged on the device the failed solve showed, and an escalation's solve readings are no longer dropped.
|
|
27
|
+
|
|
28
|
+
- After a wrong puzzle answer, the widget names the failed challenge in a new `retryOf` field on the next `/frictionless` request. `BotDetectionFunction` and `ProviderApi.getFrictionlessCaptcha` take it as a new trailing argument.
|
|
29
|
+
- The provider carries the failed solve's device readings onto the new session only when its own record of that puzzle shows the same client: same site, user account and exact IP address, identical user agent and TLS fingerprint, and a solve that was submitted and failed. The readings come from that solve's own behavioural payload, and each failed puzzle can be followed once (`claimPuzzleCaptchaRetry`). Anything else is ignored.
|
|
30
|
+
- `createSession` now persists `solveDevice`. It was missing from the session's field list, so a PoW escalation's solve readings never reached the challenge they were meant to size.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- ec54f21: The scheduled spam email domain sync now only writes domains that are not already stored. It used to upsert the whole list (about 225k domains) on every run, which rewrote every row and held Mongo write locks for around 8 seconds per batch on every provider at the same time, slowing requests on the hour. It now reads the stored domains with an index-only scan and upserts just the new ones.
|
|
35
|
+
|
|
36
|
+
`bulkUpdateSpamEmailDomains` on the provider database is replaced by `insertMissingSpamEmailDomains(domains)`, which returns how many domains were added. The task records that count as `domainsAdded` alongside `domainsProcessed`. Domains that drop off the source lists are still kept, as before.
|
|
37
|
+
- Updated dependencies [b80b627]
|
|
38
|
+
- Updated dependencies [007f43c]
|
|
39
|
+
- @prosopo/types@5.25.0
|
|
40
|
+
- @prosopo/common@3.3.2
|
|
41
|
+
- @prosopo/user-access-policy@3.15.17
|
|
42
|
+
|
|
3
43
|
## 5.16.2
|
|
4
44
|
### Patch Changes
|
|
5
45
|
|
|
@@ -2,16 +2,26 @@ const require_provider = require("./provider.cjs");
|
|
|
2
2
|
let mongoose = require("mongoose");
|
|
3
3
|
//#region src/types/captcha.ts
|
|
4
4
|
var StoredSessionRecordSchema = require_provider.SessionRecordSchema;
|
|
5
|
+
var storedAtTimestamp = {
|
|
6
|
+
type: Date,
|
|
7
|
+
required: false,
|
|
8
|
+
expires: 3600 * 24 * 365
|
|
9
|
+
};
|
|
5
10
|
var StoredUserCommitmentRecordSchema = new mongoose.Schema({ ...require_provider.UserCommitmentRecordSchema.obj });
|
|
6
11
|
StoredUserCommitmentRecordSchema.index({ sessionId: 1 });
|
|
12
|
+
StoredUserCommitmentRecordSchema.add({ storedAtTimestamp });
|
|
7
13
|
var StoredPoWCaptchaRecordSchema = new mongoose.Schema({ ...require_provider.PoWCaptchaRecordSchema.obj });
|
|
8
14
|
StoredPoWCaptchaRecordSchema.index({ sessionId: 1 });
|
|
15
|
+
StoredPoWCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
9
16
|
var StoredPuzzleCaptchaRecordSchema = new mongoose.Schema({ ...require_provider.PuzzleCaptchaRecordSchema.obj });
|
|
10
17
|
StoredPuzzleCaptchaRecordSchema.index({ sessionId: 1 });
|
|
18
|
+
StoredPuzzleCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
11
19
|
var StoredAudioCaptchaRecordSchema = new mongoose.Schema({ ...require_provider.AudioCaptchaRecordSchema.obj });
|
|
12
20
|
StoredAudioCaptchaRecordSchema.index({ sessionId: 1 });
|
|
21
|
+
StoredAudioCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
13
22
|
var StoredIconOrderCaptchaRecordSchema = new mongoose.Schema({ ...require_provider.IconOrderCaptchaRecordSchema.obj });
|
|
14
23
|
StoredIconOrderCaptchaRecordSchema.index({ sessionId: 1 });
|
|
24
|
+
StoredIconOrderCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
15
25
|
//#endregion
|
|
16
26
|
exports.StoredAudioCaptchaRecordSchema = StoredAudioCaptchaRecordSchema;
|
|
17
27
|
exports.StoredIconOrderCaptchaRecordSchema = StoredIconOrderCaptchaRecordSchema;
|
|
@@ -39,6 +39,12 @@ var IPValidationRulesSchema = new mongoose.Schema({
|
|
|
39
39
|
min: 0,
|
|
40
40
|
default: _prosopo_types.abuseScoreThresholdDefault
|
|
41
41
|
},
|
|
42
|
+
reputationScoreThreshold: {
|
|
43
|
+
type: Number,
|
|
44
|
+
min: 0,
|
|
45
|
+
max: 1,
|
|
46
|
+
default: _prosopo_types.ipValidationReputationScoreThresholdDefault
|
|
47
|
+
},
|
|
42
48
|
requireAllConditions: {
|
|
43
49
|
type: Boolean,
|
|
44
50
|
default: _prosopo_types.requireAllConditionsDefault
|
|
@@ -65,6 +71,11 @@ var IPValidationRulesSchema = new mongoose.Schema({
|
|
|
65
71
|
type: Number,
|
|
66
72
|
min: 0
|
|
67
73
|
},
|
|
74
|
+
reputationScoreThreshold: {
|
|
75
|
+
type: Number,
|
|
76
|
+
min: 0,
|
|
77
|
+
max: 1
|
|
78
|
+
},
|
|
68
79
|
requireAllConditions: { type: Boolean }
|
|
69
80
|
}),
|
|
70
81
|
default: void 0
|
|
@@ -220,6 +231,12 @@ var TrafficCategoryExceptionSchema = TrafficCategoryActionSchema.clone().add({
|
|
|
220
231
|
max: 1,
|
|
221
232
|
required: false
|
|
222
233
|
},
|
|
234
|
+
minReputationScore: {
|
|
235
|
+
type: Number,
|
|
236
|
+
min: 0,
|
|
237
|
+
max: 1,
|
|
238
|
+
required: false
|
|
239
|
+
},
|
|
223
240
|
mobile: {
|
|
224
241
|
type: Boolean,
|
|
225
242
|
required: false
|
|
@@ -430,6 +447,12 @@ var UserSettingsSchema = new mongoose.Schema({
|
|
|
430
447
|
max: 1,
|
|
431
448
|
default: _prosopo_types.trafficFilterAbuserScoreThresholdDefault
|
|
432
449
|
},
|
|
450
|
+
reputationScoreThreshold: {
|
|
451
|
+
type: Number,
|
|
452
|
+
min: 0,
|
|
453
|
+
max: 1,
|
|
454
|
+
default: _prosopo_types.trafficFilterReputationScoreThresholdDefault
|
|
455
|
+
},
|
|
433
456
|
datacenter: {
|
|
434
457
|
type: TrafficCategoryPolicySchema,
|
|
435
458
|
required: false
|
|
@@ -591,6 +591,10 @@ var PuzzleCaptchaRecordSchema = new mongoose.Schema({
|
|
|
591
591
|
type: Number,
|
|
592
592
|
required: true
|
|
593
593
|
},
|
|
594
|
+
retried: {
|
|
595
|
+
type: Boolean,
|
|
596
|
+
required: false
|
|
597
|
+
},
|
|
594
598
|
render: {
|
|
595
599
|
type: new mongoose.Schema({
|
|
596
600
|
level: {
|
|
@@ -1308,6 +1312,10 @@ var SessionRecordSchema = new mongoose.Schema({
|
|
|
1308
1312
|
type: String,
|
|
1309
1313
|
required: false
|
|
1310
1314
|
},
|
|
1315
|
+
retryOf: {
|
|
1316
|
+
type: String,
|
|
1317
|
+
required: false
|
|
1318
|
+
},
|
|
1311
1319
|
refreshCount: {
|
|
1312
1320
|
type: Number,
|
|
1313
1321
|
required: false
|
|
@@ -2,15 +2,25 @@ import { AudioCaptchaRecordSchema, IconOrderCaptchaRecordSchema, PoWCaptchaRecor
|
|
|
2
2
|
import { Schema } from "mongoose";
|
|
3
3
|
//#region src/types/captcha.ts
|
|
4
4
|
var StoredSessionRecordSchema = SessionRecordSchema;
|
|
5
|
+
var storedAtTimestamp = {
|
|
6
|
+
type: Date,
|
|
7
|
+
required: false,
|
|
8
|
+
expires: 3600 * 24 * 365
|
|
9
|
+
};
|
|
5
10
|
var StoredUserCommitmentRecordSchema = new Schema({ ...UserCommitmentRecordSchema.obj });
|
|
6
11
|
StoredUserCommitmentRecordSchema.index({ sessionId: 1 });
|
|
12
|
+
StoredUserCommitmentRecordSchema.add({ storedAtTimestamp });
|
|
7
13
|
var StoredPoWCaptchaRecordSchema = new Schema({ ...PoWCaptchaRecordSchema.obj });
|
|
8
14
|
StoredPoWCaptchaRecordSchema.index({ sessionId: 1 });
|
|
15
|
+
StoredPoWCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
9
16
|
var StoredPuzzleCaptchaRecordSchema = new Schema({ ...PuzzleCaptchaRecordSchema.obj });
|
|
10
17
|
StoredPuzzleCaptchaRecordSchema.index({ sessionId: 1 });
|
|
18
|
+
StoredPuzzleCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
11
19
|
var StoredAudioCaptchaRecordSchema = new Schema({ ...AudioCaptchaRecordSchema.obj });
|
|
12
20
|
StoredAudioCaptchaRecordSchema.index({ sessionId: 1 });
|
|
21
|
+
StoredAudioCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
13
22
|
var StoredIconOrderCaptchaRecordSchema = new Schema({ ...IconOrderCaptchaRecordSchema.obj });
|
|
14
23
|
StoredIconOrderCaptchaRecordSchema.index({ sessionId: 1 });
|
|
24
|
+
StoredIconOrderCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
15
25
|
//#endregion
|
|
16
26
|
export { StoredAudioCaptchaRecordSchema, StoredIconOrderCaptchaRecordSchema, StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema };
|
package/dist/esm/types/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CaptchaType, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT, MAX_PAD_BYTES, TrafficFilterAction, abuseScoreThresholdDefault, abuseScoreThresholdExceedActionDefault, captchaTypeDefault, cityChangeActionDefault, countryChangeActionDefault, distanceExceedActionDefault, distanceThresholdKmDefault, domainsDefault, frictionlessThresholdDefault, frictionlessTypesDefault, imageMaxRoundsDefault, imageMinRoundsDefault, imageThresholdDefault, ispChangeActionDefault, powDifficultyDefault, puzzleMaxDifficultyMax, requireAllConditionsDefault, trafficFilterAbuserScoreThresholdDefault } from "@prosopo/types";
|
|
1
|
+
import { CaptchaType, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT, MAX_PAD_BYTES, TrafficFilterAction, abuseScoreThresholdDefault, abuseScoreThresholdExceedActionDefault, captchaTypeDefault, cityChangeActionDefault, countryChangeActionDefault, distanceExceedActionDefault, distanceThresholdKmDefault, domainsDefault, frictionlessThresholdDefault, frictionlessTypesDefault, imageMaxRoundsDefault, imageMinRoundsDefault, imageThresholdDefault, ipValidationReputationScoreThresholdDefault, ispChangeActionDefault, powDifficultyDefault, puzzleMaxDifficultyMax, requireAllConditionsDefault, trafficFilterAbuserScoreThresholdDefault, trafficFilterReputationScoreThresholdDefault } from "@prosopo/types";
|
|
2
2
|
import { Schema } from "mongoose";
|
|
3
3
|
//#region src/types/client.ts
|
|
4
4
|
var IPValidationRulesSchema = new Schema({
|
|
@@ -39,6 +39,12 @@ var IPValidationRulesSchema = new Schema({
|
|
|
39
39
|
min: 0,
|
|
40
40
|
default: abuseScoreThresholdDefault
|
|
41
41
|
},
|
|
42
|
+
reputationScoreThreshold: {
|
|
43
|
+
type: Number,
|
|
44
|
+
min: 0,
|
|
45
|
+
max: 1,
|
|
46
|
+
default: ipValidationReputationScoreThresholdDefault
|
|
47
|
+
},
|
|
42
48
|
requireAllConditions: {
|
|
43
49
|
type: Boolean,
|
|
44
50
|
default: requireAllConditionsDefault
|
|
@@ -65,6 +71,11 @@ var IPValidationRulesSchema = new Schema({
|
|
|
65
71
|
type: Number,
|
|
66
72
|
min: 0
|
|
67
73
|
},
|
|
74
|
+
reputationScoreThreshold: {
|
|
75
|
+
type: Number,
|
|
76
|
+
min: 0,
|
|
77
|
+
max: 1
|
|
78
|
+
},
|
|
68
79
|
requireAllConditions: { type: Boolean }
|
|
69
80
|
}),
|
|
70
81
|
default: void 0
|
|
@@ -220,6 +231,12 @@ var TrafficCategoryExceptionSchema = TrafficCategoryActionSchema.clone().add({
|
|
|
220
231
|
max: 1,
|
|
221
232
|
required: false
|
|
222
233
|
},
|
|
234
|
+
minReputationScore: {
|
|
235
|
+
type: Number,
|
|
236
|
+
min: 0,
|
|
237
|
+
max: 1,
|
|
238
|
+
required: false
|
|
239
|
+
},
|
|
223
240
|
mobile: {
|
|
224
241
|
type: Boolean,
|
|
225
242
|
required: false
|
|
@@ -430,6 +447,12 @@ var UserSettingsSchema = new Schema({
|
|
|
430
447
|
max: 1,
|
|
431
448
|
default: trafficFilterAbuserScoreThresholdDefault
|
|
432
449
|
},
|
|
450
|
+
reputationScoreThreshold: {
|
|
451
|
+
type: Number,
|
|
452
|
+
min: 0,
|
|
453
|
+
max: 1,
|
|
454
|
+
default: trafficFilterReputationScoreThresholdDefault
|
|
455
|
+
},
|
|
433
456
|
datacenter: {
|
|
434
457
|
type: TrafficCategoryPolicySchema,
|
|
435
458
|
required: false
|
|
@@ -591,6 +591,10 @@ var PuzzleCaptchaRecordSchema = new Schema({
|
|
|
591
591
|
type: Number,
|
|
592
592
|
required: true
|
|
593
593
|
},
|
|
594
|
+
retried: {
|
|
595
|
+
type: Boolean,
|
|
596
|
+
required: false
|
|
597
|
+
},
|
|
594
598
|
render: {
|
|
595
599
|
type: new Schema({
|
|
596
600
|
level: {
|
|
@@ -1308,6 +1312,10 @@ var SessionRecordSchema = new Schema({
|
|
|
1308
1312
|
type: String,
|
|
1309
1313
|
required: false
|
|
1310
1314
|
},
|
|
1315
|
+
retryOf: {
|
|
1316
|
+
type: String,
|
|
1317
|
+
required: false
|
|
1318
|
+
},
|
|
1311
1319
|
refreshCount: {
|
|
1312
1320
|
type: Number,
|
|
1313
1321
|
required: false
|
|
@@ -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,EAAE,KAAK,WAAW,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACN,KAAK,kBAAkB,EAEvB,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EAExB,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAEzB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAE1C,eAAO,MAAM,yBAAyB,EAAE,MAA4B,CAAC;
|
|
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,EAAE,KAAK,WAAW,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAA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|
1
1
|
import { Schema } from "mongoose";
|
|
2
2
|
import { AudioCaptchaRecordSchema, IconOrderCaptchaRecordSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, SessionRecordSchema, UserCommitmentRecordSchema, } from "./provider.js";
|
|
3
3
|
export const StoredSessionRecordSchema = SessionRecordSchema;
|
|
4
|
+
const ONE_YEAR = 60 * 60 * 24 * 365;
|
|
5
|
+
const storedAtTimestamp = { type: Date, required: false, expires: ONE_YEAR };
|
|
4
6
|
export const StoredUserCommitmentRecordSchema = new Schema({
|
|
5
7
|
...UserCommitmentRecordSchema.obj,
|
|
6
8
|
});
|
|
7
9
|
StoredUserCommitmentRecordSchema.index({ sessionId: 1 });
|
|
10
|
+
StoredUserCommitmentRecordSchema.add({ storedAtTimestamp });
|
|
8
11
|
export const StoredPoWCaptchaRecordSchema = new Schema({
|
|
9
12
|
...PoWCaptchaRecordSchema.obj,
|
|
10
13
|
});
|
|
11
14
|
StoredPoWCaptchaRecordSchema.index({ sessionId: 1 });
|
|
15
|
+
StoredPoWCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
12
16
|
export const StoredPuzzleCaptchaRecordSchema = new Schema({
|
|
13
17
|
...PuzzleCaptchaRecordSchema.obj,
|
|
14
18
|
});
|
|
15
19
|
StoredPuzzleCaptchaRecordSchema.index({ sessionId: 1 });
|
|
20
|
+
StoredPuzzleCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
16
21
|
export const StoredAudioCaptchaRecordSchema = new Schema({
|
|
17
22
|
...AudioCaptchaRecordSchema.obj,
|
|
18
23
|
});
|
|
19
24
|
StoredAudioCaptchaRecordSchema.index({ sessionId: 1 });
|
|
25
|
+
StoredAudioCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
20
26
|
export const StoredIconOrderCaptchaRecordSchema = new Schema({
|
|
21
27
|
...IconOrderCaptchaRecordSchema.obj,
|
|
22
28
|
});
|
|
23
29
|
StoredIconOrderCaptchaRecordSchema.index({ sessionId: 1 });
|
|
30
|
+
StoredIconOrderCaptchaRecordSchema.add({ storedAtTimestamp });
|
|
24
31
|
//# sourceMappingURL=captcha.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../../src/types/captcha.ts"],"names":[],"mappings":"AAeA,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAEN,wBAAwB,EAExB,4BAA4B,EAE5B,sBAAsB,EAEtB,yBAAyB,EAEzB,mBAAmB,EAEnB,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;
|
|
1
|
+
{"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../../src/types/captcha.ts"],"names":[],"mappings":"AAeA,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAEN,wBAAwB,EAExB,4BAA4B,EAE5B,sBAAsB,EAEtB,yBAAyB,EAEzB,mBAAmB,EAEnB,0BAA0B,GAC1B,MAAM,eAAe,CAAC;AAKvB,MAAM,CAAC,MAAM,yBAAyB,GAAW,mBAAmB,CAAC;AAErE,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;AAEpC,MAAM,iBAAiB,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAE7E,MAAM,CAAC,MAAM,gCAAgC,GAAW,IAAI,MAAM,CAAC;IAClE,GAAG,0BAA0B,CAAC,GAAG;CACjC,CAAC,CAAC;AACH,gCAAgC,CAAC,KAAK,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
9
|
abuseScoreThreshold: number;
|
|
10
|
+
reputationScoreThreshold: number;
|
|
10
11
|
requireAllConditions: boolean;
|
|
11
12
|
forceConsistentIp: boolean;
|
|
12
13
|
actions?: {
|
|
@@ -26,12 +27,14 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
26
27
|
} | null | undefined;
|
|
27
28
|
distanceThresholdKm?: number | null | undefined;
|
|
28
29
|
abuseScoreThreshold?: number | null | undefined;
|
|
30
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
29
31
|
requireAllConditions?: boolean | null | undefined;
|
|
30
32
|
}> | null | undefined;
|
|
31
33
|
}, mongoose.Document<unknown, {}, {
|
|
32
34
|
enabled: boolean;
|
|
33
35
|
distanceThresholdKm: number;
|
|
34
36
|
abuseScoreThreshold: number;
|
|
37
|
+
reputationScoreThreshold: number;
|
|
35
38
|
requireAllConditions: boolean;
|
|
36
39
|
forceConsistentIp: boolean;
|
|
37
40
|
actions?: {
|
|
@@ -51,6 +54,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
51
54
|
} | null | undefined;
|
|
52
55
|
distanceThresholdKm?: number | null | undefined;
|
|
53
56
|
abuseScoreThreshold?: number | null | undefined;
|
|
57
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
54
58
|
requireAllConditions?: boolean | null | undefined;
|
|
55
59
|
}> | null | undefined;
|
|
56
60
|
}, {
|
|
@@ -59,6 +63,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
59
63
|
enabled: boolean;
|
|
60
64
|
distanceThresholdKm: number;
|
|
61
65
|
abuseScoreThreshold: number;
|
|
66
|
+
reputationScoreThreshold: number;
|
|
62
67
|
requireAllConditions: boolean;
|
|
63
68
|
forceConsistentIp: boolean;
|
|
64
69
|
actions?: {
|
|
@@ -78,6 +83,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
78
83
|
} | null | undefined;
|
|
79
84
|
distanceThresholdKm?: number | null | undefined;
|
|
80
85
|
abuseScoreThreshold?: number | null | undefined;
|
|
86
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
81
87
|
requireAllConditions?: boolean | null | undefined;
|
|
82
88
|
}> | null | undefined;
|
|
83
89
|
} & {
|
|
@@ -90,6 +96,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
90
96
|
enabled: boolean;
|
|
91
97
|
distanceThresholdKm: number;
|
|
92
98
|
abuseScoreThreshold: number;
|
|
99
|
+
reputationScoreThreshold: number;
|
|
93
100
|
requireAllConditions: boolean;
|
|
94
101
|
forceConsistentIp: boolean;
|
|
95
102
|
actions?: {
|
|
@@ -110,6 +117,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
110
117
|
} | null | undefined;
|
|
111
118
|
distanceThresholdKm?: number | null | undefined;
|
|
112
119
|
abuseScoreThreshold?: number | null | undefined;
|
|
120
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
113
121
|
requireAllConditions?: boolean | null | undefined;
|
|
114
122
|
};
|
|
115
123
|
} | null | undefined;
|
|
@@ -389,6 +397,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
389
397
|
enabled: boolean;
|
|
390
398
|
distanceThresholdKm: number;
|
|
391
399
|
abuseScoreThreshold: number;
|
|
400
|
+
reputationScoreThreshold: number;
|
|
392
401
|
requireAllConditions: boolean;
|
|
393
402
|
forceConsistentIp: boolean;
|
|
394
403
|
actions?: {
|
|
@@ -408,6 +417,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
408
417
|
} | null | undefined;
|
|
409
418
|
distanceThresholdKm?: number | null | undefined;
|
|
410
419
|
abuseScoreThreshold?: number | null | undefined;
|
|
420
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
411
421
|
requireAllConditions?: boolean | null | undefined;
|
|
412
422
|
}> | null | undefined;
|
|
413
423
|
} | null | undefined;
|
|
@@ -438,6 +448,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
438
448
|
} | null | undefined;
|
|
439
449
|
} | null | undefined;
|
|
440
450
|
trafficFilter?: {
|
|
451
|
+
reputationScoreThreshold: number;
|
|
441
452
|
abuserScoreThreshold: number;
|
|
442
453
|
skipExtrasOnValidDnsPath: boolean;
|
|
443
454
|
mobile?: {
|
|
@@ -725,6 +736,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
725
736
|
enabled: boolean;
|
|
726
737
|
distanceThresholdKm: number;
|
|
727
738
|
abuseScoreThreshold: number;
|
|
739
|
+
reputationScoreThreshold: number;
|
|
728
740
|
requireAllConditions: boolean;
|
|
729
741
|
forceConsistentIp: boolean;
|
|
730
742
|
actions?: {
|
|
@@ -744,6 +756,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
744
756
|
} | null | undefined;
|
|
745
757
|
distanceThresholdKm?: number | null | undefined;
|
|
746
758
|
abuseScoreThreshold?: number | null | undefined;
|
|
759
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
747
760
|
requireAllConditions?: boolean | null | undefined;
|
|
748
761
|
}> | null | undefined;
|
|
749
762
|
} | null | undefined;
|
|
@@ -774,6 +787,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
774
787
|
} | null | undefined;
|
|
775
788
|
} | null | undefined;
|
|
776
789
|
trafficFilter?: {
|
|
790
|
+
reputationScoreThreshold: number;
|
|
777
791
|
abuserScoreThreshold: number;
|
|
778
792
|
skipExtrasOnValidDnsPath: boolean;
|
|
779
793
|
mobile?: {
|
|
@@ -1063,6 +1077,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
1063
1077
|
enabled: boolean;
|
|
1064
1078
|
distanceThresholdKm: number;
|
|
1065
1079
|
abuseScoreThreshold: number;
|
|
1080
|
+
reputationScoreThreshold: number;
|
|
1066
1081
|
requireAllConditions: boolean;
|
|
1067
1082
|
forceConsistentIp: boolean;
|
|
1068
1083
|
actions?: {
|
|
@@ -1082,6 +1097,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
1082
1097
|
} | null | undefined;
|
|
1083
1098
|
distanceThresholdKm?: number | null | undefined;
|
|
1084
1099
|
abuseScoreThreshold?: number | null | undefined;
|
|
1100
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
1085
1101
|
requireAllConditions?: boolean | null | undefined;
|
|
1086
1102
|
}> | null | undefined;
|
|
1087
1103
|
} | null | undefined;
|
|
@@ -1112,6 +1128,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
1112
1128
|
} | null | undefined;
|
|
1113
1129
|
} | null | undefined;
|
|
1114
1130
|
trafficFilter?: {
|
|
1131
|
+
reputationScoreThreshold: number;
|
|
1115
1132
|
abuserScoreThreshold: number;
|
|
1116
1133
|
skipExtrasOnValidDnsPath: boolean;
|
|
1117
1134
|
mobile?: {
|
|
@@ -1405,6 +1422,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
1405
1422
|
enabled: boolean;
|
|
1406
1423
|
distanceThresholdKm: number;
|
|
1407
1424
|
abuseScoreThreshold: number;
|
|
1425
|
+
reputationScoreThreshold: number;
|
|
1408
1426
|
requireAllConditions: boolean;
|
|
1409
1427
|
forceConsistentIp: boolean;
|
|
1410
1428
|
actions?: {
|
|
@@ -1425,6 +1443,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
1425
1443
|
} | null | undefined;
|
|
1426
1444
|
distanceThresholdKm?: number | null | undefined;
|
|
1427
1445
|
abuseScoreThreshold?: number | null | undefined;
|
|
1446
|
+
reputationScoreThreshold?: number | null | undefined;
|
|
1428
1447
|
requireAllConditions?: boolean | null | undefined;
|
|
1429
1448
|
};
|
|
1430
1449
|
} | null | undefined;
|
|
@@ -1456,6 +1475,7 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
1456
1475
|
} | null | undefined;
|
|
1457
1476
|
} | null | undefined;
|
|
1458
1477
|
trafficFilter?: {
|
|
1478
|
+
reputationScoreThreshold: number;
|
|
1459
1479
|
abuserScoreThreshold: number;
|
|
1460
1480
|
skipExtrasOnValidDnsPath: boolean;
|
|
1461
1481
|
mobile?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EAGX,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,mBAAmB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EAGX,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,mBAAmB,EAqBnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,GAAG,SAAS,CAAC;AAE3D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4ElC,CAAC;AAYH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBtC,CAAC;AAGF,eAAO,MAAM,yBAAyB;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AM;cACb,MAAM;0BACM,MAAM;0BACN,MAAM,EAAE;8BACJ,OAAO;eACtB,IAAI,EAAE;eACN;YACN,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;YAClB,QAAQ,EAAE,aAAa,CAAC;YACxB,SAAS,EAAE,MAAM,CAAC;YAClB,SAAS,EAAE,MAAM,CAAC;YAClB,MAAM,EAAE,OAAO,CAAC;SAChB,EAAE;sBACW,IAAI,EAAE;;;;;;;;iBA2CnB,CAAC;AAEH,oBAAY,UAAU;IACrB,QAAQ,aAAa;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IACjD,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAGhC,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;CAC3E"}
|
package/dist/tsc/types/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CaptchaType, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT, MAX_PAD_BYTES, TrafficFilterAction, abuseScoreThresholdDefault, abuseScoreThresholdExceedActionDefault, captchaTypeDefault, cityChangeActionDefault, countryChangeActionDefault, distanceExceedActionDefault, distanceThresholdKmDefault, domainsDefault, frictionlessThresholdDefault, frictionlessTypesDefault, imageMaxRoundsDefault, imageMinRoundsDefault, imageThresholdDefault, ispChangeActionDefault, powDifficultyDefault, puzzleMaxDifficultyMax, requireAllConditionsDefault, trafficFilterAbuserScoreThresholdDefault, } from "@prosopo/types";
|
|
1
|
+
import { CaptchaType, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT, MAX_PAD_BYTES, TrafficFilterAction, abuseScoreThresholdDefault, abuseScoreThresholdExceedActionDefault, captchaTypeDefault, cityChangeActionDefault, countryChangeActionDefault, distanceExceedActionDefault, distanceThresholdKmDefault, domainsDefault, frictionlessThresholdDefault, frictionlessTypesDefault, imageMaxRoundsDefault, imageMinRoundsDefault, imageThresholdDefault, ipValidationReputationScoreThresholdDefault, ispChangeActionDefault, powDifficultyDefault, puzzleMaxDifficultyMax, requireAllConditionsDefault, trafficFilterAbuserScoreThresholdDefault, trafficFilterReputationScoreThresholdDefault, } from "@prosopo/types";
|
|
2
2
|
import { Schema as MongooseSchema, Schema } from "mongoose";
|
|
3
3
|
export const IPValidationRulesSchema = new Schema({
|
|
4
4
|
enabled: {
|
|
@@ -38,6 +38,12 @@ export const IPValidationRulesSchema = new Schema({
|
|
|
38
38
|
min: 0,
|
|
39
39
|
default: abuseScoreThresholdDefault,
|
|
40
40
|
},
|
|
41
|
+
reputationScoreThreshold: {
|
|
42
|
+
type: Number,
|
|
43
|
+
min: 0,
|
|
44
|
+
max: 1,
|
|
45
|
+
default: ipValidationReputationScoreThresholdDefault,
|
|
46
|
+
},
|
|
41
47
|
requireAllConditions: {
|
|
42
48
|
type: Boolean,
|
|
43
49
|
default: requireAllConditionsDefault,
|
|
@@ -58,6 +64,7 @@ export const IPValidationRulesSchema = new Schema({
|
|
|
58
64
|
},
|
|
59
65
|
distanceThresholdKm: { type: Number, min: 0 },
|
|
60
66
|
abuseScoreThreshold: { type: Number, min: 0 },
|
|
67
|
+
reputationScoreThreshold: { type: Number, min: 0, max: 1 },
|
|
61
68
|
requireAllConditions: { type: Boolean },
|
|
62
69
|
}),
|
|
63
70
|
default: undefined,
|
|
@@ -110,6 +117,7 @@ const TrafficCategoryExceptionSchema = TrafficCategoryActionSchema.clone().add({
|
|
|
110
117
|
countries: { type: [String], default: undefined, required: false },
|
|
111
118
|
inMarket: { type: Boolean, required: false },
|
|
112
119
|
minAbuserScore: { type: Number, min: 0, max: 1, required: false },
|
|
120
|
+
minReputationScore: { type: Number, min: 0, max: 1, required: false },
|
|
113
121
|
mobile: { type: Boolean, required: false },
|
|
114
122
|
});
|
|
115
123
|
export const TrafficCategoryPolicySchema = TrafficCategoryActionSchema.clone().add({
|
|
@@ -250,6 +258,12 @@ export const UserSettingsSchema = new Schema({
|
|
|
250
258
|
max: 1,
|
|
251
259
|
default: trafficFilterAbuserScoreThresholdDefault,
|
|
252
260
|
},
|
|
261
|
+
reputationScoreThreshold: {
|
|
262
|
+
type: Number,
|
|
263
|
+
min: 0,
|
|
264
|
+
max: 1,
|
|
265
|
+
default: trafficFilterReputationScoreThresholdDefault,
|
|
266
|
+
},
|
|
253
267
|
datacenter: { type: TrafficCategoryPolicySchema, required: false },
|
|
254
268
|
datacenterNameAllowlist: { type: [String], required: false },
|
|
255
269
|
datacenterNameDenylist: { type: [String], required: false },
|