@prosopo/types-database 0.1.16 → 0.1.18

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/package.json CHANGED
@@ -1,35 +1,36 @@
1
1
  {
2
- "name": "@prosopo/types-database",
3
- "version": "0.1.16",
4
- "description": "Types for prosopo database",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "clean": "tsc --build --clean",
8
- "build": "tsc --build --verbose",
9
- "test": "echo \"Error: no test specified\" && exit 1",
10
- "lint": "npx eslint .",
11
- "lint:fix": "npx eslint . --fix"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+ssh://git@github.com/prosopo/captcha.git"
16
- },
17
- "author": "Prosopo Limited",
18
- "license": "Apache-2.0",
19
- "bugs": {
20
- "url": "https://github.com/prosopo/captcha/issues"
21
- },
22
- "homepage": "https://github.com/prosopo/captcha#readme",
23
- "dependencies": {
24
- "@polkadot/types": "10.9.1",
25
- "@prosopo/common": "^0.1.16",
26
- "@prosopo/types": "^0.1.16",
27
- "mongodb": "4.8.1",
28
- "mongoose": "^7.2.0",
29
- "zod": "^3.17.9"
30
- },
31
- "devDependencies": {
32
- "typescript": "^4.9.4"
33
- },
34
- "sideEffects": false
2
+ "name": "@prosopo/types-database",
3
+ "version": "0.1.18",
4
+ "description": "Types for prosopo database",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "clean": "tsc --build --clean",
9
+ "build": "tsc --build --verbose",
10
+ "lint": "npx eslint .",
11
+ "lint:fix": "npx eslint . --fix --config ../../.eslintrc.js"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+ssh://git@github.com/prosopo/captcha.git"
16
+ },
17
+ "author": "Prosopo Limited",
18
+ "license": "Apache-2.0",
19
+ "bugs": {
20
+ "url": "https://github.com/prosopo/captcha/issues"
21
+ },
22
+ "homepage": "https://github.com/prosopo/captcha#readme",
23
+ "dependencies": {
24
+ "@polkadot/types": "10.9.1",
25
+ "@prosopo/common": "^0.1.18",
26
+ "@prosopo/types": "^0.1.18",
27
+ "mongodb": "5.8.0",
28
+ "mongoose": "^7.3.3",
29
+ "zod": "^3.17.9"
30
+ },
31
+ "devDependencies": {
32
+ "tslib": "^2.6.2",
33
+ "typescript": "^5.1.6"
34
+ },
35
+ "sideEffects": false
35
36
  }
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './types';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
package/dist/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./types"), exports);
5
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAuB"}
@@ -1,2 +0,0 @@
1
- export * from './mongo';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./mongo"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,kDAAuB"}
@@ -1,399 +0,0 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose/types/inferschematype" />
25
- import { ArgumentTypes } from '@prosopo/types';
26
- import { Captcha, CaptchaSolution, CaptchaStates, Dataset, DatasetBase, DatasetWithIds } from '@prosopo/types';
27
- import { Connection, Model, Schema } from 'mongoose';
28
- import { DeleteResult } from 'mongodb';
29
- import { Logger } from '@prosopo/common';
30
- import { PendingCaptchaRequest } from '@prosopo/types';
31
- import { ScheduledTaskNames, ScheduledTaskResult, ScheduledTaskStatus } from '@prosopo/types';
32
- import { z } from 'zod';
33
- export interface UserCommitmentRecord extends Omit<ArgumentTypes.Commit, 'userSignaturePart1' | 'userSignaturePart2'> {
34
- userSignature: number[];
35
- processed: boolean;
36
- }
37
- export declare const UserCommitmentSchema: z.ZodObject<{
38
- userAccount: z.ZodString;
39
- dappContract: z.ZodString;
40
- datasetId: z.ZodString;
41
- providerAccount: z.ZodString;
42
- id: z.ZodString;
43
- status: z.ZodNativeEnum<typeof ArgumentTypes.CaptchaStatus>;
44
- userSignature: z.ZodArray<z.ZodNumber, "many">;
45
- completedAt: z.ZodNumber;
46
- requestedAt: z.ZodNumber;
47
- processed: z.ZodBoolean;
48
- }, "strip", z.ZodTypeAny, {
49
- id: string;
50
- userAccount: string;
51
- datasetId: string;
52
- status: ArgumentTypes.CaptchaStatus;
53
- dappContract: string;
54
- providerAccount: string;
55
- requestedAt: number;
56
- completedAt: number;
57
- userSignature: number[];
58
- processed: boolean;
59
- }, {
60
- id: string;
61
- userAccount: string;
62
- datasetId: string;
63
- status: ArgumentTypes.CaptchaStatus;
64
- dappContract: string;
65
- providerAccount: string;
66
- requestedAt: number;
67
- completedAt: number;
68
- userSignature: number[];
69
- processed: boolean;
70
- }>;
71
- export interface SolutionRecord extends CaptchaSolution {
72
- datasetId: string;
73
- datasetContentId: string;
74
- }
75
- export interface Tables {
76
- captcha: typeof Model<Captcha>;
77
- dataset: typeof Model<DatasetWithIds>;
78
- solution: typeof Model<SolutionRecord>;
79
- usersolution: typeof Model<UserSolutionRecord>;
80
- commitment: typeof Model<UserCommitmentRecord>;
81
- pending: typeof Model<PendingCaptchaRequest>;
82
- scheduler: typeof Model<ScheduledTaskRecord>;
83
- }
84
- export declare const CaptchaRecordSchema: Schema<Captcha, Model<Captcha, any, any, any, import("mongoose").Document<unknown, any, Captcha> & Omit<Captcha & {
85
- _id: import("mongoose").Types.ObjectId;
86
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Captcha, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Captcha>> & Omit<import("mongoose").FlatRecord<Captcha> & {
87
- _id: import("mongoose").Types.ObjectId;
88
- }, never>>;
89
- export declare const UserCommitmentRecordSchema: Schema<UserCommitmentRecord, Model<UserCommitmentRecord, any, any, any, import("mongoose").Document<unknown, any, UserCommitmentRecord> & Omit<UserCommitmentRecord & {
90
- _id: import("mongoose").Types.ObjectId;
91
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, UserCommitmentRecord, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<UserCommitmentRecord>> & Omit<import("mongoose").FlatRecord<UserCommitmentRecord> & {
92
- _id: import("mongoose").Types.ObjectId;
93
- }, never>>;
94
- export declare const DatasetRecordSchema: Schema<DatasetWithIds, Model<DatasetWithIds, any, any, any, import("mongoose").Document<unknown, any, DatasetWithIds> & Omit<DatasetWithIds & {
95
- _id: import("mongoose").Types.ObjectId;
96
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DatasetWithIds, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<DatasetWithIds>> & Omit<import("mongoose").FlatRecord<DatasetWithIds> & {
97
- _id: import("mongoose").Types.ObjectId;
98
- }, never>>;
99
- export declare const SolutionRecordSchema: Schema<SolutionRecord, Model<SolutionRecord, any, any, any, import("mongoose").Document<unknown, any, SolutionRecord> & Omit<SolutionRecord & {
100
- _id: import("mongoose").Types.ObjectId;
101
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SolutionRecord, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<SolutionRecord>> & Omit<import("mongoose").FlatRecord<SolutionRecord> & {
102
- _id: import("mongoose").Types.ObjectId;
103
- }, never>>;
104
- export declare const UserSolutionSchema: z.ZodObject<{
105
- captchaId: z.ZodString;
106
- captchaContentId: z.ZodString;
107
- solution: z.ZodArray<z.ZodString, "many">;
108
- salt: z.ZodString;
109
- processed: z.ZodBoolean;
110
- commitmentId: z.ZodString;
111
- }, "strip", z.ZodTypeAny, {
112
- processed: boolean;
113
- commitmentId: string;
114
- captchaId: string;
115
- captchaContentId: string;
116
- solution: string[];
117
- salt: string;
118
- }, {
119
- processed: boolean;
120
- commitmentId: string;
121
- captchaId: string;
122
- captchaContentId: string;
123
- solution: string[];
124
- salt: string;
125
- }>;
126
- export type UserSolutionRecord = z.infer<typeof UserSolutionSchema>;
127
- export declare const UserSolutionRecordSchema: Schema<{
128
- processed: boolean;
129
- commitmentId: string;
130
- captchaId: string;
131
- captchaContentId: string;
132
- solution: string[];
133
- salt: string;
134
- }, Model<{
135
- processed: boolean;
136
- commitmentId: string;
137
- captchaId: string;
138
- captchaContentId: string;
139
- solution: string[];
140
- salt: string;
141
- }, any, any, any, import("mongoose").Document<unknown, any, {
142
- processed: boolean;
143
- commitmentId: string;
144
- captchaId: string;
145
- captchaContentId: string;
146
- solution: string[];
147
- salt: string;
148
- }> & Omit<{
149
- processed: boolean;
150
- commitmentId: string;
151
- captchaId: string;
152
- captchaContentId: string;
153
- solution: string[];
154
- salt: string;
155
- } & {
156
- _id: import("mongoose").Types.ObjectId;
157
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
158
- processed: boolean;
159
- commitmentId: string;
160
- captchaId: string;
161
- captchaContentId: string;
162
- solution: string[];
163
- salt: string;
164
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
165
- processed: boolean;
166
- commitmentId: string;
167
- captchaId: string;
168
- captchaContentId: string;
169
- solution: string[];
170
- salt: string;
171
- }>> & Omit<import("mongoose").FlatRecord<{
172
- processed: boolean;
173
- commitmentId: string;
174
- captchaId: string;
175
- captchaContentId: string;
176
- solution: string[];
177
- salt: string;
178
- }> & {
179
- _id: import("mongoose").Types.ObjectId;
180
- }, never>>;
181
- export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
182
- id: z.ZodString;
183
- userAccount: z.ZodString;
184
- datasetId: z.ZodString;
185
- status: z.ZodNativeEnum<typeof ArgumentTypes.CaptchaStatus>;
186
- dappContract: z.ZodString;
187
- providerAccount: z.ZodString;
188
- requestedAt: z.ZodNumber;
189
- completedAt: z.ZodNumber;
190
- userSignature: z.ZodArray<z.ZodNumber, "many">;
191
- processed: z.ZodBoolean;
192
- captchas: z.ZodArray<z.ZodObject<{
193
- captchaId: z.ZodString;
194
- captchaContentId: z.ZodString;
195
- solution: z.ZodArray<z.ZodString, "many">;
196
- salt: z.ZodString;
197
- processed: z.ZodBoolean;
198
- commitmentId: z.ZodString;
199
- }, "strip", z.ZodTypeAny, {
200
- processed: boolean;
201
- commitmentId: string;
202
- captchaId: string;
203
- captchaContentId: string;
204
- solution: string[];
205
- salt: string;
206
- }, {
207
- processed: boolean;
208
- commitmentId: string;
209
- captchaId: string;
210
- captchaContentId: string;
211
- solution: string[];
212
- salt: string;
213
- }>, "many">;
214
- }, "strip", z.ZodTypeAny, {
215
- id: string;
216
- userAccount: string;
217
- datasetId: string;
218
- status: ArgumentTypes.CaptchaStatus;
219
- dappContract: string;
220
- providerAccount: string;
221
- requestedAt: number;
222
- completedAt: number;
223
- userSignature: number[];
224
- processed: boolean;
225
- captchas: {
226
- processed: boolean;
227
- commitmentId: string;
228
- captchaId: string;
229
- captchaContentId: string;
230
- solution: string[];
231
- salt: string;
232
- }[];
233
- }, {
234
- id: string;
235
- userAccount: string;
236
- datasetId: string;
237
- status: ArgumentTypes.CaptchaStatus;
238
- dappContract: string;
239
- providerAccount: string;
240
- requestedAt: number;
241
- completedAt: number;
242
- userSignature: number[];
243
- processed: boolean;
244
- captchas: {
245
- processed: boolean;
246
- commitmentId: string;
247
- captchaId: string;
248
- captchaContentId: string;
249
- solution: string[];
250
- salt: string;
251
- }[];
252
- }>;
253
- export type UserCommitmentWithSolutions = z.infer<typeof UserCommitmentWithSolutionsSchema>;
254
- export declare const PendingRecordSchema: Schema<PendingCaptchaRequest, Model<PendingCaptchaRequest, any, any, any, import("mongoose").Document<unknown, any, PendingCaptchaRequest> & Omit<PendingCaptchaRequest & {
255
- _id: import("mongoose").Types.ObjectId;
256
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PendingCaptchaRequest, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PendingCaptchaRequest>> & Omit<import("mongoose").FlatRecord<PendingCaptchaRequest> & {
257
- _id: import("mongoose").Types.ObjectId;
258
- }, never>>;
259
- export declare const ScheduledTaskSchema: z.ZodObject<{
260
- taskId: z.ZodString;
261
- processName: z.ZodNativeEnum<typeof ScheduledTaskNames>;
262
- datetime: z.ZodDate;
263
- status: z.ZodNativeEnum<typeof ScheduledTaskStatus>;
264
- result: z.ZodOptional<z.ZodObject<{
265
- data: z.ZodOptional<z.ZodAny>;
266
- error: z.ZodOptional<z.ZodAny>;
267
- }, "strip", z.ZodTypeAny, {
268
- data?: any;
269
- error?: any;
270
- }, {
271
- data?: any;
272
- error?: any;
273
- }>>;
274
- }, "strip", z.ZodTypeAny, {
275
- status: ScheduledTaskStatus;
276
- taskId: string;
277
- processName: ScheduledTaskNames;
278
- datetime: Date;
279
- result?: {
280
- data?: any;
281
- error?: any;
282
- } | undefined;
283
- }, {
284
- status: ScheduledTaskStatus;
285
- taskId: string;
286
- processName: ScheduledTaskNames;
287
- datetime: Date;
288
- result?: {
289
- data?: any;
290
- error?: any;
291
- } | undefined;
292
- }>;
293
- export type ScheduledTaskRecord = z.infer<typeof ScheduledTaskSchema>;
294
- export declare const ScheduledTaskRecordSchema: Schema<{
295
- status: ScheduledTaskStatus;
296
- taskId: string;
297
- processName: ScheduledTaskNames;
298
- datetime: Date;
299
- result?: {
300
- data?: any;
301
- error?: any;
302
- } | undefined;
303
- }, Model<{
304
- status: ScheduledTaskStatus;
305
- taskId: string;
306
- processName: ScheduledTaskNames;
307
- datetime: Date;
308
- result?: {
309
- data?: any;
310
- error?: any;
311
- } | undefined;
312
- }, any, any, any, import("mongoose").Document<unknown, any, {
313
- status: ScheduledTaskStatus;
314
- taskId: string;
315
- processName: ScheduledTaskNames;
316
- datetime: Date;
317
- result?: {
318
- data?: any;
319
- error?: any;
320
- } | undefined;
321
- }> & Omit<{
322
- status: ScheduledTaskStatus;
323
- taskId: string;
324
- processName: ScheduledTaskNames;
325
- datetime: Date;
326
- result?: {
327
- data?: any;
328
- error?: any;
329
- } | undefined;
330
- } & {
331
- _id: import("mongoose").Types.ObjectId;
332
- }, never>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
333
- status: ScheduledTaskStatus;
334
- taskId: string;
335
- processName: ScheduledTaskNames;
336
- datetime: Date;
337
- result?: {
338
- data?: any;
339
- error?: any;
340
- } | undefined;
341
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
342
- status: ScheduledTaskStatus;
343
- taskId: string;
344
- processName: ScheduledTaskNames;
345
- datetime: Date;
346
- result?: {
347
- data?: any;
348
- error?: any;
349
- } | undefined;
350
- }>> & Omit<import("mongoose").FlatRecord<{
351
- status: ScheduledTaskStatus;
352
- taskId: string;
353
- processName: ScheduledTaskNames;
354
- datetime: Date;
355
- result?: {
356
- data?: any;
357
- error?: any;
358
- } | undefined;
359
- }> & {
360
- _id: import("mongoose").Types.ObjectId;
361
- }, never>>;
362
- export interface Database {
363
- url: string;
364
- tables?: Tables;
365
- dbname: string;
366
- connection?: Connection;
367
- logger: Logger;
368
- connect(): Promise<void>;
369
- close(): Promise<void>;
370
- storeDataset(dataset: Dataset): Promise<void>;
371
- getDataset(datasetId: string): Promise<DatasetWithIds>;
372
- getRandomCaptcha(solved: boolean, datasetId: ArgumentTypes.Hash | string, size?: number): Promise<Captcha[] | undefined>;
373
- getCaptchaById(captchaId: string[]): Promise<Captcha[] | undefined>;
374
- updateCaptcha(captcha: Captcha, datasetId: string): Promise<void>;
375
- removeCaptchas(captchaIds: string[]): Promise<void>;
376
- getDatasetDetails(datasetId: ArgumentTypes.Hash | string | Uint8Array): Promise<DatasetBase>;
377
- storeDappUserSolution(captchas: CaptchaSolution[], commit: UserCommitmentRecord): Promise<void>;
378
- storeDappUserPending(userAccount: string, requestHash: string, salt: string, deadlineTimestamp: number, requestedAtBlock: number): Promise<void>;
379
- getDappUserPending(requestHash: string): Promise<PendingCaptchaRequest>;
380
- updateDappUserPendingStatus(userAccount: string, requestHash: string, approve: boolean): Promise<void>;
381
- getAllCaptchasByDatasetId(datasetId: string, captchaState?: CaptchaStates): Promise<Captcha[] | undefined>;
382
- getAllDappUserSolutions(captchaId: string[]): Promise<UserSolutionRecord[] | undefined>;
383
- getDatasetIdWithSolvedCaptchasOfSizeN(solvedCaptchaCount: any): Promise<string>;
384
- getRandomSolvedCaptchasFromSingleDataset(datasetId: string, size: number): Promise<CaptchaSolution[]>;
385
- getDappUserSolutionById(commitmentId: string): Promise<UserSolutionRecord | undefined>;
386
- getDappUserCommitmentById(commitmentId: string): Promise<UserCommitmentRecord | undefined>;
387
- getDappUserCommitmentByAccount(accountId: string): Promise<UserCommitmentRecord[]>;
388
- approveDappUserCommitment(commitmentId: string): Promise<void>;
389
- removeProcessedDappUserSolutions(commitmentIds: ArgumentTypes.Hash[]): Promise<DeleteResult | undefined>;
390
- removeProcessedDappUserCommitments(commitmentIds: ArgumentTypes.Hash[]): Promise<DeleteResult | undefined>;
391
- getProcessedDappUserSolutions(): Promise<UserSolutionRecord[]>;
392
- getProcessedDappUserCommitments(): Promise<UserCommitmentRecord[]>;
393
- flagUsedDappUserSolutions(captchaIds: string[]): Promise<void>;
394
- flagUsedDappUserCommitments(commitmentIds: string[]): Promise<void>;
395
- getLastBatchCommitTime(): Promise<Date>;
396
- getLastScheduledTask(task: ScheduledTaskNames): Promise<ScheduledTaskRecord | undefined>;
397
- storeScheduledTaskStatus(taskId: `0x${string}`, task: ScheduledTaskNames, status: ScheduledTaskStatus, result?: ScheduledTaskResult): Promise<void>;
398
- }
399
- //# sourceMappingURL=mongo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EACH,OAAO,EACP,eAAe,EAEf,aAAa,EACb,OAAO,EACP,WAAW,EACX,cAAc,EAEjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,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perty(exports, "__esModule", { value: true });
3
- exports.ScheduledTaskRecordSchema = exports.ScheduledTaskSchema = exports.PendingRecordSchema = exports.UserCommitmentWithSolutionsSchema = exports.UserSolutionRecordSchema = exports.UserSolutionSchema = exports.SolutionRecordSchema = exports.DatasetRecordSchema = exports.UserCommitmentRecordSchema = exports.CaptchaRecordSchema = exports.UserCommitmentSchema = void 0;
4
- // Copyright 2021-2022 Prosopo (UK) Ltd.
5
- //
6
- // Licensed under the Apache License, Version 2.0 (the "License");
7
- // you may not use this file except in compliance with the License.
8
- // You may obtain a copy of the License at
9
- //
10
- // http://www.apache.org/licenses/LICENSE-2.0
11
- //
12
- // Unless required by applicable law or agreed to in writing, software
13
- // distributed under the License is distributed on an "AS IS" BASIS,
14
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- // See the License for the specific language governing permissions and
16
- // limitations under the License.
17
- const types_1 = require("@prosopo/types");
18
- const types_2 = require("@prosopo/types");
19
- const mongoose_1 = require("mongoose");
20
- const types_3 = require("@prosopo/types");
21
- const zod_1 = require("zod");
22
- exports.UserCommitmentSchema = zod_1.z.object({
23
- userAccount: zod_1.z.string(),
24
- dappContract: zod_1.z.string(),
25
- datasetId: zod_1.z.string(),
26
- providerAccount: zod_1.z.string(),
27
- id: zod_1.z.string(),
28
- status: zod_1.z.nativeEnum(types_1.ArgumentTypes.CaptchaStatus),
29
- userSignature: zod_1.z.array(zod_1.z.number()),
30
- completedAt: zod_1.z.number(),
31
- requestedAt: zod_1.z.number(),
32
- processed: zod_1.z.boolean(),
33
- });
34
- exports.CaptchaRecordSchema = new mongoose_1.Schema({
35
- captchaId: { type: String, required: true },
36
- captchaContentId: { type: String, required: true },
37
- assetURI: { type: String, required: false },
38
- datasetId: { type: String, required: true },
39
- datasetContentId: { type: String, required: true },
40
- solved: { type: Boolean, required: true },
41
- target: { type: String, required: true },
42
- salt: { type: String, required: true },
43
- items: {
44
- type: [
45
- new mongoose_1.Schema({
46
- hash: { type: String, required: true },
47
- data: { type: String, required: true },
48
- type: { type: String, required: true },
49
- }, { _id: false }),
50
- ],
51
- required: true,
52
- },
53
- });
54
- exports.UserCommitmentRecordSchema = new mongoose_1.Schema({
55
- userAccount: { type: String, required: true },
56
- dappContract: { type: String, required: true },
57
- providerAccount: { type: String, required: true },
58
- datasetId: { type: String, required: true },
59
- id: { type: String, required: true },
60
- status: { type: String, required: true },
61
- requestedAt: { type: Number, required: true },
62
- completedAt: { type: Number, required: true },
63
- userSignature: { type: [Number], required: true },
64
- processed: { type: Boolean, required: true },
65
- });
66
- exports.DatasetRecordSchema = new mongoose_1.Schema({
67
- contentTree: { type: [[String]], required: true },
68
- datasetContentId: { type: String, required: true },
69
- datasetId: { type: String, required: true },
70
- format: { type: String, required: true },
71
- solutionTree: { type: [[String]], required: true },
72
- });
73
- exports.SolutionRecordSchema = new mongoose_1.Schema({
74
- captchaId: { type: String, required: true },
75
- captchaContentId: { type: String, required: true },
76
- datasetId: { type: String, required: true },
77
- datasetContentId: { type: String, required: true },
78
- salt: { type: String, required: true },
79
- solution: { type: [String], required: true },
80
- });
81
- exports.UserSolutionSchema = types_2.CaptchaSolutionSchema.extend({
82
- processed: zod_1.z.boolean(),
83
- commitmentId: zod_1.z.string(),
84
- });
85
- exports.UserSolutionRecordSchema = new mongoose_1.Schema({
86
- captchaId: { type: String, required: true },
87
- captchaContentId: { type: String, required: true },
88
- salt: { type: String, required: true },
89
- solution: [{ type: String, required: true }],
90
- processed: { type: Boolean, required: true },
91
- commitmentId: { type: String, required: true },
92
- }, { _id: false });
93
- exports.UserCommitmentWithSolutionsSchema = exports.UserCommitmentSchema.extend({
94
- captchas: zod_1.z.array(exports.UserSolutionSchema),
95
- });
96
- exports.PendingRecordSchema = new mongoose_1.Schema({
97
- accountId: { type: String, required: true },
98
- pending: { type: Boolean, required: true },
99
- salt: { type: String, required: true },
100
- requestHash: { type: String, required: true },
101
- deadlineTimestamp: { type: Number, required: true },
102
- requestedAtBlock: { type: Number, required: true },
103
- });
104
- exports.ScheduledTaskSchema = zod_1.z.object({
105
- taskId: zod_1.z.string(),
106
- processName: zod_1.z.nativeEnum(types_3.ScheduledTaskNames),
107
- datetime: zod_1.z.date(),
108
- status: zod_1.z.nativeEnum(types_3.ScheduledTaskStatus),
109
- result: zod_1.z
110
- .object({
111
- data: zod_1.z.any().optional(),
112
- error: zod_1.z.any().optional(),
113
- })
114
- .optional(),
115
- });
116
- exports.ScheduledTaskRecordSchema = new mongoose_1.Schema({
117
- taskId: { type: String, required: true },
118
- processName: { type: String, enum: types_3.ScheduledTaskNames, required: true },
119
- datetime: { type: Date, required: true },
120
- status: { type: String, enum: types_3.ScheduledTaskStatus, require: true },
121
- result: {
122
- type: new mongoose_1.Schema({
123
- error: { type: String, required: false },
124
- data: { type: Object, required: false },
125
- }, { _id: false }),
126
- required: false,
127
- },
128
- });
129
- //# sourceMappingURL=mongo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo.js","sourceRoot":"","sources":["../../src/types/mongo.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,0CAA8C;AAC9C,0CASuB;AACvB,uCAAoD;AAIpD,0CAA6F;AAC7F,6BAAuB;AAOV,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,qBAAa,CAAC,aAAa,CAAC;IACjD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