magic-hour 0.18.0 → 0.20.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 (89) hide show
  1. package/README.md +4 -0
  2. package/dist/client.d.ts +6 -3
  3. package/dist/client.js +8 -2
  4. package/dist/core/core-client.d.ts +10 -1
  5. package/dist/core/core-client.js +17 -7
  6. package/dist/core/index.d.ts +1 -1
  7. package/dist/core/query.d.ts +2 -1
  8. package/dist/core/query.js +1 -1
  9. package/dist/environment.d.ts +1 -1
  10. package/dist/environment.js +1 -1
  11. package/dist/resources/v1/ai-clothes-changer/resource-client.d.ts +2 -2
  12. package/dist/resources/v1/ai-clothes-changer/resource-client.js +2 -2
  13. package/dist/resources/v1/ai-face-editor/resource-client.d.ts +2 -2
  14. package/dist/resources/v1/ai-face-editor/resource-client.js +2 -2
  15. package/dist/resources/v1/ai-gif-generator/index.d.ts +2 -0
  16. package/dist/resources/v1/ai-gif-generator/index.js +5 -0
  17. package/dist/resources/v1/ai-gif-generator/request-types.d.ts +25 -0
  18. package/dist/resources/v1/ai-gif-generator/request-types.js +72 -0
  19. package/dist/resources/v1/ai-gif-generator/resource-client.d.ts +14 -0
  20. package/dist/resources/v1/ai-gif-generator/resource-client.js +30 -0
  21. package/dist/resources/v1/ai-headshot-generator/resource-client.d.ts +2 -2
  22. package/dist/resources/v1/ai-headshot-generator/resource-client.js +2 -2
  23. package/dist/resources/v1/ai-image-generator/resource-client.d.ts +2 -2
  24. package/dist/resources/v1/ai-image-generator/resource-client.js +2 -2
  25. package/dist/resources/v1/ai-image-upscaler/resource-client.d.ts +2 -2
  26. package/dist/resources/v1/ai-image-upscaler/resource-client.js +2 -2
  27. package/dist/resources/v1/ai-meme-generator/resource-client.d.ts +2 -2
  28. package/dist/resources/v1/ai-meme-generator/resource-client.js +2 -2
  29. package/dist/resources/v1/ai-photo-editor/resource-client.d.ts +2 -2
  30. package/dist/resources/v1/ai-photo-editor/resource-client.js +2 -2
  31. package/dist/resources/v1/ai-qr-code-generator/resource-client.d.ts +2 -2
  32. package/dist/resources/v1/ai-qr-code-generator/resource-client.js +2 -2
  33. package/dist/resources/v1/ai-talking-photo/resource-client.d.ts +2 -2
  34. package/dist/resources/v1/ai-talking-photo/resource-client.js +2 -2
  35. package/dist/resources/v1/animation/resource-client.d.ts +2 -2
  36. package/dist/resources/v1/animation/resource-client.js +2 -2
  37. package/dist/resources/v1/face-swap/resource-client.d.ts +2 -2
  38. package/dist/resources/v1/face-swap/resource-client.js +2 -2
  39. package/dist/resources/v1/face-swap-photo/resource-client.d.ts +2 -2
  40. package/dist/resources/v1/face-swap-photo/resource-client.js +2 -2
  41. package/dist/resources/v1/files/resource-client.d.ts +4 -3
  42. package/dist/resources/v1/files/resource-client.js +9 -4
  43. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +2 -2
  44. package/dist/resources/v1/files/upload-urls/resource-client.js +2 -2
  45. package/dist/resources/v1/image-background-remover/resource-client.d.ts +2 -2
  46. package/dist/resources/v1/image-background-remover/resource-client.js +2 -2
  47. package/dist/resources/v1/image-projects/resource-client.d.ts +10 -10
  48. package/dist/resources/v1/image-projects/resource-client.js +18 -18
  49. package/dist/resources/v1/image-to-video/resource-client.d.ts +2 -2
  50. package/dist/resources/v1/image-to-video/resource-client.js +2 -2
  51. package/dist/resources/v1/index.d.ts +1 -0
  52. package/dist/resources/v1/index.js +2 -1
  53. package/dist/resources/v1/lip-sync/resource-client.d.ts +2 -2
  54. package/dist/resources/v1/lip-sync/resource-client.js +2 -2
  55. package/dist/resources/v1/photo-colorizer/resource-client.d.ts +2 -2
  56. package/dist/resources/v1/photo-colorizer/resource-client.js +2 -2
  57. package/dist/resources/v1/resource-client.d.ts +47 -23
  58. package/dist/resources/v1/resource-client.js +132 -44
  59. package/dist/resources/v1/text-to-video/resource-client.d.ts +2 -2
  60. package/dist/resources/v1/text-to-video/resource-client.js +2 -2
  61. package/dist/resources/v1/video-projects/resource-client.d.ts +10 -10
  62. package/dist/resources/v1/video-projects/resource-client.js +18 -18
  63. package/dist/resources/v1/video-to-video/request-types.d.ts +20 -6
  64. package/dist/resources/v1/video-to-video/request-types.js +4 -4
  65. package/dist/resources/v1/video-to-video/resource-client.d.ts +2 -2
  66. package/dist/resources/v1/video-to-video/resource-client.js +2 -2
  67. package/dist/types/index.d.ts +9 -0
  68. package/dist/types/v1-ai-gif-generator-create-body-style.d.ts +22 -0
  69. package/dist/types/v1-ai-gif-generator-create-body-style.js +67 -0
  70. package/dist/types/v1-ai-gif-generator-create-body.d.ts +25 -0
  71. package/dist/types/v1-ai-gif-generator-create-body.js +72 -0
  72. package/dist/types/v1-ai-gif-generator-create-response.d.ts +27 -0
  73. package/dist/types/v1-ai-gif-generator-create-response.js +71 -0
  74. package/dist/types/v1-ai-gif-generator-create-response400.d.ts +19 -0
  75. package/dist/types/v1-ai-gif-generator-create-response400.js +67 -0
  76. package/dist/types/v1-ai-gif-generator-create-response401-message-enum.d.ts +4 -0
  77. package/dist/types/v1-ai-gif-generator-create-response401-message-enum.js +2 -0
  78. package/dist/types/v1-ai-gif-generator-create-response401.d.ts +19 -0
  79. package/dist/types/v1-ai-gif-generator-create-response401.js +67 -0
  80. package/dist/types/v1-ai-gif-generator-create-response404-message-enum.d.ts +4 -0
  81. package/dist/types/v1-ai-gif-generator-create-response404-message-enum.js +2 -0
  82. package/dist/types/v1-ai-gif-generator-create-response404.d.ts +19 -0
  83. package/dist/types/v1-ai-gif-generator-create-response404.js +67 -0
  84. package/dist/types/v1-ai-gif-generator-create-response422.d.ts +19 -0
  85. package/dist/types/v1-ai-gif-generator-create-response422.js +67 -0
  86. package/dist/types/v1-image-projects-get-response.d.ts +1 -1
  87. package/dist/types/v1-video-to-video-create-body.d.ts +20 -6
  88. package/dist/types/v1-video-to-video-create-body.js +4 -4
  89. package/package.json +1 -1
