@veruna/api-contracts 1.0.21 → 1.0.23

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.
Files changed (50) hide show
  1. package/build/controllers/chat-project.controllers.d.ts +4 -0
  2. package/build/controllers/chat-project.controllers.js +7 -0
  3. package/build/controllers/index.d.ts +1 -0
  4. package/build/controllers/index.js +3 -1
  5. package/build/rest-api.d.ts +13 -5
  6. package/build/rest-api.js +17 -8
  7. package/build/routes/chat-project.routes.d.ts +11 -0
  8. package/build/routes/chat-project.routes.js +14 -0
  9. package/build/routes/index.d.ts +1 -0
  10. package/build/routes/index.js +3 -1
  11. package/build/shared/regex.d.ts +1 -0
  12. package/build/shared/regex.js +3 -1
  13. package/build/v1/chat-project/chat-project.errors.d.ts +8 -0
  14. package/build/v1/chat-project/chat-project.errors.js +28 -0
  15. package/build/v1/chat-project/commands/create-project.command.d.ts +20 -0
  16. package/build/v1/chat-project/commands/create-project.command.js +13 -0
  17. package/build/v1/chat-project/commands/delete-project.command.d.ts +10 -0
  18. package/build/v1/chat-project/commands/delete-project.command.js +15 -0
  19. package/build/v1/chat-project/commands/index.d.ts +3 -0
  20. package/build/v1/chat-project/commands/index.js +19 -0
  21. package/build/v1/chat-project/commands/update-project.command.d.ts +20 -0
  22. package/build/v1/chat-project/commands/update-project.command.js +13 -0
  23. package/build/v1/chat-project/index.d.ts +4 -0
  24. package/build/v1/chat-project/index.js +20 -0
  25. package/build/v1/chat-project/queries/get-project.query.d.ts +15 -0
  26. package/build/v1/chat-project/queries/get-project.query.js +12 -0
  27. package/build/v1/chat-project/queries/get-projects.query.d.ts +30 -0
  28. package/build/v1/chat-project/queries/get-projects.query.js +14 -0
  29. package/build/v1/chat-project/queries/index.d.ts +2 -0
  30. package/build/v1/chat-project/queries/index.js +18 -0
  31. package/build/v1/chat-project/schemas/chat-project-status.enum.d.ts +7 -0
  32. package/build/v1/chat-project/schemas/chat-project-status.enum.js +11 -0
  33. package/build/v1/chat-project/schemas/create-project-request.schema.d.ts +8 -0
  34. package/build/v1/chat-project/schemas/create-project-request.schema.js +12 -0
  35. package/build/v1/chat-project/schemas/index.d.ts +5 -0
  36. package/build/v1/chat-project/schemas/index.js +21 -0
  37. package/build/v1/chat-project/schemas/project-response.schema.d.ts +13 -0
  38. package/build/v1/chat-project/schemas/project-response.schema.js +17 -0
  39. package/build/v1/chat-project/schemas/route-params.schema.d.ts +7 -0
  40. package/build/v1/chat-project/schemas/route-params.schema.js +11 -0
  41. package/build/v1/chat-project/schemas/update-project-request.schema.d.ts +8 -0
  42. package/build/v1/chat-project/schemas/update-project-request.schema.js +12 -0
  43. package/build/v1/file/commands/delete-file-by-key.command.d.ts +1 -1
  44. package/build/v1/file/commands/upload-file.command.d.ts +1 -1
  45. package/build/v1/file/commands/upload-image.command.d.ts +1 -1
  46. package/build/v1/file/queries/list-files.query.d.ts +1 -1
  47. package/build/v1/file/queries/list-folders.query.d.ts +1 -1
  48. package/build/v1/index.d.ts +1 -0
  49. package/build/v1/index.js +1 -0
  50. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Chat Project Controller paths for NestJS @Controller decorator
3
+ */
4
+ export declare const CHAT_PROJECT_CONTROLLER: "v1/projects";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHAT_PROJECT_CONTROLLER = void 0;
4
+ /**
5
+ * Chat Project Controller paths for NestJS @Controller decorator
6
+ */
7
+ exports.CHAT_PROJECT_CONTROLLER = 'v1/projects';
@@ -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; } });
@@ -3,6 +3,7 @@
3
3
  * Used by frontend for API calls
4
4
  */
5
5
  export declare const ROOT: "/api";
