@veruna/api-contracts 1.0.20 → 1.0.22
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/chat-project.controllers.d.ts +4 -0
- package/build/controllers/chat-project.controllers.js +7 -0
- package/build/controllers/index.d.ts +1 -0
- package/build/controllers/index.js +3 -1
- package/build/rest-api.d.ts +8 -0
- package/build/rest-api.js +9 -0
- package/build/routes/ai-model-public.routes.d.ts +1 -0
- package/build/routes/ai-model-public.routes.js +1 -0
- package/build/routes/chat-project.routes.d.ts +11 -0
- package/build/routes/chat-project.routes.js +14 -0
- package/build/routes/index.d.ts +1 -0
- package/build/routes/index.js +3 -1
- package/build/shared/regex.d.ts +1 -0
- package/build/shared/regex.js +3 -1
- 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/build/v1/chat-project/chat-project.errors.d.ts +8 -0
- package/build/v1/chat-project/chat-project.errors.js +28 -0
- package/build/v1/chat-project/commands/create-project.command.d.ts +20 -0
- package/build/v1/chat-project/commands/create-project.command.js +13 -0
- package/build/v1/chat-project/commands/delete-project.command.d.ts +10 -0
- package/build/v1/chat-project/commands/delete-project.command.js +15 -0
- package/build/v1/chat-project/commands/index.d.ts +3 -0
- package/build/v1/chat-project/commands/index.js +19 -0
- package/build/v1/chat-project/commands/update-project.command.d.ts +20 -0
- package/build/v1/chat-project/commands/update-project.command.js +13 -0
- package/build/v1/chat-project/index.d.ts +4 -0
- package/build/v1/chat-project/index.js +20 -0
- package/build/v1/chat-project/queries/get-project.query.d.ts +15 -0
- package/build/v1/chat-project/queries/get-project.query.js +12 -0
- package/build/v1/chat-project/queries/get-projects.query.d.ts +30 -0
- package/build/v1/chat-project/queries/get-projects.query.js +14 -0
- package/build/v1/chat-project/queries/index.d.ts +2 -0
- package/build/v1/chat-project/queries/index.js +18 -0
- package/build/v1/chat-project/schemas/chat-project-status.enum.d.ts +7 -0
- package/build/v1/chat-project/schemas/chat-project-status.enum.js +11 -0
- package/build/v1/chat-project/schemas/create-project-request.schema.d.ts +8 -0
- package/build/v1/chat-project/schemas/create-project-request.schema.js +12 -0
- package/build/v1/chat-project/schemas/index.d.ts +5 -0
- package/build/v1/chat-project/schemas/index.js +21 -0
- package/build/v1/chat-project/schemas/project-response.schema.d.ts +13 -0
- package/build/v1/chat-project/schemas/project-response.schema.js +17 -0
- package/build/v1/chat-project/schemas/route-params.schema.d.ts +7 -0
- package/build/v1/chat-project/schemas/route-params.schema.js +11 -0
- package/build/v1/chat-project/schemas/update-project-request.schema.d.ts +8 -0
- package/build/v1/chat-project/schemas/update-project-request.schema.js +12 -0
- package/build/v1/index.d.ts +1 -0
- package/build/v1/index.js +1 -0
- package/package.json +1 -1
|
@@ -9,3 +9,4 @@ export { SEO_PAGES_ADMIN_CONTROLLER, SEO_PAGES_PUBLIC_CONTROLLER, } from './seo-
|
|
|
9
9
|
export { AI_PROVIDER_ADMIN_CONTROLLER, AI_PROVIDER_PUBLIC_CONTROLLER, } from './ai-provider.controllers';
|
|
10
10
|
export { AI_MODEL_ADMIN_CONTROLLER, AI_MODEL_PUBLIC_CONTROLLER, } from './ai-model.controllers';
|
|
11
11
|
export { FILE_CONTROLLER } from './file.controllers';
|
|
12
|
+
export { CHAT_PROJECT_CONTROLLER } from './chat-project.controllers';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.CHAT_PROJECT_CONTROLLER = 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
|
*/
|
|
@@ -26,3 +26,5 @@ Object.defineProperty(exports, "AI_MODEL_ADMIN_CONTROLLER", { enumerable: true,
|
|
|
26
26
|
Object.defineProperty(exports, "AI_MODEL_PUBLIC_CONTROLLER", { enumerable: true, get: function () { return ai_model_controllers_1.AI_MODEL_PUBLIC_CONTROLLER; } });
|
|
27
27
|
var file_controllers_1 = require("./file.controllers");
|
|
28
28
|
Object.defineProperty(exports, "FILE_CONTROLLER", { enumerable: true, get: function () { return file_controllers_1.FILE_CONTROLLER; } });
|
|
29
|
+
var chat_project_controllers_1 = require("./chat-project.controllers");
|
|
30
|
+
Object.defineProperty(exports, "CHAT_PROJECT_CONTROLLER", { enumerable: true, get: function () { return chat_project_controllers_1.CHAT_PROJECT_CONTROLLER; } });
|
package/build/rest-api.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export declare const REST_API: {
|
|
|
84
84
|
};
|
|
85
85
|
readonly PUBLIC: {
|
|
86
86
|
readonly GET_ALL: "/api/v1/ai-models/";
|
|
87
|
+
readonly GET_LIST: "/api/v1/ai-models/list";
|
|
87
88
|
};
|
|
88
89
|
};
|
|
89
90
|
readonly FILE: {
|
|
@@ -95,5 +96,12 @@ export declare const REST_API: {
|
|
|
95
96
|
readonly DELETE_BY_KEY: "/api/v1/files/by-key";
|
|
96
97
|
readonly FOLDERS: "/api/v1/files/folders";
|
|
97
98
|
};
|
|
99
|
+
readonly CHAT_PROJECT: {
|
|
100
|
+
readonly CREATE: "/api/v1/projects/";
|
|
101
|
+
readonly GET_ALL: "/api/v1/projects/";
|
|
102
|
+
readonly GET_BY_UUID: (uuid: string) => string;
|
|
103
|
+
readonly UPDATE: (uuid: string) => string;
|
|
104
|
+
readonly DELETE: (uuid: string) => string;
|
|
105
|
+
};
|
|
98
106
|
};
|
|
99
107
|
};
|
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)
|
|
@@ -111,5 +112,13 @@ exports.REST_API = {
|
|
|
111
112
|
// Folders
|
|
112
113
|
FOLDERS: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.FOLDERS}`,
|
|
113
114
|
},
|
|
115
|
+
// Chat Project module
|
|
116
|
+
CHAT_PROJECT: {
|
|
117
|
+
CREATE: `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${routes_1.CHAT_PROJECT_ROUTES.CREATE}`,
|
|
118
|
+
GET_ALL: `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${routes_1.CHAT_PROJECT_ROUTES.GET_ALL}`,
|
|
119
|
+
GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
|
|
120
|
+
UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
|
|
121
|
+
DELETE: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
|
|
122
|
+
},
|
|
114
123
|
},
|
|
115
124
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Project Routes
|
|
3
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const CHAT_PROJECT_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.CHAT_PROJECT_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Chat Project Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.CHAT_PROJECT_ROUTES = {
|
|
9
|
+
CREATE: '', // POST to controller base
|
|
10
|
+
GET_ALL: '', // GET to controller base
|
|
11
|
+
GET_BY_UUID: ':uuid', // GET /projects/:uuid
|
|
12
|
+
UPDATE: ':uuid', // PATCH /projects/:uuid
|
|
13
|
+
DELETE: ':uuid', // DELETE /projects/:uuid
|
|
14
|
+
};
|
package/build/routes/index.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export { AI_PROVIDER_PUBLIC_ROUTES } from './ai-provider-public.routes';
|
|
|
14
14
|
export { AI_MODEL_ADMIN_ROUTES } from './ai-model-admin.routes';
|
|
15
15
|
export { AI_MODEL_PUBLIC_ROUTES } from './ai-model-public.routes';
|
|
16
16
|
export { FILE_ROUTES } from './file.routes';
|
|
17
|
+
export { CHAT_PROJECT_ROUTES } from './chat-project.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_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;
|
|
3
|
+
exports.CHAT_PROJECT_ROUTES = 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
|
*/
|
|
@@ -31,3 +31,5 @@ var ai_model_public_routes_1 = require("./ai-model-public.routes");
|
|
|
31
31
|
Object.defineProperty(exports, "AI_MODEL_PUBLIC_ROUTES", { enumerable: true, get: function () { return ai_model_public_routes_1.AI_MODEL_PUBLIC_ROUTES; } });
|
|
32
32
|
var file_routes_1 = require("./file.routes");
|
|
33
33
|
Object.defineProperty(exports, "FILE_ROUTES", { enumerable: true, get: function () { return file_routes_1.FILE_ROUTES; } });
|
|
34
|
+
var chat_project_routes_1 = require("./chat-project.routes");
|
|
35
|
+
Object.defineProperty(exports, "CHAT_PROJECT_ROUTES", { enumerable: true, get: function () { return chat_project_routes_1.CHAT_PROJECT_ROUTES; } });
|
package/build/shared/regex.d.ts
CHANGED
package/build/shared/regex.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Common regex patterns for validation
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SLUG_REGEX = exports.PASSWORD_STRENGTH_REGEX = exports.DATETIME_REGEX = exports.UUID_REGEX = exports.EMAIL_REGEX = void 0;
|
|
6
|
+
exports.HEX_COLOR_REGEX = exports.SLUG_REGEX = exports.PASSWORD_STRENGTH_REGEX = exports.DATETIME_REGEX = exports.UUID_REGEX = exports.EMAIL_REGEX = void 0;
|
|
7
7
|
// RFC 5322 email regex (simplified)
|
|
8
8
|
exports.EMAIL_REGEX = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
9
9
|
// UUID v4 regex
|
|
@@ -14,3 +14,5 @@ exports.DATETIME_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;
|
|
|
14
14
|
exports.PASSWORD_STRENGTH_REGEX = /[0-9!@#$%^&*(),.?":{}|<>]/;
|
|
15
15
|
// Slug/alias regex (lowercase letters, numbers, hyphens)
|
|
16
16
|
exports.SLUG_REGEX = /^[a-z0-9-]+$/;
|
|
17
|
+
// Hex color regex: #RRGGBB
|
|
18
|
+
exports.HEX_COLOR_REGEX = /^#[0-9A-Fa-f]{6}$/;
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum ChatProjectErrorCode {
|
|
3
|
+
PROJECT_NOT_FOUND = "PROJECT_NOT_FOUND",
|
|
4
|
+
PROJECT_ACCESS_DENIED = "PROJECT_ACCESS_DENIED",
|
|
5
|
+
INVALID_PROJECT_STATUS = "INVALID_PROJECT_STATUS",
|
|
6
|
+
INVALID_PROJECT_COLOR = "INVALID_PROJECT_COLOR"
|
|
7
|
+
}
|
|
8
|
+
export declare const CHAT_PROJECT_ERRORS: Record<ChatProjectErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHAT_PROJECT_ERRORS = exports.ChatProjectErrorCode = void 0;
|
|
4
|
+
var ChatProjectErrorCode;
|
|
5
|
+
(function (ChatProjectErrorCode) {
|
|
6
|
+
ChatProjectErrorCode["PROJECT_NOT_FOUND"] = "PROJECT_NOT_FOUND";
|
|
7
|
+
ChatProjectErrorCode["PROJECT_ACCESS_DENIED"] = "PROJECT_ACCESS_DENIED";
|
|
8
|
+
ChatProjectErrorCode["INVALID_PROJECT_STATUS"] = "INVALID_PROJECT_STATUS";
|
|
9
|
+
ChatProjectErrorCode["INVALID_PROJECT_COLOR"] = "INVALID_PROJECT_COLOR";
|
|
10
|
+
})(ChatProjectErrorCode || (exports.ChatProjectErrorCode = ChatProjectErrorCode = {}));
|
|
11
|
+
exports.CHAT_PROJECT_ERRORS = {
|
|
12
|
+
[ChatProjectErrorCode.PROJECT_NOT_FOUND]: {
|
|
13
|
+
code: ChatProjectErrorCode.PROJECT_NOT_FOUND,
|
|
14
|
+
statusCode: 404,
|
|
15
|
+
},
|
|
16
|
+
[ChatProjectErrorCode.PROJECT_ACCESS_DENIED]: {
|
|
17
|
+
code: ChatProjectErrorCode.PROJECT_ACCESS_DENIED,
|
|
18
|
+
statusCode: 403,
|
|
19
|
+
},
|
|
20
|
+
[ChatProjectErrorCode.INVALID_PROJECT_STATUS]: {
|
|
21
|
+
code: ChatProjectErrorCode.INVALID_PROJECT_STATUS,
|
|
22
|
+
statusCode: 400,
|
|
23
|
+
},
|
|
24
|
+
[ChatProjectErrorCode.INVALID_PROJECT_COLOR]: {
|
|
25
|
+
code: ChatProjectErrorCode.INVALID_PROJECT_COLOR,
|
|
26
|
+
statusCode: 400,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace ChatProjectCreateCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
color: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const Response: z.ZodObject<{
|
|
9
|
+
uuid: z.ZodString;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
color: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<typeof import("../schemas").ChatProjectStatus>;
|
|
13
|
+
createdAt: z.ZodString;
|
|
14
|
+
updatedAt: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
const URL: "/api/v1/projects/";
|
|
17
|
+
const METHOD = HttpMethod.POST;
|
|
18
|
+
type RequestType = z.infer<typeof Request>;
|
|
19
|
+
type ResponseType = z.infer<typeof Response>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatProjectCreateCommand = 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 ChatProjectCreateCommand;
|
|
8
|
+
(function (ChatProjectCreateCommand) {
|
|
9
|
+
ChatProjectCreateCommand.Request = schemas_1.CreateProjectRequestSchema;
|
|
10
|
+
ChatProjectCreateCommand.Response = schemas_1.ProjectResponseSchema;
|
|
11
|
+
ChatProjectCreateCommand.URL = rest_api_1.REST_API.V1.CHAT_PROJECT.CREATE;
|
|
12
|
+
ChatProjectCreateCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
13
|
+
})(ChatProjectCreateCommand || (exports.ChatProjectCreateCommand = ChatProjectCreateCommand = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace ChatProjectDeleteCommand {
|
|
4
|
+
const Response: z.ZodObject<{
|
|
5
|
+
uuid: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
const URL: (uuid: string) => string;
|
|
8
|
+
const METHOD = HttpMethod.DELETE;
|
|
9
|
+
type ResponseType = z.infer<typeof Response>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatProjectDeleteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
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 ChatProjectDeleteCommand;
|
|
9
|
+
(function (ChatProjectDeleteCommand) {
|
|
10
|
+
ChatProjectDeleteCommand.Response = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
12
|
+
});
|
|
13
|
+
ChatProjectDeleteCommand.URL = rest_api_1.REST_API.V1.CHAT_PROJECT.DELETE;
|
|
14
|
+
ChatProjectDeleteCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
15
|
+
})(ChatProjectDeleteCommand || (exports.ChatProjectDeleteCommand = ChatProjectDeleteCommand = {}));
|
|
@@ -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-project.command"), exports);
|
|
18
|
+
__exportStar(require("./update-project.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-project.command"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace ChatProjectUpdateCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6
|
+
color: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const Response: z.ZodObject<{
|
|
9
|
+
uuid: z.ZodString;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
color: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<typeof import("../schemas").ChatProjectStatus>;
|
|
13
|
+
createdAt: z.ZodString;
|
|
14
|
+
updatedAt: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
const URL: (uuid: string) => string;
|
|
17
|
+
const METHOD = HttpMethod.PATCH;
|
|
18
|
+
type RequestType = z.infer<typeof Request>;
|
|
19
|
+
type ResponseType = z.infer<typeof Response>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatProjectUpdateCommand = 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 ChatProjectUpdateCommand;
|
|
8
|
+
(function (ChatProjectUpdateCommand) {
|
|
9
|
+
ChatProjectUpdateCommand.Request = schemas_1.UpdateProjectRequestSchema;
|
|
10
|
+
ChatProjectUpdateCommand.Response = schemas_1.ProjectResponseSchema;
|
|
11
|
+
ChatProjectUpdateCommand.URL = rest_api_1.REST_API.V1.CHAT_PROJECT.UPDATE;
|
|
12
|
+
ChatProjectUpdateCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
13
|
+
})(ChatProjectUpdateCommand || (exports.ChatProjectUpdateCommand = ChatProjectUpdateCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./chat-project.errors"), exports);
|
|
18
|
+
__exportStar(require("./schemas"), exports);
|
|
19
|
+
__exportStar(require("./commands"), exports);
|
|
20
|
+
__exportStar(require("./queries"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace ChatProjectGetProjectQuery {
|
|
4
|
+
const Response: z.ZodObject<{
|
|
5
|
+
uuid: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
color: z.ZodString;
|
|
8
|
+
status: z.ZodEnum<typeof import("../schemas").ChatProjectStatus>;
|
|
9
|
+
createdAt: z.ZodString;
|
|
10
|
+
updatedAt: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
const URL: (uuid: string) => string;
|
|
13
|
+
const METHOD = HttpMethod.GET;
|
|
14
|
+
type ResponseType = z.infer<typeof Response>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatProjectGetProjectQuery = 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 ChatProjectGetProjectQuery;
|
|
8
|
+
(function (ChatProjectGetProjectQuery) {
|
|
9
|
+
ChatProjectGetProjectQuery.Response = schemas_1.ProjectResponseSchema;
|
|
10
|
+
ChatProjectGetProjectQuery.URL = rest_api_1.REST_API.V1.CHAT_PROJECT.GET_BY_UUID;
|
|
11
|
+
ChatProjectGetProjectQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
12
|
+
})(ChatProjectGetProjectQuery || (exports.ChatProjectGetProjectQuery = ChatProjectGetProjectQuery = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace ChatProjectGetProjectsQuery {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const Response: z.ZodObject<{
|
|
9
|
+
data: z.ZodArray<z.ZodObject<{
|
|
10
|
+
uuid: z.ZodString;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
color: z.ZodString;
|
|
13
|
+
status: z.ZodEnum<typeof import("../schemas").ChatProjectStatus>;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
meta: z.ZodObject<{
|
|
18
|
+
page: z.ZodNumber;
|
|
19
|
+
limit: z.ZodNumber;
|
|
20
|
+
total: z.ZodNumber;
|
|
21
|
+
totalPages: z.ZodNumber;
|
|
22
|
+
hasNext: z.ZodBoolean;
|
|
23
|
+
hasPrev: z.ZodBoolean;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
const URL: "/api/v1/projects/";
|
|
27
|
+
const METHOD = HttpMethod.GET;
|
|
28
|
+
type RequestType = z.infer<typeof Request>;
|
|
29
|
+
type ResponseType = z.infer<typeof Response>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatProjectGetProjectsQuery = 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 ChatProjectGetProjectsQuery;
|
|
9
|
+
(function (ChatProjectGetProjectsQuery) {
|
|
10
|
+
ChatProjectGetProjectsQuery.Request = shared_1.PaginationQuerySchema;
|
|
11
|
+
ChatProjectGetProjectsQuery.Response = (0, shared_1.createPaginatedResponseSchema)(schemas_1.ProjectResponseSchema);
|
|
12
|
+
ChatProjectGetProjectsQuery.URL = rest_api_1.REST_API.V1.CHAT_PROJECT.GET_ALL;
|
|
13
|
+
ChatProjectGetProjectsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(ChatProjectGetProjectsQuery || (exports.ChatProjectGetProjectsQuery = ChatProjectGetProjectsQuery = {}));
|
|
@@ -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-project.query"), exports);
|
|
18
|
+
__exportStar(require("./get-projects.query"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatProjectStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Chat Project Status enum
|
|
6
|
+
*/
|
|
7
|
+
var ChatProjectStatus;
|
|
8
|
+
(function (ChatProjectStatus) {
|
|
9
|
+
ChatProjectStatus["ACTIVE"] = "active";
|
|
10
|
+
ChatProjectStatus["DELETED"] = "deleted";
|
|
11
|
+
})(ChatProjectStatus || (exports.ChatProjectStatus = ChatProjectStatus = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateProjectRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
|
+
/**
|
|
7
|
+
* Create Chat Project Request Schema
|
|
8
|
+
*/
|
|
9
|
+
exports.CreateProjectRequestSchema = zod_1.z.object({
|
|
10
|
+
title: zod_1.z.string().min(1).max(100),
|
|
11
|
+
color: zod_1.z.string().regex(shared_1.HEX_COLOR_REGEX, 'Color must be in hex format: #RRGGBB'),
|
|
12
|
+
});
|
|
@@ -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("./chat-project-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./create-project-request.schema"), exports);
|
|
19
|
+
__exportStar(require("./update-project-request.schema"), exports);
|
|
20
|
+
__exportStar(require("./project-response.schema"), exports);
|
|
21
|
+
__exportStar(require("./route-params.schema"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ChatProjectStatus } from './chat-project-status.enum';
|
|
3
|
+
/**
|
|
4
|
+
* Chat Project Response Schema
|
|
5
|
+
*/
|
|
6
|
+
export declare const ProjectResponseSchema: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
color: z.ZodString;
|
|
10
|
+
status: z.ZodEnum<typeof ChatProjectStatus>;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
updatedAt: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
|
+
const chat_project_status_enum_1 = require("./chat-project-status.enum");
|
|
7
|
+
/**
|
|
8
|
+
* Chat Project Response Schema
|
|
9
|
+
*/
|
|
10
|
+
exports.ProjectResponseSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
color: zod_1.z.string(),
|
|
14
|
+
status: zod_1.z.nativeEnum(chat_project_status_enum_1.ChatProjectStatus),
|
|
15
|
+
createdAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
|
|
16
|
+
updatedAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
|
|
17
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectUuidParamSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
|
+
/**
|
|
7
|
+
* Project UUID param schema for route validation
|
|
8
|
+
*/
|
|
9
|
+
exports.ProjectUuidParamSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateProjectRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
|
+
/**
|
|
7
|
+
* Update Chat Project Request Schema
|
|
8
|
+
*/
|
|
9
|
+
exports.UpdateProjectRequestSchema = zod_1.z.object({
|
|
10
|
+
title: zod_1.z.string().min(1).max(100).optional(),
|
|
11
|
+
color: zod_1.z.string().regex(shared_1.HEX_COLOR_REGEX, 'Color must be in hex format: #RRGGBB').optional(),
|
|
12
|
+
});
|
package/build/v1/index.d.ts
CHANGED
package/build/v1/index.js
CHANGED