@veruna/api-contracts 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/controllers/chat.controllers.d.ts +1 -0
- package/build/controllers/chat.controllers.js +2 -1
- package/build/controllers/index.d.ts +1 -1
- package/build/controllers/index.js +2 -1
- package/build/rest-api.d.ts +3 -0
- package/build/rest-api.js +3 -0
- package/build/routes/chat.routes.d.ts +3 -0
- package/build/routes/chat.routes.js +4 -1
- package/build/routes/index.d.ts +1 -1
- package/build/routes/index.js +2 -1
- package/build/routes/message.routes.d.ts +2 -0
- package/build/routes/message.routes.js +2 -0
- package/build/shared/constants.d.ts +6 -0
- package/build/shared/constants.js +7 -1
- package/build/v1/chat/queries/get-chat-history.query.d.ts +32 -0
- package/build/v1/chat/queries/get-chat-history.query.js +17 -0
- package/build/v1/chat/queries/index.d.ts +1 -0
- package/build/v1/chat/queries/index.js +3 -1
- package/build/v1/chat/schemas/chat-history.schema.d.ts +77 -0
- package/build/v1/chat/schemas/chat-history.schema.js +75 -0
- package/build/v1/chat/schemas/index.d.ts +2 -0
- package/build/v1/chat/schemas/index.js +9 -1
- package/build/v1/message/commands/index.d.ts +2 -0
- package/build/v1/message/commands/index.js +5 -1
- package/build/v1/message/commands/rate-message-reg.command.d.ts +14 -0
- package/build/v1/message/commands/rate-message-reg.command.js +13 -0
- package/build/v1/message/commands/rate-message-unreg.command.d.ts +14 -0
- package/build/v1/message/commands/rate-message-unreg.command.js +13 -0
- package/build/v1/message/message.errors.d.ts +3 -1
- package/build/v1/message/message.errors.js +10 -0
- package/build/v1/message/schemas/index.d.ts +2 -0
- package/build/v1/message/schemas/index.js +5 -1
- package/build/v1/message/schemas/rate-message.schema.d.ts +16 -0
- package/build/v1/message/schemas/rate-message.schema.js +16 -0
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHAT_REG_CONTROLLER = exports.CHAT_UNREG_CONTROLLER = void 0;
|
|
3
|
+
exports.CHAT_HISTORY_CONTROLLER = exports.CHAT_REG_CONTROLLER = exports.CHAT_UNREG_CONTROLLER = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Chat Controller paths for NestJS @Controller decorator
|
|
6
6
|
*/
|
|
7
7
|
exports.CHAT_UNREG_CONTROLLER = 'v1/unreg/page/:pageId/chat';
|
|
8
8
|
exports.CHAT_REG_CONTROLLER = 'v1/page/:pageId/chat';
|
|
9
|
+
exports.CHAT_HISTORY_CONTROLLER = 'v1/chat';
|
|
@@ -10,6 +10,6 @@ export { AI_PROVIDER_ADMIN_CONTROLLER, AI_PROVIDER_PUBLIC_CONTROLLER, } from './
|
|
|
10
10
|
export { AI_MODEL_ADMIN_CONTROLLER, AI_MODEL_PUBLIC_CONTROLLER } from './ai-model.controllers';
|
|
11
11
|
export { FILE_CONTROLLER } from './file.controllers';
|
|
12
12
|
export { CHAT_PROJECT_CONTROLLER } from './chat-project.controllers';
|
|
13
|
-
export { CHAT_UNREG_CONTROLLER, CHAT_REG_CONTROLLER } from './chat.controllers';
|
|
13
|
+
export { CHAT_UNREG_CONTROLLER, CHAT_REG_CONTROLLER, CHAT_HISTORY_CONTROLLER, } from './chat.controllers';
|
|
14
14
|
export { MESSAGE_UNREG_CONTROLLER, MESSAGE_REG_CONTROLLER } from './message.controllers';
|
|
15
15
|
export { VERIFICATION_CONTROLLER } from './verification.controllers';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VERIFICATION_CONTROLLER = exports.MESSAGE_REG_CONTROLLER = exports.MESSAGE_UNREG_CONTROLLER = exports.CHAT_REG_CONTROLLER = exports.CHAT_UNREG_CONTROLLER = 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;
|
|
3
|
+
exports.VERIFICATION_CONTROLLER = exports.MESSAGE_REG_CONTROLLER = exports.MESSAGE_UNREG_CONTROLLER = exports.CHAT_HISTORY_CONTROLLER = exports.CHAT_REG_CONTROLLER = exports.CHAT_UNREG_CONTROLLER = 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
|
*/
|
|
@@ -31,6 +31,7 @@ Object.defineProperty(exports, "CHAT_PROJECT_CONTROLLER", { enumerable: true, ge
|
|
|
31
31
|
var chat_controllers_1 = require("./chat.controllers");
|
|
32
32
|
Object.defineProperty(exports, "CHAT_UNREG_CONTROLLER", { enumerable: true, get: function () { return chat_controllers_1.CHAT_UNREG_CONTROLLER; } });
|
|
33
33
|
Object.defineProperty(exports, "CHAT_REG_CONTROLLER", { enumerable: true, get: function () { return chat_controllers_1.CHAT_REG_CONTROLLER; } });
|
|
34
|
+
Object.defineProperty(exports, "CHAT_HISTORY_CONTROLLER", { enumerable: true, get: function () { return chat_controllers_1.CHAT_HISTORY_CONTROLLER; } });
|
|
34
35
|
var message_controllers_1 = require("./message.controllers");
|
|
35
36
|
Object.defineProperty(exports, "MESSAGE_UNREG_CONTROLLER", { enumerable: true, get: function () { return message_controllers_1.MESSAGE_UNREG_CONTROLLER; } });
|
|
36
37
|
Object.defineProperty(exports, "MESSAGE_REG_CONTROLLER", { enumerable: true, get: function () { return message_controllers_1.MESSAGE_REG_CONTROLLER; } });
|
package/build/rest-api.d.ts
CHANGED
|
@@ -134,13 +134,16 @@ export declare const REST_API: {
|
|
|
134
134
|
readonly DELETE: (pageId: string, chatId: string) => string;
|
|
135
135
|
readonly UPDATE_TITLE: (pageId: string, chatId: string) => string;
|
|
136
136
|
};
|
|
137
|
+
readonly HISTORY: "/api/v1/chat/history";
|
|
137
138
|
};
|
|
138
139
|
readonly MESSAGE: {
|
|
139
140
|
readonly UNREG: {
|
|
140
141
|
readonly SEND: (pageId: string, chatId: string) => string;
|
|
142
|
+
readonly RATE: (pageId: string, chatId: string, messageId: string) => string;
|
|
141
143
|
};
|
|
142
144
|
readonly REG: {
|
|
143
145
|
readonly SEND: (pageId: string, chatId: string) => string;
|
|
146
|
+
readonly RATE: (pageId: string, chatId: string, messageId: string) => string;
|
|
144
147
|
};
|
|
145
148
|
};
|
|
146
149
|
readonly VERIFICATION: {
|
package/build/rest-api.js
CHANGED
|
@@ -151,13 +151,16 @@ exports.REST_API = {
|
|
|
151
151
|
DELETE: (pageId, chatId) => `${exports.ROOT}/${controllers_1.CHAT_REG_CONTROLLER.replace(':pageId', pageId)}/${chatId}`,
|
|
152
152
|
UPDATE_TITLE: (pageId, chatId) => `${exports.ROOT}/${controllers_1.CHAT_REG_CONTROLLER.replace(':pageId', pageId)}/${chatId}`,
|
|
153
153
|
},
|
|
154
|
+
HISTORY: `${exports.ROOT}/${controllers_1.CHAT_HISTORY_CONTROLLER}/${routes_1.CHAT_HISTORY_ROUTES.HISTORY}`,
|
|
154
155
|
},
|
|
155
156
|
MESSAGE: {
|
|
156
157
|
UNREG: {
|
|
157
158
|
SEND: (pageId, chatId) => `${exports.ROOT}/${controllers_1.MESSAGE_UNREG_CONTROLLER.replace(':pageId', pageId).replace(':chatId', chatId)}`,
|
|
159
|
+
RATE: (pageId, chatId, messageId) => `${exports.ROOT}/${controllers_1.MESSAGE_UNREG_CONTROLLER.replace(':pageId', pageId).replace(':chatId', chatId)}/${messageId}/rating`,
|
|
158
160
|
},
|
|
159
161
|
REG: {
|
|
160
162
|
SEND: (pageId, chatId) => `${exports.ROOT}/${controllers_1.MESSAGE_REG_CONTROLLER.replace(':pageId', pageId).replace(':chatId', chatId)}`,
|
|
163
|
+
RATE: (pageId, chatId, messageId) => `${exports.ROOT}/${controllers_1.MESSAGE_REG_CONTROLLER.replace(':pageId', pageId).replace(':chatId', chatId)}/${messageId}/rating`,
|
|
161
164
|
},
|
|
162
165
|
},
|
|
163
166
|
VERIFICATION: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHAT_REG_ROUTES = exports.CHAT_UNREG_ROUTES = void 0;
|
|
3
|
+
exports.CHAT_HISTORY_ROUTES = exports.CHAT_REG_ROUTES = exports.CHAT_UNREG_ROUTES = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Chat Routes
|
|
6
6
|
*/
|
|
@@ -15,3 +15,6 @@ exports.CHAT_REG_ROUTES = {
|
|
|
15
15
|
DELETE: ':chatId',
|
|
16
16
|
UPDATE_TITLE: ':chatId',
|
|
17
17
|
};
|
|
18
|
+
exports.CHAT_HISTORY_ROUTES = {
|
|
19
|
+
HISTORY: 'history',
|
|
20
|
+
};
|
package/build/routes/index.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ 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
17
|
export { CHAT_PROJECT_ROUTES } from './chat-project.routes';
|
|
18
|
-
export { CHAT_UNREG_ROUTES, CHAT_REG_ROUTES } from './chat.routes';
|
|
18
|
+
export { CHAT_UNREG_ROUTES, CHAT_REG_ROUTES, CHAT_HISTORY_ROUTES } from './chat.routes';
|
|
19
19
|
export { MESSAGE_UNREG_ROUTES, MESSAGE_REG_ROUTES } from './message.routes';
|
|
20
20
|
export { VERIFICATION_ROUTES } from './verification.routes';
|
package/build/routes/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VERIFICATION_ROUTES = exports.MESSAGE_REG_ROUTES = exports.MESSAGE_UNREG_ROUTES = exports.CHAT_REG_ROUTES = exports.CHAT_UNREG_ROUTES = 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;
|
|
3
|
+
exports.VERIFICATION_ROUTES = exports.MESSAGE_REG_ROUTES = exports.MESSAGE_UNREG_ROUTES = exports.CHAT_HISTORY_ROUTES = exports.CHAT_REG_ROUTES = exports.CHAT_UNREG_ROUTES = 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
|
*/
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "CHAT_PROJECT_ROUTES", { enumerable: true, get: f
|
|
|
36
36
|
var chat_routes_1 = require("./chat.routes");
|
|
37
37
|
Object.defineProperty(exports, "CHAT_UNREG_ROUTES", { enumerable: true, get: function () { return chat_routes_1.CHAT_UNREG_ROUTES; } });
|
|
38
38
|
Object.defineProperty(exports, "CHAT_REG_ROUTES", { enumerable: true, get: function () { return chat_routes_1.CHAT_REG_ROUTES; } });
|
|
39
|
+
Object.defineProperty(exports, "CHAT_HISTORY_ROUTES", { enumerable: true, get: function () { return chat_routes_1.CHAT_HISTORY_ROUTES; } });
|
|
39
40
|
var message_routes_1 = require("./message.routes");
|
|
40
41
|
Object.defineProperty(exports, "MESSAGE_UNREG_ROUTES", { enumerable: true, get: function () { return message_routes_1.MESSAGE_UNREG_ROUTES; } });
|
|
41
42
|
Object.defineProperty(exports, "MESSAGE_REG_ROUTES", { enumerable: true, get: function () { return message_routes_1.MESSAGE_REG_ROUTES; } });
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MESSAGE_REG_ROUTES = exports.MESSAGE_UNREG_ROUTES = void 0;
|
|
4
4
|
exports.MESSAGE_UNREG_ROUTES = {
|
|
5
5
|
SEND: '',
|
|
6
|
+
RATE: ':messageId/rating',
|
|
6
7
|
};
|
|
7
8
|
exports.MESSAGE_REG_ROUTES = {
|
|
8
9
|
SEND: '',
|
|
10
|
+
RATE: ':messageId/rating',
|
|
9
11
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MESSAGE_TEXT_MAX_LENGTH = void 0;
|
|
3
|
+
exports.MS_6_DAYS = exports.MS_PER_WEEK = exports.MS_PER_DAY = exports.MESSAGE_TEXT_MAX_LENGTH = void 0;
|
|
4
4
|
exports.MESSAGE_TEXT_MAX_LENGTH = 500000;
|
|
5
|
+
/**
|
|
6
|
+
* Time constants in milliseconds
|
|
7
|
+
*/
|
|
8
|
+
exports.MS_PER_DAY = 86400000; // 24 * 60 * 60 * 1000
|
|
9
|
+
exports.MS_PER_WEEK = 604800000; // 7 * 24 * 60 * 60 * 1000
|
|
10
|
+
exports.MS_6_DAYS = 518400000; // 6 * 24 * 60 * 60 * 1000
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
/**
|
|
4
|
+
* Get Chat History Query
|
|
5
|
+
* GET /api/v1/chat/history
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace GetChatHistoryQuery {
|
|
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
|
+
periods: z.ZodArray<z.ZodObject<{
|
|
14
|
+
type: z.ZodEnum<typeof import("../schemas").ChatPeriodType>;
|
|
15
|
+
label: z.ZodString;
|
|
16
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
month: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
chats: z.ZodArray<z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
title: z.ZodString;
|
|
21
|
+
lastMessageAt: z.ZodString;
|
|
22
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
26
|
+
hasMore: z.ZodBoolean;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
const URL: "/api/v1/chat/history";
|
|
29
|
+
const METHOD = HttpMethod.GET;
|
|
30
|
+
type RequestType = z.infer<typeof Request>;
|
|
31
|
+
type ResponseType = z.infer<typeof Response>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetChatHistoryQuery = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
/**
|
|
8
|
+
* Get Chat History Query
|
|
9
|
+
* GET /api/v1/chat/history
|
|
10
|
+
*/
|
|
11
|
+
var GetChatHistoryQuery;
|
|
12
|
+
(function (GetChatHistoryQuery) {
|
|
13
|
+
GetChatHistoryQuery.Request = schemas_1.GetChatHistoryRequestSchema;
|
|
14
|
+
GetChatHistoryQuery.Response = schemas_1.GetChatHistoryResponseSchema;
|
|
15
|
+
GetChatHistoryQuery.URL = rest_api_1.REST_API.V1.CHAT.HISTORY;
|
|
16
|
+
GetChatHistoryQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
17
|
+
})(GetChatHistoryQuery || (exports.GetChatHistoryQuery = GetChatHistoryQuery = {}));
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetLastActiveChatQuery = exports.GetRegChatQuery = exports.GetUnregChatQuery = void 0;
|
|
3
|
+
exports.GetChatHistoryQuery = exports.GetLastActiveChatQuery = exports.GetRegChatQuery = exports.GetUnregChatQuery = void 0;
|
|
4
4
|
var get_unreg_chat_query_1 = require("./get-unreg-chat.query");
|
|
5
5
|
Object.defineProperty(exports, "GetUnregChatQuery", { enumerable: true, get: function () { return get_unreg_chat_query_1.GetUnregChatQuery; } });
|
|
6
6
|
var get_reg_chat_query_1 = require("./get-reg-chat.query");
|
|
7
7
|
Object.defineProperty(exports, "GetRegChatQuery", { enumerable: true, get: function () { return get_reg_chat_query_1.GetRegChatQuery; } });
|
|
8
8
|
var get_last_active_chat_query_1 = require("./get-last-active-chat.query");
|
|
9
9
|
Object.defineProperty(exports, "GetLastActiveChatQuery", { enumerable: true, get: function () { return get_last_active_chat_query_1.GetLastActiveChatQuery; } });
|
|
10
|
+
var get_chat_history_query_1 = require("./get-chat-history.query");
|
|
11
|
+
Object.defineProperty(exports, "GetChatHistoryQuery", { enumerable: true, get: function () { return get_chat_history_query_1.GetChatHistoryQuery; } });
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Chat Period Types
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ChatPeriodType {
|
|
6
|
+
TODAY = "TODAY",
|
|
7
|
+
YESTERDAY = "YESTERDAY",
|
|
8
|
+
LAST_7_DAYS = "LAST_7_DAYS",
|
|
9
|
+
MONTH = "MONTH",
|
|
10
|
+
YEAR = "YEAR"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Russian month names (1-indexed: January = index 1)
|
|
14
|
+
*/
|
|
15
|
+
export declare const MONTH_NAMES_RU: readonly ["", "Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"];
|
|
16
|
+
/**
|
|
17
|
+
* Period labels
|
|
18
|
+
*/
|
|
19
|
+
export declare const PERIOD_LABELS_RU: {
|
|
20
|
+
readonly TODAY: "Сегодня";
|
|
21
|
+
readonly YESTERDAY: "Вчера";
|
|
22
|
+
readonly LAST_7_DAYS: "Последние 7 дней";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Chat History Item Schema
|
|
26
|
+
*/
|
|
27
|
+
export declare const ChatHistoryItemSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
title: z.ZodString;
|
|
30
|
+
lastMessageAt: z.ZodString;
|
|
31
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type ChatHistoryItemDto = z.infer<typeof ChatHistoryItemSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* Chat Period Schema
|
|
36
|
+
*/
|
|
37
|
+
export declare const ChatPeriodSchema: z.ZodObject<{
|
|
38
|
+
type: z.ZodEnum<typeof ChatPeriodType>;
|
|
39
|
+
label: z.ZodString;
|
|
40
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
month: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
chats: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
title: z.ZodString;
|
|
45
|
+
lastMessageAt: z.ZodString;
|
|
46
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type ChatPeriodDto = z.infer<typeof ChatPeriodSchema>;
|
|
50
|
+
/**
|
|
51
|
+
* Get Chat History Request Schema
|
|
52
|
+
*/
|
|
53
|
+
export declare const GetChatHistoryRequestSchema: z.ZodObject<{
|
|
54
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
55
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type GetChatHistoryRequestDto = z.infer<typeof GetChatHistoryRequestSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* Get Chat History Response Schema
|
|
60
|
+
*/
|
|
61
|
+
export declare const GetChatHistoryResponseSchema: z.ZodObject<{
|
|
62
|
+
periods: z.ZodArray<z.ZodObject<{
|
|
63
|
+
type: z.ZodEnum<typeof ChatPeriodType>;
|
|
64
|
+
label: z.ZodString;
|
|
65
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
month: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
chats: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
title: z.ZodString;
|
|
70
|
+
lastMessageAt: z.ZodString;
|
|
71
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
75
|
+
hasMore: z.ZodBoolean;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type GetChatHistoryResponseDto = z.infer<typeof GetChatHistoryResponseSchema>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
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 = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Chat Period Types
|
|
7
|
+
*/
|
|
8
|
+
var ChatPeriodType;
|
|
9
|
+
(function (ChatPeriodType) {
|
|
10
|
+
ChatPeriodType["TODAY"] = "TODAY";
|
|
11
|
+
ChatPeriodType["YESTERDAY"] = "YESTERDAY";
|
|
12
|
+
ChatPeriodType["LAST_7_DAYS"] = "LAST_7_DAYS";
|
|
13
|
+
ChatPeriodType["MONTH"] = "MONTH";
|
|
14
|
+
ChatPeriodType["YEAR"] = "YEAR";
|
|
15
|
+
})(ChatPeriodType || (exports.ChatPeriodType = ChatPeriodType = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Russian month names (1-indexed: January = index 1)
|
|
18
|
+
*/
|
|
19
|
+
exports.MONTH_NAMES_RU = [
|
|
20
|
+
'', // index 0 unused
|
|
21
|
+
'Январь',
|
|
22
|
+
'Февраль',
|
|
23
|
+
'Март',
|
|
24
|
+
'Апрель',
|
|
25
|
+
'Май',
|
|
26
|
+
'Июнь',
|
|
27
|
+
'Июль',
|
|
28
|
+
'Август',
|
|
29
|
+
'Сентябрь',
|
|
30
|
+
'Октябрь',
|
|
31
|
+
'Ноябрь',
|
|
32
|
+
'Декабрь',
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* Period labels
|
|
36
|
+
*/
|
|
37
|
+
exports.PERIOD_LABELS_RU = {
|
|
38
|
+
[ChatPeriodType.TODAY]: 'Сегодня',
|
|
39
|
+
[ChatPeriodType.YESTERDAY]: 'Вчера',
|
|
40
|
+
[ChatPeriodType.LAST_7_DAYS]: 'Последние 7 дней',
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Chat History Item Schema
|
|
44
|
+
*/
|
|
45
|
+
exports.ChatHistoryItemSchema = zod_1.z.object({
|
|
46
|
+
id: zod_1.z.string().uuid(),
|
|
47
|
+
title: zod_1.z.string(),
|
|
48
|
+
lastMessageAt: zod_1.z.string().datetime(),
|
|
49
|
+
pageId: zod_1.z.string().uuid().nullable(),
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Chat Period Schema
|
|
53
|
+
*/
|
|
54
|
+
exports.ChatPeriodSchema = zod_1.z.object({
|
|
55
|
+
type: zod_1.z.enum(ChatPeriodType),
|
|
56
|
+
label: zod_1.z.string(),
|
|
57
|
+
year: zod_1.z.number().int().optional(),
|
|
58
|
+
month: zod_1.z.number().int().min(1).max(12).optional(),
|
|
59
|
+
chats: zod_1.z.array(exports.ChatHistoryItemSchema),
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Get Chat History Request Schema
|
|
63
|
+
*/
|
|
64
|
+
exports.GetChatHistoryRequestSchema = zod_1.z.object({
|
|
65
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
66
|
+
cursor: zod_1.z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Get Chat History Response Schema
|
|
70
|
+
*/
|
|
71
|
+
exports.GetChatHistoryResponseSchema = zod_1.z.object({
|
|
72
|
+
periods: zod_1.z.array(exports.ChatPeriodSchema),
|
|
73
|
+
nextCursor: zod_1.z.string().nullable(),
|
|
74
|
+
hasMore: zod_1.z.boolean(),
|
|
75
|
+
});
|
|
@@ -9,3 +9,5 @@ export { UpdateChatTitleRequestSchema } from './update-chat-title-request.schema
|
|
|
9
9
|
export type { UpdateChatTitleRequestDto } from './update-chat-title-request.schema';
|
|
10
10
|
export { DeleteChatResponseSchema } from './delete-chat-response.schema';
|
|
11
11
|
export type { DeleteChatResponseDto } from './delete-chat-response.schema';
|
|
12
|
+
export { ChatPeriodType, MONTH_NAMES_RU, PERIOD_LABELS_RU, ChatHistoryItemSchema, ChatPeriodSchema, GetChatHistoryRequestSchema, GetChatHistoryResponseSchema, } from './chat-history.schema';
|
|
13
|
+
export type { ChatHistoryItemDto, ChatPeriodDto, GetChatHistoryRequestDto, GetChatHistoryResponseDto, } from './chat-history.schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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");
|
|
@@ -15,3 +15,11 @@ var update_chat_title_request_schema_1 = require("./update-chat-title-request.sc
|
|
|
15
15
|
Object.defineProperty(exports, "UpdateChatTitleRequestSchema", { enumerable: true, get: function () { return update_chat_title_request_schema_1.UpdateChatTitleRequestSchema; } });
|
|
16
16
|
var delete_chat_response_schema_1 = require("./delete-chat-response.schema");
|
|
17
17
|
Object.defineProperty(exports, "DeleteChatResponseSchema", { enumerable: true, get: function () { return delete_chat_response_schema_1.DeleteChatResponseSchema; } });
|
|
18
|
+
var chat_history_schema_1 = require("./chat-history.schema");
|
|
19
|
+
Object.defineProperty(exports, "ChatPeriodType", { enumerable: true, get: function () { return chat_history_schema_1.ChatPeriodType; } });
|
|
20
|
+
Object.defineProperty(exports, "MONTH_NAMES_RU", { enumerable: true, get: function () { return chat_history_schema_1.MONTH_NAMES_RU; } });
|
|
21
|
+
Object.defineProperty(exports, "PERIOD_LABELS_RU", { enumerable: true, get: function () { return chat_history_schema_1.PERIOD_LABELS_RU; } });
|
|
22
|
+
Object.defineProperty(exports, "ChatHistoryItemSchema", { enumerable: true, get: function () { return chat_history_schema_1.ChatHistoryItemSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "ChatPeriodSchema", { enumerable: true, get: function () { return chat_history_schema_1.ChatPeriodSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "GetChatHistoryRequestSchema", { enumerable: true, get: function () { return chat_history_schema_1.GetChatHistoryRequestSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "GetChatHistoryResponseSchema", { enumerable: true, get: function () { return chat_history_schema_1.GetChatHistoryResponseSchema; } });
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateMessageCommand = void 0;
|
|
3
|
+
exports.RateMessageUnregCommand = exports.RateMessageRegCommand = exports.CreateMessageCommand = void 0;
|
|
4
4
|
var create_message_command_1 = require("./create-message.command");
|
|
5
5
|
Object.defineProperty(exports, "CreateMessageCommand", { enumerable: true, get: function () { return create_message_command_1.CreateMessageCommand; } });
|
|
6
|
+
var rate_message_reg_command_1 = require("./rate-message-reg.command");
|
|
7
|
+
Object.defineProperty(exports, "RateMessageRegCommand", { enumerable: true, get: function () { return rate_message_reg_command_1.RateMessageRegCommand; } });
|
|
8
|
+
var rate_message_unreg_command_1 = require("./rate-message-unreg.command");
|
|
9
|
+
Object.defineProperty(exports, "RateMessageUnregCommand", { enumerable: true, get: function () { return rate_message_unreg_command_1.RateMessageUnregCommand; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace RateMessageRegCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
rating: z.ZodEnum<typeof import("..").UserRating>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
const Response: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
const URL: (pageId: string, chatId: string, messageId: string) => string;
|
|
11
|
+
const METHOD = HttpMethod.PATCH;
|
|
12
|
+
type RequestType = z.infer<typeof Request>;
|
|
13
|
+
type ResponseType = z.infer<typeof Response>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RateMessageRegCommand = void 0;
|
|
4
|
+
const rate_message_schema_1 = require("../schemas/rate-message.schema");
|
|
5
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
+
var RateMessageRegCommand;
|
|
8
|
+
(function (RateMessageRegCommand) {
|
|
9
|
+
RateMessageRegCommand.Request = rate_message_schema_1.RateMessageRequestSchema;
|
|
10
|
+
RateMessageRegCommand.Response = rate_message_schema_1.RateMessageResponseSchema;
|
|
11
|
+
RateMessageRegCommand.URL = (pageId, chatId, messageId) => rest_api_1.REST_API.V1.MESSAGE.REG.RATE(pageId, chatId, messageId);
|
|
12
|
+
RateMessageRegCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
13
|
+
})(RateMessageRegCommand || (exports.RateMessageRegCommand = RateMessageRegCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace RateMessageUnregCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
rating: z.ZodEnum<typeof import("..").UserRating>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
const Response: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
const URL: (pageId: string, chatId: string, messageId: string) => string;
|
|
11
|
+
const METHOD = HttpMethod.PATCH;
|
|
12
|
+
type RequestType = z.infer<typeof Request>;
|
|
13
|
+
type ResponseType = z.infer<typeof Response>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RateMessageUnregCommand = void 0;
|
|
4
|
+
const rate_message_schema_1 = require("../schemas/rate-message.schema");
|
|
5
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
+
var RateMessageUnregCommand;
|
|
8
|
+
(function (RateMessageUnregCommand) {
|
|
9
|
+
RateMessageUnregCommand.Request = rate_message_schema_1.RateMessageRequestSchema;
|
|
10
|
+
RateMessageUnregCommand.Response = rate_message_schema_1.RateMessageResponseSchema;
|
|
11
|
+
RateMessageUnregCommand.URL = (pageId, chatId, messageId) => rest_api_1.REST_API.V1.MESSAGE.UNREG.RATE(pageId, chatId, messageId);
|
|
12
|
+
RateMessageUnregCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
13
|
+
})(RateMessageUnregCommand || (exports.RateMessageUnregCommand = RateMessageUnregCommand = {}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ErrorMetadata } from '../../shared';
|
|
2
2
|
export declare enum MessageErrorCode {
|
|
3
|
+
MESSAGE_NOT_FOUND = "MESSAGE_NOT_FOUND",
|
|
3
4
|
CHAT_NOT_FOUND = "CHAT_NOT_FOUND",
|
|
4
5
|
CHAT_NOT_OWNED = "CHAT_NOT_OWNED",
|
|
5
6
|
CHAT_DELETED = "CHAT_DELETED",
|
|
@@ -8,6 +9,7 @@ export declare enum MessageErrorCode {
|
|
|
8
9
|
MESSAGE_TEXT_EMPTY = "MESSAGE_TEXT_EMPTY",
|
|
9
10
|
MESSAGE_TEXT_TOO_LONG = "MESSAGE_TEXT_TOO_LONG",
|
|
10
11
|
AI_MODEL_NOT_FOUND = "AI_MODEL_NOT_FOUND",
|
|
11
|
-
AI_MODEL_INACTIVE = "AI_MODEL_INACTIVE"
|
|
12
|
+
AI_MODEL_INACTIVE = "AI_MODEL_INACTIVE",
|
|
13
|
+
CANNOT_RATE_USER_MESSAGE = "CANNOT_RATE_USER_MESSAGE"
|
|
12
14
|
}
|
|
13
15
|
export declare const MESSAGE_ERRORS: Record<MessageErrorCode, ErrorMetadata>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MESSAGE_ERRORS = exports.MessageErrorCode = void 0;
|
|
4
4
|
var MessageErrorCode;
|
|
5
5
|
(function (MessageErrorCode) {
|
|
6
|
+
MessageErrorCode["MESSAGE_NOT_FOUND"] = "MESSAGE_NOT_FOUND";
|
|
6
7
|
MessageErrorCode["CHAT_NOT_FOUND"] = "CHAT_NOT_FOUND";
|
|
7
8
|
MessageErrorCode["CHAT_NOT_OWNED"] = "CHAT_NOT_OWNED";
|
|
8
9
|
MessageErrorCode["CHAT_DELETED"] = "CHAT_DELETED";
|
|
@@ -12,8 +13,13 @@ var MessageErrorCode;
|
|
|
12
13
|
MessageErrorCode["MESSAGE_TEXT_TOO_LONG"] = "MESSAGE_TEXT_TOO_LONG";
|
|
13
14
|
MessageErrorCode["AI_MODEL_NOT_FOUND"] = "AI_MODEL_NOT_FOUND";
|
|
14
15
|
MessageErrorCode["AI_MODEL_INACTIVE"] = "AI_MODEL_INACTIVE";
|
|
16
|
+
MessageErrorCode["CANNOT_RATE_USER_MESSAGE"] = "CANNOT_RATE_USER_MESSAGE";
|
|
15
17
|
})(MessageErrorCode || (exports.MessageErrorCode = MessageErrorCode = {}));
|
|
16
18
|
exports.MESSAGE_ERRORS = {
|
|
19
|
+
[MessageErrorCode.MESSAGE_NOT_FOUND]: {
|
|
20
|
+
code: MessageErrorCode.MESSAGE_NOT_FOUND,
|
|
21
|
+
statusCode: 404,
|
|
22
|
+
},
|
|
17
23
|
[MessageErrorCode.CHAT_NOT_FOUND]: {
|
|
18
24
|
code: MessageErrorCode.CHAT_NOT_FOUND,
|
|
19
25
|
statusCode: 404,
|
|
@@ -50,4 +56,8 @@ exports.MESSAGE_ERRORS = {
|
|
|
50
56
|
code: MessageErrorCode.AI_MODEL_INACTIVE,
|
|
51
57
|
statusCode: 400,
|
|
52
58
|
},
|
|
59
|
+
[MessageErrorCode.CANNOT_RATE_USER_MESSAGE]: {
|
|
60
|
+
code: MessageErrorCode.CANNOT_RATE_USER_MESSAGE,
|
|
61
|
+
statusCode: 400,
|
|
62
|
+
},
|
|
53
63
|
};
|
|
@@ -6,3 +6,5 @@ export { CreateMessageResponseSchema } from './create-message-response.schema';
|
|
|
6
6
|
export { MessageResponseSchema } from './message-response.schema';
|
|
7
7
|
export { StreamEventType, StreamEventSchema, StreamChunkEventSchema, StreamReasoningEventSchema, StreamDoneEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
|
|
8
8
|
export { MessageMetaSchema, ReasoningMetaSchema, ReasoningDetailSchema, } from './message-meta.schema';
|
|
9
|
+
export { RateMessageRequestSchema, RateMessageResponseSchema, RateMessageParamsSchema, } from './rate-message.schema';
|
|
10
|
+
export type { RateMessageRequestDto, RateMessageResponseDto, RateMessageParamsDto, } from './rate-message.schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
3
|
+
exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
4
4
|
var message_role_enum_1 = require("./message-role.enum");
|
|
5
5
|
Object.defineProperty(exports, "MessageRole", { enumerable: true, get: function () { return message_role_enum_1.MessageRole; } });
|
|
6
6
|
var message_status_enum_1 = require("./message-status.enum");
|
|
@@ -24,3 +24,7 @@ var message_meta_schema_1 = require("./message-meta.schema");
|
|
|
24
24
|
Object.defineProperty(exports, "MessageMetaSchema", { enumerable: true, get: function () { return message_meta_schema_1.MessageMetaSchema; } });
|
|
25
25
|
Object.defineProperty(exports, "ReasoningMetaSchema", { enumerable: true, get: function () { return message_meta_schema_1.ReasoningMetaSchema; } });
|
|
26
26
|
Object.defineProperty(exports, "ReasoningDetailSchema", { enumerable: true, get: function () { return message_meta_schema_1.ReasoningDetailSchema; } });
|
|
27
|
+
var rate_message_schema_1 = require("./rate-message.schema");
|
|
28
|
+
Object.defineProperty(exports, "RateMessageRequestSchema", { enumerable: true, get: function () { return rate_message_schema_1.RateMessageRequestSchema; } });
|
|
29
|
+
Object.defineProperty(exports, "RateMessageResponseSchema", { enumerable: true, get: function () { return rate_message_schema_1.RateMessageResponseSchema; } });
|
|
30
|
+
Object.defineProperty(exports, "RateMessageParamsSchema", { enumerable: true, get: function () { return rate_message_schema_1.RateMessageParamsSchema; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UserRating } from './user-rating.enum';
|
|
3
|
+
export declare const RateMessageRequestSchema: z.ZodObject<{
|
|
4
|
+
rating: z.ZodEnum<typeof UserRating>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const RateMessageResponseSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const RateMessageParamsSchema: z.ZodObject<{
|
|
10
|
+
pageId: z.ZodString;
|
|
11
|
+
chatId: z.ZodString;
|
|
12
|
+
messageId: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type RateMessageRequestDto = z.infer<typeof RateMessageRequestSchema>;
|
|
15
|
+
export type RateMessageResponseDto = z.infer<typeof RateMessageResponseSchema>;
|
|
16
|
+
export type RateMessageParamsDto = z.infer<typeof RateMessageParamsSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const user_rating_enum_1 = require("./user-rating.enum");
|
|
6
|
+
exports.RateMessageRequestSchema = zod_1.z.object({
|
|
7
|
+
rating: zod_1.z.nativeEnum(user_rating_enum_1.UserRating),
|
|
8
|
+
});
|
|
9
|
+
exports.RateMessageResponseSchema = zod_1.z.object({
|
|
10
|
+
id: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
exports.RateMessageParamsSchema = zod_1.z.object({
|
|
13
|
+
pageId: zod_1.z.string().uuid(),
|
|
14
|
+
chatId: zod_1.z.string().uuid(),
|
|
15
|
+
messageId: zod_1.z.string().uuid(),
|
|
16
|
+
});
|