@purpleschool/gptbot 0.12.70 → 0.12.71
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/palette.ts +6 -0
- package/api/routes.ts +4 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/palette.js +8 -0
- package/build/api/routes.js +4 -0
- package/build/commands/{canvas → ai-studio/canvas}/create-canvas.command.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/delete-canvas.command.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid.query.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/find-canvases-by-user.query.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/run-canvas.command.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/save-canvas.command.js +8 -4
- package/build/commands/{canvas → ai-studio/canvas}/update-canvas.command.js +1 -1
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/create-canvas-edge.command.js +2 -2
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edge-by-source-and-target.query.js +1 -1
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.js +1 -1
- package/build/commands/{canvas-node → ai-studio/canvas-node}/create-canvas-node.command.js +8 -4
- package/build/commands/{canvas-node → ai-studio/canvas-node}/delete-canvas-node.command.js +2 -2
- package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.js +2 -2
- package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-definitions-with-configs.query.js +1 -1
- package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.js +1 -1
- package/build/commands/{canvas-node → ai-studio/canvas-node}/update-canvas-node.command.js +13 -5
- package/build/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-from-template.command.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-template.command.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/delete-canvas-template.command.js +3 -2
- package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-template-by-uuid.query.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/generate-canvas-template-by-prompt.command.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.js +1 -1
- package/build/commands/ai-studio/canvas-tool/index.js +17 -0
- package/build/commands/ai-studio/canvas-tool/palette/generate-palette.command.js +20 -0
- package/build/commands/ai-studio/canvas-tool/palette/get-palette-price.command.js +17 -0
- package/build/commands/ai-studio/canvas-tool/palette/index.js +18 -0
- package/build/commands/ai-studio/index.js +21 -0
- package/build/commands/index.js +5 -4
- package/build/models/canvas-node.schema.js +140 -37
- package/build/models/canvas-template.schema.js +6 -2
- package/commands/{canvas → ai-studio/canvas}/create-canvas.command.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/delete-canvas.command.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid.query.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/find-canvases-by-user.query.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/run-canvas.command.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/save-canvas.command.ts +13 -9
- package/commands/{canvas → ai-studio/canvas}/update-canvas.command.ts +1 -1
- package/commands/{canvas-edge → ai-studio/canvas-edge}/create-canvas-edge.command.ts +2 -2
- package/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edge-by-source-and-target.query.ts +1 -1
- package/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.ts +1 -1
- package/commands/ai-studio/canvas-node/create-canvas-node.command.ts +33 -0
- package/commands/{canvas-node → ai-studio/canvas-node}/delete-canvas-node.command.ts +2 -2
- package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.ts +2 -2
- package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-definitions-with-configs.query.ts +1 -1
- package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.ts +1 -1
- package/commands/ai-studio/canvas-node/update-canvas-node.command.ts +40 -0
- package/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-from-template.command.ts +1 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-template.command.ts +2 -6
- package/commands/{canvas-template → ai-studio/canvas-template}/delete-canvas-template.command.ts +3 -2
- package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-template-by-uuid.query.ts +1 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.ts +1 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/generate-canvas-template-by-prompt.command.ts +1 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.ts +1 -1
- package/commands/ai-studio/canvas-tool/index.ts +1 -0
- package/commands/ai-studio/canvas-tool/palette/generate-palette.command.ts +23 -0
- package/commands/ai-studio/canvas-tool/palette/get-palette-price.command.ts +17 -0
- package/commands/ai-studio/canvas-tool/palette/index.ts +2 -0
- package/commands/ai-studio/index.ts +5 -0
- package/commands/index.ts +5 -5
- package/commands/team-account/find-team-accounts-by-name.command.ts +1 -1
- package/models/canvas-node.schema.ts +167 -41
- package/models/canvas-template.schema.ts +11 -7
- package/package.json +1 -1
- package/commands/canvas-node/create-canvas-node.command.ts +0 -25
- package/commands/canvas-node/update-canvas-node.command.ts +0 -26
- package/build/commands/{canvas → ai-studio/canvas}/index.js +0 -0
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/delete-canvas-edge.command.js +0 -0
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/index.js +0 -0
- package/build/commands/{canvas-node → ai-studio/canvas-node}/index.js +0 -0
- package/build/commands/{canvas-template → ai-studio/canvas-template}/index.js +1 -1
- package/commands/{canvas → ai-studio/canvas}/index.ts +0 -0
- package/commands/{canvas-edge → ai-studio/canvas-edge}/delete-canvas-edge.command.ts +0 -0
- package/commands/{canvas-edge → ai-studio/canvas-edge}/index.ts +0 -0
- package/commands/{canvas-node → ai-studio/canvas-node}/index.ts +0 -0
- package/commands/{canvas-template → ai-studio/canvas-template}/index.ts +1 -1
package/api/routes.ts
CHANGED
|
@@ -1292,4 +1292,8 @@ export const REST_API = {
|
|
|
1292
1292
|
`${ROOT}/${CONTROLLERS.HTML_PAGE_BUILDER_CONTROLLER_PUBLIC}/${CONTROLLERS.HTML_PAGE_BUILDER_ROUTES.DELETE(uuid)}`,
|
|
1293
1293
|
DELETE_ALL: `${ROOT}/${CONTROLLERS.HTML_PAGE_BUILDER_CONTROLLER_PUBLIC}/${CONTROLLERS.HTML_PAGE_BUILDER_ROUTES.DELETE_ALL}`,
|
|
1294
1294
|
},
|
|
1295
|
+
PALETTE_PRIVATE: {
|
|
1296
|
+
PRICE: `${ROOT}/${CONTROLLERS.PALETTE_CONTROLLER_PRIVATE}/${CONTROLLERS.PALETTE_ROUTES.PRICE}`,
|
|
1297
|
+
GENERATE: `${ROOT}/${CONTROLLERS.PALETTE_CONTROLLER_PRIVATE}/${CONTROLLERS.PALETTE_ROUTES.GENERATE}`,
|
|
1298
|
+
},
|
|
1295
1299
|
} as const;
|
|
@@ -86,4 +86,5 @@ __exportStar(require("./team-account"), exports);
|
|
|
86
86
|
__exportStar(require("./spell-corrector"), exports);
|
|
87
87
|
__exportStar(require("./tool-workspace"), exports);
|
|
88
88
|
__exportStar(require("./html-page-builder"), exports);
|
|
89
|
+
__exportStar(require("./palette"), exports);
|
|
89
90
|
__exportStar(require("./canvas-template"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PALETTE_ROUTES = exports.PALETTE_CONTROLLER_PRIVATE = void 0;
|
|
4
|
+
exports.PALETTE_CONTROLLER_PRIVATE = 'private/ai-canvas/tools/palette';
|
|
5
|
+
exports.PALETTE_ROUTES = {
|
|
6
|
+
PRICE: 'price',
|
|
7
|
+
GENERATE: 'generate',
|
|
8
|
+
};
|
package/build/api/routes.js
CHANGED
|
@@ -967,4 +967,8 @@ exports.REST_API = {
|
|
|
967
967
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.HTML_PAGE_BUILDER_CONTROLLER_PUBLIC}/${CONTROLLERS.HTML_PAGE_BUILDER_ROUTES.DELETE(uuid)}`,
|
|
968
968
|
DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.HTML_PAGE_BUILDER_CONTROLLER_PUBLIC}/${CONTROLLERS.HTML_PAGE_BUILDER_ROUTES.DELETE_ALL}`,
|
|
969
969
|
},
|
|
970
|
+
PALETTE_PRIVATE: {
|
|
971
|
+
PRICE: `${exports.ROOT}/${CONTROLLERS.PALETTE_CONTROLLER_PRIVATE}/${CONTROLLERS.PALETTE_ROUTES.PRICE}`,
|
|
972
|
+
GENERATE: `${exports.ROOT}/${CONTROLLERS.PALETTE_CONTROLLER_PRIVATE}/${CONTROLLERS.PALETTE_ROUTES.GENERATE}`,
|
|
973
|
+
},
|
|
970
974
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var CreateCanvasCommand;
|
|
7
7
|
(function (CreateCanvasCommand) {
|
|
8
8
|
CreateCanvasCommand.RequestSchema = zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteCanvasCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var DeleteCanvasCommand;
|
|
7
7
|
(function (DeleteCanvasCommand) {
|
|
8
8
|
DeleteCanvasCommand.RequestSchema = models_1.CanvasSchema.pick({
|
package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.js
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasByUuidWithRelationsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasByUuidWithRelationsQuery;
|
|
7
7
|
(function (FindCanvasByUuidWithRelationsQuery) {
|
|
8
8
|
FindCanvasByUuidWithRelationsQuery.RequestSchema = models_1.CanvasSchema.pick({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasByUuidQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasByUuidQuery;
|
|
7
7
|
(function (FindCanvasByUuidQuery) {
|
|
8
8
|
FindCanvasByUuidQuery.RequestSchema = models_1.CanvasSchema.pick({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasesByUserQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasesByUserQuery;
|
|
7
7
|
(function (FindCanvasesByUserQuery) {
|
|
8
8
|
FindCanvasesByUserQuery.RequestSchema = zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RunCanvasCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
const save_canvas_command_1 = require("./save-canvas.command");
|
|
7
7
|
var RunCanvasCommand;
|
|
8
8
|
(function (RunCanvasCommand) {
|
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SaveCanvasCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("
|
|
6
|
-
const models_1 = require("
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
7
|
var SaveCanvasCommand;
|
|
8
8
|
(function (SaveCanvasCommand) {
|
|
9
9
|
SaveCanvasCommand.RequestParamSchema = models_1.CanvasSchema.pick({
|
|
10
10
|
uuid: true,
|
|
11
11
|
});
|
|
12
|
-
SaveCanvasCommand.CanvasNodePayloadSchema = zod_1.z
|
|
12
|
+
SaveCanvasCommand.CanvasNodePayloadSchema = zod_1.z
|
|
13
|
+
.object({
|
|
13
14
|
uuid: zod_1.z.string().uuid(),
|
|
14
15
|
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE),
|
|
15
16
|
position: models_1.CanvasNodePositionSchema,
|
|
16
|
-
params:
|
|
17
|
+
params: zod_1.z.unknown().nullable().optional(),
|
|
18
|
+
})
|
|
19
|
+
.superRefine((node, ctx) => {
|
|
20
|
+
(0, models_1.validateCanvasNodeParamsByType)(node.nodeDefinitionId, node.params, ctx);
|
|
17
21
|
});
|
|
18
22
|
SaveCanvasCommand.CanvasEdgePayloadSchema = zod_1.z.object({
|
|
19
23
|
sourceId: zod_1.z.string().uuid(),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateCanvasCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var UpdateCanvasCommand;
|
|
7
7
|
(function (UpdateCanvasCommand) {
|
|
8
8
|
UpdateCanvasCommand.RequestParamSchema = models_1.CanvasSchema.pick({
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasEdgeCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("
|
|
6
|
-
const models_1 = require("
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
7
|
var CreateCanvasEdgeCommand;
|
|
8
8
|
(function (CreateCanvasEdgeCommand) {
|
|
9
9
|
CreateCanvasEdgeCommand.RequestParamSchema = zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasEdgeBySourceAndTargetQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasEdgeBySourceAndTargetQuery;
|
|
7
7
|
(function (FindCanvasEdgeBySourceAndTargetQuery) {
|
|
8
8
|
FindCanvasEdgeBySourceAndTargetQuery.RequestParamSchema = zod_1.z.object({
|
package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.js
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasEdgesByCanvasQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasEdgesByCanvasQuery;
|
|
7
7
|
(function (FindCanvasEdgesByCanvasQuery) {
|
|
8
8
|
FindCanvasEdgesByCanvasQuery.RequestParamSchema = zod_1.z.object({
|
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasNodeCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("
|
|
6
|
-
const models_1 = require("
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
7
|
var CreateCanvasNodeCommand;
|
|
8
8
|
(function (CreateCanvasNodeCommand) {
|
|
9
9
|
CreateCanvasNodeCommand.RequestParamSchema = zod_1.z.object({
|
|
10
10
|
canvasId: zod_1.z.string().uuid(),
|
|
11
11
|
});
|
|
12
|
-
CreateCanvasNodeCommand.RequestSchema = zod_1.z
|
|
12
|
+
CreateCanvasNodeCommand.RequestSchema = zod_1.z
|
|
13
|
+
.object({
|
|
13
14
|
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE),
|
|
14
15
|
position: models_1.CanvasNodePositionSchema,
|
|
15
|
-
params:
|
|
16
|
+
params: zod_1.z.unknown().nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
.superRefine((request, ctx) => {
|
|
19
|
+
(0, models_1.validateCanvasNodeParamsByType)(request.nodeDefinitionId, request.params, ctx);
|
|
16
20
|
});
|
|
17
21
|
CreateCanvasNodeCommand.ResponseSchema = zod_1.z.object({
|
|
18
22
|
data: models_1.CanvasNodeSchema,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteCanvasNodeCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var DeleteCanvasNodeCommand;
|
|
7
7
|
(function (DeleteCanvasNodeCommand) {
|
|
8
|
-
DeleteCanvasNodeCommand.RequestParamSchema = models_1.
|
|
8
|
+
DeleteCanvasNodeCommand.RequestParamSchema = models_1.CanvasNodeBaseSchema.pick({
|
|
9
9
|
canvasId: true,
|
|
10
10
|
uuid: true,
|
|
11
11
|
});
|
package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.js
RENAMED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasNodeByUuidQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasNodeByUuidQuery;
|
|
7
7
|
(function (FindCanvasNodeByUuidQuery) {
|
|
8
|
-
FindCanvasNodeByUuidQuery.RequestParamSchema = models_1.
|
|
8
|
+
FindCanvasNodeByUuidQuery.RequestParamSchema = models_1.CanvasNodeBaseSchema.pick({
|
|
9
9
|
canvasId: true,
|
|
10
10
|
uuid: true,
|
|
11
11
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasNodeDefinitionsWithConfigsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasNodeDefinitionsWithConfigsQuery;
|
|
7
7
|
(function (FindCanvasNodeDefinitionsWithConfigsQuery) {
|
|
8
8
|
FindCanvasNodeDefinitionsWithConfigsQuery.ResponseSchema = zod_1.z.object({
|
package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.js
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasNodesByCanvasQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasNodesByCanvasQuery;
|
|
7
7
|
(function (FindCanvasNodesByCanvasQuery) {
|
|
8
8
|
FindCanvasNodesByCanvasQuery.RequestParamSchema = zod_1.z.object({
|
|
@@ -2,18 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateCanvasNodeCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("
|
|
6
|
-
const models_1 = require("
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
7
|
var UpdateCanvasNodeCommand;
|
|
8
8
|
(function (UpdateCanvasNodeCommand) {
|
|
9
|
-
UpdateCanvasNodeCommand.RequestParamSchema = models_1.
|
|
9
|
+
UpdateCanvasNodeCommand.RequestParamSchema = models_1.CanvasNodeBaseSchema.pick({
|
|
10
10
|
canvasId: true,
|
|
11
11
|
uuid: true,
|
|
12
12
|
});
|
|
13
|
-
UpdateCanvasNodeCommand.RequestSchema = zod_1.z
|
|
13
|
+
UpdateCanvasNodeCommand.RequestSchema = zod_1.z
|
|
14
|
+
.object({
|
|
14
15
|
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE).optional(),
|
|
15
16
|
position: models_1.CanvasNodePositionSchema.optional(),
|
|
16
|
-
params:
|
|
17
|
+
params: zod_1.z.unknown().nullable().optional(),
|
|
18
|
+
output: zod_1.z.unknown().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.superRefine((request, ctx) => {
|
|
21
|
+
if (request.nodeDefinitionId !== undefined) {
|
|
22
|
+
(0, models_1.validateCanvasNodeParamsByType)(request.nodeDefinitionId, request.params, ctx);
|
|
23
|
+
(0, models_1.validateCanvasNodeOutputByType)(request.nodeDefinitionId, request.output, ctx);
|
|
24
|
+
}
|
|
17
25
|
});
|
|
18
26
|
UpdateCanvasNodeCommand.ResponseSchema = zod_1.z.object({
|
|
19
27
|
data: models_1.CanvasNodeSchema,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasFromTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var CreateCanvasFromTemplateCommand;
|
|
7
7
|
(function (CreateCanvasFromTemplateCommand) {
|
|
8
8
|
CreateCanvasFromTemplateCommand.RequestParamSchema = zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var CreateCanvasTemplateCommand;
|
|
7
7
|
(function (CreateCanvasTemplateCommand) {
|
|
8
8
|
CreateCanvasTemplateCommand.RequestSchema = zod_1.z.object({
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteCanvasTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
5
6
|
var DeleteCanvasTemplateCommand;
|
|
6
7
|
(function (DeleteCanvasTemplateCommand) {
|
|
7
|
-
DeleteCanvasTemplateCommand.RequestParamSchema =
|
|
8
|
-
uuid:
|
|
8
|
+
DeleteCanvasTemplateCommand.RequestParamSchema = models_1.CanvasTemplateSchema.pick({
|
|
9
|
+
uuid: true,
|
|
9
10
|
});
|
|
10
11
|
DeleteCanvasTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
11
12
|
data: zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasTemplateByUuidQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasTemplateByUuidQuery;
|
|
7
7
|
(function (FindCanvasTemplateByUuidQuery) {
|
|
8
8
|
FindCanvasTemplateByUuidQuery.RequestSchema = models_1.CanvasTemplateSchema.pick({
|
package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.js
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasTemplatesQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasTemplatesQuery;
|
|
7
7
|
(function (FindCanvasTemplatesQuery) {
|
|
8
8
|
FindCanvasTemplatesQuery.RequestSchema = zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GenerateCanvasTemplateByPromptCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var GenerateCanvasTemplateByPromptCommand;
|
|
7
7
|
(function (GenerateCanvasTemplateByPromptCommand) {
|
|
8
8
|
GenerateCanvasTemplateByPromptCommand.RequestSchema = zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateCanvasTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var UpdateCanvasTemplateCommand;
|
|
7
7
|
(function (UpdateCanvasTemplateCommand) {
|
|
8
8
|
UpdateCanvasTemplateCommand.RequestParamSchema = models_1.CanvasTemplateSchema.pick({
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./palette"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeneratePaletteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const HexColorSchema = zod_1.z.string().regex(/^#[0-9A-Fa-f]{6}$/);
|
|
6
|
+
var GeneratePaletteCommand;
|
|
7
|
+
(function (GeneratePaletteCommand) {
|
|
8
|
+
GeneratePaletteCommand.PaletteSchema = zod_1.z.object({
|
|
9
|
+
colors: zod_1.z.array(HexColorSchema).max(7),
|
|
10
|
+
});
|
|
11
|
+
GeneratePaletteCommand.RequestSchema = zod_1.z.object({
|
|
12
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
13
|
+
canvasId: zod_1.z.string().uuid(),
|
|
14
|
+
prompt: zod_1.z.string().min(1),
|
|
15
|
+
colors: zod_1.z.array(HexColorSchema).optional(),
|
|
16
|
+
});
|
|
17
|
+
GeneratePaletteCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: GeneratePaletteCommand.PaletteSchema,
|
|
19
|
+
});
|
|
20
|
+
})(GeneratePaletteCommand || (exports.GeneratePaletteCommand = GeneratePaletteCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPalettePriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var GetPalettePriceCommand;
|
|
6
|
+
(function (GetPalettePriceCommand) {
|
|
7
|
+
GetPalettePriceCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
promptLength: zod_1.z.coerce.number().positive(),
|
|
9
|
+
});
|
|
10
|
+
GetPalettePriceCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
charsUntilNextPriceIncrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
14
|
+
charsUntilNextPriceDecrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(GetPalettePriceCommand || (exports.GetPalettePriceCommand = GetPalettePriceCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./generate-palette.command"), exports);
|
|
18
|
+
__exportStar(require("./get-palette-price.command"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
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"), exports);
|
|
18
|
+
__exportStar(require("./canvas-edge"), exports);
|
|
19
|
+
__exportStar(require("./canvas-node"), exports);
|
|
20
|
+
__exportStar(require("./canvas-template"), exports);
|
|
21
|
+
__exportStar(require("./canvas-tool"), exports);
|
package/build/commands/index.js
CHANGED
|
@@ -19,9 +19,11 @@ __exportStar(require("./ai-model"), exports);
|
|
|
19
19
|
__exportStar(require("./ai-vendor"), exports);
|
|
20
20
|
__exportStar(require("./auth"), exports);
|
|
21
21
|
__exportStar(require("./blog"), exports);
|
|
22
|
-
__exportStar(require("./canvas"), exports);
|
|
23
|
-
__exportStar(require("./canvas-node"), exports);
|
|
24
|
-
__exportStar(require("./canvas-edge"), exports);
|
|
22
|
+
__exportStar(require("./ai-studio/canvas"), exports);
|
|
23
|
+
__exportStar(require("./ai-studio/canvas-node"), exports);
|
|
24
|
+
__exportStar(require("./ai-studio/canvas-edge"), exports);
|
|
25
|
+
__exportStar(require("./ai-studio/canvas-template"), exports);
|
|
26
|
+
__exportStar(require("./ai-studio/canvas-tool"), exports);
|
|
25
27
|
__exportStar(require("./category"), exports);
|
|
26
28
|
__exportStar(require("./chat"), exports);
|
|
27
29
|
__exportStar(require("./course"), exports);
|
|
@@ -65,4 +67,3 @@ __exportStar(require("./user-profile"), exports);
|
|
|
65
67
|
__exportStar(require("./team-account"), exports);
|
|
66
68
|
__exportStar(require("./team-to-subscription"), exports);
|
|
67
69
|
__exportStar(require("./team-to-product"), exports);
|
|
68
|
-
__exportStar(require("./canvas-template"), exports);
|