magic-hour 0.33.1 → 0.35.0

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.
Files changed (102) hide show
  1. package/dist/environment.d.ts +1 -1
  2. package/dist/environment.js +1 -1
  3. package/dist/resources/v1/ai-clothes-changer/request-types.d.ts +1 -1
  4. package/dist/resources/v1/ai-face-editor/request-types.d.ts +1 -1
  5. package/dist/resources/v1/ai-gif-generator/request-types.d.ts +1 -1
  6. package/dist/resources/v1/ai-headshot-generator/request-types.d.ts +1 -1
  7. package/dist/resources/v1/ai-image-editor/request-types.d.ts +1 -1
  8. package/dist/resources/v1/ai-image-generator/request-types.d.ts +8 -2
  9. package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +4 -2
  10. package/dist/resources/v1/ai-photo-editor/request-types.d.ts +1 -1
  11. package/dist/resources/v1/ai-qr-code-generator/request-types.d.ts +1 -1
  12. package/dist/resources/v1/ai-talking-photo/request-types.d.ts +1 -1
  13. package/dist/resources/v1/animation/request-types.d.ts +2 -2
  14. package/dist/resources/v1/auto-subtitle-generator/request-types.d.ts +3 -3
  15. package/dist/resources/v1/face-detection/request-types.d.ts +1 -1
  16. package/dist/resources/v1/face-detection/resource-client.d.ts +4 -0
  17. package/dist/resources/v1/face-detection/resource-client.js +4 -0
  18. package/dist/resources/v1/face-swap/request-types.d.ts +17 -19
  19. package/dist/resources/v1/face-swap/request-types.js +4 -4
  20. package/dist/resources/v1/face-swap-photo/request-types.d.ts +1 -1
  21. package/dist/resources/v1/files/upload-urls/request-types.d.ts +3 -0
  22. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +6 -5
  23. package/dist/resources/v1/files/upload-urls/resource-client.js +6 -5
  24. package/dist/resources/v1/image-background-remover/request-types.d.ts +1 -1
  25. package/dist/resources/v1/image-projects/request-types.d.ts +2 -2
  26. package/dist/resources/v1/image-projects/resource-client.d.ts +1 -1
  27. package/dist/resources/v1/image-projects/resource-client.js +1 -2
  28. package/dist/resources/v1/image-to-video/request-types.d.ts +20 -10
  29. package/dist/resources/v1/image-to-video/request-types.js +4 -4
  30. package/dist/resources/v1/lip-sync/request-types.d.ts +17 -19
  31. package/dist/resources/v1/lip-sync/request-types.js +4 -4
  32. package/dist/resources/v1/photo-colorizer/request-types.d.ts +1 -1
  33. package/dist/resources/v1/text-to-video/request-types.d.ts +8 -2
  34. package/dist/resources/v1/video-projects/request-types.d.ts +2 -2
  35. package/dist/resources/v1/video-projects/resource-client.js +0 -1
  36. package/dist/resources/v1/video-to-video/request-types.d.ts +17 -19
  37. package/dist/resources/v1/video-to-video/request-types.js +4 -4
  38. package/dist/types/index.d.ts +0 -165
  39. package/dist/types/v1-ai-clothes-changer-create-body-assets-garment-type-enum.d.ts +1 -1
  40. package/dist/types/v1-ai-clothes-changer-create-body-assets.d.ts +15 -2
  41. package/dist/types/v1-ai-clothes-changer-create-body.d.ts +1 -1
  42. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +6 -1
  43. package/dist/types/v1-ai-face-editor-create-body-style.d.ts +30 -30
  44. package/dist/types/v1-ai-face-editor-create-body-style.js +30 -30
  45. package/dist/types/v1-ai-face-editor-create-body.d.ts +1 -1
  46. package/dist/types/v1-ai-gif-generator-create-body.d.ts +1 -1
  47. package/dist/types/v1-ai-headshot-generator-create-body-assets.d.ts +6 -1
  48. package/dist/types/v1-ai-headshot-generator-create-body-style.d.ts +1 -1
  49. package/dist/types/v1-ai-headshot-generator-create-body.d.ts +1 -1
  50. package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +6 -1
  51. package/dist/types/v1-ai-image-editor-create-body.d.ts +1 -1
  52. package/dist/types/v1-ai-image-generator-create-body-orientation-enum.d.ts +1 -1
  53. package/dist/types/v1-ai-image-generator-create-body-style.d.ts +2 -2
  54. package/dist/types/v1-ai-image-generator-create-body.d.ts +8 -2
  55. package/dist/types/v1-ai-image-upscaler-create-body-assets.d.ts +6 -1
  56. package/dist/types/v1-ai-image-upscaler-create-body.d.ts +4 -2
  57. package/dist/types/v1-ai-photo-editor-create-body-assets.d.ts +6 -1
  58. package/dist/types/v1-ai-photo-editor-create-body.d.ts +1 -1
  59. package/dist/types/v1-ai-qr-code-generator-create-body.d.ts +1 -1
  60. package/dist/types/v1-ai-talking-photo-create-body-assets.d.ts +12 -2
  61. package/dist/types/v1-ai-talking-photo-create-body.d.ts +1 -1
  62. package/dist/types/v1-animation-create-body-assets.d.ts +12 -2
  63. package/dist/types/v1-animation-create-body-style-art-style-enum.d.ts +1 -1
  64. package/dist/types/v1-animation-create-body-style-camera-effect-enum.d.ts +1 -1
  65. package/dist/types/v1-animation-create-body-style-prompt-type-enum.d.ts +1 -1
  66. package/dist/types/v1-animation-create-body-style.d.ts +10 -5
  67. package/dist/types/v1-animation-create-body-style.js +2 -2
  68. package/dist/types/v1-animation-create-body.d.ts +2 -2
  69. package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +6 -1
  70. package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +3 -3
  71. package/dist/types/v1-face-detection-create-body-assets.d.ts +6 -1
  72. package/dist/types/v1-face-detection-create-response.d.ts +1 -1
  73. package/dist/types/v1-face-detection-get-response.d.ts +1 -1
  74. package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.d.ts +6 -1
  75. package/dist/types/v1-face-swap-create-body-assets.d.ts +12 -2
  76. package/dist/types/v1-face-swap-create-body.d.ts +17 -19
  77. package/dist/types/v1-face-swap-create-body.js +4 -4
  78. package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.d.ts +6 -1
  79. package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +12 -2
  80. package/dist/types/v1-face-swap-photo-create-body.d.ts +1 -1
  81. package/dist/types/v1-files-upload-urls-create-body-items-item-type-enum.d.ts +1 -1
  82. package/dist/types/v1-files-upload-urls-create-body-items-item.d.ts +2 -2
  83. package/dist/types/v1-files-upload-urls-create-body.d.ts +3 -0
  84. package/dist/types/v1-files-upload-urls-create-response.d.ts +3 -0
  85. package/dist/types/v1-image-background-remover-create-body-assets.d.ts +12 -2
  86. package/dist/types/v1-image-background-remover-create-body.d.ts +1 -1
  87. package/dist/types/v1-image-to-video-create-body-assets.d.ts +6 -1
  88. package/dist/types/v1-image-to-video-create-body-resolution-enum.d.ts +3 -1
  89. package/dist/types/v1-image-to-video-create-body.d.ts +20 -10
  90. package/dist/types/v1-image-to-video-create-body.js +4 -4
  91. package/dist/types/v1-lip-sync-create-body-assets.d.ts +12 -2
  92. package/dist/types/v1-lip-sync-create-body.d.ts +17 -19
  93. package/dist/types/v1-lip-sync-create-body.js +4 -4
  94. package/dist/types/v1-photo-colorizer-create-body-assets.d.ts +6 -1
  95. package/dist/types/v1-photo-colorizer-create-body.d.ts +1 -1
  96. package/dist/types/v1-text-to-video-create-body-resolution-enum.d.ts +3 -1
  97. package/dist/types/v1-text-to-video-create-body.d.ts +8 -2
  98. package/dist/types/v1-video-projects-get-response.d.ts +2 -2
  99. package/dist/types/v1-video-to-video-create-body-assets.d.ts +6 -1
  100. package/dist/types/v1-video-to-video-create-body.d.ts +17 -19
  101. package/dist/types/v1-video-to-video-create-body.js +4 -4
  102. package/package.json +1 -1
