@purpleschool/gptbot 0.9.36 → 0.9.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.
@@ -9,6 +9,8 @@ var EditVideoCommand;
9
9
  modelId: zod_1.z.string().uuid(),
10
10
  prompt: zod_1.z.string(),
11
11
  fileId: zod_1.z.string().uuid(),
12
+ resolution: zod_1.z.string().optional(),
13
+ duration: zod_1.z.number().optional(),
12
14
  });
13
15
  EditVideoCommand.ResponseSchema = zod_1.z.object({
14
16
  data: models_1.VideoEditorJobSchema,
@@ -12,6 +12,8 @@ var RetryVideoEditorJobCommand;
12
12
  modelId: zod_1.z.string().uuid().optional(),
13
13
  prompt: zod_1.z.string().optional(),
14
14
  fileId: zod_1.z.string().uuid().optional(),
15
+ resolution: zod_1.z.string().optional(),
16
+ duration: zod_1.z.number().optional(),
15
17
  });
16
18
  RetryVideoEditorJobCommand.ResponseSchema = zod_1.z.object({
17
19
  data: models_1.VideoEditorJobSchema,
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./video-editor-model-strategy.enum"), exports);
18
+ __exportStar(require("./video-editor-pricing-rule-type.enum"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VIDEO_EDITOR_PRICING_RULE_TYPE = void 0;
4
+ var VIDEO_EDITOR_PRICING_RULE_TYPE;
5
+ (function (VIDEO_EDITOR_PRICING_RULE_TYPE) {
6
+ VIDEO_EDITOR_PRICING_RULE_TYPE["FLAT"] = "flat";
7
+ VIDEO_EDITOR_PRICING_RULE_TYPE["PER_SECOND"] = "per_second";
8
+ })(VIDEO_EDITOR_PRICING_RULE_TYPE || (exports.VIDEO_EDITOR_PRICING_RULE_TYPE = VIDEO_EDITOR_PRICING_RULE_TYPE = {}));
@@ -2,13 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpellCorrectorModelSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const icon_variants_schema_1 = require("../../icon-variants.schema");
5
6
  const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
6
7
  exports.SpellCorrectorModelSchema = zod_1.z.object({
7
8
  uuid: zod_1.z.string().uuid(),
8
9
  title: zod_1.z.string(),
10
+ description: zod_1.z.string(),
9
11
  icon: zod_1.z.string(),
10
12
  price: zod_1.z.number(),
11
13
  order: zod_1.z.number(),
12
14
  canUse: zod_1.z.boolean(),
15
+ icons: icon_variants_schema_1.IconVariantsSchema,
13
16
  unlockedBy: unlocked_by_subscription_schema_1.UnlockedBySchema.nullable(),
14
17
  });
@@ -3,10 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VideoEditorModelSchema = exports.VideoEditorModelParamsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const video_editor_model_limitation_enum_1 = require("../../../constants/tool-video-editor/enums/video-editor-model-limitation.enum");
6
+ const video_editor_pricing_rule_type_enum_1 = require("../../../constants/tool-video-editor/enums/video-editor-pricing-rule-type.enum");
6
7
  const icon_variants_schema_1 = require("../../icon-variants.schema");
7
8
  const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
8
9
  exports.VideoEditorModelParamsSchema = zod_1.z.object({
9
- supportedFormats: zod_1.z.array(zod_1.z.string()),
10
+ duration: zod_1.z
11
+ .object({
12
+ options: zod_1.z.array(zod_1.z.number()),
13
+ })
14
+ .optional(),
15
+ resolution: zod_1.z
16
+ .object({
17
+ options: zod_1.z.array(zod_1.z.string()),
18
+ })
19
+ .optional(),
10
20
  });
11
21
  exports.VideoEditorModelSchema = zod_1.z.object({
12
22
  uuid: zod_1.z.string(),
@@ -20,6 +30,15 @@ exports.VideoEditorModelSchema = zod_1.z.object({
20
30
  maxInputVideoSizeBytes: zod_1.z.number(),
21
31
  maxInputVideoDurationInSeconds: zod_1.z.number(),
22
32
  supportedFormats: zod_1.z.array(zod_1.z.string()),
33
+ params: exports.VideoEditorModelParamsSchema,
34
+ pricingRules: zod_1.z.array(zod_1.z.object({
35
+ type: zod_1.z.nativeEnum(video_editor_pricing_rule_type_enum_1.VIDEO_EDITOR_PRICING_RULE_TYPE),
36
+ condition: zod_1.z.object({
37
+ duration: zod_1.z.number().optional(),
38
+ resolution: zod_1.z.string().optional(),
39
+ }),
40
+ value: zod_1.z.number(),
41
+ })),
23
42
  createdAt: zod_1.z.date(),
24
43
  updatedAt: zod_1.z.date(),
25
44
  unlockedBy: unlocked_by_subscription_schema_1.UnlockedBySchema.nullable(),
@@ -6,6 +6,8 @@ export namespace EditVideoCommand {
6
6
  modelId: z.string().uuid(),
7
7
  prompt: z.string(),
8
8
  fileId: z.string().uuid(),
9
+ resolution: z.string().optional(),
10
+ duration: z.number().optional(),
9
11
  });
10
12
 
11
13
  export type Request = z.infer<typeof RequestSchema>;
@@ -12,6 +12,8 @@ export namespace RetryVideoEditorJobCommand {
12
12
  modelId: z.string().uuid().optional(),
13
13
  prompt: z.string().optional(),
14
14
  fileId: z.string().uuid().optional(),
15
+ resolution: z.string().optional(),
16
+ duration: z.number().optional(),
15
17
  });
16
18
  export type RequestBody = z.infer<typeof RequestBodySchema>;
17
19
 
@@ -1 +1,2 @@
1
1
  export * from './video-editor-model-strategy.enum';
2
+ export * from './video-editor-pricing-rule-type.enum';
@@ -0,0 +1,4 @@
1
+ export enum VIDEO_EDITOR_PRICING_RULE_TYPE {
2
+ FLAT = 'flat',
3
+ PER_SECOND = 'per_second',
4
+ }
@@ -1,12 +1,15 @@
1
1
  import { z } from 'zod';
2
+ import { IconVariantsSchema } from '../../icon-variants.schema';
2
3
  import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
3
4
 
4
5
  export const SpellCorrectorModelSchema = z.object({
5
6
  uuid: z.string().uuid(),
6
7
  title: z.string(),
8
+ description: z.string(),
7
9
  icon: z.string(),
8
10
  price: z.number(),
9
11
  order: z.number(),
10
12
  canUse: z.boolean(),
13
+ icons: IconVariantsSchema,
11
14
  unlockedBy: UnlockedBySchema.nullable(),
12
15
  });
@@ -1,10 +1,20 @@
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
- supportedFormats: z.array(z.string()),
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(),
8
18
  });
9
19
 
10
20
  export const VideoEditorModelSchema = z.object({
@@ -19,6 +29,17 @@ export const VideoEditorModelSchema = z.object({
19
29
  maxInputVideoSizeBytes: z.number(),
20
30
  maxInputVideoDurationInSeconds: z.number(),
21
31
  supportedFormats: z.array(z.string()),
32
+ params: VideoEditorModelParamsSchema,
33
+ pricingRules: z.array(
34
+ z.object({
35
+ type: z.nativeEnum(VIDEO_EDITOR_PRICING_RULE_TYPE),
36
+ condition: z.object({
37
+ duration: z.number().optional(),
38
+ resolution: z.string().optional(),
39
+ }),
40
+ value: z.number(),
41
+ }),
42
+ ),
22
43
  createdAt: z.date(),
23
44
  updatedAt: z.date(),
24
45
  unlockedBy: UnlockedBySchema.nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.9.36",
3
+ "version": "0.9.38",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",