magic-hour 0.66.0 → 0.68.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 (61) hide show
  1. package/README.md +10 -0
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/resources/v1/ai-image-upscaler/request-types.d.ts +3 -3
  5. package/dist/resources/v1/ai-image-upscaler/request-types.js +2 -2
  6. package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +1 -1
  7. package/dist/resources/v1/ai-image-upscaler/resource-client.js +1 -1
  8. package/dist/resources/v1/ai-video-editor/index.d.ts +2 -0
  9. package/dist/resources/v1/ai-video-editor/index.js +5 -0
  10. package/dist/resources/v1/ai-video-editor/request-types.d.ts +41 -0
  11. package/dist/resources/v1/ai-video-editor/request-types.js +85 -0
  12. package/dist/resources/v1/ai-video-editor/resource-client.d.ts +76 -0
  13. package/dist/resources/v1/ai-video-editor/resource-client.js +120 -0
  14. package/dist/resources/v1/body-swap/resource-client.d.ts +1 -1
  15. package/dist/resources/v1/body-swap/resource-client.js +1 -1
  16. package/dist/resources/v1/character-replace/index.d.ts +2 -0
  17. package/dist/resources/v1/character-replace/index.js +5 -0
  18. package/dist/resources/v1/character-replace/request-types.d.ts +49 -0
  19. package/dist/resources/v1/character-replace/request-types.js +89 -0
  20. package/dist/resources/v1/character-replace/resource-client.d.ts +88 -0
  21. package/dist/resources/v1/character-replace/resource-client.js +129 -0
  22. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +2 -2
  23. package/dist/resources/v1/files/upload-urls/resource-client.js +2 -2
  24. package/dist/resources/v1/index.d.ts +2 -0
  25. package/dist/resources/v1/index.js +3 -1
  26. package/dist/resources/v1/resource-client.d.ts +6 -0
  27. package/dist/resources/v1/resource-client.js +12 -0
  28. package/dist/types/index.d.ts +12 -0
  29. package/dist/types/v1-ai-image-upscaler-create-body-style-enhancement-enum.d.ts +1 -1
  30. package/dist/types/v1-ai-image-upscaler-create-body-style-mode-enum.d.ts +2 -2
  31. package/dist/types/v1-ai-image-upscaler-create-body-style.d.ts +8 -5
  32. package/dist/types/v1-ai-image-upscaler-create-body-style.js +2 -2
  33. package/dist/types/v1-ai-image-upscaler-create-body.d.ts +3 -3
  34. package/dist/types/v1-ai-image-upscaler-create-body.js +2 -2
  35. package/dist/types/v1-ai-video-editor-create-body-assets.d.ts +27 -0
  36. package/dist/types/v1-ai-video-editor-create-body-assets.js +67 -0
  37. package/dist/types/v1-ai-video-editor-create-body-style.d.ts +22 -0
  38. package/dist/types/v1-ai-video-editor-create-body-style.js +67 -0
  39. package/dist/types/v1-ai-video-editor-create-body.d.ts +41 -0
  40. package/dist/types/v1-ai-video-editor-create-body.js +85 -0
  41. package/dist/types/v1-ai-video-editor-create-response.d.ts +36 -0
  42. package/dist/types/v1-ai-video-editor-create-response.js +75 -0
  43. package/dist/types/v1-body-swap-create-body-assets.d.ts +1 -1
  44. package/dist/types/v1-character-replace-create-body-assets.d.ts +37 -0
  45. package/dist/types/v1-character-replace-create-body-assets.js +71 -0
  46. package/dist/types/v1-character-replace-create-body-resolution-enum.d.ts +4 -0
  47. package/dist/types/v1-character-replace-create-body-resolution-enum.js +2 -0
  48. package/dist/types/v1-character-replace-create-body-style-mode-enum.d.ts +4 -0
  49. package/dist/types/v1-character-replace-create-body-style-mode-enum.js +2 -0
  50. package/dist/types/v1-character-replace-create-body-style-points-item.d.ts +32 -0
  51. package/dist/types/v1-character-replace-create-body-style-points-item.js +75 -0
  52. package/dist/types/v1-character-replace-create-body-style-selection-mode-enum.d.ts +4 -0
  53. package/dist/types/v1-character-replace-create-body-style-selection-mode-enum.js +2 -0
  54. package/dist/types/v1-character-replace-create-body-style.d.ts +33 -0
  55. package/dist/types/v1-character-replace-create-body-style.js +80 -0
  56. package/dist/types/v1-character-replace-create-body.d.ts +49 -0
  57. package/dist/types/v1-character-replace-create-body.js +89 -0
  58. package/dist/types/v1-character-replace-create-response.d.ts +36 -0
  59. package/dist/types/v1-character-replace-create-response.js +75 -0
  60. package/dist/types/v1-files-upload-urls-create-body-items-item.d.ts +1 -1
  61. 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$V1AiVideoEditorCreateBodyStyle = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiVideoEditorCreateBodyStyle
41
+ */
42
+ const SchemaIn$V1AiVideoEditorCreateBodyStyle = z
43
+ .object({
44
+ prompt: z.string(),
45
+ })
46
+ .transform((obj) => {
47
+ return (0, make_api_request_js_1.zodTransform)(obj, {
48
+ prompt: "prompt",
49
+ });
50
+ });
51
+ /**
52
+ * @internal
53
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVideoEditorCreateBodyStyle
54
+ */
55
+ const SchemaOut$V1AiVideoEditorCreateBodyStyle = z
56
+ .object({
57
+ prompt: z.string(),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, make_api_request_js_1.zodTransform)(obj, {
61
+ prompt: "prompt",
62
+ });
63
+ });
64
+ exports.Schemas$V1AiVideoEditorCreateBodyStyle = {
65
+ in: SchemaIn$V1AiVideoEditorCreateBodyStyle,
66
+ out: SchemaOut$V1AiVideoEditorCreateBodyStyle,
67
+ };
@@ -0,0 +1,41 @@
1
+ import * as z from "zod";
2
+ import { External$V1AiVideoEditorCreateBodyAssets, V1AiVideoEditorCreateBodyAssets } from "./v1-ai-video-editor-create-body-assets";
3
+ import { External$V1AiVideoEditorCreateBodyStyle, V1AiVideoEditorCreateBodyStyle } from "./v1-ai-video-editor-create-body-style";
4
+ /**
5
+ * V1AiVideoEditorCreateBody
6
+ */
7
+ export type V1AiVideoEditorCreateBody = {
8
+ /**
9
+ * Provide the assets for video editing.
10
+ */
11
+ assets: V1AiVideoEditorCreateBodyAssets;
12
+ /**
13
+ * End time of your clip in seconds. Must be greater than `start_seconds`. Duration must be between 3 and 10 seconds.
14
+ */
15
+ endSeconds: number;
16
+ /**
17
+ * Give your video a custom name for easy identification.
18
+ */
19
+ name?: string | undefined;
20
+ /**
21
+ * Start time of your clip (seconds). Must be ≥ 0.
22
+ */
23
+ startSeconds?: number | undefined;
24
+ style: V1AiVideoEditorCreateBodyStyle;
25
+ };
26
+ /**
27
+ * @internal
28
+ * V1AiVideoEditorCreateBody without any key transformation, this is what
29
+ * we expect to come in as network data
30
+ */
31
+ export type External$V1AiVideoEditorCreateBody = {
32
+ assets: External$V1AiVideoEditorCreateBodyAssets;
33
+ end_seconds: number;
34
+ name?: string | undefined;
35
+ start_seconds?: number | undefined;
36
+ style: External$V1AiVideoEditorCreateBodyStyle;
37
+ };
38
+ export declare const Schemas$V1AiVideoEditorCreateBody: {
39
+ in: z.ZodType<V1AiVideoEditorCreateBody, z.ZodTypeDef, unknown>;
40
+ out: z.ZodType<External$V1AiVideoEditorCreateBody, z.ZodTypeDef, V1AiVideoEditorCreateBody>;
41
+ };
@@ -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$V1AiVideoEditorCreateBody = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ const v1_ai_video_editor_create_body_assets_1 = require("./v1-ai-video-editor-create-body-assets");
40
+ const v1_ai_video_editor_create_body_style_1 = require("./v1-ai-video-editor-create-body-style");
41
+ /**
42
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiVideoEditorCreateBody
43
+ */
44
+ const SchemaIn$V1AiVideoEditorCreateBody = z
45
+ .object({
46
+ assets: v1_ai_video_editor_create_body_assets_1.Schemas$V1AiVideoEditorCreateBodyAssets.in,
47
+ end_seconds: z.number(),
48
+ name: z.string().optional(),
49
+ start_seconds: z.number().optional(),
50
+ style: v1_ai_video_editor_create_body_style_1.Schemas$V1AiVideoEditorCreateBodyStyle.in,
51
+ })
52
+ .transform((obj) => {
53
+ return (0, make_api_request_js_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$V1AiVideoEditorCreateBody
64
+ */
65
+ const SchemaOut$V1AiVideoEditorCreateBody = z
66
+ .object({
67
+ assets: v1_ai_video_editor_create_body_assets_1.Schemas$V1AiVideoEditorCreateBodyAssets.out,
68
+ endSeconds: z.number(),
69
+ name: z.string().optional(),
70
+ startSeconds: z.number().optional(),
71
+ style: v1_ai_video_editor_create_body_style_1.Schemas$V1AiVideoEditorCreateBodyStyle.out,
72
+ })
73
+ .transform((obj) => {
74
+ return (0, make_api_request_js_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$V1AiVideoEditorCreateBody = {
83
+ in: SchemaIn$V1AiVideoEditorCreateBody,
84
+ out: SchemaOut$V1AiVideoEditorCreateBody,
85
+ };
@@ -0,0 +1,36 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Success
4
+ */
5
+ export type V1AiVideoEditorCreateResponse = {
6
+ /**
7
+ * The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
8
+ *
9
+ * If video generation fails, credits will be refunded, and this field will be updated to include the refund.
10
+ */
11
+ creditsCharged: number;
12
+ /**
13
+ * Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
14
+ *
15
+ * The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
16
+ */
17
+ estimatedFrameCost: number;
18
+ /**
19
+ * Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
20
+ */
21
+ id: string;
22
+ };
23
+ /**
24
+ * @internal
25
+ * V1AiVideoEditorCreateResponse without any key transformation, this is what
26
+ * we expect to come in as network data
27
+ */
28
+ export type External$V1AiVideoEditorCreateResponse = {
29
+ credits_charged: number;
30
+ estimated_frame_cost: number;
31
+ id: string;
32
+ };
33
+ export declare const Schemas$V1AiVideoEditorCreateResponse: {
34
+ in: z.ZodType<V1AiVideoEditorCreateResponse, z.ZodTypeDef, unknown>;
35
+ out: z.ZodType<External$V1AiVideoEditorCreateResponse, z.ZodTypeDef, V1AiVideoEditorCreateResponse>;
36
+ };
@@ -0,0 +1,75 @@
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$V1AiVideoEditorCreateResponse = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiVideoEditorCreateResponse
41
+ */
42
+ const SchemaIn$V1AiVideoEditorCreateResponse = z
43
+ .object({
44
+ credits_charged: z.number().int(),
45
+ estimated_frame_cost: z.number().int(),
46
+ id: z.string(),
47
+ })
48
+ .transform((obj) => {
49
+ return (0, make_api_request_js_1.zodTransform)(obj, {
50
+ credits_charged: "creditsCharged",
51
+ estimated_frame_cost: "estimatedFrameCost",
52
+ id: "id",
53
+ });
54
+ });
55
+ /**
56
+ * @internal
57
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVideoEditorCreateResponse
58
+ */
59
+ const SchemaOut$V1AiVideoEditorCreateResponse = z
60
+ .object({
61
+ creditsCharged: z.number().int(),
62
+ estimatedFrameCost: z.number().int(),
63
+ id: z.string(),
64
+ })
65
+ .transform((obj) => {
66
+ return (0, make_api_request_js_1.zodTransform)(obj, {
67
+ creditsCharged: "credits_charged",
68
+ estimatedFrameCost: "estimated_frame_cost",
69
+ id: "id",
70
+ });
71
+ });
72
+ exports.Schemas$V1AiVideoEditorCreateResponse = {
73
+ in: SchemaIn$V1AiVideoEditorCreateResponse,
74
+ out: SchemaOut$V1AiVideoEditorCreateResponse,
75
+ };
@@ -13,7 +13,7 @@ export type V1BodySwapCreateBodyAssets = {
13
13
  */
14
14
  personFilePath: string;
15
15
  /**
16
- * Target scene image (background). This value is either
16
+ * Original scene image (background). This value is either
17
17
  * - a direct URL to the video file
18
18
  * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
19
19
  *
@@ -0,0 +1,37 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Source video and reference character image for the job.
4
+ */
5
+ export type V1CharacterReplaceCreateBodyAssets = {
6
+ /**
7
+ * Reference character image used as the replacement or animation target. This value is either
8
+ * - a direct URL to the video file
9
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
10
+ *
11
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
12
+ *
13
+ */
14
+ imageFilePath: string;
15
+ /**
16
+ * Source video containing the subject to replace or animate. This value is either
17
+ * - a direct URL to the video file
18
+ * - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
19
+ *
20
+ * See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
21
+ *
22
+ */
23
+ videoFilePath: string;
24
+ };
25
+ /**
26
+ * @internal
27
+ * V1CharacterReplaceCreateBodyAssets without any key transformation, this is what
28
+ * we expect to come in as network data
29
+ */
30
+ export type External$V1CharacterReplaceCreateBodyAssets = {
31
+ image_file_path: string;
32
+ video_file_path: string;
33
+ };
34
+ export declare const Schemas$V1CharacterReplaceCreateBodyAssets: {
35
+ in: z.ZodType<V1CharacterReplaceCreateBodyAssets, z.ZodTypeDef, unknown>;
36
+ out: z.ZodType<External$V1CharacterReplaceCreateBodyAssets, z.ZodTypeDef, V1CharacterReplaceCreateBodyAssets>;
37
+ };
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Schemas$V1CharacterReplaceCreateBodyAssets = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1CharacterReplaceCreateBodyAssets
41
+ */
42
+ const SchemaIn$V1CharacterReplaceCreateBodyAssets = z
43
+ .object({
44
+ image_file_path: z.string(),
45
+ video_file_path: z.string(),
46
+ })
47
+ .transform((obj) => {
48
+ return (0, make_api_request_js_1.zodTransform)(obj, {
49
+ image_file_path: "imageFilePath",
50
+ video_file_path: "videoFilePath",
51
+ });
52
+ });
53
+ /**
54
+ * @internal
55
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1CharacterReplaceCreateBodyAssets
56
+ */
57
+ const SchemaOut$V1CharacterReplaceCreateBodyAssets = z
58
+ .object({
59
+ imageFilePath: z.string(),
60
+ videoFilePath: z.string(),
61
+ })
62
+ .transform((obj) => {
63
+ return (0, make_api_request_js_1.zodTransform)(obj, {
64
+ imageFilePath: "image_file_path",
65
+ videoFilePath: "video_file_path",
66
+ });
67
+ });
68
+ exports.Schemas$V1CharacterReplaceCreateBodyAssets = {
69
+ in: SchemaIn$V1CharacterReplaceCreateBodyAssets,
70
+ out: SchemaOut$V1CharacterReplaceCreateBodyAssets,
71
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Output video resolution. Defaults to 480p, the lowest resolution available on your plan.
3
+ */
4
+ export type V1CharacterReplaceCreateBodyResolutionEnum = "480p" | "720p";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Processing mode. `replace` swaps the detected subject with your reference character. `animate` transfers motion from the video onto your character image.
3
+ */
4
+ export type V1CharacterReplaceCreateBodyStyleModeEnum = "animate" | "replace";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * V1CharacterReplaceCreateBodyStylePointsItem
4
+ */
5
+ export type V1CharacterReplaceCreateBodyStylePointsItem = {
6
+ /**
7
+ * Horizontal pixel coordinate in the source video frame at `time_seconds`, measured from the left edge.
8
+ */
9
+ positionX: number;
10
+ /**
11
+ * Vertical pixel coordinate in the source video frame at `time_seconds`, measured from the top edge.
12
+ */
13
+ positionY: number;
14
+ /**
15
+ * Timestamp on the source video timeline in seconds. Uses the same clock as `start_seconds` and `end_seconds`.
16
+ */
17
+ timeSeconds: number;
18
+ };
19
+ /**
20
+ * @internal
21
+ * V1CharacterReplaceCreateBodyStylePointsItem without any key transformation, this is what
22
+ * we expect to come in as network data
23
+ */
24
+ export type External$V1CharacterReplaceCreateBodyStylePointsItem = {
25
+ position_x: number;
26
+ position_y: number;
27
+ time_seconds: number;
28
+ };
29
+ export declare const Schemas$V1CharacterReplaceCreateBodyStylePointsItem: {
30
+ in: z.ZodType<V1CharacterReplaceCreateBodyStylePointsItem, z.ZodTypeDef, unknown>;
31
+ out: z.ZodType<External$V1CharacterReplaceCreateBodyStylePointsItem, z.ZodTypeDef, V1CharacterReplaceCreateBodyStylePointsItem>;
32
+ };
@@ -0,0 +1,75 @@
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$V1CharacterReplaceCreateBodyStylePointsItem = void 0;
37
+ const make_api_request_js_1 = require("make-api-request-js");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1CharacterReplaceCreateBodyStylePointsItem
41
+ */
42
+ const SchemaIn$V1CharacterReplaceCreateBodyStylePointsItem = z
43
+ .object({
44
+ position_x: z.number().int(),
45
+ position_y: z.number().int(),
46
+ time_seconds: z.number(),
47
+ })
48
+ .transform((obj) => {
49
+ return (0, make_api_request_js_1.zodTransform)(obj, {
50
+ position_x: "positionX",
51
+ position_y: "positionY",
52
+ time_seconds: "timeSeconds",
53
+ });
54
+ });
55
+ /**
56
+ * @internal
57
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1CharacterReplaceCreateBodyStylePointsItem
58
+ */
59
+ const SchemaOut$V1CharacterReplaceCreateBodyStylePointsItem = z
60
+ .object({
61
+ positionX: z.number().int(),
62
+ positionY: z.number().int(),
63
+ timeSeconds: z.number(),
64
+ })
65
+ .transform((obj) => {
66
+ return (0, make_api_request_js_1.zodTransform)(obj, {
67
+ positionX: "position_x",
68
+ positionY: "position_y",
69
+ timeSeconds: "time_seconds",
70
+ });
71
+ });
72
+ exports.Schemas$V1CharacterReplaceCreateBodyStylePointsItem = {
73
+ in: SchemaIn$V1CharacterReplaceCreateBodyStylePointsItem,
74
+ out: SchemaOut$V1CharacterReplaceCreateBodyStylePointsItem,
75
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject. Defaults to `auto`.
3
+ */
4
+ export type V1CharacterReplaceCreateBodyStyleSelectionModeEnum = "auto" | "point";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ import * as z from "zod";
2
+ import { External$V1CharacterReplaceCreateBodyStylePointsItem, V1CharacterReplaceCreateBodyStylePointsItem } from "./v1-character-replace-create-body-style-points-item";
3
+ /**
4
+ * Optional style controls for replace vs animate mode and subject selection.
5
+ */
6
+ export type V1CharacterReplaceCreateBodyStyle = {
7
+ /**
8
+ * Processing mode. `replace` swaps the detected subject with your reference character. `animate` transfers motion from the video onto your character image.
9
+ */
10
+ mode?: ("animate" | "replace") | undefined;
11
+ /**
12
+ * On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted.
13
+ */
14
+ points?: V1CharacterReplaceCreateBodyStylePointsItem[] | undefined;
15
+ /**
16
+ * How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject. Defaults to `auto`.
17
+ */
18
+ selectionMode?: ("auto" | "point") | undefined;
19
+ };
20
+ /**
21
+ * @internal
22
+ * V1CharacterReplaceCreateBodyStyle without any key transformation, this is what
23
+ * we expect to come in as network data
24
+ */
25
+ export type External$V1CharacterReplaceCreateBodyStyle = {
26
+ mode?: ("animate" | "replace") | undefined;
27
+ points?: External$V1CharacterReplaceCreateBodyStylePointsItem[] | undefined;
28
+ selection_mode?: ("auto" | "point") | undefined;
29
+ };
30
+ export declare const Schemas$V1CharacterReplaceCreateBodyStyle: {
31
+ in: z.ZodType<V1CharacterReplaceCreateBodyStyle, z.ZodTypeDef, unknown>;
32
+ out: z.ZodType<External$V1CharacterReplaceCreateBodyStyle, z.ZodTypeDef, V1CharacterReplaceCreateBodyStyle>;
33
+ };