@purpleschool/gptbot-tools 0.4.5-stage-2 → 0.4.7-stage-2
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/build/writer/commands/collect-sources.command.d.ts +2 -0
- package/build/writer/commands/create-writer-document.command.d.ts +2 -0
- package/build/writer/commands/generate-document-contents.command.d.ts +2 -0
- package/build/writer/commands/generate-document-outline.command.d.ts +2 -0
- package/build/writer/commands/index.d.ts +1 -0
- package/build/writer/commands/index.js +1 -0
- package/build/writer/commands/set-reaction-writer-document.command.d.ts +2 -0
- package/build/writer/commands/update-writer-document-favorite.command.d.ts +2 -0
- package/build/writer/commands/update-writer-document-title.command.d.ts +99 -0
- package/build/writer/commands/update-writer-document-title.command.js +20 -0
- package/build/writer/models/writer-document.schema.d.ts +1 -0
- package/build/writer/models/writer-document.schema.js +1 -0
- package/build/writer/queries/find-writer-document-by-uuid.query.d.ts +4 -0
- package/build/writer/queries/find-writer-document-by-uuid.query.js +9 -1
- package/build/writer/queries/find-writer-documents.query.d.ts +2 -0
- package/build/writer/routes/writer.routes.d.ts +1 -0
- package/build/writer/routes/writer.routes.js +1 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export declare namespace CollectWriterDocumentSourcesCommand {
|
|
|
13
13
|
uuid: string;
|
|
14
14
|
prompt: string;
|
|
15
15
|
topic: string;
|
|
16
|
+
title: string | null;
|
|
16
17
|
typeId: string;
|
|
17
18
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
18
19
|
outline: {
|
|
@@ -53,6 +54,7 @@ export declare namespace CollectWriterDocumentSourcesCommand {
|
|
|
53
54
|
uuid: string;
|
|
54
55
|
prompt: string;
|
|
55
56
|
topic: string;
|
|
57
|
+
title: string | null;
|
|
56
58
|
typeId: string;
|
|
57
59
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
58
60
|
outline: {
|
|
@@ -17,6 +17,7 @@ export declare namespace CreateWriterDocumentCommand {
|
|
|
17
17
|
uuid: string;
|
|
18
18
|
prompt: string;
|
|
19
19
|
topic: string;
|
|
20
|
+
title: string | null;
|
|
20
21
|
typeId: string;
|
|
21
22
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
22
23
|
outline: {
|
|
@@ -57,6 +58,7 @@ export declare namespace CreateWriterDocumentCommand {
|
|
|
57
58
|
uuid: string;
|
|
58
59
|
prompt: string;
|
|
59
60
|
topic: string;
|
|
61
|
+
title: string | null;
|
|
60
62
|
typeId: string;
|
|
61
63
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
62
64
|
outline: {
|
|
@@ -16,6 +16,7 @@ export declare namespace GenerateWriterDocumentContentsCommand {
|
|
|
16
16
|
uuid: string;
|
|
17
17
|
prompt: string;
|
|
18
18
|
topic: string;
|
|
19
|
+
title: string | null;
|
|
19
20
|
typeId: string;
|
|
20
21
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
21
22
|
outline: {
|
|
@@ -56,6 +57,7 @@ export declare namespace GenerateWriterDocumentContentsCommand {
|
|
|
56
57
|
uuid: string;
|
|
57
58
|
prompt: string;
|
|
58
59
|
topic: string;
|
|
60
|
+
title: string | null;
|
|
59
61
|
typeId: string;
|
|
60
62
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
61
63
|
outline: {
|
|
@@ -16,6 +16,7 @@ export declare namespace GenerateWriterDocumentOutlineCommand {
|
|
|
16
16
|
uuid: string;
|
|
17
17
|
prompt: string;
|
|
18
18
|
topic: string;
|
|
19
|
+
title: string | null;
|
|
19
20
|
typeId: string;
|
|
20
21
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
21
22
|
outline: {
|
|
@@ -56,6 +57,7 @@ export declare namespace GenerateWriterDocumentOutlineCommand {
|
|
|
56
57
|
uuid: string;
|
|
57
58
|
prompt: string;
|
|
58
59
|
topic: string;
|
|
60
|
+
title: string | null;
|
|
59
61
|
typeId: string;
|
|
60
62
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
61
63
|
outline: {
|
|
@@ -16,6 +16,7 @@ export * from './writer-generate-text.command';
|
|
|
16
16
|
export * from './update-writer-document-contents.command';
|
|
17
17
|
export * from './set-reaction-writer-document.command';
|
|
18
18
|
export * from './update-writer-document-favorite.command';
|
|
19
|
+
export * from './update-writer-document-title.command';
|
|
19
20
|
export * from './collect-sources.command';
|
|
20
21
|
export * from './upload-writer-source.command';
|
|
21
22
|
export * from './confirm-source-citation-metadata.command';
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./writer-generate-text.command"), exports);
|
|
|
32
32
|
__exportStar(require("./update-writer-document-contents.command"), exports);
|
|
33
33
|
__exportStar(require("./set-reaction-writer-document.command"), exports);
|
|
34
34
|
__exportStar(require("./update-writer-document-favorite.command"), exports);
|
|
35
|
+
__exportStar(require("./update-writer-document-title.command"), exports);
|
|
35
36
|
__exportStar(require("./collect-sources.command"), exports);
|
|
36
37
|
__exportStar(require("./upload-writer-source.command"), exports);
|
|
37
38
|
__exportStar(require("./confirm-source-citation-metadata.command"), exports);
|
|
@@ -15,6 +15,7 @@ export declare namespace SetReactionToWriterDocumentCommand {
|
|
|
15
15
|
uuid: string;
|
|
16
16
|
prompt: string;
|
|
17
17
|
topic: string;
|
|
18
|
+
title: string | null;
|
|
18
19
|
typeId: string;
|
|
19
20
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
20
21
|
outline: {
|
|
@@ -55,6 +56,7 @@ export declare namespace SetReactionToWriterDocumentCommand {
|
|
|
55
56
|
uuid: string;
|
|
56
57
|
prompt: string;
|
|
57
58
|
topic: string;
|
|
59
|
+
title: string | null;
|
|
58
60
|
typeId: string;
|
|
59
61
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
60
62
|
outline: {
|
|
@@ -13,6 +13,7 @@ export declare namespace UpdateWriterDocumentFavoriteCommand {
|
|
|
13
13
|
uuid: string;
|
|
14
14
|
prompt: string;
|
|
15
15
|
topic: string;
|
|
16
|
+
title: string | null;
|
|
16
17
|
typeId: string;
|
|
17
18
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
18
19
|
outline: {
|
|
@@ -53,6 +54,7 @@ export declare namespace UpdateWriterDocumentFavoriteCommand {
|
|
|
53
54
|
uuid: string;
|
|
54
55
|
prompt: string;
|
|
55
56
|
topic: string;
|
|
57
|
+
title: string | null;
|
|
56
58
|
typeId: string;
|
|
57
59
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
58
60
|
outline: {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace UpdateWriterDocumentTitleCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodUUID;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
const ResponseSchema: z.ZodObject<{
|
|
11
|
+
isSuccess: z.ZodBoolean;
|
|
12
|
+
data: z.ZodOptional<z.ZodType<{
|
|
13
|
+
uuid: string;
|
|
14
|
+
prompt: string;
|
|
15
|
+
topic: string;
|
|
16
|
+
title: string | null;
|
|
17
|
+
typeId: string;
|
|
18
|
+
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
19
|
+
outline: {
|
|
20
|
+
title: string;
|
|
21
|
+
type: import("..").WRITER_DOCUMENT_SECTION_TYPE;
|
|
22
|
+
subsections?: {
|
|
23
|
+
title: string;
|
|
24
|
+
}[] | null | undefined;
|
|
25
|
+
}[];
|
|
26
|
+
titlePage?: {
|
|
27
|
+
fullName?: string | null | undefined;
|
|
28
|
+
city?: string | null | undefined;
|
|
29
|
+
institution?: string | null | undefined;
|
|
30
|
+
faculty?: string | null | undefined;
|
|
31
|
+
specialty?: string | null | undefined;
|
|
32
|
+
group?: string | null | undefined;
|
|
33
|
+
subject?: string | null | undefined;
|
|
34
|
+
} | null | undefined;
|
|
35
|
+
isTitlePageEnabled: boolean;
|
|
36
|
+
sourceMd: string | null;
|
|
37
|
+
finalMd: string | null;
|
|
38
|
+
userId: string | null;
|
|
39
|
+
unregisteredUserId: string | null;
|
|
40
|
+
modelId: string | null;
|
|
41
|
+
reaction: import("../..").USER_REACTION | null;
|
|
42
|
+
dislikeReason: string | null;
|
|
43
|
+
description: string | null;
|
|
44
|
+
internalError: string | null;
|
|
45
|
+
skipSources: boolean;
|
|
46
|
+
pages: number;
|
|
47
|
+
isDeleted: boolean;
|
|
48
|
+
isFavorite: boolean;
|
|
49
|
+
tokenReservationId?: string | null | undefined;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
completedAt: Date | null;
|
|
53
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
54
|
+
uuid: string;
|
|
55
|
+
prompt: string;
|
|
56
|
+
topic: string;
|
|
57
|
+
title: string | null;
|
|
58
|
+
typeId: string;
|
|
59
|
+
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
60
|
+
outline: {
|
|
61
|
+
title: string;
|
|
62
|
+
type: import("..").WRITER_DOCUMENT_SECTION_TYPE;
|
|
63
|
+
subsections?: {
|
|
64
|
+
title: string;
|
|
65
|
+
}[] | null | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
titlePage?: {
|
|
68
|
+
fullName?: string | null | undefined;
|
|
69
|
+
city?: string | null | undefined;
|
|
70
|
+
institution?: string | null | undefined;
|
|
71
|
+
faculty?: string | null | undefined;
|
|
72
|
+
specialty?: string | null | undefined;
|
|
73
|
+
group?: string | null | undefined;
|
|
74
|
+
subject?: string | null | undefined;
|
|
75
|
+
} | null | undefined;
|
|
76
|
+
isTitlePageEnabled: boolean;
|
|
77
|
+
sourceMd: string | null;
|
|
78
|
+
finalMd: string | null;
|
|
79
|
+
userId: string | null;
|
|
80
|
+
unregisteredUserId: string | null;
|
|
81
|
+
modelId: string | null;
|
|
82
|
+
reaction: import("../..").USER_REACTION | null;
|
|
83
|
+
dislikeReason: string | null;
|
|
84
|
+
description: string | null;
|
|
85
|
+
internalError: string | null;
|
|
86
|
+
skipSources: boolean;
|
|
87
|
+
pages: number;
|
|
88
|
+
isDeleted: boolean;
|
|
89
|
+
isFavorite: boolean;
|
|
90
|
+
tokenReservationId?: string | null | undefined;
|
|
91
|
+
createdAt: Date;
|
|
92
|
+
updatedAt: Date;
|
|
93
|
+
completedAt: Date | null;
|
|
94
|
+
}, unknown>>>;
|
|
95
|
+
code: z.ZodOptional<z.ZodString>;
|
|
96
|
+
message: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
99
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateWriterDocumentTitleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var UpdateWriterDocumentTitleCommand;
|
|
8
|
+
(function (UpdateWriterDocumentTitleCommand) {
|
|
9
|
+
UpdateWriterDocumentTitleCommand.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
uuid: zod_1.z.uuid(),
|
|
12
|
+
userId: zod_1.z.uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
14
|
+
title: zod_1.z.string().trim().min(1).max(40),
|
|
15
|
+
})
|
|
16
|
+
.refine((value) => Boolean(value.userId) !== Boolean(value.unregisteredUserId), {
|
|
17
|
+
message: 'Exactly one user identifier must be provided',
|
|
18
|
+
});
|
|
19
|
+
UpdateWriterDocumentTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.WriterDocumentSchema);
|
|
20
|
+
})(UpdateWriterDocumentTitleCommand || (exports.UpdateWriterDocumentTitleCommand = UpdateWriterDocumentTitleCommand = {}));
|
|
@@ -10,6 +10,7 @@ exports.WriterDocumentSchema = zod_1.z.object({
|
|
|
10
10
|
uuid: zod_1.z.uuid(),
|
|
11
11
|
prompt: zod_1.z.string(),
|
|
12
12
|
topic: zod_1.z.string(),
|
|
13
|
+
title: zod_1.z.string().nullable(),
|
|
13
14
|
typeId: zod_1.z.string(),
|
|
14
15
|
stage: zod_1.z.enum(enums_1.WRITER_DOCUMENT_STAGE),
|
|
15
16
|
outline: writer_document_outline_schema_1.WriterDocumentOutlineSchema,
|
|
@@ -2,6 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare namespace FindWriterDocumentByUuidQueryContract {
|
|
3
3
|
const RequestSchema: z.ZodObject<{
|
|
4
4
|
uuid: z.ZodUUID;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
5
7
|
}, z.core.$strip>;
|
|
6
8
|
type Request = z.infer<typeof RequestSchema>;
|
|
7
9
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -10,6 +12,7 @@ export declare namespace FindWriterDocumentByUuidQueryContract {
|
|
|
10
12
|
uuid: string;
|
|
11
13
|
prompt: string;
|
|
12
14
|
topic: string;
|
|
15
|
+
title: string | null;
|
|
13
16
|
typeId: string;
|
|
14
17
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
15
18
|
outline: {
|
|
@@ -50,6 +53,7 @@ export declare namespace FindWriterDocumentByUuidQueryContract {
|
|
|
50
53
|
uuid: string;
|
|
51
54
|
prompt: string;
|
|
52
55
|
topic: string;
|
|
56
|
+
title: string | null;
|
|
53
57
|
typeId: string;
|
|
54
58
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
55
59
|
outline: {
|
|
@@ -6,6 +6,14 @@ const common_1 = require("../../common");
|
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
var FindWriterDocumentByUuidQueryContract;
|
|
8
8
|
(function (FindWriterDocumentByUuidQueryContract) {
|
|
9
|
-
FindWriterDocumentByUuidQueryContract.RequestSchema = zod_1.z
|
|
9
|
+
FindWriterDocumentByUuidQueryContract.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
uuid: zod_1.z.uuid(),
|
|
12
|
+
userId: zod_1.z.uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
14
|
+
})
|
|
15
|
+
.refine((value) => Boolean(value.userId) !== Boolean(value.unregisteredUserId), {
|
|
16
|
+
message: 'Exactly one user identifier must be provided',
|
|
17
|
+
});
|
|
10
18
|
FindWriterDocumentByUuidQueryContract.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentSchema);
|
|
11
19
|
})(FindWriterDocumentByUuidQueryContract || (exports.FindWriterDocumentByUuidQueryContract = FindWriterDocumentByUuidQueryContract = {}));
|
|
@@ -19,6 +19,7 @@ export declare namespace FindWriterDocumentsQuery {
|
|
|
19
19
|
uuid: string;
|
|
20
20
|
prompt: string;
|
|
21
21
|
topic: string;
|
|
22
|
+
title: string | null;
|
|
22
23
|
typeId: string;
|
|
23
24
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
24
25
|
outline: {
|
|
@@ -64,6 +65,7 @@ export declare namespace FindWriterDocumentsQuery {
|
|
|
64
65
|
uuid: string;
|
|
65
66
|
prompt: string;
|
|
66
67
|
topic: string;
|
|
68
|
+
title: string | null;
|
|
67
69
|
typeId: string;
|
|
68
70
|
stage: import("..").WRITER_DOCUMENT_STAGE;
|
|
69
71
|
outline: {
|
|
@@ -25,4 +25,5 @@ export declare const WRITER_AMQP_ROUTES: {
|
|
|
25
25
|
readonly EXPORT_DOCX: 'tools.writer.export-docx.rpc';
|
|
26
26
|
readonly SET_REACTION: 'tools.writer.set-reaction.rpc';
|
|
27
27
|
readonly UPDATE_FAVORITE: 'tools.writer.update-favorite.rpc';
|
|
28
|
+
readonly UPDATE_TITLE: 'tools.writer.update-title.rpc';
|
|
28
29
|
};
|