@purpleschool/gptbot-tools 0.2.36 → 0.2.38
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/common/enums/index.js +1 -0
- package/build/common/enums/tool-model-tag.enum.js +7 -0
- package/build/image-generation/models/image-generation-model.schema.js +2 -0
- package/build/stt/commands/stt.command.js +1 -0
- package/build/stt/enums/stt-strategy.enum.js +1 -0
- package/build/stt/models/stt-job.schema.js +1 -0
- package/build/tts/commands/tts.command.js +1 -0
- package/build/tts/enums/tts-strategy.enum.js +1 -0
- package/build/tts/models/tts-job.schema.js +6 -1
- package/build/video/enums/video-strategy.enum.js +1 -0
- package/build/video/models/video-job.schema.js +1 -0
- package/build/video/models/video-model.schema.js +9 -0
- package/common/enums/index.ts +1 -0
- package/common/enums/tool-model-tag.enum.ts +3 -0
- package/image-generation/models/image-generation-model.schema.ts +8 -1
- package/package.json +1 -1
- package/stt/commands/stt.command.ts +1 -0
- package/stt/enums/stt-strategy.enum.ts +1 -0
- package/stt/models/stt-job.schema.ts +1 -0
- package/tts/commands/tts.command.ts +2 -1
- package/tts/enums/tts-strategy.enum.ts +1 -0
- package/tts/models/tts-job.schema.ts +7 -0
- package/video/enums/video-strategy.enum.ts +1 -0
- package/video/models/video-job.schema.ts +1 -0
- package/video/models/video-model.schema.ts +15 -1
|
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./reasoning-effort.enum"), exports);
|
|
18
18
|
__exportStar(require("./user-reaction.enum"), exports);
|
|
19
19
|
__exportStar(require("./tool-model-status.enum"), exports);
|
|
20
|
+
__exportStar(require("./tool-model-tag.enum"), exports);
|
|
20
21
|
__exportStar(require("./file-type.enum"), exports);
|
|
21
22
|
__exportStar(require("./job-scope.enum"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_MODEL_TAG = void 0;
|
|
4
|
+
var TOOL_MODEL_TAG;
|
|
5
|
+
(function (TOOL_MODEL_TAG) {
|
|
6
|
+
TOOL_MODEL_TAG["RECOMMENDED"] = "recommended";
|
|
7
|
+
})(TOOL_MODEL_TAG || (exports.TOOL_MODEL_TAG = TOOL_MODEL_TAG = {}));
|
|
@@ -34,6 +34,8 @@ exports.ImageModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
|
34
34
|
exports.ImageGenerationModelSchema = zod_1.z.object({
|
|
35
35
|
uuid: zod_1.z.string(),
|
|
36
36
|
title: zod_1.z.string(),
|
|
37
|
+
tags: zod_1.z.array(zod_1.z.nativeEnum(common_1.TOOL_MODEL_TAG)),
|
|
38
|
+
hint: zod_1.z.string().nullable(),
|
|
37
39
|
description: zod_1.z.string(),
|
|
38
40
|
aiModel: zod_1.z.string(),
|
|
39
41
|
isNew: zod_1.z.boolean(),
|
|
@@ -15,6 +15,7 @@ var STTCommand;
|
|
|
15
15
|
fileId: zod_1.z.string(),
|
|
16
16
|
fileKey: zod_1.z.string(),
|
|
17
17
|
fileUrl: zod_1.z.string(),
|
|
18
|
+
language: zod_1.z.string().optional(),
|
|
18
19
|
durationInSeconds: zod_1.z.number(),
|
|
19
20
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
20
21
|
precalculatedPrice: zod_1.z.number(),
|
|
@@ -12,6 +12,7 @@ exports.STTJobSchema = zod_1.z.object({
|
|
|
12
12
|
fileId: zod_1.z.string(),
|
|
13
13
|
fileKey: zod_1.z.string(),
|
|
14
14
|
fileUrl: zod_1.z.string(),
|
|
15
|
+
language: zod_1.z.string().nullable().optional(),
|
|
15
16
|
aiResponse: stt_response_schema_1.STTResponseSchema.nullable(),
|
|
16
17
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
17
18
|
dislikeReason: zod_1.z.string().nullable(),
|
|
@@ -22,6 +22,7 @@ var TTSCommand;
|
|
|
22
22
|
style: zod_1.z.number().optional(),
|
|
23
23
|
})
|
|
24
24
|
.optional(),
|
|
25
|
+
references: zod_1.z.array(tts_job_schema_1.TTSReferenceSchema).optional().default([]),
|
|
25
26
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
26
27
|
precalculatedPrice: zod_1.z.number(),
|
|
27
28
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TTSJobSchema = exports.TTSJobParamsSchema = void 0;
|
|
3
|
+
exports.TTSJobSchema = exports.TTSReferenceSchema = exports.TTSJobParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const tools_1 = require("../../tools");
|
|
6
6
|
const common_1 = require("../../common");
|
|
@@ -10,6 +10,10 @@ exports.TTSJobParamsSchema = zod_1.z.object({
|
|
|
10
10
|
stability: zod_1.z.number().optional(),
|
|
11
11
|
style: zod_1.z.number().optional(),
|
|
12
12
|
});
|
|
13
|
+
exports.TTSReferenceSchema = zod_1.z.object({
|
|
14
|
+
audioUrl: zod_1.z.string().url(),
|
|
15
|
+
text: zod_1.z.string(),
|
|
16
|
+
});
|
|
13
17
|
exports.TTSJobSchema = zod_1.z.object({
|
|
14
18
|
uuid: zod_1.z.string(),
|
|
15
19
|
userInput: zod_1.z.string(),
|
|
@@ -29,6 +33,7 @@ exports.TTSJobSchema = zod_1.z.object({
|
|
|
29
33
|
isDeleted: zod_1.z.boolean(),
|
|
30
34
|
isFavorite: zod_1.z.boolean(),
|
|
31
35
|
params: exports.TTSJobParamsSchema,
|
|
36
|
+
references: zod_1.z.array(exports.TTSReferenceSchema),
|
|
32
37
|
createdAt: zod_1.z.date(),
|
|
33
38
|
updatedAt: zod_1.z.date(),
|
|
34
39
|
completedAt: zod_1.z.date().nullable(),
|
|
@@ -17,4 +17,5 @@ var VIDEO_GENERATION_STRATEGY;
|
|
|
17
17
|
VIDEO_GENERATION_STRATEGY["WAN_2_7_VIDEO_GENERATION_CALLBACK"] = "WAN_2_7_VIDEO_GENERATION_CALLBACK";
|
|
18
18
|
VIDEO_GENERATION_STRATEGY["GROK_VIDEO_GENERATION_CALLBACK"] = "GROK_VIDEO_GENERATION_CALLBACK";
|
|
19
19
|
VIDEO_GENERATION_STRATEGY["HAPPYHORSE_VIDEO_GENERATION_CALLBACK"] = "HAPPYHORSE_VIDEO_GENERATION_CALLBACK";
|
|
20
|
+
VIDEO_GENERATION_STRATEGY["HEYGEN_IMAGE_TO_VIDEO_CALLBACK"] = "HEYGEN_IMAGE_TO_VIDEO_CALLBACK";
|
|
20
21
|
})(VIDEO_GENERATION_STRATEGY || (exports.VIDEO_GENERATION_STRATEGY = VIDEO_GENERATION_STRATEGY = {}));
|
|
@@ -12,6 +12,7 @@ exports.VideoJobParamsSchema = zod_1.z.object({
|
|
|
12
12
|
referenceImageIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
13
13
|
firstFrameUrl: zod_1.z.string().optional(),
|
|
14
14
|
lastFrameUrl: zod_1.z.string().optional(),
|
|
15
|
+
audioUrl: zod_1.z.string().url().optional(),
|
|
15
16
|
firstFrameId: zod_1.z.string().optional(),
|
|
16
17
|
lastFrameId: zod_1.z.string().optional(),
|
|
17
18
|
duration: zod_1.z.number().optional(),
|
|
@@ -23,6 +23,12 @@ exports.VideoModelParamsSchema = zod_1.z.object({
|
|
|
23
23
|
options: zod_1.z.array(zod_1.z.boolean()),
|
|
24
24
|
})
|
|
25
25
|
.optional(),
|
|
26
|
+
audioAttachment: zod_1.z
|
|
27
|
+
.object({
|
|
28
|
+
supported: zod_1.z.boolean(),
|
|
29
|
+
maxAudioUrls: zod_1.z.number(),
|
|
30
|
+
})
|
|
31
|
+
.optional(),
|
|
26
32
|
aspectRatio: zod_1.z
|
|
27
33
|
.object({
|
|
28
34
|
options: zod_1.z.array(zod_1.z.string()),
|
|
@@ -54,6 +60,7 @@ exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
|
54
60
|
referenceImageIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
55
61
|
firstFrameUrl: zod_1.z.string().optional(),
|
|
56
62
|
lastFrameUrl: zod_1.z.string().optional(),
|
|
63
|
+
audioUrl: zod_1.z.string().url().optional(),
|
|
57
64
|
firstFrameId: zod_1.z.string().optional(),
|
|
58
65
|
lastFrameId: zod_1.z.string().optional(),
|
|
59
66
|
duration: zod_1.z.number(),
|
|
@@ -79,6 +86,8 @@ exports.VideoModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
|
79
86
|
exports.VideoModelSchema = zod_1.z.object({
|
|
80
87
|
uuid: zod_1.z.string(),
|
|
81
88
|
title: zod_1.z.string(),
|
|
89
|
+
tags: zod_1.z.array(zod_1.z.nativeEnum(common_1.TOOL_MODEL_TAG)),
|
|
90
|
+
hint: zod_1.z.string().nullable(),
|
|
82
91
|
description: zod_1.z.string(),
|
|
83
92
|
aiModel: zod_1.z.string(),
|
|
84
93
|
pricePerSecond: zod_1.z.number(),
|
package/common/enums/index.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
AttachedFileSchema,
|
|
4
|
+
IconVariantsSchema,
|
|
5
|
+
TOOL_MODEL_STATUS,
|
|
6
|
+
TOOL_MODEL_TAG,
|
|
7
|
+
} from '../../common';
|
|
3
8
|
import { IMAGE_GENERATION_MODEL_STRATEGY, IMAGE_GENERATION_RESOLUTION } from '../enums';
|
|
4
9
|
|
|
5
10
|
export const ImageGenerationRequestParamsSchema = z.object({
|
|
@@ -45,6 +50,8 @@ export type ImageModelPricingRules = z.infer<typeof ImageModelPricingRulesSchema
|
|
|
45
50
|
export const ImageGenerationModelSchema = z.object({
|
|
46
51
|
uuid: z.string(),
|
|
47
52
|
title: z.string(),
|
|
53
|
+
tags: z.array(z.nativeEnum(TOOL_MODEL_TAG)),
|
|
54
|
+
hint: z.string().nullable(),
|
|
48
55
|
description: z.string(),
|
|
49
56
|
aiModel: z.string(),
|
|
50
57
|
isNew: z.boolean(),
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ export const STTJobSchema = z.object({
|
|
|
10
10
|
fileId: z.string(),
|
|
11
11
|
fileKey: z.string(),
|
|
12
12
|
fileUrl: z.string(),
|
|
13
|
+
language: z.string().nullable().optional(),
|
|
13
14
|
aiResponse: STTResponseSchema.nullable(),
|
|
14
15
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
15
16
|
dislikeReason: z.string().nullable(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { JOB_SCOPE } from '../../common';
|
|
3
3
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
4
|
-
import { TTSJobSchema } from '../models/tts-job.schema';
|
|
4
|
+
import { TTSJobSchema, TTSReferenceSchema } from '../models/tts-job.schema';
|
|
5
5
|
|
|
6
6
|
export namespace TTSCommand {
|
|
7
7
|
export const RequestSchema = z.object({
|
|
@@ -19,6 +19,7 @@ export namespace TTSCommand {
|
|
|
19
19
|
style: z.number().optional(),
|
|
20
20
|
})
|
|
21
21
|
.optional(),
|
|
22
|
+
references: z.array(TTSReferenceSchema).optional().default([]),
|
|
22
23
|
tokenReservationId: z.string().uuid(),
|
|
23
24
|
precalculatedPrice: z.number(),
|
|
24
25
|
});
|
|
@@ -10,6 +10,12 @@ export const TTSJobParamsSchema = z.object({
|
|
|
10
10
|
});
|
|
11
11
|
export type TTSJobParams = z.infer<typeof TTSJobParamsSchema>;
|
|
12
12
|
|
|
13
|
+
export const TTSReferenceSchema = z.object({
|
|
14
|
+
audioUrl: z.string().url(),
|
|
15
|
+
text: z.string(),
|
|
16
|
+
});
|
|
17
|
+
export type TTSReference = z.infer<typeof TTSReferenceSchema>;
|
|
18
|
+
|
|
13
19
|
export const TTSJobSchema = z.object({
|
|
14
20
|
uuid: z.string(),
|
|
15
21
|
userInput: z.string(),
|
|
@@ -29,6 +35,7 @@ export const TTSJobSchema = z.object({
|
|
|
29
35
|
isDeleted: z.boolean(),
|
|
30
36
|
isFavorite: z.boolean(),
|
|
31
37
|
params: TTSJobParamsSchema,
|
|
38
|
+
references: z.array(TTSReferenceSchema),
|
|
32
39
|
createdAt: z.date(),
|
|
33
40
|
updatedAt: z.date(),
|
|
34
41
|
completedAt: z.date().nullable(),
|
|
@@ -13,4 +13,5 @@ export enum VIDEO_GENERATION_STRATEGY {
|
|
|
13
13
|
WAN_2_7_VIDEO_GENERATION_CALLBACK = 'WAN_2_7_VIDEO_GENERATION_CALLBACK',
|
|
14
14
|
GROK_VIDEO_GENERATION_CALLBACK = 'GROK_VIDEO_GENERATION_CALLBACK',
|
|
15
15
|
HAPPYHORSE_VIDEO_GENERATION_CALLBACK = 'HAPPYHORSE_VIDEO_GENERATION_CALLBACK',
|
|
16
|
+
HEYGEN_IMAGE_TO_VIDEO_CALLBACK = 'HEYGEN_IMAGE_TO_VIDEO_CALLBACK',
|
|
16
17
|
}
|
|
@@ -10,6 +10,7 @@ export const VideoJobParamsSchema = z.object({
|
|
|
10
10
|
referenceImageIds: z.array(z.string()).optional(),
|
|
11
11
|
firstFrameUrl: z.string().optional(),
|
|
12
12
|
lastFrameUrl: z.string().optional(),
|
|
13
|
+
audioUrl: z.string().url().optional(),
|
|
13
14
|
firstFrameId: z.string().optional(),
|
|
14
15
|
lastFrameId: z.string().optional(),
|
|
15
16
|
duration: z.number().optional(),
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
AttachedFileSchema,
|
|
4
|
+
TOOL_MODEL_STATUS,
|
|
5
|
+
TOOL_MODEL_TAG,
|
|
6
|
+
IconVariantsSchema,
|
|
7
|
+
} from '../../common';
|
|
3
8
|
import {
|
|
4
9
|
VIDEO_GENERATION_MODEL_LIMITATION,
|
|
5
10
|
VIDEO_GENERATION_STRATEGY,
|
|
@@ -25,6 +30,12 @@ export const VideoModelParamsSchema = z.object({
|
|
|
25
30
|
options: z.array(z.boolean()),
|
|
26
31
|
})
|
|
27
32
|
.optional(),
|
|
33
|
+
audioAttachment: z
|
|
34
|
+
.object({
|
|
35
|
+
supported: z.boolean(),
|
|
36
|
+
maxAudioUrls: z.number(),
|
|
37
|
+
})
|
|
38
|
+
.optional(),
|
|
28
39
|
aspectRatio: z
|
|
29
40
|
.object({
|
|
30
41
|
options: z.array(z.string()),
|
|
@@ -59,6 +70,7 @@ export const VideoGenerationRequestParamsSchema = z.object({
|
|
|
59
70
|
referenceImageIds: z.array(z.string()).optional(),
|
|
60
71
|
firstFrameUrl: z.string().optional(),
|
|
61
72
|
lastFrameUrl: z.string().optional(),
|
|
73
|
+
audioUrl: z.string().url().optional(),
|
|
62
74
|
firstFrameId: z.string().optional(),
|
|
63
75
|
lastFrameId: z.string().optional(),
|
|
64
76
|
duration: z.number(),
|
|
@@ -92,6 +104,8 @@ export type VideoModelPricingRules = z.infer<typeof VideoModelPricingRulesSchema
|
|
|
92
104
|
export const VideoModelSchema = z.object({
|
|
93
105
|
uuid: z.string(),
|
|
94
106
|
title: z.string(),
|
|
107
|
+
tags: z.array(z.nativeEnum(TOOL_MODEL_TAG)),
|
|
108
|
+
hint: z.string().nullable(),
|
|
95
109
|
description: z.string(),
|
|
96
110
|
aiModel: z.string(),
|
|
97
111
|
pricePerSecond: z.number(),
|