@prosopo/types-database 0.2.13 → 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/cjs/types/mongo.cjs +24 -25
- 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.d.ts +58 -57
- package/dist/types/mongo.d.ts.map +1 -1
- package/dist/types/mongo.js +26 -47
- package/dist/types/mongo.js.map +1 -1
- package/package.json +4 -4
- package/dist/cjs/contracts/captcha/dist/build-extrinsic/captcha.cjs +0 -339
- package/dist/cjs/contracts/captcha/dist/contract-info/captcha.cjs +0 -6
- package/dist/cjs/contracts/captcha/dist/contracts/captcha.cjs +0 -79
- package/dist/cjs/contracts/captcha/dist/data/captcha.json.cjs +0 -3374
- package/dist/cjs/contracts/captcha/dist/event-data/captcha.json.cjs +0 -3
- package/dist/cjs/contracts/captcha/dist/events/captcha.cjs +0 -23
- package/dist/cjs/contracts/captcha/dist/index.cjs +0 -44
- package/dist/cjs/contracts/captcha/dist/mixed-methods/captcha.cjs +0 -470
- package/dist/cjs/contracts/captcha/dist/query/captcha.cjs +0 -468
- package/dist/cjs/contracts/captcha/dist/shared/utils.cjs +0 -31
- package/dist/cjs/contracts/captcha/dist/tx-sign-and-send/captcha.cjs +0 -426
- package/dist/cjs/contracts/captcha/dist/types-arguments/captcha.cjs +0 -62
package/dist/cjs/types/mongo.cjs
CHANGED
@@ -1,22 +1,21 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
3
|
const types = require("@prosopo/types");
|
4
|
-
require("
|
4
|
+
const typesReturns = require("@prosopo/captcha-contract/types-returns");
|
5
5
|
const mongoose = require("mongoose");
|
6
6
|
const zod = require("zod");
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
batched: zod.z.boolean()
|
7
|
+
const UserCommitmentSchema = zod.object({
|
8
|
+
userAccount: zod.string(),
|
9
|
+
dappContract: zod.string(),
|
10
|
+
datasetId: zod.string(),
|
11
|
+
providerAccount: zod.string(),
|
12
|
+
id: zod.string(),
|
13
|
+
status: zod.nativeEnum(typesReturns.CaptchaStatus),
|
14
|
+
userSignature: zod.array(zod.number()),
|
15
|
+
completedAt: zod.number(),
|
16
|
+
requestedAt: zod.number(),
|
17
|
+
processed: zod.boolean(),
|
18
|
+
batched: zod.boolean()
|
20
19
|
});
|
21
20
|
const CaptchaRecordSchema = new mongoose.Schema({
|
22
21
|
captchaId: { type: String, required: true },
|
@@ -74,8 +73,8 @@ const SolutionRecordSchema = new mongoose.Schema({
|
|
74
73
|
});
|
75
74
|
SolutionRecordSchema.index({ captchaId: 1 });
|
76
75
|
const UserSolutionSchema = types.CaptchaSolutionSchema.extend({
|
77
|
-
processed: zod.
|
78
|
-
commitmentId: zod.
|
76
|
+
processed: zod.boolean(),
|
77
|
+
commitmentId: zod.string()
|
79
78
|
});
|
80
79
|
const UserSolutionRecordSchema = new mongoose.Schema(
|
81
80
|
{
|
@@ -90,7 +89,7 @@ const UserSolutionRecordSchema = new mongoose.Schema(
|
|
90
89
|
);
|
91
90
|
UserSolutionRecordSchema.index({ captchaId: 1 });
|
92
91
|
const UserCommitmentWithSolutionsSchema = UserCommitmentSchema.extend({
|
93
|
-
captchas: zod.
|
92
|
+
captchas: zod.array(UserSolutionSchema)
|
94
93
|
});
|
95
94
|
const PendingRecordSchema = new mongoose.Schema({
|
96
95
|
accountId: { type: String, required: true },
|
@@ -102,14 +101,14 @@ const PendingRecordSchema = new mongoose.Schema({
|
|
102
101
|
requestedAtBlock: { type: Number, required: true }
|
103
102
|
});
|
104
103
|
PendingRecordSchema.index({ requestHash: -1 });
|
105
|
-
const ScheduledTaskSchema = zod.
|
106
|
-
taskId: zod.
|
107
|
-
processName: zod.
|
108
|
-
datetime: zod.
|
109
|
-
status: zod.
|
110
|
-
result: zod.
|
111
|
-
data: zod.
|
112
|
-
error: zod.
|
104
|
+
const ScheduledTaskSchema = zod.object({
|
105
|
+
taskId: zod.string(),
|
106
|
+
processName: zod.nativeEnum(types.ScheduledTaskNames),
|
107
|
+
datetime: zod.date(),
|
108
|
+
status: zod.nativeEnum(types.ScheduledTaskStatus),
|
109
|
+
result: zod.object({
|
110
|
+
data: zod.any().optional(),
|
111
|
+
error: zod.any().optional()
|
113
112
|
}).optional()
|
114
113
|
});
|
115
114
|
const ScheduledTaskRecordSchema = new mongoose.Schema({
|
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.d.ts
CHANGED
@@ -23,32 +23,32 @@
|
|
23
23
|
/// <reference types="mongoose/types/virtuals.js" />
|
24
24
|
/// <reference types="mongoose/types/inferschematype.js" />
|
25
25
|
import { Captcha, CaptchaSolution, CaptchaStates, Dataset, DatasetBase, DatasetWithIds } from '@prosopo/types';
|
26
|
-
import { CaptchaStatus, Commit } from '@prosopo/captcha-contract';
|
26
|
+
import { CaptchaStatus, Commit } from '@prosopo/captcha-contract/types-returns';
|
27
27
|
import { Connection, Model, Schema } from 'mongoose';
|
28
28
|
import { DeleteResult } from 'mongodb';
|
29
29
|
import { Hash } from '@prosopo/types';
|
30
30
|
import { Logger } from '@prosopo/common';
|
31
31
|
import { PendingCaptchaRequest } from '@prosopo/types';
|
32
32
|
import { ScheduledTaskNames, ScheduledTaskResult, ScheduledTaskStatus } from '@prosopo/types';
|
33
|
-
import {
|
33
|
+
import { infer as zInfer } from 'zod';
|
34
34
|
export interface UserCommitmentRecord extends Omit<Commit, 'userSignaturePart1' | 'userSignaturePart2'> {
|
35
35
|
userSignature: number[];
|
36
36
|
processed: boolean;
|
37
37
|
batched: boolean;
|
38
38
|
}
|
39
|
-
export declare const UserCommitmentSchema:
|
40
|
-
userAccount:
|
41
|
-
dappContract:
|
42
|
-
datasetId:
|
43
|
-
providerAccount:
|
44
|
-
id:
|
45
|
-
status:
|
46
|
-
userSignature:
|
47
|
-
completedAt:
|
48
|
-
requestedAt:
|
49
|
-
processed:
|
50
|
-
batched:
|
51
|
-
}, "strip",
|
39
|
+
export declare const UserCommitmentSchema: import("zod").ZodObject<{
|
40
|
+
userAccount: import("zod").ZodString;
|
41
|
+
dappContract: import("zod").ZodString;
|
42
|
+
datasetId: import("zod").ZodString;
|
43
|
+
providerAccount: import("zod").ZodString;
|
44
|
+
id: import("zod").ZodString;
|
45
|
+
status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
|
46
|
+
userSignature: import("zod").ZodArray<import("zod").ZodNumber, "many">;
|
47
|
+
completedAt: import("zod").ZodNumber;
|
48
|
+
requestedAt: import("zod").ZodNumber;
|
49
|
+
processed: import("zod").ZodBoolean;
|
50
|
+
batched: import("zod").ZodBoolean;
|
51
|
+
}, "strip", import("zod").ZodTypeAny, {
|
52
52
|
id: string;
|
53
53
|
userAccount: string;
|
54
54
|
datasetId: string;
|
@@ -106,14 +106,14 @@ export declare const SolutionRecordSchema: Schema<SolutionRecord, Model<Solution
|
|
106
106
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SolutionRecord, import("mongoose").Document<unknown, {}, SolutionRecord> & SolutionRecord & {
|
107
107
|
_id: import("mongoose").Types.ObjectId;
|
108
108
|
}>;
|
109
|
-
export declare const UserSolutionSchema:
|
110
|
-
captchaId:
|
111
|
-
captchaContentId:
|
112
|
-
solution:
|
113
|
-
salt:
|
114
|
-
processed:
|
115
|
-
commitmentId:
|
116
|
-
}, "strip",
|
109
|
+
export declare const UserSolutionSchema: import("zod").ZodObject<{
|
110
|
+
captchaId: import("zod").ZodString;
|
111
|
+
captchaContentId: import("zod").ZodString;
|
112
|
+
solution: import("zod").ZodArray<import("zod").ZodString, "many">;
|
113
|
+
salt: import("zod").ZodString;
|
114
|
+
processed: import("zod").ZodBoolean;
|
115
|
+
commitmentId: import("zod").ZodString;
|
116
|
+
}, "strip", import("zod").ZodTypeAny, {
|
117
117
|
processed: boolean;
|
118
118
|
commitmentId: string;
|
119
119
|
captchaId: string;
|
@@ -128,7 +128,7 @@ export declare const UserSolutionSchema: z.ZodObject<{
|
|
128
128
|
solution: string[];
|
129
129
|
salt: string;
|
130
130
|
}>;
|
131
|
-
export type UserSolutionRecord =
|
131
|
+
export type UserSolutionRecord = zInfer<typeof UserSolutionSchema>;
|
132
132
|
export declare const UserSolutionRecordSchema: Schema<{
|
133
133
|
processed: boolean;
|
134
134
|
commitmentId: string;
|
@@ -183,26 +183,26 @@ export declare const UserSolutionRecordSchema: Schema<{
|
|
183
183
|
} & {
|
184
184
|
_id: import("mongoose").Types.ObjectId;
|
185
185
|
}>;
|
186
|
-
export declare const UserCommitmentWithSolutionsSchema:
|
187
|
-
id:
|
188
|
-
userAccount:
|
189
|
-
datasetId:
|
190
|
-
status:
|
191
|
-
dappContract:
|
192
|
-
providerAccount:
|
193
|
-
requestedAt:
|
194
|
-
completedAt:
|
195
|
-
userSignature:
|
196
|
-
processed:
|
197
|
-
batched:
|
198
|
-
captchas:
|
199
|
-
captchaId:
|
200
|
-
captchaContentId:
|
201
|
-
solution:
|
202
|
-
salt:
|
203
|
-
processed:
|
204
|
-
commitmentId:
|
205
|
-
}, "strip",
|
186
|
+
export declare const UserCommitmentWithSolutionsSchema: import("zod").ZodObject<{
|
187
|
+
id: import("zod").ZodString;
|
188
|
+
userAccount: import("zod").ZodString;
|
189
|
+
datasetId: import("zod").ZodString;
|
190
|
+
status: import("zod").ZodNativeEnum<typeof CaptchaStatus>;
|
191
|
+
dappContract: import("zod").ZodString;
|
192
|
+
providerAccount: import("zod").ZodString;
|
193
|
+
requestedAt: import("zod").ZodNumber;
|
194
|
+
completedAt: import("zod").ZodNumber;
|
195
|
+
userSignature: import("zod").ZodArray<import("zod").ZodNumber, "many">;
|
196
|
+
processed: import("zod").ZodBoolean;
|
197
|
+
batched: import("zod").ZodBoolean;
|
198
|
+
captchas: import("zod").ZodArray<import("zod").ZodObject<{
|
199
|
+
captchaId: import("zod").ZodString;
|
200
|
+
captchaContentId: import("zod").ZodString;
|
201
|
+
solution: import("zod").ZodArray<import("zod").ZodString, "many">;
|
202
|
+
salt: import("zod").ZodString;
|
203
|
+
processed: import("zod").ZodBoolean;
|
204
|
+
commitmentId: import("zod").ZodString;
|
205
|
+
}, "strip", import("zod").ZodTypeAny, {
|
206
206
|
processed: boolean;
|
207
207
|
commitmentId: string;
|
208
208
|
captchaId: string;
|
@@ -217,7 +217,7 @@ export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
|
217
217
|
solution: string[];
|
218
218
|
salt: string;
|
219
219
|
}>, "many">;
|
220
|
-
}, "strip",
|
220
|
+
}, "strip", import("zod").ZodTypeAny, {
|
221
221
|
id: string;
|
222
222
|
userAccount: string;
|
223
223
|
datasetId: string;
|
@@ -258,28 +258,28 @@ export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
|
258
258
|
salt: string;
|
259
259
|
}[];
|
260
260
|
}>;
|
261
|
-
export type UserCommitmentWithSolutions =
|
261
|
+
export type UserCommitmentWithSolutions = zInfer<typeof UserCommitmentWithSolutionsSchema>;
|
262
262
|
export declare const PendingRecordSchema: Schema<PendingCaptchaRequest, Model<PendingCaptchaRequest, any, any, any, import("mongoose").Document<unknown, any, PendingCaptchaRequest> & PendingCaptchaRequest & {
|
263
263
|
_id: import("mongoose").Types.ObjectId;
|
264
264
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PendingCaptchaRequest, import("mongoose").Document<unknown, {}, PendingCaptchaRequest> & PendingCaptchaRequest & {
|
265
265
|
_id: import("mongoose").Types.ObjectId;
|
266
266
|
}>;
|
267
|
-
export declare const ScheduledTaskSchema:
|
268
|
-
taskId:
|
269
|
-
processName:
|
270
|
-
datetime:
|
271
|
-
status:
|
272
|
-
result:
|
273
|
-
data:
|
274
|
-
error:
|
275
|
-
}, "strip",
|
267
|
+
export declare const ScheduledTaskSchema: import("zod").ZodObject<{
|
268
|
+
taskId: import("zod").ZodString;
|
269
|
+
processName: import("zod").ZodNativeEnum<typeof ScheduledTaskNames>;
|
270
|
+
datetime: import("zod").ZodDate;
|
271
|
+
status: import("zod").ZodNativeEnum<typeof ScheduledTaskStatus>;
|
272
|
+
result: import("zod").ZodOptional<import("zod").ZodObject<{
|
273
|
+
data: import("zod").ZodOptional<import("zod").ZodAny>;
|
274
|
+
error: import("zod").ZodOptional<import("zod").ZodAny>;
|
275
|
+
}, "strip", import("zod").ZodTypeAny, {
|
276
276
|
data?: any;
|
277
277
|
error?: any;
|
278
278
|
}, {
|
279
279
|
data?: any;
|
280
280
|
error?: any;
|
281
281
|
}>>;
|
282
|
-
}, "strip",
|
282
|
+
}, "strip", import("zod").ZodTypeAny, {
|
283
283
|
status: ScheduledTaskStatus;
|
284
284
|
taskId: string;
|
285
285
|
processName: ScheduledTaskNames;
|
@@ -298,7 +298,7 @@ export declare const ScheduledTaskSchema: z.ZodObject<{
|
|
298
298
|
error?: any;
|
299
299
|
} | undefined;
|
300
300
|
}>;
|
301
|
-
export type ScheduledTaskRecord =
|
301
|
+
export type ScheduledTaskRecord = zInfer<typeof ScheduledTaskSchema>;
|
302
302
|
export declare const ScheduledTaskRecordSchema: Schema<{
|
303
303
|
status: ScheduledTaskStatus;
|
304
304
|
taskId: string;
|
@@ -376,6 +376,7 @@ export interface Database {
|
|
376
376
|
connect(): Promise<void>;
|
377
377
|
close(): Promise<void>;
|
378
378
|
storeDataset(dataset: Dataset): Promise<void>;
|
379
|
+
getSolutions(datasetId: string): Promise<SolutionRecord[]>;
|
379
380
|
getDataset(datasetId: string): Promise<DatasetWithIds>;
|
380
381
|
getRandomCaptcha(solved: boolean, datasetId: Hash | string, size?: number): Promise<Captcha[] | undefined>;
|
381
382
|
getCaptchaById(captchaId: string[]): Promise<Captcha[] | undefined>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAaA,OAAO,EACH,OAAO,EACP,eAAe,EAEf,aAAa,EACb,OAAO,EACP,WAAW,EACX,cAAc,EAEjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAaA,OAAO,EACH,OAAO,EACP,eAAe,EAEf,aAAa,EACb,OAAO,EACP,WAAW,EACX,cAAc,EAEjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAC7F,OAAO,EAA0E,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAA;AAE7G,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB,CAAC;IACnG,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;CACnB;AAED,eAAO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I,CAAC,CAAA;CACnB"}
|
package/dist/types/mongo.js
CHANGED
@@ -1,33 +1,20 @@
|
|
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
|
-
import { CaptchaStatus } from '@prosopo/captcha-contract';
|
2
|
+
import { CaptchaStatus } from '@prosopo/captcha-contract/types-returns';
|
16
3
|
import { Schema } from 'mongoose';
|
17
4
|
import { ScheduledTaskNames, ScheduledTaskStatus } from '@prosopo/types';
|
18
|
-
import {
|
19
|
-
export const UserCommitmentSchema =
|
20
|
-
userAccount:
|
21
|
-
dappContract:
|
22
|
-
datasetId:
|
23
|
-
providerAccount:
|
24
|
-
id:
|
25
|
-
status:
|
26
|
-
userSignature:
|
27
|
-
completedAt:
|
28
|
-
requestedAt:
|
29
|
-
processed:
|
30
|
-
batched:
|
5
|
+
import { any, array, boolean, date, nativeEnum, number, object, string } from 'zod';
|
6
|
+
export const UserCommitmentSchema = object({
|
7
|
+
userAccount: string(),
|
8
|
+
dappContract: string(),
|
9
|
+
datasetId: string(),
|
10
|
+
providerAccount: string(),
|
11
|
+
id: string(),
|
12
|
+
status: nativeEnum(CaptchaStatus),
|
13
|
+
userSignature: array(number()),
|
14
|
+
completedAt: number(),
|
15
|
+
requestedAt: number(),
|
16
|
+
processed: boolean(),
|
17
|
+
batched: boolean(),
|
31
18
|
});
|
32
19
|
export const CaptchaRecordSchema = new Schema({
|
33
20
|
captchaId: { type: String, required: true },
|
@@ -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,11 +67,10 @@ 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
|
-
processed:
|
90
|
-
commitmentId:
|
72
|
+
processed: boolean(),
|
73
|
+
commitmentId: string(),
|
91
74
|
});
|
92
75
|
export const UserSolutionRecordSchema = new Schema({
|
93
76
|
captchaId: { type: String, required: true },
|
@@ -97,10 +80,9 @@ 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
|
-
captchas:
|
85
|
+
captchas: array(UserSolutionSchema),
|
104
86
|
});
|
105
87
|
export const PendingRecordSchema = new Schema({
|
106
88
|
accountId: { type: String, required: true },
|
@@ -110,19 +92,16 @@ 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
|
-
export const ScheduledTaskSchema =
|
116
|
-
taskId:
|
117
|
-
processName:
|
118
|
-
datetime:
|
119
|
-
status:
|
120
|
-
result:
|
121
|
-
.
|
122
|
-
|
123
|
-
|
124
|
-
})
|
125
|
-
.optional(),
|
96
|
+
export const ScheduledTaskSchema = object({
|
97
|
+
taskId: string(),
|
98
|
+
processName: nativeEnum(ScheduledTaskNames),
|
99
|
+
datetime: date(),
|
100
|
+
status: nativeEnum(ScheduledTaskStatus),
|
101
|
+
result: object({
|
102
|
+
data: any().optional(),
|
103
|
+
error: any().optional(),
|
104
|
+
}).optional(),
|
126
105
|
});
|
127
106
|
export const ScheduledTaskRecordSchema = new Schema({
|
128
107
|
taskId: { type: String, required: true },
|
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,EAA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AAE;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"
|