@goat-it/schemas 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/question-theme/index.d.mts +1 -1
  2. package/dist/src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.mjs +5 -5
  3. package/dist/src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.mjs.map +1 -1
  4. package/dist/src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs +3 -2
  5. package/dist/src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs.map +1 -1
  6. package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.d.mts +3 -5
  7. package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs +4 -5
  8. package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs.map +1 -1
  9. package/dist/src/contexts/question/application/dto/question/question-content/question-content.dto.shape.mjs +5 -4
  10. package/dist/src/contexts/question/application/dto/question/question-content/question-content.dto.shape.mjs.map +1 -1
  11. package/dist/src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.mjs +3 -2
  12. package/dist/src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.mjs.map +1 -1
  13. package/dist/src/contexts/question/application/dto/question/question.dto.shape.d.mts +3 -5
  14. package/dist/src/contexts/question/application/dto/question/question.dto.shape.mjs +4 -5
  15. package/dist/src/contexts/question/application/dto/question/question.dto.shape.mjs.map +1 -1
  16. package/dist/src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.mjs +5 -5
  17. package/dist/src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.mjs.map +1 -1
  18. package/dist/src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs +3 -2
  19. package/dist/src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs.map +1 -1
  20. package/dist/src/contexts/question/application/dto/shared/zod/validators/question-content/constants/question-content.zod.validators.constants.mjs +9 -0
  21. package/dist/src/contexts/question/application/dto/shared/zod/validators/question-content/constants/question-content.zod.validators.constants.mjs.map +1 -0
  22. package/dist/src/contexts/question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators.mjs +32 -0
  23. package/dist/src/contexts/question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators.mjs.map +1 -0
  24. package/dist/src/contexts/question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.mjs +12 -0
  25. package/dist/src/contexts/question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.mjs.map +1 -0
  26. package/dist/src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.mjs +11 -1
  27. package/dist/src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.mjs.map +1 -1
  28. package/dist/src/contexts/question/domain/value-objects/question-category/question-category.types.d.mts +1 -1
  29. package/dist/src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types.d.mts +1 -1
  30. package/dist/src/contexts/question/domain/value-objects/question-status/question-status.types.d.mts +1 -1
  31. package/dist/src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.d.mts +2 -4
  32. package/dist/src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs +10 -13
  33. package/dist/src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs.map +1 -1
  34. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.d.mts +2 -4
  35. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs +10 -16
  36. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs.map +1 -1
  37. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs +6 -8
  38. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs.map +1 -1
  39. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs +6 -8
  40. package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs.map +1 -1
  41. package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.mjs +8 -1
  42. package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.mjs.map +1 -1
  43. package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.mjs +46 -0
  44. package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.mjs.map +1 -0
  45. package/dist/src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.d.mts +3 -1
  46. package/dist/src/shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape.d.mts +1 -1
  47. package/dist/src/shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape.mjs +5 -1
  48. package/dist/src/shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape.mjs.map +1 -1
  49. package/dist/src/shared/infrastructure/http/dto/api-response-exception/api-response-exception.dto.shape.d.mts +1 -1
  50. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import { DEFAULT_QUESTION_THEME_STATUS, QUESTION_THEME_STATUSES, QUESTION_THEME_STATUS_ARCHIVED } from "../src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.mjs";
2
2
  import { QUESTION_THEME_CREATION_DTO, QuestionThemeCreationDto } from "../src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs";
3
3
  import { QUESTION_THEME_MODIFICATION_DTO, QuestionThemeModificationDto } from "../src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs";
4
+ import { QuestionThemeStatus } from "../src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.mjs";
4
5
  import { QUESTION_THEME_DTO, QuestionThemeDto } from "../src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs";
5
6
  import { ADMIN_QUESTION_THEME_DTO, AdminQuestionThemeDto } from "../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs";
6
- import { QuestionThemeStatus } from "../src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.mjs";
7
7
  export { ADMIN_QUESTION_THEME_DTO, type AdminQuestionThemeDto, DEFAULT_QUESTION_THEME_STATUS, QUESTION_THEME_CREATION_DTO, QUESTION_THEME_DTO, QUESTION_THEME_MODIFICATION_DTO, QUESTION_THEME_STATUSES, QUESTION_THEME_STATUS_ARCHIVED, type QuestionThemeCreationDto, type QuestionThemeDto, type QuestionThemeModificationDto, type QuestionThemeStatus };
@@ -1,11 +1,11 @@
1
- import { zLocalizedText, zLocalizedTexts } from "../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
1
+ import { zQuestionLocalizedAnswer, zQuestionLocalizedContext, zQuestionLocalizedStatement, zQuestionLocalizedTrivia } from "../../shared/zod/validators/question-content/question-content.dto.zod.validators.mjs";
2
2
  import { z } from "zod";
3
3
  //#region ../../src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.ts
4
4
  const ADMIN_QUESTION_CONTENT_DTO = z.strictObject({
5
- statement: zLocalizedText().describe("Question statement in supported locales"),
6
- answer: zLocalizedText().describe("Question answer in supported locales"),
7
- context: zLocalizedText().optional().describe("Additional context for the question in supported locales"),
8
- trivia: zLocalizedTexts().optional().describe("Interesting trivia related to the question in supported locales")
5
+ statement: zQuestionLocalizedStatement(),
6
+ answer: zQuestionLocalizedAnswer(),
7
+ context: zQuestionLocalizedContext().optional(),
8
+ trivia: zQuestionLocalizedTrivia().optional()
9
9
  }).describe("Question's content");
10
10
  //#endregion
11
11
  export { ADMIN_QUESTION_CONTENT_DTO };
@@ -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":";;;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
+ {"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 {\n zQuestionLocalizedStatement,\n zQuestionLocalizedAnswer,\n zQuestionLocalizedContext,\n zQuestionLocalizedTrivia,\n} from \"@question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators\";\n\nconst ADMIN_QUESTION_CONTENT_DTO = z.strictObject({\n statement: zQuestionLocalizedStatement(),\n answer: zQuestionLocalizedAnswer(),\n context: zQuestionLocalizedContext()\n .optional(),\n trivia: zQuestionLocalizedTrivia()\n .optional(),\n}).describe(\"Question's content\");\n\nexport type AdminQuestionContentDto = z.infer<typeof ADMIN_QUESTION_CONTENT_DTO>;\n\nexport { ADMIN_QUESTION_CONTENT_DTO };"],"mappings":";;;AASA,MAAM,6BAA6B,EAAE,aAAa;CAChD,WAAW,6BAA6B;CACxC,QAAQ,0BAA0B;CAClC,SAAS,2BAA2B,CACjC,UAAU;CACb,QAAQ,0BAA0B,CAC/B,UAAU;CACd,CAAC,CAAC,SAAS,qBAAqB"}
@@ -1,10 +1,11 @@
1
+ import { zQuestionThemeAssignmentIsHint, zQuestionThemeAssignmentIsPrimary } from "../../shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.mjs";
1
2
  import { ADMIN_QUESTION_THEME_DTO } from "../../../../modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs";
2
3
  import { z } from "zod";
3
4
  //#region ../../src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.ts
4
5
  const ADMIN_QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({
5
6
  theme: ADMIN_QUESTION_THEME_DTO.describe("Question assigned theme"),
6
- isPrimary: z.boolean().describe("Indicates if the assigned theme is the primary theme for the question"),
7
- isHint: z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer")
7
+ isPrimary: zQuestionThemeAssignmentIsPrimary(),
8
+ isHint: zQuestionThemeAssignmentIsHint()
8
9
  }).describe("Question's theme assignment");
9
10
  //#endregion
10
11
  export { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO };
@@ -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":";;;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"}
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 {\n zQuestionThemeAssignmentIsPrimary,\n zQuestionThemeAssignmentIsHint,\n} from \"@question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators\";\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: zQuestionThemeAssignmentIsPrimary(),\n isHint: zQuestionThemeAssignmentIsHint(),\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":";;;;AAQA,MAAM,sCAAsC,EAAE,aAAa;CACzD,OAAO,yBACJ,SAAS,0BAA0B;CACtC,WAAW,mCAAmC;CAC9C,QAAQ,gCAAgC;CACzC,CAAC,CAAC,SAAS,8BAA8B"}
@@ -1,3 +1,4 @@
1
+ import { QuestionThemeStatusEnum } from "../../../modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.mjs";
1
2
  import { QuestionCategoryEnum } from "../../../domain/value-objects/question-category/question-category.types.mjs";
2
3
  import { QuestionCognitiveDifficultyEnum } from "../../../domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types.mjs";
3
4
  import { QuestionStatusEnum } from "../../../domain/value-objects/question-status/question-status.types.mjs";
@@ -15,10 +16,7 @@ declare const ADMIN_QUESTION_DTO: z.ZodObject<{
15
16
  aliases: z.ZodObject<Record<"en" | "fr" | "es" | "de" | "it" | "pt", z.ZodOptional<z.ZodArray<z.ZodString>>>, z.core.$strip>;
16
17
  description: z.ZodObject<Record<"en" | "fr" | "es" | "de" | "it" | "pt", z.ZodOptional<z.ZodString>>, z.core.$strip>;
17
18
  color: z.ZodOptional<z.ZodString>;
18
- status: z.ZodEnum<{
19
- active: "active";
20
- archived: "archived";
21
- }>;
19
+ status: z.ZodEnum<QuestionThemeStatusEnum>;
22
20
  createdAt: z.ZodISODateTime;
23
21
  updatedAt: z.ZodISODateTime;
24
22
  }, z.core.$strict>;
