@prosopo/types-database 0.2.14 → 0.2.15
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/dist/index.js +0 -13
- package/dist/index.js.map +1 -1
- package/dist/types/index.js +0 -13
- package/dist/types/index.js.map +1 -1
- package/dist/types/mongo.js +0 -19
- package/dist/types/mongo.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -1,15 +1,2 @@
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
1
|
export * from './types/index.js';
|
15
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAA"}
|
package/dist/types/index.js
CHANGED
@@ -1,15 +1,2 @@
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
1
|
export * from './mongo.js';
|
15
2
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAA"}
|
package/dist/types/mongo.js
CHANGED
@@ -1,16 +1,3 @@
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
2
|
-
//
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
// you may not use this file except in compliance with the License.
|
5
|
-
// You may obtain a copy of the License at
|
6
|
-
//
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
//
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
// See the License for the specific language governing permissions and
|
13
|
-
// limitations under the License.
|
14
1
|
import { CaptchaSolutionSchema, } from '@prosopo/types';
|
15
2
|
import { CaptchaStatus } from '@prosopo/captcha-contract/types-returns';
|
16
3
|
import { Schema } from 'mongoose';
|
@@ -49,7 +36,6 @@ export const CaptchaRecordSchema = new Schema({
|
|
49
36
|
required: true,
|
50
37
|
},
|
51
38
|
});
|
52
|
-
// Set an index on the captchaId field, ascending
|
53
39
|
CaptchaRecordSchema.index({ captchaId: 1 });
|
54
40
|
export const UserCommitmentRecordSchema = new Schema({
|
55
41
|
userAccount: { type: String, required: true },
|
@@ -64,7 +50,6 @@ export const UserCommitmentRecordSchema = new Schema({
|
|
64
50
|
processed: { type: Boolean, required: true },
|
65
51
|
batched: { type: Boolean, required: true },
|
66
52
|
});
|
67
|
-
// Set an index on the commitment id field, descending
|
68
53
|
UserCommitmentRecordSchema.index({ id: -1 });
|
69
54
|
export const DatasetRecordSchema = new Schema({
|
70
55
|
contentTree: { type: [[String]], required: true },
|
@@ -73,7 +58,6 @@ export const DatasetRecordSchema = new Schema({
|
|
73
58
|
format: { type: String, required: true },
|
74
59
|
solutionTree: { type: [[String]], required: true },
|
75
60
|
});
|
76
|
-
// Set an index on the datasetId field, ascending
|
77
61
|
DatasetRecordSchema.index({ datasetId: 1 });
|
78
62
|
export const SolutionRecordSchema = new Schema({
|
79
63
|
captchaId: { type: String, required: true },
|
@@ -83,7 +67,6 @@ export const SolutionRecordSchema = new Schema({
|
|
83
67
|
salt: { type: String, required: true },
|
84
68
|
solution: { type: [String], required: true },
|
85
69
|
});
|
86
|
-
// Set an index on the captchaId field, ascending
|
87
70
|
SolutionRecordSchema.index({ captchaId: 1 });
|
88
71
|
export const UserSolutionSchema = CaptchaSolutionSchema.extend({
|
89
72
|
processed: boolean(),
|
@@ -97,7 +80,6 @@ export const UserSolutionRecordSchema = new Schema({
|
|
97
80
|
processed: { type: Boolean, required: true },
|
98
81
|
commitmentId: { type: String, required: true },
|
99
82
|
}, { _id: false });
|
100
|
-
// Set an index on the captchaId field, ascending
|
101
83
|
UserSolutionRecordSchema.index({ captchaId: 1 });
|
102
84
|
export const UserCommitmentWithSolutionsSchema = UserCommitmentSchema.extend({
|
103
85
|
captchas: array(UserSolutionSchema),
|
@@ -110,7 +92,6 @@ export const PendingRecordSchema = new Schema({
|
|
110
92
|
deadlineTimestamp: { type: Number, required: true },
|
111
93
|
requestedAtBlock: { type: Number, required: true },
|
112
94
|
});
|
113
|
-
// Set an index on the requestHash field, descending
|
114
95
|
PendingRecordSchema.index({ requestHash: -1 });
|
115
96
|
export const ScheduledTaskSchema = object({
|
116
97
|
taskId: string(),
|
package/dist/types/mongo.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mongo.js","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"mongo.js","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":"AAaA,OAAO,EAGH,qBAAqB,GAMxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,aAAa,EAAU,MAAM,yCAAyC,CAAA;AAC/E,OAAO,EAAqB,MAAM,EAAE,MAAM,UAAU,CAAA;AAKpD,OAAO,EAAE,kBAAkB,EAAuB,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAC7F,OAAO,EAAW,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAmB,MAAM,KAAK,CAAA;AAQ7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACvC,WAAW,EAAE,MAAM,EAAE;IACrB,YAAY,EAAE,MAAM,EAAE;IACtB,SAAS,EAAE,MAAM,EAAE;IACnB,eAAe,EAAE,MAAM,EAAE;IACzB,EAAE,EAAE,MAAM,EAAE;IACZ,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC;IACjC,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;IAC9B,WAAW,EAAE,MAAM,EAAE;IACrB,WAAW,EAAE,MAAM,EAAE;IACrB,SAAS,EAAE,OAAO,EAAE;IACpB,OAAO,EAAE,OAAO,EAAE;CACrB,CAAyC,CAAA;AAiB1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,MAAM,CAAU;IACnD,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,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CAAA;AAIF,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,MAAM,CAAsB;IACrE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE;IAClE,MAAM,EAAE;QACJ,IAAI,EAAE,IAAI,MAAM,CACZ;YACI,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;YACxC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC1C,EACD,EAAE,GAAG,EAAE,KAAK,EAAE,CACjB;QAED,QAAQ,EAAE,KAAK;KAClB;CACJ,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosopo/types-database",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.15",
|
4
4
|
"description": "Types for prosopo database",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"type": "module",
|
@@ -33,9 +33,9 @@
|
|
33
33
|
"homepage": "https://github.com/prosopo/captcha#readme",
|
34
34
|
"dependencies": {
|
35
35
|
"@polkadot/types": "10.10.1",
|
36
|
-
"@prosopo/common": "0.2.
|
37
|
-
"@prosopo/types": "0.2.
|
38
|
-
"@prosopo/captcha-contract": "0.2.
|
36
|
+
"@prosopo/common": "0.2.15",
|
37
|
+
"@prosopo/types": "0.2.15",
|
38
|
+
"@prosopo/captcha-contract": "0.2.15",
|
39
39
|
"mongodb": "5.8.0",
|
40
40
|
"mongoose": "^7.3.3",
|
41
41
|
"zod": "^3.22.3"
|