@purpleschool/gptbot 0.7.39 → 0.7.40-texteditor
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/subscription.ts +2 -0
- package/api/controllers/http/writer.ts +20 -0
- package/api/routes.ts +4 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/subscription.js +2 -0
- package/build/api/controllers/http/writer.js +22 -0
- package/build/api/routes.js +2 -0
- package/build/commands/subscription/downgrade-subscription.command.js +44 -0
- package/build/commands/subscription/index.js +1 -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 +117 -27
- package/build/constants/index.js +1 -0
- package/build/constants/order/enums/order-type.enum.js +1 -0
- package/build/constants/subscription/enums/subscription-action.enum.js +1 -0
- package/build/constants/subscription/enums/subscription-status.enum.js +3 -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/build/models/user-to-subscription.schema.js +1 -0
- package/commands/subscription/downgrade-subscription.command.ts +50 -0
- package/commands/subscription/index.ts +1 -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 +117 -27
- package/constants/index.ts +1 -0
- package/constants/order/enums/order-type.enum.ts +1 -0
- package/constants/subscription/enums/subscription-action.enum.ts +1 -0
- package/constants/subscription/enums/subscription-status.enum.ts +3 -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/models/user-to-subscription.schema.ts +1 -0
- package/package.json +1 -1
|
@@ -11,7 +11,9 @@ export const SUBSCRIPTION_ROUTES = {
|
|
|
11
11
|
CANCEL: 'cancel',
|
|
12
12
|
RECOVER: 'recover',
|
|
13
13
|
GET_AVAILABLE_UPGRADES: 'available-upgrades',
|
|
14
|
+
GET_AVAILABLE_DOWNGRADES: 'available-downgrades',
|
|
14
15
|
UPGRADE: 'upgrade',
|
|
16
|
+
DOWNGRADE: 'downgrade',
|
|
15
17
|
CREATE_CUSTOM: 'custom',
|
|
16
18
|
FREE: 'free',
|
|
17
19
|
SUMMARY: 'summary',
|
|
@@ -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;
|
package/api/routes.ts
CHANGED
|
@@ -143,8 +143,12 @@ export const REST_API = {
|
|
|
143
143
|
CREATE: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}`,
|
|
144
144
|
UPGRADE: (uuid: string) =>
|
|
145
145
|
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.UPGRADE}`,
|
|
146
|
+
DOWNGRADE: (uuid: string) =>
|
|
147
|
+
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.DOWNGRADE}`,
|
|
146
148
|
GET_AVAILABLE_UPGRADES: (uuid: string) =>
|
|
147
149
|
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_AVAILABLE_UPGRADES}`,
|
|
150
|
+
GET_AVAILABLE_DOWNGRADES: (uuid: string) =>
|
|
151
|
+
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_AVAILABLE_DOWNGRADES}`,
|
|
148
152
|
CREATE_CUSTOM: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.CREATE_CUSTOM}`,
|
|
149
153
|
SUMMARY: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
|
|
150
154
|
},
|
|
@@ -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);
|
|
@@ -12,7 +12,9 @@ exports.SUBSCRIPTION_ROUTES = {
|
|
|
12
12
|
CANCEL: 'cancel',
|
|
13
13
|
RECOVER: 'recover',
|
|
14
14
|
GET_AVAILABLE_UPGRADES: 'available-upgrades',
|
|
15
|
+
GET_AVAILABLE_DOWNGRADES: 'available-downgrades',
|
|
15
16
|
UPGRADE: 'upgrade',
|
|
17
|
+
DOWNGRADE: 'downgrade',
|
|
16
18
|
CREATE_CUSTOM: 'custom',
|
|
17
19
|
FREE: 'free',
|
|
18
20
|
SUMMARY: 'summary',
|
|
@@ -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
|
+
};
|
package/build/api/routes.js
CHANGED
|
@@ -153,7 +153,9 @@ exports.REST_API = {
|
|
|
153
153
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}`,
|
|
154
154
|
CREATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}`,
|
|
155
155
|
UPGRADE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.UPGRADE}`,
|
|
156
|
+
DOWNGRADE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.DOWNGRADE}`,
|
|
156
157
|
GET_AVAILABLE_UPGRADES: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_AVAILABLE_UPGRADES}`,
|
|
158
|
+
GET_AVAILABLE_DOWNGRADES: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_AVAILABLE_DOWNGRADES}`,
|
|
157
159
|
CREATE_CUSTOM: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.CREATE_CUSTOM}`,
|
|
158
160
|
SUMMARY: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
|
|
159
161
|
},
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DowngradeSubscriptionCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var DowngradeSubscriptionCommand;
|
|
7
|
+
(function (DowngradeSubscriptionCommand) {
|
|
8
|
+
DowngradeSubscriptionCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
downgradeSubscriptionId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
DowngradeSubscriptionCommand.RequestParamSchema = models_1.UserToSubscriptionSchema.pick({
|
|
12
|
+
uuid: true,
|
|
13
|
+
});
|
|
14
|
+
const IReceiptOrderSchema = zod_1.z.object({
|
|
15
|
+
items: zod_1.z.array(zod_1.z.object({
|
|
16
|
+
label: zod_1.z.string(),
|
|
17
|
+
price: zod_1.z.number(),
|
|
18
|
+
quantity: zod_1.z.number(),
|
|
19
|
+
amount: zod_1.z.number(),
|
|
20
|
+
vat: zod_1.z.number(),
|
|
21
|
+
})),
|
|
22
|
+
email: zod_1.z.string(),
|
|
23
|
+
isBso: zod_1.z.boolean(),
|
|
24
|
+
amounts: zod_1.z.object({
|
|
25
|
+
electronic: zod_1.z.number(),
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
DowngradeSubscriptionCommand.ResponseSchema = zod_1.z.object({
|
|
29
|
+
publicId: zod_1.z.string(),
|
|
30
|
+
amount: zod_1.z.number(),
|
|
31
|
+
currency: zod_1.z.string(),
|
|
32
|
+
accountId: zod_1.z.string(),
|
|
33
|
+
description: zod_1.z.string(),
|
|
34
|
+
invoiceId: zod_1.z.string(),
|
|
35
|
+
email: zod_1.z.string(),
|
|
36
|
+
skin: zod_1.z.string(),
|
|
37
|
+
autoClose: zod_1.z.number(),
|
|
38
|
+
data: zod_1.z.object({
|
|
39
|
+
CloudPayments: zod_1.z.object({
|
|
40
|
+
CustomerReceipt: IReceiptOrderSchema,
|
|
41
|
+
}),
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
})(DowngradeSubscriptionCommand || (exports.DowngradeSubscriptionCommand = DowngradeSubscriptionCommand = {}));
|
|
@@ -27,3 +27,4 @@ __exportStar(require("./recover-past-due-subscription.command"), exports);
|
|
|
27
27
|
__exportStar(require("./recover-subscription.command"), exports);
|
|
28
28
|
__exportStar(require("./update-subscription.command"), exports);
|
|
29
29
|
__exportStar(require("./upgrade-subscription.command"), exports);
|
|
30
|
+
__exportStar(require("./downgrade-subscription.command"), exports);
|
|
@@ -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 = {}));
|