@flantastic/study-time-types 1.0.11 → 1.0.13

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 (33) hide show
  1. package/dist/index.d.ts +8 -7
  2. package/dist/index.js +8 -7
  3. package/dist/response/{signUp.response.d.ts → authSignIn.response.d.ts} +1 -1
  4. package/dist/response/authSignOut.response.d.ts +3 -0
  5. package/dist/response/{signIn.response.d.ts → authSignUp.response.d.ts} +1 -1
  6. package/dist/response/error.response.d.ts +4 -0
  7. package/dist/response/studyItemAdd.response.d.ts +3 -0
  8. package/dist/response/studyItemUpdate.response.d.ts +3 -0
  9. package/dist/response/studyItemsGet.response.d.ts +7 -0
  10. package/dist/response/{getUsers.response.d.ts → usersGet.response.d.ts} +1 -1
  11. package/dist/response/usersGet.response.js +2 -0
  12. package/package.json +1 -1
  13. package/dist/auth.schema.d.ts +0 -6
  14. package/dist/auth.schema.js +0 -5
  15. package/dist/enum/studyItemState.enum.d.ts +0 -6
  16. package/dist/enum/studyItemState.enum.js +0 -10
  17. package/dist/enum/studyQuestionGrade.enum.d.ts +0 -5
  18. package/dist/enum/studyQuestionGrade.enum.js +0 -9
  19. package/dist/response/addStudyItem.response.d.ts +0 -3
  20. package/dist/response/getStudyItems.response.d.ts +0 -6
  21. package/dist/response/signOut.response.d.ts +0 -3
  22. package/dist/response/updateStudyItem.response.d.ts +0 -3
  23. package/dist/schema/studyItem.schema.d.ts +0 -30
  24. package/dist/schema/studyItem.schema.js +0 -20
  25. package/dist/schema/studyQuestion.schema.d.ts +0 -13
  26. package/dist/schema/studyQuestion.schema.js +0 -14
  27. /package/dist/response/{addStudyItem.response.js → authSignIn.response.js} +0 -0
  28. /package/dist/response/{getStudyItems.response.js → authSignOut.response.js} +0 -0
  29. /package/dist/response/{getUsers.response.js → authSignUp.response.js} +0 -0
  30. /package/dist/response/{signIn.response.js → error.response.js} +0 -0
  31. /package/dist/response/{signOut.response.js → studyItemAdd.response.js} +0 -0
  32. /package/dist/response/{signUp.response.js → studyItemUpdate.response.js} +0 -0
  33. /package/dist/response/{updateStudyItem.response.js → studyItemsGet.response.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -10,11 +10,12 @@ export * from "./enum/language.enum";
10
10
  export * from "./enum/role.enum";
11
11
  export * from "./enum/studyItemStatus.enum";
12
12
  export * from "./enum/studyQuestionStatus.enum";
13
- export * from "./response/addStudyItem.response";
14
13
  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";
14
+ export * from "./response/authSignIn.response";
15
+ export * from "./response/authSignOut.response";
16
+ export * from "./response/authSignUp.response";
17
+ export * from "./response/studyItemsGet.response";
18
+ export * from "./response/studyItemAdd.response";
19
+ export * from "./response/studyItemUpdate.response";
20
+ export * from "./response/usersGet.response";
21
+ export * from "./response/error.response";
package/dist/index.js CHANGED
@@ -26,11 +26,12 @@ __exportStar(require("./enum/language.enum"), exports);
26
26
  __exportStar(require("./enum/role.enum"), exports);
27
27
  __exportStar(require("./enum/studyItemStatus.enum"), exports);
28
28
  __exportStar(require("./enum/studyQuestionStatus.enum"), exports);
29
- __exportStar(require("./response/addStudyItem.response"), exports);
30
29
  __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);
