@prosopo/types-database 4.0.6 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +16 -12
  2. package/.turbo/turbo-build$colon$tsc.log +44 -0
  3. package/.turbo/turbo-build.log +21 -13
  4. package/CHANGELOG.md +581 -0
  5. package/dist/cjs/index.cjs +6 -7
  6. package/dist/cjs/types/bannedDomain.cjs +8 -0
  7. package/dist/cjs/types/client.cjs +77 -5
  8. package/dist/cjs/types/index.cjs +6 -7
  9. package/dist/cjs/types/provider.cjs +312 -86
  10. package/dist/cjs/types/spamEmailDomain.cjs +8 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +8 -9
  14. package/dist/index.js.map +1 -0
  15. package/dist/types/bannedDomain.d.ts +15 -0
  16. package/dist/types/bannedDomain.d.ts.map +1 -0
  17. package/dist/types/bannedDomain.js +8 -0
  18. package/dist/types/bannedDomain.js.map +1 -0
  19. package/dist/types/captcha.d.ts +18 -0
  20. package/dist/types/captcha.d.ts.map +1 -0
  21. package/dist/types/captcha.js.map +1 -0
  22. package/dist/types/client.d.ts +370 -0
  23. package/dist/types/client.d.ts.map +1 -0
  24. package/dist/types/client.js +78 -6
  25. package/dist/types/client.js.map +1 -0
  26. package/dist/types/index.d.ts +8 -0
  27. package/dist/types/index.d.ts.map +1 -0
  28. package/dist/types/index.js +8 -9
  29. package/dist/types/index.js.map +1 -0
  30. package/dist/types/mongo.d.ts +13 -0
  31. package/dist/types/mongo.d.ts.map +1 -0
  32. package/dist/types/mongo.js.map +1 -0
  33. package/dist/types/provider.d.ts +298 -0
  34. package/dist/types/provider.d.ts.map +1 -0
  35. package/dist/types/provider.js +314 -88
  36. package/dist/types/provider.js.map +1 -0
  37. package/dist/types/spamEmailDomain.d.ts +15 -0
  38. package/dist/types/spamEmailDomain.d.ts.map +1 -0
  39. package/dist/types/spamEmailDomain.js +8 -0
  40. package/dist/types/spamEmailDomain.js.map +1 -0
  41. package/dist/types/userAgent.d.ts +31 -0
  42. package/dist/types/userAgent.d.ts.map +1 -0
  43. package/dist/types/userAgent.js.map +1 -0
  44. package/package.json +11 -8
  45. package/vite.cjs.config.ts +1 -1
  46. package/vite.esm.config.ts +1 -1
package/dist/index.js CHANGED
@@ -1,34 +1,33 @@
1
1
  import "./types/index.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";