@@ -35,8 +33,8 @@ declare const ADMIN_QUESTION_DTO: z.ZodObject<{
35
33
  author: z.ZodObject<{
36
34
  role: z.ZodEnum<{
37
35
  admin: "admin";
38
- ai: "ai";
39
36
  game: "game";
37
+ ai: "ai";
40
38
  }>;
41
39
  gameId: z.ZodOptional<z.ZodString>;
42
40
  name: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,5 @@
1
1
  import "../../../domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs";
2
- import { zIsoDateTime, zMongoId } from "../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
3
- import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from "../shared/zod/validators/question.dto.zod.validators.mjs";
2
+ import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionCreatedAt, zQuestionId, zQuestionSourceUrls, zQuestionStatus, zQuestionUpdatedAt } from "../shared/zod/validators/question.dto.zod.validators.mjs";
4
3
  import { QUESTION_REJECTION_DTO } from "../shared/question-rejection/question-rejection.dto.shape.mjs";
5
4
  import { QUESTION_AUTHOR_DTO } from "../shared/question-author/question-author.dto.shape.mjs";
6
5
  import { ADMIN_QUESTION_THEME_ASSIGNMENT_DTO } from "./admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs";
@@ -8,7 +7,7 @@ import { ADMIN_QUESTION_CONTENT_DTO } from "./admin-question-content/admin-quest
8
7
  import { z } from "zod";
9
8
  //#region ../../src/contexts/question/application/dto/admin-question/admin-question.dto.shape.ts
10
9
  const ADMIN_QUESTION_DTO = z.strictObject({
11
- id: zMongoId().describe("Question's unique identifier"),
10
+ id: zQuestionId(),
12
11
  category: zQuestionCategory(),
13
12
  themes: z.array(ADMIN_QUESTION_THEME_ASSIGNMENT_DTO).min(1).max(3).describe("Question's themes"),
14
13
  content: ADMIN_QUESTION_CONTENT_DTO,
@@ -17,8 +16,8 @@ const ADMIN_QUESTION_DTO = z.strictObject({
17
16
  status: zQuestionStatus(),
18
17
  rejection: QUESTION_REJECTION_DTO.optional().describe("Question's rejection details, if applicable"),
19
18
  sourceUrls: zQuestionSourceUrls(),
20
- createdAt: zIsoDateTime().describe("Question's creation date"),
21
- updatedAt: zIsoDateTime().describe("Question's last update date")
19
+ createdAt: zQuestionCreatedAt(),
20
+ updatedAt: zQuestionUpdatedAt()
22
21
  });
23
22
  //#endregion
24
23
  export { ADMIN_QUESTION_DTO };
@@ -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":";;;;;;;;;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
+ {"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 { 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, zQuestionCreatedAt, zQuestionId, zQuestionSourceUrls, zQuestionStatus, zQuestionUpdatedAt } 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: zQuestionId(),\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: zQuestionCreatedAt(),\n updatedAt: zQuestionUpdatedAt(),\n});\n\nexport type AdminQuestionDto = z.infer<typeof ADMIN_QUESTION_DTO>;\n\nexport { ADMIN_QUESTION_DTO };"],"mappings":";;;;;;;;AASA,MAAM,qBAAqB,EAAE,aAAa;CACxC,IAAI,aAAa;CACjB,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,oBAAoB;CAC/B,WAAW,oBAAoB;CAChC,CAAC"}
@@ -1,10 +1,11 @@
1
+ import { zQuestionAnswer, zQuestionContext, zQuestionStatement, zQuestionTrivia } from "../../shared/zod/validators/question-content/question-content.dto.zod.validators.mjs";
1
2
  import { z } from "zod";
2
3
  //#region ../../src/contexts/question/application/dto/question/question-content/question-content.dto.shape.ts
3
4
  const QUESTION_CONTENT_DTO = z.strictObject({
4
- statement: z.string().describe("Question translated statement").meta({ example: "What is the capital of France?" }),
5
- answer: z.string().describe("Question translated answer").meta({ example: "The capital of France is Paris." }),
6
- context: z.string().optional().describe("Additional translated context for the question").meta({ example: "France is a country in Western Europe." }),
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."] })
5
+ statement: zQuestionStatement(),
6
+ answer: zQuestionAnswer(),
7
+ context: zQuestionContext().optional(),
8
+ trivia: zQuestionTrivia().optional()
8
9
  }).describe("Question's content");
9
10
  //#endregion
10
11
  export { QUESTION_CONTENT_DTO };
@@ -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":";;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
+ {"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\nimport {\n zQuestionStatement,\n zQuestionAnswer,\n zQuestionContext,\n zQuestionTrivia,\n} from \"@question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators\";\n\nconst QUESTION_CONTENT_DTO = z.strictObject({\n statement: zQuestionStatement(),\n answer: zQuestionAnswer(),\n context: zQuestionContext()\n .optional(),\n trivia: zQuestionTrivia()\n .optional(),\n}).describe(\"Question's content\");\n\nexport type QuestionContentDto = z.infer<typeof QUESTION_CONTENT_DTO>;\n\nexport { QUESTION_CONTENT_DTO };"],"mappings":";;;AASA,MAAM,uBAAuB,EAAE,aAAa;CAC1C,WAAW,oBAAoB;CAC/B,QAAQ,iBAAiB;CACzB,SAAS,kBAAkB,CACxB,UAAU;CACb,QAAQ,iBAAiB,CACtB,UAAU;CACd,CAAC,CAAC,SAAS,qBAAqB"}
@@ -1,10 +1,11 @@
1
+ import { zQuestionThemeAssignmentIsHint, zQuestionThemeAssignmentIsPrimary } from "../../shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.mjs";
1
2
  import { QUESTION_THEME_DTO } from "../../../../modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs";
2
3
  import { z } from "zod";
3
4
  //#region ../../src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.ts
4
5
  const QUESTION_THEME_ASSIGNMENT_DTO = z.strictObject({
5
6
  theme: QUESTION_THEME_DTO.describe("Question assigned theme"),
6
- isPrimary: z.boolean().describe("Indicates if the assigned theme is the primary theme for the question"),
7
- isHint: z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer")
7
+ isPrimary: zQuestionThemeAssignmentIsPrimary(),
8
+ isHint: zQuestionThemeAssignmentIsHint()
8
9
  }).describe("Question's theme assignment");
9
10
  //#endregion
10
11
  export { QUESTION_THEME_ASSIGNMENT_DTO };
@@ -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":";;;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
+ {"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 {\n zQuestionThemeAssignmentIsPrimary,\n zQuestionThemeAssignmentIsHint,\n} from \"@question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators\";\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: zQuestionThemeAssignmentIsPrimary(),\n isHint: zQuestionThemeAssignmentIsHint(),\n}).describe(\"Question's theme assignment\");\n\nexport type QuestionThemeAssignmentDto = z.infer<typeof QUESTION_THEME_ASSIGNMENT_DTO>;\n\nexport { QUESTION_THEME_ASSIGNMENT_DTO };"],"mappings":";;;;AAQA,MAAM,gCAAgC,EAAE,aAAa;CACnD,OAAO,mBACJ,SAAS,0BAA0B;CACtC,WAAW,mCAAmC;CAC9C,QAAQ,gCAAgC;CACzC,CAAC,CAAC,SAAS,8BAA8B"}
@@ -1,3 +1,4 @@
1
+ import { QuestionThemeStatusEnum } from "../../../modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.mjs";
1
2
  import { QuestionCategoryEnum } from "../../../domain/value-objects/question-category/question-category.types.mjs";
2
3
  import { QuestionCognitiveDifficultyEnum } from "../../../domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types.mjs";
3
4
  import { QuestionStatusEnum } from "../../../domain/value-objects/question-status/question-status.types.mjs";
@@ -15,10 +16,7 @@ declare const QUESTION_DTO: z.ZodObject<{
15
16
  aliases: z.ZodArray<z.ZodString>;
16
17
  description: z.ZodString;
17
18
  color: z.ZodOptional<z.ZodString>;
18
- status: z.ZodEnum<{
19
- active: "active";
20
- archived: "archived";
21
- }>;
19
+ status: z.ZodEnum<QuestionThemeStatusEnum>;
22
20
  createdAt: z.ZodISODateTime;
23
21
  updatedAt: z.ZodISODateTime;
24
22
  }, z.core.$strict>;
