@purpleschool/gptbot 0.11.9 → 0.12.0
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/writer.ts +0 -6
- package/api/routes.ts +0 -20
- package/build/api/controllers/http/writer.js +0 -5
- package/build/api/routes.js +0 -10
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +1 -12
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +1 -12
- package/build/commands/tools/presentation/create-presentation.command.js +0 -2
- package/build/commands/tools/presentation/generate-presentation-slides.command.js +0 -3
- package/build/commands/tools/presentation/update-presentation.command.js +0 -1
- package/build/commands/tools/writer/index.js +0 -4
- package/build/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +22 -0
- package/build/constants/presentation/enums/index.js +0 -1
- package/build/constants/writer/enums/index.js +0 -3
- package/build/constants/writer/enums/writer-document-stage.enum.js +0 -6
- package/build/models/tools/presentation/index.js +0 -1
- package/build/models/tools/presentation/presentation-template.schema.js +0 -1
- package/build/models/tools/presentation/presentation.schema.js +0 -3
- package/build/models/tools/presentation/slide-content-edit.schema.js +12 -18
- package/build/models/tools/presentation/slide-content.schema.js +12 -16
- package/build/models/tools/writer/index.js +0 -2
- package/build/models/tools/writer/writer-document-type.schema.js +0 -2
- package/build/models/tools/writer/writer-document.schema.js +0 -3
- package/commands/cabinet/get-user-statistics-by-month.command.ts +6 -13
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +6 -13
- package/commands/tools/presentation/create-presentation.command.ts +0 -2
- package/commands/tools/presentation/generate-presentation-slides.command.ts +1 -10
- package/commands/tools/presentation/update-presentation.command.ts +0 -1
- package/commands/tools/writer/index.ts +0 -4
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-request-type.enum.ts +18 -0
- package/constants/presentation/enums/index.ts +0 -1
- package/constants/writer/enums/index.ts +0 -3
- package/constants/writer/enums/writer-document-stage.enum.ts +0 -8
- package/models/tools/presentation/index.ts +0 -1
- package/models/tools/presentation/presentation-template.schema.ts +0 -1
- package/models/tools/presentation/presentation.schema.ts +1 -8
- package/models/tools/presentation/slide-content-edit.schema.ts +12 -18
- package/models/tools/presentation/slide-content.schema.ts +21 -25
- package/models/tools/writer/index.ts +0 -2
- package/models/tools/writer/writer-document-type.schema.ts +0 -2
- package/models/tools/writer/writer-document.schema.ts +0 -3
- package/package.json +1 -1
- package/build/commands/tools/writer/collect-writer-document-sources.command.js +0 -15
- package/build/commands/tools/writer/confirm-source-citation-metadata.command.js +0 -19
- package/build/commands/tools/writer/get-writer-document-sources.command.js +0 -14
- package/build/commands/tools/writer/upload-writer-source.command.js +0 -17
- package/build/constants/presentation/enums/presentation-target-audience.enum.js +0 -10
- package/build/constants/writer/enums/writer-source-origin.enum.js +0 -8
- package/build/constants/writer/enums/writer-source-status.enum.js +0 -9
- package/build/constants/writer/enums/writer-source-type.enum.js +0 -8
- package/build/models/tools/presentation/presentation-title-page.schema.js +0 -9
- package/build/models/tools/writer/writer-source-bibliographic-metadata.schema.js +0 -27
- package/build/models/tools/writer/writer-source.schema.js +0 -20
- package/commands/tools/writer/collect-writer-document-sources.command.ts +0 -17
- package/commands/tools/writer/confirm-source-citation-metadata.command.ts +0 -21
- package/commands/tools/writer/get-writer-document-sources.command.ts +0 -14
- package/commands/tools/writer/upload-writer-source.command.ts +0 -19
- package/constants/presentation/enums/presentation-target-audience.enum.ts +0 -6
- package/constants/writer/enums/writer-source-origin.enum.ts +0 -4
- package/constants/writer/enums/writer-source-status.enum.ts +0 -5
- package/constants/writer/enums/writer-source-type.enum.ts +0 -4
- package/models/tools/presentation/presentation-title-page.schema.ts +0 -9
- package/models/tools/writer/writer-source-bibliographic-metadata.schema.ts +0 -31
- package/models/tools/writer/writer-source.schema.ts +0 -20
|
@@ -6,11 +6,6 @@ export const WRITER_ROUTES = {
|
|
|
6
6
|
CREATE: 'documents',
|
|
7
7
|
GET_DOCUMENTS: 'documents',
|
|
8
8
|
GET_DOCUMENT: (uuid: string) => `documents/${uuid}`,
|
|
9
|
-
GET_DOCUMENT_SOURCES: (uuid: string) => `documents/${uuid}/sources`,
|
|
10
|
-
COLLECT_SOURCES: (uuid: string) => `documents/${uuid}/sources/collect`,
|
|
11
|
-
UPLOAD_SOURCE: (uuid: string) => `documents/${uuid}/sources/upload`,
|
|
12
|
-
CONFIRM_SOURCE_CITATION_METADATA: (docId: string, sourceId: string) =>
|
|
13
|
-
`documents/${docId}/sources/${sourceId}/confirm`,
|
|
14
9
|
GENERATE_CONTENTS: (uuid: string) => `documents/${uuid}/generate`,
|
|
15
10
|
UPDATE_OUTLINE: (uuid: string) => `documents/${uuid}/outline`,
|
|
16
11
|
UPDATE_TITLE_PAGE: (uuid: string) => `documents/${uuid}/title-page`,
|
|
@@ -25,5 +20,4 @@ export const WRITER_ROUTES = {
|
|
|
25
20
|
GENERATE_TEXT: (uuid: string) => `documents/${uuid}/actions/generate-text`,
|
|
26
21
|
EXPORT_AS_DOCX: (uuid: string) => `documents/${uuid}/export/docx`,
|
|
27
22
|
SET_REACTION: (uuid: string) => `documents/${uuid}/reaction`,
|
|
28
|
-
DISCARD_SOURCE: (uuid: string) => `sources/${uuid}/discard`,
|
|
29
23
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -437,14 +437,6 @@ export const REST_API = {
|
|
|
437
437
|
GET_DOCUMENTS: `${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENTS}`,
|
|
438
438
|
GET_DOCUMENT: (uuid: string) =>
|
|
439
439
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT(uuid)}`,
|
|
440
|
-
GET_DOCUMENT_SOURCES: (uuid: string) =>
|
|
441
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT_SOURCES(uuid)}`,
|
|
442
|
-
COLLECT_SOURCES: (uuid: string) =>
|
|
443
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.COLLECT_SOURCES(uuid)}`,
|
|
444
|
-
UPLOAD_SOURCE: (uuid: string) =>
|
|
445
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPLOAD_SOURCE(uuid)}`,
|
|
446
|
-
CONFIRM_SOURCE_CITATION_METADATA: (docId: string, sourceId: string) =>
|
|
447
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.CONFIRM_SOURCE_CITATION_METADATA(docId, sourceId)}`,
|
|
448
440
|
GENERATE_CONTENTS: (uuid: string) =>
|
|
449
441
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GENERATE_CONTENTS(uuid)}`,
|
|
450
442
|
UPDATE_OUTLINE: (uuid: string) =>
|
|
@@ -472,8 +464,6 @@ export const REST_API = {
|
|
|
472
464
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.EXPORT_AS_DOCX(uuid)}`,
|
|
473
465
|
SET_REACTION: (uuid: string) =>
|
|
474
466
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.SET_REACTION(uuid)}`,
|
|
475
|
-
DISCARD_SOURCE: (uuid: string) =>
|
|
476
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.DISCARD_SOURCE(uuid)}`,
|
|
477
467
|
},
|
|
478
468
|
WRITER_PRIVATE: {
|
|
479
469
|
CONFIG: `${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.CONFIG}`,
|
|
@@ -481,14 +471,6 @@ export const REST_API = {
|
|
|
481
471
|
GET_DOCUMENTS: `${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENTS}`,
|
|
482
472
|
GET_DOCUMENT: (uuid: string) =>
|
|
483
473
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT(uuid)}`,
|
|
484
|
-
GET_DOCUMENT_SOURCES: (uuid: string) =>
|
|
485
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT_SOURCES(uuid)}`,
|
|
486
|
-
COLLECT_SOURCES: (uuid: string) =>
|
|
487
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.COLLECT_SOURCES(uuid)}`,
|
|
488
|
-
UPLOAD_SOURCE: (uuid: string) =>
|
|
489
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPLOAD_SOURCE(uuid)}`,
|
|
490
|
-
CONFIRM_SOURCE_CITATION_METADATA: (docId: string, sourceId: string) =>
|
|
491
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.CONFIRM_SOURCE_CITATION_METADATA(docId, sourceId)}`,
|
|
492
474
|
GENERATE_CONTENTS: (uuid: string) =>
|
|
493
475
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GENERATE_CONTENTS(uuid)}`,
|
|
494
476
|
UPDATE_OUTLINE: (uuid: string) =>
|
|
@@ -516,8 +498,6 @@ export const REST_API = {
|
|
|
516
498
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.EXPORT_AS_DOCX(uuid)}`,
|
|
517
499
|
SET_REACTION: (uuid: string) =>
|
|
518
500
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.SET_REACTION(uuid)}`,
|
|
519
|
-
DISCARD_SOURCE: (uuid: string) =>
|
|
520
|
-
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.DISCARD_SOURCE(uuid)}`,
|
|
521
501
|
},
|
|
522
502
|
VIDEO_PUBLIC: {
|
|
523
503
|
CONFIG: `${ROOT}/${CONTROLLERS.VIDEO_CONTROLLER_PUBLIC}/${CONTROLLERS.VIDEO_ROUTES.CONFIG}`,
|
|
@@ -8,10 +8,6 @@ exports.WRITER_ROUTES = {
|
|
|
8
8
|
CREATE: 'documents',
|
|
9
9
|
GET_DOCUMENTS: 'documents',
|
|
10
10
|
GET_DOCUMENT: (uuid) => `documents/${uuid}`,
|
|
11
|
-
GET_DOCUMENT_SOURCES: (uuid) => `documents/${uuid}/sources`,
|
|
12
|
-
COLLECT_SOURCES: (uuid) => `documents/${uuid}/sources/collect`,
|
|
13
|
-
UPLOAD_SOURCE: (uuid) => `documents/${uuid}/sources/upload`,
|
|
14
|
-
CONFIRM_SOURCE_CITATION_METADATA: (docId, sourceId) => `documents/${docId}/sources/${sourceId}/confirm`,
|
|
15
11
|
GENERATE_CONTENTS: (uuid) => `documents/${uuid}/generate`,
|
|
16
12
|
UPDATE_OUTLINE: (uuid) => `documents/${uuid}/outline`,
|
|
17
13
|
UPDATE_TITLE_PAGE: (uuid) => `documents/${uuid}/title-page`,
|
|
@@ -26,5 +22,4 @@ exports.WRITER_ROUTES = {
|
|
|
26
22
|
GENERATE_TEXT: (uuid) => `documents/${uuid}/actions/generate-text`,
|
|
27
23
|
EXPORT_AS_DOCX: (uuid) => `documents/${uuid}/export/docx`,
|
|
28
24
|
SET_REACTION: (uuid) => `documents/${uuid}/reaction`,
|
|
29
|
-
DISCARD_SOURCE: (uuid) => `sources/${uuid}/discard`,
|
|
30
25
|
};
|
package/build/api/routes.js
CHANGED
|
@@ -381,10 +381,6 @@ exports.REST_API = {
|
|
|
381
381
|
CREATE: `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.CREATE}`,
|
|
382
382
|
GET_DOCUMENTS: `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENTS}`,
|
|
383
383
|
GET_DOCUMENT: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT(uuid)}`,
|
|
384
|
-
GET_DOCUMENT_SOURCES: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT_SOURCES(uuid)}`,
|
|
385
|
-
COLLECT_SOURCES: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.COLLECT_SOURCES(uuid)}`,
|
|
386
|
-
UPLOAD_SOURCE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPLOAD_SOURCE(uuid)}`,
|
|
387
|
-
CONFIRM_SOURCE_CITATION_METADATA: (docId, sourceId) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.CONFIRM_SOURCE_CITATION_METADATA(docId, sourceId)}`,
|
|
388
384
|
GENERATE_CONTENTS: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GENERATE_CONTENTS(uuid)}`,
|
|
389
385
|
UPDATE_OUTLINE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_OUTLINE(uuid)}`,
|
|
390
386
|
UPDATE_TITLE_PAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE_PAGE(uuid)}`,
|
|
@@ -399,17 +395,12 @@ exports.REST_API = {
|
|
|
399
395
|
GENERATE_TEXT: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.GENERATE_TEXT(uuid)}`,
|
|
400
396
|
EXPORT_AS_DOCX: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.EXPORT_AS_DOCX(uuid)}`,
|
|
401
397
|
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.SET_REACTION(uuid)}`,
|
|
402
|
-
DISCARD_SOURCE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.DISCARD_SOURCE(uuid)}`,
|
|
403
398
|
},
|
|
404
399
|
WRITER_PRIVATE: {
|
|
405
400
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.CONFIG}`,
|
|
406
401
|
CREATE: `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.CREATE}`,
|
|
407
402
|
GET_DOCUMENTS: `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENTS}`,
|
|
408
403
|
GET_DOCUMENT: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT(uuid)}`,
|
|
409
|
-
GET_DOCUMENT_SOURCES: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GET_DOCUMENT_SOURCES(uuid)}`,
|
|
410
|
-
COLLECT_SOURCES: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.COLLECT_SOURCES(uuid)}`,
|
|
411
|
-
UPLOAD_SOURCE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPLOAD_SOURCE(uuid)}`,
|
|
412
|
-
CONFIRM_SOURCE_CITATION_METADATA: (docId, sourceId) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.CONFIRM_SOURCE_CITATION_METADATA(docId, sourceId)}`,
|
|
413
404
|
GENERATE_CONTENTS: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GENERATE_CONTENTS(uuid)}`,
|
|
414
405
|
UPDATE_OUTLINE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_OUTLINE(uuid)}`,
|
|
415
406
|
UPDATE_TITLE_PAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE_PAGE(uuid)}`,
|
|
@@ -424,7 +415,6 @@ exports.REST_API = {
|
|
|
424
415
|
GENERATE_TEXT: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.GENERATE_TEXT(uuid)}`,
|
|
425
416
|
EXPORT_AS_DOCX: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.EXPORT_AS_DOCX(uuid)}`,
|
|
426
417
|
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.SET_REACTION(uuid)}`,
|
|
427
|
-
DISCARD_SOURCE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.DISCARD_SOURCE(uuid)}`,
|
|
428
418
|
},
|
|
429
419
|
VIDEO_PUBLIC: {
|
|
430
420
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.VIDEO_CONTROLLER_PUBLIC}/${CONTROLLERS.VIDEO_ROUTES.CONFIG}`,
|
|
@@ -14,18 +14,7 @@ var GetUserStatisticsByMonthCommand;
|
|
|
14
14
|
});
|
|
15
15
|
GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema = zod_1.z.object({
|
|
16
16
|
month: zod_1.z.string(),
|
|
17
|
-
|
|
18
|
-
total_audios: zod_1.z.number(),
|
|
19
|
-
total_images: zod_1.z.number(),
|
|
20
|
-
total_videos: zod_1.z.number(),
|
|
21
|
-
total_presentations: zod_1.z.number(),
|
|
22
|
-
total_paraphrases: zod_1.z.number(),
|
|
23
|
-
writers: zod_1.z.object({
|
|
24
|
-
total_writers: zod_1.z.number(),
|
|
25
|
-
total_writer_actions: zod_1.z.number(),
|
|
26
|
-
}),
|
|
27
|
-
total_video_edits: zod_1.z.number(),
|
|
28
|
-
total_musics: zod_1.z.number(),
|
|
17
|
+
statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
|
|
29
18
|
});
|
|
30
19
|
GetUserStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
|
|
31
20
|
data: zod_1.z.array(GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema),
|
|
@@ -15,18 +15,7 @@ var GetTeamAccountStatisticsByMonthCommand;
|
|
|
15
15
|
});
|
|
16
16
|
GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema = zod_1.z.object({
|
|
17
17
|
month: zod_1.z.string(),
|
|
18
|
-
|
|
19
|
-
total_audios: zod_1.z.number(),
|
|
20
|
-
total_images: zod_1.z.number(),
|
|
21
|
-
total_videos: zod_1.z.number(),
|
|
22
|
-
total_presentations: zod_1.z.number(),
|
|
23
|
-
total_paraphrases: zod_1.z.number(),
|
|
24
|
-
writers: zod_1.z.object({
|
|
25
|
-
total_writers: zod_1.z.number(),
|
|
26
|
-
total_writer_actions: zod_1.z.number(),
|
|
27
|
-
}),
|
|
28
|
-
total_video_edits: zod_1.z.number(),
|
|
29
|
-
total_musics: zod_1.z.number(),
|
|
18
|
+
statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
|
|
30
19
|
});
|
|
31
20
|
GetTeamAccountStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
|
|
32
21
|
data: zod_1.z.array(GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema),
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreatePresentationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const presentation_1 = require("../../../models/tools/presentation");
|
|
6
|
-
const constants_1 = require("../../../constants");
|
|
7
6
|
var CreatePresentationCommand;
|
|
8
7
|
(function (CreatePresentationCommand) {
|
|
9
8
|
CreatePresentationCommand.RequestSchema = zod_1.z.object({
|
|
@@ -11,7 +10,6 @@ var CreatePresentationCommand;
|
|
|
11
10
|
slideCount: zod_1.z.number().min(1).max(20),
|
|
12
11
|
templateId: zod_1.z.string().uuid(),
|
|
13
12
|
languageId: zod_1.z.string().uuid(),
|
|
14
|
-
targetAudience: zod_1.z.nativeEnum(constants_1.PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
15
13
|
});
|
|
16
14
|
CreatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
17
15
|
data: presentation_1.PresentationSchema,
|
|
@@ -8,9 +8,6 @@ var GeneratePresentationSlidesCommand;
|
|
|
8
8
|
GeneratePresentationSlidesCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
9
|
uuid: zod_1.z.string().uuid(),
|
|
10
10
|
});
|
|
11
|
-
GeneratePresentationSlidesCommand.RequestSchema = zod_1.z.object({
|
|
12
|
-
titlePage: presentation_1.PresentationTitlePageSchema.optional().nullable(),
|
|
13
|
-
});
|
|
14
11
|
GeneratePresentationSlidesCommand.ResponseSchema = zod_1.z.object({
|
|
15
12
|
data: presentation_1.PresentationSchema,
|
|
16
13
|
});
|
|
@@ -11,7 +11,6 @@ var UpdatePresentationCommand;
|
|
|
11
11
|
UpdatePresentationCommand.RequestBodySchema = presentation_1.PresentationSchema.pick({
|
|
12
12
|
title: true,
|
|
13
13
|
templateId: true,
|
|
14
|
-
titlePage: true,
|
|
15
14
|
}).partial();
|
|
16
15
|
UpdatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
17
16
|
data: presentation_1.PresentationSchema,
|
|
@@ -32,7 +32,3 @@ __exportStar(require("./writer-fix-errors.command"), exports);
|
|
|
32
32
|
__exportStar(require("./writer-generate-text.command"), exports);
|
|
33
33
|
__exportStar(require("./export-writer-document-as-docx.command"), exports);
|
|
34
34
|
__exportStar(require("./set-reaction.writer-document.command"), exports);
|
|
35
|
-
__exportStar(require("./collect-writer-document-sources.command"), exports);
|
|
36
|
-
__exportStar(require("./get-writer-document-sources.command"), exports);
|
|
37
|
-
__exportStar(require("./upload-writer-source.command"), exports);
|
|
38
|
-
__exportStar(require("./confirm-source-citation-metadata.command"), exports);
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./group-by.enum"), exports);
|
|
18
18
|
__exportStar(require("./statistics-metric-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./statistics-request-type.enum"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STATISTICS_REQUEST_TYPE = void 0;
|
|
4
|
+
var STATISTICS_REQUEST_TYPE;
|
|
5
|
+
(function (STATISTICS_REQUEST_TYPE) {
|
|
6
|
+
STATISTICS_REQUEST_TYPE["IMAGE"] = "IMAGE";
|
|
7
|
+
STATISTICS_REQUEST_TYPE["VIDEO"] = "VIDEO";
|
|
8
|
+
STATISTICS_REQUEST_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
9
|
+
STATISTICS_REQUEST_TYPE["TEXT"] = "TEXT";
|
|
10
|
+
STATISTICS_REQUEST_TYPE["AUDIO"] = "AUDIO";
|
|
11
|
+
STATISTICS_REQUEST_TYPE["PARAPHRASE"] = "PARAPHRASE";
|
|
12
|
+
STATISTICS_REQUEST_TYPE["WRITER"] = "WRITER";
|
|
13
|
+
STATISTICS_REQUEST_TYPE["PRESENTATION_AI_ACTION"] = "PRESENTATION_AI_ACTION";
|
|
14
|
+
STATISTICS_REQUEST_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
|
|
15
|
+
STATISTICS_REQUEST_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
16
|
+
STATISTICS_REQUEST_TYPE["MUSIC"] = "MUSIC";
|
|
17
|
+
STATISTICS_REQUEST_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
|
|
18
|
+
STATISTICS_REQUEST_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
19
|
+
STATISTICS_REQUEST_TYPE["MARKETPLACE_CARD"] = "MARKETPLACE_CARD";
|
|
20
|
+
STATISTICS_REQUEST_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
21
|
+
STATISTICS_REQUEST_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
|
+
})(STATISTICS_REQUEST_TYPE || (exports.STATISTICS_REQUEST_TYPE = STATISTICS_REQUEST_TYPE = {}));
|
|
@@ -23,4 +23,3 @@ __exportStar(require("./slide-image-slot-action.enum"), exports);
|
|
|
23
23
|
__exportStar(require("./presentation-ai-action-type.enum"), exports);
|
|
24
24
|
__exportStar(require("./presentation-ai-action-pricing-type.enum"), exports);
|
|
25
25
|
__exportStar(require("./presentation-ai-action-call-status.enum"), exports);
|
|
26
|
-
__exportStar(require("./presentation-target-audience.enum"), exports);
|
|
@@ -19,6 +19,3 @@ __exportStar(require("./writer-document-stage.enum"), exports);
|
|
|
19
19
|
__exportStar(require("./writer-ai-action-pricing-type.enum"), exports);
|
|
20
20
|
__exportStar(require("./writer-ai-action-type.enum"), exports);
|
|
21
21
|
__exportStar(require("./tool-model-status.enum"), exports);
|
|
22
|
-
__exportStar(require("./writer-source-status.enum"), exports);
|
|
23
|
-
__exportStar(require("./writer-source-origin.enum"), exports);
|
|
24
|
-
__exportStar(require("./writer-source-type.enum"), exports);
|
|
@@ -4,15 +4,9 @@ exports.WRITER_DOCUMENT_STAGE = void 0;
|
|
|
4
4
|
var WRITER_DOCUMENT_STAGE;
|
|
5
5
|
(function (WRITER_DOCUMENT_STAGE) {
|
|
6
6
|
WRITER_DOCUMENT_STAGE["CREATED"] = "CREATED";
|
|
7
|
-
WRITER_DOCUMENT_STAGE["ANALYZING_TOPIC"] = "ANALYZING_TOPIC";
|
|
8
|
-
WRITER_DOCUMENT_STAGE["TOPIC_ANALYZED"] = "TOPIC_ANALYZED";
|
|
9
|
-
WRITER_DOCUMENT_STAGE["TOPIC_ANALYSIS_FAILED"] = "TOPIC_ANALYSIS_FAILED";
|
|
10
7
|
WRITER_DOCUMENT_STAGE["GENERATING_OUTLINE"] = "GENERATING_OUTLINE";
|
|
11
8
|
WRITER_DOCUMENT_STAGE["OUTLINE_GENERATED"] = "OUTLINE_GENERATED";
|
|
12
9
|
WRITER_DOCUMENT_STAGE["OUTLINE_GENERATION_FAILED"] = "OUTLINE_GENERATION_FAILED";
|
|
13
|
-
WRITER_DOCUMENT_STAGE["COLLECTING_SOURCES"] = "COLLECTING_SOURCES";
|
|
14
|
-
WRITER_DOCUMENT_STAGE["SOURCES_COLLECTED"] = "SOURCES_COLLECTED";
|
|
15
|
-
WRITER_DOCUMENT_STAGE["SOURCES_COLLECTION_FAILED"] = "SOURCES_COLLECTION_FAILED";
|
|
16
10
|
WRITER_DOCUMENT_STAGE["GENERATING_CONTENT"] = "GENERATING_CONTENT";
|
|
17
11
|
WRITER_DOCUMENT_STAGE["CONTENT_GENERATED"] = "CONTENT_GENERATED";
|
|
18
12
|
WRITER_DOCUMENT_STAGE["CONTENT_GENERATION_FAILED"] = "CONTENT_GENERATION_FAILED";
|
|
@@ -22,4 +22,3 @@ __exportStar(require("./slide.schema"), exports);
|
|
|
22
22
|
__exportStar(require("./slide-content.schema"), exports);
|
|
23
23
|
__exportStar(require("./presentation-config.schema"), exports);
|
|
24
24
|
__exportStar(require("./presentation-ai-action.schema"), exports);
|
|
25
|
-
__exportStar(require("./presentation-title-page.schema"), exports);
|
|
@@ -5,7 +5,6 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const slide_outline_schema_1 = require("./slide-outline.schema");
|
|
7
7
|
const slide_schema_1 = require("./slide.schema");
|
|
8
|
-
const presentation_title_page_schema_1 = require("./presentation-title-page.schema");
|
|
9
8
|
exports.PresentationSchema = zod_1.z.object({
|
|
10
9
|
uuid: zod_1.z.string().uuid(),
|
|
11
10
|
prompt: zod_1.z.string(),
|
|
@@ -20,8 +19,6 @@ exports.PresentationSchema = zod_1.z.object({
|
|
|
20
19
|
slideCount: zod_1.z.number(),
|
|
21
20
|
lastContentUpdateAt: zod_1.z.date().nullable(),
|
|
22
21
|
lastPptxExportedAt: zod_1.z.date().nullable(),
|
|
23
|
-
titlePage: presentation_title_page_schema_1.PresentationTitlePageSchema.nullable(),
|
|
24
|
-
targetAudience: zod_1.z.nativeEnum(constants_1.PRESENTATION_TARGET_AUDIENCE),
|
|
25
22
|
createdAt: zod_1.z.date(),
|
|
26
23
|
updatedAt: zod_1.z.date(),
|
|
27
24
|
});
|
|
@@ -10,24 +10,18 @@ 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
|
-
|
|
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(),
|
|
13
|
+
author: zod_1.default.object({
|
|
14
|
+
label: zod_1.default.string().max(200),
|
|
15
|
+
value: zod_1.default.string().max(500),
|
|
16
|
+
}),
|
|
17
|
+
date: zod_1.default.object({
|
|
18
|
+
label: zod_1.default.string().max(200),
|
|
19
|
+
value: zod_1.default.string().max(500),
|
|
20
|
+
}),
|
|
21
|
+
email: zod_1.default.object({
|
|
22
|
+
label: zod_1.default.string().max(200),
|
|
23
|
+
value: zod_1.default.string().max(500),
|
|
24
|
+
}),
|
|
31
25
|
version: zod_1.default.literal(1),
|
|
32
26
|
});
|
|
33
27
|
exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
|
|
@@ -24,26 +24,22 @@ 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
|
|
28
|
-
.object({
|
|
27
|
+
author: zod_1.z.object({
|
|
29
28
|
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
30
|
-
value: zod_1.z
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
value: zod_1.z
|
|
30
|
+
.string()
|
|
31
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
32
|
+
}),
|
|
33
|
+
date: zod_1.z.object({
|
|
35
34
|
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
36
35
|
value: zod_1.z
|
|
37
36
|
.string()
|
|
38
|
-
.describe('Date
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.
|
|
43
|
-
|
|
44
|
-
value: zod_1.z.string().describe('Email value from titlePage if provided'),
|
|
45
|
-
})
|
|
46
|
-
.optional(),
|
|
37
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
38
|
+
}),
|
|
39
|
+
email: zod_1.z.object({
|
|
40
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
41
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
42
|
+
}),
|
|
47
43
|
version: zod_1.z.literal(1),
|
|
48
44
|
});
|
|
49
45
|
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
@@ -20,5 +20,3 @@ __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,9 +10,7 @@ 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(),
|
|
14
13
|
pageRange: zod_1.z.array(zod_1.z.number()),
|
|
15
|
-
needsTableOfContents: zod_1.z.boolean(),
|
|
16
14
|
createdAt: zod_1.z.date(),
|
|
17
15
|
updatedAt: zod_1.z.date(),
|
|
18
16
|
});
|
|
@@ -20,9 +20,6 @@ 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(),
|
|
26
23
|
pages: zod_1.z.number(),
|
|
27
24
|
createdAt: zod_1.z.date(),
|
|
28
25
|
updatedAt: zod_1.z.date(),
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
JOB_REQUEST_ORIGIN,
|
|
4
|
+
STATISTICS_METRIC_TYPE,
|
|
5
|
+
STATISTICS_REQUEST_TYPE,
|
|
6
|
+
} from '../../constants';
|
|
3
7
|
|
|
4
8
|
export namespace GetUserStatisticsByMonthCommand {
|
|
5
9
|
export const RequestSchema = z.object({
|
|
@@ -14,18 +18,7 @@ export namespace GetUserStatisticsByMonthCommand {
|
|
|
14
18
|
|
|
15
19
|
export const UserStatisticsByMonthResponseSchema = z.object({
|
|
16
20
|
month: z.string(),
|
|
17
|
-
|
|
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(),
|
|
21
|
+
statistics: z.record(z.nativeEnum(STATISTICS_REQUEST_TYPE), z.number()),
|
|
29
22
|
});
|
|
30
23
|
|
|
31
24
|
export const ResponseSchema = z.object({
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
JOB_REQUEST_ORIGIN,
|
|
4
|
+
STATISTICS_METRIC_TYPE,
|
|
5
|
+
STATISTICS_REQUEST_TYPE,
|
|
6
|
+
} from '../../constants';
|
|
3
7
|
|
|
4
8
|
export namespace GetTeamAccountStatisticsByMonthCommand {
|
|
5
9
|
export const RequestSchema = z.object({
|
|
@@ -15,18 +19,7 @@ export namespace GetTeamAccountStatisticsByMonthCommand {
|
|
|
15
19
|
|
|
16
20
|
export const TeamAccountStatisticsByMonthItemSchema = z.object({
|
|
17
21
|
month: z.string(),
|
|
18
|
-
|
|
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(),
|
|
22
|
+
statistics: z.record(z.nativeEnum(STATISTICS_REQUEST_TYPE), z.number()),
|
|
30
23
|
});
|
|
31
24
|
|
|
32
25
|
export const ResponseSchema = z.object({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PresentationSchema } from '../../../models/tools/presentation';
|
|
3
|
-
import { PRESENTATION_TARGET_AUDIENCE } from '../../../constants';
|
|
4
3
|
|
|
5
4
|
export namespace CreatePresentationCommand {
|
|
6
5
|
export const RequestSchema = z.object({
|
|
@@ -8,7 +7,6 @@ export namespace CreatePresentationCommand {
|
|
|
8
7
|
slideCount: z.number().min(1).max(20),
|
|
9
8
|
templateId: z.string().uuid(),
|
|
10
9
|
languageId: z.string().uuid(),
|
|
11
|
-
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
12
10
|
});
|
|
13
11
|
|
|
14
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PresentationSchema,
|
|
4
|
-
PresentationTitlePageSchema,
|
|
5
|
-
} from '../../../models/tools/presentation';
|
|
2
|
+
import { PresentationSchema } from '../../../models/tools/presentation';
|
|
6
3
|
|
|
7
4
|
export namespace GeneratePresentationSlidesCommand {
|
|
8
5
|
export const RequestParamsSchema = z.object({
|
|
9
6
|
uuid: z.string().uuid(),
|
|
10
7
|
});
|
|
11
8
|
|
|
12
|
-
export type Request = z.infer<typeof RequestParamsSchema>;
|
|
13
|
-
|
|
14
|
-
export const RequestSchema = z.object({
|
|
15
|
-
titlePage: PresentationTitlePageSchema.optional().nullable(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
9
|
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
19
10
|
|
|
20
11
|
export const ResponseSchema = z.object({
|
|
@@ -16,7 +16,3 @@ export * from './writer-fix-errors.command';
|
|
|
16
16
|
export * from './writer-generate-text.command';
|
|
17
17
|
export * from './export-writer-document-as-docx.command';
|
|
18
18
|
export * from './set-reaction.writer-document.command';
|
|
19
|
-
export * from './collect-writer-document-sources.command';
|
|
20
|
-
export * from './get-writer-document-sources.command';
|
|
21
|
-
export * from './upload-writer-source.command';
|
|
22
|
-
export * from './confirm-source-citation-metadata.command';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export enum STATISTICS_REQUEST_TYPE {
|
|
2
|
+
IMAGE = 'IMAGE',
|
|
3
|
+
VIDEO = 'VIDEO',
|
|
4
|
+
PRESENTATION = 'PRESENTATION',
|
|
5
|
+
TEXT = 'TEXT',
|
|
6
|
+
AUDIO = 'AUDIO',
|
|
7
|
+
PARAPHRASE = 'PARAPHRASE',
|
|
8
|
+
WRITER = 'WRITER',
|
|
9
|
+
PRESENTATION_AI_ACTION = 'PRESENTATION_AI_ACTION',
|
|
10
|
+
WRITER_ACTION = 'WRITER_ACTION',
|
|
11
|
+
VIDEO_EDITOR = 'VIDEO_EDITOR',
|
|
12
|
+
MUSIC = 'MUSIC',
|
|
13
|
+
MUSIC_ACTION = 'MUSIC_ACTION',
|
|
14
|
+
INTERIOR_DESIGN = 'INTERIOR_DESIGN',
|
|
15
|
+
MARKETPLACE_CARD = 'MARKETPLACE_CARD',
|
|
16
|
+
SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
|
|
17
|
+
SPELL_CORRECTOR = 'SPELL_CORRECTOR',
|
|
18
|
+
}
|
|
@@ -7,4 +7,3 @@ export * from './slide-image-slot-action.enum';
|
|
|
7
7
|
export * from './presentation-ai-action-type.enum';
|
|
8
8
|
export * from './presentation-ai-action-pricing-type.enum';
|
|
9
9
|
export * from './presentation-ai-action-call-status.enum';
|
|
10
|
-
export * from './presentation-target-audience.enum';
|
|
@@ -3,6 +3,3 @@ export * from './writer-document-stage.enum';
|
|
|
3
3
|
export * from './writer-ai-action-pricing-type.enum';
|
|
4
4
|
export * from './writer-ai-action-type.enum';
|
|
5
5
|
export * from './tool-model-status.enum';
|
|
6
|
-
export * from './writer-source-status.enum';
|
|
7
|
-
export * from './writer-source-origin.enum';
|
|
8
|
-
export * from './writer-source-type.enum';
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
export enum WRITER_DOCUMENT_STAGE {
|
|
2
2
|
CREATED = 'CREATED',
|
|
3
3
|
|
|
4
|
-
ANALYZING_TOPIC = 'ANALYZING_TOPIC',
|
|
5
|
-
TOPIC_ANALYZED = 'TOPIC_ANALYZED',
|
|
6
|
-
TOPIC_ANALYSIS_FAILED = 'TOPIC_ANALYSIS_FAILED',
|
|
7
|
-
|
|
8
4
|
GENERATING_OUTLINE = 'GENERATING_OUTLINE',
|
|
9
5
|
OUTLINE_GENERATED = 'OUTLINE_GENERATED',
|
|
10
6
|
OUTLINE_GENERATION_FAILED = 'OUTLINE_GENERATION_FAILED',
|
|
11
7
|
|
|
12
|
-
COLLECTING_SOURCES = 'COLLECTING_SOURCES',
|
|
13
|
-
SOURCES_COLLECTED = 'SOURCES_COLLECTED',
|
|
14
|
-
SOURCES_COLLECTION_FAILED = 'SOURCES_COLLECTION_FAILED',
|
|
15
|
-
|
|
16
8
|
GENERATING_CONTENT = 'GENERATING_CONTENT',
|
|
17
9
|
CONTENT_GENERATED = 'CONTENT_GENERATED',
|
|
18
10
|
CONTENT_GENERATION_FAILED = 'CONTENT_GENERATION_FAILED',
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PRESENTATION_STAGE,
|
|
4
|
-
PRESENTATION_TARGET_AUDIENCE,
|
|
5
|
-
USER_REACTION,
|
|
6
|
-
} from '../../../constants';
|
|
2
|
+
import { PRESENTATION_STAGE, USER_REACTION } from '../../../constants';
|
|
7
3
|
import { SlideOutlineSchema } from './slide-outline.schema';
|
|
8
4
|
import { SlideSchema } from './slide.schema';
|
|
9
|
-
import { PresentationTitlePageSchema } from './presentation-title-page.schema';
|
|
10
5
|
|
|
11
6
|
export const PresentationSchema = z.object({
|
|
12
7
|
uuid: z.string().uuid(),
|
|
@@ -22,8 +17,6 @@ export const PresentationSchema = z.object({
|
|
|
22
17
|
slideCount: z.number(),
|
|
23
18
|
lastContentUpdateAt: z.date().nullable(),
|
|
24
19
|
lastPptxExportedAt: z.date().nullable(),
|
|
25
|
-
titlePage: PresentationTitlePageSchema.nullable(),
|
|
26
|
-
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE),
|
|
27
20
|
createdAt: z.date(),
|
|
28
21
|
updatedAt: z.date(),
|
|
29
22
|
});
|
|
@@ -19,24 +19,18 @@ import { SLIDE_CONTENT_TYPE } from '../../../constants';
|
|
|
19
19
|
export const CoverSlideDataUserEditSchema = z.object({
|
|
20
20
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
21
21
|
title: z.string().max(1000),
|
|
22
|
-
author: z
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
email: z
|
|
35
|
-
.object({
|
|
36
|
-
label: z.string().min(1).max(100),
|
|
37
|
-
value: z.string().min(1).max(200),
|
|
38
|
-
})
|
|
39
|
-
.optional(),
|
|
22
|
+
author: z.object({
|
|
23
|
+
label: z.string().max(200),
|
|
24
|
+
value: z.string().max(500),
|
|
25
|
+
}),
|
|
26
|
+
date: z.object({
|
|
27
|
+
label: z.string().max(200),
|
|
28
|
+
value: z.string().max(500),
|
|
29
|
+
}),
|
|
30
|
+
email: z.object({
|
|
31
|
+
label: z.string().max(200),
|
|
32
|
+
value: z.string().max(500),
|
|
33
|
+
}),
|
|
40
34
|
version: z.literal(1),
|
|
41
35
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
42
36
|
|
|
@@ -26,9 +26,9 @@ export type IconSlot = z.infer<typeof IconSlotSchema>;
|
|
|
26
26
|
export interface ICoverSlideDataStructure {
|
|
27
27
|
contentType: SLIDE_CONTENT_TYPE.COVER;
|
|
28
28
|
title: string;
|
|
29
|
-
author
|
|
30
|
-
date
|
|
31
|
-
email
|
|
29
|
+
author: { label: string; value: string };
|
|
30
|
+
date: { label: string; value: string };
|
|
31
|
+
email: { label: string; value: string };
|
|
32
32
|
version: 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -125,28 +125,24 @@ export interface ITimelineSlideDataStructure {
|
|
|
125
125
|
export const CoverSlideDataSchema = z.object({
|
|
126
126
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
127
127
|
title: z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
128
|
-
author: z
|
|
129
|
-
.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
date: z
|
|
135
|
-
.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
label: z.string().describe('Localized contact/email label'),
|
|
147
|
-
value: z.string().describe('Email value from titlePage if provided'),
|
|
148
|
-
})
|
|
149
|
-
.optional(),
|
|
128
|
+
author: z.object({
|
|
129
|
+
label: z.string().describe('Literal "Author" in presentation\'s language'),
|
|
130
|
+
value: z
|
|
131
|
+
.string()
|
|
132
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
133
|
+
}),
|
|
134
|
+
date: z.object({
|
|
135
|
+
label: z.string().describe('Literal "Date" in presentation\'s language'),
|
|
136
|
+
value: z
|
|
137
|
+
.string()
|
|
138
|
+
.describe(
|
|
139
|
+
'Date of the presentation in the "dd month yyyy" format in presentation\'s locale',
|
|
140
|
+
),
|
|
141
|
+
}),
|
|
142
|
+
email: z.object({
|
|
143
|
+
label: z.string().describe('Just default word "Email"'),
|
|
144
|
+
value: z.string().describe('Just default "email@example.com"'),
|
|
145
|
+
}),
|
|
150
146
|
version: z.literal(1),
|
|
151
147
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
152
148
|
export type CoverSlideData = z.infer<typeof CoverSlideDataSchema>;
|
|
@@ -4,5 +4,3 @@ export * from './writer-document-outline.schema';
|
|
|
4
4
|
export * from './writer-document.schema';
|
|
5
5
|
export * from './writer-document-type.schema';
|
|
6
6
|
export * from './writer-document-title-page.schema';
|
|
7
|
-
export * from './writer-source.schema';
|
|
8
|
-
export * from './writer-source-bibliographic-metadata.schema';
|
|
@@ -8,9 +8,7 @@ export const WriterDocumentTypeSchema = z.object({
|
|
|
8
8
|
order: z.number(),
|
|
9
9
|
minPages: z.number(),
|
|
10
10
|
maxPages: z.number(),
|
|
11
|
-
skipSources: z.boolean(),
|
|
12
11
|
pageRange: z.array(z.number()),
|
|
13
|
-
needsTableOfContents: z.boolean(),
|
|
14
12
|
createdAt: z.date(),
|
|
15
13
|
updatedAt: z.date(),
|
|
16
14
|
});
|
|
@@ -18,9 +18,6 @@ export const WriterDocumentSchema = z.object({
|
|
|
18
18
|
unregisteredUserId: z.string().nullable(),
|
|
19
19
|
modelId: z.string().nullable(),
|
|
20
20
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
21
|
-
dislikeReason: z.string().nullable(),
|
|
22
|
-
description: z.string().nullable(),
|
|
23
|
-
skipSources: z.boolean(),
|
|
24
21
|
pages: z.number(),
|
|
25
22
|
createdAt: z.date(),
|
|
26
23
|
updatedAt: z.date(),
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CollectWriterDocumentSourcesCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
var CollectWriterDocumentSourcesCommand;
|
|
7
|
-
(function (CollectWriterDocumentSourcesCommand) {
|
|
8
|
-
CollectWriterDocumentSourcesCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
CollectWriterDocumentSourcesCommand.RequestBodySchema = zod_1.z.object({});
|
|
12
|
-
CollectWriterDocumentSourcesCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
-
data: models_1.WriterDocumentSchema,
|
|
14
|
-
});
|
|
15
|
-
})(CollectWriterDocumentSourcesCommand || (exports.CollectWriterDocumentSourcesCommand = CollectWriterDocumentSourcesCommand = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfirmSourceCitationMetadataCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
const models_2 = require("../../../models");
|
|
7
|
-
var ConfirmSourceCitationMetadataCommand;
|
|
8
|
-
(function (ConfirmSourceCitationMetadataCommand) {
|
|
9
|
-
ConfirmSourceCitationMetadataCommand.RequestParamsSchema = zod_1.z.object({
|
|
10
|
-
docId: zod_1.z.string().uuid(),
|
|
11
|
-
sourceId: zod_1.z.string().uuid(),
|
|
12
|
-
});
|
|
13
|
-
ConfirmSourceCitationMetadataCommand.RequestBodySchema = zod_1.z.object({
|
|
14
|
-
bibliographicMetadata: models_2.WriterSourceBibliographicMetadataSchema,
|
|
15
|
-
});
|
|
16
|
-
ConfirmSourceCitationMetadataCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
data: models_1.WriterSourceSchema,
|
|
18
|
-
});
|
|
19
|
-
})(ConfirmSourceCitationMetadataCommand || (exports.ConfirmSourceCitationMetadataCommand = ConfirmSourceCitationMetadataCommand = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetWriterDocumentSourcesCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
var GetWriterDocumentSourcesCommand;
|
|
7
|
-
(function (GetWriterDocumentSourcesCommand) {
|
|
8
|
-
GetWriterDocumentSourcesCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
GetWriterDocumentSourcesCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
-
data: zod_1.z.array(models_1.WriterSourceSchema),
|
|
13
|
-
});
|
|
14
|
-
})(GetWriterDocumentSourcesCommand || (exports.GetWriterDocumentSourcesCommand = GetWriterDocumentSourcesCommand = {}));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UploadWriterSourceCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../models");
|
|
6
|
-
var UploadWriterSourceCommand;
|
|
7
|
-
(function (UploadWriterSourceCommand) {
|
|
8
|
-
UploadWriterSourceCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
UploadWriterSourceCommand.RequestBodySchema = zod_1.z.object({
|
|
12
|
-
fileId: zod_1.z.string().uuid(),
|
|
13
|
-
});
|
|
14
|
-
UploadWriterSourceCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
-
data: models_1.WriterSourceSchema,
|
|
16
|
-
});
|
|
17
|
-
})(UploadWriterSourceCommand || (exports.UploadWriterSourceCommand = UploadWriterSourceCommand = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRESENTATION_TARGET_AUDIENCE = void 0;
|
|
4
|
-
var PRESENTATION_TARGET_AUDIENCE;
|
|
5
|
-
(function (PRESENTATION_TARGET_AUDIENCE) {
|
|
6
|
-
PRESENTATION_TARGET_AUDIENCE["NONE"] = "NONE";
|
|
7
|
-
PRESENTATION_TARGET_AUDIENCE["SCHOOL"] = "SCHOOL";
|
|
8
|
-
PRESENTATION_TARGET_AUDIENCE["UNIVERSITY"] = "UNIVERSITY";
|
|
9
|
-
PRESENTATION_TARGET_AUDIENCE["BUSINESS"] = "BUSINESS";
|
|
10
|
-
})(PRESENTATION_TARGET_AUDIENCE || (exports.PRESENTATION_TARGET_AUDIENCE = PRESENTATION_TARGET_AUDIENCE = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WRITER_SOURCE_ORIGIN = void 0;
|
|
4
|
-
var WRITER_SOURCE_ORIGIN;
|
|
5
|
-
(function (WRITER_SOURCE_ORIGIN) {
|
|
6
|
-
WRITER_SOURCE_ORIGIN["WEB_SEARCH"] = "WEB_SEARCH";
|
|
7
|
-
WRITER_SOURCE_ORIGIN["USER_UPLOAD"] = "USER_UPLOAD";
|
|
8
|
-
})(WRITER_SOURCE_ORIGIN || (exports.WRITER_SOURCE_ORIGIN = WRITER_SOURCE_ORIGIN = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WRITER_SOURCE_STATUS = void 0;
|
|
4
|
-
var WRITER_SOURCE_STATUS;
|
|
5
|
-
(function (WRITER_SOURCE_STATUS) {
|
|
6
|
-
WRITER_SOURCE_STATUS["READY"] = "READY";
|
|
7
|
-
WRITER_SOURCE_STATUS["REQUIRES_CITATION_METADATA_CONFIRMATION"] = "REQUIRES_CITATION_METADATA_CONFIRMATION";
|
|
8
|
-
WRITER_SOURCE_STATUS["DISCARDED"] = "DISCARDED";
|
|
9
|
-
})(WRITER_SOURCE_STATUS || (exports.WRITER_SOURCE_STATUS = WRITER_SOURCE_STATUS = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WRITER_SOURCE_TYPE = void 0;
|
|
4
|
-
var WRITER_SOURCE_TYPE;
|
|
5
|
-
(function (WRITER_SOURCE_TYPE) {
|
|
6
|
-
WRITER_SOURCE_TYPE["JOURNAL_ARTICLE"] = "JOURNAL_ARTICLE";
|
|
7
|
-
WRITER_SOURCE_TYPE["BOOK"] = "BOOK";
|
|
8
|
-
})(WRITER_SOURCE_TYPE || (exports.WRITER_SOURCE_TYPE = WRITER_SOURCE_TYPE = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PresentationTitlePageSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.PresentationTitlePageSchema = zod_1.z.object({
|
|
6
|
-
author: zod_1.z.string().optional().nullable(),
|
|
7
|
-
createdAt: zod_1.z.coerce.date().optional().nullable(),
|
|
8
|
-
email: zod_1.z.string().email().optional().nullable(),
|
|
9
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
]);
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { WriterSourceSchema } from '../../../models';
|
|
3
|
-
import { WriterSourceBibliographicMetadataSchema } from '../../../models';
|
|
4
|
-
|
|
5
|
-
export namespace ConfirmSourceCitationMetadataCommand {
|
|
6
|
-
export const RequestParamsSchema = z.object({
|
|
7
|
-
docId: z.string().uuid(),
|
|
8
|
-
sourceId: z.string().uuid(),
|
|
9
|
-
});
|
|
10
|
-
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
11
|
-
|
|
12
|
-
export const RequestBodySchema = z.object({
|
|
13
|
-
bibliographicMetadata: WriterSourceBibliographicMetadataSchema,
|
|
14
|
-
});
|
|
15
|
-
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
16
|
-
|
|
17
|
-
export const ResponseSchema = z.object({
|
|
18
|
-
data: WriterSourceSchema,
|
|
19
|
-
});
|
|
20
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { WriterSourceSchema } from '../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GetWriterDocumentSourcesCommand {
|
|
5
|
-
export const RequestParamsSchema = z.object({
|
|
6
|
-
uuid: z.string().uuid(),
|
|
7
|
-
});
|
|
8
|
-
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
|
-
|
|
10
|
-
export const ResponseSchema = z.object({
|
|
11
|
-
data: z.array(WriterSourceSchema),
|
|
12
|
-
});
|
|
13
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { WriterSourceSchema } from '../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace UploadWriterSourceCommand {
|
|
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
|
-
fileId: z.string().uuid(),
|
|
12
|
-
});
|
|
13
|
-
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
14
|
-
|
|
15
|
-
export const ResponseSchema = z.object({
|
|
16
|
-
data: WriterSourceSchema,
|
|
17
|
-
});
|
|
18
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const PresentationTitlePageSchema = z.object({
|
|
4
|
-
author: z.string().optional().nullable(),
|
|
5
|
-
createdAt: z.coerce.date().optional().nullable(),
|
|
6
|
-
email: z.string().email().optional().nullable(),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type PresentationTitlePage = z.infer<typeof PresentationTitlePageSchema>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { WRITER_SOURCE_TYPE } from '../../../constants';
|
|
3
|
-
|
|
4
|
-
export const WriterSourceBibliographicMetadataBookSchema = z.object({
|
|
5
|
-
type: z.literal(WRITER_SOURCE_TYPE.BOOK),
|
|
6
|
-
title: z.string(),
|
|
7
|
-
authors: z.string(),
|
|
8
|
-
year: z.number(),
|
|
9
|
-
publicationCity: z.string(),
|
|
10
|
-
publisher: z.string(),
|
|
11
|
-
pageCount: z.number().nullable(),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export const WriterSourceBibliographicMetadataJournalArticleSchema = z.object({
|
|
15
|
-
type: z.literal(WRITER_SOURCE_TYPE.JOURNAL_ARTICLE),
|
|
16
|
-
title: z.string(),
|
|
17
|
-
authors: z.string(),
|
|
18
|
-
year: z.number(),
|
|
19
|
-
journalName: z.string(),
|
|
20
|
-
issueNumber: z.string(),
|
|
21
|
-
pageRange: z.string(),
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const WriterSourceBibliographicMetadataSchema = z.discriminatedUnion('type', [
|
|
25
|
-
WriterSourceBibliographicMetadataBookSchema,
|
|
26
|
-
WriterSourceBibliographicMetadataJournalArticleSchema,
|
|
27
|
-
]);
|
|
28
|
-
|
|
29
|
-
export type WriterSourceBibliographicMetadata = z.infer<
|
|
30
|
-
typeof WriterSourceBibliographicMetadataSchema
|
|
31
|
-
>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { WRITER_SOURCE_STATUS, WRITER_SOURCE_ORIGIN } from '../../../constants';
|
|
3
|
-
import { WriterSourceBibliographicMetadataSchema } from './writer-source-bibliographic-metadata.schema';
|
|
4
|
-
|
|
5
|
-
export const WriterSourceSchema = z.object({
|
|
6
|
-
uuid: z.string().uuid(),
|
|
7
|
-
query: z.string().nullable(),
|
|
8
|
-
url: z.string(),
|
|
9
|
-
snippet: z.string().nullable(),
|
|
10
|
-
sourceOrigin: z.nativeEnum(WRITER_SOURCE_ORIGIN),
|
|
11
|
-
documentId: z.string().uuid(),
|
|
12
|
-
fileId: z.string().nullable(),
|
|
13
|
-
citation: z.string().nullable(),
|
|
14
|
-
status: z.nativeEnum(WRITER_SOURCE_STATUS),
|
|
15
|
-
bibliographicMetadata: WriterSourceBibliographicMetadataSchema.nullable(),
|
|
16
|
-
createdAt: z.date(),
|
|
17
|
-
updatedAt: z.date(),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export type WriterSource = z.infer<typeof WriterSourceSchema>;
|