@veruna/api-contracts 1.0.37 → 1.0.38

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 (33) 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/chat/chat.errors.d.ts +2 -1
  6. package/build/v1/chat/chat.errors.js +5 -0
  7. package/build/v1/chat/commands/create-reg-chat.command.d.ts +3 -1
  8. package/build/v1/chat/commands/create-reg-chat.command.js +1 -2
  9. package/build/v1/chat/commands/index.d.ts +1 -0
  10. package/build/v1/chat/commands/index.js +3 -1
  11. package/build/v1/chat/commands/update-chat.command.d.ts +46 -0
  12. package/build/v1/chat/commands/update-chat.command.js +17 -0
  13. package/build/v1/chat/schemas/create-chat-request.schema.d.ts +5 -0
  14. package/build/v1/chat/schemas/create-chat-request.schema.js +7 -0
  15. package/build/v1/chat/schemas/index.d.ts +4 -0
  16. package/build/v1/chat/schemas/index.js +5 -1
  17. package/build/v1/chat/schemas/update-chat-request.schema.d.ts +6 -0
  18. package/build/v1/chat/schemas/update-chat-request.schema.js +8 -0
  19. package/build/v1/chat-project/events/folder-deleted.event.d.ts +10 -0
  20. package/build/v1/chat-project/events/folder-deleted.event.js +2 -0
  21. package/build/v1/chat-project/events/index.d.ts +1 -0
  22. package/build/v1/chat-project/events/index.js +17 -0
  23. package/build/v1/chat-project/index.d.ts +1 -0
  24. package/build/v1/chat-project/index.js +1 -0
  25. package/build/v1/chat-project/queries/get-project-chats.query.d.ts +26 -0
  26. package/build/v1/chat-project/queries/get-project-chats.query.js +17 -0
  27. package/build/v1/chat-project/queries/index.d.ts +1 -0
  28. package/build/v1/chat-project/queries/index.js +1 -0
  29. package/build/v1/chat-project/schemas/get-project-chats.schema.d.ts +33 -0
  30. package/build/v1/chat-project/schemas/get-project-chats.schema.js +28 -0
  31. package/build/v1/chat-project/schemas/index.d.ts +1 -0
  32. package/build/v1/chat-project/schemas/index.js +1 -0
  33. 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
  };
@@ -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);
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.38",
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",