@prosopo/types-database 4.1.5 → 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.
- package/.turbo/turbo-build$colon$cjs.log +16 -12
- package/.turbo/turbo-build$colon$tsc.log +17 -14
- package/.turbo/turbo-build.log +17 -13
- package/CHANGELOG.md +506 -0
- package/dist/cjs/index.cjs +6 -7
- package/dist/cjs/types/bannedDomain.cjs +8 -0
- package/dist/cjs/types/client.cjs +77 -5
- package/dist/cjs/types/index.cjs +6 -7
- package/dist/cjs/types/provider.cjs +298 -88
- package/dist/cjs/types/spamEmailDomain.cjs +8 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -9
- package/dist/types/bannedDomain.d.ts +15 -0
- package/dist/types/bannedDomain.d.ts.map +1 -0
- package/dist/types/bannedDomain.js +8 -0
- package/dist/types/bannedDomain.js.map +1 -0
- package/dist/types/captcha.d.ts +2 -2
- package/dist/types/captcha.d.ts.map +1 -1
- package/dist/types/captcha.js.map +1 -1
- package/dist/types/client.d.ts +111 -12
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js +78 -6
- package/dist/types/client.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +8 -9
- package/dist/types/index.js.map +1 -1
- package/dist/types/mongo.d.ts +1 -1
- package/dist/types/provider.d.ts +59 -463
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/provider.js +300 -90
- package/dist/types/provider.js.map +1 -1
- package/dist/types/spamEmailDomain.d.ts +15 -0
- package/dist/types/spamEmailDomain.d.ts.map +1 -0
- package/dist/types/spamEmailDomain.js +8 -0
- package/dist/types/spamEmailDomain.js.map +1 -0
- package/package.json +9 -7
- package/dist/provider/pendingCaptchaRequest.d.ts +0 -14
- package/dist/provider/pendingCaptchaRequest.d.ts.map +0 -1
- package/dist/provider/pendingCaptchaRequest.js +0 -2
- package/dist/provider/pendingCaptchaRequest.js.map +0 -1
|
@@ -1 +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,
|
|
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"}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { IDatabase } from "./mongo.js";
|
|
|
4
4
|
import type { ClientRecord, Tables } from "./provider.js";
|
|
5
5
|
export type UserDataRecord = mongoose.Document & IUserData;
|
|
6
6
|
export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
7
|
+
enabled: boolean;
|
|
7
8
|
distanceThresholdKm: number;
|
|
8
9
|
abuseScoreThreshold: number;
|
|
9
10
|
requireAllConditions: boolean;
|
|
@@ -30,6 +31,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
30
31
|
requireAllConditions?: boolean | null | undefined;
|
|
31
32
|
}> | null | undefined;
|
|
32
33
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
34
|
+
enabled: boolean;
|
|
33
35
|
distanceThresholdKm: number;
|
|
34
36
|
abuseScoreThreshold: number;
|
|
35
37
|
requireAllConditions: boolean;
|
|
@@ -56,6 +58,7 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
56
58
|
requireAllConditions?: boolean | null | undefined;
|
|
57
59
|
}> | null | undefined;
|
|
58
60
|
}>> & mongoose.FlatRecord<{
|
|
61
|
+
enabled: boolean;
|
|
59
62
|
distanceThresholdKm: number;
|
|
60
63
|
abuseScoreThreshold: number;
|
|
61
64
|
requireAllConditions: boolean;
|
|
@@ -87,13 +90,14 @@ export declare const IPValidationRulesSchema: mongoose.Schema<any, mongoose.Mode
|
|
|
87
90
|
__v: number;
|
|
88
91
|
}>;
|
|
89
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;
|
|
90
97
|
domains: string[];
|
|
91
98
|
disallowWebView: boolean;
|
|
92
|
-
captchaType?: string | null | undefined;
|
|
93
|
-
frictionlessThreshold?: number | null | undefined;
|
|
94
|
-
powDifficulty?: number | null | undefined;
|
|
95
|
-
imageThreshold?: number | null | undefined;
|
|
96
99
|
ipValidationRules?: {
|
|
100
|
+
enabled: boolean;
|
|
97
101
|
distanceThresholdKm: number;
|
|
98
102
|
abuseScoreThreshold: number;
|
|
99
103
|
requireAllConditions: boolean;
|
|
@@ -120,18 +124,50 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
120
124
|
requireAllConditions?: boolean | null | undefined;
|
|
121
125
|
}> | null | undefined;
|
|
122
126
|
} | null | undefined;
|
|
127
|
+
imageMaxRounds?: number | null | undefined;
|
|
128
|
+
puzzleTolerance?: number | null | undefined;
|
|
123
129
|
contextAware?: {
|
|
124
130
|
enabled: boolean;
|
|
125
131
|
contexts: any;
|
|
126
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;
|
|
127
162
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
163
|
+
captchaType: string;
|
|
164
|
+
frictionlessThreshold: number;
|
|
165
|
+
powDifficulty: number;
|
|
166
|
+
imageThreshold: number;
|
|
128
167
|
domains: string[];
|
|
129
168
|
disallowWebView: boolean;
|
|
130
|
-
captchaType?: string | null | undefined;
|
|
131
|
-
frictionlessThreshold?: number | null | undefined;
|
|
132
|
-
powDifficulty?: number | null | undefined;
|
|
133
|
-
imageThreshold?: number | null | undefined;
|
|
134
169
|
ipValidationRules?: {
|
|
170
|
+
enabled: boolean;
|
|
135
171
|
distanceThresholdKm: number;
|
|
136
172
|
abuseScoreThreshold: number;
|
|
137
173
|
requireAllConditions: boolean;
|
|
@@ -158,18 +194,50 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
158
194
|
requireAllConditions?: boolean | null | undefined;
|
|
159
195
|
}> | null | undefined;
|
|
160
196
|
} | null | undefined;
|
|
197
|
+
imageMaxRounds?: number | null | undefined;
|
|
198
|
+
puzzleTolerance?: number | null | undefined;
|
|
161
199
|
contextAware?: {
|
|
162
200
|
enabled: boolean;
|
|
163
201
|
contexts: any;
|
|
164
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;
|
|
165
232
|
}>> & mongoose.FlatRecord<{
|
|
233
|
+
captchaType: string;
|
|
234
|
+
frictionlessThreshold: number;
|
|
235
|
+
powDifficulty: number;
|
|
236
|
+
imageThreshold: number;
|
|
166
237
|
domains: string[];
|
|
167
238
|
disallowWebView: boolean;
|
|
168
|
-
captchaType?: string | null | undefined;
|
|
169
|
-
frictionlessThreshold?: number | null | undefined;
|
|
170
|
-
powDifficulty?: number | null | undefined;
|
|
171
|
-
imageThreshold?: number | null | undefined;
|
|
172
239
|
ipValidationRules?: {
|
|
240
|
+
enabled: boolean;
|
|
173
241
|
distanceThresholdKm: number;
|
|
174
242
|
abuseScoreThreshold: number;
|
|
175
243
|
requireAllConditions: boolean;
|
|
@@ -196,10 +264,41 @@ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
196
264
|
requireAllConditions?: boolean | null | undefined;
|
|
197
265
|
}> | null | undefined;
|
|
198
266
|
} | null | undefined;
|
|
267
|
+
imageMaxRounds?: number | null | undefined;
|
|
268
|
+
puzzleTolerance?: number | null | undefined;
|
|
199
269
|
contextAware?: {
|
|
200
270
|
enabled: boolean;
|
|
201
271
|
contexts: any;
|
|
202
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;
|
|
203
302
|
}> & {
|
|
204
303
|
_id: mongoose.Types.ObjectId;
|
|
205
304
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmElC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC;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"}
|
package/dist/types/client.js
CHANGED
|
@@ -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:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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:
|
|
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({
|
package/dist/types/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EAIX,0BAA0B,EAC1B,sCAAsC,EACtC,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAA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QAAQ,EAAE,KAAK;KACf;IACD,kBAAkB,EAAE,IAAI;CACxB,CAAC,CAAC;AAgCH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAgB;IACtD,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,MAAM;IACxB,oBAAoB,EAAE,OAAO;IAC7B,KAAK,EAAE;QACN;YACC,KAAK,EAAE,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"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +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"}
|
|
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"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import "./mongo.js";
|
|
2
|
-
import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj,
|
|
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
|
};
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +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"}
|
|
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"}
|
package/dist/types/mongo.d.ts
CHANGED