@goat-it/schemas 0.0.16 → 0.0.17-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.
Files changed (77) hide show
  1. package/dist/src/contexts/question/application/dto/question-creation/question-author-creation/question-author-creation.dto.shape.d.mts +13 -0
  2. package/dist/src/contexts/question/application/dto/question-creation/question-content-creation/question-content-creation.dto.shape.d.mts +12 -0
  3. package/dist/src/contexts/question/application/dto/question-modification/question-content-modification/question-content-modification.dto.shape.d.mts +12 -0
  4. package/dist/src/shared/domain/value-objects/locale/locale.types.d.mts +5 -1
  5. package/dist/testing/question/index.d.mts +18 -0
  6. package/dist/testing/question/index.mjs +18 -0
  7. package/dist/testing/question-theme/index.d.mts +4 -0
  8. package/dist/testing/question-theme/index.mjs +4 -0
  9. package/dist/testing/shared/index.d.mts +3 -0
  10. package/dist/testing/shared/index.mjs +3 -0
  11. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-find-questions-query/admin-find-questions-query.dto.faketory.d.mts +6 -0
  12. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-find-questions-query/admin-find-questions-query.dto.faketory.mjs +25 -0
  13. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-find-questions-query/admin-find-questions-query.dto.faketory.mjs.map +1 -0
  14. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question-content/admin-question-content.dto.faketory.d.mts +6 -0
  15. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question-content/admin-question-content.dto.faketory.mjs +16 -0
  16. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question-content/admin-question-content.dto.faketory.mjs.map +1 -0
  17. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.faketory.d.mts +6 -0
  18. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.faketory.mjs +15 -0
  19. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question-theme-assignment/admin-question-theme-assignment.dto.faketory.mjs.map +1 -0
  20. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question.dto.faketory.d.mts +6 -0
  21. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question.dto.faketory.mjs +27 -0
  22. package/dist/tests/shared/utils/faketories/contexts/question/dto/admin-question/admin-question.dto.faketory.mjs.map +1 -0
  23. package/dist/tests/shared/utils/faketories/contexts/question/dto/find-questions-query/find-questions-query.dto.faketory.d.mts +6 -0
  24. package/dist/tests/shared/utils/faketories/contexts/question/dto/find-questions-query/find-questions-query.dto.faketory.mjs +24 -0
  25. package/dist/tests/shared/utils/faketories/contexts/question/dto/find-questions-query/find-questions-query.dto.faketory.mjs.map +1 -0
  26. package/dist/tests/shared/utils/faketories/contexts/question/dto/find-random-questions-query/find-random-questions-query.dto.faketory.d.mts +6 -0
  27. package/dist/tests/shared/utils/faketories/contexts/question/dto/find-random-questions-query/find-random-questions-query.dto.faketory.mjs +23 -0
  28. package/dist/tests/shared/utils/faketories/contexts/question/dto/find-random-questions-query/find-random-questions-query.dto.faketory.mjs.map +1 -0
  29. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question-content/question-content.dto.faketory.d.mts +6 -0
  30. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question-content/question-content.dto.faketory.mjs +15 -0
  31. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question-content/question-content.dto.faketory.mjs.map +1 -0
  32. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question-theme-assignment/question-theme-assignment.dto.faketory.d.mts +6 -0
  33. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question-theme-assignment/question-theme-assignment.dto.faketory.mjs +15 -0
  34. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question-theme-assignment/question-theme-assignment.dto.faketory.mjs.map +1 -0
  35. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question.dto.faketory.d.mts +6 -0
  36. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question.dto.faketory.mjs +27 -0
  37. package/dist/tests/shared/utils/faketories/contexts/question/dto/question/question.dto.faketory.mjs.map +1 -0
  38. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-author-creation/question-author-creation.dto.faketory.d.mts +6 -0
  39. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-author-creation/question-author-creation.dto.faketory.mjs +14 -0
  40. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-author-creation/question-author-creation.dto.faketory.mjs.map +1 -0
  41. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-content-creation/question-content-creation.dto.faketory.d.mts +6 -0
  42. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-content-creation/question-content-creation.dto.faketory.mjs +16 -0
  43. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-content-creation/question-content-creation.dto.faketory.mjs.map +1 -0
  44. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-creation.dto.faketory.d.mts +6 -0
  45. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-creation.dto.faketory.mjs +21 -0
  46. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-creation.dto.faketory.mjs.map +1 -0
  47. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory.d.mts +6 -0
  48. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory.mjs +14 -0
  49. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory.mjs.map +1 -0
  50. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-modification/question-modification.dto.faketory.d.mts +8 -0
  51. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-modification/question-modification.dto.faketory.mjs +26 -0
  52. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-modification/question-modification.dto.faketory.mjs.map +1 -0
  53. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.faketory.d.mts +6 -0
  54. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.faketory.mjs +13 -0
  55. package/dist/tests/shared/utils/faketories/contexts/question/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.faketory.mjs.map +1 -0
  56. package/dist/tests/shared/utils/faketories/contexts/question/dto/shared/question-author/question-author.dto.faketory.d.mts +6 -0
  57. package/dist/tests/shared/utils/faketories/contexts/question/dto/shared/question-author/question-author.dto.faketory.mjs +18 -0
  58. package/dist/tests/shared/utils/faketories/contexts/question/dto/shared/question-author/question-author.dto.faketory.mjs.map +1 -0
  59. package/dist/tests/shared/utils/faketories/contexts/question/dto/shared/question-rejection/question-rejection.dto.faketory.d.mts +6 -0
  60. package/dist/tests/shared/utils/faketories/contexts/question/dto/shared/question-rejection/question-rejection.dto.faketory.mjs +14 -0
  61. package/dist/tests/shared/utils/faketories/contexts/question/dto/shared/question-rejection/question-rejection.dto.faketory.mjs.map +1 -0
  62. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.faketory.d.mts +6 -0
  63. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.faketory.mjs +20 -0
  64. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.faketory.mjs.map +1 -0
  65. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/find-question-themes-query/find-question-themes-query.dto.faketory.d.mts +6 -0
  66. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/find-question-themes-query/find-question-themes-query.dto.faketory.mjs +19 -0
  67. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/find-question-themes-query/find-question-themes-query.dto.faketory.mjs.map +1 -0
  68. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/question-theme.dto.faketory.d.mts +12 -0
  69. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/question-theme.dto.faketory.mjs +60 -0
  70. package/dist/tests/shared/utils/faketories/contexts/question-theme/dto/question-theme.dto.faketory.mjs.map +1 -0
  71. package/dist/tests/shared/utils/faketories/shared/infrastructure/http/dto/api-response-exception/api-response-exception.faketory.d.mts +8 -0
  72. package/dist/tests/shared/utils/faketories/shared/infrastructure/http/dto/api-response-exception/api-response-exception.faketory.mjs +32 -0
  73. package/dist/tests/shared/utils/faketories/shared/infrastructure/http/dto/api-response-exception/api-response-exception.faketory.mjs.map +1 -0
  74. package/dist/tests/shared/utils/faketories/shared/locale/locale.faketory.d.mts +8 -0
  75. package/dist/tests/shared/utils/faketories/shared/locale/locale.faketory.mjs +36 -0
  76. package/dist/tests/shared/utils/faketories/shared/locale/locale.faketory.mjs.map +1 -0
  77. package/package.json +15 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-creation.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../tests/shared/utils/faketories/contexts/question/dto/question-creation/question-creation.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport type { QuestionCreationDto } from \"@question/application/dto/question-creation/question-creation.dto.shape\";\nimport { QUESTION_CATEGORIES, QUESTION_COGNITIVE_DIFFICULTIES } from \"@question/domain/constants/question.constants\";\n\nimport { createFakeQuestionContentCreationDto } from \"@faketories/contexts/question/dto/question-creation/question-content-creation/question-content-creation.dto.faketory\";\nimport { createFakeQuestionThemeAssignmentCreationDto } from \"@faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory\";\nimport { createFakeQuestionAuthorCreationDto } from \"@faketories/contexts/question/dto/question-creation/question-author-creation/question-author-creation.dto.faketory\";\n\nfunction createFakeQuestionCreationDto(creationDto: Partial<QuestionCreationDto> = {}): QuestionCreationDto {\n return {\n category: faker.helpers.arrayElement(QUESTION_CATEGORIES),\n themes: [createFakeQuestionThemeAssignmentCreationDto()],\n content: createFakeQuestionContentCreationDto(),\n cognitiveDifficulty: faker.helpers.arrayElement(QUESTION_COGNITIVE_DIFFICULTIES),\n author: createFakeQuestionAuthorCreationDto(),\n sourceUrls: faker.helpers.uniqueArray(() => faker.internet.url(), 2),\n ...creationDto,\n };\n}\n\nexport { createFakeQuestionCreationDto };"],"mappings":";;;;;;AASA,SAAS,8BAA8B,cAA4C,CAAC,GAAwB;CAC1G,OAAO;EACL,UAAU,MAAM,QAAQ,aAAa,mBAAmB;EACxD,QAAQ,CAAC,6CAA6C,CAAC;EACvD,SAAS,qCAAqC;EAC9C,qBAAqB,MAAM,QAAQ,aAAa,+BAA+B;EAC/E,QAAQ,oCAAoC;EAC5C,YAAY,MAAM,QAAQ,kBAAkB,MAAM,SAAS,IAAI,GAAG,CAAC;EACnE,GAAG;CACL;AACF"}
