@purpleschool/gptbot 0.7.47 → 0.7.48
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/index.ts +1 -0
- package/api/controllers/http/writer.ts +20 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/writer.js +22 -0
- package/build/commands/chat/check-limit.command.js +4 -0
- package/build/commands/tools/index.js +1 -0
- package/build/commands/tools/writer/create-writer-document.command.js +16 -0
- package/build/commands/tools/writer/delete-all-writer-documents.command.js +8 -0
- package/build/commands/tools/writer/delete-writer-document-by-uuid.command.js +11 -0
- package/build/commands/tools/writer/export-writer-document-as-docx.command.js +15 -0
- package/build/commands/tools/writer/find-writer-document-by-uuid.command.js +14 -0
- package/build/commands/tools/writer/find-writer-documents.command.js +18 -0
- package/build/commands/tools/writer/generate-writer-document-contents.command.js +14 -0
- package/build/commands/tools/writer/get-writer-tool-config.command.js +11 -0
- package/build/commands/tools/writer/index.js +31 -0
- package/build/commands/tools/writer/update-writer-document-contents.command.js +18 -0
- package/build/commands/tools/writer/update-writer-document-outline.command.js +17 -0
- package/build/commands/tools/writer/writer-extend-text.command.js +18 -0
- package/build/commands/tools/writer/writer-fix-errors.command.js +18 -0
- package/build/commands/tools/writer/writer-generate-text.command.js +21 -0
- package/build/commands/tools/writer/writer-paraphrase.command.js +18 -0
- package/build/commands/tools/writer/writer-shorten-text.command.js +18 -0
- package/build/constants/errors/errors.js +115 -30
- package/build/constants/index.js +1 -0
- package/build/constants/writer/enums/index.js +20 -0
- package/build/constants/writer/enums/writer-ai-action-pricing-type.enum.js +8 -0
- package/build/constants/writer/enums/writer-ai-action-type.enum.js +11 -0
- package/build/constants/writer/enums/writer-document-section-type.enum.js +9 -0
- package/build/constants/writer/enums/writer-document-stage.enum.js +14 -0
- package/build/constants/writer/index.js +17 -0
- package/build/helpers/index.js +1 -0
- package/build/helpers/writer/calculate-page-count.util.js +37 -0
- package/build/helpers/writer/calculate-writer-ai-action-price.util.js +16 -0
- package/build/helpers/writer/calculate-writer-content-generation-price.util.js +6 -0
- package/build/helpers/writer/index.js +19 -0
- package/build/models/tools/index.js +1 -0
- package/build/models/tools/writer/index.js +21 -0
- package/build/models/tools/writer/writer-ai-action.schema.js +26 -0
- package/build/models/tools/writer/writer-config.schema.js +11 -0
- package/build/models/tools/writer/writer-document-outline.schema.js +21 -0
- package/build/models/tools/writer/writer-document-type.schema.js +16 -0
- package/build/models/tools/writer/writer-document.schema.js +22 -0
- package/commands/chat/check-limit.command.ts +4 -0
- package/commands/tools/index.ts +1 -0
- package/commands/tools/writer/create-writer-document.command.ts +16 -0
- package/commands/tools/writer/delete-all-writer-documents.command.ts +6 -0
- package/commands/tools/writer/delete-writer-document-by-uuid.command.ts +11 -0
- package/commands/tools/writer/export-writer-document-as-docx.command.ts +15 -0
- package/commands/tools/writer/find-writer-document-by-uuid.command.ts +14 -0
- package/commands/tools/writer/find-writer-documents.command.ts +18 -0
- package/commands/tools/writer/generate-writer-document-contents.command.ts +14 -0
- package/commands/tools/writer/get-writer-tool-config.command.ts +10 -0
- package/commands/tools/writer/index.ts +15 -0
- package/commands/tools/writer/update-writer-document-contents.command.ts +20 -0
- package/commands/tools/writer/update-writer-document-outline.command.ts +19 -0
- package/commands/tools/writer/writer-extend-text.command.ts +20 -0
- package/commands/tools/writer/writer-fix-errors.command.ts +20 -0
- package/commands/tools/writer/writer-generate-text.command.ts +23 -0
- package/commands/tools/writer/writer-paraphrase.command.ts +20 -0
- package/commands/tools/writer/writer-shorten-text.command.ts +20 -0
- package/constants/errors/errors.ts +115 -30
- package/constants/index.ts +1 -0
- package/constants/writer/enums/index.ts +4 -0
- package/constants/writer/enums/writer-ai-action-pricing-type.enum.ts +4 -0
- package/constants/writer/enums/writer-ai-action-type.enum.ts +7 -0
- package/constants/writer/enums/writer-document-section-type.enum.ts +5 -0
- package/constants/writer/enums/writer-document-stage.enum.ts +13 -0
- package/constants/writer/index.ts +1 -0
- package/helpers/index.ts +1 -0
- package/helpers/writer/calculate-page-count.util.ts +46 -0
- package/helpers/writer/calculate-writer-ai-action-price.util.ts +20 -0
- package/helpers/writer/calculate-writer-content-generation-price.util.ts +3 -0
- package/helpers/writer/index.ts +3 -0
- package/models/tools/index.ts +1 -0
- package/models/tools/writer/index.ts +5 -0
- package/models/tools/writer/writer-ai-action.schema.ts +27 -0
- package/models/tools/writer/writer-config.schema.ts +10 -0
- package/models/tools/writer/writer-document-outline.schema.ts +28 -0
- package/models/tools/writer/writer-document-type.schema.ts +15 -0
- package/models/tools/writer/writer-document.schema.ts +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const WRITER_CONTROLLER_PRIVATE = 'private/tools/writer' as const;
|
|
2
|
+
export const WRITER_CONTROLLER_PUBLIC = 'public/tools/writer' as const;
|
|
3
|
+
|
|
4
|
+
export const WRITER_ROUTES = {
|
|
5
|
+
CONFIG: 'config',
|
|
6
|
+
CREATE: 'documents',
|
|
7
|
+
GET_DOCUMENTS: 'documents',
|
|
8
|
+
GET_DOCUMENT: (uuid: string) => `documents/${uuid}`,
|
|
9
|
+
GENERATE_CONTENTS: (uuid: string) => `documents/${uuid}/generate`,
|
|
10
|
+
UPDATE_OUTLINE: (uuid: string) => `documents/${uuid}/outline`,
|
|
11
|
+
DELETE_DOCUMENT: (uuid: string) => `documents/${uuid}`,
|
|
12
|
+
UPDATE_CONTENTS: (uuid: string) => `documents/${uuid}/contents`,
|
|
13
|
+
DELETE_ALL_DOCUMENTS: 'documents',
|
|
14
|
+
PARAPHRASE: (uuid: string) => `documents/${uuid}/actions/paraphrase`,
|
|
15
|
+
EXTEND_TEXT: (uuid: string) => `documents/${uuid}/actions/extend-text`,
|
|
16
|
+
SHORTEN_TEXT: (uuid: string) => `documents/${uuid}/actions/shorten-text`,
|
|
17
|
+
FIX_ERRORS: (uuid: string) => `documents/${uuid}/actions/fix-errors`,
|
|
18
|
+
GENERATE_TEXT: (uuid: string) => `documents/${uuid}/actions/generate-text`,
|
|
19
|
+
EXPORT_AS_DOCX: (uuid: string) => `documents/${uuid}/export/docx`,
|
|
20
|
+
} as const;
|
|
@@ -61,5 +61,6 @@ __exportStar(require("./folder"), exports);
|
|
|
61
61
|
__exportStar(require("./user-to-product"), exports);
|
|
62
62
|
__exportStar(require("./user-to-subscription"), exports);
|
|
63
63
|
__exportStar(require("./video"), exports);
|
|
64
|
+
__exportStar(require("./writer"), exports);
|
|
64
65
|
__exportStar(require("./image-editor"), exports);
|
|
65
66
|
__exportStar(require("./daily-streak"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WRITER_ROUTES = exports.WRITER_CONTROLLER_PUBLIC = exports.WRITER_CONTROLLER_PRIVATE = void 0;
|
|
4
|
+
exports.WRITER_CONTROLLER_PRIVATE = 'private/tools/writer';
|
|
5
|
+
exports.WRITER_CONTROLLER_PUBLIC = 'public/tools/writer';
|
|
6
|
+
exports.WRITER_ROUTES = {
|
|
7
|
+
CONFIG: 'config',
|
|
8
|
+
CREATE: 'documents',
|
|
9
|
+
GET_DOCUMENTS: 'documents',
|
|
10
|
+
GET_DOCUMENT: (uuid) => `documents/${uuid}`,
|
|
11
|
+
GENERATE_CONTENTS: (uuid) => `documents/${uuid}/generate`,
|
|
12
|
+
UPDATE_OUTLINE: (uuid) => `documents/${uuid}/outline`,
|
|
13
|
+
DELETE_DOCUMENT: (uuid) => `documents/${uuid}`,
|
|
14
|
+
UPDATE_CONTENTS: (uuid) => `documents/${uuid}/contents`,
|
|
15
|
+
DELETE_ALL_DOCUMENTS: 'documents',
|
|
16
|
+
PARAPHRASE: (uuid) => `documents/${uuid}/actions/paraphrase`,
|
|
17
|
+
EXTEND_TEXT: (uuid) => `documents/${uuid}/actions/extend-text`,
|
|
18
|
+
SHORTEN_TEXT: (uuid) => `documents/${uuid}/actions/shorten-text`,
|
|
19
|
+
FIX_ERRORS: (uuid) => `documents/${uuid}/actions/fix-errors`,
|
|
20
|
+
GENERATE_TEXT: (uuid) => `documents/${uuid}/actions/generate-text`,
|
|
21
|
+
EXPORT_AS_DOCX: (uuid) => `documents/${uuid}/export/docx`,
|
|
22
|
+
};
|
|
@@ -7,6 +7,10 @@ var CheckLimitCommand;
|
|
|
7
7
|
CheckLimitCommand.ResponseSchema = zod_1.z.object({
|
|
8
8
|
data: zod_1.z.object({
|
|
9
9
|
totalTokenBalance: zod_1.z.number(),
|
|
10
|
+
tokenBonusBalance: zod_1.z.number(),
|
|
11
|
+
subscriptionBalance: zod_1.z.number(),
|
|
12
|
+
productBalance: zod_1.z.number(),
|
|
13
|
+
referralBonusBalance: zod_1.z.number(),
|
|
10
14
|
}),
|
|
11
15
|
});
|
|
12
16
|
})(CheckLimitCommand || (exports.CheckLimitCommand = CheckLimitCommand = {}));
|
|
@@ -20,4 +20,5 @@ __exportStar(require("./stt"), exports);
|
|
|
20
20
|
__exportStar(require("./tool"), exports);
|
|
21
21
|
__exportStar(require("./tts"), exports);
|
|
22
22
|
__exportStar(require("./video"), exports);
|
|
23
|
+
__exportStar(require("./writer"), exports);
|
|
23
24
|
__exportStar(require("./image-editor"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateWriterDocumentCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var CreateWriterDocumentCommand;
|
|
7
|
+
(function (CreateWriterDocumentCommand) {
|
|
8
|
+
CreateWriterDocumentCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
prompt: zod_1.z.string(),
|
|
10
|
+
numPages: zod_1.z.number(),
|
|
11
|
+
documentTypeId: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
CreateWriterDocumentCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: models_1.WriterDocumentSchema,
|
|
15
|
+
});
|
|
16
|
+
})(CreateWriterDocumentCommand || (exports.CreateWriterDocumentCommand = CreateWriterDocumentCommand = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllWriterDocumentsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteAllWriterDocumentsCommand;
|
|
6
|
+
(function (DeleteAllWriterDocumentsCommand) {
|
|
7
|
+
DeleteAllWriterDocumentsCommand.ResponseSchema = zod_1.z.void();
|
|
8
|
+
})(DeleteAllWriterDocumentsCommand || (exports.DeleteAllWriterDocumentsCommand = DeleteAllWriterDocumentsCommand = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteWriterDocumentByUUIDCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteWriterDocumentByUUIDCommand;
|
|
6
|
+
(function (DeleteWriterDocumentByUUIDCommand) {
|
|
7
|
+
DeleteWriterDocumentByUUIDCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
DeleteWriterDocumentByUUIDCommand.ResponseSchema = zod_1.z.void();
|
|
11
|
+
})(DeleteWriterDocumentByUUIDCommand || (exports.DeleteWriterDocumentByUUIDCommand = DeleteWriterDocumentByUUIDCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportWriterDocumentAsDocxCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var ExportWriterDocumentAsDocxCommand;
|
|
6
|
+
(function (ExportWriterDocumentAsDocxCommand) {
|
|
7
|
+
ExportWriterDocumentAsDocxCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
ExportWriterDocumentAsDocxCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
url: zod_1.z.string(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
})(ExportWriterDocumentAsDocxCommand || (exports.ExportWriterDocumentAsDocxCommand = ExportWriterDocumentAsDocxCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindWriterDocumentByUUIDCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var FindWriterDocumentByUUIDCommand;
|
|
7
|
+
(function (FindWriterDocumentByUUIDCommand) {
|
|
8
|
+
FindWriterDocumentByUUIDCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
FindWriterDocumentByUUIDCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.WriterDocumentSchema,
|
|
13
|
+
});
|
|
14
|
+
})(FindWriterDocumentByUUIDCommand || (exports.FindWriterDocumentByUUIDCommand = FindWriterDocumentByUUIDCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindWriterDocumentsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var FindWriterDocumentsCommand;
|
|
7
|
+
(function (FindWriterDocumentsCommand) {
|
|
8
|
+
FindWriterDocumentsCommand.RequestQuerySchema = zod_1.z.object({
|
|
9
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
10
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
11
|
+
title: zod_1.z.string().optional(),
|
|
12
|
+
});
|
|
13
|
+
FindWriterDocumentsCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.array(models_1.WriterDocumentSchema),
|
|
15
|
+
totalPages: zod_1.z.number(),
|
|
16
|
+
page: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
})(FindWriterDocumentsCommand || (exports.FindWriterDocumentsCommand = FindWriterDocumentsCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateWriterDocumentContentsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var GenerateWriterDocumentContentsCommand;
|
|
7
|
+
(function (GenerateWriterDocumentContentsCommand) {
|
|
8
|
+
GenerateWriterDocumentContentsCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GenerateWriterDocumentContentsCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.WriterDocumentSchema,
|
|
13
|
+
});
|
|
14
|
+
})(GenerateWriterDocumentContentsCommand || (exports.GenerateWriterDocumentContentsCommand = GenerateWriterDocumentContentsCommand = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetWriterToolConfigCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var GetWriterToolConfigCommand;
|
|
7
|
+
(function (GetWriterToolConfigCommand) {
|
|
8
|
+
GetWriterToolConfigCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: models_1.WriterConfigSchema,
|
|
10
|
+
});
|
|
11
|
+
})(GetWriterToolConfigCommand || (exports.GetWriterToolConfigCommand = GetWriterToolConfigCommand = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-writer-tool-config.command"), exports);
|
|
18
|
+
__exportStar(require("./create-writer-document.command"), exports);
|
|
19
|
+
__exportStar(require("./find-writer-document-by-uuid.command"), exports);
|
|
20
|
+
__exportStar(require("./find-writer-documents.command"), exports);
|
|
21
|
+
__exportStar(require("./generate-writer-document-contents.command"), exports);
|
|
22
|
+
__exportStar(require("./update-writer-document-outline.command"), exports);
|
|
23
|
+
__exportStar(require("./update-writer-document-contents.command"), exports);
|
|
24
|
+
__exportStar(require("./delete-writer-document-by-uuid.command"), exports);
|
|
25
|
+
__exportStar(require("./delete-all-writer-documents.command"), exports);
|
|
26
|
+
__exportStar(require("./writer-paraphrase.command"), exports);
|
|
27
|
+
__exportStar(require("./writer-extend-text.command"), exports);
|
|
28
|
+
__exportStar(require("./writer-shorten-text.command"), exports);
|
|
29
|
+
__exportStar(require("./writer-fix-errors.command"), exports);
|
|
30
|
+
__exportStar(require("./writer-generate-text.command"), exports);
|
|
31
|
+
__exportStar(require("./export-writer-document-as-docx.command"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateWriterDocumentContentsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var UpdateWriterDocumentContentsCommand;
|
|
6
|
+
(function (UpdateWriterDocumentContentsCommand) {
|
|
7
|
+
UpdateWriterDocumentContentsCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
UpdateWriterDocumentContentsCommand.RequestBodySchema = zod_1.z.object({
|
|
11
|
+
contents: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
UpdateWriterDocumentContentsCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.object({
|
|
15
|
+
success: zod_1.z.boolean(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(UpdateWriterDocumentContentsCommand || (exports.UpdateWriterDocumentContentsCommand = UpdateWriterDocumentContentsCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateWriterDocumentOutlineCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var UpdateWriterDocumentOutlineCommand;
|
|
7
|
+
(function (UpdateWriterDocumentOutlineCommand) {
|
|
8
|
+
UpdateWriterDocumentOutlineCommand.RequestBodySchema = zod_1.z.object({
|
|
9
|
+
data: models_1.WriterDocumentOutlineSchema,
|
|
10
|
+
});
|
|
11
|
+
UpdateWriterDocumentOutlineCommand.RequestParamsSchema = zod_1.z.object({
|
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
UpdateWriterDocumentOutlineCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: zod_1.z.array(models_1.WriterDocumentOutlineSectionSchema),
|
|
16
|
+
});
|
|
17
|
+
})(UpdateWriterDocumentOutlineCommand || (exports.UpdateWriterDocumentOutlineCommand = UpdateWriterDocumentOutlineCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterExtendTextCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var WriterExtendTextCommand;
|
|
6
|
+
(function (WriterExtendTextCommand) {
|
|
7
|
+
WriterExtendTextCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
WriterExtendTextCommand.RequestBodySchema = zod_1.z.object({
|
|
11
|
+
selectionText: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
WriterExtendTextCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.object({
|
|
15
|
+
output: zod_1.z.string(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(WriterExtendTextCommand || (exports.WriterExtendTextCommand = WriterExtendTextCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterFixErrorsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var WriterFixErrorsCommand;
|
|
6
|
+
(function (WriterFixErrorsCommand) {
|
|
7
|
+
WriterFixErrorsCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
WriterFixErrorsCommand.RequestBodySchema = zod_1.z.object({
|
|
11
|
+
selectionText: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
WriterFixErrorsCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.object({
|
|
15
|
+
output: zod_1.z.string(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(WriterFixErrorsCommand || (exports.WriterFixErrorsCommand = WriterFixErrorsCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterGenerateTextCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var WriterGenerateTextCommand;
|
|
6
|
+
(function (WriterGenerateTextCommand) {
|
|
7
|
+
WriterGenerateTextCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
WriterGenerateTextCommand.RequestBodySchema = zod_1.z.object({
|
|
11
|
+
prompt: zod_1.z.string(),
|
|
12
|
+
selectionText: zod_1.z.string(),
|
|
13
|
+
contextBefore: zod_1.z.string().max(2000).optional(),
|
|
14
|
+
contextAfter: zod_1.z.string().max(2000).optional(),
|
|
15
|
+
});
|
|
16
|
+
WriterGenerateTextCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
data: zod_1.z.object({
|
|
18
|
+
output: zod_1.z.string(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(WriterGenerateTextCommand || (exports.WriterGenerateTextCommand = WriterGenerateTextCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterParaphraseCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var WriterParaphraseCommand;
|
|
6
|
+
(function (WriterParaphraseCommand) {
|
|
7
|
+
WriterParaphraseCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
WriterParaphraseCommand.RequestBodySchema = zod_1.z.object({
|
|
11
|
+
selectionText: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
WriterParaphraseCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.object({
|
|
15
|
+
output: zod_1.z.string(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(WriterParaphraseCommand || (exports.WriterParaphraseCommand = WriterParaphraseCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterShortenTextCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var WriterShortenTextCommand;
|
|
6
|
+
(function (WriterShortenTextCommand) {
|
|
7
|
+
WriterShortenTextCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
WriterShortenTextCommand.RequestBodySchema = zod_1.z.object({
|
|
11
|
+
selectionText: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
WriterShortenTextCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.object({
|
|
15
|
+
output: zod_1.z.string(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(WriterShortenTextCommand || (exports.WriterShortenTextCommand = WriterShortenTextCommand = {}));
|
|
@@ -1741,78 +1741,118 @@ exports.ERRORS = {
|
|
|
1741
1741
|
message: 'Ошибка при обновлении ежедневного стрика',
|
|
1742
1742
|
httpCode: 500,
|
|
1743
1743
|
},
|
|
1744
|
-
|
|
1744
|
+
WRITER_CONFIG_ERROR: {
|
|
1745
1745
|
code: 'A362',
|
|
1746
|
+
message: 'Произошла ошибка при получении конфигурации Writer',
|
|
1747
|
+
httpCode: 500,
|
|
1748
|
+
},
|
|
1749
|
+
WRITER_CREATE_DOCUMENT_ERROR: {
|
|
1750
|
+
code: 'A363',
|
|
1751
|
+
message: 'Произошла ошибка при создании документа',
|
|
1752
|
+
httpCode: 500,
|
|
1753
|
+
},
|
|
1754
|
+
WRITER_DOCUMENT_FIND_ERROR: {
|
|
1755
|
+
code: 'A364',
|
|
1756
|
+
message: 'Произошла ошибка при поиске документа',
|
|
1757
|
+
httpCode: 500,
|
|
1758
|
+
},
|
|
1759
|
+
WRITER_DOCUMENTS_FIND_ERROR: {
|
|
1760
|
+
code: 'A365',
|
|
1761
|
+
message: 'Произошла ошибка при поиске документов',
|
|
1762
|
+
httpCode: 500,
|
|
1763
|
+
},
|
|
1764
|
+
WRITER_DELETE_DOCUMENT_ERROR: {
|
|
1765
|
+
code: 'A366',
|
|
1766
|
+
message: 'Произошла ошибка при удалении документа',
|
|
1767
|
+
httpCode: 500,
|
|
1768
|
+
},
|
|
1769
|
+
WRITER_DELETE_ALL_DOCUMENTS_ERROR: {
|
|
1770
|
+
code: 'A367',
|
|
1771
|
+
message: 'Произошла ошибка при удалении всех документов пользователя',
|
|
1772
|
+
httpCode: 500,
|
|
1773
|
+
},
|
|
1774
|
+
WRITER_UPDATE_DOCUMENT_OUTLINE_ERROR: {
|
|
1775
|
+
code: 'A368',
|
|
1776
|
+
message: 'Произошла ошибка при обновлении структуры документа',
|
|
1777
|
+
httpCode: 500,
|
|
1778
|
+
},
|
|
1779
|
+
WRITER_GENERATE_DOCUMENT_CONTENTS_ERROR: {
|
|
1780
|
+
code: 'A369',
|
|
1781
|
+
message: 'Произошла ошибка при генерации содержимого документа',
|
|
1782
|
+
httpCode: 500,
|
|
1783
|
+
},
|
|
1784
|
+
ACCOUNT_DELETE_ERROR: {
|
|
1785
|
+
code: 'A370',
|
|
1746
1786
|
message: 'Аккаунт не был удалён',
|
|
1747
1787
|
httpCode: 500,
|
|
1748
1788
|
},
|
|
1749
1789
|
ACCOUNT_DELETED: {
|
|
1750
|
-
code: '
|
|
1790
|
+
code: 'A371',
|
|
1751
1791
|
message: 'Операция невозможна, аккаунт был удалён',
|
|
1752
1792
|
httpCode: 400,
|
|
1753
1793
|
},
|
|
1754
1794
|
TELEGRAM_PROFILE_DELETE_ERROR: {
|
|
1755
|
-
code: '
|
|
1795
|
+
code: 'A372',
|
|
1756
1796
|
message: 'Произошла ошибка при удалении Telegram профиля',
|
|
1757
1797
|
httpCode: 500,
|
|
1758
1798
|
},
|
|
1759
1799
|
TOOL_NOT_FOUND_ERROR: {
|
|
1760
|
-
code: '
|
|
1800
|
+
code: 'A373',
|
|
1761
1801
|
message: 'Инструмент не найден',
|
|
1762
1802
|
httpCode: 404,
|
|
1763
1803
|
},
|
|
1764
1804
|
ORDER_CHECK_FIRST_PURCHASE_ERROR: {
|
|
1765
|
-
code: '
|
|
1805
|
+
code: 'A374',
|
|
1766
1806
|
message: 'Произошла ошибка при проверке первой покупки',
|
|
1767
1807
|
httpCode: 500,
|
|
1768
1808
|
},
|
|
1769
1809
|
ORDER_CURRENT_ORDER_NOT_FOUND_ERROR: {
|
|
1770
|
-
code: '
|
|
1810
|
+
code: 'A375',
|
|
1771
1811
|
message: 'Текущий заказ не найден',
|
|
1772
1812
|
httpCode: 404,
|
|
1773
1813
|
},
|
|
1774
1814
|
ORDER_GET_USER_ORDERS_ERROR: {
|
|
1775
|
-
code: '
|
|
1815
|
+
code: 'A376',
|
|
1776
1816
|
message: 'Произошла ошибка при получении заказов пользователя',
|
|
1777
1817
|
httpCode: 500,
|
|
1778
1818
|
},
|
|
1779
1819
|
ORDER_NO_SUBSCRIPTION_ID_OR_PRODUCT_ID_PROVIDED_ERROR: {
|
|
1780
|
-
code: '
|
|
1820
|
+
code: 'A377',
|
|
1781
1821
|
message: 'Не указан subscriptionId или productId',
|
|
1782
1822
|
httpCode: 400,
|
|
1783
1823
|
},
|
|
1784
1824
|
FILE_TO_MD_FORMAT_ERROR: {
|
|
1785
|
-
code: '
|
|
1825
|
+
code: 'A378',
|
|
1786
1826
|
message: 'Неверный формат файла, варианты: .xlsx, .docx, .pdf',
|
|
1787
1827
|
httpCode: 400,
|
|
1788
1828
|
},
|
|
1789
1829
|
FILE_TO_MD_ERROR: {
|
|
1790
|
-
code: '
|
|
1830
|
+
code: 'A379',
|
|
1791
1831
|
message: 'Произошла ошибка при конвертации файла в markdown',
|
|
1792
1832
|
httpCode: 500,
|
|
1793
1833
|
},
|
|
1794
1834
|
FILE_TO_MD_CONVERT_ERROR: {
|
|
1795
|
-
code: '
|
|
1835
|
+
code: 'A380',
|
|
1796
1836
|
message: 'Не получилось конвертировать файл в markdown, возможно файл пуст, поврежден или невалиден',
|
|
1797
1837
|
httpCode: 400,
|
|
1798
1838
|
},
|
|
1799
1839
|
IMAGE_EDITOR_MODEL_INACTIVE: {
|
|
1800
|
-
code: '
|
|
1840
|
+
code: 'A381',
|
|
1801
1841
|
message: 'Модель редактирования картинок архивирована и недоступна для пользования',
|
|
1802
1842
|
httpCode: 403,
|
|
1803
1843
|
},
|
|
1804
1844
|
TTS_MODEL_INACTIVE: {
|
|
1805
|
-
code: '
|
|
1845
|
+
code: 'A382',
|
|
1806
1846
|
message: 'Модель генерации текста в голос архивирована и недоступна для пользования',
|
|
1807
1847
|
httpCode: 403,
|
|
1808
1848
|
},
|
|
1809
1849
|
STT_MODEL_INACTIVE: {
|
|
1810
|
-
code: '
|
|
1850
|
+
code: 'A383',
|
|
1811
1851
|
message: 'Модель генерации голоса в текст архивирована и недоступна для пользования',
|
|
1812
1852
|
httpCode: 403,
|
|
1813
1853
|
},
|
|
1814
1854
|
VIDEO_MODEL_INACTIVE: {
|
|
1815
|
-
code: '
|
|
1855
|
+
code: 'A384',
|
|
1816
1856
|
message: 'Модель генерации видео архивирована и недоступна для пользования',
|
|
1817
1857
|
httpCode: 403,
|
|
1818
1858
|
},
|
|
@@ -1822,17 +1862,17 @@ exports.ERRORS = {
|
|
|
1822
1862
|
httpCode: 500,
|
|
1823
1863
|
},
|
|
1824
1864
|
VK_GET_ACCESS_TOKEN_ERROR: {
|
|
1825
|
-
code: '
|
|
1865
|
+
code: 'A385',
|
|
1826
1866
|
message: 'Ошибка при получении кода доступа от ВК',
|
|
1827
1867
|
httpCode: 500,
|
|
1828
1868
|
},
|
|
1829
1869
|
VK_GET_USER_INFO_ERROR: {
|
|
1830
|
-
code: '
|
|
1870
|
+
code: 'A386',
|
|
1831
1871
|
message: 'Ошибка при получении данных об юзере из ВК',
|
|
1832
1872
|
httpCode: 500,
|
|
1833
1873
|
},
|
|
1834
1874
|
USER_NOT_VK_ID: {
|
|
1835
|
-
code: '
|
|
1875
|
+
code: 'A387',
|
|
1836
1876
|
message: 'Произошла ошибка при поиске пользователя по vkId',
|
|
1837
1877
|
httpCode: 500,
|
|
1838
1878
|
},
|
|
@@ -1842,12 +1882,12 @@ exports.ERRORS = {
|
|
|
1842
1882
|
httpCode: 409,
|
|
1843
1883
|
},
|
|
1844
1884
|
YANDEX_GET_USER_INFO_ERROR: {
|
|
1845
|
-
code: '
|
|
1885
|
+
code: 'A388',
|
|
1846
1886
|
message: 'Ошибка при получении данных об юзере из Яндекса',
|
|
1847
1887
|
httpCode: 500,
|
|
1848
1888
|
},
|
|
1849
1889
|
USER_NOT_YANDEX_ID: {
|
|
1850
|
-
code: '
|
|
1890
|
+
code: 'A389',
|
|
1851
1891
|
message: 'Произошла ошибка при поиске пользователя по yandexId',
|
|
1852
1892
|
httpCode: 500,
|
|
1853
1893
|
},
|
|
@@ -1857,52 +1897,97 @@ exports.ERRORS = {
|
|
|
1857
1897
|
httpCode: 409,
|
|
1858
1898
|
},
|
|
1859
1899
|
PDF_TO_MD_CONVERT_ERROR: {
|
|
1860
|
-
code: '
|
|
1900
|
+
code: 'A390',
|
|
1861
1901
|
message: 'Не получилось конвертировать pdf в markdown, возможно вы прикрепили скан или картинку, не имеющую текста',
|
|
1862
1902
|
httpCode: 400,
|
|
1863
1903
|
},
|
|
1864
1904
|
SUBSCRIPTION_DOWNGRADE_INVALID: {
|
|
1865
|
-
code: '
|
|
1905
|
+
code: 'A391',
|
|
1866
1906
|
message: 'Невозможно понизить подписку до указанного уровня',
|
|
1867
1907
|
httpCode: 400,
|
|
1868
1908
|
},
|
|
1869
1909
|
SUBSCRIPTION_DOWNGRADE_ERROR: {
|
|
1870
|
-
code: '
|
|
1910
|
+
code: 'A392',
|
|
1871
1911
|
message: 'Не удалось понизить подписку',
|
|
1872
1912
|
httpCode: 500,
|
|
1873
1913
|
},
|
|
1874
1914
|
SUBSCRIPTIONS_GET_DOWNGRADE_ERROR: {
|
|
1875
|
-
code: '
|
|
1915
|
+
code: 'A393',
|
|
1876
1916
|
message: 'Не удалось получить список возможных понижений для подписок',
|
|
1877
1917
|
httpCode: 500,
|
|
1878
1918
|
},
|
|
1919
|
+
WRITER_PARAPHRASE_ERROR: {
|
|
1920
|
+
code: 'A394',
|
|
1921
|
+
message: 'Произошла ошибка при перефразировании текста',
|
|
1922
|
+
httpCode: 500,
|
|
1923
|
+
},
|
|
1924
|
+
WRITER_EXTEND_TEXT_ERROR: {
|
|
1925
|
+
code: 'A395',
|
|
1926
|
+
message: 'Произошла ошибка при расширении текста',
|
|
1927
|
+
httpCode: 500,
|
|
1928
|
+
},
|
|
1929
|
+
WRITER_SHORTEN_TEXT_ERROR: {
|
|
1930
|
+
code: 'A396',
|
|
1931
|
+
message: 'Произошла ошибка при сокращении текста',
|
|
1932
|
+
httpCode: 500,
|
|
1933
|
+
},
|
|
1934
|
+
WRITER_FIX_ERRORS_ERROR: {
|
|
1935
|
+
code: 'A397',
|
|
1936
|
+
message: 'Произошла ошибка при исправлении ошибок в тексте',
|
|
1937
|
+
httpCode: 500,
|
|
1938
|
+
},
|
|
1939
|
+
WRITER_UPDATE_DOCUMENT_CONTENTS_ERROR: {
|
|
1940
|
+
code: 'A398',
|
|
1941
|
+
message: 'Произошла ошибка при обновлении содержимого документа',
|
|
1942
|
+
httpCode: 500,
|
|
1943
|
+
},
|
|
1944
|
+
WRITER_GENERATE_TEXT_ERROR: {
|
|
1945
|
+
code: 'A399',
|
|
1946
|
+
message: 'Произошла ошибка при генерации текста',
|
|
1947
|
+
httpCode: 500,
|
|
1948
|
+
},
|
|
1949
|
+
WRITER_EXPORT_DOCX_ERROR: {
|
|
1950
|
+
code: 'A400',
|
|
1951
|
+
message: 'Произошла ошибка при экспорте документа в DOCX',
|
|
1952
|
+
httpCode: 500,
|
|
1953
|
+
},
|
|
1954
|
+
AI_MODEL_SUGGESTIONS_INVALID_PROMPT_LENGTH: {
|
|
1955
|
+
code: 'A401',
|
|
1956
|
+
message: 'Промпт не подходит для генерации предложений',
|
|
1957
|
+
httpCode: 400,
|
|
1958
|
+
},
|
|
1959
|
+
AI_MODEL_SUGGESTIONS_GENERATION_ERROR: {
|
|
1960
|
+
code: 'A402',
|
|
1961
|
+
message: 'Ошибка генерации предложения',
|
|
1962
|
+
httpCode: 500,
|
|
1963
|
+
},
|
|
1879
1964
|
VK_STATE_ERROR: {
|
|
1880
|
-
code: '
|
|
1965
|
+
code: 'A403',
|
|
1881
1966
|
message: 'Получен неверный state в ответе от API ВК',
|
|
1882
1967
|
httpCode: 400,
|
|
1883
1968
|
},
|
|
1884
1969
|
YANDEX_GET_ACCESS_TOKEN_ERROR: {
|
|
1885
|
-
code: '
|
|
1970
|
+
code: 'A404',
|
|
1886
1971
|
message: 'Ошибка при получении кода доступа от Яндекса',
|
|
1887
1972
|
httpCode: 500,
|
|
1888
1973
|
},
|
|
1889
1974
|
KIE_MIDJOURNEY_TASK_ERROR: {
|
|
1890
|
-
code: '
|
|
1975
|
+
code: 'A405',
|
|
1891
1976
|
message: 'Произошла ошибка при получении задачи Midjourney',
|
|
1892
1977
|
httpCode: 500,
|
|
1893
1978
|
},
|
|
1894
1979
|
KIE_MIDJOURNEY_GENERATION_ERROR: {
|
|
1895
|
-
code: '
|
|
1980
|
+
code: 'A406',
|
|
1896
1981
|
message: 'Произошла ошибка при генерации видео от Midjourney',
|
|
1897
1982
|
httpCode: 500,
|
|
1898
1983
|
},
|
|
1899
1984
|
KIE_MIDJOURNEY_NO_RESPONSE: {
|
|
1900
|
-
code: '
|
|
1985
|
+
code: 'A407',
|
|
1901
1986
|
message: 'Нет ответа от Midjourney, попробуйте позже',
|
|
1902
1987
|
httpCode: 503,
|
|
1903
1988
|
},
|
|
1904
1989
|
KIE_CONTENT_POLICY_VIOLATION: {
|
|
1905
|
-
code: '
|
|
1990
|
+
code: 'A408',
|
|
1906
1991
|
message: 'Запрос был отклонен, т.к. может не соответствовать политике безопасности сервиса',
|
|
1907
1992
|
httpCode: 400,
|
|
1908
1993
|
},
|