@purpleschool/gptbot 0.7.16 → 0.7.18

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.
@@ -10,6 +10,8 @@ var GetUpsellOfferCommand;
10
10
  data: zod_1.z.object({
11
11
  isEligible: zod_1.z.boolean(),
12
12
  promocode: zod_1.z.string().nullable(),
13
+ amount: zod_1.z.number().nullable(),
14
+ endDate: zod_1.z.date().nullable(),
13
15
  }),
14
16
  });
15
17
  GetUpsellOfferCommand.ResponseByUUIDSchema = zod_1.z.object({
@@ -5,10 +5,10 @@ var SLIDE_CONTENT_TYPE;
5
5
  (function (SLIDE_CONTENT_TYPE) {
6
6
  SLIDE_CONTENT_TYPE["COVER"] = "COVER";
7
7
  SLIDE_CONTENT_TYPE["TEXT"] = "TEXT";
8
+ SLIDE_CONTENT_TYPE["TEXT_WITH_IMAGE"] = "TEXT_WITH_IMAGE";
8
9
  SLIDE_CONTENT_TYPE["SECTION_BREAK"] = "SECTION_BREAK";
9
10
  SLIDE_CONTENT_TYPE["STRUCTURED_LIST"] = "STRUCTURED_LIST";
10
11
  SLIDE_CONTENT_TYPE["CONTENTS"] = "CONTENTS";
11
- SLIDE_CONTENT_TYPE["IMAGE"] = "IMAGE";
12
12
  SLIDE_CONTENT_TYPE["THANK_YOU"] = "THANK_YOU";
13
13
  SLIDE_CONTENT_TYPE["TABLE"] = "TABLE";
14
14
  SLIDE_CONTENT_TYPE["CHART"] = "CHART";
@@ -9,7 +9,7 @@ exports.SLIDE_LAYOUT_MAP = new Map([
9
9
  [enums_1.SLIDE_CONTENT_TYPE.TEXT, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1, slide_layout_enum_1.SLIDE_LAYOUT.TYPE_2]],
10
10
  [enums_1.SLIDE_CONTENT_TYPE.SECTION_BREAK, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
11
11
  [enums_1.SLIDE_CONTENT_TYPE.CONTENTS, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
12
- [enums_1.SLIDE_CONTENT_TYPE.IMAGE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
12
+ [enums_1.SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
13
13
  [enums_1.SLIDE_CONTENT_TYPE.THANK_YOU, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
14
14
  [enums_1.SLIDE_CONTENT_TYPE.TABLE, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
15
15
  [enums_1.SLIDE_CONTENT_TYPE.CHART, [slide_layout_enum_1.SLIDE_LAYOUT.TYPE_1]],
@@ -25,7 +25,7 @@ exports.IconSlotSchema = zod_1.z.object({
25
25
  });
26
26
  exports.CoverSlideDataSchema = zod_1.z.object({
27
27
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
28
- title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
28
+ title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
29
29
  author: zod_1.z.object({
30
30
  label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
31
31
  value: zod_1.z
@@ -42,10 +42,11 @@ exports.CoverSlideDataSchema = zod_1.z.object({
42
42
  label: zod_1.z.string().describe('Just default word "Email"'),
43
43
  value: zod_1.z.string().describe('Just default "email@example.com"'),
44
44
  }),
45
+ version: zod_1.z.literal(1),
45
46
  });
46
47
  exports.ThankYouSlideDataSchema = zod_1.z.object({
47
48
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.THANK_YOU),
48
- title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
49
+ title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
49
50
  author: zod_1.z.object({
50
51
  label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
51
52
  value: zod_1.z
@@ -62,31 +63,29 @@ exports.ThankYouSlideDataSchema = zod_1.z.object({
62
63
  label: zod_1.z.string().describe('Just default word "Email"'),
63
64
  value: zod_1.z.string().describe('Just default "email@example.com"'),
64
65
  }),
66
+ version: zod_1.z.literal(1),
65
67
  });
66
68
  exports.StructuredListSlideDataSchema = zod_1.z.object({
67
69
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
68
- title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
69
- description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
70
+ title: zod_1.z.string().describe('Slide title, 2–6 words').max(150),
71
+ description: zod_1.z.string().describe('One short framing sentence'),
70
72
  list: zod_1.z
71
73
  .array(zod_1.z.object({
72
- title: zod_1.z.string().describe('List item title in about 6 words').min(10).max(200),
73
- description: zod_1.z
74
- .string()
75
- .describe('List item description in about 6 words')
76
- .min(10)
77
- .max(200),
74
+ title: zod_1.z.string().describe('2–4 words, concrete'),
75
+ description: zod_1.z.string().describe('One clear short framing sentence').max(100),
78
76
  }))
79
- .min(4)
80
- .max(4),
77
+ .length(4),
78
+ version: zod_1.z.literal(1),
81
79
  });
82
80
  exports.TextSlideDataSchema = zod_1.z.object({
83
81
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TEXT),
84
- title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
82
+ title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
85
83
  description: zod_1.z
86
84
  .string()
87
85
  .describe('Fairly long textual description of the point presented in the title. A couple of paragraphs.')
88
86
  .min(300)
89
- .max(1000),
87
+ .max(500),
88
+ version: zod_1.z.literal(1),
90
89
  });
91
90
  exports.ContentsSlideDataSchema = zod_1.z.object({
92
91
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.CONTENTS),
@@ -96,20 +95,32 @@ exports.ContentsSlideDataSchema = zod_1.z.object({
96
95
  .min(10)
97
96
  .max(200),
98
97
  items: zod_1.z
99
- .array(zod_1.z.string().min(1))
98
+ .array(zod_1.z.object({
99
+ pageNumber: zod_1.z.number().describe('Page number of the slide'),
100
+ title: zod_1.z.string().min(1).describe('Title of the slide on said page'),
101
+ }))
100
102
  .min(1)
101
103
  .describe('List of slide titles. Must be relevant and generated after all the slides are generated'),
104
+ version: zod_1.z.literal(1),
102
105
  });
103
- exports.ImageSlideDataSchema = zod_1.z.object({
104
- contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.IMAGE),
106
+ exports.ImageSlideDataSchema = zod_1.z
107
+ .object({
108
+ contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
105
109
  title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
106
- description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
110
+ description: zod_1.z
111
+ .string()
112
+ .describe("Text that elaborates on the title and doesn't just describe the image")
113
+ .min(10)
114
+ .max(500),
107
115
  imageSlot: exports.ImageSlotSchema,
108
- });
116
+ version: zod_1.z.literal(1),
117
+ })
118
+ .describe('Slide that contains a title, description of the title');
109
119
  exports.SectionBreakSlideDataSchema = zod_1.z.object({
110
120
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.SECTION_BREAK),
111
121
  title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
112
122
  description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
123
+ version: zod_1.z.literal(1),
113
124
  });
114
125
  exports.TableSlideDataSchema = zod_1.z.object({
115
126
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TABLE),
@@ -133,6 +144,7 @@ exports.TableSlideDataSchema = zod_1.z.object({
133
144
  hasRowHeaders: zod_1.z.boolean().describe('If table needs special row headers, set this to true'),
134
145
  hasSummaryRow: zod_1.z.boolean().describe('If table needs a summary row, set this to true'),
135
146
  }),
147
+ version: zod_1.z.literal(1),
136
148
  });
137
149
  // Charts
138
150
  exports.BarChartSlideDataSchema = zod_1.z.object({
@@ -157,12 +169,14 @@ exports.BarChartSlideDataSchema = zod_1.z.object({
157
169
  .describe('Data series for the chart'),
158
170
  yAxisLabel: zod_1.z.string().max(40).optional().describe('Y-axis label'),
159
171
  unit: zod_1.z.string().max(10).optional().describe('Unit symbol (%, $, etc.)'),
172
+ version: zod_1.z.literal(1),
160
173
  });
161
174
  exports.ChartSlideDataSchema = zod_1.z.object({
162
175
  contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.CHART),
163
176
  title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(200),
164
- description: zod_1.z.string().describe('Description of the slide in about 6 words').min(10).max(200),
177
+ description: zod_1.z.string().describe("Information on slide's topic").min(10).max(400),
165
178
  chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
179
+ version: zod_1.z.literal(1),
166
180
  });
167
181
  exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
168
182
  exports.CoverSlideDataSchema,
@@ -10,6 +10,8 @@ export namespace GetUpsellOfferCommand {
10
10
  data: z.object({
11
11
  isEligible: z.boolean(),
12
12
  promocode: z.string().nullable(),
13
+ amount: z.number().nullable(),
14
+ endDate: z.date().nullable(),
13
15
  }),
14
16
  });
15
17
 
@@ -1,10 +1,10 @@
1
1
  export enum SLIDE_CONTENT_TYPE {
2
2
  COVER = 'COVER',
3
3
  TEXT = 'TEXT',
4
+ TEXT_WITH_IMAGE = 'TEXT_WITH_IMAGE',
4
5
  SECTION_BREAK = 'SECTION_BREAK',
5
6
  STRUCTURED_LIST = 'STRUCTURED_LIST',
6
7
  CONTENTS = 'CONTENTS',
7
- IMAGE = 'IMAGE',
8
8
  THANK_YOU = 'THANK_YOU',
9
9
  TABLE = 'TABLE',
10
10
  CHART = 'CHART',
@@ -7,7 +7,7 @@ export const SLIDE_LAYOUT_MAP = new Map<SLIDE_CONTENT_TYPE, SLIDE_LAYOUT[]>([
7
7
  [SLIDE_CONTENT_TYPE.TEXT, [SLIDE_LAYOUT.TYPE_1, SLIDE_LAYOUT.TYPE_2]],
8
8
  [SLIDE_CONTENT_TYPE.SECTION_BREAK, [SLIDE_LAYOUT.TYPE_1]],
9
9
  [SLIDE_CONTENT_TYPE.CONTENTS, [SLIDE_LAYOUT.TYPE_1]],
10
- [SLIDE_CONTENT_TYPE.IMAGE, [SLIDE_LAYOUT.TYPE_1]],
10
+ [SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE, [SLIDE_LAYOUT.TYPE_1]],
11
11
  [SLIDE_CONTENT_TYPE.THANK_YOU, [SLIDE_LAYOUT.TYPE_1]],
12
12
  [SLIDE_CONTENT_TYPE.TABLE, [SLIDE_LAYOUT.TYPE_1]],
13
13
  [SLIDE_CONTENT_TYPE.CHART, [SLIDE_LAYOUT.TYPE_1]],
@@ -29,7 +29,7 @@ export type IconSlot = z.infer<typeof IconSlotSchema>;
29
29
 
30
30
  export const CoverSlideDataSchema = z.object({
31
31
  contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
32
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
32
+ title: z.string().describe('Slide title in about 6 words').min(10).max(150),
33
33
  author: z.object({
34
34
  label: z.string().describe('Literal "Author" in presentation\'s language'),
35
35
  value: z
@@ -48,12 +48,13 @@ export const CoverSlideDataSchema = z.object({
48
48
  label: z.string().describe('Just default word "Email"'),
49
49
  value: z.string().describe('Just default "email@example.com"'),
50
50
  }),
51
+ version: z.literal(1),
51
52
  });
52
53
  export type CoverSlideData = z.infer<typeof CoverSlideDataSchema>;
53
54
 
54
55
  export const ThankYouSlideDataSchema = z.object({
55
56
  contentType: z.literal(SLIDE_CONTENT_TYPE.THANK_YOU),
56
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
57
+ title: z.string().describe('Slide title in about 6 words').min(10).max(150),
57
58
  author: z.object({
58
59
  label: z.string().describe('Literal "Author" in presentation\'s language'),
59
60
  value: z
@@ -72,39 +73,37 @@ export const ThankYouSlideDataSchema = z.object({
72
73
  label: z.string().describe('Just default word "Email"'),
73
74
  value: z.string().describe('Just default "email@example.com"'),
74
75
  }),
76
+ version: z.literal(1),
75
77
  });
76
78
  export type ThankYouSlideData = z.infer<typeof ThankYouSlideDataSchema>;
77
79
 
78
80
  export const StructuredListSlideDataSchema = z.object({
79
81
  contentType: z.literal(SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
80
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
81
- description: z.string().describe('Description of the slide in about 6 words').min(10).max(200),
82
+ title: z.string().describe('Slide title, 2–6 words').max(150),
83
+ description: z.string().describe('One short framing sentence'),
82
84
  list: z
83
85
  .array(
84
86
  z.object({
85
- title: z.string().describe('List item title in about 6 words').min(10).max(200),
86
- description: z
87
- .string()
88
- .describe('List item description in about 6 words')
89
- .min(10)
90
- .max(200),
87
+ title: z.string().describe('2–4 words, concrete'),
88
+ description: z.string().describe('One clear short framing sentence').max(100),
91
89
  }),
92
90
  )
93
- .min(4)
94
- .max(4),
91
+ .length(4),
92
+ version: z.literal(1),
95
93
  });
96
94
  export type StructuredListSlideData = z.infer<typeof StructuredListSlideDataSchema>;
97
95
 
98
96
  export const TextSlideDataSchema = z.object({
99
97
  contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT),
100
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
98
+ title: z.string().describe('Slide title in about 6 words').min(10).max(150),
101
99
  description: z
102
100
  .string()
103
101
  .describe(
104
102
  'Fairly long textual description of the point presented in the title. A couple of paragraphs.',
105
103
  )
106
104
  .min(300)
107
- .max(1000),
105
+ .max(500),
106
+ version: z.literal(1),
108
107
  });
109
108
  export type TextSlideData = z.infer<typeof TextSlideDataSchema>;
110
109
 
@@ -118,26 +117,40 @@ export const ContentsSlideDataSchema = z.object({
118
117
  .min(10)
119
118
  .max(200),
120
119
  items: z
121
- .array(z.string().min(1))
120
+ .array(
121
+ z.object({
122
+ pageNumber: z.number().describe('Page number of the slide'),
123
+ title: z.string().min(1).describe('Title of the slide on said page'),
124
+ }),
125
+ )
122
126
  .min(1)
123
127
  .describe(
124
128
  'List of slide titles. Must be relevant and generated after all the slides are generated',
125
129
  ),
130
+ version: z.literal(1),
126
131
  });
127
132
  export type ContentsSlideData = z.infer<typeof ContentsSlideDataSchema>;
128
133
 
129
- export const ImageSlideDataSchema = z.object({
130
- contentType: z.literal(SLIDE_CONTENT_TYPE.IMAGE),
131
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
132
- description: z.string().describe('Description of the slide in about 6 words').min(10).max(200),
133
- imageSlot: ImageSlotSchema,
134
- });
134
+ export const ImageSlideDataSchema = z
135
+ .object({
136
+ contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
137
+ title: z.string().describe('Slide title in about 6 words').min(10).max(200),
138
+ description: z
139
+ .string()
140
+ .describe("Text that elaborates on the title and doesn't just describe the image")
141
+ .min(10)
142
+ .max(500),
143
+ imageSlot: ImageSlotSchema,
144
+ version: z.literal(1),
145
+ })
146
+ .describe('Slide that contains a title, description of the title');
135
147
  export type ImageSlideData = z.infer<typeof ImageSlideDataSchema>;
136
148
 
137
149
  export const SectionBreakSlideDataSchema = z.object({
138
150
  contentType: z.literal(SLIDE_CONTENT_TYPE.SECTION_BREAK),
139
151
  title: z.string().describe('Slide title in about 6 words').min(10).max(200),
140
152
  description: z.string().describe('Description of the slide in about 6 words').min(10).max(200),
153
+ version: z.literal(1),
141
154
  });
142
155
  export type SectionBreakSlideData = z.infer<typeof SectionBreakSlideDataSchema>;
143
156
 
@@ -165,6 +178,7 @@ export const TableSlideDataSchema = z.object({
165
178
  hasRowHeaders: z.boolean().describe('If table needs special row headers, set this to true'),
166
179
  hasSummaryRow: z.boolean().describe('If table needs a summary row, set this to true'),
167
180
  }),
181
+ version: z.literal(1),
168
182
  });
169
183
  export type TableSlideData = z.infer<typeof TableSlideDataSchema>;
170
184
 
@@ -193,14 +207,16 @@ export const BarChartSlideDataSchema = z.object({
193
207
  .describe('Data series for the chart'),
194
208
  yAxisLabel: z.string().max(40).optional().describe('Y-axis label'),
195
209
  unit: z.string().max(10).optional().describe('Unit symbol (%, $, etc.)'),
210
+ version: z.literal(1),
196
211
  });
197
212
  export type BarChartSlideData = z.infer<typeof BarChartSlideDataSchema>;
198
213
 
199
214
  export const ChartSlideDataSchema = z.object({
200
215
  contentType: z.literal(SLIDE_CONTENT_TYPE.CHART),
201
216
  title: z.string().describe('Slide title in about 6 words').min(10).max(200),
202
- description: z.string().describe('Description of the slide in about 6 words').min(10).max(200),
217
+ description: z.string().describe("Information on slide's topic").min(10).max(400),
203
218
  chart: z.discriminatedUnion('type', [BarChartSlideDataSchema]),
219
+ version: z.literal(1),
204
220
  });
205
221
  export type ChartSlideData = z.infer<typeof ChartSlideDataSchema>;
206
222
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.7.16",
3
+ "version": "0.7.18",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",