@flantastic/study-time-types 1.0.9 → 1.0.11
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/enum/studyItemStatus.enum.d.ts +6 -0
- package/dist/enum/studyItemStatus.enum.js +10 -0
- package/dist/enum/studyQuestionStatus.enum.d.ts +5 -0
- package/dist/enum/studyQuestionStatus.enum.js +9 -0
- package/dist/index.d.ts +16 -3
- package/dist/index.js +16 -3
- package/dist/response/addStudyItem.response.d.ts +3 -0
- package/dist/response/addStudyItem.response.js +2 -0
- package/dist/response/authStatus.response.d.ts +6 -0
- package/dist/response/authStatus.response.js +2 -0
- package/dist/response/getStudyItems.response.d.ts +6 -0
- package/dist/response/getStudyItems.response.js +2 -0
- package/dist/response/getUsers.response.d.ts +6 -0
- package/dist/response/getUsers.response.js +2 -0
- package/dist/response/signIn.response.d.ts +6 -0
- package/dist/response/signIn.response.js +2 -0
- package/dist/response/signOut.response.d.ts +3 -0
- package/dist/response/signOut.response.js +2 -0
- package/dist/response/signUp.response.d.ts +6 -0
- package/dist/response/signUp.response.js +2 -0
- package/dist/response/updateStudyItem.response.d.ts +3 -0
- package/dist/response/updateStudyItem.response.js +2 -0
- package/dist/schema/studyItem.schema.d.ts +3 -3
- package/dist/schema/studyItemContent.schema.d.ts +18 -0
- package/dist/schema/studyItemContent.schema.js +13 -0
- package/dist/schema/studyItemEntity.schema.d.ts +34 -0
- package/dist/schema/studyItemEntity.schema.js +18 -0
- package/dist/schema/studyItemTemplate.schema.d.ts +21 -0
- package/dist/schema/studyItemTemplate.schema.js +12 -0
- package/dist/schema/studyQuestionContent.schema.d.ts +5 -0
- package/dist/schema/studyQuestionContent.schema.js +10 -0
- package/dist/schema/studyQuestionEntity.schema.d.ts +15 -0
- package/dist/schema/studyQuestionEntity.schema.js +15 -0
- package/dist/schema/studyQuestionTemplate.schema.d.ts +8 -0
- package/dist/schema/studyQuestionTemplate.schema.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StudyItemStatus = void 0;
|
|
4
|
+
var StudyItemStatus;
|
|
5
|
+
(function (StudyItemStatus) {
|
|
6
|
+
StudyItemStatus["Draft"] = "DRAFT";
|
|
7
|
+
StudyItemStatus["ToDo"] = "TODO";
|
|
8
|
+
StudyItemStatus["Submitted"] = "SUBMITTED";
|
|
9
|
+
StudyItemStatus["Marked"] = "MARKED";
|
|
10
|
+
})(StudyItemStatus || (exports.StudyItemStatus = StudyItemStatus = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StudyQuestionStatus = void 0;
|
|
4
|
+
var StudyQuestionStatus;
|
|
5
|
+
(function (StudyQuestionStatus) {
|
|
6
|
+
StudyQuestionStatus["Unmarked"] = "UNMARKED";
|
|
7
|
+
StudyQuestionStatus["Correct"] = "CORRECT";
|
|
8
|
+
StudyQuestionStatus["Incorrect"] = "INCORRECT";
|
|
9
|
+
})(StudyQuestionStatus || (exports.StudyQuestionStatus = StudyQuestionStatus = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
export * from "./schema/authUser.schema";
|
|
2
|
-
export * from "./schema/
|
|
3
|
-
export * from "./schema/
|
|
2
|
+
export * from "./schema/studyItemEntity.schema";
|
|
3
|
+
export * from "./schema/studyItemContent.schema";
|
|
4
|
+
export * from "./schema/studyItemTemplate.schema";
|
|
5
|
+
export * from "./schema/studyQuestionEntity.schema";
|
|
6
|
+
export * from "./schema/studyQuestionContent.schema";
|
|
7
|
+
export * from "./schema/studyQuestionTemplate.schema";
|
|
4
8
|
export * from "./schema/user.schema";
|
|
5
9
|
export * from "./enum/language.enum";
|
|
6
10
|
export * from "./enum/role.enum";
|
|
7
|
-
export * from "./enum/
|
|
11
|
+
export * from "./enum/studyItemStatus.enum";
|
|
12
|
+
export * from "./enum/studyQuestionStatus.enum";
|
|
13
|
+
export * from "./response/addStudyItem.response";
|
|
14
|
+
export * from "./response/authStatus.response";
|
|
15
|
+
export * from "./response/getStudyItems.response";
|
|
16
|
+
export * from "./response/getUsers.response";
|
|
17
|
+
export * from "./response/signIn.response";
|
|
18
|
+
export * from "./response/signOut.response";
|
|
19
|
+
export * from "./response/signUp.response";
|
|
20
|
+
export * from "./response/updateStudyItem.response";
|
package/dist/index.js
CHANGED
|
@@ -15,9 +15,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./schema/authUser.schema"), exports);
|
|
18
|
-
__exportStar(require("./schema/
|
|
19
|
-
__exportStar(require("./schema/
|
|
18
|
+
__exportStar(require("./schema/studyItemEntity.schema"), exports);
|
|
19
|
+
__exportStar(require("./schema/studyItemContent.schema"), exports);
|
|
20
|
+
__exportStar(require("./schema/studyItemTemplate.schema"), exports);
|
|
21
|
+
__exportStar(require("./schema/studyQuestionEntity.schema"), exports);
|
|
22
|
+
__exportStar(require("./schema/studyQuestionContent.schema"), exports);
|
|
23
|
+
__exportStar(require("./schema/studyQuestionTemplate.schema"), exports);
|
|
20
24
|
__exportStar(require("./schema/user.schema"), exports);
|
|
21
25
|
__exportStar(require("./enum/language.enum"), exports);
|
|
22
26
|
__exportStar(require("./enum/role.enum"), exports);
|
|
23
|
-
__exportStar(require("./enum/
|
|
27
|
+
__exportStar(require("./enum/studyItemStatus.enum"), exports);
|
|
28
|
+
__exportStar(require("./enum/studyQuestionStatus.enum"), exports);
|
|
29
|
+
__exportStar(require("./response/addStudyItem.response"), exports);
|
|
30
|
+
__exportStar(require("./response/authStatus.response"), exports);
|
|
31
|
+
__exportStar(require("./response/getStudyItems.response"), exports);
|
|
32
|
+
__exportStar(require("./response/getUsers.response"), exports);
|
|
33
|
+
__exportStar(require("./response/signIn.response"), exports);
|
|
34
|
+
__exportStar(require("./response/signOut.response"), exports);
|
|
35
|
+
__exportStar(require("./response/signUp.response"), exports);
|
|
36
|
+
__exportStar(require("./response/updateStudyItem.response"), exports);
|
|
@@ -17,9 +17,9 @@ export declare const StudyItemSchema: z.ZodObject<{
|
|
|
17
17
|
question: z.ZodString;
|
|
18
18
|
answer: z.ZodString;
|
|
19
19
|
correct: z.ZodEnum<{
|
|
20
|
-
UNMARKED: import("
|
|
21
|
-
CORRECT: import("
|
|
22
|
-
INCORRECT: import("
|
|
20
|
+
UNMARKED: import("..").StudyQuestionGrade.Unmarked;
|
|
21
|
+
CORRECT: import("..").StudyQuestionGrade.Correct;
|
|
22
|
+
INCORRECT: import("..").StudyQuestionGrade.Incorrect;
|
|
23
23
|
}>;
|
|
24
24
|
teacherComment: z.ZodString;
|
|
25
25
|
}, z.core.$strip>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const StudyItemContentSchema: z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
description: z.ZodString;
|
|
5
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
6
|
+
question: z.ZodObject<{
|
|
7
|
+
question: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
answer: z.ZodString;
|
|
10
|
+
status: z.ZodEnum<{
|
|
11
|
+
UNMARKED: import("..").StudyQuestionStatus.Unmarked;
|
|
12
|
+
CORRECT: import("..").StudyQuestionStatus.Correct;
|
|
13
|
+
INCORRECT: import("..").StudyQuestionStatus.Incorrect;
|
|
14
|
+
}>;
|
|
15
|
+
teacherComment: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type StudyItemContent = z.infer<typeof StudyItemContentSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StudyItemContentSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const studyQuestionEntity_schema_1 = require("./studyQuestionEntity.schema");
|
|
9
|
+
exports.StudyItemContentSchema = zod_1.default.object({
|
|
10
|
+
title: zod_1.default.string().min(1),
|
|
11
|
+
description: zod_1.default.string().min(1),
|
|
12
|
+
questions: zod_1.default.array(studyQuestionEntity_schema_1.StudyQuestionEntitySchema),
|
|
13
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { Language } from "../enum/language.enum";
|
|
3
|
+
import { StudyItemStatus } from "../enum/studyItemStatus.enum";
|
|
4
|
+
export declare const StudyItemEntitySchema: z.ZodObject<{
|
|
5
|
+
assignedStudent: z.ZodString;
|
|
6
|
+
assignedTeacher: z.ZodString;
|
|
7
|
+
state: z.ZodEnum<{
|
|
8
|
+
DRAFT: StudyItemStatus.Draft;
|
|
9
|
+
TODO: StudyItemStatus.ToDo;
|
|
10
|
+
SUBMITTED: StudyItemStatus.Submitted;
|
|
11
|
+
MARKED: StudyItemStatus.Marked;
|
|
12
|
+
}>;
|
|
13
|
+
language: z.ZodEnum<{
|
|
14
|
+
JAPANESE: Language.Japanese;
|
|
15
|
+
}>;
|
|
16
|
+
studyItemContent: z.ZodObject<{
|
|
17
|
+
title: z.ZodString;
|
|
18
|
+
description: z.ZodString;
|
|
19
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
20
|
+
question: z.ZodObject<{
|
|
21
|
+
question: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
answer: z.ZodString;
|
|
24
|
+
status: z.ZodEnum<{
|
|
25
|
+
UNMARKED: import("..").StudyQuestionStatus.Unmarked;
|
|
26
|
+
CORRECT: import("..").StudyQuestionStatus.Correct;
|
|
27
|
+
INCORRECT: import("..").StudyQuestionStatus.Incorrect;
|
|
28
|
+
}>;
|
|
29
|
+
teacherComment: z.ZodString;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
teacherComment: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type StudyItemEntity = z.infer<typeof StudyItemEntitySchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StudyItemEntitySchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const language_enum_1 = require("../enum/language.enum");
|
|
9
|
+
const studyItemStatus_enum_1 = require("../enum/studyItemStatus.enum");
|
|
10
|
+
const studyItemContent_schema_1 = require("./studyItemContent.schema");
|
|
11
|
+
exports.StudyItemEntitySchema = zod_1.default.object({
|
|
12
|
+
assignedStudent: zod_1.default.string().min(1),
|
|
13
|
+
assignedTeacher: zod_1.default.string().min(1),
|
|
14
|
+
state: zod_1.default.enum(Object.values(studyItemStatus_enum_1.StudyItemStatus)),
|
|
15
|
+
language: zod_1.default.enum(Object.values(language_enum_1.Language)),
|
|
16
|
+
studyItemContent: studyItemContent_schema_1.StudyItemContentSchema,
|
|
17
|
+
teacherComment: zod_1.default.string(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const StudyItemTemplateSchema: z.ZodObject<{
|
|
3
|
+
owner: z.ZodString;
|
|
4
|
+
studyItemContent: z.ZodObject<{
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
description: z.ZodString;
|
|
7
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
8
|
+
question: z.ZodObject<{
|
|
9
|
+
question: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
answer: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<{
|
|
13
|
+
UNMARKED: import("..").StudyQuestionStatus.Unmarked;
|
|
14
|
+
CORRECT: import("..").StudyQuestionStatus.Correct;
|
|
15
|
+
INCORRECT: import("..").StudyQuestionStatus.Incorrect;
|
|
16
|
+
}>;
|
|
17
|
+
teacherComment: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type StudyItemTemplate = z.infer<typeof StudyItemTemplateSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StudyItemTemplateSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const studyItemContent_schema_1 = require("./studyItemContent.schema");
|
|
9
|
+
exports.StudyItemTemplateSchema = zod_1.default.object({
|
|
10
|
+
owner: zod_1.default.string().min(1),
|
|
11
|
+
studyItemContent: studyItemContent_schema_1.StudyItemContentSchema,
|
|
12
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StudyQuestionContentSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.StudyQuestionContentSchema = zod_1.default.object({
|
|
9
|
+
question: zod_1.default.string().min(1),
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { StudyQuestionStatus } from "../enum/studyQuestionStatus.enum";
|
|
3
|
+
export declare const StudyQuestionEntitySchema: z.ZodObject<{
|
|
4
|
+
question: z.ZodObject<{
|
|
5
|
+
question: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
answer: z.ZodString;
|
|
8
|
+
status: z.ZodEnum<{
|
|
9
|
+
UNMARKED: StudyQuestionStatus.Unmarked;
|
|
10
|
+
CORRECT: StudyQuestionStatus.Correct;
|
|
11
|
+
INCORRECT: StudyQuestionStatus.Incorrect;
|
|
12
|
+
}>;
|
|
13
|
+
teacherComment: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type StudyQuestionEntity = z.infer<typeof StudyQuestionEntitySchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StudyQuestionEntitySchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const studyQuestionStatus_enum_1 = require("../enum/studyQuestionStatus.enum");
|
|
9
|
+
const studyQuestionContent_schema_1 = require("./studyQuestionContent.schema");
|
|
10
|
+
exports.StudyQuestionEntitySchema = zod_1.default.object({
|
|
11
|
+
question: studyQuestionContent_schema_1.StudyQuestionContentSchema,
|
|
12
|
+
answer: zod_1.default.string(),
|
|
13
|
+
status: zod_1.default.enum(Object.values(studyQuestionStatus_enum_1.StudyQuestionStatus)),
|
|
14
|
+
teacherComment: zod_1.default.string(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const StudyQuestionTemplateSchema: z.ZodObject<{
|
|
3
|
+
owner: z.ZodString;
|
|
4
|
+
studyQuestionContent: z.ZodObject<{
|
|
5
|
+
question: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type StudyQuestionTemplate = z.infer<typeof StudyQuestionTemplateSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StudyQuestionTemplateSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const studyQuestionContent_schema_1 = require("./studyQuestionContent.schema");
|
|
9
|
+
exports.StudyQuestionTemplateSchema = zod_1.default.object({
|
|
10
|
+
owner: zod_1.default.string().min(1),
|
|
11
|
+
studyQuestionContent: studyQuestionContent_schema_1.StudyQuestionContentSchema
|
|
12
|
+
});
|