@purpleschool/gptbot 0.12.2 → 0.12.4

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.
@@ -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
+ var DiscardWriterSourceCommand;
6
+ (function (DiscardWriterSourceCommand) {
7
+ DiscardWriterSourceCommand.RequestParamsSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ });
10
+ DiscardWriterSourceCommand.RequestBodySchema = zod_1.z.object({});
11
+ DiscardWriterSourceCommand.ResponseSchema = zod_1.z.object({
12
+ data: zod_1.z.object({
13
+ isDiscarded: zod_1.z.boolean(),
14
+ }),
15
+ });
16
+ })(DiscardWriterSourceCommand || (exports.DiscardWriterSourceCommand = DiscardWriterSourceCommand = {}));
@@ -36,3 +36,4 @@ __exportStar(require("./collect-writer-document-sources.command"), exports);
36
36
  __exportStar(require("./get-writer-document-sources.command"), exports);
37
37
  __exportStar(require("./upload-writer-source.command"), exports);
38
38
  __exportStar(require("./confirm-source-citation-metadata.command"), exports);
39
+ __exportStar(require("./discard-writer-source.command"), exports);
@@ -7,6 +7,7 @@ var UpdateWriterDocumentOutlineCommand;
7
7
  (function (UpdateWriterDocumentOutlineCommand) {
8
8
  UpdateWriterDocumentOutlineCommand.RequestBodySchema = zod_1.z.object({
9
9
  data: models_1.WriterDocumentOutlineSchema,
10
+ modelId: zod_1.z.string().optional(),
10
11
  });
11
12
  UpdateWriterDocumentOutlineCommand.RequestParamsSchema = zod_1.z.object({
12
13
  uuid: zod_1.z.string().uuid(),
@@ -33,18 +33,24 @@ exports.CoverSlideDataUserEditSchema = zod_1.default.object({
33
33
  exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
34
34
  contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.THANK_YOU),
35
35
  title: zod_1.default.string().max(1000),
36
- author: zod_1.default.object({
37
- label: zod_1.default.string().max(200),
38
- value: zod_1.default.string().max(500),
39
- }),
40
- date: zod_1.default.object({
41
- label: zod_1.default.string().max(200),
42
- value: zod_1.default.string().max(500),
43
- }),
44
- email: zod_1.default.object({
45
- label: zod_1.default.string().max(200),
46
- value: zod_1.default.string().max(500),
47
- }),
36
+ author: zod_1.default
37
+ .object({
38
+ label: zod_1.default.string().min(1).max(100),
39
+ value: zod_1.default.string().min(1).max(200),
40
+ })
41
+ .optional(),
42
+ date: zod_1.default
43
+ .object({
44
+ label: zod_1.default.string().min(1).max(100),
45
+ value: zod_1.default.string().min(1).max(200),
46
+ })
47
+ .optional(),
48
+ email: zod_1.default
49
+ .object({
50
+ label: zod_1.default.string().min(1).max(100),
51
+ value: zod_1.default.string().min(1).max(200),
52
+ })
53
+ .optional(),
48
54
  version: zod_1.default.literal(1),
49
55
  });
50
56
  exports.TextSlideDataUserEditSchema = zod_1.default.object({
@@ -8,6 +8,7 @@ exports.WriterSourceSchema = zod_1.z.object({
8
8
  uuid: zod_1.z.string().uuid(),
9
9
  query: zod_1.z.string().nullable(),
10
10
  url: zod_1.z.string(),
11
+ title: zod_1.z.string().nullable(),
11
12
  snippet: zod_1.z.string().nullable(),
12
13
  sourceOrigin: zod_1.z.nativeEnum(constants_1.WRITER_SOURCE_ORIGIN),
13
14
  documentId: zod_1.z.string().uuid(),
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DiscardWriterSourceCommand {
4
+ export const RequestParamsSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ });
7
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
8
+
9
+ export const RequestBodySchema = z.object({});
10
+ export type RequestBody = z.infer<typeof RequestBodySchema>;
11
+
12
+ export const ResponseSchema = z.object({
13
+ data: z.object({
14
+ isDiscarded: z.boolean(),
15
+ }),
16
+ });
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -20,3 +20,4 @@ export * from './collect-writer-document-sources.command';
20
20
  export * from './get-writer-document-sources.command';
21
21
  export * from './upload-writer-source.command';
22
22
  export * from './confirm-source-citation-metadata.command';
23
+ export * from './discard-writer-source.command';
@@ -4,6 +4,7 @@ import { WriterDocumentOutlineSchema, WriterDocumentOutlineSectionSchema } from
4
4
  export namespace UpdateWriterDocumentOutlineCommand {
5
5
  export const RequestBodySchema = z.object({
6
6
  data: WriterDocumentOutlineSchema,
7
+ modelId: z.string().optional(),
7
8
  });
8
9
  export type RequestBody = z.infer<typeof RequestBodySchema>;
9
10
 
@@ -43,18 +43,24 @@ export const CoverSlideDataUserEditSchema = z.object({
43
43
  export const ThankYouSlideDataUserEditSchema = z.object({
44
44
  contentType: z.literal(SLIDE_CONTENT_TYPE.THANK_YOU),
45
45
  title: z.string().max(1000),
46
- author: z.object({
47
- label: z.string().max(200),
48
- value: z.string().max(500),
49
- }),
50
- date: z.object({
51
- label: z.string().max(200),
52
- value: z.string().max(500),
53
- }),
54
- email: z.object({
55
- label: z.string().max(200),
56
- value: z.string().max(500),
57
- }),
46
+ author: z
47
+ .object({
48
+ label: z.string().min(1).max(100),
49
+ value: z.string().min(1).max(200),
50
+ })
51
+ .optional(),
52
+ date: z
53
+ .object({
54
+ label: z.string().min(1).max(100),
55
+ value: z.string().min(1).max(200),
56
+ })
57
+ .optional(),
58
+ email: z
59
+ .object({
60
+ label: z.string().min(1).max(100),
61
+ value: z.string().min(1).max(200),
62
+ })
63
+ .optional(),
58
64
  version: z.literal(1),
59
65
  }) satisfies z.ZodType<IThankYouSlideDataStructure>;
60
66
 
@@ -6,6 +6,7 @@ export const WriterSourceSchema = z.object({
6
6
  uuid: z.string().uuid(),
7
7
  query: z.string().nullable(),
8
8
  url: z.string(),
9
+ title: z.string().nullable(),
9
10
  snippet: z.string().nullable(),
10
11
  sourceOrigin: z.nativeEnum(WRITER_SOURCE_ORIGIN),
11
12
  documentId: z.string().uuid(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",