@prosopo/types-database 3.0.9 → 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 CHANGED
@@ -1,5 +1,26 @@
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
+
3
24
  ## 3.0.9
4
25
  ### Patch Changes
5
26
 
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,29 @@
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
+ 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,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=mongo.js.map
1
+