@purpleschool/gptbot 0.14.22 → 0.14.23
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/build/commands/photo-studio/execute-photo-studio-action.command.js +11 -0
- package/build/commands/photo-studio/find-photo-studio-job-by-id.query.js +8 -0
- package/build/commands/photo-studio/get-photo-studio-config.query.js +1 -0
- package/commands/photo-studio/execute-photo-studio-action.command.ts +11 -0
- package/commands/photo-studio/find-photo-studio-job-by-id.query.ts +9 -0
- package/commands/photo-studio/get-photo-studio-config.query.ts +5 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ var ExecutePhotoStudioActionCommand;
|
|
|
16
16
|
.object({
|
|
17
17
|
enhancePrompt: zod_1.z.boolean().optional(),
|
|
18
18
|
imageUrls: zod_1.z.array(zod_1.z.string().uuid()).length(1),
|
|
19
|
+
aspectRatio: zod_1.z.string(),
|
|
19
20
|
})
|
|
20
21
|
.strict();
|
|
21
22
|
const EditParamsSchema = OneImageParamsSchema;
|
|
@@ -36,6 +37,13 @@ var ExecutePhotoStudioActionCommand;
|
|
|
36
37
|
variationsCount: zod_1.z.union([zod_1.z.literal(2), zod_1.z.literal(3), zod_1.z.literal(4)]),
|
|
37
38
|
variationStrength: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_VARIATION_STRENGTH_ALIAS).optional(),
|
|
38
39
|
enhancePrompt: zod_1.z.boolean().optional(),
|
|
40
|
+
positions: zod_1.z.array(models_1.CanvasNodePositionSchema).min(2).max(4).optional(),
|
|
41
|
+
})
|
|
42
|
+
.strict();
|
|
43
|
+
const PhotoStudioJobParamsSchema = zod_1.z
|
|
44
|
+
.object({
|
|
45
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
46
|
+
resolution: zod_1.z.string().optional(),
|
|
39
47
|
})
|
|
40
48
|
.strict();
|
|
41
49
|
const TextParamsSchema = zod_1.z
|
|
@@ -155,6 +163,9 @@ var ExecutePhotoStudioActionCommand;
|
|
|
155
163
|
]);
|
|
156
164
|
ExecutePhotoStudioActionCommand.PhotoStudioExecuteJobSchema = models_1.ToolJobSchema.extend({
|
|
157
165
|
actionType: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_ACTION_ALIAS),
|
|
166
|
+
checkpointSequence: zod_1.z.number().int().positive(),
|
|
167
|
+
position: models_1.CanvasNodePositionSchema,
|
|
168
|
+
params: PhotoStudioJobParamsSchema,
|
|
158
169
|
});
|
|
159
170
|
ExecutePhotoStudioActionCommand.ResponseSchema = zod_1.z.object({
|
|
160
171
|
data: zod_1.z.array(ExecutePhotoStudioActionCommand.PhotoStudioExecuteJobSchema),
|
|
@@ -16,11 +16,19 @@ var FindPhotoStudioJobByIdQuery;
|
|
|
16
16
|
originalName: zod_1.z.string().nullable().optional(),
|
|
17
17
|
resolution: models_1.FileResolutionSchema.nullable().optional(),
|
|
18
18
|
});
|
|
19
|
+
FindPhotoStudioJobByIdQuery.PhotoStudioJobParamsSchema = zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
22
|
+
resolution: zod_1.z.string().optional(),
|
|
23
|
+
})
|
|
24
|
+
.strict();
|
|
19
25
|
FindPhotoStudioJobByIdQuery.PhotoStudioJobSchema = zod_1.z.object({
|
|
20
26
|
jobId: zod_1.z.string().uuid(),
|
|
21
27
|
actionType: zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_ACTION_ALIAS),
|
|
22
28
|
status: zod_1.z.nativeEnum(constants_1.TOOL_JOB_STATUS),
|
|
29
|
+
checkpointSequence: zod_1.z.number().int().positive(),
|
|
23
30
|
position: models_1.CanvasNodePositionSchema,
|
|
31
|
+
params: FindPhotoStudioJobByIdQuery.PhotoStudioJobParamsSchema,
|
|
24
32
|
images: zod_1.z.array(FindPhotoStudioJobByIdQuery.PhotoStudioJobImageSchema),
|
|
25
33
|
error: zod_1.z.string().nullable(),
|
|
26
34
|
createdAt: zod_1.z.date(),
|
|
@@ -9,6 +9,7 @@ var GetPhotoStudioConfigQuery;
|
|
|
9
9
|
GetPhotoStudioConfigQuery.ConfigSchema = zod_1.z.object({
|
|
10
10
|
[constants_1.TOOL_TYPE.IMAGE_GENERATION]: models_1.ImageGenerationConfigSchema,
|
|
11
11
|
[constants_1.TOOL_TYPE.IMAGE]: models_1.ImageEditorConfigSchema,
|
|
12
|
+
actionPrices: zod_1.z.record(zod_1.z.nativeEnum(constants_1.PHOTO_STUDIO_ACTION_ALIAS), zod_1.z.number().nonnegative().nullable()),
|
|
12
13
|
});
|
|
13
14
|
GetPhotoStudioConfigQuery.ResponseSchema = zod_1.z.object({
|
|
14
15
|
data: GetPhotoStudioConfigQuery.ConfigSchema,
|
|
@@ -20,6 +20,7 @@ export namespace ExecutePhotoStudioActionCommand {
|
|
|
20
20
|
.object({
|
|
21
21
|
enhancePrompt: z.boolean().optional(),
|
|
22
22
|
imageUrls: z.array(z.string().uuid()).length(1),
|
|
23
|
+
aspectRatio: z.string(),
|
|
23
24
|
})
|
|
24
25
|
.strict();
|
|
25
26
|
const EditParamsSchema = OneImageParamsSchema;
|
|
@@ -40,6 +41,13 @@ export namespace ExecutePhotoStudioActionCommand {
|
|
|
40
41
|
variationsCount: z.union([z.literal(2), z.literal(3), z.literal(4)]),
|
|
41
42
|
variationStrength: z.nativeEnum(PHOTO_STUDIO_VARIATION_STRENGTH_ALIAS).optional(),
|
|
42
43
|
enhancePrompt: z.boolean().optional(),
|
|
44
|
+
positions: z.array(CanvasNodePositionSchema).min(2).max(4).optional(),
|
|
45
|
+
})
|
|
46
|
+
.strict();
|
|
47
|
+
const PhotoStudioJobParamsSchema = z
|
|
48
|
+
.object({
|
|
49
|
+
aspectRatio: z.string().optional(),
|
|
50
|
+
resolution: z.string().optional(),
|
|
43
51
|
})
|
|
44
52
|
.strict();
|
|
45
53
|
const TextParamsSchema = z
|
|
@@ -175,6 +183,9 @@ export namespace ExecutePhotoStudioActionCommand {
|
|
|
175
183
|
|
|
176
184
|
export const PhotoStudioExecuteJobSchema = ToolJobSchema.extend({
|
|
177
185
|
actionType: z.nativeEnum(PHOTO_STUDIO_ACTION_ALIAS),
|
|
186
|
+
checkpointSequence: z.number().int().positive(),
|
|
187
|
+
position: CanvasNodePositionSchema,
|
|
188
|
+
params: PhotoStudioJobParamsSchema,
|
|
178
189
|
});
|
|
179
190
|
export type PhotoStudioExecuteJob = z.infer<typeof PhotoStudioExecuteJobSchema>;
|
|
180
191
|
|
|
@@ -16,12 +16,21 @@ export namespace FindPhotoStudioJobByIdQuery {
|
|
|
16
16
|
resolution: FileResolutionSchema.nullable().optional(),
|
|
17
17
|
});
|
|
18
18
|
export type PhotoStudioJobImage = z.infer<typeof PhotoStudioJobImageSchema>;
|
|
19
|
+
export const PhotoStudioJobParamsSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
aspectRatio: z.string().optional(),
|
|
22
|
+
resolution: z.string().optional(),
|
|
23
|
+
})
|
|
24
|
+
.strict();
|
|
25
|
+
export type PhotoStudioJobParams = z.infer<typeof PhotoStudioJobParamsSchema>;
|
|
19
26
|
|
|
20
27
|
export const PhotoStudioJobSchema = z.object({
|
|
21
28
|
jobId: z.string().uuid(),
|
|
22
29
|
actionType: z.nativeEnum(PHOTO_STUDIO_ACTION_ALIAS),
|
|
23
30
|
status: z.nativeEnum(TOOL_JOB_STATUS),
|
|
31
|
+
checkpointSequence: z.number().int().positive(),
|
|
24
32
|
position: CanvasNodePositionSchema,
|
|
33
|
+
params: PhotoStudioJobParamsSchema,
|
|
25
34
|
images: z.array(PhotoStudioJobImageSchema),
|
|
26
35
|
error: z.string().nullable(),
|
|
27
36
|
createdAt: z.date(),
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { TOOL_TYPE } from '../../constants';
|
|
2
|
+
import { PHOTO_STUDIO_ACTION_ALIAS, TOOL_TYPE } from '../../constants';
|
|
3
3
|
import { ImageEditorConfigSchema, ImageGenerationConfigSchema } from '../../models';
|
|
4
4
|
|
|
5
5
|
export namespace GetPhotoStudioConfigQuery {
|
|
6
6
|
export const ConfigSchema = z.object({
|
|
7
7
|
[TOOL_TYPE.IMAGE_GENERATION]: ImageGenerationConfigSchema,
|
|
8
8
|
[TOOL_TYPE.IMAGE]: ImageEditorConfigSchema,
|
|
9
|
+
actionPrices: z.record(
|
|
10
|
+
z.nativeEnum(PHOTO_STUDIO_ACTION_ALIAS),
|
|
11
|
+
z.number().nonnegative().nullable(),
|
|
12
|
+
),
|
|
9
13
|
});
|
|
10
14
|
|
|
11
15
|
export type Config = z.infer<typeof ConfigSchema>;
|