@ai-grator/api 0.1.32 → 0.1.34

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.
Files changed (53) hide show
  1. package/ai-model/models/chat-price-scenarios.schema.ts +13 -0
  2. package/ai-model/models/index.ts +1 -0
  3. package/build/ai-model/models/chat-price-scenarios.schema.d.ts +13 -0
  4. package/build/ai-model/models/chat-price-scenarios.schema.d.ts.map +1 -0
  5. package/build/ai-model/models/chat-price-scenarios.schema.js +10 -0
  6. package/build/ai-model/models/index.d.ts +1 -0
  7. package/build/ai-model/models/index.d.ts.map +1 -1
  8. package/build/ai-model/models/index.js +1 -0
  9. package/build/errors/errors.d.ts +12 -0
  10. package/build/errors/errors.d.ts.map +1 -1
  11. package/build/errors/errors.js +12 -0
  12. package/build/generation-job/models/suno-params.schema.d.ts.map +1 -1
  13. package/build/generation-job/models/suno-params.schema.js +2 -1
  14. package/build/generation-model/endpoints/queries/get-generation-price.query.d.ts +1 -0
  15. package/build/generation-model/endpoints/queries/get-generation-price.query.d.ts.map +1 -1
  16. package/build/generation-model/endpoints/queries/get-generation-price.query.js +1 -0
  17. package/build/generation-model/models/index.d.ts +1 -0
  18. package/build/generation-model/models/index.d.ts.map +1 -1
  19. package/build/generation-model/models/index.js +1 -0
  20. package/build/generation-model/models/seo-price-scenarios.schema.d.ts +5 -0
  21. package/build/generation-model/models/seo-price-scenarios.schema.d.ts.map +1 -0
  22. package/build/generation-model/models/seo-price-scenarios.schema.js +6 -0
  23. package/build/model-catalog/enums/price-unit.enum.d.ts +2 -1
  24. package/build/model-catalog/enums/price-unit.enum.d.ts.map +1 -1
  25. package/build/model-catalog/enums/price-unit.enum.js +1 -0
  26. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts +269 -6
  27. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts.map +1 -1
  28. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.js +1 -0
  29. package/build/model-page/models/index.d.ts +2 -0
  30. package/build/model-page/models/index.d.ts.map +1 -1
  31. package/build/model-page/models/index.js +2 -0
  32. package/build/model-page/models/page-card.schema.d.ts +8 -0
  33. package/build/model-page/models/page-card.schema.d.ts.map +1 -0
  34. package/build/model-page/models/page-card.schema.js +9 -0
  35. package/build/model-page/models/page-content.schema.d.ts +417 -0
  36. package/build/model-page/models/page-content.schema.d.ts.map +1 -0
  37. package/build/model-page/models/page-content.schema.js +148 -0
  38. package/build/model-page/models/public-model-detail.schema.d.ts +134 -16
  39. package/build/model-page/models/public-model-detail.schema.d.ts.map +1 -1
  40. package/build/model-page/models/public-model-detail.schema.js +6 -10
  41. package/build/tsconfig.tsbuildinfo +1 -1
  42. package/errors/errors.ts +12 -0
  43. package/generation-job/models/suno-params.schema.ts +2 -1
  44. package/generation-model/endpoints/queries/get-generation-price.query.ts +1 -0
  45. package/generation-model/models/index.ts +1 -0
  46. package/generation-model/models/seo-price-scenarios.schema.ts +10 -0
  47. package/model-catalog/enums/price-unit.enum.ts +1 -0
  48. package/model-page/endpoints/queries/get-public-model-by-slug.query.ts +1 -0
  49. package/model-page/models/index.ts +2 -0
  50. package/model-page/models/page-card.schema.ts +9 -0
  51. package/model-page/models/page-content.schema.ts +184 -0
  52. package/model-page/models/public-model-detail.schema.ts +5 -12
  53. package/package.json +1 -1
@@ -0,0 +1,417 @@
1
+ import { z } from 'zod';
2
+ export declare const PageImageSchema: z.ZodObject<{
3
+ url: z.ZodURL;
4
+ alt: z.ZodString;
5
+ caption: z.ZodNullable<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export declare const RichTextBlockSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ heading: z.ZodNullable<z.ZodString>;
10
+ intro: z.ZodNullable<z.ZodString>;
11
+ outro: z.ZodNullable<z.ZodString>;
12
+ type: z.ZodLiteral<"richText">;
13
+ body: z.ZodString;
14
+ }, z.core.$strip>;
15
+ export declare const FeatureListBlockSchema: z.ZodObject<{
16
+ id: z.ZodString;
17
+ heading: z.ZodNullable<z.ZodString>;
18
+ intro: z.ZodNullable<z.ZodString>;
19
+ outro: z.ZodNullable<z.ZodString>;
20
+ type: z.ZodLiteral<"featureList">;
21
+ items: z.ZodArray<z.ZodObject<{
22
+ title: z.ZodString;
23
+ body: z.ZodString;
24
+ }, z.core.$strip>>;
25
+ }, z.core.$strip>;
26
+ export declare const SpecsBlockSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ heading: z.ZodNullable<z.ZodString>;
29
+ intro: z.ZodNullable<z.ZodString>;
30
+ outro: z.ZodNullable<z.ZodString>;
31
+ type: z.ZodLiteral<"specs">;
32
+ items: z.ZodArray<z.ZodObject<{
33
+ label: z.ZodString;
34
+ value: z.ZodString;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
37
+ export declare const ExamplesBlockSchema: z.ZodObject<{
38
+ id: z.ZodString;
39
+ heading: z.ZodNullable<z.ZodString>;
40
+ intro: z.ZodNullable<z.ZodString>;
41
+ outro: z.ZodNullable<z.ZodString>;
42
+ type: z.ZodLiteral<"examples">;
43
+ items: z.ZodArray<z.ZodObject<{
44
+ title: z.ZodString;
45
+ alt: z.ZodString;
46
+ prompt: z.ZodString;
47
+ settings: z.ZodString;
48
+ answer: z.ZodNullable<z.ZodString>;
49
+ images: z.ZodArray<z.ZodObject<{
50
+ url: z.ZodURL;
51
+ alt: z.ZodString;
52
+ caption: z.ZodNullable<z.ZodString>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>;
56
+ export declare const ComparisonBlockSchema: z.ZodObject<{
57
+ id: z.ZodString;
58
+ heading: z.ZodNullable<z.ZodString>;
59
+ intro: z.ZodNullable<z.ZodString>;
60
+ outro: z.ZodNullable<z.ZodString>;
61
+ type: z.ZodLiteral<"comparison">;
62
+ columns: z.ZodArray<z.ZodString>;
63
+ rows: z.ZodArray<z.ZodObject<{
64
+ label: z.ZodString;
65
+ values: z.ZodArray<z.ZodString>;
66
+ }, z.core.$strip>>;
67
+ }, z.core.$strip>;
68
+ export declare const ProsConsBlockSchema: z.ZodObject<{
69
+ id: z.ZodString;
70
+ heading: z.ZodNullable<z.ZodString>;
71
+ intro: z.ZodNullable<z.ZodString>;
72
+ outro: z.ZodNullable<z.ZodString>;
73
+ type: z.ZodLiteral<"prosCons">;
74
+ items: z.ZodArray<z.ZodObject<{
75
+ title: z.ZodString;
76
+ pros: z.ZodArray<z.ZodString>;
77
+ cons: z.ZodArray<z.ZodString>;
78
+ }, z.core.$strip>>;
79
+ }, z.core.$strip>;
80
+ export declare const StepsBlockSchema: z.ZodObject<{
81
+ id: z.ZodString;
82
+ heading: z.ZodNullable<z.ZodString>;
83
+ intro: z.ZodNullable<z.ZodString>;
84
+ outro: z.ZodNullable<z.ZodString>;
85
+ type: z.ZodLiteral<"steps">;
86
+ items: z.ZodArray<z.ZodObject<{
87
+ title: z.ZodString;
88
+ body: z.ZodString;
89
+ }, z.core.$strip>>;
90
+ }, z.core.$strip>;
91
+ export declare const FaqBlockSchema: z.ZodObject<{
92
+ id: z.ZodString;
93
+ heading: z.ZodNullable<z.ZodString>;
94
+ intro: z.ZodNullable<z.ZodString>;
95
+ outro: z.ZodNullable<z.ZodString>;
96
+ type: z.ZodLiteral<"faq">;
97
+ items: z.ZodArray<z.ZodObject<{
98
+ question: z.ZodString;
99
+ answer: z.ZodString;
100
+ }, z.core.$strip>>;
101
+ }, z.core.$strip>;
102
+ export declare const RELATED_LINK_KIND: {
103
+ readonly model: "model";
104
+ readonly task: "task";
105
+ };
106
+ export declare const RelatedLinksBlockSchema: z.ZodObject<{
107
+ id: z.ZodString;
108
+ heading: z.ZodNullable<z.ZodString>;
109
+ intro: z.ZodNullable<z.ZodString>;
110
+ outro: z.ZodNullable<z.ZodString>;
111
+ type: z.ZodLiteral<"relatedLinks">;
112
+ items: z.ZodArray<z.ZodObject<{
113
+ kind: z.ZodEnum<{
114
+ readonly model: "model";
115
+ readonly task: "task";
116
+ }>;
117
+ slug: z.ZodString;
118
+ title: z.ZodString;
119
+ note: z.ZodNullable<z.ZodString>;
120
+ }, z.core.$strip>>;
121
+ }, z.core.$strip>;
122
+ export declare const DemoBlockSchema: z.ZodObject<{
123
+ id: z.ZodString;
124
+ heading: z.ZodNullable<z.ZodString>;
125
+ intro: z.ZodNullable<z.ZodString>;
126
+ outro: z.ZodNullable<z.ZodString>;
127
+ type: z.ZodLiteral<"demo">;
128
+ caption: z.ZodNullable<z.ZodString>;
129
+ presets: z.ZodArray<z.ZodObject<{
130
+ id: z.ZodString;
131
+ label: z.ZodString;
132
+ prompt: z.ZodString;
133
+ settings: z.ZodNullable<z.ZodString>;
134
+ answer: z.ZodNullable<z.ZodString>;
135
+ image: z.ZodNullable<z.ZodObject<{
136
+ url: z.ZodURL;
137
+ alt: z.ZodString;
138
+ caption: z.ZodNullable<z.ZodString>;
139
+ }, z.core.$strip>>;
140
+ }, z.core.$strip>>;
141
+ }, z.core.$strip>;
142
+ export declare const PricingWidgetBlockSchema: z.ZodObject<{
143
+ id: z.ZodString;
144
+ heading: z.ZodNullable<z.ZodString>;
145
+ intro: z.ZodNullable<z.ZodString>;
146
+ outro: z.ZodNullable<z.ZodString>;
147
+ type: z.ZodLiteral<"pricingWidget">;
148
+ ctaLabel: z.ZodString;
149
+ ctaSlug: z.ZodString;
150
+ }, z.core.$strip>;
151
+ export declare const PageContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
152
+ id: z.ZodString;
153
+ heading: z.ZodNullable<z.ZodString>;
154
+ intro: z.ZodNullable<z.ZodString>;
155
+ outro: z.ZodNullable<z.ZodString>;
156
+ type: z.ZodLiteral<"richText">;
157
+ body: z.ZodString;
158
+ }, z.core.$strip>, z.ZodObject<{
159
+ id: z.ZodString;
160
+ heading: z.ZodNullable<z.ZodString>;
161
+ intro: z.ZodNullable<z.ZodString>;
162
+ outro: z.ZodNullable<z.ZodString>;
163
+ type: z.ZodLiteral<"featureList">;
164
+ items: z.ZodArray<z.ZodObject<{
165
+ title: z.ZodString;
166
+ body: z.ZodString;
167
+ }, z.core.$strip>>;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ id: z.ZodString;
170
+ heading: z.ZodNullable<z.ZodString>;
171
+ intro: z.ZodNullable<z.ZodString>;
172
+ outro: z.ZodNullable<z.ZodString>;
173
+ type: z.ZodLiteral<"specs">;
174
+ items: z.ZodArray<z.ZodObject<{
175
+ label: z.ZodString;
176
+ value: z.ZodString;
177
+ }, z.core.$strip>>;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ id: z.ZodString;
180
+ heading: z.ZodNullable<z.ZodString>;
181
+ intro: z.ZodNullable<z.ZodString>;
182
+ outro: z.ZodNullable<z.ZodString>;
183
+ type: z.ZodLiteral<"examples">;
184
+ items: z.ZodArray<z.ZodObject<{
185
+ title: z.ZodString;
186
+ alt: z.ZodString;
187
+ prompt: z.ZodString;
188
+ settings: z.ZodString;
189
+ answer: z.ZodNullable<z.ZodString>;
190
+ images: z.ZodArray<z.ZodObject<{
191
+ url: z.ZodURL;
192
+ alt: z.ZodString;
193
+ caption: z.ZodNullable<z.ZodString>;
194
+ }, z.core.$strip>>;
195
+ }, z.core.$strip>>;
196
+ }, z.core.$strip>, z.ZodObject<{
197
+ id: z.ZodString;
198
+ heading: z.ZodNullable<z.ZodString>;
199
+ intro: z.ZodNullable<z.ZodString>;
200
+ outro: z.ZodNullable<z.ZodString>;
201
+ type: z.ZodLiteral<"comparison">;
202
+ columns: z.ZodArray<z.ZodString>;
203
+ rows: z.ZodArray<z.ZodObject<{
204
+ label: z.ZodString;
205
+ values: z.ZodArray<z.ZodString>;
206
+ }, z.core.$strip>>;
207
+ }, z.core.$strip>, z.ZodObject<{
208
+ id: z.ZodString;
209
+ heading: z.ZodNullable<z.ZodString>;
210
+ intro: z.ZodNullable<z.ZodString>;
211
+ outro: z.ZodNullable<z.ZodString>;
212
+ type: z.ZodLiteral<"prosCons">;
213
+ items: z.ZodArray<z.ZodObject<{
214
+ title: z.ZodString;
215
+ pros: z.ZodArray<z.ZodString>;
216
+ cons: z.ZodArray<z.ZodString>;
217
+ }, z.core.$strip>>;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ id: z.ZodString;
220
+ heading: z.ZodNullable<z.ZodString>;
221
+ intro: z.ZodNullable<z.ZodString>;
222
+ outro: z.ZodNullable<z.ZodString>;
223
+ type: z.ZodLiteral<"steps">;
224
+ items: z.ZodArray<z.ZodObject<{
225
+ title: z.ZodString;
226
+ body: z.ZodString;
227
+ }, z.core.$strip>>;
228
+ }, z.core.$strip>, z.ZodObject<{
229
+ id: z.ZodString;
230
+ heading: z.ZodNullable<z.ZodString>;
231
+ intro: z.ZodNullable<z.ZodString>;
232
+ outro: z.ZodNullable<z.ZodString>;
233
+ type: z.ZodLiteral<"faq">;
234
+ items: z.ZodArray<z.ZodObject<{
235
+ question: z.ZodString;
236
+ answer: z.ZodString;
237
+ }, z.core.$strip>>;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ id: z.ZodString;
240
+ heading: z.ZodNullable<z.ZodString>;
241
+ intro: z.ZodNullable<z.ZodString>;
242
+ outro: z.ZodNullable<z.ZodString>;
243
+ type: z.ZodLiteral<"relatedLinks">;
244
+ items: z.ZodArray<z.ZodObject<{
245
+ kind: z.ZodEnum<{
246
+ readonly model: "model";
247
+ readonly task: "task";
248
+ }>;
249
+ slug: z.ZodString;
250
+ title: z.ZodString;
251
+ note: z.ZodNullable<z.ZodString>;
252
+ }, z.core.$strip>>;
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ id: z.ZodString;
255
+ heading: z.ZodNullable<z.ZodString>;
256
+ intro: z.ZodNullable<z.ZodString>;
257
+ outro: z.ZodNullable<z.ZodString>;
258
+ type: z.ZodLiteral<"demo">;
259
+ caption: z.ZodNullable<z.ZodString>;
260
+ presets: z.ZodArray<z.ZodObject<{
261
+ id: z.ZodString;
262
+ label: z.ZodString;
263
+ prompt: z.ZodString;
264
+ settings: z.ZodNullable<z.ZodString>;
265
+ answer: z.ZodNullable<z.ZodString>;
266
+ image: z.ZodNullable<z.ZodObject<{
267
+ url: z.ZodURL;
268
+ alt: z.ZodString;
269
+ caption: z.ZodNullable<z.ZodString>;
270
+ }, z.core.$strip>>;
271
+ }, z.core.$strip>>;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ id: z.ZodString;
274
+ heading: z.ZodNullable<z.ZodString>;
275
+ intro: z.ZodNullable<z.ZodString>;
276
+ outro: z.ZodNullable<z.ZodString>;
277
+ type: z.ZodLiteral<"pricingWidget">;
278
+ ctaLabel: z.ZodString;
279
+ ctaSlug: z.ZodString;
280
+ }, z.core.$strip>], "type">;
281
+ export declare const PageContentSchema: z.ZodObject<{
282
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
283
+ id: z.ZodString;
284
+ heading: z.ZodNullable<z.ZodString>;
285
+ intro: z.ZodNullable<z.ZodString>;
286
+ outro: z.ZodNullable<z.ZodString>;
287
+ type: z.ZodLiteral<"richText">;
288
+ body: z.ZodString;
289
+ }, z.core.$strip>, z.ZodObject<{
290
+ id: z.ZodString;
291
+ heading: z.ZodNullable<z.ZodString>;
292
+ intro: z.ZodNullable<z.ZodString>;
293
+ outro: z.ZodNullable<z.ZodString>;
294
+ type: z.ZodLiteral<"featureList">;
295
+ items: z.ZodArray<z.ZodObject<{
296
+ title: z.ZodString;
297
+ body: z.ZodString;
298
+ }, z.core.$strip>>;
299
+ }, z.core.$strip>, z.ZodObject<{
300
+ id: z.ZodString;
301
+ heading: z.ZodNullable<z.ZodString>;
302
+ intro: z.ZodNullable<z.ZodString>;
303
+ outro: z.ZodNullable<z.ZodString>;
304
+ type: z.ZodLiteral<"specs">;
305
+ items: z.ZodArray<z.ZodObject<{
306
+ label: z.ZodString;
307
+ value: z.ZodString;
308
+ }, z.core.$strip>>;
309
+ }, z.core.$strip>, z.ZodObject<{
310
+ id: z.ZodString;
311
+ heading: z.ZodNullable<z.ZodString>;
312
+ intro: z.ZodNullable<z.ZodString>;
313
+ outro: z.ZodNullable<z.ZodString>;
314
+ type: z.ZodLiteral<"examples">;
315
+ items: z.ZodArray<z.ZodObject<{
316
+ title: z.ZodString;
317
+ alt: z.ZodString;
318
+ prompt: z.ZodString;
319
+ settings: z.ZodString;
320
+ answer: z.ZodNullable<z.ZodString>;
321
+ images: z.ZodArray<z.ZodObject<{
322
+ url: z.ZodURL;
323
+ alt: z.ZodString;
324
+ caption: z.ZodNullable<z.ZodString>;
325
+ }, z.core.$strip>>;
326
+ }, z.core.$strip>>;
327
+ }, z.core.$strip>, z.ZodObject<{
328
+ id: z.ZodString;
329
+ heading: z.ZodNullable<z.ZodString>;
330
+ intro: z.ZodNullable<z.ZodString>;
331
+ outro: z.ZodNullable<z.ZodString>;
332
+ type: z.ZodLiteral<"comparison">;
333
+ columns: z.ZodArray<z.ZodString>;
334
+ rows: z.ZodArray<z.ZodObject<{
335
+ label: z.ZodString;
336
+ values: z.ZodArray<z.ZodString>;
337
+ }, z.core.$strip>>;
338
+ }, z.core.$strip>, z.ZodObject<{
339
+ id: z.ZodString;
340
+ heading: z.ZodNullable<z.ZodString>;
341
+ intro: z.ZodNullable<z.ZodString>;
342
+ outro: z.ZodNullable<z.ZodString>;
343
+ type: z.ZodLiteral<"prosCons">;
344
+ items: z.ZodArray<z.ZodObject<{
345
+ title: z.ZodString;
346
+ pros: z.ZodArray<z.ZodString>;
347
+ cons: z.ZodArray<z.ZodString>;
348
+ }, z.core.$strip>>;
349
+ }, z.core.$strip>, z.ZodObject<{
350
+ id: z.ZodString;
351
+ heading: z.ZodNullable<z.ZodString>;
352
+ intro: z.ZodNullable<z.ZodString>;
353
+ outro: z.ZodNullable<z.ZodString>;
354
+ type: z.ZodLiteral<"steps">;
355
+ items: z.ZodArray<z.ZodObject<{
356
+ title: z.ZodString;
357
+ body: z.ZodString;
358
+ }, z.core.$strip>>;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ id: z.ZodString;
361
+ heading: z.ZodNullable<z.ZodString>;
362
+ intro: z.ZodNullable<z.ZodString>;
363
+ outro: z.ZodNullable<z.ZodString>;
364
+ type: z.ZodLiteral<"faq">;
365
+ items: z.ZodArray<z.ZodObject<{
366
+ question: z.ZodString;
367
+ answer: z.ZodString;
368
+ }, z.core.$strip>>;
369
+ }, z.core.$strip>, z.ZodObject<{
370
+ id: z.ZodString;
371
+ heading: z.ZodNullable<z.ZodString>;
372
+ intro: z.ZodNullable<z.ZodString>;
373
+ outro: z.ZodNullable<z.ZodString>;
374
+ type: z.ZodLiteral<"relatedLinks">;
375
+ items: z.ZodArray<z.ZodObject<{
376
+ kind: z.ZodEnum<{
377
+ readonly model: "model";
378
+ readonly task: "task";
379
+ }>;
380
+ slug: z.ZodString;
381
+ title: z.ZodString;
382
+ note: z.ZodNullable<z.ZodString>;
383
+ }, z.core.$strip>>;
384
+ }, z.core.$strip>, z.ZodObject<{
385
+ id: z.ZodString;
386
+ heading: z.ZodNullable<z.ZodString>;
387
+ intro: z.ZodNullable<z.ZodString>;
388
+ outro: z.ZodNullable<z.ZodString>;
389
+ type: z.ZodLiteral<"demo">;
390
+ caption: z.ZodNullable<z.ZodString>;
391
+ presets: z.ZodArray<z.ZodObject<{
392
+ id: z.ZodString;
393
+ label: z.ZodString;
394
+ prompt: z.ZodString;
395
+ settings: z.ZodNullable<z.ZodString>;
396
+ answer: z.ZodNullable<z.ZodString>;
397
+ image: z.ZodNullable<z.ZodObject<{
398
+ url: z.ZodURL;
399
+ alt: z.ZodString;
400
+ caption: z.ZodNullable<z.ZodString>;
401
+ }, z.core.$strip>>;
402
+ }, z.core.$strip>>;
403
+ }, z.core.$strip>, z.ZodObject<{
404
+ id: z.ZodString;
405
+ heading: z.ZodNullable<z.ZodString>;
406
+ intro: z.ZodNullable<z.ZodString>;
407
+ outro: z.ZodNullable<z.ZodString>;
408
+ type: z.ZodLiteral<"pricingWidget">;
409
+ ctaLabel: z.ZodString;
410
+ ctaSlug: z.ZodString;
411
+ }, z.core.$strip>], "type">>;
412
+ }, z.core.$strip>;
413
+ export type PageImageSchemaType = z.infer<typeof PageImageSchema>;
414
+ export type RelatedLinkKind = (typeof RELATED_LINK_KIND)[keyof typeof RELATED_LINK_KIND];
415
+ export type PageContentBlockSchemaType = z.infer<typeof PageContentBlockSchema>;
416
+ export type PageContentSchemaType = z.infer<typeof PageContentSchema>;
417
+ //# sourceMappingURL=page-content.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-content.schema.d.ts","sourceRoot":"","sources":["../../../model-page/models/page-content.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AASH,eAAO,MAAM,mBAAmB;;;;;;;iBAG9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;iBAUjC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAU3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;iBAc9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAqBhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAW9B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAU3B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;iBAUzB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAYlC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iBAe1B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;iBAInC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAYjC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE5B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AACzF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageContentSchema = exports.PageContentBlockSchema = exports.PricingWidgetBlockSchema = exports.DemoBlockSchema = exports.RelatedLinksBlockSchema = exports.RELATED_LINK_KIND = exports.FaqBlockSchema = exports.StepsBlockSchema = exports.ProsConsBlockSchema = exports.ComparisonBlockSchema = exports.ExamplesBlockSchema = exports.SpecsBlockSchema = exports.FeatureListBlockSchema = exports.RichTextBlockSchema = exports.PageImageSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PageImageSchema = zod_1.z.object({
6
+ url: zod_1.z.url(),
7
+ alt: zod_1.z.string().min(1),
8
+ caption: zod_1.z.string().min(1).nullable(),
9
+ });
10
+ const BlockBaseSchema = zod_1.z.object({
11
+ id: zod_1.z.string().min(1),
12
+ heading: zod_1.z.string().min(1).nullable(),
13
+ intro: zod_1.z.string().min(1).nullable(),
14
+ outro: zod_1.z.string().min(1).nullable(),
15
+ });
16
+ exports.RichTextBlockSchema = BlockBaseSchema.extend({
17
+ type: zod_1.z.literal('richText'),
18
+ body: zod_1.z.string().min(1),
19
+ });
20
+ exports.FeatureListBlockSchema = BlockBaseSchema.extend({
21
+ type: zod_1.z.literal('featureList'),
22
+ items: zod_1.z
23
+ .array(zod_1.z.object({
24
+ title: zod_1.z.string().min(1),
25
+ body: zod_1.z.string().min(1),
26
+ }))
27
+ .min(1),
28
+ });
29
+ exports.SpecsBlockSchema = BlockBaseSchema.extend({
30
+ type: zod_1.z.literal('specs'),
31
+ items: zod_1.z
32
+ .array(zod_1.z.object({
33
+ label: zod_1.z.string().min(1),
34
+ value: zod_1.z.string().min(1),
35
+ }))
36
+ .min(1),
37
+ });
38
+ exports.ExamplesBlockSchema = BlockBaseSchema.extend({
39
+ type: zod_1.z.literal('examples'),
40
+ items: zod_1.z
41
+ .array(zod_1.z.object({
42
+ title: zod_1.z.string().min(1),
43
+ alt: zod_1.z.string().min(1),
44
+ prompt: zod_1.z.string().min(1),
45
+ settings: zod_1.z.string().min(1),
46
+ answer: zod_1.z.string().min(1).nullable(),
47
+ images: zod_1.z.array(exports.PageImageSchema),
48
+ }))
49
+ .min(1),
50
+ });
51
+ exports.ComparisonBlockSchema = BlockBaseSchema.extend({
52
+ type: zod_1.z.literal('comparison'),
53
+ columns: zod_1.z.array(zod_1.z.string().min(1)).min(2),
54
+ rows: zod_1.z
55
+ .array(zod_1.z.object({
56
+ label: zod_1.z.string().min(1),
57
+ values: zod_1.z.array(zod_1.z.string().min(1)).min(1),
58
+ }))
59
+ .min(1),
60
+ }).superRefine((block, ctx) => {
61
+ block.rows.forEach((row, index) => {
62
+ if (row.values.length !== block.columns.length - 1) {
63
+ ctx.addIssue({
64
+ code: 'custom',
65
+ path: ['rows', index, 'values'],
66
+ message: `expected ${block.columns.length - 1} values to match columns`,
67
+ });
68
+ }
69
+ });
70
+ });
71
+ exports.ProsConsBlockSchema = BlockBaseSchema.extend({
72
+ type: zod_1.z.literal('prosCons'),
73
+ items: zod_1.z
74
+ .array(zod_1.z.object({
75
+ title: zod_1.z.string().min(1),
76
+ pros: zod_1.z.array(zod_1.z.string().min(1)),
77
+ cons: zod_1.z.array(zod_1.z.string().min(1)),
78
+ }))
79
+ .min(1),
80
+ });
81
+ exports.StepsBlockSchema = BlockBaseSchema.extend({
82
+ type: zod_1.z.literal('steps'),
83
+ items: zod_1.z
84
+ .array(zod_1.z.object({
85
+ title: zod_1.z.string().min(1),
86
+ body: zod_1.z.string().min(1),
87
+ }))
88
+ .min(1),
89
+ });
90
+ exports.FaqBlockSchema = BlockBaseSchema.extend({
91
+ type: zod_1.z.literal('faq'),
92
+ items: zod_1.z
93
+ .array(zod_1.z.object({
94
+ question: zod_1.z.string().min(1),
95
+ answer: zod_1.z.string().min(1),
96
+ }))
97
+ .min(1),
98
+ });
99
+ exports.RELATED_LINK_KIND = {
100
+ model: 'model',
101
+ task: 'task',
102
+ };
103
+ exports.RelatedLinksBlockSchema = BlockBaseSchema.extend({
104
+ type: zod_1.z.literal('relatedLinks'),
105
+ items: zod_1.z
106
+ .array(zod_1.z.object({
107
+ kind: zod_1.z.enum(exports.RELATED_LINK_KIND),
108
+ slug: zod_1.z.string().min(1),
109
+ title: zod_1.z.string().min(1),
110
+ note: zod_1.z.string().min(1).nullable(),
111
+ }))
112
+ .min(1),
113
+ });
114
+ exports.DemoBlockSchema = BlockBaseSchema.extend({
115
+ type: zod_1.z.literal('demo'),
116
+ caption: zod_1.z.string().min(1).nullable(),
117
+ presets: zod_1.z
118
+ .array(zod_1.z.object({
119
+ id: zod_1.z.string().min(1),
120
+ label: zod_1.z.string().min(1),
121
+ prompt: zod_1.z.string().min(1),
122
+ settings: zod_1.z.string().min(1).nullable(),
123
+ answer: zod_1.z.string().min(1).nullable(),
124
+ image: exports.PageImageSchema.nullable(),
125
+ }))
126
+ .min(1),
127
+ });
128
+ exports.PricingWidgetBlockSchema = BlockBaseSchema.extend({
129
+ type: zod_1.z.literal('pricingWidget'),
130
+ ctaLabel: zod_1.z.string().min(1),
131
+ ctaSlug: zod_1.z.string().min(1),
132
+ });
133
+ exports.PageContentBlockSchema = zod_1.z.discriminatedUnion('type', [
134
+ exports.RichTextBlockSchema,
135
+ exports.FeatureListBlockSchema,
136
+ exports.SpecsBlockSchema,
137
+ exports.ExamplesBlockSchema,
138
+ exports.ComparisonBlockSchema,
139
+ exports.ProsConsBlockSchema,
140
+ exports.StepsBlockSchema,
141
+ exports.FaqBlockSchema,
142
+ exports.RelatedLinksBlockSchema,
143
+ exports.DemoBlockSchema,
144
+ exports.PricingWidgetBlockSchema,
145
+ ]);
146
+ exports.PageContentSchema = zod_1.z.object({
147
+ blocks: zod_1.z.array(exports.PageContentBlockSchema),
148
+ });