@purpleschool/gptbot-tools 0.0.128 → 0.0.130-stage-2
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/get-image-editor-price.command.js +24 -0
- package/build/image-editor/commands/image-editor.command.js +2 -1
- package/build/image-editor/commands/index.js +1 -0
- package/build/image-editor/commands/retry-image-editor-job.command.js +2 -1
- package/build/image-editor/models/image-editor-job.schema.js +1 -0
- package/build/image-editor/routes/image-editor.amqp.routes.js +1 -0
- package/build/image-generation/commands/execute-image-generation.command.js +3 -2
- package/build/image-generation/commands/get-image-generation-price.command.js +22 -0
- package/build/image-generation/commands/index.js +1 -0
- package/build/image-generation/commands/retry-image-generation-job.command.js +4 -3
- package/build/image-generation/models/image-generation-job.schema.js +1 -0
- package/build/image-generation/routes/image-generation.amqp.routes.js +1 -0
- package/build/music/commands/generate-music.command.js +3 -1
- package/build/music/commands/get-music-price.command.js +20 -0
- package/build/music/commands/index.js +1 -0
- package/build/music/commands/retry-music-job.command.js +3 -1
- package/build/music/models/music-job.schema.js +1 -0
- package/build/music/models/music-model.schema.js +9 -1
- package/build/music/models/music-track.schema.js +1 -0
- package/build/music/routes/music.amqp.routes.js +1 -0
- package/build/paraphrase/commands/get-paraphrase-price.command.js +15 -0
- package/build/paraphrase/commands/index.js +1 -0
- package/build/paraphrase/commands/paraphrase.command.js +2 -1
- package/build/paraphrase/commands/retry-paraphrase-job.command.js +2 -1
- package/build/paraphrase/models/paraphrase-job.schema.js +1 -0
- package/build/paraphrase/routes/paraphrase.amqp.routes.js +1 -0
- package/build/presentation/commands/generate-slides.command.js +2 -1
- package/build/presentation/commands/get-presentation-slides-generation-price.command.js +15 -0
- package/build/presentation/commands/index.js +1 -0
- package/build/presentation/models/presentation.schema.js +1 -0
- package/build/presentation/routes/presentation.routes.js +1 -0
- package/build/stt/commands/get-stt-price.command.js +16 -0
- package/build/stt/commands/index.js +1 -0
- package/build/stt/commands/retry-stt-job.command.js +2 -1
- package/build/stt/commands/stt.command.js +2 -1
- package/build/stt/models/stt-job.schema.js +1 -0
- package/build/stt/routes/stt.amqp.routes.js +1 -0
- package/build/tools/events/index.js +1 -0
- package/build/tools/events/tool-job-failed.event.js +14 -0
- package/build/tools/models/tool-job.schema.js +1 -0
- package/build/tools/routes/tools.aqmp.routes.js +1 -0
- package/build/tts/commands/get-tts-price.command.js +16 -0
- package/build/tts/commands/index.js +1 -0
- package/build/tts/commands/retry-tts-job.command.js +2 -1
- package/build/tts/commands/tts.command.js +2 -1
- package/build/tts/models/tts-job.schema.js +1 -0
- package/build/tts/routes/tts.amqp.routes.js +1 -0
- package/build/video/commands/get-video-price.command.js +17 -0
- package/build/video/commands/index.js +1 -0
- package/build/video/commands/retry-video-job.command.js +2 -1
- package/build/video/commands/video.command.js +2 -1
- package/build/video/models/video-job.schema.js +1 -0
- package/build/video/routes/video.amqp.routes.js +1 -0
- package/build/video-editor/commands/edit-video.command.js +2 -1
- package/build/video-editor/commands/get-video-editor-price.command.js +15 -0
- package/build/video-editor/commands/index.js +1 -0
- package/build/video-editor/commands/retry-video-editor-job.command.js +2 -1
- package/build/video-editor/models/video-editor-job.schema.js +1 -0
- package/build/video-editor/routes/video-editor.amqp.routes.js +1 -0
- package/build/writer/commands/generate-document-contents.command.js +2 -1
- package/build/writer/commands/get-writer-content-generation-price.command.js +16 -0
- package/build/writer/commands/index.js +1 -0
- package/build/writer/models/writer-document.schema.js +1 -0
- package/build/writer/routes/writer.routes.js +1 -0
- package/image-editor/commands/get-image-editor-price.command.ts +26 -0
- package/image-editor/commands/image-editor.command.ts +2 -1
- package/image-editor/commands/index.ts +1 -0
- package/image-editor/commands/retry-image-editor-job.command.ts +2 -1
- package/image-editor/models/image-editor-job.schema.ts +1 -0
- package/image-editor/routes/image-editor.amqp.routes.ts +1 -0
- package/image-generation/commands/execute-image-generation.command.ts +3 -2
- package/image-generation/commands/get-image-generation-price.command.ts +24 -0
- package/image-generation/commands/index.ts +1 -0
- package/image-generation/commands/retry-image-generation-job.command.ts +4 -3
- package/image-generation/models/image-generation-job.schema.ts +1 -0
- package/image-generation/routes/image-generation.amqp.routes.ts +1 -0
- package/music/commands/generate-music.command.ts +3 -1
- package/music/commands/get-music-price.command.ts +22 -0
- package/music/commands/index.ts +1 -0
- package/music/commands/retry-music-job.command.ts +3 -1
- package/music/models/music-job.schema.ts +1 -0
- package/music/models/music-model.schema.ts +14 -0
- package/music/models/music-track.schema.ts +1 -0
- package/music/routes/music.amqp.routes.ts +1 -0
- package/package.json +1 -1
- package/paraphrase/commands/get-paraphrase-price.command.ts +16 -0
- package/paraphrase/commands/index.ts +1 -0
- package/paraphrase/commands/paraphrase.command.ts +2 -1
- package/paraphrase/commands/retry-paraphrase-job.command.ts +2 -1
- package/paraphrase/models/paraphrase-job.schema.ts +1 -0
- package/paraphrase/routes/paraphrase.amqp.routes.ts +1 -0
- package/presentation/commands/generate-slides.command.ts +2 -1
- package/presentation/commands/get-presentation-slides-generation-price.command.ts +16 -0
- package/presentation/commands/index.ts +1 -0
- package/presentation/models/presentation.schema.ts +1 -0
- package/presentation/routes/presentation.routes.ts +1 -0
- package/stt/commands/get-stt-price.command.ts +17 -0
- package/stt/commands/index.ts +1 -0
- package/stt/commands/retry-stt-job.command.ts +2 -1
- package/stt/commands/stt.command.ts +2 -1
- package/stt/models/stt-job.schema.ts +1 -0
- package/stt/routes/stt.amqp.routes.ts +1 -0
- package/tools/events/index.ts +1 -0
- package/tools/events/tool-job-failed.event.ts +13 -0
- package/tools/models/tool-job.schema.ts +1 -0
- package/tools/routes/tools.aqmp.routes.ts +1 -0
- package/tts/commands/get-tts-price.command.ts +17 -0
- package/tts/commands/index.ts +1 -0
- package/tts/commands/retry-tts-job.command.ts +2 -1
- package/tts/commands/tts.command.ts +2 -1
- package/tts/models/tts-job.schema.ts +1 -0
- package/tts/routes/tts.amqp.routes.ts +1 -0
- package/video/commands/get-video-price.command.ts +18 -0
- package/video/commands/index.ts +1 -0
- package/video/commands/retry-video-job.command.ts +2 -1
- package/video/commands/video.command.ts +2 -1
- package/video/models/video-job.schema.ts +1 -0
- package/video/routes/video.amqp.routes.ts +1 -0
- package/video-editor/commands/edit-video.command.ts +2 -1
- package/video-editor/commands/get-video-editor-price.command.ts +16 -0
- package/video-editor/commands/index.ts +1 -0
- package/video-editor/commands/retry-video-editor-job.command.ts +2 -1
- package/video-editor/models/video-editor-job.schema.ts +1 -0
- package/video-editor/routes/video-editor.amqp.routes.ts +1 -0
- package/writer/commands/generate-document-contents.command.ts +2 -1
- package/writer/commands/get-writer-content-generation-price.command.ts +17 -0
- package/writer/commands/index.ts +1 -0
- package/writer/models/writer-document.schema.ts +1 -0
- package/writer/routes/writer.routes.ts +1 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace GetSTTPriceCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
modelId: z.string(),
|
|
7
|
+
durationInSeconds: z.number(),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseDataSchema = z.object({
|
|
12
|
+
price: z.number(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
package/stt/commands/index.ts
CHANGED
|
@@ -5,9 +5,10 @@ import { STTJobSchema } from '../models';
|
|
|
5
5
|
export namespace RetrySTTJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
userBalance: z.number(),
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
tokenReservationId: z.string().uuid(),
|
|
11
|
+
precalculatedPrice: z.number(),
|
|
11
12
|
});
|
|
12
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
13
14
|
|
|
@@ -6,12 +6,13 @@ export namespace STTCommand {
|
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
userId: z.string().uuid().nullable().optional(),
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
-
userBalance: z.number(),
|
|
10
9
|
modelId: z.string(),
|
|
11
10
|
fileId: z.string(),
|
|
12
11
|
fileKey: z.string(),
|
|
13
12
|
fileUrl: z.string(),
|
|
14
13
|
durationInSeconds: z.number(),
|
|
14
|
+
tokenReservationId: z.string().uuid(),
|
|
15
|
+
precalculatedPrice: z.number(),
|
|
15
16
|
});
|
|
16
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
18
|
|
|
@@ -19,6 +19,7 @@ export const STTJobSchema = z.object({
|
|
|
19
19
|
userId: z.string().nullable(),
|
|
20
20
|
unregisteredUserId: z.string().nullable(),
|
|
21
21
|
price: z.number(),
|
|
22
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
22
23
|
isDeleted: z.boolean(),
|
|
23
24
|
createdAt: z.date(),
|
|
24
25
|
completedAt: z.date().nullable(),
|
package/tools/events/index.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TOOL_TYPE } from '../enums';
|
|
2
|
+
import { ToolJobSchema } from '../models';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
export namespace ToolJobFailedEvent {
|
|
6
|
+
export const PayloadSchema = z.object({
|
|
7
|
+
job: ToolJobSchema.extend({
|
|
8
|
+
toolType: z.nativeEnum(TOOL_TYPE),
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type Payload = z.infer<typeof PayloadSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace GetTTSPriceCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
modelId: z.string(),
|
|
7
|
+
userInput: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseDataSchema = z.object({
|
|
12
|
+
price: z.number(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
package/tts/commands/index.ts
CHANGED
|
@@ -5,9 +5,10 @@ import { TTSJobSchema } from '../models/tts-job.schema';
|
|
|
5
5
|
export namespace RetryTTSJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
userBalance: z.number(),
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
tokenReservationId: z.string().uuid(),
|
|
11
|
+
precalculatedPrice: z.number(),
|
|
11
12
|
});
|
|
12
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
13
14
|
|
|
@@ -6,7 +6,6 @@ export namespace TTSCommand {
|
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
userId: z.string().uuid().nullable().optional(),
|
|
8
8
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
-
userBalance: z.number(),
|
|
10
9
|
modelId: z.string(),
|
|
11
10
|
voiceId: z.string(),
|
|
12
11
|
userInput: z.string(),
|
|
@@ -18,6 +17,8 @@ export namespace TTSCommand {
|
|
|
18
17
|
style: z.number().optional(),
|
|
19
18
|
})
|
|
20
19
|
.optional(),
|
|
20
|
+
tokenReservationId: z.string().uuid(),
|
|
21
|
+
precalculatedPrice: z.number(),
|
|
21
22
|
});
|
|
22
23
|
export type Request = z.infer<typeof RequestSchema>;
|
|
23
24
|
|
|
@@ -25,6 +25,7 @@ export const TTSJobSchema = z.object({
|
|
|
25
25
|
duration: z.number(),
|
|
26
26
|
userId: z.string().nullable(),
|
|
27
27
|
unregisteredUserId: z.string().nullable(),
|
|
28
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
28
29
|
isDeleted: z.boolean(),
|
|
29
30
|
params: TTSJobParamsSchema,
|
|
30
31
|
createdAt: z.date(),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { VideoGenerationRequestParamsSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetVideoPriceCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
modelId: z.string(),
|
|
8
|
+
params: VideoGenerationRequestParamsSchema,
|
|
9
|
+
});
|
|
10
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseDataSchema = z.object({
|
|
13
|
+
price: z.number(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
package/video/commands/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './delete-all-video-jobs.command';
|
|
|
3
3
|
export * from './retry-video-job.command';
|
|
4
4
|
export * from './set-reaction-to-video-job.command';
|
|
5
5
|
export * from './video.command';
|
|
6
|
+
export * from './get-video-price.command';
|
|
6
7
|
export * from './update-video-job-title.command';
|
|
7
8
|
export * from './video-model';
|
|
8
9
|
export * from './update-published-status-video-jobs.command';
|
|
@@ -6,12 +6,13 @@ import { VideoGenerationRequestParamsSchema } from '../models';
|
|
|
6
6
|
export namespace RetryVideoJobCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
8
8
|
uuid: z.string().uuid(),
|
|
9
|
-
userBalance: z.number(),
|
|
10
9
|
userId: z.string().uuid().nullable().optional(),
|
|
11
10
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
12
11
|
prompt: z.string().optional(),
|
|
13
12
|
modelId: z.string().uuid().optional(),
|
|
14
13
|
params: VideoGenerationRequestParamsSchema.optional(),
|
|
14
|
+
tokenReservationId: z.string().uuid(),
|
|
15
|
+
precalculatedPrice: z.number(),
|
|
15
16
|
});
|
|
16
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
18
|
|
|
@@ -8,9 +8,10 @@ export namespace VideoCommand {
|
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
10
|
prompt: z.string(),
|
|
11
|
-
userBalance: z.number(),
|
|
12
11
|
modelId: z.string(),
|
|
13
12
|
params: VideoGenerationRequestParamsSchema,
|
|
13
|
+
tokenReservationId: z.string().uuid(),
|
|
14
|
+
precalculatedPrice: z.number(),
|
|
14
15
|
});
|
|
15
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
16
17
|
|
|
@@ -34,6 +34,7 @@ export const VideoJobSchema = z.object({
|
|
|
34
34
|
attempts: z.array(z.any()),
|
|
35
35
|
userId: z.string().nullable().optional(),
|
|
36
36
|
unregisteredUserId: z.string().nullable().optional(),
|
|
37
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
37
38
|
isDeleted: z.boolean(),
|
|
38
39
|
createdAt: z.date(),
|
|
39
40
|
completedAt: z.date().nullable().optional(),
|
|
@@ -10,8 +10,9 @@ export namespace EditVideoCommand {
|
|
|
10
10
|
inputVideoId: z.string().uuid(),
|
|
11
11
|
inputVideoUrl: z.string(),
|
|
12
12
|
duration: z.number(),
|
|
13
|
-
userBalance: z.number(),
|
|
14
13
|
modelId: z.string().uuid(),
|
|
14
|
+
tokenReservationId: z.string().uuid(),
|
|
15
|
+
precalculatedPrice: z.number(),
|
|
15
16
|
});
|
|
16
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
18
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace GetVideoEditorPriceCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
modelId: z.string(),
|
|
7
|
+
});
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseDataSchema = z.object({
|
|
11
|
+
price: z.number(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -5,4 +5,5 @@ export * from './set-reaction-to-video-editor-job.command';
|
|
|
5
5
|
export * from './update-video-editor-job-title.command';
|
|
6
6
|
export * from './update-published-status-video-editor-jobs.command';
|
|
7
7
|
export * from './edit-video.command';
|
|
8
|
+
export * from './get-video-editor-price.command';
|
|
8
9
|
export * from './video-editor-model';
|
|
@@ -5,7 +5,6 @@ import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
|
|
|
5
5
|
export namespace RetryVideoEditorJobCommand {
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
|
8
|
-
userBalance: z.number(),
|
|
9
8
|
userId: z.string().uuid().nullable().optional(),
|
|
10
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
10
|
prompt: z.string().optional(),
|
|
@@ -13,6 +12,8 @@ export namespace RetryVideoEditorJobCommand {
|
|
|
13
12
|
inputVideoUrl: z.string().optional(),
|
|
14
13
|
duration: z.number().optional(),
|
|
15
14
|
modelId: z.string().uuid().optional(),
|
|
15
|
+
tokenReservationId: z.string().uuid(),
|
|
16
|
+
precalculatedPrice: z.number(),
|
|
16
17
|
});
|
|
17
18
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
19
|
|
|
@@ -21,6 +21,7 @@ export const VideoEditorJobSchema = z.object({
|
|
|
21
21
|
attempts: z.array(z.any()),
|
|
22
22
|
userId: z.string().nullable().optional(),
|
|
23
23
|
unregisteredUserId: z.string().nullable().optional(),
|
|
24
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
24
25
|
isPublished: z.boolean(),
|
|
25
26
|
postId: z.string().nullable(),
|
|
26
27
|
isDeleted: z.boolean(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const VIDEO_EDITOR_AMQP_ROUTES = {
|
|
2
2
|
EXECUTE: 'tools.video-editor.execute.rpc',
|
|
3
|
+
GET_PRICE: 'tools.video-editor.get-price.rpc',
|
|
3
4
|
CONFIG: 'tools.video-editor.config.rpc',
|
|
4
5
|
GET_JOB: 'tools.video-editor.jobs.get.rpc',
|
|
5
6
|
LIST_JOBS: 'tools.video-editor.jobs.list.rpc',
|
|
@@ -7,7 +7,8 @@ export namespace GenerateWriterDocumentContentsCommand {
|
|
|
7
7
|
documentId: z.string().uuid(),
|
|
8
8
|
userId: z.string().uuid().nullable().optional(),
|
|
9
9
|
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
-
|
|
10
|
+
tokenReservationId: z.string().uuid(),
|
|
11
|
+
precalculatedPrice: z.number(),
|
|
11
12
|
modelId: z.string(),
|
|
12
13
|
});
|
|
13
14
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common';
|
|
3
|
+
|
|
4
|
+
export namespace GetWriterContentGenerationPriceCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
documentId: z.string().uuid(),
|
|
7
|
+
modelId: z.string().uuid(),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseDataSchema = z.object({
|
|
12
|
+
price: z.number(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
package/writer/commands/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './delete-all-user-writer-documents.command';
|
|
|
4
4
|
export * from './update-writer-document-outline.command';
|
|
5
5
|
export * from './export-writer-document-as-docx.command';
|
|
6
6
|
export * from './generate-document-contents.command';
|
|
7
|
+
export * from './get-writer-content-generation-price.command';
|
|
7
8
|
export * from './writer-paraphrase.command';
|
|
8
9
|
export * from './writer-extend-text.command';
|
|
9
10
|
export * from './writer-shorten-text.command';
|
|
@@ -21,6 +21,7 @@ export const WriterDocumentSchema = z.object({
|
|
|
21
21
|
dislikeReason: z.string().nullable(),
|
|
22
22
|
pages: z.number(),
|
|
23
23
|
isDeleted: z.boolean(),
|
|
24
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
24
25
|
createdAt: z.date(),
|
|
25
26
|
updatedAt: z.date(),
|
|
26
27
|
completedAt: z.date().nullable(),
|
|
@@ -8,6 +8,7 @@ export const WRITER_AMQP_ROUTES = {
|
|
|
8
8
|
UPDATE_DOCUMENT_OUTLINE: 'tools.writer.update-document-outline.rpc',
|
|
9
9
|
UPDATE_DOCUMENT_CONTENTS: 'tools.writer.update-document-contents.rpc',
|
|
10
10
|
GENERATE_DOCUMENT_CONTENTS: 'tools.writer.generate-document-contents.rpc',
|
|
11
|
+
GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
|
|
11
12
|
PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
|
|
12
13
|
EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
|
|
13
14
|
SHORTEN_TEXT: 'tools.writer.actions.shorten-text.rpc',
|