@@ -10,7 +10,7 @@ export type V1VideoToVideoCreateBody = {
10
10
  */
11
11
  assets: V1VideoToVideoCreateBodyAssets;
12
12
  /**
13
- * The end time of the input video in seconds
13
+ * The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
14
14
  */
15
15
  endSeconds: number;
16
16
  /**
@@ -20,36 +20,34 @@ export type V1VideoToVideoCreateBody = {
20
20
  */
21
21
  fpsResolution?: ("FULL" | "HALF") | undefined;
22
22
  /**
23
- * Used to determine the dimensions of the output video.
23
+ * `height` is deprecated and no longer influences the output video's resolution.
24
24
  *
25
- * * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
26
- * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
25
+ * Output resolution is determined by the **minimum** of:
26
+ * - The resolution of the input video
27
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
27
28
  *
28
- * Note: if the video's original resolution is less than the maximum, the video will not be resized.
29
- *
30
- * See our [pricing page](https://magichour.ai/pricing) for more details.
29
+ * This field is retained only for backward compatibility and will be removed in a future release.
31
30
  */
32
- height?: number | undefined;
31
+ height?: number | null | undefined;
33
32
  /**
34
- * The name of video
33
+ * The name of video. This value is mainly used for your own identification of the video.
35
34
  */
36
35
  name?: string | undefined;
37
36
  /**
38
- * The start time of the input video in seconds
37
+ * The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
39
38
  */
40
39
  startSeconds: number;
41
40
  style: V1VideoToVideoCreateBodyStyle;
42
41
  /**
43
- * Used to determine the dimensions of the output video.
44
- *
45
- * * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
46
- * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
42
+ * `width` is deprecated and no longer influences the output video's resolution.
47
43
  *
48
- * Note: if the video's original resolution is less than the maximum, the video will not be resized.
44
+ * Output resolution is determined by the **minimum** of:
45
+ * - The resolution of the input video
46
+ * - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
49
47
  *
50
- * See our [pricing page](https://magichour.ai/pricing) for more details.
48
+ * This field is retained only for backward compatibility and will be removed in a future release.
51
49
  */
52
- width?: number | undefined;
50
+ width?: number | null | undefined;
53
51
  };
