@prosopo/types-database 3.3.5 → 3.3.13
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/CHANGELOG.md +72 -0
- package/dist/cjs/index.cjs +0 -1
- package/dist/cjs/types/captcha.cjs +3 -19
- package/dist/cjs/types/client.cjs +64 -8
- package/dist/cjs/types/index.cjs +0 -1
- package/dist/cjs/types/provider.cjs +29 -36
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -0
- package/dist/provider/pendingCaptchaRequest.d.ts +14 -0
- package/dist/provider/pendingCaptchaRequest.d.ts.map +1 -0
- package/dist/provider/pendingCaptchaRequest.js +2 -0
- package/dist/provider/pendingCaptchaRequest.js.map +1 -0
- package/dist/types/captcha.d.ts +18 -0
- package/dist/types/captcha.d.ts.map +1 -0
- package/dist/types/captcha.js +4 -20
- package/dist/types/captcha.js.map +1 -0
- package/dist/types/client.d.ts +259 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/client.js +64 -8
- package/dist/types/client.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -2
- package/dist/types/index.js.map +1 -0
- package/dist/types/mongo.d.ts +13 -0
- package/dist/types/mongo.d.ts.map +1 -0
- package/dist/types/mongo.js.map +1 -0
- package/dist/types/provider.d.ts +667 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/provider.js +32 -39
- package/dist/types/provider.js.map +1 -0
- package/dist/types/userAgent.d.ts +31 -0
- package/dist/types/userAgent.d.ts.map +1 -0
- package/dist/types/userAgent.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { type IUserData, type IUserSettings, type Timestamp } from "@prosopo/types";
|
|
2
|
+
import type 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
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
124
|
+
domains: string[];
|
|
125
|
+
disallowWebView: boolean;
|
|
126
|
+
captchaType?: string | null | undefined;
|
|
127
|
+
frictionlessThreshold?: number | null | undefined;
|
|
128
|
+
powDifficulty?: number | null | undefined;
|
|
129
|
+
imageThreshold?: number | null | undefined;
|
|
130
|
+
ipValidationRules?: {
|
|
131
|
+
distanceThresholdKm: number;
|
|
132
|
+
abuseScoreThreshold: number;
|
|
133
|
+
requireAllConditions: boolean;
|
|
134
|
+
forceConsistentIp: boolean;
|
|
135
|
+
actions?: {
|
|
136
|
+
countryChangeAction: any;
|
|
137
|
+
cityChangeAction: any;
|
|
138
|
+
ispChangeAction: any;
|
|
139
|
+
distanceExceedAction: any;
|
|
140
|
+
abuseScoreExceedAction: any;
|
|
141
|
+
} | null | undefined;
|
|
142
|
+
countryOverrides?: Map<string, {
|
|
143
|
+
[x: string]: unknown;
|
|
144
|
+
} | {
|
|
145
|
+
actions?: {
|
|
146
|
+
countryChangeAction?: any;
|
|
147
|
+
cityChangeAction?: any;
|
|
148
|
+
ispChangeAction?: any;
|
|
149
|
+
distanceExceedAction?: any;
|
|
150
|
+
abuseScoreExceedAction?: any;
|
|
151
|
+
} | null | undefined;
|
|
152
|
+
distanceThresholdKm?: number | null | undefined;
|
|
153
|
+
abuseScoreThreshold?: number | null | undefined;
|
|
154
|
+
requireAllConditions?: boolean | null | undefined;
|
|
155
|
+
}> | null | undefined;
|
|
156
|
+
} | null | undefined;
|
|
157
|
+
}>> & mongoose.FlatRecord<{
|
|
158
|
+
domains: string[];
|
|
159
|
+
disallowWebView: boolean;
|
|
160
|
+
captchaType?: string | null | undefined;
|
|
161
|
+
frictionlessThreshold?: number | null | undefined;
|
|
162
|
+
powDifficulty?: number | null | undefined;
|
|
163
|
+
imageThreshold?: number | null | undefined;
|
|
164
|
+
ipValidationRules?: {
|
|
165
|
+
distanceThresholdKm: number;
|
|
166
|
+
abuseScoreThreshold: number;
|
|
167
|
+
requireAllConditions: boolean;
|
|
168
|
+
forceConsistentIp: boolean;
|
|
169
|
+
actions?: {
|
|
170
|
+
countryChangeAction: any;
|
|
171
|
+
cityChangeAction: any;
|
|
172
|
+
ispChangeAction: any;
|
|
173
|
+
distanceExceedAction: any;
|
|
174
|
+
abuseScoreExceedAction: any;
|
|
175
|
+
} | null | undefined;
|
|
176
|
+
countryOverrides?: Map<string, {
|
|
177
|
+
[x: string]: unknown;
|
|
178
|
+
} | {
|
|
179
|
+
actions?: {
|
|
180
|
+
countryChangeAction?: any;
|
|
181
|
+
cityChangeAction?: any;
|
|
182
|
+
ispChangeAction?: any;
|
|
183
|
+
distanceExceedAction?: any;
|
|
184
|
+
abuseScoreExceedAction?: any;
|
|
185
|
+
} | null | undefined;
|
|
186
|
+
distanceThresholdKm?: number | null | undefined;
|
|
187
|
+
abuseScoreThreshold?: number | null | undefined;
|
|
188
|
+
requireAllConditions?: boolean | null | undefined;
|
|
189
|
+
}> | null | undefined;
|
|
190
|
+
} | null | undefined;
|
|
191
|
+
}> & {
|
|
192
|
+
_id: mongoose.Types.ObjectId;
|
|
193
|
+
} & {
|
|
194
|
+
__v: number;
|
|
195
|
+
}>;
|
|
196
|
+
export declare const UserDataSchema: mongoose.Schema<UserDataRecord>;
|
|
197
|
+
type User = {
|
|
198
|
+
email: string;
|
|
199
|
+
name: string;
|
|
200
|
+
role: string;
|
|
201
|
+
createdAt: number;
|
|
202
|
+
updatedAt: number;
|
|
203
|
+
status: string;
|
|
204
|
+
};
|
|
205
|
+
type AccountRecord = mongoose.Document & {
|
|
206
|
+
createdAt: number;
|
|
207
|
+
updatedAt: number;
|
|
208
|
+
signupEmail: string;
|
|
209
|
+
tier: string;
|
|
210
|
+
tierRequestQuota: number;
|
|
211
|
+
marketingPreferences: boolean;
|
|
212
|
+
users: User[];
|
|
213
|
+
sites: {
|
|
214
|
+
name: string;
|
|
215
|
+
siteKey: string;
|
|
216
|
+
secretKey: string;
|
|
217
|
+
settings: IUserSettings;
|
|
218
|
+
createdAt: number;
|
|
219
|
+
updatedAt: number;
|
|
220
|
+
active: boolean;
|
|
221
|
+
}[];
|
|
222
|
+
deletedUsers: User[];
|
|
223
|
+
};
|
|
224
|
+
export declare const AccountSchema: mongoose.Schema<AccountRecord, mongoose.Model<AccountRecord, any, any, any, mongoose.Document<unknown, any, AccountRecord> & mongoose.Document<unknown, any, any> & {
|
|
225
|
+
createdAt: number;
|
|
226
|
+
updatedAt: number;
|
|
227
|
+
signupEmail: string;
|
|
228
|
+
tier: string;
|
|
229
|
+
tierRequestQuota: number;
|
|
230
|
+
marketingPreferences: boolean;
|
|
231
|
+
users: User[];
|
|
232
|
+
sites: {
|
|
233
|
+
name: string;
|
|
234
|
+
siteKey: string;
|
|
235
|
+
secretKey: string;
|
|
236
|
+
settings: IUserSettings;
|
|
237
|
+
createdAt: number;
|
|
238
|
+
updatedAt: number;
|
|
239
|
+
active: boolean;
|
|
240
|
+
}[];
|
|
241
|
+
deletedUsers: User[];
|
|
242
|
+
} & Required<{
|
|
243
|
+
_id: unknown;
|
|
244
|
+
}> & {
|
|
245
|
+
__v: number;
|
|
246
|
+
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, AccountRecord, mongoose.Document<unknown, {}, mongoose.FlatRecord<AccountRecord>> & mongoose.FlatRecord<AccountRecord> & Required<{
|
|
247
|
+
_id: unknown;
|
|
248
|
+
}> & {
|
|
249
|
+
__v: number;
|
|
250
|
+
}>;
|
|
251
|
+
export declare enum TableNames {
|
|
252
|
+
accounts = "accounts"
|
|
253
|
+
}
|
|
254
|
+
export interface IClientDatabase extends IDatabase {
|
|
255
|
+
getTables(): Tables<TableNames>;
|
|
256
|
+
getUpdatedClients(updatedAtTimestamp: Timestamp): Promise<ClientRecord[]>;
|
|
257
|
+
}
|
|
258
|
+
export {};
|
|
259
|
+
//# 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,EACN,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,SAAS,EASd,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MA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aAAa;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"}
|
package/dist/types/client.js
CHANGED
|
@@ -1,10 +1,62 @@
|
|
|
1
|
+
import { requireAllConditionsDefault, abuseScoreThresholdDefault, distanceThresholdKmDefault, abuseScoreThresholdExceedActionDefault, distanceExceedActionDefault, ispChangeActionDefault, cityChangeActionDefault, countryChangeActionDefault } from "@prosopo/types";
|
|
1
2
|
import { Schema } from "mongoose";
|
|
2
3
|
const IPValidationRulesSchema = new Schema({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
actions: {
|
|
5
|
+
countryChangeAction: {
|
|
6
|
+
type: Schema.Types.Mixed,
|
|
7
|
+
default: () => countryChangeActionDefault
|
|
8
|
+
},
|
|
9
|
+
cityChangeAction: {
|
|
10
|
+
type: Schema.Types.Mixed,
|
|
11
|
+
default: () => cityChangeActionDefault
|
|
12
|
+
},
|
|
13
|
+
ispChangeAction: {
|
|
14
|
+
type: Schema.Types.Mixed,
|
|
15
|
+
default: () => ispChangeActionDefault
|
|
16
|
+
},
|
|
17
|
+
distanceExceedAction: {
|
|
18
|
+
type: Schema.Types.Mixed,
|
|
19
|
+
default: () => distanceExceedActionDefault
|
|
20
|
+
},
|
|
21
|
+
abuseScoreExceedAction: {
|
|
22
|
+
type: Schema.Types.Mixed,
|
|
23
|
+
default: () => abuseScoreThresholdExceedActionDefault
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
distanceThresholdKm: {
|
|
27
|
+
type: Number,
|
|
28
|
+
min: 0,
|
|
29
|
+
default: distanceThresholdKmDefault
|
|
30
|
+
},
|
|
31
|
+
abuseScoreThreshold: {
|
|
32
|
+
type: Number,
|
|
33
|
+
min: 0,
|
|
34
|
+
default: abuseScoreThresholdDefault
|
|
35
|
+
},
|
|
36
|
+
requireAllConditions: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: requireAllConditionsDefault
|
|
39
|
+
},
|
|
40
|
+
forceConsistentIp: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
countryOverrides: {
|
|
45
|
+
type: Map,
|
|
46
|
+
of: new Schema({
|
|
47
|
+
actions: {
|
|
48
|
+
countryChangeAction: { type: Schema.Types.Mixed },
|
|
49
|
+
cityChangeAction: { type: Schema.Types.Mixed },
|
|
50
|
+
ispChangeAction: { type: Schema.Types.Mixed },
|
|
51
|
+
distanceExceedAction: { type: Schema.Types.Mixed },
|
|
52
|
+
abuseScoreExceedAction: { type: Schema.Types.Mixed }
|
|
53
|
+
},
|
|
54
|
+
distanceThresholdKm: { type: Number, min: 0 },
|
|
55
|
+
abuseScoreThreshold: { type: Number, min: 0 },
|
|
56
|
+
requireAllConditions: { type: Boolean }
|
|
57
|
+
}),
|
|
58
|
+
default: void 0
|
|
59
|
+
}
|
|
8
60
|
});
|
|
9
61
|
const UserSettingsSchema = new Schema({
|
|
10
62
|
captchaType: String,
|
|
@@ -12,7 +64,11 @@ const UserSettingsSchema = new Schema({
|
|
|
12
64
|
powDifficulty: Number,
|
|
13
65
|
imageThreshold: Number,
|
|
14
66
|
ipValidationRules: IPValidationRulesSchema,
|
|
15
|
-
domains: [String]
|
|
67
|
+
domains: [String],
|
|
68
|
+
disallowWebView: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false
|
|
71
|
+
}
|
|
16
72
|
});
|
|
17
73
|
const UserDataSchema = new Schema({
|
|
18
74
|
email: String,
|
|
@@ -20,14 +76,14 @@ const UserDataSchema = new Schema({
|
|
|
20
76
|
account: String,
|
|
21
77
|
url: String,
|
|
22
78
|
mnemonic: String,
|
|
23
|
-
createdAt:
|
|
79
|
+
createdAt: Date,
|
|
24
80
|
activated: Boolean,
|
|
25
81
|
tier: String,
|
|
26
82
|
settings: {
|
|
27
83
|
type: UserSettingsSchema,
|
|
28
84
|
required: false
|
|
29
85
|
},
|
|
30
|
-
updatedAtTimestamp:
|
|
86
|
+
updatedAtTimestamp: Date
|
|
31
87
|
});
|
|
32
88
|
const AccountSchema = new Schema({
|
|
33
89
|
createdAt: Number,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAcA,OAAO,EAIN,0BAA0B,EAC1B,sCAAsC,EACtC,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,MAAM,CAAC;IACjD,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;QAC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AM,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 @@
|
|
|
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"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./mongo.js";
|
|
2
|
-
import { CaptchaRecordSchema, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, CompositeIpAddressSchema, DatasetRecordSchema, DetectorRecordSchema,
|
|
2
|
+
import { CaptchaRecordSchema, 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";
|
|
@@ -11,7 +11,6 @@ export {
|
|
|
11
11
|
CompositeIpAddressSchema,
|
|
12
12
|
DatasetRecordSchema,
|
|
13
13
|
DetectorRecordSchema,
|
|
14
|
-
FrictionlessTokenRecordSchema,
|
|
15
14
|
IPValidationRulesSchema,
|
|
16
15
|
IpAddressType,
|
|
17
16
|
PendingRecordSchema,
|
|
@@ -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":""}
|