@ai-grator/api 0.1.31 → 0.1.32

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 (44) hide show
  1. package/build/index.d.ts +1 -0
  2. package/build/index.d.ts.map +1 -1
  3. package/build/index.js +1 -0
  4. package/build/model-page/endpoints/index.d.ts +3 -0
  5. package/build/model-page/endpoints/index.d.ts.map +1 -0
  6. package/build/model-page/endpoints/index.js +18 -0
  7. package/build/model-page/endpoints/model-page.d.ts +6 -0
  8. package/build/model-page/endpoints/model-page.d.ts.map +1 -0
  9. package/build/model-page/endpoints/model-page.js +8 -0
  10. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts +90 -0
  11. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts.map +1 -0
  12. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.js +24 -0
  13. package/build/model-page/endpoints/queries/index.d.ts +3 -0
  14. package/build/model-page/endpoints/queries/index.d.ts.map +1 -0
  15. package/build/model-page/endpoints/queries/index.js +18 -0
  16. package/build/model-page/endpoints/queries/list-public-models.query.d.ts +39 -0
  17. package/build/model-page/endpoints/queries/list-public-models.query.d.ts.map +1 -0
  18. package/build/model-page/endpoints/queries/list-public-models.query.js +19 -0
  19. package/build/model-page/index.d.ts +3 -0
  20. package/build/model-page/index.d.ts.map +1 -0
  21. package/build/model-page/index.js +18 -0
  22. package/build/model-page/models/index.d.ts +3 -0
  23. package/build/model-page/models/index.d.ts.map +1 -0
  24. package/build/model-page/models/index.js +18 -0
  25. package/build/model-page/models/public-model-card.schema.d.ts +16 -0
  26. package/build/model-page/models/public-model-card.schema.d.ts.map +1 -0
  27. package/build/model-page/models/public-model-card.schema.js +15 -0
  28. package/build/model-page/models/public-model-detail.schema.d.ts +74 -0
  29. package/build/model-page/models/public-model-detail.schema.d.ts.map +1 -0
  30. package/build/model-page/models/public-model-detail.schema.js +36 -0
  31. package/build/scripts/generate-openapi.js +36 -0
  32. package/build/tsconfig.tsbuildinfo +1 -1
  33. package/index.ts +1 -0
  34. package/model-page/endpoints/index.ts +2 -0
  35. package/model-page/endpoints/model-page.ts +6 -0
  36. package/model-page/endpoints/queries/get-public-model-by-slug.query.ts +24 -0
  37. package/model-page/endpoints/queries/index.ts +2 -0
  38. package/model-page/endpoints/queries/list-public-models.query.ts +18 -0
  39. package/model-page/index.ts +2 -0
  40. package/model-page/models/index.ts +2 -0
  41. package/model-page/models/public-model-card.schema.ts +15 -0
  42. package/model-page/models/public-model-detail.schema.ts +45 -0
  43. package/package.json +1 -1
  44. package/scripts/generate-openapi.ts +45 -0
package/build/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './_common';
2
2
  export * from './ai-model';
3
3
  export * from './generation-model';
4
4
  export * from './model-catalog';
5
+ export * from './model-page';
5
6
  export * from './generation-job';
6
7
  export * from './article';
7
8
  export * from './auth';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
package/build/index.js CHANGED
@@ -18,6 +18,7 @@ __exportStar(require("./_common"), exports);
18
18
  __exportStar(require("./ai-model"), exports);
19
19
  __exportStar(require("./generation-model"), exports);
20
20
  __exportStar(require("./model-catalog"), exports);
21
+ __exportStar(require("./model-page"), exports);
21
22
  __exportStar(require("./generation-job"), exports);
22
23
  __exportStar(require("./article"), exports);
23
24
  __exportStar(require("./auth"), exports);
