magic-hour 0.34.0 → 0.36.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.
- package/README.md +6 -0
- package/dist/client.js +2 -2
- package/dist/core/api-error.d.ts +1 -1
- package/dist/core/api-promise.d.ts +2 -2
- package/dist/core/api-promise.js +2 -1
- package/dist/core/auth.d.ts +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/binary-response.d.ts +1 -1
- package/dist/core/core-client.d.ts +5 -5
- package/dist/core/core-client.js +2 -5
- package/dist/core/form-data.d.ts +1 -1
- package/dist/core/zod.d.ts +1 -1
- package/dist/core/zod.js +1 -1
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-clothes-changer/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-clothes-changer/request-types.js +1 -1
- package/dist/resources/v1/ai-face-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-face-editor/request-types.js +1 -1
- package/dist/resources/v1/ai-gif-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-gif-generator/request-types.js +1 -1
- package/dist/resources/v1/ai-headshot-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-headshot-generator/request-types.js +1 -1
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-image-editor/request-types.js +1 -1
- package/dist/resources/v1/ai-image-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-image-generator/request-types.js +1 -1
- package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-image-upscaler/request-types.js +1 -1
- package/dist/resources/v1/ai-meme-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-meme-generator/request-types.js +1 -1
- package/dist/resources/v1/ai-photo-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-photo-editor/request-types.js +1 -1
- package/dist/resources/v1/ai-qr-code-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-qr-code-generator/request-types.js +1 -1
- package/dist/resources/v1/ai-talking-photo/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-talking-photo/request-types.js +1 -1
- package/dist/resources/v1/animation/request-types.d.ts +1 -1
- package/dist/resources/v1/animation/request-types.js +1 -1
- package/dist/resources/v1/auto-subtitle-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/auto-subtitle-generator/request-types.js +1 -1
- package/dist/resources/v1/face-detection/request-types.d.ts +1 -1
- package/dist/resources/v1/face-detection/request-types.js +1 -1
- package/dist/resources/v1/face-swap/request-types.d.ts +21 -17
- package/dist/resources/v1/face-swap/request-types.js +10 -5
- package/dist/resources/v1/face-swap-photo/request-types.d.ts +1 -1
- package/dist/resources/v1/face-swap-photo/request-types.js +1 -1
- package/dist/resources/v1/files/upload-urls/request-types.d.ts +1 -1
- package/dist/resources/v1/files/upload-urls/request-types.js +1 -1
- package/dist/resources/v1/image-background-remover/request-types.d.ts +1 -1
- package/dist/resources/v1/image-background-remover/request-types.js +1 -1
- package/dist/resources/v1/image-projects/request-types.js +1 -1
- package/dist/resources/v1/image-to-video/request-types.d.ts +17 -9
- package/dist/resources/v1/image-to-video/request-types.js +5 -5
- package/dist/resources/v1/lip-sync/request-types.d.ts +15 -17
- package/dist/resources/v1/lip-sync/request-types.js +5 -5
- package/dist/resources/v1/photo-colorizer/request-types.d.ts +1 -1
- package/dist/resources/v1/photo-colorizer/request-types.js +1 -1
- package/dist/resources/v1/resource-client.js +3 -3
- package/dist/resources/v1/text-to-video/request-types.d.ts +1 -1
- package/dist/resources/v1/text-to-video/request-types.js +1 -1
- package/dist/resources/v1/video-projects/request-types.js +1 -1
- package/dist/resources/v1/video-to-video/request-types.d.ts +15 -17
- package/dist/resources/v1/video-to-video/request-types.js +5 -5
- package/dist/types/index.d.ts +2 -0
- package/dist/types/v1-ai-clothes-changer-create-body-assets.js +1 -1
- package/dist/types/v1-ai-clothes-changer-create-body.d.ts +1 -1
- package/dist/types/v1-ai-clothes-changer-create-body.js +2 -2
- package/dist/types/v1-ai-clothes-changer-create-response.js +1 -1
- package/dist/types/v1-ai-face-editor-create-body-assets.js +1 -1
- package/dist/types/v1-ai-face-editor-create-body-style.js +1 -1
- package/dist/types/v1-ai-face-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-face-editor-create-body.js +2 -2
- package/dist/types/v1-ai-face-editor-create-response.js +1 -1
- package/dist/types/v1-ai-gif-generator-create-body-style.js +1 -1
- package/dist/types/v1-ai-gif-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-gif-generator-create-body.js +2 -2
- package/dist/types/v1-ai-gif-generator-create-response.js +1 -1
- package/dist/types/v1-ai-headshot-generator-create-body-assets.js +1 -1
- package/dist/types/v1-ai-headshot-generator-create-body-style.js +1 -1
- package/dist/types/v1-ai-headshot-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-headshot-generator-create-body.js +2 -2
- package/dist/types/v1-ai-headshot-generator-create-response.js +1 -1
- package/dist/types/v1-ai-image-editor-create-body-assets.js +1 -1
- package/dist/types/v1-ai-image-editor-create-body-style.js +1 -1
- package/dist/types/v1-ai-image-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-image-editor-create-body.js +2 -2
- package/dist/types/v1-ai-image-editor-create-response.js +1 -1
- package/dist/types/v1-ai-image-generator-create-body-style.js +1 -1
- package/dist/types/v1-ai-image-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-image-generator-create-body.js +2 -2
- package/dist/types/v1-ai-image-generator-create-response.js +1 -1
- package/dist/types/v1-ai-image-upscaler-create-body-assets.js +1 -1
- package/dist/types/v1-ai-image-upscaler-create-body-style.js +1 -1
- package/dist/types/v1-ai-image-upscaler-create-body.d.ts +1 -1
- package/dist/types/v1-ai-image-upscaler-create-body.js +2 -2
- package/dist/types/v1-ai-image-upscaler-create-response.js +1 -1
- package/dist/types/v1-ai-meme-generator-create-body-style.js +1 -1
- package/dist/types/v1-ai-meme-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-meme-generator-create-body.js +2 -2
- package/dist/types/v1-ai-meme-generator-create-response.js +1 -1
- package/dist/types/v1-ai-photo-editor-create-body-assets.js +1 -1
- package/dist/types/v1-ai-photo-editor-create-body-style.js +1 -1
- package/dist/types/v1-ai-photo-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-photo-editor-create-body.js +2 -2
- package/dist/types/v1-ai-photo-editor-create-response.js +1 -1
- package/dist/types/v1-ai-qr-code-generator-create-body-style.js +1 -1
- package/dist/types/v1-ai-qr-code-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-qr-code-generator-create-body.js +2 -2
- package/dist/types/v1-ai-qr-code-generator-create-response.js +1 -1
- package/dist/types/v1-ai-talking-photo-create-body-assets.js +1 -1
- package/dist/types/v1-ai-talking-photo-create-body-style.js +1 -1
- package/dist/types/v1-ai-talking-photo-create-body.d.ts +1 -1
- package/dist/types/v1-ai-talking-photo-create-body.js +2 -2
- package/dist/types/v1-ai-talking-photo-create-response.js +1 -1
- package/dist/types/v1-animation-create-body-assets.js +1 -1
- package/dist/types/v1-animation-create-body-style.js +1 -1
- package/dist/types/v1-animation-create-body.d.ts +1 -1
- package/dist/types/v1-animation-create-body.js +2 -2
- package/dist/types/v1-animation-create-response.js +1 -1
- package/dist/types/v1-auto-subtitle-generator-create-body-assets.js +1 -1
- package/dist/types/v1-auto-subtitle-generator-create-body-style-custom-config.js +1 -1
- package/dist/types/v1-auto-subtitle-generator-create-body-style.d.ts +1 -1
- package/dist/types/v1-auto-subtitle-generator-create-body-style.js +2 -2
- package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +1 -1
- package/dist/types/v1-auto-subtitle-generator-create-body.js +2 -2
- package/dist/types/v1-auto-subtitle-generator-create-response.js +1 -1
- package/dist/types/v1-face-detection-create-body-assets.js +1 -1
- package/dist/types/v1-face-detection-create-body.d.ts +1 -1
- package/dist/types/v1-face-detection-create-body.js +2 -2
- package/dist/types/v1-face-detection-create-response.js +1 -1
- package/dist/types/v1-face-detection-get-response-faces-item.js +1 -1
- package/dist/types/v1-face-detection-get-response.d.ts +1 -1
- package/dist/types/v1-face-detection-get-response.js +2 -2
- package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.js +1 -1
- package/dist/types/v1-face-swap-create-body-assets.d.ts +1 -1
- package/dist/types/v1-face-swap-create-body-assets.js +2 -2
- package/dist/types/v1-face-swap-create-body-style-version-enum.d.ts +6 -0
- package/dist/types/v1-face-swap-create-body-style-version-enum.js +2 -0
- package/dist/types/v1-face-swap-create-body-style.d.ts +24 -0
- package/dist/types/v1-face-swap-create-body-style.js +67 -0
- package/dist/types/v1-face-swap-create-body.d.ts +21 -17
- package/dist/types/v1-face-swap-create-body.js +11 -6
- package/dist/types/v1-face-swap-create-response.js +1 -1
- package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.js +1 -1
- package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +1 -1
- package/dist/types/v1-face-swap-photo-create-body-assets.js +2 -2
- package/dist/types/v1-face-swap-photo-create-body.d.ts +1 -1
- package/dist/types/v1-face-swap-photo-create-body.js +2 -2
- package/dist/types/v1-face-swap-photo-create-response.js +1 -1
- package/dist/types/v1-files-upload-urls-create-body-items-item.js +1 -1
- package/dist/types/v1-files-upload-urls-create-body.d.ts +1 -1
- package/dist/types/v1-files-upload-urls-create-body.js +2 -2
- package/dist/types/v1-files-upload-urls-create-response-items-item.js +1 -1
- package/dist/types/v1-files-upload-urls-create-response.d.ts +1 -1
- package/dist/types/v1-files-upload-urls-create-response.js +2 -2
- package/dist/types/v1-image-background-remover-create-body-assets.js +1 -1
- package/dist/types/v1-image-background-remover-create-body.d.ts +1 -1
- package/dist/types/v1-image-background-remover-create-body.js +2 -2
- package/dist/types/v1-image-background-remover-create-response.js +1 -1
- package/dist/types/v1-image-projects-get-response-downloads-item.js +1 -1
- package/dist/types/v1-image-projects-get-response-error.js +1 -1
- package/dist/types/v1-image-projects-get-response.d.ts +1 -1
- package/dist/types/v1-image-projects-get-response.js +2 -2
- package/dist/types/v1-image-to-video-create-body-assets.js +1 -1
- package/dist/types/v1-image-to-video-create-body-style.js +1 -1
- package/dist/types/v1-image-to-video-create-body.d.ts +17 -9
- package/dist/types/v1-image-to-video-create-body.js +6 -6
- package/dist/types/v1-image-to-video-create-response.js +1 -1
- package/dist/types/v1-lip-sync-create-body-assets.js +1 -1
- package/dist/types/v1-lip-sync-create-body.d.ts +15 -17
- package/dist/types/v1-lip-sync-create-body.js +6 -6
- package/dist/types/v1-lip-sync-create-response.js +1 -1
- package/dist/types/v1-photo-colorizer-create-body-assets.js +1 -1
- package/dist/types/v1-photo-colorizer-create-body.d.ts +1 -1
- package/dist/types/v1-photo-colorizer-create-body.js +2 -2
- package/dist/types/v1-photo-colorizer-create-response.js +1 -1
- package/dist/types/v1-text-to-video-create-body-style.js +1 -1
- package/dist/types/v1-text-to-video-create-body.d.ts +1 -1
- package/dist/types/v1-text-to-video-create-body.js +2 -2
- package/dist/types/v1-text-to-video-create-response.js +1 -1
- package/dist/types/v1-video-projects-get-response-download.js +1 -1
- package/dist/types/v1-video-projects-get-response-downloads-item.js +1 -1
- package/dist/types/v1-video-projects-get-response-error.js +1 -1
- package/dist/types/v1-video-projects-get-response.d.ts +1 -1
- package/dist/types/v1-video-projects-get-response.js +2 -2
- package/dist/types/v1-video-to-video-create-body-assets.js +1 -1
- package/dist/types/v1-video-to-video-create-body-style.js +1 -1
- package/dist/types/v1-video-to-video-create-body.d.ts +15 -17
- package/dist/types/v1-video-to-video-create-body.js +6 -6
- package/dist/types/v1-video-to-video-create-response.js +1 -1
- package/package.json +3 -2
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1LipSyncCreateBodyAssets = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1LipSyncCreateBodyAssets
|
|
41
41
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { External$V1LipSyncCreateBodyAssets, V1LipSyncCreateBodyAssets } from "./v1-lip-sync-create-body-assets";
|
|
2
1
|
import * as z from "zod";
|
|
2
|
+
import { External$V1LipSyncCreateBodyAssets, V1LipSyncCreateBodyAssets } from "./v1-lip-sync-create-body-assets";
|
|
3
3
|
/**
|
|
4
4
|
* V1LipSyncCreateBody
|
|
5
5
|
*/
|
|
@@ -13,16 +13,15 @@ export type V1LipSyncCreateBody = {
|
|
|
13
13
|
*/
|
|
14
14
|
endSeconds: number;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* `height` is deprecated and no longer influences the output video's resolution.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Output resolution is determined by the **minimum** of:
|
|
19
|
+
* - The resolution of the input video
|
|
20
|
+
* - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
20
21
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
22
|
+
* This field is retained only for backward compatibility and will be removed in a future release.
|
|
24
23
|
*/
|
|
25
|
-
height?: number | undefined;
|
|
24
|
+
height?: number | null | undefined;
|
|
26
25
|
/**
|
|
27
26
|
* Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
|
|
28
27
|
*/
|
|
@@ -36,16 +35,15 @@ export type V1LipSyncCreateBody = {
|
|
|
36
35
|
*/
|
|
37
36
|
startSeconds: number;
|
|
38
37
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* * 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.
|
|
42
|
-
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
38
|
+
* `width` is deprecated and no longer influences the output video's resolution.
|
|
43
39
|
*
|
|
44
|
-
*
|
|
40
|
+
* Output resolution is determined by the **minimum** of:
|
|
41
|
+
* - The resolution of the input video
|
|
42
|
+
* - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
45
43
|
*
|
|
46
|
-
*
|
|
44
|
+
* This field is retained only for backward compatibility and will be removed in a future release.
|
|
47
45
|
*/
|
|
48
|
-
width?: number | undefined;
|
|
46
|
+
width?: number | null | undefined;
|
|
49
47
|
};
|
|
50
48
|
/**
|
|
51
49
|
* @internal
|
|
@@ -55,11 +53,11 @@ export type V1LipSyncCreateBody = {
|
|
|
55
53
|
export type External$V1LipSyncCreateBody = {
|
|
56
54
|
assets: External$V1LipSyncCreateBodyAssets;
|
|
57
55
|
end_seconds: number;
|
|
58
|
-
height?: number | undefined;
|
|
56
|
+
height?: number | null | undefined;
|
|
59
57
|
max_fps_limit?: number | undefined;
|
|
60
58
|
name?: string | undefined;
|
|
61
59
|
start_seconds: number;
|
|
62
|
-
width?: number | undefined;
|
|
60
|
+
width?: number | null | undefined;
|
|
63
61
|
};
|
|
64
62
|
export declare const Schemas$V1LipSyncCreateBody: {
|
|
65
63
|
in: z.ZodType<V1LipSyncCreateBody, z.ZodTypeDef, unknown>;
|
|
@@ -34,9 +34,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1LipSyncCreateBody = void 0;
|
|
37
|
-
const v1_lip_sync_create_body_assets_1 = require("./v1-lip-sync-create-body-assets");
|
|
38
|
-
const core_1 = require("../core");
|
|
39
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
|
+
const v1_lip_sync_create_body_assets_1 = require("./v1-lip-sync-create-body-assets");
|
|
40
40
|
/**
|
|
41
41
|
* Takes network data, validates it, and transforms keys to match typescript object V1LipSyncCreateBody
|
|
42
42
|
*/
|
|
@@ -44,11 +44,11 @@ const SchemaIn$V1LipSyncCreateBody = z
|
|
|
44
44
|
.object({
|
|
45
45
|
assets: v1_lip_sync_create_body_assets_1.Schemas$V1LipSyncCreateBodyAssets.in,
|
|
46
46
|
end_seconds: z.number(),
|
|
47
|
-
height: z.number().int().optional(),
|
|
47
|
+
height: z.number().int().nullable().optional(),
|
|
48
48
|
max_fps_limit: z.number().optional(),
|
|
49
49
|
name: z.string().optional(),
|
|
50
50
|
start_seconds: z.number(),
|
|
51
|
-
width: z.number().int().optional(),
|
|
51
|
+
width: z.number().int().nullable().optional(),
|
|
52
52
|
})
|
|
53
53
|
.transform((obj) => {
|
|
54
54
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -69,11 +69,11 @@ const SchemaOut$V1LipSyncCreateBody = z
|
|
|
69
69
|
.object({
|
|
70
70
|
assets: v1_lip_sync_create_body_assets_1.Schemas$V1LipSyncCreateBodyAssets.out,
|
|
71
71
|
endSeconds: z.number(),
|
|
72
|
-
height: z.number().int().optional(),
|
|
72
|
+
height: z.number().int().nullable().optional(),
|
|
73
73
|
maxFpsLimit: z.number().optional(),
|
|
74
74
|
name: z.string().optional(),
|
|
75
75
|
startSeconds: z.number(),
|
|
76
|
-
width: z.number().int().optional(),
|
|
76
|
+
width: z.number().int().nullable().optional(),
|
|
77
77
|
})
|
|
78
78
|
.transform((obj) => {
|
|
79
79
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1LipSyncCreateResponse = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1LipSyncCreateResponse
|
|
41
41
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1PhotoColorizerCreateBodyAssets = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1PhotoColorizerCreateBodyAssets
|
|
41
41
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { External$V1PhotoColorizerCreateBodyAssets, V1PhotoColorizerCreateBodyAssets } from "./v1-photo-colorizer-create-body-assets";
|
|
2
1
|
import * as z from "zod";
|
|
2
|
+
import { External$V1PhotoColorizerCreateBodyAssets, V1PhotoColorizerCreateBodyAssets } from "./v1-photo-colorizer-create-body-assets";
|
|
3
3
|
/**
|
|
4
4
|
* V1PhotoColorizerCreateBody
|
|
5
5
|
*/
|
|
@@ -34,9 +34,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1PhotoColorizerCreateBody = void 0;
|
|
37
|
-
const v1_photo_colorizer_create_body_assets_1 = require("./v1-photo-colorizer-create-body-assets");
|
|
38
|
-
const core_1 = require("../core");
|
|
39
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
|
+
const v1_photo_colorizer_create_body_assets_1 = require("./v1-photo-colorizer-create-body-assets");
|
|
40
40
|
/**
|
|
41
41
|
* Takes network data, validates it, and transforms keys to match typescript object V1PhotoColorizerCreateBody
|
|
42
42
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1PhotoColorizerCreateResponse = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1PhotoColorizerCreateResponse
|
|
41
41
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1TextToVideoCreateBodyStyle = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1TextToVideoCreateBodyStyle
|
|
41
41
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } from "./v1-text-to-video-create-body-style";
|
|
2
1
|
import * as z from "zod";
|
|
2
|
+
import { External$V1TextToVideoCreateBodyStyle, V1TextToVideoCreateBodyStyle } from "./v1-text-to-video-create-body-style";
|
|
3
3
|
/**
|
|
4
4
|
* V1TextToVideoCreateBody
|
|
5
5
|
*/
|
|
@@ -34,9 +34,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1TextToVideoCreateBody = void 0;
|
|
37
|
-
const v1_text_to_video_create_body_style_1 = require("./v1-text-to-video-create-body-style");
|
|
38
|
-
const core_1 = require("../core");
|
|
39
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
|
+
const v1_text_to_video_create_body_style_1 = require("./v1-text-to-video-create-body-style");
|
|
40
40
|
/**
|
|
41
41
|
* Takes network data, validates it, and transforms keys to match typescript object V1TextToVideoCreateBody
|
|
42
42
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1TextToVideoCreateResponse = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1TextToVideoCreateResponse
|
|
41
41
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoProjectsGetResponseDownload = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoProjectsGetResponseDownload
|
|
41
41
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoProjectsGetResponseDownloadsItem = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoProjectsGetResponseDownloadsItem
|
|
41
41
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoProjectsGetResponseError = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoProjectsGetResponseError
|
|
41
41
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
1
2
|
import { External$V1VideoProjectsGetResponseDownload, V1VideoProjectsGetResponseDownload } from "./v1-video-projects-get-response-download";
|
|
2
3
|
import { External$V1VideoProjectsGetResponseDownloadsItem, V1VideoProjectsGetResponseDownloadsItem } from "./v1-video-projects-get-response-downloads-item";
|
|
3
4
|
import { External$V1VideoProjectsGetResponseError, V1VideoProjectsGetResponseError } from "./v1-video-projects-get-response-error";
|
|
4
|
-
import * as z from "zod";
|
|
5
5
|
/**
|
|
6
6
|
* Success
|
|
7
7
|
*/
|
|
@@ -34,11 +34,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoProjectsGetResponse = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
37
39
|
const v1_video_projects_get_response_download_1 = require("./v1-video-projects-get-response-download");
|
|
38
40
|
const v1_video_projects_get_response_downloads_item_1 = require("./v1-video-projects-get-response-downloads-item");
|
|
39
41
|
const v1_video_projects_get_response_error_1 = require("./v1-video-projects-get-response-error");
|
|
40
|
-
const core_1 = require("../core");
|
|
41
|
-
const z = __importStar(require("zod"));
|
|
42
42
|
/**
|
|
43
43
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoProjectsGetResponse
|
|
44
44
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoToVideoCreateBodyAssets = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoToVideoCreateBodyAssets
|
|
41
41
|
*/
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoToVideoCreateBodyStyle = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoToVideoCreateBodyStyle
|
|
41
41
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
1
2
|
import { External$V1VideoToVideoCreateBodyAssets, V1VideoToVideoCreateBodyAssets } from "./v1-video-to-video-create-body-assets";
|
|
2
3
|
import { External$V1VideoToVideoCreateBodyStyle, V1VideoToVideoCreateBodyStyle } from "./v1-video-to-video-create-body-style";
|
|
3
|
-
import * as z from "zod";
|
|
4
4
|
/**
|
|
5
5
|
* V1VideoToVideoCreateBody
|
|
6
6
|
*/
|
|
@@ -20,16 +20,15 @@ export type V1VideoToVideoCreateBody = {
|
|
|
20
20
|
*/
|
|
21
21
|
fpsResolution?: ("FULL" | "HALF") | undefined;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* `height` is deprecated and no longer influences the output video's resolution.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
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
|
-
*
|
|
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
33
|
* The name of video. This value is mainly used for your own identification of the video.
|
|
35
34
|
*/
|
|
@@ -40,16 +39,15 @@ export type V1VideoToVideoCreateBody = {
|
|
|
40
39
|
startSeconds: number;
|
|
41
40
|
style: V1VideoToVideoCreateBodyStyle;
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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>;
|
|
@@ -34,10 +34,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoToVideoCreateBody = void 0;
|
|
37
|
+
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
37
39
|
const v1_video_to_video_create_body_assets_1 = require("./v1-video-to-video-create-body-assets");
|
|
38
40
|
const v1_video_to_video_create_body_style_1 = require("./v1-video-to-video-create-body-style");
|
|
39
|
-
const core_1 = require("../core");
|
|
40
|
-
const z = __importStar(require("zod"));
|
|
41
41
|
/**
|
|
42
42
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoToVideoCreateBody
|
|
43
43
|
*/
|
|
@@ -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, {
|
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Schemas$V1VideoToVideoCreateResponse = void 0;
|
|
37
|
-
const core_1 = require("../core");
|
|
38
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
const core_1 = require("../core");
|
|
39
39
|
/**
|
|
40
40
|
* Takes network data, validates it, and transforms keys to match typescript object V1VideoToVideoCreateResponse
|
|
41
41
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magic-hour",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"ts-jest": "^29.2.5",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
46
|
"tsc-alias": "^1.8.10",
|
|
47
|
-
"typescript": "^5.2.0"
|
|
47
|
+
"typescript": "^5.2.0",
|
|
48
|
+
"@biomejs/biome": "2.2.0"
|
|
48
49
|
},
|
|
49
50
|
"description": "Node SDK for Magic Hour API",
|
|
50
51
|
"keywords": [
|