magic-hour 0.15.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 (39) 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/index.d.ts +1 -0
  11. package/dist/resources/v1/index.js +2 -1
  12. package/dist/resources/v1/lip-sync/request-types.d.ts +20 -6
  13. package/dist/resources/v1/lip-sync/request-types.js +4 -4
  14. package/dist/resources/v1/resource-client.d.ts +2 -0
  15. package/dist/resources/v1/resource-client.js +2 -0
  16. package/dist/types/index.d.ts +10 -0
  17. package/dist/types/v1-ai-face-editor-create-body-assets.d.ts +22 -0
  18. package/dist/types/v1-ai-face-editor-create-body-assets.js +67 -0
  19. package/dist/types/v1-ai-face-editor-create-body-style.d.ts +92 -0
  20. package/dist/types/v1-ai-face-editor-create-body-style.js +123 -0
  21. package/dist/types/v1-ai-face-editor-create-body.d.ts +34 -0
  22. package/dist/types/v1-ai-face-editor-create-body.js +77 -0
  23. package/dist/types/v1-ai-face-editor-create-response.d.ts +27 -0
  24. package/dist/types/v1-ai-face-editor-create-response.js +71 -0
  25. package/dist/types/v1-ai-face-editor-create-response400.d.ts +19 -0
  26. package/dist/types/v1-ai-face-editor-create-response400.js +67 -0
  27. package/dist/types/v1-ai-face-editor-create-response401-message-enum.d.ts +4 -0
  28. package/dist/types/v1-ai-face-editor-create-response401-message-enum.js +2 -0
  29. package/dist/types/v1-ai-face-editor-create-response401.d.ts +19 -0
  30. package/dist/types/v1-ai-face-editor-create-response401.js +67 -0
  31. package/dist/types/v1-ai-face-editor-create-response404-message-enum.d.ts +4 -0
  32. package/dist/types/v1-ai-face-editor-create-response404-message-enum.js +2 -0
  33. package/dist/types/v1-ai-face-editor-create-response404.d.ts +19 -0
  34. package/dist/types/v1-ai-face-editor-create-response404.js +67 -0
  35. package/dist/types/v1-ai-face-editor-create-response422.d.ts +19 -0
  36. package/dist/types/v1-ai-face-editor-create-response422.js +67 -0
  37. package/dist/types/v1-lip-sync-create-body.d.ts +20 -6
  38. package/dist/types/v1-lip-sync-create-body.js +4 -4
  39. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ import { External$V1AiFaceEditorCreateBodyAssets, V1AiFaceEditorCreateBodyAssets } from "./v1-ai-face-editor-create-body-assets";
