@prosopo/types-database 4.0.5 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +45 -0
  2. package/.turbo/turbo-build$colon$tsc.log +41 -0
  3. package/.turbo/turbo-build.log +49 -0
  4. package/CHANGELOG.md +85 -0
  5. package/dist/cjs/index.cjs +1 -1
  6. package/dist/cjs/types/client.cjs +13 -1
  7. package/dist/cjs/types/index.cjs +1 -1
  8. package/dist/cjs/types/provider.cjs +36 -11
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +2 -2
  12. package/dist/index.js.map +1 -0
  13. package/dist/provider/pendingCaptchaRequest.d.ts +14 -0
  14. package/dist/provider/pendingCaptchaRequest.d.ts.map +1 -0
  15. package/dist/provider/pendingCaptchaRequest.js +2 -0
  16. package/dist/provider/pendingCaptchaRequest.js.map +1 -0
  17. package/dist/types/captcha.d.ts +18 -0
  18. package/dist/types/captcha.d.ts.map +1 -0
  19. package/dist/types/captcha.js.map +1 -0
  20. package/dist/types/client.d.ts +271 -0
  21. package/dist/types/client.d.ts.map +1 -0
  22. package/dist/types/client.js +15 -3
  23. package/dist/types/client.js.map +1 -0
  24. package/dist/types/index.d.ts +6 -0
  25. package/dist/types/index.d.ts.map +1 -0
  26. package/dist/types/index.js +2 -2
  27. package/dist/types/index.js.map +1 -0
  28. package/dist/types/mongo.d.ts +13 -0
  29. package/dist/types/mongo.d.ts.map +1 -0
  30. package/dist/types/mongo.js.map +1 -0
  31. package/dist/types/provider.d.ts +702 -0
  32. package/dist/types/provider.d.ts.map +1 -0
  33. package/dist/types/provider.js +37 -12
  34. package/dist/types/provider.js.map +1 -0
  35. package/dist/types/userAgent.d.ts +31 -0
  36. package/dist/types/userAgent.d.ts.map +1 -0
  37. package/dist/types/userAgent.js.map +1 -0
  38. package/package.json +8 -7
  39. package/vite.cjs.config.ts +1 -1
  40. package/vite.esm.config.ts +1 -1
