@purpleschool/gptbot 0.18.5-stage-2 → 0.18.6-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/api/controllers/http/writer.d.ts +1 -0
- package/build/api/controllers/http/writer.js +1 -0
- package/build/api/routes.d.ts +2 -0
- package/build/api/routes.js +2 -0
- package/build/commands/tools/writer/collect-writer-document-sources.command.d.ts +1 -0
- package/build/commands/tools/writer/create-writer-document.command.d.ts +1 -0
- package/build/commands/tools/writer/find-writer-document-by-uuid.command.d.ts +1 -0
- package/build/commands/tools/writer/find-writer-documents.command.d.ts +1 -0
- package/build/commands/tools/writer/generate-writer-document-contents.command.d.ts +1 -0
- package/build/commands/tools/writer/index.d.ts +1 -0
- package/build/commands/tools/writer/index.js +1 -0
- package/build/commands/tools/writer/set-reaction.writer-document.command.d.ts +1 -0
- package/build/commands/tools/writer/update-writer-document-favorite.command.d.ts +1 -0
- package/build/commands/tools/writer/update-writer-document-title.command.d.ts +53 -0
- package/build/commands/tools/writer/update-writer-document-title.command.js +11 -0
- package/build/models/tools/writer/writer-document.schema.d.ts +1 -0
- package/build/models/tools/writer/writer-document.schema.js +1 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export declare const WRITER_ROUTES: {
|
|
|
13
13
|
readonly UPDATE_OUTLINE: (uuid: string) => string;
|
|
14
14
|
readonly UPDATE_TITLE_PAGE: (uuid: string) => string;
|
|
15
15
|
readonly UPDATE_FAVORITE: (uuid: string) => string;
|
|
16
|
+
readonly UPDATE_TITLE: (uuid: string) => string;
|
|
16
17
|
readonly TOGGLE_TITLE_PAGE: (uuid: string) => string;
|
|
17
18
|
readonly DELETE_DOCUMENT: (uuid: string) => string;
|
|
18
19
|
readonly UPDATE_CONTENTS: (uuid: string) => string;
|
|
@@ -16,6 +16,7 @@ exports.WRITER_ROUTES = {
|
|
|
16
16
|
UPDATE_OUTLINE: (uuid) => `documents/${uuid}/outline`,
|
|
17
17
|
UPDATE_TITLE_PAGE: (uuid) => `documents/${uuid}/title-page`,
|
|
18
18
|
UPDATE_FAVORITE: (uuid) => `documents/${uuid}/favorite`,
|
|
19
|
+
UPDATE_TITLE: (uuid) => `documents/${uuid}/title`,
|
|
19
20
|
TOGGLE_TITLE_PAGE: (uuid) => `documents/${uuid}/title-page/toggle`,
|
|
20
21
|
DELETE_DOCUMENT: (uuid) => `documents/${uuid}`,
|
|
21
22
|
UPDATE_CONTENTS: (uuid) => `documents/${uuid}/contents`,
|
package/build/api/routes.d.ts
CHANGED
|
@@ -533,6 +533,7 @@ export declare const REST_API: {
|
|
|
533
533
|
readonly UPDATE_OUTLINE: (uuid: string) => string;
|
|
534
534
|
readonly UPDATE_TITLE_PAGE: (uuid: string) => string;
|
|
535
535
|
readonly UPDATE_FAVORITE: (uuid: string) => string;
|
|
536
|
+
readonly UPDATE_TITLE: (uuid: string) => string;
|
|
536
537
|
readonly TOGGLE_TITLE_PAGE: (uuid: string) => string;
|
|
537
538
|
readonly DELETE_DOCUMENT: (uuid: string) => string;
|
|
538
539
|
readonly UPDATE_CONTENTS: (uuid: string) => string;
|
|
@@ -559,6 +560,7 @@ export declare const REST_API: {
|
|
|
559
560
|
readonly UPDATE_OUTLINE: (uuid: string) => string;
|
|
560
561
|
readonly UPDATE_TITLE_PAGE: (uuid: string) => string;
|
|
561
562
|
readonly UPDATE_FAVORITE: (uuid: string) => string;
|
|
563
|
+
readonly UPDATE_TITLE: (uuid: string) => string;
|
|
562
564
|
readonly TOGGLE_TITLE_PAGE: (uuid: string) => string;
|
|
563
565
|
readonly DELETE_DOCUMENT: (uuid: string) => string;
|
|
564
566
|
readonly UPDATE_CONTENTS: (uuid: string) => string;
|
package/build/api/routes.js
CHANGED
|
@@ -571,6 +571,7 @@ exports.REST_API = {
|
|
|
571
571
|
UPDATE_OUTLINE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_OUTLINE(uuid)}`,
|
|
572
572
|
UPDATE_TITLE_PAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE_PAGE(uuid)}`,
|
|
573
573
|
UPDATE_FAVORITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_FAVORITE(uuid)}`,
|
|
574
|
+
UPDATE_TITLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE(uuid)}`,
|
|
574
575
|
TOGGLE_TITLE_PAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.TOGGLE_TITLE_PAGE(uuid)}`,
|
|
575
576
|
DELETE_DOCUMENT: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.DELETE_DOCUMENT(uuid)}`,
|
|
576
577
|
UPDATE_CONTENTS: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_CONTENTS(uuid)}`,
|
|
@@ -597,6 +598,7 @@ exports.REST_API = {
|
|
|
597
598
|
UPDATE_OUTLINE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_OUTLINE(uuid)}`,
|
|
598
599
|
UPDATE_TITLE_PAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE_PAGE(uuid)}`,
|
|
599
600
|
UPDATE_FAVORITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_FAVORITE(uuid)}`,
|
|
601
|
+
UPDATE_TITLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE(uuid)}`,
|
|
600
602
|
TOGGLE_TITLE_PAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.TOGGLE_TITLE_PAGE(uuid)}`,
|
|
601
603
|
DELETE_DOCUMENT: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.DELETE_DOCUMENT(uuid)}`,
|
|
602
604
|
UPDATE_CONTENTS: (uuid) => `${exports.ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PRIVATE}/${CONTROLLERS.WRITER_ROUTES.UPDATE_CONTENTS(uuid)}`,
|
|
@@ -11,6 +11,7 @@ export declare namespace CollectWriterDocumentSourcesCommand {
|
|
|
11
11
|
uuid: z.ZodUUID;
|
|
12
12
|
prompt: z.ZodString;
|
|
13
13
|
topic: z.ZodString;
|
|
14
|
+
title: z.ZodNullable<z.ZodString>;
|
|
14
15
|
typeId: z.ZodString;
|
|
15
16
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
16
17
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -11,6 +11,7 @@ export declare namespace CreateWriterDocumentCommand {
|
|
|
11
11
|
uuid: z.ZodUUID;
|
|
12
12
|
prompt: z.ZodString;
|
|
13
13
|
topic: z.ZodString;
|
|
14
|
+
title: z.ZodNullable<z.ZodString>;
|
|
14
15
|
typeId: z.ZodString;
|
|
15
16
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
16
17
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -9,6 +9,7 @@ export declare namespace FindWriterDocumentByUUIDCommand {
|
|
|
9
9
|
uuid: z.ZodUUID;
|
|
10
10
|
prompt: z.ZodString;
|
|
11
11
|
topic: z.ZodString;
|
|
12
|
+
title: z.ZodNullable<z.ZodString>;
|
|
12
13
|
typeId: z.ZodString;
|
|
13
14
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
14
15
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -15,6 +15,7 @@ export declare namespace FindWriterDocumentsCommand {
|
|
|
15
15
|
uuid: z.ZodUUID;
|
|
16
16
|
prompt: z.ZodString;
|
|
17
17
|
topic: z.ZodString;
|
|
18
|
+
title: z.ZodNullable<z.ZodString>;
|
|
18
19
|
typeId: z.ZodString;
|
|
19
20
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
20
21
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -13,6 +13,7 @@ export declare namespace GenerateWriterDocumentContentsCommand {
|
|
|
13
13
|
uuid: z.ZodUUID;
|
|
14
14
|
prompt: z.ZodString;
|
|
15
15
|
topic: z.ZodString;
|
|
16
|
+
title: z.ZodNullable<z.ZodString>;
|
|
16
17
|
typeId: z.ZodString;
|
|
17
18
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
18
19
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -22,3 +22,4 @@ export * from './upload-writer-source.command';
|
|
|
22
22
|
export * from './confirm-source-citation-metadata.command';
|
|
23
23
|
export * from './discard-writer-source.command';
|
|
24
24
|
export * from './update-writer-document-favorite.command';
|
|
25
|
+
export * from './update-writer-document-title.command';
|
|
@@ -38,3 +38,4 @@ __exportStar(require("./upload-writer-source.command"), exports);
|
|
|
38
38
|
__exportStar(require("./confirm-source-citation-metadata.command"), exports);
|
|
39
39
|
__exportStar(require("./discard-writer-source.command"), exports);
|
|
40
40
|
__exportStar(require("./update-writer-document-favorite.command"), exports);
|
|
41
|
+
__exportStar(require("./update-writer-document-title.command"), exports);
|
|
@@ -15,6 +15,7 @@ export declare namespace SetReactionWriterDocumentCommand {
|
|
|
15
15
|
uuid: z.ZodUUID;
|
|
16
16
|
prompt: z.ZodString;
|
|
17
17
|
topic: z.ZodString;
|
|
18
|
+
title: z.ZodNullable<z.ZodString>;
|
|
18
19
|
typeId: z.ZodString;
|
|
19
20
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
20
21
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -13,6 +13,7 @@ export declare namespace UpdateWriterDocumentFavoriteCommand {
|
|
|
13
13
|
uuid: z.ZodUUID;
|
|
14
14
|
prompt: z.ZodString;
|
|
15
15
|
topic: z.ZodString;
|
|
16
|
+
title: z.ZodNullable<z.ZodString>;
|
|
16
17
|
typeId: z.ZodString;
|
|
17
18
|
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
18
19
|
outline: z.ZodArray<z.ZodObject<{
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace UpdateWriterDocumentTitleCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
7
|
+
const RequestParamsSchema: z.ZodObject<{
|
|
8
|
+
uuid: z.ZodUUID;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
11
|
+
const ResponseSchema: z.ZodObject<{
|
|
12
|
+
data: z.ZodObject<{
|
|
13
|
+
uuid: z.ZodUUID;
|
|
14
|
+
prompt: z.ZodString;
|
|
15
|
+
topic: z.ZodString;
|
|
16
|
+
title: z.ZodNullable<z.ZodString>;
|
|
17
|
+
typeId: z.ZodString;
|
|
18
|
+
stage: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_STAGE>;
|
|
19
|
+
outline: z.ZodArray<z.ZodObject<{
|
|
20
|
+
title: z.ZodString;
|
|
21
|
+
type: z.ZodEnum<typeof import("../../..").WRITER_DOCUMENT_SECTION_TYPE>;
|
|
22
|
+
subsections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
}, z.core.$strip>>>>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
titlePage: z.ZodNullable<z.ZodObject<{
|
|
27
|
+
fullName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
28
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
institution: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
30
|
+
faculty: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
31
|
+
specialty: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
32
|
+
group: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
33
|
+
subject: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
isTitlePageEnabled: z.ZodBoolean;
|
|
36
|
+
isFavorite: z.ZodBoolean;
|
|
37
|
+
sourceMd: z.ZodNullable<z.ZodString>;
|
|
38
|
+
finalMd: z.ZodNullable<z.ZodString>;
|
|
39
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
40
|
+
unregisteredUserId: z.ZodNullable<z.ZodString>;
|
|
41
|
+
modelId: z.ZodNullable<z.ZodString>;
|
|
42
|
+
reaction: z.ZodNullable<z.ZodEnum<typeof import("../../..").USER_REACTION>>;
|
|
43
|
+
dislikeReason: z.ZodNullable<z.ZodString>;
|
|
44
|
+
description: z.ZodNullable<z.ZodString>;
|
|
45
|
+
skipSources: z.ZodBoolean;
|
|
46
|
+
pages: z.ZodNumber;
|
|
47
|
+
createdAt: z.ZodDate;
|
|
48
|
+
updatedAt: z.ZodDate;
|
|
49
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateWriterDocumentTitleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var UpdateWriterDocumentTitleCommand;
|
|
7
|
+
(function (UpdateWriterDocumentTitleCommand) {
|
|
8
|
+
UpdateWriterDocumentTitleCommand.RequestSchema = zod_1.z.object({ title: zod_1.z.string().trim().min(1).max(40) });
|
|
9
|
+
UpdateWriterDocumentTitleCommand.RequestParamsSchema = zod_1.z.object({ uuid: zod_1.z.uuid() });
|
|
10
|
+
UpdateWriterDocumentTitleCommand.ResponseSchema = zod_1.z.object({ data: models_1.WriterDocumentSchema });
|
|
11
|
+
})(UpdateWriterDocumentTitleCommand || (exports.UpdateWriterDocumentTitleCommand = UpdateWriterDocumentTitleCommand = {}));
|
|
@@ -9,6 +9,7 @@ exports.WriterDocumentSchema = zod_1.z.object({
|
|
|
9
9
|
uuid: zod_1.z.uuid(),
|
|
10
10
|
prompt: zod_1.z.string(),
|
|
11
11
|
topic: zod_1.z.string(),
|
|
12
|
+
title: zod_1.z.string().nullable(),
|
|
12
13
|
typeId: zod_1.z.string(),
|
|
13
14
|
stage: zod_1.z.enum(constants_1.WRITER_DOCUMENT_STAGE),
|
|
14
15
|
outline: writer_document_outline_schema_1.WriterDocumentOutlineSchema,
|