@prosopo/types-database 0.1.15 → 0.1.17
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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +14 -4
- package/dist/types/index.js.map +1 -1
- package/dist/types/mongo.d.ts +65 -54
- package/dist/types/mongo.d.ts.map +1 -1
- package/dist/types/mongo.js +43 -44
- package/dist/types/mongo.js.map +1 -1
- package/package.json +33 -33
package/dist/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './types';
|
1
|
+
export * from './types/index.js';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
+
export * from './types/index.js';
|
5
15
|
//# 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,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,cAAc,kBAAkB,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './mongo';
|
1
|
+
export * from './mongo.js';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAA"}
|
package/dist/types/index.js
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
+
export * from './mongo.js';
|
5
15
|
//# 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,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,cAAc,YAAY,CAAA"}
|
package/dist/types/mongo.d.ts
CHANGED
@@ -1,27 +1,27 @@
|
|
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" />
|
1
|
+
/// <reference types="mongoose/types/aggregate.js" />
|
2
|
+
/// <reference types="mongoose/types/callback.js" />
|
3
|
+
/// <reference types="mongoose/types/collection.js" />
|
4
|
+
/// <reference types="mongoose/types/connection.js" />
|
5
|
+
/// <reference types="mongoose/types/cursor.js" />
|
6
|
+
/// <reference types="mongoose/types/document.js" />
|
7
|
+
/// <reference types="mongoose/types/error.js" />
|
8
|
+
/// <reference types="mongoose/types/expressions.js" />
|
9
|
+
/// <reference types="mongoose/types/helpers.js" />
|
10
|
+
/// <reference types="mongoose/types/middlewares.js" />
|
11
|
+
/// <reference types="mongoose/types/indexes.js" />
|
12
|
+
/// <reference types="mongoose/types/models.js" />
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions.js" />
|
14
|
+
/// <reference types="mongoose/types/pipelinestage.js" />
|
15
|
+
/// <reference types="mongoose/types/populate.js" />
|
16
|
+
/// <reference types="mongoose/types/query.js" />
|
17
|
+
/// <reference types="mongoose/types/schemaoptions.js" />
|
18
|
+
/// <reference types="mongoose/types/schematypes.js" />
|
19
|
+
/// <reference types="mongoose/types/session.js" />
|
20
|
+
/// <reference types="mongoose/types/types.js" />
|
21
|
+
/// <reference types="mongoose/types/utility.js" />
|
22
|
+
/// <reference types="mongoose/types/validation.js" />
|
23
|
+
/// <reference types="mongoose/types/virtuals.js" />
|
24
|
+
/// <reference types="mongoose/types/inferschematype.js" />
|
25
25
|
import { ArgumentTypes } from '@prosopo/types';
|
26
26
|
import { Captcha, CaptchaSolution, CaptchaStates, Dataset, DatasetBase, DatasetWithIds } from '@prosopo/types';
|
27
27
|
import { Connection, Model, Schema } from 'mongoose';
|
@@ -33,6 +33,7 @@ import { z } from 'zod';
|
|
33
33
|
export interface UserCommitmentRecord extends Omit<ArgumentTypes.Commit, 'userSignaturePart1' | 'userSignaturePart2'> {
|
34
34
|
userSignature: number[];
|
35
35
|
processed: boolean;
|
36
|
+
batched: boolean;
|
36
37
|
}
|
37
38
|
export declare const UserCommitmentSchema: z.ZodObject<{
|
38
39
|
userAccount: z.ZodString;
|
@@ -45,6 +46,7 @@ export declare const UserCommitmentSchema: z.ZodObject<{
|
|
45
46
|
completedAt: z.ZodNumber;
|
46
47
|
requestedAt: z.ZodNumber;
|
47
48
|
processed: z.ZodBoolean;
|
49
|
+
batched: z.ZodBoolean;
|
48
50
|
}, "strip", z.ZodTypeAny, {
|
49
51
|
id: string;
|
50
52
|
userAccount: string;
|
@@ -56,6 +58,7 @@ export declare const UserCommitmentSchema: z.ZodObject<{
|
|
56
58
|
completedAt: number;
|
57
59
|
userSignature: number[];
|
58
60
|
processed: boolean;
|
61
|
+
batched: boolean;
|
59
62
|
}, {
|
60
63
|
id: string;
|
61
64
|
userAccount: string;
|
@@ -67,6 +70,7 @@ export declare const UserCommitmentSchema: z.ZodObject<{
|
|
67
70
|
completedAt: number;
|
68
71
|
userSignature: number[];
|
69
72
|
processed: boolean;
|
73
|
+
batched: boolean;
|
70
74
|
}>;
|
71
75
|
export interface SolutionRecord extends CaptchaSolution {
|
72
76
|
datasetId: string;
|
@@ -81,26 +85,26 @@ export interface Tables {
|
|
81
85
|
pending: typeof Model<PendingCaptchaRequest>;
|
82
86
|
scheduler: typeof Model<ScheduledTaskRecord>;
|
83
87
|
}
|
84
|
-
export declare const CaptchaRecordSchema: Schema<Captcha, Model<Captcha, any, any, any, import("mongoose").Document<unknown, any, Captcha> &
|
88
|
+
export declare const CaptchaRecordSchema: Schema<Captcha, Model<Captcha, any, any, any, import("mongoose").Document<unknown, any, Captcha> & Captcha & {
|
85
89
|
_id: import("mongoose").Types.ObjectId;
|
86
|
-
},
|
90
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Captcha, import("mongoose").Document<unknown, {}, Captcha> & Captcha & {
|
87
91
|
_id: import("mongoose").Types.ObjectId;
|
88
|
-
}
|
89
|
-
export declare const UserCommitmentRecordSchema: Schema<UserCommitmentRecord, Model<UserCommitmentRecord, any, any, any, import("mongoose").Document<unknown, any, UserCommitmentRecord> &
|
92
|
+
}>;
|
93
|
+
export declare const UserCommitmentRecordSchema: Schema<UserCommitmentRecord, Model<UserCommitmentRecord, any, any, any, import("mongoose").Document<unknown, any, UserCommitmentRecord> & UserCommitmentRecord & {
|
90
94
|
_id: import("mongoose").Types.ObjectId;
|
91
|
-
},
|
95
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, UserCommitmentRecord, import("mongoose").Document<unknown, {}, UserCommitmentRecord> & UserCommitmentRecord & {
|
92
96
|
_id: import("mongoose").Types.ObjectId;
|
93
|
-
}
|
94
|
-
export declare const DatasetRecordSchema: Schema<DatasetWithIds, Model<DatasetWithIds, any, any, any, import("mongoose").Document<unknown, any, DatasetWithIds> &
|
97
|
+
}>;
|
98
|
+
export declare const DatasetRecordSchema: Schema<DatasetWithIds, Model<DatasetWithIds, any, any, any, import("mongoose").Document<unknown, any, DatasetWithIds> & DatasetWithIds & {
|
95
99
|
_id: import("mongoose").Types.ObjectId;
|
96
|
-
},
|
100
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DatasetWithIds, import("mongoose").Document<unknown, {}, DatasetWithIds> & DatasetWithIds & {
|
97
101
|
_id: import("mongoose").Types.ObjectId;
|
98
|
-
}
|
99
|
-
export declare const SolutionRecordSchema: Schema<SolutionRecord, Model<SolutionRecord, any, any, any, import("mongoose").Document<unknown, any, SolutionRecord> &
|
102
|
+
}>;
|
103
|
+
export declare const SolutionRecordSchema: Schema<SolutionRecord, Model<SolutionRecord, any, any, any, import("mongoose").Document<unknown, any, SolutionRecord> & SolutionRecord & {
|
100
104
|
_id: import("mongoose").Types.ObjectId;
|
101
|
-
},
|
105
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SolutionRecord, import("mongoose").Document<unknown, {}, SolutionRecord> & SolutionRecord & {
|
102
106
|
_id: import("mongoose").Types.ObjectId;
|
103
|
-
}
|
107
|
+
}>;
|
104
108
|
export declare const UserSolutionSchema: z.ZodObject<{
|
105
109
|
captchaId: z.ZodString;
|
106
110
|
captchaContentId: z.ZodString;
|
@@ -145,7 +149,7 @@ export declare const UserSolutionRecordSchema: Schema<{
|
|
145
149
|
captchaContentId: string;
|
146
150
|
solution: string[];
|
147
151
|
salt: string;
|
148
|
-
}> &
|
152
|
+
}> & {
|
149
153
|
processed: boolean;
|
150
154
|
commitmentId: string;
|
151
155
|
captchaId: string;
|
@@ -154,30 +158,30 @@ export declare const UserSolutionRecordSchema: Schema<{
|
|
154
158
|
salt: string;
|
155
159
|
} & {
|
156
160
|
_id: import("mongoose").Types.ObjectId;
|
157
|
-
},
|
161
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
158
162
|
processed: boolean;
|
159
163
|
commitmentId: string;
|
160
164
|
captchaId: string;
|
161
165
|
captchaContentId: string;
|
162
166
|
solution: string[];
|
163
167
|
salt: string;
|
164
|
-
}, import("mongoose").Document<unknown, {},
|
168
|
+
}, import("mongoose").Document<unknown, {}, {
|
165
169
|
processed: boolean;
|
166
170
|
commitmentId: string;
|
167
171
|
captchaId: string;
|
168
172
|
captchaContentId: string;
|
169
173
|
solution: string[];
|
170
174
|
salt: string;
|
171
|
-
}
|
175
|
+
}> & {
|
172
176
|
processed: boolean;
|
173
177
|
commitmentId: string;
|
174
178
|
captchaId: string;
|
175
179
|
captchaContentId: string;
|
176
180
|
solution: string[];
|
177
181
|
salt: string;
|
178
|
-
}
|
182
|
+
} & {
|
179
183
|
_id: import("mongoose").Types.ObjectId;
|
180
|
-
}
|
184
|
+
}>;
|
181
185
|
export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
182
186
|
id: z.ZodString;
|
183
187
|
userAccount: z.ZodString;
|
@@ -189,6 +193,7 @@ export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
|
189
193
|
completedAt: z.ZodNumber;
|
190
194
|
userSignature: z.ZodArray<z.ZodNumber, "many">;
|
191
195
|
processed: z.ZodBoolean;
|
196
|
+
batched: z.ZodBoolean;
|
192
197
|
captchas: z.ZodArray<z.ZodObject<{
|
193
198
|
captchaId: z.ZodString;
|
194
199
|
captchaContentId: z.ZodString;
|
@@ -222,6 +227,7 @@ export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
|
222
227
|
completedAt: number;
|
223
228
|
userSignature: number[];
|
224
229
|
processed: boolean;
|
230
|
+
batched: boolean;
|
225
231
|
captchas: {
|
226
232
|
processed: boolean;
|
227
233
|
commitmentId: string;
|
@@ -241,6 +247,7 @@ export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
|
241
247
|
completedAt: number;
|
242
248
|
userSignature: number[];
|
243
249
|
processed: boolean;
|
250
|
+
batched: boolean;
|
244
251
|
captchas: {
|
245
252
|
processed: boolean;
|
246
253
|
commitmentId: string;
|
@@ -251,11 +258,11 @@ export declare const UserCommitmentWithSolutionsSchema: z.ZodObject<{
|
|
251
258
|
}[];
|
252
259
|
}>;
|
253
260
|
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> &
|
261
|
+
export declare const PendingRecordSchema: Schema<PendingCaptchaRequest, Model<PendingCaptchaRequest, any, any, any, import("mongoose").Document<unknown, any, PendingCaptchaRequest> & PendingCaptchaRequest & {
|
255
262
|
_id: import("mongoose").Types.ObjectId;
|
256
|
-
},
|
263
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PendingCaptchaRequest, import("mongoose").Document<unknown, {}, PendingCaptchaRequest> & PendingCaptchaRequest & {
|
257
264
|
_id: import("mongoose").Types.ObjectId;
|
258
|
-
}
|
265
|
+
}>;
|
259
266
|
export declare const ScheduledTaskSchema: z.ZodObject<{
|
260
267
|
taskId: z.ZodString;
|
261
268
|
processName: z.ZodNativeEnum<typeof ScheduledTaskNames>;
|
@@ -318,7 +325,7 @@ export declare const ScheduledTaskRecordSchema: Schema<{
|
|
318
325
|
data?: any;
|
319
326
|
error?: any;
|
320
327
|
} | undefined;
|
321
|
-
}> &
|
328
|
+
}> & {
|
322
329
|
status: ScheduledTaskStatus;
|
323
330
|
taskId: string;
|
324
331
|
processName: ScheduledTaskNames;
|
@@ -329,7 +336,7 @@ export declare const ScheduledTaskRecordSchema: Schema<{
|
|
329
336
|
} | undefined;
|
330
337
|
} & {
|
331
338
|
_id: import("mongoose").Types.ObjectId;
|
332
|
-
},
|
339
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
333
340
|
status: ScheduledTaskStatus;
|
334
341
|
taskId: string;
|
335
342
|
processName: ScheduledTaskNames;
|
@@ -338,7 +345,7 @@ export declare const ScheduledTaskRecordSchema: Schema<{
|
|
338
345
|
data?: any;
|
339
346
|
error?: any;
|
340
347
|
} | undefined;
|
341
|
-
}, import("mongoose").Document<unknown, {},
|
348
|
+
}, import("mongoose").Document<unknown, {}, {
|
342
349
|
status: ScheduledTaskStatus;
|
343
350
|
taskId: string;
|
344
351
|
processName: ScheduledTaskNames;
|
@@ -347,7 +354,7 @@ export declare const ScheduledTaskRecordSchema: Schema<{
|
|
347
354
|
data?: any;
|
348
355
|
error?: any;
|
349
356
|
} | undefined;
|
350
|
-
}
|
357
|
+
}> & {
|
351
358
|
status: ScheduledTaskStatus;
|
352
359
|
taskId: string;
|
353
360
|
processName: ScheduledTaskNames;
|
@@ -356,9 +363,9 @@ export declare const ScheduledTaskRecordSchema: Schema<{
|
|
356
363
|
data?: any;
|
357
364
|
error?: any;
|
358
365
|
} | undefined;
|
359
|
-
}
|
366
|
+
} & {
|
360
367
|
_id: import("mongoose").Types.ObjectId;
|
361
|
-
}
|
368
|
+
}>;
|
362
369
|
export interface Database {
|
363
370
|
url: string;
|
364
371
|
tables?: Tables;
|
@@ -390,10 +397,14 @@ export interface Database {
|
|
390
397
|
removeProcessedDappUserCommitments(commitmentIds: ArgumentTypes.Hash[]): Promise<DeleteResult | undefined>;
|
391
398
|
getProcessedDappUserSolutions(): Promise<UserSolutionRecord[]>;
|
392
399
|
getProcessedDappUserCommitments(): Promise<UserCommitmentRecord[]>;
|
393
|
-
|
394
|
-
|
400
|
+
getUnbatchedDappUserCommitments(): Promise<UserCommitmentRecord[]>;
|
401
|
+
getBatchedDappUserCommitments(): Promise<UserCommitmentRecord[]>;
|
402
|
+
flagProcessedDappUserSolutions(captchaIds: ArgumentTypes.Hash[]): Promise<void>;
|
403
|
+
flagProcessedDappUserCommitments(commitmentIds: ArgumentTypes.Hash[]): Promise<void>;
|
404
|
+
flagBatchedDappUserCommitments(commitmentIds: ArgumentTypes.Hash[]): Promise<void>;
|
395
405
|
getLastBatchCommitTime(): Promise<Date>;
|
396
|
-
|
406
|
+
getLastScheduledTaskStatus(task: ScheduledTaskNames, status?: ScheduledTaskStatus): Promise<ScheduledTaskRecord | undefined>;
|
407
|
+
getScheduledTaskStatus(taskId: string, status: ScheduledTaskStatus): Promise<ScheduledTaskRecord | undefined>;
|
397
408
|
storeScheduledTaskStatus(taskId: `0x${string}`, task: ScheduledTaskNames, status: ScheduledTaskStatus, result?: ScheduledTaskResult): Promise<void>;
|
398
409
|
}
|
399
410
|
//# sourceMappingURL=mongo.d.ts.map
|
@@ -1 +1 @@
|
|
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,EAA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,MAAM,CAAC,EAAE,mBAAmB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAA;CACnB"}
|
package/dist/types/mongo.js
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(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.
|
1
|
+
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
5
2
|
//
|
6
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
7
4
|
// you may not use this file except in compliance with the License.
|
@@ -14,24 +11,25 @@ exports.ScheduledTaskRecordSchema = exports.ScheduledTaskSchema = exports.Pendin
|
|
14
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
12
|
// See the License for the specific language governing permissions and
|
16
13
|
// limitations under the License.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
userAccount:
|
24
|
-
dappContract:
|
25
|
-
datasetId:
|
26
|
-
providerAccount:
|
27
|
-
id:
|
28
|
-
status:
|
29
|
-
userSignature:
|
30
|
-
completedAt:
|
31
|
-
requestedAt:
|
32
|
-
processed:
|
14
|
+
import { ArgumentTypes } from '@prosopo/types';
|
15
|
+
import { CaptchaSolutionSchema, } from '@prosopo/types';
|
16
|
+
import { Schema } from 'mongoose';
|
17
|
+
import { ScheduledTaskNames, ScheduledTaskStatus } from '@prosopo/types';
|
18
|
+
import { z } from 'zod';
|
19
|
+
export const UserCommitmentSchema = z.object({
|
20
|
+
userAccount: z.string(),
|
21
|
+
dappContract: z.string(),
|
22
|
+
datasetId: z.string(),
|
23
|
+
providerAccount: z.string(),
|
24
|
+
id: z.string(),
|
25
|
+
status: z.nativeEnum(ArgumentTypes.CaptchaStatus),
|
26
|
+
userSignature: z.array(z.number()),
|
27
|
+
completedAt: z.number(),
|
28
|
+
requestedAt: z.number(),
|
29
|
+
processed: z.boolean(),
|
30
|
+
batched: z.boolean(),
|
33
31
|
});
|
34
|
-
|
32
|
+
export const CaptchaRecordSchema = new Schema({
|
35
33
|
captchaId: { type: String, required: true },
|
36
34
|
captchaContentId: { type: String, required: true },
|
37
35
|
assetURI: { type: String, required: false },
|
@@ -42,7 +40,7 @@ exports.CaptchaRecordSchema = new mongoose_1.Schema({
|
|
42
40
|
salt: { type: String, required: true },
|
43
41
|
items: {
|
44
42
|
type: [
|
45
|
-
new
|
43
|
+
new Schema({
|
46
44
|
hash: { type: String, required: true },
|
47
45
|
data: { type: String, required: true },
|
48
46
|
type: { type: String, required: true },
|
@@ -51,7 +49,7 @@ exports.CaptchaRecordSchema = new mongoose_1.Schema({
|
|
51
49
|
required: true,
|
52
50
|
},
|
53
51
|
});
|
54
|
-
|
52
|
+
export const UserCommitmentRecordSchema = new Schema({
|
55
53
|
userAccount: { type: String, required: true },
|
56
54
|
dappContract: { type: String, required: true },
|
57
55
|
providerAccount: { type: String, required: true },
|
@@ -62,15 +60,16 @@ exports.UserCommitmentRecordSchema = new mongoose_1.Schema({
|
|
62
60
|
completedAt: { type: Number, required: true },
|
63
61
|
userSignature: { type: [Number], required: true },
|
64
62
|
processed: { type: Boolean, required: true },
|
63
|
+
batched: { type: Boolean, required: true },
|
65
64
|
});
|
66
|
-
|
65
|
+
export const DatasetRecordSchema = new Schema({
|
67
66
|
contentTree: { type: [[String]], required: true },
|
68
67
|
datasetContentId: { type: String, required: true },
|
69
68
|
datasetId: { type: String, required: true },
|
70
69
|
format: { type: String, required: true },
|
71
70
|
solutionTree: { type: [[String]], required: true },
|
72
71
|
});
|
73
|
-
|
72
|
+
export const SolutionRecordSchema = new Schema({
|
74
73
|
captchaId: { type: String, required: true },
|
75
74
|
captchaContentId: { type: String, required: true },
|
76
75
|
datasetId: { type: String, required: true },
|
@@ -78,11 +77,11 @@ exports.SolutionRecordSchema = new mongoose_1.Schema({
|
|
78
77
|
salt: { type: String, required: true },
|
79
78
|
solution: { type: [String], required: true },
|
80
79
|
});
|
81
|
-
|
82
|
-
processed:
|
83
|
-
commitmentId:
|
80
|
+
export const UserSolutionSchema = CaptchaSolutionSchema.extend({
|
81
|
+
processed: z.boolean(),
|
82
|
+
commitmentId: z.string(),
|
84
83
|
});
|
85
|
-
|
84
|
+
export const UserSolutionRecordSchema = new Schema({
|
86
85
|
captchaId: { type: String, required: true },
|
87
86
|
captchaContentId: { type: String, required: true },
|
88
87
|
salt: { type: String, required: true },
|
@@ -90,10 +89,10 @@ exports.UserSolutionRecordSchema = new mongoose_1.Schema({
|
|
90
89
|
processed: { type: Boolean, required: true },
|
91
90
|
commitmentId: { type: String, required: true },
|
92
91
|
}, { _id: false });
|
93
|
-
|
94
|
-
captchas:
|
92
|
+
export const UserCommitmentWithSolutionsSchema = UserCommitmentSchema.extend({
|
93
|
+
captchas: z.array(UserSolutionSchema),
|
95
94
|
});
|
96
|
-
|
95
|
+
export const PendingRecordSchema = new Schema({
|
97
96
|
accountId: { type: String, required: true },
|
98
97
|
pending: { type: Boolean, required: true },
|
99
98
|
salt: { type: String, required: true },
|
@@ -101,25 +100,25 @@ exports.PendingRecordSchema = new mongoose_1.Schema({
|
|
101
100
|
deadlineTimestamp: { type: Number, required: true },
|
102
101
|
requestedAtBlock: { type: Number, required: true },
|
103
102
|
});
|
104
|
-
|
105
|
-
taskId:
|
106
|
-
processName:
|
107
|
-
datetime:
|
108
|
-
status:
|
109
|
-
result:
|
103
|
+
export const ScheduledTaskSchema = z.object({
|
104
|
+
taskId: z.string(),
|
105
|
+
processName: z.nativeEnum(ScheduledTaskNames),
|
106
|
+
datetime: z.date(),
|
107
|
+
status: z.nativeEnum(ScheduledTaskStatus),
|
108
|
+
result: z
|
110
109
|
.object({
|
111
|
-
data:
|
112
|
-
error:
|
110
|
+
data: z.any().optional(),
|
111
|
+
error: z.any().optional(),
|
113
112
|
})
|
114
113
|
.optional(),
|
115
114
|
});
|
116
|
-
|
115
|
+
export const ScheduledTaskRecordSchema = new Schema({
|
117
116
|
taskId: { type: String, required: true },
|
118
|
-
processName: { type: String, enum:
|
117
|
+
processName: { type: String, enum: ScheduledTaskNames, required: true },
|
119
118
|
datetime: { type: Date, required: true },
|
120
|
-
status: { type: String, enum:
|
119
|
+
status: { type: String, enum: ScheduledTaskStatus, require: true },
|
121
120
|
result: {
|
122
|
-
type: new
|
121
|
+
type: new Schema({
|
123
122
|
error: { type: String, required: false },
|
124
123
|
data: { type: Object, required: false },
|
125
124
|
}, { _id: false }),
|
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,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,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAGH,qBAAqB,GAMxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAqB,MAAM,EAAE,MAAM,UAAU,CAAA;AAIpD,OAAO,EAAE,kBAAkB,EAAuB,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAC7F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,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|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
"name": "@prosopo/types-database",
|
3
|
+
"version": "0.1.17",
|
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.17",
|
26
|
+
"@prosopo/types": "^0.1.17",
|
27
|
+
"mongodb": "5.8.0",
|
28
|
+
"mongoose": "^7.3.3",
|
29
|
+
"zod": "^3.17.9"
|
30
|
+
},
|
31
|
+
"devDependencies": {
|
32
|
+
"typescript": "^4.9.5"
|
33
|
+
},
|
34
|
+
"sideEffects": false
|
35
35
|
}
|