magic-hour 0.43.1 → 0.45.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 +82 -77
- package/dist/core/api-error.d.ts +6 -0
- package/dist/core/api-error.js +11 -0
- package/dist/core/api-promise.d.ts +28 -0
- package/dist/core/api-promise.js +252 -0
- package/dist/core/auth.d.ts +76 -0
- package/dist/core/auth.js +232 -0
- package/dist/core/binary-response.d.ts +6 -0
- package/dist/core/binary-response.js +10 -0
- package/dist/core/content-type.d.ts +4 -0
- package/dist/core/content-type.js +12 -0
- package/dist/core/core-client.d.ts +58 -0
- package/dist/core/core-client.js +168 -0
- package/dist/core/form-data.d.ts +26 -0
- package/dist/core/form-data.js +83 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.js +28 -0
- package/dist/core/logger.d.ts +48 -0
- package/dist/core/logger.js +82 -0
- package/dist/core/query.d.ts +8 -0
- package/dist/core/query.js +77 -0
- package/dist/core/runtime.d.ts +4 -0
- package/dist/core/runtime.js +20 -0
- package/dist/core/zod.d.ts +13 -0
- package/dist/core/zod.js +60 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/examples/logging-example.d.ts +10 -0
- package/dist/examples/logging-example.js +137 -0
- package/dist/logging-client.d.ts +39 -0
- package/dist/logging-client.js +116 -0
- package/dist/resources/v1/ai-clothes-changer/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-face-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-gif-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-headshot-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-image-editor/resource-client.d.ts +1 -1
- package/dist/resources/v1/ai-image-editor/resource-client.js +1 -1
- package/dist/resources/v1/ai-image-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-photo-editor/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-qr-code-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-talking-photo/request-types.d.ts +1 -1
- package/dist/resources/v1/ai-voice-cloner/index.d.ts +2 -0
- package/dist/resources/v1/ai-voice-cloner/index.js +5 -0
- package/dist/resources/v1/ai-voice-cloner/request-types.d.ts +31 -0
- package/dist/resources/v1/ai-voice-cloner/request-types.js +77 -0
- package/dist/resources/v1/ai-voice-cloner/resource-client.d.ts +55 -0
- package/dist/resources/v1/ai-voice-cloner/resource-client.js +99 -0
- package/dist/resources/v1/ai-voice-generator/request-types.d.ts +1 -1
- package/dist/resources/v1/animation/request-types.d.ts +1 -1
- package/dist/resources/v1/audio-projects/resource-client.d.ts +9 -10
- package/dist/resources/v1/audio-projects/resource-client.js +8 -9
- package/dist/resources/v1/auto-subtitle-generator/request-types.d.ts +3 -3
- package/dist/resources/v1/face-swap/request-types.d.ts +3 -3
- package/dist/resources/v1/face-swap/resource-client.d.ts +20 -2
- package/dist/resources/v1/face-swap/resource-client.js +20 -2
- package/dist/resources/v1/face-swap-photo/request-types.d.ts +1 -1
- package/dist/resources/v1/files/resource-client.d.ts +13 -3
- package/dist/resources/v1/files/resource-client.js +54 -3
- package/dist/resources/v1/files/resource-client.test.js +45 -0
- package/dist/resources/v1/image-background-remover/request-types.d.ts +1 -1
- package/dist/resources/v1/image-projects/resource-client.d.ts +9 -10
- package/dist/resources/v1/image-projects/resource-client.js +8 -9
- package/dist/resources/v1/image-to-video/request-types.d.ts +1 -1
- package/dist/resources/v1/image-to-video/resource-client.d.ts +20 -2
- package/dist/resources/v1/image-to-video/resource-client.js +20 -2
- package/dist/resources/v1/index.d.ts +1 -0
- package/dist/resources/v1/index.js +2 -1
- package/dist/resources/v1/lip-sync/request-types.d.ts +3 -3
- package/dist/resources/v1/lip-sync/resource-client.d.ts +20 -2
- package/dist/resources/v1/lip-sync/resource-client.js +20 -2
- package/dist/resources/v1/photo-colorizer/request-types.d.ts +1 -1
- package/dist/resources/v1/photo-colorizer/resource-client.d.ts +1 -1
- package/dist/resources/v1/photo-colorizer/resource-client.js +1 -1
- package/dist/resources/v1/resource-client.d.ts +3 -0
- package/dist/resources/v1/resource-client.js +6 -0
- package/dist/resources/v1/text-to-video/request-types.d.ts +1 -1
- package/dist/resources/v1/text-to-video/resource-client.d.ts +20 -2
- package/dist/resources/v1/text-to-video/resource-client.js +20 -2
- package/dist/resources/v1/video-projects/resource-client.d.ts +9 -10
- package/dist/resources/v1/video-projects/resource-client.js +8 -9
- package/dist/resources/v1/video-to-video/request-types.d.ts +3 -3
- package/dist/resources/v1/video-to-video/resource-client.d.ts +20 -2
- package/dist/resources/v1/video-to-video/resource-client.js +20 -2
- package/dist/types/index.d.ts +4 -0
- package/dist/types/v1-ai-clothes-changer-create-body-assets-garment-type-enum.d.ts +6 -2
- package/dist/types/v1-ai-clothes-changer-create-body-assets.d.ts +9 -5
- package/dist/types/v1-ai-clothes-changer-create-body-assets.js +6 -2
- package/dist/types/v1-ai-clothes-changer-create-body.d.ts +1 -1
- package/dist/types/v1-ai-clothes-changer-create-response.d.ts +1 -1
- package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +1 -1
- package/dist/types/v1-ai-face-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-face-editor-create-response.d.ts +1 -1
- package/dist/types/v1-ai-gif-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-gif-generator-create-response.d.ts +1 -1
- package/dist/types/v1-ai-headshot-generator-create-body-assets.d.ts +1 -1
- package/dist/types/v1-ai-headshot-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-headshot-generator-create-response.d.ts +1 -1
- package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +2 -2
- package/dist/types/v1-ai-image-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-image-editor-create-response.d.ts +1 -1
- package/dist/types/v1-ai-image-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-image-generator-create-response.d.ts +1 -1
- package/dist/types/v1-ai-image-upscaler-create-body-assets.d.ts +1 -1
- package/dist/types/v1-ai-image-upscaler-create-body.d.ts +1 -1
- package/dist/types/v1-ai-image-upscaler-create-response.d.ts +1 -1
- package/dist/types/v1-ai-meme-generator-create-response.d.ts +1 -1
- package/dist/types/v1-ai-photo-editor-create-body-assets.d.ts +1 -1
- package/dist/types/v1-ai-photo-editor-create-body.d.ts +1 -1
- package/dist/types/v1-ai-photo-editor-create-response.d.ts +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-response.d.ts +1 -1
- package/dist/types/v1-ai-talking-photo-create-body-assets.d.ts +2 -2
- package/dist/types/v1-ai-talking-photo-create-body.d.ts +1 -1
- package/dist/types/v1-ai-talking-photo-create-response.d.ts +1 -1
- package/dist/types/v1-ai-voice-cloner-create-body-assets.d.ts +27 -0
- package/dist/types/v1-ai-voice-cloner-create-body-assets.js +67 -0
- package/dist/types/v1-ai-voice-cloner-create-body-style.d.ts +22 -0
- package/dist/types/v1-ai-voice-cloner-create-body-style.js +67 -0
- package/dist/types/v1-ai-voice-cloner-create-body.d.ts +31 -0
- package/dist/types/v1-ai-voice-cloner-create-body.js +77 -0
- package/dist/types/v1-ai-voice-cloner-create-response.d.ts +29 -0
- package/dist/types/v1-ai-voice-cloner-create-response.js +71 -0
- package/dist/types/v1-ai-voice-generator-create-body.d.ts +1 -1
- package/dist/types/v1-ai-voice-generator-create-response.d.ts +1 -1
- package/dist/types/v1-animation-create-body-assets.d.ts +2 -2
- package/dist/types/v1-animation-create-body.d.ts +1 -1
- package/dist/types/v1-animation-create-response.d.ts +1 -1
- package/dist/types/v1-audio-projects-get-response.d.ts +2 -2
- package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +1 -1
- package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +3 -3
- package/dist/types/v1-auto-subtitle-generator-create-response.d.ts +1 -1
- package/dist/types/v1-face-detection-create-body-assets.d.ts +1 -1
- package/dist/types/v1-face-swap-create-body-assets-face-mappings-item.d.ts +1 -1
- package/dist/types/v1-face-swap-create-body-assets-face-swap-mode-enum.d.ts +3 -3
- package/dist/types/v1-face-swap-create-body-assets-video-source-enum.d.ts +1 -1
- package/dist/types/v1-face-swap-create-body-assets.d.ts +10 -7
- package/dist/types/v1-face-swap-create-body.d.ts +3 -3
- package/dist/types/v1-face-swap-create-response.d.ts +1 -1
- package/dist/types/v1-face-swap-photo-create-body-assets-face-mappings-item.d.ts +1 -1
- package/dist/types/v1-face-swap-photo-create-body-assets-face-swap-mode-enum.d.ts +3 -3
- package/dist/types/v1-face-swap-photo-create-body-assets.d.ts +5 -5
- package/dist/types/v1-face-swap-photo-create-body.d.ts +1 -1
- package/dist/types/v1-face-swap-photo-create-response.d.ts +1 -1
- package/dist/types/v1-image-background-remover-create-body-assets.d.ts +2 -2
- package/dist/types/v1-image-background-remover-create-body.d.ts +1 -1
- package/dist/types/v1-image-background-remover-create-response.d.ts +1 -1
- package/dist/types/v1-image-projects-get-response.d.ts +2 -2
- package/dist/types/v1-image-to-video-create-body-assets.d.ts +1 -1
- package/dist/types/v1-image-to-video-create-body.d.ts +1 -1
- package/dist/types/v1-image-to-video-create-response.d.ts +1 -1
- package/dist/types/v1-lip-sync-create-body-assets-video-source-enum.d.ts +1 -1
- package/dist/types/v1-lip-sync-create-body-assets.d.ts +7 -4
- package/dist/types/v1-lip-sync-create-body.d.ts +3 -3
- package/dist/types/v1-lip-sync-create-response.d.ts +1 -1
- package/dist/types/v1-photo-colorizer-create-body-assets.d.ts +1 -1
- package/dist/types/v1-photo-colorizer-create-body.d.ts +1 -1
- package/dist/types/v1-photo-colorizer-create-response.d.ts +1 -1
- package/dist/types/v1-text-to-video-create-body.d.ts +1 -1
- package/dist/types/v1-text-to-video-create-response.d.ts +1 -1
- package/dist/types/v1-video-projects-get-response.d.ts +4 -4
- package/dist/types/v1-video-to-video-create-body-assets-video-source-enum.d.ts +1 -1
- package/dist/types/v1-video-to-video-create-body-assets.d.ts +6 -3
- package/dist/types/v1-video-to-video-create-body.d.ts +3 -3
- package/dist/types/v1-video-to-video-create-response.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVoiceClonerCreateBodyStyle = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVoiceClonerCreateBodyStyle
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVoiceClonerCreateBodyStyle = z
|
|
43
|
+
.object({
|
|
44
|
+
prompt: z.string(),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
48
|
+
prompt: "prompt",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceClonerCreateBodyStyle
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiVoiceClonerCreateBodyStyle = z
|
|
56
|
+
.object({
|
|
57
|
+
prompt: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
61
|
+
prompt: "prompt",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AiVoiceClonerCreateBodyStyle = {
|
|
65
|
+
in: SchemaIn$V1AiVoiceClonerCreateBodyStyle,
|
|
66
|
+
out: SchemaOut$V1AiVoiceClonerCreateBodyStyle,
|
|
67
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { External$V1AiVoiceClonerCreateBodyAssets, V1AiVoiceClonerCreateBodyAssets } from "./v1-ai-voice-cloner-create-body-assets";
|
|
3
|
+
import { External$V1AiVoiceClonerCreateBodyStyle, V1AiVoiceClonerCreateBodyStyle } from "./v1-ai-voice-cloner-create-body-style";
|
|
4
|
+
/**
|
|
5
|
+
* V1AiVoiceClonerCreateBody
|
|
6
|
+
*/
|
|
7
|
+
export type V1AiVoiceClonerCreateBody = {
|
|
8
|
+
/**
|
|
9
|
+
* Provide the assets for voice cloning.
|
|
10
|
+
*/
|
|
11
|
+
assets: V1AiVoiceClonerCreateBodyAssets;
|
|
12
|
+
/**
|
|
13
|
+
* Give your audio a custom name for easy identification.
|
|
14
|
+
*/
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
style: V1AiVoiceClonerCreateBodyStyle;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* V1AiVoiceClonerCreateBody without any key transformation, this is what
|
|
21
|
+
* we expect to come in as network data
|
|
22
|
+
*/
|
|
23
|
+
export type External$V1AiVoiceClonerCreateBody = {
|
|
24
|
+
assets: External$V1AiVoiceClonerCreateBodyAssets;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
style: External$V1AiVoiceClonerCreateBodyStyle;
|
|
27
|
+
};
|
|
28
|
+
export declare const Schemas$V1AiVoiceClonerCreateBody: {
|
|
29
|
+
in: z.ZodType<V1AiVoiceClonerCreateBody, z.ZodTypeDef, unknown>;
|
|
30
|
+
out: z.ZodType<External$V1AiVoiceClonerCreateBody, z.ZodTypeDef, V1AiVoiceClonerCreateBody>;
|
|
31
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVoiceClonerCreateBody = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
const v1_ai_voice_cloner_create_body_assets_1 = require("./v1-ai-voice-cloner-create-body-assets");
|
|
40
|
+
const v1_ai_voice_cloner_create_body_style_1 = require("./v1-ai-voice-cloner-create-body-style");
|
|
41
|
+
/**
|
|
42
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVoiceClonerCreateBody
|
|
43
|
+
*/
|
|
44
|
+
const SchemaIn$V1AiVoiceClonerCreateBody = z
|
|
45
|
+
.object({
|
|
46
|
+
assets: v1_ai_voice_cloner_create_body_assets_1.Schemas$V1AiVoiceClonerCreateBodyAssets.in,
|
|
47
|
+
name: z.string().optional(),
|
|
48
|
+
style: v1_ai_voice_cloner_create_body_style_1.Schemas$V1AiVoiceClonerCreateBodyStyle.in,
|
|
49
|
+
})
|
|
50
|
+
.transform((obj) => {
|
|
51
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
52
|
+
assets: "assets",
|
|
53
|
+
name: "name",
|
|
54
|
+
style: "style",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceClonerCreateBody
|
|
60
|
+
*/
|
|
61
|
+
const SchemaOut$V1AiVoiceClonerCreateBody = z
|
|
62
|
+
.object({
|
|
63
|
+
assets: v1_ai_voice_cloner_create_body_assets_1.Schemas$V1AiVoiceClonerCreateBodyAssets.out,
|
|
64
|
+
name: z.string().optional(),
|
|
65
|
+
style: v1_ai_voice_cloner_create_body_style_1.Schemas$V1AiVoiceClonerCreateBodyStyle.out,
|
|
66
|
+
})
|
|
67
|
+
.transform((obj) => {
|
|
68
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
69
|
+
assets: "assets",
|
|
70
|
+
name: "name",
|
|
71
|
+
style: "style",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
exports.Schemas$V1AiVoiceClonerCreateBody = {
|
|
75
|
+
in: SchemaIn$V1AiVoiceClonerCreateBody,
|
|
76
|
+
out: SchemaOut$V1AiVoiceClonerCreateBody,
|
|
77
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Success
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiVoiceClonerCreateResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Unique ID of the audio. Use it with the [Get audio Project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch status and downloads.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
* V1AiVoiceClonerCreateResponse without any key transformation, this is what
|
|
20
|
+
* we expect to come in as network data
|
|
21
|
+
*/
|
|
22
|
+
export type External$V1AiVoiceClonerCreateResponse = {
|
|
23
|
+
credits_charged: number;
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const Schemas$V1AiVoiceClonerCreateResponse: {
|
|
27
|
+
in: z.ZodType<V1AiVoiceClonerCreateResponse, z.ZodTypeDef, unknown>;
|
|
28
|
+
out: z.ZodType<External$V1AiVoiceClonerCreateResponse, z.ZodTypeDef, V1AiVoiceClonerCreateResponse>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVoiceClonerCreateResponse = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVoiceClonerCreateResponse
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVoiceClonerCreateResponse = z
|
|
43
|
+
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
45
|
+
id: z.string(),
|
|
46
|
+
})
|
|
47
|
+
.transform((obj) => {
|
|
48
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
|
+
credits_charged: "creditsCharged",
|
|
50
|
+
id: "id",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceClonerCreateResponse
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1AiVoiceClonerCreateResponse = z
|
|
58
|
+
.object({
|
|
59
|
+
creditsCharged: z.number().int(),
|
|
60
|
+
id: z.string(),
|
|
61
|
+
})
|
|
62
|
+
.transform((obj) => {
|
|
63
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
|
+
creditsCharged: "credits_charged",
|
|
65
|
+
id: "id",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
exports.Schemas$V1AiVoiceClonerCreateResponse = {
|
|
69
|
+
in: SchemaIn$V1AiVoiceClonerCreateResponse,
|
|
70
|
+
out: SchemaOut$V1AiVoiceClonerCreateResponse,
|
|
71
|
+
};
|
|
@@ -5,7 +5,7 @@ import { External$V1AiVoiceGeneratorCreateBodyStyle, V1AiVoiceGeneratorCreateBod
|
|
|
5
5
|
*/
|
|
6
6
|
export type V1AiVoiceGeneratorCreateBody = {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Give your audio a custom name for easy identification.
|
|
9
9
|
*/
|
|
10
10
|
name?: string | undefined;
|
|
11
11
|
/**
|
|
@@ -10,7 +10,7 @@ export type V1AiVoiceGeneratorCreateResponse = {
|
|
|
10
10
|
*/
|
|
11
11
|
creditsCharged: number;
|
|
12
12
|
/**
|
|
13
|
-
* Unique ID of the audio.
|
|
13
|
+
* Unique ID of the audio. Use it with the [Get audio Project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch status and downloads.
|
|
14
14
|
*/
|
|
15
15
|
id: string;
|
|
16
16
|
};
|
|
@@ -8,7 +8,7 @@ export type V1AnimationCreateBodyAssets = {
|
|
|
8
8
|
* - a direct URL to the video file
|
|
9
9
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
audioFilePath?: string | undefined;
|
|
@@ -21,7 +21,7 @@ export type V1AnimationCreateBodyAssets = {
|
|
|
21
21
|
* - a direct URL to the video file
|
|
22
22
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
imageFilePath?: string | undefined;
|
|
@@ -22,7 +22,7 @@ export type V1AnimationCreateBody = {
|
|
|
22
22
|
*/
|
|
23
23
|
height: number;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Give your video a custom name for easy identification.
|
|
26
26
|
*/
|
|
27
27
|
name?: string | undefined;
|
|
28
28
|
/**
|
|
@@ -16,7 +16,7 @@ export type V1AnimationCreateResponse = {
|
|
|
16
16
|
*/
|
|
17
17
|
estimatedFrameCost: number;
|
|
18
18
|
/**
|
|
19
|
-
* Unique ID of the video.
|
|
19
|
+
* Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
};
|
|
@@ -14,7 +14,7 @@ export type V1AudioProjectsGetResponse = {
|
|
|
14
14
|
creditsCharged: number;
|
|
15
15
|
downloads: V1AudioProjectsGetResponseDownloadsItem[];
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Whether this resource is active. If false, it is deleted.
|
|
18
18
|
*/
|
|
19
19
|
enabled: boolean;
|
|
20
20
|
/**
|
|
@@ -22,7 +22,7 @@ export type V1AudioProjectsGetResponse = {
|
|
|
22
22
|
*/
|
|
23
23
|
error: V1AudioProjectsGetResponseError | null;
|
|
24
24
|
/**
|
|
25
|
-
* Unique ID of the audio.
|
|
25
|
+
* Unique ID of the audio. Use it with the [Get audio Project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch status and downloads.
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
28
|
/**
|
|
@@ -8,7 +8,7 @@ export type V1AutoSubtitleGeneratorCreateBodyAssets = {
|
|
|
8
8
|
* - a direct URL to the video file
|
|
9
9
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
videoFilePath: string;
|
|
@@ -10,15 +10,15 @@ export type V1AutoSubtitleGeneratorCreateBody = {
|
|
|
10
10
|
*/
|
|
11
11
|
assets: V1AutoSubtitleGeneratorCreateBodyAssets;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* End time of your clip (seconds). Must be greater than start_seconds.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Give your video a custom name for easy identification.
|
|
18
18
|
*/
|
|
19
19
|
name?: string | undefined;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Start time of your clip (seconds). Must be ≥ 0.
|
|
22
22
|
*/
|
|
23
23
|
startSeconds: number;
|
|
24
24
|
/**
|
|
@@ -16,7 +16,7 @@ export type V1AutoSubtitleGeneratorCreateResponse = {
|
|
|
16
16
|
*/
|
|
17
17
|
estimatedFrameCost: number;
|
|
18
18
|
/**
|
|
19
|
-
* Unique ID of the video.
|
|
19
|
+
* Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
};
|
|
@@ -8,7 +8,7 @@ export type V1FaceDetectionCreateBodyAssets = {
|
|
|
8
8
|
* - a direct URL to the video file
|
|
9
9
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
targetFilePath: string;
|
|
@@ -8,7 +8,7 @@ export type V1FaceSwapCreateBodyAssetsFaceMappingsItem = {
|
|
|
8
8
|
* - a direct URL to the video file
|
|
9
9
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
newFace: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Choose how to swap faces:
|
|
3
|
+
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
4
|
+
* +- **individual-faces** — specify exact mappings using `face_mappings`
|
|
5
5
|
*/
|
|
6
6
|
export type V1FaceSwapCreateBodyAssetsFaceSwapModeEnum = "all-faces" | "individual-faces";
|
|
@@ -9,9 +9,9 @@ export type V1FaceSwapCreateBodyAssets = {
|
|
|
9
9
|
*/
|
|
10
10
|
faceMappings?: V1FaceSwapCreateBodyAssetsFaceMappingsItem[] | undefined;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* Choose how to swap faces:
|
|
13
|
+
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
14
|
+
* +- **individual-faces** — specify exact mappings using `face_mappings`
|
|
15
15
|
*/
|
|
16
16
|
faceSwapMode?: ("all-faces" | "individual-faces") | undefined;
|
|
17
17
|
/**
|
|
@@ -21,22 +21,25 @@ export type V1FaceSwapCreateBodyAssets = {
|
|
|
21
21
|
* - a direct URL to the video file
|
|
22
22
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
imageFilePath?: string | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* Required if `video_source` is `file`. This value is either
|
|
29
|
+
* Your video file. Required if `video_source` is `file`. This value is either
|
|
30
30
|
* - a direct URL to the video file
|
|
31
31
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
32
32
|
*
|
|
33
|
-
*
|
|
33
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
36
|
videoFilePath?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Choose your video source.
|
|
39
|
+
*/
|
|
37
40
|
videoSource: "file" | "youtube";
|
|
38
41
|
/**
|
|
39
|
-
*
|
|
42
|
+
* YouTube URL (required if `video_source` is `youtube`).
|
|
40
43
|
*/
|
|
41
44
|
youtubeUrl?: string | undefined;
|
|
42
45
|
};
|
|
@@ -10,7 +10,7 @@ export type V1FaceSwapCreateBody = {
|
|
|
10
10
|
*/
|
|
11
11
|
assets: V1FaceSwapCreateBodyAssets;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* End time of your clip (seconds). Must be greater than start_seconds.
|
|
14
14
|
*/
|
|
15
15
|
endSeconds: number;
|
|
16
16
|
/**
|
|
@@ -24,11 +24,11 @@ export type V1FaceSwapCreateBody = {
|
|
|
24
24
|
*/
|
|
25
25
|
height?: number | null | undefined;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Give your video a custom name for easy identification.
|
|
28
28
|
*/
|
|
29
29
|
name?: string | undefined;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Start time of your clip (seconds). Must be ≥ 0.
|
|
32
32
|
*/
|
|
33
33
|
startSeconds: number;
|
|
34
34
|
/**
|
|
@@ -16,7 +16,7 @@ export type V1FaceSwapCreateResponse = {
|
|
|
16
16
|
*/
|
|
17
17
|
estimatedFrameCost: number;
|
|
18
18
|
/**
|
|
19
|
-
* Unique ID of the video.
|
|
19
|
+
* Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
|
|
20
20
|
*/
|
|
21
21
|
id: string;
|
|
22
22
|
};
|
|
@@ -8,7 +8,7 @@ export type V1FaceSwapPhotoCreateBodyAssetsFaceMappingsItem = {
|
|
|
8
8
|
* - a direct URL to the video file
|
|
9
9
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
newFace: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Choose how to swap faces:
|
|
3
|
+
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
4
|
+
* +- **individual-faces** — specify exact mappings using `face_mappings`
|
|
5
5
|
*/
|
|
6
6
|
export type V1FaceSwapPhotoCreateBodyAssetsFaceSwapModeEnum = "all-faces" | "individual-faces";
|
|
@@ -9,9 +9,9 @@ export type V1FaceSwapPhotoCreateBodyAssets = {
|
|
|
9
9
|
*/
|
|
10
10
|
faceMappings?: V1FaceSwapPhotoCreateBodyAssetsFaceMappingsItem[] | undefined;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* Choose how to swap faces:
|
|
13
|
+
* **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
|
|
14
|
+
* +- **individual-faces** — specify exact mappings using `face_mappings`
|
|
15
15
|
*/
|
|
16
16
|
faceSwapMode?: ("all-faces" | "individual-faces") | undefined;
|
|
17
17
|
/**
|
|
@@ -21,7 +21,7 @@ export type V1FaceSwapPhotoCreateBodyAssets = {
|
|
|
21
21
|
* - a direct URL to the video file
|
|
22
22
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
27
|
sourceFilePath?: string | undefined;
|
|
@@ -30,7 +30,7 @@ export type V1FaceSwapPhotoCreateBodyAssets = {
|
|
|
30
30
|
* - a direct URL to the video file
|
|
31
31
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
32
32
|
*
|
|
33
|
-
*
|
|
33
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
36
|
targetFilePath: string;
|
|
@@ -9,7 +9,7 @@ export type V1FaceSwapPhotoCreateBody = {
|
|
|
9
9
|
*/
|
|
10
10
|
assets: V1FaceSwapPhotoCreateBodyAssets;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Give your image a custom name for easy identification.
|
|
13
13
|
*/
|
|
14
14
|
name?: string | undefined;
|
|
15
15
|
};
|
|
@@ -14,7 +14,7 @@ export type V1FaceSwapPhotoCreateResponse = {
|
|
|
14
14
|
*/
|
|
15
15
|
frameCost: number;
|
|
16
16
|
/**
|
|
17
|
-
* Unique ID of the image.
|
|
17
|
+
* Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
|
|
18
18
|
*/
|
|
19
19
|
id: string;
|
|
20
20
|
};
|
|
@@ -10,7 +10,7 @@ export type V1ImageBackgroundRemoverCreateBodyAssets = {
|
|
|
10
10
|
* - a direct URL to the video file
|
|
11
11
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
backgroundImageFilePath?: string | undefined;
|
|
@@ -19,7 +19,7 @@ export type V1ImageBackgroundRemoverCreateBodyAssets = {
|
|
|
19
19
|
* - a direct URL to the video file
|
|
20
20
|
* - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
imageFilePath: string;
|
|
@@ -9,7 +9,7 @@ export type V1ImageBackgroundRemoverCreateBody = {
|
|
|
9
9
|
*/
|
|
10
10
|
assets: V1ImageBackgroundRemoverCreateBodyAssets;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Give your image a custom name for easy identification.
|
|
13
13
|
*/
|
|
14
14
|
name?: string | undefined;
|
|
15
15
|
};
|
|
@@ -14,7 +14,7 @@ export type V1ImageBackgroundRemoverCreateResponse = {
|
|
|
14
14
|
*/
|
|
15
15
|
frameCost: number;
|
|
16
16
|
/**
|
|
17
|
-
* Unique ID of the image.
|
|
17
|
+
* Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
|
|
18
18
|
*/
|
|
19
19
|
id: string;
|
|
20
20
|
};
|