@purpleschool/gptbot 0.14.17 → 0.14.19
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 +5 -0
- package/api/controllers/http/update-post.ts +1 -0
- package/api/routes.ts +37 -0
- package/build/api/controllers/http/photo-studio.js +4 -1
- package/build/api/controllers/http/update-post.js +1 -0
- package/build/api/routes.js +22 -0
- package/build/commands/photo-studio/create-photo-studio-canvas.command.js +1 -1
- package/build/commands/photo-studio/execute-photo-studio-action.command.js +151 -19
- package/build/commands/photo-studio/find-photo-studio-canvas-by-uuid.query.js +1 -1
- package/build/commands/photo-studio/find-photo-studio-canvases.query.js +1 -1
- package/build/commands/photo-studio/find-photo-studio-job-by-id.query.js +1 -1
- package/build/commands/photo-studio/index.js +2 -0
- package/build/commands/photo-studio/move-photo-studio-image.command.js +19 -0
- package/build/commands/photo-studio/rename-photo-studio-image.command.js +19 -0
- package/build/commands/photo-studio/save-photo-studio-canvas.command.js +1 -1
- package/build/commands/photo-studio/update-photo-studio-canvas.command.js +1 -1
- package/build/commands/update-post/delete-update-post.command.js +25 -0
- package/build/commands/update-post/index.js +1 -0
- package/build/constants/page/enums/page-type.enum.js +0 -1
- package/build/models/photo-studio/photo-studio-image-node.schema.js +2 -0
- package/build/models/photo-studio/photo-studio.schema.js +4 -6
- package/commands/photo-studio/create-photo-studio-canvas.command.ts +2 -2
- package/commands/photo-studio/execute-photo-studio-action.command.ts +165 -20
- package/commands/photo-studio/find-photo-studio-canvas-by-uuid.query.ts +2 -2
- package/commands/photo-studio/find-photo-studio-canvases.query.ts +1 -1
- package/commands/photo-studio/find-photo-studio-job-by-id.query.ts +2 -2
- package/commands/photo-studio/index.ts +2 -0
- package/commands/photo-studio/move-photo-studio-image.command.ts +21 -0
- package/commands/photo-studio/rename-photo-studio-image.command.ts +21 -0
- package/commands/photo-studio/save-photo-studio-canvas.command.ts +2 -2
- package/commands/photo-studio/update-photo-studio-canvas.command.ts +2 -2
- package/commands/update-post/delete-update-post.command.ts +26 -0
- package/commands/update-post/index.ts +1 -0
- package/constants/page/enums/page-type.enum.ts +0 -1
- package/models/photo-studio/photo-studio-image-node.schema.ts +2 -0
- package/models/photo-studio/photo-studio.schema.ts +3 -7
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const PHOTO_STUDIO_PRIVATE_CONTROLLER = 'private/photo-studio' as const;
|
|
2
|
+
export const PHOTO_STUDIO_PUBLIC_CONTROLLER = 'public/photo-studio' as const;
|
|
2
3
|
|
|
3
4
|
export const PHOTO_STUDIO_ROUTES = {
|
|
4
5
|
ACTIONS: 'actions',
|
|
@@ -12,6 +13,10 @@ export const PHOTO_STUDIO_ROUTES = {
|
|
|
12
13
|
SAVE_CANVAS: (uuid: string) => `canvases/${uuid}/save`,
|
|
13
14
|
UPDATE_CANVAS: (uuid: string) => `canvases/${uuid}`,
|
|
14
15
|
DELETE_CANVAS: (uuid: string) => `canvases/${uuid}`,
|
|
16
|
+
MOVE_IMAGE: (canvasId: string, imageId: string) =>
|
|
17
|
+
`canvases/${canvasId}/images/${imageId}/position`,
|
|
18
|
+
RENAME_IMAGE: (canvasId: string, imageId: string) =>
|
|
19
|
+
`canvases/${canvasId}/images/${imageId}/name`,
|
|
15
20
|
GET_CHECKPOINTS: (canvasId: string) => `canvases/${canvasId}/checkpoints`,
|
|
16
21
|
ADD_CHECKPOINT: (canvasId: string) => `canvases/${canvasId}/checkpoints`,
|
|
17
22
|
UPDATE_CHECKPOINT: (canvasId: string, checkpointId: string) =>
|
|
@@ -3,6 +3,7 @@ export const UPDATE_POST_ADMIN_CONTROLLER = 'update-post/admin' as const;
|
|
|
3
3
|
|
|
4
4
|
export const UPDATE_POST_ROUTES = {
|
|
5
5
|
CREATE: 'create',
|
|
6
|
+
DELETE: 'delete',
|
|
6
7
|
UPDATE: (uuid: string) => `${uuid}`,
|
|
7
8
|
FIND_BY_UUID: (uuid: string) => `by/uuid/${uuid}`,
|
|
8
9
|
FIND_BY_SLUG: (slug: string) => `by/slug/${slug}`,
|
package/api/routes.ts
CHANGED
|
@@ -487,6 +487,7 @@ export const REST_API = {
|
|
|
487
487
|
CREATE: `${ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.CREATE}`,
|
|
488
488
|
PATCH: (uuid: string) =>
|
|
489
489
|
`${ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.UPDATE(uuid)}`,
|
|
490
|
+
DELETE: `${ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.DELETE}`,
|
|
490
491
|
GET_BY_UUID: (uuid: string) =>
|
|
491
492
|
`${ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
492
493
|
GET_BY_SLUG: (slug: string) =>
|
|
@@ -1746,5 +1747,41 @@ export const REST_API = {
|
|
|
1746
1747
|
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1747
1748
|
CLEAR_CHECKPOINS: (canvasdId: string) =>
|
|
1748
1749
|
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CLEAR_CHECKPOINTS(canvasdId)}`,
|
|
1750
|
+
MOVE_IMAGE: (canvasId: string, imageId: string) =>
|
|
1751
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.MOVE_IMAGE(canvasId, imageId)}`,
|
|
1752
|
+
RENAME_IMAGE: (canvasId: string, imageId: string) =>
|
|
1753
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.RENAME_IMAGE(canvasId, imageId)}`
|
|
1754
|
+
},
|
|
1755
|
+
PHOTO_STUDIO_PUBLIC: {
|
|
1756
|
+
ACTIONS: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ACTIONS}`,
|
|
1757
|
+
CONFIG: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CONFIG}`,
|
|
1758
|
+
CREATE_CANVAS: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CREATE_CANVAS}`,
|
|
1759
|
+
GET_CANVASES: `${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVASES}`,
|
|
1760
|
+
GET_CANVAS: (canvasId: string) =>
|
|
1761
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVAS(canvasId)}`,
|
|
1762
|
+
GET_JOBS: (canvasId: string) =>
|
|
1763
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_JOBS(canvasId)}`,
|
|
1764
|
+
GET_JOB: (canvasId: string, jobId: string) =>
|
|
1765
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_JOB(canvasId, jobId)}`,
|
|
1766
|
+
SAVE_CANVAS: (canvasId: string) =>
|
|
1767
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.SAVE_CANVAS(canvasId)}`,
|
|
1768
|
+
UPDATE_CANVAS: (canvasId: string) =>
|
|
1769
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CANVAS(canvasId)}`,
|
|
1770
|
+
DELETE_CANVAS: (canvasId: string) =>
|
|
1771
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CANVAS(canvasId)}`,
|
|
1772
|
+
GET_CHECKPOINTS: (canvasId: string) =>
|
|
1773
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CHECKPOINTS(canvasId)}`,
|
|
1774
|
+
ADD_CHECKPOINT: (canvasId: string) =>
|
|
1775
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ADD_CHECKPOINT(canvasId)}`,
|
|
1776
|
+
UPDATE_CHECKPOINT: (canvasId: string, checkpointId: string) =>
|
|
1777
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1778
|
+
DELETE_CHECKPOINT: (canvasId: string, checkpointId: string) =>
|
|
1779
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1780
|
+
CLEAR_CHECKPOINS: (canvasdId: string) =>
|
|
1781
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CLEAR_CHECKPOINTS(canvasdId)}`,
|
|
1782
|
+
MOVE_IMAGE: (canvasId: string, imageId: string) =>
|
|
1783
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.MOVE_IMAGE(canvasId, imageId)}`,
|
|
1784
|
+
RENAME_IMAGE: (canvasId: string, imageId: string) =>
|
|
1785
|
+
`${ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.RENAME_IMAGE(canvasId, imageId)}`
|
|
1749
1786
|
},
|
|
1750
1787
|
} as const;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PHOTO_STUDIO_ROUTES = exports.PHOTO_STUDIO_PRIVATE_CONTROLLER = void 0;
|
|
3
|
+
exports.PHOTO_STUDIO_ROUTES = exports.PHOTO_STUDIO_PUBLIC_CONTROLLER = exports.PHOTO_STUDIO_PRIVATE_CONTROLLER = void 0;
|
|
4
4
|
exports.PHOTO_STUDIO_PRIVATE_CONTROLLER = 'private/photo-studio';
|
|
5
|
+
exports.PHOTO_STUDIO_PUBLIC_CONTROLLER = 'public/photo-studio';
|
|
5
6
|
exports.PHOTO_STUDIO_ROUTES = {
|
|
6
7
|
ACTIONS: 'actions',
|
|
7
8
|
CONFIG: 'config',
|
|
@@ -14,6 +15,8 @@ exports.PHOTO_STUDIO_ROUTES = {
|
|
|
14
15
|
SAVE_CANVAS: (uuid) => `canvases/${uuid}/save`,
|
|
15
16
|
UPDATE_CANVAS: (uuid) => `canvases/${uuid}`,
|
|
16
17
|
DELETE_CANVAS: (uuid) => `canvases/${uuid}`,
|
|
18
|
+
MOVE_IMAGE: (canvasId, imageId) => `canvases/${canvasId}/images/${imageId}/position`,
|
|
19
|
+
RENAME_IMAGE: (canvasId, imageId) => `canvases/${canvasId}/images/${imageId}/name`,
|
|
17
20
|
GET_CHECKPOINTS: (canvasId) => `canvases/${canvasId}/checkpoints`,
|
|
18
21
|
ADD_CHECKPOINT: (canvasId) => `canvases/${canvasId}/checkpoints`,
|
|
19
22
|
UPDATE_CHECKPOINT: (canvasId, checkpointId) => `canvases/${canvasId}/checkpoints/${checkpointId}`,
|
|
@@ -5,6 +5,7 @@ exports.UPDATE_POST_CONTROLLER = 'update-post';
|
|
|
5
5
|
exports.UPDATE_POST_ADMIN_CONTROLLER = 'update-post/admin';
|
|
6
6
|
exports.UPDATE_POST_ROUTES = {
|
|
7
7
|
CREATE: 'create',
|
|
8
|
+
DELETE: 'delete',
|
|
8
9
|
UPDATE: (uuid) => `${uuid}`,
|
|
9
10
|
FIND_BY_UUID: (uuid) => `by/uuid/${uuid}`,
|
|
10
11
|
FIND_BY_SLUG: (slug) => `by/slug/${slug}`,
|
package/build/api/routes.js
CHANGED
|
@@ -387,6 +387,7 @@ exports.REST_API = {
|
|
|
387
387
|
UPDATE_POSTS: {
|
|
388
388
|
CREATE: `${exports.ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.CREATE}`,
|
|
389
389
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.UPDATE(uuid)}`,
|
|
390
|
+
DELETE: `${exports.ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.DELETE}`,
|
|
390
391
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
391
392
|
GET_BY_SLUG: (slug) => `${exports.ROOT}/${CONTROLLERS.UPDATE_POST_ADMIN_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.FIND_BY_SLUG(slug)}`,
|
|
392
393
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.UPDATE_POST_CONTROLLER}/${CONTROLLERS.UPDATE_POST_ROUTES.FIND_ALL}`,
|
|
@@ -1247,5 +1248,26 @@ exports.REST_API = {
|
|
|
1247
1248
|
UPDATE_CHECKPOINT: (canvasId, checkpointId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1248
1249
|
DELETE_CHECKPOINT: (canvasId, checkpointId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1249
1250
|
CLEAR_CHECKPOINS: (canvasdId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CLEAR_CHECKPOINTS(canvasdId)}`,
|
|
1251
|
+
MOVE_IMAGE: (canvasId, imageId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.MOVE_IMAGE(canvasId, imageId)}`,
|
|
1252
|
+
RENAME_IMAGE: (canvasId, imageId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PRIVATE_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.RENAME_IMAGE(canvasId, imageId)}`
|
|
1253
|
+
},
|
|
1254
|
+
PHOTO_STUDIO_PUBLIC: {
|
|
1255
|
+
ACTIONS: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ACTIONS}`,
|
|
1256
|
+
CONFIG: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CONFIG}`,
|
|
1257
|
+
CREATE_CANVAS: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CREATE_CANVAS}`,
|
|
1258
|
+
GET_CANVASES: `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVASES}`,
|
|
1259
|
+
GET_CANVAS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CANVAS(canvasId)}`,
|
|
1260
|
+
GET_JOBS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_JOBS(canvasId)}`,
|
|
1261
|
+
GET_JOB: (canvasId, jobId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_JOB(canvasId, jobId)}`,
|
|
1262
|
+
SAVE_CANVAS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.SAVE_CANVAS(canvasId)}`,
|
|
1263
|
+
UPDATE_CANVAS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CANVAS(canvasId)}`,
|
|
1264
|
+
DELETE_CANVAS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CANVAS(canvasId)}`,
|
|
1265
|
+
GET_CHECKPOINTS: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.GET_CHECKPOINTS(canvasId)}`,
|
|
1266
|
+
ADD_CHECKPOINT: (canvasId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.ADD_CHECKPOINT(canvasId)}`,
|
|
1267
|
+
UPDATE_CHECKPOINT: (canvasId, checkpointId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.UPDATE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1268
|
+
DELETE_CHECKPOINT: (canvasId, checkpointId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.DELETE_CHECKPOINT(canvasId, checkpointId)}`,
|
|
1269
|
+
CLEAR_CHECKPOINS: (canvasdId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.CLEAR_CHECKPOINTS(canvasdId)}`,
|
|
1270
|
+
MOVE_IMAGE: (canvasId, imageId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.MOVE_IMAGE(canvasId, imageId)}`,
|
|
1271
|
+
RENAME_IMAGE: (canvasId, imageId) => `${exports.ROOT}/${CONTROLLERS.PHOTO_STUDIO_PUBLIC_CONTROLLER}/${CONTROLLERS.PHOTO_STUDIO_ROUTES.RENAME_IMAGE(canvasId, imageId)}`
|
|
1250
1272
|
},
|
|
1251
1273
|
};
|
|
@@ -10,6 +10,6 @@ var CreatePhotoStudioCanvasCommand;
|
|
|
10
10
|
images: zod_1.z.array(models_1.PhotoStudioImageInputSchema).default([]).optional(),
|
|
11
11
|
});
|
|
12
12
|
CreatePhotoStudioCanvasCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
-
data: models_1.
|
|
13
|
+
data: models_1.PhotoStudioCanvasSchema,
|
|
14
14
|
});
|
|
15
15
|
})(CreatePhotoStudioCanvasCommand || (exports.CreatePhotoStudioCanvasCommand = CreatePhotoStudioCanvasCommand = {}));
|
|
@@ -7,30 +7,162 @@ const image_generation_resolution_enum_1 = require("../../constants/tool-image-g
|
|
|
7
7
|
const models_1 = require("../../models");
|
|
8
8
|
var ExecutePhotoStudioActionCommand;
|
|
9
9
|
(function (ExecutePhotoStudioActionCommand) {
|
|
10
|
-
|
|
10
|
+
const GenerationParamsSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
enhancePrompt: zod_1.z.boolean().optional(),
|
|
13
|
+
resolution: zod_1.z.nativeEnum(image_generation_resolution_enum_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
14
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict()
|
|
17
|
+
.default({});
|
|
18
|
+
const OneImageParamsSchema = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
enhancePrompt: zod_1.z.boolean().optional(),
|
|
21
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
22
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
23
|
+
})
|
|
24
|
+
.strict();
|
|
25
|
+
const EditParamsSchema = OneImageParamsSchema;
|
|
26
|
+
const EffectsParamsSchema = zod_1.z
|
|
27
|
+
.object({
|
|
28
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
29
|
+
effect: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_EFFECT_ALIAS),
|
|
30
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
31
|
+
})
|
|
32
|
+
.strict();
|
|
33
|
+
const RemoveBackgroundParamsSchema = zod_1.z
|
|
34
|
+
.object({
|
|
35
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
const VariationsParamsSchema = zod_1.z
|
|
39
|
+
.object({
|
|
40
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
41
|
+
variationsCount: zod_1.z.union([zod_1.z.literal(2), zod_1.z.literal(3), zod_1.z.literal(4)]).optional(),
|
|
42
|
+
variationStrength: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_VARIATION_STRENGTH_ALIAS).optional(),
|
|
43
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
44
|
+
})
|
|
45
|
+
.strict();
|
|
46
|
+
const TextParamsSchema = zod_1.z
|
|
47
|
+
.object({
|
|
48
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
49
|
+
fontStyle: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_FONT_STYLE_ALIAS).optional(),
|
|
50
|
+
placement: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_PLACEMENT_ALIAS).optional(),
|
|
51
|
+
color: zod_1.z.string().optional(),
|
|
52
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
53
|
+
})
|
|
54
|
+
.strict();
|
|
55
|
+
const UpscaleParamsSchema = zod_1.z
|
|
56
|
+
.object({
|
|
57
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
58
|
+
size: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_UPSCALE_SIZE),
|
|
59
|
+
})
|
|
60
|
+
.strict();
|
|
61
|
+
const MergeParamsSchema = zod_1.z
|
|
62
|
+
.object({
|
|
63
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).min(2).max(5),
|
|
64
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
65
|
+
})
|
|
66
|
+
.strict();
|
|
67
|
+
const StyleParamsSchema = zod_1.z
|
|
68
|
+
.object({
|
|
69
|
+
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(2),
|
|
70
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
71
|
+
})
|
|
72
|
+
.strict();
|
|
73
|
+
const BaseRequestSchema = zod_1.z.object({
|
|
11
74
|
actionAlias: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_ACTION_ALIAS),
|
|
75
|
+
position: models_1.CanvasNodePositionSchema,
|
|
76
|
+
baseCheckpointSequence: zod_1.z.number().int().optional(),
|
|
77
|
+
});
|
|
78
|
+
const GenerationActionRequestSchema = BaseRequestSchema.extend({
|
|
79
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.GENERATE),
|
|
80
|
+
modelId: zod_1.z.string().uuid(),
|
|
81
|
+
prompt: zod_1.z.string().trim().min(1),
|
|
82
|
+
params: GenerationParamsSchema,
|
|
83
|
+
});
|
|
84
|
+
const EditActionRequestSchema = BaseRequestSchema.extend({
|
|
85
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.EDIT),
|
|
12
86
|
modelId: zod_1.z.string().uuid(),
|
|
13
87
|
prompt: zod_1.z.string().optional(),
|
|
14
|
-
params:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
88
|
+
params: EditParamsSchema,
|
|
89
|
+
});
|
|
90
|
+
const EffectsActionRequestSchema = BaseRequestSchema.extend({
|
|
91
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.EFFECTS),
|
|
92
|
+
modelId: zod_1.z.string().uuid(),
|
|
93
|
+
prompt: zod_1.z.string().optional(),
|
|
94
|
+
params: EffectsParamsSchema,
|
|
95
|
+
});
|
|
96
|
+
const OutpaintActionRequestSchema = BaseRequestSchema.extend({
|
|
97
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.OUTPAINT),
|
|
98
|
+
modelId: zod_1.z.string().uuid(),
|
|
99
|
+
prompt: zod_1.z.string().optional(),
|
|
100
|
+
params: OneImageParamsSchema,
|
|
101
|
+
});
|
|
102
|
+
const ReplaceBackgroundActionRequestSchema = BaseRequestSchema.extend({
|
|
103
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.REPLACE_BACKGROUND),
|
|
104
|
+
modelId: zod_1.z.string().uuid(),
|
|
105
|
+
prompt: zod_1.z.string().optional(),
|
|
106
|
+
params: OneImageParamsSchema,
|
|
107
|
+
});
|
|
108
|
+
const BrushActionRequestSchema = BaseRequestSchema.extend({
|
|
109
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.BRUSH),
|
|
110
|
+
modelId: zod_1.z.string().uuid(),
|
|
111
|
+
prompt: zod_1.z.string().optional(),
|
|
112
|
+
params: OneImageParamsSchema,
|
|
113
|
+
});
|
|
114
|
+
const MergeActionRequestSchema = BaseRequestSchema.extend({
|
|
115
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.MERGE),
|
|
116
|
+
modelId: zod_1.z.string().uuid(),
|
|
117
|
+
prompt: zod_1.z.string().optional(),
|
|
118
|
+
params: MergeParamsSchema,
|
|
119
|
+
});
|
|
120
|
+
const StyleActionRequestSchema = BaseRequestSchema.extend({
|
|
121
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.STYLE),
|
|
122
|
+
modelId: zod_1.z.string().uuid(),
|
|
123
|
+
prompt: zod_1.z.string().optional(),
|
|
124
|
+
params: StyleParamsSchema,
|
|
125
|
+
});
|
|
126
|
+
const RemoveBackgroundActionRequestSchema = BaseRequestSchema.extend({
|
|
127
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.REMOVE_BACKGROUND),
|
|
128
|
+
modelId: zod_1.z.string().uuid().optional(),
|
|
129
|
+
prompt: zod_1.z.string().optional(),
|
|
130
|
+
params: RemoveBackgroundParamsSchema,
|
|
131
|
+
});
|
|
132
|
+
const VariationsActionRequestSchema = BaseRequestSchema.extend({
|
|
133
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.VARIATIONS),
|
|
134
|
+
modelId: zod_1.z.string().uuid(),
|
|
135
|
+
prompt: zod_1.z.string().optional(),
|
|
136
|
+
params: VariationsParamsSchema,
|
|
137
|
+
});
|
|
138
|
+
const TextActionRequestSchema = BaseRequestSchema.extend({
|
|
139
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.TEXT),
|
|
140
|
+
modelId: zod_1.z.string().uuid(),
|
|
141
|
+
prompt: zod_1.z.string().optional(),
|
|
142
|
+
params: TextParamsSchema,
|
|
143
|
+
});
|
|
144
|
+
const UpscaleActionRequestSchema = BaseRequestSchema.extend({
|
|
145
|
+
actionAlias: zod_1.z.literal(constants_1.PHOTO_STUDIO_ACTION_ALIAS.UPSCALE),
|
|
146
|
+
modelId: zod_1.z.string().uuid(),
|
|
147
|
+
prompt: zod_1.z.string().optional(),
|
|
148
|
+
params: UpscaleParamsSchema,
|
|
31
149
|
});
|
|
150
|
+
ExecutePhotoStudioActionCommand.RequestSchema = zod_1.z.discriminatedUnion('actionAlias', [
|
|
151
|
+
GenerationActionRequestSchema,
|
|
152
|
+
EditActionRequestSchema,
|
|
153
|
+
EffectsActionRequestSchema,
|
|
154
|
+
OutpaintActionRequestSchema,
|
|
155
|
+
ReplaceBackgroundActionRequestSchema,
|
|
156
|
+
BrushActionRequestSchema,
|
|
157
|
+
MergeActionRequestSchema,
|
|
158
|
+
StyleActionRequestSchema,
|
|
159
|
+
RemoveBackgroundActionRequestSchema,
|
|
160
|
+
VariationsActionRequestSchema,
|
|
161
|
+
TextActionRequestSchema,
|
|
162
|
+
UpscaleActionRequestSchema,
|
|
163
|
+
]);
|
|
32
164
|
ExecutePhotoStudioActionCommand.PhotoStudioExecuteJobSchema = models_1.ToolJobSchema.extend({
|
|
33
|
-
|
|
165
|
+
actionType: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_ACTION_ALIAS),
|
|
34
166
|
});
|
|
35
167
|
ExecutePhotoStudioActionCommand.ResponseSchema = zod_1.z.object({
|
|
36
168
|
data: zod_1.z.array(ExecutePhotoStudioActionCommand.PhotoStudioExecuteJobSchema),
|
|
@@ -7,6 +7,6 @@ var FindPhotoStudioCanvasByUuidQuery;
|
|
|
7
7
|
(function (FindPhotoStudioCanvasByUuidQuery) {
|
|
8
8
|
FindPhotoStudioCanvasByUuidQuery.RequestParamSchema = zod_1.z.object({ uuid: zod_1.z.string().uuid() });
|
|
9
9
|
FindPhotoStudioCanvasByUuidQuery.ResponseSchema = zod_1.z.object({
|
|
10
|
-
data: models_1.
|
|
10
|
+
data: models_1.PhotoStudioCanvasSchema,
|
|
11
11
|
});
|
|
12
12
|
})(FindPhotoStudioCanvasByUuidQuery || (exports.FindPhotoStudioCanvasByUuidQuery = FindPhotoStudioCanvasByUuidQuery = {}));
|
|
@@ -11,7 +11,7 @@ var FindPhotoStudioCanvasesQuery;
|
|
|
11
11
|
name: zod_1.z.string().optional(),
|
|
12
12
|
});
|
|
13
13
|
FindPhotoStudioCanvasesQuery.ResponseSchema = zod_1.z.object({
|
|
14
|
-
data: zod_1.z.array(models_1.PhotoStudioCanvasSchema.extend({
|
|
14
|
+
data: zod_1.z.array(models_1.PhotoStudioCanvasSchema.extend({ thumbnail: zod_1.z.string().nullable() })),
|
|
15
15
|
page: zod_1.z.number(),
|
|
16
16
|
totalPages: zod_1.z.number(),
|
|
17
17
|
});
|
|
@@ -18,7 +18,7 @@ var FindPhotoStudioJobByIdQuery;
|
|
|
18
18
|
});
|
|
19
19
|
FindPhotoStudioJobByIdQuery.PhotoStudioJobSchema = zod_1.z.object({
|
|
20
20
|
jobId: zod_1.z.string().uuid(),
|
|
21
|
-
|
|
21
|
+
actionType: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_ACTION_ALIAS),
|
|
22
22
|
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS),
|
|
23
23
|
position: models_1.CanvasNodePositionSchema,
|
|
24
24
|
images: zod_1.z.array(FindPhotoStudioJobByIdQuery.PhotoStudioJobImageSchema),
|
|
@@ -27,6 +27,8 @@ __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
29
|
__exportStar(require("./get-photo-studio-config.query"), exports);
|
|
30
|
+
__exportStar(require("./move-photo-studio-image.command"), exports);
|
|
31
|
+
__exportStar(require("./rename-photo-studio-image.command"), exports);
|
|
30
32
|
__exportStar(require("./save-photo-studio-canvas.command"), exports);
|
|
31
33
|
__exportStar(require("./update-photo-studio-canvas.command"), exports);
|
|
32
34
|
__exportStar(require("./update-photo-studio-checkpoint.command"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MovePhotoStudioImageCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var MovePhotoStudioImageCommand;
|
|
7
|
+
(function (MovePhotoStudioImageCommand) {
|
|
8
|
+
MovePhotoStudioImageCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
canvasId: zod_1.z.string().uuid(),
|
|
10
|
+
imageId: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
MovePhotoStudioImageCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
position: models_1.CanvasNodePositionSchema,
|
|
14
|
+
baseCheckpointSequence: zod_1.z.number().int().positive(),
|
|
15
|
+
});
|
|
16
|
+
MovePhotoStudioImageCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
data: zod_1.z.array(models_1.PhotoStudioCheckpointSchema),
|
|
18
|
+
});
|
|
19
|
+
})(MovePhotoStudioImageCommand || (exports.MovePhotoStudioImageCommand = MovePhotoStudioImageCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RenamePhotoStudioImageCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var RenamePhotoStudioImageCommand;
|
|
7
|
+
(function (RenamePhotoStudioImageCommand) {
|
|
8
|
+
RenamePhotoStudioImageCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
canvasId: zod_1.z.string().uuid(),
|
|
10
|
+
imageId: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
RenamePhotoStudioImageCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
displayName: zod_1.z.string().trim().min(1).nullable(),
|
|
14
|
+
baseCheckpointSequence: zod_1.z.number().int().positive(),
|
|
15
|
+
});
|
|
16
|
+
RenamePhotoStudioImageCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
data: zod_1.z.array(models_1.PhotoStudioCheckpointSchema),
|
|
18
|
+
});
|
|
19
|
+
})(RenamePhotoStudioImageCommand || (exports.RenamePhotoStudioImageCommand = RenamePhotoStudioImageCommand = {}));
|
|
@@ -13,6 +13,6 @@ var SavePhotoStudioCanvasCommand;
|
|
|
13
13
|
baseCheckpointSequence: zod_1.z.number().int().positive().optional(),
|
|
14
14
|
});
|
|
15
15
|
SavePhotoStudioCanvasCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
-
data: models_1.
|
|
16
|
+
data: models_1.PhotoStudioCanvasSchema,
|
|
17
17
|
});
|
|
18
18
|
})(SavePhotoStudioCanvasCommand || (exports.SavePhotoStudioCanvasCommand = SavePhotoStudioCanvasCommand = {}));
|
|
@@ -10,6 +10,6 @@ var UpdatePhotoStudioCanvasCommand;
|
|
|
10
10
|
name: zod_1.z.string().trim().min(1),
|
|
11
11
|
});
|
|
12
12
|
UpdatePhotoStudioCanvasCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
-
data: models_1.
|
|
13
|
+
data: models_1.PhotoStudioCanvasSchema,
|
|
14
14
|
});
|
|
15
15
|
})(UpdatePhotoStudioCanvasCommand || (exports.UpdatePhotoStudioCanvasCommand = UpdatePhotoStudioCanvasCommand = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteUpdatePostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var DeleteUpdatePostCommand;
|
|
7
|
+
(function (DeleteUpdatePostCommand) {
|
|
8
|
+
DeleteUpdatePostCommand.RequestSchema = models_1.UpdatePostSchema.pick({
|
|
9
|
+
uuid: true,
|
|
10
|
+
slug: true,
|
|
11
|
+
})
|
|
12
|
+
.partial()
|
|
13
|
+
.strict()
|
|
14
|
+
.superRefine((value, context) => {
|
|
15
|
+
if (Boolean(value.uuid) === Boolean(value.slug)) {
|
|
16
|
+
context.addIssue({
|
|
17
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
18
|
+
message: 'Pass either uuid or slug',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
DeleteUpdatePostCommand.ResponseSchema = zod_1.z.object({
|
|
23
|
+
isDeleted: zod_1.z.boolean(),
|
|
24
|
+
});
|
|
25
|
+
})(DeleteUpdatePostCommand || (exports.DeleteUpdatePostCommand = DeleteUpdatePostCommand = {}));
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-update-post.command"), exports);
|
|
18
18
|
__exportStar(require("./create-update-post-translation.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-update-post.command"), exports);
|
|
19
20
|
__exportStar(require("./find-all-update-posts.command"), exports);
|
|
20
21
|
__exportStar(require("./find-update-post.command"), exports);
|
|
21
22
|
__exportStar(require("./get-all-update-post-translations.query"), exports);
|
|
@@ -10,10 +10,12 @@ exports.PhotoStudioImageNodeSchema = zod_1.z.object({
|
|
|
10
10
|
fileId: zod_1.z.string().uuid(),
|
|
11
11
|
url: zod_1.z.string().url(),
|
|
12
12
|
originalName: zod_1.z.string().nullable().optional(),
|
|
13
|
+
displayName: zod_1.z.string().nullable().optional(),
|
|
13
14
|
resolution: exports.PhotoStudioImageResolutionSchema.nullable().optional(),
|
|
14
15
|
position: canvas_node_schema_1.CanvasNodePositionSchema,
|
|
15
16
|
});
|
|
16
17
|
exports.PhotoStudioImageInputSchema = zod_1.z.object({
|
|
17
18
|
fileId: zod_1.z.string().uuid(),
|
|
19
|
+
displayName: zod_1.z.string().nullable().optional(),
|
|
18
20
|
position: canvas_node_schema_1.CanvasNodePositionSchema,
|
|
19
21
|
});
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PhotoStudioCanvasSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const photo_studio_image_node_schema_1 = require("./photo-studio-image-node.schema");
|
|
6
5
|
exports.PhotoStudioCanvasSchema = zod_1.z.object({
|
|
7
6
|
uuid: zod_1.z.string().uuid(),
|
|
8
7
|
name: zod_1.z.string(),
|
|
9
|
-
userId: zod_1.z.string().uuid(),
|
|
8
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
10
|
createdAt: zod_1.z.date(),
|
|
11
11
|
updatedAt: zod_1.z.date(),
|
|
12
|
-
|
|
13
|
-
exports.PhotoStudioCanvasWithImagesSchema = exports.PhotoStudioCanvasSchema.extend({
|
|
14
|
-
images: zod_1.z.array(photo_studio_image_node_schema_1.PhotoStudioImageNodeSchema),
|
|
12
|
+
thumbnail: zod_1.z.string().nullable().optional(),
|
|
15
13
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { PhotoStudioCanvasSchema, PhotoStudioImageInputSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreatePhotoStudioCanvasCommand {
|
|
5
5
|
export const RequestSchema = z.object({
|
|
@@ -10,7 +10,7 @@ export namespace CreatePhotoStudioCanvasCommand {
|
|
|
10
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
11
|
|
|
12
12
|
export const ResponseSchema = z.object({
|
|
13
|
-
data:
|
|
13
|
+
data: PhotoStudioCanvasSchema,
|
|
14
14
|
});
|
|
15
15
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
16
|
}
|
|
@@ -6,38 +6,183 @@ import {
|
|
|
6
6
|
PHOTO_STUDIO_PLACEMENT_ALIAS,
|
|
7
7
|
PHOTO_STUDIO_UPSCALE_SIZE,
|
|
8
8
|
PHOTO_STUDIO_VARIATION_STRENGTH_ALIAS,
|
|
9
|
-
TOOL_CONTENT_TYPE,
|
|
10
9
|
} from '../../constants';
|
|
11
10
|
import { IMAGE_GENERATION_RESOLUTION } from '../../constants/tool-image-generation/enums/image-generation-resolution.enum';
|
|
12
11
|
import { CanvasNodePositionSchema, ToolJobSchema } from '../../models';
|
|
13
12
|
|
|
14
13
|
export namespace ExecutePhotoStudioActionCommand {
|
|
15
|
-
|
|
14
|
+
const GenerationParamsSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
enhancePrompt: z.boolean().optional(),
|
|
17
|
+
resolution: z.nativeEnum(IMAGE_GENERATION_RESOLUTION).optional(),
|
|
18
|
+
aspectRatio: z.string().optional(),
|
|
19
|
+
})
|
|
20
|
+
.strict()
|
|
21
|
+
.default({});
|
|
22
|
+
const OneImageParamsSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
enhancePrompt: z.boolean().optional(),
|
|
25
|
+
imageUrls: z.array(z.string().uuid()).length(1),
|
|
26
|
+
aspectRatio: z.string().optional(),
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
const EditParamsSchema = OneImageParamsSchema;
|
|
30
|
+
const EffectsParamsSchema = z
|
|
31
|
+
.object({
|
|
32
|
+
imageUrls: z.array(z.string().uuid()).length(1),
|
|
33
|
+
effect: z.nativeEnum(PHOTO_STUDIO_EFFECT_ALIAS),
|
|
34
|
+
aspectRatio: z.string().optional(),
|
|
35
|
+
})
|
|
36
|
+
.strict();
|
|
37
|
+
const RemoveBackgroundParamsSchema = z
|
|
38
|
+
.object({
|
|
39
|
+
imageUrls: z.array(z.string().uuid()).length(1),
|
|
40
|
+
})
|
|
41
|
+
.strict();
|
|
42
|
+
const VariationsParamsSchema = z
|
|
43
|
+
.object({
|
|
44
|
+
imageUrls: z.array(z.string().uuid()).length(1),
|
|
45
|
+
variationsCount: z.union([z.literal(2), z.literal(3), z.literal(4)]).optional(),
|
|
46
|
+
variationStrength: z.nativeEnum(PHOTO_STUDIO_VARIATION_STRENGTH_ALIAS).optional(),
|
|
47
|
+
aspectRatio: z.string().optional(),
|
|
48
|
+
})
|
|
49
|
+
.strict();
|
|
50
|
+
const TextParamsSchema = z
|
|
51
|
+
.object({
|
|
52
|
+
imageUrls: z.array(z.string().uuid()).length(1),
|
|
53
|
+
fontStyle: z.nativeEnum(PHOTO_STUDIO_FONT_STYLE_ALIAS).optional(),
|
|
54
|
+
placement: z.nativeEnum(PHOTO_STUDIO_PLACEMENT_ALIAS).optional(),
|
|
55
|
+
color: z.string().optional(),
|
|
56
|
+
aspectRatio: z.string().optional(),
|
|
57
|
+
})
|
|
58
|
+
.strict();
|
|
59
|
+
const UpscaleParamsSchema = z
|
|
60
|
+
.object({
|
|
61
|
+
imageUrls: z.array(z.string().uuid()).length(1),
|
|
62
|
+
size: z.nativeEnum(PHOTO_STUDIO_UPSCALE_SIZE),
|
|
63
|
+
})
|
|
64
|
+
.strict();
|
|
65
|
+
const MergeParamsSchema = z
|
|
66
|
+
.object({
|
|
67
|
+
imageUrls: z.array(z.string().uuid()).min(2).max(5),
|
|
68
|
+
aspectRatio: z.string().optional(),
|
|
69
|
+
})
|
|
70
|
+
.strict();
|
|
71
|
+
const StyleParamsSchema = z
|
|
72
|
+
.object({
|
|
73
|
+
imageUrls: z.array(z.string().uuid()).length(2),
|
|
74
|
+
aspectRatio: z.string().optional(),
|
|
75
|
+
})
|
|
76
|
+
.strict();
|
|
77
|
+
|
|
78
|
+
const BaseRequestSchema = z.object({
|
|
16
79
|
actionAlias: z.nativeEnum(PHOTO_STUDIO_ACTION_ALIAS),
|
|
80
|
+
position: CanvasNodePositionSchema,
|
|
81
|
+
baseCheckpointSequence: z.number().int().optional(),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const GenerationActionRequestSchema = BaseRequestSchema.extend({
|
|
85
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.GENERATE),
|
|
86
|
+
modelId: z.string().uuid(),
|
|
87
|
+
prompt: z.string().trim().min(1),
|
|
88
|
+
params: GenerationParamsSchema,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const EditActionRequestSchema = BaseRequestSchema.extend({
|
|
92
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.EDIT),
|
|
17
93
|
modelId: z.string().uuid(),
|
|
18
94
|
prompt: z.string().optional(),
|
|
19
|
-
params:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
95
|
+
params: EditParamsSchema,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const EffectsActionRequestSchema = BaseRequestSchema.extend({
|
|
99
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.EFFECTS),
|
|
100
|
+
modelId: z.string().uuid(),
|
|
101
|
+
prompt: z.string().optional(),
|
|
102
|
+
params: EffectsParamsSchema,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const OutpaintActionRequestSchema = BaseRequestSchema.extend({
|
|
106
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.OUTPAINT),
|
|
107
|
+
modelId: z.string().uuid(),
|
|
108
|
+
prompt: z.string().optional(),
|
|
109
|
+
params: OneImageParamsSchema,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const ReplaceBackgroundActionRequestSchema = BaseRequestSchema.extend({
|
|
113
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.REPLACE_BACKGROUND),
|
|
114
|
+
modelId: z.string().uuid(),
|
|
115
|
+
prompt: z.string().optional(),
|
|
116
|
+
params: OneImageParamsSchema,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const BrushActionRequestSchema = BaseRequestSchema.extend({
|
|
120
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.BRUSH),
|
|
121
|
+
modelId: z.string().uuid(),
|
|
122
|
+
prompt: z.string().optional(),
|
|
123
|
+
params: OneImageParamsSchema,
|
|
36
124
|
});
|
|
125
|
+
|
|
126
|
+
const MergeActionRequestSchema = BaseRequestSchema.extend({
|
|
127
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.MERGE),
|
|
128
|
+
modelId: z.string().uuid(),
|
|
129
|
+
prompt: z.string().optional(),
|
|
130
|
+
params: MergeParamsSchema,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const StyleActionRequestSchema = BaseRequestSchema.extend({
|
|
134
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.STYLE),
|
|
135
|
+
modelId: z.string().uuid(),
|
|
136
|
+
prompt: z.string().optional(),
|
|
137
|
+
params: StyleParamsSchema,
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
const RemoveBackgroundActionRequestSchema = BaseRequestSchema.extend({
|
|
141
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.REMOVE_BACKGROUND),
|
|
142
|
+
modelId: z.string().uuid().optional(),
|
|
143
|
+
prompt: z.string().optional(),
|
|
144
|
+
params: RemoveBackgroundParamsSchema,
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const VariationsActionRequestSchema = BaseRequestSchema.extend({
|
|
148
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.VARIATIONS),
|
|
149
|
+
modelId: z.string().uuid(),
|
|
150
|
+
prompt: z.string().optional(),
|
|
151
|
+
params: VariationsParamsSchema,
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
const TextActionRequestSchema = BaseRequestSchema.extend({
|
|
155
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.TEXT),
|
|
156
|
+
modelId: z.string().uuid(),
|
|
157
|
+
prompt: z.string().optional(),
|
|
158
|
+
params: TextParamsSchema,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const UpscaleActionRequestSchema = BaseRequestSchema.extend({
|
|
162
|
+
actionAlias: z.literal(PHOTO_STUDIO_ACTION_ALIAS.UPSCALE),
|
|
163
|
+
modelId: z.string().uuid(),
|
|
164
|
+
prompt: z.string().optional(),
|
|
165
|
+
params: UpscaleParamsSchema,
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
export const RequestSchema = z.discriminatedUnion('actionAlias', [
|
|
169
|
+
GenerationActionRequestSchema,
|
|
170
|
+
EditActionRequestSchema,
|
|
171
|
+
EffectsActionRequestSchema,
|
|
172
|
+
OutpaintActionRequestSchema,
|
|
173
|
+
ReplaceBackgroundActionRequestSchema,
|
|
174
|
+
BrushActionRequestSchema,
|
|
175
|
+
MergeActionRequestSchema,
|
|
176
|
+
StyleActionRequestSchema,
|
|
177
|
+
RemoveBackgroundActionRequestSchema,
|
|
178
|
+
VariationsActionRequestSchema,
|
|
179
|
+
TextActionRequestSchema,
|
|
180
|
+
UpscaleActionRequestSchema,
|
|
181
|
+
]);
|
|
37
182
|
export type Request = z.infer<typeof RequestSchema>;
|
|
38
183
|
|
|
39
184
|
export const PhotoStudioExecuteJobSchema = ToolJobSchema.extend({
|
|
40
|
-
|
|
185
|
+
actionType: z.nativeEnum(PHOTO_STUDIO_ACTION_ALIAS),
|
|
41
186
|
});
|
|
42
187
|
export type PhotoStudioExecuteJob = z.infer<typeof PhotoStudioExecuteJobSchema>;
|
|
43
188
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { PhotoStudioCanvasSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace FindPhotoStudioCanvasByUuidQuery {
|
|
5
5
|
export const RequestParamSchema = z.object({ uuid: z.string().uuid() });
|
|
6
6
|
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
7
7
|
|
|
8
8
|
export const ResponseSchema = z.object({
|
|
9
|
-
data:
|
|
9
|
+
data: PhotoStudioCanvasSchema,
|
|
10
10
|
});
|
|
11
11
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
12
|
}
|
|
@@ -11,7 +11,7 @@ export namespace FindPhotoStudioCanvasesQuery {
|
|
|
11
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
12
12
|
|
|
13
13
|
export const ResponseSchema = z.object({
|
|
14
|
-
data: z.array(PhotoStudioCanvasSchema.extend({
|
|
14
|
+
data: z.array(PhotoStudioCanvasSchema.extend({ thumbnail: z.string().nullable() })),
|
|
15
15
|
page: z.number(),
|
|
16
16
|
totalPages: z.number(),
|
|
17
17
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { PHOTO_STUDIO_ACTION_ALIAS, TOOL_JOB_STATUS } from '../../constants';
|
|
3
3
|
import { CanvasNodePositionSchema, FileResolutionSchema } from '../../models';
|
|
4
4
|
|
|
5
5
|
export namespace FindPhotoStudioJobByIdQuery {
|
|
@@ -19,7 +19,7 @@ export namespace FindPhotoStudioJobByIdQuery {
|
|
|
19
19
|
|
|
20
20
|
export const PhotoStudioJobSchema = z.object({
|
|
21
21
|
jobId: z.string().uuid(),
|
|
22
|
-
|
|
22
|
+
actionType: z.nativeEnum(PHOTO_STUDIO_ACTION_ALIAS),
|
|
23
23
|
status: z.nativeEnum(TOOL_JOB_STATUS),
|
|
24
24
|
position: CanvasNodePositionSchema,
|
|
25
25
|
images: z.array(PhotoStudioJobImageSchema),
|
|
@@ -11,6 +11,8 @@ 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
13
|
export * from './get-photo-studio-config.query';
|
|
14
|
+
export * from './move-photo-studio-image.command';
|
|
15
|
+
export * from './rename-photo-studio-image.command';
|
|
14
16
|
export * from './save-photo-studio-canvas.command';
|
|
15
17
|
export * from './update-photo-studio-canvas.command';
|
|
16
18
|
export * from './update-photo-studio-checkpoint.command';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CanvasNodePositionSchema, PhotoStudioCheckpointSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace MovePhotoStudioImageCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
canvasId: z.string().uuid(),
|
|
7
|
+
imageId: z.string().uuid(),
|
|
8
|
+
});
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = z.object({
|
|
12
|
+
position: CanvasNodePositionSchema,
|
|
13
|
+
baseCheckpointSequence: z.number().int().positive(),
|
|
14
|
+
});
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: z.array(PhotoStudioCheckpointSchema),
|
|
19
|
+
});
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PhotoStudioCheckpointSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace RenamePhotoStudioImageCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
canvasId: z.string().uuid(),
|
|
7
|
+
imageId: z.string().uuid(),
|
|
8
|
+
});
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = z.object({
|
|
12
|
+
displayName: z.string().trim().min(1).nullable(),
|
|
13
|
+
baseCheckpointSequence: z.number().int().positive(),
|
|
14
|
+
});
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: z.array(PhotoStudioCheckpointSchema),
|
|
19
|
+
});
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
PhotoStudioCanvasSchema,
|
|
4
4
|
PhotoStudioCheckpointActionSchema,
|
|
5
5
|
PhotoStudioImageInputSchema,
|
|
6
6
|
} from '../../models';
|
|
@@ -18,7 +18,7 @@ export namespace SavePhotoStudioCanvasCommand {
|
|
|
18
18
|
export type Request = z.infer<typeof RequestSchema>;
|
|
19
19
|
|
|
20
20
|
export const ResponseSchema = z.object({
|
|
21
|
-
data:
|
|
21
|
+
data: PhotoStudioCanvasSchema,
|
|
22
22
|
});
|
|
23
23
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
24
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { PhotoStudioCanvasSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace UpdatePhotoStudioCanvasCommand {
|
|
5
5
|
export const RequestParamSchema = z.object({ uuid: z.string().uuid() });
|
|
@@ -11,7 +11,7 @@ export namespace UpdatePhotoStudioCanvasCommand {
|
|
|
11
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
12
12
|
|
|
13
13
|
export const ResponseSchema = z.object({
|
|
14
|
-
data:
|
|
14
|
+
data: PhotoStudioCanvasSchema,
|
|
15
15
|
});
|
|
16
16
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
17
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace DeleteUpdatePostCommand {
|
|
5
|
+
export const RequestSchema = UpdatePostSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
slug: true,
|
|
8
|
+
})
|
|
9
|
+
.partial()
|
|
10
|
+
.strict()
|
|
11
|
+
.superRefine((value, context) => {
|
|
12
|
+
if (Boolean(value.uuid) === Boolean(value.slug)) {
|
|
13
|
+
context.addIssue({
|
|
14
|
+
code: z.ZodIssueCode.custom,
|
|
15
|
+
message: 'Pass either uuid or slug',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export type Request = { uuid: string } | { slug: string };
|
|
21
|
+
|
|
22
|
+
export const ResponseSchema = z.object({
|
|
23
|
+
isDeleted: z.boolean(),
|
|
24
|
+
});
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './create-update-post.command';
|
|
2
2
|
export * from './create-update-post-translation.command';
|
|
3
|
+
export * from './delete-update-post.command';
|
|
3
4
|
export * from './find-all-update-posts.command';
|
|
4
5
|
export * from './find-update-post.command';
|
|
5
6
|
export * from './get-all-update-post-translations.query';
|
|
@@ -10,6 +10,7 @@ export const PhotoStudioImageNodeSchema = z.object({
|
|
|
10
10
|
fileId: z.string().uuid(),
|
|
11
11
|
url: z.string().url(),
|
|
12
12
|
originalName: z.string().nullable().optional(),
|
|
13
|
+
displayName: z.string().nullable().optional(),
|
|
13
14
|
resolution: PhotoStudioImageResolutionSchema.nullable().optional(),
|
|
14
15
|
position: CanvasNodePositionSchema,
|
|
15
16
|
});
|
|
@@ -17,6 +18,7 @@ export type PhotoStudioImageNode = z.infer<typeof PhotoStudioImageNodeSchema>;
|
|
|
17
18
|
|
|
18
19
|
export const PhotoStudioImageInputSchema = z.object({
|
|
19
20
|
fileId: z.string().uuid(),
|
|
21
|
+
displayName: z.string().nullable().optional(),
|
|
20
22
|
position: CanvasNodePositionSchema,
|
|
21
23
|
});
|
|
22
24
|
export type PhotoStudioImageInput = z.infer<typeof PhotoStudioImageInputSchema>;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioImageNodeSchema } from './photo-studio-image-node.schema';
|
|
3
2
|
|
|
4
3
|
export const PhotoStudioCanvasSchema = z.object({
|
|
5
4
|
uuid: z.string().uuid(),
|
|
6
5
|
name: z.string(),
|
|
7
|
-
userId: z.string().uuid(),
|
|
6
|
+
userId: z.string().uuid().nullable().optional(),
|
|
7
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
8
8
|
createdAt: z.date(),
|
|
9
9
|
updatedAt: z.date(),
|
|
10
|
+
thumbnail: z.string().nullable().optional(),
|
|
10
11
|
});
|
|
11
12
|
export type PhotoStudioCanvas = z.infer<typeof PhotoStudioCanvasSchema>;
|
|
12
|
-
|
|
13
|
-
export const PhotoStudioCanvasWithImagesSchema = PhotoStudioCanvasSchema.extend({
|
|
14
|
-
images: z.array(PhotoStudioImageNodeSchema),
|
|
15
|
-
});
|
|
16
|
-
export type PhotoStudioCanvasWithImages = z.infer<typeof PhotoStudioCanvasWithImagesSchema>;
|