@purpleschool/gptbot 0.12.71 → 0.12.72-stage-2
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/blog.ts +4 -0
- package/api/controllers/http/canvas-template.ts +0 -1
- package/api/controllers/http/category.ts +4 -0
- package/api/controllers/http/course.ts +12 -0
- package/api/controllers/http/index.ts +0 -1
- package/api/controllers/http/page.ts +4 -0
- package/api/controllers/http/prompt-category.ts +4 -0
- package/api/controllers/http/prompt-topic.ts +4 -0
- package/api/controllers/http/prompt.ts +4 -0
- package/api/controllers/http/question.ts +4 -0
- package/api/controllers/http/team-account.ts +1 -0
- package/api/routes.ts +68 -5
- package/build/api/controllers/http/blog.js +3 -0
- package/build/api/controllers/http/canvas-template.js +0 -1
- package/build/api/controllers/http/category.js +3 -0
- package/build/api/controllers/http/course.js +9 -0
- package/build/api/controllers/http/index.js +0 -1
- package/build/api/controllers/http/page.js +3 -0
- package/build/api/controllers/http/prompt-category.js +3 -0
- package/build/api/controllers/http/prompt-topic.js +3 -0
- package/build/api/controllers/http/prompt.js +3 -0
- package/build/api/controllers/http/question.js +3 -0
- package/build/api/controllers/http/team-account.js +1 -0
- package/build/api/routes.js +34 -5
- package/build/commands/blog/create-post-translation.command.js +23 -0
- package/build/commands/blog/create-post.command.js +6 -0
- package/build/commands/blog/get-all-post-translations.query.js +14 -0
- package/build/commands/blog/index.js +3 -0
- package/build/commands/blog/update-post-translation.command.js +23 -0
- package/build/commands/blog/update-post.command.js +6 -0
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +6 -13
- package/build/commands/cabinet/get-user-statistics-overview.command.js +5 -1
- package/build/commands/{ai-studio/canvas → canvas}/create-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/delete-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid-with-relations.query.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid.query.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/find-canvases-by-user.query.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/run-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/save-canvas.command.js +4 -8
- package/build/commands/{ai-studio/canvas → canvas}/update-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas-edge → canvas-edge}/create-canvas-edge.command.js +2 -2
- package/build/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edge-by-source-and-target.query.js +1 -1
- package/build/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edges-by-canvas.query.js +1 -1
- package/build/commands/{ai-studio/canvas-node → canvas-node}/create-canvas-node.command.js +4 -8
- package/build/commands/{ai-studio/canvas-node → canvas-node}/delete-canvas-node.command.js +2 -2
- package/build/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-by-uuid.query.js +2 -2
- package/build/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-definitions-with-configs.query.js +1 -1
- package/build/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-nodes-by-canvas.query.js +1 -1
- package/build/commands/{ai-studio/canvas-node → canvas-node}/update-canvas-node.command.js +5 -13
- package/build/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-from-template.command.js +1 -1
- package/build/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-template.command.js +2 -6
- package/build/commands/{ai-studio/canvas-template → canvas-template}/delete-canvas-template.command.js +2 -3
- package/build/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-template-by-uuid.query.js +1 -1
- package/build/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-templates.query.js +1 -6
- package/build/commands/{ai-studio/canvas-template → canvas-template}/index.js +1 -2
- package/build/commands/{ai-studio/canvas-template → canvas-template}/update-canvas-template.command.js +2 -6
- package/build/commands/category/create-category-translation.command.js +21 -0
- package/build/commands/category/create-category.command.js +4 -0
- package/build/commands/category/get-all-category-translations.query.js +14 -0
- package/build/commands/category/index.js +3 -0
- package/build/commands/category/update-category-translation.command.js +21 -0
- package/build/commands/category/update-category.command.js +4 -0
- package/build/commands/course/create-course-translation.command.js +22 -0
- package/build/commands/course/create-course.command.js +5 -0
- package/build/commands/course/create-lesson-translation.command.js +18 -0
- package/build/commands/course/create-section-translation.command.js +18 -0
- package/build/commands/course/get-all-course-translations.query.js +14 -0
- package/build/commands/course/get-all-lesson-translations.query.js +14 -0
- package/build/commands/course/get-all-section-translations.query.js +14 -0
- package/build/commands/course/index.js +9 -0
- package/build/commands/course/update-course-translation.command.js +22 -0
- package/build/commands/course/update-lesson-translation.command.js +18 -0
- package/build/commands/course/update-section-translation.command.js +18 -0
- package/build/commands/index.js +4 -5
- package/build/commands/page/create-page-translation.command.js +23 -0
- package/build/commands/page/create-page.command.js +6 -0
- package/build/commands/page/find-page.command.js +10 -2
- package/build/commands/page/get-all-page-translations.query.js +14 -0
- package/build/commands/page/index.js +3 -0
- package/build/commands/page/update-page-translation.command.js +23 -0
- package/build/commands/page/update-page.command.js +5 -0
- package/build/commands/prompt/create-prompt-translation.command.js +19 -0
- package/build/commands/prompt/create-prompt.command.js +2 -0
- package/build/commands/prompt/get-all-prompt-translations.query.js +14 -0
- package/build/commands/prompt/index.js +3 -0
- package/build/commands/prompt/update-prompt-translation.command.js +19 -0
- package/build/commands/prompt/update-prompt.command.js +2 -0
- package/build/commands/prompt-category/create-prompt-category-translation.command.js +20 -0
- package/build/commands/prompt-category/create-prompt-category.command.js +3 -0
- package/build/commands/prompt-category/get-all-prompt-category-translations.query.js +14 -0
- package/build/commands/prompt-category/index.js +3 -0
- package/build/commands/prompt-category/update-prompt-category-translation.command.js +20 -0
- package/build/commands/prompt-category/update-prompt-category.command.js +3 -0
- package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +22 -0
- package/build/commands/prompt-topic/create-prompt-topic.command.js +5 -0
- package/build/commands/prompt-topic/get-all-prompt-topic-translations.query.js +14 -0
- package/build/commands/prompt-topic/index.js +3 -0
- package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +22 -0
- package/build/commands/prompt-topic/update-prompt-topic.command.js +5 -0
- package/build/commands/question/create-question-translation.command.js +19 -0
- package/build/commands/question/create-question.command.js +2 -0
- package/build/commands/question/get-all-question-translations.query.js +14 -0
- package/build/commands/question/index.js +3 -0
- package/build/commands/question/update-question-translation.command.js +19 -0
- package/build/commands/question/update-question.command.js +2 -0
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +6 -13
- package/build/commands/team-account/get-team-account-statistics-overview.command.js +5 -1
- package/build/commands/team-account/index.js +1 -0
- package/build/commands/team-account/update-team-account-invite.command.js +17 -0
- package/build/commands/ui-notification/create-admin-broadcast-ui-notification.command.js +9 -2
- package/build/commands/unregistered-user/patch-locale.command.js +3 -3
- package/build/commands/user/get-me.command.js +2 -1
- package/build/commands/user/patch-locale.command.js +3 -3
- package/build/commands/user/send-telegram-notification.command.js +6 -1
- package/build/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +24 -0
- package/build/constants/subscription/enums/index.js +1 -0
- package/build/constants/subscription/enums/subscription-balance-field.enum.js +8 -0
- package/build/constants/tool/enums/index.js +0 -1
- package/build/constants/user/enums/index.js +0 -1
- package/build/models/canvas-node.schema.js +37 -140
- package/build/models/canvas-template.schema.js +5 -21
- package/build/models/category-translation.schema.js +16 -0
- package/build/models/course-translation.schema.js +17 -0
- package/build/models/index.js +10 -0
- package/build/models/lesson-translation.schema.js +13 -0
- package/build/models/page-translation.schema.js +18 -0
- package/build/models/post-translation.schema.js +18 -0
- package/build/models/prompt-category-translation.schema.js +18 -0
- package/build/models/prompt-topic-translation.schema.js +20 -0
- package/build/models/prompt-translation.schema.js +14 -0
- package/build/models/question-translation.schema.js +14 -0
- package/build/models/section-translation.schema.js +13 -0
- package/build/models/ui-notification.schema.js +13 -8
- package/build/models/user.schema.js +2 -2
- package/commands/blog/create-post-translation.command.ts +28 -0
- package/commands/blog/create-post.command.ts +6 -0
- package/commands/blog/get-all-post-translations.query.ts +16 -0
- package/commands/blog/index.ts +3 -0
- package/commands/blog/update-post-translation.command.ts +28 -0
- package/commands/blog/update-post.command.ts +6 -0
- package/commands/cabinet/get-user-statistics-by-month.command.ts +7 -14
- package/commands/cabinet/get-user-statistics-overview.command.ts +6 -2
- package/commands/{ai-studio/canvas → canvas}/create-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/delete-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid-with-relations.query.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid.query.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/find-canvases-by-user.query.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/run-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/save-canvas.command.ts +9 -13
- package/commands/{ai-studio/canvas → canvas}/update-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas-edge → canvas-edge}/create-canvas-edge.command.ts +2 -2
- package/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edge-by-source-and-target.query.ts +1 -1
- package/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edges-by-canvas.query.ts +1 -1
- package/commands/canvas-node/create-canvas-node.command.ts +25 -0
- package/commands/{ai-studio/canvas-node → canvas-node}/delete-canvas-node.command.ts +2 -2
- package/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-by-uuid.query.ts +2 -2
- package/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-definitions-with-configs.query.ts +1 -1
- package/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-nodes-by-canvas.query.ts +1 -1
- package/commands/canvas-node/update-canvas-node.command.ts +26 -0
- package/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-from-template.command.ts +1 -1
- package/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-template.command.ts +2 -7
- package/commands/{ai-studio/canvas-template → canvas-template}/delete-canvas-template.command.ts +2 -3
- package/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-template-by-uuid.query.ts +1 -1
- package/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-templates.query.ts +1 -6
- package/commands/{ai-studio/canvas-template → canvas-template}/index.ts +1 -2
- package/commands/{ai-studio/canvas-template → canvas-template}/update-canvas-template.command.ts +2 -11
- package/commands/category/create-category-translation.command.ts +26 -0
- package/commands/category/create-category.command.ts +4 -0
- package/commands/category/get-all-category-translations.query.ts +16 -0
- package/commands/category/index.ts +3 -0
- package/commands/category/update-category-translation.command.ts +26 -0
- package/commands/category/update-category.command.ts +4 -0
- package/commands/course/create-course-translation.command.ts +27 -0
- package/commands/course/create-course.command.ts +5 -0
- package/commands/course/create-lesson-translation.command.ts +23 -0
- package/commands/course/create-section-translation.command.ts +23 -0
- package/commands/course/get-all-course-translations.query.ts +16 -0
- package/commands/course/get-all-lesson-translations.query.ts +16 -0
- package/commands/course/get-all-section-translations.query.ts +16 -0
- package/commands/course/index.ts +9 -0
- package/commands/course/update-course-translation.command.ts +27 -0
- package/commands/course/update-lesson-translation.command.ts +23 -0
- package/commands/course/update-section-translation.command.ts +23 -0
- package/commands/index.ts +5 -5
- package/commands/page/create-page-translation.command.ts +28 -0
- package/commands/page/create-page.command.ts +6 -0
- package/commands/page/find-page.command.ts +15 -2
- package/commands/page/get-all-page-translations.query.ts +16 -0
- package/commands/page/index.ts +3 -0
- package/commands/page/update-page-translation.command.ts +28 -0
- package/commands/page/update-page.command.ts +5 -0
- package/commands/prompt/create-prompt-translation.command.ts +24 -0
- package/commands/prompt/create-prompt.command.ts +2 -0
- package/commands/prompt/get-all-prompt-translations.query.ts +16 -0
- package/commands/prompt/index.ts +3 -0
- package/commands/prompt/update-prompt-translation.command.ts +24 -0
- package/commands/prompt/update-prompt.command.ts +2 -0
- package/commands/prompt-category/create-prompt-category-translation.command.ts +25 -0
- package/commands/prompt-category/create-prompt-category.command.ts +3 -0
- package/commands/prompt-category/get-all-prompt-category-translations.query.ts +16 -0
- package/commands/prompt-category/index.ts +3 -0
- package/commands/prompt-category/update-prompt-category-translation.command.ts +25 -0
- package/commands/prompt-category/update-prompt-category.command.ts +3 -0
- package/commands/prompt-topic/create-prompt-topic-translation.command.ts +27 -0
- package/commands/prompt-topic/create-prompt-topic.command.ts +5 -0
- package/commands/prompt-topic/get-all-prompt-topic-translations.query.ts +16 -0
- package/commands/prompt-topic/index.ts +3 -0
- package/commands/prompt-topic/update-prompt-topic-translation.command.ts +27 -0
- package/commands/prompt-topic/update-prompt-topic.command.ts +5 -0
- package/commands/question/create-question-translation.command.ts +24 -0
- package/commands/question/create-question.command.ts +2 -0
- package/commands/question/get-all-question-translations.query.ts +16 -0
- package/commands/question/index.ts +3 -0
- package/commands/question/update-question-translation.command.ts +24 -0
- package/commands/question/update-question.command.ts +2 -0
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +7 -14
- package/commands/team-account/get-team-account-statistics-overview.command.ts +6 -2
- package/commands/team-account/index.ts +1 -0
- package/commands/team-account/update-team-account-invite.command.ts +22 -0
- package/commands/ui-notification/create-admin-broadcast-ui-notification.command.ts +9 -2
- package/commands/unregistered-user/patch-locale.command.ts +1 -1
- package/commands/user/get-me.command.ts +2 -1
- package/commands/user/patch-locale.command.ts +1 -1
- package/commands/user/send-telegram-notification.command.ts +8 -1
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-request-type.enum.ts +20 -0
- package/constants/subscription/enums/index.ts +1 -0
- package/constants/subscription/enums/subscription-balance-field.enum.ts +4 -0
- package/constants/tool/enums/index.ts +0 -1
- package/constants/user/enums/index.ts +0 -1
- package/models/canvas-node.schema.ts +41 -167
- package/models/canvas-template.schema.ts +9 -28
- package/models/category-translation.schema.ts +14 -0
- package/models/course-translation.schema.ts +15 -0
- package/models/index.ts +10 -0
- package/models/lesson-translation.schema.ts +11 -0
- package/models/page-translation.schema.ts +16 -0
- package/models/post-translation.schema.ts +16 -0
- package/models/prompt-category-translation.schema.ts +13 -0
- package/models/prompt-topic-translation.schema.ts +15 -0
- package/models/prompt-translation.schema.ts +12 -0
- package/models/question-translation.schema.ts +12 -0
- package/models/section-translation.schema.ts +11 -0
- package/models/ui-notification.schema.ts +14 -7
- package/models/user.schema.ts +1 -1
- package/package.json +2 -1
- package/api/controllers/http/palette.ts +0 -6
- package/build/api/controllers/http/palette.js +0 -8
- package/build/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.js +0 -14
- package/build/commands/ai-studio/canvas-tool/index.js +0 -17
- package/build/commands/ai-studio/canvas-tool/palette/generate-palette.command.js +0 -20
- package/build/commands/ai-studio/canvas-tool/palette/get-palette-price.command.js +0 -17
- package/build/commands/ai-studio/canvas-tool/palette/index.js +0 -18
- package/build/commands/ai-studio/index.js +0 -21
- package/build/constants/tool/enums/job-request-origin.enum.js +0 -8
- package/build/constants/user/enums/locale.enum.js +0 -8
- package/commands/ai-studio/canvas-node/create-canvas-node.command.ts +0 -33
- package/commands/ai-studio/canvas-node/update-canvas-node.command.ts +0 -40
- package/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.ts +0 -16
- package/commands/ai-studio/canvas-tool/index.ts +0 -1
- package/commands/ai-studio/canvas-tool/palette/generate-palette.command.ts +0 -23
- package/commands/ai-studio/canvas-tool/palette/get-palette-price.command.ts +0 -17
- package/commands/ai-studio/canvas-tool/palette/index.ts +0 -2
- package/commands/ai-studio/index.ts +0 -5
- package/constants/tool/enums/job-request-origin.enum.ts +0 -4
- package/constants/user/enums/locale.enum.ts +0 -4
- /package/build/commands/{ai-studio/canvas → canvas}/index.js +0 -0
- /package/build/commands/{ai-studio/canvas-edge → canvas-edge}/delete-canvas-edge.command.js +0 -0
- /package/build/commands/{ai-studio/canvas-edge → canvas-edge}/index.js +0 -0
- /package/build/commands/{ai-studio/canvas-node → canvas-node}/index.js +0 -0
- /package/commands/{ai-studio/canvas → canvas}/index.ts +0 -0
- /package/commands/{ai-studio/canvas-edge → canvas-edge}/delete-canvas-edge.command.ts +0 -0
- /package/commands/{ai-studio/canvas-edge → canvas-edge}/index.ts +0 -0
- /package/commands/{ai-studio/canvas-node → canvas-node}/index.ts +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
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 = {}));
|
|
@@ -1,17 +0,0 @@
|
|
|
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 = {}));
|
|
@@ -1,18 +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("./generate-palette.command"), exports);
|
|
18
|
-
__exportStar(require("./get-palette-price.command"), exports);
|
|
@@ -1,21 +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"), 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);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JOB_REQUEST_ORIGIN = void 0;
|
|
4
|
-
var JOB_REQUEST_ORIGIN;
|
|
5
|
-
(function (JOB_REQUEST_ORIGIN) {
|
|
6
|
-
JOB_REQUEST_ORIGIN["API"] = "api";
|
|
7
|
-
JOB_REQUEST_ORIGIN["B2B"] = "b2b";
|
|
8
|
-
})(JOB_REQUEST_ORIGIN || (exports.JOB_REQUEST_ORIGIN = JOB_REQUEST_ORIGIN = {}));
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { CANVAS_NODE_TYPE } from '../../../constants';
|
|
3
|
-
import {
|
|
4
|
-
CanvasNodePositionSchema,
|
|
5
|
-
CanvasNodeSchema,
|
|
6
|
-
validateCanvasNodeParamsByType,
|
|
7
|
-
} from '../../../models';
|
|
8
|
-
|
|
9
|
-
export namespace CreateCanvasNodeCommand {
|
|
10
|
-
export const RequestParamSchema = z.object({
|
|
11
|
-
canvasId: z.string().uuid(),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
15
|
-
|
|
16
|
-
export const RequestSchema = z
|
|
17
|
-
.object({
|
|
18
|
-
nodeDefinitionId: z.nativeEnum(CANVAS_NODE_TYPE),
|
|
19
|
-
position: CanvasNodePositionSchema,
|
|
20
|
-
params: z.unknown().nullable().optional(),
|
|
21
|
-
})
|
|
22
|
-
.superRefine((request, ctx) => {
|
|
23
|
-
validateCanvasNodeParamsByType(request.nodeDefinitionId, request.params, ctx);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
27
|
-
|
|
28
|
-
export const ResponseSchema = z.object({
|
|
29
|
-
data: CanvasNodeSchema,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
33
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { CANVAS_NODE_TYPE } from '../../../constants';
|
|
3
|
-
import {
|
|
4
|
-
CanvasNodeBaseSchema,
|
|
5
|
-
CanvasNodePositionSchema,
|
|
6
|
-
CanvasNodeSchema,
|
|
7
|
-
validateCanvasNodeOutputByType,
|
|
8
|
-
validateCanvasNodeParamsByType,
|
|
9
|
-
} from '../../../models';
|
|
10
|
-
|
|
11
|
-
export namespace UpdateCanvasNodeCommand {
|
|
12
|
-
export const RequestParamSchema = CanvasNodeBaseSchema.pick({
|
|
13
|
-
canvasId: true,
|
|
14
|
-
uuid: true,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
18
|
-
|
|
19
|
-
export const RequestSchema = z
|
|
20
|
-
.object({
|
|
21
|
-
nodeDefinitionId: z.nativeEnum(CANVAS_NODE_TYPE).optional(),
|
|
22
|
-
position: CanvasNodePositionSchema.optional(),
|
|
23
|
-
params: z.unknown().nullable().optional(),
|
|
24
|
-
output: z.unknown().nullable().optional(),
|
|
25
|
-
})
|
|
26
|
-
.superRefine((request, ctx) => {
|
|
27
|
-
if (request.nodeDefinitionId !== undefined) {
|
|
28
|
-
validateCanvasNodeParamsByType(request.nodeDefinitionId, request.params, ctx);
|
|
29
|
-
validateCanvasNodeOutputByType(request.nodeDefinitionId, request.output, ctx);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
34
|
-
|
|
35
|
-
export const ResponseSchema = z.object({
|
|
36
|
-
data: CanvasNodeSchema,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
40
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { CanvasTemplateSchema } from '../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GenerateCanvasTemplateByPromptCommand {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
prompt: z.string().trim().min(1),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
-
|
|
11
|
-
export const ResponseSchema = z.object({
|
|
12
|
-
data: CanvasTemplateSchema,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './palette';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
const HexColorSchema = z.string().regex(/^#[0-9A-Fa-f]{6}$/);
|
|
4
|
-
|
|
5
|
-
export namespace GeneratePaletteCommand {
|
|
6
|
-
export const PaletteSchema = z.object({
|
|
7
|
-
colors: z.array(HexColorSchema).max(7),
|
|
8
|
-
});
|
|
9
|
-
export type Palette = z.infer<typeof PaletteSchema>;
|
|
10
|
-
|
|
11
|
-
export const RequestSchema = z.object({
|
|
12
|
-
nodeUuid: z.string().uuid(),
|
|
13
|
-
canvasId: z.string().uuid(),
|
|
14
|
-
prompt: z.string().min(1),
|
|
15
|
-
colors: z.array(HexColorSchema).optional(),
|
|
16
|
-
});
|
|
17
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
-
|
|
19
|
-
export const ResponseSchema = z.object({
|
|
20
|
-
data: PaletteSchema,
|
|
21
|
-
});
|
|
22
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
23
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export namespace GetPalettePriceCommand {
|
|
4
|
-
export const RequestSchema = z.object({
|
|
5
|
-
promptLength: z.coerce.number().positive(),
|
|
6
|
-
});
|
|
7
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
-
|
|
9
|
-
export const ResponseSchema = z.object({
|
|
10
|
-
data: z.object({
|
|
11
|
-
price: z.number(),
|
|
12
|
-
charsUntilNextPriceIncrease: z.number().int().nonnegative().nullable().optional(),
|
|
13
|
-
charsUntilNextPriceDecrease: z.number().int().nonnegative().nullable().optional(),
|
|
14
|
-
}),
|
|
15
|
-
});
|
|
16
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|