@@ -35,8 +33,8 @@ declare const QUESTION_DTO: z.ZodObject<{
35
33
  author: z.ZodObject<{
36
34
  role: z.ZodEnum<{
37
35
  admin: "admin";
38
- ai: "ai";
39
36
  game: "game";
37
+ ai: "ai";
40
38
  }>;
41
39
  gameId: z.ZodOptional<z.ZodString>;
42
40
  name: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,5 @@
1
1
  import "../../../domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs";
2
- import { zIsoDateTime, zMongoId } from "../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
3
- import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus } from "../shared/zod/validators/question.dto.zod.validators.mjs";
2
+ import { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionCreatedAt, zQuestionId, zQuestionSourceUrls, zQuestionStatus, zQuestionUpdatedAt } 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";
5
4
  import { QUESTION_CONTENT_DTO } from "./question-content/question-content.dto.shape.mjs";
6
5
  import { QUESTION_REJECTION_DTO } from "../shared/question-rejection/question-rejection.dto.shape.mjs";
@@ -8,7 +7,7 @@ import { QUESTION_AUTHOR_DTO } from "../shared/question-author/question-author.d
8
7
  import { z } from "zod";
9
8
  //#region ../../src/contexts/question/application/dto/question/question.dto.shape.ts
10
9
  const QUESTION_DTO = z.strictObject({
11
- id: zMongoId().describe("Question's unique identifier"),
10
+ id: zQuestionId(),
12
11
  category: zQuestionCategory(),
13
12
  themes: z.array(QUESTION_THEME_ASSIGNMENT_DTO).min(1).max(3).describe("Question's themes"),
14
13
  content: QUESTION_CONTENT_DTO,
@@ -17,8 +16,8 @@ const QUESTION_DTO = z.strictObject({
17
16
  status: zQuestionStatus(),
18
17
  rejection: QUESTION_REJECTION_DTO.optional().describe("Question's rejection details, if applicable"),
19
18
  sourceUrls: zQuestionSourceUrls(),
20
- createdAt: zIsoDateTime().describe("Question's creation date"),
21
- updatedAt: zIsoDateTime().describe("Question's last update date")
19
+ createdAt: zQuestionCreatedAt(),
20
+ updatedAt: zQuestionUpdatedAt()
22
21
  });
23
22
  //#endregion
24
23
  export { QUESTION_DTO };
@@ -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":";;;;;;;;;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
+ {"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 { 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, zQuestionCreatedAt, zQuestionId, zQuestionSourceUrls, zQuestionStatus, zQuestionUpdatedAt } 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: zQuestionId(),\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: zQuestionCreatedAt(),\n updatedAt: zQuestionUpdatedAt(),\n});\n\nexport type QuestionDto = z.infer<typeof QUESTION_DTO>;\n\nexport { QUESTION_DTO };"],"mappings":";;;;;;;;AASA,MAAM,eAAe,EAAE,aAAa;CAClC,IAAI,aAAa;CACjB,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,oBAAoB;CAC/B,WAAW,oBAAoB;CAChC,CAAC"}
@@ -1,11 +1,11 @@
1
- import { zLocalizedText, zLocalizedTexts } from "../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
1
+ import { zQuestionLocalizedAnswer, zQuestionLocalizedContext, zQuestionLocalizedStatement, zQuestionLocalizedTrivia } from "../../shared/zod/validators/question-content/question-content.dto.zod.validators.mjs";
2
2
  import { z } from "zod";
3
3
  //#region ../../src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.ts
4
4
  const QUESTION_CONTENT_CREATION_DTO = z.object({
5
- statement: zLocalizedText().describe("Question statement"),
6
- answer: zLocalizedText().describe("Question answer"),
7
- context: zLocalizedText().optional().describe("Additional context for the question"),
8
- trivia: zLocalizedTexts().optional().describe("Interesting trivia related to the question")
5
+ statement: zQuestionLocalizedStatement(),
6
+ answer: zQuestionLocalizedAnswer(),
7
+ context: zQuestionLocalizedContext().optional(),
8
+ trivia: zQuestionLocalizedTrivia().optional()
9
9
  }).describe("Question's content");
10
10
  //#endregion
11
11
  export { QUESTION_CONTENT_CREATION_DTO };
@@ -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":";;;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"}
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 {\n zQuestionLocalizedStatement,\n zQuestionLocalizedAnswer,\n zQuestionLocalizedContext,\n zQuestionLocalizedTrivia,\n} from \"@question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators\";\n\nconst QUESTION_CONTENT_CREATION_DTO = z.object({\n statement: zQuestionLocalizedStatement(),\n answer: zQuestionLocalizedAnswer(),\n context: zQuestionLocalizedContext()\n .optional(),\n trivia: zQuestionLocalizedTrivia()\n .optional(),\n}).describe(\"Question's content\");\n\nexport type QuestionContentCreationDto = z.infer<typeof QUESTION_CONTENT_CREATION_DTO>;\n\nexport { QUESTION_CONTENT_CREATION_DTO };"],"mappings":";;;AASA,MAAM,gCAAgC,EAAE,OAAO;CAC7C,WAAW,6BAA6B;CACxC,QAAQ,0BAA0B;CAClC,SAAS,2BAA2B,CACjC,UAAU;CACb,QAAQ,0BAA0B,CAC/B,UAAU;CACd,CAAC,CAAC,SAAS,qBAAqB"}
@@ -1,10 +1,11 @@
1
1
  import { zMongoId } from "../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
2
+ import { zQuestionThemeAssignmentIsHint, zQuestionThemeAssignmentIsPrimary } from "../../shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.mjs";
2
3
  import { z } from "zod";
3
4
  //#region ../../src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.ts
4
5
  const QUESTION_THEME_ASSIGNMENT_CREATION_DTO = z.object({
5
6
  themeId: zMongoId().describe("The ID of the theme to assign to the question"),
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"),
7
- isHint: z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer")
7
+ isPrimary: zQuestionThemeAssignmentIsPrimary(),
8
+ isHint: zQuestionThemeAssignmentIsHint()
8
9
  });
9
10
  //#endregion
10
11
  export { QUESTION_THEME_ASSIGNMENT_CREATION_DTO };
