@cloudkata/common 1.0.16 → 1.0.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/dist/dtos/submission/create-submission.dto.d.ts +3 -3
- package/dist/dtos/submission/create-submission.dto.js +2 -2
- package/dist/dtos/submission/create-submission.dto.js.map +1 -1
- package/dist/dtos/submission/submission-response.dto.d.ts +46 -9
- package/dist/dtos/submission/submission-response.dto.js +11 -4
- package/dist/dtos/submission/submission-response.dto.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const CreateSubmissionSchema: z.ZodObject<{
|
|
3
3
|
problemId: z.ZodString;
|
|
4
|
-
|
|
4
|
+
code: z.ZodString;
|
|
5
5
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
code: string;
|
|
6
7
|
problemId: string;
|
|
7
|
-
answer: string;
|
|
8
8
|
}, {
|
|
9
|
+
code: string;
|
|
9
10
|
problemId: string;
|
|
10
|
-
answer: string;
|
|
11
11
|
}>;
|
|
12
12
|
export type CreateSubmissionDto = z.infer<typeof CreateSubmissionSchema>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreateSubmissionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CreateSubmissionSchema = zod_1.z.object({
|
|
6
|
-
problemId: zod_1.z.string().uuid(
|
|
7
|
-
|
|
6
|
+
problemId: zod_1.z.string().uuid(),
|
|
7
|
+
code: zod_1.z.string().min(1),
|
|
8
8
|
});
|
|
9
9
|
//# sourceMappingURL=create-submission.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-submission.dto.js","sourceRoot":"","sources":["../../../src/dtos/submission/create-submission.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"create-submission.dto.js","sourceRoot":"","sources":["../../../src/dtos/submission/create-submission.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC"}
|
|
@@ -1,27 +1,64 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { SubmissionStatus } from '../../enums';
|
|
3
|
+
export declare const TestResultSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
passed: z.ZodBoolean;
|
|
6
|
+
message: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
passed: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
message?: string | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
passed: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
message?: string | undefined;
|
|
15
|
+
}>;
|
|
2
16
|
export declare const SubmissionResponseSchema: z.ZodObject<{
|
|
3
17
|
id: z.ZodString;
|
|
4
18
|
userId: z.ZodString;
|
|
5
19
|
problemId: z.ZodString;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
20
|
+
code: z.ZodString;
|
|
21
|
+
status: z.ZodNativeEnum<typeof SubmissionStatus>;
|
|
22
|
+
testResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
passed: z.ZodBoolean;
|
|
25
|
+
message: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
passed: boolean;
|
|
28
|
+
name: string;
|
|
29
|
+
message?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
passed: boolean;
|
|
32
|
+
name: string;
|
|
33
|
+
message?: string | undefined;
|
|
34
|
+
}>, "many">>;
|
|
35
|
+
executionTimeMs: z.ZodOptional<z.ZodNumber>;
|
|
9
36
|
submittedAt: z.ZodDate;
|
|
10
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
code: string;
|
|
39
|
+
status: SubmissionStatus;
|
|
11
40
|
id: string;
|
|
12
41
|
problemId: string;
|
|
13
|
-
answer: string;
|
|
14
42
|
userId: string;
|
|
15
|
-
isCorrect: boolean;
|
|
16
43
|
submittedAt: Date;
|
|
17
|
-
|
|
44
|
+
testResults?: {
|
|
45
|
+
passed: boolean;
|
|
46
|
+
name: string;
|
|
47
|
+
message?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
executionTimeMs?: number | undefined;
|
|
18
50
|
}, {
|
|
51
|
+
code: string;
|
|
52
|
+
status: SubmissionStatus;
|
|
19
53
|
id: string;
|
|
20
54
|
problemId: string;
|
|
21
|
-
answer: string;
|
|
22
55
|
userId: string;
|
|
23
|
-
isCorrect: boolean;
|
|
24
56
|
submittedAt: Date;
|
|
25
|
-
|
|
57
|
+
testResults?: {
|
|
58
|
+
passed: boolean;
|
|
59
|
+
name: string;
|
|
60
|
+
message?: string | undefined;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
executionTimeMs?: number | undefined;
|
|
26
63
|
}>;
|
|
27
64
|
export type SubmissionResponseDto = z.infer<typeof SubmissionResponseSchema>;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubmissionResponseSchema = void 0;
|
|
3
|
+
exports.SubmissionResponseSchema = exports.TestResultSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../../enums");
|
|
6
|
+
exports.TestResultSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string(),
|
|
8
|
+
passed: zod_1.z.boolean(),
|
|
9
|
+
message: zod_1.z.string().optional(),
|
|
10
|
+
});
|
|
5
11
|
exports.SubmissionResponseSchema = zod_1.z.object({
|
|
6
12
|
id: zod_1.z.string().uuid(),
|
|
7
13
|
userId: zod_1.z.string().uuid(),
|
|
8
14
|
problemId: zod_1.z.string().uuid(),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
code: zod_1.z.string(),
|
|
16
|
+
status: zod_1.z.nativeEnum(enums_1.SubmissionStatus),
|
|
17
|
+
testResults: zod_1.z.array(exports.TestResultSchema).optional(),
|
|
18
|
+
executionTimeMs: zod_1.z.number().optional(),
|
|
12
19
|
submittedAt: zod_1.z.date(),
|
|
13
20
|
});
|
|
14
21
|
//# sourceMappingURL=submission-response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submission-response.dto.js","sourceRoot":"","sources":["../../../src/dtos/submission/submission-response.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"submission-response.dto.js","sourceRoot":"","sources":["../../../src/dtos/submission/submission-response.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAA+C;AAElC,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACzB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,wBAAgB,CAAC;IACtC,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC,CAAC,QAAQ,EAAE;IACjD,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,WAAW,EAAE,OAAC,CAAC,IAAI,EAAE;CACtB,CAAC,CAAC"}
|