@@ -0,0 +1,3 @@
1
+ export * from './model-page';
2
+ export * from './queries';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../model-page/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./model-page"), exports);
18
+ __exportStar(require("./queries"), exports);
@@ -0,0 +1,6 @@
1
+ export declare const PUBLIC_MODEL_CONTROLLER: "ai";
2
+ export declare const PUBLIC_MODEL_ROUTES: {
3
+ readonly LIST: "";
4
+ readonly GET_BY_SLUG: (slug: string) => string;
5
+ };
6
+ //# sourceMappingURL=model-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-page.d.ts","sourceRoot":"","sources":["../../../model-page/endpoints/model-page.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,IAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB;;iCAER,MAAM;CACpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PUBLIC_MODEL_ROUTES = exports.PUBLIC_MODEL_CONTROLLER = void 0;
4
+ exports.PUBLIC_MODEL_CONTROLLER = 'ai';
5
+ exports.PUBLIC_MODEL_ROUTES = {
6
+ LIST: '',
7
+ GET_BY_SLUG: (slug) => `${slug}`,
8
+ };
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ import { HTTP_METHODS } from '../../../_common';
3
+ export declare const GetPublicModelBySlugQueryParams: z.ZodObject<{
4
+ slug: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const GetPublicModelBySlugQueryResponse: z.ZodObject<{
7
+ slug: z.ZodString;
8
+ title: z.ZodString;
9
+ description: z.ZodNullable<z.ZodString>;
10
+ vendorName: z.ZodString;
11
+ icons: z.ZodObject<{
12
+ light: z.ZodString;
13
+ dark: z.ZodString;
14
+ }, z.core.$strip>;
15
+ category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
16
+ order: z.ZodNumber;
17
+ seoTitle: z.ZodString;
18
+ seoDescription: z.ZodNullable<z.ZodString>;
19
+ content: z.ZodNullable<z.ZodObject<{
20
+ sections: z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ heading: z.ZodString;
23
+ body: z.ZodString;
24
+ }, z.core.$strip>>;
25
+ }, z.core.$strip>>;
26
+ chat: z.ZodNullable<z.ZodObject<{
27
+ type: z.ZodArray<z.ZodString>;
28
+ features: z.ZodArray<z.ZodString>;
29
+ maxMessageLength: z.ZodNumber;
30
+ maxContextWindow: z.ZodNumber;
31
+ capabilities: z.ZodObject<{
32
+ reasoning: z.ZodBoolean;
33
+ webSearch: z.ZodBoolean;
34
+ supportedFileTypes: z.ZodArray<z.ZodEnum<typeof import("../../..").FILE_TYPE>>;
35
+ }, z.core.$strip>;
36
+ }, z.core.$strip>>;
37
+ generation: z.ZodNullable<z.ZodObject<{
38
+ supportedInputFileTypes: z.ZodArray<z.ZodEnum<typeof import("../../..").FILE_TYPE>>;
39
+ }, z.core.$strip>>;
40
+ }, z.core.$strip>;
41
+ export declare const GetPublicModelBySlugQuery: {
42
+ method: HTTP_METHODS.GET;
43
+ path: string;
44
+ summary: string;
45
+ request: {
46
+ params: z.ZodObject<{
47
+ slug: z.ZodString;
48
+ }, z.core.$strip>;
49
+ };
50
+ responses: {
51
+ 200: z.ZodObject<{
52
+ slug: z.ZodString;
53
+ title: z.ZodString;
54
+ description: z.ZodNullable<z.ZodString>;
55
+ vendorName: z.ZodString;
56
+ icons: z.ZodObject<{
57
+ light: z.ZodString;
58
+ dark: z.ZodString;
59
+ }, z.core.$strip>;
60
+ category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
61
+ order: z.ZodNumber;
62
+ seoTitle: z.ZodString;
63
+ seoDescription: z.ZodNullable<z.ZodString>;
64
+ content: z.ZodNullable<z.ZodObject<{
65
+ sections: z.ZodArray<z.ZodObject<{
66
+ id: z.ZodString;
67
+ heading: z.ZodString;
68
+ body: z.ZodString;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>>;
71
+ chat: z.ZodNullable<z.ZodObject<{
72
+ type: z.ZodArray<z.ZodString>;
73
+ features: z.ZodArray<z.ZodString>;
74
+ maxMessageLength: z.ZodNumber;
75
+ maxContextWindow: z.ZodNumber;
76
+ capabilities: z.ZodObject<{
77
+ reasoning: z.ZodBoolean;
78
+ webSearch: z.ZodBoolean;
79
+ supportedFileTypes: z.ZodArray<z.ZodEnum<typeof import("../../..").FILE_TYPE>>;
80
+ }, z.core.$strip>;
81
+ }, z.core.$strip>>;
82
+ generation: z.ZodNullable<z.ZodObject<{
83
+ supportedInputFileTypes: z.ZodArray<z.ZodEnum<typeof import("../../..").FILE_TYPE>>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>;
86
+ 404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
87
+ 500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
88
+ };
89
+ };
90
+ //# sourceMappingURL=get-public-model-by-slug.query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-public-model-by-slug.query.d.ts","sourceRoot":"","sources":["../../../../model-page/endpoints/queries/get-public-model-by-slug.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA0B,CAAC;AAEzE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYpC,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetPublicModelBySlugQuery = exports.GetPublicModelBySlugQueryResponse = exports.GetPublicModelBySlugQueryParams = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../../_common");
6
+ const models_1 = require("../../models");
7
+ const model_page_1 = require("../model-page");
8
+ exports.GetPublicModelBySlugQueryParams = zod_1.z.object({
9
+ slug: zod_1.z.string().min(1),
10
+ });
11
+ exports.GetPublicModelBySlugQueryResponse = models_1.PublicModelDetailSchema;
12
+ exports.GetPublicModelBySlugQuery = (0, _common_1.defineContract)({
13
+ method: _common_1.HTTP_METHODS.GET,
14
+ path: model_page_1.PUBLIC_MODEL_ROUTES.GET_BY_SLUG(':slug'),
15
+ summary: 'Get published model by slug',
16
+ request: {
17
+ params: exports.GetPublicModelBySlugQueryParams,
18
+ },
19
+ responses: {
20
+ 200: exports.GetPublicModelBySlugQueryResponse,
21
+ 404: _common_1.HttpErrorResponseSchema,
22
+ 500: _common_1.HttpErrorResponseSchema,
23
+ },
24
+ });
@@ -0,0 +1,3 @@
1
+ export * from './get-public-model-by-slug.query';
2
+ export * from './list-public-models.query';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../model-page/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./get-public-model-by-slug.query"), exports);
18
+ __exportStar(require("./list-public-models.query"), exports);
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ import { HTTP_METHODS } from '../../../_common';
3
+ export declare const ListPublicModelsQueryResponse: z.ZodObject<{
4
+ models: z.ZodArray<z.ZodObject<{
5
+ slug: z.ZodString;
6
+ title: z.ZodString;
7
+ description: z.ZodNullable<z.ZodString>;
8
+ vendorName: z.ZodString;
9
+ icons: z.ZodObject<{
10
+ light: z.ZodString;
11
+ dark: z.ZodString;
12
+ }, z.core.$strip>;
13
+ category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
14
+ order: z.ZodNumber;
15
+ }, z.core.$strip>>;
16
+ }, z.core.$strip>;
17
+ export declare const ListPublicModelsQuery: {
18
+ method: HTTP_METHODS.GET;
19
+ path: "";
20
+ summary: string;
21
+ responses: {
22
+ 200: z.ZodObject<{
23
+ models: z.ZodArray<z.ZodObject<{
24
+ slug: z.ZodString;
25
+ title: z.ZodString;
26
+ description: z.ZodNullable<z.ZodString>;
27
+ vendorName: z.ZodString;
28
+ icons: z.ZodObject<{
29
+ light: z.ZodString;
30
+ dark: z.ZodString;
31
+ }, z.core.$strip>;
32
+ category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
33
+ order: z.ZodNumber;
34
+ }, z.core.$strip>>;
35
+ }, z.core.$strip>;
36
+ 500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
37
+ };
38
+ };
39
+ //# sourceMappingURL=list-public-models.query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-public-models.query.d.ts","sourceRoot":"","sources":["../../../../model-page/endpoints/queries/list-public-models.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;iBAExC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAQhC,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListPublicModelsQuery = exports.ListPublicModelsQueryResponse = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../../_common");
6
+ const models_1 = require("../../models");
7
+ const model_page_1 = require("../model-page");
8
+ exports.ListPublicModelsQueryResponse = zod_1.z.object({
9
+ models: zod_1.z.array(models_1.PublicModelCardSchema),
10
+ });
11
+ exports.ListPublicModelsQuery = (0, _common_1.defineContract)({
12
+ method: _common_1.HTTP_METHODS.GET,
13
+ path: model_page_1.PUBLIC_MODEL_ROUTES.LIST,
14
+ summary: 'List published models (chat, image, video)',
15
+ responses: {
16
+ 200: exports.ListPublicModelsQueryResponse,
17
+ 500: _common_1.HttpErrorResponseSchema,
18
+ },
19
+ });
@@ -0,0 +1,3 @@
1
+ export * from './models';
2
+ export * from './endpoints';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model-page/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./models"), exports);
18
+ __exportStar(require("./endpoints"), exports);
@@ -0,0 +1,3 @@
1
+ export * from './public-model-card.schema';
2
+ export * from './public-model-detail.schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../model-page/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./public-model-card.schema"), exports);
18
+ __exportStar(require("./public-model-detail.schema"), exports);
@@ -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,74 @@
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 PublicModelContentSectionSchema: z.ZodObject<{
23
+ id: z.ZodString;
24
+ heading: z.ZodString;
25
+ body: z.ZodString;
26
+ }, z.core.$strip>;
27
+ export declare const PublicModelContentSchema: z.ZodObject<{
28
+ sections: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodString;
30
+ heading: z.ZodString;
31
+ body: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ }, z.core.$strip>;
34
+ export declare const PublicModelDetailSchema: z.ZodObject<{
35
+ slug: z.ZodString;
36
+ title: z.ZodString;
37
+ description: z.ZodNullable<z.ZodString>;
38
+ vendorName: z.ZodString;
39
+ icons: z.ZodObject<{
40
+ light: z.ZodString;
41
+ dark: z.ZodString;
42
+ }, z.core.$strip>;
43
+ category: z.ZodEnum<typeof import("../..").MODEL_CATEGORY>;
44
+ order: z.ZodNumber;
45
+ seoTitle: z.ZodString;
46
+ seoDescription: z.ZodNullable<z.ZodString>;
47
+ content: z.ZodNullable<z.ZodObject<{
48
+ sections: z.ZodArray<z.ZodObject<{
49
+ id: z.ZodString;
50
+ heading: z.ZodString;
51
+ body: z.ZodString;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>>;
54
+ chat: z.ZodNullable<z.ZodObject<{
55
+ type: z.ZodArray<z.ZodString>;
56
+ features: z.ZodArray<z.ZodString>;
57
+ maxMessageLength: z.ZodNumber;
58
+ maxContextWindow: z.ZodNumber;
59
+ capabilities: z.ZodObject<{
60
+ reasoning: z.ZodBoolean;
61
+ webSearch: z.ZodBoolean;
62
+ supportedFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
63
+ }, z.core.$strip>;
64
+ }, z.core.$strip>>;
65
+ generation: z.ZodNullable<z.ZodObject<{
66
+ supportedInputFileTypes: z.ZodArray<z.ZodEnum<typeof FILE_TYPE>>;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>;
69
+ export type PublicModelContentSchemaType = z.infer<typeof PublicModelContentSchema>;
70
+ export type PublicChatModelCapabilitiesSchemaType = z.infer<typeof PublicChatModelCapabilitiesSchema>;
71
+ export type PublicChatModelDetailsSchemaType = z.infer<typeof PublicChatModelDetailsSchema>;
72
+ export type PublicGenerationModelDetailsSchemaType = z.infer<typeof PublicGenerationModelDetailsSchema>;
73
+ export type PublicModelDetailSchemaType = z.infer<typeof PublicModelDetailSchema>;
74
+ //# 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;AAGvC,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;iBAMvC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;iBAEnC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMlC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACpF,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,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicModelDetailSchema = exports.PublicModelContentSchema = exports.PublicModelContentSectionSchema = exports.PublicGenerationModelDetailsSchema = exports.PublicChatModelDetailsSchema = exports.PublicChatModelCapabilitiesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_1 = require("../../file");
6
+ const public_model_card_schema_1 = require("./public-model-card.schema");
7
+ exports.PublicChatModelCapabilitiesSchema = zod_1.z.object({
8
+ reasoning: zod_1.z.boolean(),
9
+ webSearch: zod_1.z.boolean(),
10
+ supportedFileTypes: zod_1.z.array(zod_1.z.enum(file_1.FILE_TYPE)),
11
+ });
12
+ exports.PublicChatModelDetailsSchema = zod_1.z.object({
13
+ type: zod_1.z.array(zod_1.z.string()),
14
+ features: zod_1.z.array(zod_1.z.string()),
15
+ maxMessageLength: zod_1.z.number().int().positive(),
16
+ maxContextWindow: zod_1.z.number().int().positive(),
17
+ capabilities: exports.PublicChatModelCapabilitiesSchema,
18
+ });
19
+ exports.PublicGenerationModelDetailsSchema = zod_1.z.object({
20
+ supportedInputFileTypes: zod_1.z.array(zod_1.z.enum(file_1.FILE_TYPE)),
21
+ });
22
+ exports.PublicModelContentSectionSchema = zod_1.z.object({
23
+ id: zod_1.z.string().min(1),
24
+ heading: zod_1.z.string().min(1),
25
+ body: zod_1.z.string().min(1),
26
+ });
27
+ exports.PublicModelContentSchema = zod_1.z.object({
28
+ sections: zod_1.z.array(exports.PublicModelContentSectionSchema),
29
+ });
30
+ exports.PublicModelDetailSchema = public_model_card_schema_1.PublicModelCardSchema.extend({
31
+ seoTitle: zod_1.z.string().min(1),
32
+ seoDescription: zod_1.z.string().nullable(),
33
+ content: exports.PublicModelContentSchema.nullable(),
34
+ chat: exports.PublicChatModelDetailsSchema.nullable(),
35
+ generation: exports.PublicGenerationModelDetailsSchema.nullable(),
36
+ });
@@ -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)) {