@veruna/api-contracts 1.0.37 → 1.0.39

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 (53) hide show
  1. package/build/rest-api.d.ts +1 -0
  2. package/build/rest-api.js +1 -0
  3. package/build/routes/chat-project.routes.d.ts +1 -0
  4. package/build/routes/chat-project.routes.js +1 -0
  5. package/build/v1/blog/admin/commands/create-post.command.d.ts +8 -0
  6. package/build/v1/blog/admin/commands/update-post.command.d.ts +8 -0
  7. package/build/v1/blog/admin/queries/get-post.query.d.ts +4 -0
  8. package/build/v1/blog/admin/queries/get-posts.query.d.ts +4 -0
  9. package/build/v1/blog/blog.errors.d.ts +2 -1
  10. package/build/v1/blog/blog.errors.js +5 -0
  11. package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +4 -0
  12. package/build/v1/blog/public/queries/get-posts.query.d.ts +4 -0
  13. package/build/v1/blog/schemas/create-post-request.schema.d.ts +4 -0
  14. package/build/v1/blog/schemas/create-post-request.schema.js +20 -2
  15. package/build/v1/blog/schemas/post-response.schema.d.ts +4 -0
  16. package/build/v1/blog/schemas/post-response.schema.js +4 -0
  17. package/build/v1/blog/schemas/update-post-request.schema.d.ts +4 -0
  18. package/build/v1/blog/schemas/update-post-request.schema.js +21 -2
  19. package/build/v1/chat/chat.errors.d.ts +2 -1
  20. package/build/v1/chat/chat.errors.js +5 -0
  21. package/build/v1/chat/commands/create-reg-chat.command.d.ts +3 -1
  22. package/build/v1/chat/commands/create-reg-chat.command.js +1 -2
  23. package/build/v1/chat/commands/index.d.ts +1 -0
  24. package/build/v1/chat/commands/index.js +3 -1
  25. package/build/v1/chat/commands/update-chat.command.d.ts +46 -0
  26. package/build/v1/chat/commands/update-chat.command.js +17 -0
  27. package/build/v1/chat/schemas/create-chat-request.schema.d.ts +5 -0
  28. package/build/v1/chat/schemas/create-chat-request.schema.js +7 -0
  29. package/build/v1/chat/schemas/index.d.ts +4 -0
  30. package/build/v1/chat/schemas/index.js +5 -1
  31. package/build/v1/chat/schemas/update-chat-request.schema.d.ts +6 -0
  32. package/build/v1/chat/schemas/update-chat-request.schema.js +8 -0
  33. package/build/v1/chat-project/events/folder-deleted.event.d.ts +10 -0
  34. package/build/v1/chat-project/events/folder-deleted.event.js +2 -0
  35. package/build/v1/chat-project/events/index.d.ts +1 -0
  36. package/build/v1/chat-project/events/index.js +17 -0
  37. package/build/v1/chat-project/index.d.ts +1 -0
  38. package/build/v1/chat-project/index.js +1 -0
  39. package/build/v1/chat-project/queries/get-project-chats.query.d.ts +26 -0
  40. package/build/v1/chat-project/queries/get-project-chats.query.js +17 -0
  41. package/build/v1/chat-project/queries/index.d.ts +1 -0
  42. package/build/v1/chat-project/queries/index.js +1 -0
  43. package/build/v1/chat-project/schemas/get-project-chats.schema.d.ts +33 -0
  44. package/build/v1/chat-project/schemas/get-project-chats.schema.js +28 -0
  45. package/build/v1/chat-project/schemas/index.d.ts +1 -0
  46. package/build/v1/chat-project/schemas/index.js +1 -0
  47. package/build/v1/seo-pages/public/queries/get-hierarchy-list.query.d.ts +17 -8
  48. package/build/v1/seo-pages/public/queries/get-hierarchy-list.query.js +1 -1
  49. package/build/v1/seo-pages/schemas/index.d.ts +1 -1
  50. package/build/v1/seo-pages/schemas/index.js +2 -1
  51. package/build/v1/seo-pages/schemas/page-hierarchy.schema.d.ts +28 -1
  52. package/build/v1/seo-pages/schemas/page-hierarchy.schema.js +9 -2
  53. package/package.json +1 -1
@@ -121,6 +121,7 @@ export declare const REST_API: {
121
121
  readonly GET_BY_UUID: (uuid: string) => string;
122
122
  readonly UPDATE: (uuid: string) => string;
123
123
  readonly DELETE: (uuid: string) => string;
124
+ readonly GET_CHATS: (uuid: string) => string;
124
125
  };
