magic-hour 0.14.0 → 0.16.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 (43) hide show
  1. package/README.md +4 -0
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/resources/v1/ai-face-editor/index.d.ts +2 -0
  5. package/dist/resources/v1/ai-face-editor/index.js +5 -0
  6. package/dist/resources/v1/ai-face-editor/request-types.d.ts +34 -0
  7. package/dist/resources/v1/ai-face-editor/request-types.js +77 -0
  8. package/dist/resources/v1/ai-face-editor/resource-client.d.ts +14 -0
  9. package/dist/resources/v1/ai-face-editor/resource-client.js +30 -0
  10. package/dist/resources/v1/face-swap/request-types.d.ts +20 -6
  11. package/dist/resources/v1/face-swap/request-types.js +4 -4
  12. package/dist/resources/v1/index.d.ts +1 -0
  13. package/dist/resources/v1/index.js +2 -1
  14. package/dist/resources/v1/lip-sync/request-types.d.ts +20 -6
  15. package/dist/resources/v1/lip-sync/request-types.js +4 -4
  16. package/dist/resources/v1/resource-client.d.ts +2 -0
  17. package/dist/resources/v1/resource-client.js +2 -0
  18. package/dist/types/index.d.ts +10 -0
  19. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +22 -0
  20. package/dist/types/v1-ai-face-editor-create-body-assets.js +67 -0
  21. package/dist/types/v1-ai-face-editor-create-body-style.d.ts +92 -0
  22. package/dist/types/v1-ai-face-editor-create-body-style.js +123 -0
  23. package/dist/types/v1-ai-face-editor-create-body.d.ts +34 -0
  24. package/dist/types/v1-ai-face-editor-create-body.js +77 -0
  25. package/dist/types/v1-ai-face-editor-create-response.d.ts +27 -0
  26. package/dist/types/v1-ai-face-editor-create-response.js +71 -0
  27. package/dist/types/v1-ai-face-editor-create-response400.d.ts +19 -0
  28. package/dist/types/v1-ai-face-editor-create-response400.js +67 -0
  29. package/dist/types/v1-ai-face-editor-create-response401-message-enum.d.ts +4 -0
  30. package/dist/types/v1-ai-face-editor-create-response401-message-enum.js +2 -0
  31. package/dist/types/v1-ai-face-editor-create-response401.d.ts +19 -0
  32. package/dist/types/v1-ai-face-editor-create-response401.js +67 -0
  33. package/dist/types/v1-ai-face-editor-create-response404-message-enum.d.ts +4 -0
  34. package/dist/types/v1-ai-face-editor-create-response404-message-enum.js +2 -0
  35. package/dist/types/v1-ai-face-editor-create-response404.d.ts +19 -0
  36. package/dist/types/v1-ai-face-editor-create-response404.js +67 -0
  37. package/dist/types/v1-ai-face-editor-create-response422.d.ts +19 -0
  38. package/dist/types/v1-ai-face-editor-create-response422.js +67 -0
  39. package/dist/types/v1-face-swap-create-body.d.ts +20 -6
  40. package/dist/types/v1-face-swap-create-body.js +4 -4
  41. package/dist/types/v1-lip-sync-create-body.d.ts +20 -6
  42. package/dist/types/v1-lip-sync-create-body.js +4 -4
  43. package/package.json +1 -1
