@purpleschool/gptbot 0.12.2-stage-2 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/controllers/http/blog.ts +0 -2
- package/api/controllers/http/category.ts +0 -2
- package/api/controllers/http/course.ts +0 -8
- package/api/controllers/http/page.ts +0 -2
- package/api/controllers/http/prompt-category.ts +0 -2
- package/api/controllers/http/prompt-topic.ts +0 -2
- package/api/controllers/http/prompt.ts +0 -2
- package/api/controllers/http/question.ts +0 -2
- package/api/controllers/http/team-account.ts +0 -1
- package/api/controllers/http/writer.ts +6 -0
- package/api/routes.ts +20 -46
- package/build/api/controllers/http/blog.js +0 -2
- package/build/api/controllers/http/category.js +0 -2
- package/build/api/controllers/http/course.js +0 -6
- package/build/api/controllers/http/page.js +0 -2
- package/build/api/controllers/http/prompt-category.js +0 -2
- package/build/api/controllers/http/prompt-topic.js +0 -2
- package/build/api/controllers/http/prompt.js +0 -2
- package/build/api/controllers/http/question.js +0 -2
- package/build/api/controllers/http/team-account.js +0 -1
- package/build/api/controllers/http/writer.js +5 -0
- package/build/api/routes.js +10 -23
- package/build/commands/blog/create-post.command.js +0 -6
- package/build/commands/blog/index.js +0 -2
- package/build/commands/blog/update-post.command.js +0 -6
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +12 -1
- package/build/commands/category/create-category.command.js +0 -4
- package/build/commands/category/index.js +0 -2
- package/build/commands/category/update-category.command.js +0 -4
- package/build/commands/course/create-course.command.js +0 -5
- package/build/commands/course/index.js +0 -6
- package/build/commands/page/create-page.command.js +0 -5
- package/build/commands/page/index.js +0 -2
- package/build/commands/page/update-page.command.js +0 -5
- package/build/commands/prompt/create-prompt.command.js +0 -2
- package/build/commands/prompt/index.js +0 -2
- package/build/commands/prompt/update-prompt.command.js +0 -2
- package/build/commands/prompt-category/create-prompt-category.command.js +0 -3
- package/build/commands/prompt-category/index.js +0 -2
- package/build/commands/prompt-category/update-prompt-category.command.js +0 -3
- package/build/commands/prompt-topic/create-prompt-topic.command.js +0 -5
- package/build/commands/prompt-topic/index.js +0 -2
- package/build/commands/prompt-topic/update-prompt-topic.command.js +0 -5
- package/build/commands/question/create-question.command.js +0 -2
- package/build/commands/question/index.js +0 -2
- package/build/commands/question/update-question.command.js +0 -2
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +12 -1
- package/build/commands/team-account/index.js +0 -1
- package/build/commands/tools/presentation/create-presentation.command.js +2 -0
- package/build/commands/tools/presentation/generate-presentation-slides.command.js +3 -0
- package/build/commands/tools/presentation/update-presentation.command.js +1 -0
- package/build/commands/tools/writer/collect-writer-document-sources.command.js +15 -0
- package/build/commands/tools/writer/confirm-source-citation-metadata.command.js +19 -0
- package/build/commands/tools/writer/get-writer-document-sources.command.js +14 -0
- package/build/commands/tools/writer/index.js +4 -0
- package/build/commands/tools/writer/upload-writer-source.command.js +17 -0
- package/build/commands/unregistered-user/patch-locale.command.js +3 -3
- package/build/commands/user/get-me.command.js +1 -2
- package/build/commands/user/patch-locale.command.js +3 -3
- package/build/constants/cabinet/enums/index.js +0 -1
- package/build/constants/presentation/enums/index.js +1 -0
- package/build/constants/presentation/enums/presentation-target-audience.enum.js +10 -0
- package/build/constants/user/enums/index.js +1 -0
- package/build/constants/user/enums/locale.enum.js +8 -0
- package/build/constants/writer/enums/index.js +3 -0
- package/build/constants/writer/enums/writer-document-stage.enum.js +6 -0
- package/build/constants/writer/enums/writer-source-origin.enum.js +8 -0
- package/build/constants/writer/enums/writer-source-status.enum.js +9 -0
- package/build/constants/writer/enums/writer-source-type.enum.js +8 -0
- package/build/models/tools/presentation/index.js +1 -0
- package/build/models/tools/presentation/presentation-template.schema.js +2 -0
- package/build/models/tools/presentation/presentation-title-page.schema.js +9 -0
- package/build/models/tools/presentation/presentation.schema.js +3 -0
- package/build/models/tools/presentation/slide-content-edit.schema.js +36 -24
- package/build/models/tools/presentation/slide-content.schema.js +34 -24
- package/build/models/tools/writer/index.js +2 -0
- package/build/models/tools/writer/writer-document-type.schema.js +2 -0
- package/build/models/tools/writer/writer-document.schema.js +3 -0
- package/build/models/tools/writer/writer-source-bibliographic-metadata.schema.js +27 -0
- package/build/models/tools/writer/writer-source.schema.js +20 -0
- package/build/models/user.schema.js +2 -2
- package/commands/blog/create-post.command.ts +0 -6
- package/commands/blog/index.ts +0 -2
- package/commands/blog/update-post.command.ts +0 -6
- package/commands/cabinet/get-user-statistics-by-month.command.ts +13 -6
- package/commands/category/create-category.command.ts +0 -4
- package/commands/category/index.ts +0 -2
- package/commands/category/update-category.command.ts +0 -4
- package/commands/course/create-course.command.ts +0 -5
- package/commands/course/index.ts +0 -6
- package/commands/page/create-page.command.ts +0 -5
- package/commands/page/index.ts +0 -2
- package/commands/page/update-page.command.ts +0 -5
- package/commands/prompt/create-prompt.command.ts +0 -2
- package/commands/prompt/index.ts +0 -2
- package/commands/prompt/update-prompt.command.ts +0 -2
- package/commands/prompt-category/create-prompt-category.command.ts +0 -3
- package/commands/prompt-category/index.ts +0 -2
- package/commands/prompt-category/update-prompt-category.command.ts +0 -3
- package/commands/prompt-topic/create-prompt-topic.command.ts +0 -5
- package/commands/prompt-topic/index.ts +0 -2
- package/commands/prompt-topic/update-prompt-topic.command.ts +0 -5
- package/commands/question/create-question.command.ts +0 -2
- package/commands/question/index.ts +0 -2
- package/commands/question/update-question.command.ts +0 -2
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +13 -6
- package/commands/team-account/index.ts +0 -1
- package/commands/tools/presentation/create-presentation.command.ts +2 -0
- package/commands/tools/presentation/generate-presentation-slides.command.ts +10 -1
- package/commands/tools/presentation/update-presentation.command.ts +1 -0
- package/commands/tools/writer/collect-writer-document-sources.command.ts +17 -0
- package/commands/tools/writer/confirm-source-citation-metadata.command.ts +21 -0
- package/commands/tools/writer/get-writer-document-sources.command.ts +14 -0
- package/commands/tools/writer/index.ts +4 -0
- package/commands/tools/writer/upload-writer-source.command.ts +19 -0
- package/commands/unregistered-user/patch-locale.command.ts +1 -1
- package/commands/user/get-me.command.ts +1 -2
- package/commands/user/patch-locale.command.ts +1 -1
- package/constants/cabinet/enums/index.ts +0 -1
- package/constants/presentation/enums/index.ts +1 -0
- package/constants/presentation/enums/presentation-target-audience.enum.ts +6 -0
- package/constants/user/enums/index.ts +1 -0
- package/constants/user/enums/locale.enum.ts +4 -0
- package/constants/writer/enums/index.ts +3 -0
- package/constants/writer/enums/writer-document-stage.enum.ts +8 -0
- package/constants/writer/enums/writer-source-origin.enum.ts +4 -0
- package/constants/writer/enums/writer-source-status.enum.ts +5 -0
- package/constants/writer/enums/writer-source-type.enum.ts +4 -0
- package/models/tools/presentation/index.ts +1 -0
- package/models/tools/presentation/presentation-template.schema.ts +2 -0
- package/models/tools/presentation/presentation-title-page.schema.ts +9 -0
- package/models/tools/presentation/presentation.schema.ts +8 -1
- package/models/tools/presentation/slide-content-edit.schema.ts +36 -24
- package/models/tools/presentation/slide-content.schema.ts +50 -40
- package/models/tools/writer/index.ts +2 -0
- package/models/tools/writer/writer-document-type.schema.ts +2 -0
- package/models/tools/writer/writer-document.schema.ts +3 -0
- package/models/tools/writer/writer-source-bibliographic-metadata.schema.ts +31 -0
- package/models/tools/writer/writer-source.schema.ts +20 -0
- package/models/user.schema.ts +1 -1
- package/package.json +1 -2
- package/build/commands/blog/create-post-translation.command.js +0 -25
- package/build/commands/blog/update-post-translation.command.js +0 -24
- package/build/commands/category/create-category-translation.command.js +0 -23
- package/build/commands/category/update-category-translation.command.js +0 -22
- package/build/commands/course/create-course-translation.command.js +0 -24
- package/build/commands/course/create-lesson-translation.command.js +0 -20
- package/build/commands/course/create-section-translation.command.js +0 -20
- package/build/commands/course/update-course-translation.command.js +0 -23
- package/build/commands/course/update-lesson-translation.command.js +0 -19
- package/build/commands/course/update-section-translation.command.js +0 -19
- package/build/commands/page/create-page-translation.command.js +0 -24
- package/build/commands/page/update-page-translation.command.js +0 -23
- package/build/commands/prompt/create-prompt-translation.command.js +0 -21
- package/build/commands/prompt/update-prompt-translation.command.js +0 -20
- package/build/commands/prompt-category/create-prompt-category-translation.command.js +0 -22
- package/build/commands/prompt-category/update-prompt-category-translation.command.js +0 -21
- package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +0 -24
- package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +0 -23
- package/build/commands/question/create-question-translation.command.js +0 -21
- package/build/commands/question/update-question-translation.command.js +0 -20
- package/build/commands/team-account/update-team-account-invite.command.js +0 -17
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +0 -22
- package/commands/blog/create-post-translation.command.ts +0 -30
- package/commands/blog/update-post-translation.command.ts +0 -29
- package/commands/category/create-category-translation.command.ts +0 -28
- package/commands/category/update-category-translation.command.ts +0 -27
- package/commands/course/create-course-translation.command.ts +0 -29
- package/commands/course/create-lesson-translation.command.ts +0 -25
- package/commands/course/create-section-translation.command.ts +0 -25
- package/commands/course/update-course-translation.command.ts +0 -28
- package/commands/course/update-lesson-translation.command.ts +0 -24
- package/commands/course/update-section-translation.command.ts +0 -24
- package/commands/page/create-page-translation.command.ts +0 -29
- package/commands/page/update-page-translation.command.ts +0 -28
- package/commands/prompt/create-prompt-translation.command.ts +0 -26
- package/commands/prompt/update-prompt-translation.command.ts +0 -25
- package/commands/prompt-category/create-prompt-category-translation.command.ts +0 -27
- package/commands/prompt-category/update-prompt-category-translation.command.ts +0 -26
- package/commands/prompt-topic/create-prompt-topic-translation.command.ts +0 -29
- package/commands/prompt-topic/update-prompt-topic-translation.command.ts +0 -28
- package/commands/question/create-question-translation.command.ts +0 -26
- package/commands/question/update-question-translation.command.ts +0 -25
- package/commands/team-account/update-team-account-invite.command.ts +0 -22
- package/constants/cabinet/enums/statistics-request-type.enum.ts +0 -18
|
@@ -10,35 +10,47 @@ const constants_1 = require("../../../constants");
|
|
|
10
10
|
exports.CoverSlideDataUserEditSchema = zod_1.default.object({
|
|
11
11
|
contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
12
12
|
title: zod_1.default.string().max(1000),
|
|
13
|
-
author: zod_1.default
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
author: zod_1.default
|
|
14
|
+
.object({
|
|
15
|
+
label: zod_1.default.string().min(1).max(100),
|
|
16
|
+
value: zod_1.default.string().min(1).max(200),
|
|
17
|
+
})
|
|
18
|
+
.optional(),
|
|
19
|
+
date: zod_1.default
|
|
20
|
+
.object({
|
|
21
|
+
label: zod_1.default.string().min(1).max(100),
|
|
22
|
+
value: zod_1.default.string().min(1).max(200),
|
|
23
|
+
})
|
|
24
|
+
.optional(),
|
|
25
|
+
email: zod_1.default
|
|
26
|
+
.object({
|
|
27
|
+
label: zod_1.default.string().min(1).max(100),
|
|
28
|
+
value: zod_1.default.string().min(1).max(200),
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
25
31
|
version: zod_1.default.literal(1),
|
|
26
32
|
});
|
|
27
33
|
exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
|
|
28
34
|
contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.THANK_YOU),
|
|
29
35
|
title: zod_1.default.string().max(1000),
|
|
30
|
-
author: zod_1.default
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
author: zod_1.default
|
|
37
|
+
.object({
|
|
38
|
+
label: zod_1.default.string().min(1).max(100),
|
|
39
|
+
value: zod_1.default.string().min(1).max(200),
|
|
40
|
+
})
|
|
41
|
+
.optional(),
|
|
42
|
+
date: zod_1.default
|
|
43
|
+
.object({
|
|
44
|
+
label: zod_1.default.string().min(1).max(100),
|
|
45
|
+
value: zod_1.default.string().min(1).max(200),
|
|
46
|
+
})
|
|
47
|
+
.optional(),
|
|
48
|
+
email: zod_1.default
|
|
49
|
+
.object({
|
|
50
|
+
label: zod_1.default.string().min(1).max(100),
|
|
51
|
+
value: zod_1.default.string().min(1).max(200),
|
|
52
|
+
})
|
|
53
|
+
.optional(),
|
|
42
54
|
version: zod_1.default.literal(1),
|
|
43
55
|
});
|
|
44
56
|
exports.TextSlideDataUserEditSchema = zod_1.default.object({
|
|
@@ -24,22 +24,26 @@ exports.IconSlotSchema = zod_1.z.object({
|
|
|
24
24
|
exports.CoverSlideDataSchema = zod_1.z.object({
|
|
25
25
|
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
26
26
|
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
27
|
-
author: zod_1.z
|
|
27
|
+
author: zod_1.z
|
|
28
|
+
.object({
|
|
28
29
|
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
29
|
-
value: zod_1.z
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
value: zod_1.z.string().describe('Author value from titlePage if provided'),
|
|
31
|
+
})
|
|
32
|
+
.optional(),
|
|
33
|
+
date: zod_1.z
|
|
34
|
+
.object({
|
|
34
35
|
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
35
36
|
value: zod_1.z
|
|
36
37
|
.string()
|
|
37
|
-
.describe('Date
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
.describe('Date from titlePage in the "dd month yyyy" format in presentation\'s locale'),
|
|
39
|
+
})
|
|
40
|
+
.optional(),
|
|
41
|
+
email: zod_1.z
|
|
42
|
+
.object({
|
|
43
|
+
label: zod_1.z.string().describe('Localized contact/email label'),
|
|
44
|
+
value: zod_1.z.string().describe('Email value from titlePage if provided'),
|
|
45
|
+
})
|
|
46
|
+
.optional(),
|
|
43
47
|
version: zod_1.z.literal(1),
|
|
44
48
|
});
|
|
45
49
|
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
@@ -49,20 +53,26 @@ exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
|
49
53
|
.describe('"Thank you for your attention" in presentation\'s language')
|
|
50
54
|
.min(10)
|
|
51
55
|
.max(150),
|
|
52
|
-
author: zod_1.z
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
author: zod_1.z
|
|
57
|
+
.object({
|
|
58
|
+
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
59
|
+
value: zod_1.z.string().describe('Author value from titlePage if provided'),
|
|
60
|
+
})
|
|
61
|
+
.optional(),
|
|
62
|
+
date: zod_1.z
|
|
63
|
+
.object({
|
|
64
|
+
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
58
65
|
value: zod_1.z
|
|
59
66
|
.string()
|
|
60
|
-
.describe('Date
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
.describe('Date from titlePage in the "dd month yyyy" format in presentation\'s locale'),
|
|
68
|
+
})
|
|
69
|
+
.optional(),
|
|
70
|
+
email: zod_1.z
|
|
71
|
+
.object({
|
|
72
|
+
label: zod_1.z.string().describe('Localized contact/email label'),
|
|
73
|
+
value: zod_1.z.string().describe('Email value from titlePage if provided'),
|
|
74
|
+
})
|
|
75
|
+
.optional(),
|
|
66
76
|
version: zod_1.z.literal(1),
|
|
67
77
|
});
|
|
68
78
|
exports.StructuredListSlideDataSchema = zod_1.z.object({
|
|
@@ -20,3 +20,5 @@ __exportStar(require("./writer-document-outline.schema"), exports);
|
|
|
20
20
|
__exportStar(require("./writer-document.schema"), exports);
|
|
21
21
|
__exportStar(require("./writer-document-type.schema"), exports);
|
|
22
22
|
__exportStar(require("./writer-document-title-page.schema"), exports);
|
|
23
|
+
__exportStar(require("./writer-source.schema"), exports);
|
|
24
|
+
__exportStar(require("./writer-source-bibliographic-metadata.schema"), exports);
|
|
@@ -10,7 +10,9 @@ exports.WriterDocumentTypeSchema = zod_1.z.object({
|
|
|
10
10
|
order: zod_1.z.number(),
|
|
11
11
|
minPages: zod_1.z.number(),
|
|
12
12
|
maxPages: zod_1.z.number(),
|
|
13
|
+
skipSources: zod_1.z.boolean(),
|
|
13
14
|
pageRange: zod_1.z.array(zod_1.z.number()),
|
|
15
|
+
needsTableOfContents: zod_1.z.boolean(),
|
|
14
16
|
createdAt: zod_1.z.date(),
|
|
15
17
|
updatedAt: zod_1.z.date(),
|
|
16
18
|
});
|
|
@@ -20,6 +20,9 @@ exports.WriterDocumentSchema = zod_1.z.object({
|
|
|
20
20
|
unregisteredUserId: zod_1.z.string().nullable(),
|
|
21
21
|
modelId: zod_1.z.string().nullable(),
|
|
22
22
|
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
23
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
24
|
+
description: zod_1.z.string().nullable(),
|
|
25
|
+
skipSources: zod_1.z.boolean(),
|
|
23
26
|
pages: zod_1.z.number(),
|
|
24
27
|
createdAt: zod_1.z.date(),
|
|
25
28
|
updatedAt: zod_1.z.date(),
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterSourceBibliographicMetadataSchema = exports.WriterSourceBibliographicMetadataJournalArticleSchema = exports.WriterSourceBibliographicMetadataBookSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
exports.WriterSourceBibliographicMetadataBookSchema = zod_1.z.object({
|
|
7
|
+
type: zod_1.z.literal(constants_1.WRITER_SOURCE_TYPE.BOOK),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
authors: zod_1.z.string(),
|
|
10
|
+
year: zod_1.z.number(),
|
|
11
|
+
publicationCity: zod_1.z.string(),
|
|
12
|
+
publisher: zod_1.z.string(),
|
|
13
|
+
pageCount: zod_1.z.number().nullable(),
|
|
14
|
+
});
|
|
15
|
+
exports.WriterSourceBibliographicMetadataJournalArticleSchema = zod_1.z.object({
|
|
16
|
+
type: zod_1.z.literal(constants_1.WRITER_SOURCE_TYPE.JOURNAL_ARTICLE),
|
|
17
|
+
title: zod_1.z.string(),
|
|
18
|
+
authors: zod_1.z.string(),
|
|
19
|
+
year: zod_1.z.number(),
|
|
20
|
+
journalName: zod_1.z.string(),
|
|
21
|
+
issueNumber: zod_1.z.string(),
|
|
22
|
+
pageRange: zod_1.z.string(),
|
|
23
|
+
});
|
|
24
|
+
exports.WriterSourceBibliographicMetadataSchema = zod_1.z.discriminatedUnion('type', [
|
|
25
|
+
exports.WriterSourceBibliographicMetadataBookSchema,
|
|
26
|
+
exports.WriterSourceBibliographicMetadataJournalArticleSchema,
|
|
27
|
+
]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterSourceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const writer_source_bibliographic_metadata_schema_1 = require("./writer-source-bibliographic-metadata.schema");
|
|
7
|
+
exports.WriterSourceSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
query: zod_1.z.string().nullable(),
|
|
10
|
+
url: zod_1.z.string(),
|
|
11
|
+
snippet: zod_1.z.string().nullable(),
|
|
12
|
+
sourceOrigin: zod_1.z.nativeEnum(constants_1.WRITER_SOURCE_ORIGIN),
|
|
13
|
+
documentId: zod_1.z.string().uuid(),
|
|
14
|
+
fileId: zod_1.z.string().nullable(),
|
|
15
|
+
citation: zod_1.z.string().nullable(),
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.WRITER_SOURCE_STATUS),
|
|
17
|
+
bibliographicMetadata: writer_source_bibliographic_metadata_schema_1.WriterSourceBibliographicMetadataSchema.nullable(),
|
|
18
|
+
createdAt: zod_1.z.date(),
|
|
19
|
+
updatedAt: zod_1.z.date(),
|
|
20
|
+
});
|
|
@@ -4,7 +4,7 @@ exports.UserAggregateSchema = exports.UserSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const user_to_subscription_schema_1 = require("./user-to-subscription.schema");
|
|
6
6
|
const user_to_product_schema_1 = require("./user-to-product.schema");
|
|
7
|
-
const
|
|
7
|
+
const constants_1 = require("../constants");
|
|
8
8
|
exports.UserSchema = zod_1.z.object({
|
|
9
9
|
uuid: zod_1.z.string().uuid(),
|
|
10
10
|
email: zod_1.z.string().email(),
|
|
@@ -16,7 +16,7 @@ exports.UserSchema = zod_1.z.object({
|
|
|
16
16
|
restoreTokenHash: zod_1.z.string(),
|
|
17
17
|
tokenBonusBalance: zod_1.z.number(),
|
|
18
18
|
role: zod_1.z.string(),
|
|
19
|
-
locale: zod_1.z.nativeEnum(
|
|
19
|
+
locale: zod_1.z.nativeEnum(constants_1.LOCALE),
|
|
20
20
|
createdAt: zod_1.z.date(),
|
|
21
21
|
updatedAt: zod_1.z.date(),
|
|
22
22
|
deletedAt: zod_1.z.date().nullable(),
|
|
@@ -4,13 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
export namespace CreatePostCommand {
|
|
5
5
|
export const RequestSchema = PostSchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
title: true,
|
|
8
|
-
author: true,
|
|
9
7
|
views: true,
|
|
10
|
-
content: true,
|
|
11
|
-
contentPreview: true,
|
|
12
|
-
metaTitle: true,
|
|
13
|
-
metaDescription: true,
|
|
14
8
|
createdAt: true,
|
|
15
9
|
updatedAt: true,
|
|
16
10
|
});
|
package/commands/blog/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './create-post.command';
|
|
2
|
-
export * from './create-post-translation.command';
|
|
3
2
|
export * from './delete-post.command';
|
|
4
3
|
export * from './find-all-posts.command';
|
|
5
4
|
export * from './find-post-by-alias.command';
|
|
@@ -8,4 +7,3 @@ export * from './find-posts.command';
|
|
|
8
7
|
export * from './get-latest-updates.command';
|
|
9
8
|
export * from './get-posts-count.command';
|
|
10
9
|
export * from './update-post.command';
|
|
11
|
-
export * from './update-post-translation.command';
|
|
@@ -7,12 +7,6 @@ export namespace UpdatePostCommand {
|
|
|
7
7
|
updatedAt: true,
|
|
8
8
|
views: true,
|
|
9
9
|
uuid: true,
|
|
10
|
-
title: true,
|
|
11
|
-
content: true,
|
|
12
|
-
author: true,
|
|
13
|
-
contentPreview: true,
|
|
14
|
-
metaTitle: true,
|
|
15
|
-
metaDescription: true,
|
|
16
10
|
}).partial();
|
|
17
11
|
|
|
18
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
JOB_REQUEST_ORIGIN,
|
|
4
|
-
STATISTICS_METRIC_TYPE,
|
|
5
|
-
STATISTICS_REQUEST_TYPE,
|
|
6
|
-
} from '../../constants';
|
|
2
|
+
import { JOB_REQUEST_ORIGIN, STATISTICS_METRIC_TYPE } from '../../constants';
|
|
7
3
|
|
|
8
4
|
export namespace GetUserStatisticsByMonthCommand {
|
|
9
5
|
export const RequestSchema = z.object({
|
|
@@ -18,7 +14,18 @@ export namespace GetUserStatisticsByMonthCommand {
|
|
|
18
14
|
|
|
19
15
|
export const UserStatisticsByMonthResponseSchema = z.object({
|
|
20
16
|
month: z.string(),
|
|
21
|
-
|
|
17
|
+
total_texts: z.number(),
|
|
18
|
+
total_audios: z.number(),
|
|
19
|
+
total_images: z.number(),
|
|
20
|
+
total_videos: z.number(),
|
|
21
|
+
total_presentations: z.number(),
|
|
22
|
+
total_paraphrases: z.number(),
|
|
23
|
+
writers: z.object({
|
|
24
|
+
total_writers: z.number(),
|
|
25
|
+
total_writer_actions: z.number(),
|
|
26
|
+
}),
|
|
27
|
+
total_video_edits: z.number(),
|
|
28
|
+
total_musics: z.number(),
|
|
22
29
|
});
|
|
23
30
|
|
|
24
31
|
export const ResponseSchema = z.object({
|
|
@@ -4,10 +4,6 @@ import { CategorySchema } from '../../models';
|
|
|
4
4
|
export namespace CreateCategoryCommand {
|
|
5
5
|
export const RequestSchema = CategorySchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
name: true,
|
|
8
|
-
prompt: true,
|
|
9
|
-
placeholder: true,
|
|
10
|
-
seoName: true,
|
|
11
7
|
createdAt: true,
|
|
12
8
|
updatedAt: true,
|
|
13
9
|
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from './create-category.command';
|
|
2
|
-
export * from './create-category-translation.command';
|
|
3
2
|
export * from './delete-category.command';
|
|
4
3
|
export * from './find-category.command';
|
|
5
4
|
export * from './update-category.command';
|
|
6
|
-
export * from './update-category-translation.command';
|
|
@@ -4,11 +4,6 @@ import { CourseSchema } from '../../models';
|
|
|
4
4
|
export namespace CreateCourseCommand {
|
|
5
5
|
export const RequestSchema = CourseSchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
title: true,
|
|
8
|
-
subtitle: true,
|
|
9
|
-
prerequisites: true,
|
|
10
|
-
description: true,
|
|
11
|
-
skills: true,
|
|
12
7
|
createdAt: true,
|
|
13
8
|
updatedAt: true,
|
|
14
9
|
});
|
package/commands/course/index.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
export * from './create-course.command';
|
|
2
|
-
export * from './create-course-translation.command';
|
|
3
|
-
export * from './create-lesson-translation.command';
|
|
4
|
-
export * from './create-section-translation.command';
|
|
5
2
|
export * from './find-course-by-alias.command';
|
|
6
3
|
export * from './find-course-by-uuid.command';
|
|
7
|
-
export * from './update-course-translation.command';
|
|
8
|
-
export * from './update-lesson-translation.command';
|
|
9
|
-
export * from './update-section-translation.command';
|
package/commands/page/index.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './create-page.command';
|
|
2
|
-
export * from './create-page-translation.command';
|
|
3
2
|
export * from './delete-page.command';
|
|
4
3
|
export * from './find-page-by-alias.command';
|
|
5
4
|
export * from './find-pages-by-criteria.command';
|
|
6
5
|
export * from './find-page.command';
|
|
7
6
|
export * from './update-page.command';
|
|
8
|
-
export * from './update-page-translation.command';
|
|
@@ -6,11 +6,6 @@ export namespace UpdatePageCommand {
|
|
|
6
6
|
createdAt: true,
|
|
7
7
|
updatedAt: true,
|
|
8
8
|
uuid: true,
|
|
9
|
-
metaTitle: true,
|
|
10
|
-
metaDescription: true,
|
|
11
|
-
title: true,
|
|
12
|
-
subTitle: true,
|
|
13
|
-
seoTextMd: true,
|
|
14
9
|
}).partial();
|
|
15
10
|
|
|
16
11
|
export type Request = z.infer<typeof RequestSchema>;
|
package/commands/prompt/index.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './create-prompt.command';
|
|
2
|
-
export * from './create-prompt-translation.command';
|
|
3
2
|
export * from './delete-prompt.command';
|
|
4
3
|
export * from './update-prompt.command';
|
|
5
|
-
export * from './update-prompt-translation.command';
|
|
6
4
|
export * from './find-prompt-by-uuid.command';
|
|
7
5
|
export * from './find-all-prompts.command';
|
|
8
6
|
export * from './find-prompts-by-topic.command';
|
|
@@ -4,9 +4,6 @@ import { PromptCategorySchema } from '../../models';
|
|
|
4
4
|
export namespace CreatePromptCategoryCommand {
|
|
5
5
|
export const RequestSchema = PromptCategorySchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
title: true,
|
|
8
|
-
metaTitle: true,
|
|
9
|
-
metaDescription: true,
|
|
10
7
|
createdAt: true,
|
|
11
8
|
updatedAt: true,
|
|
12
9
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './create-prompt-category.command';
|
|
2
|
-
export * from './create-prompt-category-translation.command';
|
|
3
2
|
export * from './delete-prompt-category.command';
|
|
4
3
|
export * from './update-prompt-category.command';
|
|
5
|
-
export * from './update-prompt-category-translation.command';
|
|
6
4
|
export * from './find-all-prompt-categories.command';
|
|
7
5
|
export * from './find-prompt-category-by-alias.command';
|
|
8
6
|
export * from './find-prompt-category-by-uuid.command';
|
|
@@ -4,9 +4,6 @@ import { PromptCategorySchema } from '../../models';
|
|
|
4
4
|
export namespace UpdatePromptCategoryCommand {
|
|
5
5
|
export const RequestSchema = PromptCategorySchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
title: true,
|
|
8
|
-
metaTitle: true,
|
|
9
|
-
metaDescription: true,
|
|
10
7
|
createdAt: true,
|
|
11
8
|
updatedAt: true,
|
|
12
9
|
}).partial();
|
|
@@ -4,11 +4,6 @@ import { PromptTopicSchema } from '../../models';
|
|
|
4
4
|
export namespace CreatePromptTopicCommand {
|
|
5
5
|
export const RequestSchema = PromptTopicSchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
title: true,
|
|
8
|
-
content: true,
|
|
9
|
-
metaTitle: true,
|
|
10
|
-
metaDescription: true,
|
|
11
|
-
seoText: true,
|
|
12
7
|
createdAt: true,
|
|
13
8
|
updatedAt: true,
|
|
14
9
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './create-prompt-topic.command';
|
|
2
|
-
export * from './create-prompt-topic-translation.command';
|
|
3
2
|
export * from './delete-prompt-topic.command';
|
|
4
3
|
export * from './update-prompt-topic.command';
|
|
5
|
-
export * from './update-prompt-topic-translation.command';
|
|
6
4
|
export * from './find-prompt-topic-by-category.command';
|
|
7
5
|
export * from './find-prompt-topic-by-alias.command';
|
|
8
6
|
export * from './find-all-prompt-topics.command';
|
|
@@ -4,11 +4,6 @@ import { PromptTopicSchema } from '../../models';
|
|
|
4
4
|
export namespace UpdatePromptTopicCommand {
|
|
5
5
|
export const RequestSchema = PromptTopicSchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
-
title: true,
|
|
8
|
-
content: true,
|
|
9
|
-
metaTitle: true,
|
|
10
|
-
metaDescription: true,
|
|
11
|
-
seoText: true,
|
|
12
7
|
createdAt: true,
|
|
13
8
|
updatedAt: true,
|
|
14
9
|
}).partial();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from './create-question.command';
|
|
2
|
-
export * from './create-question-translation.command';
|
|
3
2
|
export * from './delete-question.command';
|
|
4
3
|
export * from './find-question.command';
|
|
5
4
|
export * from './update-question.command';
|
|
6
|
-
export * from './update-question-translation.command';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
JOB_REQUEST_ORIGIN,
|
|
4
|
-
STATISTICS_METRIC_TYPE,
|
|
5
|
-
STATISTICS_REQUEST_TYPE,
|
|
6
|
-
} from '../../constants';
|
|
2
|
+
import { JOB_REQUEST_ORIGIN, STATISTICS_METRIC_TYPE } from '../../constants';
|
|
7
3
|
|
|
8
4
|
export namespace GetTeamAccountStatisticsByMonthCommand {
|
|
9
5
|
export const RequestSchema = z.object({
|
|
@@ -19,7 +15,18 @@ export namespace GetTeamAccountStatisticsByMonthCommand {
|
|
|
19
15
|
|
|
20
16
|
export const TeamAccountStatisticsByMonthItemSchema = z.object({
|
|
21
17
|
month: z.string(),
|
|
22
|
-
|
|
18
|
+
total_texts: z.number(),
|
|
19
|
+
total_audios: z.number(),
|
|
20
|
+
total_images: z.number(),
|
|
21
|
+
total_videos: z.number(),
|
|
22
|
+
total_presentations: z.number(),
|
|
23
|
+
total_paraphrases: z.number(),
|
|
24
|
+
writers: z.object({
|
|
25
|
+
total_writers: z.number(),
|
|
26
|
+
total_writer_actions: z.number(),
|
|
27
|
+
}),
|
|
28
|
+
total_video_edits: z.number(),
|
|
29
|
+
total_musics: z.number(),
|
|
23
30
|
});
|
|
24
31
|
|
|
25
32
|
export const ResponseSchema = z.object({
|
|
@@ -2,7 +2,6 @@ export * from './create-team-account.command';
|
|
|
2
2
|
export * from './update-team-account.command';
|
|
3
3
|
export * from './cancel-team-trial-subscription.command';
|
|
4
4
|
export * from './invite-team-account-member.command';
|
|
5
|
-
export * from './update-team-account-invite.command';
|
|
6
5
|
export * from './accept-team-account-invite.command';
|
|
7
6
|
export * from './remove-team-account-member.command';
|
|
8
7
|
export * from './leave-team-account-member.command';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PresentationSchema } from '../../../models/tools/presentation';
|
|
3
|
+
import { PRESENTATION_TARGET_AUDIENCE } from '../../../constants';
|
|
3
4
|
|
|
4
5
|
export namespace CreatePresentationCommand {
|
|
5
6
|
export const RequestSchema = z.object({
|
|
@@ -7,6 +8,7 @@ export namespace CreatePresentationCommand {
|
|
|
7
8
|
slideCount: z.number().min(1).max(20),
|
|
8
9
|
templateId: z.string().uuid(),
|
|
9
10
|
languageId: z.string().uuid(),
|
|
11
|
+
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
10
12
|
});
|
|
11
13
|
|
|
12
14
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
PresentationSchema,
|
|
4
|
+
PresentationTitlePageSchema,
|
|
5
|
+
} from '../../../models/tools/presentation';
|
|
3
6
|
|
|
4
7
|
export namespace GeneratePresentationSlidesCommand {
|
|
5
8
|
export const RequestParamsSchema = z.object({
|
|
6
9
|
uuid: z.string().uuid(),
|
|
7
10
|
});
|
|
8
11
|
|
|
12
|
+
export type Request = z.infer<typeof RequestParamsSchema>;
|
|
13
|
+
|
|
14
|
+
export const RequestSchema = z.object({
|
|
15
|
+
titlePage: PresentationTitlePageSchema.optional().nullable(),
|
|
16
|
+
});
|
|
17
|
+
|
|
9
18
|
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
10
19
|
|
|
11
20
|
export const ResponseSchema = z.object({
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WriterDocumentSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace CollectWriterDocumentSourcesCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestBodySchema = z.object({});
|
|
11
|
+
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: WriterDocumentSchema,
|
|
15
|
+
});
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|