@purpleschool/gptbot 0.7.47 → 0.7.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/api/controllers/http/index.ts +1 -0
  2. package/api/controllers/http/writer.ts +20 -0
  3. package/build/api/controllers/http/index.js +1 -0
  4. package/build/api/controllers/http/writer.js +22 -0
  5. package/build/commands/chat/check-limit.command.js +4 -0
  6. package/build/commands/chat/create-chat.command.js +1 -3
  7. package/build/commands/chat/find-chat-by-uuid.command.js +1 -1
  8. package/build/commands/chat/find-chats.command.js +1 -3
  9. package/build/commands/chat/get-last-active-chat-command.js +1 -1
  10. package/build/commands/folder/find-folder-by-uuid-with-chats.command.js +1 -3
  11. package/build/commands/tools/index.js +1 -0
  12. package/build/commands/tools/writer/create-writer-document.command.js +16 -0
  13. package/build/commands/tools/writer/delete-all-writer-documents.command.js +8 -0
  14. package/build/commands/tools/writer/delete-writer-document-by-uuid.command.js +11 -0
  15. package/build/commands/tools/writer/export-writer-document-as-docx.command.js +15 -0
  16. package/build/commands/tools/writer/find-writer-document-by-uuid.command.js +14 -0
  17. package/build/commands/tools/writer/find-writer-documents.command.js +18 -0
  18. package/build/commands/tools/writer/generate-writer-document-contents.command.js +14 -0
  19. package/build/commands/tools/writer/get-writer-tool-config.command.js +11 -0
  20. package/build/commands/tools/writer/index.js +31 -0
  21. package/build/commands/tools/writer/update-writer-document-contents.command.js +18 -0
  22. package/build/commands/tools/writer/update-writer-document-outline.command.js +17 -0
  23. package/build/commands/tools/writer/writer-extend-text.command.js +18 -0
  24. package/build/commands/tools/writer/writer-fix-errors.command.js +18 -0
  25. package/build/commands/tools/writer/writer-generate-text.command.js +21 -0
  26. package/build/commands/tools/writer/writer-paraphrase.command.js +18 -0
  27. package/build/commands/tools/writer/writer-shorten-text.command.js +18 -0
  28. package/build/constants/errors/errors.js +115 -30
  29. package/build/constants/index.js +1 -0
  30. package/build/constants/writer/enums/index.js +20 -0
  31. package/build/constants/writer/enums/writer-ai-action-pricing-type.enum.js +8 -0
  32. package/build/constants/writer/enums/writer-ai-action-type.enum.js +11 -0
  33. package/build/constants/writer/enums/writer-document-section-type.enum.js +9 -0
  34. package/build/constants/writer/enums/writer-document-stage.enum.js +14 -0
  35. package/build/constants/writer/index.js +17 -0
  36. package/build/helpers/index.js +1 -0
  37. package/build/helpers/writer/calculate-page-count.util.js +37 -0
  38. package/build/helpers/writer/calculate-writer-ai-action-price.util.js +16 -0
  39. package/build/helpers/writer/calculate-writer-content-generation-price.util.js +6 -0
  40. package/build/helpers/writer/index.js +19 -0
  41. package/build/models/chat-with-messages.schema.js +9 -0
  42. package/build/models/chat.schema.js +0 -2
  43. package/build/models/index.js +1 -0
  44. package/build/models/tools/index.js +1 -0
  45. package/build/models/tools/writer/index.js +21 -0
  46. package/build/models/tools/writer/writer-ai-action.schema.js +26 -0
  47. package/build/models/tools/writer/writer-config.schema.js +11 -0
  48. package/build/models/tools/writer/writer-document-outline.schema.js +21 -0
  49. package/build/models/tools/writer/writer-document-type.schema.js +16 -0
  50. package/build/models/tools/writer/writer-document.schema.js +22 -0
  51. package/commands/chat/check-limit.command.ts +4 -0
  52. package/commands/chat/create-chat.command.ts +2 -4
  53. package/commands/chat/find-chat-by-uuid.command.ts +2 -2
  54. package/commands/chat/find-chats.command.ts +2 -6
  55. package/commands/chat/get-last-active-chat-command.ts +2 -2
  56. package/commands/folder/find-folder-by-uuid-with-chats.command.ts +2 -6
  57. package/commands/tools/index.ts +1 -0
  58. package/commands/tools/writer/create-writer-document.command.ts +16 -0
  59. package/commands/tools/writer/delete-all-writer-documents.command.ts +6 -0
  60. package/commands/tools/writer/delete-writer-document-by-uuid.command.ts +11 -0
  61. package/commands/tools/writer/export-writer-document-as-docx.command.ts +15 -0
  62. package/commands/tools/writer/find-writer-document-by-uuid.command.ts +14 -0
  63. package/commands/tools/writer/find-writer-documents.command.ts +18 -0
  64. package/commands/tools/writer/generate-writer-document-contents.command.ts +14 -0
  65. package/commands/tools/writer/get-writer-tool-config.command.ts +10 -0
  66. package/commands/tools/writer/index.ts +15 -0
  67. package/commands/tools/writer/update-writer-document-contents.command.ts +20 -0
  68. package/commands/tools/writer/update-writer-document-outline.command.ts +19 -0
  69. package/commands/tools/writer/writer-extend-text.command.ts +20 -0
  70. package/commands/tools/writer/writer-fix-errors.command.ts +20 -0
  71. package/commands/tools/writer/writer-generate-text.command.ts +23 -0
  72. package/commands/tools/writer/writer-paraphrase.command.ts +20 -0
  73. package/commands/tools/writer/writer-shorten-text.command.ts +20 -0
  74. package/constants/errors/errors.ts +115 -30
  75. package/constants/index.ts +1 -0
  76. package/constants/writer/enums/index.ts +4 -0
  77. package/constants/writer/enums/writer-ai-action-pricing-type.enum.ts +4 -0
  78. package/constants/writer/enums/writer-ai-action-type.enum.ts +7 -0
  79. package/constants/writer/enums/writer-document-section-type.enum.ts +5 -0
  80. package/constants/writer/enums/writer-document-stage.enum.ts +13 -0
  81. package/constants/writer/index.ts +1 -0
  82. package/helpers/index.ts +1 -0
  83. package/helpers/writer/calculate-page-count.util.ts +46 -0
  84. package/helpers/writer/calculate-writer-ai-action-price.util.ts +20 -0
  85. package/helpers/writer/calculate-writer-content-generation-price.util.ts +3 -0
  86. package/helpers/writer/index.ts +3 -0
  87. package/models/chat-with-messages.schema.ts +7 -0
  88. package/models/chat.schema.ts +0 -2
  89. package/models/index.ts +1 -0
  90. package/models/tools/index.ts +1 -0
  91. package/models/tools/writer/index.ts +5 -0
  92. package/models/tools/writer/writer-ai-action.schema.ts +27 -0
  93. package/models/tools/writer/writer-config.schema.ts +10 -0
  94. package/models/tools/writer/writer-document-outline.schema.ts +28 -0
  95. package/models/tools/writer/writer-document-type.schema.ts +15 -0
  96. package/models/tools/writer/writer-document.schema.ts +21 -0
  97. package/package.json +1 -1