2
+ import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, DetectorRecordSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserSolutionRecordSchema } 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
+ import { SpamEmailDomainRecordSchema } from "./types/spamEmailDomain.js";
6
+ import { BannedDomainRecordSchema } from "./types/bannedDomain.js";
5
7
  export {
6
8
  AccountSchema,
9
+ BannedDomainRecordSchema,
7
10
  CaptchaRecordSchema,
8
11
  ClientContextEntropyRecordSchema,
9
12
  ClientRecordSchema,
10
13
  CompositeIpAddressRecordSchemaObj,
11
- CompositeIpAddressSchema,
12
14
  DatasetRecordSchema,
15
+ DecisionMachineArtifactRecordSchema,
13
16
  DetectorRecordSchema,
14
17
  IPValidationRulesSchema,
15
- IpAddressType,
16
- PendingRecordSchema,
17
18
  PoWCaptchaRecordSchema,
19
+ PuzzleCaptchaRecordSchema,
18
20
  ScheduledTaskRecordSchema,
19
21
  ScheduledTaskSchema,
20
22
  SessionRecordSchema,
21
23
  SolutionRecordSchema,
24
+ SpamEmailDomainRecordSchema,
22
25
  StoredPoWCaptchaRecordSchema,
23
26
  StoredSessionRecordSchema,
24
27
  StoredUserCommitmentRecordSchema,
25
28
  TableNames,
26
29
  UserCommitmentRecordSchema,
27
- UserCommitmentSchema,
28
- UserCommitmentWithSolutionsSchema,
29
30
  UserDataSchema,
30
31
  UserSettingsSchema,
31
- UserSolutionRecordSchema,
32
- UserSolutionSchema,
33
- parseMongooseCompositeIpAddress
32
+ UserSolutionRecordSchema
34
33
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type mongoose from "mongoose";
2
+ export type BannedDomain = {
3
+ domain: string;
4
+ };
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> & mongoose.Document<unknown, any, any> & BannedDomain & Required<{
7
+ _id: unknown;
8
+ }> & {
9
+ __v: number;
10
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, BannedDomainRecord, mongoose.Document<unknown, {}, mongoose.FlatRecord<BannedDomainRecord>> & mongoose.FlatRecord<BannedDomainRecord> & Required<{
11
+ _id: unknown;
12
+ }> & {
13
+ __v: number;
14
+ }>;
15
+ //# sourceMappingURL=bannedDomain.d.ts.map
@@ -0,0 +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;;;;;;;;EAEnC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Schema } from "mongoose";
2
+ const BannedDomainRecordSchema = new Schema({
3
+ domain: { type: String, required: true, unique: true }
4
+ });
5
+ BannedDomainRecordSchema.index({ domain: 1 });
6
+ export {
7
+ BannedDomainRecordSchema
8
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bannedDomain.js","sourceRoot":"","sources":["../../src/types/bannedDomain.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,MAAM,CAAqB;IACtE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;CACtD,CAAC,CAAC;AAEH,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { PoWCaptcha, UserCommitment } from "@prosopo/types";
2
+ import { type RootFilterQuery, Schema } from "mongoose";
3
+ import type { IDatabase } from "./mongo.js";
4
+ import { type PoWCaptchaRecord, type SessionRecord, 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,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,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,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,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;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"}
@@ -0,0 +1,370 @@
1
+ import { type IUserData, type IUserSettings, type Timestamp } from "@prosopo/types";
2
+ import mongoose from "mongoose";
3
+ import type { IDatabase } from "./mongo.js";
4
+ import type { ClientRecord, Tables } from "./provider.js";
5
+ export type UserDataRecord = mongoose.Document & IUserData;
6
+ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
7
+ enabled: boolean;
8
+ distanceThresholdKm: number;
9
+ abuseScoreThreshold: number;
10
+ requireAllConditions: boolean;
11
+ forceConsistentIp: boolean;
12
+ actions?: {
13
+ countryChangeAction: any;
14
+ cityChangeAction: any;
15
+ ispChangeAction: any;
16
+ distanceExceedAction: any;
17
+ abuseScoreExceedAction: any;
18
+ } | null | undefined;
19
+ countryOverrides?: Map<string, {
20
+ [x: string]: unknown;
21
+ } | {
22
+ actions?: {
23
+ countryChangeAction?: any;
24
+ cityChangeAction?: any;
25
+ ispChangeAction?: any;
26
+ distanceExceedAction?: any;
27
+ abuseScoreExceedAction?: any;
28
+ } | null | undefined;
29
+ distanceThresholdKm?: number | null | undefined;
30
+ abuseScoreThreshold?: number | null | undefined;
31
+ requireAllConditions?: boolean | null | undefined;
32
+ }> | null | undefined;
33
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
34
+ enabled: boolean;
35
+ distanceThresholdKm: number;
36
+ abuseScoreThreshold: number;
37
+ requireAllConditions: boolean;
38
+ forceConsistentIp: boolean;
39
+ actions?: {
40
+ countryChangeAction: any;
41
+ cityChangeAction: any;
42
+ ispChangeAction: any;
43
+ distanceExceedAction: any;
44
+ abuseScoreExceedAction: any;
45
+ } | null | undefined;
46
+ countryOverrides?: Map<string, {
47
+ [x: string]: unknown;
48
+ } | {
49
+ actions?: {
50
+ countryChangeAction?: any;
51
+ cityChangeAction?: any;
52
+ ispChangeAction?: any;
53
+ distanceExceedAction?: any;
54
+ abuseScoreExceedAction?: any;
55
+ } | null | undefined;
56
+ distanceThresholdKm?: number | null | undefined;
57
+ abuseScoreThreshold?: number | null | undefined;
58
+ requireAllConditions?: boolean | null | undefined;
59
+ }> | null | undefined;
60
+ }>> & mongoose.FlatRecord<{
61
+ enabled: boolean;
62
+ distanceThresholdKm: number;
63
+ abuseScoreThreshold: number;
64
+ requireAllConditions: boolean;
65
+ forceConsistentIp: boolean;
66
+ actions?: {
67
+ countryChangeAction: any;
68
+ cityChangeAction: any;
69
+ ispChangeAction: any;
70
+ distanceExceedAction: any;
71
+ abuseScoreExceedAction: any;
72
+ } | null | undefined;
73
+ countryOverrides?: Map<string, {
74
+ [x: string]: unknown;
75
+ } | {
76
+ actions?: {
77
+ countryChangeAction?: any;
78
+ cityChangeAction?: any;
79
+ ispChangeAction?: any;
80
+ distanceExceedAction?: any;
81
+ abuseScoreExceedAction?: any;
82
+ } | null | undefined;
83
+ distanceThresholdKm?: number | null | undefined;
84
+ abuseScoreThreshold?: number | null | undefined;
85
+ requireAllConditions?: boolean | null | undefined;
86
+ }> | null | undefined;
87
+ }> & {
88
+ _id: mongoose.Types.ObjectId;
89
+ } & {
90
+ __v: number;
91
+ }>;
92
+ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
93
+ captchaType: string;
94
+ frictionlessThreshold: number;
95
+ powDifficulty: number;
96
+ imageThreshold: number;
97
+ domains: string[];
98
+ disallowWebView: boolean;
99
+ ipValidationRules?: {
100
+ enabled: boolean;
101
+ distanceThresholdKm: number;
102
+ abuseScoreThreshold: number;
103
+ requireAllConditions: boolean;
104
+ forceConsistentIp: boolean;
105
+ actions?: {
106
+ countryChangeAction: any;
107
+ cityChangeAction: any;
108
+ ispChangeAction: any;
109
+ distanceExceedAction: any;
110
+ abuseScoreExceedAction: any;
111
+ } | null | undefined;
112
+ countryOverrides?: Map<string, {
113
+ [x: string]: unknown;
114
+ } | {
115
+ actions?: {
116
+ countryChangeAction?: any;
117
+ cityChangeAction?: any;
118
+ ispChangeAction?: any;
119
+ distanceExceedAction?: any;
120
+ abuseScoreExceedAction?: any;
121
+ } | null | undefined;
122
+ distanceThresholdKm?: number | null | undefined;
123
+ abuseScoreThreshold?: number | null | undefined;
124
+ requireAllConditions?: boolean | null | undefined;
125
+ }> | null | undefined;
126
+ } | null | undefined;
127
+ imageMaxRounds?: number | null | undefined;
128
+ puzzleTolerance?: number | null | undefined;
129
+ contextAware?: {
130
+ enabled: boolean;
131
+ contexts: any;
132
+ } | null | undefined;
133
+ spamEmailDomainCheckEnabled?: boolean | null | undefined;
134
+ autoBanScoreThreshold?: number | null | undefined;
135
+ spamFilter?: {
136
+ enabled: boolean;
137
+ emailRules?: {
138
+ enabled: boolean;
139
+ normaliseGmail: boolean;
140
+ useDefaultPatterns: boolean;
141
+ customRegexBlocklist: string[];
142
+ maxLocalPartDots?: number | null | undefined;
143
+ } | null | undefined;
144
+ } | null | undefined;
145
+ trafficFilter?: {
146
+ blockVpn: boolean;
147
+ blockProxy: boolean;
148
+ blockTor: boolean;
149
+ blockAbuser: boolean;
150
+ abuserScoreThreshold: number;
151
+ blockDatacenter: boolean;
152
+ blockMobile: boolean;
153
+ blockSatellite: boolean;
154
+ blockCrawler: boolean;
155
+ } | null | undefined;
156
+ storeMetadata?: boolean | null | undefined;
157
+ honeypot?: {
158
+ enabled: boolean;
159
+ encodingType: "morse" | "semaphore";
160
+ question?: string | null | undefined;
161
+ } | null | undefined;
162
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
163
+ captchaType: string;
164
+ frictionlessThreshold: number;
165
+ powDifficulty: number;
166
+ imageThreshold: number;
167
+ domains: string[];
168
+ disallowWebView: boolean;
169
+ ipValidationRules?: {
170
+ enabled: boolean;
171
+ distanceThresholdKm: number;
172
+ abuseScoreThreshold: number;
173
+ requireAllConditions: boolean;
174
+ forceConsistentIp: boolean;
175
+ actions?: {
176
+ countryChangeAction: any;
177
+ cityChangeAction: any;
178
+ ispChangeAction: any;
179
+ distanceExceedAction: any;
180
+ abuseScoreExceedAction: any;
181
+ } | null | undefined;
182
+ countryOverrides?: Map<string, {
183
+ [x: string]: unknown;
184
+ } | {
185
+ actions?: {
186
+ countryChangeAction?: any;
187
+ cityChangeAction?: any;
188
+ ispChangeAction?: any;
189
+ distanceExceedAction?: any;
190
+ abuseScoreExceedAction?: any;
191
+ } | null | undefined;
192
+ distanceThresholdKm?: number | null | undefined;
193
+ abuseScoreThreshold?: number | null | undefined;
194
+ requireAllConditions?: boolean | null | undefined;
195
+ }> | null | undefined;
196
+ } | null | undefined;
197
+ imageMaxRounds?: number | null | undefined;
198
+ puzzleTolerance?: number | null | undefined;
199
+ contextAware?: {
200
+ enabled: boolean;
201
+ contexts: any;
202
+ } | null | undefined;
203
+ spamEmailDomainCheckEnabled?: boolean | null | undefined;
204
+ autoBanScoreThreshold?: number | null | undefined;
205
+ spamFilter?: {
206
+ enabled: boolean;
207
+ emailRules?: {
208
+ enabled: boolean;
209
+ normaliseGmail: boolean;
210
+ useDefaultPatterns: boolean;
211
+ customRegexBlocklist: string[];
212
+ maxLocalPartDots?: number | null | undefined;
213
+ } | null | undefined;
214
+ } | null | undefined;
215
+ trafficFilter?: {
216
+ blockVpn: boolean;
217
+ blockProxy: boolean;
218
+ blockTor: boolean;
219
+ blockAbuser: boolean;
220
+ abuserScoreThreshold: number;
221
+ blockDatacenter: boolean;
222
+ blockMobile: boolean;
223
+ blockSatellite: boolean;
224
+ blockCrawler: boolean;
225
+ } | null | undefined;
226
+ storeMetadata?: boolean | null | undefined;
227
+ honeypot?: {
228
+ enabled: boolean;
229
+ encodingType: "morse" | "semaphore";
230
+ question?: string | null | undefined;
231
+ } | null | undefined;
232
+ }>> & mongoose.FlatRecord<{
233
+ captchaType: string;
234
+ frictionlessThreshold: number;
235
+ powDifficulty: number;
236
+ imageThreshold: number;
237
+ domains: string[];
238
+ disallowWebView: boolean;
239
+ ipValidationRules?: {
240
+ enabled: boolean;
241
+ distanceThresholdKm: number;
242
+ abuseScoreThreshold: number;
243
+ requireAllConditions: boolean;
244
+ forceConsistentIp: boolean;
245
+ actions?: {
246
+ countryChangeAction: any;
247
+ cityChangeAction: any;
248
+ ispChangeAction: any;
249
+ distanceExceedAction: any;
250
+ abuseScoreExceedAction: any;
251
+ } | null | undefined;
252
+ countryOverrides?: Map<string, {
253
+ [x: string]: unknown;
254
+ } | {
255
+ actions?: {
256
+ countryChangeAction?: any;
257
+ cityChangeAction?: any;
258
+ ispChangeAction?: any;
259
+ distanceExceedAction?: any;
260
+ abuseScoreExceedAction?: any;
261
+ } | null | undefined;
262
+ distanceThresholdKm?: number | null | undefined;
263
+ abuseScoreThreshold?: number | null | undefined;
264
+ requireAllConditions?: boolean | null | undefined;
265
+ }> | null | undefined;
266
+ } | null | undefined;
267
+ imageMaxRounds?: number | null | undefined;
268
+ puzzleTolerance?: number | null | undefined;
269
+ contextAware?: {
270
+ enabled: boolean;
271
+ contexts: any;
272
+ } | null | undefined;
273
+ spamEmailDomainCheckEnabled?: boolean | null | undefined;
274
+ autoBanScoreThreshold?: number | null | undefined;
275
+ spamFilter?: {
276
+ enabled: boolean;
277
+ emailRules?: {
278
+ enabled: boolean;
279
+ normaliseGmail: boolean;
280
+ useDefaultPatterns: boolean;
281
+ customRegexBlocklist: string[];
282
+ maxLocalPartDots?: number | null | undefined;
283
+ } | null | undefined;
284
+ } | null | undefined;
285
+ trafficFilter?: {
286
+ blockVpn: boolean;
287
+ blockProxy: boolean;
288
+ blockTor: boolean;
289
+ blockAbuser: boolean;
290
+ abuserScoreThreshold: number;
291
+ blockDatacenter: boolean;
292
+ blockMobile: boolean;
293
+ blockSatellite: boolean;
294
+ blockCrawler: boolean;
295
+ } | null | undefined;
296
+ storeMetadata?: boolean | null | undefined;
297
+ honeypot?: {
298
+ enabled: boolean;
299
+ encodingType: "morse" | "semaphore";
300
+ question?: string | null | undefined;
301
+ } | null | undefined;
302
+ }> & {
303
+ _id: mongoose.Types.ObjectId;
304
+ } & {
305
+ __v: number;
306
+ }>;
307
+ export declare const UserDataSchema: mongoose.Schema<UserDataRecord>;
308
+ type User = {
309
+ email: string;
310
+ name: string;
311
+ role: string;
312
+ createdAt: number;
313
+ updatedAt: number;
314
+ status: string;
315
+ };
316
+ type AccountRecord = mongoose.Document & {
317
+ createdAt: number;
318
+ updatedAt: number;
319
+ signupEmail: string;
320
+ tier: string;
321
+ tierRequestQuota: number;
322
+ marketingPreferences: boolean;
323
+ users: User[];
324
+ sites: {
325
+ name: string;
326
+ siteKey: string;
327
+ secretKey: string;
328
+ settings: IUserSettings;
329
+ createdAt: number;
330
+ updatedAt: number;
331
+ active: boolean;
332
+ }[];
333
+ deletedUsers: User[];
334
+ };
335
+ export declare const AccountSchema: mongoose.Schema<AccountRecord, mongoose.Model<AccountRecord, any, any, any, mongoose.Document<unknown, any, AccountRecord> & mongoose.Document<unknown, any, any> & {
336
+ createdAt: number;
337
+ updatedAt: number;
338
+ signupEmail: string;
339
+ tier: string;
340
+ tierRequestQuota: number;
341
+ marketingPreferences: boolean;
342
+ users: User[];
343
+ sites: {
344
+ name: string;
345
+ siteKey: string;
346
+ secretKey: string;
347
+ settings: IUserSettings;
348
+ createdAt: number;
349
+ updatedAt: number;
350
+ active: boolean;
351
+ }[];
352
+ deletedUsers: User[];
353
+ } & Required<{
354
+ _id: unknown;
355
+ }> & {
356
+ __v: number;
357
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, AccountRecord, mongoose.Document<unknown, {}, mongoose.FlatRecord<AccountRecord>> & mongoose.FlatRecord<AccountRecord> & Required<{
358
+ _id: unknown;
359
+ }> & {
360
+ __v: number;
361
+ }>;
362
+ export declare enum TableNames {
363
+ accounts = "accounts"
364
+ }
365
+ export interface IClientDatabase extends IDatabase {
366
+ getTables(): Tables<TableNames>;
367
+ getUpdatedClients(updatedAtTimestamp: Timestamp): Promise<ClientRecord[]>;
368
+ }
369
+ export {};
370
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,EAGN,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,SAAS,EAgBd,MAAM,gBAAgB,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,GAAG,SAAS,CAAC;AAE3D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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a;eApBd,MAAM;eACN,MAAM;iBACJ,MAAM;UACb,MAAM;sBACM,MAAM;0BACF,OAAO;WACtB,IAAI,EAAE;WACN;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,aAAa,CAAC;QACxB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;KAChB,EAAE;kBACW,IAAI,EAAE;;;;;;;;;EAuCnB,CAAC;AAEH,oBAAY,UAAU;IACrB,QAAQ,aAAa;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IACjD,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAChC,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC1E"}
@@ -1,6 +1,11 @@
1
- import { requireAllConditionsDefault, abuseScoreThresholdDefault, distanceThresholdKmDefault, abuseScoreThresholdExceedActionDefault, distanceExceedActionDefault, ispChangeActionDefault, cityChangeActionDefault, countryChangeActionDefault, ContextType, contextAwareThresholdDefault } from "@prosopo/types";
1
+ import { requireAllConditionsDefault, abuseScoreThresholdDefault, distanceThresholdKmDefault, abuseScoreThresholdExceedActionDefault, distanceExceedActionDefault, ispChangeActionDefault, cityChangeActionDefault, countryChangeActionDefault, ContextType, contextAwareThresholdDefault, domainsDefault, imageMaxRoundsDefault, imageThresholdDefault, powDifficultyDefault, frictionlessThresholdDefault, captchaTypeDefault, CaptchaType } from "@prosopo/types";
2
2
  import mongoose, { Schema } from "mongoose";
3
3
  const IPValidationRulesSchema = new Schema({
4
+ enabled: {
5
+ type: Boolean,
6
+ default: false,
7
+ required: true
8
+ },
4
9
  actions: {
5
10
  countryChangeAction: {
6
11
  type: Schema.Types.Mixed,
@@ -59,12 +64,34 @@ const IPValidationRulesSchema = new Schema({
59
64
  }
60
65
  });
61
66
  const UserSettingsSchema = new Schema({
62
- captchaType: String,
63
- frictionlessThreshold: Number,
64
- powDifficulty: Number,
65
- imageThreshold: Number,
67
+ captchaType: {
68
+ type: String,
69
+ enum: CaptchaType,
70
+ default: captchaTypeDefault
71
+ },
72
+ frictionlessThreshold: {
73
+ type: Number,
74
+ default: frictionlessThresholdDefault
75
+ },
76
+ powDifficulty: { type: Number, default: powDifficultyDefault },
77
+ imageThreshold: {
78
+ type: Number,
79
+ default: imageThresholdDefault
80
+ },
81
+ imageMaxRounds: {
82
+ type: Number,
83
+ default: imageMaxRoundsDefault,
84
+ required: false
85
+ },
86
+ puzzleTolerance: {
87
+ type: Number,
88
+ required: false
89
+ },
66
90
  ipValidationRules: IPValidationRulesSchema,
67
- domains: [String],
91
+ domains: {
92
+ type: [String],
93
+ default: domainsDefault
94
+ },
68
95
  disallowWebView: {
69
96
  type: Boolean,
70
97
  default: false
@@ -84,6 +111,51 @@ const UserSettingsSchema = new Schema({
84
111
  }
85
112
  }
86
113
  }
114
+ },
115
+ spamEmailDomainCheckEnabled: {
116
+ type: Boolean,
117
+ default: false,
118
+ required: false
119
+ },
120
+ autoBanScoreThreshold: {
121
+ type: Number,
122
+ min: 0,
123
+ required: false
124
+ },
125
+ spamFilter: {
126
+ enabled: { type: Boolean, default: false },
127
+ emailRules: {
128
+ enabled: { type: Boolean, default: false },
129
+ maxLocalPartDots: { type: Number, required: false },
130
+ normaliseGmail: { type: Boolean, default: false },
131
+ useDefaultPatterns: { type: Boolean, default: false },
132
+ customRegexBlocklist: { type: [String], default: [] }
133
+ }
134
+ },
135
+ trafficFilter: {
136
+ blockVpn: { type: Boolean, default: false },
137
+ blockProxy: { type: Boolean, default: false },
138
+ blockTor: { type: Boolean, default: false },
139
+ blockAbuser: { type: Boolean, default: true },
140
+ abuserScoreThreshold: { type: Number, min: 0, max: 1, default: 0 },
141
+ blockDatacenter: { type: Boolean, default: false },
142
+ blockMobile: { type: Boolean, default: false },
143
+ blockSatellite: { type: Boolean, default: false },
144
+ blockCrawler: { type: Boolean, default: false }
145
+ },
146
+ storeMetadata: {
147
+ type: Boolean,
148
+ default: false,
149
+ required: false
150
+ },
151
+ honeypot: {
152
+ enabled: { type: Boolean, default: false },
153
+ question: { type: String, required: false },
154
+ encodingType: {
155
+ type: String,
156
+ enum: ["morse", "semaphore"],
157
+ default: "morse"
158
+ }
87
159
  }
88
160
  });
89
161
  const UserDataSchema = new Schema({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EACX,WAAW,EAIX,0BAA0B,EAC1B,sCAAsC,EACtC,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,cAAc,EACd,4BAA4B,EAC5B,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,MAAM,CAAC;IACjD,OAAO,EAAE;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,mBAAmB,EAAE;YACpB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,0BAA0B;SACzC;QACD,gBAAgB,EAAE;YACjB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB;SACtC;QACD,eAAe,EAAE;YAChB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;YACxB,OAAO,EAAE,GAAG,EAAE,CAA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E,MAAM;YACb,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;YACjB,MAAM,EAAE,MAAM;SACd;KACD;IACD,KAAK,EAAE;QACN;YACC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE;gBACT,OAAO,EAAE,CAAC,MAAM,CAAC;gBACjB,aAAa,EAAE,MAAM;gBACrB,WAAW,EAAE,MAAM;gBACnB,qBAAqB,EAAE,MAAM;gBAC7B,iBAAiB,EAAE,uBAAuB;aAC1C;YACD,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;YACjB,MAAM,EAAE,OAAO;SACf;KACD;IACD,YAAY,EAAE,EAAE;CAChB,CAAC,CAAC;AAEH,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IACrB,mCAAqB,CAAA;AACtB,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB"}
@@ -0,0 +1,8 @@
1
+ export * from "./mongo.js";
2
+ export * from "./provider.js";
3
+ export * from "./client.js";
4
+ export * from "./captcha.js";
5
+ export * from "./userAgent.js";
6
+ export * from "./spamEmailDomain.js";
7
+ export * from "./bannedDomain.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
@@ -1,35 +1,34 @@
1
1
  import "./mongo.js";
2
- import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, CompositeIpAddressSchema, DatasetRecordSchema, DetectorRecordSchema, IpAddressType, PendingRecordSchema, PoWCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserCommitmentSchema, UserCommitmentWithSolutionsSchema, UserSolutionRecordSchema, UserSolutionSchema, parseMongooseCompositeIpAddress } from "./provider.js";
2
+ import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, DetectorRecordSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserSolutionRecordSchema } from "./provider.js";
3
3
  import { AccountSchema, IPValidationRulesSchema, TableNames, UserDataSchema, UserSettingsSchema } from "./client.js";
4
4
  import { StoredPoWCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema } from "./captcha.js";
5
5
  import "./userAgent.js";
6
+ import { SpamEmailDomainRecordSchema } from "./spamEmailDomain.js";
7
+ import { BannedDomainRecordSchema } from "./bannedDomain.js";
6
8
  export {
7
9
  AccountSchema,
10
+ BannedDomainRecordSchema,
8
11
  CaptchaRecordSchema,
9
12
  ClientContextEntropyRecordSchema,
10
13
  ClientRecordSchema,
11
14
  CompositeIpAddressRecordSchemaObj,
12
- CompositeIpAddressSchema,
13
15
  DatasetRecordSchema,
16
+ DecisionMachineArtifactRecordSchema,
14
17
  DetectorRecordSchema,
15
18
  IPValidationRulesSchema,
16
- IpAddressType,
17
- PendingRecordSchema,
18
19
  PoWCaptchaRecordSchema,
20
+ PuzzleCaptchaRecordSchema,
19
21
  ScheduledTaskRecordSchema,
20
22
  ScheduledTaskSchema,
21
23
  SessionRecordSchema,
22
24
  SolutionRecordSchema,
25
+ SpamEmailDomainRecordSchema,
23
26
  StoredPoWCaptchaRecordSchema,
24
27
  StoredSessionRecordSchema,
25
28
  StoredUserCommitmentRecordSchema,
26
29
  TableNames,
27
30
  UserCommitmentRecordSchema,
28
- UserCommitmentSchema,
29
- UserCommitmentWithSolutionsSchema,
30
31
  UserDataSchema,
31
32
  UserSettingsSchema,
32
- UserSolutionRecordSchema,
33
- UserSolutionSchema,
34
- parseMongooseCompositeIpAddress
33
+ UserSolutionRecordSchema
35
34
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC"}