@@ -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":";;;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"}
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\nimport {\n zQuestionThemeAssignmentIsPrimary,\n zQuestionThemeAssignmentIsHint,\n} from \"@question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.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: zQuestionThemeAssignmentIsPrimary(),\n isHint: zQuestionThemeAssignmentIsHint(),\n});\n\nexport type QuestionThemeAssignmentCreationDto = z.infer<typeof QUESTION_THEME_ASSIGNMENT_CREATION_DTO>;\n\nexport { QUESTION_THEME_ASSIGNMENT_CREATION_DTO };"],"mappings":";;;;AASA,MAAM,yCAAyC,EAAE,OAAO;CACtD,SAAS,UAAU,CAChB,SAAS,gDAAgD;CAC5D,WAAW,mCAAmC;CAC9C,QAAQ,gCAAgC;CACzC,CAAC"}
@@ -0,0 +1,9 @@
1
+ //#region ../../src/contexts/question/application/dto/shared/zod/validators/question-content/constants/question-content.zod.validators.constants.ts
2
+ const QUESTION_STATEMENT_EXAMPLE = "What is the capital of France?";
3
+ const QUESTION_ANSWER_EXAMPLE = "The capital of France is Paris.";
4
+ const QUESTION_CONTEXT_EXAMPLE = "France is a country in Western Europe.";
5
+ const QUESTION_TRIVIA_EXAMPLE = ["Paris is known as the 'City of Light'.", "The Eiffel Tower is located in Paris."];
6
+ //#endregion
7
+ export { QUESTION_ANSWER_EXAMPLE, QUESTION_CONTEXT_EXAMPLE, QUESTION_STATEMENT_EXAMPLE, QUESTION_TRIVIA_EXAMPLE };
8
+
9
+ //# sourceMappingURL=question-content.zod.validators.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-content.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/validators/question-content/constants/question-content.zod.validators.constants.ts"],"sourcesContent":["const QUESTION_STATEMENT_EXAMPLE = \"What is the capital of France?\";\n\nconst QUESTION_ANSWER_EXAMPLE = \"The capital of France is Paris.\";\n\nconst QUESTION_CONTEXT_EXAMPLE = \"France is a country in Western Europe.\";\n\nconst QUESTION_TRIVIA_EXAMPLE = [\"Paris is known as the 'City of Light'.\", \"The Eiffel Tower is located in Paris.\"];\n\nexport {\n QUESTION_STATEMENT_EXAMPLE,\n QUESTION_ANSWER_EXAMPLE,\n QUESTION_CONTEXT_EXAMPLE,\n QUESTION_TRIVIA_EXAMPLE,\n};"],"mappings":";AAAA,MAAM,6BAA6B;AAEnC,MAAM,0BAA0B;AAEhC,MAAM,2BAA2B;AAEjC,MAAM,0BAA0B,CAAC,0CAA0C,wCAAwC"}
@@ -0,0 +1,32 @@
1
+ import { zLocalizedText, zLocalizedTexts } from "../../../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
2
+ import { QUESTION_ANSWER_EXAMPLE, QUESTION_CONTEXT_EXAMPLE, QUESTION_STATEMENT_EXAMPLE, QUESTION_TRIVIA_EXAMPLE } from "./constants/question-content.zod.validators.constants.mjs";
3
+ import { z } from "zod";
4
+ //#region ../../src/contexts/question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators.ts
5
+ function zQuestionStatement() {
6
+ return z.string().describe("Question's statement").meta({ example: QUESTION_STATEMENT_EXAMPLE });
7
+ }
8
+ function zQuestionLocalizedStatement() {
9
+ return zLocalizedText().describe("Question's statement");
10
+ }
11
+ function zQuestionAnswer() {
12
+ return z.string().describe("Question's answer").meta({ example: QUESTION_ANSWER_EXAMPLE });
13
+ }
14
+ function zQuestionLocalizedAnswer() {
15
+ return zLocalizedText().describe("Question's answer");
16
+ }
17
+ function zQuestionContext() {
18
+ return z.string().describe("Additional context for the question").meta({ example: QUESTION_CONTEXT_EXAMPLE });
19
+ }
20
+ function zQuestionLocalizedContext() {
21
+ return zLocalizedText().describe("Additional context for the question");
22
+ }
23
+ function zQuestionTrivia() {
24
+ return z.array(z.string()).describe("Interesting trivia related to the question").meta({ example: QUESTION_TRIVIA_EXAMPLE });
25
+ }
26
+ function zQuestionLocalizedTrivia() {
27
+ return zLocalizedTexts().describe("Interesting trivia related to the question");
28
+ }
29
+ //#endregion
30
+ export { zQuestionAnswer, zQuestionContext, zQuestionLocalizedAnswer, zQuestionLocalizedContext, zQuestionLocalizedStatement, zQuestionLocalizedTrivia, zQuestionStatement, zQuestionTrivia };
31
+
32
+ //# sourceMappingURL=question-content.dto.zod.validators.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-content.dto.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\n\nimport {\n QUESTION_ANSWER_EXAMPLE,\n QUESTION_CONTEXT_EXAMPLE,\n QUESTION_STATEMENT_EXAMPLE,\n QUESTION_TRIVIA_EXAMPLE,\n} from \"@question/application/dto/shared/zod/validators/question-content/constants/question-content.zod.validators.constants\";\n\nimport type { ZodArray, ZodObject, ZodOptional, ZodString } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nfunction zQuestionStatement(): ZodString {\n return z.string()\n .describe(\"Question's statement\")\n .meta({ example: QUESTION_STATEMENT_EXAMPLE });\n}\n\nfunction zQuestionLocalizedStatement(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n return zLocalizedText()\n .describe(\"Question's statement\");\n}\n\nfunction zQuestionAnswer(): ZodString {\n return z.string()\n .describe(\"Question's answer\")\n .meta({ example: QUESTION_ANSWER_EXAMPLE });\n}\n\nfunction zQuestionLocalizedAnswer(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n return zLocalizedText()\n .describe(\"Question's answer\");\n}\n\nfunction zQuestionContext(): ZodString {\n return z.string()\n .describe(\"Additional context for the question\")\n .meta({ example: QUESTION_CONTEXT_EXAMPLE });\n}\n\nfunction zQuestionLocalizedContext(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n return zLocalizedText()\n .describe(\"Additional context for the question\");\n}\n\nfunction zQuestionTrivia(): ZodArray<ZodString> {\n return z.array(z.string())\n .describe(\"Interesting trivia related to the question\")\n .meta({ example: QUESTION_TRIVIA_EXAMPLE });\n}\n\nfunction zQuestionLocalizedTrivia(): ZodObject<Record<Locale, ZodOptional<ZodArray<ZodString>>>> {\n return zLocalizedTexts()\n .describe(\"Interesting trivia related to the question\");\n}\n\nexport {\n zQuestionStatement,\n zQuestionLocalizedStatement,\n zQuestionAnswer,\n zQuestionLocalizedAnswer,\n zQuestionContext,\n zQuestionLocalizedContext,\n zQuestionTrivia,\n zQuestionLocalizedTrivia,\n};"],"mappings":";;;;AAeA,SAAS,qBAAgC;AACvC,QAAO,EAAE,QAAQ,CACd,SAAS,uBAAuB,CAChC,KAAK,EAAE,SAAS,4BAA4B,CAAC;;AAGlD,SAAS,8BAAiF;AACxF,QAAO,gBAAgB,CACpB,SAAS,uBAAuB;;AAGrC,SAAS,kBAA6B;AACpC,QAAO,EAAE,QAAQ,CACd,SAAS,oBAAoB,CAC7B,KAAK,EAAE,SAAS,yBAAyB,CAAC;;AAG/C,SAAS,2BAA8E;AACrF,QAAO,gBAAgB,CACpB,SAAS,oBAAoB;;AAGlC,SAAS,mBAA8B;AACrC,QAAO,EAAE,QAAQ,CACd,SAAS,sCAAsC,CAC/C,KAAK,EAAE,SAAS,0BAA0B,CAAC;;AAGhD,SAAS,4BAA+E;AACtF,QAAO,gBAAgB,CACpB,SAAS,sCAAsC;;AAGpD,SAAS,kBAAuC;AAC9C,QAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CACvB,SAAS,6CAA6C,CACtD,KAAK,EAAE,SAAS,yBAAyB,CAAC;;AAG/C,SAAS,2BAAwF;AAC/F,QAAO,iBAAiB,CACrB,SAAS,6CAA6C"}
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ //#region ../../src/contexts/question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.ts
3
+ function zQuestionThemeAssignmentIsPrimary() {
4
+ return z.boolean().describe("Indicates if the assigned theme is the primary theme for the question");
5
+ }
6
+ function zQuestionThemeAssignmentIsHint() {
7
+ return z.boolean().describe("Indicates if the assigned theme is a hint for the question's answer");
8
+ }
9
+ //#endregion
10
+ export { zQuestionThemeAssignmentIsHint, zQuestionThemeAssignmentIsPrimary };
11
+
12
+ //# sourceMappingURL=question-theme-assignment.dto.zod.validators.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-theme-assignment.dto.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../../../src/contexts/question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport type { ZodBoolean } from \"zod\";\n\nfunction zQuestionThemeAssignmentIsPrimary(): ZodBoolean {\n return z.boolean()\n .describe(\"Indicates if the assigned theme is the primary theme for the question\");\n}\n\nfunction zQuestionThemeAssignmentIsHint(): ZodBoolean {\n return z.boolean()\n .describe(\"Indicates if the assigned theme is a hint for the question's answer\");\n}\n\nexport {\n zQuestionThemeAssignmentIsPrimary,\n zQuestionThemeAssignmentIsHint,\n};"],"mappings":";;AAIA,SAAS,oCAAgD;AACvD,QAAO,EAAE,SAAS,CACf,SAAS,wEAAwE;;AAGtF,SAAS,iCAA6C;AACpD,QAAO,EAAE,SAAS,CACf,SAAS,sEAAsE"}
@@ -3,6 +3,7 @@ import { QUESTION_CATEGORIES } from "../../../../../domain/value-objects/questio
3
3
  import { QUESTION_STATUSES } from "../../../../../domain/value-objects/question-status/question-status.constants.mjs";
4
4
  import "../../../../../domain/value-objects/question-source-urls/question-source-urls.constants.mjs";
5
5
  import { areValuesUniqueFromStrings } from "../../../../../../../shared/application/dto/zod/refinements/array/array.zod.refinements.mjs";
6
+ import { zIsoDateTime, zMongoId } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
6
7
  import { z } from "zod";
7
8
  //#region ../../src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.ts
8
9
  function zQuestionCognitiveDifficulty() {
@@ -17,7 +18,16 @@ function zQuestionCategory() {
17
18
  function zQuestionSourceUrls() {
18
19
  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"] });
19
20
  }
21
+ function zQuestionId() {
22
+ return zMongoId().describe("Question's unique identifier");
23
+ }
24
+ function zQuestionCreatedAt() {
25
+ return zIsoDateTime().describe("Question's creation date");
26
+ }
27
+ function zQuestionUpdatedAt() {
28
+ return zIsoDateTime().describe("Question's last update date");
29
+ }
20
30
  //#endregion
21
- export { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionSourceUrls, zQuestionStatus };
31
+ export { zQuestionCategory, zQuestionCognitiveDifficulty, zQuestionCreatedAt, zQuestionId, zQuestionSourceUrls, zQuestionStatus, zQuestionUpdatedAt };
22
32
 
23
33
  //# 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":";;;;;;;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
+ {"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\";\nimport { zIsoDateTime, zMongoId } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\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, ZodString, ZodISODateTime } 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\nfunction zQuestionId(): ZodString {\n return zMongoId()\n .describe(\"Question's unique identifier\");\n}\n\nfunction zQuestionCreatedAt(): ZodISODateTime {\n return zIsoDateTime()\n .describe(\"Question's creation date\");\n}\n\nfunction zQuestionUpdatedAt(): ZodISODateTime {\n return zIsoDateTime()\n .describe(\"Question's last update date\");\n}\n\nexport {\n zQuestionCognitiveDifficulty,\n zQuestionStatus,\n zQuestionCategory,\n zQuestionSourceUrls,\n zQuestionId,\n zQuestionCreatedAt,\n zQuestionUpdatedAt,\n};"],"mappings":";;;;;;;;AAgBA,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;;AAGtF,SAAS,cAAyB;AAChC,QAAO,UAAU,CACd,SAAS,+BAA+B;;AAG7C,SAAS,qBAAqC;AAC5C,QAAO,cAAc,CAClB,SAAS,2BAA2B;;AAGzC,SAAS,qBAAqC;AAC5C,QAAO,cAAc,CAClB,SAAS,8BAA8B"}
@@ -1,5 +1,5 @@
1
- import { QUESTION_CATEGORIES } from "./question-category.constants.mjs";
2
1
  import { TupleToEnum } from "../../../../../shared/types/enum.types.mjs";
2
+ import { QUESTION_CATEGORIES } from "./question-category.constants.mjs";
3
3
  import { TupleToUnion } from "type-fest";
4
4
 
5
5
  //#region ../../src/contexts/question/domain/value-objects/question-category/question-category.types.d.ts
@@ -1,5 +1,5 @@
1
- import { QUESTION_COGNITIVE_DIFFICULTIES } from "./question-cognitive-difficulty.constants.mjs";
2
1
  import { TupleToEnum } from "../../../../../shared/types/enum.types.mjs";
2
+ import { QUESTION_COGNITIVE_DIFFICULTIES } from "./question-cognitive-difficulty.constants.mjs";
3
3
  import { TupleToUnion } from "type-fest";
4
4
 
5
5
  //#region ../../src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types.d.ts
@@ -1,5 +1,5 @@
1
- import { QUESTION_STATUSES } from "./question-status.constants.mjs";
2
1
  import { TupleToEnum } from "../../../../../shared/types/enum.types.mjs";
2
+ import { QUESTION_STATUSES } from "./question-status.constants.mjs";
3
3
  import { TupleToUnion } from "type-fest";
4
4
 
5
5
  //#region ../../src/contexts/question/domain/value-objects/question-status/question-status.types.d.ts
@@ -1,3 +1,4 @@
1
+ import { QuestionThemeStatusEnum } from "../../../domain/value-objects/question-theme-status/question-theme-status.types.mjs";
1
2
  import { z } from "zod";
2
3
 
3
4
  //#region ../../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.d.ts
@@ -8,10 +9,7 @@ declare const ADMIN_QUESTION_THEME_DTO: z.ZodObject<{
8
9
  aliases: z.ZodObject<Record<"en" | "fr" | "es" | "de" | "it" | "pt", z.ZodOptional<z.ZodArray<z.ZodString>>>, z.core.$strip>;
9
10
  description: z.ZodObject<Record<"en" | "fr" | "es" | "de" | "it" | "pt", z.ZodOptional<z.ZodString>>, z.core.$strip>;
10
11
  color: z.ZodOptional<z.ZodString>;
11
- status: z.ZodEnum<{
12
- active: "active";
13
- archived: "archived";
14
- }>;
12
+ status: z.ZodEnum<QuestionThemeStatusEnum>;
15
13
  createdAt: z.ZodISODateTime;
16
14
  updatedAt: z.ZodISODateTime;
17
15
  }, z.core.$strict>;
@@ -1,19 +1,16 @@
1
- import { zLocalizedText, zLocalizedTexts } from "../../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
2
- import { zHexColor, zIsoDateTime, zMongoId, zSlug } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
3
- import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
4
- import { QUESTION_THEME_STATUSES } from "../../../domain/value-objects/question-theme-status/question-theme-status.constants.mjs";
1
+ import { zQuestionThemeColor, zQuestionThemeCreatedAt, zQuestionThemeId, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug, zQuestionThemeStatus, zQuestionThemeUpdatedAt } from "../zod/validators/question-theme.dto.zod.validators.mjs";
5
2
  import { z } from "zod";
6
3
  //#region ../../src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.ts
7
4
  const ADMIN_QUESTION_THEME_DTO = z.strictObject({
8
- id: zMongoId().describe("Question Theme's unique identifier"),
9
- slug: zSlug().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),
10
- label: zLocalizedText().describe("Question Theme's label in supported locales"),
11
- aliases: zLocalizedTexts().describe("Question Theme's aliases in supported locales. Help to find the theme with different keywords"),
12
- description: zLocalizedText().describe("Question Theme's description in supported locales"),
13
- color: zHexColor().optional().describe("Question Theme's hex color").meta({ example: "#FF5733" }),
14
- status: z.enum(QUESTION_THEME_STATUSES).describe("Question Theme's status").meta({ example: QUESTION_THEME_STATUSES[0] }),
15
- createdAt: zIsoDateTime().describe("Question Theme's creation date"),
16
- updatedAt: zIsoDateTime().describe("Question Theme's last update date")
5
+ id: zQuestionThemeId(),
6
+ slug: zQuestionThemeSlug(),
7
+ label: zQuestionThemeLocalizedLabel(),
8
+ aliases: zQuestionThemeLocalizedAliases(),
9
+ description: zQuestionThemeLocalizedDescription(),
10
+ color: zQuestionThemeColor().optional(),
11
+ status: zQuestionThemeStatus(),
12
+ createdAt: zQuestionThemeCreatedAt(),
13
+ updatedAt: zQuestionThemeUpdatedAt()
17
14
  });
