@purpleschool/gptbot 0.11.5 → 0.11.7
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/api/controllers/http/community.ts +1 -0
- package/api/controllers/http/index.ts +1 -0
- package/api/controllers/http/spell-corrector.ts +14 -0
- package/api/controllers/http/unregistered-user.ts +5 -0
- package/api/controllers/http/user.ts +1 -0
- package/api/routes.ts +36 -0
- package/build/api/controllers/http/community.js +1 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/spell-corrector.js +16 -0
- package/build/api/controllers/http/unregistered-user.js +5 -1
- package/build/api/controllers/http/user.js +1 -0
- package/build/api/routes.js +25 -0
- package/build/commands/community/index.js +1 -0
- package/build/commands/community/set-visibility-community-post.command.js +21 -0
- package/build/commands/subscription/find-subscription.command.js +4 -1
- package/build/commands/subscription/get-available-upgrades.command.js +3 -1
- package/build/commands/tools/index.js +1 -0
- package/build/commands/tools/presentation/create-presentation.command.js +3 -0
- package/build/commands/tools/presentation/update-presentation.command.js +1 -0
- package/build/commands/tools/spell-corrector/delete-all-spell-corrector-jobs.command.js +8 -0
- package/build/commands/tools/spell-corrector/delete-spell-corrector-job-by-uuid.command.js +11 -0
- package/build/commands/tools/spell-corrector/find-spell-corrector-job-by-uuid.command.js +14 -0
- package/build/commands/tools/spell-corrector/find-spell-corrector-jobs.command.js +18 -0
- package/build/commands/tools/spell-corrector/get-spell-corrector-tool-config.command.js +11 -0
- package/build/commands/tools/spell-corrector/index.js +25 -0
- package/build/commands/tools/spell-corrector/retry-spell-corrector-job.command.js +14 -0
- package/build/commands/tools/spell-corrector/set-reaction-to-spell-corrector-job.command.js +28 -0
- package/build/commands/tools/spell-corrector/spell-corrector.command.js +15 -0
- package/build/commands/tools/spell-corrector/update-spell-corrector-job-title.command.js +17 -0
- package/build/commands/tools/video-editor/edit-video.command.js +2 -0
- package/build/commands/tools/video-editor/retry-video-editor-job.command.js +2 -0
- package/build/commands/unregistered-user/index.js +1 -0
- package/build/commands/unregistered-user/patch-locale.command.js +16 -0
- package/build/commands/user/get-me.command.js +1 -0
- package/build/commands/user/index.js +1 -0
- package/build/commands/user/patch-locale.command.js +16 -0
- package/build/constants/ai-model/enums/ai-model-strategy.enum.js +1 -0
- package/build/constants/model/enums/unified-model-content-type.enum.js +2 -0
- package/build/constants/presentation/enums/index.js +1 -0
- package/build/constants/presentation/enums/presentation-target-audience.enum.js +10 -0
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +11 -1
- package/build/constants/tool-video-editor/enums/index.js +1 -0
- package/build/constants/tool-video-editor/enums/video-editor-pricing-rule-type.enum.js +8 -0
- package/build/constants/user/enums/index.js +1 -0
- package/build/constants/user/enums/locale.enum.js +8 -0
- package/build/helpers/video-editor/calculate-video-editing-price.helper.js +27 -2
- package/build/models/subscription-feature.schema.js +42 -1
- package/build/models/subscription.schema.js +7 -1
- package/build/models/tools/image-editor/image-editor-model.schema.js +2 -0
- package/build/models/tools/image-generation/image-generation-model.schema.js +1 -0
- package/build/models/tools/index.js +1 -0
- package/build/models/tools/presentation/index.js +1 -0
- package/build/models/tools/presentation/presentation-template.schema.js +1 -0
- package/build/models/tools/presentation/presentation-title-page.schema.js +9 -0
- package/build/models/tools/presentation/presentation.schema.js +3 -0
- package/build/models/tools/presentation/slide-content-edit.schema.js +18 -12
- package/build/models/tools/presentation/slide-content.schema.js +16 -12
- package/build/models/tools/spell-corrector/index.js +19 -0
- package/build/models/tools/spell-corrector/spell-corrector-config.schema.js +9 -0
- package/build/models/tools/spell-corrector/spell-corrector-job.schema.js +13 -0
- package/build/models/tools/spell-corrector/spell-corrector-model.schema.js +17 -0
- package/build/models/tools/stt/stt-response.schema.js +2 -0
- package/build/models/tools/video/video-config.schema.js +10 -2
- package/build/models/tools/video-editor/video-editor-job.schema.js +6 -1
- package/build/models/tools/video-editor/video-editor-model.schema.js +27 -2
- package/build/models/user.schema.js +2 -0
- package/commands/community/index.ts +1 -0
- package/commands/community/set-visibility-community-post.command.ts +24 -0
- package/commands/subscription/find-subscription.command.ts +11 -1
- package/commands/subscription/get-available-upgrades.command.ts +3 -1
- package/commands/tools/index.ts +1 -0
- package/commands/tools/presentation/create-presentation.command.ts +7 -1
- package/commands/tools/presentation/update-presentation.command.ts +1 -0
- package/commands/tools/spell-corrector/delete-all-spell-corrector-jobs.command.ts +6 -0
- package/commands/tools/spell-corrector/delete-spell-corrector-job-by-uuid.command.ts +11 -0
- package/commands/tools/spell-corrector/find-spell-corrector-job-by-uuid.command.ts +16 -0
- package/commands/tools/spell-corrector/find-spell-corrector-jobs.command.ts +18 -0
- package/commands/tools/spell-corrector/get-spell-corrector-tool-config.command.ts +10 -0
- package/commands/tools/spell-corrector/index.ts +9 -0
- package/commands/tools/spell-corrector/retry-spell-corrector-job.command.ts +14 -0
- package/commands/tools/spell-corrector/set-reaction-to-spell-corrector-job.command.ts +33 -0
- package/commands/tools/spell-corrector/spell-corrector.command.ts +17 -0
- package/commands/tools/spell-corrector/update-spell-corrector-job-title.command.ts +19 -0
- package/commands/tools/video-editor/edit-video.command.ts +2 -0
- package/commands/tools/video-editor/retry-video-editor-job.command.ts +2 -0
- package/commands/unregistered-user/index.ts +1 -0
- package/commands/unregistered-user/patch-locale.command.ts +18 -0
- package/commands/user/get-me.command.ts +2 -1
- package/commands/user/index.ts +1 -0
- package/commands/user/patch-locale.command.ts +18 -0
- package/constants/ai-model/enums/ai-model-strategy.enum.ts +1 -0
- package/constants/model/enums/unified-model-content-type.enum.ts +2 -0
- package/constants/presentation/enums/index.ts +1 -0
- package/constants/presentation/enums/presentation-target-audience.enum.ts +6 -0
- package/constants/subscription/enums/subscription-feature-type.enum.ts +11 -1
- package/constants/tool-video-editor/enums/index.ts +1 -0
- package/constants/tool-video-editor/enums/video-editor-pricing-rule-type.enum.ts +4 -0
- package/constants/user/enums/index.ts +1 -0
- package/constants/user/enums/locale.enum.ts +4 -0
- package/helpers/video-editor/calculate-video-editing-price.helper.ts +52 -2
- package/models/subscription-feature.schema.ts +57 -0
- package/models/subscription.schema.ts +11 -0
- package/models/tools/image-editor/image-editor-model.schema.ts +2 -0
- package/models/tools/image-generation/image-generation-model.schema.ts +1 -0
- package/models/tools/index.ts +1 -0
- package/models/tools/presentation/index.ts +1 -0
- package/models/tools/presentation/presentation-template.schema.ts +1 -0
- package/models/tools/presentation/presentation-title-page.schema.ts +9 -0
- package/models/tools/presentation/presentation.schema.ts +8 -1
- package/models/tools/presentation/slide-content-edit.schema.ts +18 -12
- package/models/tools/presentation/slide-content.schema.ts +25 -21
- package/models/tools/spell-corrector/index.ts +3 -0
- package/models/tools/spell-corrector/spell-corrector-config.schema.ts +7 -0
- package/models/tools/spell-corrector/spell-corrector-job.schema.ts +11 -0
- package/models/tools/spell-corrector/spell-corrector-model.schema.ts +15 -0
- package/models/tools/stt/stt-response.schema.ts +2 -0
- package/models/tools/video/video-config.schema.ts +14 -1
- package/models/tools/video-editor/video-editor-job.schema.ts +8 -0
- package/models/tools/video-editor/video-editor-model.schema.ts +36 -1
- package/models/user.schema.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolJobSchema } from '../../tool-job.schema';
|
|
3
|
+
import { USER_REACTION } from '../../../constants';
|
|
4
|
+
|
|
5
|
+
export const SpellCorrectorToolJobSchema = ToolJobSchema.extend({
|
|
6
|
+
modelId: z.string().uuid().nullable().optional(),
|
|
7
|
+
userInput: z.string(),
|
|
8
|
+
aiOutput: z.string().nullable().optional(),
|
|
9
|
+
title: z.string(),
|
|
10
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IconVariantsSchema } from '../../icon-variants.schema';
|
|
3
|
+
import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
|
|
4
|
+
|
|
5
|
+
export const SpellCorrectorModelSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
description: z.string(),
|
|
9
|
+
icon: z.string(),
|
|
10
|
+
price: z.number(),
|
|
11
|
+
order: z.number(),
|
|
12
|
+
canUse: z.boolean(),
|
|
13
|
+
icons: IconVariantsSchema,
|
|
14
|
+
unlockedBy: UnlockedBySchema.nullable(),
|
|
15
|
+
});
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { VideoModelSchema } from './video-model.schema';
|
|
3
|
+
import { IconVariantsSchema } from '../../icon-variants.schema';
|
|
3
4
|
|
|
4
|
-
export const
|
|
5
|
+
export const VideoVendorSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
order: z.number(),
|
|
9
|
+
icons: IconVariantsSchema,
|
|
5
10
|
models: z.array(VideoModelSchema),
|
|
6
11
|
});
|
|
12
|
+
|
|
13
|
+
export type VideoVendor = z.infer<typeof VideoVendorSchema>;
|
|
14
|
+
|
|
15
|
+
export const VideoConfigSchema = z.object({
|
|
16
|
+
vendors: z.array(VideoVendorSchema),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type VideoConfig = z.infer<typeof VideoConfigSchema>;
|
|
@@ -2,6 +2,13 @@ import { z } from 'zod';
|
|
|
2
2
|
import { USER_REACTION } from '../../../constants';
|
|
3
3
|
import { ToolJobSchema } from '../../tool-job.schema';
|
|
4
4
|
|
|
5
|
+
export const VideoEditorJobParamsSchema = z.object({
|
|
6
|
+
duration: z.number().optional(),
|
|
7
|
+
resolution: z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type VideoEditorJobParams = z.infer<typeof VideoEditorJobParamsSchema>;
|
|
11
|
+
|
|
5
12
|
export const VideoEditorJobSchema = ToolJobSchema.extend({
|
|
6
13
|
title: z.string(),
|
|
7
14
|
prompt: z.string(),
|
|
@@ -21,6 +28,7 @@ export const VideoEditorJobSchema = ToolJobSchema.extend({
|
|
|
21
28
|
url: z.string(),
|
|
22
29
|
})
|
|
23
30
|
.nullable(),
|
|
31
|
+
params: VideoEditorJobParamsSchema.optional(),
|
|
24
32
|
modelId: z.string(),
|
|
25
33
|
isPublished: z.boolean(),
|
|
26
34
|
postId: z.string().nullable(),
|
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { VIDEO_EDITOR_MODEL_LIMITATION } from '../../../constants/tool-video-editor/enums/video-editor-model-limitation.enum';
|
|
3
|
+
import { VIDEO_EDITOR_PRICING_RULE_TYPE } from '../../../constants/tool-video-editor/enums/video-editor-pricing-rule-type.enum';
|
|
3
4
|
import { IconVariantsSchema } from '../../icon-variants.schema';
|
|
4
5
|
import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
|
|
5
6
|
|
|
6
7
|
export const VideoEditorModelParamsSchema = z.object({
|
|
7
|
-
|
|
8
|
+
duration: z
|
|
9
|
+
.object({
|
|
10
|
+
options: z.array(z.number()),
|
|
11
|
+
})
|
|
12
|
+
.optional(),
|
|
13
|
+
resolution: z
|
|
14
|
+
.object({
|
|
15
|
+
options: z.array(z.string()),
|
|
16
|
+
})
|
|
17
|
+
.optional(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const VideoEditorPricingRequestParamsSchema = z.object({
|
|
21
|
+
duration: z.number(),
|
|
22
|
+
resolution: z.string().optional(),
|
|
8
23
|
});
|
|
24
|
+
export type VideoEditorPricingRequestParams = z.infer<typeof VideoEditorPricingRequestParamsSchema>;
|
|
25
|
+
|
|
26
|
+
export const VideoEditorModelPricingRuleConditionSchema = z.object({
|
|
27
|
+
duration: z.number().optional(),
|
|
28
|
+
resolution: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
export type VideoEditorModelPricingRuleCondition = z.infer<
|
|
31
|
+
typeof VideoEditorModelPricingRuleConditionSchema
|
|
32
|
+
>;
|
|
33
|
+
|
|
34
|
+
export const VideoEditorModelPricingRulesSchema = z.array(
|
|
35
|
+
z.object({
|
|
36
|
+
type: z.nativeEnum(VIDEO_EDITOR_PRICING_RULE_TYPE),
|
|
37
|
+
condition: VideoEditorModelPricingRuleConditionSchema,
|
|
38
|
+
value: z.number(),
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
export type VideoEditorModelPricingRules = z.infer<typeof VideoEditorModelPricingRulesSchema>;
|
|
9
42
|
|
|
10
43
|
export const VideoEditorModelSchema = z.object({
|
|
11
44
|
uuid: z.string(),
|
|
@@ -19,6 +52,8 @@ export const VideoEditorModelSchema = z.object({
|
|
|
19
52
|
maxInputVideoSizeBytes: z.number(),
|
|
20
53
|
maxInputVideoDurationInSeconds: z.number(),
|
|
21
54
|
supportedFormats: z.array(z.string()),
|
|
55
|
+
params: VideoEditorModelParamsSchema,
|
|
56
|
+
pricingRules: VideoEditorModelPricingRulesSchema,
|
|
22
57
|
createdAt: z.date(),
|
|
23
58
|
updatedAt: z.date(),
|
|
24
59
|
unlockedBy: UnlockedBySchema.nullable(),
|
package/models/user.schema.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { UserToSubscriptionSchema } from './user-to-subscription.schema';
|
|
3
3
|
import { UserToProductSchema } from './user-to-product.schema';
|
|
4
|
+
import { LOCALE } from '../constants';
|
|
4
5
|
|
|
5
6
|
export const UserSchema = z.object({
|
|
6
7
|
uuid: z.string().uuid(),
|
|
@@ -13,6 +14,7 @@ export const UserSchema = z.object({
|
|
|
13
14
|
restoreTokenHash: z.string(),
|
|
14
15
|
tokenBonusBalance: z.number(),
|
|
15
16
|
role: z.string(),
|
|
17
|
+
locale: z.nativeEnum(LOCALE),
|
|
16
18
|
|
|
17
19
|
createdAt: z.date(),
|
|
18
20
|
updatedAt: z.date(),
|