@veruna/api-contracts 1.0.19 → 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/controllers/ai-model.controllers.d.ts +5 -0
- package/build/controllers/ai-model.controllers.js +8 -0
- package/build/controllers/index.d.ts +1 -0
- package/build/controllers/index.js +4 -1
- package/build/rest-api.d.ts +13 -0
- package/build/rest-api.js +14 -0
- package/build/routes/ai-model-admin.routes.d.ts +11 -0
- package/build/routes/ai-model-admin.routes.js +14 -0
- package/build/routes/ai-model-public.routes.d.ts +8 -0
- package/build/routes/ai-model-public.routes.js +11 -0
- package/build/routes/index.d.ts +2 -0
- package/build/routes/index.js +5 -1
- package/build/v1/ai-model/admin/commands/create-model.command.d.ts +29 -0
- package/build/v1/ai-model/admin/commands/create-model.command.js +13 -0
- package/build/v1/ai-model/admin/commands/delete-model.command.d.ts +12 -0
- package/build/v1/ai-model/admin/commands/delete-model.command.js +14 -0
- package/build/v1/ai-model/admin/commands/index.d.ts +3 -0
- package/build/v1/ai-model/admin/commands/index.js +19 -0
- package/build/v1/ai-model/admin/commands/update-model.command.d.ts +29 -0
- package/build/v1/ai-model/admin/commands/update-model.command.js +13 -0
- package/build/v1/ai-model/admin/queries/get-model.query.d.ts +21 -0
- package/build/v1/ai-model/admin/queries/get-model.query.js +14 -0
- package/build/v1/ai-model/admin/queries/get-models.query.d.ts +37 -0
- package/build/v1/ai-model/admin/queries/get-models.query.js +14 -0
- package/build/v1/ai-model/admin/queries/index.d.ts +2 -0
- package/build/v1/ai-model/admin/queries/index.js +18 -0
- package/build/v1/ai-model/ai-model.errors.d.ts +8 -0
- package/build/v1/ai-model/ai-model.errors.js +28 -0
- package/build/v1/ai-model/index.d.ts +5 -0
- package/build/v1/ai-model/index.js +21 -0
- package/build/v1/ai-model/public/queries/get-active-models.query.d.ts +21 -0
- package/build/v1/ai-model/public/queries/get-active-models.query.js +14 -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 +2 -0
- package/build/v1/ai-model/public/queries/index.js +18 -0
- package/build/v1/ai-model/schemas/ai-model-status.enum.d.ts +7 -0
- package/build/v1/ai-model/schemas/ai-model-status.enum.js +11 -0
- package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +11 -0
- package/build/v1/ai-model/schemas/create-model-request.schema.js +19 -0
- package/build/v1/ai-model/schemas/get-models-filters.schema.d.ts +6 -0
- package/build/v1/ai-model/schemas/get-models-filters.schema.js +9 -0
- package/build/v1/ai-model/schemas/index.d.ts +7 -0
- package/build/v1/ai-model/schemas/index.js +23 -0
- package/build/v1/ai-model/schemas/model-response.schema.d.ts +17 -0
- package/build/v1/ai-model/schemas/model-response.schema.js +21 -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/build/v1/ai-model/schemas/route-params.schema.d.ts +4 -0
- package/build/v1/ai-model/schemas/route-params.schema.js +7 -0
- package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +11 -0
- package/build/v1/ai-model/schemas/update-model-request.schema.js +20 -0
- package/build/v1/ai-provider/admin/commands/delete-provider.command.d.ts +1 -1
- package/build/v1/ai-provider/admin/commands/delete-provider.command.js +2 -5
- package/build/v1/index.d.ts +1 -0
- package/build/v1/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_MODEL_PUBLIC_CONTROLLER = exports.AI_MODEL_ADMIN_CONTROLLER = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Model Controller paths for NestJS @Controller decorator
|
|
6
|
+
*/
|
|
7
|
+
exports.AI_MODEL_ADMIN_CONTROLLER = 'v1/admin/ai-models';
|
|
8
|
+
exports.AI_MODEL_PUBLIC_CONTROLLER = 'v1/ai-models';
|
|
@@ -7,4 +7,5 @@ export { UNREG_USERS_CONTROLLER } from './unreg-users.controllers';
|
|
|
7
7
|
export { BLOG_ADMIN_CATEGORIES_CONTROLLER, BLOG_ADMIN_POSTS_CONTROLLER, BLOG_PUBLIC_CATEGORIES_CONTROLLER, BLOG_PUBLIC_POSTS_CONTROLLER, } from './blog.controllers';
|
|
8
8
|
export { SEO_PAGES_ADMIN_CONTROLLER, SEO_PAGES_PUBLIC_CONTROLLER, } from './seo-pages.controllers';
|
|
9
9
|
export { AI_PROVIDER_ADMIN_CONTROLLER, AI_PROVIDER_PUBLIC_CONTROLLER, } from './ai-provider.controllers';
|
|
10
|
+
export { AI_MODEL_ADMIN_CONTROLLER, AI_MODEL_PUBLIC_CONTROLLER, } from './ai-model.controllers';
|
|
10
11
|
export { FILE_CONTROLLER } from './file.controllers';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FILE_CONTROLLER = exports.AI_PROVIDER_PUBLIC_CONTROLLER = exports.AI_PROVIDER_ADMIN_CONTROLLER = exports.SEO_PAGES_PUBLIC_CONTROLLER = exports.SEO_PAGES_ADMIN_CONTROLLER = exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = exports.UNREG_USERS_CONTROLLER = exports.USERS_CONTROLLER = exports.AUTH_CONTROLLER = void 0;
|
|
3
|
+
exports.FILE_CONTROLLER = exports.AI_MODEL_PUBLIC_CONTROLLER = exports.AI_MODEL_ADMIN_CONTROLLER = exports.AI_PROVIDER_PUBLIC_CONTROLLER = exports.AI_PROVIDER_ADMIN_CONTROLLER = exports.SEO_PAGES_PUBLIC_CONTROLLER = exports.SEO_PAGES_ADMIN_CONTROLLER = exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = exports.UNREG_USERS_CONTROLLER = exports.USERS_CONTROLLER = exports.AUTH_CONTROLLER = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Centralized exports for all controllers
|
|
6
6
|
*/
|
|
@@ -21,5 +21,8 @@ Object.defineProperty(exports, "SEO_PAGES_PUBLIC_CONTROLLER", { enumerable: true
|
|
|
21
21
|
var ai_provider_controllers_1 = require("./ai-provider.controllers");
|
|
22
22
|
Object.defineProperty(exports, "AI_PROVIDER_ADMIN_CONTROLLER", { enumerable: true, get: function () { return ai_provider_controllers_1.AI_PROVIDER_ADMIN_CONTROLLER; } });
|
|
23
23
|
Object.defineProperty(exports, "AI_PROVIDER_PUBLIC_CONTROLLER", { enumerable: true, get: function () { return ai_provider_controllers_1.AI_PROVIDER_PUBLIC_CONTROLLER; } });
|
|
24
|
+
var ai_model_controllers_1 = require("./ai-model.controllers");
|
|
25
|
+
Object.defineProperty(exports, "AI_MODEL_ADMIN_CONTROLLER", { enumerable: true, get: function () { return ai_model_controllers_1.AI_MODEL_ADMIN_CONTROLLER; } });
|
|
26
|
+
Object.defineProperty(exports, "AI_MODEL_PUBLIC_CONTROLLER", { enumerable: true, get: function () { return ai_model_controllers_1.AI_MODEL_PUBLIC_CONTROLLER; } });
|
|
24
27
|
var file_controllers_1 = require("./file.controllers");
|
|
25
28
|
Object.defineProperty(exports, "FILE_CONTROLLER", { enumerable: true, get: function () { return file_controllers_1.FILE_CONTROLLER; } });
|
package/build/rest-api.d.ts
CHANGED
|
@@ -74,6 +74,19 @@ export declare const REST_API: {
|
|
|
74
74
|
readonly GET_ALL: "/api/v1/ai-providers/";
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
+
readonly AI_MODEL: {
|
|
78
|
+
readonly ADMIN: {
|
|
79
|
+
readonly CREATE: "/api/v1/admin/ai-models/";
|
|
80
|
+
readonly GET_ALL: "/api/v1/admin/ai-models/";
|
|
81
|
+
readonly GET_BY_UUID: (uuid: string) => string;
|
|
82
|
+
readonly UPDATE: (uuid: string) => string;
|
|
83
|
+
readonly DELETE: (uuid: string) => string;
|
|
84
|
+
};
|
|
85
|
+
readonly PUBLIC: {
|
|
86
|
+
readonly GET_ALL: "/api/v1/ai-models/";
|
|
87
|
+
readonly GET_LIST: "/api/v1/ai-models/list";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
77
90
|
readonly FILE: {
|
|
78
91
|
readonly UPLOAD_IMAGE: "/api/v1/files/upload-image";
|
|
79
92
|
readonly UPLOAD: "/api/v1/files/upload";
|
package/build/rest-api.js
CHANGED
|
@@ -85,6 +85,20 @@ exports.REST_API = {
|
|
|
85
85
|
GET_ALL: `${exports.ROOT}/${controllers_1.AI_PROVIDER_PUBLIC_CONTROLLER}/${routes_1.AI_PROVIDER_PUBLIC_ROUTES.GET_ALL}`,
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
|
+
// AI Model module
|
|
89
|
+
AI_MODEL: {
|
|
90
|
+
ADMIN: {
|
|
91
|
+
CREATE: `${exports.ROOT}/${controllers_1.AI_MODEL_ADMIN_CONTROLLER}/${routes_1.AI_MODEL_ADMIN_ROUTES.CREATE}`,
|
|
92
|
+
GET_ALL: `${exports.ROOT}/${controllers_1.AI_MODEL_ADMIN_CONTROLLER}/${routes_1.AI_MODEL_ADMIN_ROUTES.GET_ALL}`,
|
|
93
|
+
GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.AI_MODEL_ADMIN_CONTROLLER}/${uuid}`,
|
|
94
|
+
UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.AI_MODEL_ADMIN_CONTROLLER}/${uuid}`,
|
|
95
|
+
DELETE: (uuid) => `${exports.ROOT}/${controllers_1.AI_MODEL_ADMIN_CONTROLLER}/${uuid}`,
|
|
96
|
+
},
|
|
97
|
+
PUBLIC: {
|
|
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}`,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
88
102
|
// File module (External Go service)
|
|
89
103
|
FILE: {
|
|
90
104
|
// Images
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Model Admin Routes
|
|
3
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const AI_MODEL_ADMIN_ROUTES: {
|
|
6
|
+
readonly CREATE: "";
|
|
7
|
+
readonly GET_ALL: "";
|
|
8
|
+
readonly GET_BY_UUID: ":uuid";
|
|
9
|
+
readonly UPDATE: ":uuid";
|
|
10
|
+
readonly DELETE: ":uuid";
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_MODEL_ADMIN_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Model Admin Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.AI_MODEL_ADMIN_ROUTES = {
|
|
9
|
+
CREATE: '', // POST to controller base
|
|
10
|
+
GET_ALL: '', // GET to controller base
|
|
11
|
+
GET_BY_UUID: ':uuid', // GET /ai-models/:uuid
|
|
12
|
+
UPDATE: ':uuid', // PATCH /ai-models/:uuid
|
|
13
|
+
DELETE: ':uuid', // DELETE /ai-models/:uuid
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_MODEL_PUBLIC_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Model Public Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.AI_MODEL_PUBLIC_ROUTES = {
|
|
9
|
+
GET_ALL: '', // GET to controller base
|
|
10
|
+
GET_LIST: 'list', // GET /api/v1/ai-models/list
|
|
11
|
+
};
|
package/build/routes/index.d.ts
CHANGED
|
@@ -11,4 +11,6 @@ export { SEO_PAGES_ADMIN_ROUTES } from './seo-pages-admin.routes';
|
|
|
11
11
|
export { SEO_PAGES_PUBLIC_ROUTES } from './seo-pages-public.routes';
|
|
12
12
|
export { AI_PROVIDER_ADMIN_ROUTES } from './ai-provider-admin.routes';
|
|
13
13
|
export { AI_PROVIDER_PUBLIC_ROUTES } from './ai-provider-public.routes';
|
|
14
|
+
export { AI_MODEL_ADMIN_ROUTES } from './ai-model-admin.routes';
|
|
15
|
+
export { AI_MODEL_PUBLIC_ROUTES } from './ai-model-public.routes';
|
|
14
16
|
export { FILE_ROUTES } from './file.routes';
|
package/build/routes/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FILE_ROUTES = exports.AI_PROVIDER_PUBLIC_ROUTES = exports.AI_PROVIDER_ADMIN_ROUTES = exports.SEO_PAGES_PUBLIC_ROUTES = exports.SEO_PAGES_ADMIN_ROUTES = exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.UNREG_USERS_ROUTES = exports.USERS_ROUTES = exports.AUTH_ROUTES = void 0;
|
|
3
|
+
exports.FILE_ROUTES = exports.AI_MODEL_PUBLIC_ROUTES = exports.AI_MODEL_ADMIN_ROUTES = exports.AI_PROVIDER_PUBLIC_ROUTES = exports.AI_PROVIDER_ADMIN_ROUTES = exports.SEO_PAGES_PUBLIC_ROUTES = exports.SEO_PAGES_ADMIN_ROUTES = exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.UNREG_USERS_ROUTES = exports.USERS_ROUTES = exports.AUTH_ROUTES = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Centralized exports for all routes
|
|
6
6
|
*/
|
|
@@ -25,5 +25,9 @@ var ai_provider_admin_routes_1 = require("./ai-provider-admin.routes");
|
|
|
25
25
|
Object.defineProperty(exports, "AI_PROVIDER_ADMIN_ROUTES", { enumerable: true, get: function () { return ai_provider_admin_routes_1.AI_PROVIDER_ADMIN_ROUTES; } });
|
|
26
26
|
var ai_provider_public_routes_1 = require("./ai-provider-public.routes");
|
|
27
27
|
Object.defineProperty(exports, "AI_PROVIDER_PUBLIC_ROUTES", { enumerable: true, get: function () { return ai_provider_public_routes_1.AI_PROVIDER_PUBLIC_ROUTES; } });
|
|
28
|
+
var ai_model_admin_routes_1 = require("./ai-model-admin.routes");
|
|
29
|
+
Object.defineProperty(exports, "AI_MODEL_ADMIN_ROUTES", { enumerable: true, get: function () { return ai_model_admin_routes_1.AI_MODEL_ADMIN_ROUTES; } });
|
|
30
|
+
var ai_model_public_routes_1 = require("./ai-model-public.routes");
|
|
31
|
+
Object.defineProperty(exports, "AI_MODEL_PUBLIC_ROUTES", { enumerable: true, get: function () { return ai_model_public_routes_1.AI_MODEL_PUBLIC_ROUTES; } });
|
|
28
32
|
var file_routes_1 = require("./file.routes");
|
|
29
33
|
Object.defineProperty(exports, "FILE_ROUTES", { enumerable: true, get: function () { return file_routes_1.FILE_ROUTES; } });
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminAiModelCreateCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
model: z.ZodString;
|
|
8
|
+
icon: z.ZodString;
|
|
9
|
+
status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").AiModelStatus>>;
|
|
10
|
+
order: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
providerUuid: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
const Response: z.ZodObject<{
|
|
14
|
+
uuid: z.ZodString;
|
|
15
|
+
title: z.ZodString;
|
|
16
|
+
description: z.ZodNullable<z.ZodString>;
|
|
17
|
+
model: z.ZodString;
|
|
18
|
+
icon: z.ZodString;
|
|
19
|
+
status: z.ZodEnum<typeof import("../../schemas").AiModelStatus>;
|
|
20
|
+
order: z.ZodNumber;
|
|
21
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
updatedAt: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
const URL: "/api/v1/admin/ai-models/";
|
|
26
|
+
const METHOD = HttpMethod.POST;
|
|
27
|
+
type RequestType = z.infer<typeof Request>;
|
|
28
|
+
type ResponseType = z.infer<typeof Response>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminAiModelCreateCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
7
|
+
var AdminAiModelCreateCommand;
|
|
8
|
+
(function (AdminAiModelCreateCommand) {
|
|
9
|
+
AdminAiModelCreateCommand.Request = schemas_1.CreateModelRequestSchema;
|
|
10
|
+
AdminAiModelCreateCommand.Response = schemas_1.ModelResponseSchema;
|
|
11
|
+
AdminAiModelCreateCommand.URL = rest_api_1.REST_API.V1.AI_MODEL.ADMIN.CREATE;
|
|
12
|
+
AdminAiModelCreateCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
13
|
+
})(AdminAiModelCreateCommand || (exports.AdminAiModelCreateCommand = AdminAiModelCreateCommand = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminAiModelDeleteCommand {
|
|
4
|
+
const Request: z.ZodVoid;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
uuid: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const URL: (uuid: string) => string;
|
|
9
|
+
const METHOD = HttpMethod.DELETE;
|
|
10
|
+
type RequestType = z.infer<typeof Request>;
|
|
11
|
+
type ResponseType = z.infer<typeof Response>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminAiModelDeleteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
7
|
+
const shared_1 = require("../../../../shared");
|
|
8
|
+
var AdminAiModelDeleteCommand;
|
|
9
|
+
(function (AdminAiModelDeleteCommand) {
|
|
10
|
+
AdminAiModelDeleteCommand.Request = zod_1.z.void();
|
|
11
|
+
AdminAiModelDeleteCommand.Response = shared_1.DeleteResponseSchema;
|
|
12
|
+
AdminAiModelDeleteCommand.URL = (uuid) => rest_api_1.REST_API.V1.AI_MODEL.ADMIN.DELETE(uuid);
|
|
13
|
+
AdminAiModelDeleteCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
14
|
+
})(AdminAiModelDeleteCommand || (exports.AdminAiModelDeleteCommand = AdminAiModelDeleteCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./create-model.command"), exports);
|
|
18
|
+
__exportStar(require("./update-model.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-model.command"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminAiModelUpdateCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
model: z.ZodOptional<z.ZodString>;
|
|
8
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
9
|
+
status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").AiModelStatus>>;
|
|
10
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
providerUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
const Response: z.ZodObject<{
|
|
14
|
+
uuid: z.ZodString;
|
|
15
|
+
title: z.ZodString;
|
|
16
|
+
description: z.ZodNullable<z.ZodString>;
|
|
17
|
+
model: z.ZodString;
|
|
18
|
+
icon: z.ZodString;
|
|
19
|
+
status: z.ZodEnum<typeof import("../../schemas").AiModelStatus>;
|
|
20
|
+
order: z.ZodNumber;
|
|
21
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
updatedAt: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
const URL: (uuid: string) => string;
|
|
26
|
+
const METHOD = HttpMethod.PATCH;
|
|
27
|
+
type RequestType = z.infer<typeof Request>;
|
|
28
|
+
type ResponseType = z.infer<typeof Response>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminAiModelUpdateCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
7
|
+
var AdminAiModelUpdateCommand;
|
|
8
|
+
(function (AdminAiModelUpdateCommand) {
|
|
9
|
+
AdminAiModelUpdateCommand.Request = schemas_1.UpdateModelRequestSchema;
|
|
10
|
+
AdminAiModelUpdateCommand.Response = schemas_1.ModelResponseSchema;
|
|
11
|
+
AdminAiModelUpdateCommand.URL = (uuid) => rest_api_1.REST_API.V1.AI_MODEL.ADMIN.UPDATE(uuid);
|
|
12
|
+
AdminAiModelUpdateCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
13
|
+
})(AdminAiModelUpdateCommand || (exports.AdminAiModelUpdateCommand = AdminAiModelUpdateCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminAiModelGetModelQuery {
|
|
4
|
+
const Request: z.ZodVoid;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
uuid: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodNullable<z.ZodString>;
|
|
9
|
+
model: z.ZodString;
|
|
10
|
+
icon: z.ZodString;
|
|
11
|
+
status: z.ZodEnum<typeof import("../../schemas").AiModelStatus>;
|
|
12
|
+
order: z.ZodNumber;
|
|
13
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
const URL: (uuid: string) => string;
|
|
18
|
+
const METHOD = HttpMethod.GET;
|
|
19
|
+
type RequestType = z.infer<typeof Request>;
|
|
20
|
+
type ResponseType = z.infer<typeof Response>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminAiModelGetModelQuery = 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 AdminAiModelGetModelQuery;
|
|
9
|
+
(function (AdminAiModelGetModelQuery) {
|
|
10
|
+
AdminAiModelGetModelQuery.Request = zod_1.z.void();
|
|
11
|
+
AdminAiModelGetModelQuery.Response = schemas_1.ModelResponseSchema;
|
|
12
|
+
AdminAiModelGetModelQuery.URL = (uuid) => rest_api_1.REST_API.V1.AI_MODEL.ADMIN.GET_BY_UUID(uuid);
|
|
13
|
+
AdminAiModelGetModelQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(AdminAiModelGetModelQuery || (exports.AdminAiModelGetModelQuery = AdminAiModelGetModelQuery = {}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminAiModelGetModelsQuery {
|
|
4
|
+
const Request: z.ZodIntersection<z.ZodObject<{
|
|
5
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8
|
+
status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").AiModelStatus>>;
|
|
9
|
+
providerUuid: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
const Response: z.ZodObject<{
|
|
12
|
+
data: z.ZodArray<z.ZodObject<{
|
|
13
|
+
uuid: z.ZodString;
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
description: z.ZodNullable<z.ZodString>;
|
|
16
|
+
model: z.ZodString;
|
|
17
|
+
icon: z.ZodString;
|
|
18
|
+
status: z.ZodEnum<typeof import("../../schemas").AiModelStatus>;
|
|
19
|
+
order: z.ZodNumber;
|
|
20
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
21
|
+
createdAt: z.ZodString;
|
|
22
|
+
updatedAt: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
meta: z.ZodObject<{
|
|
25
|
+
page: z.ZodNumber;
|
|
26
|
+
limit: z.ZodNumber;
|
|
27
|
+
total: z.ZodNumber;
|
|
28
|
+
totalPages: z.ZodNumber;
|
|
29
|
+
hasNext: z.ZodBoolean;
|
|
30
|
+
hasPrev: z.ZodBoolean;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
const URL: "/api/v1/admin/ai-models/";
|
|
34
|
+
const METHOD = HttpMethod.GET;
|
|
35
|
+
type RequestType = z.infer<typeof Request>;
|
|
36
|
+
type ResponseType = z.infer<typeof Response>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminAiModelGetModelsQuery = void 0;
|
|
4
|
+
const schemas_1 = require("../../schemas");
|
|
5
|
+
const shared_1 = require("../../../../shared");
|
|
6
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
8
|
+
var AdminAiModelGetModelsQuery;
|
|
9
|
+
(function (AdminAiModelGetModelsQuery) {
|
|
10
|
+
AdminAiModelGetModelsQuery.Request = shared_1.PaginationQuerySchema.and(schemas_1.GetModelsFiltersSchema);
|
|
11
|
+
AdminAiModelGetModelsQuery.Response = (0, shared_1.createPaginatedResponseSchema)(schemas_1.ModelResponseSchema);
|
|
12
|
+
AdminAiModelGetModelsQuery.URL = rest_api_1.REST_API.V1.AI_MODEL.ADMIN.GET_ALL;
|
|
13
|
+
AdminAiModelGetModelsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(AdminAiModelGetModelsQuery || (exports.AdminAiModelGetModelsQuery = AdminAiModelGetModelsQuery = {}));
|
|
@@ -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-models.query"), exports);
|
|
18
|
+
__exportStar(require("./get-model.query"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum AiModelErrorCode {
|
|
3
|
+
MODEL_NOT_FOUND = "MODEL_NOT_FOUND",
|
|
4
|
+
INVALID_MODEL_STATUS = "INVALID_MODEL_STATUS",
|
|
5
|
+
MODEL_ALREADY_EXISTS = "MODEL_ALREADY_EXISTS",
|
|
6
|
+
INVALID_MODEL_IDENTIFIER = "INVALID_MODEL_IDENTIFIER"
|
|
7
|
+
}
|
|
8
|
+
export declare const AI_MODEL_ERRORS: Record<AiModelErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_MODEL_ERRORS = exports.AiModelErrorCode = void 0;
|
|
4
|
+
var AiModelErrorCode;
|
|
5
|
+
(function (AiModelErrorCode) {
|
|
6
|
+
AiModelErrorCode["MODEL_NOT_FOUND"] = "MODEL_NOT_FOUND";
|
|
7
|
+
AiModelErrorCode["INVALID_MODEL_STATUS"] = "INVALID_MODEL_STATUS";
|
|
8
|
+
AiModelErrorCode["MODEL_ALREADY_EXISTS"] = "MODEL_ALREADY_EXISTS";
|
|
9
|
+
AiModelErrorCode["INVALID_MODEL_IDENTIFIER"] = "INVALID_MODEL_IDENTIFIER";
|
|
10
|
+
})(AiModelErrorCode || (exports.AiModelErrorCode = AiModelErrorCode = {}));
|
|
11
|
+
exports.AI_MODEL_ERRORS = {
|
|
12
|
+
[AiModelErrorCode.MODEL_NOT_FOUND]: {
|
|
13
|
+
code: AiModelErrorCode.MODEL_NOT_FOUND,
|
|
14
|
+
statusCode: 404,
|
|
15
|
+
},
|
|
16
|
+
[AiModelErrorCode.INVALID_MODEL_STATUS]: {
|
|
17
|
+
code: AiModelErrorCode.INVALID_MODEL_STATUS,
|
|
18
|
+
statusCode: 400,
|
|
19
|
+
},
|
|
20
|
+
[AiModelErrorCode.MODEL_ALREADY_EXISTS]: {
|
|
21
|
+
code: AiModelErrorCode.MODEL_ALREADY_EXISTS,
|
|
22
|
+
statusCode: 409,
|
|
23
|
+
},
|
|
24
|
+
[AiModelErrorCode.INVALID_MODEL_IDENTIFIER]: {
|
|
25
|
+
code: AiModelErrorCode.INVALID_MODEL_IDENTIFIER,
|
|
26
|
+
statusCode: 400,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./ai-model.errors"), exports);
|
|
18
|
+
__exportStar(require("./schemas"), exports);
|
|
19
|
+
__exportStar(require("./admin/commands"), exports);
|
|
20
|
+
__exportStar(require("./admin/queries"), exports);
|
|
21
|
+
__exportStar(require("./public/queries"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
|
+
export declare namespace PublicAiModelGetActiveModelsQuery {
|
|
4
|
+
const Request: z.ZodVoid;
|
|
5
|
+
const Response: z.ZodArray<z.ZodObject<{
|
|
6
|
+
uuid: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodNullable<z.ZodString>;
|
|
9
|
+
model: z.ZodString;
|
|
10
|
+
icon: z.ZodString;
|
|
11
|
+
status: z.ZodEnum<typeof import("../../schemas").AiModelStatus>;
|
|
12
|
+
order: z.ZodNumber;
|
|
13
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
const URL: "/api/v1/ai-models/";
|
|
18
|
+
const METHOD = HttpMethod.GET;
|
|
19
|
+
type RequestType = z.infer<typeof Request>;
|
|
20
|
+
type ResponseType = z.infer<typeof Response>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublicAiModelGetActiveModelsQuery = 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 PublicAiModelGetActiveModelsQuery;
|
|
9
|
+
(function (PublicAiModelGetActiveModelsQuery) {
|
|
10
|
+
PublicAiModelGetActiveModelsQuery.Request = zod_1.z.void();
|
|
11
|
+
PublicAiModelGetActiveModelsQuery.Response = zod_1.z.array(schemas_1.ModelResponseSchema);
|
|
12
|
+
PublicAiModelGetActiveModelsQuery.URL = rest_api_1.REST_API.V1.AI_MODEL.PUBLIC.GET_ALL;
|
|
13
|
+
PublicAiModelGetActiveModelsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(PublicAiModelGetActiveModelsQuery || (exports.PublicAiModelGetActiveModelsQuery = PublicAiModelGetActiveModelsQuery = {}));
|
|
@@ -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 = {}));
|
|
@@ -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-active-models.query"), exports);
|
|
18
|
+
__exportStar(require("./get-models-list.query"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiModelStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Model Status
|
|
6
|
+
*/
|
|
7
|
+
var AiModelStatus;
|
|
8
|
+
(function (AiModelStatus) {
|
|
9
|
+
AiModelStatus["ACTIVE"] = "active";
|
|
10
|
+
AiModelStatus["INACTIVE"] = "inactive";
|
|
11
|
+
})(AiModelStatus || (exports.AiModelStatus = AiModelStatus = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiModelStatus } from './ai-model-status.enum';
|
|
3
|
+
export declare const CreateModelRequestSchema: z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
model: z.ZodString;
|
|
7
|
+
icon: z.ZodString;
|
|
8
|
+
status: z.ZodDefault<z.ZodEnum<typeof AiModelStatus>>;
|
|
9
|
+
order: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
providerUuid: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateModelRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ai_model_status_enum_1 = require("./ai-model-status.enum");
|
|
6
|
+
exports.CreateModelRequestSchema = zod_1.z.object({
|
|
7
|
+
title: zod_1.z.string().min(1).max(255),
|
|
8
|
+
description: zod_1.z.string().optional(),
|
|
9
|
+
model: zod_1.z.string().min(1).max(100),
|
|
10
|
+
icon: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.url()
|
|
13
|
+
.refine((url) => url.startsWith('https://'), {
|
|
14
|
+
message: 'Icon URL must use HTTPS',
|
|
15
|
+
}),
|
|
16
|
+
status: zod_1.z.nativeEnum(ai_model_status_enum_1.AiModelStatus).default(ai_model_status_enum_1.AiModelStatus.ACTIVE),
|
|
17
|
+
order: zod_1.z.number().int().nonnegative().default(0),
|
|
18
|
+
providerUuid: zod_1.z.string().uuid().optional(),
|
|
19
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetModelsFiltersSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ai_model_status_enum_1 = require("./ai-model-status.enum");
|
|
6
|
+
exports.GetModelsFiltersSchema = zod_1.z.object({
|
|
7
|
+
status: zod_1.z.nativeEnum(ai_model_status_enum_1.AiModelStatus).optional(),
|
|
8
|
+
providerUuid: zod_1.z.string().uuid().optional(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './ai-model-status.enum';
|
|
2
|
+
export * from './create-model-request.schema';
|
|
3
|
+
export * from './update-model-request.schema';
|
|
4
|
+
export * from './model-response.schema';
|
|
5
|
+
export * from './route-params.schema';
|
|
6
|
+
export * from './get-models-filters.schema';
|
|
7
|
+
export * from './models-list-response.schema';
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./ai-model-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./create-model-request.schema"), exports);
|
|
19
|
+
__exportStar(require("./update-model-request.schema"), exports);
|
|
20
|
+
__exportStar(require("./model-response.schema"), exports);
|
|
21
|
+
__exportStar(require("./route-params.schema"), exports);
|
|
22
|
+
__exportStar(require("./get-models-filters.schema"), exports);
|
|
23
|
+
__exportStar(require("./models-list-response.schema"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiModelStatus } from './ai-model-status.enum';
|
|
3
|
+
/**
|
|
4
|
+
* AI Model Response Schema
|
|
5
|
+
*/
|
|
6
|
+
export declare const ModelResponseSchema: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
description: z.ZodNullable<z.ZodString>;
|
|
10
|
+
model: z.ZodString;
|
|
11
|
+
icon: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<typeof AiModelStatus>;
|
|
13
|
+
order: z.ZodNumber;
|
|
14
|
+
providerUuid: z.ZodNullable<z.ZodString>;
|
|
15
|
+
createdAt: z.ZodString;
|
|
16
|
+
updatedAt: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
|
+
const ai_model_status_enum_1 = require("./ai-model-status.enum");
|
|
7
|
+
/**
|
|
8
|
+
* AI Model Response Schema
|
|
9
|
+
*/
|
|
10
|
+
exports.ModelResponseSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
description: zod_1.z.string().nullable(),
|
|
14
|
+
model: zod_1.z.string(),
|
|
15
|
+
icon: zod_1.z.string(),
|
|
16
|
+
status: zod_1.z.nativeEnum(ai_model_status_enum_1.AiModelStatus),
|
|
17
|
+
order: zod_1.z.number().int().nonnegative(),
|
|
18
|
+
providerUuid: zod_1.z.string().regex(shared_1.UUID_REGEX).nullable(),
|
|
19
|
+
createdAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
|
|
20
|
+
updatedAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
|
|
21
|
+
});
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiModelStatus } from './ai-model-status.enum';
|
|
3
|
+
export declare const UpdateModelRequestSchema: z.ZodObject<{
|
|
4
|
+
title: z.ZodOptional<z.ZodString>;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
model: z.ZodOptional<z.ZodString>;
|
|
7
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
8
|
+
status: z.ZodOptional<z.ZodEnum<typeof AiModelStatus>>;
|
|
9
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
providerUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateModelRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ai_model_status_enum_1 = require("./ai-model-status.enum");
|
|
6
|
+
exports.UpdateModelRequestSchema = zod_1.z.object({
|
|
7
|
+
title: zod_1.z.string().min(1).max(255).optional(),
|
|
8
|
+
description: zod_1.z.string().optional(),
|
|
9
|
+
model: zod_1.z.string().min(1).max(100).optional(),
|
|
10
|
+
icon: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.url()
|
|
13
|
+
.refine((url) => url.startsWith('https://'), {
|
|
14
|
+
message: 'Icon URL must use HTTPS',
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
status: zod_1.z.nativeEnum(ai_model_status_enum_1.AiModelStatus).optional(),
|
|
18
|
+
order: zod_1.z.number().int().nonnegative().optional(),
|
|
19
|
+
providerUuid: zod_1.z.string().uuid().nullable().optional(),
|
|
20
|
+
});
|
|
@@ -5,7 +5,7 @@ export declare namespace AdminAiProviderDeleteCommand {
|
|
|
5
5
|
uuid: z.ZodString;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
const Response: z.ZodObject<{
|
|
8
|
-
|
|
8
|
+
uuid: z.ZodString;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
const URL: (uuid: string) => string;
|
|
11
11
|
const METHOD = HttpMethod.DELETE;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminAiProviderDeleteCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const rest_api_1 = require("../../../../rest-api");
|
|
7
6
|
const http_method_1 = require("../../../../shared/http-method");
|
|
8
|
-
const
|
|
9
|
-
success: zod_1.z.boolean(),
|
|
10
|
-
});
|
|
7
|
+
const shared_1 = require("../../../../shared");
|
|
11
8
|
var AdminAiProviderDeleteCommand;
|
|
12
9
|
(function (AdminAiProviderDeleteCommand) {
|
|
13
10
|
AdminAiProviderDeleteCommand.Request = schemas_1.ProviderUuidParamSchema;
|
|
14
|
-
AdminAiProviderDeleteCommand.Response =
|
|
11
|
+
AdminAiProviderDeleteCommand.Response = shared_1.DeleteResponseSchema;
|
|
15
12
|
AdminAiProviderDeleteCommand.URL = (uuid) => rest_api_1.REST_API.V1.AI_PROVIDER.ADMIN.DELETE(uuid);
|
|
16
13
|
AdminAiProviderDeleteCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
17
14
|
})(AdminAiProviderDeleteCommand || (exports.AdminAiProviderDeleteCommand = AdminAiProviderDeleteCommand = {}));
|
package/build/v1/index.d.ts
CHANGED
package/build/v1/index.js
CHANGED