@@ -0,0 +1,6 @@
1
+ import { QuestionThemeAssignmentCreationDto } from "../../../../../../../../../src/contexts/question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape.mjs";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory.d.ts
3
+ declare function createFakeQuestionThemeAssignmentCreationDto(assign?: Partial<QuestionThemeAssignmentCreationDto>): QuestionThemeAssignmentCreationDto;
4
+ //#endregion
5
+ export { createFakeQuestionThemeAssignmentCreationDto };
6
+ //# sourceMappingURL=question-theme-assignment-creation.dto.faketory.d.mts.map
@@ -0,0 +1,14 @@
1
+ import { faker } from "@faker-js/faker";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory.ts
3
+ function createFakeQuestionThemeAssignmentCreationDto(assign = {}) {
4
+ return {
5
+ themeId: faker.database.mongodbObjectId(),
6
+ isPrimary: faker.datatype.boolean(),
7
+ isHint: faker.datatype.boolean(),
8
+ ...assign
9
+ };
10
+ }
11
+ //#endregion
12
+ export { createFakeQuestionThemeAssignmentCreationDto };
13
+
14
+ //# sourceMappingURL=question-theme-assignment-creation.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-theme-assignment-creation.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../../tests/shared/utils/faketories/contexts/question/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport type { QuestionThemeAssignmentCreationDto } from \"@question/application/dto/question-creation/question-theme-assignment-creation/question-theme-assignment-creation.dto.shape\";\n\nfunction createFakeQuestionThemeAssignmentCreationDto(assign: Partial<QuestionThemeAssignmentCreationDto> = {}): QuestionThemeAssignmentCreationDto {\n return {\n themeId: faker.database.mongodbObjectId(),\n isPrimary: faker.datatype.boolean(),\n isHint: faker.datatype.boolean(),\n ...assign,\n };\n}\n\nexport { createFakeQuestionThemeAssignmentCreationDto };"],"mappings":";;AAIA,SAAS,6CAA6C,SAAsD,CAAC,GAAuC;CAClJ,OAAO;EACL,SAAS,MAAM,SAAS,gBAAgB;EACxC,WAAW,MAAM,SAAS,QAAQ;EAClC,QAAQ,MAAM,SAAS,QAAQ;EAC/B,GAAG;CACL;AACF"}
@@ -0,0 +1,8 @@
1
+ import { QuestionModificationDto } from "../../../../../../../../src/contexts/question/application/dto/question-modification/question-modification.dto.shape.mjs";
2
+ import { QuestionContentModificationDto } from "../../../../../../../../src/contexts/question/application/dto/question-modification/question-content-modification/question-content-modification.dto.shape.mjs";
3
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/question-modification/question-modification.dto.faketory.d.ts
4
+ declare function createFakeQuestionContentModificationDto(overrides?: Partial<QuestionContentModificationDto>): QuestionContentModificationDto;
5
+ declare function createFakeQuestionModificationDto(overrides?: Partial<QuestionModificationDto>): QuestionModificationDto;
6
+ //#endregion
7
+ export { createFakeQuestionContentModificationDto, createFakeQuestionModificationDto };
8
+ //# sourceMappingURL=question-modification.dto.faketory.d.mts.map
@@ -0,0 +1,26 @@
1
+ import { QUESTION_CATEGORIES, QUESTION_COGNITIVE_DIFFICULTIES } from "../../../../../../../../src/contexts/question/domain/constants/question.constants.mjs";
2
+ import { createFakeLocalizedText, createFakeLocalizedTexts } from "../../../../shared/locale/locale.faketory.mjs";
3
+ import { faker } from "@faker-js/faker";
4
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/question-modification/question-modification.dto.faketory.ts
5
+ function createFakeQuestionContentModificationDto(overrides = {}) {
6
+ return {
7
+ statement: faker.helpers.maybe(createFakeLocalizedText),
8
+ answer: faker.helpers.maybe(createFakeLocalizedText),
9
+ context: faker.helpers.maybe(createFakeLocalizedText),
10
+ trivia: faker.helpers.maybe(createFakeLocalizedTexts),
11
+ ...overrides
12
+ };
13
+ }
14
+ function createFakeQuestionModificationDto(overrides = {}) {
15
+ return {
16
+ category: faker.helpers.maybe(() => faker.helpers.arrayElement(QUESTION_CATEGORIES)),
17
+ cognitiveDifficulty: faker.helpers.maybe(() => faker.helpers.arrayElement(QUESTION_COGNITIVE_DIFFICULTIES)),
18
+ sourceUrls: faker.helpers.maybe(() => [faker.internet.url(), faker.internet.url()]),
19
+ content: faker.helpers.maybe(createFakeQuestionContentModificationDto),
20
+ ...overrides
21
+ };
22
+ }
23
+ //#endregion
24
+ export { createFakeQuestionContentModificationDto, createFakeQuestionModificationDto };
25
+
26
+ //# sourceMappingURL=question-modification.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-modification.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../tests/shared/utils/faketories/contexts/question/dto/question-modification/question-modification.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport { QUESTION_CATEGORIES, QUESTION_COGNITIVE_DIFFICULTIES } from \"@question/domain/constants/question.constants\";\nimport type { QuestionContentModificationDto } from \"@question/application/dto/question-modification/question-content-modification/question-content-modification.dto.shape\";\nimport type { QuestionModificationDto } from \"@question/application/dto/question-modification/question-modification.dto.shape\";\n\nimport { createFakeLocalizedText, createFakeLocalizedTexts } from \"@faketories/shared/locale/locale.faketory\";\n\nfunction createFakeQuestionContentModificationDto(overrides: Partial<QuestionContentModificationDto> = {}): QuestionContentModificationDto {\n return {\n statement: faker.helpers.maybe(createFakeLocalizedText),\n answer: faker.helpers.maybe(createFakeLocalizedText),\n context: faker.helpers.maybe(createFakeLocalizedText),\n trivia: faker.helpers.maybe(createFakeLocalizedTexts),\n ...overrides,\n };\n}\n\nfunction createFakeQuestionModificationDto(overrides: Partial<QuestionModificationDto> = {}): QuestionModificationDto {\n return {\n category: faker.helpers.maybe(() => faker.helpers.arrayElement(QUESTION_CATEGORIES)),\n cognitiveDifficulty: faker.helpers.maybe(() => faker.helpers.arrayElement(QUESTION_COGNITIVE_DIFFICULTIES)),\n sourceUrls: faker.helpers.maybe(() => [faker.internet.url(), faker.internet.url()]),\n content: faker.helpers.maybe(createFakeQuestionContentModificationDto),\n ...overrides,\n };\n}\n\nexport {\n createFakeQuestionContentModificationDto,\n createFakeQuestionModificationDto,\n};"],"mappings":";;;;AAQA,SAAS,yCAAyC,YAAqD,CAAC,GAAmC;CACzI,OAAO;EACL,WAAW,MAAM,QAAQ,MAAM,uBAAuB;EACtD,QAAQ,MAAM,QAAQ,MAAM,uBAAuB;EACnD,SAAS,MAAM,QAAQ,MAAM,uBAAuB;EACpD,QAAQ,MAAM,QAAQ,MAAM,wBAAwB;EACpD,GAAG;CACL;AACF;AAEA,SAAS,kCAAkC,YAA8C,CAAC,GAA4B;CACpH,OAAO;EACL,UAAU,MAAM,QAAQ,YAAY,MAAM,QAAQ,aAAa,mBAAmB,CAAC;EACnF,qBAAqB,MAAM,QAAQ,YAAY,MAAM,QAAQ,aAAa,+BAA+B,CAAC;EAC1G,YAAY,MAAM,QAAQ,YAAY,CAAC,MAAM,SAAS,IAAI,GAAG,MAAM,SAAS,IAAI,CAAC,CAAC;EAClF,SAAS,MAAM,QAAQ,MAAM,wCAAwC;EACrE,GAAG;CACL;AACF"}
@@ -0,0 +1,6 @@
1
+ import { QuestionThemeAssignmentModificationDto } from "../../../../../../../../src/contexts/question/application/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.shape.mjs";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.faketory.d.ts
3
+ declare function createFakeQuestionThemeAssignmentModificationDto(overrides?: Partial<QuestionThemeAssignmentModificationDto>): QuestionThemeAssignmentModificationDto;
4
+ //#endregion
5
+ export { createFakeQuestionThemeAssignmentModificationDto };
6
+ //# sourceMappingURL=question-theme-assignment-modification.dto.faketory.d.mts.map
@@ -0,0 +1,13 @@
1
+ import { faker } from "@faker-js/faker";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.faketory.ts
3
+ function createFakeQuestionThemeAssignmentModificationDto(overrides = {}) {
4
+ return {
5
+ isPrimary: faker.helpers.maybe(() => true),
6
+ isHint: faker.helpers.maybe(faker.datatype.boolean),
7
+ ...overrides
8
+ };
9
+ }
10
+ //#endregion
11
+ export { createFakeQuestionThemeAssignmentModificationDto };
12
+
13
+ //# sourceMappingURL=question-theme-assignment-modification.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-theme-assignment-modification.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../tests/shared/utils/faketories/contexts/question/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport type { QuestionThemeAssignmentModificationDto } from \"@question/application/dto/question-theme-assignment-modification/question-theme-assignment-modification.dto.shape\";\n\nfunction createFakeQuestionThemeAssignmentModificationDto(overrides: Partial<QuestionThemeAssignmentModificationDto> = {}): QuestionThemeAssignmentModificationDto {\n return {\n isPrimary: faker.helpers.maybe(() => true),\n isHint: faker.helpers.maybe(faker.datatype.boolean),\n ...overrides,\n };\n}\n\nexport { createFakeQuestionThemeAssignmentModificationDto };"],"mappings":";;AAIA,SAAS,iDAAiD,YAA6D,CAAC,GAA2C;CACjK,OAAO;EACL,WAAW,MAAM,QAAQ,YAAY,IAAI;EACzC,QAAQ,MAAM,QAAQ,MAAM,MAAM,SAAS,OAAO;EAClD,GAAG;CACL;AACF"}
@@ -0,0 +1,6 @@
1
+ import { QuestionAuthorDto } from "../../../../../../../../../src/contexts/question/application/dto/shared/question-author/question-author.dto.shape.mjs";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/shared/question-author/question-author.dto.faketory.d.ts
3
+ declare function createFakeQuestionAuthorDto(questionAuthorDto?: Partial<QuestionAuthorDto>): QuestionAuthorDto;
4
+ //#endregion
5
+ export { createFakeQuestionAuthorDto };
6
+ //# sourceMappingURL=question-author.dto.faketory.d.mts.map
@@ -0,0 +1,18 @@
1
+ import { QUESTION_AUTHOR_ROLES } from "../../../../../../../../../src/contexts/question/domain/constants/question.constants.mjs";
2
+ import { faker } from "@faker-js/faker";
3
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/shared/question-author/question-author.dto.faketory.ts
4
+ function createFakeQuestionAuthorDto(questionAuthorDto = {}) {
5
+ const role = questionAuthorDto.role ?? faker.helpers.arrayElement(QUESTION_AUTHOR_ROLES);
6
+ const { gameId } = questionAuthorDto;
7
+ if (role === "game" && gameId === void 0) questionAuthorDto.gameId = faker.database.mongodbObjectId();
8
+ else if (role !== "game" && gameId !== void 0) delete questionAuthorDto.gameId;
9
+ return {
10
+ role,
11
+ name: faker.helpers.maybe(faker.internet.username),
12
+ ...questionAuthorDto
13
+ };
14
+ }
15
+ //#endregion
16
+ export { createFakeQuestionAuthorDto };
17
+
18
+ //# sourceMappingURL=question-author.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-author.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../../tests/shared/utils/faketories/contexts/question/dto/shared/question-author/question-author.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport type { QuestionAuthorDto } from \"@question/application/dto/shared/question-author/question-author.dto.shape\";\nimport { QUESTION_AUTHOR_ROLES } from \"@question/domain/constants/question.constants\";\n\nfunction createFakeQuestionAuthorDto(questionAuthorDto: Partial<QuestionAuthorDto> = {}): QuestionAuthorDto {\n const role = questionAuthorDto.role ?? faker.helpers.arrayElement(QUESTION_AUTHOR_ROLES);\n const { gameId } = questionAuthorDto;\n\n if (role === \"game\" && gameId === undefined) {\n questionAuthorDto.gameId = faker.database.mongodbObjectId();\n } else if (role !== \"game\" && gameId !== undefined) {\n delete questionAuthorDto.gameId;\n }\n return {\n role,\n name: faker.helpers.maybe(faker.internet.username),\n ...questionAuthorDto,\n };\n}\n\nexport {\n createFakeQuestionAuthorDto,\n};"],"mappings":";;;AAKA,SAAS,4BAA4B,oBAAgD,CAAC,GAAsB;CAC1G,MAAM,OAAO,kBAAkB,QAAQ,MAAM,QAAQ,aAAa,qBAAqB;CACvF,MAAM,EAAE,WAAW;CAEnB,IAAI,SAAS,UAAU,WAAW,KAAA,GAChC,kBAAkB,SAAS,MAAM,SAAS,gBAAgB;MACrD,IAAI,SAAS,UAAU,WAAW,KAAA,GACvC,OAAO,kBAAkB;CAE3B,OAAO;EACL;EACA,MAAM,MAAM,QAAQ,MAAM,MAAM,SAAS,QAAQ;EACjD,GAAG;CACL;AACF"}
@@ -0,0 +1,6 @@
1
+ import { QuestionRejectionDto } from "../../../../../../../../../src/contexts/question/application/dto/shared/question-rejection/question-rejection.dto.shape.mjs";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/shared/question-rejection/question-rejection.dto.faketory.d.ts
3
+ declare function createFakeQuestionRejectionDto(questionRejectionDto?: Partial<QuestionRejectionDto>): QuestionRejectionDto;
4
+ //#endregion
5
+ export { createFakeQuestionRejectionDto };
6
+ //# sourceMappingURL=question-rejection.dto.faketory.d.mts.map
@@ -0,0 +1,14 @@
1
+ import { QUESTION_REJECTION_TYPES } from "../../../../../../../../../src/contexts/question/domain/constants/question.constants.mjs";
2
+ import { faker } from "@faker-js/faker";
3
+ //#region ../../tests/shared/utils/faketories/contexts/question/dto/shared/question-rejection/question-rejection.dto.faketory.ts
4
+ function createFakeQuestionRejectionDto(questionRejectionDto = {}) {
5
+ return {
6
+ type: faker.helpers.arrayElement(QUESTION_REJECTION_TYPES),
7
+ comment: faker.helpers.maybe(faker.lorem.sentence),
8
+ ...questionRejectionDto
9
+ };
10
+ }
11
+ //#endregion
12
+ export { createFakeQuestionRejectionDto };
13
+
14
+ //# sourceMappingURL=question-rejection.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-rejection.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../../tests/shared/utils/faketories/contexts/question/dto/shared/question-rejection/question-rejection.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport type { QuestionRejectionDto } from \"@question/application/dto/shared/question-rejection/question-rejection.dto.shape\";\nimport { QUESTION_REJECTION_TYPES } from \"@question/domain/constants/question.constants\";\n\nfunction createFakeQuestionRejectionDto(questionRejectionDto: Partial<QuestionRejectionDto> = {}): QuestionRejectionDto {\n return {\n type: faker.helpers.arrayElement(QUESTION_REJECTION_TYPES),\n comment: faker.helpers.maybe(faker.lorem.sentence),\n ...questionRejectionDto,\n };\n}\n\nexport {\n createFakeQuestionRejectionDto,\n};"],"mappings":";;;AAKA,SAAS,+BAA+B,uBAAsD,CAAC,GAAyB;CACtH,OAAO;EACL,MAAM,MAAM,QAAQ,aAAa,wBAAwB;EACzD,SAAS,MAAM,QAAQ,MAAM,MAAM,MAAM,QAAQ;EACjD,GAAG;CACL;AACF"}
@@ -0,0 +1,6 @@
1
+ import { AdminFindQuestionThemesQueryDto } from "../../../../../../../../src/contexts/question-theme/application/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.shape.mjs";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question-theme/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.faketory.d.ts
3
+ declare function createFakeAdminFindQuestionThemesQueryDto(overrides?: Partial<AdminFindQuestionThemesQueryDto>): AdminFindQuestionThemesQueryDto;
4
+ //#endregion
5
+ export { createFakeAdminFindQuestionThemesQueryDto };
6
+ //# sourceMappingURL=admin-find-question-themes-query.dto.faketory.d.mts.map
@@ -0,0 +1,20 @@
1
+ import { SORT_ORDERS } from "../../../../../../../../src/shared/domain/constants/sort/sort.constants.mjs";
2
+ import "../../../../../../../../src/shared/infrastructure/http/zod/validators/limit/constants/limit.zod.validators.constants.mjs";
3
+ import { LIMIT_QUERY_KEY } from "../../../../../../../../src/shared/application/dto/constants/limit-query.dto.constants.mjs";
4
+ import { SORT_BY_QUERY_KEY, SORT_ORDER_QUERY_KEY } from "../../../../../../../../src/shared/application/dto/constants/sort-query.dto.constants.mjs";
5
+ import { ADMIN_QUESTION_THEME_SORTABLE_FIELDS, QUESTION_THEME_STATUSES } from "../../../../../../../../src/contexts/question-theme/domain/constants/question-theme.constants.mjs";
6
+ import { faker } from "@faker-js/faker";
7
+ //#region ../../tests/shared/utils/faketories/contexts/question-theme/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.faketory.ts
8
+ function createFakeAdminFindQuestionThemesQueryDto(overrides = {}) {
9
+ return {
10
+ [SORT_BY_QUERY_KEY]: faker.helpers.arrayElement(ADMIN_QUESTION_THEME_SORTABLE_FIELDS),
11
+ [SORT_ORDER_QUERY_KEY]: faker.helpers.arrayElement(SORT_ORDERS),
12
+ [LIMIT_QUERY_KEY]: faker.helpers.maybe(() => faker.number.int({ min: 0 })) ?? 50,
13
+ status: faker.helpers.maybe(() => faker.helpers.arrayElement(QUESTION_THEME_STATUSES)),
14
+ ...overrides
15
+ };
16
+ }
17
+ //#endregion
18
+ export { createFakeAdminFindQuestionThemesQueryDto };
19
+
20
+ //# sourceMappingURL=admin-find-question-themes-query.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-find-question-themes-query.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../tests/shared/utils/faketories/contexts/question-theme/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport { ADMIN_QUESTION_THEME_SORTABLE_FIELDS, QUESTION_THEME_STATUSES } from \"@question-theme/domain/constants/question-theme.constants\";\n\nimport { SORT_ORDERS } from \"@shared/domain/constants/sort/sort.constants\";\nimport { SORT_BY_QUERY_KEY, SORT_ORDER_QUERY_KEY } from \"@shared/application/dto/constants/sort-query.dto.constants\";\nimport { LIMIT_QUERY_KEY } from \"@shared/application/dto/constants/limit-query.dto.constants\";\nimport { LIMIT_DEFAULT, LIMIT_MINIMUM } from \"@shared/infrastructure/http/zod/validators/limit/constants/limit.zod.validators.constants\";\n\nimport type { AdminFindQuestionThemesQueryDto } from \"@question-theme/application/dto/admin-find-question-themes-query/admin-find-question-themes-query.dto.shape\";\n\nfunction createFakeAdminFindQuestionThemesQueryDto(overrides: Partial<AdminFindQuestionThemesQueryDto> = {}): AdminFindQuestionThemesQueryDto {\n return {\n [SORT_BY_QUERY_KEY]: faker.helpers.arrayElement(ADMIN_QUESTION_THEME_SORTABLE_FIELDS),\n [SORT_ORDER_QUERY_KEY]: faker.helpers.arrayElement(SORT_ORDERS),\n [LIMIT_QUERY_KEY]: faker.helpers.maybe(() => faker.number.int({ min: LIMIT_MINIMUM })) ?? LIMIT_DEFAULT,\n status: faker.helpers.maybe(() => faker.helpers.arrayElement(QUESTION_THEME_STATUSES)),\n ...overrides,\n };\n}\n\nexport { createFakeAdminFindQuestionThemesQueryDto };"],"mappings":";;;;;;;AAWA,SAAS,0CAA0C,YAAsD,CAAC,GAAoC;CAC5I,OAAO;GACJ,oBAAoB,MAAM,QAAQ,aAAa,oCAAoC;GACnF,uBAAuB,MAAM,QAAQ,aAAa,WAAW;GAC7D,kBAAkB,MAAM,QAAQ,YAAY,MAAM,OAAO,IAAI,EAAE,KAAA,EAAmB,CAAC,CAAC,KAAA;EACrF,QAAQ,MAAM,QAAQ,YAAY,MAAM,QAAQ,aAAa,uBAAuB,CAAC;EACrF,GAAG;CACL;AACF"}
@@ -0,0 +1,6 @@
1
+ import { FindQuestionThemesQueryDto } from "../../../../../../../../src/contexts/question-theme/application/dto/find-question-themes-query/find-question-themes-query.dto.shape.mjs";
2
+ //#region ../../tests/shared/utils/faketories/contexts/question-theme/dto/find-question-themes-query/find-question-themes-query.dto.faketory.d.ts
3
+ declare function createFakeFindQuestionThemesQueryDto(overrides?: Partial<FindQuestionThemesQueryDto>): FindQuestionThemesQueryDto;
4
+ //#endregion
5
+ export { createFakeFindQuestionThemesQueryDto };
6
+ //# sourceMappingURL=find-question-themes-query.dto.faketory.d.mts.map
@@ -0,0 +1,19 @@
1
+ import { SORT_ORDERS } from "../../../../../../../../src/shared/domain/constants/sort/sort.constants.mjs";
2
+ import "../../../../../../../../src/shared/infrastructure/http/zod/validators/limit/constants/limit.zod.validators.constants.mjs";
3
+ import { LIMIT_QUERY_KEY } from "../../../../../../../../src/shared/application/dto/constants/limit-query.dto.constants.mjs";
4
+ import { SORT_BY_QUERY_KEY, SORT_ORDER_QUERY_KEY } from "../../../../../../../../src/shared/application/dto/constants/sort-query.dto.constants.mjs";
5
+ import { QUESTION_THEME_SORTABLE_FIELDS } from "../../../../../../../../src/contexts/question-theme/domain/constants/question-theme.constants.mjs";
6
+ import { faker } from "@faker-js/faker";
7
+ //#region ../../tests/shared/utils/faketories/contexts/question-theme/dto/find-question-themes-query/find-question-themes-query.dto.faketory.ts
8
+ function createFakeFindQuestionThemesQueryDto(overrides = {}) {
9
+ return {
10
+ [SORT_BY_QUERY_KEY]: faker.helpers.arrayElement(QUESTION_THEME_SORTABLE_FIELDS),
11
+ [SORT_ORDER_QUERY_KEY]: faker.helpers.arrayElement(SORT_ORDERS),
12
+ [LIMIT_QUERY_KEY]: faker.helpers.maybe(() => faker.number.int({ min: 0 })) ?? 50,
13
+ ...overrides
14
+ };
15
+ }
16
+ //#endregion
17
+ export { createFakeFindQuestionThemesQueryDto };
18
+
19
+ //# sourceMappingURL=find-question-themes-query.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-question-themes-query.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../../tests/shared/utils/faketories/contexts/question-theme/dto/find-question-themes-query/find-question-themes-query.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport { QUESTION_THEME_SORTABLE_FIELDS } from \"@question-theme/domain/constants/question-theme.constants\";\n\nimport { LIMIT_QUERY_KEY } from \"@shared/application/dto/constants/limit-query.dto.constants\";\nimport { SORT_ORDERS } from \"@shared/domain/constants/sort/sort.constants\";\nimport { SORT_BY_QUERY_KEY, SORT_ORDER_QUERY_KEY } from \"@shared/application/dto/constants/sort-query.dto.constants\";\nimport { LIMIT_DEFAULT, LIMIT_MINIMUM } from \"@shared/infrastructure/http/zod/validators/limit/constants/limit.zod.validators.constants\";\n\nimport type { FindQuestionThemesQueryDto } from \"@question-theme/application/dto/find-question-themes-query/find-question-themes-query.dto.shape\";\n\nfunction createFakeFindQuestionThemesQueryDto(overrides: Partial<FindQuestionThemesQueryDto> = {}): FindQuestionThemesQueryDto {\n return {\n [SORT_BY_QUERY_KEY]: faker.helpers.arrayElement(QUESTION_THEME_SORTABLE_FIELDS),\n [SORT_ORDER_QUERY_KEY]: faker.helpers.arrayElement(SORT_ORDERS),\n [LIMIT_QUERY_KEY]: faker.helpers.maybe(() => faker.number.int({ min: LIMIT_MINIMUM })) ?? LIMIT_DEFAULT,\n ...overrides,\n };\n}\n\nexport { createFakeFindQuestionThemesQueryDto };"],"mappings":";;;;;;;AAWA,SAAS,qCAAqC,YAAiD,CAAC,GAA+B;CAC7H,OAAO;GACJ,oBAAoB,MAAM,QAAQ,aAAa,8BAA8B;GAC7E,uBAAuB,MAAM,QAAQ,aAAa,WAAW;GAC7D,kBAAkB,MAAM,QAAQ,YAAY,MAAM,OAAO,IAAI,EAAE,KAAA,EAAmB,CAAC,CAAC,KAAA;EACrF,GAAG;CACL;AACF"}
@@ -0,0 +1,12 @@
1
+ import { AdminQuestionThemeDto } from "../../../../../../../src/contexts/question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape.mjs";
2
+ import { QuestionThemeCreationDto } from "../../../../../../../src/contexts/question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape.mjs";
3
+ import { QuestionThemeModificationDto } from "../../../../../../../src/contexts/question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape.mjs";
4
+ import { QuestionThemeDto } from "../../../../../../../src/contexts/question-theme/application/dto/question-theme/question-theme.dto.shape.mjs";
5
+ //#region ../../tests/shared/utils/faketories/contexts/question-theme/dto/question-theme.dto.faketory.d.ts
6
+ declare function createFakeQuestionThemeDto(questionThemeDto?: Partial<QuestionThemeDto>): QuestionThemeDto;
7
+ declare function createFakeAdminQuestionThemeDto(adminQuestionThemeDto?: Partial<AdminQuestionThemeDto>): AdminQuestionThemeDto;
8
+ declare function createFakeQuestionThemeCreationDto(creationDto?: Partial<QuestionThemeCreationDto>): QuestionThemeCreationDto;
9
+ declare function createFakeQuestionThemeModificationDto(modificationDto?: Partial<QuestionThemeModificationDto>): QuestionThemeModificationDto;
10
+ //#endregion
11
+ export { createFakeAdminQuestionThemeDto, createFakeQuestionThemeCreationDto, createFakeQuestionThemeDto, createFakeQuestionThemeModificationDto };
12
+ //# sourceMappingURL=question-theme.dto.faketory.d.mts.map
@@ -0,0 +1,60 @@
1
+ import { QUESTION_THEME_STATUSES } from "../../../../../../../src/contexts/question-theme/domain/constants/question-theme.constants.mjs";
2
+ import { createFakeLocalizedText, createFakeLocalizedTexts } from "../../../shared/locale/locale.faketory.mjs";
3
+ import { faker } from "@faker-js/faker";
4
+ //#region ../../tests/shared/utils/faketories/contexts/question-theme/dto/question-theme.dto.faketory.ts
5
+ function createFakeQuestionThemeDto(questionThemeDto = {}) {
6
+ return {
7
+ id: faker.database.mongodbObjectId(),
8
+ slug: faker.lorem.slug(),
9
+ label: faker.word.sample(),
10
+ aliases: [
11
+ faker.word.sample(),
12
+ faker.word.sample(),
13
+ faker.word.sample()
14
+ ],
15
+ description: faker.word.sample(),
16
+ color: faker.helpers.maybe(() => faker.color.rgb({ casing: "upper" })),
17
+ status: faker.helpers.arrayElement(["active", "archived"]),
18
+ updatedAt: faker.date.anytime().toISOString(),
19
+ createdAt: faker.date.anytime().toISOString(),
20
+ ...questionThemeDto
21
+ };
22
+ }
23
+ function createFakeAdminQuestionThemeDto(adminQuestionThemeDto = {}) {
24
+ return {
25
+ id: faker.database.mongodbObjectId(),
26
+ slug: faker.lorem.slug(),
27
+ label: createFakeLocalizedText(),
28
+ aliases: createFakeLocalizedTexts(),
29
+ description: createFakeLocalizedText(),
30
+ color: faker.helpers.maybe(() => faker.color.rgb({ casing: "upper" })),
31
+ status: faker.helpers.arrayElement(QUESTION_THEME_STATUSES),
32
+ updatedAt: faker.date.anytime().toISOString(),
33
+ createdAt: faker.date.anytime().toISOString(),
34
+ ...adminQuestionThemeDto
35
+ };
36
+ }
37
+ function createFakeQuestionThemeCreationDto(creationDto = {}) {
38
+ return {
39
+ slug: faker.lorem.slug(),
40
+ label: createFakeLocalizedText(),
41
+ aliases: createFakeLocalizedTexts(),
42
+ description: createFakeLocalizedText(),
43
+ color: faker.helpers.maybe(() => faker.color.rgb({ casing: "upper" })),
44
+ ...creationDto
45
+ };
46
+ }
47
+ function createFakeQuestionThemeModificationDto(modificationDto = {}) {
48
+ return {
49
+ slug: faker.helpers.maybe(faker.lorem.slug),
50
+ label: faker.helpers.maybe(createFakeLocalizedText),
51
+ aliases: faker.helpers.maybe(createFakeLocalizedTexts),
52
+ description: faker.helpers.maybe(createFakeLocalizedText),
53
+ color: faker.helpers.maybe(() => faker.color.rgb({ casing: "upper" })),
54
+ ...modificationDto
55
+ };
56
+ }
57
+ //#endregion
58
+ export { createFakeAdminQuestionThemeDto, createFakeQuestionThemeCreationDto, createFakeQuestionThemeDto, createFakeQuestionThemeModificationDto };
59
+
60
+ //# sourceMappingURL=question-theme.dto.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-theme.dto.faketory.mjs","names":[],"sources":["../../../../../../../../../../tests/shared/utils/faketories/contexts/question-theme/dto/question-theme.dto.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport { QUESTION_THEME_STATUSES } from \"@question-theme/domain/constants/question-theme.constants\";\n\nimport { createFakeLocalizedText, createFakeLocalizedTexts } from \"@faketories/shared/locale/locale.faketory\";\n\nimport type { AdminQuestionThemeDto } from \"@question-theme/application/dto/admin-question-theme/admin-question-theme.dto.shape\";\nimport type { QuestionThemeCreationDto } from \"@question-theme/application/dto/question-theme-creation/question-theme-creation.dto.shape\";\nimport type { QuestionThemeModificationDto } from \"@question-theme/application/dto/question-theme-modification/question-theme-modification.dto.shape\";\nimport type { QuestionThemeDto } from \"@question-theme/application/dto/question-theme/question-theme.dto.shape\";\n\nfunction createFakeQuestionThemeDto(questionThemeDto: Partial<QuestionThemeDto> = {}): QuestionThemeDto {\n return {\n id: faker.database.mongodbObjectId(),\n slug: faker.lorem.slug(),\n label: faker.word.sample(),\n aliases: [faker.word.sample(), faker.word.sample(), faker.word.sample()],\n description: faker.word.sample(),\n color: faker.helpers.maybe(() => faker.color.rgb({ casing: \"upper\" })),\n status: faker.helpers.arrayElement([\"active\", \"archived\"]),\n updatedAt: faker.date.anytime().toISOString(),\n createdAt: faker.date.anytime().toISOString(),\n ...questionThemeDto,\n };\n}\n\nfunction createFakeAdminQuestionThemeDto(adminQuestionThemeDto: Partial<AdminQuestionThemeDto> = {}): AdminQuestionThemeDto {\n return {\n id: faker.database.mongodbObjectId(),\n slug: faker.lorem.slug(),\n label: createFakeLocalizedText(),\n aliases: createFakeLocalizedTexts(),\n description: createFakeLocalizedText(),\n color: faker.helpers.maybe(() => faker.color.rgb({ casing: \"upper\" })),\n status: faker.helpers.arrayElement(QUESTION_THEME_STATUSES),\n updatedAt: faker.date.anytime().toISOString(),\n createdAt: faker.date.anytime().toISOString(),\n ...adminQuestionThemeDto,\n };\n}\n\nfunction createFakeQuestionThemeCreationDto(creationDto: Partial<QuestionThemeCreationDto> = {}): QuestionThemeCreationDto {\n return {\n slug: faker.lorem.slug(),\n label: createFakeLocalizedText(),\n aliases: createFakeLocalizedTexts(),\n description: createFakeLocalizedText(),\n color: faker.helpers.maybe(() => faker.color.rgb({ casing: \"upper\" })),\n ...creationDto,\n };\n}\n\nfunction createFakeQuestionThemeModificationDto(modificationDto: Partial<QuestionThemeModificationDto> = {}): QuestionThemeModificationDto {\n return {\n slug: faker.helpers.maybe(faker.lorem.slug),\n label: faker.helpers.maybe(createFakeLocalizedText),\n aliases: faker.helpers.maybe(createFakeLocalizedTexts),\n description: faker.helpers.maybe(createFakeLocalizedText),\n color: faker.helpers.maybe(() => faker.color.rgb({ casing: \"upper\" })),\n ...modificationDto,\n };\n}\n\nexport {\n createFakeQuestionThemeDto,\n createFakeAdminQuestionThemeDto,\n createFakeQuestionThemeCreationDto,\n createFakeQuestionThemeModificationDto,\n};"],"mappings":";;;;AAWA,SAAS,2BAA2B,mBAA8C,CAAC,GAAqB;CACtG,OAAO;EACL,IAAI,MAAM,SAAS,gBAAgB;EACnC,MAAM,MAAM,MAAM,KAAK;EACvB,OAAO,MAAM,KAAK,OAAO;EACzB,SAAS;GAAC,MAAM,KAAK,OAAO;GAAG,MAAM,KAAK,OAAO;GAAG,MAAM,KAAK,OAAO;EAAC;EACvE,aAAa,MAAM,KAAK,OAAO;EAC/B,OAAO,MAAM,QAAQ,YAAY,MAAM,MAAM,IAAI,EAAE,QAAQ,QAAQ,CAAC,CAAC;EACrE,QAAQ,MAAM,QAAQ,aAAa,CAAC,UAAU,UAAU,CAAC;EACzD,WAAW,MAAM,KAAK,QAAQ,CAAC,CAAC,YAAY;EAC5C,WAAW,MAAM,KAAK,QAAQ,CAAC,CAAC,YAAY;EAC5C,GAAG;CACL;AACF;AAEA,SAAS,gCAAgC,wBAAwD,CAAC,GAA0B;CAC1H,OAAO;EACL,IAAI,MAAM,SAAS,gBAAgB;EACnC,MAAM,MAAM,MAAM,KAAK;EACvB,OAAO,wBAAwB;EAC/B,SAAS,yBAAyB;EAClC,aAAa,wBAAwB;EACrC,OAAO,MAAM,QAAQ,YAAY,MAAM,MAAM,IAAI,EAAE,QAAQ,QAAQ,CAAC,CAAC;EACrE,QAAQ,MAAM,QAAQ,aAAa,uBAAuB;EAC1D,WAAW,MAAM,KAAK,QAAQ,CAAC,CAAC,YAAY;EAC5C,WAAW,MAAM,KAAK,QAAQ,CAAC,CAAC,YAAY;EAC5C,GAAG;CACL;AACF;AAEA,SAAS,mCAAmC,cAAiD,CAAC,GAA6B;CACzH,OAAO;EACL,MAAM,MAAM,MAAM,KAAK;EACvB,OAAO,wBAAwB;EAC/B,SAAS,yBAAyB;EAClC,aAAa,wBAAwB;EACrC,OAAO,MAAM,QAAQ,YAAY,MAAM,MAAM,IAAI,EAAE,QAAQ,QAAQ,CAAC,CAAC;EACrE,GAAG;CACL;AACF;AAEA,SAAS,uCAAuC,kBAAyD,CAAC,GAAiC;CACzI,OAAO;EACL,MAAM,MAAM,QAAQ,MAAM,MAAM,MAAM,IAAI;EAC1C,OAAO,MAAM,QAAQ,MAAM,uBAAuB;EAClD,SAAS,MAAM,QAAQ,MAAM,wBAAwB;EACrD,aAAa,MAAM,QAAQ,MAAM,uBAAuB;EACxD,OAAO,MAAM,QAAQ,YAAY,MAAM,MAAM,IAAI,EAAE,QAAQ,QAAQ,CAAC,CAAC;EACrE,GAAG;CACL;AACF"}
@@ -0,0 +1,8 @@
1
+ import { ApiResponseExceptionDto } from "../../../../../../../../../src/shared/infrastructure/http/dto/api-response-exception/api-response-exception.dto.shape.mjs";
2
+ import { ApiResponseExceptionValidationDetailsDto } from "../../../../../../../../../src/shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape.mjs";
3
+ //#region ../../tests/shared/utils/faketories/shared/infrastructure/http/dto/api-response-exception/api-response-exception.faketory.d.ts
4
+ declare function createFakeApiResponseExceptionValidationDetailsDto(overrides?: Partial<ApiResponseExceptionValidationDetailsDto>): ApiResponseExceptionValidationDetailsDto;
5
+ declare function createFakeApiResponseExceptionDto(overrides?: Partial<ApiResponseExceptionDto>): ApiResponseExceptionDto;
6
+ //#endregion
7
+ export { createFakeApiResponseExceptionDto, createFakeApiResponseExceptionValidationDetailsDto };
8
+ //# sourceMappingURL=api-response-exception.faketory.d.mts.map
@@ -0,0 +1,32 @@
1
+ import { faker } from "@faker-js/faker";
2
+ //#region ../../tests/shared/utils/faketories/shared/infrastructure/http/dto/api-response-exception/api-response-exception.faketory.ts
3
+ function createFakeApiResponseExceptionValidationDetailsDto(overrides = {}) {
4
+ return {
5
+ message: faker.lorem.sentence(),
6
+ path: [faker.lorem.word()],
7
+ code: faker.helpers.replaceSymbols("ERR-##"),
8
+ expected: faker.lorem.word(),
9
+ ...overrides
10
+ };
11
+ }
12
+ function createFakeApiResponseExceptionDto(overrides = {}) {
13
+ return {
14
+ statusCode: faker.number.int({
15
+ min: 400,
16
+ max: 599
17
+ }),
18
+ message: faker.lorem.sentence(),
19
+ error: "Bad Request",
20
+ validationDetails: faker.helpers.maybe(() => [
21
+ createFakeApiResponseExceptionValidationDetailsDto(),
22
+ createFakeApiResponseExceptionValidationDetailsDto(),
23
+ createFakeApiResponseExceptionValidationDetailsDto()
24
+ ]),
25
+ errorCode: faker.helpers.maybe(() => faker.hacker.phrase().toLowerCase().replaceAll(/\s+/gu, "-").slice(0, 40)),
26
+ ...overrides
27
+ };
28
+ }
29
+ //#endregion
30
+ export { createFakeApiResponseExceptionDto, createFakeApiResponseExceptionValidationDetailsDto };
31
+
32
+ //# sourceMappingURL=api-response-exception.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-response-exception.faketory.mjs","names":[],"sources":["../../../../../../../../../../../../tests/shared/utils/faketories/shared/infrastructure/http/dto/api-response-exception/api-response-exception.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport type { ApiResponseExceptionValidationDetailsDto } from \"@shared/infrastructure/http/dto/api-response-exception/api-response-exception-validation-details/api-response-exception-validation-details.dto.shape\";\nimport type { ApiResponseExceptionDto } from \"@shared/infrastructure/http/dto/api-response-exception/api-response-exception.dto.shape\";\n\nfunction createFakeApiResponseExceptionValidationDetailsDto(overrides: Partial<ApiResponseExceptionValidationDetailsDto> = {}): ApiResponseExceptionValidationDetailsDto {\n return {\n message: faker.lorem.sentence(),\n path: [faker.lorem.word()],\n code: faker.helpers.replaceSymbols(\"ERR-##\"),\n expected: faker.lorem.word(),\n ...overrides,\n };\n}\n\nfunction createFakeApiResponseExceptionDto(overrides: Partial<ApiResponseExceptionDto> = {}): ApiResponseExceptionDto {\n return {\n statusCode: faker.number.int({ min: 400, max: 599 }),\n message: faker.lorem.sentence(),\n error: \"Bad Request\",\n validationDetails: faker.helpers.maybe(() => [\n createFakeApiResponseExceptionValidationDetailsDto(),\n createFakeApiResponseExceptionValidationDetailsDto(),\n createFakeApiResponseExceptionValidationDetailsDto(),\n ]),\n errorCode: faker.helpers.maybe(() => faker.hacker.phrase().toLowerCase().replaceAll(/\\s+/gu, \"-\").slice(0, 40)),\n ...overrides,\n };\n}\n\nexport {\n createFakeApiResponseExceptionDto,\n createFakeApiResponseExceptionValidationDetailsDto,\n};"],"mappings":";;AAKA,SAAS,mDAAmD,YAA+D,CAAC,GAA6C;CACvK,OAAO;EACL,SAAS,MAAM,MAAM,SAAS;EAC9B,MAAM,CAAC,MAAM,MAAM,KAAK,CAAC;EACzB,MAAM,MAAM,QAAQ,eAAe,QAAQ;EAC3C,UAAU,MAAM,MAAM,KAAK;EAC3B,GAAG;CACL;AACF;AAEA,SAAS,kCAAkC,YAA8C,CAAC,GAA4B;CACpH,OAAO;EACL,YAAY,MAAM,OAAO,IAAI;GAAE,KAAK;GAAK,KAAK;EAAI,CAAC;EACnD,SAAS,MAAM,MAAM,SAAS;EAC9B,OAAO;EACP,mBAAmB,MAAM,QAAQ,YAAY;GAC3C,mDAAmD;GACnD,mDAAmD;GACnD,mDAAmD;EACrD,CAAC;EACD,WAAW,MAAM,QAAQ,YAAY,MAAM,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,WAAW,SAAS,GAAG,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC;EAC9G,GAAG;CACL;AACF"}
@@ -0,0 +1,8 @@
1
+ import { LocalizationOptions, LocalizedText, LocalizedTexts } from "../../../../../../src/shared/domain/value-objects/locale/locale.types.mjs";
2
+ //#region ../../tests/shared/utils/faketories/shared/locale/locale.faketory.d.ts
3
+ declare function createFakeLocalizationOptions(localizationOptions?: Partial<LocalizationOptions>): LocalizationOptions;
4
+ declare function createFakeLocalizedText(localizedText?: Partial<LocalizedText>): LocalizedText;
5
+ declare function createFakeLocalizedTexts(localizedTexts?: Partial<LocalizedTexts>): LocalizedTexts;
6
+ //#endregion
7
+ export { createFakeLocalizationOptions, createFakeLocalizedText, createFakeLocalizedTexts };
8
+ //# sourceMappingURL=locale.faketory.d.mts.map
@@ -0,0 +1,36 @@
1
+ import { LOCALES } from "../../../../../../src/shared/domain/value-objects/locale/locale.constants.mjs";
2
+ import { faker } from "@faker-js/faker";
3
+ //#region ../../tests/shared/utils/faketories/shared/locale/locale.faketory.ts
4
+ function createFakeLocalizationOptions(localizationOptions = {}) {
5
+ return {
6
+ locale: faker.helpers.arrayElement(LOCALES),
7
+ fallbackLocale: faker.helpers.arrayElement(LOCALES),
8
+ ...localizationOptions
9
+ };
10
+ }
11
+ function createFakeLocalizedText(localizedText = {}) {
12
+ return {
13
+ en: faker.word.sample(),
14
+ de: faker.word.sample(),
15
+ es: faker.word.sample(),
16
+ fr: faker.word.sample(),
17
+ it: faker.word.sample(),
18
+ pt: faker.word.sample(),
19
+ ...localizedText
20
+ };
21
+ }
22
+ function createFakeLocalizedTexts(localizedTexts = {}) {
23
+ return {
24
+ en: faker.word.words(3).split(" "),
25
+ de: faker.word.words(3).split(" "),
26
+ es: faker.word.words(3).split(" "),
27
+ fr: faker.word.words(3).split(" "),
28
+ it: faker.word.words(3).split(" "),
29
+ pt: faker.word.words(3).split(" "),
30
+ ...localizedTexts
31
+ };
32
+ }
33
+ //#endregion
34
+ export { createFakeLocalizationOptions, createFakeLocalizedText, createFakeLocalizedTexts };
35
+
36
+ //# sourceMappingURL=locale.faketory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.faketory.mjs","names":[],"sources":["../../../../../../../../../tests/shared/utils/faketories/shared/locale/locale.faketory.ts"],"sourcesContent":["import { faker } from \"@faker-js/faker\";\n\nimport { LOCALES } from \"@shared/domain/value-objects/locale/locale.constants\";\n\nimport type { LocalizationOptions, LocalizedText, LocalizedTexts } from \"@shared/domain/value-objects/locale/locale.types\";\n\nfunction createFakeLocalizationOptions(localizationOptions: Partial<LocalizationOptions> = {}): LocalizationOptions {\n return {\n locale: faker.helpers.arrayElement(LOCALES),\n fallbackLocale: faker.helpers.arrayElement(LOCALES),\n ...localizationOptions,\n };\n}\n\nfunction createFakeLocalizedText(localizedText: Partial<LocalizedText> = {}): LocalizedText {\n return {\n en: faker.word.sample(),\n de: faker.word.sample(),\n es: faker.word.sample(),\n fr: faker.word.sample(),\n it: faker.word.sample(),\n pt: faker.word.sample(),\n ...localizedText,\n };\n}\n\nfunction createFakeLocalizedTexts(localizedTexts: Partial<LocalizedTexts> = {}): LocalizedTexts {\n return {\n en: faker.word.words(3).split(\" \"),\n de: faker.word.words(3).split(\" \"),\n es: faker.word.words(3).split(\" \"),\n fr: faker.word.words(3).split(\" \"),\n it: faker.word.words(3).split(\" \"),\n pt: faker.word.words(3).split(\" \"),\n ...localizedTexts,\n };\n}\n\nexport {\n createFakeLocalizationOptions,\n createFakeLocalizedText,\n createFakeLocalizedTexts,\n};"],"mappings":";;;AAMA,SAAS,8BAA8B,sBAAoD,CAAC,GAAwB;CAClH,OAAO;EACL,QAAQ,MAAM,QAAQ,aAAa,OAAO;EAC1C,gBAAgB,MAAM,QAAQ,aAAa,OAAO;EAClD,GAAG;CACL;AACF;AAEA,SAAS,wBAAwB,gBAAwC,CAAC,GAAkB;CAC1F,OAAO;EACL,IAAI,MAAM,KAAK,OAAO;EACtB,IAAI,MAAM,KAAK,OAAO;EACtB,IAAI,MAAM,KAAK,OAAO;EACtB,IAAI,MAAM,KAAK,OAAO;EACtB,IAAI,MAAM,KAAK,OAAO;EACtB,IAAI,MAAM,KAAK,OAAO;EACtB,GAAG;CACL;AACF;AAEA,SAAS,yBAAyB,iBAA0C,CAAC,GAAmB;CAC9F,OAAO;EACL,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG;EACjC,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG;EACjC,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG;EACjC,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG;EACjC,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG;EACjC,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG;EACjC,GAAG;CACL;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@goat-it/schemas",
3
3
  "type": "module",
4
- "version": "0.0.16",
4
+ "version": "0.0.17-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,11 +12,12 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@arethetypeswrong/core": "^0.18.5",
15
- "tsdown": "^0.22.7",
15
+ "tsdown": "^0.22.12",
16
16
  "typescript": "^6.0.3",
17
17
  "zod": "^4.4.3"
18
18
  },
19
19
  "peerDependencies": {
20
+ "@faker-js/faker": ">=9",
20
21
  "zod": "^4.4.3"
21
22
  },
22
23
  "publishConfig": {
@@ -48,6 +49,18 @@
48
49
  "./shared/constants": {
49
50
  "types": "./dist/shared/constants/index.d.mts",
50
51
  "import": "./dist/shared/constants/index.mjs"
52
+ },
53
+ "./testing/question": {
54
+ "types": "./dist/testing/question/index.d.mts",
55
+ "import": "./dist/testing/question/index.mjs"
56
+ },
57
+ "./testing/question-theme": {
58
+ "types": "./dist/testing/question-theme/index.d.mts",
59
+ "import": "./dist/testing/question-theme/index.mjs"
60
+ },
61
+ "./testing/shared": {
62
+ "types": "./dist/testing/shared/index.d.mts",
63
+ "import": "./dist/testing/shared/index.mjs"
51
64
  }
52
65
  },
53
66
  "dependencies": {