18
15
  //#endregion
19
16
  export { ADMIN_QUESTION_THEME_DTO };
@@ -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 { zHexColor, 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 color: zHexColor()\n .optional()\n .describe(\"Question Theme's hex color\")\n .meta({ example: \"#FF5733\" }),\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,OAAO,WAAW,CACf,UAAU,CACV,SAAS,6BAA6B,CACtC,KAAK,EAAE,SAAS,WAAW,CAAC;CAC/B,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"}
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 {\n zQuestionThemeId,\n zQuestionThemeSlug,\n zQuestionThemeLocalizedLabel,\n zQuestionThemeLocalizedAliases,\n zQuestionThemeLocalizedDescription,\n zQuestionThemeColor,\n zQuestionThemeStatus,\n zQuestionThemeCreatedAt,\n zQuestionThemeUpdatedAt,\n} from \"@question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators\";\n\nconst ADMIN_QUESTION_THEME_DTO = z.strictObject({\n id: zQuestionThemeId(),\n slug: zQuestionThemeSlug(),\n label: zQuestionThemeLocalizedLabel(),\n aliases: zQuestionThemeLocalizedAliases(),\n description: zQuestionThemeLocalizedDescription(),\n color: zQuestionThemeColor()\n .optional(),\n status: zQuestionThemeStatus(),\n createdAt: zQuestionThemeCreatedAt(),\n updatedAt: zQuestionThemeUpdatedAt(),\n});\n\nexport type AdminQuestionThemeDto = z.infer<typeof ADMIN_QUESTION_THEME_DTO>;\n\nexport { ADMIN_QUESTION_THEME_DTO };"],"mappings":";;;AAcA,MAAM,2BAA2B,EAAE,aAAa;CAC9C,IAAI,kBAAkB;CACtB,MAAM,oBAAoB;CAC1B,OAAO,8BAA8B;CACrC,SAAS,gCAAgC;CACzC,aAAa,oCAAoC;CACjD,OAAO,qBAAqB,CACzB,UAAU;CACb,QAAQ,sBAAsB;CAC9B,WAAW,yBAAyB;CACpC,WAAW,yBAAyB;CACrC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { QuestionThemeStatusEnum } from "../../../domain/value-objects/question-theme-status/question-theme-status.types.mjs";
1
2
  import { z } from "zod";
2
3
 
3
4
  //#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.d.ts
@@ -8,10 +9,7 @@ declare const QUESTION_THEME_DTO: z.ZodObject<{
8
9
  aliases: z.ZodArray<z.ZodString>;
9
10
  description: z.ZodString;
10
11
  color: z.ZodOptional<z.ZodString>;
11
- status: z.ZodEnum<{
12
- active: "active";
13
- archived: "archived";
14
- }>;
12
+ status: z.ZodEnum<QuestionThemeStatusEnum>;
15
13
  createdAt: z.ZodISODateTime;
16
14
  updatedAt: z.ZodISODateTime;
17
15
  }, z.core.$strict>;
@@ -1,22 +1,16 @@
1
- import { zHexColor, zIsoDateTime, zMongoId, zSlug } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
2
- import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
3
- import { QUESTION_THEME_STATUSES } from "../../../domain/value-objects/question-theme-status/question-theme-status.constants.mjs";
1
+ import { zQuestionThemeAliases, zQuestionThemeColor, zQuestionThemeCreatedAt, zQuestionThemeDescription, zQuestionThemeId, zQuestionThemeLabel, zQuestionThemeSlug, zQuestionThemeStatus, zQuestionThemeUpdatedAt } from "../zod/validators/question-theme.dto.zod.validators.mjs";
4
2
  import { z } from "zod";
5
3
  //#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.ts
6
4
  const QUESTION_THEME_DTO = z.strictObject({
7
- id: zMongoId().describe("Question Theme's unique identifier"),
8
- slug: zSlug().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),
9
- label: z.string().describe("Question Theme's translated label").meta({ example: "History" }),
10
- aliases: z.array(z.string()).describe("Question Theme's translated aliases. Help to find the theme with different keywords").meta({ example: [
11
- "Historical Events",
12
- "Past",
13
- "Future"
14
- ] }),
15
- description: z.string().describe("Question Theme's translated description").meta({ example: "Questions related to historical events and timelines." }),
16
- color: zHexColor().optional().describe("Question Theme's hex color").meta({ example: "#FF5733" }),
17
- status: z.enum(QUESTION_THEME_STATUSES).describe("Question Theme's status").meta({ example: QUESTION_THEME_STATUSES[0] }),
18
- createdAt: zIsoDateTime().describe("Question Theme's creation date"),
19
- updatedAt: zIsoDateTime().describe("Question Theme's last update date")
5
+ id: zQuestionThemeId(),
6
+ slug: zQuestionThemeSlug(),
7
+ label: zQuestionThemeLabel(),
8
+ aliases: zQuestionThemeAliases(),
9
+ description: zQuestionThemeDescription(),
10
+ color: zQuestionThemeColor().optional(),
11
+ status: zQuestionThemeStatus(),
12
+ createdAt: zQuestionThemeCreatedAt(),
13
+ updatedAt: zQuestionThemeUpdatedAt()
20
14
  });
21
15
  //#endregion
22
16
  export { QUESTION_THEME_DTO };
@@ -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 { zHexColor, 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 color: zHexColor()\n .optional()\n .describe(\"Question Theme's hex color\")\n .meta({ example: \"#FF5733\" }),\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,OAAO,WAAW,CACf,UAAU,CACV,SAAS,6BAA6B,CACtC,KAAK,EAAE,SAAS,WAAW,CAAC;CAC/B,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"}
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 {\n zQuestionThemeId,\n zQuestionThemeSlug,\n zQuestionThemeLabel,\n zQuestionThemeAliases,\n zQuestionThemeDescription,\n zQuestionThemeColor,\n zQuestionThemeStatus,\n zQuestionThemeCreatedAt,\n zQuestionThemeUpdatedAt,\n} from \"@question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators\";\n\nconst QUESTION_THEME_DTO = z.strictObject({\n id: zQuestionThemeId(),\n slug: zQuestionThemeSlug(),\n label: zQuestionThemeLabel(),\n aliases: zQuestionThemeAliases(),\n description: zQuestionThemeDescription(),\n color: zQuestionThemeColor()\n .optional(),\n status: zQuestionThemeStatus(),\n createdAt: zQuestionThemeCreatedAt(),\n updatedAt: zQuestionThemeUpdatedAt(),\n});\n\nexport type QuestionThemeDto = z.infer<typeof QUESTION_THEME_DTO>;\n\nexport { QUESTION_THEME_DTO };"],"mappings":";;;AAcA,MAAM,qBAAqB,EAAE,aAAa;CACxC,IAAI,kBAAkB;CACtB,MAAM,oBAAoB;CAC1B,OAAO,qBAAqB;CAC5B,SAAS,uBAAuB;CAChC,aAAa,2BAA2B;CACxC,OAAO,qBAAqB,CACzB,UAAU;CACb,QAAQ,sBAAsB;CAC9B,WAAW,yBAAyB;CACpC,WAAW,yBAAyB;CACrC,CAAC"}
@@ -1,14 +1,12 @@
1
- import { zLocalizedText, zLocalizedTexts } from "../../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
2
- import { zHexColor, zSlug } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
3
- import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
1
+ import { zQuestionThemeColor, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug } from "../zod/validators/question-theme.dto.zod.validators.mjs";
4
2
  import { z } from "zod";
