magic-hour 0.12.1 → 0.14.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 (51) 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-meme-generator/index.d.ts +2 -0
  5. package/dist/resources/v1/ai-meme-generator/index.js +5 -0
  6. package/dist/resources/v1/ai-meme-generator/request-types.d.ts +25 -0
  7. package/dist/resources/v1/ai-meme-generator/request-types.js +72 -0
  8. package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +14 -0
  9. package/dist/resources/v1/ai-meme-generator/resource-client.js +30 -0
  10. package/dist/resources/v1/image-to-video/request-types.d.ts +3 -0
  11. package/dist/resources/v1/index.d.ts +1 -0
  12. package/dist/resources/v1/index.js +2 -1
  13. package/dist/resources/v1/resource-client.d.ts +2 -0
  14. package/dist/resources/v1/resource-client.js +2 -0
  15. package/dist/types/index.d.ts +12 -2
  16. package/dist/types/v1-ai-meme-generator-create-body-style-template-enum.d.ts +4 -0
  17. package/dist/types/v1-ai-meme-generator-create-body-style.d.ts +32 -0
  18. package/dist/types/v1-ai-meme-generator-create-body-style.js +103 -0
  19. package/dist/types/v1-ai-meme-generator-create-body.d.ts +25 -0
  20. package/dist/types/v1-ai-meme-generator-create-body.js +72 -0
  21. package/dist/types/v1-ai-meme-generator-create-response.d.ts +27 -0
  22. package/dist/types/v1-ai-meme-generator-create-response.js +71 -0
  23. package/dist/types/v1-ai-meme-generator-create-response400.d.ts +19 -0
  24. package/dist/types/v1-ai-meme-generator-create-response400.js +67 -0
  25. package/dist/types/v1-ai-meme-generator-create-response401-message-enum.d.ts +4 -0
  26. package/dist/types/v1-ai-meme-generator-create-response401.d.ts +19 -0
  27. package/dist/types/v1-ai-meme-generator-create-response401.js +67 -0
  28. package/dist/types/v1-ai-meme-generator-create-response404-message-enum.d.ts +4 -0
  29. package/dist/types/v1-ai-meme-generator-create-response404-message-enum.js +2 -0
  30. package/dist/types/v1-ai-meme-generator-create-response404.d.ts +19 -0
  31. package/dist/types/v1-ai-meme-generator-create-response404.js +67 -0
  32. package/dist/types/v1-ai-meme-generator-create-response422.d.ts +19 -0
  33. package/dist/types/v1-ai-meme-generator-create-response422.js +67 -0
  34. package/dist/types/v1-image-projects-get-response.d.ts +5 -2
  35. package/dist/types/v1-image-projects-get-response.js +2 -20
  36. package/dist/types/v1-image-to-video-create-body-style-quality-mode-enum.d.ts +5 -0
  37. package/dist/types/v1-image-to-video-create-body-style-quality-mode-enum.js +2 -0
  38. package/dist/types/v1-image-to-video-create-body-style.d.ts +10 -4
  39. package/dist/types/v1-image-to-video-create-body-style.js +6 -2
  40. package/dist/types/v1-image-to-video-create-body.d.ts +3 -0
  41. package/dist/types/v1-text-to-video-create-body-style-quality-mode-enum.d.ts +5 -0
  42. package/dist/types/v1-text-to-video-create-body-style-quality-mode-enum.js +2 -0
  43. package/dist/types/v1-text-to-video-create-body-style.d.ts +6 -0
  44. package/dist/types/v1-text-to-video-create-body-style.js +4 -0
  45. package/dist/types/v1-video-projects-get-response.d.ts +5 -2
  46. package/dist/types/v1-video-projects-get-response.js +2 -20
  47. package/package.json +1 -1
  48. package/dist/types/v1-image-projects-get-response-type-enum.d.ts +0 -4
  49. package/dist/types/v1-video-projects-get-response-type-enum.d.ts +0 -4
  50. /package/dist/types/{v1-image-projects-get-response-type-enum.js → v1-ai-meme-generator-create-body-style-template-enum.js} +0 -0
  51. /package/dist/types/{v1-video-projects-get-response-type-enum.js → v1-ai-meme-generator-create-response401-message-enum.js} +0 -0
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * The request is invalid
4
+ */
5
+ export type V1AiMemeGeneratorCreateResponse400 = {
6
+ message: string;
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiMemeGeneratorCreateResponse400 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiMemeGeneratorCreateResponse400 = {
14
+ message: string;
15
+ };
16
+ export declare const Schemas$V1AiMemeGeneratorCreateResponse400: {
17
+ in: z.ZodType<V1AiMemeGeneratorCreateResponse400, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiMemeGeneratorCreateResponse400, z.ZodTypeDef, V1AiMemeGeneratorCreateResponse400>;
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$V1AiMemeGeneratorCreateResponse400 = 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 V1AiMemeGeneratorCreateResponse400
41
+ */
42
+ const SchemaIn$V1AiMemeGeneratorCreateResponse400 = 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$V1AiMemeGeneratorCreateResponse400
54
+ */
55
+ const SchemaOut$V1AiMemeGeneratorCreateResponse400 = 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$V1AiMemeGeneratorCreateResponse400 = {
65
+ in: SchemaIn$V1AiMemeGeneratorCreateResponse400,
66
+ out: SchemaOut$V1AiMemeGeneratorCreateResponse400,
67
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * V1AiMemeGeneratorCreateResponse401MessageEnum
3
+ */
4
+ export type V1AiMemeGeneratorCreateResponse401MessageEnum = "Unauthorized";
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * The request is not properly authenticated
4
+ */
5
+ export type V1AiMemeGeneratorCreateResponse401 = {
6
+ message: "Unauthorized";
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiMemeGeneratorCreateResponse401 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiMemeGeneratorCreateResponse401 = {
14
+ message: "Unauthorized";
15
+ };
16
+ export declare const Schemas$V1AiMemeGeneratorCreateResponse401: {
17
+ in: z.ZodType<V1AiMemeGeneratorCreateResponse401, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiMemeGeneratorCreateResponse401, z.ZodTypeDef, V1AiMemeGeneratorCreateResponse401>;
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$V1AiMemeGeneratorCreateResponse401 = 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 V1AiMemeGeneratorCreateResponse401
41
+ */
42
+ const SchemaIn$V1AiMemeGeneratorCreateResponse401 = 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$V1AiMemeGeneratorCreateResponse401
54
+ */
55
+ const SchemaOut$V1AiMemeGeneratorCreateResponse401 = 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$V1AiMemeGeneratorCreateResponse401 = {
65
+ in: SchemaIn$V1AiMemeGeneratorCreateResponse401,
66
+ out: SchemaOut$V1AiMemeGeneratorCreateResponse401,
67
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * V1AiMemeGeneratorCreateResponse404MessageEnum
3
+ */
4
+ export type V1AiMemeGeneratorCreateResponse404MessageEnum = "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 V1AiMemeGeneratorCreateResponse404 = {
6
+ message: "Not Found";
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiMemeGeneratorCreateResponse404 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiMemeGeneratorCreateResponse404 = {
14
+ message: "Not Found";
15
+ };
16
+ export declare const Schemas$V1AiMemeGeneratorCreateResponse404: {
17
+ in: z.ZodType<V1AiMemeGeneratorCreateResponse404, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiMemeGeneratorCreateResponse404, z.ZodTypeDef, V1AiMemeGeneratorCreateResponse404>;
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$V1AiMemeGeneratorCreateResponse404 = 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 V1AiMemeGeneratorCreateResponse404
41
+ */
42
+ const SchemaIn$V1AiMemeGeneratorCreateResponse404 = 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$V1AiMemeGeneratorCreateResponse404
54
+ */
55
+ const SchemaOut$V1AiMemeGeneratorCreateResponse404 = 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$V1AiMemeGeneratorCreateResponse404 = {
65
+ in: SchemaIn$V1AiMemeGeneratorCreateResponse404,
66
+ out: SchemaOut$V1AiMemeGeneratorCreateResponse404,
67
+ };
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Unprocessable Entity
4
+ */
5
+ export type V1AiMemeGeneratorCreateResponse422 = {
6
+ message: string;
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiMemeGeneratorCreateResponse422 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiMemeGeneratorCreateResponse422 = {
14
+ message: string;
15
+ };
16
+ export declare const Schemas$V1AiMemeGeneratorCreateResponse422: {
17
+ in: z.ZodType<V1AiMemeGeneratorCreateResponse422, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiMemeGeneratorCreateResponse422, z.ZodTypeDef, V1AiMemeGeneratorCreateResponse422>;
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$V1AiMemeGeneratorCreateResponse422 = 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 V1AiMemeGeneratorCreateResponse422
41
+ */
42
+ const SchemaIn$V1AiMemeGeneratorCreateResponse422 = 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$V1AiMemeGeneratorCreateResponse422
54
+ */
55
+ const SchemaOut$V1AiMemeGeneratorCreateResponse422 = 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$V1AiMemeGeneratorCreateResponse422 = {
65
+ in: SchemaIn$V1AiMemeGeneratorCreateResponse422,
66
+ out: SchemaOut$V1AiMemeGeneratorCreateResponse422,
67
+ };
@@ -35,7 +35,10 @@ export type V1ImageProjectsGetResponse = {
35
35
  * The amount of frames used to generate the image.
36
36
  */
37
37
  totalFrameCost: number;
38
- type: "AI_HEADSHOT" | "AI_IMAGE" | "BACKGROUND_REMOVER" | "CLOTHES_CHANGER" | "FACE_SWAP" | "IMAGE_UPSCALER" | "PHOTO_EDITOR" | "QR_CODE";
38
+ /**
39
+ * The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER
40
+ */
41
+ type: string;
39
42
  };
40
43
  /**
41
44
  * @internal
@@ -52,7 +55,7 @@ export type External$V1ImageProjectsGetResponse = {
52
55
  name: string | null;
53
56
  status: "canceled" | "complete" | "draft" | "error" | "queued" | "rendering";
54
57
  total_frame_cost: number;
55
- type: "AI_HEADSHOT" | "AI_IMAGE" | "BACKGROUND_REMOVER" | "CLOTHES_CHANGER" | "FACE_SWAP" | "IMAGE_UPSCALER" | "PHOTO_EDITOR" | "QR_CODE";
58
+ type: string;
56
59
  };
57
60
  export declare const Schemas$V1ImageProjectsGetResponse: {
58
61
  in: z.ZodType<V1ImageProjectsGetResponse, z.ZodTypeDef, unknown>;
@@ -59,16 +59,7 @@ const SchemaIn$V1ImageProjectsGetResponse = z
59
59
  "rendering",
60
60
  ]),
61
61
  total_frame_cost: z.number().int(),
62
- type: z.enum([
63
- "AI_HEADSHOT",
64
- "AI_IMAGE",
65
- "BACKGROUND_REMOVER",
66
- "CLOTHES_CHANGER",
67
- "FACE_SWAP",
68
- "IMAGE_UPSCALER",
69
- "PHOTO_EDITOR",
70
- "QR_CODE",
71
- ]),
62
+ type: z.string(),
72
63
  })
73
64
  .transform((obj) => {
74
65
  return (0, core_1.zodTransform)(obj, {
@@ -106,16 +97,7 @@ const SchemaOut$V1ImageProjectsGetResponse = z
106
97
  "rendering",
107
98
  ]),
108
99
  totalFrameCost: z.number().int(),
109
- type: z.enum([
110
- "AI_HEADSHOT",
111
- "AI_IMAGE",
112
- "BACKGROUND_REMOVER",
113
- "CLOTHES_CHANGER",
114
- "FACE_SWAP",
115
- "IMAGE_UPSCALER",
116
- "PHOTO_EDITOR",
117
- "QR_CODE",
118
- ]),
100
+ type: z.string(),
119
101
  })
120
102
  .transform((obj) => {
121
103
  return (0, core_1.zodTransform)(obj, {
@@ -0,0 +1,5 @@
1
+ /**
2
+ * * `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
3
+ * * `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
4
+ */
5
+ export type V1ImageToVideoCreateBodyStyleQualityModeEnum = "quick" | "studio";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +1,21 @@
1
1
  import * as z from "zod";
2
2
  /**
3
- * V1ImageToVideoCreateBodyStyle
3
+ * Attributed used to dictate the style of the output
4
4
  */
5
5
  export type V1ImageToVideoCreateBodyStyle = {
6
6
  /**
7
- * High Quality mode enhances detail, sharpness, and realism, making it ideal for portraits, animals, and intricate landscapes.
7
+ * Deprecated: Please use `quality_mode` instead. For backward compatibility, setting `high_quality: true` and `quality_mode: quick` will map to `quality_mode: studio`. Note: `quality_mode: studio` offers the same quality as `high_quality: true`.
8
8
  */
9
9
  highQuality?: boolean | undefined;
10
10
  /**
11
11
  * The prompt used for the video.
12
12
  */
13
- prompt: string | null;
13
+ prompt?: string | undefined;
14
+ /**
15
+ * * `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
16
+ * * `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
17
+ */
18
+ qualityMode?: ("quick" | "studio") | undefined;
14
19
  };
15
20
  /**
16
21
  * @internal
@@ -19,7 +24,8 @@ export type V1ImageToVideoCreateBodyStyle = {
19
24
  */
20
25
  export type External$V1ImageToVideoCreateBodyStyle = {
21
26
  high_quality?: boolean | undefined;
22
- prompt: string | null;
27
+ prompt?: string | undefined;
28
+ quality_mode?: ("quick" | "studio") | undefined;
23
29
  };
24
30
  export declare const Schemas$V1ImageToVideoCreateBodyStyle: {
25
31
  in: z.ZodType<V1ImageToVideoCreateBodyStyle, z.ZodTypeDef, unknown>;
@@ -42,12 +42,14 @@ const z = __importStar(require("zod"));
42
42
  const SchemaIn$V1ImageToVideoCreateBodyStyle = z
43
43
  .object({
44
44
  high_quality: z.boolean().optional(),
45
- prompt: z.string().nullable(),
45
+ prompt: z.string().optional(),
46
+ quality_mode: z.enum(["quick", "studio"]).optional(),
46
47
  })
47
48
  .transform((obj) => {
48
49
  return (0, core_1.zodTransform)(obj, {
49
50
  high_quality: "highQuality",
50
51
  prompt: "prompt",
52
+ quality_mode: "qualityMode",
51
53
  });
52
54
  });
53
55
  /**
@@ -57,12 +59,14 @@ const SchemaIn$V1ImageToVideoCreateBodyStyle = z
57
59
  const SchemaOut$V1ImageToVideoCreateBodyStyle = z
58
60
  .object({
59
61
  highQuality: z.boolean().optional(),
60
- prompt: z.string().nullable(),
62
+ prompt: z.string().optional(),
63
+ qualityMode: z.enum(["quick", "studio"]).optional(),
61
64
  })
62
65
  .transform((obj) => {
63
66
  return (0, core_1.zodTransform)(obj, {
64
67
  highQuality: "high_quality",
65
68
  prompt: "prompt",
69
+ qualityMode: "quality_mode",
66
70
  });
67
71
  });
68
72
  exports.Schemas$V1ImageToVideoCreateBodyStyle = {
@@ -21,6 +21,9 @@ export type V1ImageToVideoCreateBody = {
21
21
  * The name of video
22
22
  */
23
23
  name?: string | undefined;
24
+ /**
25
+ * Attributed used to dictate the style of the output
26
+ */
24
27
  style: V1ImageToVideoCreateBodyStyle;
25
28
  /**
26
29
  * The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * * `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
3
+ * * `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
4
+ */
5
+ export type V1TextToVideoCreateBodyStyleQualityModeEnum = "quick" | "studio";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,11 @@ export type V1TextToVideoCreateBodyStyle = {
7
7
  * The prompt used for the video.
8
8
  */
9
9
  prompt: string;
10
+ /**
11
+ * * `quick` - Fastest option for rapid results. Takes ~3 minutes per 5s of video.
12
+ * * `studio` - Polished visuals with longer runtime. Takes ~8.5 minutes per 5s of video.
13
+ */
14
+ qualityMode?: ("quick" | "studio") | undefined;
10
15
  };
11
16
  /**
12
17
  * @internal
@@ -15,6 +20,7 @@ export type V1TextToVideoCreateBodyStyle = {
15
20
  */
16
21
  export type External$V1TextToVideoCreateBodyStyle = {
17
22
  prompt: string;
23
+ quality_mode?: ("quick" | "studio") | undefined;
18
24
  };
19
25
  export declare const Schemas$V1TextToVideoCreateBodyStyle: {
20
26
  in: z.ZodType<V1TextToVideoCreateBodyStyle, z.ZodTypeDef, unknown>;
@@ -42,10 +42,12 @@ const z = __importStar(require("zod"));
42
42
  const SchemaIn$V1TextToVideoCreateBodyStyle = z
43
43
  .object({
44
44
  prompt: z.string(),
45
+ quality_mode: z.enum(["quick", "studio"]).optional(),
45
46
  })
46
47
  .transform((obj) => {
47
48
  return (0, core_1.zodTransform)(obj, {
48
49
  prompt: "prompt",
50
+ quality_mode: "qualityMode",
49
51
  });
50
52
  });
51
53
  /**
@@ -55,10 +57,12 @@ const SchemaIn$V1TextToVideoCreateBodyStyle = z
55
57
  const SchemaOut$V1TextToVideoCreateBodyStyle = z
56
58
  .object({
57
59
  prompt: z.string(),
60
+ qualityMode: z.enum(["quick", "studio"]).optional(),
58
61
  })
59
62
  .transform((obj) => {
60
63
  return (0, core_1.zodTransform)(obj, {
61
64
  prompt: "prompt",
65
+ qualityMode: "quality_mode",
62
66
  });
63
67
  });
64
68
  exports.Schemas$V1TextToVideoCreateBodyStyle = {
@@ -52,7 +52,10 @@ export type V1VideoProjectsGetResponse = {
52
52
  * 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.
53
53
  */
54
54
  totalFrameCost: number;
55
- type: "ANIMATION" | "AUTO_SUBTITLE" | "FACE_SWAP" | "IMAGE_TO_VIDEO" | "LIP_SYNC" | "TALKING_PHOTO" | "TEXT_TO_VIDEO" | "VIDEO_TO_VIDEO";
55
+ /**
56
+ * The type of the video project. Possible values are ANIMATION, IMAGE_TO_VIDEO, VIDEO_TO_VIDEO, TEXT_TO_VIDEO, FACE_SWAP, LIP_SYNC, AUTO_SUBTITLE, TALKING_PHOTO
57
+ */
58
+ type: string;
56
59
  /**
57
60
  * The width of the final output video. A value of -1 indicates the width can be ignored.
58
61
  */
@@ -77,7 +80,7 @@ export type External$V1VideoProjectsGetResponse = {
77
80
  start_seconds: number;
78
81
  status: "canceled" | "complete" | "draft" | "error" | "queued" | "rendering";
79
82
  total_frame_cost: number;
80
- type: "ANIMATION" | "AUTO_SUBTITLE" | "FACE_SWAP" | "IMAGE_TO_VIDEO" | "LIP_SYNC" | "TALKING_PHOTO" | "TEXT_TO_VIDEO" | "VIDEO_TO_VIDEO";
83
+ type: string;
81
84
  width: number;
82
85
  };
83
86
  export declare const Schemas$V1VideoProjectsGetResponse: {
@@ -64,16 +64,7 @@ const SchemaIn$V1VideoProjectsGetResponse = z
64
64
  "rendering",
65
65
  ]),
66
66
  total_frame_cost: z.number().int(),
67
- type: z.enum([
68
- "ANIMATION",
69
- "AUTO_SUBTITLE",
70
- "FACE_SWAP",
71
- "IMAGE_TO_VIDEO",
72
- "LIP_SYNC",
73
- "TALKING_PHOTO",
74
- "TEXT_TO_VIDEO",
75
- "VIDEO_TO_VIDEO",
76
- ]),
67
+ type: z.string(),
77
68
  width: z.number().int(),
78
69
  })
79
70
  .transform((obj) => {
@@ -121,16 +112,7 @@ const SchemaOut$V1VideoProjectsGetResponse = z
121
112
  "rendering",
122
113
  ]),
123
114
  totalFrameCost: z.number().int(),
124
- type: z.enum([
125
- "ANIMATION",
126
- "AUTO_SUBTITLE",
127
- "FACE_SWAP",
128
- "IMAGE_TO_VIDEO",
129
- "LIP_SYNC",
130
- "TALKING_PHOTO",
131
- "TEXT_TO_VIDEO",
132
- "VIDEO_TO_VIDEO",
133
- ]),
115
+ type: z.string(),
134
116
  width: z.number().int(),
135
117
  })
136
118
  .transform((obj) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.12.1",
3
+ "version": "0.14.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -1,4 +0,0 @@
1
- /**
2
- * V1ImageProjectsGetResponseTypeEnum
3
- */
4
- export type V1ImageProjectsGetResponseTypeEnum = "AI_HEADSHOT" | "AI_IMAGE" | "BACKGROUND_REMOVER" | "CLOTHES_CHANGER" | "FACE_SWAP" | "IMAGE_UPSCALER" | "PHOTO_EDITOR" | "QR_CODE";
@@ -1,4 +0,0 @@
1
- /**
2
- * V1VideoProjectsGetResponseTypeEnum
3
- */
4
- export type V1VideoProjectsGetResponseTypeEnum = "ANIMATION" | "AUTO_SUBTITLE" | "FACE_SWAP" | "IMAGE_TO_VIDEO" | "LIP_SYNC" | "TALKING_PHOTO" | "TEXT_TO_VIDEO" | "VIDEO_TO_VIDEO";