@purpleschool/gptbot-tools 0.1.13 → 0.1.15

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.
@@ -15,6 +15,7 @@ var CreatePresentationCommand;
15
15
  prompt: zod_1.z.string(),
16
16
  slideCount: zod_1.z.number(),
17
17
  targetAudience: zod_1.z.nativeEnum(enums_1.PRESENTATION_TARGET_AUDIENCE).optional(),
18
+ userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
18
19
  });
19
20
  CreatePresentationCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
20
21
  })(CreatePresentationCommand || (exports.CreatePresentationCommand = CreatePresentationCommand = {}));
@@ -9,6 +9,7 @@ exports.PresentationTemplateSchema = zod_1.z.object({
9
9
  order: zod_1.z.number(),
10
10
  price: zod_1.z.number(),
11
11
  imagePlaceholder: zod_1.z.string(),
12
+ isPremium: zod_1.z.boolean(),
12
13
  createdAt: zod_1.z.date(),
13
14
  updatedAt: zod_1.z.date(),
14
15
  });
@@ -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(enums_1.SLIDE_CONTENT_TYPE.THANK_YOU),
35
35
  title: zod_1.default.string().min(1).max(500),
36
- author: zod_1.default.object({
36
+ author: zod_1.default
37
+ .object({
37
38
  label: zod_1.default.string().min(1).max(100),
38
39
  value: zod_1.default.string().min(1).max(200),
39
- }),
40
- date: zod_1.default.object({
40
+ })
41
+ .optional(),
42
+ date: zod_1.default
43
+ .object({
41
44
  label: zod_1.default.string().min(1).max(100),
42
45
  value: zod_1.default.string().min(1).max(200),
43
- }),
44
- email: zod_1.default.object({
46
+ })
47
+ .optional(),
48
+ email: zod_1.default
49
+ .object({
45
50
  label: zod_1.default.string().min(1).max(100),
46
51
  value: zod_1.default.string().min(1).max(200),
47
- }),
52
+ })
53
+ .optional(),
48
54
  version: zod_1.default.literal(1),
49
55
  });
50
56
  exports.TextSlideDataUserEditSchema = zod_1.default.object({
@@ -63,20 +63,26 @@ exports.ThankYouSlideDataSchema = zod_1.z.object({
63
63
  .describe('"Thank you for your attention" in presentation\'s language')
64
64
  .min(10)
65
65
  .max(150),
66
- author: zod_1.z.object({
67
- label: zod_1.z.string().describe('"Author" in presentation\'s language'),
68
- value: zod_1.z.string().describe('"Author of the presentation" in presentation\'s language'),
69
- }),
70
- date: zod_1.z.object({
71
- label: zod_1.z.string().describe('"Date" in presentation\'s language'),
66
+ author: zod_1.z
67
+ .object({
68
+ label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
69
+ value: zod_1.z.string().describe('Author value from titlePage if provided'),
70
+ })
71
+ .optional(),
72
+ date: zod_1.z
73
+ .object({
74
+ label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
72
75
  value: zod_1.z
73
76
  .string()
74
- .describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
75
- }),
76
- email: zod_1.z.object({
77
- label: zod_1.z.string().describe('Just default word "Email"'),
78
- value: zod_1.z.string().describe('Just default "email@example.com"'),
79
- }),
77
+ .describe('Date from titlePage in the "dd month yyyy" format in presentation\'s locale'),
78
+ })
79
+ .optional(),
80
+ email: zod_1.z
81
+ .object({
82
+ label: zod_1.z.string().describe('Localized contact/email label'),
83
+ value: zod_1.z.string().describe('Email value from titlePage if provided'),
84
+ })
85
+ .optional(),
80
86
  version: zod_1.z.literal(1),
81
87
  });
82
88
  exports.StructuredListSlideDataSchema = zod_1.z.object({
@@ -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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -12,6 +12,7 @@ export namespace CreatePresentationCommand {
12
12
  prompt: z.string(),
13
13
  slideCount: z.number(),
14
14
  targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
15
+ userHasActiveSubscriptionOrProduct: z.boolean(),
15
16
  });
16
17
  export type Request = z.infer<typeof RequestSchema>;
17
18
 
@@ -7,6 +7,7 @@ export const PresentationTemplateSchema = z.object({
7
7
  order: z.number(),
8
8
  price: z.number(),
9
9
  imagePlaceholder: z.string(),
10
+ isPremium: z.boolean(),
10
11
  createdAt: z.date(),
11
12
  updatedAt: z.date(),
12
13
  });
@@ -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().min(1).max(500),
46
- author: z.object({
47
- label: z.string().min(1).max(100),
48
- value: z.string().min(1).max(200),
49
- }),
50
- date: z.object({
51
- label: z.string().min(1).max(100),
52
- value: z.string().min(1).max(200),
53
- }),
54
- email: z.object({
55
- label: z.string().min(1).max(100),
56
- value: z.string().min(1).max(200),
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
 
@@ -47,9 +47,9 @@ export interface ICoverSlideDataStructure {
47
47
  export interface IThankYouSlideDataStructure {
48
48
  contentType: SLIDE_CONTENT_TYPE.THANK_YOU;
49
49
  title: string;
50
- author: { label: string; value: string };
51
- date: { label: string; value: string };
52
- email: { label: string; value: string };
50
+ author?: { label: string; value: string };
51
+ date?: { label: string; value: string };
52
+ email?: { label: string; value: string };
53
53
  version: 1;
54
54
  }
55
55
 
@@ -170,22 +170,28 @@ export const ThankYouSlideDataSchema = z.object({
170
170
  .describe('"Thank you for your attention" in presentation\'s language')
171
171
  .min(10)
172
172
  .max(150),
173
- author: z.object({
174
- label: z.string().describe('"Author" in presentation\'s language'),
175
- value: z.string().describe('"Author of the presentation" in presentation\'s language'),
176
- }),
177
- date: z.object({
178
- label: z.string().describe('"Date" in presentation\'s language'),
179
- value: z
180
- .string()
181
- .describe(
182
- 'Date of the presentation in the "dd month yyyy" format in presentation\'s locale',
183
- ),
184
- }),
185
- email: z.object({
186
- label: z.string().describe('Just default word "Email"'),
187
- value: z.string().describe('Just default "email@example.com"'),
188
- }),
173
+ author: z
174
+ .object({
175
+ label: z.string().describe('Literal "Author" in presentation\'s language'),
176
+ value: z.string().describe('Author value from titlePage if provided'),
177
+ })
178
+ .optional(),
179
+ date: z
180
+ .object({
181
+ label: z.string().describe('Literal "Date" in presentation\'s language'),
182
+ value: z
183
+ .string()
184
+ .describe(
185
+ 'Date from titlePage in the "dd month yyyy" format in presentation\'s locale',
186
+ ),
187
+ })
188
+ .optional(),
189
+ email: z
190
+ .object({
191
+ label: z.string().describe('Localized contact/email label'),
192
+ value: z.string().describe('Email value from titlePage if provided'),
193
+ })
194
+ .optional(),
189
195
  version: z.literal(1),
190
196
  }) satisfies z.ZodType<IThankYouSlideDataStructure>;
191
197
  export type ThankYouSlideData = z.infer<typeof ThankYouSlideDataSchema>;
@@ -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