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.
- package/README.md +4 -0
- package/dist/core/auth.d.ts +11 -26
- package/dist/core/auth.js +48 -62
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -4
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/resources/v1/ai-image-editor/index.d.ts +2 -0
- package/dist/resources/v1/ai-image-editor/index.js +5 -0
- package/dist/resources/v1/ai-image-editor/request-types.d.ts +31 -0
- package/dist/resources/v1/ai-image-editor/request-types.js +77 -0
- package/dist/resources/v1/ai-image-editor/resource-client.d.ts +14 -0
- package/dist/resources/v1/ai-image-editor/resource-client.js +30 -0
- package/dist/resources/v1/files/upload-urls/resource-client.d.ts +3 -4
- package/dist/resources/v1/files/upload-urls/resource-client.js +3 -4
- package/dist/resources/v1/index.d.ts +1 -0
- package/dist/resources/v1/index.js +2 -1
- package/dist/resources/v1/resource-client.d.ts +3 -0
- package/dist/resources/v1/resource-client.js +6 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/v1-ai-image-editor-create-body-assets.d.ts +22 -0
- package/dist/types/v1-ai-image-editor-create-body-assets.js +67 -0
- package/dist/types/v1-ai-image-editor-create-body-style.d.ts +22 -0
- package/dist/types/v1-ai-image-editor-create-body-style.js +67 -0
- package/dist/types/v1-ai-image-editor-create-body.d.ts +31 -0
- package/dist/types/v1-ai-image-editor-create-body.js +77 -0
- package/dist/types/v1-ai-image-editor-create-response.d.ts +34 -0
- package/dist/types/v1-ai-image-editor-create-response.js +75 -0
- package/dist/types/v1-ai-image-editor-create-response400.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response400.js +67 -0
- package/dist/types/v1-ai-image-editor-create-response401-message-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-response401-message-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-response401.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response401.js +67 -0
- package/dist/types/v1-ai-image-editor-create-response404-message-enum.d.ts +4 -0
- package/dist/types/v1-ai-image-editor-create-response404-message-enum.js +2 -0
- package/dist/types/v1-ai-image-editor-create-response404.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response404.js +67 -0
- package/dist/types/v1-ai-image-editor-create-response422.d.ts +19 -0
- package/dist/types/v1-ai-image-editor-create-response422.js +67 -0
- package/dist/types/v1-image-projects-get-response.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiImageEditorCreateBodyAssets = 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 V1AiImageEditorCreateBodyAssets
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateBodyAssets = z
|
|
43
|
+
.object({
|
|
44
|
+
image_file_path: z.string(),
|
|
45
|
+
})
|
|
46
|
+
.transform((obj) => {
|
|
47
|
+
return (0, core_1.zodTransform)(obj, {
|
|
48
|
+
image_file_path: "imageFilePath",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiImageEditorCreateBodyAssets
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateBodyAssets = z
|
|
56
|
+
.object({
|
|
57
|
+
imageFilePath: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((obj) => {
|
|
60
|
+
return (0, core_1.zodTransform)(obj, {
|
|
61
|
+
imageFilePath: "image_file_path",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.Schemas$V1AiImageEditorCreateBodyAssets = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateBodyAssets,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateBodyAssets,
|
|
67
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* V1AiImageEditorCreateBodyStyle
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateBodyStyle = {
|
|
6
|
+
/**
|
|
7
|
+
* The prompt used to edit the image.
|
|
8
|
+
*/
|
|
9
|
+
prompt: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
* V1AiImageEditorCreateBodyStyle without any key transformation, this is what
|
|
14
|
+
* we expect to come in as network data
|
|
15
|
+
*/
|
|
16
|
+
export type External$V1AiImageEditorCreateBodyStyle = {
|
|
17
|
+
prompt: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const Schemas$V1AiImageEditorCreateBodyStyle: {
|
|
20
|
+
in: z.ZodType<V1AiImageEditorCreateBodyStyle, z.ZodTypeDef, unknown>;
|
|
21
|
+
out: z.ZodType<External$V1AiImageEditorCreateBodyStyle, z.ZodTypeDef, V1AiImageEditorCreateBodyStyle>;
|
|
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$V1AiImageEditorCreateBodyStyle = 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 V1AiImageEditorCreateBodyStyle
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateBodyStyle = 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$V1AiImageEditorCreateBodyStyle
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateBodyStyle = 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$V1AiImageEditorCreateBodyStyle = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateBodyStyle,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateBodyStyle,
|
|
67
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { External$V1AiImageEditorCreateBodyAssets, V1AiImageEditorCreateBodyAssets } from "./v1-ai-image-editor-create-body-assets";
|
|
2
|
+
import { External$V1AiImageEditorCreateBodyStyle, V1AiImageEditorCreateBodyStyle } from "./v1-ai-image-editor-create-body-style";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
/**
|
|
5
|
+
* V1AiImageEditorCreateBody
|
|
6
|
+
*/
|
|
7
|
+
export type V1AiImageEditorCreateBody = {
|
|
8
|
+
/**
|
|
9
|
+
* Provide the assets for image edit
|
|
10
|
+
*/
|
|
11
|
+
assets: V1AiImageEditorCreateBodyAssets;
|
|
12
|
+
/**
|
|
13
|
+
* The name of image
|
|
14
|
+
*/
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
style: V1AiImageEditorCreateBodyStyle;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* V1AiImageEditorCreateBody without any key transformation, this is what
|
|
21
|
+
* we expect to come in as network data
|
|
22
|
+
*/
|
|
23
|
+
export type External$V1AiImageEditorCreateBody = {
|
|
24
|
+
assets: External$V1AiImageEditorCreateBodyAssets;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
style: External$V1AiImageEditorCreateBodyStyle;
|
|
27
|
+
};
|
|
28
|
+
export declare const Schemas$V1AiImageEditorCreateBody: {
|
|
29
|
+
in: z.ZodType<V1AiImageEditorCreateBody, z.ZodTypeDef, unknown>;
|
|
30
|
+
out: z.ZodType<External$V1AiImageEditorCreateBody, z.ZodTypeDef, V1AiImageEditorCreateBody>;
|
|
31
|
+
};
|
|
@@ -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$V1AiImageEditorCreateBody = void 0;
|
|
37
|
+
const v1_ai_image_editor_create_body_assets_1 = require("./v1-ai-image-editor-create-body-assets");
|
|
38
|
+
const v1_ai_image_editor_create_body_style_1 = require("./v1-ai-image-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 V1AiImageEditorCreateBody
|
|
43
|
+
*/
|
|
44
|
+
const SchemaIn$V1AiImageEditorCreateBody = z
|
|
45
|
+
.object({
|
|
46
|
+
assets: v1_ai_image_editor_create_body_assets_1.Schemas$V1AiImageEditorCreateBodyAssets.in,
|
|
47
|
+
name: z.string().optional(),
|
|
48
|
+
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.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$V1AiImageEditorCreateBody
|
|
60
|
+
*/
|
|
61
|
+
const SchemaOut$V1AiImageEditorCreateBody = z
|
|
62
|
+
.object({
|
|
63
|
+
assets: v1_ai_image_editor_create_body_assets_1.Schemas$V1AiImageEditorCreateBodyAssets.out,
|
|
64
|
+
name: z.string().optional(),
|
|
65
|
+
style: v1_ai_image_editor_create_body_style_1.Schemas$V1AiImageEditorCreateBodyStyle.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$V1AiImageEditorCreateBody = {
|
|
75
|
+
in: SchemaIn$V1AiImageEditorCreateBody,
|
|
76
|
+
out: SchemaOut$V1AiImageEditorCreateBody,
|
|
77
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Success
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
14
|
+
*/
|
|
15
|
+
frameCost: number;
|
|
16
|
+
/**
|
|
17
|
+
* 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
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
* V1AiImageEditorCreateResponse without any key transformation, this is what
|
|
24
|
+
* we expect to come in as network data
|
|
25
|
+
*/
|
|
26
|
+
export type External$V1AiImageEditorCreateResponse = {
|
|
27
|
+
credits_charged: number;
|
|
28
|
+
frame_cost: number;
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const Schemas$V1AiImageEditorCreateResponse: {
|
|
32
|
+
in: z.ZodType<V1AiImageEditorCreateResponse, z.ZodTypeDef, unknown>;
|
|
33
|
+
out: z.ZodType<External$V1AiImageEditorCreateResponse, z.ZodTypeDef, V1AiImageEditorCreateResponse>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiImageEditorCreateResponse = 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 V1AiImageEditorCreateResponse
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse = z
|
|
43
|
+
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
45
|
+
frame_cost: z.number().int(),
|
|
46
|
+
id: z.string(),
|
|
47
|
+
})
|
|
48
|
+
.transform((obj) => {
|
|
49
|
+
return (0, core_1.zodTransform)(obj, {
|
|
50
|
+
credits_charged: "creditsCharged",
|
|
51
|
+
frame_cost: "frameCost",
|
|
52
|
+
id: "id",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiImageEditorCreateResponse
|
|
58
|
+
*/
|
|
59
|
+
const SchemaOut$V1AiImageEditorCreateResponse = z
|
|
60
|
+
.object({
|
|
61
|
+
creditsCharged: z.number().int(),
|
|
62
|
+
frameCost: z.number().int(),
|
|
63
|
+
id: z.string(),
|
|
64
|
+
})
|
|
65
|
+
.transform((obj) => {
|
|
66
|
+
return (0, core_1.zodTransform)(obj, {
|
|
67
|
+
creditsCharged: "credits_charged",
|
|
68
|
+
frameCost: "frame_cost",
|
|
69
|
+
id: "id",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
exports.Schemas$V1AiImageEditorCreateResponse = {
|
|
73
|
+
in: SchemaIn$V1AiImageEditorCreateResponse,
|
|
74
|
+
out: SchemaOut$V1AiImageEditorCreateResponse,
|
|
75
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The request is invalid
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateResponse400 = {
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* V1AiImageEditorCreateResponse400 without any key transformation, this is what
|
|
11
|
+
* we expect to come in as network data
|
|
12
|
+
*/
|
|
13
|
+
export type External$V1AiImageEditorCreateResponse400 = {
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const Schemas$V1AiImageEditorCreateResponse400: {
|
|
17
|
+
in: z.ZodType<V1AiImageEditorCreateResponse400, z.ZodTypeDef, unknown>;
|
|
18
|
+
out: z.ZodType<External$V1AiImageEditorCreateResponse400, z.ZodTypeDef, V1AiImageEditorCreateResponse400>;
|
|
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$V1AiImageEditorCreateResponse400 = 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 V1AiImageEditorCreateResponse400
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse400 = 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$V1AiImageEditorCreateResponse400
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateResponse400 = 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$V1AiImageEditorCreateResponse400 = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateResponse400,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateResponse400,
|
|
67
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The request is not properly authenticated
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateResponse401 = {
|
|
6
|
+
message: "Unauthorized";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* V1AiImageEditorCreateResponse401 without any key transformation, this is what
|
|
11
|
+
* we expect to come in as network data
|
|
12
|
+
*/
|
|
13
|
+
export type External$V1AiImageEditorCreateResponse401 = {
|
|
14
|
+
message: "Unauthorized";
|
|
15
|
+
};
|
|
16
|
+
export declare const Schemas$V1AiImageEditorCreateResponse401: {
|
|
17
|
+
in: z.ZodType<V1AiImageEditorCreateResponse401, z.ZodTypeDef, unknown>;
|
|
18
|
+
out: z.ZodType<External$V1AiImageEditorCreateResponse401, z.ZodTypeDef, V1AiImageEditorCreateResponse401>;
|
|
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$V1AiImageEditorCreateResponse401 = 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 V1AiImageEditorCreateResponse401
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse401 = 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$V1AiImageEditorCreateResponse401
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateResponse401 = 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$V1AiImageEditorCreateResponse401 = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateResponse401,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateResponse401,
|
|
67
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Requested resource is not found
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiImageEditorCreateResponse404 = {
|
|
6
|
+
message: "Not Found";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* V1AiImageEditorCreateResponse404 without any key transformation, this is what
|
|
11
|
+
* we expect to come in as network data
|
|
12
|
+
*/
|
|
13
|
+
export type External$V1AiImageEditorCreateResponse404 = {
|
|
14
|
+
message: "Not Found";
|
|
15
|
+
};
|
|
16
|
+
export declare const Schemas$V1AiImageEditorCreateResponse404: {
|
|
17
|
+
in: z.ZodType<V1AiImageEditorCreateResponse404, z.ZodTypeDef, unknown>;
|
|
18
|
+
out: z.ZodType<External$V1AiImageEditorCreateResponse404, z.ZodTypeDef, V1AiImageEditorCreateResponse404>;
|
|
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$V1AiImageEditorCreateResponse404 = 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 V1AiImageEditorCreateResponse404
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiImageEditorCreateResponse404 = 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$V1AiImageEditorCreateResponse404
|
|
54
|
+
*/
|
|
55
|
+
const SchemaOut$V1AiImageEditorCreateResponse404 = 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$V1AiImageEditorCreateResponse404 = {
|
|
65
|
+
in: SchemaIn$V1AiImageEditorCreateResponse404,
|
|
66
|
+
out: SchemaOut$V1AiImageEditorCreateResponse404,
|
|
67
|
+
};
|