@ai-grator/api 0.1.32 → 0.1.33

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 +265 -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 +411 -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 +146 -0
  38. package/build/model-page/models/public-model-detail.schema.d.ts +132 -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 +182 -0
  52. package/model-page/models/public-model-detail.schema.ts +5 -12
  53. package/package.json +1 -1
@@ -0,0 +1,411 @@
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
+ images: z.ZodArray<z.ZodObject<{
49
+ url: z.ZodURL;
50
+ alt: z.ZodString;
51
+ caption: z.ZodNullable<z.ZodString>;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>;
55
+ export declare const ComparisonBlockSchema: z.ZodObject<{
56
+ id: z.ZodString;
57
+ heading: z.ZodNullable<z.ZodString>;
58
+ intro: z.ZodNullable<z.ZodString>;
59
+ outro: z.ZodNullable<z.ZodString>;
60
+ type: z.ZodLiteral<"comparison">;
61
+ columns: z.ZodArray<z.ZodString>;
62
+ rows: z.ZodArray<z.ZodObject<{
63
+ label: z.ZodString;
64
+ values: z.ZodArray<z.ZodString>;
65
+ }, z.core.$strip>>;
66
+ }, z.core.$strip>;
67
+ export declare const ProsConsBlockSchema: z.ZodObject<{
68
+ id: z.ZodString;
69
+ heading: z.ZodNullable<z.ZodString>;
70
+ intro: z.ZodNullable<z.ZodString>;
71
+ outro: z.ZodNullable<z.ZodString>;
72
+ type: z.ZodLiteral<"prosCons">;
73
+ items: z.ZodArray<z.ZodObject<{
74
+ title: z.ZodString;
75
+ pros: z.ZodArray<z.ZodString>;
76
+ cons: z.ZodArray<z.ZodString>;
77
+ }, z.core.$strip>>;
78
+ }, z.core.$strip>;
79
+ export declare const StepsBlockSchema: z.ZodObject<{
80
+ id: z.ZodString;
81
+ heading: z.ZodNullable<z.ZodString>;
82
+ intro: z.ZodNullable<z.ZodString>;
83
+ outro: z.ZodNullable<z.ZodString>;
84
+ type: z.ZodLiteral<"steps">;
85
+ items: z.ZodArray<z.ZodObject<{
86
+ title: z.ZodString;
87
+ body: z.ZodString;
88
+ }, z.core.$strip>>;
89
+ }, z.core.$strip>;
90
+ export declare const FaqBlockSchema: z.ZodObject<{
91
+ id: z.ZodString;
92
+ heading: z.ZodNullable<z.ZodString>;
93
+ intro: z.ZodNullable<z.ZodString>;
94
+ outro: z.ZodNullable<z.ZodString>;
95
+ type: z.ZodLiteral<"faq">;
96
+ items: z.ZodArray<z.ZodObject<{
97
+ question: z.ZodString;
98
+ answer: z.ZodString;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>;
101
+ export declare const RELATED_LINK_KIND: {
102
+ readonly model: "model";
103
+ readonly task: "task";
104
+ };
105
+ export declare const RelatedLinksBlockSchema: z.ZodObject<{
106
+ id: z.ZodString;
107
+ heading: z.ZodNullable<z.ZodString>;
108
+ intro: z.ZodNullable<z.ZodString>;
109
+ outro: z.ZodNullable<z.ZodString>;
110
+ type: z.ZodLiteral<"relatedLinks">;
111
+ items: z.ZodArray<z.ZodObject<{
112
+ kind: z.ZodEnum<{
113
+ readonly model: "model";
114
+ readonly task: "task";
115
+ }>;
116
+ slug: z.ZodString;
117
+ title: z.ZodString;
118
+ note: z.ZodNullable<z.ZodString>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>;
121
+ export declare const DemoBlockSchema: z.ZodObject<{
122
+ id: z.ZodString;
123
+ heading: z.ZodNullable<z.ZodString>;
124
+ intro: z.ZodNullable<z.ZodString>;
125
+ outro: z.ZodNullable<z.ZodString>;
126
+ type: z.ZodLiteral<"demo">;
127
+ caption: z.ZodNullable<z.ZodString>;
128
+ presets: z.ZodArray<z.ZodObject<{
129
+ id: z.ZodString;
130
+ label: z.ZodString;
131
+ prompt: z.ZodString;
132
+ settings: z.ZodNullable<z.ZodString>;
133
+ image: z.ZodNullable<z.ZodObject<{
134
+ url: z.ZodURL;
135
+ alt: z.ZodString;
136
+ caption: z.ZodNullable<z.ZodString>;
137
+ }, z.core.$strip>>;
138
+ }, z.core.$strip>>;
139
+ }, z.core.$strip>;
140
+ export declare const PricingWidgetBlockSchema: z.ZodObject<{
141
+ id: z.ZodString;
142
+ heading: z.ZodNullable<z.ZodString>;
143
+ intro: z.ZodNullable<z.ZodString>;
144
+ outro: z.ZodNullable<z.ZodString>;
145
+ type: z.ZodLiteral<"pricingWidget">;
146
+ ctaLabel: z.ZodString;
147
+ ctaSlug: z.ZodString;
148
+ }, z.core.$strip>;
149
+ export declare const PageContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
+ id: z.ZodString;
151
+ heading: z.ZodNullable<z.ZodString>;
152
+ intro: z.ZodNullable<z.ZodString>;
153
+ outro: z.ZodNullable<z.ZodString>;
154
+ type: z.ZodLiteral<"richText">;
155
+ body: z.ZodString;
156
+ }, z.core.$strip>, z.ZodObject<{
157
+ id: z.ZodString;
158
+ heading: z.ZodNullable<z.ZodString>;
159
+ intro: z.ZodNullable<z.ZodString>;
160
+ outro: z.ZodNullable<z.ZodString>;
161
+ type: z.ZodLiteral<"featureList">;
162
+ items: z.ZodArray<z.ZodObject<{
163
+ title: z.ZodString;
164
+ body: z.ZodString;
165
+ }, z.core.$strip>>;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ id: z.ZodString;
168
+ heading: z.ZodNullable<z.ZodString>;
169
+ intro: z.ZodNullable<z.ZodString>;
170
+ outro: z.ZodNullable<z.ZodString>;
171
+ type: z.ZodLiteral<"specs">;
172
+ items: z.ZodArray<z.ZodObject<{
173
+ label: z.ZodString;
174
+ value: z.ZodString;
175
+ }, z.core.$strip>>;
176
+ }, z.core.$strip>, z.ZodObject<{
177
+ id: z.ZodString;
178
+ heading: z.ZodNullable<z.ZodString>;
179
+ intro: z.ZodNullable<z.ZodString>;
180
+ outro: z.ZodNullable<z.ZodString>;
181
+ type: z.ZodLiteral<"examples">;
182
+ items: z.ZodArray<z.ZodObject<{
183
+ title: z.ZodString;
184
+ alt: z.ZodString;
185
+ prompt: z.ZodString;
186
+ settings: z.ZodString;
187
+ images: z.ZodArray<z.ZodObject<{
188
+ url: z.ZodURL;
189
+ alt: z.ZodString;
190
+ caption: z.ZodNullable<z.ZodString>;
191
+ }, z.core.$strip>>;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ id: z.ZodString;
195
+ heading: z.ZodNullable<z.ZodString>;
196
+ intro: z.ZodNullable<z.ZodString>;
197
+ outro: z.ZodNullable<z.ZodString>;
198
+ type: z.ZodLiteral<"comparison">;
199
+ columns: z.ZodArray<z.ZodString>;
200
+ rows: z.ZodArray<z.ZodObject<{
201
+ label: z.ZodString;
202
+ values: z.ZodArray<z.ZodString>;
203
+ }, z.core.$strip>>;
204
+ }, z.core.$strip>, z.ZodObject<{
205
+ id: z.ZodString;
206
+ heading: z.ZodNullable<z.ZodString>;
207
+ intro: z.ZodNullable<z.ZodString>;
208
+ outro: z.ZodNullable<z.ZodString>;
209
+ type: z.ZodLiteral<"prosCons">;
210
+ items: z.ZodArray<z.ZodObject<{
211
+ title: z.ZodString;
212
+ pros: z.ZodArray<z.ZodString>;
213
+ cons: z.ZodArray<z.ZodString>;
214
+ }, z.core.$strip>>;
215
+ }, z.core.$strip>, z.ZodObject<{
216
+ id: z.ZodString;
217
+ heading: z.ZodNullable<z.ZodString>;
218
+ intro: z.ZodNullable<z.ZodString>;
219
+ outro: z.ZodNullable<z.ZodString>;
220
+ type: z.ZodLiteral<"steps">;
221
+ items: z.ZodArray<z.ZodObject<{
222
+ title: z.ZodString;
223
+ body: z.ZodString;
224
+ }, z.core.$strip>>;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ id: z.ZodString;
227
+ heading: z.ZodNullable<z.ZodString>;
228
+ intro: z.ZodNullable<z.ZodString>;
229
+ outro: z.ZodNullable<z.ZodString>;
230
+ type: z.ZodLiteral<"faq">;
231
+ items: z.ZodArray<z.ZodObject<{
232
+ question: z.ZodString;
233
+ answer: z.ZodString;
234
+ }, z.core.$strip>>;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ id: z.ZodString;
237
+ heading: z.ZodNullable<z.ZodString>;
238
+ intro: z.ZodNullable<z.ZodString>;
239
+ outro: z.ZodNullable<z.ZodString>;
240
+ type: z.ZodLiteral<"relatedLinks">;
241
+ items: z.ZodArray<z.ZodObject<{
242
+ kind: z.ZodEnum<{
243
+ readonly model: "model";
244
+ readonly task: "task";
245
+ }>;
246
+ slug: z.ZodString;
247
+ title: z.ZodString;
248
+ note: z.ZodNullable<z.ZodString>;
249
+ }, z.core.$strip>>;
250
+ }, z.core.$strip>, z.ZodObject<{
251
+ id: z.ZodString;
252
+ heading: z.ZodNullable<z.ZodString>;
253
+ intro: z.ZodNullable<z.ZodString>;
254
+ outro: z.ZodNullable<z.ZodString>;
255
+ type: z.ZodLiteral<"demo">;
256
+ caption: z.ZodNullable<z.ZodString>;
257
+ presets: z.ZodArray<z.ZodObject<{
258
+ id: z.ZodString;
259
+ label: z.ZodString;
260
+ prompt: z.ZodString;
261
+ settings: z.ZodNullable<z.ZodString>;
262
+ image: z.ZodNullable<z.ZodObject<{
263
+ url: z.ZodURL;
264
+ alt: z.ZodString;
265
+ caption: z.ZodNullable<z.ZodString>;
266
+ }, z.core.$strip>>;
267
+ }, z.core.$strip>>;
268
+ }, z.core.$strip>, z.ZodObject<{
269
+ id: z.ZodString;
270
+ heading: z.ZodNullable<z.ZodString>;
271
+ intro: z.ZodNullable<z.ZodString>;
272
+ outro: z.ZodNullable<z.ZodString>;
273
+ type: z.ZodLiteral<"pricingWidget">;
274
+ ctaLabel: z.ZodString;
275
+ ctaSlug: z.ZodString;
276
+ }, z.core.$strip>], "type">;
277
+ export declare const PageContentSchema: z.ZodObject<{
278
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
279
+ id: z.ZodString;
280
+ heading: z.ZodNullable<z.ZodString>;
281
+ intro: z.ZodNullable<z.ZodString>;
282
+ outro: z.ZodNullable<z.ZodString>;
283
+ type: z.ZodLiteral<"richText">;
284
+ body: z.ZodString;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ id: z.ZodString;
287
+ heading: z.ZodNullable<z.ZodString>;
288
+ intro: z.ZodNullable<z.ZodString>;
289
+ outro: z.ZodNullable<z.ZodString>;
290
+ type: z.ZodLiteral<"featureList">;
291
+ items: z.ZodArray<z.ZodObject<{
292
+ title: z.ZodString;
293
+ body: z.ZodString;
294
+ }, z.core.$strip>>;
295
+ }, z.core.$strip>, z.ZodObject<{
296
+ id: z.ZodString;
297
+ heading: z.ZodNullable<z.ZodString>;
298
+ intro: z.ZodNullable<z.ZodString>;
299
+ outro: z.ZodNullable<z.ZodString>;
300
+ type: z.ZodLiteral<"specs">;
301
+ items: z.ZodArray<z.ZodObject<{
302
+ label: z.ZodString;
303
+ value: z.ZodString;
304
+ }, z.core.$strip>>;
305
+ }, z.core.$strip>, z.ZodObject<{
306
+ id: z.ZodString;
307
+ heading: z.ZodNullable<z.ZodString>;
308
+ intro: z.ZodNullable<z.ZodString>;
309
+ outro: z.ZodNullable<z.ZodString>;
310
+ type: z.ZodLiteral<"examples">;
311
+ items: z.ZodArray<z.ZodObject<{
312
+ title: z.ZodString;
313
+ alt: z.ZodString;
314
+ prompt: z.ZodString;
315
+ settings: z.ZodString;
316
+ images: z.ZodArray<z.ZodObject<{
317
+ url: z.ZodURL;
318
+ alt: z.ZodString;
319
+ caption: z.ZodNullable<z.ZodString>;
320
+ }, z.core.$strip>>;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ id: z.ZodString;
324
+ heading: z.ZodNullable<z.ZodString>;
325
+ intro: z.ZodNullable<z.ZodString>;
326
+ outro: z.ZodNullable<z.ZodString>;
327
+ type: z.ZodLiteral<"comparison">;
328
+ columns: z.ZodArray<z.ZodString>;
329
+ rows: z.ZodArray<z.ZodObject<{
330
+ label: z.ZodString;
331
+ values: z.ZodArray<z.ZodString>;
332
+ }, z.core.$strip>>;
333
+ }, z.core.$strip>, z.ZodObject<{
334
+ id: z.ZodString;
335
+ heading: z.ZodNullable<z.ZodString>;
336
+ intro: z.ZodNullable<z.ZodString>;
337
+ outro: z.ZodNullable<z.ZodString>;
338
+ type: z.ZodLiteral<"prosCons">;
339
+ items: z.ZodArray<z.ZodObject<{
340
+ title: z.ZodString;
341
+ pros: z.ZodArray<z.ZodString>;
342
+ cons: z.ZodArray<z.ZodString>;
343
+ }, z.core.$strip>>;
344
+ }, z.core.$strip>, z.ZodObject<{
345
+ id: z.ZodString;
346
+ heading: z.ZodNullable<z.ZodString>;
347
+ intro: z.ZodNullable<z.ZodString>;
348
+ outro: z.ZodNullable<z.ZodString>;
349
+ type: z.ZodLiteral<"steps">;
350
+ items: z.ZodArray<z.ZodObject<{
351
+ title: z.ZodString;
352
+ body: z.ZodString;
353
+ }, z.core.$strip>>;
354
+ }, z.core.$strip>, z.ZodObject<{
355
+ id: z.ZodString;
356
+ heading: z.ZodNullable<z.ZodString>;
357
+ intro: z.ZodNullable<z.ZodString>;
358
+ outro: z.ZodNullable<z.ZodString>;
359
+ type: z.ZodLiteral<"faq">;
360
+ items: z.ZodArray<z.ZodObject<{
361
+ question: z.ZodString;
362
+ answer: z.ZodString;
363
+ }, z.core.$strip>>;
364
+ }, z.core.$strip>, z.ZodObject<{
365
+ id: z.ZodString;
366
+ heading: z.ZodNullable<z.ZodString>;
367
+ intro: z.ZodNullable<z.ZodString>;
368
+ outro: z.ZodNullable<z.ZodString>;
369
+ type: z.ZodLiteral<"relatedLinks">;
370
+ items: z.ZodArray<z.ZodObject<{
371
+ kind: z.ZodEnum<{
372
+ readonly model: "model";
373
+ readonly task: "task";
374
+ }>;
375
+ slug: z.ZodString;
376
+ title: z.ZodString;
377
+ note: z.ZodNullable<z.ZodString>;
378
+ }, z.core.$strip>>;
379
+ }, z.core.$strip>, z.ZodObject<{
380
+ id: z.ZodString;
381
+ heading: z.ZodNullable<z.ZodString>;
382
+ intro: z.ZodNullable<z.ZodString>;
383
+ outro: z.ZodNullable<z.ZodString>;
384
+ type: z.ZodLiteral<"demo">;
385
+ caption: z.ZodNullable<z.ZodString>;
386
+ presets: z.ZodArray<z.ZodObject<{
387
+ id: z.ZodString;
388
+ label: z.ZodString;
389
+ prompt: z.ZodString;
390
+ settings: z.ZodNullable<z.ZodString>;
391
+ image: z.ZodNullable<z.ZodObject<{
392
+ url: z.ZodURL;
393
+ alt: z.ZodString;
394
+ caption: z.ZodNullable<z.ZodString>;
395
+ }, z.core.$strip>>;
396
+ }, z.core.$strip>>;
397
+ }, z.core.$strip>, z.ZodObject<{
398
+ id: z.ZodString;
399
+ heading: z.ZodNullable<z.ZodString>;
400
+ intro: z.ZodNullable<z.ZodString>;
401
+ outro: z.ZodNullable<z.ZodString>;
402
+ type: z.ZodLiteral<"pricingWidget">;
403
+ ctaLabel: z.ZodString;
404
+ ctaSlug: z.ZodString;
405
+ }, z.core.$strip>], "type">>;
406
+ }, z.core.$strip>;
407
+ export type PageImageSchemaType = z.infer<typeof PageImageSchema>;
408
+ export type RelatedLinkKind = (typeof RELATED_LINK_KIND)[keyof typeof RELATED_LINK_KIND];
409
+ export type PageContentBlockSchemaType = z.infer<typeof PageContentBlockSchema>;
410
+ export type PageContentSchemaType = z.infer<typeof PageContentSchema>;
411
+ //# 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;;;;;;;;;;;;;;;;;iBAa9B,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;;;;;;;;;;;;;;;;;;iBAc1B,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,146 @@
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
+ images: zod_1.z.array(exports.PageImageSchema),
47
+ }))
48
+ .min(1),
49
+ });
50
+ exports.ComparisonBlockSchema = BlockBaseSchema.extend({
51
+ type: zod_1.z.literal('comparison'),
52
+ columns: zod_1.z.array(zod_1.z.string().min(1)).min(2),
53
+ rows: zod_1.z
54
+ .array(zod_1.z.object({
55
+ label: zod_1.z.string().min(1),
56
+ values: zod_1.z.array(zod_1.z.string().min(1)).min(1),
57
+ }))
58
+ .min(1),
59
+ }).superRefine((block, ctx) => {
60
+ block.rows.forEach((row, index) => {
61
+ if (row.values.length !== block.columns.length - 1) {
62
+ ctx.addIssue({
63
+ code: 'custom',
64
+ path: ['rows', index, 'values'],
65
+ message: `expected ${block.columns.length - 1} values to match columns`,
66
+ });
67
+ }
68
+ });
69
+ });
70
+ exports.ProsConsBlockSchema = BlockBaseSchema.extend({
71
+ type: zod_1.z.literal('prosCons'),
72
+ items: zod_1.z
73
+ .array(zod_1.z.object({
74
+ title: zod_1.z.string().min(1),
75
+ pros: zod_1.z.array(zod_1.z.string().min(1)),
76
+ cons: zod_1.z.array(zod_1.z.string().min(1)),
77
+ }))
78
+ .min(1),
79
+ });
80
+ exports.StepsBlockSchema = BlockBaseSchema.extend({
81
+ type: zod_1.z.literal('steps'),
82
+ items: zod_1.z
83
+ .array(zod_1.z.object({
84
+ title: zod_1.z.string().min(1),
85
+ body: zod_1.z.string().min(1),
86
+ }))
87
+ .min(1),
88
+ });
89
+ exports.FaqBlockSchema = BlockBaseSchema.extend({
90
+ type: zod_1.z.literal('faq'),
91
+ items: zod_1.z
92
+ .array(zod_1.z.object({
93
+ question: zod_1.z.string().min(1),
94
+ answer: zod_1.z.string().min(1),
95
+ }))
96
+ .min(1),
97
+ });
98
+ exports.RELATED_LINK_KIND = {
99
+ model: 'model',
100
+ task: 'task',
101
+ };
102
+ exports.RelatedLinksBlockSchema = BlockBaseSchema.extend({
103
+ type: zod_1.z.literal('relatedLinks'),
104
+ items: zod_1.z
105
+ .array(zod_1.z.object({
106
+ kind: zod_1.z.enum(exports.RELATED_LINK_KIND),
107
+ slug: zod_1.z.string().min(1),
108
+ title: zod_1.z.string().min(1),
109
+ note: zod_1.z.string().min(1).nullable(),
110
+ }))
111
+ .min(1),
112
+ });
113
+ exports.DemoBlockSchema = BlockBaseSchema.extend({
114
+ type: zod_1.z.literal('demo'),
115
+ caption: zod_1.z.string().min(1).nullable(),
116
+ presets: zod_1.z
117
+ .array(zod_1.z.object({
118
+ id: zod_1.z.string().min(1),
119
+ label: zod_1.z.string().min(1),
120
+ prompt: zod_1.z.string().min(1),
121
+ settings: zod_1.z.string().min(1).nullable(),
122
+ image: exports.PageImageSchema.nullable(),
123
+ }))
124
+ .min(1),
125
+ });
126
+ exports.PricingWidgetBlockSchema = BlockBaseSchema.extend({
127
+ type: zod_1.z.literal('pricingWidget'),
128
+ ctaLabel: zod_1.z.string().min(1),
129
+ ctaSlug: zod_1.z.string().min(1),
130
+ });
131
+ exports.PageContentBlockSchema = zod_1.z.discriminatedUnion('type', [
132
+ exports.RichTextBlockSchema,
133
+ exports.FeatureListBlockSchema,
134
+ exports.SpecsBlockSchema,
135
+ exports.ExamplesBlockSchema,
136
+ exports.ComparisonBlockSchema,
137
+ exports.ProsConsBlockSchema,
138
+ exports.StepsBlockSchema,
139
+ exports.FaqBlockSchema,
140
+ exports.RelatedLinksBlockSchema,
141
+ exports.DemoBlockSchema,
142
+ exports.PricingWidgetBlockSchema,
143
+ ]);
144
+ exports.PageContentSchema = zod_1.z.object({
145
+ blocks: zod_1.z.array(exports.PageContentBlockSchema),
146
+ });