@veruna/api-contracts 1.0.20 → 1.0.21

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.
@@ -84,6 +84,7 @@ export declare const REST_API: {
84
84
  };
85
85
  readonly PUBLIC: {
86
86
  readonly GET_ALL: "/api/v1/ai-models/";
87
+ readonly GET_LIST: "/api/v1/ai-models/list";
87
88
  };
88
89
  };
89
90
  readonly FILE: {
package/build/rest-api.js CHANGED
@@ -96,6 +96,7 @@ exports.REST_API = {
96
96
  },
97
97
  PUBLIC: {
98
98
  GET_ALL: `${exports.ROOT}/${controllers_1.AI_MODEL_PUBLIC_CONTROLLER}/${routes_1.AI_MODEL_PUBLIC_ROUTES.GET_ALL}`,
99
+ GET_LIST: `${exports.ROOT}/${controllers_1.AI_MODEL_PUBLIC_CONTROLLER}/${routes_1.AI_MODEL_PUBLIC_ROUTES.GET_LIST}`,
99
100
  },
100
101
  },
101
102
  // File module (External Go service)
@@ -4,4 +4,5 @@
4
4
  */
5
5
  export declare const AI_MODEL_PUBLIC_ROUTES: {
6
6
  readonly GET_ALL: "";
7
+ readonly GET_LIST: "list";
7
8
  };
@@ -7,4 +7,5 @@ exports.AI_MODEL_PUBLIC_ROUTES = void 0;
7
7
  */
8
8
  exports.AI_MODEL_PUBLIC_ROUTES = {
9
9
  GET_ALL: '', // GET to controller base
10
+ GET_LIST: 'list', // GET /api/v1/ai-models/list
10
11
  };
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace PublicAiModelGetModelsListQuery {
4
+ const Request: z.ZodVoid;
5
+ const Response: z.ZodObject<{
6
+ providers: z.ZodArray<z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ title: z.ZodString;
9
+ order: z.ZodNumber;
10
+ icon: z.ZodString;
11
+ models: z.ZodArray<z.ZodObject<{
12
+ uuid: z.ZodString;
13
+ title: z.ZodString;
14
+ order: z.ZodNumber;
15
+ description: z.ZodNullable<z.ZodString>;
16
+ icon: z.ZodString;
17
+ model: z.ZodString;
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strip>>;
20
+ }, z.core.$strip>;
21
+ const URL: "/api/v1/ai-models/list";
22
+ const METHOD = HttpMethod.GET;
23
+ type RequestType = z.infer<typeof Request>;
24
+ type ResponseType = z.infer<typeof Response>;
25
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicAiModelGetModelsListQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../schemas");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ var PublicAiModelGetModelsListQuery;
9
+ (function (PublicAiModelGetModelsListQuery) {
10
+ PublicAiModelGetModelsListQuery.Request = zod_1.z.void();
11
+ PublicAiModelGetModelsListQuery.Response = schemas_1.ModelsListResponseSchema;
12
+ PublicAiModelGetModelsListQuery.URL = rest_api_1.REST_API.V1.AI_MODEL.PUBLIC.GET_LIST;
13
+ PublicAiModelGetModelsListQuery.METHOD = http_method_1.HttpMethod.GET;
14
+ })(PublicAiModelGetModelsListQuery || (exports.PublicAiModelGetModelsListQuery = PublicAiModelGetModelsListQuery = {}));
@@ -1 +1,2 @@
1
1
  export * from './get-active-models.query';
2
+ export * from './get-models-list.query';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-active-models.query"), exports);
18
+ __exportStar(require("./get-models-list.query"), exports);
@@ -4,3 +4,4 @@ export * from './update-model-request.schema';
4
4
  export * from './model-response.schema';
5
5
  export * from './route-params.schema';
6
6
  export * from './get-models-filters.schema';
7
+ export * from './models-list-response.schema';
@@ -20,3 +20,4 @@ __exportStar(require("./update-model-request.schema"), exports);
20
20
  __exportStar(require("./model-response.schema"), exports);
21
21
  __exportStar(require("./route-params.schema"), exports);
22
22
  __exportStar(require("./get-models-filters.schema"), exports);
23
+ __exportStar(require("./models-list-response.schema"), exports);
@@ -0,0 +1,50 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Public Model in List Response (picked from ModelResponseSchema)
4
+ * Только публичные поля без status, providerUuid, timestamps
5
+ */
6
+ export declare const PublicModelInListSchema: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ title: z.ZodString;
9
+ order: z.ZodNumber;
10
+ description: z.ZodNullable<z.ZodString>;
11
+ icon: z.ZodString;
12
+ model: z.ZodString;
13
+ }, z.core.$strip>;
14
+ /**
15
+ * Public Provider with Models (picked from ProviderResponseSchema + models)
16
+ * Только публичные поля без status, timestamps
17
+ */
18
+ export declare const PublicProviderWithModelsSchema: z.ZodObject<{
19
+ uuid: z.ZodString;
20
+ title: z.ZodString;
21
+ order: z.ZodNumber;
22
+ icon: z.ZodString;
23
+ models: z.ZodArray<z.ZodObject<{
24
+ uuid: z.ZodString;
25
+ title: z.ZodString;
26
+ order: z.ZodNumber;
27
+ description: z.ZodNullable<z.ZodString>;
28
+ icon: z.ZodString;
29
+ model: z.ZodString;
30
+ }, z.core.$strip>>;
31
+ }, z.core.$strip>;
32
+ /**
33
+ * Models List Response Schema
34
+ */
35
+ export declare const ModelsListResponseSchema: z.ZodObject<{
36
+ providers: z.ZodArray<z.ZodObject<{
37
+ uuid: z.ZodString;
38
+ title: z.ZodString;
39
+ order: z.ZodNumber;
40
+ icon: z.ZodString;
41
+ models: z.ZodArray<z.ZodObject<{
42
+ uuid: z.ZodString;
43
+ title: z.ZodString;
44
+ order: z.ZodNumber;
45
+ description: z.ZodNullable<z.ZodString>;
46
+ icon: z.ZodString;
47
+ model: z.ZodString;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelsListResponseSchema = exports.PublicProviderWithModelsSchema = exports.PublicModelInListSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const model_response_schema_1 = require("./model-response.schema");
6
+ const ai_provider_1 = require("../../ai-provider");
7
+ /**
8
+ * Public Model in List Response (picked from ModelResponseSchema)
9
+ * Только публичные поля без status, providerUuid, timestamps
10
+ */
11
+ exports.PublicModelInListSchema = model_response_schema_1.ModelResponseSchema.pick({
12
+ uuid: true,
13
+ title: true,
14
+ model: true,
15
+ description: true,
16
+ icon: true,
17
+ order: true,
18
+ });
19
+ /**
20
+ * Public Provider with Models (picked from ProviderResponseSchema + models)
21
+ * Только публичные поля без status, timestamps
22
+ */
23
+ exports.PublicProviderWithModelsSchema = ai_provider_1.ProviderResponseSchema.pick({
24
+ uuid: true,
25
+ title: true,
26
+ icon: true,
27
+ order: true,
28
+ }).extend({
29
+ models: zod_1.z.array(exports.PublicModelInListSchema),
30
+ });
31
+ /**
32
+ * Models List Response Schema
33
+ */
34
+ exports.ModelsListResponseSchema = zod_1.z.object({
35
+ providers: zod_1.z.array(exports.PublicProviderWithModelsSchema),
36
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",