5
3
  //#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.ts
6
4
  const QUESTION_THEME_CREATION_DTO = z.object({
7
- slug: zSlug().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),
8
- label: zLocalizedText().describe("Question Theme's translated label"),
9
- aliases: zLocalizedTexts().describe("Question Theme's translated aliases. Help to find the theme with different keywords"),
10
- description: zLocalizedText().describe("Question Theme's translated description"),
11
- color: zHexColor().optional().describe("Question Theme's hex color (6-digit with # prefix)").meta({ example: "#FF5733" })
5
+ slug: zQuestionThemeSlug(),
6
+ label: zQuestionThemeLocalizedLabel(),
7
+ aliases: zQuestionThemeLocalizedAliases(),
8
+ description: zQuestionThemeLocalizedDescription(),
9
+ color: zQuestionThemeColor().optional()
12
10
  });
13
11
  //#endregion
14
12
  export { QUESTION_THEME_CREATION_DTO };
@@ -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 { zHexColor, 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 color: zHexColor()\n .optional()\n .describe(\"Question Theme's hex color (6-digit with # prefix)\")\n .meta({ example: \"#FF5733\" }),\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;CACtD,OAAO,WAAW,CACf,UAAU,CACV,SAAS,qDAAqD,CAC9D,KAAK,EAAE,SAAS,WAAW,CAAC;CAChC,CAAC"}
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 {\n zQuestionThemeSlug,\n zQuestionThemeLocalizedLabel,\n zQuestionThemeLocalizedAliases,\n zQuestionThemeLocalizedDescription,\n zQuestionThemeColor,\n} from \"@question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators\";\n\nconst QUESTION_THEME_CREATION_DTO = z.object({\n slug: zQuestionThemeSlug(),\n label: zQuestionThemeLocalizedLabel(),\n aliases: zQuestionThemeLocalizedAliases(),\n description: zQuestionThemeLocalizedDescription(),\n color: zQuestionThemeColor()\n .optional(),\n});\n\nexport type QuestionThemeCreationDto = z.infer<typeof QUESTION_THEME_CREATION_DTO>;\n\nexport { QUESTION_THEME_CREATION_DTO };"],"mappings":";;;AAUA,MAAM,8BAA8B,EAAE,OAAO;CAC3C,MAAM,oBAAoB;CAC1B,OAAO,8BAA8B;CACrC,SAAS,gCAAgC;CACzC,aAAa,oCAAoC;CACjD,OAAO,qBAAqB,CACzB,UAAU;CACd,CAAC"}
@@ -1,14 +1,12 @@
1
- import { zLocalizedText, zLocalizedTexts } from "../../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
2
- import { zHexColor, zSlug } from "../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
3
- import { QUESTION_THEME_SLUG_EXAMPLE } from "../zod/validators/constants/question-theme.zod.validators.constants.mjs";
1
+ import { zQuestionThemeColor, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug } from "../zod/validators/question-theme.dto.zod.validators.mjs";
4
2
  import { z } from "zod";
5
3
  //#region ../../src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.ts
6
4
  const QUESTION_THEME_MODIFICATION_DTO = z.object({
7
- slug: zSlug().optional().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE }),
8
- label: zLocalizedText().optional().describe("Question Theme's translated label"),
9
- aliases: zLocalizedTexts().optional().describe("Question Theme's translated aliases. Help to find the theme with different keywords"),
10
- description: zLocalizedText().optional().describe("Question Theme's translated description"),
11
- color: zHexColor().optional().describe("Question Theme's hex color (6-digit with # prefix)").meta({ example: "#FF5733" })
5
+ slug: zQuestionThemeSlug().optional(),
6
+ label: zQuestionThemeLocalizedLabel().optional(),
7
+ aliases: zQuestionThemeLocalizedAliases().optional(),
8
+ description: zQuestionThemeLocalizedDescription().optional(),
9
+ color: zQuestionThemeColor().optional()
12
10
  });
13
11
  //#endregion
14
12
  export { QUESTION_THEME_MODIFICATION_DTO };
@@ -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 { zHexColor, 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 color: zHexColor()\n .optional()\n .describe(\"Question Theme's hex color (6-digit with # prefix)\")\n .meta({ example: \"#FF5733\" }),\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;CACtD,OAAO,WAAW,CACf,UAAU,CACV,SAAS,qDAAqD,CAC9D,KAAK,EAAE,SAAS,WAAW,CAAC;CAChC,CAAC"}
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 {\n zQuestionThemeSlug,\n zQuestionThemeLocalizedLabel,\n zQuestionThemeLocalizedAliases,\n zQuestionThemeLocalizedDescription,\n zQuestionThemeColor,\n} from \"@question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators\";\n\nconst QUESTION_THEME_MODIFICATION_DTO = z.object({\n slug: zQuestionThemeSlug()\n .optional(),\n label: zQuestionThemeLocalizedLabel()\n .optional(),\n aliases: zQuestionThemeLocalizedAliases()\n .optional(),\n description: zQuestionThemeLocalizedDescription()\n .optional(),\n color: zQuestionThemeColor()\n .optional(),\n});\n\nexport type QuestionThemeModificationDto = z.infer<typeof QUESTION_THEME_MODIFICATION_DTO>;\n\nexport { QUESTION_THEME_MODIFICATION_DTO };"],"mappings":";;;AAUA,MAAM,kCAAkC,EAAE,OAAO;CAC/C,MAAM,oBAAoB,CACvB,UAAU;CACb,OAAO,8BAA8B,CAClC,UAAU;CACb,SAAS,gCAAgC,CACtC,UAAU;CACb,aAAa,oCAAoC,CAC9C,UAAU;CACb,OAAO,qBAAqB,CACzB,UAAU;CACd,CAAC"}
@@ -1,6 +1,13 @@
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
+ const QUESTION_THEME_LABEL_EXAMPLE = "History";
4
+ const QUESTION_THEME_ALIASES_EXAMPLE = [
5
+ "Historical Events",
6
+ "Past",
7
+ "Future"
8
+ ];
9
+ const QUESTION_THEME_DESCRIPTION_EXAMPLE = "Questions related to historical events and timelines.";
3
10
  //#endregion
4
- export { QUESTION_THEME_SLUG_EXAMPLE };
11
+ export { QUESTION_THEME_ALIASES_EXAMPLE, QUESTION_THEME_DESCRIPTION_EXAMPLE, QUESTION_THEME_LABEL_EXAMPLE, QUESTION_THEME_SLUG_EXAMPLE };
5
12
 
6
13
  //# sourceMappingURL=question-theme.zod.validators.constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"question-theme.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.ts"],"sourcesContent":["const QUESTION_THEME_SLUG_EXAMPLE = \"general-knowledge\";\n\nexport {\n QUESTION_THEME_SLUG_EXAMPLE,\n};"],"mappings":";AAAA,MAAM,8BAA8B"}
