magic-hour 0.26.1 → 0.27.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 +4 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/auto-subtitle-generator/index.d.ts +2 -0
- package/dist/resources/v1/auto-subtitle-generator/index.js +5 -0
- package/dist/resources/v1/auto-subtitle-generator/request-types.d.ts +54 -0
- package/dist/resources/v1/auto-subtitle-generator/request-types.js +85 -0
- package/dist/resources/v1/auto-subtitle-generator/resource-client.d.ts +14 -0
- package/dist/resources/v1/auto-subtitle-generator/resource-client.js +30 -0
- package/dist/resources/v1/index.d.ts +1 -0
- package/dist/resources/v1/index.js +2 -1
- package/dist/resources/v1/resource-client.d.ts +3 -0
- package/dist/resources/v1/resource-client.js +6 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-assets.d.ts +22 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-assets.js +67 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-style-custom-config.d.ts +63 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-style-custom-config.js +99 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-style-template-enum.d.ts +4 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-style-template-enum.js +2 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-style.d.ts +38 -0
- package/dist/types/v1-auto-subtitle-generator-create-body-style.js +76 -0
- package/dist/types/v1-auto-subtitle-generator-create-body.d.ts +54 -0
- package/dist/types/v1-auto-subtitle-generator-create-body.js +85 -0
- package/dist/types/v1-auto-subtitle-generator-create-response.d.ts +36 -0
- package/dist/types/v1-auto-subtitle-generator-create-response.js +75 -0
- package/dist/types/v1-auto-subtitle-generator-create-response400.d.ts +19 -0
- package/dist/types/v1-auto-subtitle-generator-create-response400.js +67 -0
- package/dist/types/v1-auto-subtitle-generator-create-response401-message-enum.d.ts +4 -0
- package/dist/types/v1-auto-subtitle-generator-create-response401-message-enum.js +2 -0
- package/dist/types/v1-auto-subtitle-generator-create-response401.d.ts +19 -0
- package/dist/types/v1-auto-subtitle-generator-create-response401.js +67 -0
- package/dist/types/v1-auto-subtitle-generator-create-response404-message-enum.d.ts +4 -0
- package/dist/types/v1-auto-subtitle-generator-create-response404-message-enum.js +2 -0
- package/dist/types/v1-auto-subtitle-generator-create-response404.d.ts +19 -0
- package/dist/types/v1-auto-subtitle-generator-create-response404.js +67 -0
- package/dist/types/v1-auto-subtitle-generator-create-response422.d.ts +19 -0
- package/dist/types/v1-auto-subtitle-generator-create-response422.js +67 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,10 @@ const client = new Client({
|
|
|
80
80
|
|
|
81
81
|
* [create](src/resources/v1/animation/README.md#create) - Animation
|
|
82
82
|
|
|
83
|
+
### [v1.autoSubtitleGenerator](src/resources/v1/auto-subtitle-generator/README.md)
|
|
84
|
+
|
|
85
|
+
* [create](src/resources/v1/auto-subtitle-generator/README.md#create) - Auto Subtitle Generator
|
|
86
|
+
|
|
83
87
|
### [v1.faceSwap](src/resources/v1/face-swap/README.md)
|
|
84
88
|
|
|
85
89
|
* [create](src/resources/v1/face-swap/README.md#create) - Face Swap video
|
package/dist/environment.d.ts
CHANGED
package/dist/environment.js
CHANGED
|
@@ -4,5 +4,5 @@ exports.Environment = void 0;
|
|
|
4
4
|
var Environment;
|
|
5
5
|
(function (Environment) {
|
|
6
6
|
Environment["Environment"] = "https://api.magichour.ai";
|
|
7
|
-
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.
|
|
7
|
+
Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.27.0";
|
|
8
8
|
})(Environment || (exports.Environment = Environment = {}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoSubtitleGeneratorClient = void 0;
|
|
4
|
+
var resource_client_1 = require("./resource-client");
|
|
5
|
+
Object.defineProperty(exports, "AutoSubtitleGeneratorClient", { enumerable: true, get: function () { return resource_client_1.AutoSubtitleGeneratorClient; } });
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { External$V1AutoSubtitleGeneratorCreateBodyAssets, V1AutoSubtitleGeneratorCreateBodyAssets } from "../../../types/v1-auto-subtitle-generator-create-body-assets";
|
|
2
|
+
import { External$V1AutoSubtitleGeneratorCreateBodyStyle, V1AutoSubtitleGeneratorCreateBodyStyle } from "../../../types/v1-auto-subtitle-generator-create-body-style";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
/**
|
|
5
|
+
* CreateRequest
|
|
6
|
+
*/
|
|
7
|
+
export type CreateRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Provide the assets for auto subtitle generator
|
|
10
|
+
*/
|
|
11
|
+
assets: V1AutoSubtitleGeneratorCreateBodyAssets;
|
|
12
|
+
/**
|
|
13
|
+
* The end time of the input video in seconds
|
|
14
|
+
*/
|
|
15
|
+
endSeconds: number;
|
|
16
|
+
/**
|
|
17
|
+
* The name of video
|
|
18
|
+
*/
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The start time of the input video in seconds
|
|
22
|
+
*/
|
|
23
|
+
startSeconds: number;
|
|
24
|
+
/**
|
|
25
|
+
* Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
26
|
+
* * If only `.style.template` is provided, default values for the template will be used.
|
|
27
|
+
* * If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
28
|
+
* * If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
29
|
+
*
|
|
30
|
+
* To use custom config only, the following `custom_config` params are required:
|
|
31
|
+
* * `.style.custom_config.font`
|
|
32
|
+
* * `.style.custom_config.text_color`
|
|
33
|
+
* * `.style.custom_config.vertical_position`
|
|
34
|
+
* * `.style.custom_config.horizontal_position`
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
style: V1AutoSubtitleGeneratorCreateBodyStyle;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* CreateRequest without any key transformation, this is what
|
|
42
|
+
* we expect to come in as network data
|
|
43
|
+
*/
|
|
44
|
+
export type External$CreateRequest = {
|
|
45
|
+
assets: External$V1AutoSubtitleGeneratorCreateBodyAssets;
|
|
46
|
+
end_seconds: number;
|
|
47
|
+
name?: string | undefined;
|
|
48
|
+
start_seconds: number;
|
|
49
|
+
style: External$V1AutoSubtitleGeneratorCreateBodyStyle;
|
|
50
|
+
};
|
|
51
|
+
export declare const Schemas$CreateRequest: {
|
|
52
|
+
in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
|
|
53
|
+
out: z.ZodType<External$CreateRequest, z.ZodTypeDef, CreateRequest>;
|
|
54
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
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$CreateRequest = void 0;
|
|
37
|
+
const core_1 = require("../../../core");
|
|
38
|
+
const v1_auto_subtitle_generator_create_body_assets_1 = require("../../../types/v1-auto-subtitle-generator-create-body-assets");
|
|
39
|
+
const v1_auto_subtitle_generator_create_body_style_1 = require("../../../types/v1-auto-subtitle-generator-create-body-style");
|
|
40
|
+
const z = __importStar(require("zod"));
|
|
41
|
+
/**
|
|
42
|
+
* Takes network data, validates it, and transforms keys to match typescript object CreateRequest
|
|
43
|
+
*/
|
|
44
|
+
const SchemaIn$CreateRequest = z
|
|
45
|
+
.object({
|
|
46
|
+
assets: v1_auto_subtitle_generator_create_body_assets_1.Schemas$V1AutoSubtitleGeneratorCreateBodyAssets.in,
|
|
47
|
+
end_seconds: z.number(),
|
|
48
|
+
name: z.string().optional(),
|
|
49
|
+
start_seconds: z.number(),
|
|
50
|
+
style: v1_auto_subtitle_generator_create_body_style_1.Schemas$V1AutoSubtitleGeneratorCreateBodyStyle.in,
|
|
51
|
+
})
|
|
52
|
+
.transform((obj) => {
|
|
53
|
+
return (0, core_1.zodTransform)(obj, {
|
|
54
|
+
assets: "assets",
|
|
55
|
+
end_seconds: "endSeconds",
|
|
56
|
+
name: "name",
|
|
57
|
+
start_seconds: "startSeconds",
|
|
58
|
+
style: "style",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$CreateRequest
|
|
64
|
+
*/
|
|
65
|
+
const SchemaOut$CreateRequest = z
|
|
66
|
+
.object({
|
|
67
|
+
assets: v1_auto_subtitle_generator_create_body_assets_1.Schemas$V1AutoSubtitleGeneratorCreateBodyAssets.out,
|
|
68
|
+
endSeconds: z.number(),
|
|
69
|
+
name: z.string().optional(),
|
|
70
|
+
startSeconds: z.number(),
|
|
71
|
+
style: v1_auto_subtitle_generator_create_body_style_1.Schemas$V1AutoSubtitleGeneratorCreateBodyStyle.out,
|
|
72
|
+
})
|
|
73
|
+
.transform((obj) => {
|
|
74
|
+
return (0, core_1.zodTransform)(obj, {
|
|
75
|
+
assets: "assets",
|
|
76
|
+
endSeconds: "end_seconds",
|
|
77
|
+
name: "name",
|
|
78
|
+
startSeconds: "start_seconds",
|
|
79
|
+
style: "style",
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
exports.Schemas$CreateRequest = {
|
|
83
|
+
in: SchemaIn$CreateRequest,
|
|
84
|
+
out: SchemaOut$CreateRequest,
|
|
85
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { types } from "../../../index.js";
|
|
2
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
|
|
3
|
+
import * as requests from "../../../resources/v1/auto-subtitle-generator/request-types";
|
|
4
|
+
export declare class AutoSubtitleGeneratorClient extends CoreResourceClient {
|
|
5
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* Auto Subtitle Generator
|
|
8
|
+
*
|
|
9
|
+
* Automatically generate subtitles for your video in multiple languages.
|
|
10
|
+
*
|
|
11
|
+
* POST /v1/auto-subtitle-generator
|
|
12
|
+
*/
|
|
13
|
+
create(request: requests.CreateRequest, opts?: RequestOptions): ApiPromise<types.V1AutoSubtitleGeneratorCreateResponse>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoSubtitleGeneratorClient = void 0;
|
|
4
|
+
const core_1 = require("../../../core");
|
|
5
|
+
const v1_auto_subtitle_generator_create_body_1 = require("../../../types/v1-auto-subtitle-generator-create-body");
|
|
6
|
+
const v1_auto_subtitle_generator_create_response_1 = require("../../../types/v1-auto-subtitle-generator-create-response");
|
|
7
|
+
class AutoSubtitleGeneratorClient extends core_1.CoreResourceClient {
|
|
8
|
+
constructor(coreClient, opts) {
|
|
9
|
+
super(coreClient, opts);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Auto Subtitle Generator
|
|
13
|
+
*
|
|
14
|
+
* Automatically generate subtitles for your video in multiple languages.
|
|
15
|
+
*
|
|
16
|
+
* POST /v1/auto-subtitle-generator
|
|
17
|
+
*/
|
|
18
|
+
create(request, opts) {
|
|
19
|
+
return this._client.makeRequest({
|
|
20
|
+
method: "post",
|
|
21
|
+
path: "/v1/auto-subtitle-generator",
|
|
22
|
+
auth: ["bearerAuth"],
|
|
23
|
+
contentType: "application/json",
|
|
24
|
+
body: v1_auto_subtitle_generator_create_body_1.Schemas$V1AutoSubtitleGeneratorCreateBody.out.parse(request),
|
|
25
|
+
responseSchema: v1_auto_subtitle_generator_create_response_1.Schemas$V1AutoSubtitleGeneratorCreateResponse.in,
|
|
26
|
+
opts,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.AutoSubtitleGeneratorClient = AutoSubtitleGeneratorClient;
|
|
@@ -10,6 +10,7 @@ export * as aiPhotoEditor from "./ai-photo-editor";
|
|
|
10
10
|
export * as aiQrCodeGenerator from "./ai-qr-code-generator";
|
|
11
11
|
export * as aiTalkingPhoto from "./ai-talking-photo";
|
|
12
12
|
export * as animation from "./animation";
|
|
13
|
+
export * as autoSubtitleGenerator from "./auto-subtitle-generator";
|
|
13
14
|
export * as faceSwap from "./face-swap";
|
|
14
15
|
export * as faceSwapPhoto from "./face-swap-photo";
|
|
15
16
|
export * as files from "./files";
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.animation = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiPhotoEditor = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = void 0;
|
|
36
|
+
exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.autoSubtitleGenerator = exports.animation = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiPhotoEditor = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = void 0;
|
|
37
37
|
exports.aiClothesChanger = __importStar(require("./ai-clothes-changer"));
|
|
38
38
|
exports.aiFaceEditor = __importStar(require("./ai-face-editor"));
|
|
39
39
|
exports.aiGifGenerator = __importStar(require("./ai-gif-generator"));
|
|
@@ -46,6 +46,7 @@ exports.aiPhotoEditor = __importStar(require("./ai-photo-editor"));
|
|
|
46
46
|
exports.aiQrCodeGenerator = __importStar(require("./ai-qr-code-generator"));
|
|
47
47
|
exports.aiTalkingPhoto = __importStar(require("./ai-talking-photo"));
|
|
48
48
|
exports.animation = __importStar(require("./animation"));
|
|
49
|
+
exports.autoSubtitleGenerator = __importStar(require("./auto-subtitle-generator"));
|
|
49
50
|
exports.faceSwap = __importStar(require("./face-swap"));
|
|
50
51
|
exports.faceSwapPhoto = __importStar(require("./face-swap-photo"));
|
|
51
52
|
exports.files = __importStar(require("./files"));
|
|
@@ -11,6 +11,7 @@ import { AiPhotoEditorClient } from "../../resources/v1/ai-photo-editor";
|
|
|
11
11
|
import { AiQrCodeGeneratorClient } from "../../resources/v1/ai-qr-code-generator";
|
|
12
12
|
import { AiTalkingPhotoClient } from "../../resources/v1/ai-talking-photo";
|
|
13
13
|
import { AnimationClient } from "../../resources/v1/animation";
|
|
14
|
+
import { AutoSubtitleGeneratorClient } from "../../resources/v1/auto-subtitle-generator";
|
|
14
15
|
import { FaceSwapClient } from "../../resources/v1/face-swap";
|
|
15
16
|
import { FaceSwapPhotoClient } from "../../resources/v1/face-swap-photo";
|
|
16
17
|
import { FilesClient } from "../../resources/v1/files";
|
|
@@ -37,6 +38,7 @@ export declare class V1Client extends CoreResourceClient {
|
|
|
37
38
|
private _aiQrCodeGeneratorLazy?;
|
|
38
39
|
private _aiTalkingPhotoLazy?;
|
|
39
40
|
private _animationLazy?;
|
|
41
|
+
private _autoSubtitleGeneratorLazy?;
|
|
40
42
|
private _faceSwapLazy?;
|
|
41
43
|
private _faceSwapPhotoLazy?;
|
|
42
44
|
private _filesLazy?;
|
|
@@ -61,6 +63,7 @@ export declare class V1Client extends CoreResourceClient {
|
|
|
61
63
|
get aiQrCodeGenerator(): AiQrCodeGeneratorClient;
|
|
62
64
|
get aiTalkingPhoto(): AiTalkingPhotoClient;
|
|
63
65
|
get animation(): AnimationClient;
|
|
66
|
+
get autoSubtitleGenerator(): AutoSubtitleGeneratorClient;
|
|
64
67
|
get faceSwap(): FaceSwapClient;
|
|
65
68
|
get faceSwapPhoto(): FaceSwapPhotoClient;
|
|
66
69
|
get files(): FilesClient;
|
|
@@ -20,6 +20,7 @@ class V1Client extends core_1.CoreResourceClient {
|
|
|
20
20
|
this.aiQrCodeGenerator;
|
|
21
21
|
this.aiTalkingPhoto;
|
|
22
22
|
this.animation;
|
|
23
|
+
this.autoSubtitleGenerator;
|
|
23
24
|
this.faceSwap;
|
|
24
25
|
this.faceSwapPhoto;
|
|
25
26
|
this.files;
|
|
@@ -100,6 +101,11 @@ class V1Client extends core_1.CoreResourceClient {
|
|
|
100
101
|
var _a;
|
|
101
102
|
return ((_a = this._animationLazy) !== null && _a !== void 0 ? _a : (this._animationLazy = new (require("./animation").AnimationClient)(this._client, this._opts)));
|
|
102
103
|
}
|
|
104
|
+
get autoSubtitleGenerator() {
|
|
105
|
+
var _a;
|
|
106
|
+
return ((_a = this._autoSubtitleGeneratorLazy) !== null && _a !== void 0 ? _a : (this._autoSubtitleGeneratorLazy =
|
|
107
|
+
new (require("./auto-subtitle-generator").AutoSubtitleGeneratorClient)(this._client, this._opts)));
|
|
108
|
+
}
|
|
103
109
|
get faceSwap() {
|
|
104
110
|
var _a;
|
|
105
111
|
return ((_a = this._faceSwapLazy) !== null && _a !== void 0 ? _a : (this._faceSwapLazy = new (require("./face-swap").FaceSwapClient)(this._client, this._opts)));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -123,6 +123,18 @@ export { V1AnimationCreateResponse401MessageEnum } from "./v1-animation-create-r
|
|
|
123
123
|
export { V1AnimationCreateResponse404 } from "./v1-animation-create-response404";
|
|
124
124
|
export { V1AnimationCreateResponse404MessageEnum } from "./v1-animation-create-response404-message-enum";
|
|
125
125
|
export { V1AnimationCreateResponse422 } from "./v1-animation-create-response422";
|
|
126
|
+
export { V1AutoSubtitleGeneratorCreateBody } from "./v1-auto-subtitle-generator-create-body";
|
|
127
|
+
export { V1AutoSubtitleGeneratorCreateBodyAssets } from "./v1-auto-subtitle-generator-create-body-assets";
|
|
128
|
+
export { V1AutoSubtitleGeneratorCreateBodyStyle } from "./v1-auto-subtitle-generator-create-body-style";
|
|
129
|
+
export { V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig } from "./v1-auto-subtitle-generator-create-body-style-custom-config";
|
|
130
|
+
export { V1AutoSubtitleGeneratorCreateBodyStyleTemplateEnum } from "./v1-auto-subtitle-generator-create-body-style-template-enum";
|
|
131
|
+
export { V1AutoSubtitleGeneratorCreateResponse } from "./v1-auto-subtitle-generator-create-response";
|
|
132
|
+
export { V1AutoSubtitleGeneratorCreateResponse400 } from "./v1-auto-subtitle-generator-create-response400";
|
|
133
|
+
export { V1AutoSubtitleGeneratorCreateResponse401 } from "./v1-auto-subtitle-generator-create-response401";
|
|
134
|
+
export { V1AutoSubtitleGeneratorCreateResponse401MessageEnum } from "./v1-auto-subtitle-generator-create-response401-message-enum";
|
|
135
|
+
export { V1AutoSubtitleGeneratorCreateResponse404 } from "./v1-auto-subtitle-generator-create-response404";
|
|
136
|
+
export { V1AutoSubtitleGeneratorCreateResponse404MessageEnum } from "./v1-auto-subtitle-generator-create-response404-message-enum";
|
|
137
|
+
export { V1AutoSubtitleGeneratorCreateResponse422 } from "./v1-auto-subtitle-generator-create-response422";
|
|
126
138
|
export { V1FaceSwapCreateBody } from "./v1-face-swap-create-body";
|
|
127
139
|
export { V1FaceSwapCreateBodyAssets } from "./v1-face-swap-create-body-assets";
|
|
128
140
|
export { V1FaceSwapCreateBodyAssetsVideoSourceEnum } from "./v1-face-swap-create-body-assets-video-source-enum";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Provide the assets for auto subtitle generator
|
|
4
|
+
*/
|
|
5
|
+
export type V1AutoSubtitleGeneratorCreateBodyAssets = {
|
|
6
|
+
/**
|
|
7
|
+
* This is the video used to add subtitles. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
|
|
8
|
+
*/
|
|
9
|
+
videoFilePath: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
* V1AutoSubtitleGeneratorCreateBodyAssets without any key transformation, this is what
|
|
14
|
+
* we expect to come in as network data
|
|
15
|
+
*/
|
|
16
|
+
export type External$V1AutoSubtitleGeneratorCreateBodyAssets = {
|
|
17
|
+
video_file_path: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const Schemas$V1AutoSubtitleGeneratorCreateBodyAssets: {
|
|
20
|
+
in: z.ZodType<V1AutoSubtitleGeneratorCreateBodyAssets, z.ZodTypeDef, unknown>;
|
|
21
|
+
out: z.ZodType<External$V1AutoSubtitleGeneratorCreateBodyAssets, z.ZodTypeDef, V1AutoSubtitleGeneratorCreateBodyAssets>;
|
|
22
|
+
};
|
|
@@ -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$V1AutoSubtitleGeneratorCreateBodyAssets = void 0;
|
|
37
|
+
const core_1 = require("../core");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AutoSubtitleGeneratorCreateBodyAssets
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AutoSubtitleGeneratorCreateBodyAssets = z
|
|
43
|
+
.object({
|
|
44
|
+
video_file_path: z.string(),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, core_1.zodTransform)(obj, {
|
|
48
|
+
video_file_path: "videoFilePath",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AutoSubtitleGeneratorCreateBodyAssets
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AutoSubtitleGeneratorCreateBodyAssets = z
|
|
56
|
+
.object({
|
|
57
|
+
videoFilePath: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, core_1.zodTransform)(obj, {
|
|
61
|
+
videoFilePath: "video_file_path",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AutoSubtitleGeneratorCreateBodyAssets = {
|
|
65
|
+
in: SchemaIn$V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
66
|
+
out: SchemaOut$V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
67
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Custom subtitle configuration.
|
|
4
|
+
*/
|
|
5
|
+
export type V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Font name from Google Fonts. Not all fonts support all languages or character sets.
|
|
8
|
+
* We recommend verifying language support and appearance directly on https://fonts.google.com before use.
|
|
9
|
+
*/
|
|
10
|
+
font?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Font size in pixels. If not provided, the font size is automatically calculated based on the video resolution.
|
|
13
|
+
*/
|
|
14
|
+
fontSize?: number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Font style (e.g., normal, italic, bold)
|
|
17
|
+
*/
|
|
18
|
+
fontStyle?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Color used to highlight the current spoken text
|
|
21
|
+
*/
|
|
22
|
+
highlightedTextColor?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Horizontal alignment of the text (e.g., left, center, right)
|
|
25
|
+
*/
|
|
26
|
+
horizontalPosition?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Stroke (outline) color of the text
|
|
29
|
+
*/
|
|
30
|
+
strokeColor?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Width of the text stroke in pixels. If `stroke_color` is provided, but `stroke_width` is not, the `stroke_width` will be calculated automatically based on the font size.
|
|
33
|
+
*/
|
|
34
|
+
strokeWidth?: number | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Primary text color in hex format
|
|
37
|
+
*/
|
|
38
|
+
textColor?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Vertical alignment of the text (e.g., top, center, bottom)
|
|
41
|
+
*/
|
|
42
|
+
verticalPosition?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig without any key transformation, this is what
|
|
47
|
+
* we expect to come in as network data
|
|
48
|
+
*/
|
|
49
|
+
export type External$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig = {
|
|
50
|
+
font?: string | undefined;
|
|
51
|
+
font_size?: number | undefined;
|
|
52
|
+
font_style?: string | undefined;
|
|
53
|
+
highlighted_text_color?: string | undefined;
|
|
54
|
+
horizontal_position?: string | undefined;
|
|
55
|
+
stroke_color?: string | undefined;
|
|
56
|
+
stroke_width?: number | undefined;
|
|
57
|
+
text_color?: string | undefined;
|
|
58
|
+
vertical_position?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
export declare const Schemas$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig: {
|
|
61
|
+
in: z.ZodType<V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig, z.ZodTypeDef, unknown>;
|
|
62
|
+
out: z.ZodType<External$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig, z.ZodTypeDef, V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig>;
|
|
63
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
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$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig = void 0;
|
|
37
|
+
const core_1 = require("../core");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig = z
|
|
43
|
+
.object({
|
|
44
|
+
font: z.string().optional(),
|
|
45
|
+
font_size: z.number().optional(),
|
|
46
|
+
font_style: z.string().optional(),
|
|
47
|
+
highlighted_text_color: z.string().optional(),
|
|
48
|
+
horizontal_position: z.string().optional(),
|
|
49
|
+
stroke_color: z.string().optional(),
|
|
50
|
+
stroke_width: z.number().optional(),
|
|
51
|
+
text_color: z.string().optional(),
|
|
52
|
+
vertical_position: z.string().optional(),
|
|
53
|
+
})
|
|
54
|
+
.transform((obj) => {
|
|
55
|
+
return (0, core_1.zodTransform)(obj, {
|
|
56
|
+
font: "font",
|
|
57
|
+
font_size: "fontSize",
|
|
58
|
+
font_style: "fontStyle",
|
|
59
|
+
highlighted_text_color: "highlightedTextColor",
|
|
60
|
+
horizontal_position: "horizontalPosition",
|
|
61
|
+
stroke_color: "strokeColor",
|
|
62
|
+
stroke_width: "strokeWidth",
|
|
63
|
+
text_color: "textColor",
|
|
64
|
+
vertical_position: "verticalPosition",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig
|
|
70
|
+
*/
|
|
71
|
+
const SchemaOut$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig = z
|
|
72
|
+
.object({
|
|
73
|
+
font: z.string().optional(),
|
|
74
|
+
fontSize: z.number().optional(),
|
|
75
|
+
fontStyle: z.string().optional(),
|
|
76
|
+
highlightedTextColor: z.string().optional(),
|
|
77
|
+
horizontalPosition: z.string().optional(),
|
|
78
|
+
strokeColor: z.string().optional(),
|
|
79
|
+
strokeWidth: z.number().optional(),
|
|
80
|
+
textColor: z.string().optional(),
|
|
81
|
+
verticalPosition: z.string().optional(),
|
|
82
|
+
})
|
|
83
|
+
.transform((obj) => {
|
|
84
|
+
return (0, core_1.zodTransform)(obj, {
|
|
85
|
+
font: "font",
|
|
86
|
+
fontSize: "font_size",
|
|
87
|
+
fontStyle: "font_style",
|
|
88
|
+
highlightedTextColor: "highlighted_text_color",
|
|
89
|
+
horizontalPosition: "horizontal_position",
|
|
90
|
+
strokeColor: "stroke_color",
|
|
91
|
+
strokeWidth: "stroke_width",
|
|
92
|
+
textColor: "text_color",
|
|
93
|
+
verticalPosition: "vertical_position",
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
exports.Schemas$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig = {
|
|
97
|
+
in: SchemaIn$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
98
|
+
out: SchemaOut$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
99
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { External$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig, V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig } from "./v1-auto-subtitle-generator-create-body-style-custom-config";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
5
|
+
* * If only `.style.template` is provided, default values for the template will be used.
|
|
6
|
+
* * If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
7
|
+
* * If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
8
|
+
*
|
|
9
|
+
* To use custom config only, the following `custom_config` params are required:
|
|
10
|
+
* * `.style.custom_config.font`
|
|
11
|
+
* * `.style.custom_config.text_color`
|
|
12
|
+
* * `.style.custom_config.vertical_position`
|
|
13
|
+
* * `.style.custom_config.horizontal_position`
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export type V1AutoSubtitleGeneratorCreateBodyStyle = {
|
|
17
|
+
/**
|
|
18
|
+
* Custom subtitle configuration.
|
|
19
|
+
*/
|
|
20
|
+
customConfig?: V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Preset subtitle templates. Please visit https://magichour.ai/create/auto-subtitle-generator to see the style of the existing templates.
|
|
23
|
+
*/
|
|
24
|
+
template?: ("cinematic" | "highlight" | "karaoke" | "minimalist") | undefined;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* V1AutoSubtitleGeneratorCreateBodyStyle without any key transformation, this is what
|
|
29
|
+
* we expect to come in as network data
|
|
30
|
+
*/
|
|
31
|
+
export type External$V1AutoSubtitleGeneratorCreateBodyStyle = {
|
|
32
|
+
custom_config?: External$V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig | undefined;
|
|
33
|
+
template?: ("cinematic" | "highlight" | "karaoke" | "minimalist") | undefined;
|
|
34
|
+
};
|
|
35
|
+
export declare const Schemas$V1AutoSubtitleGeneratorCreateBodyStyle: {
|
|
36
|
+
in: z.ZodType<V1AutoSubtitleGeneratorCreateBodyStyle, z.ZodTypeDef, unknown>;
|
|
37
|
+
out: z.ZodType<External$V1AutoSubtitleGeneratorCreateBodyStyle, z.ZodTypeDef, V1AutoSubtitleGeneratorCreateBodyStyle>;
|
|
38
|
+
};
|