30
+ __exportStar(require("./response/authSignIn.response"), exports);
31
+ __exportStar(require("./response/authSignOut.response"), exports);
32
+ __exportStar(require("./response/authSignUp.response"), exports);
33
+ __exportStar(require("./response/studyItemsGet.response"), exports);
34
+ __exportStar(require("./response/studyItemAdd.response"), exports);
35
+ __exportStar(require("./response/studyItemUpdate.response"), exports);
36
+ __exportStar(require("./response/usersGet.response"), exports);
37
+ __exportStar(require("./response/error.response"), exports);
@@ -1,5 +1,5 @@
1
1
  import { User } from "../schema/user.schema";
2
- export interface SignUpResponse {
2
+ export interface AuthSignInResponse {
3
3
  data: {
4
4
  user: User;
5
5
  };
@@ -0,0 +1,3 @@
1
+ export interface AuthSignOutResponse {
2
+ data: {};
3
+ }
@@ -1,5 +1,5 @@
1
1
  import { User } from "../schema/user.schema";
2
- export interface SignInResponse {
2
+ export interface AuthSignUpResponse {
3
3
  data: {
4
4
  user: User;
5
5
  };
@@ -0,0 +1,4 @@
1
+ export interface ErrorResponse {
2
+ message: string;
3
+ errors?: any;
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface StudyItemAddResponse {
2
+ data: {};
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface StudyItemUpdateResponse {
2
+ data: {};
3
+ }
@@ -0,0 +1,7 @@
1
+ import { StudyItemEntity } from "../schema/studyItemEntity.schema";
2
+ export interface StudyItemsGetResponse {
3
+ data: [
4
+ id: string,
5
+ studyItem: StudyItemEntity
6
+ ];
7
+ }
@@ -1,5 +1,5 @@
1
1
  import { User } from "../schema/user.schema";
2
- export interface GetUsersResponse {
2
+ export interface UsersGetResponse {
3
3
  data: {
4
4
  users: User[];
5
5
  };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flantastic/study-time-types",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -1,6 +0,0 @@
1
- import z from "zod";
2
- export declare const AuthUserSchema: z.ZodObject<{
3
- email: z.ZodEmail;
4
- password: z.ZodString;
5
- }, z.core.$strip>;
6
- export type AuthUser = z.infer<typeof AuthUserSchema>;
@@ -1,5 +0,0 @@
1
- import z from "zod";
2
- export const AuthUserSchema = z.object({
3
- email: z.email().min(1),
4
- password: z.string().min(1),
5
- });
@@ -1,6 +0,0 @@
1
- export declare enum StudyItemState {
2
- Draft = "DRAFT",
3
- ToDo = "TODO",
4
- Submitted = "SUBMITTED",
5
- Marked = "MARKED"
6
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StudyItemState = void 0;
4
- var StudyItemState;
5
- (function (StudyItemState) {
6
- StudyItemState["Draft"] = "DRAFT";
7
- StudyItemState["ToDo"] = "TODO";
8
- StudyItemState["Submitted"] = "SUBMITTED";
9
- StudyItemState["Marked"] = "MARKED";
10
- })(StudyItemState || (exports.StudyItemState = StudyItemState = {}));
@@ -1,5 +0,0 @@
1
- export declare enum StudyQuestionGrade {
2
- Unmarked = "UNMARKED",
3
- Correct = "CORRECT",
4
- Incorrect = "INCORRECT"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StudyQuestionGrade = void 0;
4
- var StudyQuestionGrade;
5
- (function (StudyQuestionGrade) {
6
- StudyQuestionGrade["Unmarked"] = "UNMARKED";
7
- StudyQuestionGrade["Correct"] = "CORRECT";
8
- StudyQuestionGrade["Incorrect"] = "INCORRECT";
9
- })(StudyQuestionGrade || (exports.StudyQuestionGrade = StudyQuestionGrade = {}));
@@ -1,3 +0,0 @@
1
- export interface AddStudyItemResponse {
2
- data: {};
3
- }
@@ -1,6 +0,0 @@
1
- import { StudyItemEntity } from "../schema/studyItemEntity.schema";
2
- export interface GetStudyItemsResponse {
3
- data: {
4
- studyItems: StudyItemEntity[];
5
- };
6
- }
@@ -1,3 +0,0 @@
1
- export interface SignOutResponse {
2
- data: {};
3
- }
@@ -1,3 +0,0 @@
1
- export interface UpdateStudyItemResponse {
2
- data: {};
3
- }
@@ -1,30 +0,0 @@
1
- import z from "zod";
2
- import { Language } from "../enum/language.enum";
3
- import { StudyItemState } from "../enum/studyItemState.enum";
4
- export declare const StudyItemSchema: z.ZodObject<{
5
- title: z.ZodString;
6
- description: z.ZodString;
7
- language: z.ZodEnum<{
8
- JAPANESE: Language.Japanese;
9
- }>;
10
- state: z.ZodEnum<{
11
- DRAFT: StudyItemState.Draft;
12
- TODO: StudyItemState.ToDo;
13
- SUBMITTED: StudyItemState.Submitted;
14
- MARKED: StudyItemState.Marked;
15
- }>;
16
- questions: z.ZodArray<z.ZodObject<{
17
- question: z.ZodString;
18
- answer: z.ZodString;
19
- correct: z.ZodEnum<{
20
- UNMARKED: import("..").StudyQuestionGrade.Unmarked;
21
- CORRECT: import("..").StudyQuestionGrade.Correct;
22
- INCORRECT: import("..").StudyQuestionGrade.Incorrect;
23
- }>;
24
- teacherComment: z.ZodString;
25
- }, z.core.$strip>>;
26
- teacherComment: z.ZodString;
27
- assignedStudent: z.ZodString;
28
- assignedTeacher: z.ZodString;
29
- }, z.core.$strip>;
30
- export type StudyItem = z.infer<typeof StudyItemSchema>;
@@ -1,20 +0,0 @@
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.StudyItemSchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
8
- const language_enum_1 = require("../enum/language.enum");
9
- const studyItemState_enum_1 = require("../enum/studyItemState.enum");
10
- const studyQuestion_schema_1 = require("./studyQuestion.schema");
11
- exports.StudyItemSchema = zod_1.default.object({
12
- title: zod_1.default.string().min(1),
13
- description: zod_1.default.string().min(1),
14
- language: zod_1.default.enum(Object.values(language_enum_1.Language)),
15
- state: zod_1.default.enum(Object.values(studyItemState_enum_1.StudyItemState)),
16
- questions: zod_1.default.array(studyQuestion_schema_1.StudyQuestionSchema),
17
- teacherComment: zod_1.default.string(),
18
- assignedStudent: zod_1.default.string().min(1),
19
- assignedTeacher: zod_1.default.string().min(1),
20
- });
@@ -1,13 +0,0 @@
1
- import z from "zod";
2
- import { StudyQuestionGrade } from "../enum/studyQuestionGrade.enum";
3
- export declare const StudyQuestionSchema: z.ZodObject<{
4
- question: z.ZodString;
5
- answer: z.ZodString;
6
- correct: z.ZodEnum<{
7
- UNMARKED: StudyQuestionGrade.Unmarked;
8
- CORRECT: StudyQuestionGrade.Correct;
9
- INCORRECT: StudyQuestionGrade.Incorrect;
10
- }>;
11
- teacherComment: z.ZodString;
12
- }, z.core.$strip>;
13
- export type StudyQuestion = z.infer<typeof StudyQuestionSchema>;
@@ -1,14 +0,0 @@
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.StudyQuestionSchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
8
- const studyQuestionGrade_enum_1 = require("../enum/studyQuestionGrade.enum");
9
- exports.StudyQuestionSchema = zod_1.default.object({
10
- question: zod_1.default.string().min(1),
11
- answer: zod_1.default.string(),
12
- correct: zod_1.default.enum(Object.values(studyQuestionGrade_enum_1.StudyQuestionGrade)),
13
- teacherComment: zod_1.default.string(),
14
- });