@purpleschool/gptbot-tools 0.2.30-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/models/video-model.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/models/video-model.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
|
@@ -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(),
|
|
@@ -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 { TTSJobSchema } from '../models/tts-job.schema';
|
|
5
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
5
6
|
|
|
6
7
|
export namespace FindTTSJobsQuery {
|
|
7
8
|
export const RequestSchema = z
|
|
@@ -10,6 +11,9 @@ export namespace FindTTSJobsQuery {
|
|
|
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).default(0).optional(),
|
|
15
19
|
})
|
|
@@ -6,6 +6,7 @@ export const TTS_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.tts.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.tts.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.tts.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.tts.jobs.update-favorite.rpc',
|
|
9
10
|
SOFT_DELETE: 'tools.tts.jobs.soft-delete.rpc',
|
|
10
11
|
SOFT_DELETE_ALL: 'tools.tts.jobs.soft-delete-all.rpc',
|
|
11
12
|
RETRY: 'tools.tts.jobs.retry.rpc',
|
package/video/commands/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './set-reaction-to-video-job.command';
|
|
|
5
5
|
export * from './video.command';
|
|
6
6
|
export * from './get-video-price.command';
|
|
7
7
|
export * from './update-video-job-title.command';
|
|
8
|
+
export * from './update-video-job-favorite.command';
|
|
8
9
|
export * from './video-model';
|
|
9
10
|
export * from './update-published-status-video-jobs.command';
|
|
10
11
|
export * from './moderate-video-before-post.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { VideoJobSchema } from '../models/video-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateVideoJobFavoriteCommand {
|
|
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(VideoJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -43,6 +43,7 @@ export const VideoJobSchema = z.object({
|
|
|
43
43
|
tokenReservationId: z.string().nullable().optional(),
|
|
44
44
|
workspaceId: z.string().uuid().nullable().optional(),
|
|
45
45
|
isDeleted: z.boolean(),
|
|
46
|
+
isFavorite: z.boolean(),
|
|
46
47
|
createdAt: z.date(),
|
|
47
48
|
completedAt: z.date().nullable().optional(),
|
|
48
49
|
updatedAt: z.date(),
|
|
@@ -87,6 +87,7 @@ export const VideoModelSchema = z.object({
|
|
|
87
87
|
aiModel: z.string(),
|
|
88
88
|
pricePerSecond: z.number(),
|
|
89
89
|
order: z.number(),
|
|
90
|
+
isNew: z.boolean(),
|
|
90
91
|
status: z.nativeEnum(TOOL_MODEL_STATUS),
|
|
91
92
|
icons: IconVariantsSchema,
|
|
92
93
|
strategy: z.nativeEnum(VIDEO_GENERATION_STRATEGY),
|
|
@@ -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 { VideoJobSchema } from '../models/video-job.schema';
|
|
5
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
5
6
|
|
|
6
7
|
export namespace FindVideoJobsQuery {
|
|
7
8
|
export const RequestSchema = z
|
|
@@ -11,6 +12,9 @@ export namespace FindVideoJobsQuery {
|
|
|
11
12
|
scope: z.nativeEnum(JOB_SCOPE).optional().default(JOB_SCOPE.TOOL),
|
|
12
13
|
workspaceId: z.string().uuid().nullable().optional(),
|
|
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
|
})
|
|
@@ -6,6 +6,7 @@ export const VIDEO_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.video.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.video.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.video.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.video.jobs.update-favorite.rpc',
|
|
9
10
|
SOFT_DELETE: 'tools.video.jobs.soft-delete.rpc',
|
|
10
11
|
SOFT_DELETE_ALL: 'tools.video.jobs.soft-delete-all.rpc',
|
|
11
12
|
RETRY: 'tools.video.jobs.retry.rpc',
|
|
@@ -3,6 +3,7 @@ export * from './delete-video-editor-job-by-uuid.command';
|
|
|
3
3
|
export * from './retry-video-editor-job.command';
|
|
4
4
|
export * from './set-reaction-to-video-editor-job.command';
|
|
5
5
|
export * from './update-video-editor-job-title.command';
|
|
6
|
+
export * from './update-video-editor-job-favorite.command';
|
|
6
7
|
export * from './update-published-status-video-editor-jobs.command';
|
|
7
8
|
export * from './edit-video.command';
|
|
8
9
|
export * from './get-video-editor-price.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateVideoEditorJobFavoriteCommand {
|
|
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(VideoEditorJobSchema);
|
|
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 { VideoEditorJobSchema } from '../models/video-editor-job.schema';
|
|
5
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
5
6
|
|
|
6
7
|
export namespace FindVideoEditorJobsQuery {
|
|
7
8
|
export const RequestSchema = z
|
|
@@ -10,6 +11,9 @@ export namespace FindVideoEditorJobsQuery {
|
|
|
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).default(0).optional(),
|
|
15
19
|
})
|
|
@@ -6,6 +6,7 @@ export const VIDEO_EDITOR_AMQP_ROUTES = {
|
|
|
6
6
|
LIST_JOBS: 'tools.video-editor.jobs.list.rpc',
|
|
7
7
|
SET_REACTION: 'tools.video-editor.jobs.set-reaction.rpc',
|
|
8
8
|
UPDATE_TITLE: 'tools.video-editor.jobs.update-title.rpc',
|
|
9
|
+
UPDATE_FAVORITE: 'tools.video-editor.jobs.update-favorite.rpc',
|
|
9
10
|
UPDATE_JOB: 'tools.video-editor.jobs.update.rpc',
|
|
10
11
|
SOFT_DELETE: 'tools.video-editor.jobs.soft-delete.rpc',
|
|
11
12
|
SOFT_DELETE_ALL: 'tools.video-editor.jobs.soft-delete-all.rpc',
|
package/writer/commands/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './writer-fix-errors.command';
|
|
|
15
15
|
export * from './writer-generate-text.command';
|
|
16
16
|
export * from './update-writer-document-contents.command';
|
|
17
17
|
export * from './set-reaction-writer-document.command';
|
|
18
|
+
export * from './update-writer-document-favorite.command';
|
|
18
19
|
export * from './collect-sources.command';
|
|
19
20
|
export * from './upload-writer-source.command';
|
|
20
21
|
export * from './confirm-source-citation-metadata.command';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { WriterDocumentSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateWriterDocumentFavoriteCommand {
|
|
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(WriterDocumentSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { WriterDocumentSchema } from '../models';
|
|
4
|
+
import { JOB_SORT, JOB_STATUS } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace FindWriterDocumentsQuery {
|
|
6
7
|
export const RequestSchema = z.object({
|
|
7
8
|
userId: z.string().uuid().optional(),
|
|
8
9
|
unregisteredUserId: z.string().uuid().optional(),
|
|
9
10
|
topic: 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
|
});
|