@cloudkata/common 1.0.18 → 1.0.19
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.
|
@@ -13,6 +13,16 @@ export declare const ProblemExampleSchema: z.ZodObject<{
|
|
|
13
13
|
output: string;
|
|
14
14
|
explanation?: string | undefined;
|
|
15
15
|
}>;
|
|
16
|
+
export declare const TestCaseSchema: z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
script: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
name: string;
|
|
21
|
+
script: string;
|
|
22
|
+
}, {
|
|
23
|
+
name: string;
|
|
24
|
+
script: string;
|
|
25
|
+
}>;
|
|
16
26
|
export declare const CreateProblemSchema: z.ZodObject<{
|
|
17
27
|
title: z.ZodString;
|
|
18
28
|
description: z.ZodString;
|
|
@@ -37,6 +47,16 @@ export declare const CreateProblemSchema: z.ZodObject<{
|
|
|
37
47
|
companies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
38
48
|
hints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
49
|
starterCode: z.ZodString;
|
|
50
|
+
testCases: z.ZodArray<z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
script: z.ZodString;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
script: string;
|
|
56
|
+
}, {
|
|
57
|
+
name: string;
|
|
58
|
+
script: string;
|
|
59
|
+
}>, "many">;
|
|
40
60
|
}, "strip", z.ZodTypeAny, {
|
|
41
61
|
type: ProblemType;
|
|
42
62
|
title: string;
|
|
@@ -50,6 +70,10 @@ export declare const CreateProblemSchema: z.ZodObject<{
|
|
|
50
70
|
tags: string[];
|
|
51
71
|
companies: string[];
|
|
52
72
|
starterCode: string;
|
|
73
|
+
testCases: {
|
|
74
|
+
name: string;
|
|
75
|
+
script: string;
|
|
76
|
+
}[];
|
|
53
77
|
constraints?: string[] | undefined;
|
|
54
78
|
followUp?: string | undefined;
|
|
55
79
|
hints?: string[] | undefined;
|
|
@@ -64,6 +88,10 @@ export declare const CreateProblemSchema: z.ZodObject<{
|
|
|
64
88
|
}[];
|
|
65
89
|
difficulty: Difficulty;
|
|
66
90
|
starterCode: string;
|
|
91
|
+
testCases: {
|
|
92
|
+
name: string;
|
|
93
|
+
script: string;
|
|
94
|
+
}[];
|
|
67
95
|
constraints?: string[] | undefined;
|
|
68
96
|
followUp?: string | undefined;
|
|
69
97
|
tags?: string[] | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateProblemSchema = exports.ProblemExampleSchema = void 0;
|
|
3
|
+
exports.CreateProblemSchema = exports.TestCaseSchema = exports.ProblemExampleSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enums_1 = require("../../enums");
|
|
6
6
|
exports.ProblemExampleSchema = zod_1.z.object({
|
|
@@ -8,6 +8,10 @@ exports.ProblemExampleSchema = zod_1.z.object({
|
|
|
8
8
|
output: zod_1.z.string(),
|
|
9
9
|
explanation: zod_1.z.string().optional(),
|
|
10
10
|
});
|
|
11
|
+
exports.TestCaseSchema = zod_1.z.object({
|
|
12
|
+
name: zod_1.z.string(),
|
|
13
|
+
script: zod_1.z.string(),
|
|
14
|
+
});
|
|
11
15
|
exports.CreateProblemSchema = zod_1.z.object({
|
|
12
16
|
title: zod_1.z.string().min(5).max(100),
|
|
13
17
|
description: zod_1.z.string().min(20),
|
|
@@ -20,5 +24,6 @@ exports.CreateProblemSchema = zod_1.z.object({
|
|
|
20
24
|
companies: zod_1.z.array(zod_1.z.string()).default([]),
|
|
21
25
|
hints: zod_1.z.array(zod_1.z.string()).optional(),
|
|
22
26
|
starterCode: zod_1.z.string().min(1),
|
|
27
|
+
testCases: zod_1.z.array(exports.TestCaseSchema).min(1),
|
|
23
28
|
});
|
|
24
29
|
//# sourceMappingURL=create-problem.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-problem.dto.js","sourceRoot":"","sources":["../../../src/dtos/problem/create-problem.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAAsD;AAEzC,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IAC/B,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9C,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,kBAAU,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,mBAAW,CAAC;IAC/B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1C,KAAK,EAAE,OAAC,CAA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