@purpleschool/gptbot 0.14.13-avatar-studio → 0.14.14-avatar-studio
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/photo-studio.ts +1 -0
- package/api/routes.ts +1 -0
- package/build/api/controllers/http/photo-studio.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/photo-studio/get-photo-studio-config.query.js +16 -0
- package/build/commands/photo-studio/index.js +1 -0
- package/build/constants/tool/enums/tool-type.enum.js +1 -0
- package/commands/photo-studio/get-photo-studio-config.query.ts +18 -0
- package/commands/photo-studio/index.ts +1 -0
- package/constants/tool/enums/tool-type.enum.ts +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ export const PHOTO_STUDIO_PRIVATE_CONTROLLER = 'private/photo-studio' as const;
|
|
|
2
2
|
|
|
3
3
|
export const PHOTO_STUDIO_ROUTES = {
|
|
4
4
|
ACTIONS: 'actions',
|
|
5
|
+
CONFIG: 'config',
|
|
5
6
|
EXECUTE: (canvasId: string) => `canvases/${canvasId}/execute`,
|
|
6
7
|
CREATE_CANVAS: 'canvases',
|
|
7
8
|
GET_CANVASES: 'canvases',
|
package/api/routes.ts
CHANGED
|
@@ -1717,6 +1717,7 @@ export const REST_API = {
|
|
|
1717
1717
|
},
|
|
1718
1718
|
PHOTO_STUDIO_PRIVATE: {
|
|
1719
1719
|
ACTIONS: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ACTIONS}`,
|
|
1720
|
+
CONFIG: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CONFIG}`,
|
|
1720
1721
|
CREATE_CANVAS: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CREATE_CANVAS}`,
|
|
1721
1722
|
GET_CANVASES: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVASES}`,
|
|
1722
1723
|
GET_CANVAS: (canvasId: string) =>
|
|
@@ -4,6 +4,7 @@ exports.PHOTO_STUDIO_ROUTES = exports.PHOTO_STUDIO_PRIVATE_CONTROLLER = void 0;
|
|
|
4
4
|
exports.PHOTO_STUDIO_PRIVATE_CONTROLLER = 'private/photo-studio';
|
|
5
5
|
exports.PHOTO_STUDIO_ROUTES = {
|
|
6
6
|
ACTIONS: 'actions',
|
|
7
|
+
CONFIG: 'config',
|
|
7
8
|
EXECUTE: (canvasId) => `canvases/${canvasId}/execute`,
|
|
8
9
|
CREATE_CANVAS: 'canvases',
|
|
9
10
|
GET_CANVASES: 'canvases',
|
package/build/api/routes.js
CHANGED
|
@@ -1230,6 +1230,7 @@ exports.REST_API = {
|
|
|
1230
1230
|
},
|
|
1231
1231
|
PHOTO_STUDIO_PRIVATE: {
|
|
1232
1232
|
ACTIONS: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ACTIONS}`,
|
|
1233
|
+
CONFIG: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CONFIG}`,
|
|
1233
1234
|
CREATE_CANVAS: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CREATE_CANVAS}`,
|
|
1234
1235
|
GET_CANVASES: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVASES}`,
|
|
1235
1236
|
GET_CANVAS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVAS(canvasId)}`,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPhotoStudioConfigQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
var GetPhotoStudioConfigQuery;
|
|
8
|
+
(function (GetPhotoStudioConfigQuery) {
|
|
9
|
+
GetPhotoStudioConfigQuery.ConfigSchema = zod_1.z.object({
|
|
10
|
+
[constants_1.TOOL_TYPE.IMAGE_GENERATION]: models_1.ImageGenerationConfigSchema,
|
|
11
|
+
[constants_1.TOOL_TYPE.IMAGE]: models_1.ImageEditorConfigSchema,
|
|
12
|
+
});
|
|
13
|
+
GetPhotoStudioConfigQuery.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: GetPhotoStudioConfigQuery.ConfigSchema,
|
|
15
|
+
});
|
|
16
|
+
})(GetPhotoStudioConfigQuery || (exports.GetPhotoStudioConfigQuery = GetPhotoStudioConfigQuery = {}));
|
|
@@ -26,6 +26,7 @@ __exportStar(require("./find-photo-studio-checkpoints.query"), exports);
|
|
|
26
26
|
__exportStar(require("./find-photo-studio-job-by-id.query"), exports);
|
|
27
27
|
__exportStar(require("./find-photo-studio-jobs.query"), exports);
|
|
28
28
|
__exportStar(require("./get-photo-studio-actions.query"), exports);
|
|
29
|
+
__exportStar(require("./get-photo-studio-config.query"), exports);
|
|
29
30
|
__exportStar(require("./save-photo-studio-canvas.command"), exports);
|
|
30
31
|
__exportStar(require("./update-photo-studio-canvas.command"), exports);
|
|
31
32
|
__exportStar(require("./update-photo-studio-checkpoint.command"), exports);
|
|
@@ -21,4 +21,5 @@ var TOOL_TYPE;
|
|
|
21
21
|
TOOL_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
22
|
TOOL_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
23
23
|
TOOL_TYPE["HTML_PAGE_BUILDER"] = "HTML_PAGE_BUILDER";
|
|
24
|
+
TOOL_TYPE["DIAGRAMS"] = "DIAGRAMS";
|
|
24
25
|
})(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_TYPE } from '../../constants';
|
|
3
|
+
import { ImageEditorConfigSchema, ImageGenerationConfigSchema } from '../../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetPhotoStudioConfigQuery {
|
|
6
|
+
export const ConfigSchema = z.object({
|
|
7
|
+
[TOOL_TYPE.IMAGE_GENERATION]: ImageGenerationConfigSchema,
|
|
8
|
+
[TOOL_TYPE.IMAGE]: ImageEditorConfigSchema,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type Config = z.infer<typeof ConfigSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: ConfigSchema,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -10,6 +10,7 @@ export * from './find-photo-studio-checkpoints.query';
|
|
|
10
10
|
export * from './find-photo-studio-job-by-id.query';
|
|
11
11
|
export * from './find-photo-studio-jobs.query';
|
|
12
12
|
export * from './get-photo-studio-actions.query';
|
|
13
|
+
export * from './get-photo-studio-config.query';
|
|
13
14
|
export * from './save-photo-studio-canvas.command';
|
|
14
15
|
export * from './update-photo-studio-canvas.command';
|
|
15
16
|
export * from './update-photo-studio-checkpoint.command';
|