@@ -0,0 +1,271 @@
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
+ distanceThresholdKm: number;
8
+ abuseScoreThreshold: number;
9
+ requireAllConditions: boolean;
10
+ forceConsistentIp: boolean;
11
+ actions?: {
12
+ countryChangeAction: any;
13
+ cityChangeAction: any;
14
+ ispChangeAction: any;
15
+ distanceExceedAction: any;
16
+ abuseScoreExceedAction: any;
17
+ } | null | undefined;
18
+ countryOverrides?: Map<string, {
19
+ [x: string]: unknown;
20
+ } | {
21
+ actions?: {
22
+ countryChangeAction?: any;
23
+ cityChangeAction?: any;
24
+ ispChangeAction?: any;
25
+ distanceExceedAction?: any;
26
+ abuseScoreExceedAction?: any;
27
+ } | null | undefined;
28
+ distanceThresholdKm?: number | null | undefined;
29
+ abuseScoreThreshold?: number | null | undefined;
30
+ requireAllConditions?: boolean | null | undefined;
31
+ }> | null | undefined;
32
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
33
+ distanceThresholdKm: number;
34
+ abuseScoreThreshold: number;
35
+ requireAllConditions: boolean;
36
+ forceConsistentIp: boolean;
37
+ actions?: {
38
+ countryChangeAction: any;
39
+ cityChangeAction: any;
40
+ ispChangeAction: any;
41
+ distanceExceedAction: any;
42
+ abuseScoreExceedAction: any;
43
+ } | null | undefined;
44
+ countryOverrides?: Map<string, {
45
+ [x: string]: unknown;
46
+ } | {
47
+ actions?: {
48
+ countryChangeAction?: any;
49
+ cityChangeAction?: any;
50
+ ispChangeAction?: any;
51
+ distanceExceedAction?: any;
52
+ abuseScoreExceedAction?: any;
53
+ } | null | undefined;
54
+ distanceThresholdKm?: number | null | undefined;
55
+ abuseScoreThreshold?: number | null | undefined;
56
+ requireAllConditions?: boolean | null | undefined;
57
+ }> | null | undefined;
58
+ }>> & mongoose.FlatRecord<{
59
+ distanceThresholdKm: number;
60
+ abuseScoreThreshold: number;
61
+ requireAllConditions: boolean;
62
+ forceConsistentIp: boolean;
63
+ actions?: {
64
+ countryChangeAction: any;
65
+ cityChangeAction: any;
66
+ ispChangeAction: any;
67
+ distanceExceedAction: any;
68
+ abuseScoreExceedAction: any;
69
+ } | null | undefined;
70
+ countryOverrides?: Map<string, {
71
+ [x: string]: unknown;
72
+ } | {
73
+ actions?: {
74
+ countryChangeAction?: any;
75
+ cityChangeAction?: any;
76
+ ispChangeAction?: any;
77
+ distanceExceedAction?: any;
78
+ abuseScoreExceedAction?: any;
79
+ } | null | undefined;
80
+ distanceThresholdKm?: number | null | undefined;
81
+ abuseScoreThreshold?: number | null | undefined;
82
+ requireAllConditions?: boolean | null | undefined;
83
+ }> | null | undefined;
84
+ }> & {
85
+ _id: mongoose.Types.ObjectId;
86
+ } & {
87
+ __v: number;
88
+ }>;
89
+ export declare const UserSettingsSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
90
+ domains: string[];
91
+ disallowWebView: boolean;
92
+ captchaType?: string | null | undefined;
93
+ frictionlessThreshold?: number | null | undefined;
94
+ powDifficulty?: number | null | undefined;
95
+ imageThreshold?: number | null | undefined;
96
+ ipValidationRules?: {
97
+ distanceThresholdKm: number;
98
+ abuseScoreThreshold: number;
99
+ requireAllConditions: boolean;
100
+ forceConsistentIp: boolean;
101
+ actions?: {
102
+ countryChangeAction: any;
103
+ cityChangeAction: any;
104
+ ispChangeAction: any;
105
+ distanceExceedAction: any;
106
+ abuseScoreExceedAction: any;
107
+ } | null | undefined;
108
+ countryOverrides?: Map<string, {
109
+ [x: string]: unknown;
110
+ } | {
111
+ actions?: {
112
+ countryChangeAction?: any;
113
+ cityChangeAction?: any;
114
+ ispChangeAction?: any;
115
+ distanceExceedAction?: any;
116
+ abuseScoreExceedAction?: any;
117
+ } | null | undefined;
118
+ distanceThresholdKm?: number | null | undefined;
119
+ abuseScoreThreshold?: number | null | undefined;
120
+ requireAllConditions?: boolean | null | undefined;
121
+ }> | null | undefined;
122
+ } | null | undefined;
123
+ contextAware?: {
124
+ enabled: boolean;
125
+ contexts: any;
126
+ } | null | undefined;
127
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
128
+ domains: string[];
129
+ disallowWebView: boolean;
130
+ captchaType?: string | null | undefined;
131
+ frictionlessThreshold?: number | null | undefined;
132
+ powDifficulty?: number | null | undefined;
133
+ imageThreshold?: number | null | undefined;
134
+ ipValidationRules?: {
135
+ distanceThresholdKm: number;
136
+ abuseScoreThreshold: number;
137
+ requireAllConditions: boolean;
138
+ forceConsistentIp: boolean;
139
+ actions?: {
140
+ countryChangeAction: any;
141
+ cityChangeAction: any;
142
+ ispChangeAction: any;
143
+ distanceExceedAction: any;
144
+ abuseScoreExceedAction: any;
145
+ } | null | undefined;
146
+ countryOverrides?: Map<string, {
147
+ [x: string]: unknown;
148
+ } | {
149
+ actions?: {
150
+ countryChangeAction?: any;
151
+ cityChangeAction?: any;
152
+ ispChangeAction?: any;
153
+ distanceExceedAction?: any;
154
+ abuseScoreExceedAction?: any;
155
+ } | null | undefined;
156
+ distanceThresholdKm?: number | null | undefined;
157
+ abuseScoreThreshold?: number | null | undefined;
158
+ requireAllConditions?: boolean | null | undefined;
159
+ }> | null | undefined;
160
+ } | null | undefined;
161
+ contextAware?: {
162
+ enabled: boolean;
163
+ contexts: any;
164
+ } | null | undefined;
165
+ }>> & mongoose.FlatRecord<{
166
+ domains: string[];
167
+ disallowWebView: boolean;
168
+ captchaType?: string | null | undefined;
169
+ frictionlessThreshold?: number | null | undefined;
170
+ powDifficulty?: number | null | undefined;
171
+ imageThreshold?: number | null | undefined;
172
+ ipValidationRules?: {
173
+ distanceThresholdKm: number;
174
+ abuseScoreThreshold: number;
175
+ requireAllConditions: boolean;
176
+ forceConsistentIp: boolean;
177
+ actions?: {
178
+ countryChangeAction: any;
179
+ cityChangeAction: any;
180
+ ispChangeAction: any;
181
+ distanceExceedAction: any;
182
+ abuseScoreExceedAction: any;
183
+ } | null | undefined;
184
+ countryOverrides?: Map<string, {
185
+ [x: string]: unknown;
186
+ } | {
187
+ actions?: {
188
+ countryChangeAction?: any;
189
+ cityChangeAction?: any;
190
+ ispChangeAction?: any;
191
+ distanceExceedAction?: any;
192
+ abuseScoreExceedAction?: any;
193
+ } | null | undefined;
194
+ distanceThresholdKm?: number | null | undefined;
195
+ abuseScoreThreshold?: number | null | undefined;
196
+ requireAllConditions?: boolean | null | undefined;
197
+ }> | null | undefined;
198
+ } | null | undefined;
199
+ contextAware?: {
200
+ enabled: boolean;
201
+ contexts: any;
202
+ } | null | undefined;
203
+ }> & {
204
+ _id: mongoose.Types.ObjectId;
205
+ } & {
206
+ __v: number;
207
+ }>;
208
+ export declare const UserDataSchema: mongoose.Schema<UserDataRecord>;
209
+ type User = {
210
+ email: string;
211
+ name: string;
212
+ role: string;
213
+ createdAt: number;
214
+ updatedAt: number;
215
+ status: string;
216
+ };
217
+ type AccountRecord = mongoose.Document & {
218
+ createdAt: number;
219
+ updatedAt: number;
220
+ signupEmail: string;
221
+ tier: string;
222
+ tierRequestQuota: number;
223
+ marketingPreferences: boolean;
224
+ users: User[];
225
+ sites: {
226
+ name: string;
227
+ siteKey: string;
228
+ secretKey: string;
229
+ settings: IUserSettings;
230
+ createdAt: number;
231
+ updatedAt: number;
232
+ active: boolean;
233
+ }[];
234
+ deletedUsers: User[];
235
+ };
236
+ export declare const AccountSchema: mongoose.Schema<AccountRecord, mongoose.Model<AccountRecord, any, any, any, mongoose.Document<unknown, any, AccountRecord> & mongoose.Document<unknown, any, any> & {
237
+ createdAt: number;
238
+ updatedAt: number;
239
+ signupEmail: string;
240
+ tier: string;
241
+ tierRequestQuota: number;
242
+ marketingPreferences: boolean;
243
+ users: User[];
244
+ sites: {
245
+ name: string;
246
+ siteKey: string;
247
+ secretKey: string;
248
+ settings: IUserSettings;
249
+ createdAt: number;
250
+ updatedAt: number;
251
+ active: boolean;
252
+ }[];
253
+ deletedUsers: User[];
254
+ } & Required<{
255
+ _id: unknown;
256
+ }> & {
257
+ __v: number;
258
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, AccountRecord, mongoose.Document<unknown, {}, mongoose.FlatRecord<AccountRecord>> & mongoose.FlatRecord<AccountRecord> & Required<{
259
+ _id: unknown;
260
+ }> & {
261
+ __v: number;
262
+ }>;
263
+ export declare enum TableNames {
264
+ accounts = "accounts"
265
+ }
266
+ export interface IClientDatabase extends IDatabase {
267
+ getTables(): Tables<TableNames>;
268
+ getUpdatedClients(updatedAtTimestamp: Timestamp): Promise<ClientRecord[]>;
269
+ }
270
+ export {};
271
+ //# 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,EAEN,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,SAAS,EAUd,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DlC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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,5 +1,5 @@
1
- import { requireAllConditionsDefault, abuseScoreThresholdDefault, distanceThresholdKmDefault, abuseScoreThresholdExceedActionDefault, distanceExceedActionDefault, ispChangeActionDefault, cityChangeActionDefault, countryChangeActionDefault, contextAwareThresholdDefault } from "@prosopo/types";
2
- import { Schema } from "mongoose";
1
+ import { requireAllConditionsDefault, abuseScoreThresholdDefault, distanceThresholdKmDefault, abuseScoreThresholdExceedActionDefault, distanceExceedActionDefault, ispChangeActionDefault, cityChangeActionDefault, countryChangeActionDefault, ContextType, contextAwareThresholdDefault } from "@prosopo/types";
2
+ import mongoose, { Schema } from "mongoose";
3
3
  const IPValidationRulesSchema = new Schema({
4
4
  actions: {
5
5
  countryChangeAction: {
@@ -71,7 +71,19 @@ const UserSettingsSchema = new Schema({
71
71
  },
72
72
  contextAware: {
73
73
  enabled: { type: Boolean, default: false },
74
- threshold: { type: Number, default: contextAwareThresholdDefault }
74
+ contexts: {
75
+ type: mongoose.Schema.Types.Mixed,
76
+ default: {
77
+ [ContextType.Default]: {
78
+ type: ContextType.Default,
79
+ threshold: contextAwareThresholdDefault
80
+ },
81
+ [ContextType.Webview]: {
82
+ type: ContextType.Webview,
83
+ threshold: contextAwareThresholdDefault
84
+ }
85
+ }
86
+ }
75
87
  }
76
88
  });
77
89
  const UserDataSchema = new Schema({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,E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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,6 @@
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
+ //# 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"}
@@ -1,12 +1,12 @@
1
1
  import "./mongo.js";
2
- import { CaptchaRecordSchema, ClientEntropyRecordSchema, 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, CompositeIpAddressSchema, DatasetRecordSchema, DetectorRecordSchema, IpAddressType, PendingRecordSchema, PoWCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserCommitmentSchema, UserCommitmentWithSolutionsSchema, UserSolutionRecordSchema, UserSolutionSchema, parseMongooseCompositeIpAddress } 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
6
  export {
7
7
  AccountSchema,
8
8
  CaptchaRecordSchema,
9
- ClientEntropyRecordSchema,
9
+ ClientContextEntropyRecordSchema,
10
10
  ClientRecordSchema,
11
11
  CompositeIpAddressRecordSchemaObj,
12
12
  CompositeIpAddressSchema,
@@ -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"}
@@ -0,0 +1,13 @@
1
+ import type { Logger } from "@prosopo/common";
2
+ import type { Connection } from "mongoose";
3
+ export interface IDatabase {
4
+ url: string;
5
+ dbname: string;
6
+ connection?: Connection;
7
+ logger: Logger;
8
+ connected: boolean;
9
+ getConnection(): Connection;
10
+ connect(): Promise<void>;
11
+ close(): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=mongo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,SAAS;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IAEnB,aAAa,IAAI,UAAU,CAAC;IAE5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongo.js","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":""}