@purpleschool/gptbot 0.12.5 → 0.12.7
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/auth.ts +1 -0
- package/api/controllers/http/index.ts +1 -0
- package/api/controllers/http/presentation.ts +2 -0
- package/api/controllers/http/tool-workspace.ts +9 -0
- package/api/routes.ts +5 -0
- package/build/api/controllers/http/auth.js +1 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/presentation.js +1 -0
- package/build/api/controllers/http/tool-workspace.js +11 -0
- package/build/api/routes.js +3 -0
- package/build/commands/auth/change-password.command.js +16 -0
- package/build/commands/auth/index.js +1 -0
- package/build/commands/tools/index.js +1 -0
- package/build/commands/tools/marketplace-card/execute-marketplace-card.command.js +6 -0
- package/build/commands/tools/presentation/index.js +1 -0
- package/build/commands/tools/presentation/reposition-slide.command.js +15 -0
- package/build/commands/tools/tool-workspace/delete-tool-workspace-by-uuid.command.js +11 -0
- package/build/commands/tools/tool-workspace/find-tool-workspace-by-uuid.command.js +14 -0
- package/build/commands/tools/tool-workspace/find-tool-workspaces.command.js +20 -0
- package/build/commands/tools/tool-workspace/index.js +20 -0
- package/build/commands/tools/tool-workspace/update-tool-workspace.command.js +20 -0
- package/build/commands/tools/video/video.command.js +7 -1
- package/build/constants/tool/enums/index.js +3 -0
- package/build/constants/tool/enums/tool-content-type.enum.js +5 -1
- package/build/constants/tool/enums/tool-type.enum.js +23 -0
- package/build/constants/tool/enums/tool-workspace-item-slot.enum.js +9 -0
- package/build/constants/tool/enums/tool-workspace-status.enum.js +8 -0
- package/build/models/tools/index.js +1 -0
- package/build/models/tools/tool-workspace/index.js +20 -0
- package/build/models/tools/tool-workspace/tool-workspace-contents.schema.js +10 -0
- package/build/models/tools/tool-workspace/tool-workspace-item.schema.js +16 -0
- package/build/models/tools/tool-workspace/tool-workspace-job.schema.js +17 -0
- package/build/models/tools/tool-workspace/tool-workspace.schema.js +16 -0
- package/commands/auth/change-password.command.ts +18 -0
- package/commands/auth/index.ts +1 -0
- package/commands/tools/index.ts +1 -0
- package/commands/tools/marketplace-card/execute-marketplace-card.command.ts +6 -0
- package/commands/tools/presentation/index.ts +1 -0
- package/commands/tools/presentation/reposition-slide.command.ts +17 -0
- package/commands/tools/tool-workspace/delete-tool-workspace-by-uuid.command.ts +11 -0
- package/commands/tools/tool-workspace/find-tool-workspace-by-uuid.command.ts +14 -0
- package/commands/tools/tool-workspace/find-tool-workspaces.command.ts +20 -0
- package/commands/tools/tool-workspace/index.ts +4 -0
- package/commands/tools/tool-workspace/update-tool-workspace.command.ts +22 -0
- package/commands/tools/video/video.command.ts +7 -1
- package/constants/tool/enums/index.ts +3 -0
- package/constants/tool/enums/tool-content-type.enum.ts +5 -1
- package/constants/tool/enums/tool-type.enum.ts +19 -0
- package/constants/tool/enums/tool-workspace-item-slot.enum.ts +5 -0
- package/constants/tool/enums/tool-workspace-status.enum.ts +4 -0
- package/models/tools/index.ts +1 -0
- package/models/tools/tool-workspace/index.ts +4 -0
- package/models/tools/tool-workspace/tool-workspace-contents.schema.ts +10 -0
- package/models/tools/tool-workspace/tool-workspace-item.schema.ts +16 -0
- package/models/tools/tool-workspace/tool-workspace-job.schema.ts +17 -0
- package/models/tools/tool-workspace/tool-workspace.schema.ts +16 -0
- package/package.json +1 -1
|
@@ -28,6 +28,8 @@ export const PRESENTATION_ROUTES = {
|
|
|
28
28
|
GENERATE_REPORT: (presentationId: string) => `${presentationId}/generate-report`,
|
|
29
29
|
REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
30
30
|
`${presentationId}/outline/${slideOutlineId}/move`,
|
|
31
|
+
REPOSITION_SLIDE: (presentationId: string, slideId: string) =>
|
|
32
|
+
`${presentationId}/slides/${slideId}/move`,
|
|
31
33
|
DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
32
34
|
`${presentationId}/outline/${slideOutlineId}`,
|
|
33
35
|
CREATE_SLIDE_OUTLINE: (presentationId: string) => `${presentationId}/outline`,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const TOOL_WORKSPACE_CONTROLLER_PRIVATE = 'private/tools/workspaces' as const;
|
|
2
|
+
export const TOOL_WORKSPACE_CONTROLLER_PUBLIC = 'public/tools/workspaces' as const;
|
|
3
|
+
|
|
4
|
+
export const TOOL_WORKSPACE_ROUTES = {
|
|
5
|
+
GET_WORKSPACES: '',
|
|
6
|
+
GET_WORKSPACE: (uuid: string) => uuid,
|
|
7
|
+
UPDATE: (uuid: string) => uuid,
|
|
8
|
+
DELETE: (uuid: string) => uuid,
|
|
9
|
+
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -14,6 +14,7 @@ export const REST_API = {
|
|
|
14
14
|
RESET_PASSWORD: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESET_PASSWORD}`,
|
|
15
15
|
VERIFY_EMAIL: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VERIFY_EMAIL}`,
|
|
16
16
|
VERIFY_EMAIL_RETRY: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VERIFY_EMAIL_RETRY}`,
|
|
17
|
+
CHANGE_PASSWORD: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.CHANGE_PASSWORD}`,
|
|
17
18
|
},
|
|
18
19
|
USERS: {
|
|
19
20
|
GET: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
|
|
@@ -714,6 +715,8 @@ export const REST_API = {
|
|
|
714
715
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
|
|
715
716
|
REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
716
717
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
718
|
+
REPOSITION_SLIDE: (presentationId: string, slideId: string) =>
|
|
719
|
+
`${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
|
|
717
720
|
DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
718
721
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
719
722
|
CREATE_SLIDE_OUTLINE: (presentationId: string) =>
|
|
@@ -762,6 +765,8 @@ export const REST_API = {
|
|
|
762
765
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
|
|
763
766
|
REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
764
767
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
768
|
+
REPOSITION_SLIDE: (presentationId: string, slideId: string) =>
|
|
769
|
+
`${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
|
|
765
770
|
DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
|
|
766
771
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
767
772
|
CREATE_SLIDE_OUTLINE: (presentationId: string) =>
|
|
@@ -77,3 +77,4 @@ __exportStar(require("./interior-design"), exports);
|
|
|
77
77
|
__exportStar(require("./solving-edu-task"), exports);
|
|
78
78
|
__exportStar(require("./team-account"), exports);
|
|
79
79
|
__exportStar(require("./spell-corrector"), exports);
|
|
80
|
+
__exportStar(require("./tool-workspace"), exports);
|
|
@@ -25,6 +25,7 @@ exports.PRESENTATION_ROUTES = {
|
|
|
25
25
|
PARAPHRASE: (presentationId, slideId) => `${presentationId}/slides/${slideId}/paraphrase`,
|
|
26
26
|
GENERATE_REPORT: (presentationId) => `${presentationId}/generate-report`,
|
|
27
27
|
REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}/move`,
|
|
28
|
+
REPOSITION_SLIDE: (presentationId, slideId) => `${presentationId}/slides/${slideId}/move`,
|
|
28
29
|
DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}`,
|
|
29
30
|
CREATE_SLIDE_OUTLINE: (presentationId) => `${presentationId}/outline`,
|
|
30
31
|
EXPORT_AS_PPTX: (uuid) => `${uuid}/export-as-pptx`,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_WORKSPACE_ROUTES = exports.TOOL_WORKSPACE_CONTROLLER_PUBLIC = exports.TOOL_WORKSPACE_CONTROLLER_PRIVATE = void 0;
|
|
4
|
+
exports.TOOL_WORKSPACE_CONTROLLER_PRIVATE = 'private/tools/workspaces';
|
|
5
|
+
exports.TOOL_WORKSPACE_CONTROLLER_PUBLIC = 'public/tools/workspaces';
|
|
6
|
+
exports.TOOL_WORKSPACE_ROUTES = {
|
|
7
|
+
GET_WORKSPACES: '',
|
|
8
|
+
GET_WORKSPACE: (uuid) => uuid,
|
|
9
|
+
UPDATE: (uuid) => uuid,
|
|
10
|
+
DELETE: (uuid) => uuid,
|
|
11
|
+
};
|
package/build/api/routes.js
CHANGED
|
@@ -49,6 +49,7 @@ exports.REST_API = {
|
|
|
49
49
|
RESET_PASSWORD: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESET_PASSWORD}`,
|
|
50
50
|
VERIFY_EMAIL: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VERIFY_EMAIL}`,
|
|
51
51
|
VERIFY_EMAIL_RETRY: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VERIFY_EMAIL_RETRY}`,
|
|
52
|
+
CHANGE_PASSWORD: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.CHANGE_PASSWORD}`,
|
|
52
53
|
},
|
|
53
54
|
USERS: {
|
|
54
55
|
GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
|
|
@@ -556,6 +557,7 @@ exports.REST_API = {
|
|
|
556
557
|
PARAPHRASE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.PARAPHRASE(presentationId, slideId)}`,
|
|
557
558
|
GENERATE_REPORT: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
|
|
558
559
|
REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
560
|
+
REPOSITION_SLIDE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
|
|
559
561
|
DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
560
562
|
CREATE_SLIDE_OUTLINE: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CREATE_SLIDE_OUTLINE(presentationId)}`,
|
|
561
563
|
EXPORT_AS_PPTX: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
|
|
@@ -584,6 +586,7 @@ exports.REST_API = {
|
|
|
584
586
|
PARAPHRASE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.PARAPHRASE(presentationId, slideId)}`,
|
|
585
587
|
GENERATE_REPORT: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
|
|
586
588
|
REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
589
|
+
REPOSITION_SLIDE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
|
|
587
590
|
DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
|
|
588
591
|
CREATE_SLIDE_OUTLINE: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CREATE_SLIDE_OUTLINE(presentationId)}`,
|
|
589
592
|
EXPORT_AS_PPTX: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChangePasswordCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var ChangePasswordCommand;
|
|
6
|
+
(function (ChangePasswordCommand) {
|
|
7
|
+
ChangePasswordCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
currentPassword: zod_1.z.string(),
|
|
9
|
+
newPassword: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
ChangePasswordCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.object({
|
|
13
|
+
accessToken: zod_1.z.string(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
})(ChangePasswordCommand || (exports.ChangePasswordCommand = ChangePasswordCommand = {}));
|
|
@@ -23,3 +23,4 @@ __exportStar(require("./verify-email-retry.command"), exports);
|
|
|
23
23
|
__exportStar(require("./verify-email.command"), exports);
|
|
24
24
|
__exportStar(require("./vk-login.command"), exports);
|
|
25
25
|
__exportStar(require("./yandex-login.command"), exports);
|
|
26
|
+
__exportStar(require("./change-password.command"), exports);
|
|
@@ -29,3 +29,4 @@ __exportStar(require("./marketplace-card"), exports);
|
|
|
29
29
|
__exportStar(require("./interior-design"), exports);
|
|
30
30
|
__exportStar(require("./solving-edu-task"), exports);
|
|
31
31
|
__exportStar(require("./spell-corrector"), exports);
|
|
32
|
+
__exportStar(require("./tool-workspace"), exports);
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExecuteMarketplaceCardCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const models_1 = require("../../../models");
|
|
6
7
|
var ExecuteMarketplaceCardCommand;
|
|
7
8
|
(function (ExecuteMarketplaceCardCommand) {
|
|
8
9
|
ExecuteMarketplaceCardCommand.RequestSchema = zod_1.z
|
|
9
10
|
.object({
|
|
11
|
+
workspaceId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
workspaceToolType: zod_1.z.nativeEnum(constants_1.TOOL_CONTENT_TYPE).nullable().optional(),
|
|
14
|
+
workspaceSlot: zod_1.z.nativeEnum(constants_1.TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
15
|
+
workspaceOrder: zod_1.z.number().int().min(0).optional(),
|
|
10
16
|
title: zod_1.z.string(),
|
|
11
17
|
subtitle: zod_1.z.string().nullable().optional(),
|
|
12
18
|
advantages: zod_1.z.array(zod_1.z.string()),
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./generate-presentation-slides.command"), exports);
|
|
|
27
27
|
__exportStar(require("./generate-and-insert-slide.command"), exports);
|
|
28
28
|
__exportStar(require("./get-presentation-config.command"), exports);
|
|
29
29
|
__exportStar(require("./reposition-slide-outline.command"), exports);
|
|
30
|
+
__exportStar(require("./reposition-slide.command"), exports);
|
|
30
31
|
__exportStar(require("./update-slide-outline.command"), exports);
|
|
31
32
|
__exportStar(require("./update-presentation-outline.command"), exports);
|
|
32
33
|
__exportStar(require("./update-presentation.command"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RepositionSlideCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var RepositionSlideCommand;
|
|
6
|
+
(function (RepositionSlideCommand) {
|
|
7
|
+
RepositionSlideCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
presentationId: zod_1.z.string().uuid(),
|
|
9
|
+
slideId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
RepositionSlideCommand.RequestBodySchema = zod_1.z.object({
|
|
12
|
+
newPosition: zod_1.z.number().min(0),
|
|
13
|
+
});
|
|
14
|
+
RepositionSlideCommand.ResponseSchema = zod_1.z.void();
|
|
15
|
+
})(RepositionSlideCommand || (exports.RepositionSlideCommand = RepositionSlideCommand = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteToolWorkspaceByUUIDCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteToolWorkspaceByUUIDCommand;
|
|
6
|
+
(function (DeleteToolWorkspaceByUUIDCommand) {
|
|
7
|
+
DeleteToolWorkspaceByUUIDCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
DeleteToolWorkspaceByUUIDCommand.ResponseSchema = zod_1.z.void();
|
|
11
|
+
})(DeleteToolWorkspaceByUUIDCommand || (exports.DeleteToolWorkspaceByUUIDCommand = DeleteToolWorkspaceByUUIDCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindToolWorkspaceByUUIDCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var FindToolWorkspaceByUUIDCommand;
|
|
7
|
+
(function (FindToolWorkspaceByUUIDCommand) {
|
|
8
|
+
FindToolWorkspaceByUUIDCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
FindToolWorkspaceByUUIDCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.ToolWorkspaceContentsSchema.nullable(),
|
|
13
|
+
});
|
|
14
|
+
})(FindToolWorkspaceByUUIDCommand || (exports.FindToolWorkspaceByUUIDCommand = FindToolWorkspaceByUUIDCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindToolWorkspacesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
|
+
var FindToolWorkspacesCommand;
|
|
8
|
+
(function (FindToolWorkspacesCommand) {
|
|
9
|
+
FindToolWorkspacesCommand.RequestQuerySchema = zod_1.z.object({
|
|
10
|
+
toolType: zod_1.z.nativeEnum(constants_1.TOOL_CONTENT_TYPE).optional(),
|
|
11
|
+
title: zod_1.z.string().optional(),
|
|
12
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
13
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
14
|
+
});
|
|
15
|
+
FindToolWorkspacesCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
data: zod_1.z.array(models_1.ToolWorkspaceSchema),
|
|
17
|
+
totalPages: zod_1.z.number(),
|
|
18
|
+
page: zod_1.z.number(),
|
|
19
|
+
});
|
|
20
|
+
})(FindToolWorkspacesCommand || (exports.FindToolWorkspacesCommand = FindToolWorkspacesCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./find-tool-workspace-by-uuid.command"), exports);
|
|
18
|
+
__exportStar(require("./find-tool-workspaces.command"), exports);
|
|
19
|
+
__exportStar(require("./update-tool-workspace.command"), exports);
|
|
20
|
+
__exportStar(require("./delete-tool-workspace-by-uuid.command"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateToolWorkspaceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
|
+
var UpdateToolWorkspaceCommand;
|
|
8
|
+
(function (UpdateToolWorkspaceCommand) {
|
|
9
|
+
UpdateToolWorkspaceCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
title: zod_1.z.string().min(1).optional(),
|
|
11
|
+
coverUrl: zod_1.z.string().nullable().optional(),
|
|
12
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_WORKSPACE_STATUS).optional(),
|
|
13
|
+
});
|
|
14
|
+
UpdateToolWorkspaceCommand.RequestParamsSchema = zod_1.z.object({
|
|
15
|
+
uuid: zod_1.z.string().uuid(),
|
|
16
|
+
});
|
|
17
|
+
UpdateToolWorkspaceCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: models_1.ToolWorkspaceSchema,
|
|
19
|
+
});
|
|
20
|
+
})(UpdateToolWorkspaceCommand || (exports.UpdateToolWorkspaceCommand = UpdateToolWorkspaceCommand = {}));
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VideoCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const models_1 = require("../../../models");
|
|
6
7
|
var VideoCommand;
|
|
7
8
|
(function (VideoCommand) {
|
|
8
9
|
VideoCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
|
|
10
|
+
workspaceId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
workspaceToolType: zod_1.z.nativeEnum(constants_1.TOOL_CONTENT_TYPE).nullable().optional(),
|
|
13
|
+
workspaceSlot: zod_1.z.nativeEnum(constants_1.TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
14
|
+
workspaceOrder: zod_1.z.number().int().min(0).optional(),
|
|
10
15
|
prompt: zod_1.z.string(),
|
|
16
|
+
modelId: zod_1.z.string().uuid(),
|
|
11
17
|
params: models_1.VideoGenerationRequestParamsSchema,
|
|
12
18
|
});
|
|
13
19
|
VideoCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -17,3 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./tool-content-type.enum"), exports);
|
|
18
18
|
__exportStar(require("./tool-job-status.enum"), exports);
|
|
19
19
|
__exportStar(require("./job-request-origin.enum"), exports);
|
|
20
|
+
__exportStar(require("./tool-type.enum"), exports);
|
|
21
|
+
__exportStar(require("./tool-workspace-item-slot.enum"), exports);
|
|
22
|
+
__exportStar(require("./tool-workspace-status.enum"), exports);
|
|
@@ -4,6 +4,7 @@ exports.TOOL_CONTENT_TYPE = void 0;
|
|
|
4
4
|
var TOOL_CONTENT_TYPE;
|
|
5
5
|
(function (TOOL_CONTENT_TYPE) {
|
|
6
6
|
TOOL_CONTENT_TYPE["IMAGE_EDITOR"] = "IMAGE_EDITOR";
|
|
7
|
+
TOOL_CONTENT_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|
|
7
8
|
TOOL_CONTENT_TYPE["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
|
|
8
9
|
TOOL_CONTENT_TYPE["SPEECH_TO_TEXT"] = "SPEECH_TO_TEXT";
|
|
9
10
|
TOOL_CONTENT_TYPE["REPHRASE"] = "REPHRASE";
|
|
@@ -12,6 +13,9 @@ var TOOL_CONTENT_TYPE;
|
|
|
12
13
|
TOOL_CONTENT_TYPE["WRITER"] = "WRITER";
|
|
13
14
|
TOOL_CONTENT_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
14
15
|
TOOL_CONTENT_TYPE["MUSIC"] = "MUSIC";
|
|
16
|
+
TOOL_CONTENT_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
15
17
|
TOOL_CONTENT_TYPE["NONE"] = "NONE";
|
|
16
|
-
TOOL_CONTENT_TYPE["
|
|
18
|
+
TOOL_CONTENT_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD";
|
|
19
|
+
TOOL_CONTENT_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
20
|
+
TOOL_CONTENT_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
17
21
|
})(TOOL_CONTENT_TYPE || (exports.TOOL_CONTENT_TYPE = TOOL_CONTENT_TYPE = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_TYPE = void 0;
|
|
4
|
+
var TOOL_TYPE;
|
|
5
|
+
(function (TOOL_TYPE) {
|
|
6
|
+
TOOL_TYPE["IMAGE"] = "IMAGE";
|
|
7
|
+
TOOL_TYPE["TEXT"] = "TEXT";
|
|
8
|
+
TOOL_TYPE["VIDEO"] = "VIDEO";
|
|
9
|
+
TOOL_TYPE["AUDIO"] = "AUDIO";
|
|
10
|
+
TOOL_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
11
|
+
TOOL_TYPE["PRESENTATION_AI_ACTION"] = "PRESENTATION_AI_ACTION";
|
|
12
|
+
TOOL_TYPE["WRITER"] = "WRITER";
|
|
13
|
+
TOOL_TYPE["PARAPHRASE"] = "PARAPHRASE";
|
|
14
|
+
TOOL_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
|
|
15
|
+
TOOL_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
16
|
+
TOOL_TYPE["MUSIC"] = "MUSIC";
|
|
17
|
+
TOOL_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
|
|
18
|
+
TOOL_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|
|
19
|
+
TOOL_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD_GENERATION";
|
|
20
|
+
TOOL_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
21
|
+
TOOL_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
|
+
TOOL_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
23
|
+
})(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_WORKSPACE_ITEM_SLOT = void 0;
|
|
4
|
+
var TOOL_WORKSPACE_ITEM_SLOT;
|
|
5
|
+
(function (TOOL_WORKSPACE_ITEM_SLOT) {
|
|
6
|
+
TOOL_WORKSPACE_ITEM_SLOT["CAPITAL"] = "\u0417\u0430\u0433\u043B\u0430\u0432\u043D\u0430\u044F";
|
|
7
|
+
TOOL_WORKSPACE_ITEM_SLOT["INTERNAL"] = "\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F";
|
|
8
|
+
TOOL_WORKSPACE_ITEM_SLOT["VIDEO"] = "\u0412\u0438\u0434\u0435\u043E";
|
|
9
|
+
})(TOOL_WORKSPACE_ITEM_SLOT || (exports.TOOL_WORKSPACE_ITEM_SLOT = TOOL_WORKSPACE_ITEM_SLOT = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_WORKSPACE_STATUS = void 0;
|
|
4
|
+
var TOOL_WORKSPACE_STATUS;
|
|
5
|
+
(function (TOOL_WORKSPACE_STATUS) {
|
|
6
|
+
TOOL_WORKSPACE_STATUS["ACTIVE"] = "active";
|
|
7
|
+
TOOL_WORKSPACE_STATUS["DELETED"] = "deleted";
|
|
8
|
+
})(TOOL_WORKSPACE_STATUS || (exports.TOOL_WORKSPACE_STATUS = TOOL_WORKSPACE_STATUS = {}));
|
|
@@ -30,3 +30,4 @@ __exportStar(require("./marketplace-card"), exports);
|
|
|
30
30
|
__exportStar(require("./interior-design"), exports);
|
|
31
31
|
__exportStar(require("./solving-edu-task"), exports);
|
|
32
32
|
__exportStar(require("./spell-corrector"), exports);
|
|
33
|
+
__exportStar(require("./tool-workspace"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./tool-workspace.schema"), exports);
|
|
18
|
+
__exportStar(require("./tool-workspace-job.schema"), exports);
|
|
19
|
+
__exportStar(require("./tool-workspace-item.schema"), exports);
|
|
20
|
+
__exportStar(require("./tool-workspace-contents.schema"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceContentsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tool_workspace_item_schema_1 = require("./tool-workspace-item.schema");
|
|
6
|
+
const tool_workspace_schema_1 = require("./tool-workspace.schema");
|
|
7
|
+
exports.ToolWorkspaceContentsSchema = zod_1.z.object({
|
|
8
|
+
workspace: tool_workspace_schema_1.ToolWorkspaceSchema,
|
|
9
|
+
items: zod_1.z.array(tool_workspace_item_schema_1.ToolWorkspaceItemSchema),
|
|
10
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceItemSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const tool_workspace_job_schema_1 = require("./tool-workspace-job.schema");
|
|
7
|
+
exports.ToolWorkspaceItemSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
jobId: zod_1.z.string().uuid(),
|
|
10
|
+
jobType: zod_1.z.nativeEnum(constants_1.TOOL_TYPE),
|
|
11
|
+
slotTitle: zod_1.z.nativeEnum(constants_1.TOOL_WORKSPACE_ITEM_SLOT),
|
|
12
|
+
order: zod_1.z.number().int().min(0),
|
|
13
|
+
content: tool_workspace_job_schema_1.ToolWorkspaceJobSchema,
|
|
14
|
+
createdAt: zod_1.z.date(),
|
|
15
|
+
updatedAt: zod_1.z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceJobSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const marketplace_card_1 = require("../marketplace-card");
|
|
7
|
+
const video_1 = require("../video");
|
|
8
|
+
exports.ToolWorkspaceJobSchema = zod_1.z.discriminatedUnion('type', [
|
|
9
|
+
zod_1.z.object({
|
|
10
|
+
type: zod_1.z.literal(constants_1.TOOL_TYPE.MARKETPLACE_CARD_GENERATION),
|
|
11
|
+
job: marketplace_card_1.MarketplaceCardJobSchema,
|
|
12
|
+
}),
|
|
13
|
+
zod_1.z.object({
|
|
14
|
+
type: zod_1.z.literal(constants_1.TOOL_TYPE.VIDEO),
|
|
15
|
+
job: video_1.VideoJobSchema,
|
|
16
|
+
}),
|
|
17
|
+
]);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
exports.ToolWorkspaceSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
toolType: zod_1.z.nativeEnum(constants_1.TOOL_CONTENT_TYPE),
|
|
9
|
+
title: zod_1.z.string(),
|
|
10
|
+
coverUrl: zod_1.z.string().nullable(),
|
|
11
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_WORKSPACE_STATUS),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
createdAt: zod_1.z.date(),
|
|
15
|
+
updatedAt: zod_1.z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace ChangePasswordCommand {
|
|
4
|
+
export const RequestSchema = z.object({
|
|
5
|
+
currentPassword: z.string(),
|
|
6
|
+
newPassword: z.string(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.object({
|
|
13
|
+
accessToken: z.string(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
package/commands/auth/index.ts
CHANGED
package/commands/tools/index.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { TOOL_CONTENT_TYPE, TOOL_WORKSPACE_ITEM_SLOT } from '../../../constants';
|
|
2
3
|
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
4
|
|
|
4
5
|
export namespace ExecuteMarketplaceCardCommand {
|
|
5
6
|
export const RequestSchema = z
|
|
6
7
|
.object({
|
|
8
|
+
workspaceId: z.string().uuid().nullable().optional(),
|
|
9
|
+
workspaceItemId: z.string().uuid().nullable().optional(),
|
|
10
|
+
workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
|
|
11
|
+
workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
12
|
+
workspaceOrder: z.number().int().min(0).optional(),
|
|
7
13
|
title: z.string(),
|
|
8
14
|
subtitle: z.string().nullable().optional(),
|
|
9
15
|
advantages: z.array(z.string()),
|
|
@@ -11,6 +11,7 @@ export * from './generate-presentation-slides.command';
|
|
|
11
11
|
export * from './generate-and-insert-slide.command';
|
|
12
12
|
export * from './get-presentation-config.command';
|
|
13
13
|
export * from './reposition-slide-outline.command';
|
|
14
|
+
export * from './reposition-slide.command';
|
|
14
15
|
export * from './update-slide-outline.command';
|
|
15
16
|
export * from './update-presentation-outline.command';
|
|
16
17
|
export * from './update-presentation.command';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace RepositionSlideCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
presentationId: z.string().uuid(),
|
|
6
|
+
slideId: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type Params = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestBodySchema = z.object({
|
|
11
|
+
newPosition: z.number().min(0),
|
|
12
|
+
});
|
|
13
|
+
export type Request = z.infer<typeof RequestBodySchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.void();
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteToolWorkspaceByUUIDCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.void();
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolWorkspaceContentsSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindToolWorkspaceByUUIDCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseSchema = z.object({
|
|
11
|
+
data: ToolWorkspaceContentsSchema.nullable(),
|
|
12
|
+
});
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_CONTENT_TYPE } from '../../../constants';
|
|
3
|
+
import { ToolWorkspaceSchema } from '../../../models';
|
|
4
|
+
|
|
5
|
+
export namespace FindToolWorkspacesCommand {
|
|
6
|
+
export const RequestQuerySchema = z.object({
|
|
7
|
+
toolType: z.nativeEnum(TOOL_CONTENT_TYPE).optional(),
|
|
8
|
+
title: z.string().optional(),
|
|
9
|
+
limit: z.coerce.number().min(1).optional(),
|
|
10
|
+
offset: z.coerce.number().min(0).default(0).optional(),
|
|
11
|
+
});
|
|
12
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = z.object({
|
|
15
|
+
data: z.array(ToolWorkspaceSchema),
|
|
16
|
+
totalPages: z.number(),
|
|
17
|
+
page: z.number(),
|
|
18
|
+
});
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_WORKSPACE_STATUS } from '../../../constants';
|
|
3
|
+
import { ToolWorkspaceSchema } from '../../../models';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateToolWorkspaceCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
title: z.string().min(1).optional(),
|
|
8
|
+
coverUrl: z.string().nullable().optional(),
|
|
9
|
+
status: z.nativeEnum(TOOL_WORKSPACE_STATUS).optional(),
|
|
10
|
+
});
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const RequestParamsSchema = z.object({
|
|
14
|
+
uuid: z.string().uuid(),
|
|
15
|
+
});
|
|
16
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
17
|
+
|
|
18
|
+
export const ResponseSchema = z.object({
|
|
19
|
+
data: ToolWorkspaceSchema,
|
|
20
|
+
});
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { TOOL_CONTENT_TYPE, TOOL_WORKSPACE_ITEM_SLOT } from '../../../constants';
|
|
2
3
|
import { ToolJobSchema, VideoGenerationRequestParamsSchema } from '../../../models';
|
|
3
4
|
export namespace VideoCommand {
|
|
4
5
|
export const RequestSchema = z.object({
|
|
5
|
-
|
|
6
|
+
workspaceId: z.string().uuid().nullable().optional(),
|
|
7
|
+
workspaceItemId: z.string().uuid().nullable().optional(),
|
|
8
|
+
workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
|
|
9
|
+
workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
10
|
+
workspaceOrder: z.number().int().min(0).optional(),
|
|
6
11
|
prompt: z.string(),
|
|
12
|
+
modelId: z.string().uuid(),
|
|
7
13
|
params: VideoGenerationRequestParamsSchema,
|
|
8
14
|
});
|
|
9
15
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export enum TOOL_CONTENT_TYPE {
|
|
2
2
|
IMAGE_EDITOR = 'IMAGE_EDITOR',
|
|
3
|
+
IMAGE_GENERATION = 'IMAGE_GENERATION',
|
|
3
4
|
TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',
|
|
4
5
|
SPEECH_TO_TEXT = 'SPEECH_TO_TEXT',
|
|
5
6
|
REPHRASE = 'REPHRASE',
|
|
@@ -8,6 +9,9 @@ export enum TOOL_CONTENT_TYPE {
|
|
|
8
9
|
WRITER = 'WRITER',
|
|
9
10
|
VIDEO_EDITOR = 'VIDEO_EDITOR',
|
|
10
11
|
MUSIC = 'MUSIC',
|
|
12
|
+
INTERIOR_DESIGN = 'INTERIOR_DESIGN',
|
|
11
13
|
NONE = 'NONE',
|
|
12
|
-
|
|
14
|
+
MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD',
|
|
15
|
+
SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
|
|
16
|
+
SPELL_CORRECTOR = 'SPELL_CORRECTOR',
|
|
13
17
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export enum TOOL_TYPE {
|
|
2
|
+
IMAGE = 'IMAGE',
|
|
3
|
+
TEXT = 'TEXT',
|
|
4
|
+
VIDEO = 'VIDEO',
|
|
5
|
+
AUDIO = 'AUDIO',
|
|
6
|
+
PRESENTATION = 'PRESENTATION',
|
|
7
|
+
PRESENTATION_AI_ACTION = 'PRESENTATION_AI_ACTION',
|
|
8
|
+
WRITER = 'WRITER',
|
|
9
|
+
PARAPHRASE = 'PARAPHRASE',
|
|
10
|
+
WRITER_ACTION = 'WRITER_ACTION',
|
|
11
|
+
VIDEO_EDITOR = 'VIDEO_EDITOR',
|
|
12
|
+
MUSIC = 'MUSIC',
|
|
13
|
+
MUSIC_ACTION = 'MUSIC_ACTION',
|
|
14
|
+
IMAGE_GENERATION = 'IMAGE_GENERATION',
|
|
15
|
+
MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD_GENERATION',
|
|
16
|
+
INTERIOR_DESIGN = 'INTERIOR_DESIGN',
|
|
17
|
+
SPELL_CORRECTOR = 'SPELL_CORRECTOR',
|
|
18
|
+
SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
|
|
19
|
+
}
|
package/models/tools/index.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolWorkspaceItemSchema } from './tool-workspace-item.schema';
|
|
3
|
+
import { ToolWorkspaceSchema } from './tool-workspace.schema';
|
|
4
|
+
|
|
5
|
+
export const ToolWorkspaceContentsSchema = z.object({
|
|
6
|
+
workspace: ToolWorkspaceSchema,
|
|
7
|
+
items: z.array(ToolWorkspaceItemSchema),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type ToolWorkspaceContents = z.infer<typeof ToolWorkspaceContentsSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_TYPE, TOOL_WORKSPACE_ITEM_SLOT } from '../../../constants';
|
|
3
|
+
import { ToolWorkspaceJobSchema } from './tool-workspace-job.schema';
|
|
4
|
+
|
|
5
|
+
export const ToolWorkspaceItemSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
jobId: z.string().uuid(),
|
|
8
|
+
jobType: z.nativeEnum(TOOL_TYPE),
|
|
9
|
+
slotTitle: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT),
|
|
10
|
+
order: z.number().int().min(0),
|
|
11
|
+
content: ToolWorkspaceJobSchema,
|
|
12
|
+
createdAt: z.date(),
|
|
13
|
+
updatedAt: z.date(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export type ToolWorkspaceItem = z.infer<typeof ToolWorkspaceItemSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_TYPE } from '../../../constants';
|
|
3
|
+
import { MarketplaceCardJobSchema } from '../marketplace-card';
|
|
4
|
+
import { VideoJobSchema } from '../video';
|
|
5
|
+
|
|
6
|
+
export const ToolWorkspaceJobSchema = z.discriminatedUnion('type', [
|
|
7
|
+
z.object({
|
|
8
|
+
type: z.literal(TOOL_TYPE.MARKETPLACE_CARD_GENERATION),
|
|
9
|
+
job: MarketplaceCardJobSchema,
|
|
10
|
+
}),
|
|
11
|
+
z.object({
|
|
12
|
+
type: z.literal(TOOL_TYPE.VIDEO),
|
|
13
|
+
job: VideoJobSchema,
|
|
14
|
+
}),
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
export type ToolWorkspaceJob = z.infer<typeof ToolWorkspaceJobSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_CONTENT_TYPE, TOOL_WORKSPACE_STATUS } from '../../../constants';
|
|
3
|
+
|
|
4
|
+
export const ToolWorkspaceSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
toolType: z.nativeEnum(TOOL_CONTENT_TYPE),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
coverUrl: z.string().nullable(),
|
|
9
|
+
status: z.nativeEnum(TOOL_WORKSPACE_STATUS),
|
|
10
|
+
userId: z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
12
|
+
createdAt: z.date(),
|
|
13
|
+
updatedAt: z.date(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export type ToolWorkspace = z.infer<typeof ToolWorkspaceSchema>;
|