magic-hour 0.24.0 → 0.25.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 (42) hide show
  1. package/README.md +4 -0
  2. package/dist/core/auth.d.ts +11 -26
  3. package/dist/core/auth.js +48 -62
  4. package/dist/core/index.d.ts +1 -1
  5. package/dist/core/index.js +2 -4
  6. package/dist/environment.d.ts +1 -1
  7. package/dist/environment.js +1 -1
  8. package/dist/resources/v1/ai-image-editor/index.d.ts +2 -0
  9. package/dist/resources/v1/ai-image-editor/index.js +5 -0
  10. package/dist/resources/v1/ai-image-editor/request-types.d.ts +31 -0
  11. package/dist/resources/v1/ai-image-editor/request-types.js +77 -0
  12. package/dist/resources/v1/ai-image-editor/resource-client.d.ts +14 -0
  13. package/dist/resources/v1/ai-image-editor/resource-client.js +30 -0
  14. package/dist/resources/v1/files/upload-urls/resource-client.d.ts +3 -4
  15. package/dist/resources/v1/files/upload-urls/resource-client.js +3 -4
  16. package/dist/resources/v1/index.d.ts +1 -0
  17. package/dist/resources/v1/index.js +2 -1
  18. package/dist/resources/v1/resource-client.d.ts +3 -0
  19. package/dist/resources/v1/resource-client.js +6 -0
  20. package/dist/types/index.d.ts +10 -0
  21. package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +22 -0
  22. package/dist/types/v1-ai-image-editor-create-body-assets.js +67 -0
  23. package/dist/types/v1-ai-image-editor-create-body-style.d.ts +22 -0
  24. package/dist/types/v1-ai-image-editor-create-body-style.js +67 -0
  25. package/dist/types/v1-ai-image-editor-create-body.d.ts +31 -0
  26. package/dist/types/v1-ai-image-editor-create-body.js +77 -0
  27. package/dist/types/v1-ai-image-editor-create-response.d.ts +34 -0
  28. package/dist/types/v1-ai-image-editor-create-response.js +75 -0
  29. package/dist/types/v1-ai-image-editor-create-response400.d.ts +19 -0
  30. package/dist/types/v1-ai-image-editor-create-response400.js +67 -0
  31. package/dist/types/v1-ai-image-editor-create-response401-message-enum.d.ts +4 -0
  32. package/dist/types/v1-ai-image-editor-create-response401-message-enum.js +2 -0
  33. package/dist/types/v1-ai-image-editor-create-response401.d.ts +19 -0
  34. package/dist/types/v1-ai-image-editor-create-response401.js +67 -0
  35. package/dist/types/v1-ai-image-editor-create-response404-message-enum.d.ts +4 -0
  36. package/dist/types/v1-ai-image-editor-create-response404-message-enum.js +2 -0
  37. package/dist/types/v1-ai-image-editor-create-response404.d.ts +19 -0
  38. package/dist/types/v1-ai-image-editor-create-response404.js +67 -0
  39. package/dist/types/v1-ai-image-editor-create-response422.d.ts +19 -0
  40. package/dist/types/v1-ai-image-editor-create-response422.js +67 -0
  41. package/dist/types/v1-image-projects-get-response.d.ts +1 -1
  42. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Unprocessable Entity
4
+ */
5
+ export type V1AiImageEditorCreateResponse422 = {
6
+ message: string;
7
+ };
8
+ /**
9
+ * @internal
10
+ * V1AiImageEditorCreateResponse422 without any key transformation, this is what
11
+ * we expect to come in as network data
12
+ */
13
+ export type External$V1AiImageEditorCreateResponse422 = {
14
+ message: string;
15
+ };
16
+ export declare const Schemas$V1AiImageEditorCreateResponse422: {
17
+ in: z.ZodType<V1AiImageEditorCreateResponse422, z.ZodTypeDef, unknown>;
18
+ out: z.ZodType<External$V1AiImageEditorCreateResponse422, z.ZodTypeDef, V1AiImageEditorCreateResponse422>;
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$V1AiImageEditorCreateResponse422 = 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 V1AiImageEditorCreateResponse422
41
+ */
42
+ const SchemaIn$V1AiImageEditorCreateResponse422 = 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$V1AiImageEditorCreateResponse422
54
+ */
55
+ const SchemaOut$V1AiImageEditorCreateResponse422 = 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$V1AiImageEditorCreateResponse422 = {
65
+ in: SchemaIn$V1AiImageEditorCreateResponse422,
66
+ out: SchemaOut$V1AiImageEditorCreateResponse422,
67
+ };
@@ -42,7 +42,7 @@ export type V1ImageProjectsGetResponse = {
42
42
  */
43
43
  totalFrameCost: number;
44
44
  /**
45
- * 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, AI_GIF
45
+ * 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, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR
46
46
  */
47
47
  type: string;
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-hour",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {