@ai-grator/api 0.1.31 → 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 (83) 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/index.d.ts +1 -0
  24. package/build/index.d.ts.map +1 -1
  25. package/build/index.js +1 -0
  26. package/build/model-catalog/enums/price-unit.enum.d.ts +2 -1
  27. package/build/model-catalog/enums/price-unit.enum.d.ts.map +1 -1
  28. package/build/model-catalog/enums/price-unit.enum.js +1 -0
  29. package/build/model-page/endpoints/index.d.ts +3 -0
  30. package/build/model-page/endpoints/index.d.ts.map +1 -0
  31. package/build/model-page/endpoints/index.js +18 -0
  32. package/build/model-page/endpoints/model-page.d.ts +6 -0
  33. package/build/model-page/endpoints/model-page.d.ts.map +1 -0
  34. package/build/model-page/endpoints/model-page.js +8 -0
  35. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts +349 -0
  36. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts.map +1 -0
  37. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.js +25 -0
  38. package/build/model-page/endpoints/queries/index.d.ts +3 -0
  39. package/build/model-page/endpoints/queries/index.d.ts.map +1 -0
  40. package/build/model-page/endpoints/queries/index.js +18 -0
  41. package/build/model-page/endpoints/queries/list-public-models.query.d.ts +39 -0
  42. package/build/model-page/endpoints/queries/list-public-models.query.d.ts.map +1 -0
  43. package/build/model-page/endpoints/queries/list-public-models.query.js +19 -0
  44. package/build/model-page/index.d.ts +3 -0
  45. package/build/model-page/index.d.ts.map +1 -0
  46. package/build/model-page/index.js +18 -0
  47. package/build/model-page/models/index.d.ts +5 -0
  48. package/build/model-page/models/index.d.ts.map +1 -0
  49. package/build/model-page/models/index.js +20 -0
  50. package/build/model-page/models/page-card.schema.d.ts +8 -0
  51. package/build/model-page/models/page-card.schema.d.ts.map +1 -0
  52. package/build/model-page/models/page-card.schema.js +9 -0
  53. package/build/model-page/models/page-content.schema.d.ts +411 -0
  54. package/build/model-page/models/page-content.schema.d.ts.map +1 -0
  55. package/build/model-page/models/page-content.schema.js +146 -0
  56. package/build/model-page/models/public-model-card.schema.d.ts +16 -0
  57. package/build/model-page/models/public-model-card.schema.d.ts.map +1 -0
  58. package/build/model-page/models/public-model-card.schema.js +15 -0
  59. package/build/model-page/models/public-model-detail.schema.d.ts +190 -0
  60. package/build/model-page/models/public-model-detail.schema.d.ts.map +1 -0
  61. package/build/model-page/models/public-model-detail.schema.js +32 -0
  62. package/build/scripts/generate-openapi.js +36 -0
  63. package/build/tsconfig.tsbuildinfo +1 -1
  64. package/errors/errors.ts +12 -0
  65. package/generation-job/models/suno-params.schema.ts +2 -1
  66. package/generation-model/endpoints/queries/get-generation-price.query.ts +1 -0
  67. package/generation-model/models/index.ts +1 -0
  68. package/generation-model/models/seo-price-scenarios.schema.ts +10 -0
  69. package/index.ts +1 -0
  70. package/model-catalog/enums/price-unit.enum.ts +1 -0
  71. package/model-page/endpoints/index.ts +2 -0
  72. package/model-page/endpoints/model-page.ts +6 -0
  73. package/model-page/endpoints/queries/get-public-model-by-slug.query.ts +25 -0
  74. package/model-page/endpoints/queries/index.ts +2 -0
  75. package/model-page/endpoints/queries/list-public-models.query.ts +18 -0
  76. package/model-page/index.ts +2 -0
  77. package/model-page/models/index.ts +4 -0
  78. package/model-page/models/page-card.schema.ts +9 -0
  79. package/model-page/models/page-content.schema.ts +182 -0
  80. package/model-page/models/public-model-card.schema.ts +15 -0
  81. package/model-page/models/public-model-detail.schema.ts +38 -0
  82. package/package.json +1 -1
  83. package/scripts/generate-openapi.ts +45 -0
@@ -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
+ });
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { MODEL_CATEGORY } from '../../model-catalog';
3
+ export declare const PublicModelCardSchema: z.ZodObject<{
4
+ slug: z.ZodString;
5
+ title: z.ZodString;
6
+ description: z.ZodNullable<z.ZodString>;
7
+ vendorName: z.ZodString;
8
+ icons: z.ZodObject<{
9
+ light: z.ZodString;
10
+ dark: z.ZodString;
11
+ }, z.core.$strip>;
12
+ category: z.ZodEnum<typeof MODEL_CATEGORY>;
13
+ order: z.ZodNumber;
14
+ }, z.core.$strip>;
15
+ export type PublicModelCardSchemaType = z.infer<typeof PublicModelCardSchema>;
16
+ //# sourceMappingURL=public-model-card.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-model-card.schema.d.ts","sourceRoot":"","sources":["../../../model-page/models/public-model-card.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAQhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicModelCardSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../_common");
6
+ const model_catalog_1 = require("../../model-catalog");
7
+ exports.PublicModelCardSchema = zod_1.z.object({
8
+ slug: zod_1.z.string().min(1),
9
+ title: zod_1.z.string().min(1),
10
+ description: zod_1.z.string().nullable(),
11
+ vendorName: zod_1.z.string().min(1),
12
+ icons: _common_1.IconSchema,
13
+ category: zod_1.z.enum(model_catalog_1.MODEL_CATEGORY),
14
+ order: zod_1.z.number().int(),
15
+ });
@@ -0,0 +1,190 @@
1
+ import { z } from 'zod';
2
+ import { FILE_TYPE } from '../../file';
3
+ export declare const PublicChatModelCapabilitiesSchema: z.ZodObject<{
4
+ reasoning: z.ZodBoolean;
5
+ webSearch: z.ZodBoolean;
6
+ supportedFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
7
+ }, z.core.$strip>;
8
+ export declare const PublicChatModelDetailsSchema: z.ZodObject<{
9
+ type: z.ZodArray<z.ZodString>;
10
+ features: z.ZodArray<z.ZodString>;
11
+ maxMessageLength: z.ZodNumber;
12
+ maxContextWindow: z.ZodNumber;
13
+ capabilities: z.ZodObject<{
14
+ reasoning: z.ZodBoolean;
15
+ webSearch: z.ZodBoolean;
16
+ supportedFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
17
+ }, z.core.$strip>;
18
+ }, z.core.$strip>;
19
+ export declare const PublicGenerationModelDetailsSchema: z.ZodObject<{
20
+ supportedInputFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
21
+ }, z.core.$strip>;
22
+ export declare const PublicModelDetailSchema: z.ZodObject<{
23
+ slug: z.ZodString;
24
+ title: z.ZodString;
25
+ description: z.ZodNullable<z.ZodString>;
26
+ vendorName: z.ZodString;
27
+ icons: z.ZodObject<{
28
+ light: z.ZodString;
29
+ dark: z.ZodString;
30
+ }, z.core.$strip>;
31
+ category: z.ZodEnum<typeof import("../..").MODEL_CATEGORY>;
32
+ order: z.ZodNumber;
33
+ h1: z.ZodString;
34
+ card: z.ZodNullable<z.ZodObject<{
35
+ subtitle: z.ZodString;
36
+ ctaLabel: z.ZodString;
37
+ badges: z.ZodArray<z.ZodString>;
38
+ }, z.core.$strip>>;
39
+ seoTitle: z.ZodString;
40
+ seoDescription: z.ZodNullable<z.ZodString>;
41
+ content: z.ZodNullable<z.ZodObject<{
42
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
43
+ id: z.ZodString;
44
+ heading: z.ZodNullable<z.ZodString>;
45
+ intro: z.ZodNullable<z.ZodString>;
46
+ outro: z.ZodNullable<z.ZodString>;
47
+ type: z.ZodLiteral<"richText">;
48
+ body: z.ZodString;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ id: z.ZodString;
51
+ heading: z.ZodNullable<z.ZodString>;
52
+ intro: z.ZodNullable<z.ZodString>;
53
+ outro: z.ZodNullable<z.ZodString>;
54
+ type: z.ZodLiteral<"featureList">;
55
+ items: z.ZodArray<z.ZodObject<{
56
+ title: z.ZodString;
57
+ body: z.ZodString;
58
+ }, z.core.$strip>>;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ id: z.ZodString;
61
+ heading: z.ZodNullable<z.ZodString>;
62
+ intro: z.ZodNullable<z.ZodString>;
63
+ outro: z.ZodNullable<z.ZodString>;
64
+ type: z.ZodLiteral<"specs">;
65
+ items: z.ZodArray<z.ZodObject<{
66
+ label: z.ZodString;
67
+ value: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ id: z.ZodString;
71
+ heading: z.ZodNullable<z.ZodString>;
72
+ intro: z.ZodNullable<z.ZodString>;
73
+ outro: z.ZodNullable<z.ZodString>;
74
+ type: z.ZodLiteral<"examples">;
75
+ items: z.ZodArray<z.ZodObject<{
76
+ title: z.ZodString;
77
+ alt: z.ZodString;
78
+ prompt: z.ZodString;
79
+ settings: z.ZodString;
80
+ images: z.ZodArray<z.ZodObject<{
81
+ url: z.ZodURL;
82
+ alt: z.ZodString;
83
+ caption: z.ZodNullable<z.ZodString>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ id: z.ZodString;
88
+ heading: z.ZodNullable<z.ZodString>;
89
+ intro: z.ZodNullable<z.ZodString>;
90
+ outro: z.ZodNullable<z.ZodString>;
91
+ type: z.ZodLiteral<"comparison">;
92
+ columns: z.ZodArray<z.ZodString>;
93
+ rows: z.ZodArray<z.ZodObject<{
94
+ label: z.ZodString;
95
+ values: z.ZodArray<z.ZodString>;
96
+ }, z.core.$strip>>;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ id: z.ZodString;
99
+ heading: z.ZodNullable<z.ZodString>;
100
+ intro: z.ZodNullable<z.ZodString>;
101
+ outro: z.ZodNullable<z.ZodString>;
102
+ type: z.ZodLiteral<"prosCons">;
103
+ items: z.ZodArray<z.ZodObject<{
104
+ title: z.ZodString;
105
+ pros: z.ZodArray<z.ZodString>;
106
+ cons: z.ZodArray<z.ZodString>;
107
+ }, z.core.$strip>>;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ id: z.ZodString;
110
+ heading: z.ZodNullable<z.ZodString>;
111
+ intro: z.ZodNullable<z.ZodString>;
112
+ outro: z.ZodNullable<z.ZodString>;
113
+ type: z.ZodLiteral<"steps">;
114
+ items: z.ZodArray<z.ZodObject<{
115
+ title: z.ZodString;
116
+ body: z.ZodString;
117
+ }, z.core.$strip>>;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ id: z.ZodString;
120
+ heading: z.ZodNullable<z.ZodString>;
121
+ intro: z.ZodNullable<z.ZodString>;
122
+ outro: z.ZodNullable<z.ZodString>;
123
+ type: z.ZodLiteral<"faq">;
124
+ items: z.ZodArray<z.ZodObject<{
125
+ question: z.ZodString;
126
+ answer: z.ZodString;
127
+ }, z.core.$strip>>;
128
+ }, z.core.$strip>, z.ZodObject<{
129
+ id: z.ZodString;
130
+ heading: z.ZodNullable<z.ZodString>;
131
+ intro: z.ZodNullable<z.ZodString>;
132
+ outro: z.ZodNullable<z.ZodString>;
133
+ type: z.ZodLiteral<"relatedLinks">;
134
+ items: z.ZodArray<z.ZodObject<{
135
+ kind: z.ZodEnum<{
136
+ readonly model: "model";
137
+ readonly task: "task";
138
+ }>;
139
+ slug: z.ZodString;
140
+ title: z.ZodString;
141
+ note: z.ZodNullable<z.ZodString>;
142
+ }, z.core.$strip>>;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ id: z.ZodString;
145
+ heading: z.ZodNullable<z.ZodString>;
146
+ intro: z.ZodNullable<z.ZodString>;
147
+ outro: z.ZodNullable<z.ZodString>;
148
+ type: z.ZodLiteral<"demo">;
149
+ caption: z.ZodNullable<z.ZodString>;
150
+ presets: z.ZodArray<z.ZodObject<{
151
+ id: z.ZodString;
152
+ label: z.ZodString;
153
+ prompt: z.ZodString;
154
+ settings: z.ZodNullable<z.ZodString>;
155
+ image: z.ZodNullable<z.ZodObject<{
156
+ url: z.ZodURL;
157
+ alt: z.ZodString;
158
+ caption: z.ZodNullable<z.ZodString>;
159
+ }, z.core.$strip>>;
160
+ }, z.core.$strip>>;
161
+ }, z.core.$strip>, z.ZodObject<{
162
+ id: z.ZodString;
163
+ heading: z.ZodNullable<z.ZodString>;
164
+ intro: z.ZodNullable<z.ZodString>;
165
+ outro: z.ZodNullable<z.ZodString>;
166
+ type: z.ZodLiteral<"pricingWidget">;
167
+ ctaLabel: z.ZodString;
168
+ ctaSlug: z.ZodString;
169
+ }, z.core.$strip>], "type">>;
170
+ }, z.core.$strip>>;
171
+ chat: z.ZodNullable<z.ZodObject<{
172
+ type: z.ZodArray<z.ZodString>;
173
+ features: z.ZodArray<z.ZodString>;
174
+ maxMessageLength: z.ZodNumber;
175
+ maxContextWindow: z.ZodNumber;
176
+ capabilities: z.ZodObject<{
177
+ reasoning: z.ZodBoolean;
178
+ webSearch: z.ZodBoolean;
179
+ supportedFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
180
+ }, z.core.$strip>;
181
+ }, z.core.$strip>>;
182
+ generation: z.ZodNullable<z.ZodObject<{
183
+ supportedInputFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
184
+ }, z.core.$strip>>;
185
+ }, z.core.$strip>;
186
+ export type PublicChatModelCapabilitiesSchemaType = z.infer<typeof PublicChatModelCapabilitiesSchema>;
187
+ export type PublicChatModelDetailsSchemaType = z.infer<typeof PublicChatModelDetailsSchema>;
188
+ export type PublicGenerationModelDetailsSchemaType = z.infer<typeof PublicGenerationModelDetailsSchema>;
189
+ export type PublicModelDetailSchemaType = z.infer<typeof PublicModelDetailSchema>;
190
+ //# sourceMappingURL=public-model-detail.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-model-detail.schema.d.ts","sourceRoot":"","sources":["../../../model-page/models/public-model-detail.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;iBAMvC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQlC,CAAC;AAEH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AACtG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAC5F,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AACxG,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicModelDetailSchema = exports.PublicGenerationModelDetailsSchema = exports.PublicChatModelDetailsSchema = exports.PublicChatModelCapabilitiesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_1 = require("../../file");
6
+ const page_card_schema_1 = require("./page-card.schema");
7
+ const page_content_schema_1 = require("./page-content.schema");
8
+ const public_model_card_schema_1 = require("./public-model-card.schema");
9
+ exports.PublicChatModelCapabilitiesSchema = zod_1.z.object({
10
+ reasoning: zod_1.z.boolean(),
11
+ webSearch: zod_1.z.boolean(),
12
+ supportedFileTypes: zod_1.z.array(zod_1.z.enum(file_1.FILE_TYPE)),
13
+ });
14
+ exports.PublicChatModelDetailsSchema = zod_1.z.object({
15
+ type: zod_1.z.array(zod_1.z.string()),
16
+ features: zod_1.z.array(zod_1.z.string()),
17
+ maxMessageLength: zod_1.z.number().int().positive(),
18
+ maxContextWindow: zod_1.z.number().int().positive(),
19
+ capabilities: exports.PublicChatModelCapabilitiesSchema,
20
+ });
21
+ exports.PublicGenerationModelDetailsSchema = zod_1.z.object({
22
+ supportedInputFileTypes: zod_1.z.array(zod_1.z.enum(file_1.FILE_TYPE)),
23
+ });
24
+ exports.PublicModelDetailSchema = public_model_card_schema_1.PublicModelCardSchema.extend({
25
+ h1: zod_1.z.string().min(1),
26
+ card: page_card_schema_1.PageCardSchema.nullable(),
27
+ seoTitle: zod_1.z.string().min(1),
28
+ seoDescription: zod_1.z.string().nullable(),
29
+ content: page_content_schema_1.PageContentSchema.nullable(),
30
+ chat: exports.PublicChatModelDetailsSchema.nullable(),
31
+ generation: exports.PublicGenerationModelDetailsSchema.nullable(),
32
+ });
@@ -60,8 +60,11 @@ const get_wallet_transactions_query_1 = require("../wallet/endpoints/queries/get
60
60
  const payment_1 = require("../payment/endpoints/payment");
61
61
  const create_payment_command_1 = require("../payment/endpoints/commands/create-payment.command");
62
62
  const ai_model_1 = require("../ai-model/endpoints/ai-model");
63
+ const model_page_1 = require("../model-page/endpoints/model-page");
63
64
  const get_ai_model_by_uuid_query_1 = require("../ai-model/endpoints/queries/get-ai-model-by-uuid.query");
64
65
  const get_ai_models_query_1 = require("../ai-model/endpoints/queries/get-ai-models.query");
66
+ const get_public_model_by_slug_query_1 = require("../model-page/endpoints/queries/get-public-model-by-slug.query");
67
+ const list_public_models_query_1 = require("../model-page/endpoints/queries/list-public-models.query");
65
68
  const model_catalog_1 = require("../model-catalog/endpoints/model-catalog");
66
69
  const get_model_catalog_query_1 = require("../model-catalog/endpoints/queries/get-model-catalog.query");
67
70
  const generation_model_1 = require("../generation-model/endpoints/generation-model");
@@ -190,6 +193,9 @@ async function main() {
190
193
  registerSchema('AiModelsGetAllResponse', get_ai_models_query_1.GetAllAiModelsQueryResponse);
191
194
  registerSchema('AiModelsGetByUuidParams', get_ai_model_by_uuid_query_1.GetAiModelByUuidQueryParams);
192
195
  registerSchema('AiModelsGetByUuidResponse', get_ai_model_by_uuid_query_1.GetAiModelByUuidQueryResponse);
196
+ registerSchema('PublicModelsListResponse', list_public_models_query_1.ListPublicModelsQueryResponse);
197
+ registerSchema('PublicModelsGetBySlugParams', get_public_model_by_slug_query_1.GetPublicModelBySlugQueryParams);
198
+ registerSchema('PublicModelsGetBySlugResponse', get_public_model_by_slug_query_1.GetPublicModelBySlugQueryResponse);
193
199
  registerSchema('ModelCatalogGetAllResponse', get_model_catalog_query_1.GetModelCatalogQueryResponse);
194
200
  registerSchema('GenerationModelGetAllResponse', get_generation_models_query_1.GetGenerationModelsQueryResponse);
195
201
  registerSchema('GenerationModelGetByTypeParams', get_generation_models_by_type_query_1.GetGenerationModelsByTypeQueryParams);
@@ -335,6 +341,7 @@ async function main() {
335
341
  delete_marketplace_card_command_1.DeleteMarketplaceCardCommand,
336
342
  ];
337
343
  const aiModelContracts = [get_ai_models_query_1.GetAllAiModelsQuery, get_ai_model_by_uuid_query_1.GetAiModelByUuidQuery];
344
+ const publicModelContracts = [list_public_models_query_1.ListPublicModelsQuery, get_public_model_by_slug_query_1.GetPublicModelBySlugQuery];
338
345
  const modelCatalogContracts = [get_model_catalog_query_1.GetModelCatalogQuery];
339
346
  const generationModelContracts = [
340
347
  get_generation_models_query_1.GetGenerationModelsQuery,
@@ -613,6 +620,35 @@ async function main() {
613
620
  responses: buildResponses(contract.responses, resolveSchema),
614
621
  });
615
622
  }
623
+ for (const contract of publicModelContracts) {
624
+ const method = contract.method.toLowerCase();
625
+ if (!supportedHttpMethods.has(method)) {
626
+ throw new Error(`Unsupported HTTP method: ${contract.method}`);
627
+ }
628
+ registry.registerPath({
629
+ method: method,
630
+ path: toOpenApiPath(model_page_1.PUBLIC_MODEL_CONTROLLER, contract.path),
631
+ summary: contract.summary,
632
+ tags: ['Models (public)'],
633
+ request: {
634
+ ...(contract.request?.body
635
+ ? {
636
+ body: {
637
+ required: true,
638
+ content: {
639
+ 'application/json': {
640
+ schema: resolveSchema(contract.request.body),
641
+ },
642
+ },
643
+ },
644
+ }
645
+ : {}),
646
+ ...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
647
+ ...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
648
+ },
649
+ responses: buildResponses(contract.responses, resolveSchema),
650
+ });
651
+ }
616
652
  for (const contract of modelCatalogContracts) {
617
653
  const method = contract.method.toLowerCase();
618
654
  if (!supportedHttpMethods.has(method)) {