@goat-it/schemas 0.0.9 → 0.0.10-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/question/index.d.mts +2 -12
- package/dist/question/index.mjs +1 -7
- package/dist/question-theme/index.d.mts +6 -6
- package/dist/question-theme/index.mjs +5 -5
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-content/admin-question-content.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.d.mts +2 -4
- package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/admin-question/admin-question.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question/question-content/question-content.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/question/question-theme-assignment/question-theme-assignment.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question/question.dto.shape.d.mts +2 -4
- package/dist/src/contexts/question/application/dto/question/question.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/question/question.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-creation.dto.shape.d.mts +1 -2
- package/dist/src/contexts/question/application/dto/question-creation/question-creation.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-modification/question-content-modification/question-content-modification.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-modification/question-modification.dto.shape.d.mts +1 -2
- package/dist/src/contexts/question/application/dto/question-modification/question-modification.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.mjs +1 -1
- package/dist/src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/refinements/question-author/question-author.dto.zod.refinement.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question-content/constants/question-content.zod.validators.constants.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question-content/question-content.dto.zod.validators.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question-theme-assignment/question-theme-assignment.dto.zod.validators.mjs.map +1 -1
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.mjs +1 -4
- package/dist/src/contexts/question/application/dto/shared/zod/validators/question.dto.zod.validators.mjs.map +1 -1
- package/dist/src/contexts/question/domain/constants/question.constants.d.mts +21 -0
- package/dist/src/contexts/question/domain/constants/question.constants.mjs +47 -0
- package/dist/src/contexts/question/domain/constants/question.constants.mjs.map +1 -0
- package/dist/src/contexts/question/domain/types/question.value-objects.d.mts +16 -0
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/admin-question-theme/admin-question-theme.dto.shape.d.mts +2 -2
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs +1 -1
- package/dist/src/contexts/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs.map +1 -0
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/question-theme/question-theme.dto.shape.d.mts +2 -2
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/question-theme/question-theme.dto.shape.mjs +1 -1
- package/dist/src/contexts/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs.map +1 -0
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/question-theme-creation/question-theme-creation.dto.shape.d.mts +1 -1
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs +1 -1
- package/dist/src/contexts/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs.map +1 -0
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/question-theme-modification/question-theme-modification.dto.shape.d.mts +1 -1
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs +1 -1
- package/dist/src/contexts/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs.map +1 -0
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/zod/validators/constants/question-theme.zod.validators.constants.mjs +1 -1
- package/dist/src/contexts/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.mjs.map +1 -0
- package/dist/src/contexts/{question/modules/question-theme → question-theme}/application/dto/zod/validators/question-theme.dto.zod.validators.mjs +4 -4
- package/dist/src/contexts/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.mjs.map +1 -0
- package/dist/src/contexts/{question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.d.mts → question-theme/domain/constants/question-theme.constants.d.mts} +2 -2
- package/dist/src/contexts/{question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.mjs → question-theme/domain/constants/question-theme.constants.mjs} +2 -2
- package/dist/src/contexts/question-theme/domain/constants/question-theme.constants.mjs.map +1 -0
- package/dist/src/contexts/question-theme/domain/types/question-theme.entities.d.mts +1 -0
- package/dist/src/contexts/question-theme/domain/types/question-theme.value-objects.d.mts +10 -0
- package/dist/src/shared/application/dto/zod/refinements/array/array.zod.refinements.mjs.map +1 -1
- package/dist/src/shared/domain/value-objects/locale/locale.constants.mjs.map +1 -1
- package/dist/src/shared/domain/value-objects/locale/locale.types.d.mts +1 -1
- 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
- package/dist/src/shared/infrastructure/http/dto/api-response-exception/api-response-exception.dto.shape.mjs.map +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.mjs.map +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.mjs.map +1 -1
- package/dist/src/shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs.map +1 -1
- package/dist/src/shared/types/enum.types.d.mts +1 -1
- package/package.json +2 -2
- package/dist/src/contexts/question/domain/value-objects/question-author/question-author.constants.d.mts +0 -8
- package/dist/src/contexts/question/domain/value-objects/question-author/question-author.constants.mjs +0 -14
- package/dist/src/contexts/question/domain/value-objects/question-author/question-author.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-author/question-author.types.d.mts +0 -8
- package/dist/src/contexts/question/domain/value-objects/question-category/question-category.constants.d.mts +0 -5
- package/dist/src/contexts/question/domain/value-objects/question-category/question-category.constants.mjs +0 -11
- package/dist/src/contexts/question/domain/value-objects/question-category/question-category.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-category/question-category.types.d.mts +0 -10
- package/dist/src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.d.mts +0 -5
- package/dist/src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.mjs +0 -10
- package/dist/src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types.d.mts +0 -10
- package/dist/src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.d.mts +0 -5
- package/dist/src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.mjs +0 -12
- package/dist/src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-rejection/question-rejection.types.d.mts +0 -8
- package/dist/src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.d.mts +0 -6
- package/dist/src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.mjs +0 -7
- package/dist/src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-status/question-status.constants.d.mts +0 -10
- package/dist/src/contexts/question/domain/value-objects/question-status/question-status.constants.mjs +0 -16
- package/dist/src/contexts/question/domain/value-objects/question-status/question-status.constants.mjs.map +0 -1
- package/dist/src/contexts/question/domain/value-objects/question-status/question-status.types.d.mts +0 -10
- package/dist/src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.d.mts +0 -6
- package/dist/src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs +0 -7
- package/dist/src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.constants.mjs.map +0 -1
- package/dist/src/contexts/question/modules/question-theme/domain/value-objects/question-theme-status/question-theme-status.types.d.mts +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { zQuestionThemeColor, zQuestionThemeCreatedAt, zQuestionThemeId, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug, zQuestionThemeStatus, zQuestionThemeUpdatedAt } from "../zod/validators/question-theme.dto.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region ../../src/contexts/question
|
|
3
|
+
//#region ../../src/contexts/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.ts
|
|
4
4
|
const ADMIN_QUESTION_THEME_DTO = z.strictObject({
|
|
5
5
|
id: zQuestionThemeId(),
|
|
6
6
|
slug: zQuestionThemeSlug(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-question-theme.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/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-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,iBAAiB;CACrB,MAAM,mBAAmB;CACzB,OAAO,6BAA6B;CACpC,SAAS,+BAA+B;CACxC,aAAa,mCAAmC;CAChD,OAAO,oBAAoB,EACxB,SAAS;CACZ,QAAQ,qBAAqB;CAC7B,WAAW,wBAAwB;CACnC,WAAW,wBAAwB;AACrC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { QuestionThemeStatusEnum } from "../../../domain/
|
|
1
|
+
import { QuestionThemeStatusEnum } from "../../../domain/types/question-theme.value-objects.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
-
//#region ../../src/contexts/question
|
|
4
|
+
//#region ../../src/contexts/question-theme/application/dto/question-theme/question-theme.dto.shape.d.ts
|
|
5
5
|
declare const QUESTION_THEME_DTO: z.ZodObject<{
|
|
6
6
|
id: z.ZodString;
|
|
7
7
|
slug: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { zQuestionThemeAliases, zQuestionThemeColor, zQuestionThemeCreatedAt, zQuestionThemeDescription, zQuestionThemeId, zQuestionThemeLabel, zQuestionThemeSlug, zQuestionThemeStatus, zQuestionThemeUpdatedAt } from "../zod/validators/question-theme.dto.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region ../../src/contexts/question
|
|
3
|
+
//#region ../../src/contexts/question-theme/application/dto/question-theme/question-theme.dto.shape.ts
|
|
4
4
|
const QUESTION_THEME_DTO = z.strictObject({
|
|
5
5
|
id: zQuestionThemeId(),
|
|
6
6
|
slug: zQuestionThemeSlug(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question-theme.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/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-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,iBAAiB;CACrB,MAAM,mBAAmB;CACzB,OAAO,oBAAoB;CAC3B,SAAS,sBAAsB;CAC/B,aAAa,0BAA0B;CACvC,OAAO,oBAAoB,EACxB,SAAS;CACZ,QAAQ,qBAAqB;CAC7B,WAAW,wBAAwB;CACnC,WAAW,wBAAwB;AACrC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
//#region ../../src/contexts/question
|
|
3
|
+
//#region ../../src/contexts/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.d.ts
|
|
4
4
|
declare const QUESTION_THEME_CREATION_DTO: z.ZodObject<{
|
|
5
5
|
slug: z.ZodString;
|
|
6
6
|
label: z.ZodObject<Record<"en" | "fr" | "es" | "de" | "it" | "pt", z.ZodOptional<z.ZodString>>, z.core.$strip>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { zQuestionThemeColor, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug } from "../zod/validators/question-theme.dto.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region ../../src/contexts/question
|
|
3
|
+
//#region ../../src/contexts/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.ts
|
|
4
4
|
const QUESTION_THEME_CREATION_DTO = z.object({
|
|
5
5
|
slug: zQuestionThemeSlug(),
|
|
6
6
|
label: zQuestionThemeLocalizedLabel(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question-theme-creation.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/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-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,mBAAmB;CACzB,OAAO,6BAA6B;CACpC,SAAS,+BAA+B;CACxC,aAAa,mCAAmC;CAChD,OAAO,oBAAoB,EACxB,SAAS;AACd,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
//#region ../../src/contexts/question
|
|
3
|
+
//#region ../../src/contexts/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.d.ts
|
|
4
4
|
declare const QUESTION_THEME_MODIFICATION_DTO: z.ZodObject<{
|
|
5
5
|
slug: z.ZodOptional<z.ZodString>;
|
|
6
6
|
label: z.ZodOptional<z.ZodObject<Record<"en" | "fr" | "es" | "de" | "it" | "pt", z.ZodOptional<z.ZodString>>, z.core.$strip>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { zQuestionThemeColor, zQuestionThemeLocalizedAliases, zQuestionThemeLocalizedDescription, zQuestionThemeLocalizedLabel, zQuestionThemeSlug } from "../zod/validators/question-theme.dto.zod.validators.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region ../../src/contexts/question
|
|
3
|
+
//#region ../../src/contexts/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.ts
|
|
4
4
|
const QUESTION_THEME_MODIFICATION_DTO = z.object({
|
|
5
5
|
slug: zQuestionThemeSlug().optional(),
|
|
6
6
|
label: zQuestionThemeLocalizedLabel().optional(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question-theme-modification.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/contexts/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-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,mBAAmB,EACtB,SAAS;CACZ,OAAO,6BAA6B,EACjC,SAAS;CACZ,SAAS,+BAA+B,EACrC,SAAS;CACZ,aAAa,mCAAmC,EAC7C,SAAS;CACZ,OAAO,oBAAoB,EACxB,SAAS;AACd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../src/contexts/question
|
|
1
|
+
//#region ../../src/contexts/question-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants.ts
|
|
2
2
|
const QUESTION_THEME_SLUG_EXAMPLE = "general-knowledge";
|
|
3
3
|
const QUESTION_THEME_LABEL_EXAMPLE = "History";
|
|
4
4
|
const QUESTION_THEME_ALIASES_EXAMPLE = [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question-theme.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/contexts/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;AAAQ;AAE7E,MAAM,qCAAqC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { zLocalizedText, zLocalizedTexts } from "
|
|
2
|
-
import { zHexColor, zIsoDateTime, zMongoId, zSlug } from "
|
|
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
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/
|
|
4
|
+
import { QUESTION_THEME_STATUSES } from "../../../../domain/constants/question-theme.constants.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
//#region ../../src/contexts/question
|
|
6
|
+
//#region ../../src/contexts/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.ts
|
|
7
7
|
function zQuestionThemeId() {
|
|
8
8
|
return zMongoId().describe("Question Theme's unique identifier");
|
|
9
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question-theme.dto.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/contexts/question-theme/application/dto/zod/validators/question-theme.dto.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\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-theme/application/dto/zod/validators/constants/question-theme.zod.validators.constants\";\nimport { QUESTION_THEME_STATUSES } from \"@question-theme/domain/constants/question-theme.constants\";\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 type { QuestionThemeStatusEnum } from \"@question-theme/domain/types/question-theme.value-objects\";\nimport type { ZodArray, ZodEnum, ZodISODateTime, ZodObject, ZodOptional, ZodString } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.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;CACrC,OAAO,SAAS,EACb,SAAS,oCAAoC;AAClD;AAEA,SAAS,qBAAgC;CACvC,OAAO,MAAM,EACV,SAAS,4CAA4C,EACrD,KAAK,EAAE,SAAS,4BAA4B,CAAC;AAClD;AAEA,SAAS,sBAAiC;CACxC,OAAO,EAAE,OAAO,EACb,SAAS,wBAAwB,EACjC,KAAK,EAAE,SAAS,6BAA6B,CAAC;AACnD;AAEA,SAAS,+BAAkF;CACzF,OAAO,eAAe,EACnB,SAAS,wBAAwB;AACtC;AAEA,SAAS,wBAA6C;CACpD,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EACtB,SAAS,0BAA0B,EACnC,KAAK,EAAE,SAAS,+BAA+B,CAAC;AACrD;AAEA,SAAS,iCAA8F;CACrG,OAAO,gBAAgB,EACpB,SAAS,0BAA0B;AACxC;AAEA,SAAS,4BAAuC;CAC9C,OAAO,EAAE,OAAO,EACb,SAAS,8BAA8B,EACvC,KAAK,EAAE,SAAS,mCAAmC,CAAC;AACzD;AAEA,SAAS,qCAAwF;CAC/F,OAAO,eAAe,EACnB,SAAS,8BAA8B;AAC5C;AAEA,SAAS,sBAAiC;CACxC,OAAO,UAAU,EACd,SAAS,4BAA4B;AAC1C;AAEA,SAAS,uBAAyD;CAChE,OAAO,EAAE,KAAK,uBAAuB,EAClC,SAAS,yBAAyB,EAClC,KAAK,EAAE,SAAS,wBAAwB,GAAG,CAAC;AACjD;AAEA,SAAS,0BAA0C;CACjD,OAAO,aAAa,EACjB,SAAS,gCAAgC;AAC9C;AAEA,SAAS,0BAA0C;CACjD,OAAO,aAAa,EACjB,SAAS,mCAAmC;AACjD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//#region ../../src/contexts/question
|
|
1
|
+
//#region ../../src/contexts/question-theme/domain/constants/question-theme.constants.d.ts
|
|
2
2
|
declare const DEFAULT_QUESTION_THEME_STATUS = "active";
|
|
3
3
|
declare const QUESTION_THEME_STATUS_ARCHIVED = "archived";
|
|
4
4
|
declare const QUESTION_THEME_STATUSES: readonly ["active", "archived"];
|
|
5
5
|
//#endregion
|
|
6
6
|
export { DEFAULT_QUESTION_THEME_STATUS, QUESTION_THEME_STATUSES, QUESTION_THEME_STATUS_ARCHIVED };
|
|
7
|
-
//# sourceMappingURL=question-theme
|
|
7
|
+
//# sourceMappingURL=question-theme.constants.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//#region ../../src/contexts/question
|
|
1
|
+
//#region ../../src/contexts/question-theme/domain/constants/question-theme.constants.ts
|
|
2
2
|
const DEFAULT_QUESTION_THEME_STATUS = "active";
|
|
3
3
|
const QUESTION_THEME_STATUS_ARCHIVED = "archived";
|
|
4
4
|
const QUESTION_THEME_STATUSES = [DEFAULT_QUESTION_THEME_STATUS, QUESTION_THEME_STATUS_ARCHIVED];
|
|
5
5
|
//#endregion
|
|
6
6
|
export { DEFAULT_QUESTION_THEME_STATUS, QUESTION_THEME_STATUSES, QUESTION_THEME_STATUS_ARCHIVED };
|
|
7
7
|
|
|
8
|
-
//# sourceMappingURL=question-theme
|
|
8
|
+
//# sourceMappingURL=question-theme.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"question-theme.constants.mjs","names":[],"sources":["../../../../../../../../src/contexts/question-theme/domain/constants/question-theme.constants.ts"],"sourcesContent":["import type { QuestionTheme } from \"@question-theme/domain/types/question-theme.entities\";\n\nconst DEFAULT_QUESTION_THEME_STATUS = \"active\";\n\nconst QUESTION_THEME_STATUS_ARCHIVED = \"archived\";\n\nconst QUESTION_THEME_STATUSES = [\n DEFAULT_QUESTION_THEME_STATUS,\n QUESTION_THEME_STATUS_ARCHIVED,\n] as const satisfies readonly string[];\n\nconst ADMIN_QUESTION_THEME_SORTABLE_FIELDS = [\"createdAt\", \"updatedAt\", \"slug\", \"status\"] as const satisfies readonly (keyof QuestionTheme)[];\n\nconst QUESTION_THEME_SORTABLE_FIELDS = [\"createdAt\", \"updatedAt\", \"slug\"] as const satisfies readonly (keyof QuestionTheme)[];\n\nexport {\n ADMIN_QUESTION_THEME_SORTABLE_FIELDS,\n DEFAULT_QUESTION_THEME_STATUS,\n QUESTION_THEME_SORTABLE_FIELDS,\n QUESTION_THEME_STATUS_ARCHIVED,\n QUESTION_THEME_STATUSES,\n};"],"mappings":";AAEA,MAAM,gCAAgC;AAEtC,MAAM,iCAAiC;AAEvC,MAAM,0BAA0B,CAC9B,+BACA,8BACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { QUESTION_THEME_STATUSES } from "../constants/question-theme.constants.mjs";
|
|
2
|
+
import { TupleToEnum } from "../../../../shared/types/enum.types.mjs";
|
|
3
|
+
import { TupleToUnion } from "type-fest";
|
|
4
|
+
|
|
5
|
+
//#region ../../src/contexts/question-theme/domain/types/question-theme.value-objects.d.ts
|
|
6
|
+
type QuestionThemeStatus = TupleToUnion<typeof QUESTION_THEME_STATUSES>;
|
|
7
|
+
type QuestionThemeStatusEnum = TupleToEnum<typeof QUESTION_THEME_STATUSES>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export type { QuestionThemeStatus, QuestionThemeStatusEnum };
|
|
10
|
+
//# sourceMappingURL=question-theme.value-objects.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.zod.refinements.mjs","names":[],"sources":["../../../../../../../../../../src/shared/application/dto/zod/refinements/array/array.zod.refinements.ts"],"sourcesContent":["function areValuesUniqueFromStrings(array: string[]): boolean {\n const uniqueValues = new Set(array);\n\n return uniqueValues.size === array.length;\n}\n\nfunction areValuesUniqueByKey<T extends Record<string, unknown>>(array: T[], key: keyof T): boolean {\n const values = array.map(item => String(item[key]));\n\n return areValuesUniqueFromStrings(values);\n}\n\nfunction hasExactlyOneByKey<T extends Record<string, unknown>>(array: T[], key: keyof T, value: unknown): boolean {\n const matchingItems = array.filter(item => item[key] === value);\n\n return matchingItems.length === 1;\n}\n\nexport {\n areValuesUniqueFromStrings,\n areValuesUniqueByKey,\n hasExactlyOneByKey,\n};"],"mappings":";AAAA,SAAS,2BAA2B,OAA0B;
|
|
1
|
+
{"version":3,"file":"array.zod.refinements.mjs","names":[],"sources":["../../../../../../../../../../src/shared/application/dto/zod/refinements/array/array.zod.refinements.ts"],"sourcesContent":["function areValuesUniqueFromStrings(array: string[]): boolean {\n const uniqueValues = new Set(array);\n\n return uniqueValues.size === array.length;\n}\n\nfunction areValuesUniqueByKey<T extends Record<string, unknown>>(array: T[], key: keyof T): boolean {\n const values = array.map(item => String(item[key]));\n\n return areValuesUniqueFromStrings(values);\n}\n\nfunction hasExactlyOneByKey<T extends Record<string, unknown>>(array: T[], key: keyof T, value: unknown): boolean {\n const matchingItems = array.filter(item => item[key] === value);\n\n return matchingItems.length === 1;\n}\n\nexport {\n areValuesUniqueFromStrings,\n areValuesUniqueByKey,\n hasExactlyOneByKey,\n};"],"mappings":";AAAA,SAAS,2BAA2B,OAA0B;CAG5D,OAAO,IAFkB,IAAI,KAEX,EAAE,SAAS,MAAM;AACrC;AAEA,SAAS,qBAAwD,OAAY,KAAuB;CAGlG,OAAO,2BAFQ,MAAM,KAAI,SAAQ,OAAO,KAAK,IAAI,CAEV,CAAC;AAC1C;AAEA,SAAS,mBAAsD,OAAY,KAAc,OAAyB;CAGhH,OAFsB,MAAM,QAAO,SAAQ,KAAK,SAAS,KAEtC,EAAE,WAAW;AAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.constants.mjs","names":[],"sources":["../../../../../../../../src/shared/domain/value-objects/locale/locale.constants.ts"],"sourcesContent":["const LOCALES = [\"en\", \"fr\", \"es\", \"de\", \"it\", \"pt\"] as const;\n\nconst LOCALE_LABELS: Record<typeof LOCALES[number], string> = {\n en: \"English\",\n fr: \"French\",\n es: \"Spanish\",\n de: \"German\",\n it: \"Italian\",\n pt: \"Portuguese\",\n} as const;\n\nexport {\n LOCALES,\n LOCALE_LABELS,\n};"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAM;CAAM;CAAM;CAAM;CAAM;
|
|
1
|
+
{"version":3,"file":"locale.constants.mjs","names":[],"sources":["../../../../../../../../src/shared/domain/value-objects/locale/locale.constants.ts"],"sourcesContent":["const LOCALES = [\"en\", \"fr\", \"es\", \"de\", \"it\", \"pt\"] as const;\n\nconst LOCALE_LABELS: Record<typeof LOCALES[number], string> = {\n en: \"English\",\n fr: \"French\",\n es: \"Spanish\",\n de: \"German\",\n it: \"Italian\",\n pt: \"Portuguese\",\n} as const;\n\nexport {\n LOCALES,\n LOCALE_LABELS,\n};"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAM;CAAM;CAAM;CAAM;CAAM;AAAI;AAEnD,MAAM,gBAAwD;CAC5D,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN"}
|
|
@@ -6,5 +6,5 @@ type Locale = TupleToUnion<typeof LOCALES>;
|
|
|
6
6
|
type LocalizedText = Record<Locale, string>;
|
|
7
7
|
type LocalizedTexts = Record<Locale, string[]>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export {
|
|
9
|
+
export type { Locale, LocalizedText, LocalizedTexts };
|
|
10
10
|
//# sourceMappingURL=locale.types.d.mts.map
|
|
@@ -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.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,
|
|
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,OAAO,EACZ,SAAS,uBAAuB,EAChC,KAAK,EAAE,SAAS,aAAa,CAAC;CACjC,SAAS,EAAE,OAAO,EACf,SAAS,0BAA0B,EACnC,KAAK,EAAE,SAAS,gDAAgD,CAAC;CACpE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAC5C,SAAS,8BAA8B,EACvC,KAAK,EAAE,SAAS,CAAC,QAAQ,KAAK,EAAE,CAAC;CACpC,UAAU,EAAE,OAAO,EAChB,SAAS,EACT,SAAS,6DAA6D,EACtE,KAAK,EAAE,SAAS,SAAS,CAAC;CAC7B,QAAQ,EAAE,OAAO,EACd,SAAS,EACT,SAAS,2DAA2D,EACpE,KAAK,EAAE,SAAS,SAAS,CAAC;CAC7B,QAAQ,EAAE,OAAO,EACd,SAAS,EACT,SAAS,yEAAyE,EAClF,KAAK,EAAE,SAAS,QAAQ,CAAC;CAC5B,SAAS,EAAE,OAAO,EACf,SAAS,EACT,SAAS,wCAAwC,EACjD,KAAK,EAAE,SAAS,OAAO,GAAG,oDAAoD,CAAC;CAClF,SAAS,EAAE,OAAO,EACf,SAAS,EACT,SAAS,wCAAwC,EACjD,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB,SAAS,EAAE,OAAO,EACf,SAAS,EACT,SAAS,wCAAwC,EACjD,KAAK,EAAE,SAAS,IAAI,CAAC;CACxB,WAAW,EAAE,QAAQ,EAClB,SAAS,EACT,SAAS,mEAAmE,EAC5E,KAAK,EAAE,SAAS,KAAK,CAAC;CACzB,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EACrB,SAAS,EACT,SAAS,wCAAwC,EACjD,KAAK,EAAE,SAAS,CAAC,kBAAkB,gBAAgB,EAAE,CAAC;CACzD,QAAQ,EAAE,MAAM,EAAE,MAAM;EAAC,EAAE,OAAO;EAAG,EAAE,OAAO;EAAG,EAAE,QAAQ;CAAC,CAAC,CAAC,EAC3D,SAAS,EACT,SAAS,yCAAyC,EAClD,KAAK,EAAE,SAAS,CAAC,kBAAkB,gBAAgB,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-response-exception.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/shared/infrastructure/http/dto/api-response-exception/api-response-exception.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO } from \"@shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape\";\n\nconst API_RESPONSE_EXCEPTION_DTO = z.strictObject({\n statusCode: z.number()\n .describe(\"HTTP status code of the error response\")\n .meta({ example: 400 }),\n message: z.string()\n .describe(\"Error message\")\n .meta({ example: \"The request could not be understood by the server due to malformed syntax.\" }),\n error: z.string()\n .describe(\"Short description of the HTTP error\")\n .meta({ example: \"Bad Request\" }),\n validationDetails: z.array(API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO)\n .optional()\n .describe(\"List of validation errors, when requested DTO validation fails\"),\n errorCode: z.string()\n .optional()\n .describe(\"Machine-readable error code for frontend mapping and localization\")\n .meta({ example: \"question-theme-referenced-by-live-questions\" }),\n});\n\nexport type ApiResponseExceptionDto = z.infer<typeof API_RESPONSE_EXCEPTION_DTO>;\n\nexport { API_RESPONSE_EXCEPTION_DTO };"],"mappings":";;;AAIA,MAAM,6BAA6B,EAAE,aAAa;CAChD,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"api-response-exception.dto.shape.mjs","names":[],"sources":["../../../../../../../../../src/shared/infrastructure/http/dto/api-response-exception/api-response-exception.dto.shape.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO } from \"@shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape\";\n\nconst API_RESPONSE_EXCEPTION_DTO = z.strictObject({\n statusCode: z.number()\n .describe(\"HTTP status code of the error response\")\n .meta({ example: 400 }),\n message: z.string()\n .describe(\"Error message\")\n .meta({ example: \"The request could not be understood by the server due to malformed syntax.\" }),\n error: z.string()\n .describe(\"Short description of the HTTP error\")\n .meta({ example: \"Bad Request\" }),\n validationDetails: z.array(API_RESPONSE_EXCEPTION_VALIDATION_DETAILS_DTO)\n .optional()\n .describe(\"List of validation errors, when requested DTO validation fails\"),\n errorCode: z.string()\n .optional()\n .describe(\"Machine-readable error code for frontend mapping and localization\")\n .meta({ example: \"question-theme-referenced-by-live-questions\" }),\n});\n\nexport type ApiResponseExceptionDto = z.infer<typeof API_RESPONSE_EXCEPTION_DTO>;\n\nexport { API_RESPONSE_EXCEPTION_DTO };"],"mappings":";;;AAIA,MAAM,6BAA6B,EAAE,aAAa;CAChD,YAAY,EAAE,OAAO,EAClB,SAAS,wCAAwC,EACjD,KAAK,EAAE,SAAS,IAAI,CAAC;CACxB,SAAS,EAAE,OAAO,EACf,SAAS,eAAe,EACxB,KAAK,EAAE,SAAS,6EAA6E,CAAC;CACjG,OAAO,EAAE,OAAO,EACb,SAAS,qCAAqC,EAC9C,KAAK,EAAE,SAAS,cAAc,CAAC;CAClC,mBAAmB,EAAE,MAAM,6CAA6C,EACrE,SAAS,EACT,SAAS,gEAAgE;CAC5E,WAAW,EAAE,OAAO,EACjB,SAAS,EACT,SAAS,mEAAmE,EAC5E,KAAK,EAAE,SAAS,8CAA8C,CAAC;AACpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.ts"],"sourcesContent":["import type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nconst LOCALIZED_TEXT_ENTRY_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXT_ENTRY_MAX_LENGTH = 500;\n\nconst LOCALIZED_TEXTS_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXTS_MAX_LENGTH = 10;\n\nconst LOCALE_EXAMPLES: Record<Locale, string> = {\n en: \"Example text in English.\",\n fr: \"Exemple de texte en français.\",\n es: \"Texto de ejemplo en español.\",\n de: \"Beispieltext auf Deutsch.\",\n it: \"Testo di esempio in italiano.\",\n pt: \"Texto de exemplo em português.\",\n} as const;\n\nconst LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE = \"At least one locale must be provided\";\n\nexport {\n LOCALIZED_TEXT_ENTRY_MIN_LENGTH,\n LOCALIZED_TEXT_ENTRY_MAX_LENGTH,\n LOCALIZED_TEXTS_MIN_LENGTH,\n LOCALIZED_TEXTS_MAX_LENGTH,\n LOCALE_EXAMPLES,\n LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE,\n};"],"mappings":";AAEA,MAAM,kCAAkC;AAExC,MAAM,kCAAkC;AAExC,MAAM,6BAA6B;AAEnC,MAAM,6BAA6B;AAEnC,MAAM,kBAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;
|
|
1
|
+
{"version":3,"file":"localization.zod.validators.constants.mjs","names":[],"sources":["../../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants.ts"],"sourcesContent":["import type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nconst LOCALIZED_TEXT_ENTRY_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXT_ENTRY_MAX_LENGTH = 500;\n\nconst LOCALIZED_TEXTS_MIN_LENGTH = 1;\n\nconst LOCALIZED_TEXTS_MAX_LENGTH = 10;\n\nconst LOCALE_EXAMPLES: Record<Locale, string> = {\n en: \"Example text in English.\",\n fr: \"Exemple de texte en français.\",\n es: \"Texto de ejemplo en español.\",\n de: \"Beispieltext auf Deutsch.\",\n it: \"Testo di esempio in italiano.\",\n pt: \"Texto de exemplo em português.\",\n} as const;\n\nconst LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE = \"At least one locale must be provided\";\n\nexport {\n LOCALIZED_TEXT_ENTRY_MIN_LENGTH,\n LOCALIZED_TEXT_ENTRY_MAX_LENGTH,\n LOCALIZED_TEXTS_MIN_LENGTH,\n LOCALIZED_TEXTS_MAX_LENGTH,\n LOCALE_EXAMPLES,\n LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE,\n};"],"mappings":";AAEA,MAAM,kCAAkC;AAExC,MAAM,kCAAkC;AAExC,MAAM,6BAA6B;AAEnC,MAAM,6BAA6B;AAEnC,MAAM,kBAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,qCAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { LOCALE_LABELS } from \"@shared/domain/value-objects/locale/locale.constants\";\nimport { LOCALE_EXAMPLES, LOCALIZED_TEXT_ENTRY_MAX_LENGTH, LOCALIZED_TEXT_ENTRY_MIN_LENGTH, LOCALIZED_TEXTS_MAX_LENGTH, LOCALIZED_TEXTS_MIN_LENGTH, LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE } from \"@shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants\";\n\nimport type { ZodObject, ZodString, ZodOptional, ZodArray } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nfunction hasAtLeastOneLocaleValue(object: Record<string, unknown>): boolean {\n return Object.values(object).some(value => value !== undefined);\n}\n\nfunction createZLocaleEntries<T>(entryFactory: (locale: Locale) => T): Record<Locale, T> {\n return {\n en: entryFactory(\"en\"),\n fr: entryFactory(\"fr\"),\n es: entryFactory(\"es\"),\n de: entryFactory(\"de\"),\n it: entryFactory(\"it\"),\n pt: entryFactory(\"pt\"),\n };\n}\n\nfunction zLocalizedTextEntry(locale: Locale): ZodOptional<ZodString> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n return z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH)\n .optional()\n .describe(`Text in ${localeLabel}`)\n .meta({ example: localeExample });\n}\n\nfunction zLocalizedTextsEntry(locale: Locale): ZodOptional<ZodArray<ZodString>> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n const zLocalizedTextsValue = z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH);\n\n return z.array(zLocalizedTextsValue)\n .min(LOCALIZED_TEXTS_MIN_LENGTH)\n .max(LOCALIZED_TEXTS_MAX_LENGTH)\n .optional()\n .describe(`Texts in ${localeLabel}`)\n .meta({ example: [localeExample] });\n}\n\nfunction zLocalizedText(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodString>> = createZLocaleEntries(zLocalizedTextEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized text object with translations for multiple languages\")\n .refine(\n object => hasAtLeastOneLocaleValue(object),\n { message: LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE },\n );\n}\n\nfunction zLocalizedTexts(): ZodObject<Record<Locale, ZodOptional<ZodArray<ZodString>>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodArray<ZodString>>> = createZLocaleEntries(zLocalizedTextsEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized texts object with translations for multiple languages\")\n .refine(\n object => hasAtLeastOneLocaleValue(object),\n { message: LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE },\n );\n}\n\nexport {\n createZLocaleEntries,\n hasAtLeastOneLocaleValue,\n zLocalizedTextEntry,\n zLocalizedTextsEntry,\n zLocalizedText,\n zLocalizedTexts,\n};"],"mappings":";;;;AASA,SAAS,yBAAyB,QAA0C;
|
|
1
|
+
{"version":3,"file":"localization.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/localization/localization.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { LOCALE_LABELS } from \"@shared/domain/value-objects/locale/locale.constants\";\nimport { LOCALE_EXAMPLES, LOCALIZED_TEXT_ENTRY_MAX_LENGTH, LOCALIZED_TEXT_ENTRY_MIN_LENGTH, LOCALIZED_TEXTS_MAX_LENGTH, LOCALIZED_TEXTS_MIN_LENGTH, LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE } from \"@shared/infrastructure/http/zod/validators/localization/constants/localization.zod.validators.constants\";\n\nimport type { ZodObject, ZodString, ZodOptional, ZodArray } from \"zod\";\n\nimport type { Locale } from \"@shared/domain/value-objects/locale/locale.types\";\n\nfunction hasAtLeastOneLocaleValue(object: Record<string, unknown>): boolean {\n return Object.values(object).some(value => value !== undefined);\n}\n\nfunction createZLocaleEntries<T>(entryFactory: (locale: Locale) => T): Record<Locale, T> {\n return {\n en: entryFactory(\"en\"),\n fr: entryFactory(\"fr\"),\n es: entryFactory(\"es\"),\n de: entryFactory(\"de\"),\n it: entryFactory(\"it\"),\n pt: entryFactory(\"pt\"),\n };\n}\n\nfunction zLocalizedTextEntry(locale: Locale): ZodOptional<ZodString> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n return z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH)\n .optional()\n .describe(`Text in ${localeLabel}`)\n .meta({ example: localeExample });\n}\n\nfunction zLocalizedTextsEntry(locale: Locale): ZodOptional<ZodArray<ZodString>> {\n const localeLabel = LOCALE_LABELS[locale];\n const localeExample = LOCALE_EXAMPLES[locale];\n\n const zLocalizedTextsValue = z.string()\n .trim()\n .min(LOCALIZED_TEXT_ENTRY_MIN_LENGTH)\n .max(LOCALIZED_TEXT_ENTRY_MAX_LENGTH);\n\n return z.array(zLocalizedTextsValue)\n .min(LOCALIZED_TEXTS_MIN_LENGTH)\n .max(LOCALIZED_TEXTS_MAX_LENGTH)\n .optional()\n .describe(`Texts in ${localeLabel}`)\n .meta({ example: [localeExample] });\n}\n\nfunction zLocalizedText(): ZodObject<Record<Locale, ZodOptional<ZodString>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodString>> = createZLocaleEntries(zLocalizedTextEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized text object with translations for multiple languages\")\n .refine(\n object => hasAtLeastOneLocaleValue(object),\n { message: LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE },\n );\n}\n\nfunction zLocalizedTexts(): ZodObject<Record<Locale, ZodOptional<ZodArray<ZodString>>>> {\n const localeEntries: Record<Locale, ZodOptional<ZodArray<ZodString>>> = createZLocaleEntries(zLocalizedTextsEntry);\n\n return z.strictObject(localeEntries)\n .describe(\"Localized texts object with translations for multiple languages\")\n .refine(\n object => hasAtLeastOneLocaleValue(object),\n { message: LOCALIZED_TEXT_EMPTY_ERROR_MESSAGE },\n );\n}\n\nexport {\n createZLocaleEntries,\n hasAtLeastOneLocaleValue,\n zLocalizedTextEntry,\n zLocalizedTextsEntry,\n zLocalizedText,\n zLocalizedTexts,\n};"],"mappings":";;;;AASA,SAAS,yBAAyB,QAA0C;CAC1E,OAAO,OAAO,OAAO,MAAM,EAAE,MAAK,UAAS,UAAU,KAAA,CAAS;AAChE;AAEA,SAAS,qBAAwB,cAAwD;CACvF,OAAO;EACL,IAAI,aAAa,IAAI;EACrB,IAAI,aAAa,IAAI;EACrB,IAAI,aAAa,IAAI;EACrB,IAAI,aAAa,IAAI;EACrB,IAAI,aAAa,IAAI;EACrB,IAAI,aAAa,IAAI;CACvB;AACF;AAEA,SAAS,oBAAoB,QAAwC;CACnE,MAAM,cAAc,cAAc;CAClC,MAAM,gBAAgB,gBAAgB;CAEtC,OAAO,EAAE,OAAO,EACb,KAAK,EACL,IAAA,CAAmC,EACnC,IAAA,GAAmC,EACnC,SAAS,EACT,SAAS,WAAW,aAAa,EACjC,KAAK,EAAE,SAAS,cAAc,CAAC;AACpC;AAEA,SAAS,qBAAqB,QAAkD;CAC9E,MAAM,cAAc,cAAc;CAClC,MAAM,gBAAgB,gBAAgB;CAEtC,MAAM,uBAAuB,EAAE,OAAO,EACnC,KAAK,EACL,IAAA,CAAmC,EACnC,IAAA,GAAmC;CAEtC,OAAO,EAAE,MAAM,oBAAoB,EAChC,IAAA,CAA8B,EAC9B,IAAA,EAA8B,EAC9B,SAAS,EACT,SAAS,YAAY,aAAa,EAClC,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,CAAC;AACtC;AAEA,SAAS,iBAAoE;CAC3E,MAAM,gBAAwD,qBAAqB,mBAAmB;CAEtG,OAAO,EAAE,aAAa,aAAa,EAChC,SAAS,gEAAgE,EACzE,QACC,WAAU,yBAAyB,MAAM,GACzC,EAAE,SAAS,mCAAmC,CAChD;AACJ;AAEA,SAAS,kBAA+E;CACtF,MAAM,gBAAkE,qBAAqB,oBAAoB;CAEjH,OAAO,EAAE,aAAa,aAAa,EAChC,SAAS,iEAAiE,EAC1E,QACC,WAAU,yBAAyB,MAAM,GACzC,EAAE,SAAS,mCAAmC,CAChD;AACJ"}
|
package/dist/src/shared/infrastructure/http/zod/validators/string/string.zod.validators.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/string/string.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { HEX_COLOR_REGEX, HEX_COLOR_EXAMPLE, ISO_DATE_TIME_EXAMPLE, MONGO_ID_REGEX, SLUG_MAX_LENGTH, SLUG_MIN_LENGTH, SLUG_REGEX } from \"@shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants\";\n\nimport type { $ZodCustomParams } from \"zod/v4/core\";\nimport type { ZodString, ZodISODateTime } from \"zod\";\n\nfunction zSlug(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .min(SLUG_MIN_LENGTH)\n .max(SLUG_MAX_LENGTH)\n .regex(SLUG_REGEX, {\n error: \"Invalid kebab-case value\",\n ...options,\n })\n .meta({ example: \"example-slug-value\" });\n}\n\nfunction zMongoId(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .regex(MONGO_ID_REGEX, {\n error: \"Invalid ObjectId value\",\n ...options,\n })\n .toLowerCase()\n .meta({ example: \"60af924f4f1a2563f8e8b456\" });\n}\n\nfunction zIsoDateTime(options: Partial<$ZodCustomParams> = {}): ZodISODateTime {\n return z.iso.datetime({\n error: \"Invalid ISO 8601 datetime value\",\n ...options,\n })\n .meta({ example: ISO_DATE_TIME_EXAMPLE });\n}\n\nfunction zHexColor(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .regex(HEX_COLOR_REGEX, {\n error: \"Invalid hex color; must be 6 hexadecimal digits with # prefix (e.g., #FF5733)\",\n ...options,\n })\n .toUpperCase()\n .meta({ example: HEX_COLOR_EXAMPLE });\n}\n\nexport {\n zSlug,\n zMongoId,\n zIsoDateTime,\n zHexColor,\n};"],"mappings":";;;AAOA,SAAS,MAAM,UAAqC,
|
|
1
|
+
{"version":3,"file":"string.zod.validators.mjs","names":[],"sources":["../../../../../../../../../../src/shared/infrastructure/http/zod/validators/string/string.zod.validators.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { HEX_COLOR_REGEX, HEX_COLOR_EXAMPLE, ISO_DATE_TIME_EXAMPLE, MONGO_ID_REGEX, SLUG_MAX_LENGTH, SLUG_MIN_LENGTH, SLUG_REGEX } from \"@shared/infrastructure/http/zod/validators/string/constants/string.zod.validators.constants\";\n\nimport type { $ZodCustomParams } from \"zod/v4/core\";\nimport type { ZodString, ZodISODateTime } from \"zod\";\n\nfunction zSlug(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .min(SLUG_MIN_LENGTH)\n .max(SLUG_MAX_LENGTH)\n .regex(SLUG_REGEX, {\n error: \"Invalid kebab-case value\",\n ...options,\n })\n .meta({ example: \"example-slug-value\" });\n}\n\nfunction zMongoId(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .regex(MONGO_ID_REGEX, {\n error: \"Invalid ObjectId value\",\n ...options,\n })\n .toLowerCase()\n .meta({ example: \"60af924f4f1a2563f8e8b456\" });\n}\n\nfunction zIsoDateTime(options: Partial<$ZodCustomParams> = {}): ZodISODateTime {\n return z.iso.datetime({\n error: \"Invalid ISO 8601 datetime value\",\n ...options,\n })\n .meta({ example: ISO_DATE_TIME_EXAMPLE });\n}\n\nfunction zHexColor(options: Partial<$ZodCustomParams> = {}): ZodString {\n return z.string()\n .trim()\n .regex(HEX_COLOR_REGEX, {\n error: \"Invalid hex color; must be 6 hexadecimal digits with # prefix (e.g., #FF5733)\",\n ...options,\n })\n .toUpperCase()\n .meta({ example: HEX_COLOR_EXAMPLE });\n}\n\nexport {\n zSlug,\n zMongoId,\n zIsoDateTime,\n zHexColor,\n};"],"mappings":";;;AAOA,SAAS,MAAM,UAAqC,CAAC,GAAc;CACjE,OAAO,EAAE,OAAO,EACb,KAAK,EACL,IAAA,CAAmB,EACnB,IAAA,EAAmB,EACnB,MAAM,YAAY;EACjB,OAAO;EACP,GAAG;CACL,CAAC,EACA,KAAK,EAAE,SAAS,qBAAqB,CAAC;AAC3C;AAEA,SAAS,SAAS,UAAqC,CAAC,GAAc;CACpE,OAAO,EAAE,OAAO,EACb,KAAK,EACL,MAAM,gBAAgB;EACrB,OAAO;EACP,GAAG;CACL,CAAC,EACA,YAAY,EACZ,KAAK,EAAE,SAAS,2BAA2B,CAAC;AACjD;AAEA,SAAS,aAAa,UAAqC,CAAC,GAAmB;CAC7E,OAAO,EAAE,IAAI,SAAS;EACpB,OAAO;EACP,GAAG;CACL,CAAC,EACE,KAAK,EAAE,SAAS,sBAAsB,CAAC;AAC5C;AAEA,SAAS,UAAU,UAAqC,CAAC,GAAc;CACrE,OAAO,EAAE,OAAO,EACb,KAAK,EACL,MAAM,iBAAiB;EACtB,OAAO;EACP,GAAG;CACL,CAAC,EACA,YAAY,EACZ,KAAK,EAAE,SAAS,kBAAkB,CAAC;AACxC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goat-it/schemas",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10-beta",
|
|
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.
|
|
15
|
+
"tsdown": "^0.22.1",
|
|
16
16
|
"typescript": "^6.0.3",
|
|
17
17
|
"zod": "^4.4.3"
|
|
18
18
|
},
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-author/question-author.constants.d.ts
|
|
2
|
-
declare const QUESTION_AUTHOR_ROLES: readonly ["admin", "game", "ai"];
|
|
3
|
-
declare const QUESTION_CREATION_AUTHOR_ROLES: readonly ["admin", "ai"];
|
|
4
|
-
declare const QUESTION_AUTHOR_NAME_MIN_LENGTH = 3;
|
|
5
|
-
declare const QUESTION_AUTHOR_NAME_MAX_LENGTH = 30;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { QUESTION_AUTHOR_NAME_MAX_LENGTH, QUESTION_AUTHOR_NAME_MIN_LENGTH, QUESTION_AUTHOR_ROLES, QUESTION_CREATION_AUTHOR_ROLES };
|
|
8
|
-
//# sourceMappingURL=question-author.constants.d.mts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-author/question-author.constants.ts
|
|
2
|
-
const QUESTION_AUTHOR_ROLE_ADMIN = "admin";
|
|
3
|
-
const QUESTION_AUTHOR_ROLES = [
|
|
4
|
-
QUESTION_AUTHOR_ROLE_ADMIN,
|
|
5
|
-
"game",
|
|
6
|
-
"ai"
|
|
7
|
-
];
|
|
8
|
-
const QUESTION_CREATION_AUTHOR_ROLES = [QUESTION_AUTHOR_ROLE_ADMIN, "ai"];
|
|
9
|
-
const QUESTION_AUTHOR_NAME_MIN_LENGTH = 3;
|
|
10
|
-
const QUESTION_AUTHOR_NAME_MAX_LENGTH = 30;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { QUESTION_AUTHOR_NAME_MAX_LENGTH, QUESTION_AUTHOR_NAME_MIN_LENGTH, QUESTION_AUTHOR_ROLES, QUESTION_CREATION_AUTHOR_ROLES };
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=question-author.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-author.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-author/question-author.constants.ts"],"sourcesContent":["const QUESTION_AUTHOR_ROLE_ADMIN = \"admin\";\nconst QUESTION_AUTHOR_ROLE_GAME = \"game\";\nconst QUESTION_AUTHOR_ROLE_AI = \"ai\";\n\nconst QUESTION_AUTHOR_ROLES = [\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_GAME,\n QUESTION_AUTHOR_ROLE_AI,\n] as const satisfies readonly string[];\n\nconst QUESTION_CREATION_AUTHOR_ROLES = [\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_AI,\n] as const satisfies readonly string[];\n\nconst QUESTION_AUTHOR_NAME_MIN_LENGTH = 3;\n\nconst QUESTION_AUTHOR_NAME_MAX_LENGTH = 30;\n\nexport {\n QUESTION_AUTHOR_ROLE_ADMIN,\n QUESTION_AUTHOR_ROLE_GAME,\n QUESTION_AUTHOR_ROLE_AI,\n QUESTION_AUTHOR_ROLES,\n QUESTION_CREATION_AUTHOR_ROLES,\n QUESTION_AUTHOR_NAME_MIN_LENGTH,\n QUESTION_AUTHOR_NAME_MAX_LENGTH,\n};"],"mappings":";AAAA,MAAM,6BAA6B;AAInC,MAAM,wBAAwB;CAC5B;CACA;;CAED;AAED,MAAM,iCAAiC,CACrC,4BAAA,KAED;AAED,MAAM,kCAAkC;AAExC,MAAM,kCAAkC"}
|
package/dist/src/contexts/question/domain/value-objects/question-author/question-author.types.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { QUESTION_AUTHOR_ROLES } from "./question-author.constants.mjs";
|
|
2
|
-
import { TupleToUnion } from "type-fest";
|
|
3
|
-
|
|
4
|
-
//#region ../../src/contexts/question/domain/value-objects/question-author/question-author.types.d.ts
|
|
5
|
-
type QuestionAuthorRole = TupleToUnion<typeof QUESTION_AUTHOR_ROLES>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { type QuestionAuthorRole };
|
|
8
|
-
//# sourceMappingURL=question-author.types.d.mts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-category/question-category.constants.d.ts
|
|
2
|
-
declare const QUESTION_CATEGORIES: readonly ["trivia", "lexicon", "riddle", "explanation"];
|
|
3
|
-
//#endregion
|
|
4
|
-
export { QUESTION_CATEGORIES };
|
|
5
|
-
//# sourceMappingURL=question-category.constants.d.mts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-category/question-category.constants.ts
|
|
2
|
-
const QUESTION_CATEGORIES = [
|
|
3
|
-
"trivia",
|
|
4
|
-
"lexicon",
|
|
5
|
-
"riddle",
|
|
6
|
-
"explanation"
|
|
7
|
-
];
|
|
8
|
-
//#endregion
|
|
9
|
-
export { QUESTION_CATEGORIES };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=question-category.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-category.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-category/question-category.constants.ts"],"sourcesContent":["const QUESTION_CATEGORIES = [\n \"trivia\",\n \"lexicon\",\n \"riddle\",\n \"explanation\",\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_CATEGORIES,\n};"],"mappings":";AAAA,MAAM,sBAAsB;CAC1B;CACA;CACA;CACA;CACD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TupleToEnum } from "../../../../../shared/types/enum.types.mjs";
|
|
2
|
-
import { QUESTION_CATEGORIES } from "./question-category.constants.mjs";
|
|
3
|
-
import { TupleToUnion } from "type-fest";
|
|
4
|
-
|
|
5
|
-
//#region ../../src/contexts/question/domain/value-objects/question-category/question-category.types.d.ts
|
|
6
|
-
type QuestionCategory = TupleToUnion<typeof QUESTION_CATEGORIES>;
|
|
7
|
-
type QuestionCategoryEnum = TupleToEnum<typeof QUESTION_CATEGORIES>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { type QuestionCategory, type QuestionCategoryEnum };
|
|
10
|
-
//# sourceMappingURL=question-category.types.d.mts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.d.ts
|
|
2
|
-
declare const QUESTION_COGNITIVE_DIFFICULTIES: readonly ["easy", "medium", "hard"];
|
|
3
|
-
//#endregion
|
|
4
|
-
export { QUESTION_COGNITIVE_DIFFICULTIES };
|
|
5
|
-
//# sourceMappingURL=question-cognitive-difficulty.constants.d.mts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.ts
|
|
2
|
-
const QUESTION_COGNITIVE_DIFFICULTIES = [
|
|
3
|
-
"easy",
|
|
4
|
-
"medium",
|
|
5
|
-
"hard"
|
|
6
|
-
];
|
|
7
|
-
//#endregion
|
|
8
|
-
export { QUESTION_COGNITIVE_DIFFICULTIES };
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=question-cognitive-difficulty.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-cognitive-difficulty.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.constants.ts"],"sourcesContent":["const QUESTION_COGNITIVE_DIFFICULTIES = [\n \"easy\",\n \"medium\",\n \"hard\",\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_COGNITIVE_DIFFICULTIES,\n};"],"mappings":";AAAA,MAAM,kCAAkC;CACtC;CACA;CACA;CACD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TupleToEnum } from "../../../../../shared/types/enum.types.mjs";
|
|
2
|
-
import { QUESTION_COGNITIVE_DIFFICULTIES } from "./question-cognitive-difficulty.constants.mjs";
|
|
3
|
-
import { TupleToUnion } from "type-fest";
|
|
4
|
-
|
|
5
|
-
//#region ../../src/contexts/question/domain/value-objects/question-cognitive-difficulty/question-cognitive-difficulty.types.d.ts
|
|
6
|
-
type QuestionCognitiveDifficulty = TupleToUnion<typeof QUESTION_COGNITIVE_DIFFICULTIES>;
|
|
7
|
-
type QuestionCognitiveDifficultyEnum = TupleToEnum<typeof QUESTION_COGNITIVE_DIFFICULTIES>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { type QuestionCognitiveDifficulty, type QuestionCognitiveDifficultyEnum };
|
|
10
|
-
//# sourceMappingURL=question-cognitive-difficulty.types.d.mts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.d.ts
|
|
2
|
-
declare const QUESTION_REJECTION_TYPES: readonly ["inappropriate-content", "incorrect-information", "poor-quality", "duplicate-question", "other"];
|
|
3
|
-
//#endregion
|
|
4
|
-
export { QUESTION_REJECTION_TYPES };
|
|
5
|
-
//# sourceMappingURL=question-rejection.constants.d.mts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.ts
|
|
2
|
-
const QUESTION_REJECTION_TYPES = [
|
|
3
|
-
"inappropriate-content",
|
|
4
|
-
"incorrect-information",
|
|
5
|
-
"poor-quality",
|
|
6
|
-
"duplicate-question",
|
|
7
|
-
"other"
|
|
8
|
-
];
|
|
9
|
-
//#endregion
|
|
10
|
-
export { QUESTION_REJECTION_TYPES };
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=question-rejection.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-rejection.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-rejection/question-rejection.constants.ts"],"sourcesContent":["const QUESTION_REJECTION_TYPES = [\n \"inappropriate-content\",\n \"incorrect-information\",\n \"poor-quality\",\n \"duplicate-question\",\n \"other\",\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_REJECTION_TYPES,\n};"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { QUESTION_REJECTION_TYPES } from "./question-rejection.constants.mjs";
|
|
2
|
-
import { TupleToUnion } from "type-fest";
|
|
3
|
-
|
|
4
|
-
//#region ../../src/contexts/question/domain/value-objects/question-rejection/question-rejection.types.d.ts
|
|
5
|
-
type QuestionRejectionType = TupleToUnion<typeof QUESTION_REJECTION_TYPES>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { type QuestionRejectionType };
|
|
8
|
-
//# sourceMappingURL=question-rejection.types.d.mts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.d.ts
|
|
2
|
-
declare const QUESTION_SOURCE_URLS_MIN_ITEMS = 1;
|
|
3
|
-
declare const QUESTION_SOURCE_URLS_MAX_ITEMS = 5;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { QUESTION_SOURCE_URLS_MAX_ITEMS, QUESTION_SOURCE_URLS_MIN_ITEMS };
|
|
6
|
-
//# sourceMappingURL=question-source-urls.constants.d.mts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.ts
|
|
2
|
-
const QUESTION_SOURCE_URLS_MIN_ITEMS = 1;
|
|
3
|
-
const QUESTION_SOURCE_URLS_MAX_ITEMS = 5;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { QUESTION_SOURCE_URLS_MAX_ITEMS, QUESTION_SOURCE_URLS_MIN_ITEMS };
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=question-source-urls.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-source-urls.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-source-urls/question-source-urls.constants.ts"],"sourcesContent":["const QUESTION_SOURCE_URLS_MIN_ITEMS = 1;\n\nconst QUESTION_SOURCE_URLS_MAX_ITEMS = 5;\n\nexport {\n QUESTION_SOURCE_URLS_MIN_ITEMS,\n QUESTION_SOURCE_URLS_MAX_ITEMS,\n};"],"mappings":";AAAA,MAAM,iCAAiC;AAEvC,MAAM,iCAAiC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-status/question-status.constants.d.ts
|
|
2
|
-
declare const QUESTION_STATUS_PENDING = "pending";
|
|
3
|
-
declare const QUESTION_STATUS_ACTIVE = "active";
|
|
4
|
-
declare const QUESTION_STATUS_ARCHIVED = "archived";
|
|
5
|
-
declare const QUESTION_STATUS_REJECTED = "rejected";
|
|
6
|
-
declare const QUESTION_STATUSES: readonly ["pending", "active", "archived", "rejected"];
|
|
7
|
-
declare const QUESTION_CREATION_STATUSES: readonly ["pending", "active"];
|
|
8
|
-
//#endregion
|
|
9
|
-
export { QUESTION_CREATION_STATUSES, QUESTION_STATUSES, QUESTION_STATUS_ACTIVE, QUESTION_STATUS_ARCHIVED, QUESTION_STATUS_PENDING, QUESTION_STATUS_REJECTED };
|
|
10
|
-
//# sourceMappingURL=question-status.constants.d.mts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-status/question-status.constants.ts
|
|
2
|
-
const QUESTION_STATUS_PENDING = "pending";
|
|
3
|
-
const QUESTION_STATUS_ACTIVE = "active";
|
|
4
|
-
const QUESTION_STATUS_ARCHIVED = "archived";
|
|
5
|
-
const QUESTION_STATUS_REJECTED = "rejected";
|
|
6
|
-
const QUESTION_STATUSES = [
|
|
7
|
-
QUESTION_STATUS_PENDING,
|
|
8
|
-
QUESTION_STATUS_ACTIVE,
|
|
9
|
-
QUESTION_STATUS_ARCHIVED,
|
|
10
|
-
QUESTION_STATUS_REJECTED
|
|
11
|
-
];
|
|
12
|
-
const QUESTION_CREATION_STATUSES = [QUESTION_STATUS_PENDING, QUESTION_STATUS_ACTIVE];
|
|
13
|
-
//#endregion
|
|
14
|
-
export { QUESTION_CREATION_STATUSES, QUESTION_STATUSES, QUESTION_STATUS_ACTIVE, QUESTION_STATUS_ARCHIVED, QUESTION_STATUS_PENDING, QUESTION_STATUS_REJECTED };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=question-status.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-status.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-status/question-status.constants.ts"],"sourcesContent":["const QUESTION_STATUS_PENDING = \"pending\";\nconst QUESTION_STATUS_ACTIVE = \"active\";\nconst QUESTION_STATUS_ARCHIVED = \"archived\";\nconst QUESTION_STATUS_REJECTED = \"rejected\";\n\nconst QUESTION_STATUSES = [\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n QUESTION_STATUS_ARCHIVED,\n QUESTION_STATUS_REJECTED,\n] as const satisfies readonly string[];\n\nconst QUESTION_CREATION_STATUSES = [\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n] as const satisfies readonly string[];\n\nexport {\n QUESTION_STATUS_PENDING,\n QUESTION_STATUS_ACTIVE,\n QUESTION_STATUS_ARCHIVED,\n QUESTION_STATUS_REJECTED,\n QUESTION_STATUSES,\n QUESTION_CREATION_STATUSES,\n};"],"mappings":";AAAA,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAC/B,MAAM,2BAA2B;AACjC,MAAM,2BAA2B;AAEjC,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACD;AAED,MAAM,6BAA6B,CACjC,yBACA,uBACD"}
|
package/dist/src/contexts/question/domain/value-objects/question-status/question-status.types.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TupleToEnum } from "../../../../../shared/types/enum.types.mjs";
|
|
2
|
-
import { QUESTION_STATUSES } from "./question-status.constants.mjs";
|
|
3
|
-
import { TupleToUnion } from "type-fest";
|
|
4
|
-
|
|
5
|
-
//#region ../../src/contexts/question/domain/value-objects/question-status/question-status.types.d.ts
|
|
6
|
-
type QuestionStatus = TupleToUnion<typeof QUESTION_STATUSES>;
|
|
7
|
-
type QuestionStatusEnum = TupleToEnum<typeof QUESTION_STATUSES>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { type QuestionStatus, type QuestionStatusEnum };
|
|
10
|
-
//# sourceMappingURL=question-status.types.d.mts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.d.ts
|
|
2
|
-
declare const QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS = 1;
|
|
3
|
-
declare const QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS = 3;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS };
|
|
6
|
-
//# sourceMappingURL=question-theme-assignment.constants.d.mts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region ../../src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.ts
|
|
2
|
-
const QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS = 1;
|
|
3
|
-
const QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS = 3;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS, QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS };
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=question-theme-assignment.constants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question-theme-assignment.constants.mjs","names":[],"sources":["../../../../../../../../../src/contexts/question/domain/value-objects/question-theme-assignment/question-theme-assignment.constants.ts"],"sourcesContent":["const QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS = 1;\n\nconst QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS = 3;\n\nexport {\n QUESTION_THEME_ASSIGNMENTS_MIN_ITEMS,\n QUESTION_THEME_ASSIGNMENTS_MAX_ITEMS,\n};"],"mappings":";AAAA,MAAM,uCAAuC;AAE7C,MAAM,uCAAuC"}
|