6
+ export declare const FILE_ROOT: "/file-api";
6
7
  export declare const REST_API: {
7
8
  readonly V1: {
8
9
  readonly AUTH: {
@@ -88,13 +89,20 @@ export declare const REST_API: {
88
89
  };
89
90
  };
90
91
  readonly FILE: {
91
- readonly UPLOAD_IMAGE: "/api/v1/files/upload-image";
92
- readonly UPLOAD: "/api/v1/files/upload";
93
- readonly LIST: "/api/v1/files";
92
+ readonly UPLOAD_IMAGE: "/file-api/v1/files/upload-image";
93
+ readonly UPLOAD: "/file-api/v1/files/upload";
94
+ readonly LIST: "/file-api/v1/files";
94
95
  readonly GET_BY_ID: (id: string) => string;
95
96
  readonly DELETE_BY_ID: (id: string) => string;
96
- readonly DELETE_BY_KEY: "/api/v1/files/by-key";
97
- readonly FOLDERS: "/api/v1/files/folders";
97
+ readonly DELETE_BY_KEY: "/file-api/v1/files/by-key";
98
+ readonly FOLDERS: "/file-api/v1/files/folders";
99
+ };
100
+ readonly CHAT_PROJECT: {
101
+ readonly CREATE: "/api/v1/projects/";
102
+ readonly GET_ALL: "/api/v1/projects/";
103
+ readonly GET_BY_UUID: (uuid: string) => string;
104
+ readonly UPDATE: (uuid: string) => string;
105
+ readonly DELETE: (uuid: string) => string;
98
106
  };
99
107
  };
100
108
  };
package/build/rest-api.js CHANGED
@@ -4,10 +4,11 @@
4
4
  * Used by frontend for API calls
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.REST_API = exports.ROOT = void 0;
7
+ exports.REST_API = exports.FILE_ROOT = exports.ROOT = void 0;
8
8
  const controllers_1 = require("./controllers");
9
9
  const routes_1 = require("./routes");
10
10
  exports.ROOT = '/api';
11
+ exports.FILE_ROOT = '/file-api';
11
12
  exports.REST_API = {
12
13
  V1: {
13
14
  // Auth module
@@ -102,15 +103,23 @@ exports.REST_API = {
102
103
  // File module (External Go service)
103
104
  FILE: {
104
105
  // Images
105
- UPLOAD_IMAGE: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD_IMAGE}`,
106
+ UPLOAD_IMAGE: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD_IMAGE}`,
106
107
  // Files
107
- UPLOAD: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD}`,
108
- LIST: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}`,
109
- GET_BY_ID: (id) => `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
110
- DELETE_BY_ID: (id) => `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
111
- DELETE_BY_KEY: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.DELETE_BY_KEY}`,
108
+ UPLOAD: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD}`,
109
+ LIST: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}`,
110
+ GET_BY_ID: (id) => `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
111
+ DELETE_BY_ID: (id) => `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
112
+ DELETE_BY_KEY: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.DELETE_BY_KEY}`,
112
113
  // Folders