2
+ import { External$V1AiFaceEditorCreateBodyStyle, V1AiFaceEditorCreateBodyStyle } from "./v1-ai-face-editor-create-body-style";
3
+ import * as z from "zod";
4
+ /**
5
+ * V1AiFaceEditorCreateBody
6
+ */
7
+ export type V1AiFaceEditorCreateBody = {
8
+ /**
9
+ * Provide the assets for face editor
10
+ */
11
+ assets: V1AiFaceEditorCreateBodyAssets;
12
+ /**
13
+ * The name of image
14
+ */
15
+ name?: string | undefined;
16
+ /**
17
+ * Face editing parameters
18
+ */
19
+ style: V1AiFaceEditorCreateBodyStyle;
20
+ };
21
+ /**
22
+ * @internal
23
+ * V1AiFaceEditorCreateBody without any key transformation, this is what
24
+ * we expect to come in as network data
25
+ */
26
+ export type External$V1AiFaceEditorCreateBody = {
27
+ assets: External$V1AiFaceEditorCreateBodyAssets;
28
+ name?: string | undefined;
29
+ style: External$V1AiFaceEditorCreateBodyStyle;
30
+ };
31
+ export declare const Schemas$V1AiFaceEditorCreateBody: {
32
+ in: z.ZodType<V1AiFaceEditorCreateBody, z.ZodTypeDef, unknown>;
33
+ out: z.ZodType<External$V1AiFaceEditorCreateBody, z.ZodTypeDef, V1AiFaceEditorCreateBody>;
34
+ };
@@ -0,0 +1,77 @@
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$V1AiFaceEditorCreateBody = void 0;
37
+ const v1_ai_face_editor_create_body_assets_1 = require("./v1-ai-face-editor-create-body-assets");
38
+ const v1_ai_face_editor_create_body_style_1 = require("./v1-ai-face-editor-create-body-style");
39
+ const core_1 = require("../core");
40
+ const z = __importStar(require("zod"));
41
+ /**
42
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiFaceEditorCreateBody
43
+ */
44
+ const SchemaIn$V1AiFaceEditorCreateBody = z
45
+ .object({
46
+ assets: v1_ai_face_editor_create_body_assets_1.Schemas$V1AiFaceEditorCreateBodyAssets.in,
47
+ name: z.string().optional(),
48
+ style: v1_ai_face_editor_create_body_style_1.Schemas$V1AiFaceEditorCreateBodyStyle.in,
49
+ })
50
+ .transform((obj) => {
51
+ return (0, core_1.zodTransform)(obj, {
52
+ assets: "assets",
53
+ name: "name",
54
+ style: "style",
55
+ });
56
+ });
57
+ /**
58
+ * @internal
59
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiFaceEditorCreateBody
60
+ */
61
+ const SchemaOut$V1AiFaceEditorCreateBody = z
62
+ .object({
63
+ assets: v1_ai_face_editor_create_body_assets_1.Schemas$V1AiFaceEditorCreateBodyAssets.out,
64
+ name: z.string().optional(),
65
+ style: v1_ai_face_editor_create_body_style_1.Schemas$V1AiFaceEditorCreateBodyStyle.out,
66
+ })
67
+ .transform((obj) => {
68
+ return (0, core_1.zodTransform)(obj, {
69
+ assets: "assets",
70
+ name: "name",
71
+ style: "style",
72
+ });
73
+ });
74
+ exports.Schemas$V1AiFaceEditorCreateBody = {
75
+ in: SchemaIn$V1AiFaceEditorCreateBody,
76
+ out: SchemaOut$V1AiFaceEditorCreateBody,
77
+ };
@@ -0,0 +1,27 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Success
4
+ */
5
+ export type V1AiFaceEditorCreateResponse = {
6
+ /**
7
+ * The frame cost of the image generation
8
+ */
9
+ frameCost: number;
10
+ /**
11
+ * Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
12
+ */
13
+ id: string;
14
+ };
15
+ /**
16
+ * @internal
17
+ * V1AiFaceEditorCreateResponse without any key transformation, this is what
18
+ * we expect to come in as network data
19
+ */
20
+ export type External$V1AiFaceEditorCreateResponse = {
21
+ frame_cost: number;
22
+ id: string;
23
+ };
24
+ export declare const Schemas$V1AiFaceEditorCreateResponse: {
25
+ in: z.ZodType<V1AiFaceEditorCreateResponse, z.ZodTypeDef, unknown>;
26
+ out: z.ZodType<External$V1AiFaceEditorCreateResponse, z.ZodTypeDef, V1AiFaceEditorCreateResponse>;
27
+ };
@@ -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$V1AiFaceEditorCreateResponse = 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 V1AiFaceEditorCreateResponse
41
+ */
42
+ const SchemaIn$V1AiFaceEditorCreateResponse = z
43
+ .object({
44
+ frame_cost: z.number().int(),
45
+ id: z.string(),
46
+ })
47
+ .transform((obj) => {
48
+ return (0, core_1.zodTransform)(obj, {
49
+ frame_cost: "frameCost",
50
+ id: "id",
51
+ });
52
+ });
53
+ /**
54
+ * @internal
55
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiFaceEditorCreateResponse
56
+ */
57
+ const SchemaOut$V1AiFaceEditorCreateResponse = z
58
+ .object({
59
+ frameCost: z.number().int(),
60
+ id: z.string(),
61
+ })
62
+ .transform((obj) => {
63
+ return (0, core_1.zodTransform)(obj, {
64
+ frameCost: "frame_cost",
65
+ id: "id",
66
+ });
67
+ });
68
+ exports.Schemas$V1AiFaceEditorCreateResponse = {
69
+ in: SchemaIn$V1AiFaceEditorCreateResponse,
70
+ out: SchemaOut$V1AiFaceEditorCreateResponse,
71
+ };
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * The request is invalid
4
+ */
5
+ export type V1AiFaceEditorCreateResponse400 = {
6
+ message: string;
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiFaceEditorCreateResponse400 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiFaceEditorCreateResponse400 = {
14
+ message: string;
15
+ };
16
+ export declare const Schemas$V1AiFaceEditorCreateResponse400: {
17
+ in: z.ZodType<V1AiFaceEditorCreateResponse400, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiFaceEditorCreateResponse400, z.ZodTypeDef, V1AiFaceEditorCreateResponse400>;
19
+ };
@@ -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$V1AiFaceEditorCreateResponse400 = 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 V1AiFaceEditorCreateResponse400
41
+ */
42
+ const SchemaIn$V1AiFaceEditorCreateResponse400 = 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$V1AiFaceEditorCreateResponse400
54
+ */
55
+ const SchemaOut$V1AiFaceEditorCreateResponse400 = 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$V1AiFaceEditorCreateResponse400 = {
65
+ in: SchemaIn$V1AiFaceEditorCreateResponse400,
66
+ out: SchemaOut$V1AiFaceEditorCreateResponse400,
67
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * V1AiFaceEditorCreateResponse401MessageEnum
3
+ */
4
+ export type V1AiFaceEditorCreateResponse401MessageEnum = "Unauthorized";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * The request is not properly authenticated
4
+ */
5
+ export type V1AiFaceEditorCreateResponse401 = {
6
+ message: "Unauthorized";
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiFaceEditorCreateResponse401 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiFaceEditorCreateResponse401 = {
14
+ message: "Unauthorized";
15
+ };
16
+ export declare const Schemas$V1AiFaceEditorCreateResponse401: {
17
+ in: z.ZodType<V1AiFaceEditorCreateResponse401, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiFaceEditorCreateResponse401, z.ZodTypeDef, V1AiFaceEditorCreateResponse401>;
19
+ };
@@ -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$V1AiFaceEditorCreateResponse401 = 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 V1AiFaceEditorCreateResponse401
41
+ */
42
+ const SchemaIn$V1AiFaceEditorCreateResponse401 = z
43
+ .object({
44
+ message: z.enum(["Unauthorized"]),
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$V1AiFaceEditorCreateResponse401
54
+ */
55
+ const SchemaOut$V1AiFaceEditorCreateResponse401 = z
56
+ .object({
57
+ message: z.enum(["Unauthorized"]),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, core_1.zodTransform)(obj, {
61
+ message: "message",
62
+ });
63
+ });
64
+ exports.Schemas$V1AiFaceEditorCreateResponse401 = {
65
+ in: SchemaIn$V1AiFaceEditorCreateResponse401,
66
+ out: SchemaOut$V1AiFaceEditorCreateResponse401,
67
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * V1AiFaceEditorCreateResponse404MessageEnum
3
+ */
4
+ export type V1AiFaceEditorCreateResponse404MessageEnum = "Not Found";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Requested resource is not found
4
+ */
5
+ export type V1AiFaceEditorCreateResponse404 = {
6
+ message: "Not Found";
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiFaceEditorCreateResponse404 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiFaceEditorCreateResponse404 = {
14
+ message: "Not Found";
15
+ };
16
+ export declare const Schemas$V1AiFaceEditorCreateResponse404: {
17
+ in: z.ZodType<V1AiFaceEditorCreateResponse404, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiFaceEditorCreateResponse404, z.ZodTypeDef, V1AiFaceEditorCreateResponse404>;
19
+ };
@@ -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$V1AiFaceEditorCreateResponse404 = 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 V1AiFaceEditorCreateResponse404
41
+ */
42
+ const SchemaIn$V1AiFaceEditorCreateResponse404 = z
43
+ .object({
44
+ message: z.enum(["Not Found"]),
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$V1AiFaceEditorCreateResponse404
54
+ */
55
+ const SchemaOut$V1AiFaceEditorCreateResponse404 = z
56
+ .object({
57
+ message: z.enum(["Not Found"]),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, core_1.zodTransform)(obj, {
61
+ message: "message",
62
+ });
63
+ });
64
+ exports.Schemas$V1AiFaceEditorCreateResponse404 = {
65
+ in: SchemaIn$V1AiFaceEditorCreateResponse404,
66
+ out: SchemaOut$V1AiFaceEditorCreateResponse404,
67
+ };
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Unprocessable Entity
4
+ */
5
+ export type V1AiFaceEditorCreateResponse422 = {
6
+ message: string;
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiFaceEditorCreateResponse422 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiFaceEditorCreateResponse422 = {
14
+ message: string;
15
+ };
16
+ export declare const Schemas$V1AiFaceEditorCreateResponse422: {
17
+ in: z.ZodType<V1AiFaceEditorCreateResponse422, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiFaceEditorCreateResponse422, z.ZodTypeDef, V1AiFaceEditorCreateResponse422>;
19
+ };
@@ -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 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.15.0",
3
+ "version": "0.16.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {