@purpleschool/gptbot-tools 0.0.118 → 0.0.120
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/image-editor/commands/update-published-status-image-editor-jobs.command.js +7 -1
- package/build/image-editor/models/image-editor-job.schema.js +1 -0
- package/build/image-generation/commands/update-published-status-image-generation-jobs.command.js +7 -1
- package/build/image-generation/models/image-generation-job.schema.js +1 -0
- package/build/image-generation/queries/find-image-generation-job-by-id.query.js +1 -5
- package/build/music/commands/update-published-status-music-jobs.command.js +7 -1
- package/build/music/models/music-job.schema.js +1 -0
- package/build/video/commands/update-published-status-video-jobs.command.js +7 -1
- package/build/video/models/video-job.schema.js +2 -0
- package/build/video-editor/commands/update-published-status-video-editor-jobs.command.js +7 -1
- package/build/video-editor/models/video-editor-job.schema.js +1 -0
- package/build/video-editor/queries/find-video-editor-job-by-id.query.js +1 -5
- package/image-editor/commands/update-published-status-image-editor-jobs.command.ts +9 -3
- package/image-editor/models/image-editor-job.schema.ts +1 -0
- package/image-generation/commands/update-published-status-image-generation-jobs.command.ts +9 -3
- package/image-generation/models/image-generation-job.schema.ts +1 -0
- package/image-generation/queries/find-image-generation-job-by-id.query.ts +5 -9
- package/music/commands/update-published-status-music-jobs.command.ts +9 -3
- package/music/models/music-job.schema.ts +1 -0
- package/package.json +1 -1
- package/tools/enums/index.ts +1 -1
- package/tools/enums/job-request-origin.enum.ts +3 -3
- package/video/commands/update-published-status-video-jobs.command.ts +9 -3
- package/video/models/video-job.schema.ts +2 -0
- package/video-editor/commands/update-published-status-video-editor-jobs.command.ts +9 -3
- package/video-editor/models/video-editor-job.schema.ts +1 -0
- package/video-editor/queries/find-video-editor-job-by-id.query.ts +5 -9
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusImageEditorJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusImageEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorJobSchema);
|
|
@@ -26,6 +26,7 @@ exports.ImageEditorJobSchema = zod_1.z.object({
|
|
|
26
26
|
userId: zod_1.z.string().nullable().optional(),
|
|
27
27
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
28
28
|
isPublished: zod_1.z.boolean(),
|
|
29
|
+
postId: zod_1.z.string().nullable(),
|
|
29
30
|
isDeleted: zod_1.z.boolean(),
|
|
30
31
|
createdAt: zod_1.z.date(),
|
|
31
32
|
completedAt: zod_1.z.date().nullable().optional(),
|
package/build/image-generation/commands/update-published-status-image-generation-jobs.command.js
CHANGED
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusImageGenerationJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusImageGenerationJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
@@ -29,6 +29,7 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
|
|
|
29
29
|
userId: zod_1.z.string().nullable().optional(),
|
|
30
30
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
31
31
|
isPublished: zod_1.z.boolean(),
|
|
32
|
+
postId: zod_1.z.string().nullable(),
|
|
32
33
|
isDeleted: zod_1.z.boolean(),
|
|
33
34
|
internalError: zod_1.z.string().nullable(),
|
|
34
35
|
createdAt: zod_1.z.date(),
|
|
@@ -6,14 +6,10 @@ const command_response_schema_1 = require("../../common/models/command-response.
|
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
var FindImageGenerationJobByIdQuery;
|
|
8
8
|
(function (FindImageGenerationJobByIdQuery) {
|
|
9
|
-
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z
|
|
10
|
-
.object({
|
|
9
|
+
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z.object({
|
|
11
10
|
uuid: zod_1.z.string(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
-
})
|
|
15
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
16
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
17
13
|
});
|
|
18
14
|
FindImageGenerationJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
19
15
|
})(FindImageGenerationJobByIdQuery || (exports.FindImageGenerationJobByIdQuery = FindImageGenerationJobByIdQuery = {}));
|
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusMusicJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusMusicJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.MusicJobSchema);
|
|
@@ -47,6 +47,7 @@ exports.MusicJobSchema = zod_1.z.object({
|
|
|
47
47
|
userId: zod_1.z.string().nullable().optional(),
|
|
48
48
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
49
49
|
isPublished: zod_1.z.boolean(),
|
|
50
|
+
postId: zod_1.z.string().nullable(),
|
|
50
51
|
isDeleted: zod_1.z.boolean(),
|
|
51
52
|
createdAt: zod_1.z.date(),
|
|
52
53
|
completedAt: zod_1.z.date().nullable().optional(),
|
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusVideoJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusVideoJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoJobSchema);
|
|
@@ -17,6 +17,8 @@ exports.VideoJobSchema = zod_1.z.object({
|
|
|
17
17
|
uuid: zod_1.z.string(),
|
|
18
18
|
prompt: zod_1.z.string(),
|
|
19
19
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
20
|
+
isPublished: zod_1.z.boolean(),
|
|
21
|
+
postId: zod_1.z.string().nullable(),
|
|
20
22
|
dislikeReason: zod_1.z.string().nullable(),
|
|
21
23
|
externalId: zod_1.z.string().nullable(),
|
|
22
24
|
title: zod_1.z.string(),
|
|
@@ -12,8 +12,14 @@ var UpdatePublishedStatusVideoEditorJobsCommand;
|
|
|
12
12
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
14
|
}),
|
|
15
|
-
data: zod_1.z
|
|
15
|
+
data: zod_1.z
|
|
16
|
+
.object({
|
|
16
17
|
isPublished: zod_1.z.boolean(),
|
|
18
|
+
postId: zod_1.z.string().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
21
|
+
message: 'Post ID is required when job is published',
|
|
22
|
+
path: ['postId'],
|
|
17
23
|
}),
|
|
18
24
|
});
|
|
19
25
|
UpdatePublishedStatusVideoEditorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
|
|
@@ -24,6 +24,7 @@ exports.VideoEditorJobSchema = zod_1.z.object({
|
|
|
24
24
|
userId: zod_1.z.string().nullable().optional(),
|
|
25
25
|
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
26
26
|
isPublished: zod_1.z.boolean(),
|
|
27
|
+
postId: zod_1.z.string().nullable(),
|
|
27
28
|
isDeleted: zod_1.z.boolean(),
|
|
28
29
|
createdAt: zod_1.z.date(),
|
|
29
30
|
completedAt: zod_1.z.date().nullable().optional(),
|
|
@@ -6,14 +6,10 @@ const command_response_schema_1 = require("../../common/models/command-response.
|
|
|
6
6
|
const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
|
|
7
7
|
var FindVideoEditorJobByIdQuery;
|
|
8
8
|
(function (FindVideoEditorJobByIdQuery) {
|
|
9
|
-
FindVideoEditorJobByIdQuery.RequestSchema = zod_1.z
|
|
10
|
-
.object({
|
|
9
|
+
FindVideoEditorJobByIdQuery.RequestSchema = zod_1.z.object({
|
|
11
10
|
uuid: zod_1.z.string(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
-
})
|
|
15
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
16
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
17
13
|
});
|
|
18
14
|
FindVideoEditorJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
|
|
19
15
|
})(FindVideoEditorJobByIdQuery || (exports.FindVideoEditorJobByIdQuery = FindVideoEditorJobByIdQuery = {}));
|
|
@@ -9,9 +9,15 @@ export namespace UpdatePublishedStatusImageEditorJobsCommand {
|
|
|
9
9
|
userId: z.string().uuid().nullable().optional(),
|
|
10
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
11
|
}),
|
|
12
|
-
data: z
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
data: z
|
|
13
|
+
.object({
|
|
14
|
+
isPublished: z.boolean(),
|
|
15
|
+
postId: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
18
|
+
message: 'Post ID is required when job is published',
|
|
19
|
+
path: ['postId'],
|
|
20
|
+
}),
|
|
15
21
|
});
|
|
16
22
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
23
|
|
|
@@ -27,6 +27,7 @@ export const ImageEditorJobSchema = z.object({
|
|
|
27
27
|
userId: z.string().nullable().optional(),
|
|
28
28
|
unregisteredUserId: z.string().nullable().optional(),
|
|
29
29
|
isPublished: z.boolean(),
|
|
30
|
+
postId: z.string().nullable(),
|
|
30
31
|
isDeleted: z.boolean(),
|
|
31
32
|
createdAt: z.date(),
|
|
32
33
|
completedAt: z.date().nullable().optional(),
|
|
@@ -9,9 +9,15 @@ export namespace UpdatePublishedStatusImageGenerationJobsCommand {
|
|
|
9
9
|
userId: z.string().uuid().nullable().optional(),
|
|
10
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
11
|
}),
|
|
12
|
-
data: z
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
data: z
|
|
13
|
+
.object({
|
|
14
|
+
isPublished: z.boolean(),
|
|
15
|
+
postId: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
18
|
+
message: 'Post ID is required when job is published',
|
|
19
|
+
path: ['postId'],
|
|
20
|
+
}),
|
|
15
21
|
});
|
|
16
22
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
23
|
|
|
@@ -29,6 +29,7 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
29
29
|
userId: z.string().nullable().optional(),
|
|
30
30
|
unregisteredUserId: z.string().nullable().optional(),
|
|
31
31
|
isPublished: z.boolean(),
|
|
32
|
+
postId: z.string().nullable(),
|
|
32
33
|
isDeleted: z.boolean(),
|
|
33
34
|
internalError: z.string().nullable(),
|
|
34
35
|
createdAt: z.date(),
|
|
@@ -3,15 +3,11 @@ import { ICommandResponseSchema } from '../../common/models/command-response.sch
|
|
|
3
3
|
import { ImageGenerationJobSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace FindImageGenerationJobByIdQuery {
|
|
6
|
-
export const RequestSchema = z
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
13
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
14
|
-
});
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
});
|
|
15
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
16
12
|
|
|
17
13
|
export const ResponseSchema = ICommandResponseSchema(ImageGenerationJobSchema);
|
|
@@ -9,9 +9,15 @@ export namespace UpdatePublishedStatusMusicJobsCommand {
|
|
|
9
9
|
userId: z.string().uuid().nullable().optional(),
|
|
10
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
11
|
}),
|
|
12
|
-
data: z
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
data: z
|
|
13
|
+
.object({
|
|
14
|
+
isPublished: z.boolean(),
|
|
15
|
+
postId: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
18
|
+
message: 'Post ID is required when job is published',
|
|
19
|
+
path: ['postId'],
|
|
20
|
+
}),
|
|
15
21
|
});
|
|
16
22
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
23
|
|
|
@@ -48,6 +48,7 @@ export const MusicJobSchema = z.object({
|
|
|
48
48
|
userId: z.string().nullable().optional(),
|
|
49
49
|
unregisteredUserId: z.string().nullable().optional(),
|
|
50
50
|
isPublished: z.boolean(),
|
|
51
|
+
postId: z.string().nullable(),
|
|
51
52
|
isDeleted: z.boolean(),
|
|
52
53
|
createdAt: z.date(),
|
|
53
54
|
completedAt: z.date().nullable().optional(),
|
package/package.json
CHANGED
package/tools/enums/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export enum JOB_REQUEST_ORIGIN {
|
|
2
|
-
API =
|
|
3
|
-
B2B =
|
|
4
|
-
}
|
|
2
|
+
API = 'api',
|
|
3
|
+
B2B = 'b2b',
|
|
4
|
+
}
|
|
@@ -9,9 +9,15 @@ export namespace UpdatePublishedStatusVideoJobsCommand {
|
|
|
9
9
|
userId: z.string().uuid().nullable().optional(),
|
|
10
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
11
|
}),
|
|
12
|
-
data: z
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
data: z
|
|
13
|
+
.object({
|
|
14
|
+
isPublished: z.boolean(),
|
|
15
|
+
postId: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
18
|
+
message: 'Post ID is required when job is published',
|
|
19
|
+
path: ['postId'],
|
|
20
|
+
}),
|
|
15
21
|
});
|
|
16
22
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
23
|
|
|
@@ -18,6 +18,8 @@ export const VideoJobSchema = z.object({
|
|
|
18
18
|
uuid: z.string(),
|
|
19
19
|
prompt: z.string(),
|
|
20
20
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
21
|
+
isPublished: z.boolean(),
|
|
22
|
+
postId: z.string().nullable(),
|
|
21
23
|
dislikeReason: z.string().nullable(),
|
|
22
24
|
externalId: z.string().nullable(),
|
|
23
25
|
title: z.string(),
|
|
@@ -9,9 +9,15 @@ export namespace UpdatePublishedStatusVideoEditorJobsCommand {
|
|
|
9
9
|
userId: z.string().uuid().nullable().optional(),
|
|
10
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
11
|
}),
|
|
12
|
-
data: z
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
data: z
|
|
13
|
+
.object({
|
|
14
|
+
isPublished: z.boolean(),
|
|
15
|
+
postId: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => (data.isPublished ? !!data.postId : true), {
|
|
18
|
+
message: 'Post ID is required when job is published',
|
|
19
|
+
path: ['postId'],
|
|
20
|
+
}),
|
|
15
21
|
});
|
|
16
22
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
23
|
|
|
@@ -22,6 +22,7 @@ export const VideoEditorJobSchema = z.object({
|
|
|
22
22
|
userId: z.string().nullable().optional(),
|
|
23
23
|
unregisteredUserId: z.string().nullable().optional(),
|
|
24
24
|
isPublished: z.boolean(),
|
|
25
|
+
postId: z.string().nullable(),
|
|
25
26
|
isDeleted: z.boolean(),
|
|
26
27
|
createdAt: z.date(),
|
|
27
28
|
completedAt: z.date().nullable().optional(),
|
|
@@ -3,15 +3,11 @@ import { ICommandResponseSchema } from '../../common/models/command-response.sch
|
|
|
3
3
|
import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
|
|
4
4
|
|
|
5
5
|
export namespace FindVideoEditorJobByIdQuery {
|
|
6
|
-
export const RequestSchema = z
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
13
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
14
|
-
});
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
});
|
|
15
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
16
12
|
|
|
17
13
|
export const ResponseSchema = ICommandResponseSchema(VideoEditorJobSchema);
|