@purpleschool/gptbot-tools 0.1.14 → 0.1.16
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/discard-writer-source.command.js +16 -0
- package/build/writer/commands/index.js +1 -0
- package/build/writer/commands/update-writer-document-outline.command.js +1 -0
- package/build/writer/routes/writer.routes.js +1 -0
- package/package.json +1 -1
- package/writer/commands/discard-writer-source.command.ts +18 -0
- package/writer/commands/index.ts +1 -0
- package/writer/commands/update-writer-document-outline.command.ts +1 -0
- package/writer/routes/writer.routes.ts +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscardWriterSourceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DiscardWriterSourceCommand;
|
|
7
|
+
(function (DiscardWriterSourceCommand) {
|
|
8
|
+
DiscardWriterSourceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
sourceId: zod_1.z.string().uuid(),
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
});
|
|
13
|
+
DiscardWriterSourceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
14
|
+
isDiscarded: zod_1.z.boolean(),
|
|
15
|
+
}));
|
|
16
|
+
})(DiscardWriterSourceCommand || (exports.DiscardWriterSourceCommand = DiscardWriterSourceCommand = {}));
|
|
@@ -34,3 +34,4 @@ __exportStar(require("./set-reaction-writer-document.command"), exports);
|
|
|
34
34
|
__exportStar(require("./collect-sources.command"), exports);
|
|
35
35
|
__exportStar(require("./upload-writer-source.command"), exports);
|
|
36
36
|
__exportStar(require("./confirm-source-citation-metadata.command"), exports);
|
|
37
|
+
__exportStar(require("./discard-writer-source.command"), exports);
|
|
@@ -11,6 +11,7 @@ var UpdateWriterDocumentOutlineCommand;
|
|
|
11
11
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
12
|
documentId: zod_1.z.string().uuid(),
|
|
13
13
|
data: models_1.WriterDocumentOutlineSchema,
|
|
14
|
+
modelId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
15
|
});
|
|
15
16
|
UpdateWriterDocumentOutlineCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentOutlineSchema);
|
|
16
17
|
})(UpdateWriterDocumentOutlineCommand || (exports.UpdateWriterDocumentOutlineCommand = UpdateWriterDocumentOutlineCommand = {}));
|
|
@@ -18,6 +18,7 @@ exports.WRITER_AMQP_ROUTES = {
|
|
|
18
18
|
GET_DOCUMENT_SOURCES: 'tools.writer.get-document-sources.rpc',
|
|
19
19
|
UPLOAD_SOURCE: 'tools.writer.upload-source.rpc',
|
|
20
20
|
CONFIRM_SOURCE_CITATION_METADATA: 'tools.writer.confirm-source-citation-metadata.rpc',
|
|
21
|
+
DISCARD_SOURCE: 'tools.writer.discard-source.rpc',
|
|
21
22
|
GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
|
|
22
23
|
PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
|
|
23
24
|
EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace DiscardWriterSourceCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
sourceId: z.string().uuid(),
|
|
7
|
+
userId: z.string().uuid().nullable().optional(),
|
|
8
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
});
|
|
10
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = ICommandResponseSchema(
|
|
13
|
+
z.object({
|
|
14
|
+
isDiscarded: z.boolean(),
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
package/writer/commands/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export namespace UpdateWriterDocumentOutlineCommand {
|
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
9
|
documentId: z.string().uuid(),
|
|
10
10
|
data: WriterDocumentOutlineSchema,
|
|
11
|
+
modelId: z.string().uuid().nullable().optional(),
|
|
11
12
|
});
|
|
12
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
13
14
|
|
|
@@ -15,6 +15,7 @@ export const WRITER_AMQP_ROUTES = {
|
|
|
15
15
|
GET_DOCUMENT_SOURCES: 'tools.writer.get-document-sources.rpc',
|
|
16
16
|
UPLOAD_SOURCE: 'tools.writer.upload-source.rpc',
|
|
17
17
|
CONFIRM_SOURCE_CITATION_METADATA: 'tools.writer.confirm-source-citation-metadata.rpc',
|
|
18
|
+
DISCARD_SOURCE: 'tools.writer.discard-source.rpc',
|
|
18
19
|
GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
|
|
19
20
|
PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
|
|
20
21
|
EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
|