@purpleschool/gptbot-tools 0.2.31-stage → 0.2.32-stage
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/diagrams/commands/index.js +1 -0
- package/build/diagrams/commands/update-diagrams-job-favorite.command.js +16 -0
- package/build/diagrams/models/diagrams-job.schema.js +1 -0
- package/build/diagrams/queries/find-diagrams-jobs.query.js +4 -0
- package/build/diagrams/routes/diagrams.amqp.routes.js +1 -0
- package/build/html-page-builder/commands/index.js +1 -0
- package/build/html-page-builder/commands/update-html-page-builder-session-favorite.command.js +16 -0
- package/build/html-page-builder/commands/update-html-page-builder-session-title.command.js +2 -1
- package/build/html-page-builder/models/html-page-builder-session.schema.js +1 -0
- package/build/html-page-builder/queries/find-html-page-builder-sessions.query.js +4 -0
- package/build/html-page-builder/routes/html-page-builder.amqp.routes.js +1 -0
- package/build/image-editor/commands/index.js +1 -0
- package/build/image-editor/commands/update-image-editor-job-favorite.command.js +16 -0
- package/build/image-editor/models/image-editor-job.schema.js +1 -0
- package/build/image-editor/queries/find-image-editor-jobs.query.js +4 -0
- package/build/image-editor/queries/find-image-jobs.query.js +4 -0
- package/build/image-editor/routes/image-editor.amqp.routes.js +1 -0
- package/build/image-generation/commands/index.js +1 -0
- package/build/image-generation/commands/update-image-generation-job-favorite.command.js +16 -0
- package/build/image-generation/models/image-generation-job.schema.js +1 -0
- package/build/image-generation/queries/find-image-generation-jobs.query.js +4 -0
- package/build/image-generation/routes/image-generation.amqp.routes.js +1 -0
- package/build/interior-design/commands/index.js +1 -0
- package/build/interior-design/commands/update-interior-design-job-favorite.command.js +16 -0
- package/build/interior-design/models/interior-design-job.schema.js +1 -0
- package/build/interior-design/queries/find-interior-design-jobs.query.js +4 -0
- package/build/interior-design/routes/interior-design.amqp.routes.js +1 -0
- package/build/marketplace-card/commands/index.js +1 -0
- package/build/marketplace-card/commands/update-marketplace-card-job-favorite.command.js +16 -0
- package/build/marketplace-card/models/marketplace-card-job.schema.js +1 -0
- package/build/marketplace-card/queries/find-marketplace-card-jobs.query.js +4 -0
- package/build/marketplace-card/routes/marketplace-card.amqp.routes.js +1 -0
- package/build/music/commands/index.js +1 -0
- package/build/music/commands/update-music-job-favorite.command.js +16 -0
- package/build/music/models/music-job.schema.js +1 -0
- package/build/music/queries/find-music-jobs.query.js +4 -0
- package/build/music/routes/music.amqp.routes.js +1 -0
- package/build/paraphrase/commands/index.js +1 -0
- package/build/paraphrase/commands/update-paraphrase-job-favorite.command.js +16 -0
- package/build/paraphrase/queries/find-paraphrase-jobs.query.js +4 -0
- package/build/paraphrase/routes/paraphrase.amqp.routes.js +1 -0
- package/build/presentation/commands/index.js +1 -0
- package/build/presentation/commands/update-presentation-favorite.command.js +16 -0
- package/build/presentation/models/presentation.schema.js +1 -0
- package/build/presentation/queries/find-presentations.query.js +4 -0
- package/build/presentation/routes/presentation.routes.js +1 -0
- package/build/solving-edu-task/commands/index.js +1 -0
- package/build/solving-edu-task/commands/update-solving-edu-task-job-favorite.command.js +16 -0
- package/build/solving-edu-task/models/solving-edu-task-job.schema.js +1 -0
- package/build/solving-edu-task/queries/find-solving-edu-task-jobs.query.js +4 -0
- package/build/solving-edu-task/routes/solving-edu-task.amqp.routes.js +1 -0
- package/build/spell-corrector/commands/index.js +1 -0
- package/build/spell-corrector/commands/update-spell-corrector-job-favorite.command.js +16 -0
- package/build/spell-corrector/queries/find-spell-corrector-jobs.query.js +4 -0
- package/build/spell-corrector/routes/spell-corrector.amqp.routes.js +1 -0
- package/build/stt/commands/index.js +1 -0
- package/build/stt/commands/update-stt-job-favorite.command.js +16 -0
- package/build/stt/models/stt-job.schema.js +1 -0
- package/build/stt/queries/find-stt-jobs.query.js +4 -0
- package/build/stt/routes/stt.amqp.routes.js +1 -0
- package/build/tools/enums/index.js +1 -0
- package/build/tools/enums/job-sort.enum.js +8 -0
- package/build/tts/commands/index.js +1 -0
- package/build/tts/commands/update-tts-job-favorite.command.js +16 -0
- package/build/tts/models/tts-job.schema.js +1 -0
- package/build/tts/queries/find-tts-jobs.query.js +4 -0
- package/build/tts/routes/tts.amqp.routes.js +1 -0
- package/build/video/commands/index.js +1 -0
- package/build/video/commands/update-video-job-favorite.command.js +16 -0
- package/build/video/models/video-job.schema.js +1 -0
- package/build/video/queries/find-video-jobs.query.js +4 -0
- package/build/video/routes/video.amqp.routes.js +1 -0
- package/build/video-editor/commands/index.js +1 -0
- package/build/video-editor/commands/update-video-editor-job-favorite.command.js +16 -0
- package/build/video-editor/models/video-editor-job.schema.js +1 -0
- package/build/video-editor/queries/find-video-editor-jobs.query.js +4 -0
- package/build/video-editor/routes/video-editor.amqp.routes.js +1 -0
- package/build/writer/commands/index.js +1 -0
- package/build/writer/commands/update-writer-document-favorite.command.js +16 -0
- package/build/writer/models/writer-document.schema.js +1 -0
- package/build/writer/queries/find-writer-documents.query.js +4 -0
- package/build/writer/routes/writer.routes.js +1 -0
- package/diagrams/commands/index.ts +1 -0
- package/diagrams/commands/update-diagrams-job-favorite.command.ts +16 -0
- package/diagrams/models/diagrams-job.schema.ts +1 -0
- package/diagrams/queries/find-diagrams-jobs.query.ts +4 -0
- package/diagrams/routes/diagrams.amqp.routes.ts +1 -0
- package/html-page-builder/commands/index.ts +1 -0
- package/html-page-builder/commands/update-html-page-builder-session-favorite.command.ts +16 -0
- package/html-page-builder/commands/update-html-page-builder-session-title.command.ts +7 -6
- package/html-page-builder/models/html-page-builder-session.schema.ts +1 -0
- package/html-page-builder/queries/find-html-page-builder-sessions.query.ts +4 -0
- package/html-page-builder/routes/html-page-builder.amqp.routes.ts +1 -0
- package/image-editor/commands/index.ts +1 -0
- package/image-editor/commands/update-image-editor-job-favorite.command.ts +16 -0
- package/image-editor/models/image-editor-job.schema.ts +1 -0
- package/image-editor/queries/find-image-editor-jobs.query.ts +4 -0
- package/image-editor/queries/find-image-jobs.query.ts +4 -0
- package/image-editor/routes/image-editor.amqp.routes.ts +1 -0
- package/image-generation/commands/index.ts +1 -0
- package/image-generation/commands/update-image-generation-job-favorite.command.ts +16 -0
- package/image-generation/models/image-generation-job.schema.ts +1 -0
- package/image-generation/queries/find-image-generation-jobs.query.ts +4 -0
- package/image-generation/routes/image-generation.amqp.routes.ts +1 -0
- package/interior-design/commands/index.ts +1 -0
- package/interior-design/commands/update-interior-design-job-favorite.command.ts +16 -0
- package/interior-design/models/interior-design-job.schema.ts +1 -0
- package/interior-design/queries/find-interior-design-jobs.query.ts +4 -0
- package/interior-design/routes/interior-design.amqp.routes.ts +1 -0
- package/marketplace-card/commands/index.ts +1 -0
- package/marketplace-card/commands/update-marketplace-card-job-favorite.command.ts +16 -0
- package/marketplace-card/models/marketplace-card-job.schema.ts +1 -0
- package/marketplace-card/queries/find-marketplace-card-jobs.query.ts +4 -0
- package/marketplace-card/routes/marketplace-card.amqp.routes.ts +1 -0
- package/music/commands/index.ts +1 -0
- package/music/commands/update-music-job-favorite.command.ts +16 -0
- package/music/models/music-job.schema.ts +1 -0
- package/music/queries/find-music-jobs.query.ts +4 -0
- package/music/routes/music.amqp.routes.ts +1 -0
- package/package.json +1 -1
- package/paraphrase/commands/index.ts +1 -0
- package/paraphrase/commands/update-paraphrase-job-favorite.command.ts +16 -0
- package/paraphrase/queries/find-paraphrase-jobs.query.ts +4 -0
- package/paraphrase/routes/paraphrase.amqp.routes.ts +1 -0
- package/presentation/commands/index.ts +1 -0
- package/presentation/commands/update-presentation-favorite.command.ts +16 -0
- package/presentation/models/presentation.schema.ts +1 -0
- package/presentation/queries/find-presentations.query.ts +4 -0
- package/presentation/routes/presentation.routes.ts +1 -0
- package/solving-edu-task/commands/index.ts +1 -0
- package/solving-edu-task/commands/update-solving-edu-task-job-favorite.command.ts +16 -0
- package/solving-edu-task/models/solving-edu-task-job.schema.ts +1 -0
- package/solving-edu-task/queries/find-solving-edu-task-jobs.query.ts +4 -0
- package/solving-edu-task/routes/solving-edu-task.amqp.routes.ts +1 -0
- package/spell-corrector/commands/index.ts +1 -0
- package/spell-corrector/commands/update-spell-corrector-job-favorite.command.ts +16 -0
- package/spell-corrector/queries/find-spell-corrector-jobs.query.ts +4 -0
- package/spell-corrector/routes/spell-corrector.amqp.routes.ts +1 -0
- package/stt/commands/index.ts +1 -0
- package/stt/commands/update-stt-job-favorite.command.ts +16 -0
- package/stt/models/stt-job.schema.ts +1 -0
- package/stt/queries/find-stt-jobs.query.ts +4 -0
- package/stt/routes/stt.amqp.routes.ts +1 -0
- package/tools/enums/index.ts +1 -0
- package/tools/enums/job-sort.enum.ts +4 -0
- package/tts/commands/index.ts +1 -0
- package/tts/commands/update-tts-job-favorite.command.ts +16 -0
- package/tts/models/tts-job.schema.ts +1 -0
- package/tts/queries/find-tts-jobs.query.ts +4 -0
- package/tts/routes/tts.amqp.routes.ts +1 -0
- package/video/commands/index.ts +1 -0
- package/video/commands/update-video-job-favorite.command.ts +16 -0
- package/video/models/video-job.schema.ts +1 -0
- package/video/queries/find-video-jobs.query.ts +4 -0
- package/video/routes/video.amqp.routes.ts +1 -0
- package/video-editor/commands/index.ts +1 -0
- package/video-editor/commands/update-video-editor-job-favorite.command.ts +16 -0
- package/video-editor/models/video-editor-job.schema.ts +1 -0
- package/video-editor/queries/find-video-editor-jobs.query.ts +4 -0
- package/video-editor/routes/video-editor.amqp.routes.ts +1 -0
- package/writer/commands/index.ts +1 -0
- package/writer/commands/update-writer-document-favorite.command.ts +16 -0
- package/writer/models/writer-document.schema.ts +1 -0
- package/writer/queries/find-writer-documents.query.ts +4 -0
- package/writer/routes/writer.routes.ts +1 -0
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ImageEditorJobSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindImageJobsQuery {
|
|
6
7
|
export const RequestSchema = z.object({
|
|
7
8
|
userId: z.string().uuid().optional(),
|
|
8
9
|
unregisteredUserId: z.string().uuid().optional(),
|
|
9
10
|
title: z.string().optional(),
|
|
11
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
12
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
10
14
|
limit: z.coerce.number().min(1).optional(),
|
|
11
15
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
12
16
|
});
|
|
@@ -6,6 +6,7 @@ export const IMAGE_EDITOR_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.image.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.image.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.image.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.image.jobs.update-favorite.rpc',
|
|
9
10
|
UPDATE_JOB: 'tools.image.jobs.update.rpc',
|
|
10
11
|
SOFT_DELETE: 'tools.image.jobs.soft-delete.rpc',
|
|
11
12
|
SOFT_DELETE_ALL: 'tools.image.jobs.soft-delete-all.rpc',
|
|
@@ -6,6 +6,7 @@ export * from './soft-delete-image-generation-job-by-uuid.command';
|
|
|
6
6
|
export * from './soft-delete-image-generation-jobs-by-criteria.command';
|
|
7
7
|
export * from './set-reaction-to-image-generation-job.command';
|
|
8
8
|
export * from './update-image-generation-job-title.command';
|
|
9
|
+
export * from './update-image-generation-job-favorite.command';
|
|
9
10
|
export * from './update-published-status-image-generation-jobs.command';
|
|
10
11
|
export * from './image-generation-model';
|
|
11
12
|
export * from './retry-image-generation-job.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { ImageGenerationJobSchema } from '../models/image-generation-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateImageGenerationJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(ImageGenerationJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -35,6 +35,7 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
35
35
|
callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN),
|
|
36
36
|
postId: z.string().nullable(),
|
|
37
37
|
isDeleted: z.boolean(),
|
|
38
|
+
isFavorite: z.boolean(),
|
|
38
39
|
internalError: z.string().nullable(),
|
|
39
40
|
tokenReservationId: z.string().nullable().optional(),
|
|
40
41
|
createdAt: z.date(),
|
|
@@ -3,6 +3,7 @@ import { JOB_SCOPE } from '../../common';
|
|
|
3
3
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
4
4
|
import { ImageGenerationJobSchema } from '../models';
|
|
5
5
|
import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
|
|
6
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
6
7
|
|
|
7
8
|
export namespace FindImageGenerationJobsQuery {
|
|
8
9
|
export const RequestSchema = z
|
|
@@ -11,6 +12,9 @@ export namespace FindImageGenerationJobsQuery {
|
|
|
11
12
|
unregisteredUserId: z.string().uuid().optional(),
|
|
12
13
|
scope: z.nativeEnum(JOB_SCOPE).optional().default(JOB_SCOPE.TOOL),
|
|
13
14
|
title: z.string().optional(),
|
|
15
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
16
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
17
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
14
18
|
limit: z.coerce.number().min(1).optional(),
|
|
15
19
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
16
20
|
callOrigin: z.nativeEnum(STATISTICS_CALL_ORIGIN).optional(),
|
|
@@ -7,6 +7,7 @@ export const IMAGE_GENERATION_AMQP_ROUTES = {
|
|
|
7
7
|
LIST_JOBS: 'tools.image-generation.jobs.list.rpc',
|
|
8
8
|
SET_REACTION: 'tools.image-generation.jobs.set-reaction.rpc',
|
|
9
9
|
UPDATE_TITLE: 'tools.image-generation.jobs.update-title.rpc',
|
|
10
|
+
UPDATE_FAVORITE: 'tools.image-generation.jobs.update-favorite.rpc',
|
|
10
11
|
UPDATE_JOB: 'tools.image-generation.jobs.update.rpc',
|
|
11
12
|
SOFT_DELETE: 'tools.image-generation.jobs.soft-delete.rpc',
|
|
12
13
|
SOFT_DELETE_ALL: 'tools.image-generation.jobs.soft-delete-all.rpc',
|
|
@@ -4,5 +4,6 @@ export * from './retry-interior-design-job.command';
|
|
|
4
4
|
export * from './set-reaction-to-interior-design-job.command';
|
|
5
5
|
export * from './interior-design.command';
|
|
6
6
|
export * from './update-interior-design-job-title.command';
|
|
7
|
+
export * from './update-interior-design-job-favorite.command';
|
|
7
8
|
export * from './interior-design-model';
|
|
8
9
|
export * from './get-interior-design-price.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { InteriorDesignJobSchema } from '../models/interior-design-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateInteriorDesignJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(InteriorDesignJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -32,6 +32,7 @@ export const InteriorDesignJobSchema = z.object({
|
|
|
32
32
|
tokenReservationId: z.string().nullable().optional(),
|
|
33
33
|
jobSource: z.nativeEnum(INTERIOR_DESIGN_JOB_SOURCE),
|
|
34
34
|
isDeleted: z.boolean(),
|
|
35
|
+
isFavorite: z.boolean(),
|
|
35
36
|
createdAt: z.date(),
|
|
36
37
|
completedAt: z.date().nullable().optional(),
|
|
37
38
|
updatedAt: z.date(),
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { InteriorDesignJobSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindInteriorDesignJobsQuery {
|
|
6
7
|
export const RequestSchema = z.object({
|
|
7
8
|
userId: z.string().uuid().optional(),
|
|
8
9
|
unregisteredUserId: z.string().uuid().optional(),
|
|
9
10
|
title: z.string().optional(),
|
|
11
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
12
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
10
14
|
limit: z.coerce.number().min(1).optional(),
|
|
11
15
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
12
16
|
});
|
|
@@ -6,6 +6,7 @@ export const INTERIOR_DESIGN_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.interior-design.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.interior-design.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.interior-design.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.interior-design.jobs.update-favorite.rpc',
|
|
9
10
|
SOFT_DELETE: 'tools.interior-design.jobs.soft-delete.rpc',
|
|
10
11
|
SOFT_DELETE_ALL: 'tools.interior-design.jobs.soft-delete-all.rpc',
|
|
11
12
|
RETRY: 'tools.interior-design.jobs.retry.rpc',
|
|
@@ -6,3 +6,4 @@ export * from './retry-marketplace-card-job.command';
|
|
|
6
6
|
export * from './get-marketplace-card-price.command';
|
|
7
7
|
export * from './soft-delete-all-marketplace-card-jobs.command';
|
|
8
8
|
export * from './update-title-marketplace-card-job.command';
|
|
9
|
+
export * from './update-marketplace-card-job-favorite.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { MarketplaceCardJobSchema } from '../models/marketplace-card-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateMarketplaceCardJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -46,6 +46,7 @@ export const MarketplaceCardJobSchema = z.object({
|
|
|
46
46
|
userId: z.string().nullable().optional(),
|
|
47
47
|
unregisteredUserId: z.string().nullable().optional(),
|
|
48
48
|
isDeleted: z.boolean(),
|
|
49
|
+
isFavorite: z.boolean(),
|
|
49
50
|
createdAt: z.date(),
|
|
50
51
|
completedAt: z.date().nullable().optional(),
|
|
51
52
|
updatedAt: z.date(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { MarketplaceCardJobSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindMarketplaceCardJobsQuery {
|
|
6
7
|
export const RequestSchema = z
|
|
@@ -8,6 +9,9 @@ export namespace FindMarketplaceCardJobsQuery {
|
|
|
8
9
|
userId: z.string().uuid().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().optional(),
|
|
10
11
|
title: z.string().optional(),
|
|
12
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
13
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
14
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
11
15
|
limit: z.coerce.number().min(1).optional(),
|
|
12
16
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
13
17
|
})
|
|
@@ -9,5 +9,6 @@ export const MARKETPLACE_CARD_AMQP_ROUTES = {
|
|
|
9
9
|
SOFT_DELETE: 'tools.marketplace-card.soft-delete.rpc',
|
|
10
10
|
RETRY: 'tools.marketplace-card.jobs.retry.rpc',
|
|
11
11
|
UPDATE_TITLE: 'tools.marketplace-card.jobs.update-title.rpc',
|
|
12
|
+
UPDATE_FAVORITE: 'tools.marketplace-card.jobs.update-favorite.rpc',
|
|
12
13
|
SOFT_DELETE_ALL: 'tools.marketplace-card.jobs.soft-delete-all.rpc',
|
|
13
14
|
} as const;
|
package/music/commands/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './set-reaction-to-music-job.command';
|
|
|
5
5
|
export * from './generate-music.command';
|
|
6
6
|
export * from './get-music-price.command';
|
|
7
7
|
export * from './update-music-job-title.command';
|
|
8
|
+
export * from './update-music-job-favorite.command';
|
|
8
9
|
export * from './convert-to-wav.command';
|
|
9
10
|
export * from './generate-lyrics.command';
|
|
10
11
|
export * from './music-model';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { MusicJobSchema } from '../models/music-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateMusicJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(MusicJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -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
|
isDeleted: z.boolean(),
|
|
51
|
+
isFavorite: z.boolean(),
|
|
51
52
|
tokenReservationId: z.string().nullable().optional(),
|
|
52
53
|
createdAt: z.date(),
|
|
53
54
|
completedAt: z.date().nullable().optional(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { MusicJobSchema } from '../models/music-job.schema';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindMusicJobsQuery {
|
|
6
7
|
export const RequestSchema = z
|
|
@@ -8,6 +9,9 @@ export namespace FindMusicJobsQuery {
|
|
|
8
9
|
userId: z.string().uuid().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().optional(),
|
|
10
11
|
title: z.string().optional(),
|
|
12
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
13
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
14
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
11
15
|
limit: z.coerce.number().min(1).optional(),
|
|
12
16
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
13
17
|
})
|
|
@@ -8,6 +8,7 @@ export const MUSIC_AMQP_ROUTES = {
|
|
|
8
8
|
LIST_JOBS: 'tools.music.jobs.list.rpc',
|
|
9
9
|
SET_REACTION: 'tools.music.jobs.set-reaction.rpc',
|
|
10
10
|
UPDATE_TITLE: 'tools.music.jobs.update-title.rpc',
|
|
11
|
+
UPDATE_FAVORITE: 'tools.music.jobs.update-favorite.rpc',
|
|
11
12
|
UPDATE_JOB: 'tools.music.jobs.update.rpc',
|
|
12
13
|
SOFT_DELETE: 'tools.music.jobs.soft-delete.rpc',
|
|
13
14
|
SOFT_DELETE_ALL: 'tools.music.jobs.soft-delete-all.rpc',
|
package/package.json
CHANGED
|
@@ -3,5 +3,6 @@ export * from './delete-paraphrase-job-by-uuid.command';
|
|
|
3
3
|
export * from './delete-all-paraphrase-jobs.command';
|
|
4
4
|
export * from './set-reaction-to-paraphrase-job.command';
|
|
5
5
|
export * from './update-paraphrase-job-title.command';
|
|
6
|
+
export * from './update-paraphrase-job-favorite.command';
|
|
6
7
|
export * from './retry-paraphrase-job.command';
|
|
7
8
|
export * from './get-paraphrase-price.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { ParaphraseJobSchema } from '../models/paraphrase-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateParaphraseJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(ParaphraseJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ParaphraseJobSchema } from '../models/paraphrase-job.schema';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindParaphraseJobsQuery {
|
|
6
7
|
export const RequestSchema = z
|
|
@@ -8,6 +9,9 @@ export namespace FindParaphraseJobsQuery {
|
|
|
8
9
|
userId: z.string().uuid().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().optional(),
|
|
10
11
|
title: z.string().optional(),
|
|
12
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
13
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
14
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
11
15
|
limit: z.coerce.number().min(1).optional(),
|
|
12
16
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
13
17
|
})
|
|
@@ -6,6 +6,7 @@ export const PARAPHRASE_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.paraphrase.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.paraphrase.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.paraphrase.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.paraphrase.jobs.update-favorite.rpc',
|
|
9
10
|
SOFT_DELETE: 'tools.paraphrase.jobs.soft-delete.rpc',
|
|
10
11
|
SOFT_DELETE_ALL: 'tools.paraphrase.jobs.soft-delete-all.rpc',
|
|
11
12
|
RETRY: 'tools.paraphrase.jobs.retry.rpc',
|
|
@@ -12,6 +12,7 @@ export * from './reposition-slide-outline.command';
|
|
|
12
12
|
export * from './reposition-slide.command';
|
|
13
13
|
export * from './update-slide-outline.command';
|
|
14
14
|
export * from './update-presentation.command';
|
|
15
|
+
export * from './update-presentation-favorite.command';
|
|
15
16
|
export * from './update-presentation-outline.command';
|
|
16
17
|
export * from './update-presentation-slides.command';
|
|
17
18
|
export * from './update-slide-image-slot.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresentationSchema } from '../models';
|
|
3
|
+
import { ICommandResponseSchema } from '../../common';
|
|
4
|
+
|
|
5
|
+
export namespace UpdatePresentationFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
userId: z.string().uuid().nullable().optional(),
|
|
8
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
presentationId: z.string().uuid(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(PresentationSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -20,6 +20,7 @@ export const PresentationSchema = z.object({
|
|
|
20
20
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
21
21
|
slideCount: z.number(),
|
|
22
22
|
isDeleted: z.boolean(),
|
|
23
|
+
isFavorite: z.boolean(),
|
|
23
24
|
tokenReservationId: z.string().nullable().optional(),
|
|
24
25
|
lastContentUpdateAt: z.date().nullable(),
|
|
25
26
|
lastPptxExportedAt: z.date().nullable(),
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { PresentationSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindPresentationsQuery {
|
|
6
7
|
export const RequestSchema = z.object({
|
|
7
8
|
userId: z.string().uuid().optional(),
|
|
8
9
|
unregisteredUserId: z.string().uuid().optional(),
|
|
9
10
|
title: z.string().optional(),
|
|
11
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
12
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
13
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
10
14
|
limit: z.coerce.number().min(1).optional(),
|
|
11
15
|
offset: z.coerce.number().min(0).optional(),
|
|
12
16
|
});
|
|
@@ -12,6 +12,7 @@ export const PRESENTATION_AMQP_ROUTES = {
|
|
|
12
12
|
FIND_OUTLINE: 'tools.presentation.find-outline.rpc',
|
|
13
13
|
EXPORT_AS_PPTX: 'tools.presentation.export-as-pptx.rpc',
|
|
14
14
|
UPDATE_PRESENTATION: 'tools.presentation.update-presentation.rpc',
|
|
15
|
+
UPDATE_PRESENTATION_FAVORITE: 'tools.presentation.update-presentation-favorite.rpc',
|
|
15
16
|
DELETE_ALL_USER_PRESENTATIONS: 'tools.presentation.delete-all-user-presentations.rpc',
|
|
16
17
|
BUILD_BLANK_SLIDE: 'tools.presentation.build-blank-slide.rpc',
|
|
17
18
|
UPDATE_PRESENTATION_SLIDES: 'tools.presentation.update-presentation-slides.rpc',
|
|
@@ -5,3 +5,4 @@ export * from './retry-solving-edu-task-job.command';
|
|
|
5
5
|
export * from './set-reaction-to-solving-edu-task-job.command';
|
|
6
6
|
export * from './solving-edu-task.command';
|
|
7
7
|
export * from './update-solving-edu-task-job-title.command';
|
|
8
|
+
export * from './update-solving-edu-task-job-favorite.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SolvingEduTaskJobSchema } from '../models/solving-edu-task-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateSolvingEduTaskJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(SolvingEduTaskJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -27,6 +27,7 @@ export const SolvingEduTaskJobSchema = z.object({
|
|
|
27
27
|
unregisteredUserId: z.string().nullable().optional(),
|
|
28
28
|
tokenReservationId: z.string().nullable().optional(),
|
|
29
29
|
isDeleted: z.boolean(),
|
|
30
|
+
isFavorite: z.boolean(),
|
|
30
31
|
createdAt: z.date(),
|
|
31
32
|
completedAt: z.date().nullable().optional(),
|
|
32
33
|
updatedAt: z.date(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { SolvingEduTaskJobSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindSolvingEduTaskJobsQuery {
|
|
6
7
|
export const RequestSchema = z
|
|
@@ -8,6 +9,9 @@ export namespace FindSolvingEduTaskJobsQuery {
|
|
|
8
9
|
userId: z.string().uuid().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().optional(),
|
|
10
11
|
title: z.string().optional(),
|
|
12
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
13
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
14
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
11
15
|
limit: z.coerce.number().min(1).optional(),
|
|
12
16
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
13
17
|
})
|
|
@@ -6,6 +6,7 @@ export const SOLVING_EDU_TASK_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.solving-edu-task.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.solving-edu-task.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.solving-edu-task.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.solving-edu-task.jobs.update-favorite.rpc',
|
|
9
10
|
SOFT_DELETE: 'tools.solving-edu-task.jobs.soft-delete.rpc',
|
|
10
11
|
SOFT_DELETE_ALL: 'tools.solving-edu-task.jobs.soft-delete-all.rpc',
|
|
11
12
|
RETRY: 'tools.solving-edu-task.jobs.retry.rpc',
|
|
@@ -3,5 +3,6 @@ export * from './get-spell-corrector-price.command';
|
|
|
3
3
|
export * from './retry-spell-corrector-job.command';
|
|
4
4
|
export * from './set-reaction-to-spell-corrector-job.command';
|
|
5
5
|
export * from './update-spell-corrector-job-title.command';
|
|
6
|
+
export * from './update-spell-corrector-job-favorite.command';
|
|
6
7
|
export * from './delete-all-spell-corrector-jobs.command';
|
|
7
8
|
export * from './delete-spell-corrector-job-by-uuid.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models/spell-corrector-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateSpellCorrectorJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindSpellCorrectorJobsQuery {
|
|
6
7
|
export const RequestSchema = z
|
|
@@ -8,6 +9,9 @@ export namespace FindSpellCorrectorJobsQuery {
|
|
|
8
9
|
userId: z.string().uuid().optional(),
|
|
9
10
|
unregisteredUserId: z.string().uuid().optional(),
|
|
10
11
|
title: z.string().optional(),
|
|
12
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
13
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
14
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
11
15
|
limit: z.coerce.number().min(1).optional(),
|
|
12
16
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
13
17
|
})
|
|
@@ -6,6 +6,7 @@ export const SPELL_CORRECTOR_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.spell_corrector.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.spell_corrector.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.spell_corrector.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.spell_corrector.jobs.update-favorite.rpc',
|
|
9
10
|
SOFT_DELETE: 'tools.spell_corrector.jobs.soft-delete.rpc',
|
|
10
11
|
SOFT_DELETE_ALL: 'tools.spell_corrector.jobs.soft-delete-all.rpc',
|
|
11
12
|
RETRY: 'tools.spell_corrector.jobs.retry.rpc',
|
package/stt/commands/index.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { STTJobSchema } from '../models/stt-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateSTTJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(STTJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { JOB_SCOPE } from '../../common';
|
|
3
3
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
4
4
|
import { STTJobSchema } from '../models/stt-job.schema';
|
|
5
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
5
6
|
|
|
6
7
|
export namespace FindSTTJobsQuery {
|
|
7
8
|
export const RequestSchema = z
|
|
@@ -10,6 +11,9 @@ export namespace FindSTTJobsQuery {
|
|
|
10
11
|
unregisteredUserId: z.string().uuid().optional(),
|
|
11
12
|
scope: z.nativeEnum(JOB_SCOPE).optional().default(JOB_SCOPE.TOOL),
|
|
12
13
|
title: z.string().optional(),
|
|
14
|
+
isFavorite: z.coerce.boolean().optional(),
|
|
15
|
+
createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
|
|
16
|
+
status: z.nativeEnum(JOB_STATUS).optional(),
|
|
13
17
|
limit: z.coerce.number().min(1).optional(),
|
|
14
18
|
offset: z.coerce.number().min(0).optional(),
|
|
15
19
|
})
|
|
@@ -8,5 +8,6 @@ export const STT_AMQP_ROUTES = {
|
|
|
8
8
|
SOFT_DELETE: 'tools.stt.jobs.soft-delete.rpc',
|
|
9
9
|
SOFT_DELETE_ALL: 'tools.stt.jobs.soft-delete-all.rpc',
|
|
10
10
|
UPDATE_TITLE: 'tools.stt.jobs.update-title.rpc',
|
|
11
|
+
UPDATE_FAVORITE: 'tools.stt.jobs.update-favorite.rpc',
|
|
11
12
|
RETRY: 'tools.stt.jobs.retry.rpc',
|
|
12
13
|
} as const;
|
package/tools/enums/index.ts
CHANGED
package/tts/commands/index.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { TTSJobSchema } from '../models/tts-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateTTSJobFavoriteCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
isFavorite: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(TTSJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -27,6 +27,7 @@ export const TTSJobSchema = z.object({
|
|
|
27
27
|
unregisteredUserId: z.string().nullable(),
|
|
28
28
|
tokenReservationId: z.string().nullable().optional(),
|
|
29
29
|
isDeleted: z.boolean(),
|
|
30
|
+
isFavorite: z.boolean(),
|
|
30
31
|
params: TTSJobParamsSchema,
|
|
31
32
|
createdAt: z.date(),
|
|
32
33
|
updatedAt: z.date(),
|