@@ -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$V1AiFaceEditorCreateResponse422 = 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 V1AiFaceEditorCreateResponse422
41
+ */
42
+ const SchemaIn$V1AiFaceEditorCreateResponse422 = z
43
+ .object({
44
+ message: z.string(),
45
+ })
46
+ .transform((obj) => {
47
+ return (0, core_1.zodTransform)(obj, {
48
+ message: "message",
49
+ });
50
+ });
51
+ /**
52
+ * @internal
53
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiFaceEditorCreateResponse422
54
+ */
55
+ const SchemaOut$V1AiFaceEditorCreateResponse422 = z
56
+ .object({
57
+ message: z.string(),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, core_1.zodTransform)(obj, {
61
+ message: "message",
62
+ });
63
+ });
64
+ exports.Schemas$V1AiFaceEditorCreateResponse422 = {
65
+ in: SchemaIn$V1AiFaceEditorCreateResponse422,
66
+ out: SchemaOut$V1AiFaceEditorCreateResponse422,
67
+ };
@@ -13,9 +13,16 @@ export type V1FaceSwapCreateBody = {
13
13
  */
14
14
  endSeconds: number;
15
15
  /**
16
- * The height of the final output video. The maximum height depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
16
+ * Used to determine the dimensions of the output video.
17
+ *
18
+ * * 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.
19
+ * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
20
+ *
21
+ * Note: if the video's original resolution is less than the maximum, the video will not be resized.
22
+ *
23
+ * See our [pricing page](https://magichour.ai/pricing) for more details.
17
24
  */
18
- height: number;
25
+ height?: number | undefined;
19
26
  /**
20
27
  * The name of video
21
28
  */
@@ -25,9 +32,16 @@ export type V1FaceSwapCreateBody = {
25
32
  */
26
33
  startSeconds: number;
27
34
  /**
28
- * The width of the final output video. The maximum width depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
35
+ * Used to determine the dimensions of the output video.
36
+ *
37
+ * * 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.
38
+ * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
39
+ *
40
+ * Note: if the video's original resolution is less than the maximum, the video will not be resized.
41
+ *
42
+ * See our [pricing page](https://magichour.ai/pricing) for more details.
29
43
  */
30
- width: number;
44
+ width?: number | undefined;
31
45
  };
32
46
  /**
33
47
  * @internal
@@ -37,10 +51,10 @@ export type V1FaceSwapCreateBody = {
37
51
  export type External$V1FaceSwapCreateBody = {
38
52
  assets: External$V1FaceSwapCreateBodyAssets;
39
53
  end_seconds: number;
40
- height: number;
54
+ height?: number | undefined;
41
55
  name?: string | undefined;
42
56
  start_seconds: number;
43
- width: number;
57
+ width?: number | undefined;
44
58
  };
45
59
  export declare const Schemas$V1FaceSwapCreateBody: {
46
60
  in: z.ZodType<V1FaceSwapCreateBody, z.ZodTypeDef, unknown>;
@@ -44,10 +44,10 @@ const SchemaIn$V1FaceSwapCreateBody = z
44
44
  .object({
45
45
  assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.in,
46
46
  end_seconds: z.number(),
47
- height: z.number().int(),
47
+ height: z.number().int().optional(),
48
48
  name: z.string().optional(),
49
49
  start_seconds: z.number(),
50
- width: z.number().int(),
50
+ width: z.number().int().optional(),
51
51
  })
52
52
  .transform((obj) => {
53
53
  return (0, core_1.zodTransform)(obj, {
@@ -67,10 +67,10 @@ const SchemaOut$V1FaceSwapCreateBody = z
67
67
  .object({
68
68
  assets: v1_face_swap_create_body_assets_1.Schemas$V1FaceSwapCreateBodyAssets.out,
69
69
  endSeconds: z.number(),
70
- height: z.number().int(),
70
+ height: z.number().int().optional(),
71
71
  name: z.string().optional(),
72
72
  startSeconds: z.number(),
73
- width: z.number().int(),
73
+ width: z.number().int().optional(),
74
74
  })
75
75
  .transform((obj) => {
76
76
  return (0, core_1.zodTransform)(obj, {
@@ -13,9 +13,16 @@ export type V1LipSyncCreateBody = {
13
13
  */
14
14
  endSeconds: number;
15
15
  /**
16
- * The height of the final output video. The maximum height depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
16
+ * Used to determine the dimensions of the output video.
17
+ *
18
+ * * 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.
19
+ * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
20
+ *
21
+ * Note: if the video's original resolution is less than the maximum, the video will not be resized.
22
+ *
23
+ * See our [pricing page](https://magichour.ai/pricing) for more details.
17
24
  */
18
- height: number;
25
+ height?: number | undefined;
19
26
  /**
20
27
  * Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
21
28
  */
@@ -29,9 +36,16 @@ export type V1LipSyncCreateBody = {
29
36
  */
30
37
  startSeconds: number;
31
38
  /**
32
- * The width of the final output video. The maximum width depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
39
+ * Used to determine the dimensions of the output video.
40
+ *
41
+ * * 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.
42
+ * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
43
+ *
44
+ * Note: if the video's original resolution is less than the maximum, the video will not be resized.
45
+ *
46
+ * See our [pricing page](https://magichour.ai/pricing) for more details.
33
47
  */
34
- width: number;
48
+ width?: number | undefined;
35
49
  };
36
50
  /**
37
51
  * @internal
@@ -41,11 +55,11 @@ export type V1LipSyncCreateBody = {
41
55
  export type External$V1LipSyncCreateBody = {
42
56
  assets: External$V1LipSyncCreateBodyAssets;
43
57
  end_seconds: number;
44
- height: number;
58
+ height?: number | undefined;
45
59
  max_fps_limit?: number | undefined;
46
60
  name?: string | undefined;
47
61
  start_seconds: number;
48
- width: number;
62
+ width?: number | undefined;
49
63
  };
50
64
  export declare const Schemas$V1LipSyncCreateBody: {
51
65
  in: z.ZodType<V1LipSyncCreateBody, z.ZodTypeDef, unknown>;
@@ -44,11 +44,11 @@ const SchemaIn$V1LipSyncCreateBody = z
44
44
  .object({
45
45
  assets: v1_lip_sync_create_body_assets_1.Schemas$V1LipSyncCreateBodyAssets.in,
46
46
  end_seconds: z.number(),
47
- height: z.number().int(),
47
+ height: z.number().int().optional(),
48
48
  max_fps_limit: z.number().optional(),
49
49
  name: z.string().optional(),
50
50
  start_seconds: z.number(),
51
- width: z.number().int(),
51
+ width: z.number().int().optional(),
52
52
  })
53
53
  .transform((obj) => {
54
54
  return (0, core_1.zodTransform)(obj, {
@@ -69,11 +69,11 @@ const SchemaOut$V1LipSyncCreateBody = z
69
69
  .object({
70
70
  assets: v1_lip_sync_create_body_assets_1.Schemas$V1LipSyncCreateBodyAssets.out,
71
71
  endSeconds: z.number(),
72
- height: z.number().int(),
72
+ height: z.number().int().optional(),
73
73
  maxFpsLimit: z.number().optional(),
74
74
  name: z.string().optional(),
75
75
  startSeconds: z.number(),
76
- width: z.number().int(),
76
+ width: z.number().int().optional(),
77
77
  })
78
78
  .transform((obj) => {
79
79
  return (0, core_1.zodTransform)(obj, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {