@prosopo/types-database 3.0.8 → 3.0.10
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 +27 -0
- package/dist/index.js +29 -2
- package/dist/types/captcha.js +19 -15
- package/dist/types/client.js +64 -59
- package/dist/types/index.js +29 -5
- package/dist/types/mongo.js +1 -2
- package/dist/types/provider.js +222 -197
- package/package.json +21 -17
- package/vite.cjs.config.ts +2 -2
- package/vite.esm.config.ts +20 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- 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
- package/dist/types/captcha.d.ts +0 -22
- package/dist/types/captcha.d.ts.map +0 -1
- package/dist/types/captcha.js.map +0 -1
- package/dist/types/client.d.ts +0 -92
- package/dist/types/client.d.ts.map +0 -1
- package/dist/types/client.js.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/mongo.d.ts +0 -13
- package/dist/types/mongo.d.ts.map +0 -1
- package/dist/types/mongo.js.map +0 -1
- package/dist/types/provider.d.ts +0 -526
- package/dist/types/provider.d.ts.map +0 -1
- package/dist/types/provider.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# @prosopo/types-database
|
2
2
|
|
3
|
+
## 3.0.10
|
4
|
+
### Patch Changes
|
5
|
+
|
6
|
+
- 3573f0b: fix npm scripts bundle command
|
7
|
+
- 3573f0b: build using vite, typecheck using tsc
|
8
|
+
- efd8102: Add tests for unwrap error helper
|
9
|
+
- 3573f0b: standardise all vite based npm scripts for bundling
|
10
|
+
- Updated dependencies [93d5e50]
|
11
|
+
- Updated dependencies [3573f0b]
|
12
|
+
- Updated dependencies [3573f0b]
|
13
|
+
- Updated dependencies [efd8102]
|
14
|
+
- Updated dependencies [93d5e50]
|
15
|
+
- Updated dependencies [63519d7]
|
16
|
+
- Updated dependencies [f29fc7e]
|
17
|
+
- Updated dependencies [3573f0b]
|
18
|
+
- Updated dependencies [2d0dd8a]
|
19
|
+
- @prosopo/types@3.0.4
|
20
|
+
- @prosopo/user-access-policy@3.3.1
|
21
|
+
- @prosopo/common@3.1.0
|
22
|
+
- @prosopo/config@3.1.1
|
23
|
+
|
24
|
+
## 3.0.9
|
25
|
+
### Patch Changes
|
26
|
+
|
27
|
+
- Updated dependencies [b7c3258]
|
28
|
+
- @prosopo/user-access-policy@3.3.0
|
29
|
+
|
3
30
|
## 3.0.8
|
4
31
|
### Patch Changes
|
5
32
|
|
package/dist/index.js
CHANGED
@@ -1,2 +1,29 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import "./types/index.js";
|
2
|
+
import { CaptchaRecordSchema, ClientRecordSchema, DatasetRecordSchema, DetectorRecordSchema, FrictionlessTokenRecordSchema, PendingRecordSchema, PoWCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserCommitmentSchema, UserCommitmentWithSolutionsSchema, UserSolutionRecordSchema, UserSolutionSchema } from "./types/provider.js";
|
3
|
+
import { AccountSchema, TableNames, UserDataSchema, UserSettingsSchema } from "./types/client.js";
|
4
|
+
import { StoredPoWCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema } from "./types/captcha.js";
|
5
|
+
export {
|
6
|
+
AccountSchema,
|
7
|
+
CaptchaRecordSchema,
|
8
|
+
ClientRecordSchema,
|
9
|
+
DatasetRecordSchema,
|
10
|
+
DetectorRecordSchema,
|
11
|
+
FrictionlessTokenRecordSchema,
|
12
|
+
PendingRecordSchema,
|
13
|
+
PoWCaptchaRecordSchema,
|
14
|
+
ScheduledTaskRecordSchema,
|
15
|
+
ScheduledTaskSchema,
|
16
|
+
SessionRecordSchema,
|
17
|
+
SolutionRecordSchema,
|
18
|
+
StoredPoWCaptchaRecordSchema,
|
19
|
+
StoredSessionRecordSchema,
|
20
|
+
StoredUserCommitmentRecordSchema,
|
21
|
+
TableNames,
|
22
|
+
UserCommitmentRecordSchema,
|
23
|
+
UserCommitmentSchema,
|
24
|
+
UserCommitmentWithSolutionsSchema,
|
25
|
+
UserDataSchema,
|
26
|
+
UserSettingsSchema,
|
27
|
+
UserSolutionRecordSchema,
|
28
|
+
UserSolutionSchema
|
29
|
+
};
|
package/dist/types/captcha.js
CHANGED
@@ -1,23 +1,27 @@
|
|
1
1
|
import { Schema } from "mongoose";
|
2
|
-
import { FrictionlessTokenRecordSchema,
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
import { FrictionlessTokenRecordSchema, SessionRecordSchema, UserCommitmentRecordSchema, PoWCaptchaRecordSchema } from "./provider.js";
|
3
|
+
const StoredSessionRecordSchema = new Schema({
|
4
|
+
sessionId: SessionRecordSchema.obj.sessionId,
|
5
|
+
createdAt: SessionRecordSchema.obj.createdAt,
|
6
|
+
captchaType: SessionRecordSchema.obj.captchaType,
|
7
|
+
tokenId: SessionRecordSchema.obj.tokenId,
|
8
|
+
deleted: SessionRecordSchema.obj.deleted,
|
9
|
+
score: FrictionlessTokenRecordSchema.obj.score,
|
10
|
+
scoreComponents: FrictionlessTokenRecordSchema.obj.scoreComponents,
|
11
|
+
threshold: FrictionlessTokenRecordSchema.obj.threshold
|
12
12
|
});
|
13
|
-
|
14
|
-
|
13
|
+
const StoredUserCommitmentRecordSchema = new Schema({
|
14
|
+
...UserCommitmentRecordSchema.obj
|
15
15
|
});
|
16
16
|
StoredUserCommitmentRecordSchema.index({ frictionlessTokenId: 1 });
|
17
|
-
|
18
|
-
|
17
|
+
const StoredPoWCaptchaRecordSchema = new Schema({
|
18
|
+
...PoWCaptchaRecordSchema.obj
|
19
19
|
});
|
20
20
|
StoredPoWCaptchaRecordSchema.index({ frictionlessTokenId: 1 });
|
21
21
|
StoredSessionRecordSchema.index({ sessionId: 1 });
|
22
22
|
StoredSessionRecordSchema.index({ tokenId: 1 });
|
23
|
-
|
23
|
+
export {
|
24
|
+
StoredPoWCaptchaRecordSchema,
|
25
|
+
StoredSessionRecordSchema,
|
26
|
+
StoredUserCommitmentRecordSchema
|
27
|
+
};
|
package/dist/types/client.js
CHANGED
@@ -1,63 +1,68 @@
|
|
1
1
|
import { Schema } from "mongoose";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
const UserSettingsSchema = new Schema({
|
3
|
+
captchaType: String,
|
4
|
+
frictionlessThreshold: Number,
|
5
|
+
powDifficulty: Number,
|
6
|
+
imageThreshold: Number,
|
7
|
+
domains: [String]
|
8
8
|
});
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
9
|
+
const UserDataSchema = new Schema({
|
10
|
+
email: String,
|
11
|
+
name: String,
|
12
|
+
account: String,
|
13
|
+
url: String,
|
14
|
+
mnemonic: String,
|
15
|
+
createdAt: Number,
|
16
|
+
activated: Boolean,
|
17
|
+
tier: String,
|
18
|
+
settings: {
|
19
|
+
type: UserSettingsSchema,
|
20
|
+
required: false
|
21
|
+
},
|
22
|
+
updatedAtTimestamp: Number
|
23
23
|
});
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
24
|
+
const AccountSchema = new Schema({
|
25
|
+
createdAt: Number,
|
26
|
+
updatedAt: Number,
|
27
|
+
signupEmail: String,
|
28
|
+
tier: String,
|
29
|
+
tierRequestQuota: Number,
|
30
|
+
marketingPreferences: Boolean,
|
31
|
+
users: [
|
32
|
+
{
|
33
|
+
email: String,
|
34
|
+
name: String,
|
35
|
+
role: String,
|
36
|
+
createdAt: Number,
|
37
|
+
updatedAt: Number,
|
38
|
+
status: String
|
39
|
+
}
|
40
|
+
],
|
41
|
+
sites: [
|
42
|
+
{
|
43
|
+
name: String,
|
44
|
+
siteKey: String,
|
45
|
+
secretKey: String,
|
46
|
+
settings: {
|
47
|
+
domains: [String],
|
48
|
+
powDifficulty: Number,
|
49
|
+
captchaType: String,
|
50
|
+
frictionlessThreshold: Number
|
51
|
+
},
|
52
|
+
createdAt: Number,
|
53
|
+
updatedAt: Number,
|
54
|
+
active: Boolean
|
55
|
+
}
|
56
|
+
],
|
57
|
+
deletedUsers: []
|
58
58
|
});
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
})(TableNames ||
|
63
|
-
|
59
|
+
var TableNames = /* @__PURE__ */ ((TableNames2) => {
|
60
|
+
TableNames2["accounts"] = "accounts";
|
61
|
+
return TableNames2;
|
62
|
+
})(TableNames || {});
|
63
|
+
export {
|
64
|
+
AccountSchema,
|
65
|
+
TableNames,
|
66
|
+
UserDataSchema,
|
67
|
+
UserSettingsSchema
|
68
|
+
};
|
package/dist/types/index.js
CHANGED
@@ -1,5 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import "./mongo.js";
|
2
|
+
import { CaptchaRecordSchema, ClientRecordSchema, DatasetRecordSchema, DetectorRecordSchema, FrictionlessTokenRecordSchema, PendingRecordSchema, PoWCaptchaRecordSchema, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserCommitmentSchema, UserCommitmentWithSolutionsSchema, UserSolutionRecordSchema, UserSolutionSchema } from "./provider.js";
|
3
|
+
import { AccountSchema, TableNames, UserDataSchema, UserSettingsSchema } from "./client.js";
|
4
|
+
import { StoredPoWCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema } from "./captcha.js";
|
5
|
+
export {
|
6
|
+
AccountSchema,
|
7
|
+
CaptchaRecordSchema,
|
8
|
+
ClientRecordSchema,
|
9
|
+
DatasetRecordSchema,
|
10
|
+
DetectorRecordSchema,
|
11
|
+
FrictionlessTokenRecordSchema,
|
12
|
+
PendingRecordSchema,
|
13
|
+
PoWCaptchaRecordSchema,
|
14
|
+
ScheduledTaskRecordSchema,
|
15
|
+
ScheduledTaskSchema,
|
16
|
+
SessionRecordSchema,
|
17
|
+
SolutionRecordSchema,
|
18
|
+
StoredPoWCaptchaRecordSchema,
|
19
|
+
StoredSessionRecordSchema,
|
20
|
+
StoredUserCommitmentRecordSchema,
|
21
|
+
TableNames,
|
22
|
+
UserCommitmentRecordSchema,
|
23
|
+
UserCommitmentSchema,
|
24
|
+
UserCommitmentWithSolutionsSchema,
|
25
|
+
UserDataSchema,
|
26
|
+
UserSettingsSchema,
|
27
|
+
UserSolutionRecordSchema,
|
28
|
+
UserSolutionSchema
|
29
|
+
};
|
package/dist/types/mongo.js
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
//# sourceMappingURL=mongo.js.map
|
1
|
+
|