1
+ {"version":3,"file":"question-theme.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.ts"],"sourcesContent":["const QUESTION_THEME_SLUG_EXAMPLE = \"general-knowledge\";\n\nconst QUESTION_THEME_LABEL_EXAMPLE = \"History\";\n\nconst QUESTION_THEME_ALIASES_EXAMPLE = [\"Historical Events\", \"Past\", \"Future\"];\n\nconst QUESTION_THEME_DESCRIPTION_EXAMPLE = \"Questions related to historical events and timelines.\";\n\nexport {\n QUESTION_THEME_SLUG_EXAMPLE,\n QUESTION_THEME_LABEL_EXAMPLE,\n QUESTION_THEME_ALIASES_EXAMPLE,\n QUESTION_THEME_DESCRIPTION_EXAMPLE,\n};"],"mappings":";AAAA,MAAM,8BAA8B;AAEpC,MAAM,+BAA+B;AAErC,MAAM,iCAAiC;CAAC;CAAqB;CAAQ;CAAS;AAE9E,MAAM,qCAAqC"}
@@ -0,0 +1,46 @@
1
+ import { zLocalizedText, zLocalizedTexts } from "../../../../../../../../shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs";
2
+ import { zHexColor, zIsoDateTime, zMongoId, zSlug } from "../../../../../../../../shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs";
3
+ import { QUESTION_THEME_ALIASES_EXAMPLE, QUESTION_THEME_DESCRIPTION_EXAMPLE, QUESTION_THEME_LABEL_EXAMPLE, QUESTION_THEME_SLUG_EXAMPLE } from "./constants/question-theme.zod.validators.constants.mjs";
4
+ import { QUESTION_THEME_STATUSES } from "../../../../domain/value-objects/question-theme-status/question-theme-status.constants.mjs";
5
+ import { z } from "zod";
6
+ //#region ../../src/contexts/question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.ts
7
+ function zQuestionThemeId() {
8
+ return zMongoId().describe("Question Theme's unique identifier");
9
+ }
10
+ function zQuestionThemeSlug() {
11
+ return zSlug().describe("Question Theme's unique slug in kebab-case").meta({ example: QUESTION_THEME_SLUG_EXAMPLE });
12
+ }
13
+ function zQuestionThemeLabel() {
14
+ return z.string().describe("Question Theme's label").meta({ example: QUESTION_THEME_LABEL_EXAMPLE });
15
+ }
16
+ function zQuestionThemeLocalizedLabel() {
17
+ return zLocalizedText().describe("Question Theme's label");
18
+ }
19
+ function zQuestionThemeAliases() {
20
+ return z.array(z.string()).describe("Question Theme's aliases").meta({ example: QUESTION_THEME_ALIASES_EXAMPLE });
21
+ }
22
+ function zQuestionThemeLocalizedAliases() {
23
+ return zLocalizedTexts().describe("Question Theme's aliases");
24
+ }
25
+ function zQuestionThemeDescription() {
26
+ return z.string().describe("Question Theme's description").meta({ example: QUESTION_THEME_DESCRIPTION_EXAMPLE });
27
+ }
28
+ function zQuestionThemeLocalizedDescription() {
29
+ return zLocalizedText().describe("Question Theme's description");
30
+ }
31
+ function zQuestionThemeColor() {
32
+ return zHexColor().describe("Question Theme's hex color");
33
+ }
34
+ function zQuestionThemeStatus() {
35
+ return z.enum(QUESTION_THEME_STATUSES).describe("Question Theme's status").meta({ example: QUESTION_THEME_STATUSES[0] });
36
+ }
37
+ function zQuestionThemeCreatedAt() {
38
+ return zIsoDateTime().describe("Question Theme's creation date");
39
+ }
40
+ function zQuestionThemeUpdatedAt() {
41
+ return zIsoDateTime().describe("Question Theme's last update date");
42
+ }
43
+ //#endregion
44
+ export { zQuestionThemeAliases, zQuestionThemeColor, zQuestionThemeCreatedAt, zQuestionThemeDescription, zQuestionThemeId, zQuestionThemeLabel, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug, zQuestionThemeStatus, zQuestionThemeUpdatedAt };
45
+
46
+ //# sourceMappingURL=question-theme.dto.zod.validators.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-theme.dto.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../../../src/contexts/question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { zLocalizedText, zLocalizedTexts } from \"@shared/infrastructure/http/zod/validators/localization/localization.zod.validators\";\nimport { zHexColor, zIsoDateTime, zMongoId, zSlug } from \"@shared/infrastructure/http/zod/validators/string/string.zod.validators\";\n\nimport {\n QUESTION_THEME_ALIASES_EXAMPLE,\n QUESTION_THEME_DESCRIPTION_EXAMPLE,\n QUESTION_THEME_LABEL_EXAMPLE,\n QUESTION_THEME_SLUG_EXAMPLE,\n} 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\nimport type { ZodArray, ZodEnum, ZodISODateTime, ZodObject, ZodOptional, ZodString } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\nimport type { QuestionThemeStatusEnum } from \"@question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types\";\n\nfunction zQuestionThemeId(): ZodString {\n return zMongoId()\n .describe(\"Question Theme's unique identifier\");\n}\n\nfunction zQuestionThemeSlug(): ZodString {\n return zSlug()\n .describe(\"Question Theme's unique slug in kebab-case\")\n .meta({ example: QUESTION_THEME_SLUG_EXAMPLE });\n}\n\nfunction zQuestionThemeLabel(): ZodString {\n return z.string()\n .describe(\"Question Theme's label\")\n .meta({ example: QUESTION_THEME_LABEL_EXAMPLE });\n}\n\nfunction zQuestionThemeLocalizedLabel(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n return zLocalizedText()\n .describe(\"Question Theme's label\");\n}\n\nfunction zQuestionThemeAliases(): ZodArray<ZodString> {\n return z.array(z.string())\n .describe(\"Question Theme's aliases\")\n .meta({ example: QUESTION_THEME_ALIASES_EXAMPLE });\n}\n\nfunction zQuestionThemeLocalizedAliases(): ZodObject<Record<Locale, ZodOptional<ZodArray<ZodString>>>> {\n return zLocalizedTexts()\n .describe(\"Question Theme's aliases\");\n}\n\nfunction zQuestionThemeDescription(): ZodString {\n return z.string()\n .describe(\"Question Theme's description\")\n .meta({ example: QUESTION_THEME_DESCRIPTION_EXAMPLE });\n}\n\nfunction zQuestionThemeLocalizedDescription(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n return zLocalizedText()\n .describe(\"Question Theme's description\");\n}\n\nfunction zQuestionThemeColor(): ZodString {\n return zHexColor()\n .describe(\"Question Theme's hex color\");\n}\n\nfunction zQuestionThemeStatus(): ZodEnum<QuestionThemeStatusEnum> {\n return z.enum(QUESTION_THEME_STATUSES)\n .describe(\"Question Theme's status\")\n .meta({ example: QUESTION_THEME_STATUSES[0] });\n}\n\nfunction zQuestionThemeCreatedAt(): ZodISODateTime {\n return zIsoDateTime()\n .describe(\"Question Theme's creation date\");\n}\n\nfunction zQuestionThemeUpdatedAt(): ZodISODateTime {\n return zIsoDateTime()\n .describe(\"Question Theme's last update date\");\n}\n\nexport {\n zQuestionThemeId,\n zQuestionThemeSlug,\n zQuestionThemeLabel,\n zQuestionThemeLocalizedLabel,\n zQuestionThemeAliases,\n zQuestionThemeLocalizedAliases,\n zQuestionThemeDescription,\n zQuestionThemeLocalizedDescription,\n zQuestionThemeColor,\n zQuestionThemeStatus,\n zQuestionThemeCreatedAt,\n zQuestionThemeUpdatedAt,\n};"],"mappings":";;;;;;AAkBA,SAAS,mBAA8B;AACrC,QAAO,UAAU,CACd,SAAS,qCAAqC;;AAGnD,SAAS,qBAAgC;AACvC,QAAO,OAAO,CACX,SAAS,6CAA6C,CACtD,KAAK,EAAE,SAAS,6BAA6B,CAAC;;AAGnD,SAAS,sBAAiC;AACxC,QAAO,EAAE,QAAQ,CACd,SAAS,yBAAyB,CAClC,KAAK,EAAE,SAAS,8BAA8B,CAAC;;AAGpD,SAAS,+BAAkF;AACzF,QAAO,gBAAgB,CACpB,SAAS,yBAAyB;;AAGvC,SAAS,wBAA6C;AACpD,QAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CACvB,SAAS,2BAA2B,CACpC,KAAK,EAAE,SAAS,gCAAgC,CAAC;;AAGtD,SAAS,iCAA8F;AACrG,QAAO,iBAAiB,CACrB,SAAS,2BAA2B;;AAGzC,SAAS,4BAAuC;AAC9C,QAAO,EAAE,QAAQ,CACd,SAAS,+BAA+B,CACxC,KAAK,EAAE,SAAS,oCAAoC,CAAC;;AAG1D,SAAS,qCAAwF;AAC/F,QAAO,gBAAgB,CACpB,SAAS,+BAA+B;;AAG7C,SAAS,sBAAiC;AACxC,QAAO,WAAW,CACf,SAAS,6BAA6B;;AAG3C,SAAS,uBAAyD;AAChE,QAAO,EAAE,KAAK,wBAAwB,CACnC,SAAS,0BAA0B,CACnC,KAAK,EAAE,SAAS,wBAAwB,IAAI,CAAC;;AAGlD,SAAS,0BAA0C;AACjD,QAAO,cAAc,CAClB,SAAS,iCAAiC;;AAG/C,SAAS,0BAA0C;AACjD,QAAO,cAAc,CAClB,SAAS,oCAAoC"}
@@ -1,8 +1,10 @@
1
1
  import { QUESTION_THEME_STATUSES } from "./question-theme-status.constants.mjs";
2
+ import { TupleToEnum } from "../../../../../../../shared/types/enum.types.mjs";
2
3
  import { TupleToUnion } from "type-fest";
3
4
 
4
5
  //#region ../../src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.d.ts
5
6
  type QuestionThemeStatus = TupleToUnion<typeof QUESTION_THEME_STATUSES>;
7
+ type QuestionThemeStatusEnum = TupleToEnum<typeof QUESTION_THEME_STATUSES>;
6
8
  //#endregion
7
- export { type QuestionThemeStatus };
9
+ export { type QuestionThemeStatus, type QuestionThemeStatusEnum };
8
10
  //# sourceMappingURL=question-theme-status.types.d.mts.map
@@ -13,7 +13,7 @@ declare const API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO: z.ZodObject<{
13
13
  maximum: z.ZodOptional<z.ZodNumber>;
14
14
  inclusive: z.ZodOptional<z.ZodBoolean>;
15
15
  keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
- values: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
17
17
  }, z.core.$strict>;
18
18
  type ApiResponseExceptionValidationDetailsDto = z.infer<typeof API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO>;
19
19
  //#endregion