125
126
  readonly CHAT: {
126
127
  readonly UNREG: {
package/build/rest-api.js CHANGED
@@ -138,6 +138,7 @@ exports.REST_API = {
138
138
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
139
139
  UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
140
140
  DELETE: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}`,
141
+ GET_CHATS: (uuid) => `${exports.ROOT}/${controllers_1.CHAT_PROJECT_CONTROLLER}/${uuid}/chats`,
141
142
  },
142
143
  CHAT: {
143
144
  UNREG: {
@@ -8,4 +8,5 @@ export declare const CHAT_PROJECT_ROUTES: {
8
8
  readonly GET_BY_UUID: ":uuid";
9
9
  readonly UPDATE: ":uuid";
10
10
  readonly DELETE: ":uuid";
11
+ readonly GET_CHATS: ":uuid/chats";
11
12
  };
@@ -11,4 +11,5 @@ exports.CHAT_PROJECT_ROUTES = {
11
11
  GET_BY_UUID: ':uuid', // GET /projects/:uuid
12
12
  UPDATE: ':uuid', // PATCH /projects/:uuid
13
13
  DELETE: ':uuid', // DELETE /projects/:uuid
14
+ GET_CHATS: ':uuid/chats', // GET /projects/:uuid/chats
14
15
  };
@@ -11,6 +11,10 @@ export declare namespace AdminBlogCreatePostCommand {
11
11
  author: z.ZodString;
12
12
  categoryIds: z.ZodArray<z.ZodString>;
13
13
  status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
14
+ pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ aiWidgetEnabled: z.ZodDefault<z.ZodBoolean>;
16
+ aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
18
  }, z.core.$strip>;
15
19
  const Response: z.ZodObject<{
16
20
  uuid: z.ZodString;
@@ -32,6 +36,10 @@ export declare namespace AdminBlogCreatePostCommand {
32
36
  }, z.core.$strip>>;
33
37
  viewsCount: z.ZodNumber;
34
38
  status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
39
+ pageId: z.ZodNullable<z.ZodString>;
40
+ aiWidgetEnabled: z.ZodBoolean;
41
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
42
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
35
43
  createdAt: z.ZodString;
36
44
  updatedAt: z.ZodString;
37
45
  }, z.core.$strip>;
@@ -11,6 +11,10 @@ export declare namespace AdminBlogUpdatePostCommand {
11
11
  author: z.ZodOptional<z.ZodString>;
12
12
  categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
13
  status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
14
+ pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ aiWidgetEnabled: z.ZodOptional<z.ZodBoolean>;
16
+ aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
18
  }, z.core.$strip>;
15
19
  const Response: z.ZodObject<{
16
20
  uuid: z.ZodString;
@@ -32,6 +36,10 @@ export declare namespace AdminBlogUpdatePostCommand {
32
36
  }, z.core.$strip>>;
33
37
  viewsCount: z.ZodNumber;
34
38
  status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
39
+ pageId: z.ZodNullable<z.ZodString>;
40
+ aiWidgetEnabled: z.ZodBoolean;
41
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
42
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
35
43
  createdAt: z.ZodString;
36
44
  updatedAt: z.ZodString;
37
45
  }, z.core.$strip>;
@@ -24,6 +24,10 @@ export declare namespace AdminBlogGetPostQuery {
24
24
  }, z.core.$strip>>;
25
25
  viewsCount: z.ZodNumber;
26
26
  status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
27
+ pageId: z.ZodNullable<z.ZodString>;
28
+ aiWidgetEnabled: z.ZodBoolean;
29
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
30
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
27
31
  createdAt: z.ZodString;
28
32
  updatedAt: z.ZodString;
29
33
  }, z.core.$strip>;
@@ -28,6 +28,10 @@ export declare namespace AdminBlogGetPostsQuery {
28
28
  }, z.core.$strip>>;
29
29
  viewsCount: z.ZodNumber;
30
30
  status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
31
+ pageId: z.ZodNullable<z.ZodString>;
32
+ aiWidgetEnabled: z.ZodBoolean;
33
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
34
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
31
35
  createdAt: z.ZodString;
32
36
  updatedAt: z.ZodString;
33
37
  }, z.core.$strip>>;
@@ -13,6 +13,7 @@ export declare enum BlogErrorCode {
13
13
  POST_CREATION_FAILED = "POST_CREATION_FAILED",
14
14
  POST_UPDATE_FAILED = "POST_UPDATE_FAILED",
15
15
  POST_DELETE_FAILED = "POST_DELETE_FAILED",
16
- INVALID_ALIAS_FORMAT = "INVALID_ALIAS_FORMAT"
16
+ INVALID_ALIAS_FORMAT = "INVALID_ALIAS_FORMAT",
17
+ AI_WIDGET_VALIDATION_FAILED = "AI_WIDGET_VALIDATION_FAILED"
17
18
  }
18
19
  export declare const BLOG_ERRORS: Record<BlogErrorCode, ErrorMetadata>;
@@ -20,6 +20,7 @@ var BlogErrorCode;
20
20
  BlogErrorCode["POST_DELETE_FAILED"] = "POST_DELETE_FAILED";
21
21
  // Validation errors
22
22
  BlogErrorCode["INVALID_ALIAS_FORMAT"] = "INVALID_ALIAS_FORMAT";
23
+ BlogErrorCode["AI_WIDGET_VALIDATION_FAILED"] = "AI_WIDGET_VALIDATION_FAILED";
23
24
  })(BlogErrorCode || (exports.BlogErrorCode = BlogErrorCode = {}));
24
25
  exports.BLOG_ERRORS = {
25
26
  // Category errors
@@ -81,4 +82,8 @@ exports.BLOG_ERRORS = {
81
82
  code: BlogErrorCode.INVALID_ALIAS_FORMAT,
82
83
  statusCode: 400,
83
84
  },
85
+ [BlogErrorCode.AI_WIDGET_VALIDATION_FAILED]: {
86
+ code: BlogErrorCode.AI_WIDGET_VALIDATION_FAILED,
87
+ statusCode: 400,
88
+ },
84
89
  };
@@ -24,6 +24,10 @@ export declare namespace BlogGetPostByAliasQuery {
24
24
  }, z.core.$strip>>;
25
25
  viewsCount: z.ZodNumber;
26
26
  status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
27
+ pageId: z.ZodNullable<z.ZodString>;
28
+ aiWidgetEnabled: z.ZodBoolean;
29
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
30
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
27
31
  createdAt: z.ZodString;
28
32
  updatedAt: z.ZodString;
29
33
  }, z.core.$strip>;
@@ -27,6 +27,10 @@ export declare namespace BlogGetPostsQuery {
27
27
  }, z.core.$strip>>;
28
28
  viewsCount: z.ZodNumber;
29
29
  status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
30
+ pageId: z.ZodNullable<z.ZodString>;
31
+ aiWidgetEnabled: z.ZodBoolean;
32
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
33
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
30
34
  createdAt: z.ZodString;
31
35
  updatedAt: z.ZodString;
32
36
  }, z.core.$strip>>;
@@ -10,4 +10,8 @@ export declare const CreatePostRequestSchema: z.ZodObject<{
10
10
  author: z.ZodString;
11
11
  categoryIds: z.ZodArray<z.ZodString>;
12
12
  status: z.ZodDefault<z.ZodEnum<typeof BlogPostStatus>>;
13
+ pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ aiWidgetEnabled: z.ZodDefault<z.ZodBoolean>;
15
+ aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
17
  }, z.core.$strip>;
@@ -4,8 +4,14 @@ exports.CreatePostRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const shared_1 = require("../../../shared");
6
6
  const blog_post_status_enum_1 = require("./blog-post-status.enum");
7
- exports.CreatePostRequestSchema = zod_1.z.object({
8
- alias: zod_1.z.string().min(1).max(200).regex(shared_1.SLUG_REGEX).transform(val => val.toLowerCase().trim()),
7
+ exports.CreatePostRequestSchema = zod_1.z
8
+ .object({
9
+ alias: zod_1.z
10
+ .string()
11
+ .min(1)
12
+ .max(200)
13
+ .regex(shared_1.SLUG_REGEX)
14
+ .transform((val) => val.toLowerCase().trim()),
9
15
  title: zod_1.z.string().min(1).max(300),
10
16
  metaTitle: zod_1.z.string().min(1).max(100),
11
17
  metaDescription: zod_1.z.string().min(1).max(200),
@@ -14,4 +20,16 @@ exports.CreatePostRequestSchema = zod_1.z.object({
14
20
  author: zod_1.z.string().min(1).max(100),
15
21
  categoryIds: zod_1.z.array(zod_1.z.string().regex(shared_1.UUID_REGEX)).min(1),
16
22
  status: zod_1.z.enum(blog_post_status_enum_1.BlogPostStatus).default(blog_post_status_enum_1.BlogPostStatus.DRAFT),
23
+ pageId: zod_1.z.string().regex(shared_1.UUID_REGEX).nullable().optional(),
24
+ aiWidgetEnabled: zod_1.z.boolean().default(false),
25
+ aiWidgetPlaceholder: zod_1.z.string().max(500).nullable().optional(),
26
+ aiWidgetPrompt: zod_1.z.string().max(2000).nullable().optional(),
27
+ })
28
+ .refine((data) => {
29
+ if (data.aiWidgetEnabled) {
30
+ return data.pageId && data.aiWidgetPlaceholder && data.aiWidgetPrompt;
31
+ }
32
+ return true;
33
+ }, {
34
+ message: 'pageId, aiWidgetPlaceholder and aiWidgetPrompt are required when aiWidgetEnabled is true',
17
35
  });
@@ -23,6 +23,10 @@ export declare const PostResponseSchema: z.ZodObject<{
23
23
  }, z.core.$strip>>;
24
24
  viewsCount: z.ZodNumber;
25
25
  status: z.ZodEnum<typeof BlogPostStatus>;
26
+ pageId: z.ZodNullable<z.ZodString>;
27
+ aiWidgetEnabled: z.ZodBoolean;
28
+ aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
29
+ aiWidgetPrompt: z.ZodNullable<z.ZodString>;
26
30
  createdAt: z.ZodString;
27
31
  updatedAt: z.ZodString;
28
32
  }, z.core.$strip>;
@@ -20,6 +20,10 @@ exports.PostResponseSchema = zod_1.z.object({
20
20
  categories: zod_1.z.array(category_response_schema_1.CategoryResponseSchema),
21
21
  viewsCount: zod_1.z.number().int().nonnegative(),
22
22
  status: zod_1.z.nativeEnum(blog_post_status_enum_1.BlogPostStatus),
23
+ pageId: zod_1.z.string().regex(regex_1.UUID_REGEX).nullable(),
24
+ aiWidgetEnabled: zod_1.z.boolean(),
25
+ aiWidgetPlaceholder: zod_1.z.string().nullable(),
26
+ aiWidgetPrompt: zod_1.z.string().nullable(),
23
27
  createdAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
24
28
  updatedAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
25
29
  });
@@ -10,4 +10,8 @@ export declare const UpdatePostRequestSchema: z.ZodObject<{
10
10
  author: z.ZodOptional<z.ZodString>;
11
11
  categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
12
  status: z.ZodOptional<z.ZodEnum<typeof BlogPostStatus>>;
13
+ pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ aiWidgetEnabled: z.ZodOptional<z.ZodBoolean>;
15
+ aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
17
  }, z.core.$strip>;
@@ -4,8 +4,15 @@ exports.UpdatePostRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const regex_1 = require("../../../shared/regex");
6
6
  const blog_post_status_enum_1 = require("./blog-post-status.enum");
7
- exports.UpdatePostRequestSchema = zod_1.z.object({
8
- alias: zod_1.z.string().min(1).max(200).regex(regex_1.SLUG_REGEX).transform(val => val.toLowerCase().trim()).optional(),
7
+ exports.UpdatePostRequestSchema = zod_1.z
8
+ .object({
9
+ alias: zod_1.z
10
+ .string()
11
+ .min(1)
12
+ .max(200)
13
+ .regex(regex_1.SLUG_REGEX)
14
+ .transform((val) => val.toLowerCase().trim())
15
+ .optional(),
9
16
  title: zod_1.z.string().min(1).max(300).optional(),
10
17
  metaTitle: zod_1.z.string().min(1).max(100).optional(),
11
18
  metaDescription: zod_1.z.string().min(1).max(200).optional(),
@@ -14,4 +21,16 @@ exports.UpdatePostRequestSchema = zod_1.z.object({
14
21
  author: zod_1.z.string().min(1).max(100).optional(),
15
22
  categoryIds: zod_1.z.array(zod_1.z.string().regex(regex_1.UUID_REGEX)).min(1).optional(),
16
23
  status: zod_1.z.nativeEnum(blog_post_status_enum_1.BlogPostStatus).optional(),
24
+ pageId: zod_1.z.string().regex(regex_1.UUID_REGEX).nullable().optional(),
25
+ aiWidgetEnabled: zod_1.z.boolean().optional(),
26
+ aiWidgetPlaceholder: zod_1.z.string().max(500).nullable().optional(),
27
+ aiWidgetPrompt: zod_1.z.string().max(2000).nullable().optional(),
28
+ })
29
+ .refine((data) => {
30
+ if (data.aiWidgetEnabled === true) {
31
+ return data.pageId && data.aiWidgetPlaceholder && data.aiWidgetPrompt;
32
+ }
33
+ return true;
34
+ }, {
35
+ message: 'pageId, aiWidgetPlaceholder and aiWidgetPrompt are required when aiWidgetEnabled is true',
17
36
  });
@@ -4,6 +4,7 @@ export declare enum ChatErrorCode {
4
4
  PAGE_ID_REQUIRED = "PAGE_ID_REQUIRED",
5
5
  CHAT_NOT_FOUND = "CHAT_NOT_FOUND",
6
6
  CHAT_ALREADY_DELETED = "CHAT_ALREADY_DELETED",
7
- TITLE_REQUIRED = "TITLE_REQUIRED"
7
+ TITLE_REQUIRED = "TITLE_REQUIRED",
8
+ FOLDER_NOT_FOUND = "FOLDER_NOT_FOUND"
8
9
  }
9
10
  export declare const CHAT_ERRORS: Record<ChatErrorCode, ErrorMetadata>;
@@ -8,6 +8,7 @@ var ChatErrorCode;
8
8
  ChatErrorCode["CHAT_NOT_FOUND"] = "CHAT_NOT_FOUND";
9
9
  ChatErrorCode["CHAT_ALREADY_DELETED"] = "CHAT_ALREADY_DELETED";
10
10
  ChatErrorCode["TITLE_REQUIRED"] = "TITLE_REQUIRED";
11
+ ChatErrorCode["FOLDER_NOT_FOUND"] = "FOLDER_NOT_FOUND";
11
12
  })(ChatErrorCode || (exports.ChatErrorCode = ChatErrorCode = {}));
12
13
  exports.CHAT_ERRORS = {
13
14
  [ChatErrorCode.PAGE_NOT_FOUND]: {
@@ -30,4 +31,8 @@ exports.CHAT_ERRORS = {
30
31
  code: ChatErrorCode.TITLE_REQUIRED,
31
32
  statusCode: 400,
32
33
  },
34
+ [ChatErrorCode.FOLDER_NOT_FOUND]: {
35
+ code: ChatErrorCode.FOLDER_NOT_FOUND,
36
+ statusCode: 404,
37
+ },
33
38
  };
@@ -5,7 +5,9 @@ import { HttpMethod } from '../../../shared/http-method';
5
5
  * POST /api/v1/page/:pageId/chat
6
6
  */
7
7
  export declare namespace CreateRegChatCommand {
8
- const Request: z.ZodObject<{}, z.core.$strip>;
8
+ const Request: z.ZodObject<{
9
+ folderId: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
9
11
  const Response: z.ZodObject<{
10
12
  uuid: z.ZodString;
11
13
  title: z.ZodString;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateRegChatCommand = void 0;
4
- const zod_1 = require("zod");
5
4
  const schemas_1 = require("../schemas");
6
5
  const rest_api_1 = require("../../../rest-api");
7
6
  const http_method_1 = require("../../../shared/http-method");
@@ -11,7 +10,7 @@ const http_method_1 = require("../../../shared/http-method");
11
10
  */
12
11
  var CreateRegChatCommand;
13
12
  (function (CreateRegChatCommand) {
14
- CreateRegChatCommand.Request = zod_1.z.object({});
13
+ CreateRegChatCommand.Request = schemas_1.CreateChatRequestSchema;
15
14
  CreateRegChatCommand.Response = schemas_1.ChatWithMessagesResponseSchema;
16
15
  CreateRegChatCommand.URL = (pageId) => rest_api_1.REST_API.V1.CHAT.REG.CREATE(pageId);
17
16
  CreateRegChatCommand.METHOD = http_method_1.HttpMethod.POST;
@@ -2,3 +2,4 @@ export { CreateUnregChatCommand } from './create-unreg-chat.command';
2
2
  export { CreateRegChatCommand } from './create-reg-chat.command';
3
3
  export { DeleteChatCommand } from './delete-chat.command';
4
4
  export { UpdateChatTitleCommand } from './update-chat-title.command';
5
+ export { UpdateChatCommand } from './update-chat.command';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateChatTitleCommand = exports.DeleteChatCommand = exports.CreateRegChatCommand = exports.CreateUnregChatCommand = void 0;
3
+ exports.UpdateChatCommand = exports.UpdateChatTitleCommand = exports.DeleteChatCommand = exports.CreateRegChatCommand = exports.CreateUnregChatCommand = void 0;
4
4
  var create_unreg_chat_command_1 = require("./create-unreg-chat.command");
5
5
  Object.defineProperty(exports, "CreateUnregChatCommand", { enumerable: true, get: function () { return create_unreg_chat_command_1.CreateUnregChatCommand; } });
6
6
  var create_reg_chat_command_1 = require("./create-reg-chat.command");
@@ -9,3 +9,5 @@ var delete_chat_command_1 = require("./delete-chat.command");
9
9
  Object.defineProperty(exports, "DeleteChatCommand", { enumerable: true, get: function () { return delete_chat_command_1.DeleteChatCommand; } });
10
10
  var update_chat_title_command_1 = require("./update-chat-title.command");
11
11
  Object.defineProperty(exports, "UpdateChatTitleCommand", { enumerable: true, get: function () { return update_chat_title_command_1.UpdateChatTitleCommand; } });
12
+ var update_chat_command_1 = require("./update-chat.command");
13
+ Object.defineProperty(exports, "UpdateChatCommand", { enumerable: true, get: function () { return update_chat_command_1.UpdateChatCommand; } });
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ /**
4
+ * Update Chat Command
5
+ * PATCH /api/v1/page/:pageId/chat/:chatId
6
+ */
7
+ export declare namespace UpdateChatCommand {
8
+ const Request: z.ZodObject<{
9
+ title: z.ZodOptional<z.ZodString>;
10
+ folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ }, z.core.$strip>;
12
+ const Response: z.ZodObject<{
13
+ uuid: z.ZodString;
14
+ title: z.ZodString;
15
+ status: z.ZodEnum<typeof import("../schemas").ChatStatus>;
16
+ pageId: z.ZodNullable<z.ZodString>;
17
+ folderId: z.ZodNullable<z.ZodString>;
18
+ createdAt: z.ZodString;
19
+ updatedAt: z.ZodString;
20
+ messages: z.ZodArray<z.ZodObject<{
21
+ uuid: z.ZodString;
22
+ role: z.ZodEnum<typeof import("../..").MessageRole>;
23
+ status: z.ZodEnum<typeof import("../..").MessageStatus>;
24
+ content: z.ZodString;
25
+ aiModelId: z.ZodNullable<z.ZodString>;
26
+ userRating: z.ZodNullable<z.ZodEnum<typeof import("../..").UserRating>>;
27
+ meta: z.ZodNullable<z.ZodObject<{
28
+ reasoning: z.ZodOptional<z.ZodObject<{
29
+ content: z.ZodString;
30
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
31
+ type: z.ZodString;
32
+ text: z.ZodString;
33
+ format: z.ZodOptional<z.ZodString>;
34
+ index: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strip>>>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>>;
38
+ createdAt: z.ZodString;
39
+ updatedAt: z.ZodString;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>;
42
+ const URL: (pageId: string, chatId: string) => string;
43
+ const METHOD = HttpMethod.PATCH;
44
+ type RequestType = z.infer<typeof Request>;
45
+ type ResponseType = z.infer<typeof Response>;
46
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateChatCommand = 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
+ /**
8
+ * Update Chat Command
9
+ * PATCH /api/v1/page/:pageId/chat/:chatId
10
+ */
11
+ var UpdateChatCommand;
12
+ (function (UpdateChatCommand) {
13
+ UpdateChatCommand.Request = schemas_1.UpdateChatRequestSchema;
14
+ UpdateChatCommand.Response = schemas_1.ChatWithMessagesResponseSchema;
15
+ UpdateChatCommand.URL = (pageId, chatId) => rest_api_1.REST_API.V1.CHAT.REG.UPDATE_TITLE(pageId, chatId);
16
+ UpdateChatCommand.METHOD = http_method_1.HttpMethod.PATCH;
17
+ })(UpdateChatCommand || (exports.UpdateChatCommand = UpdateChatCommand = {}));
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const CreateChatRequestSchema: z.ZodObject<{
3
+ folderId: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export type CreateChatRequestDto = z.infer<typeof CreateChatRequestSchema>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateChatRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CreateChatRequestSchema = zod_1.z.object({
6
+ folderId: zod_1.z.string().uuid().optional(),
7
+ });
@@ -7,6 +7,10 @@ export { ChatIdParamSchema } from './chat-id-param.schema';
7
7
  export type { ChatIdParamDto } from './chat-id-param.schema';
8
8
  export { UpdateChatTitleRequestSchema } from './update-chat-title-request.schema';
9
9
  export type { UpdateChatTitleRequestDto } from './update-chat-title-request.schema';
10
+ export { CreateChatRequestSchema } from './create-chat-request.schema';
11
+ export type { CreateChatRequestDto } from './create-chat-request.schema';
12
+ export { UpdateChatRequestSchema } from './update-chat-request.schema';
13
+ export type { UpdateChatRequestDto } from './update-chat-request.schema';
10
14
  export { DeleteChatResponseSchema } from './delete-chat-response.schema';
11
15
  export type { DeleteChatResponseDto } from './delete-chat-response.schema';
12
16
  export { ChatPeriodType, MONTH_NAMES_RU, PERIOD_LABELS_RU, ChatHistoryItemSchema, ChatPeriodSchema, GetChatHistoryRequestSchema, GetChatHistoryResponseSchema, } from './chat-history.schema';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetChatHistoryResponseSchema = exports.GetChatHistoryRequestSchema = exports.ChatPeriodSchema = exports.ChatHistoryItemSchema = exports.PERIOD_LABELS_RU = exports.MONTH_NAMES_RU = exports.ChatPeriodType = exports.DeleteChatResponseSchema = exports.UpdateChatTitleRequestSchema = exports.ChatIdParamSchema = exports.PageIdParamSchema = exports.ChatWithMessagesResponseSchema = exports.ChatResponseSchema = exports.ChatStatus = void 0;
3
+ exports.GetChatHistoryResponseSchema = exports.GetChatHistoryRequestSchema = exports.ChatPeriodSchema = exports.ChatHistoryItemSchema = exports.PERIOD_LABELS_RU = exports.MONTH_NAMES_RU = exports.ChatPeriodType = exports.DeleteChatResponseSchema = exports.UpdateChatRequestSchema = exports.CreateChatRequestSchema = exports.UpdateChatTitleRequestSchema = exports.ChatIdParamSchema = exports.PageIdParamSchema = exports.ChatWithMessagesResponseSchema = exports.ChatResponseSchema = exports.ChatStatus = void 0;
4
4
  var chat_status_enum_1 = require("./chat-status.enum");
5
5
  Object.defineProperty(exports, "ChatStatus", { enumerable: true, get: function () { return chat_status_enum_1.ChatStatus; } });
6
6
  var chat_response_schema_1 = require("./chat-response.schema");
@@ -13,6 +13,10 @@ var chat_id_param_schema_1 = require("./chat-id-param.schema");
13
13
  Object.defineProperty(exports, "ChatIdParamSchema", { enumerable: true, get: function () { return chat_id_param_schema_1.ChatIdParamSchema; } });
14
14
  var update_chat_title_request_schema_1 = require("./update-chat-title-request.schema");
15
15
  Object.defineProperty(exports, "UpdateChatTitleRequestSchema", { enumerable: true, get: function () { return update_chat_title_request_schema_1.UpdateChatTitleRequestSchema; } });
16
+ var create_chat_request_schema_1 = require("./create-chat-request.schema");
17
+ Object.defineProperty(exports, "CreateChatRequestSchema", { enumerable: true, get: function () { return create_chat_request_schema_1.CreateChatRequestSchema; } });
18
+ var update_chat_request_schema_1 = require("./update-chat-request.schema");
19
+ Object.defineProperty(exports, "UpdateChatRequestSchema", { enumerable: true, get: function () { return update_chat_request_schema_1.UpdateChatRequestSchema; } });
16
20
  var delete_chat_response_schema_1 = require("./delete-chat-response.schema");
17
21
  Object.defineProperty(exports, "DeleteChatResponseSchema", { enumerable: true, get: function () { return delete_chat_response_schema_1.DeleteChatResponseSchema; } });
18
22
  var chat_history_schema_1 = require("./chat-history.schema");
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const UpdateChatRequestSchema: z.ZodObject<{
3
+ title: z.ZodOptional<z.ZodString>;
4
+ folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ }, z.core.$strip>;
6
+ export type UpdateChatRequestDto = z.infer<typeof UpdateChatRequestSchema>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateChatRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.UpdateChatRequestSchema = zod_1.z.object({
6
+ title: zod_1.z.string().min(1).max(40).optional(),
7
+ folderId: zod_1.z.string().uuid().nullable().optional(),
8
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Folder Deleted Event
3
+ * Published when a chat project (folder) is deleted
4
+ * Chat module listens to this event and clears folderId from all chats
5
+ */
6
+ export interface FolderDeletedEventPayload {
7
+ folderId: string;
8
+ userId: string;
9
+ occurredAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './folder-deleted.event';
@@ -0,0 +1,17 @@
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("./folder-deleted.event"), exports);
@@ -2,3 +2,4 @@ export * from './chat-project.errors';
2
2
  export * from './schemas';
3
3
  export * from './commands';
4
4
  export * from './queries';
5
+ export * from './events';
@@ -18,3 +18,4 @@ __exportStar(require("./chat-project.errors"), exports);
18
18
  __exportStar(require("./schemas"), exports);
19
19
  __exportStar(require("./commands"), exports);
20
20
  __exportStar(require("./queries"), exports);
21
+ __exportStar(require("./events"), exports);
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ /**
4
+ * Get Project Chats Query
5
+ * GET /api/v1/chat-projects/:uuid/chats
6
+ */
7
+ export declare namespace ChatProjectGetChatsQuery {
8
+ const Request: z.ZodObject<{
9
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
+ cursor: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ const Response: z.ZodObject<{
13
+ chats: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodString;
15
+ title: z.ZodString;
16
+ lastMessageAt: z.ZodString;
17
+ pageId: z.ZodNullable<z.ZodString>;
18
+ }, z.core.$strip>>;
19
+ nextCursor: z.ZodNullable<z.ZodString>;
20
+ hasMore: z.ZodBoolean;
21
+ }, z.core.$strip>;
22
+ const URL: (uuid: string) => string;
23
+ const METHOD = HttpMethod.GET;
24
+ type RequestType = z.infer<typeof Request>;
25
+ type ResponseType = z.infer<typeof Response>;
26
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatProjectGetChatsQuery = 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
+ /**
8
+ * Get Project Chats Query
9
+ * GET /api/v1/chat-projects/:uuid/chats
10
+ */
11
+ var ChatProjectGetChatsQuery;
12
+ (function (ChatProjectGetChatsQuery) {
13
+ ChatProjectGetChatsQuery.Request = schemas_1.GetProjectChatsRequestSchema;
14
+ ChatProjectGetChatsQuery.Response = schemas_1.GetProjectChatsResponseSchema;
15
+ ChatProjectGetChatsQuery.URL = (uuid) => rest_api_1.REST_API.V1.CHAT_PROJECT.GET_CHATS(uuid);
16
+ ChatProjectGetChatsQuery.METHOD = http_method_1.HttpMethod.GET;
17
+ })(ChatProjectGetChatsQuery || (exports.ChatProjectGetChatsQuery = ChatProjectGetChatsQuery = {}));
@@ -1,2 +1,3 @@
1
1
  export * from './get-project.query';
2
2
  export * from './get-projects.query';
3
+ export * from './get-project-chats.query';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-project.query"), exports);
18
18
  __exportStar(require("./get-projects.query"), exports);
19
+ __exportStar(require("./get-project-chats.query"), exports);
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Project Chat Item Schema
4
+ */
5
+ export declare const ProjectChatItemSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ title: z.ZodString;
8
+ lastMessageAt: z.ZodString;
9
+ pageId: z.ZodNullable<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type ProjectChatItemDto = z.infer<typeof ProjectChatItemSchema>;
12
+ /**
13
+ * Get Project Chats Request Schema
14
+ */
15
+ export declare const GetProjectChatsRequestSchema: z.ZodObject<{
16
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
17
+ cursor: z.ZodOptional<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export type GetProjectChatsRequestDto = z.infer<typeof GetProjectChatsRequestSchema>;
20
+ /**
21
+ * Get Project Chats Response Schema
22
+ */
23
+ export declare const GetProjectChatsResponseSchema: z.ZodObject<{
24
+ chats: z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ title: z.ZodString;
27
+ lastMessageAt: z.ZodString;
28
+ pageId: z.ZodNullable<z.ZodString>;
29
+ }, z.core.$strip>>;
30
+ nextCursor: z.ZodNullable<z.ZodString>;
31
+ hasMore: z.ZodBoolean;
32
+ }, z.core.$strip>;
33
+ export type GetProjectChatsResponseDto = z.infer<typeof GetProjectChatsResponseSchema>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetProjectChatsResponseSchema = exports.GetProjectChatsRequestSchema = exports.ProjectChatItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Project Chat Item Schema
7
+ */
8
+ exports.ProjectChatItemSchema = zod_1.z.object({
9
+ id: zod_1.z.string().uuid(),
10
+ title: zod_1.z.string(),
11
+ lastMessageAt: zod_1.z.string().datetime(),
12
+ pageId: zod_1.z.string().uuid().nullable(),
13
+ });
14
+ /**
15
+ * Get Project Chats Request Schema
16
+ */
17
+ exports.GetProjectChatsRequestSchema = zod_1.z.object({
18
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
19
+ cursor: zod_1.z.string().optional(),
20
+ });
21
+ /**
22
+ * Get Project Chats Response Schema
23
+ */
24
+ exports.GetProjectChatsResponseSchema = zod_1.z.object({
25
+ chats: zod_1.z.array(exports.ProjectChatItemSchema),
26
+ nextCursor: zod_1.z.string().nullable(),
27
+ hasMore: zod_1.z.boolean(),
28
+ });
@@ -3,3 +3,4 @@ export * from './create-project-request.schema';
3
3
  export * from './update-project-request.schema';
4
4
  export * from './project-response.schema';
5
5
  export * from './route-params.schema';
6
+ export * from './get-project-chats.schema';
@@ -19,3 +19,4 @@ __exportStar(require("./create-project-request.schema"), exports);
19
19
  __exportStar(require("./update-project-request.schema"), exports);
20
20
  __exportStar(require("./project-response.schema"), exports);
21
21
  __exportStar(require("./route-params.schema"), exports);
22
+ __exportStar(require("./get-project-chats.schema"), exports);
@@ -2,20 +2,29 @@ import { z } from 'zod';
2
2
  import { HttpMethod } from '../../../../shared/http-method';
3
3
  export declare namespace SeoPageGetHierarchyListQuery {
4
4
  const Request: z.ZodObject<{}, z.core.$strip>;
5
- const Response: z.ZodArray<z.ZodObject<{
6
- uuid: z.ZodString;
7
- alias: z.ZodString;
8
- icon: z.ZodString;
9
- seoText: z.ZodNullable<z.ZodString>;
10
- marks: z.ZodArray<z.ZodString>;
11
- sub: z.ZodArray<z.ZodObject<{
5
+ const Response: z.ZodObject<{
6
+ index: z.ZodNullable<z.ZodObject<{
12
7
  uuid: z.ZodString;
13
8
  alias: z.ZodString;
14
9
  icon: z.ZodString;
15
10
  seoText: z.ZodNullable<z.ZodString>;
16
11
  marks: z.ZodArray<z.ZodString>;
17
12
  }, z.core.$strip>>;
18
- }, z.core.$strip>>;
13
+ pages: z.ZodArray<z.ZodObject<{
14
+ uuid: z.ZodString;
15
+ alias: z.ZodString;
16
+ icon: z.ZodString;
17
+ seoText: z.ZodNullable<z.ZodString>;
18
+ marks: z.ZodArray<z.ZodString>;
19
+ sub: z.ZodArray<z.ZodObject<{
20
+ uuid: z.ZodString;
21
+ alias: z.ZodString;
22
+ icon: z.ZodString;
23
+ seoText: z.ZodNullable<z.ZodString>;
24
+ marks: z.ZodArray<z.ZodString>;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>>;
27
+ }, z.core.$strip>;
19
28
  const URL: "/api/v1/seo-pages/list";
20
29
  const METHOD = HttpMethod.GET;
21
30
  type RequestType = z.infer<typeof Request>;
@@ -8,7 +8,7 @@ const http_method_1 = require("../../../../shared/http-method");
8
8
  var SeoPageGetHierarchyListQuery;
9
9
  (function (SeoPageGetHierarchyListQuery) {
10
10
  SeoPageGetHierarchyListQuery.Request = zod_1.z.object({});
11
- SeoPageGetHierarchyListQuery.Response = schemas_1.PageHierarchyListSchema;
11
+ SeoPageGetHierarchyListQuery.Response = schemas_1.PageHierarchyResponseSchema;
12
12
  SeoPageGetHierarchyListQuery.URL = rest_api_1.REST_API.V1.SEO_PAGES.PUBLIC.GET_LIST;
13
13
  SeoPageGetHierarchyListQuery.METHOD = http_method_1.HttpMethod.GET;
14
14
  })(SeoPageGetHierarchyListQuery || (exports.SeoPageGetHierarchyListQuery = SeoPageGetHierarchyListQuery = {}));
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export { PageType } from './page-type.enum';
5
5
  export { PageResponseSchema, PageListItemSchema } from './page-response.schema';
6
- export { PageHierarchySubItemSchema, PageHierarchyItemSchema, PageHierarchyListSchema, type PageHierarchySubItem, type PageHierarchyItem, type PageHierarchyList, } from './page-hierarchy.schema';
6
+ export { PageHierarchySubItemSchema, PageHierarchyItemSchema, PageHierarchyListSchema, PageHierarchyResponseSchema, type PageHierarchySubItem, type PageHierarchyItem, type PageHierarchyList, type PageHierarchyResponse, } from './page-hierarchy.schema';
7
7
  export { CreatePageRequestSchema } from './create-page-request.schema';
8
8
  export { UpdatePageRequestSchema } from './update-page-request.schema';
9
9
  export { FaqSchema, FaqItemSchema, type Faq, type FaqItem } from './faq.schema';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FaqItemSchema = exports.FaqSchema = exports.UpdatePageRequestSchema = exports.CreatePageRequestSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = exports.PageListItemSchema = exports.PageResponseSchema = exports.PageType = void 0;
3
+ exports.FaqItemSchema = exports.FaqSchema = exports.UpdatePageRequestSchema = exports.CreatePageRequestSchema = exports.PageHierarchyResponseSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = exports.PageListItemSchema = exports.PageResponseSchema = exports.PageType = void 0;
4
4
  /**
5
5
  * Centralized exports for SEO Pages schemas
6
6
  */
@@ -13,6 +13,7 @@ var page_hierarchy_schema_1 = require("./page-hierarchy.schema");
13
13
  Object.defineProperty(exports, "PageHierarchySubItemSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchySubItemSchema; } });
14
14
  Object.defineProperty(exports, "PageHierarchyItemSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyItemSchema; } });
15
15
  Object.defineProperty(exports, "PageHierarchyListSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyListSchema; } });
16
+ Object.defineProperty(exports, "PageHierarchyResponseSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyResponseSchema; } });
16
17
  var create_page_request_schema_1 = require("./create-page-request.schema");
17
18
  Object.defineProperty(exports, "CreatePageRequestSchema", { enumerable: true, get: function () { return create_page_request_schema_1.CreatePageRequestSchema; } });
18
19
  var update_page_request_schema_1 = require("./update-page-request.schema");
@@ -27,7 +27,7 @@ export declare const PageHierarchyItemSchema: z.ZodObject<{
27
27
  }, z.core.$strip>>;
28
28
  }, z.core.$strip>;
29
29
  /**
30
- * Full hierarchical list response
30
+ * Full hierarchical list response (array of main pages)
31
31
  */
32
32
  export declare const PageHierarchyListSchema: z.ZodArray<z.ZodObject<{
33
33
  uuid: z.ZodString;
@@ -43,6 +43,33 @@ export declare const PageHierarchyListSchema: z.ZodArray<z.ZodObject<{
43
43
  marks: z.ZodArray<z.ZodString>;
44
44
  }, z.core.$strip>>;
45
45
  }, z.core.$strip>>;
46
+ /**
47
+ * Hierarchy response with index page
48
+ */
49
+ export declare const PageHierarchyResponseSchema: z.ZodObject<{
50
+ index: z.ZodNullable<z.ZodObject<{
51
+ uuid: z.ZodString;
52
+ alias: z.ZodString;
53
+ icon: z.ZodString;
54
+ seoText: z.ZodNullable<z.ZodString>;
55
+ marks: z.ZodArray<z.ZodString>;
56
+ }, z.core.$strip>>;
57
+ pages: z.ZodArray<z.ZodObject<{
58
+ uuid: z.ZodString;
59
+ alias: z.ZodString;
60
+ icon: z.ZodString;
61
+ seoText: z.ZodNullable<z.ZodString>;
62
+ marks: z.ZodArray<z.ZodString>;
63
+ sub: z.ZodArray<z.ZodObject<{
64
+ uuid: z.ZodString;
65
+ alias: z.ZodString;
66
+ icon: z.ZodString;
67
+ seoText: z.ZodNullable<z.ZodString>;
68
+ marks: z.ZodArray<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>;
46
72
  export type PageHierarchySubItem = z.infer<typeof PageHierarchySubItemSchema>;
47
73
  export type PageHierarchyItem = z.infer<typeof PageHierarchyItemSchema>;
48
74
  export type PageHierarchyList = z.infer<typeof PageHierarchyListSchema>;
75
+ export type PageHierarchyResponse = z.infer<typeof PageHierarchyResponseSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = void 0;
3
+ exports.PageHierarchyResponseSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const shared_1 = require("../../../shared");
6
6
  /**
@@ -25,6 +25,13 @@ exports.PageHierarchyItemSchema = zod_1.z.object({
25
25
  sub: zod_1.z.array(exports.PageHierarchySubItemSchema),
26
26
  });
27
27
  /**
28
- * Full hierarchical list response
28
+ * Full hierarchical list response (array of main pages)
29
29
  */
30
30
  exports.PageHierarchyListSchema = zod_1.z.array(exports.PageHierarchyItemSchema);
31
+ /**
32
+ * Hierarchy response with index page
33
+ */
34
+ exports.PageHierarchyResponseSchema = zod_1.z.object({
35
+ index: exports.PageHierarchySubItemSchema.nullable(),
36
+ pages: exports.PageHierarchyListSchema,
37
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
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",