@@ -45,5 +45,6 @@ export * from './folder';
45
45
  export * from './user-to-product';
46
46
  export * from './user-to-subscription';
47
47
  export * from './video';
48
+ export * from './writer';
48
49
  export * from './image-editor';
49
50
  export * from './daily-streak';
@@ -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 = {}));
@@ -12,8 +12,6 @@ var CreateChatCommand;
12
12
  folderId: zod_1.z.string().uuid().optional(),
13
13
  });
14
14
  CreateChatCommand.ResponseSchema = zod_1.z.object({
15
- data: models_1.ChatSchema.extend({
16
- messages: zod_1.z.array(models_1.MessageSchema),
17
- }),
15
+ data: models_1.ChatWithMessagesSchema,
18
16
  });
19
17
  })(CreateChatCommand || (exports.CreateChatCommand = CreateChatCommand = {}));
@@ -9,6 +9,6 @@ var FindChatByUUIDCommand;
9
9
  uuid: true,
10
10
  });
11
11
  FindChatByUUIDCommand.ResponseSchema = zod_1.z.object({
12
- data: models_1.ChatSchema,
12
+ data: models_1.ChatWithMessagesSchema,
13
13
  });
14
14
  })(FindChatByUUIDCommand || (exports.FindChatByUUIDCommand = FindChatByUUIDCommand = {}));
@@ -13,9 +13,7 @@ var FindChatsCommand;
13
13
  const QuerySchema = zod_1.z.intersection(models_1.ChatSchema.pick({ categoryId: true, aIModelId: true }).partial(), models_1.AiModelSchema.pick({ contentType: true }).partial());
14
14
  FindChatsCommand.RequestQuerySchema = zod_1.z.intersection(QuerySchema, PaginationQuerySchema);
15
15
  FindChatsCommand.ResponseSchema = zod_1.z.object({
16
- data: zod_1.z.array(models_1.ChatSchema.extend({
17
- messages: zod_1.z.array(models_1.MessageSchema),
18
- })),
16
+ data: zod_1.z.array(models_1.ChatSchema),
19
17
  page: zod_1.z.number(),
20
18
  totalPages: zod_1.z.number(),
21
19
  });
@@ -10,6 +10,6 @@ var GetLastActiveChatCommand;
10
10
  aIModelId: true,
11
11
  });
12
12
  GetLastActiveChatCommand.Response = zod_1.z.object({
13
- data: models_1.ChatSchema,
13
+ data: models_1.ChatWithMessagesSchema,
14
14
  });
15
15
  })(GetLastActiveChatCommand || (exports.GetLastActiveChatCommand = GetLastActiveChatCommand = {}));
@@ -17,9 +17,7 @@ var FindFolderByUuidWithChatsCommand;
17
17
  });
18
18
  FindFolderByUuidWithChatsCommand.ResponseSchema = zod_1.default.object({
19
19
  data: models_1.FolderSchema.extend({
20
- chats: zod_1.default.array(models_1.ChatSchema.extend({
21
- messages: zod_1.default.array(models_1.MessageSchema),
22
- })),
20
+ chats: zod_1.default.array(models_1.ChatSchema),
23
21
  }),
24
22
  page: zod_1.default.number(),
25
23
  totalPages: zod_1.default.number(),
@@ -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 = {}));