@goat-it/schemas 0.0.2 → 0.0.4-beta
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/question/index.mjs +1 -2
- package/dist/question-theme/index.mjs +1 -2
- package/dist/shared/locale/index.mjs +1 -2
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.d.mts +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs +2 -4
- package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question/question-content/question-content.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/question/question-content/question-content.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question/question.dto.shape.d.mts +1 -1
- package/dist/src/contexts/question/application/dto/question/question.dto.shape.mjs +2 -4
- package/dist/src/contexts/question/application/dto/question/question.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.mjs +3 -4
- package/dist/src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-creation.dto.shape.mjs +2 -4
- package/dist/src/contexts/question/application/dto/question-creation/question-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement.mjs +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.mjs +2 -4
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.mjs.map +1 -1
- package/dist/src/contexts/question/domain/value-objects/question-author/question-author.constants.mjs +5 -9
- package/dist/src/contexts/question/domain/value-objects/question-author/question-author.constants.mjs.map +1 -1
- package/dist/src/contexts/question/domain/value-objects/question-category/question-category.constants.mjs +1 -1
- package/dist/src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.mjs +1 -1
- package/dist/src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.mjs +1 -1
- package/dist/src/contexts/question/domain/value-objects/question-status/question-status.constants.mjs +5 -10
- package/dist/src/contexts/question/domain/value-objects/question-status/question-status.constants.mjs.map +1 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs +1 -2
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.mjs +1 -1
- package/dist/src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.mjs +2 -5
- package/dist/src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.mjs.map +1 -1
- package/dist/src/shared/application/dto/zod/refinements/array/array.zod.refinements.mjs +1 -1
- package/dist/src/shared/domain/value-objects/locale/locale.constants.mjs +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.mjs +2 -6
- package/dist/src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.mjs.map +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs +5 -6
- package/dist/src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs.map +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants.mjs +3 -4
- package/dist/src/shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants.mjs.map +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs +5 -7
- package/dist/src/shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs.map +1 -1
- package/package.json +9 -4
- package/dist/src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.mjs +0 -7
- package/dist/src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs +0 -7
- package/dist/src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs.map +0 -1
package/dist/question/index.mjs
CHANGED
|
@@ -7,5 +7,4 @@ import { QUESTION_THEME_ASSIGNMENT_CREATION_DTO } from "../src/contexts/question
|
|
|
7
7
|
import { QUESTION_CREATION_DTO } from "../src/contexts/question/application/dto/question-creation/question-creation.dto.shape.mjs";
|
|
8
8
|
import { QUESTION_DTO } from "../src/contexts/question/application/dto/question/question.dto.shape.mjs";
|
|
9
9
|
import { ADMIN_QUESTION_DTO } from "../src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs";
|
|
10
|
-
|
|
11
|
-
export { ADMIN_QUESTION_DTO, QUESTION_AUTHOR_ROLES, QUESTION_CATEGORIES, QUESTION_COGNITIVE_DIFFICULTIES, QUESTION_CREATION_DTO, QUESTION_DTO, QUESTION_REJECTION_TYPES, QUESTION_STATUSES, QUESTION_THEME_ASSIGNMENT_CREATION_DTO };
|
|
10
|
+
export { ADMIN_QUESTION_DTO, QUESTION_AUTHOR_ROLES, QUESTION_CATEGORIES, QUESTION_COGNITIVE_DIFFICULTIES, QUESTION_CREATION_DTO, QUESTION_DTO, QUESTION_REJECTION_TYPES, QUESTION_STATUSES, QUESTION_THEME_ASSIGNMENT_CREATION_DTO };
|
|
@@ -3,5 +3,4 @@ import { QUESTION_THEME_DTO } from "../src/contexts/question/modules/question-th
|
|
|
3
3
|
import { ADMIN_QUESTION_THEME_DTO } from "../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs";
|
|
4
4
|
import { QUESTION_THEME_CREATION_DTO } from "../src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs";
|
|
5
5
|
import { QUESTION_THEME_MODIFICATION_DTO } from "../src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs";
|
|
6
|
-
|
|
7
|
-
export { ADMIN_QUESTION_THEME_DTO, QUESTION_THEME_CREATION_DTO, QUESTION_THEME_DTO, QUESTION_THEME_MODIFICATION_DTO, QUESTION_THEME_STATUSES };
|
|
6
|
+
export { ADMIN_QUESTION_THEME_DTO, QUESTION_THEME_CREATION_DTO, QUESTION_THEME_DTO, QUESTION_THEME_MODIFICATION_DTO, QUESTION_THEME_STATUSES };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { zLocalizedText, zLocalizedTexts } from "../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.ts
|
|
5
4
|
const ADMIN_QUESTION_CONTENT_DTO = z.strictObject({
|
|
6
5
|
statement: zLocalizedText().describe("Question statement in supported locales"),
|
|
@@ -8,7 +7,7 @@ const ADMIN_QUESTION_CONTENT_DTO = z.strictObject({
|
|
|
8
7
|
context: zLocalizedText().optional().describe("Additional context for the question in supported locales"),
|
|
9
8
|
trivia: zLocalizedTexts().optional().describe("Interesting trivia related to the question in supported locales")
|
|
10
9
|
}).describe("Question's content");
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
11
|
export { ADMIN_QUESTION_CONTENT_DTO };
|
|
12
|
+
|
|
14
13
|
//# sourceMappingURL=admin-question-content.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-question-content.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\n\nconst ADMIN_QUESTION_CONTENT_DTO = z.strictObject({\n statement: zLocalizedText()\n .describe(\"Question statement in supported locales\"),\n answer: zLocalizedText()\n .describe(\"Question answer in supported locales\"),\n context: zLocalizedText()\n .optional()\n .describe(\"Additional context for the question in supported locales\"),\n trivia: zLocalizedTexts()\n .optional()\n .describe(\"Interesting trivia related to the question in supported locales\"),\n}).describe(\"Question's content\");\n\nexport type AdminQuestionContentDto = z.infer<typeof ADMIN_QUESTION_CONTENT_DTO>;\n\nexport { ADMIN_QUESTION_CONTENT_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-question-content.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\n\nconst ADMIN_QUESTION_CONTENT_DTO = z.strictObject({\n statement: zLocalizedText()\n .describe(\"Question statement in supported locales\"),\n answer: zLocalizedText()\n .describe(\"Question answer in supported locales\"),\n context: zLocalizedText()\n .optional()\n .describe(\"Additional context for the question in supported locales\"),\n trivia: zLocalizedTexts()\n .optional()\n .describe(\"Interesting trivia related to the question in supported locales\"),\n}).describe(\"Question's content\");\n\nexport type AdminQuestionContentDto = z.infer<typeof ADMIN_QUESTION_CONTENT_DTO>;\n\nexport { ADMIN_QUESTION_CONTENT_DTO };"],"mappings":";;;AAIA,MAAM,6BAA6B,EAAE,aAAa;CAChD,WAAW,gBAAgB,CACxB,SAAS,0CAA0C;CACtD,QAAQ,gBAAgB,CACrB,SAAS,uCAAuC;CACnD,SAAS,gBAAgB,CACtB,UAAU,CACV,SAAS,2DAA2D;CACvE,QAAQ,iBAAiB,CACtB,UAAU,CACV,SAAS,kEAAkE;CAC/E,CAAC,CAAC,SAAS,qBAAqB"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ADMIN_QUESTION_THEME_DTO } from "../../../../modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.ts
|
|
5
4
|
const ADMIN_QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({
|
|
6
5
|
theme: ADMIN_QUESTION_THEME_DTO.describe("Question assigned theme"),
|
|
7
6
|
isPrimary: z.boolean().describe("Indicates if the assigned theme is the primary theme for the question"),
|
|
8
7
|
isHint: z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer")
|
|
9
8
|
}).describe("Question's theme assignment");
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
10
|
export { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO };
|
|
11
|
+
|
|
13
12
|
//# sourceMappingURL=admin-question-theme-assignment.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-question-theme-assignment.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ADMIN_QUESTION_THEME_DTO } from \"@question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape\";\n\nconst ADMIN_QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({\n theme: ADMIN_QUESTION_THEME_DTO\n .describe(\"Question assigned theme\"),\n isPrimary: z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question\"),\n isHint: z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\"),\n}).describe(\"Question's theme assignment\");\n\nexport type AdminQuestionThemeAssignmentDto = z.infer<typeof ADMIN_QUESTION_THEME_ASSIGNMENT_DTO>;\n\nexport { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-question-theme-assignment.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ADMIN_QUESTION_THEME_DTO } from \"@question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape\";\n\nconst ADMIN_QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({\n theme: ADMIN_QUESTION_THEME_DTO\n .describe(\"Question assigned theme\"),\n isPrimary: z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question\"),\n isHint: z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\"),\n}).describe(\"Question's theme assignment\");\n\nexport type AdminQuestionThemeAssignmentDto = z.infer<typeof ADMIN_QUESTION_THEME_ASSIGNMENT_DTO>;\n\nexport { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO };"],"mappings":";;;AAIA,MAAM,sCAAsC,EAAE,aAAa;CACzD,OAAO,yBACJ,SAAS,0BAA0B;CACtC,WAAW,EAAE,SAAS,CACnB,SAAS,wEAAwE;CACpF,QAAQ,EAAE,SAAS,CAChB,SAAS,sEAAsE;CACnF,CAAC,CAAC,SAAS,8BAA8B"}
|
package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from "../../../domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs";
|
|
2
1
|
import { zIsoDateTime, zMongoId } from "../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
|
|
3
2
|
import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from "../shared/zod/validators/question.dto.zod.validators.mjs";
|
|
4
3
|
import { QUESTION_REJECTION_DTO } from "../shared/question-rejection/question-rejection.dto.shape.mjs";
|
|
@@ -6,12 +5,11 @@ import { QUESTION_AUTHOR_DTO } from "../shared/question-author/question-author.d
|
|
|
6
5
|
import { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO } from "./admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs";
|
|
7
6
|
import { ADMIN_QUESTION_CONTENT_DTO } from "./admin-question-content/admin-question-content.dto.shape.mjs";
|
|
8
7
|
import { z } from "zod";
|
|
9
|
-
|
|
10
8
|
//#region ../../src/contexts/question/application/dto/admin-question/admin-question.dto.shape.ts
|
|
11
9
|
const ADMIN_QUESTION_DTO = z.strictObject({
|
|
12
10
|
id: zMongoId().describe("Question's unique identifier"),
|
|
13
11
|
category: zQuestionCategory(),
|
|
14
|
-
themes: z.array(ADMIN_QUESTION_THEME_ASSIGNMENT_DTO).min(
|
|
12
|
+
themes: z.array(ADMIN_QUESTION_THEME_ASSIGNMENT_DTO).min(1).max(3).describe("Question's themes"),
|
|
15
13
|
content: ADMIN_QUESTION_CONTENT_DTO,
|
|
16
14
|
cognitiveDifficulty: zQuestionCognitiveDifficulty(),
|
|
17
15
|
author: QUESTION_AUTHOR_DTO,
|
|
@@ -21,7 +19,7 @@ const ADMIN_QUESTION_DTO = z.strictObject({
|
|
|
21
19
|
createdAt: zIsoDateTime().describe("Question's creation date"),
|
|
22
20
|
updatedAt: zIsoDateTime().describe("Question's last update date")
|
|
23
21
|
});
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
23
|
export { ADMIN_QUESTION_DTO };
|
|
24
|
+
|
|
27
25
|
//# sourceMappingURL=admin-question.dto.shape.mjs.map
|
package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-question.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/application/dto/admin-question/admin-question.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zIsoDateTime, zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from \"@question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants\";\nimport { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO } from \"@question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape\";\nimport { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from \"@question/application/dto/shared/zod/validators/question.dto.zod.validators\";\nimport { QUESTION_REJECTION_DTO } from \"@question/application/dto/shared/question-rejection/question-rejection.dto.shape\";\nimport { QUESTION_AUTHOR_DTO } from \"@question/application/dto/shared/question-author/question-author.dto.shape\";\nimport { ADMIN_QUESTION_CONTENT_DTO } from \"@question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape\";\n\nconst ADMIN_QUESTION_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question's unique identifier\"),\n category: zQuestionCategory(),\n themes: z.array(ADMIN_QUESTION_THEME_ASSIGNMENT_DTO)\n .min(QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS)\n .max(QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS)\n .describe(\"Question's themes\"),\n content: ADMIN_QUESTION_CONTENT_DTO,\n cognitiveDifficulty: zQuestionCognitiveDifficulty(),\n author: QUESTION_AUTHOR_DTO,\n status: zQuestionStatus(),\n rejection: QUESTION_REJECTION_DTO\n .optional()\n .describe(\"Question's rejection details, if applicable\"),\n sourceUrls: zQuestionSourceUrls(),\n createdAt: zIsoDateTime()\n .describe(\"Question's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question's last update date\"),\n});\n\nexport type AdminQuestionDto = z.infer<typeof ADMIN_QUESTION_DTO>;\n\nexport { ADMIN_QUESTION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-question.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/application/dto/admin-question/admin-question.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zIsoDateTime, zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from \"@question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants\";\nimport { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO } from \"@question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape\";\nimport { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from \"@question/application/dto/shared/zod/validators/question.dto.zod.validators\";\nimport { QUESTION_REJECTION_DTO } from \"@question/application/dto/shared/question-rejection/question-rejection.dto.shape\";\nimport { QUESTION_AUTHOR_DTO } from \"@question/application/dto/shared/question-author/question-author.dto.shape\";\nimport { ADMIN_QUESTION_CONTENT_DTO } from \"@question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape\";\n\nconst ADMIN_QUESTION_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question's unique identifier\"),\n category: zQuestionCategory(),\n themes: z.array(ADMIN_QUESTION_THEME_ASSIGNMENT_DTO)\n .min(QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS)\n .max(QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS)\n .describe(\"Question's themes\"),\n content: ADMIN_QUESTION_CONTENT_DTO,\n cognitiveDifficulty: zQuestionCognitiveDifficulty(),\n author: QUESTION_AUTHOR_DTO,\n status: zQuestionStatus(),\n rejection: QUESTION_REJECTION_DTO\n .optional()\n .describe(\"Question's rejection details, if applicable\"),\n sourceUrls: zQuestionSourceUrls(),\n createdAt: zIsoDateTime()\n .describe(\"Question's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question's last update date\"),\n});\n\nexport type AdminQuestionDto = z.infer<typeof ADMIN_QUESTION_DTO>;\n\nexport { ADMIN_QUESTION_DTO };"],"mappings":";;;;;;;;AAWA,MAAM,qBAAqB,EAAE,aAAa;CACxC,IAAI,UAAU,CACX,SAAS,+BAA+B;CAC3C,UAAU,mBAAmB;CAC7B,QAAQ,EAAE,MAAM,oCAAoC,CACjD,IAAA,EAAyC,CACzC,IAAA,EAAyC,CACzC,SAAS,oBAAoB;CAChC,SAAS;CACT,qBAAqB,8BAA8B;CACnD,QAAQ;CACR,QAAQ,iBAAiB;CACzB,WAAW,uBACR,UAAU,CACV,SAAS,8CAA8C;CAC1D,YAAY,qBAAqB;CACjC,WAAW,cAAc,CACtB,SAAS,2BAA2B;CACvC,WAAW,cAAc,CACtB,SAAS,8BAA8B;CAC3C,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region ../../src/contexts/question/application/dto/question/question-content/question-content.dto.shape.ts
|
|
4
3
|
const QUESTION_CONTENT_DTO = z.strictObject({
|
|
5
4
|
statement: z.string().describe("Question translated statement").meta({ example: "What is the capital of France?" }),
|
|
@@ -7,7 +6,7 @@ const QUESTION_CONTENT_DTO = z.strictObject({
|
|
|
7
6
|
context: z.string().optional().describe("Additional translated context for the question").meta({ example: "France is a country in Western Europe." }),
|
|
8
7
|
trivia: z.array(z.string()).optional().describe("Interesting translated trivia related to the question").meta({ example: ["Paris is known as the 'City of Light'.", "The Eiffel Tower is located in Paris."] })
|
|
9
8
|
}).describe("Question's content");
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
10
|
export { QUESTION_CONTENT_DTO };
|
|
11
|
+
|
|
13
12
|
//# sourceMappingURL=question-content.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-content.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question/question-content/question-content.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst QUESTION_CONTENT_DTO = z.strictObject({\n statement: z.string()\n .describe(\"Question translated statement\")\n .meta({ example: \"What is the capital of France?\" }),\n answer: z.string()\n .describe(\"Question translated answer\")\n .meta({ example: \"The capital of France is Paris.\" }),\n context: z.string()\n .optional()\n .describe(\"Additional translated context for the question\")\n .meta({ example: \"France is a country in Western Europe.\" }),\n trivia: z.array(z.string())\n .optional()\n .describe(\"Interesting translated trivia related to the question\")\n .meta({ example: [\"Paris is known as the 'City of Light'.\", \"The Eiffel Tower is located in Paris.\"] }),\n}).describe(\"Question's content\");\n\nexport type QuestionContentDto = z.infer<typeof QUESTION_CONTENT_DTO>;\n\nexport { QUESTION_CONTENT_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-content.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question/question-content/question-content.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst QUESTION_CONTENT_DTO = z.strictObject({\n statement: z.string()\n .describe(\"Question translated statement\")\n .meta({ example: \"What is the capital of France?\" }),\n answer: z.string()\n .describe(\"Question translated answer\")\n .meta({ example: \"The capital of France is Paris.\" }),\n context: z.string()\n .optional()\n .describe(\"Additional translated context for the question\")\n .meta({ example: \"France is a country in Western Europe.\" }),\n trivia: z.array(z.string())\n .optional()\n .describe(\"Interesting translated trivia related to the question\")\n .meta({ example: [\"Paris is known as the 'City of Light'.\", \"The Eiffel Tower is located in Paris.\"] }),\n}).describe(\"Question's content\");\n\nexport type QuestionContentDto = z.infer<typeof QUESTION_CONTENT_DTO>;\n\nexport { QUESTION_CONTENT_DTO };"],"mappings":";;AAEA,MAAM,uBAAuB,EAAE,aAAa;CAC1C,WAAW,EAAE,QAAQ,CAClB,SAAS,gCAAgC,CACzC,KAAK,EAAE,SAAS,kCAAkC,CAAC;CACtD,QAAQ,EAAE,QAAQ,CACf,SAAS,6BAA6B,CACtC,KAAK,EAAE,SAAS,mCAAmC,CAAC;CACvD,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,iDAAiD,CAC1D,KAAK,EAAE,SAAS,0CAA0C,CAAC;CAC9D,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CACxB,UAAU,CACV,SAAS,wDAAwD,CACjE,KAAK,EAAE,SAAS,CAAC,0CAA0C,wCAAwC,EAAE,CAAC;CAC1G,CAAC,CAAC,SAAS,qBAAqB"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { QUESTION_THEME_DTO } from "../../../../modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.ts
|
|
5
4
|
const QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({
|
|
6
5
|
theme: QUESTION_THEME_DTO.describe("Question assigned theme"),
|
|
7
6
|
isPrimary: z.boolean().describe("Indicates if the assigned theme is the primary theme for the question"),
|
|
8
7
|
isHint: z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer")
|
|
9
8
|
}).describe("Question's theme assignment");
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
10
|
export { QUESTION_THEME_ASSIGNMENT_DTO };
|
|
11
|
+
|
|
13
12
|
//# sourceMappingURL=question-theme-assignment.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-assignment.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { QUESTION_THEME_DTO } from \"@question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape\";\n\nconst QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({\n theme: QUESTION_THEME_DTO\n .describe(\"Question assigned theme\"),\n isPrimary: z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question\"),\n isHint: z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\"),\n}).describe(\"Question's theme assignment\");\n\nexport type QuestionThemeAssignmentDto = z.infer<typeof QUESTION_THEME_ASSIGNMENT_DTO>;\n\nexport { QUESTION_THEME_ASSIGNMENT_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-theme-assignment.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { QUESTION_THEME_DTO } from \"@question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape\";\n\nconst QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({\n theme: QUESTION_THEME_DTO\n .describe(\"Question assigned theme\"),\n isPrimary: z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question\"),\n isHint: z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\"),\n}).describe(\"Question's theme assignment\");\n\nexport type QuestionThemeAssignmentDto = z.infer<typeof QUESTION_THEME_ASSIGNMENT_DTO>;\n\nexport { QUESTION_THEME_ASSIGNMENT_DTO };"],"mappings":";;;AAIA,MAAM,gCAAgC,EAAE,aAAa;CACnD,OAAO,mBACJ,SAAS,0BAA0B;CACtC,WAAW,EAAE,SAAS,CACnB,SAAS,wEAAwE;CACpF,QAAQ,EAAE,SAAS,CAChB,SAAS,sEAAsE;CACnF,CAAC,CAAC,SAAS,8BAA8B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from "../../../domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs";
|
|
2
1
|
import { zIsoDateTime, zMongoId } from "../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
|
|
3
2
|
import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from "../shared/zod/validators/question.dto.zod.validators.mjs";
|
|
4
3
|
import { QUESTION_THEME_ASSIGNMENT_DTO } from "./question-theme-assignment/question-theme-assignment.dto.shape.mjs";
|
|
@@ -6,12 +5,11 @@ import { QUESTION_CONTENT_DTO } from "./question-content/question-content.dto.sh
|
|
|
6
5
|
import { QUESTION_REJECTION_DTO } from "../shared/question-rejection/question-rejection.dto.shape.mjs";
|
|
7
6
|
import { QUESTION_AUTHOR_DTO } from "../shared/question-author/question-author.dto.shape.mjs";
|
|
8
7
|
import { z } from "zod";
|
|
9
|
-
|
|
10
8
|
//#region ../../src/contexts/question/application/dto/question/question.dto.shape.ts
|
|
11
9
|
const QUESTION_DTO = z.strictObject({
|
|
12
10
|
id: zMongoId().describe("Question's unique identifier"),
|
|
13
11
|
category: zQuestionCategory(),
|
|
14
|
-
themes: z.array(QUESTION_THEME_ASSIGNMENT_DTO).min(
|
|
12
|
+
themes: z.array(QUESTION_THEME_ASSIGNMENT_DTO).min(1).max(3).describe("Question's themes"),
|
|
15
13
|
content: QUESTION_CONTENT_DTO,
|
|
16
14
|
cognitiveDifficulty: zQuestionCognitiveDifficulty(),
|
|
17
15
|
author: QUESTION_AUTHOR_DTO,
|
|
@@ -21,7 +19,7 @@ const QUESTION_DTO = z.strictObject({
|
|
|
21
19
|
createdAt: zIsoDateTime().describe("Question's creation date"),
|
|
22
20
|
updatedAt: zIsoDateTime().describe("Question's last update date")
|
|
23
21
|
});
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
23
|
export { QUESTION_DTO };
|
|
24
|
+
|
|
27
25
|
//# sourceMappingURL=question.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/application/dto/question/question.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zIsoDateTime, zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from \"@question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants\";\nimport { QUESTION_THEME_ASSIGNMENT_DTO } from \"@question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape\";\nimport { QUESTION_CONTENT_DTO } from \"@question/application/dto/question/question-content/question-content.dto.shape\";\nimport { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from \"@question/application/dto/shared/zod/validators/question.dto.zod.validators\";\nimport { QUESTION_REJECTION_DTO } from \"@question/application/dto/shared/question-rejection/question-rejection.dto.shape\";\nimport { QUESTION_AUTHOR_DTO } from \"@question/application/dto/shared/question-author/question-author.dto.shape\";\n\nconst QUESTION_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question's unique identifier\"),\n category: zQuestionCategory(),\n themes: z.array(QUESTION_THEME_ASSIGNMENT_DTO)\n .min(QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS)\n .max(QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS)\n .describe(\"Question's themes\"),\n content: QUESTION_CONTENT_DTO,\n cognitiveDifficulty: zQuestionCognitiveDifficulty(),\n author: QUESTION_AUTHOR_DTO,\n status: zQuestionStatus(),\n rejection: QUESTION_REJECTION_DTO\n .optional()\n .describe(\"Question's rejection details, if applicable\"),\n sourceUrls: zQuestionSourceUrls(),\n createdAt: zIsoDateTime()\n .describe(\"Question's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question's last update date\"),\n});\n\nexport type QuestionDto = z.infer<typeof QUESTION_DTO>;\n\nexport { QUESTION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/application/dto/question/question.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zIsoDateTime, zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from \"@question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants\";\nimport { QUESTION_THEME_ASSIGNMENT_DTO } from \"@question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape\";\nimport { QUESTION_CONTENT_DTO } from \"@question/application/dto/question/question-content/question-content.dto.shape\";\nimport { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from \"@question/application/dto/shared/zod/validators/question.dto.zod.validators\";\nimport { QUESTION_REJECTION_DTO } from \"@question/application/dto/shared/question-rejection/question-rejection.dto.shape\";\nimport { QUESTION_AUTHOR_DTO } from \"@question/application/dto/shared/question-author/question-author.dto.shape\";\n\nconst QUESTION_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question's unique identifier\"),\n category: zQuestionCategory(),\n themes: z.array(QUESTION_THEME_ASSIGNMENT_DTO)\n .min(QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS)\n .max(QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS)\n .describe(\"Question's themes\"),\n content: QUESTION_CONTENT_DTO,\n cognitiveDifficulty: zQuestionCognitiveDifficulty(),\n author: QUESTION_AUTHOR_DTO,\n status: zQuestionStatus(),\n rejection: QUESTION_REJECTION_DTO\n .optional()\n .describe(\"Question's rejection details, if applicable\"),\n sourceUrls: zQuestionSourceUrls(),\n createdAt: zIsoDateTime()\n .describe(\"Question's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question's last update date\"),\n});\n\nexport type QuestionDto = z.infer<typeof QUESTION_DTO>;\n\nexport { QUESTION_DTO };"],"mappings":";;;;;;;;AAWA,MAAM,eAAe,EAAE,aAAa;CAClC,IAAI,UAAU,CACX,SAAS,+BAA+B;CAC3C,UAAU,mBAAmB;CAC7B,QAAQ,EAAE,MAAM,8BAA8B,CAC3C,IAAA,EAAyC,CACzC,IAAA,EAAyC,CACzC,SAAS,oBAAoB;CAChC,SAAS;CACT,qBAAqB,8BAA8B;CACnD,QAAQ;CACR,QAAQ,iBAAiB;CACzB,WAAW,uBACR,UAAU,CACV,SAAS,8CAA8C;CAC1D,YAAY,qBAAqB;CACjC,WAAW,cAAc,CACtB,SAAS,2BAA2B;CACvC,WAAW,cAAc,CACtB,SAAS,8BAA8B;CAC3C,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QUESTION_CREATION_AUTHOR_ROLES } from "../../../../domain/value-objects/question-author/question-author.constants.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.ts
|
|
5
4
|
const QUESTION_AUTHOR_CREATION_DTO = z.object({
|
|
6
5
|
role: z.enum(QUESTION_CREATION_AUTHOR_ROLES).describe("Question's author role").meta({ example: QUESTION_CREATION_AUTHOR_ROLES[0] }),
|
|
7
|
-
name: z.string().trim().min(
|
|
6
|
+
name: z.string().trim().min(3).max(30).describe("Question author's name").meta({ example: "TriviaMaster3000" })
|
|
8
7
|
}).describe("Question's author");
|
|
9
|
-
|
|
10
8
|
//#endregion
|
|
11
9
|
export { QUESTION_AUTHOR_CREATION_DTO };
|
|
10
|
+
|
|
12
11
|
//# sourceMappingURL=question-author-creation.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-author-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { QUESTION_AUTHOR_NAME_MAX_LENGTH, QUESTION_AUTHOR_NAME_MIN_LENGTH, QUESTION_CREATION_AUTHOR_ROLES } from \"@question/domain/value-objects/question-author/question-author.constants\";\n\nconst QUESTION_AUTHOR_CREATION_DTO = z.object({\n role: z.enum(QUESTION_CREATION_AUTHOR_ROLES)\n .describe(\"Question's author role\")\n .meta({ example: QUESTION_CREATION_AUTHOR_ROLES[0] }),\n name: z.string()\n .trim()\n .min(QUESTION_AUTHOR_NAME_MIN_LENGTH)\n .max(QUESTION_AUTHOR_NAME_MAX_LENGTH)\n .describe(\"Question author's name\")\n .meta({ example: \"TriviaMaster3000\" }),\n}).describe(\"Question's author\");\n\nexport type QuestionAuthorCreationDto = z.infer<typeof QUESTION_AUTHOR_CREATION_DTO>;\n\nexport { QUESTION_AUTHOR_CREATION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-author-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { QUESTION_AUTHOR_NAME_MAX_LENGTH, QUESTION_AUTHOR_NAME_MIN_LENGTH, QUESTION_CREATION_AUTHOR_ROLES } from \"@question/domain/value-objects/question-author/question-author.constants\";\n\nconst QUESTION_AUTHOR_CREATION_DTO = z.object({\n role: z.enum(QUESTION_CREATION_AUTHOR_ROLES)\n .describe(\"Question's author role\")\n .meta({ example: QUESTION_CREATION_AUTHOR_ROLES[0] }),\n name: z.string()\n .trim()\n .min(QUESTION_AUTHOR_NAME_MIN_LENGTH)\n .max(QUESTION_AUTHOR_NAME_MAX_LENGTH)\n .describe(\"Question author's name\")\n .meta({ example: \"TriviaMaster3000\" }),\n}).describe(\"Question's author\");\n\nexport type QuestionAuthorCreationDto = z.infer<typeof QUESTION_AUTHOR_CREATION_DTO>;\n\nexport { QUESTION_AUTHOR_CREATION_DTO };"],"mappings":";;;AAIA,MAAM,+BAA+B,EAAE,OAAO;CAC5C,MAAM,EAAE,KAAK,+BAA+B,CACzC,SAAS,yBAAyB,CAClC,KAAK,EAAE,SAAS,+BAA+B,IAAI,CAAC;CACvD,MAAM,EAAE,QAAQ,CACb,MAAM,CACN,IAAA,EAAoC,CACpC,IAAA,GAAoC,CACpC,SAAS,yBAAyB,CAClC,KAAK,EAAE,SAAS,oBAAoB,CAAC;CACzC,CAAC,CAAC,SAAS,oBAAoB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { zLocalizedText, zLocalizedTexts } from "../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.ts
|
|
5
4
|
const QUESTION_CONTENT_CREATION_DTO = z.object({
|
|
6
5
|
statement: zLocalizedText().describe("Question statement"),
|
|
@@ -8,7 +7,7 @@ const QUESTION_CONTENT_CREATION_DTO = z.object({
|
|
|
8
7
|
context: zLocalizedText().optional().describe("Additional context for the question"),
|
|
9
8
|
trivia: zLocalizedTexts().optional().describe("Interesting trivia related to the question")
|
|
10
9
|
}).describe("Question's content");
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
11
|
export { QUESTION_CONTENT_CREATION_DTO };
|
|
12
|
+
|
|
14
13
|
//# sourceMappingURL=question-content-creation.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-content-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\n\nconst QUESTION_CONTENT_CREATION_DTO = z.object({\n statement: zLocalizedText()\n .describe(\"Question statement\"),\n answer: zLocalizedText()\n .describe(\"Question answer\"),\n context: zLocalizedText()\n .optional()\n .describe(\"Additional context for the question\"),\n trivia: zLocalizedTexts()\n .optional()\n .describe(\"Interesting trivia related to the question\"),\n}).describe(\"Question's content\");\n\nexport type QuestionContentCreationDto = z.infer<typeof QUESTION_CONTENT_CREATION_DTO>;\n\nexport { QUESTION_CONTENT_CREATION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-content-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\n\nconst QUESTION_CONTENT_CREATION_DTO = z.object({\n statement: zLocalizedText()\n .describe(\"Question statement\"),\n answer: zLocalizedText()\n .describe(\"Question answer\"),\n context: zLocalizedText()\n .optional()\n .describe(\"Additional context for the question\"),\n trivia: zLocalizedTexts()\n .optional()\n .describe(\"Interesting trivia related to the question\"),\n}).describe(\"Question's content\");\n\nexport type QuestionContentCreationDto = z.infer<typeof QUESTION_CONTENT_CREATION_DTO>;\n\nexport { QUESTION_CONTENT_CREATION_DTO };"],"mappings":";;;AAIA,MAAM,gCAAgC,EAAE,OAAO;CAC7C,WAAW,gBAAgB,CACxB,SAAS,qBAAqB;CACjC,QAAQ,gBAAgB,CACrB,SAAS,kBAAkB;CAC9B,SAAS,gBAAgB,CACtB,UAAU,CACV,SAAS,sCAAsC;CAClD,QAAQ,iBAAiB,CACtB,UAAU,CACV,SAAS,6CAA6C;CAC1D,CAAC,CAAC,SAAS,qBAAqB"}
|
package/dist/src/contexts/question/application/dto/question-creation/question-creation.dto.shape.mjs
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { areValuesUniqueByKey, hasExactlyOneByKey } from "../../../../../shared/application/dto/zod/refinements/array/array.zod.refinements.mjs";
|
|
2
|
-
import { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from "../../../domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs";
|
|
3
2
|
import { QUESTION_AUTHOR_CREATION_DTO } from "./question-author-creation/question-author-creation.dto.shape.mjs";
|
|
4
3
|
import { QUESTION_CONTENT_CREATION_DTO } from "./question-content-creation/question-content-creation.dto.shape.mjs";
|
|
5
4
|
import { QUESTION_THEME_ASSIGNMENT_CREATION_DTO } from "./question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs";
|
|
6
5
|
import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls } from "../shared/zod/validators/question.dto.zod.validators.mjs";
|
|
7
6
|
import { z } from "zod";
|
|
8
|
-
|
|
9
7
|
//#region ../../src/contexts/question/application/dto/question-creation/question-creation.dto.shape.ts
|
|
10
8
|
const QUESTION_CREATION_DTO = z.object({
|
|
11
9
|
category: zQuestionCategory(),
|
|
12
|
-
themes: z.array(QUESTION_THEME_ASSIGNMENT_CREATION_DTO).min(
|
|
10
|
+
themes: z.array(QUESTION_THEME_ASSIGNMENT_CREATION_DTO).min(1).max(3).refine((themes) => areValuesUniqueByKey(themes, "themeId"), { message: "Theme IDs must be unique" }).refine((themes) => hasExactlyOneByKey(themes, "isPrimary", true), { message: "There must be exactly one primary theme" }).describe("Question's themes"),
|
|
13
11
|
content: QUESTION_CONTENT_CREATION_DTO,
|
|
14
12
|
cognitiveDifficulty: zQuestionCognitiveDifficulty(),
|
|
15
13
|
author: QUESTION_AUTHOR_CREATION_DTO,
|
|
16
14
|
sourceUrls: zQuestionSourceUrls()
|
|
17
15
|
});
|
|
18
|
-
|
|
19
16
|
//#endregion
|
|
20
17
|
export { QUESTION_CREATION_DTO };
|
|
18
|
+
|
|
21
19
|
//# sourceMappingURL=question-creation.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/application/dto/question-creation/question-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { areValuesUniqueByKey, hasExactlyOneByKey } from \"@shared/application/dto/zod/refinements/array/array.zod.refinements\";\n\nimport { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from \"@question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants\";\nimport { QUESTION_AUTHOR_CREATION_DTO } from \"@question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape\";\nimport { QUESTION_CONTENT_CREATION_DTO } from \"@question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape\";\nimport { QUESTION_THEME_ASSIGNMENT_CREATION_DTO } from \"@question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape\";\nimport { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls } from \"@question/application/dto/shared/zod/validators/question.dto.zod.validators\";\n\nconst QUESTION_CREATION_DTO = z.object({\n category: zQuestionCategory(),\n themes: z.array(QUESTION_THEME_ASSIGNMENT_CREATION_DTO)\n .min(QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS)\n .max(QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS)\n .refine(themes => areValuesUniqueByKey(themes, \"themeId\"), { message: \"Theme IDs must be unique\" })\n .refine(themes => hasExactlyOneByKey(themes, \"isPrimary\", true), { message: \"There must be exactly one primary theme\" })\n .describe(\"Question's themes\"),\n content: QUESTION_CONTENT_CREATION_DTO,\n cognitiveDifficulty: zQuestionCognitiveDifficulty(),\n author: QUESTION_AUTHOR_CREATION_DTO,\n sourceUrls: zQuestionSourceUrls(),\n});\n\nexport type QuestionCreationDto = z.infer<typeof QUESTION_CREATION_DTO>;\n\nexport { QUESTION_CREATION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/application/dto/question-creation/question-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { areValuesUniqueByKey, hasExactlyOneByKey } from \"@shared/application/dto/zod/refinements/array/array.zod.refinements\";\n\nimport { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS } from \"@question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants\";\nimport { QUESTION_AUTHOR_CREATION_DTO } from \"@question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape\";\nimport { QUESTION_CONTENT_CREATION_DTO } from \"@question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape\";\nimport { QUESTION_THEME_ASSIGNMENT_CREATION_DTO } from \"@question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape\";\nimport { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls } from \"@question/application/dto/shared/zod/validators/question.dto.zod.validators\";\n\nconst QUESTION_CREATION_DTO = z.object({\n category: zQuestionCategory(),\n themes: z.array(QUESTION_THEME_ASSIGNMENT_CREATION_DTO)\n .min(QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS)\n .max(QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS)\n .refine(themes => areValuesUniqueByKey(themes, \"themeId\"), { message: \"Theme IDs must be unique\" })\n .refine(themes => hasExactlyOneByKey(themes, \"isPrimary\", true), { message: \"There must be exactly one primary theme\" })\n .describe(\"Question's themes\"),\n content: QUESTION_CONTENT_CREATION_DTO,\n cognitiveDifficulty: zQuestionCognitiveDifficulty(),\n author: QUESTION_AUTHOR_CREATION_DTO,\n sourceUrls: zQuestionSourceUrls(),\n});\n\nexport type QuestionCreationDto = z.infer<typeof QUESTION_CREATION_DTO>;\n\nexport { QUESTION_CREATION_DTO };"],"mappings":";;;;;;;AAUA,MAAM,wBAAwB,EAAE,OAAO;CACrC,UAAU,mBAAmB;CAC7B,QAAQ,EAAE,MAAM,uCAAuC,CACpD,IAAA,EAAyC,CACzC,IAAA,EAAyC,CACzC,QAAO,WAAU,qBAAqB,QAAQ,UAAU,EAAE,EAAE,SAAS,4BAA4B,CAAC,CAClG,QAAO,WAAU,mBAAmB,QAAQ,aAAa,KAAK,EAAE,EAAE,SAAS,2CAA2C,CAAC,CACvH,SAAS,oBAAoB;CAChC,SAAS;CACT,qBAAqB,8BAA8B;CACnD,QAAQ;CACR,YAAY,qBAAqB;CAClC,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { zMongoId } from "../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.ts
|
|
5
4
|
const QUESTION_THEME_ASSIGNMENT_CREATION_DTO = z.object({
|
|
6
5
|
themeId: zMongoId().describe("The ID of the theme to assign to the question"),
|
|
7
6
|
isPrimary: z.boolean().describe("Indicates if the assigned theme is the primary theme for the question. Only one primary theme is allowed per question"),
|
|
8
7
|
isHint: z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer")
|
|
9
8
|
});
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
10
|
export { QUESTION_THEME_ASSIGNMENT_CREATION_DTO };
|
|
11
|
+
|
|
13
12
|
//# sourceMappingURL=question-theme-assignment-creation.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-assignment-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nconst QUESTION_THEME_ASSIGNMENT_CREATION_DTO = z.object({\n themeId: zMongoId()\n .describe(\"The ID of the theme to assign to the question\"),\n isPrimary: z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question. Only one primary theme is allowed per question\"),\n isHint: z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\"),\n});\n\nexport type QuestionThemeAssignmentCreationDto = z.infer<typeof QUESTION_THEME_ASSIGNMENT_CREATION_DTO>;\n\nexport { QUESTION_THEME_ASSIGNMENT_CREATION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-theme-assignment-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nconst QUESTION_THEME_ASSIGNMENT_CREATION_DTO = z.object({\n themeId: zMongoId()\n .describe(\"The ID of the theme to assign to the question\"),\n isPrimary: z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question. Only one primary theme is allowed per question\"),\n isHint: z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\"),\n});\n\nexport type QuestionThemeAssignmentCreationDto = z.infer<typeof QUESTION_THEME_ASSIGNMENT_CREATION_DTO>;\n\nexport { QUESTION_THEME_ASSIGNMENT_CREATION_DTO };"],"mappings":";;;AAIA,MAAM,yCAAyC,EAAE,OAAO;CACtD,SAAS,UAAU,CAChB,SAAS,gDAAgD;CAC5D,WAAW,EAAE,SAAS,CACnB,SAAS,wHAAwH;CACpI,QAAQ,EAAE,SAAS,CAChB,SAAS,sEAAsE;CACnF,CAAC"}
|
|
@@ -2,14 +2,13 @@ import { QUESTION_AUTHOR_ROLES } from "../../../../domain/value-objects/question
|
|
|
2
2
|
import { zMongoId } from "../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
|
|
3
3
|
import { isGameIdSetOnGameRole } from "../zod/refinements/question-author/question-author.dto.zod.refinement.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
6
5
|
//#region ../../src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.ts
|
|
7
6
|
const QUESTION_AUTHOR_DTO = z.strictObject({
|
|
8
7
|
role: z.enum(QUESTION_AUTHOR_ROLES).describe("Question's author role").meta({ example: QUESTION_AUTHOR_ROLES[0] }),
|
|
9
8
|
gameId: zMongoId().optional().describe("Game's unique identifier, if the author is a game"),
|
|
10
9
|
name: z.string().optional().describe("Question author's name, if applicable").meta({ example: "TriviaMaster3000" })
|
|
11
10
|
}).refine(isGameIdSetOnGameRole, { error: "Game ID must be set if and only if the author role is 'game'." }).describe("Question's author");
|
|
12
|
-
|
|
13
11
|
//#endregion
|
|
14
12
|
export { QUESTION_AUTHOR_DTO };
|
|
13
|
+
|
|
15
14
|
//# sourceMappingURL=question-author.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-author.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { isGameIdSetOnGameRole } from \"@question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement\";\nimport { QUESTION_AUTHOR_ROLES } from \"@question/domain/value-objects/question-author/question-author.constants\";\n\nconst QUESTION_AUTHOR_DTO = z.strictObject({\n role: z.enum(QUESTION_AUTHOR_ROLES)\n .describe(\"Question's author role\")\n .meta({ example: QUESTION_AUTHOR_ROLES[0] }),\n gameId: zMongoId()\n .optional()\n .describe(\"Game's unique identifier, if the author is a game\"),\n name: z.string()\n .optional()\n .describe(\"Question author's name, if applicable\")\n .meta({ example: \"TriviaMaster3000\" }),\n}).refine(isGameIdSetOnGameRole, { error: \"Game ID must be set if and only if the author role is 'game'.\" })\n .describe(\"Question's author\");\n\nexport type QuestionAuthorDto = z.infer<typeof QUESTION_AUTHOR_DTO>;\n\nexport { QUESTION_AUTHOR_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-author.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { isGameIdSetOnGameRole } from \"@question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement\";\nimport { QUESTION_AUTHOR_ROLES } from \"@question/domain/value-objects/question-author/question-author.constants\";\n\nconst QUESTION_AUTHOR_DTO = z.strictObject({\n role: z.enum(QUESTION_AUTHOR_ROLES)\n .describe(\"Question's author role\")\n .meta({ example: QUESTION_AUTHOR_ROLES[0] }),\n gameId: zMongoId()\n .optional()\n .describe(\"Game's unique identifier, if the author is a game\"),\n name: z.string()\n .optional()\n .describe(\"Question author's name, if applicable\")\n .meta({ example: \"TriviaMaster3000\" }),\n}).refine(isGameIdSetOnGameRole, { error: \"Game ID must be set if and only if the author role is 'game'.\" })\n .describe(\"Question's author\");\n\nexport type QuestionAuthorDto = z.infer<typeof QUESTION_AUTHOR_DTO>;\n\nexport { QUESTION_AUTHOR_DTO };"],"mappings":";;;;;AAOA,MAAM,sBAAsB,EAAE,aAAa;CACzC,MAAM,EAAE,KAAK,sBAAsB,CAChC,SAAS,yBAAyB,CAClC,KAAK,EAAE,SAAS,sBAAsB,IAAI,CAAC;CAC9C,QAAQ,UAAU,CACf,UAAU,CACV,SAAS,oDAAoD;CAChE,MAAM,EAAE,QAAQ,CACb,UAAU,CACV,SAAS,wCAAwC,CACjD,KAAK,EAAE,SAAS,oBAAoB,CAAC;CACzC,CAAC,CAAC,OAAO,uBAAuB,EAAE,OAAO,iEAAiE,CAAC,CACzG,SAAS,oBAAoB"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { QUESTION_REJECTION_TYPES } from "../../../../domain/value-objects/question-rejection/question-rejection.constants.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
3
|
//#region ../../src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.ts
|
|
5
4
|
const QUESTION_REJECTION_DTO = z.strictObject({
|
|
6
5
|
type: z.enum(QUESTION_REJECTION_TYPES).describe("Question rejection's type").meta({ example: QUESTION_REJECTION_TYPES[0] }),
|
|
7
6
|
comment: z.string().optional().describe("Comment explaining the reason for rejection").meta({ example: "The question is too ambiguous." })
|
|
8
7
|
}).describe("Question rejection details");
|
|
9
|
-
|
|
10
8
|
//#endregion
|
|
11
9
|
export { QUESTION_REJECTION_DTO };
|
|
10
|
+
|
|
12
11
|
//# sourceMappingURL=question-rejection.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-rejection.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { QUESTION_REJECTION_TYPES } from \"@question/domain/value-objects/question-rejection/question-rejection.constants\";\n\nconst QUESTION_REJECTION_DTO = z.strictObject({\n type: z.enum(QUESTION_REJECTION_TYPES)\n .describe(\"Question rejection's type\")\n .meta({ example: QUESTION_REJECTION_TYPES[0] }),\n comment: z.string()\n .optional()\n .describe(\"Comment explaining the reason for rejection\")\n .meta({ example: \"The question is too ambiguous.\" }),\n}).describe(\"Question rejection details\");\n\nexport type QuestionRejectionDto = z.infer<typeof QUESTION_REJECTION_DTO>;\n\nexport { QUESTION_REJECTION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-rejection.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { QUESTION_REJECTION_TYPES } from \"@question/domain/value-objects/question-rejection/question-rejection.constants\";\n\nconst QUESTION_REJECTION_DTO = z.strictObject({\n type: z.enum(QUESTION_REJECTION_TYPES)\n .describe(\"Question rejection's type\")\n .meta({ example: QUESTION_REJECTION_TYPES[0] }),\n comment: z.string()\n .optional()\n .describe(\"Comment explaining the reason for rejection\")\n .meta({ example: \"The question is too ambiguous.\" }),\n}).describe(\"Question rejection details\");\n\nexport type QuestionRejectionDto = z.infer<typeof QUESTION_REJECTION_DTO>;\n\nexport { QUESTION_REJECTION_DTO };"],"mappings":";;;AAIA,MAAM,yBAAyB,EAAE,aAAa;CAC5C,MAAM,EAAE,KAAK,yBAAyB,CACnC,SAAS,4BAA4B,CACrC,KAAK,EAAE,SAAS,yBAAyB,IAAI,CAAC;CACjD,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,8CAA8C,CACvD,KAAK,EAAE,SAAS,kCAAkC,CAAC;CACvD,CAAC,CAAC,SAAS,6BAA6B"}
|
|
@@ -4,7 +4,7 @@ function isGameIdSetOnGameRole(questionAuthorDtoZodRefinement) {
|
|
|
4
4
|
if (role === "game") return typeof gameId === "string" && gameId.length > 0;
|
|
5
5
|
return gameId === void 0;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
7
|
//#endregion
|
|
9
8
|
export { isGameIdSetOnGameRole };
|
|
9
|
+
|
|
10
10
|
//# sourceMappingURL=question-author.dto.zod.refinement.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-author.dto.zod.refinement.mjs","names":[],"sources":["../../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement.ts"],"sourcesContent":["import type { QuestionAuthorRole } from \"@question/domain/value-objects/question-author/question-author.types\";\n\ntype QuestionAuthorDtoZodRefinement = {\n role: QuestionAuthorRole;\n gameId?: string;\n name?: string;\n};\n\nfunction isGameIdSetOnGameRole(questionAuthorDtoZodRefinement: QuestionAuthorDtoZodRefinement): boolean {\n const { role, gameId } = questionAuthorDtoZodRefinement;\n if (role === \"game\") {\n return typeof gameId === \"string\" && gameId.length > 0;\n }\n return gameId === undefined;\n}\n\nexport {\n isGameIdSetOnGameRole,\n};"],"mappings":";AAQA,SAAS,sBAAsB,gCAAyE;CACtG,MAAM,EAAE,MAAM,WAAW;AACzB,KAAI,SAAS,OACX,QAAO,OAAO,WAAW,YAAY,OAAO,SAAS;AAEvD,QAAO,WAAW"}
|
|
1
|
+
{"version":3,"file":"question-author.dto.zod.refinement.mjs","names":[],"sources":["../../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement.ts"],"sourcesContent":["import type { QuestionAuthorRole } from \"@question/domain/value-objects/question-author/question-author.types\";\n\ntype QuestionAuthorDtoZodRefinement = {\n role: QuestionAuthorRole;\n gameId?: string;\n name?: string;\n};\n\nfunction isGameIdSetOnGameRole(questionAuthorDtoZodRefinement: QuestionAuthorDtoZodRefinement): boolean {\n const { role, gameId } = questionAuthorDtoZodRefinement;\n if (role === \"game\") {\n return typeof gameId === \"string\" && gameId.length > 0;\n }\n return gameId === undefined;\n}\n\nexport {\n isGameIdSetOnGameRole,\n};"],"mappings":";AAQA,SAAS,sBAAsB,gCAAyE;CACtG,MAAM,EAAE,MAAM,WAAW;AACzB,KAAI,SAAS,OACX,QAAO,OAAO,WAAW,YAAY,OAAO,SAAS;AAEvD,QAAO,WAAW,KAAA"}
|
|
@@ -2,9 +2,7 @@ import { QUESTION_COGNITIVE_DIFFICULTIES } from "../../../../../domain/value-obj
|
|
|
2
2
|
import { QUESTION_CATEGORIES } from "../../../../../domain/value-objects/question-category/question-category.constants.mjs";
|
|
3
3
|
import { QUESTION_STATUSES } from "../../../../../domain/value-objects/question-status/question-status.constants.mjs";
|
|
4
4
|
import { areValuesUniqueFromStrings } from "../../../../../../../shared/application/dto/zod/refinements/array/array.zod.refinements.mjs";
|
|
5
|
-
import { QUESTION_SOURCE_URLS_MAX_ITEMS, QUESTION_SOURCE_URLS_MIN_ITEMS } from "../../../../../domain/value-objects/question-source-urls/question-source-urls.constants.mjs";
|
|
6
5
|
import { z } from "zod";
|
|
7
|
-
|
|
8
6
|
//#region ../../src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.ts
|
|
9
7
|
function zQuestionCognitiveDifficulty() {
|
|
10
8
|
return z.enum(QUESTION_COGNITIVE_DIFFICULTIES).describe("Question's cognitive difficulty level");
|
|
@@ -16,9 +14,9 @@ function zQuestionCategory() {
|
|
|
16
14
|
return z.enum(QUESTION_CATEGORIES).describe("Question's category");
|
|
17
15
|
}
|
|
18
16
|
function zQuestionSourceUrls() {
|
|
19
|
-
return z.array(z.url()).min(
|
|
17
|
+
return z.array(z.url()).min(1).max(5).refine(areValuesUniqueFromStrings, { message: "Source URLs must be unique" }).describe("List of unique source URLs for the question").meta({ example: ["https://example.com/source1", "https://example.com/source2"] });
|
|
20
18
|
}
|
|
21
|
-
|
|
22
19
|
//#endregion
|
|
23
20
|
export { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus };
|
|
21
|
+
|
|
24
22
|
//# sourceMappingURL=question.dto.zod.validators.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.dto.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { areValuesUniqueFromStrings } from \"@shared/application/dto/zod/refinements/array/array.zod.refinements\";\n\nimport { QUESTION_CATEGORIES } from \"@question/domain/value-objects/question-category/question-category.constants\";\nimport { QUESTION_SOURCE_URLS_MAX_ITEMS, QUESTION_SOURCE_URLS_MIN_ITEMS } from \"@question/domain/value-objects/question-source-urls/question-source-urls.constants\";\nimport { QUESTION_STATUSES } from \"@question/domain/value-objects/question-status/question-status.constants\";\nimport { QUESTION_COGNITIVE_DIFFICULTIES } from \"@question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants\";\n\nimport type { ZodEnum, ZodURL, ZodArray } from \"zod\";\n\nimport type { QuestionCategoryEnum } from \"@question/domain/value-objects/question-category/question-category.types\";\nimport type { QuestionStatusEnum } from \"@question/domain/value-objects/question-status/question-status.types\";\nimport type { QuestionCognitiveDifficultyEnum } from \"@question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types\";\n\nfunction zQuestionCognitiveDifficulty(): ZodEnum<QuestionCognitiveDifficultyEnum> {\n return z.enum(QUESTION_COGNITIVE_DIFFICULTIES)\n .describe(\"Question's cognitive difficulty level\");\n}\n\nfunction zQuestionStatus(): ZodEnum<QuestionStatusEnum> {\n return z.enum(QUESTION_STATUSES)\n .describe(\"Question's status\");\n}\n\nfunction zQuestionCategory(): ZodEnum<QuestionCategoryEnum> {\n return z.enum(QUESTION_CATEGORIES)\n .describe(\"Question's category\");\n}\n\nfunction zQuestionSourceUrls(): ZodArray<ZodURL> {\n return z.array(z.url())\n .min(QUESTION_SOURCE_URLS_MIN_ITEMS)\n .max(QUESTION_SOURCE_URLS_MAX_ITEMS)\n .refine(areValuesUniqueFromStrings, { message: \"Source URLs must be unique\" })\n .describe(\"List of unique source URLs for the question\")\n .meta({ example: [\"https://example.com/source1\", \"https://example.com/source2\"] });\n}\n\nexport {\n zQuestionCognitiveDifficulty,\n zQuestionStatus,\n zQuestionCategory,\n zQuestionSourceUrls,\n};"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question.dto.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { areValuesUniqueFromStrings } from \"@shared/application/dto/zod/refinements/array/array.zod.refinements\";\n\nimport { QUESTION_CATEGORIES } from \"@question/domain/value-objects/question-category/question-category.constants\";\nimport { QUESTION_SOURCE_URLS_MAX_ITEMS, QUESTION_SOURCE_URLS_MIN_ITEMS } from \"@question/domain/value-objects/question-source-urls/question-source-urls.constants\";\nimport { QUESTION_STATUSES } from \"@question/domain/value-objects/question-status/question-status.constants\";\nimport { QUESTION_COGNITIVE_DIFFICULTIES } from \"@question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants\";\n\nimport type { ZodEnum, ZodURL, ZodArray } from \"zod\";\n\nimport type { QuestionCategoryEnum } from \"@question/domain/value-objects/question-category/question-category.types\";\nimport type { QuestionStatusEnum } from \"@question/domain/value-objects/question-status/question-status.types\";\nimport type { QuestionCognitiveDifficultyEnum } from \"@question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types\";\n\nfunction zQuestionCognitiveDifficulty(): ZodEnum<QuestionCognitiveDifficultyEnum> {\n return z.enum(QUESTION_COGNITIVE_DIFFICULTIES)\n .describe(\"Question's cognitive difficulty level\");\n}\n\nfunction zQuestionStatus(): ZodEnum<QuestionStatusEnum> {\n return z.enum(QUESTION_STATUSES)\n .describe(\"Question's status\");\n}\n\nfunction zQuestionCategory(): ZodEnum<QuestionCategoryEnum> {\n return z.enum(QUESTION_CATEGORIES)\n .describe(\"Question's category\");\n}\n\nfunction zQuestionSourceUrls(): ZodArray<ZodURL> {\n return z.array(z.url())\n .min(QUESTION_SOURCE_URLS_MIN_ITEMS)\n .max(QUESTION_SOURCE_URLS_MAX_ITEMS)\n .refine(areValuesUniqueFromStrings, { message: \"Source URLs must be unique\" })\n .describe(\"List of unique source URLs for the question\")\n .meta({ example: [\"https://example.com/source1\", \"https://example.com/source2\"] });\n}\n\nexport {\n zQuestionCognitiveDifficulty,\n zQuestionStatus,\n zQuestionCategory,\n zQuestionSourceUrls,\n};"],"mappings":";;;;;;AAeA,SAAS,+BAAyE;AAChF,QAAO,EAAE,KAAK,gCAAgC,CAC3C,SAAS,wCAAwC;;AAGtD,SAAS,kBAA+C;AACtD,QAAO,EAAE,KAAK,kBAAkB,CAC7B,SAAS,oBAAoB;;AAGlC,SAAS,oBAAmD;AAC1D,QAAO,EAAE,KAAK,oBAAoB,CAC/B,SAAS,sBAAsB;;AAGpC,SAAS,sBAAwC;AAC/C,QAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CACpB,IAAA,EAAmC,CACnC,IAAA,EAAmC,CACnC,OAAO,4BAA4B,EAAE,SAAS,8BAA8B,CAAC,CAC7E,SAAS,8CAA8C,CACvD,KAAK,EAAE,SAAS,CAAC,+BAA+B,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
//#region ../../src/contexts/question/domain/value-objects/question-author/question-author.constants.ts
|
|
2
2
|
const QUESTION_AUTHOR_ROLE_ADMIN = "admin";
|
|
3
|
-
const QUESTION_AUTHOR_ROLE_GAME = "game";
|
|
4
|
-
const QUESTION_AUTHOR_ROLE_AI = "ai";
|
|
5
3
|
const QUESTION_AUTHOR_ROLES = [
|
|
6
4
|
QUESTION_AUTHOR_ROLE_ADMIN,
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"game",
|
|
6
|
+
"ai"
|
|
9
7
|
];
|
|
10
|
-
const QUESTION_CREATION_AUTHOR_ROLES = [QUESTION_AUTHOR_ROLE_ADMIN,
|
|
11
|
-
const QUESTION_AUTHOR_NAME_MIN_LENGTH = 3;
|
|
12
|
-
const QUESTION_AUTHOR_NAME_MAX_LENGTH = 30;
|
|
13
|
-
|
|
8
|
+
const QUESTION_CREATION_AUTHOR_ROLES = [QUESTION_AUTHOR_ROLE_ADMIN, "ai"];
|
|
14
9
|
//#endregion
|
|
15
|
-
export {
|
|
10
|
+
export { QUESTION_AUTHOR_ROLES, QUESTION_CREATION_AUTHOR_ROLES };
|
|
11
|
+
|
|
16
12
|
//# sourceMappingURL=question-author.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-author.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-author/question-author.constants.ts"],"sourcesContent":["const QUESTION_AUTHOR_ROLE_ADMIN = \"admin\";\nconst QUESTION_AUTHOR_ROLE_GAME = \"game\";\nconst QUESTION_AUTHOR_ROLE_AI = \"ai\";\n\nconst QUESTION_AUTHOR_ROLES = [\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_GAME,\n QUESTION_AUTHOR_ROLE_AI,\n] as const satisfies readonly string[];\n\nconst QUESTION_CREATION_AUTHOR_ROLES = [\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_AI,\n] as const satisfies readonly string[];\n\nconst QUESTION_AUTHOR_NAME_MIN_LENGTH = 3;\n\nconst QUESTION_AUTHOR_NAME_MAX_LENGTH = 30;\n\nexport {\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_GAME,\n QUESTION_AUTHOR_ROLE_AI,\n QUESTION_AUTHOR_ROLES,\n QUESTION_CREATION_AUTHOR_ROLES,\n QUESTION_AUTHOR_NAME_MIN_LENGTH,\n QUESTION_AUTHOR_NAME_MAX_LENGTH,\n};"],"mappings":";AAAA,MAAM,6BAA6B;
|
|
1
|
+
{"version":3,"file":"question-author.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-author/question-author.constants.ts"],"sourcesContent":["const QUESTION_AUTHOR_ROLE_ADMIN = \"admin\";\nconst QUESTION_AUTHOR_ROLE_GAME = \"game\";\nconst QUESTION_AUTHOR_ROLE_AI = \"ai\";\n\nconst QUESTION_AUTHOR_ROLES = [\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_GAME,\n QUESTION_AUTHOR_ROLE_AI,\n] as const satisfies readonly string[];\n\nconst QUESTION_CREATION_AUTHOR_ROLES = [\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_AI,\n] as const satisfies readonly string[];\n\nconst QUESTION_AUTHOR_NAME_MIN_LENGTH = 3;\n\nconst QUESTION_AUTHOR_NAME_MAX_LENGTH = 30;\n\nexport {\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_GAME,\n QUESTION_AUTHOR_ROLE_AI,\n QUESTION_AUTHOR_ROLES,\n QUESTION_CREATION_AUTHOR_ROLES,\n QUESTION_AUTHOR_NAME_MIN_LENGTH,\n QUESTION_AUTHOR_NAME_MAX_LENGTH,\n};"],"mappings":";AAAA,MAAM,6BAA6B;AAInC,MAAM,wBAAwB;CAC5B;CAJgC;;CAOjC;AAED,MAAM,iCAAiC,CACrC,4BAAA,KAED"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-status/question-status.constants.ts
|
|
2
|
-
const QUESTION_STATUS_PENDING = "pending";
|
|
3
|
-
const QUESTION_STATUS_ACTIVE = "active";
|
|
4
|
-
const QUESTION_STATUS_ARCHIVED = "archived";
|
|
5
|
-
const QUESTION_STATUS_REJECTED = "rejected";
|
|
6
1
|
const QUESTION_STATUSES = [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"pending",
|
|
3
|
+
"active",
|
|
4
|
+
"archived",
|
|
5
|
+
"rejected"
|
|
11
6
|
];
|
|
12
|
-
|
|
13
7
|
//#endregion
|
|
14
8
|
export { QUESTION_STATUSES };
|
|
9
|
+
|
|
15
10
|
//# sourceMappingURL=question-status.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-status.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-status/question-status.constants.ts"],"sourcesContent":["const QUESTION_STATUS_PENDING = \"pending\";\nconst QUESTION_STATUS_ACTIVE = \"active\";\nconst QUESTION_STATUS_ARCHIVED = \"archived\";\nconst QUESTION_STATUS_REJECTED = \"rejected\";\n\nconst QUESTION_STATUSES = [\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n QUESTION_STATUS_ARCHIVED,\n QUESTION_STATUS_REJECTED,\n] as const satisfies readonly string[];\n\nconst QUESTION_CREATION_STATUSES = [\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n QUESTION_STATUS_ARCHIVED,\n QUESTION_STATUS_REJECTED,\n QUESTION_STATUSES,\n QUESTION_CREATION_STATUSES,\n};"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-status.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-status/question-status.constants.ts"],"sourcesContent":["const QUESTION_STATUS_PENDING = \"pending\";\nconst QUESTION_STATUS_ACTIVE = \"active\";\nconst QUESTION_STATUS_ARCHIVED = \"archived\";\nconst QUESTION_STATUS_REJECTED = \"rejected\";\n\nconst QUESTION_STATUSES = [\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n QUESTION_STATUS_ARCHIVED,\n QUESTION_STATUS_REJECTED,\n] as const satisfies readonly string[];\n\nconst QUESTION_CREATION_STATUSES = [\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n QUESTION_STATUS_ARCHIVED,\n QUESTION_STATUS_REJECTED,\n QUESTION_STATUSES,\n QUESTION_CREATION_STATUSES,\n};"],"mappings":"AAKA,MAAM,oBAAoB;CALM;CACD;CACE;CACA;CAOhC"}
|
|
@@ -3,7 +3,6 @@ import { zIsoDateTime, zMongoId, zSlug } from "../../../../../../../shared/infra
|
|
|
3
3
|
import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
|
|
4
4
|
import { QUESTION_THEME_STATUSES } from "../../../domain/value-objects/question-theme-status/question-theme-status.constants.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
|
|
7
6
|
//#region ../../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.ts
|
|
8
7
|
const ADMIN_QUESTION_THEME_DTO = z.strictObject({
|
|
9
8
|
id: zMongoId().describe("Question Theme's unique identifier"),
|
|
@@ -15,7 +14,7 @@ const ADMIN_QUESTION_THEME_DTO = z.strictObject({
|
|
|
15
14
|
createdAt: zIsoDateTime().describe("Question Theme's creation date"),
|
|
16
15
|
updatedAt: zIsoDateTime().describe("Question Theme's last update date")
|
|
17
16
|
});
|
|
18
|
-
|
|
19
17
|
//#endregion
|
|
20
18
|
export { ADMIN_QUESTION_THEME_DTO };
|
|
19
|
+
|
|
21
20
|
//# sourceMappingURL=admin-question-theme.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-question-theme.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zIsoDateTime, zMongoId, zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\nimport { QUESTION_THEME_STATUSES } from \"@question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants\";\n\nconst ADMIN_QUESTION_THEME_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question Theme's unique identifier\"),\n slug: zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: zLocalizedText()\n .describe(\"Question Theme's label in supported locales\"),\n aliases: zLocalizedTexts()\n .describe(\"Question Theme's aliases in supported locales. Help to find the theme with different keywords\"),\n description: zLocalizedText()\n .describe(\"Question Theme's description in supported locales\"),\n status: z.enum(QUESTION_THEME_STATUSES)\n .describe(\"Question Theme's status\")\n .meta({ example: QUESTION_THEME_STATUSES[0] }),\n createdAt: zIsoDateTime()\n .describe(\"Question Theme's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question Theme's last update date\"),\n});\n\nexport type AdminQuestionThemeDto = z.infer<typeof ADMIN_QUESTION_THEME_DTO>;\n\nexport { ADMIN_QUESTION_THEME_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-question-theme.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zIsoDateTime, zMongoId, zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\nimport { QUESTION_THEME_STATUSES } from \"@question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants\";\n\nconst ADMIN_QUESTION_THEME_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question Theme's unique identifier\"),\n slug: zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: zLocalizedText()\n .describe(\"Question Theme's label in supported locales\"),\n aliases: zLocalizedTexts()\n .describe(\"Question Theme's aliases in supported locales. Help to find the theme with different keywords\"),\n description: zLocalizedText()\n .describe(\"Question Theme's description in supported locales\"),\n status: z.enum(QUESTION_THEME_STATUSES)\n .describe(\"Question Theme's status\")\n .meta({ example: QUESTION_THEME_STATUSES[0] }),\n createdAt: zIsoDateTime()\n .describe(\"Question Theme's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question Theme's last update date\"),\n});\n\nexport type AdminQuestionThemeDto = z.infer<typeof ADMIN_QUESTION_THEME_DTO>;\n\nexport { ADMIN_QUESTION_THEME_DTO };"],"mappings":";;;;;;AAQA,MAAM,2BAA2B,EAAE,aAAa;CAC9C,IAAI,UAAU,CACX,SAAS,qCAAqC;CACjD,MAAM,OAAO,CACV,SAAS,6CAA6C,CACtD,KAAK,EAAE,SAAS,6BAA6B,CAAC;CACjD,OAAO,gBAAgB,CACpB,SAAS,8CAA8C;CAC1D,SAAS,iBAAiB,CACvB,SAAS,gGAAgG;CAC5G,aAAa,gBAAgB,CAC1B,SAAS,oDAAoD;CAChE,QAAQ,EAAE,KAAK,wBAAwB,CACpC,SAAS,0BAA0B,CACnC,KAAK,EAAE,SAAS,wBAAwB,IAAI,CAAC;CAChD,WAAW,cAAc,CACtB,SAAS,iCAAiC;CAC7C,WAAW,cAAc,CACtB,SAAS,oCAAoC;CACjD,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { zIsoDateTime, zMongoId, zSlug } from "../../../../../../../shared/infra
|
|
|
2
2
|
import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
|
|
3
3
|
import { QUESTION_THEME_STATUSES } from "../../../domain/value-objects/question-theme-status/question-theme-status.constants.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
6
5
|
//#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.ts
|
|
7
6
|
const QUESTION_THEME_DTO = z.strictObject({
|
|
8
7
|
id: zMongoId().describe("Question Theme's unique identifier"),
|
|
@@ -18,7 +17,7 @@ const QUESTION_THEME_DTO = z.strictObject({
|
|
|
18
17
|
createdAt: zIsoDateTime().describe("Question Theme's creation date"),
|
|
19
18
|
updatedAt: zIsoDateTime().describe("Question Theme's last update date")
|
|
20
19
|
});
|
|
21
|
-
|
|
22
20
|
//#endregion
|
|
23
21
|
export { QUESTION_THEME_DTO };
|
|
22
|
+
|
|
24
23
|
//# sourceMappingURL=question-theme.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zIsoDateTime, zMongoId, zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\nimport { QUESTION_THEME_STATUSES } from \"@question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants\";\n\nconst QUESTION_THEME_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question Theme's unique identifier\"),\n slug: zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: z.string()\n .describe(\"Question Theme's translated label\")\n .meta({ example: \"History\" }),\n aliases: z.array(z.string())\n .describe(\"Question Theme's translated aliases. Help to find the theme with different keywords\")\n .meta({ example: [\"Historical Events\", \"Past\", \"Future\"] }),\n description: z.string()\n .describe(\"Question Theme's translated description\")\n .meta({ example: \"Questions related to historical events and timelines.\" }),\n status: z.enum(QUESTION_THEME_STATUSES)\n .describe(\"Question Theme's status\")\n .meta({ example: QUESTION_THEME_STATUSES[0] }),\n createdAt: zIsoDateTime()\n .describe(\"Question Theme's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question Theme's last update date\"),\n});\n\nexport type QuestionThemeDto = z.infer<typeof QUESTION_THEME_DTO>;\n\nexport { QUESTION_THEME_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-theme.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zIsoDateTime, zMongoId, zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\nimport { QUESTION_THEME_STATUSES } from \"@question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants\";\n\nconst QUESTION_THEME_DTO = z.strictObject({\n id: zMongoId()\n .describe(\"Question Theme's unique identifier\"),\n slug: zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: z.string()\n .describe(\"Question Theme's translated label\")\n .meta({ example: \"History\" }),\n aliases: z.array(z.string())\n .describe(\"Question Theme's translated aliases. Help to find the theme with different keywords\")\n .meta({ example: [\"Historical Events\", \"Past\", \"Future\"] }),\n description: z.string()\n .describe(\"Question Theme's translated description\")\n .meta({ example: \"Questions related to historical events and timelines.\" }),\n status: z.enum(QUESTION_THEME_STATUSES)\n .describe(\"Question Theme's status\")\n .meta({ example: QUESTION_THEME_STATUSES[0] }),\n createdAt: zIsoDateTime()\n .describe(\"Question Theme's creation date\"),\n updatedAt: zIsoDateTime()\n .describe(\"Question Theme's last update date\"),\n});\n\nexport type QuestionThemeDto = z.infer<typeof QUESTION_THEME_DTO>;\n\nexport { QUESTION_THEME_DTO };"],"mappings":";;;;;AAOA,MAAM,qBAAqB,EAAE,aAAa;CACxC,IAAI,UAAU,CACX,SAAS,qCAAqC;CACjD,MAAM,OAAO,CACV,SAAS,6CAA6C,CACtD,KAAK,EAAE,SAAS,6BAA6B,CAAC;CACjD,OAAO,EAAE,QAAQ,CACd,SAAS,oCAAoC,CAC7C,KAAK,EAAE,SAAS,WAAW,CAAC;CAC/B,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CACzB,SAAS,sFAAsF,CAC/F,KAAK,EAAE,SAAS;EAAC;EAAqB;EAAQ;EAAS,EAAE,CAAC;CAC7D,aAAa,EAAE,QAAQ,CACpB,SAAS,0CAA0C,CACnD,KAAK,EAAE,SAAS,yDAAyD,CAAC;CAC7E,QAAQ,EAAE,KAAK,wBAAwB,CACpC,SAAS,0BAA0B,CACnC,KAAK,EAAE,SAAS,wBAAwB,IAAI,CAAC;CAChD,WAAW,cAAc,CACtB,SAAS,iCAAiC;CAC7C,WAAW,cAAc,CACtB,SAAS,oCAAoC;CACjD,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { zLocalizedText, zLocalizedTexts } from "../../../../../../../shared/inf
|
|
|
2
2
|
import { zSlug } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
|
|
3
3
|
import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
6
5
|
//#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.ts
|
|
7
6
|
const QUESTION_THEME_CREATION_DTO = z.object({
|
|
8
7
|
slug: zSlug().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),
|
|
@@ -10,7 +9,7 @@ const QUESTION_THEME_CREATION_DTO = z.object({
|
|
|
10
9
|
aliases: zLocalizedTexts().describe("Question Theme's translated aliases. Help to find the theme with different keywords"),
|
|
11
10
|
description: zLocalizedText().describe("Question Theme's translated description")
|
|
12
11
|
});
|
|
13
|
-
|
|
14
12
|
//#endregion
|
|
15
13
|
export { QUESTION_THEME_CREATION_DTO };
|
|
14
|
+
|
|
16
15
|
//# sourceMappingURL=question-theme-creation.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\n\nconst QUESTION_THEME_CREATION_DTO = z.object({\n slug: zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: zLocalizedText()\n .describe(\"Question Theme's translated label\"),\n aliases: zLocalizedTexts()\n .describe(\"Question Theme's translated aliases. Help to find the theme with different keywords\"),\n description: zLocalizedText()\n .describe(\"Question Theme's translated description\"),\n});\n\nexport type QuestionThemeCreationDto = z.infer<typeof QUESTION_THEME_CREATION_DTO>;\n\nexport { QUESTION_THEME_CREATION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-theme-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\n\nconst QUESTION_THEME_CREATION_DTO = z.object({\n slug: zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: zLocalizedText()\n .describe(\"Question Theme's translated label\"),\n aliases: zLocalizedTexts()\n .describe(\"Question Theme's translated aliases. Help to find the theme with different keywords\"),\n description: zLocalizedText()\n .describe(\"Question Theme's translated description\"),\n});\n\nexport type QuestionThemeCreationDto = z.infer<typeof QUESTION_THEME_CREATION_DTO>;\n\nexport { QUESTION_THEME_CREATION_DTO };"],"mappings":";;;;;AAOA,MAAM,8BAA8B,EAAE,OAAO;CAC3C,MAAM,OAAO,CACV,SAAS,6CAA6C,CACtD,KAAK,EAAE,SAAS,6BAA6B,CAAC;CACjD,OAAO,gBAAgB,CACpB,SAAS,oCAAoC;CAChD,SAAS,iBAAiB,CACvB,SAAS,sFAAsF;CAClG,aAAa,gBAAgB,CAC1B,SAAS,0CAA0C;CACvD,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { zLocalizedText, zLocalizedTexts } from "../../../../../../../shared/inf
|
|
|
2
2
|
import { zSlug } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
|
|
3
3
|
import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
6
5
|
//#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.ts
|
|
7
6
|
const QUESTION_THEME_MODIFICATION_DTO = z.object({
|
|
8
7
|
slug: zSlug().optional().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),
|
|
@@ -10,7 +9,7 @@ const QUESTION_THEME_MODIFICATION_DTO = z.object({
|
|
|
10
9
|
aliases: zLocalizedTexts().optional().describe("Question Theme's translated aliases. Help to find the theme with different keywords"),
|
|
11
10
|
description: zLocalizedText().optional().describe("Question Theme's translated description")
|
|
12
11
|
});
|
|
13
|
-
|
|
14
12
|
//#endregion
|
|
15
13
|
export { QUESTION_THEME_MODIFICATION_DTO };
|
|
14
|
+
|
|
16
15
|
//# sourceMappingURL=question-theme-modification.dto.shape.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-modification.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\n\nconst QUESTION_THEME_MODIFICATION_DTO = z.object({\n slug: zSlug()\n .optional()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: zLocalizedText()\n .optional()\n .describe(\"Question Theme's translated label\"),\n aliases: zLocalizedTexts()\n .optional()\n .describe(\"Question Theme's translated aliases. Help to find the theme with different keywords\"),\n description: zLocalizedText()\n .optional()\n .describe(\"Question Theme's translated description\"),\n});\n\nexport type QuestionThemeModificationDto = z.infer<typeof QUESTION_THEME_MODIFICATION_DTO>;\n\nexport { QUESTION_THEME_MODIFICATION_DTO };"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-theme-modification.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport { QUESTION_THEME_SLUG_EXAMPLE } from \"@question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\n\nconst QUESTION_THEME_MODIFICATION_DTO = z.object({\n slug: zSlug()\n .optional()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),\n label: zLocalizedText()\n .optional()\n .describe(\"Question Theme's translated label\"),\n aliases: zLocalizedTexts()\n .optional()\n .describe(\"Question Theme's translated aliases. Help to find the theme with different keywords\"),\n description: zLocalizedText()\n .optional()\n .describe(\"Question Theme's translated description\"),\n});\n\nexport type QuestionThemeModificationDto = z.infer<typeof QUESTION_THEME_MODIFICATION_DTO>;\n\nexport { QUESTION_THEME_MODIFICATION_DTO };"],"mappings":";;;;;AAOA,MAAM,kCAAkC,EAAE,OAAO;CAC/C,MAAM,OAAO,CACV,UAAU,CACV,SAAS,6CAA6C,CACtD,KAAK,EAAE,SAAS,6BAA6B,CAAC;CACjD,OAAO,gBAAgB,CACpB,UAAU,CACV,SAAS,oCAAoC;CAChD,SAAS,iBAAiB,CACvB,UAAU,CACV,SAAS,sFAAsF;CAClG,aAAa,gBAAgB,CAC1B,UAAU,CACV,SAAS,0CAA0C;CACvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region ../../src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.ts
|
|
2
2
|
const QUESTION_THEME_SLUG_EXAMPLE = "general-knowledge";
|
|
3
|
-
|
|
4
3
|
//#endregion
|
|
5
4
|
export { QUESTION_THEME_SLUG_EXAMPLE };
|
|
5
|
+
|
|
6
6
|
//# sourceMappingURL=question-theme.zod.validators.constants.mjs.map
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const DEFAULT_QUESTION_THEME_STATUS = "active";
|
|
3
|
-
const QUESTION_THEME_STATUS_ARCHIVED = "archived";
|
|
4
|
-
const QUESTION_THEME_STATUSES = [DEFAULT_QUESTION_THEME_STATUS, QUESTION_THEME_STATUS_ARCHIVED];
|
|
5
|
-
|
|
1
|
+
const QUESTION_THEME_STATUSES = ["active", "archived"];
|
|
6
2
|
//#endregion
|
|
7
3
|
export { QUESTION_THEME_STATUSES };
|
|
4
|
+
|
|
8
5
|
//# sourceMappingURL=question-theme-status.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-status.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.ts"],"sourcesContent":["const DEFAULT_QUESTION_THEME_STATUS = \"active\";\n\nconst QUESTION_THEME_STATUS_ARCHIVED = \"archived\";\n\nconst QUESTION_THEME_STATUSES = [\n DEFAULT_QUESTION_THEME_STATUS,\n QUESTION_THEME_STATUS_ARCHIVED,\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_THEME_STATUSES,\n DEFAULT_QUESTION_THEME_STATUS,\n QUESTION_THEME_STATUS_ARCHIVED,\n};"],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-theme-status.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.ts"],"sourcesContent":["const DEFAULT_QUESTION_THEME_STATUS = \"active\";\n\nconst QUESTION_THEME_STATUS_ARCHIVED = \"archived\";\n\nconst QUESTION_THEME_STATUSES = [\n DEFAULT_QUESTION_THEME_STATUS,\n QUESTION_THEME_STATUS_ARCHIVED,\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_THEME_STATUSES,\n DEFAULT_QUESTION_THEME_STATUS,\n QUESTION_THEME_STATUS_ARCHIVED,\n};"],"mappings":"AAIA,MAAM,0BAA0B,CAJM,UAEC,WAKtC"}
|
|
@@ -8,7 +8,7 @@ function areValuesUniqueByKey(array, key) {
|
|
|
8
8
|
function hasExactlyOneByKey(array, key, value) {
|
|
9
9
|
return array.filter((item) => item[key] === value).length === 1;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
//#endregion
|
|
13
12
|
export { areValuesUniqueByKey, areValuesUniqueFromStrings, hasExactlyOneByKey };
|
|
13
|
+
|
|
14
14
|
//# sourceMappingURL=array.zod.refinements.mjs.map
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
//#region ../../src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.ts
|
|
2
|
-
const LOCALIZED_TEXT_ENTRY_MIN_LENGTH = 1;
|
|
3
|
-
const LOCALIZED_TEXT_ENTRY_MAX_LENGTH = 500;
|
|
4
|
-
const LOCALIZED_TEXTS_MIN_LENGTH = 1;
|
|
5
|
-
const LOCALIZED_TEXTS_MAX_LENGTH = 10;
|
|
6
2
|
const LOCALE_EXAMPLES = {
|
|
7
3
|
en: "Example text in English.",
|
|
8
4
|
fr: "Exemple de texte en français.",
|
|
@@ -11,7 +7,7 @@ const LOCALE_EXAMPLES = {
|
|
|
11
7
|
it: "Testo di esempio in italiano.",
|
|
12
8
|
pt: "Texto de exemplo em português."
|
|
13
9
|
};
|
|
14
|
-
|
|
15
10
|
//#endregion
|
|
16
|
-
export { LOCALE_EXAMPLES
|
|
11
|
+
export { LOCALE_EXAMPLES };
|
|
12
|
+
|
|
17
13
|
//# sourceMappingURL=localization.zod.validators.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.ts"],"sourcesContent":["import type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nconst LOCALIZED_TEXT_ENTRY_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXT_ENTRY_MAX_LENGTH = 500;\n\nconst LOCALIZED_TEXTS_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXTS_MAX_LENGTH = 10;\n\nconst LOCALE_EXAMPLES: Record<Locale, string> = {\n en: \"Example text in English.\",\n fr: \"Exemple de texte en français.\",\n es: \"Texto de ejemplo en español.\",\n de: \"Beispieltext auf Deutsch.\",\n it: \"Testo di esempio in italiano.\",\n pt: \"Texto de exemplo em português.\",\n} as const;\n\nexport {\n LOCALIZED_TEXT_ENTRY_MIN_LENGTH,\n LOCALIZED_TEXT_ENTRY_MAX_LENGTH,\n LOCALIZED_TEXTS_MIN_LENGTH,\n LOCALIZED_TEXTS_MAX_LENGTH,\n LOCALE_EXAMPLES,\n};"],"mappings":";
|
|
1
|
+
{"version":3,"file":"localization.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.ts"],"sourcesContent":["import type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nconst LOCALIZED_TEXT_ENTRY_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXT_ENTRY_MAX_LENGTH = 500;\n\nconst LOCALIZED_TEXTS_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXTS_MAX_LENGTH = 10;\n\nconst LOCALE_EXAMPLES: Record<Locale, string> = {\n en: \"Example text in English.\",\n fr: \"Exemple de texte en français.\",\n es: \"Texto de ejemplo en español.\",\n de: \"Beispieltext auf Deutsch.\",\n it: \"Testo di esempio in italiano.\",\n pt: \"Texto de exemplo em português.\",\n} as const;\n\nexport {\n LOCALIZED_TEXT_ENTRY_MIN_LENGTH,\n LOCALIZED_TEXT_ENTRY_MAX_LENGTH,\n LOCALIZED_TEXTS_MIN_LENGTH,\n LOCALIZED_TEXTS_MAX_LENGTH,\n LOCALE_EXAMPLES,\n};"],"mappings":";AAUA,MAAM,kBAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LOCALE_LABELS } from "../../../../../domain/value-objects/locale/locale.constants.mjs";
|
|
2
|
-
import { LOCALE_EXAMPLES
|
|
2
|
+
import { LOCALE_EXAMPLES } from "./constants/localization.zod.validators.constants.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
5
4
|
//#region ../../src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.ts
|
|
6
5
|
function createZLocaleEntries(entryFactory) {
|
|
7
6
|
return {
|
|
@@ -16,13 +15,13 @@ function createZLocaleEntries(entryFactory) {
|
|
|
16
15
|
function zLocalizedTextEntry(locale) {
|
|
17
16
|
const localeLabel = LOCALE_LABELS[locale];
|
|
18
17
|
const localeExample = LOCALE_EXAMPLES[locale];
|
|
19
|
-
return z.string().trim().min(
|
|
18
|
+
return z.string().trim().min(1).max(500).optional().describe(`Text in ${localeLabel}`).meta({ example: localeExample });
|
|
20
19
|
}
|
|
21
20
|
function zLocalizedTextsEntry(locale) {
|
|
22
21
|
const localeLabel = LOCALE_LABELS[locale];
|
|
23
22
|
const localeExample = LOCALE_EXAMPLES[locale];
|
|
24
|
-
const zLocalizedTextsValue = z.string().trim().min(
|
|
25
|
-
return z.array(zLocalizedTextsValue).min(
|
|
23
|
+
const zLocalizedTextsValue = z.string().trim().min(1).max(500);
|
|
24
|
+
return z.array(zLocalizedTextsValue).min(1).max(10).optional().describe(`Texts in ${localeLabel}`).meta({ example: [localeExample] });
|
|
26
25
|
}
|
|
27
26
|
function zLocalizedText() {
|
|
28
27
|
const localeEntries = createZLocaleEntries(zLocalizedTextEntry);
|
|
@@ -32,7 +31,7 @@ function zLocalizedTexts() {
|
|
|
32
31
|
const localeEntries = createZLocaleEntries(zLocalizedTextsEntry);
|
|
33
32
|
return z.strictObject(localeEntries).describe("Localized texts object with translations for multiple languages");
|
|
34
33
|
}
|
|
35
|
-
|
|
36
34
|
//#endregion
|
|
37
35
|
export { zLocalizedText, zLocalizedTexts };
|
|
36
|
+
|
|
38
37
|
//# sourceMappingURL=localization.zod.validators.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { LOCALE_LABELS } from \"@shared/domain/value-objects/locale/locale.constants\";\nimport { LOCALE_EXAMPLES, LOCALIZED_TEXT_ENTRY_MAX_LENGTH, LOCALIZED_TEXT_ENTRY_MIN_LENGTH, LOCALIZED_TEXTS_MAX_LENGTH, LOCALIZED_TEXTS_MIN_LENGTH } from \"@shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants\";\n\nimport type { ZodObject, ZodString, ZodOptional, ZodArray } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nfunction createZLocaleEntries<T>(entryFactory: (locale: Locale) => T): Record<Locale, T> {\n return {\n en: entryFactory(\"en\"),\n fr: entryFactory(\"fr\"),\n es: entryFactory(\"es\"),\n de: entryFactory(\"de\"),\n it: entryFactory(\"it\"),\n pt: entryFactory(\"pt\"),\n };\n}\n\nfunction zLocalizedTextEntry(locale: Locale): ZodOptional<ZodString> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n return z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH)\n .optional()\n .describe(`Text in ${localeLabel}`)\n .meta({ example: localeExample });\n}\n\nfunction zLocalizedTextsEntry(locale: Locale): ZodOptional<ZodArray<ZodString>> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n const zLocalizedTextsValue = z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH);\n\n return z.array(zLocalizedTextsValue)\n .min(LOCALIZED_TEXTS_MIN_LENGTH)\n .max(LOCALIZED_TEXTS_MAX_LENGTH)\n .optional()\n .describe(`Texts in ${localeLabel}`)\n .meta({ example: [localeExample] });\n}\n\nfunction zLocalizedText(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodString>> = createZLocaleEntries(zLocalizedTextEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized text object with translations for multiple languages\");\n}\n\nfunction zLocalizedTexts(): ZodObject<Record<Locale, ZodOptional<ZodArray<ZodString>>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodArray<ZodString>>> = createZLocaleEntries(zLocalizedTextsEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized texts object with translations for multiple languages\");\n}\n\nexport {\n createZLocaleEntries,\n zLocalizedTextEntry,\n zLocalizedTextsEntry,\n zLocalizedText,\n zLocalizedTexts,\n};"],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { LOCALE_LABELS } from \"@shared/domain/value-objects/locale/locale.constants\";\nimport { LOCALE_EXAMPLES, LOCALIZED_TEXT_ENTRY_MAX_LENGTH, LOCALIZED_TEXT_ENTRY_MIN_LENGTH, LOCALIZED_TEXTS_MAX_LENGTH, LOCALIZED_TEXTS_MIN_LENGTH } from \"@shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants\";\n\nimport type { ZodObject, ZodString, ZodOptional, ZodArray } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nfunction createZLocaleEntries<T>(entryFactory: (locale: Locale) => T): Record<Locale, T> {\n return {\n en: entryFactory(\"en\"),\n fr: entryFactory(\"fr\"),\n es: entryFactory(\"es\"),\n de: entryFactory(\"de\"),\n it: entryFactory(\"it\"),\n pt: entryFactory(\"pt\"),\n };\n}\n\nfunction zLocalizedTextEntry(locale: Locale): ZodOptional<ZodString> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n return z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH)\n .optional()\n .describe(`Text in ${localeLabel}`)\n .meta({ example: localeExample });\n}\n\nfunction zLocalizedTextsEntry(locale: Locale): ZodOptional<ZodArray<ZodString>> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n const zLocalizedTextsValue = z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH);\n\n return z.array(zLocalizedTextsValue)\n .min(LOCALIZED_TEXTS_MIN_LENGTH)\n .max(LOCALIZED_TEXTS_MAX_LENGTH)\n .optional()\n .describe(`Texts in ${localeLabel}`)\n .meta({ example: [localeExample] });\n}\n\nfunction zLocalizedText(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodString>> = createZLocaleEntries(zLocalizedTextEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized text object with translations for multiple languages\");\n}\n\nfunction zLocalizedTexts(): ZodObject<Record<Locale, ZodOptional<ZodArray<ZodString>>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodArray<ZodString>>> = createZLocaleEntries(zLocalizedTextsEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized texts object with translations for multiple languages\");\n}\n\nexport {\n createZLocaleEntries,\n zLocalizedTextEntry,\n zLocalizedTextsEntry,\n zLocalizedText,\n zLocalizedTexts,\n};"],"mappings":";;;;AASA,SAAS,qBAAwB,cAAwD;AACvF,QAAO;EACL,IAAI,aAAa,KAAK;EACtB,IAAI,aAAa,KAAK;EACtB,IAAI,aAAa,KAAK;EACtB,IAAI,aAAa,KAAK;EACtB,IAAI,aAAa,KAAK;EACtB,IAAI,aAAa,KAAK;EACvB;;AAGH,SAAS,oBAAoB,QAAwC;CACnE,MAAM,cAAc,cAAc;CAClC,MAAM,gBAAgB,gBAAgB;AAEtC,QAAO,EAAE,QAAQ,CACd,MAAM,CACN,IAAA,EAAoC,CACpC,IAAA,IAAoC,CACpC,UAAU,CACV,SAAS,WAAW,cAAc,CAClC,KAAK,EAAE,SAAS,eAAe,CAAC;;AAGrC,SAAS,qBAAqB,QAAkD;CAC9E,MAAM,cAAc,cAAc;CAClC,MAAM,gBAAgB,gBAAgB;CAEtC,MAAM,uBAAuB,EAAE,QAAQ,CACpC,MAAM,CACN,IAAA,EAAoC,CACpC,IAAA,IAAoC;AAEvC,QAAO,EAAE,MAAM,qBAAqB,CACjC,IAAA,EAA+B,CAC/B,IAAA,GAA+B,CAC/B,UAAU,CACV,SAAS,YAAY,cAAc,CACnC,KAAK,EAAE,SAAS,CAAC,cAAc,EAAE,CAAC;;AAGvC,SAAS,iBAAoE;CAC3E,MAAM,gBAAwD,qBAAqB,oBAAoB;AAEvG,QAAO,EAAE,aAAa,cAAc,CACjC,SAAS,iEAAiE;;AAG/E,SAAS,kBAA+E;CACtF,MAAM,gBAAkE,qBAAqB,qBAAqB;AAElH,QAAO,EAAE,aAAa,cAAc,CACjC,SAAS,kEAAkE"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
//#region ../../src/shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants.ts
|
|
2
2
|
const SLUG_REGEX = /^[\da-z]+(?:-[\da-z]+)*$/u;
|
|
3
|
-
const
|
|
4
|
-
const SLUG_MAX_LENGTH = 50;
|
|
3
|
+
const MONGO_ID_REGEX = /^[\da-f]{24}$/iu;
|
|
5
4
|
const ISO_DATE_TIME_EXAMPLE = "2026-04-14T00:00:00.000Z";
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { ISO_DATE_TIME_EXAMPLE,
|
|
6
|
+
export { ISO_DATE_TIME_EXAMPLE, MONGO_ID_REGEX, SLUG_REGEX };
|
|
7
|
+
|
|
9
8
|
//# sourceMappingURL=string.zod.validators.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants.ts"],"sourcesContent":["const SLUG_REGEX = /^[\\da-z]+(?:-[\\da-z]+)*$/u;\n\nconst SLUG_MIN_LENGTH = 3;\n\nconst SLUG_MAX_LENGTH = 50;\n\nconst ISO_DATE_TIME_EXAMPLE = \"2026-04-14T00:00:00.000Z\";\n\nexport {\n SLUG_REGEX,\n SLUG_MIN_LENGTH,\n SLUG_MAX_LENGTH,\n ISO_DATE_TIME_EXAMPLE,\n};"],"mappings":";AAAA,MAAM,aAAa;AAEnB,MAAM,
|
|
1
|
+
{"version":3,"file":"string.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants.ts"],"sourcesContent":["const SLUG_REGEX = /^[\\da-z]+(?:-[\\da-z]+)*$/u;\n\nconst MONGO_ID_REGEX = /^[\\da-f]{24}$/iu;\n\nconst SLUG_MIN_LENGTH = 3;\n\nconst SLUG_MAX_LENGTH = 50;\n\nconst ISO_DATE_TIME_EXAMPLE = \"2026-04-14T00:00:00.000Z\";\n\nexport {\n SLUG_REGEX,\n MONGO_ID_REGEX,\n SLUG_MIN_LENGTH,\n SLUG_MAX_LENGTH,\n ISO_DATE_TIME_EXAMPLE,\n};"],"mappings":";AAAA,MAAM,aAAa;AAEnB,MAAM,iBAAiB;AAMvB,MAAM,wBAAwB"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { ISO_DATE_TIME_EXAMPLE,
|
|
1
|
+
import { ISO_DATE_TIME_EXAMPLE, MONGO_ID_REGEX, SLUG_REGEX } from "./constants/string.zod.validators.constants.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { isMongoId } from "validator";
|
|
4
|
-
|
|
5
3
|
//#region ../../src/shared/infrastructure/http/zod/validators/string/string.zod.validators.ts
|
|
6
4
|
function zSlug(options = {}) {
|
|
7
|
-
return z.string().trim().min(
|
|
5
|
+
return z.string().trim().min(3).max(50).regex(SLUG_REGEX, {
|
|
8
6
|
error: "Invalid kebab-case value",
|
|
9
7
|
...options
|
|
10
8
|
}).meta({ example: "example-slug-value" });
|
|
11
9
|
}
|
|
12
10
|
function zMongoId(options = {}) {
|
|
13
|
-
return z.string().trim().
|
|
11
|
+
return z.string().trim().regex(MONGO_ID_REGEX, {
|
|
14
12
|
error: "Invalid ObjectId value",
|
|
15
13
|
...options
|
|
16
|
-
}).meta({ example: "60af924f4f1a2563f8e8b456" });
|
|
14
|
+
}).toLowerCase().meta({ example: "60af924f4f1a2563f8e8b456" });
|
|
17
15
|
}
|
|
18
16
|
function zIsoDateTime(options = {}) {
|
|
19
17
|
return z.iso.datetime({
|
|
@@ -21,7 +19,7 @@ function zIsoDateTime(options = {}) {
|
|
|
21
19
|
...options
|
|
22
20
|
}).meta({ example: ISO_DATE_TIME_EXAMPLE });
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
23
|
export { zIsoDateTime, zMongoId, zSlug };
|
|
24
|
+
|
|
27
25
|
//# sourceMappingURL=string.zod.validators.mjs.map
|
package/dist/src/shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/string/string.zod.validators.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"string.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/string/string.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ISO_DATE_TIME_EXAMPLE, MONGO_ID_REGEX, SLUG_MAX_LENGTH, SLUG_MIN_LENGTH, SLUG_REGEX } from \"@shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants\";\n\nimport type { $ZodCustomParams } from \"zod/v4/core\";\nimport type { ZodString, ZodISODateTime } from \"zod\";\n\nfunction zSlug(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .min(SLUG_MIN_LENGTH)\n .max(SLUG_MAX_LENGTH)\n .regex(SLUG_REGEX, {\n error: \"Invalid kebab-case value\",\n ...options,\n })\n .meta({ example: \"example-slug-value\" });\n}\n\nfunction zMongoId(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .regex(MONGO_ID_REGEX, {\n error: \"Invalid ObjectId value\",\n ...options,\n })\n .toLowerCase()\n .meta({ example: \"60af924f4f1a2563f8e8b456\" });\n}\n\nfunction zIsoDateTime(options: Partial<$ZodCustomParams> = {}): ZodISODateTime {\n return z.iso.datetime({\n error: \"Invalid ISO 8601 datetime value\",\n ...options,\n })\n .meta({ example: ISO_DATE_TIME_EXAMPLE });\n}\n\nexport {\n zSlug,\n zMongoId,\n zIsoDateTime,\n};"],"mappings":";;;AAOA,SAAS,MAAM,UAAqC,EAAE,EAAa;AACjE,QAAO,EAAE,QAAQ,CACd,MAAM,CACN,IAAA,EAAoB,CACpB,IAAA,GAAoB,CACpB,MAAM,YAAY;EACjB,OAAO;EACP,GAAG;EACJ,CAAC,CACD,KAAK,EAAE,SAAS,sBAAsB,CAAC;;AAG5C,SAAS,SAAS,UAAqC,EAAE,EAAa;AACpE,QAAO,EAAE,QAAQ,CACd,MAAM,CACN,MAAM,gBAAgB;EACrB,OAAO;EACP,GAAG;EACJ,CAAC,CACD,aAAa,CACb,KAAK,EAAE,SAAS,4BAA4B,CAAC;;AAGlD,SAAS,aAAa,UAAqC,EAAE,EAAkB;AAC7E,QAAO,EAAE,IAAI,SAAS;EACpB,OAAO;EACP,GAAG;EACJ,CAAC,CACC,KAAK,EAAE,SAAS,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goat-it/schemas",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4-beta",
|
|
5
5
|
"description": "Shared types, constants and Zod schemas for the Goat It projects.",
|
|
6
6
|
"author": "Antoine ZANARDI",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/antoinezanardi/goat-it-api",
|
|
11
|
+
"directory": "packages/schemas"
|
|
12
|
+
},
|
|
8
13
|
"devDependencies": {
|
|
9
|
-
"
|
|
14
|
+
"@arethetypeswrong/core": "^0.18.2",
|
|
15
|
+
"tsdown": "^0.21.1",
|
|
10
16
|
"typescript": "^5.9.3",
|
|
11
17
|
"zod": "^4.3.6"
|
|
12
18
|
},
|
|
@@ -37,8 +43,7 @@
|
|
|
37
43
|
}
|
|
38
44
|
},
|
|
39
45
|
"dependencies": {
|
|
40
|
-
"type-fest": "^5.4.4"
|
|
41
|
-
"validator": "^13.15.26"
|
|
46
|
+
"type-fest": "^5.4.4"
|
|
42
47
|
},
|
|
43
48
|
"sideEffects": false,
|
|
44
49
|
"scripts": {
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.ts
|
|
2
|
-
const QUESTION_SOURCE_URLS_MIN_ITEMS = 1;
|
|
3
|
-
const QUESTION_SOURCE_URLS_MAX_ITEMS = 5;
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
export { QUESTION_SOURCE_URLS_MAX_ITEMS, QUESTION_SOURCE_URLS_MIN_ITEMS };
|
|
7
|
-
//# sourceMappingURL=question-source-urls.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-source-urls.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.ts"],"sourcesContent":["const QUESTION_SOURCE_URLS_MIN_ITEMS = 1;\n\nconst QUESTION_SOURCE_URLS_MAX_ITEMS = 5;\n\nexport {\n QUESTION_SOURCE_URLS_MIN_ITEMS,\n QUESTION_SOURCE_URLS_MAX_ITEMS,\n};"],"mappings":";AAAA,MAAM,iCAAiC;AAEvC,MAAM,iCAAiC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.ts
|
|
2
|
-
const QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS = 1;
|
|
3
|
-
const QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS = 3;
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
export { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS };
|
|
7
|
-
//# sourceMappingURL=question-theme-assignment.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-assignment.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.ts"],"sourcesContent":["const QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS = 1;\n\nconst QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS = 3;\n\nexport {\n QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS,\n QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS,\n};"],"mappings":";AAAA,MAAM,uCAAuC;AAE7C,MAAM,uCAAuC"}
|