@@ -4,8 +4,24 @@ exports.VideoProjectsClient = void 0;
4
4
  const core_1 = require("../../../core");
5
5
  const v1_video_projects_get_response_1 = require("../../../types/v1-video-projects-get-response");
6
6
  class VideoProjectsClient extends core_1.CoreResourceClient {
7
- constructor(client) {
8
- super(client);
7
+ constructor(coreClient, opts) {
8
+ super(coreClient, opts);
9
+ }
10
+ /**
11
+ * Delete video
12
+ *
13
+ * Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
14
+ *
15
+ * DELETE /v1/video-projects/{id}
16
+ */
17
+ delete(request, opts) {
18
+ return this._client.makeRequest({
19
+ method: "delete",
20
+ path: `/v1/video-projects/${request.id}`,
21
+ auth: ["bearerAuth"],
22
+ responseRaw: true,
23
+ opts,
24
+ });
9
25
  }
10
26
  /**
11
27
  * Get video details
@@ -32,21 +48,5 @@ class VideoProjectsClient extends core_1.CoreResourceClient {
32
48
  opts,
33
49
  });
34
50
  }
35
- /**
36
- * Delete video
37
- *
38
- * Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
39
- *
40
- * DELETE /v1/video-projects/{id}
41
- */
42
- delete(request, opts) {
43
- return this._client.makeRequest({
44
- method: "delete",
45
- path: `/v1/video-projects/${request.id}`,
46
- auth: ["bearerAuth"],
47
- responseRaw: true,
48
- opts,
49
- });
50
- }
51
51
  }
52
52
  exports.VideoProjectsClient = VideoProjectsClient;
@@ -20,9 +20,16 @@ export type CreateRequest = {
20
20
  */
21
21
  fpsResolution?: ("FULL" | "HALF") | undefined;
22
22
  /**
23
- * The height of the final output video. Must be divisible by 64. The maximum height depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
23
+ * Used to determine the dimensions of the output video.
24
+ *
25
+ * * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
26
+ * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
27
+ *
28
+ * Note: if the video's original resolution is less than the maximum, the video will not be resized.
29
+ *
30
+ * See our [pricing page](https://magichour.ai/pricing) for more details.
24
31
  */
25
- height: number;
32
+ height?: number | undefined;
26
33
  /**
27
34
  * The name of video
28
35
  */
@@ -33,9 +40,16 @@ export type CreateRequest = {
33
40
  startSeconds: number;
34
41
  style: V1VideoToVideoCreateBodyStyle;
35
42
  /**
36
- * The width of the final output video. Must be divisible by 64. The maximum width depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
43
+ * Used to determine the dimensions of the output video.
44
+ *
45
+ * * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
46
+ * * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
47
+ *
48
+ * Note: if the video's original resolution is less than the maximum, the video will not be resized.
49
+ *
50
+ * See our [pricing page](https://magichour.ai/pricing) for more details.
37
51
  */
38
- width: number;
52
+ width?: number | undefined;
39
53
  };
40
54
  /**
41
55
  * @internal
@@ -46,11 +60,11 @@ export type External$CreateRequest = {
46
60
  assets: External$V1VideoToVideoCreateBodyAssets;
47
61
  end_seconds: number;
48
62
  fps_resolution?: ("FULL" | "HALF") | undefined;
49
- height: number;
63
+ height?: number | undefined;
50
64
  name?: string | undefined;
51
65
  start_seconds: number;
52
66
  style: External$V1VideoToVideoCreateBodyStyle;
53
- width: number;
67
+ width?: number | undefined;
54
68
  };
55
69
  export declare const Schemas$CreateRequest: {
56
70
  in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
@@ -46,11 +46,11 @@ const SchemaIn$CreateRequest = z
46
46
  assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.in,
47
47
  end_seconds: z.number(),
48
48
  fps_resolution: z.enum(["FULL", "HALF"]).optional(),
49
- height: z.number().int(),
49
+ height: z.number().int().optional(),
50
50
  name: z.string().optional(),
51
51
  start_seconds: z.number(),
52
52
  style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.in,
53
- width: z.number().int(),
53
+ width: z.number().int().optional(),
54
54
  })
55
55
  .transform((obj) => {
56
56
  return (0, core_1.zodTransform)(obj, {
@@ -73,11 +73,11 @@ const SchemaOut$CreateRequest = z
73
73
  assets: v1_video_to_video_create_body_assets_1.Schemas$V1VideoToVideoCreateBodyAssets.out,
74
74
  endSeconds: z.number(),
75
75
  fpsResolution: z.enum(["FULL", "HALF"]).optional(),
76
- height: z.number().int(),
76
+ height: z.number().int().optional(),
77
77
  name: z.string().optional(),
78
78
  startSeconds: z.number(),
79
79
  style: v1_video_to_video_create_body_style_1.Schemas$V1VideoToVideoCreateBodyStyle.out,
80
- width: z.number().int(),
80
+ width: z.number().int().optional(),
81
81
  })
82
82
  .transform((obj) => {
83
83
  return (0, core_1.zodTransform)(obj, {
@@ -1,8 +1,8 @@
1
1
  import { types } from "../../../index.js";
2
- import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions } from "../../../core";
2
+ import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
3
3
  import * as requests from "../../../resources/v1/video-to-video/request-types";
4
4
  export declare class VideoToVideoClient extends CoreResourceClient {
5
- constructor(client: CoreClient);
5
+ constructor(coreClient: CoreClient, opts: ResourceClientOptions);
6
6
  /**
7
7
  * Video-to-Video
8
8
  *
@@ -5,8 +5,8 @@ const core_1 = require("../../../core");
5
5
  const v1_video_to_video_create_body_1 = require("../../../types/v1-video-to-video-create-body");
6
6
  const v1_video_to_video_create_response_1 = require("../../../types/v1-video-to-video-create-response");
7
7
  class VideoToVideoClient extends core_1.CoreResourceClient {
8
- constructor(client) {
9
- super(client);
8
+ constructor(coreClient, opts) {
9
+ super(coreClient, opts);
10
10
  }
11
11
  /**
12
12
  * Video-to-Video
@@ -18,6 +18,15 @@ export { V1AiFaceEditorCreateResponse401MessageEnum } from "./v1-ai-face-editor-
18
18
  export { V1AiFaceEditorCreateResponse404 } from "./v1-ai-face-editor-create-response404";
19
19
  export { V1AiFaceEditorCreateResponse404MessageEnum } from "./v1-ai-face-editor-create-response404-message-enum";
20
20
  export { V1AiFaceEditorCreateResponse422 } from "./v1-ai-face-editor-create-response422";
21
+ export { V1AiGifGeneratorCreateBody } from "./v1-ai-gif-generator-create-body";
22
+ export { V1AiGifGeneratorCreateBodyStyle } from "./v1-ai-gif-generator-create-body-style";
23
+ export { V1AiGifGeneratorCreateResponse } from "./v1-ai-gif-generator-create-response";
24
+ export { V1AiGifGeneratorCreateResponse400 } from "./v1-ai-gif-generator-create-response400";
25
+ export { V1AiGifGeneratorCreateResponse401 } from "./v1-ai-gif-generator-create-response401";
26
+ export { V1AiGifGeneratorCreateResponse401MessageEnum } from "./v1-ai-gif-generator-create-response401-message-enum";
27
+ export { V1AiGifGeneratorCreateResponse404 } from "./v1-ai-gif-generator-create-response404";
28
+ export { V1AiGifGeneratorCreateResponse404MessageEnum } from "./v1-ai-gif-generator-create-response404-message-enum";
29
+ export { V1AiGifGeneratorCreateResponse422 } from "./v1-ai-gif-generator-create-response422";
21
30
  export { V1AiHeadshotGeneratorCreateBody } from "./v1-ai-headshot-generator-create-body";
22
31
  export { V1AiHeadshotGeneratorCreateBodyAssets } from "./v1-ai-headshot-generator-create-body-assets";
23
32
  export { V1AiHeadshotGeneratorCreateBodyStyle } from "./v1-ai-headshot-generator-create-body-style";
@@ -0,0 +1,22 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * V1AiGifGeneratorCreateBodyStyle
4
+ */
5
+ export type V1AiGifGeneratorCreateBodyStyle = {
6
+ /**
7
+ * The prompt used for the GIF.
8
+ */
9
+ prompt: string;
10
+ };
11
+ /**
12
+ * @internal
13
+ * V1AiGifGeneratorCreateBodyStyle without any key transformation, this is what
14
+ * we expect to come in as network data
15
+ */
16
+ export type External$V1AiGifGeneratorCreateBodyStyle = {
17
+ prompt: string;
18
+ };
19
+ export declare const Schemas$V1AiGifGeneratorCreateBodyStyle: {
20
+ in: z.ZodType<V1AiGifGeneratorCreateBodyStyle, z.ZodTypeDef, unknown>;
21
+ out: z.ZodType<External$V1AiGifGeneratorCreateBodyStyle, z.ZodTypeDef, V1AiGifGeneratorCreateBodyStyle>;
22
+ };
@@ -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$V1AiGifGeneratorCreateBodyStyle = 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 V1AiGifGeneratorCreateBodyStyle
41
+ */
42
+ const SchemaIn$V1AiGifGeneratorCreateBodyStyle = z
43
+ .object({
44
+ prompt: z.string(),
45
+ })
46
+ .transform((obj) => {
47
+ return (0, core_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$V1AiGifGeneratorCreateBodyStyle
54
+ */
55
+ const SchemaOut$V1AiGifGeneratorCreateBodyStyle = z
56
+ .object({
57
+ prompt: z.string(),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, core_1.zodTransform)(obj, {
61
+ prompt: "prompt",
62
+ });
63
+ });
64
+ exports.Schemas$V1AiGifGeneratorCreateBodyStyle = {
65
+ in: SchemaIn$V1AiGifGeneratorCreateBodyStyle,
66
+ out: SchemaOut$V1AiGifGeneratorCreateBodyStyle,
67
+ };
@@ -0,0 +1,25 @@
1
+ import { External$V1AiGifGeneratorCreateBodyStyle, V1AiGifGeneratorCreateBodyStyle } from "./v1-ai-gif-generator-create-body-style";
2
+ import * as z from "zod";
3
+ /**
4
+ * V1AiGifGeneratorCreateBody
5
+ */
6
+ export type V1AiGifGeneratorCreateBody = {
7
+ /**
8
+ * The name of gif
9
+ */
10
+ name?: string | undefined;
11
+ style: V1AiGifGeneratorCreateBodyStyle;
12
+ };
13
+ /**
14
+ * @internal
15
+ * V1AiGifGeneratorCreateBody without any key transformation, this is what
16
+ * we expect to come in as network data
17
+ */
18
+ export type External$V1AiGifGeneratorCreateBody = {
19
+ name?: string | undefined;
20
+ style: External$V1AiGifGeneratorCreateBodyStyle;
21
+ };
22
+ export declare const Schemas$V1AiGifGeneratorCreateBody: {
23
+ in: z.ZodType<V1AiGifGeneratorCreateBody, z.ZodTypeDef, unknown>;
24
+ out: z.ZodType<External$V1AiGifGeneratorCreateBody, z.ZodTypeDef, V1AiGifGeneratorCreateBody>;
25
+ };
@@ -0,0 +1,72 @@
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$V1AiGifGeneratorCreateBody = void 0;
37
+ const v1_ai_gif_generator_create_body_style_1 = require("./v1-ai-gif-generator-create-body-style");
38
+ const core_1 = require("../core");
39
+ const z = __importStar(require("zod"));
40
+ /**
41
+ * Takes network data, validates it, and transforms keys to match typescript object V1AiGifGeneratorCreateBody
42
+ */
43
+ const SchemaIn$V1AiGifGeneratorCreateBody = z
44
+ .object({
45
+ name: z.string().optional(),
46
+ style: v1_ai_gif_generator_create_body_style_1.Schemas$V1AiGifGeneratorCreateBodyStyle.in,
47
+ })
48
+ .transform((obj) => {
49
+ return (0, core_1.zodTransform)(obj, {
50
+ name: "name",
51
+ style: "style",
52
+ });
53
+ });
54
+ /**
55
+ * @internal
56
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiGifGeneratorCreateBody
57
+ */
58
+ const SchemaOut$V1AiGifGeneratorCreateBody = z
59
+ .object({
60
+ name: z.string().optional(),
61
+ style: v1_ai_gif_generator_create_body_style_1.Schemas$V1AiGifGeneratorCreateBodyStyle.out,
62
+ })
63
+ .transform((obj) => {
64
+ return (0, core_1.zodTransform)(obj, {
65
+ name: "name",
66
+ style: "style",
67
+ });
68
+ });
69
+ exports.Schemas$V1AiGifGeneratorCreateBody = {
70
+ in: SchemaIn$V1AiGifGeneratorCreateBody,
71
+ out: SchemaOut$V1AiGifGeneratorCreateBody,
72
+ };
@@ -0,0 +1,27 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Success
4
+ */
5
+ export type V1AiGifGeneratorCreateResponse = {
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
+ * V1AiGifGeneratorCreateResponse without any key transformation, this is what
18
+ * we expect to come in as network data
19
+ */
20
+ export type External$V1AiGifGeneratorCreateResponse = {
21
+ frame_cost: number;
22
+ id: string;
23
+ };
24
+ export declare const Schemas$V1AiGifGeneratorCreateResponse: {
25
+ in: z.ZodType<V1AiGifGeneratorCreateResponse, z.ZodTypeDef, unknown>;
26
+ out: z.ZodType<External$V1AiGifGeneratorCreateResponse, z.ZodTypeDef, V1AiGifGeneratorCreateResponse>;
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$V1AiGifGeneratorCreateResponse = 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 V1AiGifGeneratorCreateResponse
41
+ */
42
+ const SchemaIn$V1AiGifGeneratorCreateResponse = 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$V1AiGifGeneratorCreateResponse
56
+ */
57
+ const SchemaOut$V1AiGifGeneratorCreateResponse = 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$V1AiGifGeneratorCreateResponse = {
69
+ in: SchemaIn$V1AiGifGeneratorCreateResponse,
70
+ out: SchemaOut$V1AiGifGeneratorCreateResponse,
71
+ };
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * The request is invalid
4
+ */
5
+ export type V1AiGifGeneratorCreateResponse400 = {
6
+ message: string;
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiGifGeneratorCreateResponse400 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiGifGeneratorCreateResponse400 = {
14
+ message: string;
15
+ };
16
+ export declare const Schemas$V1AiGifGeneratorCreateResponse400: {
17
+ in: z.ZodType<V1AiGifGeneratorCreateResponse400, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiGifGeneratorCreateResponse400, z.ZodTypeDef, V1AiGifGeneratorCreateResponse400>;
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$V1AiGifGeneratorCreateResponse400 = 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 V1AiGifGeneratorCreateResponse400
41
+ */
42
+ const SchemaIn$V1AiGifGeneratorCreateResponse400 = 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$V1AiGifGeneratorCreateResponse400
54
+ */
55
+ const SchemaOut$V1AiGifGeneratorCreateResponse400 = 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$V1AiGifGeneratorCreateResponse400 = {
65
+ in: SchemaIn$V1AiGifGeneratorCreateResponse400,
66
+ out: SchemaOut$V1AiGifGeneratorCreateResponse400,
67
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * V1AiGifGeneratorCreateResponse401MessageEnum
3
+ */
4
+ export type V1AiGifGeneratorCreateResponse401MessageEnum = "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 V1AiGifGeneratorCreateResponse401 = {
6
+ message: "Unauthorized";
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiGifGeneratorCreateResponse401 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiGifGeneratorCreateResponse401 = {
14
+ message: "Unauthorized";
15
+ };
16
+ export declare const Schemas$V1AiGifGeneratorCreateResponse401: {
17
+ in: z.ZodType<V1AiGifGeneratorCreateResponse401, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiGifGeneratorCreateResponse401, z.ZodTypeDef, V1AiGifGeneratorCreateResponse401>;
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$V1AiGifGeneratorCreateResponse401 = 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 V1AiGifGeneratorCreateResponse401
41
+ */
42
+ const SchemaIn$V1AiGifGeneratorCreateResponse401 = 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$V1AiGifGeneratorCreateResponse401
54
+ */
55
+ const SchemaOut$V1AiGifGeneratorCreateResponse401 = 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$V1AiGifGeneratorCreateResponse401 = {
65
+ in: SchemaIn$V1AiGifGeneratorCreateResponse401,
66
+ out: SchemaOut$V1AiGifGeneratorCreateResponse401,
67
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * V1AiGifGeneratorCreateResponse404MessageEnum
3
+ */
4
+ export type V1AiGifGeneratorCreateResponse404MessageEnum = "Not Found";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });