@cloudkata/common 1.0.14 → 1.0.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.
Files changed (29) hide show
  1. package/dist/dtos/problem/create-problem.dto.d.ts +52 -7
  2. package/dist/dtos/problem/create-problem.dto.js +17 -11
  3. package/dist/dtos/problem/create-problem.dto.js.map +1 -1
  4. package/dist/dtos/problem/index.d.ts +1 -0
  5. package/dist/dtos/problem/index.js +1 -0
  6. package/dist/dtos/problem/index.js.map +1 -1
  7. package/dist/dtos/problem/problem-response.dto.d.ts +45 -4
  8. package/dist/dtos/problem/problem-response.dto.js +12 -4
  9. package/dist/dtos/problem/problem-response.dto.js.map +1 -1
  10. package/dist/dtos/problem/problem-set-response.dto.d.ts +21 -0
  11. package/dist/dtos/problem/problem-set-response.dto.js +12 -0
  12. package/dist/dtos/problem/problem-set-response.dto.js.map +1 -0
  13. package/dist/interfaces/index.d.ts +4 -0
  14. package/dist/interfaces/index.js +4 -0
  15. package/dist/interfaces/index.js.map +1 -1
  16. package/dist/interfaces/problem-example.interface.d.ts +5 -0
  17. package/dist/interfaces/problem-example.interface.js +3 -0
  18. package/dist/interfaces/problem-example.interface.js.map +1 -0
  19. package/dist/interfaces/problem-grading-spec.interface.d.ts +5 -0
  20. package/dist/interfaces/problem-grading-spec.interface.js +3 -0
  21. package/dist/interfaces/problem-grading-spec.interface.js.map +1 -0
  22. package/dist/interfaces/problem-set.interface.d.ts +7 -0
  23. package/dist/interfaces/problem-set.interface.js +3 -0
  24. package/dist/interfaces/problem-set.interface.js.map +1 -0
  25. package/dist/interfaces/problem.interface.d.ts +10 -3
  26. package/dist/interfaces/test-case.interface.d.ts +4 -0
  27. package/dist/interfaces/test-case.interface.js +3 -0
  28. package/dist/interfaces/test-case.interface.js.map +1 -0
  29. package/package.json +1 -1
@@ -1,28 +1,73 @@
1
1
  import { z } from 'zod';
2
- import { Difficulty, ProblemType } from '../../enums/index.js';
2
+ import { Difficulty, ProblemType } from '../../enums';
3
+ export declare const ProblemExampleSchema: z.ZodObject<{
4
+ input: z.ZodString;
5
+ output: z.ZodString;
6
+ explanation: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ input: string;
9
+ output: string;
10
+ explanation?: string | undefined;
11
+ }, {
12
+ input: string;
13
+ output: string;
14
+ explanation?: string | undefined;
15
+ }>;
3
16
  export declare const CreateProblemSchema: z.ZodObject<{
4
17
  title: z.ZodString;
5
18
  description: z.ZodString;
19
+ examples: z.ZodArray<z.ZodObject<{
20
+ input: z.ZodString;
21
+ output: z.ZodString;
22
+ explanation: z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ input: string;
25
+ output: string;
26
+ explanation?: string | undefined;
27
+ }, {
28
+ input: string;
29
+ output: string;
30
+ explanation?: string | undefined;
31
+ }>, "many">;
32
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
33
+ followUp: z.ZodOptional<z.ZodString>;
6
34
  difficulty: z.ZodNativeEnum<typeof Difficulty>;
7
35
  type: z.ZodNativeEnum<typeof ProblemType>;
8
- category: z.ZodString;
36
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
37
+ companies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
9
38
  hints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
- solution: z.ZodString;
39
+ starterCode: z.ZodString;
11
40
  }, "strip", z.ZodTypeAny, {
12
41
  type: ProblemType;
13
42
  title: string;
14
43
  description: string;
44
+ examples: {
45
+ input: string;
46
+ output: string;
47
+ explanation?: string | undefined;
48
+ }[];
15
49
  difficulty: Difficulty;
16
- category: string;
17
- solution: string;
50
+ tags: string[];
51
+ companies: string[];
52
+ starterCode: string;
53
+ constraints?: string[] | undefined;
54
+ followUp?: string | undefined;
18
55
  hints?: string[] | undefined;
19
56
  }, {
20
57
  type: ProblemType;
21
58
  title: string;
22
59
  description: string;
60
+ examples: {
61
+ input: string;
62
+ output: string;
63
+ explanation?: string | undefined;
64
+ }[];
23
65
  difficulty: Difficulty;
24
- category: string;
25
- solution: string;
66
+ starterCode: string;
67
+ constraints?: string[] | undefined;
68
+ followUp?: string | undefined;
69
+ tags?: string[] | undefined;
70
+ companies?: string[] | undefined;
26
71
  hints?: string[] | undefined;
27
72
  }>;
28
73
  export type CreateProblemDto = z.infer<typeof CreateProblemSchema>;
@@ -1,18 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateProblemSchema = void 0;
3
+ exports.CreateProblemSchema = exports.ProblemExampleSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const _enums_1 = require("../../enums/index.js");
5
+ const enums_1 = require("../../enums");
6
+ exports.ProblemExampleSchema = zod_1.z.object({
7
+ input: zod_1.z.string(),
8
+ output: zod_1.z.string(),
9
+ explanation: zod_1.z.string().optional(),
10
+ });
6
11
  exports.CreateProblemSchema = zod_1.z.object({
7
- title: zod_1.z
8
- .string()
9
- .min(5, 'Title must be at least 5 characters')
10
- .max(100, 'Title must be at most 100 characters'),
11
- description: zod_1.z.string().min(20, 'Description must be at least 20 characters'),
12
- difficulty: zod_1.z.nativeEnum(_enums_1.Difficulty),
13
- type: zod_1.z.nativeEnum(_enums_1.ProblemType),
14
- category: zod_1.z.string().min(1, 'Category is required'),
12
+ title: zod_1.z.string().min(5).max(100),
13
+ description: zod_1.z.string().min(20),
14
+ examples: zod_1.z.array(exports.ProblemExampleSchema).min(1),
15
+ constraints: zod_1.z.array(zod_1.z.string()).optional(),
16
+ followUp: zod_1.z.string().optional(),
17
+ difficulty: zod_1.z.nativeEnum(enums_1.Difficulty),
18
+ type: zod_1.z.nativeEnum(enums_1.ProblemType),
19
+ tags: zod_1.z.array(zod_1.z.string()).default([]),
20
+ companies: zod_1.z.array(zod_1.z.string()).default([]),
15
21
  hints: zod_1.z.array(zod_1.z.string()).optional(),
16
- solution: zod_1.z.string().min(1, 'Solution is required'),
22
+ starterCode: zod_1.z.string().min(1),
17
23
  });
18
24
  //# 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,mCAAiD;AAEpC,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,qCAAqC,CAAC;SAC7C,GAAG,CAAC,GAAG,EAAE,sCAAsC,CAAC;IACnD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,4CAA4C,CAAC;IAC7E,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,mBAAU,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAW,CAAC;IAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;IACnD,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;CACpD,CAAC,CAAC"}
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,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/B,CAAC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './create-problem.dto';
2
2
  export * from './problem-response.dto';
3
+ export * from './problem-set-response.dto';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-problem.dto"), exports);
18
18
  __exportStar(require("./problem-response.dto"), exports);
19
+ __exportStar(require("./problem-set-response.dto"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dtos/problem/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dtos/problem/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,yDAAuC;AACvC,6DAA2C"}
@@ -1,13 +1,32 @@
1
1
  import { z } from 'zod';
2
- import { Difficulty, ProblemType } from '../../enums/index.js';
2
+ import { Difficulty, ProblemType } from '../../enums';
3
3
  export declare const ProblemResponseSchema: z.ZodObject<{
4
4
  id: z.ZodString;
5
+ slug: z.ZodString;
5
6
  title: z.ZodString;
6
7
  description: z.ZodString;
8
+ examples: z.ZodArray<z.ZodObject<{
9
+ input: z.ZodString;
10
+ output: z.ZodString;
11
+ explanation: z.ZodOptional<z.ZodString>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ input: string;
14
+ output: string;
15
+ explanation?: string | undefined;
16
+ }, {
17
+ input: string;
18
+ output: string;
19
+ explanation?: string | undefined;
20
+ }>, "many">;
21
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
22
+ followUp: z.ZodOptional<z.ZodString>;
7
23
  difficulty: z.ZodNativeEnum<typeof Difficulty>;
8
24
  type: z.ZodNativeEnum<typeof ProblemType>;
9
- category: z.ZodString;
25
+ tags: z.ZodArray<z.ZodString, "many">;
26
+ companies: z.ZodArray<z.ZodString, "many">;
10
27
  hints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
28
+ starterCode: z.ZodString;
29
+ acceptanceRate: z.ZodNumber;
11
30
  createdAt: z.ZodDate;
12
31
  updatedAt: z.ZodDate;
13
32
  }, "strip", z.ZodTypeAny, {
@@ -17,8 +36,19 @@ export declare const ProblemResponseSchema: z.ZodObject<{
17
36
  updatedAt: Date;
18
37
  title: string;
19
38
  description: string;
39
+ examples: {
40
+ input: string;
41
+ output: string;
42
+ explanation?: string | undefined;
43
+ }[];
20
44
  difficulty: Difficulty;
21
- category: string;
45
+ tags: string[];
46
+ companies: string[];
47
+ starterCode: string;
48
+ slug: string;
49
+ acceptanceRate: number;
50
+ constraints?: string[] | undefined;
51
+ followUp?: string | undefined;
22
52
  hints?: string[] | undefined;
23
53
  }, {
24
54
  type: ProblemType;
@@ -27,8 +57,19 @@ export declare const ProblemResponseSchema: z.ZodObject<{
27
57
  updatedAt: Date;
28
58
  title: string;
29
59
  description: string;
60
+ examples: {
61
+ input: string;
62
+ output: string;
63
+ explanation?: string | undefined;
64
+ }[];
30
65
  difficulty: Difficulty;
31
- category: string;
66
+ tags: string[];
67
+ companies: string[];
68
+ starterCode: string;
69
+ slug: string;
70
+ acceptanceRate: number;
71
+ constraints?: string[] | undefined;
72
+ followUp?: string | undefined;
32
73
  hints?: string[] | undefined;
33
74
  }>;
34
75
  export type ProblemResponseDto = z.infer<typeof ProblemResponseSchema>;
@@ -2,15 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProblemResponseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const _enums_1 = require("../../enums/index.js");
5
+ const enums_1 = require("../../enums");
6
+ const create_problem_dto_1 = require("./create-problem.dto");
6
7
  exports.ProblemResponseSchema = zod_1.z.object({
7
8
  id: zod_1.z.string().uuid(),
9
+ slug: zod_1.z.string(),
8
10
  title: zod_1.z.string(),
9
11
  description: zod_1.z.string(),
10
- difficulty: zod_1.z.nativeEnum(_enums_1.Difficulty),
11
- type: zod_1.z.nativeEnum(_enums_1.ProblemType),
12
- category: zod_1.z.string(),
12
+ examples: zod_1.z.array(create_problem_dto_1.ProblemExampleSchema),
13
+ constraints: zod_1.z.array(zod_1.z.string()).optional(),
14
+ followUp: zod_1.z.string().optional(),
15
+ difficulty: zod_1.z.nativeEnum(enums_1.Difficulty),
16
+ type: zod_1.z.nativeEnum(enums_1.ProblemType),
17
+ tags: zod_1.z.array(zod_1.z.string()),
18
+ companies: zod_1.z.array(zod_1.z.string()),
13
19
  hints: zod_1.z.array(zod_1.z.string()).optional(),
20
+ starterCode: zod_1.z.string(),
21
+ acceptanceRate: zod_1.z.number().min(0).max(100),
14
22
  createdAt: zod_1.z.date(),
15
23
  updatedAt: zod_1.z.date(),
16
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"problem-response.dto.js","sourceRoot":"","sources":["../../../src/dtos/problem/problem-response.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAAiD;AAEpC,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,mBAAU,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAW,CAAC;IAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE;CACpB,CAAC,CAAC"}
1
+ {"version":3,"file":"problem-response.dto.js","sourceRoot":"","sources":["../../../src/dtos/problem/problem-response.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAAsD;AACtD,6DAA4D;AAE/C,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,yCAAoB,CAAC;IACvC,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;IACzB,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1C,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE;CACpB,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const ProblemSetResponseSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ slug: z.ZodString;
5
+ title: z.ZodString;
6
+ description: z.ZodString;
7
+ problemIds: z.ZodArray<z.ZodString, "many">;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: string;
10
+ title: string;
11
+ description: string;
12
+ slug: string;
13
+ problemIds: string[];
14
+ }, {
15
+ id: string;
16
+ title: string;
17
+ description: string;
18
+ slug: string;
19
+ problemIds: string[];
20
+ }>;
21
+ export type ProblemSetResponseDto = z.infer<typeof ProblemSetResponseSchema>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProblemSetResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ProblemSetResponseSchema = zod_1.z.object({
6
+ id: zod_1.z.string().uuid(),
7
+ slug: zod_1.z.string(),
8
+ title: zod_1.z.string(),
9
+ description: zod_1.z.string(),
10
+ problemIds: zod_1.z.array(zod_1.z.string().uuid()),
11
+ });
12
+ //# sourceMappingURL=problem-set-response.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-set-response.dto.js","sourceRoot":"","sources":["../../../src/dtos/problem/problem-set-response.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;CACvC,CAAC,CAAC"}
@@ -5,3 +5,7 @@ export * from './problem.interface';
5
5
  export * from './submission.interface';
6
6
  export * from './leaderboard.interface';
7
7
  export * from './test-result.interface';
8
+ export * from './problem-example.interface';
9
+ export * from './test-case.interface';
10
+ export * from './problem-grading-spec.interface';
11
+ export * from './problem-set.interface';
@@ -21,4 +21,8 @@ __exportStar(require("./problem.interface"), exports);
21
21
  __exportStar(require("./submission.interface"), exports);
22
22
  __exportStar(require("./leaderboard.interface"), exports);
23
23
  __exportStar(require("./test-result.interface"), exports);
24
+ __exportStar(require("./problem-example.interface"), exports);
25
+ __exportStar(require("./test-case.interface"), exports);
26
+ __exportStar(require("./problem-grading-spec.interface"), exports);
27
+ __exportStar(require("./problem-set.interface"), exports);
24
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,yDAAuC;AACvC,0DAAwC;AACxC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,yDAAuC;AACvC,0DAAwC;AACxC,0DAAwC;AACxC,8DAA4C;AAC5C,wDAAsC;AACtC,mEAAiD;AACjD,0DAAwC"}
@@ -0,0 +1,5 @@
1
+ export interface IProblemExample {
2
+ input: string;
3
+ output: string;
4
+ explanation?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=problem-example.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-example.interface.js","sourceRoot":"","sources":["../../src/interfaces/problem-example.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { IProblem } from './problem.interface';
2
+ import { ITestCase } from './test-case.interface';
3
+ export interface IProblemGradingSpec extends IProblem {
4
+ testCases: ITestCase[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=problem-grading-spec.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-grading-spec.interface.js","sourceRoot":"","sources":["../../src/interfaces/problem-grading-spec.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface IProblemSet {
2
+ id: string;
3
+ slug: string;
4
+ title: string;
5
+ description: string;
6
+ problemIds: string[];
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=problem-set.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-set.interface.js","sourceRoot":"","sources":["../../src/interfaces/problem-set.interface.ts"],"names":[],"mappings":""}
@@ -1,13 +1,20 @@
1
- import { Difficulty, ProblemType } from '../enums/index.js';
1
+ import { Difficulty, ProblemType } from '../enums';
2
+ import { IProblemExample } from './problem-example.interface';
2
3
  export interface IProblem {
3
4
  id: string;
5
+ slug: string;
4
6
  title: string;
5
7
  description: string;
8
+ examples: IProblemExample[];
9
+ constraints?: string[];
10
+ followUp?: string;
6
11
  difficulty: Difficulty;
7
12
  type: ProblemType;
8
- category: string;
13
+ tags: string[];
14
+ companies: string[];
9
15
  hints?: string[];
10
- solution: string;
16
+ starterCode: string;
17
+ acceptanceRate: number;
11
18
  createdAt: Date;
12
19
  updatedAt: Date;
13
20
  }
@@ -0,0 +1,4 @@
1
+ export interface ITestCase {
2
+ name: string;
3
+ script: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=test-case.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-case.interface.js","sourceRoot":"","sources":["../../src/interfaces/test-case.interface.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudkata/common",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Shared contracts, interfaces, DTOs and enums for CloudKata",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",