@@ -12,7 +12,11 @@ const API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO = z.strictObject({
12
12
  maximum: z.number().optional().describe("Expected maximum value when applicable").meta({ example: 255 }),
13
13
  inclusive: z.boolean().optional().describe("Whether the minimum or maximum value is inclusive when applicable").meta({ example: true }),
14
14
  keys: z.array(z.string()).optional().describe("List unrecognized keys when applicable").meta({ example: ["unexpectedKey1", "unexpectedKey2"] }),
15
- values: z.array(z.string()).optional().describe("List unrecognized values when applicable").meta({ example: ["unexpectedValue1", "unexpectedValue2"] })
15
+ values: z.array(z.union([
16
+ z.string(),
17
+ z.number(),
18
+ z.boolean()
19
+ ])).optional().describe("List of expected values when applicable").meta({ example: ["expectedValue1", "expectedValue2"] })
16
20
  });
17
21
  //#endregion
18
22
  export { API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO };
@@ -1 +1 @@
1
- {"version":3,"file":"api-response-exception-validation-details.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO = z.strictObject({\n code: z.string()\n .describe(\"Validation error code\")\n .meta({ example: \"type_error\" }),\n message: z.string()\n .describe(\"Validation error message\")\n .meta({ example: \"Expected type string but received type number\" }),\n path: z.array(z.union([z.string(), z.number()]))\n .describe(\"Path to the invalid property\")\n .meta({ example: [\"user\", \"age\"] }),\n expected: z.string()\n .optional()\n .describe(\"Expected type of the invalid property value when applicable\")\n .meta({ example: \"string\" }),\n origin: z.string()\n .optional()\n .describe(\"Origin type of the invalid property value when applicable\")\n .meta({ example: \"number\" }),\n format: z.string()\n .optional()\n .describe(\"Expected high-level value format (e.g. 'uuid', 'email') when applicable\")\n .meta({ example: \"email\" }),\n pattern: z.string()\n .optional()\n .describe(\"Expected regex pattern when applicable\")\n .meta({ example: String.raw`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$` }),\n minimum: z.number()\n .optional()\n .describe(\"Expected minimum value when applicable\")\n .meta({ example: 1 }),\n maximum: z.number()\n .optional()\n .describe(\"Expected maximum value when applicable\")\n .meta({ example: 255 }),\n inclusive: z.boolean()\n .optional()\n .describe(\"Whether the minimum or maximum value is inclusive when applicable\")\n .meta({ example: true }),\n keys: z.array(z.string())\n .optional()\n .describe(\"List unrecognized keys when applicable\")\n .meta({ example: [\"unexpectedKey1\", \"unexpectedKey2\"] }),\n values: z.array(z.string())\n .optional()\n .describe(\"List unrecognized values when applicable\")\n .meta({ example: [\"unexpectedValue1\", \"unexpectedValue2\"] }),\n});\n\nexport type ApiResponseExceptionValidationDetailsDto = z.infer<typeof API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO>;\n\nexport { API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO };"],"mappings":";;AAEA,MAAM,gDAAgD,EAAE,aAAa;CACnE,MAAM,EAAE,QAAQ,CACb,SAAS,wBAAwB,CACjC,KAAK,EAAE,SAAS,cAAc,CAAC;CAClC,SAAS,EAAE,QAAQ,CAChB,SAAS,2BAA2B,CACpC,KAAK,EAAE,SAAS,iDAAiD,CAAC;CACrE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAC7C,SAAS,+BAA+B,CACxC,KAAK,EAAE,SAAS,CAAC,QAAQ,MAAM,EAAE,CAAC;CACrC,UAAU,EAAE,QAAQ,CACjB,UAAU,CACV,SAAS,8DAA8D,CACvE,KAAK,EAAE,SAAS,UAAU,CAAC;CAC9B,QAAQ,EAAE,QAAQ,CACf,UAAU,CACV,SAAS,4DAA4D,CACrE,KAAK,EAAE,SAAS,UAAU,CAAC;CAC9B,QAAQ,EAAE,QAAQ,CACf,UAAU,CACV,SAAS,0EAA0E,CACnF,KAAK,EAAE,SAAS,SAAS,CAAC;CAC7B,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,OAAO,GAAG,qDAAqD,CAAC;CACnF,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,GAAG,CAAC;CACvB,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,KAAK,CAAC;CACzB,WAAW,EAAE,SAAS,CACnB,UAAU,CACV,SAAS,oEAAoE,CAC7E,KAAK,EAAE,SAAS,MAAM,CAAC;CAC1B,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CACtB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,CAAC,kBAAkB,iBAAiB,EAAE,CAAC;CAC1D,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CACxB,UAAU,CACV,SAAS,2CAA2C,CACpD,KAAK,EAAE,SAAS,CAAC,oBAAoB,mBAAmB,EAAE,CAAC;CAC/D,CAAC"}
1
+ {"version":3,"file":"api-response-exception-validation-details.dto.shape.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO = z.strictObject({\n code: z.string()\n .describe(\"Validation error code\")\n .meta({ example: \"type_error\" }),\n message: z.string()\n .describe(\"Validation error message\")\n .meta({ example: \"Expected type string but received type number\" }),\n path: z.array(z.union([z.string(), z.number()]))\n .describe(\"Path to the invalid property\")\n .meta({ example: [\"user\", \"age\"] }),\n expected: z.string()\n .optional()\n .describe(\"Expected type of the invalid property value when applicable\")\n .meta({ example: \"string\" }),\n origin: z.string()\n .optional()\n .describe(\"Origin type of the invalid property value when applicable\")\n .meta({ example: \"number\" }),\n format: z.string()\n .optional()\n .describe(\"Expected high-level value format (e.g. 'uuid', 'email') when applicable\")\n .meta({ example: \"email\" }),\n pattern: z.string()\n .optional()\n .describe(\"Expected regex pattern when applicable\")\n .meta({ example: String.raw`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$` }),\n minimum: z.number()\n .optional()\n .describe(\"Expected minimum value when applicable\")\n .meta({ example: 1 }),\n maximum: z.number()\n .optional()\n .describe(\"Expected maximum value when applicable\")\n .meta({ example: 255 }),\n inclusive: z.boolean()\n .optional()\n .describe(\"Whether the minimum or maximum value is inclusive when applicable\")\n .meta({ example: true }),\n keys: z.array(z.string())\n .optional()\n .describe(\"List unrecognized keys when applicable\")\n .meta({ example: [\"unexpectedKey1\", \"unexpectedKey2\"] }),\n values: z.array(z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe(\"List of expected values when applicable\")\n .meta({ example: [\"expectedValue1\", \"expectedValue2\"] }),\n});\n\nexport type ApiResponseExceptionValidationDetailsDto = z.infer<typeof API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO>;\n\nexport { API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO };"],"mappings":";;AAEA,MAAM,gDAAgD,EAAE,aAAa;CACnE,MAAM,EAAE,QAAQ,CACb,SAAS,wBAAwB,CACjC,KAAK,EAAE,SAAS,cAAc,CAAC;CAClC,SAAS,EAAE,QAAQ,CAChB,SAAS,2BAA2B,CACpC,KAAK,EAAE,SAAS,iDAAiD,CAAC;CACrE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAC7C,SAAS,+BAA+B,CACxC,KAAK,EAAE,SAAS,CAAC,QAAQ,MAAM,EAAE,CAAC;CACrC,UAAU,EAAE,QAAQ,CACjB,UAAU,CACV,SAAS,8DAA8D,CACvE,KAAK,EAAE,SAAS,UAAU,CAAC;CAC9B,QAAQ,EAAE,QAAQ,CACf,UAAU,CACV,SAAS,4DAA4D,CACrE,KAAK,EAAE,SAAS,UAAU,CAAC;CAC9B,QAAQ,EAAE,QAAQ,CACf,UAAU,CACV,SAAS,0EAA0E,CACnF,KAAK,EAAE,SAAS,SAAS,CAAC;CAC7B,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,OAAO,GAAG,qDAAqD,CAAC;CACnF,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,GAAG,CAAC;CACvB,SAAS,EAAE,QAAQ,CAChB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,KAAK,CAAC;CACzB,WAAW,EAAE,SAAS,CACnB,UAAU,CACV,SAAS,oEAAoE,CAC7E,KAAK,EAAE,SAAS,MAAM,CAAC;CAC1B,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CACtB,UAAU,CACV,SAAS,yCAAyC,CAClD,KAAK,EAAE,SAAS,CAAC,kBAAkB,iBAAiB,EAAE,CAAC;CAC1D,QAAQ,EAAE,MAAM,EAAE,MAAM;EAAC,EAAE,QAAQ;EAAE,EAAE,QAAQ;EAAE,EAAE,SAAS;EAAC,CAAC,CAAC,CAC5D,UAAU,CACV,SAAS,0CAA0C,CACnD,KAAK,EAAE,SAAS,CAAC,kBAAkB,iBAAiB,EAAE,CAAC;CAC3D,CAAC"}
@@ -17,7 +17,7 @@ declare const API_RESPONSE_EXCEPTION_DTO: z.ZodObject<{
17
17
  maximum: z.ZodOptional<z.ZodNumber>;
18
18
  inclusive: z.ZodOptional<z.ZodBoolean>;
19
19
  keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
- values: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
21
21
  }, z.core.$strict>>>;
22
22
  errorCode: z.ZodOptional<z.ZodString>;
23
23
  }, z.core.$strict>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@goat-it/schemas",
3
3
  "type": "module",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "description": "Shared types, constants and Zod schemas for the Goat It projects.",
6
6
  "author": "Antoine ZANARDI",
7
7
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@arethetypeswrong/core": "^0.18.2",
15
- "tsdown": "^0.21.7",
15
+ "tsdown": "^0.21.8",
16
16
  "typescript": "^6.0.2",
17
17
  "zod": "^4.3.6"
18
18
  },