@prosopo/types-database 3.0.9 → 3.0.11

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # @prosopo/types-database
2
2
 
3
+ ## 3.0.11
4
+ ### Patch Changes
5
+
6
+ - 625fef8: ua parsing
7
+
8
+ ## 3.0.10
9
+ ### Patch Changes
10
+
11
+ - 3573f0b: fix npm scripts bundle command
12
+ - 3573f0b: build using vite, typecheck using tsc
13
+ - efd8102: Add tests for unwrap error helper
14
+ - 3573f0b: standardise all vite based npm scripts for bundling
15
+ - Updated dependencies [93d5e50]
16
+ - Updated dependencies [3573f0b]
17
+ - Updated dependencies [3573f0b]
18
+ - Updated dependencies [efd8102]
19
+ - Updated dependencies [93d5e50]
20
+ - Updated dependencies [63519d7]
21
+ - Updated dependencies [f29fc7e]
22
+ - Updated dependencies [3573f0b]
23
+ - Updated dependencies [2d0dd8a]
24
+ - @prosopo/types@3.0.4
25
+ - @prosopo/user-access-policy@3.3.1
26
+ - @prosopo/common@3.1.0
27
+ - @prosopo/config@3.1.1
28
+
3
29
  ## 3.0.9
4
30
  ### Patch Changes
5
31
 
@@ -4,6 +4,7 @@ require("./mongo.cjs");
4
4
  const provider = require("./provider.cjs");
5
5
  const client = require("./client.cjs");
6
6
  const captcha = require("./captcha.cjs");
7
+ require("./userAgent.cjs");
7
8
  exports.CaptchaRecordSchema = provider.CaptchaRecordSchema;
8
9
  exports.ClientRecordSchema = provider.ClientRecordSchema;
9
10
  exports.DatasetRecordSchema = provider.DatasetRecordSchema;
@@ -93,6 +93,7 @@ const PoWCaptchaRecordSchema = new mongoose.Schema({
93
93
  storedAtTimestamp: { type: Date, required: false, expires: ONE_MONTH },
94
94
  geolocation: { type: String, required: false },
95
95
  vpn: { type: Boolean, required: false },
96
+ parsedUserAgentInfo: { type: Object, required: false },
96
97
  frictionlessTokenId: {
97
98
  type: mongoose.Schema.Types.ObjectId,
98
99
  required: false
@@ -128,6 +129,7 @@ const UserCommitmentRecordSchema = new mongoose.Schema({
128
129
  lastUpdatedTimestamp: { type: Number, required: false },
129
130
  geolocation: { type: String, required: false },
130
131
  vpn: { type: Boolean, required: false },
132
+ parsedUserAgentInfo: { type: Object, required: false },
131
133
  frictionlessTokenId: {
132
134
  type: mongoose.Schema.Types.ObjectId,
133
135
  required: false
@@ -0,0 +1 @@
1
+ "use strict";
package/dist/index.js CHANGED
@@ -1,2 +1,29 @@
1
- export * from "./types/index.js";
2
- //# sourceMappingURL=index.js.map
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
+ };
@@ -1,23 +1,27 @@
1
1
  import { Schema } from "mongoose";
2
- import { FrictionlessTokenRecordSchema, PoWCaptchaRecordSchema, SessionRecordSchema, UserCommitmentRecordSchema, } from "./provider.js";
3
- export 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,
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
- export const StoredUserCommitmentRecordSchema = new Schema({
14
- ...UserCommitmentRecordSchema.obj,
13
+ const StoredUserCommitmentRecordSchema = new Schema({
14
+ ...UserCommitmentRecordSchema.obj
15
15
  });
16
16
  StoredUserCommitmentRecordSchema.index({ frictionlessTokenId: 1 });
17
- export const StoredPoWCaptchaRecordSchema = new Schema({
18
- ...PoWCaptchaRecordSchema.obj,
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
- //# sourceMappingURL=captcha.js.map
23
+ export {
24
+ StoredPoWCaptchaRecordSchema,
25
+ StoredSessionRecordSchema,
26
+ StoredUserCommitmentRecordSchema
27
+ };
@@ -1,63 +1,68 @@
1
1
  import { Schema } from "mongoose";
2
- export const UserSettingsSchema = new Schema({
3
- captchaType: String,
4
- frictionlessThreshold: Number,
5
- powDifficulty: Number,
6
- imageThreshold: Number,
7
- domains: [String],
2
+ const UserSettingsSchema = new Schema({
3
+ captchaType: String,
4
+ frictionlessThreshold: Number,
5
+ powDifficulty: Number,
6
+ imageThreshold: Number,
7
+ domains: [String]
8
8
  });
9
- export 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,
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
- export 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: [],
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
- export var TableNames;
60
- (function (TableNames) {
61
- TableNames["accounts"] = "accounts";
62
- })(TableNames || (TableNames = {}));
63
- //# sourceMappingURL=client.js.map
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
+ };
@@ -1,5 +1,30 @@
1
- export * from "./mongo.js";
2
- export * from "./provider.js";
3
- export * from "./client.js";
4
- export * from "./captcha.js";
5
- //# sourceMappingURL=index.js.map
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
+ import "./userAgent.js";
6
+ export {
7
+ AccountSchema,
8
+ CaptchaRecordSchema,
9
+ ClientRecordSchema,
10
+ DatasetRecordSchema,
11
+ DetectorRecordSchema,
12
+ FrictionlessTokenRecordSchema,
13
+ PendingRecordSchema,
14
+ PoWCaptchaRecordSchema,
15
+ ScheduledTaskRecordSchema,
16
+ ScheduledTaskSchema,
17
+ SessionRecordSchema,
18
+ SolutionRecordSchema,
19
+ StoredPoWCaptchaRecordSchema,
20
+ StoredSessionRecordSchema,
21
+ StoredUserCommitmentRecordSchema,
22
+ TableNames,
23
+ UserCommitmentRecordSchema,
24
+ UserCommitmentSchema,
25
+ UserCommitmentWithSolutionsSchema,
26
+ UserDataSchema,
27
+ UserSettingsSchema,
28
+ UserSolutionRecordSchema,
29
+ UserSolutionSchema
30
+ };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=mongo.js.map
1
+