54
52
  /**
55
53
  * @internal
@@ -60,11 +58,11 @@ export type External$V1VideoToVideoCreateBody = {
60
58
  assets: External$V1VideoToVideoCreateBodyAssets;
61
59
  end_seconds: number;
62
60
  fps_resolution?: ("FULL" | "HALF") | undefined;
63
- height?: number | undefined;
61
+ height?: number | null | undefined;
64
62
  name?: string | undefined;
65
63
  start_seconds: number;
66
64
  style: External$V1VideoToVideoCreateBodyStyle;
67
- width?: number | undefined;
65
+ width?: number | null | undefined;
68
66
  };
69
67
  export declare const Schemas$V1VideoToVideoCreateBody: {
70
68
  in: z.ZodType<V1VideoToVideoCreateBody, z.ZodTypeDef, unknown>;
@@ -46,11 +46,11 @@ const SchemaIn$V1VideoToVideoCreateBody = z
46
46
  assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.in,
47
47
  end_seconds: z.number(),
48
48
  fps_resolution: z.enum(["FULL", "HALF"]).optional(),
49
- height: z.number().int().optional(),
49
+ height: z.number().int().nullable().optional(),
50
50
  name: z.string().optional(),
51
51
  start_seconds: z.number(),
52
52
  style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.in,
53
- width: z.number().int().optional(),
53
+ width: z.number().int().nullable().optional(),
54
54
  })
55
55
  .transform((obj) => {
56
56
  return (0, core_1.zodTransform)(obj, {
@@ -73,11 +73,11 @@ const SchemaOut$V1VideoToVideoCreateBody = z
73
73
  assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.out,
74
74
  endSeconds: z.number(),
75
75
  fpsResolution: z.enum(["FULL", "HALF"]).optional(),
76
- height: z.number().int().optional(),
76
+ height: z.number().int().nullable().optional(),
77
77
  name: z.string().optional(),
78
78
  startSeconds: z.number(),
79
79
  style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.out,
80
- width: z.number().int().optional(),
80
+ width: z.number().int().nullable().optional(),
81
81
  })
82
82
  .transform((obj) => {
83
83
  return (0, core_1.zodTransform)(obj, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.33.1",
3
+ "version": "0.35.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {