magic-hour 0.19.0 → 0.21.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.
Files changed (62) hide show
  1. package/dist/client.d.ts +6 -3
  2. package/dist/client.js +8 -2
  3. package/dist/core/core-client.d.ts +5 -1
  4. package/dist/core/core-client.js +2 -1
  5. package/dist/core/index.d.ts +1 -1
  6. package/dist/environment.d.ts +1 -1
  7. package/dist/environment.js +1 -1
  8. package/dist/resources/v1/ai-clothes-changer/resource-client.d.ts +2 -2
  9. package/dist/resources/v1/ai-clothes-changer/resource-client.js +2 -2
  10. package/dist/resources/v1/ai-face-editor/resource-client.d.ts +2 -2
  11. package/dist/resources/v1/ai-face-editor/resource-client.js +2 -2
  12. package/dist/resources/v1/ai-gif-generator/resource-client.d.ts +3 -3
  13. package/dist/resources/v1/ai-gif-generator/resource-client.js +3 -3
  14. package/dist/resources/v1/ai-headshot-generator/resource-client.d.ts +2 -2
  15. package/dist/resources/v1/ai-headshot-generator/resource-client.js +2 -2
  16. package/dist/resources/v1/ai-image-generator/resource-client.d.ts +2 -2
  17. package/dist/resources/v1/ai-image-generator/resource-client.js +2 -2
  18. package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +2 -2
  19. package/dist/resources/v1/ai-image-upscaler/resource-client.js +2 -2
  20. package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +2 -2
  21. package/dist/resources/v1/ai-meme-generator/resource-client.js +2 -2
  22. package/dist/resources/v1/ai-photo-editor/resource-client.d.ts +2 -2
  23. package/dist/resources/v1/ai-photo-editor/resource-client.js +2 -2
  24. package/dist/resources/v1/ai-qr-code-generator/resource-client.d.ts +2 -2
  25. package/dist/resources/v1/ai-qr-code-generator/resource-client.js +2 -2
  26. package/dist/resources/v1/ai-talking-photo/resource-client.d.ts +2 -2
  27. package/dist/resources/v1/ai-talking-photo/resource-client.js +2 -2
  28. package/dist/resources/v1/animation/resource-client.d.ts +2 -2
  29. package/dist/resources/v1/animation/resource-client.js +2 -2
  30. package/dist/resources/v1/face-swap/resource-client.d.ts +2 -2
  31. package/dist/resources/v1/face-swap/resource-client.js +2 -2
  32. package/dist/resources/v1/face-swap-photo/resource-client.d.ts +2 -2
  33. package/dist/resources/v1/face-swap-photo/resource-client.js +2 -2
  34. package/dist/resources/v1/files/resource-client.d.ts +4 -3
  35. package/dist/resources/v1/files/resource-client.js +9 -4
  36. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +2 -2
  37. package/dist/resources/v1/files/upload-urls/resource-client.js +2 -2
  38. package/dist/resources/v1/image-background-remover/resource-client.d.ts +2 -2
  39. package/dist/resources/v1/image-background-remover/resource-client.js +2 -2
  40. package/dist/resources/v1/image-projects/resource-client.d.ts +10 -10
  41. package/dist/resources/v1/image-projects/resource-client.js +18 -18
  42. package/dist/resources/v1/image-to-video/resource-client.d.ts +2 -2
  43. package/dist/resources/v1/image-to-video/resource-client.js +2 -2
  44. package/dist/resources/v1/lip-sync/resource-client.d.ts +2 -2
  45. package/dist/resources/v1/lip-sync/resource-client.js +2 -2
  46. package/dist/resources/v1/photo-colorizer/resource-client.d.ts +2 -2
  47. package/dist/resources/v1/photo-colorizer/resource-client.js +2 -2
  48. package/dist/resources/v1/resource-client.d.ts +46 -24
  49. package/dist/resources/v1/resource-client.js +132 -46
  50. package/dist/resources/v1/text-to-video/resource-client.d.ts +2 -2
  51. package/dist/resources/v1/text-to-video/resource-client.js +2 -2
  52. package/dist/resources/v1/video-projects/resource-client.d.ts +10 -10
  53. package/dist/resources/v1/video-projects/resource-client.js +18 -18
  54. package/dist/resources/v1/video-to-video/request-types.d.ts +20 -6
  55. package/dist/resources/v1/video-to-video/request-types.js +4 -4
  56. package/dist/resources/v1/video-to-video/resource-client.d.ts +2 -2
  57. package/dist/resources/v1/video-to-video/resource-client.js +2 -2
  58. package/dist/types/v1-ai-photo-editor-create-body-style.d.ts +10 -0
  59. package/dist/types/v1-ai-photo-editor-create-body-style.js +8 -0
  60. package/dist/types/v1-video-to-video-create-body.d.ts +20 -6
  61. package/dist/types/v1-video-to-video-create-body.js +4 -4
  62. 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(client: CoreClient);
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(client) {
9
- super(client);
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(client: CoreClient);
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(client) {
9
- super(client);
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
- imageProjects: ImageProjectsClient;
26
- videoProjects: VideoProjectsClient;
27
- aiClothesChanger: AiClothesChangerClient;
28
- aiFaceEditor: AiFaceEditorClient;
29
- aiGifGenerator: AiGifGeneratorClient;
30
- aiHeadshotGenerator: AiHeadshotGeneratorClient;
31
- aiImageGenerator: AiImageGeneratorClient;
32
- aiImageUpscaler: AiImageUpscalerClient;
33
- aiMemeGenerator: AiMemeGeneratorClient;
34
- aiPhotoEditor: AiPhotoEditorClient;
35
- aiQrCodeGenerator: AiQrCodeGeneratorClient;
36
- aiTalkingPhoto: AiTalkingPhotoClient;
37
- animation: AnimationClient;
38
- faceSwap: FaceSwapClient;
39
- faceSwapPhoto: FaceSwapPhotoClient;
40
- files: FilesClient;
41
- imageBackgroundRemover: ImageBackgroundRemoverClient;
42
- imageToVideo: ImageToVideoClient;
43
- lipSync: LipSyncClient;
44
- photoColorizer: PhotoColorizerClient;
45
- textToVideo: TextToVideoClient;
46
- videoToVideo: VideoToVideoClient;
47
- constructor(client: CoreClient);
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(client) {
29
- super(client);
30
- this.imageProjects = new image_projects_1.ImageProjectsClient(this._client);
31
- this.videoProjects = new video_projects_1.VideoProjectsClient(this._client);
32
- this.aiClothesChanger = new ai_clothes_changer_1.AiClothesChangerClient(this._client);
33
- this.aiFaceEditor = new ai_face_editor_1.AiFaceEditorClient(this._client);
34
- this.aiGifGenerator = new ai_gif_generator_1.AiGifGeneratorClient(this._client);
35
- this.aiHeadshotGenerator = new ai_headshot_generator_1.AiHeadshotGeneratorClient(this._client);
36
- this.aiImageGenerator = new ai_image_generator_1.AiImageGeneratorClient(this._client);
37
- this.aiImageUpscaler = new ai_image_upscaler_1.AiImageUpscalerClient(this._client);
38
- this.aiMemeGenerator = new ai_meme_generator_1.AiMemeGeneratorClient(this._client);
39
- this.aiPhotoEditor = new ai_photo_editor_1.AiPhotoEditorClient(this._client);
40
- this.aiQrCodeGenerator = new ai_qr_code_generator_1.AiQrCodeGeneratorClient(this._client);
41
- this.aiTalkingPhoto = new ai_talking_photo_1.AiTalkingPhotoClient(this._client);
42
- this.animation = new animation_1.AnimationClient(this._client);
43
- this.faceSwap = new face_swap_1.FaceSwapClient(this._client);
44
- this.faceSwapPhoto = new face_swap_photo_1.FaceSwapPhotoClient(this._client);
45
- this.files = new files_1.FilesClient(this._client);
46
- this.imageBackgroundRemover = new image_background_remover_1.ImageBackgroundRemoverClient(this._client);
47
- this.imageToVideo = new image_to_video_1.ImageToVideoClient(this._client);
48
- this.lipSync = new lip_sync_1.LipSyncClient(this._client);
49
- this.photoColorizer = new photo_colorizer_1.PhotoColorizerClient(this._client);
50
- this.textToVideo = new text_to_video_1.TextToVideoClient(this._client);
51
- this.videoToVideo = new video_to_video_1.VideoToVideoClient(this._client);
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(client: CoreClient);
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(client) {
9
- super(client);
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(client: CoreClient);
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(client) {
8
- super(client);
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
- * The height of the final output video. Must be divisible by 64. The maximum height depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
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: number;
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
- * The width of the final output video. Must be divisible by 64. The maximum width depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
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: number;
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: number;
63
+ height?: number | undefined;
50
64
  name?: string | undefined;
51
65
  start_seconds: number;
52
66
  style: External$V1VideoToVideoCreateBodyStyle;
53
- width: number;
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(client: CoreClient);
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(client) {
9
- super(client);
8
+ constructor(coreClient, opts) {
9
+ super(coreClient, opts);
10
10
  }
11
11
  /**
12
12
  * Video-to-Video
@@ -27,6 +27,14 @@ export type V1AiPhotoEditorCreateBodyStyle = {
27
27
  * Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
28
28
  */
29
29
  steps?: number | undefined;
30
+ /**
31
+ * The multiplier applied to an image's original dimensions during the upscaling process. For example, a scale of 2 doubles the width and height (e.g., from 512x512 to 1024x1024).
32
+ */
33
+ upscaleFactor?: number | undefined;
34
+ /**
35
+ * Upscale fidelity refers to the level of quality desired in the generated image. Fidelity value of 1 means more details.
36
+ */
37
+ upscaleFidelity?: number | undefined;
30
38
  };
31
39
  /**
32
40
  * @internal
@@ -40,6 +48,8 @@ export type External$V1AiPhotoEditorCreateBodyStyle = {
40
48
  prompt: string;
41
49
  prompt_strength: number;
42
50
  steps?: number | undefined;
51
+ upscale_factor?: number | undefined;
52
+ upscale_fidelity?: number | undefined;
43
53
  };
44
54
  export declare const Schemas$V1AiPhotoEditorCreateBodyStyle: {
45
55
  in: z.ZodType<V1AiPhotoEditorCreateBodyStyle, z.ZodTypeDef, unknown>;
@@ -47,6 +47,8 @@ const SchemaIn$V1AiPhotoEditorCreateBodyStyle = z
47
47
  prompt: z.string(),
48
48
  prompt_strength: z.number(),
49
49
  steps: z.number().int().optional(),
50
+ upscale_factor: z.number().int().optional(),
51
+ upscale_fidelity: z.number().optional(),
50
52
  })
51
53
  .transform((obj) => {
52
54
  return (0, core_1.zodTransform)(obj, {
@@ -56,6 +58,8 @@ const SchemaIn$V1AiPhotoEditorCreateBodyStyle = z
56
58
  prompt: "prompt",
57
59
  prompt_strength: "promptStrength",
58
60
  steps: "steps",
61
+ upscale_factor: "upscaleFactor",
62
+ upscale_fidelity: "upscaleFidelity",
59
63
  });
60
64
  });
61
65
  /**
@@ -70,6 +74,8 @@ const SchemaOut$V1AiPhotoEditorCreateBodyStyle = z
70
74
  prompt: z.string(),
71
75
  promptStrength: z.number(),
72
76
  steps: z.number().int().optional(),
77
+ upscaleFactor: z.number().int().optional(),
78
+ upscaleFidelity: z.number().optional(),
73
79
  })
74
80
  .transform((obj) => {
75
81
  return (0, core_1.zodTransform)(obj, {
@@ -79,6 +85,8 @@ const SchemaOut$V1AiPhotoEditorCreateBodyStyle = z
79
85
  prompt: "prompt",
80
86
  promptStrength: "prompt_strength",
81
87
  steps: "steps",
88
+ upscaleFactor: "upscale_factor",
89
+ upscaleFidelity: "upscale_fidelity",
82
90
  });
83
91
  });
84
92
  exports.Schemas$V1AiPhotoEditorCreateBodyStyle = {
@@ -20,9 +20,16 @@ export type V1VideoToVideoCreateBody = {
20
20
  */
21
21
  fpsResolution?: ("FULL" | "HALF") | undefined;
22
22
  /**
23
- * The height of the final output video. Must be divisible by 64. The maximum height depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
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: number;
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
- * The width of the final output video. Must be divisible by 64. The maximum width depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
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: number;
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: number;
63
+ height?: number | undefined;
50
64
  name?: string | undefined;
51
65
  start_seconds: number;
52
66
  style: External$V1VideoToVideoCreateBodyStyle;
53
- width: number;
67
+ width?: number | undefined;
54
68
  };
55
69
  export declare const Schemas$V1VideoToVideoCreateBody: {
56
70
  in: z.ZodType<V1VideoToVideoCreateBody, z.ZodTypeDef, unknown>;