@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.
- package/build/rest-api.d.ts +1 -0
- package/build/rest-api.js +1 -0
- package/build/routes/ai-model-public.routes.d.ts +1 -0
- package/build/routes/ai-model-public.routes.js +1 -0
- package/build/v1/ai-model/public/queries/get-models-list.query.d.ts +25 -0
- package/build/v1/ai-model/public/queries/get-models-list.query.js +14 -0
- package/build/v1/ai-model/public/queries/index.d.ts +1 -0
- package/build/v1/ai-model/public/queries/index.js +1 -0
- package/build/v1/ai-model/schemas/index.d.ts +1 -0
- package/build/v1/ai-model/schemas/index.js +1 -0
- package/build/v1/ai-model/schemas/models-list-response.schema.d.ts +50 -0
- package/build/v1/ai-model/schemas/models-list-response.schema.js +36 -0
- package/package.json +1 -1
package/build/rest-api.d.ts
CHANGED
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)
|
|
@@ -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 = {}));
|
|
@@ -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
|
+
});
|