magic-hour 0.19.0 → 0.20.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/dist/client.d.ts +6 -3
- package/dist/client.js +8 -2
- package/dist/core/core-client.d.ts +5 -1
- package/dist/core/core-client.js +2 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-clothes-changer/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-clothes-changer/resource-client.js +2 -2
- package/dist/resources/v1/ai-face-editor/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-face-editor/resource-client.js +2 -2
- package/dist/resources/v1/ai-gif-generator/resource-client.d.ts +3 -3
- package/dist/resources/v1/ai-gif-generator/resource-client.js +3 -3
- package/dist/resources/v1/ai-headshot-generator/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-headshot-generator/resource-client.js +2 -2
- package/dist/resources/v1/ai-image-generator/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-image-generator/resource-client.js +2 -2
- package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-image-upscaler/resource-client.js +2 -2
- package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-meme-generator/resource-client.js +2 -2
- package/dist/resources/v1/ai-photo-editor/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-photo-editor/resource-client.js +2 -2
- package/dist/resources/v1/ai-qr-code-generator/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-qr-code-generator/resource-client.js +2 -2
- package/dist/resources/v1/ai-talking-photo/resource-client.d.ts +2 -2
- package/dist/resources/v1/ai-talking-photo/resource-client.js +2 -2
- package/dist/resources/v1/animation/resource-client.d.ts +2 -2
- package/dist/resources/v1/animation/resource-client.js +2 -2
- package/dist/resources/v1/face-swap/resource-client.d.ts +2 -2
- package/dist/resources/v1/face-swap/resource-client.js +2 -2
- package/dist/resources/v1/face-swap-photo/resource-client.d.ts +2 -2
- package/dist/resources/v1/face-swap-photo/resource-client.js +2 -2
- package/dist/resources/v1/files/resource-client.d.ts +4 -3
- package/dist/resources/v1/files/resource-client.js +9 -4
- package/dist/resources/v1/files/upload-urls/resource-client.d.ts +2 -2
- package/dist/resources/v1/files/upload-urls/resource-client.js +2 -2
- package/dist/resources/v1/image-background-remover/resource-client.d.ts +2 -2
- package/dist/resources/v1/image-background-remover/resource-client.js +2 -2
- package/dist/resources/v1/image-projects/resource-client.d.ts +10 -10
- package/dist/resources/v1/image-projects/resource-client.js +18 -18
- package/dist/resources/v1/image-to-video/resource-client.d.ts +2 -2
- package/dist/resources/v1/image-to-video/resource-client.js +2 -2
- package/dist/resources/v1/lip-sync/resource-client.d.ts +2 -2
- package/dist/resources/v1/lip-sync/resource-client.js +2 -2
- package/dist/resources/v1/photo-colorizer/resource-client.d.ts +2 -2
- package/dist/resources/v1/photo-colorizer/resource-client.js +2 -2
- package/dist/resources/v1/resource-client.d.ts +46 -24
- package/dist/resources/v1/resource-client.js +132 -46
- package/dist/resources/v1/text-to-video/resource-client.d.ts +2 -2
- package/dist/resources/v1/text-to-video/resource-client.js +2 -2
- package/dist/resources/v1/video-projects/resource-client.d.ts +10 -10
- package/dist/resources/v1/video-projects/resource-client.js +18 -18
- package/dist/resources/v1/video-to-video/request-types.d.ts +20 -6
- package/dist/resources/v1/video-to-video/request-types.js +4 -4
- package/dist/resources/v1/video-to-video/resource-client.d.ts +2 -2
- package/dist/resources/v1/video-to-video/resource-client.js +2 -2
- package/dist/types/v1-video-to-video-create-body.d.ts +20 -6
- package/dist/types/v1-video-to-video-create-body.js +4 -4
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { types } from "../../../index.js";
|
|
2
|
-
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions } from "../../../core";
|
|
2
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
|
|
3
3
|
import * as requests from "../../../resources/v1/lip-sync/request-types";
|
|
4
4
|
export declare class LipSyncClient extends CoreResourceClient {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
6
6
|
/**
|
|
7
7
|
* Lip Sync
|
|
8
8
|
*
|
|
@@ -5,8 +5,8 @@ const core_1 = require("../../../core");
|
|
|
5
5
|
const v1_lip_sync_create_body_1 = require("../../../types/v1-lip-sync-create-body");
|
|
6
6
|
const v1_lip_sync_create_response_1 = require("../../../types/v1-lip-sync-create-response");
|
|
7
7
|
class LipSyncClient extends core_1.CoreResourceClient {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(coreClient, opts) {
|
|
9
|
+
super(coreClient, opts);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Lip Sync
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { types } from "../../../index.js";
|
|
2
|
-
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions } from "../../../core";
|
|
2
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
|
|
3
3
|
import * as requests from "../../../resources/v1/photo-colorizer/request-types";
|
|
4
4
|
export declare class PhotoColorizerClient extends CoreResourceClient {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
6
6
|
/**
|
|
7
7
|
* Photo Colorizer
|
|
8
8
|
*
|
|
@@ -5,8 +5,8 @@ const core_1 = require("../../../core");
|
|
|
5
5
|
const v1_photo_colorizer_create_body_1 = require("../../../types/v1-photo-colorizer-create-body");
|
|
6
6
|
const v1_photo_colorizer_create_response_1 = require("../../../types/v1-photo-colorizer-create-response");
|
|
7
7
|
class PhotoColorizerClient extends core_1.CoreResourceClient {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(coreClient, opts) {
|
|
9
|
+
super(coreClient, opts);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Photo Colorizer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoreClient, CoreResourceClient } from "../../core";
|
|
1
|
+
import { CoreClient, CoreResourceClient, ResourceClientOptions } from "../../core";
|
|
2
2
|
import { AiClothesChangerClient } from "../../resources/v1/ai-clothes-changer";
|
|
3
3
|
import { AiFaceEditorClient } from "../../resources/v1/ai-face-editor";
|
|
4
4
|
import { AiGifGeneratorClient } from "../../resources/v1/ai-gif-generator";
|
|
@@ -22,27 +22,49 @@ import { TextToVideoClient } from "../../resources/v1/text-to-video";
|
|
|
22
22
|
import { VideoProjectsClient } from "../../resources/v1/video-projects";
|
|
23
23
|
import { VideoToVideoClient } from "../../resources/v1/video-to-video";
|
|
24
24
|
export declare class V1Client extends CoreResourceClient {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
constructor(
|
|
25
|
+
private _imageProjectsLazy?;
|
|
26
|
+
private _videoProjectsLazy?;
|
|
27
|
+
private _aiClothesChangerLazy?;
|
|
28
|
+
private _aiFaceEditorLazy?;
|
|
29
|
+
private _aiGifGeneratorLazy?;
|
|
30
|
+
private _aiHeadshotGeneratorLazy?;
|
|
31
|
+
private _aiImageGeneratorLazy?;
|
|
32
|
+
private _aiImageUpscalerLazy?;
|
|
33
|
+
private _aiMemeGeneratorLazy?;
|
|
34
|
+
private _aiPhotoEditorLazy?;
|
|
35
|
+
private _aiQrCodeGeneratorLazy?;
|
|
36
|
+
private _aiTalkingPhotoLazy?;
|
|
37
|
+
private _animationLazy?;
|
|
38
|
+
private _faceSwapLazy?;
|
|
39
|
+
private _faceSwapPhotoLazy?;
|
|
40
|
+
private _filesLazy?;
|
|
41
|
+
private _imageBackgroundRemoverLazy?;
|
|
42
|
+
private _imageToVideoLazy?;
|
|
43
|
+
private _lipSyncLazy?;
|
|
44
|
+
private _photoColorizerLazy?;
|
|
45
|
+
private _textToVideoLazy?;
|
|
46
|
+
private _videoToVideoLazy?;
|
|
47
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
48
|
+
get imageProjects(): ImageProjectsClient;
|
|
49
|
+
get videoProjects(): VideoProjectsClient;
|
|
50
|
+
get aiClothesChanger(): AiClothesChangerClient;
|
|
51
|
+
get aiFaceEditor(): AiFaceEditorClient;
|
|
52
|
+
get aiGifGenerator(): AiGifGeneratorClient;
|
|
53
|
+
get aiHeadshotGenerator(): AiHeadshotGeneratorClient;
|
|
54
|
+
get aiImageGenerator(): AiImageGeneratorClient;
|
|
55
|
+
get aiImageUpscaler(): AiImageUpscalerClient;
|
|
56
|
+
get aiMemeGenerator(): AiMemeGeneratorClient;
|
|
57
|
+
get aiPhotoEditor(): AiPhotoEditorClient;
|
|
58
|
+
get aiQrCodeGenerator(): AiQrCodeGeneratorClient;
|
|
59
|
+
get aiTalkingPhoto(): AiTalkingPhotoClient;
|
|
60
|
+
get animation(): AnimationClient;
|
|
61
|
+
get faceSwap(): FaceSwapClient;
|
|
62
|
+
get faceSwapPhoto(): FaceSwapPhotoClient;
|
|
63
|
+
get files(): FilesClient;
|
|
64
|
+
get imageBackgroundRemover(): ImageBackgroundRemoverClient;
|
|
65
|
+
get imageToVideo(): ImageToVideoClient;
|
|
66
|
+
get lipSync(): LipSyncClient;
|
|
67
|
+
get photoColorizer(): PhotoColorizerClient;
|
|
68
|
+
get textToVideo(): TextToVideoClient;
|
|
69
|
+
get videoToVideo(): VideoToVideoClient;
|
|
48
70
|
}
|
|
@@ -2,53 +2,139 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.V1Client = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
|
-
const ai_clothes_changer_1 = require("../../resources/v1/ai-clothes-changer");
|
|
6
|
-
const ai_face_editor_1 = require("../../resources/v1/ai-face-editor");
|
|
7
|
-
const ai_gif_generator_1 = require("../../resources/v1/ai-gif-generator");
|
|
8
|
-
const ai_headshot_generator_1 = require("../../resources/v1/ai-headshot-generator");
|
|
9
|
-
const ai_image_generator_1 = require("../../resources/v1/ai-image-generator");
|
|
10
|
-
const ai_image_upscaler_1 = require("../../resources/v1/ai-image-upscaler");
|
|
11
|
-
const ai_meme_generator_1 = require("../../resources/v1/ai-meme-generator");
|
|
12
|
-
const ai_photo_editor_1 = require("../../resources/v1/ai-photo-editor");
|
|
13
|
-
const ai_qr_code_generator_1 = require("../../resources/v1/ai-qr-code-generator");
|
|
14
|
-
const ai_talking_photo_1 = require("../../resources/v1/ai-talking-photo");
|
|
15
|
-
const animation_1 = require("../../resources/v1/animation");
|
|
16
|
-
const face_swap_1 = require("../../resources/v1/face-swap");
|
|
17
|
-
const face_swap_photo_1 = require("../../resources/v1/face-swap-photo");
|
|
18
|
-
const files_1 = require("../../resources/v1/files");
|
|
19
|
-
const image_background_remover_1 = require("../../resources/v1/image-background-remover");
|
|
20
|
-
const image_projects_1 = require("../../resources/v1/image-projects");
|
|
21
|
-
const image_to_video_1 = require("../../resources/v1/image-to-video");
|
|
22
|
-
const lip_sync_1 = require("../../resources/v1/lip-sync");
|
|
23
|
-
const photo_colorizer_1 = require("../../resources/v1/photo-colorizer");
|
|
24
|
-
const text_to_video_1 = require("../../resources/v1/text-to-video");
|
|
25
|
-
const video_projects_1 = require("../../resources/v1/video-projects");
|
|
26
|
-
const video_to_video_1 = require("../../resources/v1/video-to-video");
|
|
27
5
|
class V1Client extends core_1.CoreResourceClient {
|
|
28
|
-
constructor(
|
|
29
|
-
super(
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
6
|
+
constructor(coreClient, opts) {
|
|
7
|
+
super(coreClient, opts);
|
|
8
|
+
if (this._opts.lazyLoad === false) {
|
|
9
|
+
this.imageProjects;
|
|
10
|
+
this.videoProjects;
|
|
11
|
+
this.aiClothesChanger;
|
|
12
|
+
this.aiFaceEditor;
|
|
13
|
+
this.aiGifGenerator;
|
|
14
|
+
this.aiHeadshotGenerator;
|
|
15
|
+
this.aiImageGenerator;
|
|
16
|
+
this.aiImageUpscaler;
|
|
17
|
+
this.aiMemeGenerator;
|
|
18
|
+
this.aiPhotoEditor;
|
|
19
|
+
this.aiQrCodeGenerator;
|
|
20
|
+
this.aiTalkingPhoto;
|
|
21
|
+
this.animation;
|
|
22
|
+
this.faceSwap;
|
|
23
|
+
this.faceSwapPhoto;
|
|
24
|
+
this.files;
|
|
25
|
+
this.imageBackgroundRemover;
|
|
26
|
+
this.imageToVideo;
|
|
27
|
+
this.lipSync;
|
|
28
|
+
this.photoColorizer;
|
|
29
|
+
this.textToVideo;
|
|
30
|
+
this.videoToVideo;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
get imageProjects() {
|
|
34
|
+
var _a;
|
|
35
|
+
return ((_a = this._imageProjectsLazy) !== null && _a !== void 0 ? _a : (this._imageProjectsLazy =
|
|
36
|
+
new (require("./image-projects").ImageProjectsClient)(this._client, this._opts)));
|
|
37
|
+
}
|
|
38
|
+
get videoProjects() {
|
|
39
|
+
var _a;
|
|
40
|
+
return ((_a = this._videoProjectsLazy) !== null && _a !== void 0 ? _a : (this._videoProjectsLazy =
|
|
41
|
+
new (require("./video-projects").VideoProjectsClient)(this._client, this._opts)));
|
|
42
|
+
}
|
|
43
|
+
get aiClothesChanger() {
|
|
44
|
+
var _a;
|
|
45
|
+
return ((_a = this._aiClothesChangerLazy) !== null && _a !== void 0 ? _a : (this._aiClothesChangerLazy =
|
|
46
|
+
new (require("./ai-clothes-changer").AiClothesChangerClient)(this._client, this._opts)));
|
|
47
|
+
}
|
|
48
|
+
get aiFaceEditor() {
|
|
49
|
+
var _a;
|
|
50
|
+
return ((_a = this._aiFaceEditorLazy) !== null && _a !== void 0 ? _a : (this._aiFaceEditorLazy =
|
|
51
|
+
new (require("./ai-face-editor").AiFaceEditorClient)(this._client, this._opts)));
|
|
52
|
+
}
|
|
53
|
+
get aiGifGenerator() {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = this._aiGifGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiGifGeneratorLazy =
|
|
56
|
+
new (require("./ai-gif-generator").AiGifGeneratorClient)(this._client, this._opts)));
|
|
57
|
+
}
|
|
58
|
+
get aiHeadshotGenerator() {
|
|
59
|
+
var _a;
|
|
60
|
+
return ((_a = this._aiHeadshotGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiHeadshotGeneratorLazy =
|
|
61
|
+
new (require("./ai-headshot-generator").AiHeadshotGeneratorClient)(this._client, this._opts)));
|
|
62
|
+
}
|
|
63
|
+
get aiImageGenerator() {
|
|
64
|
+
var _a;
|
|
65
|
+
return ((_a = this._aiImageGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiImageGeneratorLazy =
|
|
66
|
+
new (require("./ai-image-generator").AiImageGeneratorClient)(this._client, this._opts)));
|
|
67
|
+
}
|
|
68
|
+
get aiImageUpscaler() {
|
|
69
|
+
var _a;
|
|
70
|
+
return ((_a = this._aiImageUpscalerLazy) !== null && _a !== void 0 ? _a : (this._aiImageUpscalerLazy =
|
|
71
|
+
new (require("./ai-image-upscaler").AiImageUpscalerClient)(this._client, this._opts)));
|
|
72
|
+
}
|
|
73
|
+
get aiMemeGenerator() {
|
|
74
|
+
var _a;
|
|
75
|
+
return ((_a = this._aiMemeGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiMemeGeneratorLazy =
|
|
76
|
+
new (require("./ai-meme-generator").AiMemeGeneratorClient)(this._client, this._opts)));
|
|
77
|
+
}
|
|
78
|
+
get aiPhotoEditor() {
|
|
79
|
+
var _a;
|
|
80
|
+
return ((_a = this._aiPhotoEditorLazy) !== null && _a !== void 0 ? _a : (this._aiPhotoEditorLazy =
|
|
81
|
+
new (require("./ai-photo-editor").AiPhotoEditorClient)(this._client, this._opts)));
|
|
82
|
+
}
|
|
83
|
+
get aiQrCodeGenerator() {
|
|
84
|
+
var _a;
|
|
85
|
+
return ((_a = this._aiQrCodeGeneratorLazy) !== null && _a !== void 0 ? _a : (this._aiQrCodeGeneratorLazy =
|
|
86
|
+
new (require("./ai-qr-code-generator").AiQrCodeGeneratorClient)(this._client, this._opts)));
|
|
87
|
+
}
|
|
88
|
+
get aiTalkingPhoto() {
|
|
89
|
+
var _a;
|
|
90
|
+
return ((_a = this._aiTalkingPhotoLazy) !== null && _a !== void 0 ? _a : (this._aiTalkingPhotoLazy =
|
|
91
|
+
new (require("./ai-talking-photo").AiTalkingPhotoClient)(this._client, this._opts)));
|
|
92
|
+
}
|
|
93
|
+
get animation() {
|
|
94
|
+
var _a;
|
|
95
|
+
return ((_a = this._animationLazy) !== null && _a !== void 0 ? _a : (this._animationLazy = new (require("./animation").AnimationClient)(this._client, this._opts)));
|
|
96
|
+
}
|
|
97
|
+
get faceSwap() {
|
|
98
|
+
var _a;
|
|
99
|
+
return ((_a = this._faceSwapLazy) !== null && _a !== void 0 ? _a : (this._faceSwapLazy = new (require("./face-swap").FaceSwapClient)(this._client, this._opts)));
|
|
100
|
+
}
|
|
101
|
+
get faceSwapPhoto() {
|
|
102
|
+
var _a;
|
|
103
|
+
return ((_a = this._faceSwapPhotoLazy) !== null && _a !== void 0 ? _a : (this._faceSwapPhotoLazy =
|
|
104
|
+
new (require("./face-swap-photo").FaceSwapPhotoClient)(this._client, this._opts)));
|
|
105
|
+
}
|
|
106
|
+
get files() {
|
|
107
|
+
var _a;
|
|
108
|
+
return ((_a = this._filesLazy) !== null && _a !== void 0 ? _a : (this._filesLazy = new (require("./files").FilesClient)(this._client, this._opts)));
|
|
109
|
+
}
|
|
110
|
+
get imageBackgroundRemover() {
|
|
111
|
+
var _a;
|
|
112
|
+
return ((_a = this._imageBackgroundRemoverLazy) !== null && _a !== void 0 ? _a : (this._imageBackgroundRemoverLazy =
|
|
113
|
+
new (require("./image-background-remover").ImageBackgroundRemoverClient)(this._client, this._opts)));
|
|
114
|
+
}
|
|
115
|
+
get imageToVideo() {
|
|
116
|
+
var _a;
|
|
117
|
+
return ((_a = this._imageToVideoLazy) !== null && _a !== void 0 ? _a : (this._imageToVideoLazy =
|
|
118
|
+
new (require("./image-to-video").ImageToVideoClient)(this._client, this._opts)));
|
|
119
|
+
}
|
|
120
|
+
get lipSync() {
|
|
121
|
+
var _a;
|
|
122
|
+
return ((_a = this._lipSyncLazy) !== null && _a !== void 0 ? _a : (this._lipSyncLazy = new (require("./lip-sync").LipSyncClient)(this._client, this._opts)));
|
|
123
|
+
}
|
|
124
|
+
get photoColorizer() {
|
|
125
|
+
var _a;
|
|
126
|
+
return ((_a = this._photoColorizerLazy) !== null && _a !== void 0 ? _a : (this._photoColorizerLazy =
|
|
127
|
+
new (require("./photo-colorizer").PhotoColorizerClient)(this._client, this._opts)));
|
|
128
|
+
}
|
|
129
|
+
get textToVideo() {
|
|
130
|
+
var _a;
|
|
131
|
+
return ((_a = this._textToVideoLazy) !== null && _a !== void 0 ? _a : (this._textToVideoLazy =
|
|
132
|
+
new (require("./text-to-video").TextToVideoClient)(this._client, this._opts)));
|
|
133
|
+
}
|
|
134
|
+
get videoToVideo() {
|
|
135
|
+
var _a;
|
|
136
|
+
return ((_a = this._videoToVideoLazy) !== null && _a !== void 0 ? _a : (this._videoToVideoLazy =
|
|
137
|
+
new (require("./video-to-video").VideoToVideoClient)(this._client, this._opts)));
|
|
52
138
|
}
|
|
53
139
|
}
|
|
54
140
|
exports.V1Client = V1Client;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { types } from "../../../index.js";
|
|
2
|
-
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions } from "../../../core";
|
|
2
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
|
|
3
3
|
import * as requests from "../../../resources/v1/text-to-video/request-types";
|
|
4
4
|
export declare class TextToVideoClient extends CoreResourceClient {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
6
6
|
/**
|
|
7
7
|
* Text-to-Video
|
|
8
8
|
*
|
|
@@ -5,8 +5,8 @@ const core_1 = require("../../../core");
|
|
|
5
5
|
const v1_text_to_video_create_body_1 = require("../../../types/v1-text-to-video-create-body");
|
|
6
6
|
const v1_text_to_video_create_response_1 = require("../../../types/v1-text-to-video-create-response");
|
|
7
7
|
class TextToVideoClient extends core_1.CoreResourceClient {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(coreClient, opts) {
|
|
9
|
+
super(coreClient, opts);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Text-to-Video
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { types } from "../../../index.js";
|
|
2
|
-
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions } from "../../../core";
|
|
2
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
|
|
3
3
|
import * as requests from "../../../resources/v1/video-projects/request-types";
|
|
4
4
|
export declare class VideoProjectsClient extends CoreResourceClient {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* Delete video
|
|
8
|
+
*
|
|
9
|
+
* Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
|
|
10
|
+
*
|
|
11
|
+
* DELETE /v1/video-projects/{id}
|
|
12
|
+
*/
|
|
13
|
+
delete(request: requests.DeleteRequest, opts?: RequestOptions): ApiPromise<null>;
|
|
6
14
|
/**
|
|
7
15
|
* Get video details
|
|
8
16
|
*
|
|
@@ -20,12 +28,4 @@ export declare class VideoProjectsClient extends CoreResourceClient {
|
|
|
20
28
|
* GET /v1/video-projects/{id}
|
|
21
29
|
*/
|
|
22
30
|
get(request: requests.GetRequest, opts?: RequestOptions): ApiPromise<types.V1VideoProjectsGetResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* Delete video
|
|
25
|
-
*
|
|
26
|
-
* Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
|
|
27
|
-
*
|
|
28
|
-
* DELETE /v1/video-projects/{id}
|
|
29
|
-
*/
|
|
30
|
-
delete(request: requests.DeleteRequest, opts?: RequestOptions): ApiPromise<null>;
|
|
31
31
|
}
|
|
@@ -4,8 +4,24 @@ exports.VideoProjectsClient = void 0;
|
|
|
4
4
|
const core_1 = require("../../../core");
|
|
5
5
|
const v1_video_projects_get_response_1 = require("../../../types/v1-video-projects-get-response");
|
|
6
6
|
class VideoProjectsClient extends core_1.CoreResourceClient {
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
7
|
+
constructor(coreClient, opts) {
|
|
8
|
+
super(coreClient, opts);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Delete video
|
|
12
|
+
*
|
|
13
|
+
* Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
|
|
14
|
+
*
|
|
15
|
+
* DELETE /v1/video-projects/{id}
|
|
16
|
+
*/
|
|
17
|
+
delete(request, opts) {
|
|
18
|
+
return this._client.makeRequest({
|
|
19
|
+
method: "delete",
|
|
20
|
+
path: `/v1/video-projects/${request.id}`,
|
|
21
|
+
auth: ["bearerAuth"],
|
|
22
|
+
responseRaw: true,
|
|
23
|
+
opts,
|
|
24
|
+
});
|
|
9
25
|
}
|
|
10
26
|
/**
|
|
11
27
|
* Get video details
|
|
@@ -32,21 +48,5 @@ class VideoProjectsClient extends core_1.CoreResourceClient {
|
|
|
32
48
|
opts,
|
|
33
49
|
});
|
|
34
50
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Delete video
|
|
37
|
-
*
|
|
38
|
-
* Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
|
|
39
|
-
*
|
|
40
|
-
* DELETE /v1/video-projects/{id}
|
|
41
|
-
*/
|
|
42
|
-
delete(request, opts) {
|
|
43
|
-
return this._client.makeRequest({
|
|
44
|
-
method: "delete",
|
|
45
|
-
path: `/v1/video-projects/${request.id}`,
|
|
46
|
-
auth: ["bearerAuth"],
|
|
47
|
-
responseRaw: true,
|
|
48
|
-
opts,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
51
|
}
|
|
52
52
|
exports.VideoProjectsClient = VideoProjectsClient;
|
|
@@ -20,9 +20,16 @@ export type CreateRequest = {
|
|
|
20
20
|
*/
|
|
21
21
|
fpsResolution?: ("FULL" | "HALF") | undefined;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Used to determine the dimensions of the output video.
|
|
24
|
+
*
|
|
25
|
+
* * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
26
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
27
|
+
*
|
|
28
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
29
|
+
*
|
|
30
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
24
31
|
*/
|
|
25
|
-
height
|
|
32
|
+
height?: number | undefined;
|
|
26
33
|
/**
|
|
27
34
|
* The name of video
|
|
28
35
|
*/
|
|
@@ -33,9 +40,16 @@ export type CreateRequest = {
|
|
|
33
40
|
startSeconds: number;
|
|
34
41
|
style: V1VideoToVideoCreateBodyStyle;
|
|
35
42
|
/**
|
|
36
|
-
*
|
|
43
|
+
* Used to determine the dimensions of the output video.
|
|
44
|
+
*
|
|
45
|
+
* * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
46
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
47
|
+
*
|
|
48
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
49
|
+
*
|
|
50
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
37
51
|
*/
|
|
38
|
-
width
|
|
52
|
+
width?: number | undefined;
|
|
39
53
|
};
|
|
40
54
|
/**
|
|
41
55
|
* @internal
|
|
@@ -46,11 +60,11 @@ export type External$CreateRequest = {
|
|
|
46
60
|
assets: External$V1VideoToVideoCreateBodyAssets;
|
|
47
61
|
end_seconds: number;
|
|
48
62
|
fps_resolution?: ("FULL" | "HALF") | undefined;
|
|
49
|
-
height
|
|
63
|
+
height?: number | undefined;
|
|
50
64
|
name?: string | undefined;
|
|
51
65
|
start_seconds: number;
|
|
52
66
|
style: External$V1VideoToVideoCreateBodyStyle;
|
|
53
|
-
width
|
|
67
|
+
width?: number | undefined;
|
|
54
68
|
};
|
|
55
69
|
export declare const Schemas$CreateRequest: {
|
|
56
70
|
in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
|
|
@@ -46,11 +46,11 @@ const SchemaIn$CreateRequest = z
|
|
|
46
46
|
assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.in,
|
|
47
47
|
end_seconds: z.number(),
|
|
48
48
|
fps_resolution: z.enum(["FULL", "HALF"]).optional(),
|
|
49
|
-
height: z.number().int(),
|
|
49
|
+
height: z.number().int().optional(),
|
|
50
50
|
name: z.string().optional(),
|
|
51
51
|
start_seconds: z.number(),
|
|
52
52
|
style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.in,
|
|
53
|
-
width: z.number().int(),
|
|
53
|
+
width: z.number().int().optional(),
|
|
54
54
|
})
|
|
55
55
|
.transform((obj) => {
|
|
56
56
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -73,11 +73,11 @@ const SchemaOut$CreateRequest = z
|
|
|
73
73
|
assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.out,
|
|
74
74
|
endSeconds: z.number(),
|
|
75
75
|
fpsResolution: z.enum(["FULL", "HALF"]).optional(),
|
|
76
|
-
height: z.number().int(),
|
|
76
|
+
height: z.number().int().optional(),
|
|
77
77
|
name: z.string().optional(),
|
|
78
78
|
startSeconds: z.number(),
|
|
79
79
|
style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.out,
|
|
80
|
-
width: z.number().int(),
|
|
80
|
+
width: z.number().int().optional(),
|
|
81
81
|
})
|
|
82
82
|
.transform((obj) => {
|
|
83
83
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { types } from "../../../index.js";
|
|
2
|
-
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions } from "../../../core";
|
|
2
|
+
import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
|
|
3
3
|
import * as requests from "../../../resources/v1/video-to-video/request-types";
|
|
4
4
|
export declare class VideoToVideoClient extends CoreResourceClient {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(coreClient: CoreClient, opts: ResourceClientOptions);
|
|
6
6
|
/**
|
|
7
7
|
* Video-to-Video
|
|
8
8
|
*
|
|
@@ -5,8 +5,8 @@ const core_1 = require("../../../core");
|
|
|
5
5
|
const v1_video_to_video_create_body_1 = require("../../../types/v1-video-to-video-create-body");
|
|
6
6
|
const v1_video_to_video_create_response_1 = require("../../../types/v1-video-to-video-create-response");
|
|
7
7
|
class VideoToVideoClient extends core_1.CoreResourceClient {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(coreClient, opts) {
|
|
9
|
+
super(coreClient, opts);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Video-to-Video
|
|
@@ -20,9 +20,16 @@ export type V1VideoToVideoCreateBody = {
|
|
|
20
20
|
*/
|
|
21
21
|
fpsResolution?: ("FULL" | "HALF") | undefined;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Used to determine the dimensions of the output video.
|
|
24
|
+
*
|
|
25
|
+
* * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
26
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
27
|
+
*
|
|
28
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
29
|
+
*
|
|
30
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
24
31
|
*/
|
|
25
|
-
height
|
|
32
|
+
height?: number | undefined;
|
|
26
33
|
/**
|
|
27
34
|
* The name of video
|
|
28
35
|
*/
|
|
@@ -33,9 +40,16 @@ export type V1VideoToVideoCreateBody = {
|
|
|
33
40
|
startSeconds: number;
|
|
34
41
|
style: V1VideoToVideoCreateBodyStyle;
|
|
35
42
|
/**
|
|
36
|
-
*
|
|
43
|
+
* Used to determine the dimensions of the output video.
|
|
44
|
+
*
|
|
45
|
+
* * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
|
|
46
|
+
* * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
|
|
47
|
+
*
|
|
48
|
+
* Note: if the video's original resolution is less than the maximum, the video will not be resized.
|
|
49
|
+
*
|
|
50
|
+
* See our [pricing page](https://magichour.ai/pricing) for more details.
|
|
37
51
|
*/
|
|
38
|
-
width
|
|
52
|
+
width?: number | undefined;
|
|
39
53
|
};
|
|
40
54
|
/**
|
|
41
55
|
* @internal
|
|
@@ -46,11 +60,11 @@ export type External$V1VideoToVideoCreateBody = {
|
|
|
46
60
|
assets: External$V1VideoToVideoCreateBodyAssets;
|
|
47
61
|
end_seconds: number;
|
|
48
62
|
fps_resolution?: ("FULL" | "HALF") | undefined;
|
|
49
|
-
height
|
|
63
|
+
height?: number | undefined;
|
|
50
64
|
name?: string | undefined;
|
|
51
65
|
start_seconds: number;
|
|
52
66
|
style: External$V1VideoToVideoCreateBodyStyle;
|
|
53
|
-
width
|
|
67
|
+
width?: number | undefined;
|
|
54
68
|
};
|
|
55
69
|
export declare const Schemas$V1VideoToVideoCreateBody: {
|
|
56
70
|
in: z.ZodType<V1VideoToVideoCreateBody, z.ZodTypeDef, unknown>;
|
|
@@ -46,11 +46,11 @@ const SchemaIn$V1VideoToVideoCreateBody = z
|
|
|
46
46
|
assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.in,
|
|
47
47
|
end_seconds: z.number(),
|
|
48
48
|
fps_resolution: z.enum(["FULL", "HALF"]).optional(),
|
|
49
|
-
height: z.number().int(),
|
|
49
|
+
height: z.number().int().optional(),
|
|
50
50
|
name: z.string().optional(),
|
|
51
51
|
start_seconds: z.number(),
|
|
52
52
|
style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.in,
|
|
53
|
-
width: z.number().int(),
|
|
53
|
+
width: z.number().int().optional(),
|
|
54
54
|
})
|
|
55
55
|
.transform((obj) => {
|
|
56
56
|
return (0, core_1.zodTransform)(obj, {
|
|
@@ -73,11 +73,11 @@ const SchemaOut$V1VideoToVideoCreateBody = z
|
|
|
73
73
|
assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.out,
|
|
74
74
|
endSeconds: z.number(),
|
|
75
75
|
fpsResolution: z.enum(["FULL", "HALF"]).optional(),
|
|
76
|
-
height: z.number().int(),
|
|
76
|
+
height: z.number().int().optional(),
|
|
77
77
|
name: z.string().optional(),
|
|
78
78
|
startSeconds: z.number(),
|
|
79
79
|
style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.out,
|
|
80
|
-
width: z.number().int(),
|
|
80
|
+
width: z.number().int().optional(),
|
|
81
81
|
})
|
|
82
82
|
.transform((obj) => {
|
|
83
83
|
return (0, core_1.zodTransform)(obj, {
|