@purpleschool/gptbot 0.13.22 → 0.13.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/controllers/http/agents/agent-dialog.ts +2 -5
- package/api/routes.ts +26 -19
- package/build/api/controllers/http/agents/agent-dialog.js +2 -3
- package/build/api/routes.js +1 -3
- package/build/commands/agents/agent-dialog/delete-dialog.command.js +16 -0
- package/build/commands/agents/agent-dialog/get-cabinet-price-preview.command.js +2 -6
- package/build/commands/agents/agent-dialog/get-dialog-context-length.command.js +3 -1
- package/build/commands/agents/agent-dialog/index.js +1 -1
- package/build/commands/agents/agent-dialog/send-cabinet-message.command.js +0 -7
- package/build/commands/tools/html-page-builder/find-html-page-builder-sessions.command.js +1 -1
- package/build/commands/tools/image-generation/find-image-generation-jobs.command.js +1 -1
- package/build/commands/tools/interior-design/find-interior-design-jobs.command.js +1 -1
- package/build/commands/tools/marketplace-card/find-marketplace-card-jobs.command.js +1 -1
- package/build/commands/tools/music/find-music-jobs.command.js +1 -1
- package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.js +1 -1
- package/build/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.js +1 -1
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +1 -0
- package/commands/agents/agent-dialog/{clear-agent-dialog-history.command.ts → delete-dialog.command.ts} +5 -5
- package/commands/agents/agent-dialog/get-cabinet-price-preview.command.ts +2 -6
- package/commands/agents/agent-dialog/get-dialog-context-length.command.ts +3 -1
- package/commands/agents/agent-dialog/index.ts +1 -1
- package/commands/agents/agent-dialog/send-cabinet-message.command.ts +0 -9
- package/commands/tools/html-page-builder/find-html-page-builder-sessions.command.ts +1 -1
- package/commands/tools/image-generation/find-image-generation-jobs.command.ts +1 -1
- package/commands/tools/interior-design/find-interior-design-jobs.command.ts +1 -1
- package/commands/tools/marketplace-card/find-marketplace-card-jobs.command.ts +1 -1
- package/commands/tools/music/find-music-jobs.command.ts +1 -1
- package/commands/tools/paraphrase/find-paraphrase-jobs.command.ts +1 -1
- package/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.ts +1 -1
- package/constants/cabinet/enums/statistics-request-type.enum.ts +1 -0
- package/package.json +1 -1
- package/build/commands/agents/agent-dialog/clear-agent-dialog-history.command.js +0 -14
|
@@ -4,17 +4,14 @@ export const AGENT_DIALOG_ROUTES = {
|
|
|
4
4
|
LIST: '',
|
|
5
5
|
GET_BY_ID: (id: string) => `${id}`,
|
|
6
6
|
UPDATE_STATUS: (id: string) => `${id}/status`,
|
|
7
|
-
CLEAR_HISTORY: (id: string) => `${id}/history`,
|
|
8
7
|
ADMIN_REPLY: (id: string) => `${id}/admin-reply`,
|
|
9
8
|
RENAME: (id: string) => `${id}/title`,
|
|
9
|
+
DELETE_DIALOG: (agentId: string, dialogId: string) => `${agentId}/${dialogId}`,
|
|
10
10
|
CABINET_CONFIG: 'cabinet/config',
|
|
11
11
|
CABINET_START_DIALOG: (agentId: string) => `${agentId}/cabinet/start`,
|
|
12
|
-
CABINET_SEND_MESSAGE: (agentId: string, dialogId: string) =>
|
|
13
|
-
`${agentId}/${dialogId}/cabinet/messages`,
|
|
14
12
|
CABINET_SEND_MESSAGE_STREAM: (agentId: string, dialogId: string) =>
|
|
15
13
|
`${agentId}/${dialogId}/cabinet/messages/stream`,
|
|
16
14
|
STOP_CABINET_STREAM: (agentId: string, dialogId: string, messageId: string) =>
|
|
17
15
|
`${agentId}/${dialogId}/cabinet/messages/${messageId}/stop`,
|
|
18
|
-
CABINET_PRICE_PREVIEW: (agentId: string
|
|
19
|
-
`${agentId}/${dialogId}/cabinet/price-preview`,
|
|
16
|
+
CABINET_PRICE_PREVIEW: (agentId: string) => `${agentId}/cabinet/price-preview`,
|
|
20
17
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -207,8 +207,6 @@ export const REST_API = {
|
|
|
207
207
|
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.GET_BY_ID(id)}`,
|
|
208
208
|
UPDATE_STATUS: (id: string): string =>
|
|
209
209
|
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.UPDATE_STATUS(id)}`,
|
|
210
|
-
CLEAR_HISTORY: (id: string): string =>
|
|
211
|
-
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CLEAR_HISTORY(id)}`,
|
|
212
210
|
ADMIN_REPLY: (id: string): string =>
|
|
213
211
|
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.ADMIN_REPLY(id)}`,
|
|
214
212
|
RENAME: (id: string): string =>
|
|
@@ -216,14 +214,12 @@ export const REST_API = {
|
|
|
216
214
|
CABINET_CONFIG: `${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_CONFIG}`,
|
|
217
215
|
CABINET_START_DIALOG: (agentId: string): string =>
|
|
218
216
|
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_START_DIALOG(agentId)}`,
|
|
219
|
-
CABINET_SEND_MESSAGE: (agentId: string, dialogId: string): string =>
|
|
220
|
-
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_SEND_MESSAGE(agentId, dialogId)}`,
|
|
221
217
|
CABINET_SEND_MESSAGE_STREAM: (agentId: string, dialogId: string): string =>
|
|
222
218
|
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_SEND_MESSAGE_STREAM(agentId, dialogId)}`,
|
|
223
219
|
STOP_CABINET_STREAM: (agentId: string, dialogId: string, messageId: string): string =>
|
|
224
220
|
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.STOP_CABINET_STREAM(agentId, dialogId, messageId)}`,
|
|
225
|
-
CABINET_PRICE_PREVIEW: (agentId: string
|
|
226
|
-
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_PRICE_PREVIEW(agentId
|
|
221
|
+
CABINET_PRICE_PREVIEW: (agentId: string): string =>
|
|
222
|
+
`${ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_PRICE_PREVIEW(agentId)}`,
|
|
227
223
|
},
|
|
228
224
|
AGENT_TEMPLATE_PRIVATE: {
|
|
229
225
|
CATALOG: `${ROOT}/${CONTROLLERS.AGENT_TEMPLATE_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TEMPLATE_ROUTES.CATALOG}`,
|
|
@@ -705,8 +701,8 @@ export const REST_API = {
|
|
|
705
701
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_OUTLINE(uuid)}`,
|
|
706
702
|
UPDATE_TITLE_PAGE: (uuid: string) =>
|
|
707
703
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_TITLE_PAGE(uuid)}`,
|
|
708
|
-
|
|
709
|
-
|
|
704
|
+
UPDATE_FAVORITE: (uuid: string) =>
|
|
705
|
+
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.UPDATE_FAVORITE(uuid)}`,
|
|
710
706
|
TOGGLE_TITLE_PAGE: (uuid: string) =>
|
|
711
707
|
`${ROOT}/${CONTROLLERS.WRITER_CONTROLLER_PUBLIC}/${CONTROLLERS.WRITER_ROUTES.TOGGLE_TITLE_PAGE(uuid)}`,
|
|
712
708
|
DELETE_DOCUMENT: (uuid: string) =>
|
|
@@ -1595,16 +1591,27 @@ export const REST_API = {
|
|
|
1595
1591
|
ACTIONS: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ACTIONS}`,
|
|
1596
1592
|
CREATE_CANVAS: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CREATE_CANVAS}`,
|
|
1597
1593
|
GET_CANVASES: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVASES}`,
|
|
1598
|
-
GET_CANVAS: (canvasId: string) =>
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1594
|
+
GET_CANVAS: (canvasId: string) =>
|
|
1595
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVAS(canvasId)}`,
|
|
1596
|
+
GET_JOBS: (canvasId: string) =>
|
|
1597
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_JOBS(canvasId)}`,
|
|
1598
|
+
GET_JOB: (canvasId: string, jobId: string) =>
|
|
1599
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_JOB(canvasId, jobId)}`,
|
|
1600
|
+
SAVE_CANVAS: (canvasId: string) =>
|
|
1601
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.SAVE_CANVAS(canvasId)}`,
|
|
1602
|
+
UPDATE_CANVAS: (canvasId: string) =>
|
|
1603
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CANVAS(canvasId)}`,
|
|
1604
|
+
DELETE_CANVAS: (canvasId: string) =>
|
|
1605
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CANVAS(canvasId)}`,
|
|
1606
|
+
GET_CHECKPOINTS: (canvasId: string) =>
|
|
1607
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CHECKPOINTS(canvasId)}`,
|
|
1608
|
+
ADD_CHECKPOINT: (canvasId: string) =>
|
|
1609
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ADD_CHECKPOINT(canvasId)}`,
|
|
1610
|
+
UPDATE_CHECKPOINT: (canvasId: string, checkpointId: string) =>
|
|
1611
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1612
|
+
DELETE_CHECKPOINT: (canvasId: string, checkpointId: string) =>
|
|
1613
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1614
|
+
CLEAR_CHECKPOINS: (canvasdId: string) =>
|
|
1615
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CLEAR_CHECKPOINTS(canvasdId)}`,
|
|
1609
1616
|
},
|
|
1610
1617
|
} as const;
|
|
@@ -6,13 +6,12 @@ exports.AGENT_DIALOG_ROUTES = {
|
|
|
6
6
|
LIST: '',
|
|
7
7
|
GET_BY_ID: (id) => `${id}`,
|
|
8
8
|
UPDATE_STATUS: (id) => `${id}/status`,
|
|
9
|
-
CLEAR_HISTORY: (id) => `${id}/history`,
|
|
10
9
|
ADMIN_REPLY: (id) => `${id}/admin-reply`,
|
|
11
10
|
RENAME: (id) => `${id}/title`,
|
|
11
|
+
DELETE_DIALOG: (agentId, dialogId) => `${agentId}/${dialogId}`,
|
|
12
12
|
CABINET_CONFIG: 'cabinet/config',
|
|
13
13
|
CABINET_START_DIALOG: (agentId) => `${agentId}/cabinet/start`,
|
|
14
|
-
CABINET_SEND_MESSAGE: (agentId, dialogId) => `${agentId}/${dialogId}/cabinet/messages`,
|
|
15
14
|
CABINET_SEND_MESSAGE_STREAM: (agentId, dialogId) => `${agentId}/${dialogId}/cabinet/messages/stream`,
|
|
16
15
|
STOP_CABINET_STREAM: (agentId, dialogId, messageId) => `${agentId}/${dialogId}/cabinet/messages/${messageId}/stop`,
|
|
17
|
-
CABINET_PRICE_PREVIEW: (agentId
|
|
16
|
+
CABINET_PRICE_PREVIEW: (agentId) => `${agentId}/cabinet/price-preview`,
|
|
18
17
|
};
|
package/build/api/routes.js
CHANGED
|
@@ -189,15 +189,13 @@ exports.REST_API = {
|
|
|
189
189
|
LIST: `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}`,
|
|
190
190
|
GET_BY_ID: (id) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.GET_BY_ID(id)}`,
|
|
191
191
|
UPDATE_STATUS: (id) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.UPDATE_STATUS(id)}`,
|
|
192
|
-
CLEAR_HISTORY: (id) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CLEAR_HISTORY(id)}`,
|
|
193
192
|
ADMIN_REPLY: (id) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.ADMIN_REPLY(id)}`,
|
|
194
193
|
RENAME: (id) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.RENAME(id)}`,
|
|
195
194
|
CABINET_CONFIG: `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_CONFIG}`,
|
|
196
195
|
CABINET_START_DIALOG: (agentId) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_START_DIALOG(agentId)}`,
|
|
197
|
-
CABINET_SEND_MESSAGE: (agentId, dialogId) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_SEND_MESSAGE(agentId, dialogId)}`,
|
|
198
196
|
CABINET_SEND_MESSAGE_STREAM: (agentId, dialogId) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_SEND_MESSAGE_STREAM(agentId, dialogId)}`,
|
|
199
197
|
STOP_CABINET_STREAM: (agentId, dialogId, messageId) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.STOP_CABINET_STREAM(agentId, dialogId, messageId)}`,
|
|
200
|
-
CABINET_PRICE_PREVIEW: (agentId
|
|
198
|
+
CABINET_PRICE_PREVIEW: (agentId) => `${exports.ROOT}/${CONTROLLERS.AGENT_DIALOG_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_DIALOG_ROUTES.CABINET_PRICE_PREVIEW(agentId)}`,
|
|
201
199
|
},
|
|
202
200
|
AGENT_TEMPLATE_PRIVATE: {
|
|
203
201
|
CATALOG: `${exports.ROOT}/${CONTROLLERS.AGENT_TEMPLATE_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TEMPLATE_ROUTES.CATALOG}`,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAgentDialogCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteAgentDialogCommand;
|
|
6
|
+
(function (DeleteAgentDialogCommand) {
|
|
7
|
+
DeleteAgentDialogCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
agentId: zod_1.z.string().uuid(),
|
|
9
|
+
dialogId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
DeleteAgentDialogCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.object({
|
|
13
|
+
isSuccess: zod_1.z.boolean(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
})(DeleteAgentDialogCommand || (exports.DeleteAgentDialogCommand = DeleteAgentDialogCommand = {}));
|
|
@@ -6,21 +6,17 @@ var GetCabinetPricePreviewCommand;
|
|
|
6
6
|
(function (GetCabinetPricePreviewCommand) {
|
|
7
7
|
GetCabinetPricePreviewCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
8
|
agentId: zod_1.z.string().uuid(),
|
|
9
|
-
dialogId: zod_1.z.string().uuid(),
|
|
10
9
|
});
|
|
11
10
|
GetCabinetPricePreviewCommand.RequestBodySchema = zod_1.z.object({
|
|
12
11
|
inputLength: zod_1.z.number().int().min(0),
|
|
13
12
|
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
14
13
|
useWebSearch: zod_1.z.boolean().optional(),
|
|
14
|
+
/** Если не передан — расчёт для нового диалога (история пустая) */
|
|
15
|
+
dialogId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
16
|
});
|
|
16
17
|
GetCabinetPricePreviewCommand.ResponseSchema = zod_1.z.object({
|
|
17
18
|
data: zod_1.z.object({
|
|
18
19
|
price: zod_1.z.number().int().min(0),
|
|
19
|
-
breakdown: zod_1.z.object({
|
|
20
|
-
textCost: zod_1.z.number().int().min(0),
|
|
21
|
-
attachmentsCost: zod_1.z.number().int().min(0),
|
|
22
|
-
webSearchCost: zod_1.z.number().int().min(0),
|
|
23
|
-
}),
|
|
24
20
|
charsUntilNextPriceIncrease: zod_1.z.number().int().min(1).nullable(),
|
|
25
21
|
charsUntilNextPriceDecrease: zod_1.z.number().int().min(1).nullable(),
|
|
26
22
|
}),
|
|
@@ -7,7 +7,9 @@ var GetDialogContextLengthCommand;
|
|
|
7
7
|
(function (GetDialogContextLengthCommand) {
|
|
8
8
|
GetDialogContextLengthCommand.RequestSchema = zod_1.z.object({
|
|
9
9
|
teamAccountId: zod_1.z.string().uuid(),
|
|
10
|
-
|
|
10
|
+
agentId: zod_1.z.string().uuid(),
|
|
11
|
+
/** Если не передан — история пустая (расчёт для нового диалога) */
|
|
12
|
+
dialogId: zod_1.z.string().uuid().optional(),
|
|
11
13
|
inputLength: zod_1.z.number().int().min(0),
|
|
12
14
|
attachments: zod_1.z
|
|
13
15
|
.array(zod_1.z.object({
|
|
@@ -15,9 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./find-agent-dialogs.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-dialog.command"), exports);
|
|
18
19
|
__exportStar(require("./get-agent-dialog-by-id.command"), exports);
|
|
19
20
|
__exportStar(require("./update-agent-dialog-status.command"), exports);
|
|
20
|
-
__exportStar(require("./clear-agent-dialog-history.command"), exports);
|
|
21
21
|
__exportStar(require("./send-agent-dialog-admin-reply.command"), exports);
|
|
22
22
|
__exportStar(require("./start-cabinet-dialog.command"), exports);
|
|
23
23
|
__exportStar(require("./send-cabinet-message.command"), exports);
|
|
@@ -18,11 +18,4 @@ var SendCabinetMessageCommand;
|
|
|
18
18
|
message: 'Message must contain text or file attachments',
|
|
19
19
|
path: ['text'],
|
|
20
20
|
});
|
|
21
|
-
SendCabinetMessageCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
-
data: zod_1.z.object({
|
|
23
|
-
dialogId: zod_1.z.string().uuid(),
|
|
24
|
-
messageId: zod_1.z.string().uuid(),
|
|
25
|
-
isNewDialog: zod_1.z.boolean(),
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
28
21
|
})(SendCabinetMessageCommand || (exports.SendCabinetMessageCommand = SendCabinetMessageCommand = {}));
|
|
@@ -13,7 +13,7 @@ var FindHtmlPageBuilderSessionsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindHtmlPageBuilderSessionsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.HtmlPageBuilderSessionSchema),
|
|
@@ -13,7 +13,7 @@ var FindImageGenerationJobsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindImageGenerationJobsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.ImageGenerationJobSchema),
|
|
@@ -13,7 +13,7 @@ var FindInteriorDesignJobsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindInteriorDesignJobsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.InteriorDesignJobSchema),
|
|
@@ -13,7 +13,7 @@ var FindMarketplaceCardJobsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindMarketplaceCardJobsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.MarketplaceCardJobSchema),
|
|
@@ -13,7 +13,7 @@ var FindMusicJobsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindMusicJobsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.MusicJobSchema),
|
|
@@ -13,7 +13,7 @@ var FindParaphraseJobsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindParaphraseJobsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.ParaphraseToolJobSchema),
|
|
@@ -13,7 +13,7 @@ var FindSolvingEduTaskJobsCommand;
|
|
|
13
13
|
title: zod_1.z.string().optional(),
|
|
14
14
|
isFavorite: helpers_1.QueryBooleanSchema.optional(),
|
|
15
15
|
createdAtSortOrder: zod_1.z.nativeEnum(constants_1.JOB_SORT).optional().default(constants_1.JOB_SORT.DESC),
|
|
16
|
-
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional()
|
|
16
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS).optional(),
|
|
17
17
|
});
|
|
18
18
|
FindSolvingEduTaskJobsCommand.ResponseSchema = zod_1.z.object({
|
|
19
19
|
data: zod_1.z.array(models_1.SolvingEduTaskJobSchema),
|
|
@@ -21,4 +21,5 @@ var STATISTICS_REQUEST_TYPE;
|
|
|
21
21
|
STATISTICS_REQUEST_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
22
|
STATISTICS_REQUEST_TYPE["DIAGRAMS"] = "DIAGRAMS";
|
|
23
23
|
STATISTICS_REQUEST_TYPE["HTML_PAGE_BUILDER"] = "HTML_PAGE_BUILDER";
|
|
24
|
+
STATISTICS_REQUEST_TYPE["AGENT"] = "AGENT";
|
|
24
25
|
})(STATISTICS_REQUEST_TYPE || (exports.STATISTICS_REQUEST_TYPE = STATISTICS_REQUEST_TYPE = {}));
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export namespace
|
|
3
|
+
export namespace DeleteAgentDialogCommand {
|
|
4
4
|
export const RequestParamsSchema = z.object({
|
|
5
|
+
agentId: z.string().uuid(),
|
|
5
6
|
dialogId: z.string().uuid(),
|
|
6
7
|
});
|
|
7
8
|
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
8
9
|
|
|
9
|
-
export const RequestQuerySchema = z.object({});
|
|
10
|
-
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
11
|
-
|
|
12
10
|
export const ResponseSchema = z.object({
|
|
13
|
-
|
|
11
|
+
data: z.object({
|
|
12
|
+
isSuccess: z.boolean(),
|
|
13
|
+
}),
|
|
14
14
|
});
|
|
15
15
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
16
|
}
|
|
@@ -3,7 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
export namespace GetCabinetPricePreviewCommand {
|
|
4
4
|
export const RequestParamsSchema = z.object({
|
|
5
5
|
agentId: z.string().uuid(),
|
|
6
|
-
dialogId: z.string().uuid(),
|
|
7
6
|
});
|
|
8
7
|
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
8
|
|
|
@@ -11,17 +10,14 @@ export namespace GetCabinetPricePreviewCommand {
|
|
|
11
10
|
inputLength: z.number().int().min(0),
|
|
12
11
|
fileIds: z.array(z.string().uuid()).optional(),
|
|
13
12
|
useWebSearch: z.boolean().optional(),
|
|
13
|
+
/** Если не передан — расчёт для нового диалога (история пустая) */
|
|
14
|
+
dialogId: z.string().uuid().nullable().optional(),
|
|
14
15
|
});
|
|
15
16
|
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
16
17
|
|
|
17
18
|
export const ResponseSchema = z.object({
|
|
18
19
|
data: z.object({
|
|
19
20
|
price: z.number().int().min(0),
|
|
20
|
-
breakdown: z.object({
|
|
21
|
-
textCost: z.number().int().min(0),
|
|
22
|
-
attachmentsCost: z.number().int().min(0),
|
|
23
|
-
webSearchCost: z.number().int().min(0),
|
|
24
|
-
}),
|
|
25
21
|
charsUntilNextPriceIncrease: z.number().int().min(1).nullable(),
|
|
26
22
|
charsUntilNextPriceDecrease: z.number().int().min(1).nullable(),
|
|
27
23
|
}),
|
|
@@ -4,7 +4,9 @@ import { MessageAttachmentTypeEnum } from '../../../models/agents/message-attach
|
|
|
4
4
|
export namespace GetDialogContextLengthCommand {
|
|
5
5
|
export const RequestSchema = z.object({
|
|
6
6
|
teamAccountId: z.string().uuid(),
|
|
7
|
-
|
|
7
|
+
agentId: z.string().uuid(),
|
|
8
|
+
/** Если не передан — история пустая (расчёт для нового диалога) */
|
|
9
|
+
dialogId: z.string().uuid().optional(),
|
|
8
10
|
inputLength: z.number().int().min(0),
|
|
9
11
|
attachments: z
|
|
10
12
|
.array(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './find-agent-dialogs.command';
|
|
2
|
+
export * from './delete-dialog.command';
|
|
2
3
|
export * from './get-agent-dialog-by-id.command';
|
|
3
4
|
export * from './update-agent-dialog-status.command';
|
|
4
|
-
export * from './clear-agent-dialog-history.command';
|
|
5
5
|
export * from './send-agent-dialog-admin-reply.command';
|
|
6
6
|
export * from './start-cabinet-dialog.command';
|
|
7
7
|
export * from './send-cabinet-message.command';
|
|
@@ -20,15 +20,6 @@ export namespace SendCabinetMessageCommand {
|
|
|
20
20
|
});
|
|
21
21
|
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
22
22
|
|
|
23
|
-
export const ResponseSchema = z.object({
|
|
24
|
-
data: z.object({
|
|
25
|
-
dialogId: z.string().uuid(),
|
|
26
|
-
messageId: z.string().uuid(),
|
|
27
|
-
isNewDialog: z.boolean(),
|
|
28
|
-
}),
|
|
29
|
-
});
|
|
30
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
31
|
-
|
|
32
23
|
// RMQ payload sent to rugpt-agents (new format with resolved attachments)
|
|
33
24
|
export type RmqRequest = {
|
|
34
25
|
teamAccountId: string;
|
|
@@ -10,7 +10,7 @@ export namespace FindHtmlPageBuilderSessionsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ export namespace FindImageGenerationJobsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ export namespace FindInteriorDesignJobsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ export namespace FindMarketplaceCardJobsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ export namespace FindMusicJobsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ export namespace FindParaphraseJobsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ export namespace FindSolvingEduTaskJobsCommand {
|
|
|
10
10
|
title: z.string().optional(),
|
|
11
11
|
isFavorite: QueryBooleanSchema.optional(),
|
|
12
12
|
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional()
|
|
13
|
+
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
14
14
|
});
|
|
15
15
|
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClearAgentDialogHistoryCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
var ClearAgentDialogHistoryCommand;
|
|
6
|
-
(function (ClearAgentDialogHistoryCommand) {
|
|
7
|
-
ClearAgentDialogHistoryCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
-
dialogId: zod_1.z.string().uuid(),
|
|
9
|
-
});
|
|
10
|
-
ClearAgentDialogHistoryCommand.RequestQuerySchema = zod_1.z.object({});
|
|
11
|
-
ClearAgentDialogHistoryCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
-
success: zod_1.z.boolean(),
|
|
13
|
-
});
|
|
14
|
-
})(ClearAgentDialogHistoryCommand || (exports.ClearAgentDialogHistoryCommand = ClearAgentDialogHistoryCommand = {}));
|