magic-hour 0.39.0 → 0.41.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 +9 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-voice-generator/index.d.ts +2 -0
- package/dist/resources/v1/ai-voice-generator/index.js +5 -0
- package/dist/resources/v1/ai-voice-generator/request-types.d.ts +28 -0
- package/dist/resources/v1/ai-voice-generator/request-types.js +72 -0
- package/dist/resources/v1/ai-voice-generator/resource-client.d.ts +14 -0
- package/dist/resources/v1/ai-voice-generator/resource-client.js +30 -0
- package/dist/resources/v1/audio-projects/index.d.ts +2 -0
- package/dist/resources/v1/audio-projects/index.js +5 -0
- package/dist/resources/v1/audio-projects/request-types.d.ts +43 -0
- package/dist/resources/v1/audio-projects/request-types.js +96 -0
- package/dist/resources/v1/audio-projects/resource-client.d.ts +31 -0
- package/dist/resources/v1/audio-projects/resource-client.js +51 -0
- package/dist/resources/v1/index.d.ts +2 -0
- package/dist/resources/v1/index.js +3 -1
- package/dist/resources/v1/lip-sync/request-types.d.ts +6 -0
- package/dist/resources/v1/lip-sync/request-types.js +5 -0
- package/dist/resources/v1/resource-client.d.ts +6 -0
- package/dist/resources/v1/resource-client.js +12 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/v1-ai-talking-photo-create-body-style-generation-mode-enum.d.ts +5 -3
- package/dist/types/v1-ai-talking-photo-create-body-style.d.ts +6 -4
- package/dist/types/v1-ai-talking-photo-create-body-style.js +6 -2
- package/dist/types/v1-ai-voice-generator-create-body-style-voice-name-enum.d.ts +4 -0
- package/dist/types/v1-ai-voice-generator-create-body-style-voice-name-enum.js +2 -0
- package/dist/types/v1-ai-voice-generator-create-body-style.d.ts +27 -0
- package/dist/types/v1-ai-voice-generator-create-body-style.js +93 -0
- package/dist/types/v1-ai-voice-generator-create-body.d.ts +28 -0
- package/dist/types/v1-ai-voice-generator-create-body.js +72 -0
- package/dist/types/v1-ai-voice-generator-create-response.d.ts +29 -0
- package/dist/types/v1-ai-voice-generator-create-response.js +71 -0
- package/dist/types/v1-audio-projects-get-response-downloads-item.d.ts +21 -0
- package/dist/types/v1-audio-projects-get-response-downloads-item.js +71 -0
- package/dist/types/v1-audio-projects-get-response-error.d.ts +27 -0
- package/dist/types/v1-audio-projects-get-response-error.js +71 -0
- package/dist/types/v1-audio-projects-get-response-status-enum.d.ts +4 -0
- package/dist/types/v1-audio-projects-get-response-status-enum.js +2 -0
- package/dist/types/v1-audio-projects-get-response.d.ts +60 -0
- package/dist/types/v1-audio-projects-get-response.js +115 -0
- package/dist/types/v1-lip-sync-create-body-style-generation-mode-enum.d.ts +10 -0
- package/dist/types/v1-lip-sync-create-body-style-generation-mode-enum.js +2 -0
- package/dist/types/v1-lip-sync-create-body-style.d.ts +28 -0
- package/dist/types/v1-lip-sync-create-body-style.js +67 -0
- package/dist/types/v1-lip-sync-create-body.d.ts +6 -0
- package/dist/types/v1-lip-sync-create-body.js +5 -0
- package/dist/types/v1-video-to-video-create-body-style-art-style-enum.d.ts +1 -1
- package/dist/types/v1-video-to-video-create-body-style.d.ts +10 -10
- package/dist/types/v1-video-to-video-create-body-style.js +18 -18
- package/package.json +5 -4
|
@@ -5,11 +5,13 @@ import * as z from "zod";
|
|
|
5
5
|
export type V1AiTalkingPhotoCreateBodyStyle = {
|
|
6
6
|
/**
|
|
7
7
|
* Controls overall motion style.
|
|
8
|
-
* * `pro` -
|
|
9
|
-
* * `
|
|
8
|
+
* * `pro` - Higher fidelity, realistic detail, accurate lip sync, and faster generation.
|
|
9
|
+
* * `standard` - More expressive motion, but lower visual fidelity.
|
|
10
|
+
*
|
|
11
|
+
* * `expressive` - More motion and facial expressiveness; may introduce visual artifacts. (Deprecated: passing this value will be treated as `standard`)
|
|
10
12
|
* * `stable` - Reduced motion for cleaner output; may result in minimal animation. (Deprecated: passing this value will be treated as `pro`)
|
|
11
13
|
*/
|
|
12
|
-
generationMode?: ("expressive" | "pro" | "stable") | undefined;
|
|
14
|
+
generationMode?: ("expressive" | "pro" | "stable" | "standard") | undefined;
|
|
13
15
|
/**
|
|
14
16
|
* Note: this value is only applicable when generation_mode is `expressive`. The value can include up to 2 decimal places.
|
|
15
17
|
* * Lower values yield more stability but can suppress mouth movement.
|
|
@@ -23,7 +25,7 @@ export type V1AiTalkingPhotoCreateBodyStyle = {
|
|
|
23
25
|
* we expect to come in as network data
|
|
24
26
|
*/
|
|
25
27
|
export type External$V1AiTalkingPhotoCreateBodyStyle = {
|
|
26
|
-
generation_mode?: ("expressive" | "pro" | "stable") | undefined;
|
|
28
|
+
generation_mode?: ("expressive" | "pro" | "stable" | "standard") | undefined;
|
|
27
29
|
intensity?: number | undefined;
|
|
28
30
|
};
|
|
29
31
|
export declare const Schemas$V1AiTalkingPhotoCreateBodyStyle: {
|
|
@@ -41,7 +41,9 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
*/
|
|
42
42
|
const SchemaIn$V1AiTalkingPhotoCreateBodyStyle = z
|
|
43
43
|
.object({
|
|
44
|
-
generation_mode: z
|
|
44
|
+
generation_mode: z
|
|
45
|
+
.enum(["expressive", "pro", "stable", "standard"])
|
|
46
|
+
.optional(),
|
|
45
47
|
intensity: z.number().optional(),
|
|
46
48
|
})
|
|
47
49
|
.transform((obj) => {
|
|
@@ -56,7 +58,9 @@ const SchemaIn$V1AiTalkingPhotoCreateBodyStyle = z
|
|
|
56
58
|
*/
|
|
57
59
|
const SchemaOut$V1AiTalkingPhotoCreateBodyStyle = z
|
|
58
60
|
.object({
|
|
59
|
-
generationMode: z
|
|
61
|
+
generationMode: z
|
|
62
|
+
.enum(["expressive", "pro", "stable", "standard"])
|
|
63
|
+
.optional(),
|
|
60
64
|
intensity: z.number().optional(),
|
|
61
65
|
})
|
|
62
66
|
.transform((obj) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The voice to use for the speech. Available voices: Elon Musk, Mark Zuckerberg, Joe Rogan, Barack Obama, Morgan Freeman, Kanye West, Donald Trump, Joe Biden, Kim Kardashian, Taylor Swift
|
|
3
|
+
*/
|
|
4
|
+
export type V1AiVoiceGeneratorCreateBodyStyleVoiceNameEnum = "Barack Obama" | "Donald Trump" | "Elon Musk" | "Joe Biden" | "Joe Rogan" | "Kanye West" | "Kim Kardashian" | "Mark Zuckerberg" | "Morgan Freeman" | "Taylor Swift";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The content used to generate speech.
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiVoiceGeneratorCreateBodyStyle = {
|
|
6
|
+
/**
|
|
7
|
+
* Text used to generate speech. Starter tier users can use up to 200 characters, while Creator, Pro, or Business users can use up to 1000.
|
|
8
|
+
*/
|
|
9
|
+
prompt: string;
|
|
10
|
+
/**
|
|
11
|
+
* The voice to use for the speech. Available voices: Elon Musk, Mark Zuckerberg, Joe Rogan, Barack Obama, Morgan Freeman, Kanye West, Donald Trump, Joe Biden, Kim Kardashian, Taylor Swift
|
|
12
|
+
*/
|
|
13
|
+
voiceName: "Barack Obama" | "Donald Trump" | "Elon Musk" | "Joe Biden" | "Joe Rogan" | "Kanye West" | "Kim Kardashian" | "Mark Zuckerberg" | "Morgan Freeman" | "Taylor Swift";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* V1AiVoiceGeneratorCreateBodyStyle without any key transformation, this is what
|
|
18
|
+
* we expect to come in as network data
|
|
19
|
+
*/
|
|
20
|
+
export type External$V1AiVoiceGeneratorCreateBodyStyle = {
|
|
21
|
+
prompt: string;
|
|
22
|
+
voice_name: "Barack Obama" | "Donald Trump" | "Elon Musk" | "Joe Biden" | "Joe Rogan" | "Kanye West" | "Kim Kardashian" | "Mark Zuckerberg" | "Morgan Freeman" | "Taylor Swift";
|
|
23
|
+
};
|
|
24
|
+
export declare const Schemas$V1AiVoiceGeneratorCreateBodyStyle: {
|
|
25
|
+
in: z.ZodType<V1AiVoiceGeneratorCreateBodyStyle, z.ZodTypeDef, unknown>;
|
|
26
|
+
out: z.ZodType<External$V1AiVoiceGeneratorCreateBodyStyle, z.ZodTypeDef, V1AiVoiceGeneratorCreateBodyStyle>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
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$V1AiVoiceGeneratorCreateBodyStyle = 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 V1AiVoiceGeneratorCreateBodyStyle
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVoiceGeneratorCreateBodyStyle = z
|
|
43
|
+
.object({
|
|
44
|
+
prompt: z.string(),
|
|
45
|
+
voice_name: z.enum([
|
|
46
|
+
"Barack Obama",
|
|
47
|
+
"Donald Trump",
|
|
48
|
+
"Elon Musk",
|
|
49
|
+
"Joe Biden",
|
|
50
|
+
"Joe Rogan",
|
|
51
|
+
"Kanye West",
|
|
52
|
+
"Kim Kardashian",
|
|
53
|
+
"Mark Zuckerberg",
|
|
54
|
+
"Morgan Freeman",
|
|
55
|
+
"Taylor Swift",
|
|
56
|
+
]),
|
|
57
|
+
})
|
|
58
|
+
.transform((obj) => {
|
|
59
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
60
|
+
prompt: "prompt",
|
|
61
|
+
voice_name: "voiceName",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceGeneratorCreateBodyStyle
|
|
67
|
+
*/
|
|
68
|
+
const SchemaOut$V1AiVoiceGeneratorCreateBodyStyle = z
|
|
69
|
+
.object({
|
|
70
|
+
prompt: z.string(),
|
|
71
|
+
voiceName: z.enum([
|
|
72
|
+
"Barack Obama",
|
|
73
|
+
"Donald Trump",
|
|
74
|
+
"Elon Musk",
|
|
75
|
+
"Joe Biden",
|
|
76
|
+
"Joe Rogan",
|
|
77
|
+
"Kanye West",
|
|
78
|
+
"Kim Kardashian",
|
|
79
|
+
"Mark Zuckerberg",
|
|
80
|
+
"Morgan Freeman",
|
|
81
|
+
"Taylor Swift",
|
|
82
|
+
]),
|
|
83
|
+
})
|
|
84
|
+
.transform((obj) => {
|
|
85
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
86
|
+
prompt: "prompt",
|
|
87
|
+
voiceName: "voice_name",
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
exports.Schemas$V1AiVoiceGeneratorCreateBodyStyle = {
|
|
91
|
+
in: SchemaIn$V1AiVoiceGeneratorCreateBodyStyle,
|
|
92
|
+
out: SchemaOut$V1AiVoiceGeneratorCreateBodyStyle,
|
|
93
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { External$V1AiVoiceGeneratorCreateBodyStyle, V1AiVoiceGeneratorCreateBodyStyle } from "./v1-ai-voice-generator-create-body-style";
|
|
3
|
+
/**
|
|
4
|
+
* V1AiVoiceGeneratorCreateBody
|
|
5
|
+
*/
|
|
6
|
+
export type V1AiVoiceGeneratorCreateBody = {
|
|
7
|
+
/**
|
|
8
|
+
* The name of audio. This value is mainly used for your own identification of the audio.
|
|
9
|
+
*/
|
|
10
|
+
name?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The content used to generate speech.
|
|
13
|
+
*/
|
|
14
|
+
style: V1AiVoiceGeneratorCreateBodyStyle;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* V1AiVoiceGeneratorCreateBody without any key transformation, this is what
|
|
19
|
+
* we expect to come in as network data
|
|
20
|
+
*/
|
|
21
|
+
export type External$V1AiVoiceGeneratorCreateBody = {
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
style: External$V1AiVoiceGeneratorCreateBodyStyle;
|
|
24
|
+
};
|
|
25
|
+
export declare const Schemas$V1AiVoiceGeneratorCreateBody: {
|
|
26
|
+
in: z.ZodType<V1AiVoiceGeneratorCreateBody, z.ZodTypeDef, unknown>;
|
|
27
|
+
out: z.ZodType<External$V1AiVoiceGeneratorCreateBody, z.ZodTypeDef, V1AiVoiceGeneratorCreateBody>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
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$V1AiVoiceGeneratorCreateBody = 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_generator_create_body_style_1 = require("./v1-ai-voice-generator-create-body-style");
|
|
40
|
+
/**
|
|
41
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVoiceGeneratorCreateBody
|
|
42
|
+
*/
|
|
43
|
+
const SchemaIn$V1AiVoiceGeneratorCreateBody = z
|
|
44
|
+
.object({
|
|
45
|
+
name: z.string().optional(),
|
|
46
|
+
style: v1_ai_voice_generator_create_body_style_1.Schemas$V1AiVoiceGeneratorCreateBodyStyle.in,
|
|
47
|
+
})
|
|
48
|
+
.transform((obj) => {
|
|
49
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
50
|
+
name: "name",
|
|
51
|
+
style: "style",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceGeneratorCreateBody
|
|
57
|
+
*/
|
|
58
|
+
const SchemaOut$V1AiVoiceGeneratorCreateBody = z
|
|
59
|
+
.object({
|
|
60
|
+
name: z.string().optional(),
|
|
61
|
+
style: v1_ai_voice_generator_create_body_style_1.Schemas$V1AiVoiceGeneratorCreateBodyStyle.out,
|
|
62
|
+
})
|
|
63
|
+
.transform((obj) => {
|
|
64
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
65
|
+
name: "name",
|
|
66
|
+
style: "style",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
exports.Schemas$V1AiVoiceGeneratorCreateBody = {
|
|
70
|
+
in: SchemaIn$V1AiVoiceGeneratorCreateBody,
|
|
71
|
+
out: SchemaOut$V1AiVoiceGeneratorCreateBody,
|
|
72
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Success
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiVoiceGeneratorCreateResponse = {
|
|
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. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
* V1AiVoiceGeneratorCreateResponse without any key transformation, this is what
|
|
20
|
+
* we expect to come in as network data
|
|
21
|
+
*/
|
|
22
|
+
export type External$V1AiVoiceGeneratorCreateResponse = {
|
|
23
|
+
credits_charged: number;
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const Schemas$V1AiVoiceGeneratorCreateResponse: {
|
|
27
|
+
in: z.ZodType<V1AiVoiceGeneratorCreateResponse, z.ZodTypeDef, unknown>;
|
|
28
|
+
out: z.ZodType<External$V1AiVoiceGeneratorCreateResponse, z.ZodTypeDef, V1AiVoiceGeneratorCreateResponse>;
|
|
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$V1AiVoiceGeneratorCreateResponse = 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 V1AiVoiceGeneratorCreateResponse
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVoiceGeneratorCreateResponse = 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$V1AiVoiceGeneratorCreateResponse
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1AiVoiceGeneratorCreateResponse = 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$V1AiVoiceGeneratorCreateResponse = {
|
|
69
|
+
in: SchemaIn$V1AiVoiceGeneratorCreateResponse,
|
|
70
|
+
out: SchemaOut$V1AiVoiceGeneratorCreateResponse,
|
|
71
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The download url and expiration date of the audio project
|
|
4
|
+
*/
|
|
5
|
+
export type V1AudioProjectsGetResponseDownloadsItem = {
|
|
6
|
+
expiresAt: string;
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* V1AudioProjectsGetResponseDownloadsItem without any key transformation, this is what
|
|
12
|
+
* we expect to come in as network data
|
|
13
|
+
*/
|
|
14
|
+
export type External$V1AudioProjectsGetResponseDownloadsItem = {
|
|
15
|
+
expires_at: string;
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const Schemas$V1AudioProjectsGetResponseDownloadsItem: {
|
|
19
|
+
in: z.ZodType<V1AudioProjectsGetResponseDownloadsItem, z.ZodTypeDef, unknown>;
|
|
20
|
+
out: z.ZodType<External$V1AudioProjectsGetResponseDownloadsItem, z.ZodTypeDef, V1AudioProjectsGetResponseDownloadsItem>;
|
|
21
|
+
};
|
|
@@ -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$V1AudioProjectsGetResponseDownloadsItem = 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 V1AudioProjectsGetResponseDownloadsItem
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AudioProjectsGetResponseDownloadsItem = z
|
|
43
|
+
.object({
|
|
44
|
+
expires_at: z.string(),
|
|
45
|
+
url: z.string(),
|
|
46
|
+
})
|
|
47
|
+
.transform((obj) => {
|
|
48
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
|
+
expires_at: "expiresAt",
|
|
50
|
+
url: "url",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AudioProjectsGetResponseDownloadsItem
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1AudioProjectsGetResponseDownloadsItem = z
|
|
58
|
+
.object({
|
|
59
|
+
expiresAt: z.string(),
|
|
60
|
+
url: z.string(),
|
|
61
|
+
})
|
|
62
|
+
.transform((obj) => {
|
|
63
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
|
+
expiresAt: "expires_at",
|
|
65
|
+
url: "url",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
exports.Schemas$V1AudioProjectsGetResponseDownloadsItem = {
|
|
69
|
+
in: SchemaIn$V1AudioProjectsGetResponseDownloadsItem,
|
|
70
|
+
out: SchemaOut$V1AudioProjectsGetResponseDownloadsItem,
|
|
71
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* In the case of an error, this object will contain the error encountered during video render
|
|
4
|
+
*/
|
|
5
|
+
export type V1AudioProjectsGetResponseError = {
|
|
6
|
+
/**
|
|
7
|
+
* An error code to indicate why a failure happened.
|
|
8
|
+
*/
|
|
9
|
+
code: string;
|
|
10
|
+
/**
|
|
11
|
+
* Details on the reason why a failure happened.
|
|
12
|
+
*/
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* V1AudioProjectsGetResponseError without any key transformation, this is what
|
|
18
|
+
* we expect to come in as network data
|
|
19
|
+
*/
|
|
20
|
+
export type External$V1AudioProjectsGetResponseError = {
|
|
21
|
+
code: string;
|
|
22
|
+
message: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const Schemas$V1AudioProjectsGetResponseError: {
|
|
25
|
+
in: z.ZodType<V1AudioProjectsGetResponseError, z.ZodTypeDef, unknown>;
|
|
26
|
+
out: z.ZodType<External$V1AudioProjectsGetResponseError, z.ZodTypeDef, V1AudioProjectsGetResponseError>;
|
|
27
|
+
};
|
|
@@ -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$V1AudioProjectsGetResponseError = 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 V1AudioProjectsGetResponseError
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AudioProjectsGetResponseError = z
|
|
43
|
+
.object({
|
|
44
|
+
code: z.string(),
|
|
45
|
+
message: z.string(),
|
|
46
|
+
})
|
|
47
|
+
.transform((obj) => {
|
|
48
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
|
+
code: "code",
|
|
50
|
+
message: "message",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AudioProjectsGetResponseError
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1AudioProjectsGetResponseError = z
|
|
58
|
+
.object({
|
|
59
|
+
code: z.string(),
|
|
60
|
+
message: z.string(),
|
|
61
|
+
})
|
|
62
|
+
.transform((obj) => {
|
|
63
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
|
+
code: "code",
|
|
65
|
+
message: "message",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
exports.Schemas$V1AudioProjectsGetResponseError = {
|
|
69
|
+
in: SchemaIn$V1AudioProjectsGetResponseError,
|
|
70
|
+
out: SchemaOut$V1AudioProjectsGetResponseError,
|
|
71
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { External$V1AudioProjectsGetResponseDownloadsItem, V1AudioProjectsGetResponseDownloadsItem } from "./v1-audio-projects-get-response-downloads-item";
|
|
3
|
+
import { External$V1AudioProjectsGetResponseError, V1AudioProjectsGetResponseError } from "./v1-audio-projects-get-response-error";
|
|
4
|
+
/**
|
|
5
|
+
* Success
|
|
6
|
+
*/
|
|
7
|
+
export type V1AudioProjectsGetResponse = {
|
|
8
|
+
createdAt: string;
|
|
9
|
+
/**
|
|
10
|
+
* The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
|
|
11
|
+
*
|
|
12
|
+
* If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
|
|
13
|
+
*/
|
|
14
|
+
creditsCharged: number;
|
|
15
|
+
downloads: V1AudioProjectsGetResponseDownloadsItem[];
|
|
16
|
+
/**
|
|
17
|
+
* Indicates whether the resource is deleted
|
|
18
|
+
*/
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* In the case of an error, this object will contain the error encountered during video render
|
|
22
|
+
*/
|
|
23
|
+
error: V1AudioProjectsGetResponseError | null;
|
|
24
|
+
/**
|
|
25
|
+
* Unique ID of the audio. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The name of the audio.
|
|
30
|
+
*/
|
|
31
|
+
name: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* The status of the audio.
|
|
34
|
+
*/
|
|
35
|
+
status: "canceled" | "complete" | "draft" | "error" | "queued" | "rendering";
|
|
36
|
+
/**
|
|
37
|
+
* The type of the audio project. Possible values are VOICE_GENERATOR, VOICE_CHANGER
|
|
38
|
+
*/
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* V1AudioProjectsGetResponse without any key transformation, this is what
|
|
44
|
+
* we expect to come in as network data
|
|
45
|
+
*/
|
|
46
|
+
export type External$V1AudioProjectsGetResponse = {
|
|
47
|
+
created_at: string;
|
|
48
|
+
credits_charged: number;
|
|
49
|
+
downloads: External$V1AudioProjectsGetResponseDownloadsItem[];
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
error: External$V1AudioProjectsGetResponseError | null;
|
|
52
|
+
id: string;
|
|
53
|
+
name: string | null;
|
|
54
|
+
status: "canceled" | "complete" | "draft" | "error" | "queued" | "rendering";
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
export declare const Schemas$V1AudioProjectsGetResponse: {
|
|
58
|
+
in: z.ZodType<V1AudioProjectsGetResponse, z.ZodTypeDef, unknown>;
|
|
59
|
+
out: z.ZodType<External$V1AudioProjectsGetResponse, z.ZodTypeDef, V1AudioProjectsGetResponse>;
|
|
60
|
+
};
|