@purpleschool/gptbot 0.12.74 → 0.12.76
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/canvas.ts +1 -0
- package/build/api/controllers/http/canvas.js +1 -0
- package/build/commands/ai-studio/canvas/execute-graph-by-node.command.js +17 -0
- package/build/commands/ai-studio/canvas/index.js +1 -0
- package/build/constants/index.js +0 -1
- package/build/models/canvas-node.schema.js +3 -0
- package/build/models/canvas.schema.js +0 -2
- package/commands/ai-studio/canvas/execute-graph-by-node.command.ts +20 -0
- package/commands/ai-studio/canvas/index.ts +1 -0
- package/constants/index.ts +0 -1
- package/models/canvas-node.schema.ts +3 -0
- package/models/canvas.schema.ts +0 -2
- package/package.json +1 -1
- package/build/constants/canvas/enums/canvas-status.enum.js +0 -9
- package/build/constants/canvas/enums/index.js +0 -17
- package/build/constants/canvas/index.js +0 -17
- package/constants/canvas/enums/canvas-status.enum.ts +0 -5
- package/constants/canvas/enums/index.ts +0 -1
- package/constants/canvas/index.ts +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecuteGraphByNodeCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var ExecuteGraphByNodeCommand;
|
|
7
|
+
(function (ExecuteGraphByNodeCommand) {
|
|
8
|
+
ExecuteGraphByNodeCommand.RequestParamSchema = models_1.CanvasSchema.pick({
|
|
9
|
+
uuid: true,
|
|
10
|
+
});
|
|
11
|
+
ExecuteGraphByNodeCommand.RequestSchema = zod_1.z.object({
|
|
12
|
+
executableNodeId: zod_1.z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
ExecuteGraphByNodeCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: models_1.CanvasNodeSchema,
|
|
16
|
+
});
|
|
17
|
+
})(ExecuteGraphByNodeCommand || (exports.ExecuteGraphByNodeCommand = ExecuteGraphByNodeCommand = {}));
|
|
@@ -22,3 +22,4 @@ __exportStar(require("./find-canvases-by-user.query"), exports);
|
|
|
22
22
|
__exportStar(require("./run-canvas.command"), exports);
|
|
23
23
|
__exportStar(require("./save-canvas.command"), exports);
|
|
24
24
|
__exportStar(require("./update-canvas.command"), exports);
|
|
25
|
+
__exportStar(require("./execute-graph-by-node.command"), exports);
|
package/build/constants/index.js
CHANGED
|
@@ -56,7 +56,6 @@ __exportStar(require("./tool-html-page-builder"), exports);
|
|
|
56
56
|
__exportStar(require("./feedback"), exports);
|
|
57
57
|
__exportStar(require("./daily-streak"), exports);
|
|
58
58
|
__exportStar(require("./cabinet"), exports);
|
|
59
|
-
__exportStar(require("./canvas"), exports);
|
|
60
59
|
__exportStar(require("./canvas-node"), exports);
|
|
61
60
|
__exportStar(require("./canvas-edge"), exports);
|
|
62
61
|
__exportStar(require("./webmaster"), exports);
|
|
@@ -31,6 +31,9 @@ exports.VideoGenParamsSchema = strictObject({
|
|
|
31
31
|
duration: zod_1.z.string().optional(),
|
|
32
32
|
aspectRatio: zod_1.z.string().optional(),
|
|
33
33
|
resolution: zod_1.z.string().optional(),
|
|
34
|
+
firstFrameImageId: zod_1.z.string().uuid().optional(),
|
|
35
|
+
lastFrameImageId: zod_1.z.string().uuid().optional(),
|
|
36
|
+
imageIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
34
37
|
});
|
|
35
38
|
exports.AudioGenParamsSchema = zod_1.z.discriminatedUnion('mode', [
|
|
36
39
|
strictObject({
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CanvasSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("../constants");
|
|
6
5
|
exports.CanvasSchema = zod_1.z.object({
|
|
7
6
|
uuid: zod_1.z.string().uuid(),
|
|
8
7
|
name: zod_1.z.string(),
|
|
9
8
|
userId: zod_1.z.string().uuid(),
|
|
10
|
-
status: zod_1.z.nativeEnum(constants_1.CANVAS_STATUS),
|
|
11
9
|
createdAt: zod_1.z.date(),
|
|
12
10
|
updatedAt: zod_1.z.date(),
|
|
13
11
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CanvasNodeSchema, CanvasSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace ExecuteGraphByNodeCommand {
|
|
5
|
+
export const RequestParamSchema = CanvasSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = z.object({
|
|
12
|
+
executableNodeId: z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.object({
|
|
16
|
+
data: CanvasNodeSchema,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|
package/constants/index.ts
CHANGED
|
@@ -40,7 +40,6 @@ export * from './tool-html-page-builder';
|
|
|
40
40
|
export * from './feedback';
|
|
41
41
|
export * from './daily-streak';
|
|
42
42
|
export * from './cabinet';
|
|
43
|
-
export * from './canvas';
|
|
44
43
|
export * from './canvas-node';
|
|
45
44
|
export * from './canvas-edge';
|
|
46
45
|
export * from './webmaster';
|
|
@@ -37,6 +37,9 @@ export const VideoGenParamsSchema = strictObject({
|
|
|
37
37
|
duration: z.string().optional(),
|
|
38
38
|
aspectRatio: z.string().optional(),
|
|
39
39
|
resolution: z.string().optional(),
|
|
40
|
+
firstFrameImageId: z.string().uuid().optional(),
|
|
41
|
+
lastFrameImageId: z.string().uuid().optional(),
|
|
42
|
+
imageIds: z.array(z.string().uuid()).optional(),
|
|
40
43
|
});
|
|
41
44
|
export type VideoGenParams = z.infer<typeof VideoGenParamsSchema>;
|
|
42
45
|
|
package/models/canvas.schema.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CANVAS_STATUS } from '../constants';
|
|
3
2
|
|
|
4
3
|
export const CanvasSchema = z.object({
|
|
5
4
|
uuid: z.string().uuid(),
|
|
6
5
|
name: z.string(),
|
|
7
6
|
userId: z.string().uuid(),
|
|
8
|
-
status: z.nativeEnum(CANVAS_STATUS),
|
|
9
7
|
createdAt: z.date(),
|
|
10
8
|
updatedAt: z.date(),
|
|
11
9
|
});
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CANVAS_STATUS = void 0;
|
|
4
|
-
var CANVAS_STATUS;
|
|
5
|
-
(function (CANVAS_STATUS) {
|
|
6
|
-
CANVAS_STATUS["IDLE"] = "IDLE";
|
|
7
|
-
CANVAS_STATUS["RUNNING"] = "RUNNING";
|
|
8
|
-
CANVAS_STATUS["FAILED"] = "FAILED";
|
|
9
|
-
})(CANVAS_STATUS || (exports.CANVAS_STATUS = CANVAS_STATUS = {}));
|
|
@@ -1,17 +0,0 @@
|
|
|
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("./canvas-status.enum"), exports);
|
|
@@ -1,17 +0,0 @@
|
|
|
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("./enums"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './canvas-status.enum';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './enums';
|