@flantastic/study-time-types 1.0.1 → 1.0.3

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.
@@ -1,4 +1,7 @@
1
- export var Language;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Language = void 0;
4
+ var Language;
2
5
  (function (Language) {
3
6
  Language["Japanese"] = "JAPANESE";
4
- })(Language || (Language = {}));
7
+ })(Language || (exports.Language = Language = {}));
@@ -1,6 +1,9 @@
1
- export var Role;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Role = void 0;
4
+ var Role;
2
5
  (function (Role) {
3
6
  Role["Student"] = "STUDENT";
4
7
  Role["Teacher"] = "TEACHER";
5
8
  Role["Admin"] = "ADMIN";
6
- })(Role || (Role = {}));
9
+ })(Role || (exports.Role = Role = {}));
@@ -1,7 +1,10 @@
1
- export var StudyItemState;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StudyItemState = void 0;
4
+ var StudyItemState;
2
5
  (function (StudyItemState) {
3
6
  StudyItemState["Draft"] = "DRAFT";
4
7
  StudyItemState["ToDo"] = "TODO";
5
8
  StudyItemState["Submitted"] = "SUBMITTED";
6
9
  StudyItemState["Marked"] = "MARKED";
7
- })(StudyItemState || (StudyItemState = {}));
10
+ })(StudyItemState || (exports.StudyItemState = StudyItemState = {}));
package/dist/index.js CHANGED
@@ -1,7 +1,23 @@
1
- export * from "./schema/authUser.schema";
2
- export * from "./schema/studyItem.schema";
3
- export * from "./schema/studyQuestion.schema";
4
- export * from "./schema/user.schema";
5
- export * from "./enum/language.enum";
6
- export * from "./enum/role.enum";
7
- export * from "./enum/studyItemState.enum";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./schema/authUser.schema"), exports);
18
+ __exportStar(require("./schema/studyItem.schema"), exports);
19
+ __exportStar(require("./schema/studyQuestion.schema"), exports);
20
+ __exportStar(require("./schema/user.schema"), exports);
21
+ __exportStar(require("./enum/language.enum"), exports);
22
+ __exportStar(require("./enum/role.enum"), exports);
23
+ __exportStar(require("./enum/studyItemState.enum"), exports);
@@ -1,5 +1,11 @@
1
- import z from "zod";
2
- export const AuthUserSchema = z.object({
3
- email: z.email().min(1),
4
- password: z.string().min(1),
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.AuthUserSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.AuthUserSchema = zod_1.default.object({
9
+ email: zod_1.default.email().min(1),
10
+ password: zod_1.default.string().min(1),
5
11
  });
@@ -1,14 +1,20 @@
1
- import z from "zod";
2
- import { Language } from "../enum/language.enum";
3
- import { StudyItemState } from "../enum/studyItemState.enum";
4
- import { StudyQuestionSchema } from "./studyQuestion.schema";
5
- export const StudyItemSchema = z.object({
6
- title: z.string().min(1),
7
- description: z.string().min(1),
8
- language: z.enum(Object.values(Language)),
9
- state: z.enum(Object.values(StudyItemState)),
10
- questions: z.array(StudyQuestionSchema),
11
- teacherComment: z.string(),
12
- assignedStudent: z.string().min(1),
13
- assignedTeacher: z.string().min(1),
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),
14
20
  });
@@ -1,7 +1,13 @@
1
- import z from "zod";
2
- export const StudyQuestionSchema = z.object({
3
- question: z.string().min(1),
4
- answer: z.string().min(1),
5
- correct: z.boolean(),
6
- teacherComment: z.string(),
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
+ exports.StudyQuestionSchema = zod_1.default.object({
9
+ question: zod_1.default.string().min(1),
10
+ answer: zod_1.default.string().min(1),
11
+ correct: zod_1.default.boolean(),
12
+ teacherComment: zod_1.default.string(),
7
13
  });
@@ -1,7 +1,13 @@
1
- import z from "zod";
2
- import { Role } from "../enum/role.enum";
3
- export const UserSchema = z.object({
4
- uid: z.string().min(1),
5
- email: z.email().min(1),
6
- role: z.enum(Object.values(Role))
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.UserSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const role_enum_1 = require("../enum/role.enum");
9
+ exports.UserSchema = zod_1.default.object({
10
+ uid: zod_1.default.string().min(1),
11
+ email: zod_1.default.email().min(1),
12
+ role: zod_1.default.enum(Object.values(role_enum_1.Role))
7
13
  });
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@flantastic/study-time-types",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/index.js",
9
+ "require": "./dist/index.js",
9
10
  "types": "./dist/index.d.ts"
10
11
  }
11
12
  },