113
- FOLDERS: `${exports.ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.FOLDERS}`,
114
+ FOLDERS: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.FOLDERS}`,
115
+ },
116
+ // Chat Project module
117
+ CHAT_PROJECT: {
118
+ CREATE: `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${routes_1.CHAT_PROJECT_ROUTES.CREATE}`,
119
+ GET_ALL: `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${routes_1.CHAT_PROJECT_ROUTES.GET_ALL}`,
120
+ GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
121
+ UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
122
+ DELETE: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
114
123
  },
115
124
  },
116
125
  };
@@ -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
+ };
@@ -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';
@@ -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; } });
@@ -6,3 +6,4 @@ export declare const UUID_REGEX: RegExp;
6
6
  export declare const DATETIME_REGEX: RegExp;
7
7
  export declare const PASSWORD_STRENGTH_REGEX: RegExp;
8
8
  export declare const SLUG_REGEX: RegExp;
9
+ export declare const HEX_COLOR_REGEX: RegExp;
@@ -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,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,3 @@
1
+ export * from './create-project.command';
2
+ export * from './update-project.command';
3
+ export * from './delete-project.command';
@@ -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,4 @@
1
+ export * from './chat-project.errors';
2
+ export * from './schemas';
3
+ export * from './commands';
4
+ export * from './queries';
@@ -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,2 @@
1
+ export * from './get-project.query';
2
+ export * from './get-projects.query';
@@ -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,7 @@
1
+ /**
2
+ * Chat Project Status enum
3
+ */
4
+ export declare enum ChatProjectStatus {
5
+ ACTIVE = "active",
6
+ DELETED = "deleted"
7
+ }
@@ -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,8 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Create Chat Project Request Schema
4
+ */
5
+ export declare const CreateProjectRequestSchema: z.ZodObject<{
6
+ title: z.ZodString;
7
+ color: z.ZodString;
8
+ }, z.core.$strip>;
@@ -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,5 @@
1
+ export * from './chat-project-status.enum';
2
+ export * from './create-project-request.schema';
3
+ export * from './update-project-request.schema';
4
+ export * from './project-response.schema';
5
+ export * from './route-params.schema';
@@ -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,7 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Project UUID param schema for route validation
4
+ */
5
+ export declare const ProjectUuidParamSchema: z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ }, z.core.$strip>;
@@ -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,8 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Update Chat Project Request Schema
4
+ */
5
+ export declare const UpdateProjectRequestSchema: z.ZodObject<{
6
+ title: z.ZodOptional<z.ZodString>;
7
+ color: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
@@ -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
+ });
@@ -8,7 +8,7 @@ export declare namespace FileDeleteByKeyCommand {
8
8
  message: z.ZodString;
9
9
  key: z.ZodString;
10
10
  }, z.core.$strip>;
11
- const URL: "/api/v1/files/by-key";
11
+ const URL: "/file-api/v1/files/by-key";
12
12
  const METHOD = HttpMethod.DELETE;
13
13
  type RequestType = z.infer<typeof Request>;
14
14
  type ResponseType = z.infer<typeof Response>;
@@ -9,7 +9,7 @@ export declare namespace FileUploadCommand {
9
9
  cdnUrl: z.ZodString;
10
10
  s3Url: z.ZodString;
11
11
  }, z.core.$strip>;
12
- const URL: "/api/v1/files/upload";
12
+ const URL: "/file-api/v1/files/upload";
13
13
  const METHOD = HttpMethod.PUT;
14
14
  type RequestType = z.infer<typeof Request>;
15
15
  type ResponseType = z.infer<typeof Response>;
@@ -12,7 +12,7 @@ export declare namespace FileUploadImageCommand {
12
12
  cdnUrl: z.ZodString;
13
13
  s3Url: z.ZodString;
14
14
  }, z.core.$strip>;
15
- const URL: "/api/v1/files/upload-image";
15
+ const URL: "/file-api/v1/files/upload-image";
16
16
  const METHOD = HttpMethod.PUT;
17
17
  type RequestType = z.infer<typeof Request>;
18
18
  type ResponseType = z.infer<typeof Response>;
@@ -31,7 +31,7 @@ export declare namespace FileListQuery {
31
31
  hasPrev: z.ZodBoolean;
32
32
  }, z.core.$strip>;
33
33
  }, z.core.$strip>;
34
- const URL: "/api/v1/files";
34
+ const URL: "/file-api/v1/files";
35
35
  const METHOD = HttpMethod.GET;
36
36
  type RequestType = z.infer<typeof Request>;
37
37
  type ResponseType = z.infer<typeof Response>;
@@ -10,7 +10,7 @@ export declare namespace FileFoldersListQuery {
10
10
  fileCount: z.ZodNumber;
11
11
  }, z.core.$strip>>;
12
12
  }, z.core.$strip>;
13
- const URL: "/api/v1/files/folders";
13
+ const URL: "/file-api/v1/files/folders";
14
14
  const METHOD = HttpMethod.GET;
15
15
  type RequestType = z.infer<typeof Request>;
16
16
  type ResponseType = z.infer<typeof Response>;
@@ -7,3 +7,4 @@ export * from './notifications';
7
7
  export * from './seo-pages';
8
8
  export * from './ai-provider';
9
9
  export * from './ai-model';
10
+ export * from './chat-project';
package/build/v1/index.js CHANGED
@@ -23,3 +23,4 @@ __exportStar(require("./notifications"), exports);
23
23
  __exportStar(require("./seo-pages"), exports);
24
24
  __exportStar(require("./ai-provider"), exports);
25
25
  __exportStar(require("./ai-model"), exports);
26
+ __exportStar(require("./chat-project"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",