@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.
Files changed (36) hide show
  1. package/dist/enum/studyItemStatus.enum.d.ts +6 -0
  2. package/dist/enum/studyItemStatus.enum.js +10 -0
  3. package/dist/enum/studyQuestionStatus.enum.d.ts +5 -0
  4. package/dist/enum/studyQuestionStatus.enum.js +9 -0
  5. package/dist/index.d.ts +16 -3
  6. package/dist/index.js +16 -3
  7. package/dist/response/addStudyItem.response.d.ts +3 -0
  8. package/dist/response/addStudyItem.response.js +2 -0
  9. package/dist/response/authStatus.response.d.ts +6 -0
  10. package/dist/response/authStatus.response.js +2 -0
  11. package/dist/response/getStudyItems.response.d.ts +6 -0
  12. package/dist/response/getStudyItems.response.js +2 -0
  13. package/dist/response/getUsers.response.d.ts +6 -0
  14. package/dist/response/getUsers.response.js +2 -0
  15. package/dist/response/signIn.response.d.ts +6 -0
  16. package/dist/response/signIn.response.js +2 -0
  17. package/dist/response/signOut.response.d.ts +3 -0
  18. package/dist/response/signOut.response.js +2 -0
  19. package/dist/response/signUp.response.d.ts +6 -0
  20. package/dist/response/signUp.response.js +2 -0
  21. package/dist/response/updateStudyItem.response.d.ts +3 -0
  22. package/dist/response/updateStudyItem.response.js +2 -0
  23. package/dist/schema/studyItem.schema.d.ts +3 -3
  24. package/dist/schema/studyItemContent.schema.d.ts +18 -0
  25. package/dist/schema/studyItemContent.schema.js +13 -0
  26. package/dist/schema/studyItemEntity.schema.d.ts +34 -0
  27. package/dist/schema/studyItemEntity.schema.js +18 -0
  28. package/dist/schema/studyItemTemplate.schema.d.ts +21 -0
  29. package/dist/schema/studyItemTemplate.schema.js +12 -0
  30. package/dist/schema/studyQuestionContent.schema.d.ts +5 -0
  31. package/dist/schema/studyQuestionContent.schema.js +10 -0
  32. package/dist/schema/studyQuestionEntity.schema.d.ts +15 -0
  33. package/dist/schema/studyQuestionEntity.schema.js +15 -0
  34. package/dist/schema/studyQuestionTemplate.schema.d.ts +8 -0
  35. package/dist/schema/studyQuestionTemplate.schema.js +12 -0
  36. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export declare enum StudyItemStatus {
2
+ Draft = "DRAFT",
3
+ ToDo = "TODO",
4
+ Submitted = "SUBMITTED",
5
+ Marked = "MARKED"
6
+ }
@@ -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,5 @@
1
+ export declare enum StudyQuestionStatus {
2
+ Unmarked = "UNMARKED",
3
+ Correct = "CORRECT",
4
+ Incorrect = "INCORRECT"
5
+ }
@@ -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/studyItem.schema";
3
- export * from "./schema/studyQuestion.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/studyItemState.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/studyItem.schema"), exports);
19
- __exportStar(require("./schema/studyQuestion.schema"), exports);
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/studyItemState.enum"), exports);
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);
@@ -0,0 +1,3 @@
1
+ export interface AddStudyItemResponse {
2
+ data: {};
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { User } from "../schema/user.schema";
2
+ export interface AuthStatusResponse {
3
+ data: {
4
+ user: User;
5
+ };
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { StudyItemEntity } from "../schema/studyItemEntity.schema";
2
+ export interface GetStudyItemsResponse {
3
+ data: {
4
+ studyItems: StudyItemEntity[];
5
+ };
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { User } from "../schema/user.schema";
2
+ export interface GetUsersResponse {
3
+ data: {
4
+ users: User[];
5
+ };
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { User } from "../schema/user.schema";
2
+ export interface SignInResponse {
3
+ data: {
4
+ user: User;
5
+ };
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface SignOutResponse {
2
+ data: {};
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { User } from "../schema/user.schema";
2
+ export interface SignUpResponse {
3
+ data: {
4
+ user: User;
5
+ };
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface UpdateStudyItemResponse {
2
+ data: {};
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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("../enum/studyQuestionGrade.enum").StudyQuestionGrade.Unmarked;
21
- CORRECT: import("../enum/studyQuestionGrade.enum").StudyQuestionGrade.Correct;
22
- INCORRECT: import("../enum/studyQuestionGrade.enum").StudyQuestionGrade.Incorrect;
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,5 @@
1
+ import z from "zod";
2
+ export declare const StudyQuestionContentSchema: z.ZodObject<{
3
+ question: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type StudyQuestionContent = z.infer<typeof StudyQuestionContentSchema>;
@@ -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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flantastic/study-time-types",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {