@purpleschool/gptbot-tools 0.0.124 → 0.0.125
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/tools/events/tool-job-complete.event.js +1 -1
- package/build/writer/commands/update-writer-document-outline.command.js +1 -0
- package/build/writer/models/index.js +1 -0
- package/build/writer/models/writer-document-title-page.schema.js +15 -0
- package/build/writer/models/writer-document.schema.js +2 -0
- package/package.json +1 -1
- package/tools/events/tool-job-complete.event.ts +1 -1
- package/writer/commands/update-writer-document-outline.command.ts +2 -1
- package/writer/models/index.ts +1 -0
- package/writer/models/writer-document-title-page.schema.ts +15 -0
- package/writer/models/writer-document.schema.ts +2 -0
|
@@ -9,7 +9,7 @@ var ToolJobCompleteEvent;
|
|
|
9
9
|
ToolJobCompleteEvent.PayloadSchema = zod_1.z.object({
|
|
10
10
|
job: models_1.ToolJobSchema.extend({
|
|
11
11
|
toolType: zod_1.z.nativeEnum(enums_1.TOOL_TYPE),
|
|
12
|
-
origin: zod_1.z.nativeEnum(enums_1.JOB_REQUEST_ORIGIN).optional()
|
|
12
|
+
origin: zod_1.z.nativeEnum(enums_1.JOB_REQUEST_ORIGIN).optional(),
|
|
13
13
|
}),
|
|
14
14
|
});
|
|
15
15
|
})(ToolJobCompleteEvent || (exports.ToolJobCompleteEvent = ToolJobCompleteEvent = {}));
|
|
@@ -10,6 +10,7 @@ var UpdateWriterDocumentOutlineCommand;
|
|
|
10
10
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
11
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
12
|
documentId: zod_1.z.string().uuid(),
|
|
13
|
+
titlePage: models_1.WriterDocumentTitlePageSchema,
|
|
13
14
|
data: models_1.WriterDocumentOutlineSchema,
|
|
14
15
|
});
|
|
15
16
|
UpdateWriterDocumentOutlineCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentOutlineSchema);
|
|
@@ -18,5 +18,6 @@ __exportStar(require("./writer-model.schema"), exports);
|
|
|
18
18
|
__exportStar(require("./writer-config.schema"), exports);
|
|
19
19
|
__exportStar(require("./writer-ai-action.schema"), exports);
|
|
20
20
|
__exportStar(require("./writer-document-outline.schema"), exports);
|
|
21
|
+
__exportStar(require("./writer-document-title-page.schema"), exports);
|
|
21
22
|
__exportStar(require("./writer-document.schema"), exports);
|
|
22
23
|
__exportStar(require("./writer-document-type.schema"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterDocumentTitlePageSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.WriterDocumentTitlePageSchema = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
fullName: zod_1.z.string().min(1).max(200).optional().nullable(),
|
|
8
|
+
city: zod_1.z.string().min(1).max(200).optional().nullable(),
|
|
9
|
+
institution: zod_1.z.string().min(1).max(300).optional().nullable(),
|
|
10
|
+
faculty: zod_1.z.string().min(1).max(200).optional().nullable(),
|
|
11
|
+
specialty: zod_1.z.string().min(1).max(200).optional().nullable(),
|
|
12
|
+
group: zod_1.z.string().min(1).max(100).optional().nullable(),
|
|
13
|
+
subject: zod_1.z.string().min(1).max(200).optional().nullable(),
|
|
14
|
+
})
|
|
15
|
+
.nullable();
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const writer_document_outline_schema_1 = require("./writer-document-outline.schema");
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
const enums_1 = require("../enums");
|
|
8
|
+
const writer_document_title_page_schema_1 = require("./writer-document-title-page.schema");
|
|
8
9
|
exports.WriterDocumentSchema = zod_1.z.object({
|
|
9
10
|
uuid: zod_1.z.string().uuid(),
|
|
10
11
|
prompt: zod_1.z.string(),
|
|
@@ -12,6 +13,7 @@ exports.WriterDocumentSchema = zod_1.z.object({
|
|
|
12
13
|
typeId: zod_1.z.string(),
|
|
13
14
|
stage: zod_1.z.nativeEnum(enums_1.WRITER_DOCUMENT_STAGE),
|
|
14
15
|
outline: writer_document_outline_schema_1.WriterDocumentOutlineSchema,
|
|
16
|
+
titlePage: writer_document_title_page_schema_1.WriterDocumentTitlePageSchema.optional().nullable(),
|
|
15
17
|
sourceMd: zod_1.z.string().nullable(),
|
|
16
18
|
finalMd: zod_1.z.string().nullable(),
|
|
17
19
|
userId: zod_1.z.string().nullable(),
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export namespace ToolJobCompleteEvent {
|
|
|
6
6
|
export const PayloadSchema = z.object({
|
|
7
7
|
job: ToolJobSchema.extend({
|
|
8
8
|
toolType: z.nativeEnum(TOOL_TYPE),
|
|
9
|
-
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional()
|
|
9
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional(),
|
|
10
10
|
}),
|
|
11
11
|
});
|
|
12
12
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common';
|
|
3
|
-
import { WriterDocumentOutlineSchema } from '../models';
|
|
3
|
+
import { WriterDocumentOutlineSchema, WriterDocumentTitlePageSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace UpdateWriterDocumentOutlineCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
userId: z.string().uuid().nullable().optional(),
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
9
|
documentId: z.string().uuid(),
|
|
10
|
+
titlePage: WriterDocumentTitlePageSchema,
|
|
10
11
|
data: WriterDocumentOutlineSchema,
|
|
11
12
|
});
|
|
12
13
|
export type Request = z.infer<typeof RequestSchema>;
|
package/writer/models/index.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * from './writer-model.schema';
|
|
|
2
2
|
export * from './writer-config.schema';
|
|
3
3
|
export * from './writer-ai-action.schema';
|
|
4
4
|
export * from './writer-document-outline.schema';
|
|
5
|
+
export * from './writer-document-title-page.schema';
|
|
5
6
|
export * from './writer-document.schema';
|
|
6
7
|
export * from './writer-document-type.schema';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const WriterDocumentTitlePageSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
fullName: z.string().min(1).max(200).optional().nullable(),
|
|
6
|
+
city: z.string().min(1).max(200).optional().nullable(),
|
|
7
|
+
institution: z.string().min(1).max(300).optional().nullable(),
|
|
8
|
+
faculty: z.string().min(1).max(200).optional().nullable(),
|
|
9
|
+
specialty: z.string().min(1).max(200).optional().nullable(),
|
|
10
|
+
group: z.string().min(1).max(100).optional().nullable(),
|
|
11
|
+
subject: z.string().min(1).max(200).optional().nullable(),
|
|
12
|
+
})
|
|
13
|
+
.nullable();
|
|
14
|
+
|
|
15
|
+
export type WriterDocumentTitlePage = z.infer<typeof WriterDocumentTitlePageSchema>;
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { WriterDocumentOutlineSchema } from './writer-document-outline.schema';
|
|
3
3
|
import { USER_REACTION } from '../../common';
|
|
4
4
|
import { WRITER_DOCUMENT_STAGE } from '../enums';
|
|
5
|
+
import { WriterDocumentTitlePageSchema } from './writer-document-title-page.schema';
|
|
5
6
|
|
|
6
7
|
export const WriterDocumentSchema = z.object({
|
|
7
8
|
uuid: z.string().uuid(),
|
|
@@ -10,6 +11,7 @@ export const WriterDocumentSchema = z.object({
|
|
|
10
11
|
typeId: z.string(),
|
|
11
12
|
stage: z.nativeEnum(WRITER_DOCUMENT_STAGE),
|
|
12
13
|
outline: WriterDocumentOutlineSchema,
|
|
14
|
+
titlePage: WriterDocumentTitlePageSchema.optional().nullable(),
|
|
13
15
|
sourceMd: z.string().nullable(),
|
|
14
16
|
finalMd: z.string().nullable(),
|
|
15
17
|
userId: z.string().nullable(),
|