@veruna/api-contracts 1.0.18 → 1.0.20
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/ai-provider.controllers.d.ts +5 -0
- package/build/controllers/ai-provider.controllers.js +8 -0
- package/build/controllers/file.controllers.d.ts +5 -0
- package/build/controllers/file.controllers.js +8 -0
- package/build/controllers/index.d.ts +3 -0
- package/build/controllers/index.js +9 -1
- package/build/rest-api.d.ts +33 -0
- package/build/rest-api.js +39 -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 +7 -0
- package/build/routes/ai-model-public.routes.js +10 -0
- package/build/routes/ai-provider-admin.routes.d.ts +11 -0
- package/build/routes/ai-provider-admin.routes.js +14 -0
- package/build/routes/ai-provider-public.routes.d.ts +7 -0
- package/build/routes/ai-provider-public.routes.js +10 -0
- package/build/routes/file.routes.d.ts +14 -0
- package/build/routes/file.routes.js +20 -0
- package/build/routes/index.d.ts +5 -0
- package/build/routes/index.js +11 -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/index.d.ts +1 -0
- package/build/v1/ai-model/public/queries/index.js +17 -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 +6 -0
- package/build/v1/ai-model/schemas/index.js +22 -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/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/create-provider.command.d.ts +23 -0
- package/build/v1/ai-provider/admin/commands/create-provider.command.js +13 -0
- package/build/v1/ai-provider/admin/commands/delete-provider.command.d.ts +14 -0
- package/build/v1/ai-provider/admin/commands/delete-provider.command.js +14 -0
- package/build/v1/ai-provider/admin/commands/index.d.ts +3 -0
- package/build/v1/ai-provider/admin/commands/index.js +19 -0
- package/build/v1/ai-provider/admin/commands/update-provider.command.d.ts +27 -0
- package/build/v1/ai-provider/admin/commands/update-provider.command.js +14 -0
- package/build/v1/ai-provider/admin/queries/get-provider.query.d.ts +20 -0
- package/build/v1/ai-provider/admin/queries/get-provider.query.js +13 -0
- package/build/v1/ai-provider/admin/queries/get-providers.query.d.ts +31 -0
- package/build/v1/ai-provider/admin/queries/get-providers.query.js +14 -0
- package/build/v1/ai-provider/admin/queries/index.d.ts +2 -0
- package/build/v1/ai-provider/admin/queries/index.js +18 -0
- package/build/v1/ai-provider/ai-provider.errors.d.ts +7 -0
- package/build/v1/ai-provider/ai-provider.errors.js +23 -0
- package/build/v1/ai-provider/index.d.ts +5 -0
- package/build/v1/ai-provider/index.js +21 -0
- package/build/v1/ai-provider/public/queries/get-active-providers.query.d.ts +18 -0
- package/build/v1/ai-provider/public/queries/get-active-providers.query.js +16 -0
- package/build/v1/ai-provider/public/queries/index.d.ts +1 -0
- package/build/v1/ai-provider/public/queries/index.js +17 -0
- package/build/v1/ai-provider/schemas/ai-provider-status.enum.d.ts +7 -0
- package/build/v1/ai-provider/schemas/ai-provider-status.enum.js +11 -0
- package/build/v1/ai-provider/schemas/create-provider-request.schema.d.ts +9 -0
- package/build/v1/ai-provider/schemas/create-provider-request.schema.js +16 -0
- package/build/v1/ai-provider/schemas/index.d.ts +5 -0
- package/build/v1/ai-provider/schemas/index.js +21 -0
- package/build/v1/ai-provider/schemas/provider-response.schema.d.ts +15 -0
- package/build/v1/ai-provider/schemas/provider-response.schema.js +18 -0
- package/build/v1/ai-provider/schemas/route-params.schema.d.ts +4 -0
- package/build/v1/ai-provider/schemas/route-params.schema.js +8 -0
- package/build/v1/ai-provider/schemas/update-provider-request.schema.d.ts +9 -0
- package/build/v1/ai-provider/schemas/update-provider-request.schema.js +17 -0
- package/build/v1/file/commands/delete-file-by-key.command.d.ts +15 -0
- package/build/v1/file/commands/delete-file-by-key.command.js +15 -0
- package/build/v1/file/commands/delete-file.command.d.ts +15 -0
- package/build/v1/file/commands/delete-file.command.js +18 -0
- package/build/v1/file/commands/index.d.ts +4 -0
- package/build/v1/file/commands/index.js +20 -0
- package/build/v1/file/commands/upload-file.command.d.ts +16 -0
- package/build/v1/file/commands/upload-file.command.js +15 -0
- package/build/v1/file/commands/upload-image.command.d.ts +19 -0
- package/build/v1/file/commands/upload-image.command.js +15 -0
- package/build/v1/file/file.errors.d.ts +15 -0
- package/build/v1/file/file.errors.js +73 -0
- package/build/v1/file/index.d.ts +6 -0
- package/build/v1/file/index.js +26 -0
- package/build/v1/file/queries/get-file.query.d.ts +33 -0
- package/build/v1/file/queries/get-file.query.js +18 -0
- package/build/v1/file/queries/index.d.ts +3 -0
- package/build/v1/file/queries/index.js +19 -0
- package/build/v1/file/queries/list-files.query.d.ts +38 -0
- package/build/v1/file/queries/list-files.query.js +15 -0
- package/build/v1/file/queries/list-folders.query.d.ts +17 -0
- package/build/v1/file/queries/list-folders.query.js +15 -0
- package/build/v1/file/schemas/delete-file-by-key-request.schema.d.ts +7 -0
- package/build/v1/file/schemas/delete-file-by-key-request.schema.js +10 -0
- package/build/v1/file/schemas/delete-file-response.schema.d.ts +15 -0
- package/build/v1/file/schemas/delete-file-response.schema.js +18 -0
- package/build/v1/file/schemas/file-category.enum.d.ts +9 -0
- package/build/v1/file/schemas/file-category.enum.js +13 -0
- package/build/v1/file/schemas/file-response.schema.d.ts +18 -0
- package/build/v1/file/schemas/file-response.schema.js +21 -0
- package/build/v1/file/schemas/file-status.enum.d.ts +10 -0
- package/build/v1/file/schemas/file-status.enum.js +14 -0
- package/build/v1/file/schemas/file-variant-response.schema.d.ts +13 -0
- package/build/v1/file/schemas/file-variant-response.schema.js +16 -0
- package/build/v1/file/schemas/file-with-variants-response.schema.d.ts +26 -0
- package/build/v1/file/schemas/file-with-variants-response.schema.js +13 -0
- package/build/v1/file/schemas/folder-response.schema.d.ts +17 -0
- package/build/v1/file/schemas/folder-response.schema.js +17 -0
- package/build/v1/file/schemas/image-format.enum.d.ts +7 -0
- package/build/v1/file/schemas/image-format.enum.js +11 -0
- package/build/v1/file/schemas/index.d.ts +16 -0
- package/build/v1/file/schemas/index.js +37 -0
- package/build/v1/file/schemas/list-files-request.schema.d.ts +14 -0
- package/build/v1/file/schemas/list-files-request.schema.js +17 -0
- package/build/v1/file/schemas/list-files-response.schema.d.ts +26 -0
- package/build/v1/file/schemas/list-files-response.schema.js +13 -0
- package/build/v1/file/schemas/list-folders-request.schema.d.ts +7 -0
- package/build/v1/file/schemas/list-folders-request.schema.js +10 -0
- package/build/v1/file/schemas/upload-file-request.schema.d.ts +7 -0
- package/build/v1/file/schemas/upload-file-request.schema.js +10 -0
- package/build/v1/file/schemas/upload-file-response.schema.d.ts +9 -0
- package/build/v1/file/schemas/upload-file-response.schema.js +12 -0
- package/build/v1/file/schemas/upload-image-request.schema.d.ts +18 -0
- package/build/v1/file/schemas/upload-image-request.schema.js +28 -0
- package/build/v1/file/schemas/upload-image-response.schema.d.ts +10 -0
- package/build/v1/file/schemas/upload-image-response.schema.js +19 -0
- package/build/v1/index.d.ts +2 -0
- package/build/v1/index.js +2 -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';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_PROVIDER_PUBLIC_CONTROLLER = exports.AI_PROVIDER_ADMIN_CONTROLLER = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Provider Controller paths for NestJS @Controller decorator
|
|
6
|
+
*/
|
|
7
|
+
exports.AI_PROVIDER_ADMIN_CONTROLLER = 'v1/admin/ai-providers';
|
|
8
|
+
exports.AI_PROVIDER_PUBLIC_CONTROLLER = 'v1/ai-providers';
|
|
@@ -6,3 +6,6 @@ export { USERS_CONTROLLER } from './users.controllers';
|
|
|
6
6
|
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
|
+
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';
|
|
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.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
|
*/
|
|
@@ -18,3 +18,11 @@ Object.defineProperty(exports, "BLOG_PUBLIC_POSTS_CONTROLLER", { enumerable: tru
|
|
|
18
18
|
var seo_pages_controllers_1 = require("./seo-pages.controllers");
|
|
19
19
|
Object.defineProperty(exports, "SEO_PAGES_ADMIN_CONTROLLER", { enumerable: true, get: function () { return seo_pages_controllers_1.SEO_PAGES_ADMIN_CONTROLLER; } });
|
|
20
20
|
Object.defineProperty(exports, "SEO_PAGES_PUBLIC_CONTROLLER", { enumerable: true, get: function () { return seo_pages_controllers_1.SEO_PAGES_PUBLIC_CONTROLLER; } });
|
|
21
|
+
var ai_provider_controllers_1 = require("./ai-provider.controllers");
|
|
22
|
+
Object.defineProperty(exports, "AI_PROVIDER_ADMIN_CONTROLLER", { enumerable: true, get: function () { return ai_provider_controllers_1.AI_PROVIDER_ADMIN_CONTROLLER; } });
|
|
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; } });
|
|
27
|
+
var file_controllers_1 = require("./file.controllers");
|
|
28
|
+
Object.defineProperty(exports, "FILE_CONTROLLER", { enumerable: true, get: function () { return file_controllers_1.FILE_CONTROLLER; } });
|
package/build/rest-api.d.ts
CHANGED
|
@@ -62,5 +62,38 @@ export declare const REST_API: {
|
|
|
62
62
|
readonly GET_BY_ALIAS: (alias: string) => string;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
+
readonly AI_PROVIDER: {
|
|
66
|
+
readonly ADMIN: {
|
|
67
|
+
readonly CREATE: "/api/v1/admin/ai-providers/";
|
|
68
|
+
readonly GET_ALL: "/api/v1/admin/ai-providers/";
|
|
69
|
+
readonly GET_BY_UUID: (uuid: string) => string;
|
|
70
|
+
readonly UPDATE: (uuid: string) => string;
|
|
71
|
+
readonly DELETE: (uuid: string) => string;
|
|
72
|
+
};
|
|
73
|
+
readonly PUBLIC: {
|
|
74
|
+
readonly GET_ALL: "/api/v1/ai-providers/";
|
|
75
|
+
};
|
|
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
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly FILE: {
|
|
90
|
+
readonly UPLOAD_IMAGE: "/api/v1/files/upload-image";
|
|
91
|
+
readonly UPLOAD: "/api/v1/files/upload";
|
|
92
|
+
readonly LIST: "/api/v1/files";
|
|
93
|
+
readonly GET_BY_ID: (id: string) => string;
|
|
94
|
+
readonly DELETE_BY_ID: (id: string) => string;
|
|
95
|
+
readonly DELETE_BY_KEY: "/api/v1/files/by-key";
|
|
96
|
+
readonly FOLDERS: "/api/v1/files/folders";
|
|
97
|
+
};
|
|
65
98
|
};
|
|
66
99
|
};
|
package/build/rest-api.js
CHANGED
|
@@ -72,5 +72,44 @@ exports.REST_API = {
|
|
|
72
72
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${controllers_1.SEO_PAGES_PUBLIC_CONTROLLER}/${alias}`,
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
|
+
// AI Provider module
|
|
76
|
+
AI_PROVIDER: {
|
|
77
|
+
ADMIN: {
|
|
78
|
+
CREATE: `${exports.ROOT}/${controllers_1.AI_PROVIDER_ADMIN_CONTROLLER}/${routes_1.AI_PROVIDER_ADMIN_ROUTES.CREATE}`,
|
|
79
|
+
GET_ALL: `${exports.ROOT}/${controllers_1.AI_PROVIDER_ADMIN_CONTROLLER}/${routes_1.AI_PROVIDER_ADMIN_ROUTES.GET_ALL}`,
|
|
80
|
+
GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.AI_PROVIDER_ADMIN_CONTROLLER}/${uuid}`,
|
|
81
|
+
UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.AI_PROVIDER_ADMIN_CONTROLLER}/${uuid}`,
|
|
82
|
+
DELETE: (uuid) => `${exports.ROOT}/${controllers_1.AI_PROVIDER_ADMIN_CONTROLLER}/${uuid}`,
|
|
83
|
+
},
|
|
84
|
+
PUBLIC: {
|
|
85
|
+
GET_ALL: `${exports.ROOT}/${controllers_1.AI_PROVIDER_PUBLIC_CONTROLLER}/${routes_1.AI_PROVIDER_PUBLIC_ROUTES.GET_ALL}`,
|
|
86
|
+
},
|
|
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
|
+
},
|
|
100
|
+
},
|
|
101
|
+
// File module (External Go service)
|
|
102
|
+
FILE: {
|
|
103
|
+
// Images
|
|
104
|
+
UPLOAD_IMAGE: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD_IMAGE}`,
|
|
105
|
+
// Files
|
|
106
|
+
UPLOAD: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD}`,
|
|
107
|
+
LIST: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}`,
|
|
108
|
+
GET_BY_ID: (id) => `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
|
|
109
|
+
DELETE_BY_ID: (id) => `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
|
|
110
|
+
DELETE_BY_KEY: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.DELETE_BY_KEY}`,
|
|
111
|
+
// Folders
|
|
112
|
+
FOLDERS: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.FOLDERS}`,
|
|
113
|
+
},
|
|
75
114
|
},
|
|
76
115
|
};
|
|
@@ -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,10 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Provider Admin Routes
|
|
3
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const AI_PROVIDER_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_PROVIDER_ADMIN_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Provider Admin Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.AI_PROVIDER_ADMIN_ROUTES = {
|
|
9
|
+
CREATE: '', // POST to controller base
|
|
10
|
+
GET_ALL: '', // GET to controller base
|
|
11
|
+
GET_BY_UUID: ':uuid', // GET /ai-providers/:uuid
|
|
12
|
+
UPDATE: ':uuid', // PATCH /ai-providers/:uuid
|
|
13
|
+
DELETE: ':uuid', // DELETE /ai-providers/:uuid
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_PROVIDER_PUBLIC_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AI Provider Public Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.AI_PROVIDER_PUBLIC_ROUTES = {
|
|
9
|
+
GET_ALL: '', // GET to controller base
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Routes
|
|
3
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
4
|
+
* External File API (Go service)
|
|
5
|
+
*/
|
|
6
|
+
export declare const FILE_ROUTES: {
|
|
7
|
+
readonly UPLOAD_IMAGE: "upload-image";
|
|
8
|
+
readonly UPLOAD: "upload";
|
|
9
|
+
readonly LIST: "";
|
|
10
|
+
readonly GET_BY_ID: ":id";
|
|
11
|
+
readonly DELETE_BY_ID: ":id";
|
|
12
|
+
readonly DELETE_BY_KEY: "by-key";
|
|
13
|
+
readonly FOLDERS: "folders";
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FILE_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* File Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
* External File API (Go service)
|
|
8
|
+
*/
|
|
9
|
+
exports.FILE_ROUTES = {
|
|
10
|
+
// Images
|
|
11
|
+
UPLOAD_IMAGE: 'upload-image',
|
|
12
|
+
// Files
|
|
13
|
+
UPLOAD: 'upload',
|
|
14
|
+
LIST: '',
|
|
15
|
+
GET_BY_ID: ':id',
|
|
16
|
+
DELETE_BY_ID: ':id',
|
|
17
|
+
DELETE_BY_KEY: 'by-key',
|
|
18
|
+
// Folders
|
|
19
|
+
FOLDERS: 'folders',
|
|
20
|
+
};
|
package/build/routes/index.d.ts
CHANGED
|
@@ -9,3 +9,8 @@ export { BLOG_ADMIN_POSTS_ROUTES } from './blog-admin-posts.routes';
|
|
|
9
9
|
export { BLOG_PUBLIC_CATEGORIES_ROUTES, BLOG_PUBLIC_POSTS_ROUTES } from './blog-public.routes';
|
|
10
10
|
export { SEO_PAGES_ADMIN_ROUTES } from './seo-pages-admin.routes';
|
|
11
11
|
export { SEO_PAGES_PUBLIC_ROUTES } from './seo-pages-public.routes';
|
|
12
|
+
export { AI_PROVIDER_ADMIN_ROUTES } from './ai-provider-admin.routes';
|
|
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';
|
|
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.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
|
*/
|
|
@@ -21,3 +21,13 @@ var seo_pages_admin_routes_1 = require("./seo-pages-admin.routes");
|
|
|
21
21
|
Object.defineProperty(exports, "SEO_PAGES_ADMIN_ROUTES", { enumerable: true, get: function () { return seo_pages_admin_routes_1.SEO_PAGES_ADMIN_ROUTES; } });
|
|
22
22
|
var seo_pages_public_routes_1 = require("./seo-pages-public.routes");
|
|
23
23
|
Object.defineProperty(exports, "SEO_PAGES_PUBLIC_ROUTES", { enumerable: true, get: function () { return seo_pages_public_routes_1.SEO_PAGES_PUBLIC_ROUTES; } });
|
|
24
|
+
var ai_provider_admin_routes_1 = require("./ai-provider-admin.routes");
|
|
25
|
+
Object.defineProperty(exports, "AI_PROVIDER_ADMIN_ROUTES", { enumerable: true, get: function () { return ai_provider_admin_routes_1.AI_PROVIDER_ADMIN_ROUTES; } });
|
|
26
|
+
var ai_provider_public_routes_1 = require("./ai-provider-public.routes");
|
|
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; } });
|
|
32
|
+
var file_routes_1 = require("./file.routes");
|
|
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
|
+
};
|