@purpleschool/gptbot 0.14.21 → 0.14.22
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/commands/avatar-studio/scriptwriter/calculate-avatar-studio-scriptwriter-price.command.js +8 -8
- package/build/models/avatar-studio/avatar-studio.schema.js +13 -1
- package/commands/avatar-studio/scriptwriter/calculate-avatar-studio-scriptwriter-price.command.ts +8 -8
- package/models/avatar-studio/avatar-studio.schema.ts +14 -0
- package/package.json +1 -1
|
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CalculateAvatarStudioScriptwriterPriceCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const avatar_studio_common_schema_1 = require("../shared/avatar-studio-common.schema");
|
|
6
|
-
const create_avatar_studio_scriptwriter_message_command_1 = require("./create-avatar-studio-scriptwriter-message.command");
|
|
7
6
|
var CalculateAvatarStudioScriptwriterPriceCommand;
|
|
8
7
|
(function (CalculateAvatarStudioScriptwriterPriceCommand) {
|
|
9
8
|
CalculateAvatarStudioScriptwriterPriceCommand.ParamsSchema = avatar_studio_common_schema_1.AvatarStudioClipIdParamsSchema;
|
|
10
|
-
CalculateAvatarStudioScriptwriterPriceCommand.RequestSchema =
|
|
9
|
+
CalculateAvatarStudioScriptwriterPriceCommand.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
inputLength: zod_1.z.number().int().nonnegative(),
|
|
12
|
+
})
|
|
13
|
+
.strict();
|
|
11
14
|
CalculateAvatarStudioScriptwriterPriceCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
inputChars: zod_1.z.number().int().nonnegative(),
|
|
16
|
-
})
|
|
17
|
-
.strict(),
|
|
15
|
+
price: zod_1.z.number(),
|
|
16
|
+
charsUntilNextPriceIncrease: zod_1.z.number().int().nonnegative().nullable(),
|
|
17
|
+
charsUntilNextPriceDecrease: zod_1.z.number().int().nonnegative().nullable(),
|
|
18
18
|
});
|
|
19
19
|
})(CalculateAvatarStudioScriptwriterPriceCommand || (exports.CalculateAvatarStudioScriptwriterPriceCommand = CalculateAvatarStudioScriptwriterPriceCommand = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AvatarStudioClipSchema = exports.AvatarStudioScriptwriterMessageSchema = exports.AvatarStudioExportJobSchema = exports.AvatarStudioGenerationJobSchema = exports.AvatarStudioGenerationJobBaseSchema = exports.AvatarStudioVoiceSchema = exports.AvatarStudioSceneSchema = exports.AvatarStudioSceneVideoConfigSchema = exports.AvatarStudioSceneImageConfigSchema = exports.AvatarStudioSceneVoiceConfigSchema = exports.AvatarStudioSceneReferenceMediaSchema = exports.AvatarStudioMediaSchema = exports.AvatarStudioWordTimingSchema = exports.AvatarStudioSubtitleSettingsSchema = exports.AvatarStudioAspectRatioSchema = void 0;
|
|
3
|
+
exports.AvatarStudioClipSchema = exports.AvatarStudioScriptwriterMessageSchema = exports.AvatarStudioExportJobSchema = exports.AvatarStudioGenerationJobSchema = exports.AvatarStudioGenerationJobBaseSchema = exports.AvatarStudioVoiceSchema = exports.AvatarStudioSceneSchema = exports.AvatarStudioSceneGenerationJobSchema = exports.AvatarStudioSceneVideoConfigSchema = exports.AvatarStudioSceneImageConfigSchema = exports.AvatarStudioSceneVoiceConfigSchema = exports.AvatarStudioSceneReferenceMediaSchema = exports.AvatarStudioMediaSchema = exports.AvatarStudioWordTimingSchema = exports.AvatarStudioSubtitleSettingsSchema = exports.AvatarStudioAspectRatioSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
const file_schema_1 = require("../file.schema");
|
|
@@ -62,6 +62,17 @@ exports.AvatarStudioSceneVideoConfigSchema = zod_1.z.object({
|
|
|
62
62
|
quality: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_VIDEO_QUALITY).default(constants_1.AVATAR_STUDIO_VIDEO_QUALITY.P720),
|
|
63
63
|
sound: zod_1.z.boolean().default(false),
|
|
64
64
|
});
|
|
65
|
+
exports.AvatarStudioSceneGenerationJobSchema = zod_1.z.object({
|
|
66
|
+
jobId: zod_1.z.string().uuid(),
|
|
67
|
+
type: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_TYPE),
|
|
68
|
+
phase: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_PHASE).nullable(),
|
|
69
|
+
targetSlot: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_SLOT),
|
|
70
|
+
status: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_JOB_STATUS),
|
|
71
|
+
resultMediaId: zod_1.z.string().uuid().nullable(),
|
|
72
|
+
error: zod_1.z.string().nullable(),
|
|
73
|
+
createdAt: zod_1.z.date(),
|
|
74
|
+
updatedAt: zod_1.z.date(),
|
|
75
|
+
});
|
|
65
76
|
exports.AvatarStudioSceneSchema = zod_1.z.object({
|
|
66
77
|
uuid: zod_1.z.string().uuid(),
|
|
67
78
|
clipId: zod_1.z.string().uuid(),
|
|
@@ -89,6 +100,7 @@ exports.AvatarStudioSceneSchema = zod_1.z.object({
|
|
|
89
100
|
voiceMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
90
101
|
avatarVideoMedia: exports.AvatarStudioMediaSchema.nullable().optional(),
|
|
91
102
|
referenceMedia: zod_1.z.array(exports.AvatarStudioSceneReferenceMediaSchema).optional(),
|
|
103
|
+
generationJobs: zod_1.z.array(exports.AvatarStudioSceneGenerationJobSchema).optional(),
|
|
92
104
|
createdAt: zod_1.z.date(),
|
|
93
105
|
updatedAt: zod_1.z.date(),
|
|
94
106
|
});
|
package/commands/avatar-studio/scriptwriter/calculate-avatar-studio-scriptwriter-price.command.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AvatarStudioClipIdParamsSchema } from '../shared/avatar-studio-common.schema';
|
|
3
|
-
import { CreateAvatarStudioScriptwriterMessageCommand } from './create-avatar-studio-scriptwriter-message.command';
|
|
4
3
|
|
|
5
4
|
export namespace CalculateAvatarStudioScriptwriterPriceCommand {
|
|
6
5
|
export const ParamsSchema = AvatarStudioClipIdParamsSchema;
|
|
7
6
|
export type Params = z.infer<typeof ParamsSchema>;
|
|
8
7
|
|
|
9
|
-
export const RequestSchema =
|
|
8
|
+
export const RequestSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
inputLength: z.number().int().nonnegative(),
|
|
11
|
+
})
|
|
12
|
+
.strict();
|
|
10
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
14
|
|
|
12
15
|
export const ResponseSchema = z.object({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
inputChars: z.number().int().nonnegative(),
|
|
17
|
-
})
|
|
18
|
-
.strict(),
|
|
16
|
+
price: z.number(),
|
|
17
|
+
charsUntilNextPriceIncrease: z.number().int().nonnegative().nullable(),
|
|
18
|
+
charsUntilNextPriceDecrease: z.number().int().nonnegative().nullable(),
|
|
19
19
|
});
|
|
20
20
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
21
|
}
|
|
@@ -93,6 +93,19 @@ export const AvatarStudioSceneVideoConfigSchema = z.object({
|
|
|
93
93
|
});
|
|
94
94
|
export type AvatarStudioSceneVideoConfig = z.infer<typeof AvatarStudioSceneVideoConfigSchema>;
|
|
95
95
|
|
|
96
|
+
export const AvatarStudioSceneGenerationJobSchema = z.object({
|
|
97
|
+
jobId: z.string().uuid(),
|
|
98
|
+
type: z.nativeEnum(AVATAR_STUDIO_JOB_TYPE),
|
|
99
|
+
phase: z.nativeEnum(AVATAR_STUDIO_JOB_PHASE).nullable(),
|
|
100
|
+
targetSlot: z.nativeEnum(AVATAR_STUDIO_SLOT),
|
|
101
|
+
status: z.nativeEnum(AVATAR_STUDIO_JOB_STATUS),
|
|
102
|
+
resultMediaId: z.string().uuid().nullable(),
|
|
103
|
+
error: z.string().nullable(),
|
|
104
|
+
createdAt: z.date(),
|
|
105
|
+
updatedAt: z.date(),
|
|
106
|
+
});
|
|
107
|
+
export type AvatarStudioSceneGenerationJob = z.infer<typeof AvatarStudioSceneGenerationJobSchema>;
|
|
108
|
+
|
|
96
109
|
export const AvatarStudioSceneSchema = z.object({
|
|
97
110
|
uuid: z.string().uuid(),
|
|
98
111
|
clipId: z.string().uuid(),
|
|
@@ -120,6 +133,7 @@ export const AvatarStudioSceneSchema = z.object({
|
|
|
120
133
|
voiceMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
121
134
|
avatarVideoMedia: AvatarStudioMediaSchema.nullable().optional(),
|
|
122
135
|
referenceMedia: z.array(AvatarStudioSceneReferenceMediaSchema).optional(),
|
|
136
|
+
generationJobs: z.array(AvatarStudioSceneGenerationJobSchema).optional(),
|
|
123
137
|
createdAt: z.date(),
|
|
124
138
|
updatedAt: z.date(),
|
|
125
139
|
});
|